From c29c578908dc0271eeb13a4014e54bff07a29c05 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut <peter_e@gmx.net> Date: Sun, 8 Oct 2017 21:44:17 -0400 Subject: [PATCH] Don't use SGML empty tags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For DocBook XML compatibility, don't use SGML empty tags (</>) anymore, replace by the full tag name. Add a warning option to catch future occurrences. Alexander Lakhin, Jürgen Purtz --- doc/src/sgml/Makefile | 3 +- doc/src/sgml/acronyms.sgml | 18 +- doc/src/sgml/adminpack.sgml | 54 +- doc/src/sgml/advanced.sgml | 110 +- doc/src/sgml/amcheck.sgml | 66 +- doc/src/sgml/arch-dev.sgml | 64 +- doc/src/sgml/array.sgml | 110 +- doc/src/sgml/auth-delay.sgml | 6 +- doc/src/sgml/auto-explain.sgml | 36 +- doc/src/sgml/backup.sgml | 496 +-- doc/src/sgml/bgworker.sgml | 80 +- doc/src/sgml/biblio.sgml | 2 +- doc/src/sgml/bki.sgml | 86 +- doc/src/sgml/bloom.sgml | 24 +- doc/src/sgml/brin.sgml | 78 +- doc/src/sgml/btree-gin.sgml | 18 +- doc/src/sgml/btree-gist.sgml | 32 +- doc/src/sgml/catalogs.sgml | 1012 +++---- doc/src/sgml/charset.sgml | 270 +- doc/src/sgml/citext.sgml | 120 +- doc/src/sgml/client-auth.sgml | 328 +- doc/src/sgml/config.sgml | 2156 ++++++------- doc/src/sgml/contrib-spi.sgml | 80 +- doc/src/sgml/contrib.sgml | 26 +- doc/src/sgml/cube.sgml | 158 +- doc/src/sgml/custom-scan.sgml | 136 +- doc/src/sgml/datatype.sgml | 692 ++--- doc/src/sgml/datetime.sgml | 72 +- doc/src/sgml/dblink.sgml | 270 +- doc/src/sgml/ddl.sgml | 390 +-- doc/src/sgml/dfunc.sgml | 40 +- doc/src/sgml/dict-int.sgml | 18 +- doc/src/sgml/dict-xsyn.sgml | 40 +- doc/src/sgml/diskusage.sgml | 16 +- doc/src/sgml/dml.sgml | 32 +- doc/src/sgml/docguide.sgml | 2 +- doc/src/sgml/earthdistance.sgml | 32 +- doc/src/sgml/ecpg.sgml | 734 ++--- doc/src/sgml/errcodes.sgml | 18 +- doc/src/sgml/event-trigger.sgml | 78 +- doc/src/sgml/extend.sgml | 362 +-- doc/src/sgml/external-projects.sgml | 18 +- doc/src/sgml/fdwhandler.sgml | 880 +++--- doc/src/sgml/file-fdw.sgml | 48 +- doc/src/sgml/func.sgml | 2528 ++++++++-------- doc/src/sgml/fuzzystrmatch.sgml | 26 +- doc/src/sgml/generate-errcodes-table.pl | 4 +- doc/src/sgml/generic-wal.sgml | 42 +- doc/src/sgml/geqo.sgml | 12 +- doc/src/sgml/gin.sgml | 286 +- doc/src/sgml/gist.sgml | 402 +-- doc/src/sgml/high-availability.sgml | 516 ++-- doc/src/sgml/history.sgml | 4 +- doc/src/sgml/hstore.sgml | 152 +- doc/src/sgml/indexam.sgml | 446 +-- doc/src/sgml/indices.sgml | 224 +- doc/src/sgml/info.sgml | 6 +- doc/src/sgml/information_schema.sgml | 364 +-- doc/src/sgml/install-windows.sgml | 58 +- doc/src/sgml/installation.sgml | 460 +-- doc/src/sgml/intagg.sgml | 28 +- doc/src/sgml/intarray.sgml | 68 +- doc/src/sgml/intro.sgml | 4 +- doc/src/sgml/isn.sgml | 28 +- doc/src/sgml/json.sgml | 174 +- doc/src/sgml/libpq.sgml | 1414 ++++----- doc/src/sgml/lo.sgml | 34 +- doc/src/sgml/lobj.sgml | 128 +- doc/src/sgml/logicaldecoding.sgml | 18 +- doc/src/sgml/ltree.sgml | 234 +- doc/src/sgml/maintenance.sgml | 338 +-- doc/src/sgml/manage-ag.sgml | 196 +- doc/src/sgml/monitoring.sgml | 1440 ++++----- doc/src/sgml/mvcc.sgml | 130 +- doc/src/sgml/nls.sgml | 24 +- doc/src/sgml/notation.sgml | 8 +- doc/src/sgml/oid2name.sgml | 60 +- doc/src/sgml/pageinspect.sgml | 36 +- doc/src/sgml/parallel.sgml | 96 +- doc/src/sgml/perform.sgml | 344 +-- doc/src/sgml/pgbuffercache.sgml | 16 +- doc/src/sgml/pgcrypto.sgml | 176 +- doc/src/sgml/pgfreespacemap.sgml | 8 +- doc/src/sgml/pgprewarm.sgml | 16 +- doc/src/sgml/pgrowlocks.sgml | 10 +- doc/src/sgml/pgstandby.sgml | 100 +- doc/src/sgml/pgstatstatements.sgml | 106 +- doc/src/sgml/pgstattuple.sgml | 30 +- doc/src/sgml/pgtrgm.sgml | 90 +- doc/src/sgml/pgvisibility.sgml | 12 +- doc/src/sgml/planstats.sgml | 52 +- doc/src/sgml/plhandler.sgml | 50 +- doc/src/sgml/plperl.sgml | 148 +- doc/src/sgml/plpgsql.sgml | 1204 ++++---- doc/src/sgml/plpython.sgml | 104 +- doc/src/sgml/pltcl.sgml | 210 +- doc/src/sgml/postgres-fdw.sgml | 198 +- doc/src/sgml/postgres.sgml | 16 +- doc/src/sgml/problems.sgml | 20 +- doc/src/sgml/protocol.sgml | 474 +-- doc/src/sgml/queries.sgml | 674 ++--- doc/src/sgml/query.sgml | 36 +- doc/src/sgml/rangetypes.sgml | 66 +- doc/src/sgml/recovery-config.sgml | 132 +- doc/src/sgml/ref/abort.sgml | 2 +- doc/src/sgml/ref/alter_aggregate.sgml | 18 +- doc/src/sgml/ref/alter_collation.sgml | 2 +- doc/src/sgml/ref/alter_conversion.sgml | 2 +- doc/src/sgml/ref/alter_database.sgml | 4 +- .../sgml/ref/alter_default_privileges.sgml | 20 +- doc/src/sgml/ref/alter_domain.sgml | 20 +- doc/src/sgml/ref/alter_extension.sgml | 22 +- .../sgml/ref/alter_foreign_data_wrapper.sgml | 18 +- doc/src/sgml/ref/alter_foreign_table.sgml | 42 +- doc/src/sgml/ref/alter_function.sgml | 28 +- doc/src/sgml/ref/alter_group.sgml | 8 +- doc/src/sgml/ref/alter_index.sgml | 10 +- doc/src/sgml/ref/alter_materialized_view.sgml | 4 +- doc/src/sgml/ref/alter_opclass.sgml | 2 +- doc/src/sgml/ref/alter_operator.sgml | 2 +- doc/src/sgml/ref/alter_opfamily.sgml | 32 +- doc/src/sgml/ref/alter_publication.sgml | 8 +- doc/src/sgml/ref/alter_role.sgml | 22 +- doc/src/sgml/ref/alter_schema.sgml | 2 +- doc/src/sgml/ref/alter_sequence.sgml | 34 +- doc/src/sgml/ref/alter_server.sgml | 12 +- doc/src/sgml/ref/alter_statistics.sgml | 4 +- doc/src/sgml/ref/alter_subscription.sgml | 4 +- doc/src/sgml/ref/alter_system.sgml | 12 +- doc/src/sgml/ref/alter_table.sgml | 140 +- doc/src/sgml/ref/alter_tablespace.sgml | 4 +- doc/src/sgml/ref/alter_trigger.sgml | 4 +- doc/src/sgml/ref/alter_tsconfig.sgml | 20 +- doc/src/sgml/ref/alter_tsdictionary.sgml | 8 +- doc/src/sgml/ref/alter_tsparser.sgml | 2 +- doc/src/sgml/ref/alter_tstemplate.sgml | 2 +- doc/src/sgml/ref/alter_type.sgml | 6 +- doc/src/sgml/ref/alter_user_mapping.sgml | 14 +- doc/src/sgml/ref/alter_view.sgml | 10 +- doc/src/sgml/ref/analyze.sgml | 16 +- doc/src/sgml/ref/begin.sgml | 4 +- doc/src/sgml/ref/close.sgml | 4 +- doc/src/sgml/ref/cluster.sgml | 10 +- doc/src/sgml/ref/clusterdb.sgml | 62 +- doc/src/sgml/ref/comment.sgml | 26 +- doc/src/sgml/ref/commit.sgml | 2 +- doc/src/sgml/ref/commit_prepared.sgml | 2 +- doc/src/sgml/ref/copy.sgml | 226 +- doc/src/sgml/ref/create_access_method.sgml | 8 +- doc/src/sgml/ref/create_aggregate.sgml | 164 +- doc/src/sgml/ref/create_cast.sgml | 80 +- doc/src/sgml/ref/create_collation.sgml | 2 +- doc/src/sgml/ref/create_conversion.sgml | 6 +- doc/src/sgml/ref/create_database.sgml | 54 +- doc/src/sgml/ref/create_domain.sgml | 22 +- doc/src/sgml/ref/create_event_trigger.sgml | 6 +- doc/src/sgml/ref/create_extension.sgml | 38 +- .../sgml/ref/create_foreign_data_wrapper.sgml | 12 +- doc/src/sgml/ref/create_foreign_table.sgml | 44 +- doc/src/sgml/ref/create_function.sgml | 128 +- doc/src/sgml/ref/create_index.sgml | 120 +- doc/src/sgml/ref/create_language.sgml | 42 +- .../sgml/ref/create_materialized_view.sgml | 10 +- doc/src/sgml/ref/create_opclass.sgml | 38 +- doc/src/sgml/ref/create_operator.sgml | 24 +- doc/src/sgml/ref/create_opfamily.sgml | 4 +- doc/src/sgml/ref/create_policy.sgml | 20 +- doc/src/sgml/ref/create_publication.sgml | 14 +- doc/src/sgml/ref/create_role.sgml | 94 +- doc/src/sgml/ref/create_rule.sgml | 32 +- doc/src/sgml/ref/create_schema.sgml | 32 +- doc/src/sgml/ref/create_sequence.sgml | 28 +- doc/src/sgml/ref/create_server.sgml | 8 +- doc/src/sgml/ref/create_statistics.sgml | 10 +- doc/src/sgml/ref/create_subscription.sgml | 4 +- doc/src/sgml/ref/create_table.sgml | 294 +- doc/src/sgml/ref/create_table_as.sgml | 36 +- doc/src/sgml/ref/create_tablespace.sgml | 22 +- doc/src/sgml/ref/create_trigger.sgml | 172 +- doc/src/sgml/ref/create_tsconfig.sgml | 2 +- doc/src/sgml/ref/create_tstemplate.sgml | 2 +- doc/src/sgml/ref/create_type.sgml | 98 +- doc/src/sgml/ref/create_user.sgml | 4 +- doc/src/sgml/ref/create_user_mapping.sgml | 10 +- doc/src/sgml/ref/create_view.sgml | 140 +- doc/src/sgml/ref/createdb.sgml | 66 +- doc/src/sgml/ref/createuser.sgml | 114 +- doc/src/sgml/ref/declare.sgml | 56 +- doc/src/sgml/ref/delete.sgml | 62 +- doc/src/sgml/ref/discard.sgml | 10 +- doc/src/sgml/ref/do.sgml | 18 +- doc/src/sgml/ref/drop_access_method.sgml | 4 +- doc/src/sgml/ref/drop_aggregate.sgml | 10 +- doc/src/sgml/ref/drop_collation.sgml | 4 +- doc/src/sgml/ref/drop_conversion.sgml | 2 +- doc/src/sgml/ref/drop_database.sgml | 2 +- doc/src/sgml/ref/drop_domain.sgml | 6 +- doc/src/sgml/ref/drop_extension.sgml | 6 +- .../sgml/ref/drop_foreign_data_wrapper.sgml | 6 +- doc/src/sgml/ref/drop_foreign_table.sgml | 2 +- doc/src/sgml/ref/drop_function.sgml | 12 +- doc/src/sgml/ref/drop_index.sgml | 12 +- doc/src/sgml/ref/drop_language.sgml | 4 +- doc/src/sgml/ref/drop_opclass.sgml | 12 +- doc/src/sgml/ref/drop_opfamily.sgml | 4 +- doc/src/sgml/ref/drop_owned.sgml | 2 +- doc/src/sgml/ref/drop_publication.sgml | 2 +- doc/src/sgml/ref/drop_role.sgml | 4 +- doc/src/sgml/ref/drop_schema.sgml | 2 +- doc/src/sgml/ref/drop_sequence.sgml | 2 +- doc/src/sgml/ref/drop_server.sgml | 6 +- doc/src/sgml/ref/drop_subscription.sgml | 2 +- doc/src/sgml/ref/drop_table.sgml | 6 +- doc/src/sgml/ref/drop_tablespace.sgml | 6 +- doc/src/sgml/ref/drop_tsconfig.sgml | 4 +- doc/src/sgml/ref/drop_tsdictionary.sgml | 2 +- doc/src/sgml/ref/drop_tsparser.sgml | 2 +- doc/src/sgml/ref/drop_tstemplate.sgml | 2 +- doc/src/sgml/ref/drop_type.sgml | 4 +- doc/src/sgml/ref/drop_user_mapping.sgml | 14 +- doc/src/sgml/ref/drop_view.sgml | 2 +- doc/src/sgml/ref/dropdb.sgml | 48 +- doc/src/sgml/ref/dropuser.sgml | 46 +- doc/src/sgml/ref/ecpg-ref.sgml | 6 +- doc/src/sgml/ref/end.sgml | 2 +- doc/src/sgml/ref/execute.sgml | 4 +- doc/src/sgml/ref/explain.sgml | 18 +- doc/src/sgml/ref/fetch.sgml | 36 +- doc/src/sgml/ref/grant.sgml | 98 +- doc/src/sgml/ref/import_foreign_schema.sgml | 14 +- doc/src/sgml/ref/initdb.sgml | 42 +- doc/src/sgml/ref/insert.sgml | 86 +- doc/src/sgml/ref/listen.sgml | 6 +- doc/src/sgml/ref/load.sgml | 14 +- doc/src/sgml/ref/lock.sgml | 72 +- doc/src/sgml/ref/move.sgml | 2 +- doc/src/sgml/ref/notify.sgml | 12 +- doc/src/sgml/ref/pg_basebackup.sgml | 40 +- doc/src/sgml/ref/pg_config-ref.sgml | 100 +- doc/src/sgml/ref/pg_controldata.sgml | 8 +- doc/src/sgml/ref/pg_ctl-ref.sgml | 50 +- doc/src/sgml/ref/pg_dump.sgml | 280 +- doc/src/sgml/ref/pg_dumpall.sgml | 102 +- doc/src/sgml/ref/pg_isready.sgml | 32 +- doc/src/sgml/ref/pg_receivewal.sgml | 34 +- doc/src/sgml/ref/pg_recvlogical.sgml | 26 +- doc/src/sgml/ref/pg_resetwal.sgml | 56 +- doc/src/sgml/ref/pg_restore.sgml | 150 +- doc/src/sgml/ref/pg_rewind.sgml | 48 +- doc/src/sgml/ref/pg_waldump.sgml | 16 +- doc/src/sgml/ref/pgarchivecleanup.sgml | 50 +- doc/src/sgml/ref/pgbench.sgml | 568 ++-- doc/src/sgml/ref/pgtestfsync.sgml | 16 +- doc/src/sgml/ref/pgtesttiming.sgml | 10 +- doc/src/sgml/ref/pgupgrade.sgml | 232 +- doc/src/sgml/ref/postgres-ref.sgml | 76 +- doc/src/sgml/ref/postmaster.sgml | 2 +- doc/src/sgml/ref/prepare.sgml | 18 +- doc/src/sgml/ref/prepare_transaction.sgml | 30 +- doc/src/sgml/ref/psql-ref.sgml | 662 ++-- doc/src/sgml/ref/reassign_owned.sgml | 2 +- .../sgml/ref/refresh_materialized_view.sgml | 4 +- doc/src/sgml/ref/reindex.sgml | 34 +- doc/src/sgml/ref/reindexdb.sgml | 80 +- doc/src/sgml/ref/release_savepoint.sgml | 2 +- doc/src/sgml/ref/reset.sgml | 10 +- doc/src/sgml/ref/revoke.sgml | 48 +- doc/src/sgml/ref/rollback.sgml | 2 +- doc/src/sgml/ref/rollback_prepared.sgml | 2 +- doc/src/sgml/ref/rollback_to.sgml | 28 +- doc/src/sgml/ref/savepoint.sgml | 8 +- doc/src/sgml/ref/security_label.sgml | 22 +- doc/src/sgml/ref/select.sgml | 598 ++-- doc/src/sgml/ref/set.sgml | 44 +- doc/src/sgml/ref/set_constraints.sgml | 14 +- doc/src/sgml/ref/set_role.sgml | 36 +- doc/src/sgml/ref/set_session_auth.sgml | 16 +- doc/src/sgml/ref/set_transaction.sgml | 12 +- doc/src/sgml/ref/show.sgml | 2 +- doc/src/sgml/ref/start_transaction.sgml | 6 +- doc/src/sgml/ref/truncate.sgml | 38 +- doc/src/sgml/ref/unlisten.sgml | 2 +- doc/src/sgml/ref/update.sgml | 88 +- doc/src/sgml/ref/vacuum.sgml | 24 +- doc/src/sgml/ref/vacuumdb.sgml | 52 +- doc/src/sgml/ref/values.sgml | 60 +- doc/src/sgml/regress.sgml | 122 +- doc/src/sgml/release-10.sgml | 736 ++--- doc/src/sgml/release-7.4.sgml | 700 ++--- doc/src/sgml/release-8.0.sgml | 1266 ++++---- doc/src/sgml/release-8.1.sgml | 1344 ++++---- doc/src/sgml/release-8.2.sgml | 1598 +++++----- doc/src/sgml/release-8.3.sgml | 1682 +++++----- doc/src/sgml/release-8.4.sgml | 2468 +++++++-------- doc/src/sgml/release-9.0.sgml | 2572 ++++++++-------- doc/src/sgml/release-9.1.sgml | 2678 ++++++++-------- doc/src/sgml/release-9.2.sgml | 2694 ++++++++--------- doc/src/sgml/release-9.3.sgml | 2518 +++++++-------- doc/src/sgml/release-9.4.sgml | 2142 ++++++------- doc/src/sgml/release-9.5.sgml | 1800 +++++------ doc/src/sgml/release-9.6.sgml | 1516 +++++----- doc/src/sgml/release-old.sgml | 314 +- doc/src/sgml/release.sgml | 2 +- doc/src/sgml/rowtypes.sgml | 130 +- doc/src/sgml/rules.sgml | 326 +- doc/src/sgml/runtime.sgml | 610 ++-- doc/src/sgml/seg.sgml | 70 +- doc/src/sgml/sepgsql.sgml | 190 +- doc/src/sgml/sourcerepo.sgml | 24 +- doc/src/sgml/sources.sgml | 170 +- doc/src/sgml/spgist.sgml | 468 +-- doc/src/sgml/spi.sgml | 226 +- doc/src/sgml/sslinfo.sgml | 14 +- doc/src/sgml/start.sgml | 22 +- doc/src/sgml/storage.sgml | 328 +- doc/src/sgml/syntax.sgml | 362 +-- doc/src/sgml/tablefunc.sgml | 168 +- doc/src/sgml/tablesample-method.sgml | 128 +- doc/src/sgml/tcn.sgml | 8 +- doc/src/sgml/test-decoding.sgml | 4 +- doc/src/sgml/textsearch.sgml | 734 ++--- doc/src/sgml/trigger.sgml | 220 +- doc/src/sgml/tsm-system-rows.sgml | 8 +- doc/src/sgml/tsm-system-time.sgml | 8 +- doc/src/sgml/typeconv.sgml | 122 +- doc/src/sgml/unaccent.sgml | 44 +- doc/src/sgml/user-manag.sgml | 138 +- doc/src/sgml/uuid-ossp.sgml | 26 +- doc/src/sgml/vacuumlo.sgml | 42 +- doc/src/sgml/wal.sgml | 138 +- doc/src/sgml/xaggr.sgml | 160 +- doc/src/sgml/xfunc.sgml | 614 ++-- doc/src/sgml/xindex.sgml | 192 +- doc/src/sgml/xml2.sgml | 58 +- doc/src/sgml/xoper.sgml | 142 +- doc/src/sgml/xplang.sgml | 26 +- doc/src/sgml/xtypes.sgml | 68 +- 337 files changed, 31636 insertions(+), 31635 deletions(-) diff --git a/doc/src/sgml/Makefile b/doc/src/sgml/Makefile index 164c00bb63b..428eb569fc4 100644 --- a/doc/src/sgml/Makefile +++ b/doc/src/sgml/Makefile @@ -66,10 +66,11 @@ ALLSGML := $(wildcard $(srcdir)/*.sgml $(srcdir)/ref/*.sgml) $(GENERATED_SGML) # Enable some extra warnings # -wfully-tagged needed to throw a warning on missing tags # for older tool chains, 2007-08-31 -override SPFLAGS += -wall -wno-unused-param -wno-empty -wfully-tagged +override SPFLAGS += -wall -wno-unused-param -wfully-tagged # Additional warnings for XML compatibility. The conditional is meant # to detect whether we are using OpenSP rather than the ancient # original SP. +override SPFLAGS += -wempty ifneq (,$(filter o%,$(notdir $(OSX)))) override SPFLAGS += -wdata-delim -winstance-ignore-ms -winstance-include-ms -winstance-param-entity endif diff --git a/doc/src/sgml/acronyms.sgml b/doc/src/sgml/acronyms.sgml index 29f85e08468..35514d4d9ac 100644 --- a/doc/src/sgml/acronyms.sgml +++ b/doc/src/sgml/acronyms.sgml @@ -4,8 +4,8 @@ <title>Acronyms</title> <para> - This is a list of acronyms commonly used in the <productname>PostgreSQL</> - documentation and in discussions about <productname>PostgreSQL</>. + This is a list of acronyms commonly used in the <productname>PostgreSQL</productname> + documentation and in discussions about <productname>PostgreSQL</productname>. <variablelist> @@ -153,7 +153,7 @@ <ulink url="http://en.wikipedia.org/wiki/Data_Definition_Language">Data Definition Language</ulink>, SQL commands such as <command>CREATE - TABLE</>, <command>ALTER USER</> + TABLE</command>, <command>ALTER USER</command> </para> </listitem> </varlistentry> @@ -164,8 +164,8 @@ <para> <ulink url="http://en.wikipedia.org/wiki/Data_Manipulation_Language">Data - Manipulation Language</ulink>, SQL commands such as <command>INSERT</>, - <command>UPDATE</>, <command>DELETE</> + Manipulation Language</ulink>, SQL commands such as <command>INSERT</command>, + <command>UPDATE</command>, <command>DELETE</command> </para> </listitem> </varlistentry> @@ -281,7 +281,7 @@ <listitem> <para> <link linkend="config-setting">Grand Unified Configuration</link>, - the <productname>PostgreSQL</> subsystem that handles server configuration + the <productname>PostgreSQL</productname> subsystem that handles server configuration </para> </listitem> </varlistentry> @@ -384,7 +384,7 @@ <term><acronym>LSN</acronym></term> <listitem> <para> - Log Sequence Number, see <link linkend="datatype-pg-lsn"><type>pg_lsn</></link> + Log Sequence Number, see <link linkend="datatype-pg-lsn"><type>pg_lsn</type></link> and <link linkend="wal-internals">WAL Internals</link>. </para> </listitem> @@ -486,7 +486,7 @@ <term><acronym>PGSQL</acronym></term> <listitem> <para> - <link linkend="postgres"><productname>PostgreSQL</></link> + <link linkend="postgres"><productname>PostgreSQL</productname></link> </para> </listitem> </varlistentry> @@ -495,7 +495,7 @@ <term><acronym>PGXS</acronym></term> <listitem> <para> - <link linkend="extend-pgxs"><productname>PostgreSQL</> Extension System</link> + <link linkend="extend-pgxs"><productname>PostgreSQL</productname> Extension System</link> </para> </listitem> </varlistentry> diff --git a/doc/src/sgml/adminpack.sgml b/doc/src/sgml/adminpack.sgml index fddf90c4a56..b27a4a325d9 100644 --- a/doc/src/sgml/adminpack.sgml +++ b/doc/src/sgml/adminpack.sgml @@ -8,8 +8,8 @@ </indexterm> <para> - <filename>adminpack</> provides a number of support functions which - <application>pgAdmin</> and other administration and management tools can + <filename>adminpack</filename> provides a number of support functions which + <application>pgAdmin</application> and other administration and management tools can use to provide additional functionality, such as remote management of server log files. Use of all these functions is restricted to superusers. @@ -25,7 +25,7 @@ </para> <table id="functions-adminpack-table"> - <title><filename>adminpack</> Functions</title> + <title><filename>adminpack</filename> Functions</title> <tgroup cols="3"> <thead> <row><entry>Name</entry> <entry>Return Type</entry> <entry>Description</entry> @@ -58,7 +58,7 @@ <entry><function>pg_catalog.pg_logdir_ls()</function></entry> <entry><type>setof record</type></entry> <entry> - List the log files in the <varname>log_directory</> directory + List the log files in the <varname>log_directory</varname> directory </entry> </row> </tbody> @@ -69,9 +69,9 @@ <primary>pg_file_write</primary> </indexterm> <para> - <function>pg_file_write</> writes the specified <parameter>data</> into - the file named by <parameter>filename</>. If <parameter>append</> is - false, the file must not already exist. If <parameter>append</> is true, + <function>pg_file_write</function> writes the specified <parameter>data</parameter> into + the file named by <parameter>filename</parameter>. If <parameter>append</parameter> is + false, the file must not already exist. If <parameter>append</parameter> is true, the file can already exist, and will be appended to if so. Returns the number of bytes written. </para> @@ -80,15 +80,15 @@ <primary>pg_file_rename</primary> </indexterm> <para> - <function>pg_file_rename</> renames a file. If <parameter>archivename</> - is omitted or NULL, it simply renames <parameter>oldname</> - to <parameter>newname</> (which must not already exist). - If <parameter>archivename</> is provided, it first - renames <parameter>newname</> to <parameter>archivename</> (which must - not already exist), and then renames <parameter>oldname</> - to <parameter>newname</>. In event of failure of the second rename step, - it will try to rename <parameter>archivename</> back - to <parameter>newname</> before reporting the error. + <function>pg_file_rename</function> renames a file. If <parameter>archivename</parameter> + is omitted or NULL, it simply renames <parameter>oldname</parameter> + to <parameter>newname</parameter> (which must not already exist). + If <parameter>archivename</parameter> is provided, it first + renames <parameter>newname</parameter> to <parameter>archivename</parameter> (which must + not already exist), and then renames <parameter>oldname</parameter> + to <parameter>newname</parameter>. In event of failure of the second rename step, + it will try to rename <parameter>archivename</parameter> back + to <parameter>newname</parameter> before reporting the error. Returns true on success, false if the source file(s) are not present or not writable; other cases throw errors. </para> @@ -97,19 +97,19 @@ <primary>pg_file_unlink</primary> </indexterm> <para> - <function>pg_file_unlink</> removes the specified file. + <function>pg_file_unlink</function> removes the specified file. Returns true on success, false if the specified file is not present - or the <function>unlink()</> call fails; other cases throw errors. + or the <function>unlink()</function> call fails; other cases throw errors. </para> <indexterm> <primary>pg_logdir_ls</primary> </indexterm> <para> - <function>pg_logdir_ls</> returns the start timestamps and path + <function>pg_logdir_ls</function> returns the start timestamps and path names of all the log files in the <xref linkend="guc-log-directory"> directory. The <xref linkend="guc-log-filename"> parameter must have its - default setting (<literal>postgresql-%Y-%m-%d_%H%M%S.log</>) to use this + default setting (<literal>postgresql-%Y-%m-%d_%H%M%S.log</literal>) to use this function. </para> @@ -119,12 +119,12 @@ and should not be used in new applications; instead use those shown in <xref linkend="functions-admin-signal-table"> and <xref linkend="functions-admin-genfile-table">. These functions are - provided in <filename>adminpack</> only for compatibility with old - versions of <application>pgAdmin</>. + provided in <filename>adminpack</filename> only for compatibility with old + versions of <application>pgAdmin</application>. </para> <table id="functions-adminpack-deprecated-table"> - <title>Deprecated <filename>adminpack</> Functions</title> + <title>Deprecated <filename>adminpack</filename> Functions</title> <tgroup cols="3"> <thead> <row><entry>Name</entry> <entry>Return Type</entry> <entry>Description</entry> @@ -136,22 +136,22 @@ <entry><function>pg_catalog.pg_file_read(filename text, offset bigint, nbytes bigint)</function></entry> <entry><type>text</type></entry> <entry> - Alternate name for <function>pg_read_file()</> + Alternate name for <function>pg_read_file()</function> </entry> </row> <row> <entry><function>pg_catalog.pg_file_length(filename text)</function></entry> <entry><type>bigint</type></entry> <entry> - Same as <structfield>size</> column returned - by <function>pg_stat_file()</> + Same as <structfield>size</structfield> column returned + by <function>pg_stat_file()</function> </entry> </row> <row> <entry><function>pg_catalog.pg_logfile_rotate()</function></entry> <entry><type>integer</type></entry> <entry> - Alternate name for <function>pg_rotate_logfile()</>, but note that it + Alternate name for <function>pg_rotate_logfile()</function>, but note that it returns integer 0 or 1 rather than <type>boolean</type> </entry> </row> diff --git a/doc/src/sgml/advanced.sgml b/doc/src/sgml/advanced.sgml index f47c01987be..bf87df4dcb1 100644 --- a/doc/src/sgml/advanced.sgml +++ b/doc/src/sgml/advanced.sgml @@ -145,7 +145,7 @@ DETAIL: Key (city)=(Berkeley) is not present in table "cities". </indexterm> <para> - <firstterm>Transactions</> are a fundamental concept of all database + <firstterm>Transactions</firstterm> are a fundamental concept of all database systems. The essential point of a transaction is that it bundles multiple steps into a single, all-or-nothing operation. The intermediate states between the steps are not visible to other concurrent transactions, @@ -182,8 +182,8 @@ UPDATE branches SET balance = balance + 100.00 remain a happy customer if she was debited without Bob being credited. We need a guarantee that if something goes wrong partway through the operation, none of the steps executed so far will take effect. Grouping - the updates into a <firstterm>transaction</> gives us this guarantee. - A transaction is said to be <firstterm>atomic</>: from the point of + the updates into a <firstterm>transaction</firstterm> gives us this guarantee. + A transaction is said to be <firstterm>atomic</firstterm>: from the point of view of other transactions, it either happens completely or not at all. </para> @@ -216,9 +216,9 @@ UPDATE branches SET balance = balance + 100.00 </para> <para> - In <productname>PostgreSQL</>, a transaction is set up by surrounding + In <productname>PostgreSQL</productname>, a transaction is set up by surrounding the SQL commands of the transaction with - <command>BEGIN</> and <command>COMMIT</> commands. So our banking + <command>BEGIN</command> and <command>COMMIT</command> commands. So our banking transaction would actually look like: <programlisting> @@ -233,23 +233,23 @@ COMMIT; <para> If, partway through the transaction, we decide we do not want to commit (perhaps we just noticed that Alice's balance went negative), - we can issue the command <command>ROLLBACK</> instead of - <command>COMMIT</>, and all our updates so far will be canceled. + we can issue the command <command>ROLLBACK</command> instead of + <command>COMMIT</command>, and all our updates so far will be canceled. </para> <para> - <productname>PostgreSQL</> actually treats every SQL statement as being - executed within a transaction. If you do not issue a <command>BEGIN</> + <productname>PostgreSQL</productname> actually treats every SQL statement as being + executed within a transaction. If you do not issue a <command>BEGIN</command> command, - then each individual statement has an implicit <command>BEGIN</> and - (if successful) <command>COMMIT</> wrapped around it. A group of - statements surrounded by <command>BEGIN</> and <command>COMMIT</> - is sometimes called a <firstterm>transaction block</>. + then each individual statement has an implicit <command>BEGIN</command> and + (if successful) <command>COMMIT</command> wrapped around it. A group of + statements surrounded by <command>BEGIN</command> and <command>COMMIT</command> + is sometimes called a <firstterm>transaction block</firstterm>. </para> <note> <para> - Some client libraries issue <command>BEGIN</> and <command>COMMIT</> + Some client libraries issue <command>BEGIN</command> and <command>COMMIT</command> commands automatically, so that you might get the effect of transaction blocks without asking. Check the documentation for the interface you are using. @@ -258,11 +258,11 @@ COMMIT; <para> It's possible to control the statements in a transaction in a more - granular fashion through the use of <firstterm>savepoints</>. Savepoints + granular fashion through the use of <firstterm>savepoints</firstterm>. Savepoints allow you to selectively discard parts of the transaction, while committing the rest. After defining a savepoint with - <command>SAVEPOINT</>, you can if needed roll back to the savepoint - with <command>ROLLBACK TO</>. All the transaction's database changes + <command>SAVEPOINT</command>, you can if needed roll back to the savepoint + with <command>ROLLBACK TO</command>. All the transaction's database changes between defining the savepoint and rolling back to it are discarded, but changes earlier than the savepoint are kept. </para> @@ -308,7 +308,7 @@ COMMIT; <para> This example is, of course, oversimplified, but there's a lot of control possible in a transaction block through the use of savepoints. - Moreover, <command>ROLLBACK TO</> is the only way to regain control of a + Moreover, <command>ROLLBACK TO</command> is the only way to regain control of a transaction block that was put in aborted state by the system due to an error, short of rolling it back completely and starting again. @@ -325,7 +325,7 @@ COMMIT; </indexterm> <para> - A <firstterm>window function</> performs a calculation across a set of + A <firstterm>window function</firstterm> performs a calculation across a set of table rows that are somehow related to the current row. This is comparable to the type of calculation that can be done with an aggregate function. However, window functions do not cause rows to become grouped into a single @@ -360,31 +360,31 @@ SELECT depname, empno, salary, avg(salary) OVER (PARTITION BY depname) FROM emps </screen> The first three output columns come directly from the table - <structname>empsalary</>, and there is one output row for each row in the + <structname>empsalary</structname>, and there is one output row for each row in the table. The fourth column represents an average taken across all the table - rows that have the same <structfield>depname</> value as the current row. - (This actually is the same function as the non-window <function>avg</> - aggregate, but the <literal>OVER</> clause causes it to be + rows that have the same <structfield>depname</structfield> value as the current row. + (This actually is the same function as the non-window <function>avg</function> + aggregate, but the <literal>OVER</literal> clause causes it to be treated as a window function and computed across the window frame.) </para> <para> - A window function call always contains an <literal>OVER</> clause + A window function call always contains an <literal>OVER</literal> clause directly following the window function's name and argument(s). This is what syntactically distinguishes it from a normal function or non-window - aggregate. The <literal>OVER</> clause determines exactly how the + aggregate. The <literal>OVER</literal> clause determines exactly how the rows of the query are split up for processing by the window function. - The <literal>PARTITION BY</> clause within <literal>OVER</> + The <literal>PARTITION BY</literal> clause within <literal>OVER</literal> divides the rows into groups, or partitions, that share the same - values of the <literal>PARTITION BY</> expression(s). For each row, + values of the <literal>PARTITION BY</literal> expression(s). For each row, the window function is computed across the rows that fall into the same partition as the current row. </para> <para> You can also control the order in which rows are processed by - window functions using <literal>ORDER BY</> within <literal>OVER</>. - (The window <literal>ORDER BY</> does not even have to match the + window functions using <literal>ORDER BY</literal> within <literal>OVER</literal>. + (The window <literal>ORDER BY</literal> does not even have to match the order in which the rows are output.) Here is an example: <programlisting> @@ -409,39 +409,39 @@ FROM empsalary; (10 rows) </screen> - As shown here, the <function>rank</> function produces a numerical rank - for each distinct <literal>ORDER BY</> value in the current row's - partition, using the order defined by the <literal>ORDER BY</> clause. - <function>rank</> needs no explicit parameter, because its behavior - is entirely determined by the <literal>OVER</> clause. + As shown here, the <function>rank</function> function produces a numerical rank + for each distinct <literal>ORDER BY</literal> value in the current row's + partition, using the order defined by the <literal>ORDER BY</literal> clause. + <function>rank</function> needs no explicit parameter, because its behavior + is entirely determined by the <literal>OVER</literal> clause. </para> <para> The rows considered by a window function are those of the <quote>virtual - table</> produced by the query's <literal>FROM</> clause as filtered by its - <literal>WHERE</>, <literal>GROUP BY</>, and <literal>HAVING</> clauses + table</quote> produced by the query's <literal>FROM</literal> clause as filtered by its + <literal>WHERE</literal>, <literal>GROUP BY</literal>, and <literal>HAVING</literal> clauses if any. For example, a row removed because it does not meet the - <literal>WHERE</> condition is not seen by any window function. + <literal>WHERE</literal> condition is not seen by any window function. A query can contain multiple window functions that slice up the data - in different ways using different <literal>OVER</> clauses, but + in different ways using different <literal>OVER</literal> clauses, but they all act on the same collection of rows defined by this virtual table. </para> <para> - We already saw that <literal>ORDER BY</> can be omitted if the ordering + We already saw that <literal>ORDER BY</literal> can be omitted if the ordering of rows is not important. It is also possible to omit <literal>PARTITION - BY</>, in which case there is a single partition containing all rows. + BY</literal>, in which case there is a single partition containing all rows. </para> <para> There is another important concept associated with window functions: for each row, there is a set of rows within its partition called its - <firstterm>window frame</>. Some window functions act only + <firstterm>window frame</firstterm>. Some window functions act only on the rows of the window frame, rather than of the whole partition. - By default, if <literal>ORDER BY</> is supplied then the frame consists of + By default, if <literal>ORDER BY</literal> is supplied then the frame consists of all rows from the start of the partition up through the current row, plus any following rows that are equal to the current row according to the - <literal>ORDER BY</> clause. When <literal>ORDER BY</> is omitted the + <literal>ORDER BY</literal> clause. When <literal>ORDER BY</literal> is omitted the default frame consists of all rows in the partition. <footnote> <para> @@ -450,7 +450,7 @@ FROM empsalary; <xref linkend="syntax-window-functions"> for details. </para> </footnote> - Here is an example using <function>sum</>: + Here is an example using <function>sum</function>: </para> <programlisting> @@ -474,11 +474,11 @@ SELECT salary, sum(salary) OVER () FROM empsalary; </screen> <para> - Above, since there is no <literal>ORDER BY</> in the <literal>OVER</> + Above, since there is no <literal>ORDER BY</literal> in the <literal>OVER</literal> clause, the window frame is the same as the partition, which for lack of - <literal>PARTITION BY</> is the whole table; in other words each sum is + <literal>PARTITION BY</literal> is the whole table; in other words each sum is taken over the whole table and so we get the same result for each output - row. But if we add an <literal>ORDER BY</> clause, we get very different + row. But if we add an <literal>ORDER BY</literal> clause, we get very different results: </para> @@ -510,8 +510,8 @@ SELECT salary, sum(salary) OVER (ORDER BY salary) FROM empsalary; <para> Window functions are permitted only in the <literal>SELECT</literal> list - and the <literal>ORDER BY</> clause of the query. They are forbidden - elsewhere, such as in <literal>GROUP BY</>, <literal>HAVING</> + and the <literal>ORDER BY</literal> clause of the query. They are forbidden + elsewhere, such as in <literal>GROUP BY</literal>, <literal>HAVING</literal> and <literal>WHERE</literal> clauses. This is because they logically execute after the processing of those clauses. Also, window functions execute after non-window aggregate functions. This means it is valid to @@ -534,15 +534,15 @@ WHERE pos < 3; </programlisting> The above query only shows the rows from the inner query having - <literal>rank</> less than 3. + <literal>rank</literal> less than 3. </para> <para> When a query involves multiple window functions, it is possible to write - out each one with a separate <literal>OVER</> clause, but this is + out each one with a separate <literal>OVER</literal> clause, but this is duplicative and error-prone if the same windowing behavior is wanted for several functions. Instead, each windowing behavior can be named - in a <literal>WINDOW</> clause and then referenced in <literal>OVER</>. + in a <literal>WINDOW</literal> clause and then referenced in <literal>OVER</literal>. For example: <programlisting> @@ -623,13 +623,13 @@ CREATE TABLE capitals ( <para> In this case, a row of <classname>capitals</classname> - <firstterm>inherits</firstterm> all columns (<structfield>name</>, - <structfield>population</>, and <structfield>altitude</>) from its + <firstterm>inherits</firstterm> all columns (<structfield>name</structfield>, + <structfield>population</structfield>, and <structfield>altitude</structfield>) from its <firstterm>parent</firstterm>, <classname>cities</classname>. The type of the column <structfield>name</structfield> is <type>text</type>, a native <productname>PostgreSQL</productname> type for variable length character strings. State capitals have - an extra column, <structfield>state</>, that shows their state. In + an extra column, <structfield>state</structfield>, that shows their state. In <productname>PostgreSQL</productname>, a table can inherit from zero or more other tables. </para> diff --git a/doc/src/sgml/amcheck.sgml b/doc/src/sgml/amcheck.sgml index dd71dbd679b..0dd68f0ba14 100644 --- a/doc/src/sgml/amcheck.sgml +++ b/doc/src/sgml/amcheck.sgml @@ -8,19 +8,19 @@ </indexterm> <para> - The <filename>amcheck</> module provides functions that allow you to + The <filename>amcheck</filename> module provides functions that allow you to verify the logical consistency of the structure of indexes. If the structure appears to be valid, no error is raised. </para> <para> - The functions verify various <emphasis>invariants</> in the + The functions verify various <emphasis>invariants</emphasis> in the structure of the representation of particular indexes. The correctness of the access method functions behind index scans and other important operations relies on these invariants always holding. For example, certain functions verify, among other things, - that all B-Tree pages have items in <quote>logical</> order (e.g., - for B-Tree indexes on <type>text</>, index tuples should be in + that all B-Tree pages have items in <quote>logical</quote> order (e.g., + for B-Tree indexes on <type>text</type>, index tuples should be in collated lexical order). If that particular invariant somehow fails to hold, we can expect binary searches on the affected page to incorrectly guide index scans, resulting in wrong answers to SQL @@ -35,7 +35,7 @@ functions. </para> <para> - <filename>amcheck</> functions may be used only by superusers. + <filename>amcheck</filename> functions may be used only by superusers. </para> <sect2> @@ -82,7 +82,7 @@ ORDER BY c.relpages DESC LIMIT 10; (10 rows) </screen> This example shows a session that performs verification of every - catalog index in the database <quote>test</>. Details of just + catalog index in the database <quote>test</quote>. Details of just the 10 largest indexes verified are displayed. Since no error is raised, all indexes tested appear to be logically consistent. Naturally, this query could easily be changed to call @@ -90,10 +90,10 @@ ORDER BY c.relpages DESC LIMIT 10; database where verification is supported. </para> <para> - <function>bt_index_check</function> acquires an <literal>AccessShareLock</> + <function>bt_index_check</function> acquires an <literal>AccessShareLock</literal> on the target index and the heap relation it belongs to. This lock mode is the same lock mode acquired on relations by simple - <literal>SELECT</> statements. + <literal>SELECT</literal> statements. <function>bt_index_check</function> does not verify invariants that span child/parent relationships, nor does it verify that the target index is consistent with its heap relation. When a @@ -132,13 +132,13 @@ ORDER BY c.relpages DESC LIMIT 10; logical inconsistency or other problem. </para> <para> - A <literal>ShareLock</> is required on the target index by + A <literal>ShareLock</literal> is required on the target index by <function>bt_index_parent_check</function> (a - <literal>ShareLock</> is also acquired on the heap relation). + <literal>ShareLock</literal> is also acquired on the heap relation). These locks prevent concurrent data modification from - <command>INSERT</>, <command>UPDATE</>, and <command>DELETE</> + <command>INSERT</command>, <command>UPDATE</command>, and <command>DELETE</command> commands. The locks also prevent the underlying relation from - being concurrently processed by <command>VACUUM</>, as well as + being concurrently processed by <command>VACUUM</command>, as well as all other utility commands. Note that the function holds locks only while running, not for the entire transaction. </para> @@ -159,13 +159,13 @@ ORDER BY c.relpages DESC LIMIT 10; </sect2> <sect2> - <title>Using <filename>amcheck</> effectively</title> + <title>Using <filename>amcheck</filename> effectively</title> <para> - <filename>amcheck</> can be effective at detecting various types of + <filename>amcheck</filename> can be effective at detecting various types of failure modes that <link linkend="app-initdb-data-checksums"><application>data page - checksums</></link> will always fail to catch. These include: + checksums</application></link> will always fail to catch. These include: <itemizedlist> <listitem> @@ -176,13 +176,13 @@ ORDER BY c.relpages DESC LIMIT 10; <para> This includes issues caused by the comparison rules of operating system collations changing. Comparisons of datums of a collatable - type like <type>text</> must be immutable (just as all + type like <type>text</type> must be immutable (just as all comparisons used for B-Tree index scans must be immutable), which implies that operating system collation rules must never change. Though rare, updates to operating system collation rules can cause these issues. More commonly, an inconsistency in the collation order between a master server and a standby server is - implicated, possibly because the <emphasis>major</> operating + implicated, possibly because the <emphasis>major</emphasis> operating system version in use is inconsistent. Such inconsistencies will generally only arise on standby servers, and so can generally only be detected on standby servers. @@ -190,25 +190,25 @@ ORDER BY c.relpages DESC LIMIT 10; <para> If a problem like this arises, it may not affect each individual index that is ordered using an affected collation, simply because - <emphasis>indexed</> values might happen to have the same + <emphasis>indexed</emphasis> values might happen to have the same absolute ordering regardless of the behavioral inconsistency. See <xref linkend="locale"> and <xref linkend="collation"> for - further details about how <productname>PostgreSQL</> uses + further details about how <productname>PostgreSQL</productname> uses operating system locales and collations. </para> </listitem> <listitem> <para> Corruption caused by hypothetical undiscovered bugs in the - underlying <productname>PostgreSQL</> access method code or sort + underlying <productname>PostgreSQL</productname> access method code or sort code. </para> <para> Automatic verification of the structural integrity of indexes plays a role in the general testing of new or proposed - <productname>PostgreSQL</> features that could plausibly allow a + <productname>PostgreSQL</productname> features that could plausibly allow a logical inconsistency to be introduced. One obvious testing - strategy is to call <filename>amcheck</> functions continuously + strategy is to call <filename>amcheck</filename> functions continuously when running the standard regression tests. See <xref linkend="regress-run"> for details on running the tests. </para> @@ -219,12 +219,12 @@ ORDER BY c.relpages DESC LIMIT 10; simply not be enabled. </para> <para> - Note that <filename>amcheck</> examines a page as represented in some + Note that <filename>amcheck</filename> examines a page as represented in some shared memory buffer at the time of verification if there is only a shared buffer hit when accessing the block. Consequently, - <filename>amcheck</> does not necessarily examine data read from the + <filename>amcheck</filename> does not necessarily examine data read from the file system at the time of verification. Note that when checksums are - enabled, <filename>amcheck</> may raise an error due to a checksum + enabled, <filename>amcheck</filename> may raise an error due to a checksum failure when a corrupt block is read into a buffer. </para> </listitem> @@ -234,7 +234,7 @@ ORDER BY c.relpages DESC LIMIT 10; and operating system. </para> <para> - <productname>PostgreSQL</> does not protect against correctable + <productname>PostgreSQL</productname> does not protect against correctable memory errors and it is assumed you will operate using RAM that uses industry standard Error Correcting Codes (ECC) or better protection. However, ECC memory is typically only immune to @@ -244,7 +244,7 @@ ORDER BY c.relpages DESC LIMIT 10; </para> </listitem> </itemizedlist> - In general, <filename>amcheck</> can only prove the presence of + In general, <filename>amcheck</filename> can only prove the presence of corruption; it cannot prove its absence. </para> @@ -252,19 +252,19 @@ ORDER BY c.relpages DESC LIMIT 10; <sect2> <title>Repairing corruption</title> <para> - No error concerning corruption raised by <filename>amcheck</> should - ever be a false positive. In practice, <filename>amcheck</> is more + No error concerning corruption raised by <filename>amcheck</filename> should + ever be a false positive. In practice, <filename>amcheck</filename> is more likely to find software bugs than problems with hardware. - <filename>amcheck</> raises errors in the event of conditions that, + <filename>amcheck</filename> raises errors in the event of conditions that, by definition, should never happen, and so careful analysis of - <filename>amcheck</> errors is often required. + <filename>amcheck</filename> errors is often required. </para> <para> There is no general method of repairing problems that - <filename>amcheck</> detects. An explanation for the root cause of + <filename>amcheck</filename> detects. An explanation for the root cause of an invariant violation should be sought. <xref linkend="pageinspect"> may play a useful role in diagnosing - corruption that <filename>amcheck</> detects. A <command>REINDEX</> + corruption that <filename>amcheck</filename> detects. A <command>REINDEX</command> may not be effective in repairing corruption. </para> diff --git a/doc/src/sgml/arch-dev.sgml b/doc/src/sgml/arch-dev.sgml index c835e87215e..5423aadb9c8 100644 --- a/doc/src/sgml/arch-dev.sgml +++ b/doc/src/sgml/arch-dev.sgml @@ -118,7 +118,7 @@ <para> <productname>PostgreSQL</productname> is implemented using a - simple <quote>process per user</> client/server model. In this model + simple <quote>process per user</quote> client/server model. In this model there is one <firstterm>client process</firstterm> connected to exactly one <firstterm>server process</firstterm>. As we do not know ahead of time how many connections will be made, we have to @@ -137,9 +137,9 @@ The client process can be any program that understands the <productname>PostgreSQL</productname> protocol described in <xref linkend="protocol">. Many clients are based on the - C-language library <application>libpq</>, but several independent + C-language library <application>libpq</application>, but several independent implementations of the protocol exist, such as the Java - <application>JDBC</> driver. + <application>JDBC</application> driver. </para> <para> @@ -184,8 +184,8 @@ text) for valid syntax. If the syntax is correct a <firstterm>parse tree</firstterm> is built up and handed back; otherwise an error is returned. The parser and lexer are - implemented using the well-known Unix tools <application>bison</> - and <application>flex</>. + implemented using the well-known Unix tools <application>bison</application> + and <application>flex</application>. </para> <para> @@ -251,7 +251,7 @@ back by the parser as input and does the semantic interpretation needed to understand which tables, functions, and operators are referenced by the query. The data structure that is built to represent this - information is called the <firstterm>query tree</>. + information is called the <firstterm>query tree</firstterm>. </para> <para> @@ -259,10 +259,10 @@ system catalog lookups can only be done within a transaction, and we do not wish to start a transaction immediately upon receiving a query string. The raw parsing stage is sufficient to identify the transaction - control commands (<command>BEGIN</>, <command>ROLLBACK</>, etc), and + control commands (<command>BEGIN</command>, <command>ROLLBACK</command>, etc), and these can then be correctly executed without any further analysis. Once we know that we are dealing with an actual query (such as - <command>SELECT</> or <command>UPDATE</>), it is okay to + <command>SELECT</command> or <command>UPDATE</command>), it is okay to start a transaction if we're not already in one. Only then can the transformation process be invoked. </para> @@ -270,10 +270,10 @@ <para> The query tree created by the transformation process is structurally similar to the raw parse tree in most places, but it has many differences - in detail. For example, a <structname>FuncCall</> node in the + in detail. For example, a <structname>FuncCall</structname> node in the parse tree represents something that looks syntactically like a function - call. This might be transformed to either a <structname>FuncExpr</> - or <structname>Aggref</> node depending on whether the referenced + call. This might be transformed to either a <structname>FuncExpr</structname> + or <structname>Aggref</structname> node depending on whether the referenced name turns out to be an ordinary function or an aggregate function. Also, information about the actual data types of columns and expression results is added to the query tree. @@ -354,10 +354,10 @@ <para> The planner's search procedure actually works with data structures - called <firstterm>paths</>, which are simply cut-down representations of + called <firstterm>paths</firstterm>, which are simply cut-down representations of plans containing only as much information as the planner needs to make its decisions. After the cheapest path is determined, a full-fledged - <firstterm>plan tree</> is built to pass to the executor. This represents + <firstterm>plan tree</firstterm> is built to pass to the executor. This represents the desired execution plan in sufficient detail for the executor to run it. In the rest of this section we'll ignore the distinction between paths and plans. @@ -378,12 +378,12 @@ <literal>relation.attribute OPR constant</literal>. If <literal>relation.attribute</literal> happens to match the key of the B-tree index and <literal>OPR</literal> is one of the operators listed in - the index's <firstterm>operator class</>, another plan is created using + the index's <firstterm>operator class</firstterm>, another plan is created using the B-tree index to scan the relation. If there are further indexes present and the restrictions in the query happen to match a key of an index, further plans will be considered. Index scan plans are also generated for indexes that have a sort ordering that can match the - query's <literal>ORDER BY</> clause (if any), or a sort ordering that + query's <literal>ORDER BY</literal> clause (if any), or a sort ordering that might be useful for merge joining (see below). </para> @@ -462,9 +462,9 @@ the base relations, plus nested-loop, merge, or hash join nodes as needed, plus any auxiliary steps needed, such as sort nodes or aggregate-function calculation nodes. Most of these plan node - types have the additional ability to do <firstterm>selection</> + types have the additional ability to do <firstterm>selection</firstterm> (discarding rows that do not meet a specified Boolean condition) - and <firstterm>projection</> (computation of a derived column set + and <firstterm>projection</firstterm> (computation of a derived column set based on given column values, that is, evaluation of scalar expressions where needed). One of the responsibilities of the planner is to attach selection conditions from the @@ -496,7 +496,7 @@ subplan) is, let's say, a <literal>Sort</literal> node and again recursion is needed to obtain an input row. The child node of the <literal>Sort</literal> might - be a <literal>SeqScan</> node, representing actual reading of a table. + be a <literal>SeqScan</literal> node, representing actual reading of a table. Execution of this node causes the executor to fetch a row from the table and return it up to the calling node. The <literal>Sort</literal> node will repeatedly call its child to obtain all the rows to be sorted. @@ -529,24 +529,24 @@ <para> The executor mechanism is used to evaluate all four basic SQL query types: - <command>SELECT</>, <command>INSERT</>, <command>UPDATE</>, and - <command>DELETE</>. For <command>SELECT</>, the top-level executor + <command>SELECT</command>, <command>INSERT</command>, <command>UPDATE</command>, and + <command>DELETE</command>. For <command>SELECT</command>, the top-level executor code only needs to send each row returned by the query plan tree off - to the client. For <command>INSERT</>, each returned row is inserted - into the target table specified for the <command>INSERT</>. This is - done in a special top-level plan node called <literal>ModifyTable</>. + to the client. For <command>INSERT</command>, each returned row is inserted + into the target table specified for the <command>INSERT</command>. This is + done in a special top-level plan node called <literal>ModifyTable</literal>. (A simple - <command>INSERT ... VALUES</> command creates a trivial plan tree - consisting of a single <literal>Result</> node, which computes just one - result row, and <literal>ModifyTable</> above it to perform the insertion. - But <command>INSERT ... SELECT</> can demand the full power - of the executor mechanism.) For <command>UPDATE</>, the planner arranges + <command>INSERT ... VALUES</command> command creates a trivial plan tree + consisting of a single <literal>Result</literal> node, which computes just one + result row, and <literal>ModifyTable</literal> above it to perform the insertion. + But <command>INSERT ... SELECT</command> can demand the full power + of the executor mechanism.) For <command>UPDATE</command>, the planner arranges that each computed row includes all the updated column values, plus - the <firstterm>TID</> (tuple ID, or row ID) of the original target row; - this data is fed into a <literal>ModifyTable</> node, which uses the + the <firstterm>TID</firstterm> (tuple ID, or row ID) of the original target row; + this data is fed into a <literal>ModifyTable</literal> node, which uses the information to create a new updated row and mark the old row deleted. - For <command>DELETE</>, the only column that is actually returned by the - plan is the TID, and the <literal>ModifyTable</> node simply uses the TID + For <command>DELETE</command>, the only column that is actually returned by the + plan is the TID, and the <literal>ModifyTable</literal> node simply uses the TID to visit each target row and mark it deleted. </para> diff --git a/doc/src/sgml/array.sgml b/doc/src/sgml/array.sgml index 88eb4be04d0..9187f6e02e7 100644 --- a/doc/src/sgml/array.sgml +++ b/doc/src/sgml/array.sgml @@ -32,7 +32,7 @@ CREATE TABLE sal_emp ( ); </programlisting> As shown, an array data type is named by appending square brackets - (<literal>[]</>) to the data type name of the array elements. The + (<literal>[]</literal>) to the data type name of the array elements. The above command will create a table named <structname>sal_emp</structname> with a column of type <type>text</type> (<structfield>name</structfield>), a @@ -69,7 +69,7 @@ CREATE TABLE tictactoe ( <para> An alternative syntax, which conforms to the SQL standard by using - the keyword <literal>ARRAY</>, can be used for one-dimensional arrays. + the keyword <literal>ARRAY</literal>, can be used for one-dimensional arrays. <structfield>pay_by_quarter</structfield> could have been defined as: <programlisting> @@ -79,7 +79,7 @@ CREATE TABLE tictactoe ( <programlisting> pay_by_quarter integer ARRAY, </programlisting> - As before, however, <productname>PostgreSQL</> does not enforce the + As before, however, <productname>PostgreSQL</productname> does not enforce the size restriction in any case. </para> </sect2> @@ -107,8 +107,8 @@ CREATE TABLE tictactoe ( for the type, as recorded in its <literal>pg_type</literal> entry. Among the standard data types provided in the <productname>PostgreSQL</productname> distribution, all use a comma - (<literal>,</>), except for type <type>box</> which uses a semicolon - (<literal>;</>). Each <replaceable>val</replaceable> is + (<literal>,</literal>), except for type <type>box</type> which uses a semicolon + (<literal>;</literal>). Each <replaceable>val</replaceable> is either a constant of the array element type, or a subarray. An example of an array constant is: <programlisting> @@ -119,10 +119,10 @@ CREATE TABLE tictactoe ( </para> <para> - To set an element of an array constant to NULL, write <literal>NULL</> + To set an element of an array constant to NULL, write <literal>NULL</literal> for the element value. (Any upper- or lower-case variant of - <literal>NULL</> will do.) If you want an actual string value - <quote>NULL</>, you must put double quotes around it. + <literal>NULL</literal> will do.) If you want an actual string value + <quote>NULL</quote>, you must put double quotes around it. </para> <para> @@ -176,7 +176,7 @@ ERROR: multidimensional arrays must have array expressions with matching dimens </para> <para> - The <literal>ARRAY</> constructor syntax can also be used: + The <literal>ARRAY</literal> constructor syntax can also be used: <programlisting> INSERT INTO sal_emp VALUES ('Bill', @@ -190,7 +190,7 @@ INSERT INTO sal_emp </programlisting> Notice that the array elements are ordinary SQL constants or expressions; for instance, string literals are single quoted, instead of - double quoted as they would be in an array literal. The <literal>ARRAY</> + double quoted as they would be in an array literal. The <literal>ARRAY</literal> constructor syntax is discussed in more detail in <xref linkend="sql-syntax-array-constructors">. </para> @@ -222,8 +222,8 @@ SELECT name FROM sal_emp WHERE pay_by_quarter[1] <> pay_by_quarter[2]; The array subscript numbers are written within square brackets. By default <productname>PostgreSQL</productname> uses a one-based numbering convention for arrays, that is, - an array of <replaceable>n</> elements starts with <literal>array[1]</literal> and - ends with <literal>array[<replaceable>n</>]</literal>. + an array of <replaceable>n</replaceable> elements starts with <literal>array[1]</literal> and + ends with <literal>array[<replaceable>n</replaceable>]</literal>. </para> <para> @@ -259,8 +259,8 @@ SELECT schedule[1:2][1:1] FROM sal_emp WHERE name = 'Bill'; If any dimension is written as a slice, i.e., contains a colon, then all dimensions are treated as slices. Any dimension that has only a single number (no colon) is treated as being from 1 - to the number specified. For example, <literal>[2]</> is treated as - <literal>[1:2]</>, as in this example: + to the number specified. For example, <literal>[2]</literal> is treated as + <literal>[1:2]</literal>, as in this example: <programlisting> SELECT schedule[1:2][2] FROM sal_emp WHERE name = 'Bill'; @@ -272,7 +272,7 @@ SELECT schedule[1:2][2] FROM sal_emp WHERE name = 'Bill'; </programlisting> To avoid confusion with the non-slice case, it's best to use slice syntax - for all dimensions, e.g., <literal>[1:2][1:1]</>, not <literal>[2][1:1]</>. + for all dimensions, e.g., <literal>[1:2][1:1]</literal>, not <literal>[2][1:1]</literal>. </para> <para> @@ -302,9 +302,9 @@ SELECT schedule[:][1:1] FROM sal_emp WHERE name = 'Bill'; An array subscript expression will return null if either the array itself or any of the subscript expressions are null. Also, null is returned if a subscript is outside the array bounds (this case does not raise an error). - For example, if <literal>schedule</> - currently has the dimensions <literal>[1:3][1:2]</> then referencing - <literal>schedule[3][3]</> yields NULL. Similarly, an array reference + For example, if <literal>schedule</literal> + currently has the dimensions <literal>[1:3][1:2]</literal> then referencing + <literal>schedule[3][3]</literal> yields NULL. Similarly, an array reference with the wrong number of subscripts yields a null rather than an error. </para> @@ -423,16 +423,16 @@ UPDATE sal_emp SET pay_by_quarter[1:2] = '{27000,27000}' A stored array value can be enlarged by assigning to elements not already present. Any positions between those previously present and the newly assigned elements will be filled with nulls. For example, if array - <literal>myarray</> currently has 4 elements, it will have six - elements after an update that assigns to <literal>myarray[6]</>; - <literal>myarray[5]</> will contain null. + <literal>myarray</literal> currently has 4 elements, it will have six + elements after an update that assigns to <literal>myarray[6]</literal>; + <literal>myarray[5]</literal> will contain null. Currently, enlargement in this fashion is only allowed for one-dimensional arrays, not multidimensional arrays. </para> <para> Subscripted assignment allows creation of arrays that do not use one-based - subscripts. For example one might assign to <literal>myarray[-2:7]</> to + subscripts. For example one might assign to <literal>myarray[-2:7]</literal> to create an array with subscript values from -2 to 7. </para> @@ -457,8 +457,8 @@ SELECT ARRAY[5,6] || ARRAY[[1,2],[3,4]]; <para> The concatenation operator allows a single element to be pushed onto the beginning or end of a one-dimensional array. It also accepts two - <replaceable>N</>-dimensional arrays, or an <replaceable>N</>-dimensional - and an <replaceable>N+1</>-dimensional array. + <replaceable>N</replaceable>-dimensional arrays, or an <replaceable>N</replaceable>-dimensional + and an <replaceable>N+1</replaceable>-dimensional array. </para> <para> @@ -501,10 +501,10 @@ SELECT array_dims(ARRAY[[1,2],[3,4]] || ARRAY[[5,6],[7,8],[9,0]]); </para> <para> - When an <replaceable>N</>-dimensional array is pushed onto the beginning - or end of an <replaceable>N+1</>-dimensional array, the result is - analogous to the element-array case above. Each <replaceable>N</>-dimensional - sub-array is essentially an element of the <replaceable>N+1</>-dimensional + When an <replaceable>N</replaceable>-dimensional array is pushed onto the beginning + or end of an <replaceable>N+1</replaceable>-dimensional array, the result is + analogous to the element-array case above. Each <replaceable>N</replaceable>-dimensional + sub-array is essentially an element of the <replaceable>N+1</replaceable>-dimensional array's outer dimension. For example: <programlisting> SELECT array_dims(ARRAY[1,2] || ARRAY[[3,4],[5,6]]); @@ -587,9 +587,9 @@ SELECT array_append(ARRAY[1, 2], NULL); -- this might have been meant The heuristic it uses to resolve the constant's type is to assume it's of the same type as the operator's other input — in this case, integer array. So the concatenation operator is presumed to - represent <function>array_cat</>, not <function>array_append</>. When + represent <function>array_cat</function>, not <function>array_append</function>. When that's the wrong choice, it could be fixed by casting the constant to the - array's element type; but explicit use of <function>array_append</> might + array's element type; but explicit use of <function>array_append</function> might be a preferable solution. </para> </sect2> @@ -633,7 +633,7 @@ SELECT * FROM sal_emp WHERE 10000 = ALL (pay_by_quarter); </para> <para> - Alternatively, the <function>generate_subscripts</> function can be used. + Alternatively, the <function>generate_subscripts</function> function can be used. For example: <programlisting> @@ -648,7 +648,7 @@ SELECT * FROM </para> <para> - You can also search an array using the <literal>&&</> operator, + You can also search an array using the <literal>&&</literal> operator, which checks whether the left operand overlaps with the right operand. For instance: @@ -662,8 +662,8 @@ SELECT * FROM sal_emp WHERE pay_by_quarter && ARRAY[10000]; </para> <para> - You can also search for specific values in an array using the <function>array_position</> - and <function>array_positions</> functions. The former returns the subscript of + You can also search for specific values in an array using the <function>array_position</function> + and <function>array_positions</function> functions. The former returns the subscript of the first occurrence of a value in an array; the latter returns an array with the subscripts of all occurrences of the value in the array. For example: @@ -703,13 +703,13 @@ SELECT array_positions(ARRAY[1, 4, 3, 1, 3, 4, 2, 1], 1); The external text representation of an array value consists of items that are interpreted according to the I/O conversion rules for the array's element type, plus decoration that indicates the array structure. - The decoration consists of curly braces (<literal>{</> and <literal>}</>) + The decoration consists of curly braces (<literal>{</literal> and <literal>}</literal>) around the array value plus delimiter characters between adjacent items. - The delimiter character is usually a comma (<literal>,</>) but can be - something else: it is determined by the <literal>typdelim</> setting + The delimiter character is usually a comma (<literal>,</literal>) but can be + something else: it is determined by the <literal>typdelim</literal> setting for the array's element type. Among the standard data types provided in the <productname>PostgreSQL</productname> distribution, all use a comma, - except for type <type>box</>, which uses a semicolon (<literal>;</>). + except for type <type>box</type>, which uses a semicolon (<literal>;</literal>). In a multidimensional array, each dimension (row, plane, cube, etc.) gets its own level of curly braces, and delimiters must be written between adjacent curly-braced entities of the same level. @@ -719,7 +719,7 @@ SELECT array_positions(ARRAY[1, 4, 3, 1, 3, 4, 2, 1], 1); The array output routine will put double quotes around element values if they are empty strings, contain curly braces, delimiter characters, double quotes, backslashes, or white space, or match the word - <literal>NULL</>. Double quotes and backslashes + <literal>NULL</literal>. Double quotes and backslashes embedded in element values will be backslash-escaped. For numeric data types it is safe to assume that double quotes will never appear, but for textual data types one should be prepared to cope with either the presence @@ -731,10 +731,10 @@ SELECT array_positions(ARRAY[1, 4, 3, 1, 3, 4, 2, 1], 1); set to one. To represent arrays with other lower bounds, the array subscript ranges can be specified explicitly before writing the array contents. - This decoration consists of square brackets (<literal>[]</>) + This decoration consists of square brackets (<literal>[]</literal>) around each array dimension's lower and upper bounds, with - a colon (<literal>:</>) delimiter character in between. The - array dimension decoration is followed by an equal sign (<literal>=</>). + a colon (<literal>:</literal>) delimiter character in between. The + array dimension decoration is followed by an equal sign (<literal>=</literal>). For example: <programlisting> SELECT f1[1][-2][3] AS e1, f1[1][-1][5] AS e2 @@ -750,23 +750,23 @@ SELECT f1[1][-2][3] AS e1, f1[1][-1][5] AS e2 </para> <para> - If the value written for an element is <literal>NULL</> (in any case + If the value written for an element is <literal>NULL</literal> (in any case variant), the element is taken to be NULL. The presence of any quotes or backslashes disables this and allows the literal string value - <quote>NULL</> to be entered. Also, for backward compatibility with - pre-8.2 versions of <productname>PostgreSQL</>, the <xref + <quote>NULL</quote> to be entered. Also, for backward compatibility with + pre-8.2 versions of <productname>PostgreSQL</productname>, the <xref linkend="guc-array-nulls"> configuration parameter can be turned - <literal>off</> to suppress recognition of <literal>NULL</> as a NULL. + <literal>off</literal> to suppress recognition of <literal>NULL</literal> as a NULL. </para> <para> As shown previously, when writing an array value you can use double - quotes around any individual array element. You <emphasis>must</> do so + quotes around any individual array element. You <emphasis>must</emphasis> do so if the element value would otherwise confuse the array-value parser. For example, elements containing curly braces, commas (or the data type's delimiter character), double quotes, backslashes, or leading or trailing whitespace must be double-quoted. Empty strings and strings matching the - word <literal>NULL</> must be quoted, too. To put a double quote or + word <literal>NULL</literal> must be quoted, too. To put a double quote or backslash in a quoted array element value, use escape string syntax and precede it with a backslash. Alternatively, you can avoid quotes and use backslash-escaping to protect all data characters that would otherwise @@ -785,17 +785,17 @@ SELECT f1[1][-2][3] AS e1, f1[1][-1][5] AS e2 <para> Remember that what you write in an SQL command will first be interpreted as a string literal, and then as an array. This doubles the number of - backslashes you need. For example, to insert a <type>text</> array + backslashes you need. For example, to insert a <type>text</type> array value containing a backslash and a double quote, you'd need to write: <programlisting> INSERT ... VALUES (E'{"\\\\","\\""}'); </programlisting> The escape string processor removes one level of backslashes, so that - what arrives at the array-value parser looks like <literal>{"\\","\""}</>. - In turn, the strings fed to the <type>text</> data type's input routine - become <literal>\</> and <literal>"</> respectively. (If we were working + what arrives at the array-value parser looks like <literal>{"\\","\""}</literal>. + In turn, the strings fed to the <type>text</type> data type's input routine + become <literal>\</literal> and <literal>"</literal> respectively. (If we were working with a data type whose input routine also treated backslashes specially, - <type>bytea</> for example, we might need as many as eight backslashes + <type>bytea</type> for example, we might need as many as eight backslashes in the command to get one backslash into the stored array element.) Dollar quoting (see <xref linkend="sql-syntax-dollar-quoting">) can be used to avoid the need to double backslashes. @@ -804,10 +804,10 @@ INSERT ... VALUES (E'{"\\\\","\\""}'); <tip> <para> - The <literal>ARRAY</> constructor syntax (see + The <literal>ARRAY</literal> constructor syntax (see <xref linkend="sql-syntax-array-constructors">) is often easier to work with than the array-literal syntax when writing array values in SQL - commands. In <literal>ARRAY</>, individual element values are written the + commands. In <literal>ARRAY</literal>, individual element values are written the same way they would be written when not members of an array. </para> </tip> diff --git a/doc/src/sgml/auth-delay.sgml b/doc/src/sgml/auth-delay.sgml index 9a6e3e9bb4d..9221d2dfb65 100644 --- a/doc/src/sgml/auth-delay.sgml +++ b/doc/src/sgml/auth-delay.sgml @@ -18,7 +18,7 @@ <para> In order to function, this module must be loaded via - <xref linkend="guc-shared-preload-libraries"> in <filename>postgresql.conf</>. + <xref linkend="guc-shared-preload-libraries"> in <filename>postgresql.conf</filename>. </para> <sect2> @@ -29,7 +29,7 @@ <term> <varname>auth_delay.milliseconds</varname> (<type>int</type>) <indexterm> - <primary><varname>auth_delay.milliseconds</> configuration parameter</primary> + <primary><varname>auth_delay.milliseconds</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -42,7 +42,7 @@ </variablelist> <para> - These parameters must be set in <filename>postgresql.conf</>. + These parameters must be set in <filename>postgresql.conf</filename>. Typical usage might be: </para> diff --git a/doc/src/sgml/auto-explain.sgml b/doc/src/sgml/auto-explain.sgml index 38e6f50c802..240098c82f7 100644 --- a/doc/src/sgml/auto-explain.sgml +++ b/doc/src/sgml/auto-explain.sgml @@ -24,10 +24,10 @@ LOAD 'auto_explain'; </programlisting> (You must be superuser to do that.) More typical usage is to preload - it into some or all sessions by including <literal>auto_explain</> in + it into some or all sessions by including <literal>auto_explain</literal> in <xref linkend="guc-session-preload-libraries"> or <xref linkend="guc-shared-preload-libraries"> in - <filename>postgresql.conf</>. Then you can track unexpectedly slow queries + <filename>postgresql.conf</filename>. Then you can track unexpectedly slow queries no matter when they happen. Of course there is a price in overhead for that. </para> @@ -47,7 +47,7 @@ LOAD 'auto_explain'; <term> <varname>auto_explain.log_min_duration</varname> (<type>integer</type>) <indexterm> - <primary><varname>auto_explain.log_min_duration</> configuration parameter</primary> + <primary><varname>auto_explain.log_min_duration</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -66,13 +66,13 @@ LOAD 'auto_explain'; <term> <varname>auto_explain.log_analyze</varname> (<type>boolean</type>) <indexterm> - <primary><varname>auto_explain.log_analyze</> configuration parameter</primary> + <primary><varname>auto_explain.log_analyze</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> - <varname>auto_explain.log_analyze</varname> causes <command>EXPLAIN ANALYZE</> - output, rather than just <command>EXPLAIN</> output, to be printed + <varname>auto_explain.log_analyze</varname> causes <command>EXPLAIN ANALYZE</command> + output, rather than just <command>EXPLAIN</command> output, to be printed when an execution plan is logged. This parameter is off by default. Only superusers can change this setting. </para> @@ -92,14 +92,14 @@ LOAD 'auto_explain'; <term> <varname>auto_explain.log_buffers</varname> (<type>boolean</type>) <indexterm> - <primary><varname>auto_explain.log_buffers</> configuration parameter</primary> + <primary><varname>auto_explain.log_buffers</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> <varname>auto_explain.log_buffers</varname> controls whether buffer usage statistics are printed when an execution plan is logged; it's - equivalent to the <literal>BUFFERS</> option of <command>EXPLAIN</>. + equivalent to the <literal>BUFFERS</literal> option of <command>EXPLAIN</command>. This parameter has no effect unless <varname>auto_explain.log_analyze</varname> is enabled. This parameter is off by default. @@ -112,14 +112,14 @@ LOAD 'auto_explain'; <term> <varname>auto_explain.log_timing</varname> (<type>boolean</type>) <indexterm> - <primary><varname>auto_explain.log_timing</> configuration parameter</primary> + <primary><varname>auto_explain.log_timing</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> <varname>auto_explain.log_timing</varname> controls whether per-node timing information is printed when an execution plan is logged; it's - equivalent to the <literal>TIMING</> option of <command>EXPLAIN</>. + equivalent to the <literal>TIMING</literal> option of <command>EXPLAIN</command>. The overhead of repeatedly reading the system clock can slow down queries significantly on some systems, so it may be useful to set this parameter to off when only actual row counts, and not exact times, are @@ -136,7 +136,7 @@ LOAD 'auto_explain'; <term> <varname>auto_explain.log_triggers</varname> (<type>boolean</type>) <indexterm> - <primary><varname>auto_explain.log_triggers</> configuration parameter</primary> + <primary><varname>auto_explain.log_triggers</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -155,14 +155,14 @@ LOAD 'auto_explain'; <term> <varname>auto_explain.log_verbose</varname> (<type>boolean</type>) <indexterm> - <primary><varname>auto_explain.log_verbose</> configuration parameter</primary> + <primary><varname>auto_explain.log_verbose</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> <varname>auto_explain.log_verbose</varname> controls whether verbose details are printed when an execution plan is logged; it's - equivalent to the <literal>VERBOSE</> option of <command>EXPLAIN</>. + equivalent to the <literal>VERBOSE</literal> option of <command>EXPLAIN</command>. This parameter is off by default. Only superusers can change this setting. </para> @@ -173,13 +173,13 @@ LOAD 'auto_explain'; <term> <varname>auto_explain.log_format</varname> (<type>enum</type>) <indexterm> - <primary><varname>auto_explain.log_format</> configuration parameter</primary> + <primary><varname>auto_explain.log_format</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> <varname>auto_explain.log_format</varname> selects the - <command>EXPLAIN</> output format to be used. + <command>EXPLAIN</command> output format to be used. The allowed values are <literal>text</literal>, <literal>xml</literal>, <literal>json</literal>, and <literal>yaml</literal>. The default is text. Only superusers can change this setting. @@ -191,7 +191,7 @@ LOAD 'auto_explain'; <term> <varname>auto_explain.log_nested_statements</varname> (<type>boolean</type>) <indexterm> - <primary><varname>auto_explain.log_nested_statements</> configuration parameter</primary> + <primary><varname>auto_explain.log_nested_statements</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -208,7 +208,7 @@ LOAD 'auto_explain'; <term> <varname>auto_explain.sample_rate</varname> (<type>real</type>) <indexterm> - <primary><varname>auto_explain.sample_rate</> configuration parameter</primary> + <primary><varname>auto_explain.sample_rate</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -224,7 +224,7 @@ LOAD 'auto_explain'; <para> In ordinary usage, these parameters are set - in <filename>postgresql.conf</>, although superusers can alter them + in <filename>postgresql.conf</filename>, although superusers can alter them on-the-fly within their own sessions. Typical usage might be: </para> diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml index bd55e8bb775..dd9c1bff5b3 100644 --- a/doc/src/sgml/backup.sgml +++ b/doc/src/sgml/backup.sgml @@ -3,10 +3,10 @@ <chapter id="backup"> <title>Backup and Restore</title> - <indexterm zone="backup"><primary>backup</></> + <indexterm zone="backup"><primary>backup</primary></indexterm> <para> - As with everything that contains valuable data, <productname>PostgreSQL</> + As with everything that contains valuable data, <productname>PostgreSQL</productname> databases should be backed up regularly. While the procedure is essentially simple, it is important to have a clear understanding of the underlying techniques and assumptions. @@ -14,9 +14,9 @@ <para> There are three fundamentally different approaches to backing up - <productname>PostgreSQL</> data: + <productname>PostgreSQL</productname> data: <itemizedlist> - <listitem><para><acronym>SQL</> dump</para></listitem> + <listitem><para><acronym>SQL</acronym> dump</para></listitem> <listitem><para>File system level backup</para></listitem> <listitem><para>Continuous archiving</para></listitem> </itemizedlist> @@ -25,30 +25,30 @@ </para> <sect1 id="backup-dump"> - <title><acronym>SQL</> Dump</title> + <title><acronym>SQL</acronym> Dump</title> <para> The idea behind this dump method is to generate a file with SQL commands that, when fed back to the server, will recreate the database in the same state as it was at the time of the dump. - <productname>PostgreSQL</> provides the utility program + <productname>PostgreSQL</productname> provides the utility program <xref linkend="app-pgdump"> for this purpose. The basic usage of this command is: <synopsis> pg_dump <replaceable class="parameter">dbname</replaceable> > <replaceable class="parameter">outfile</replaceable> </synopsis> - As you see, <application>pg_dump</> writes its result to the + As you see, <application>pg_dump</application> writes its result to the standard output. We will see below how this can be useful. - While the above command creates a text file, <application>pg_dump</> + While the above command creates a text file, <application>pg_dump</application> can create files in other formats that allow for parallelism and more fine-grained control of object restoration. </para> <para> - <application>pg_dump</> is a regular <productname>PostgreSQL</> + <application>pg_dump</application> is a regular <productname>PostgreSQL</productname> client application (albeit a particularly clever one). This means that you can perform this backup procedure from any remote host that has - access to the database. But remember that <application>pg_dump</> + access to the database. But remember that <application>pg_dump</application> does not operate with special permissions. In particular, it must have read access to all tables that you want to back up, so in order to back up the entire database you almost always have to run it as a @@ -60,9 +60,9 @@ pg_dump <replaceable class="parameter">dbname</replaceable> > <replaceable cl </para> <para> - To specify which database server <application>pg_dump</> should + To specify which database server <application>pg_dump</application> should contact, use the command line options <option>-h - <replaceable>host</></> and <option>-p <replaceable>port</></>. The + <replaceable>host</replaceable></option> and <option>-p <replaceable>port</replaceable></option>. The default host is the local host or whatever your <envar>PGHOST</envar> environment variable specifies. Similarly, the default port is indicated by the <envar>PGPORT</envar> @@ -72,30 +72,30 @@ pg_dump <replaceable class="parameter">dbname</replaceable> > <replaceable cl </para> <para> - Like any other <productname>PostgreSQL</> client application, - <application>pg_dump</> will by default connect with the database + Like any other <productname>PostgreSQL</productname> client application, + <application>pg_dump</application> will by default connect with the database user name that is equal to the current operating system user name. To override this, either specify the <option>-U</option> option or set the environment variable <envar>PGUSER</envar>. Remember that - <application>pg_dump</> connections are subject to the normal + <application>pg_dump</application> connections are subject to the normal client authentication mechanisms (which are described in <xref linkend="client-authentication">). </para> <para> - An important advantage of <application>pg_dump</> over the other backup - methods described later is that <application>pg_dump</>'s output can - generally be re-loaded into newer versions of <productname>PostgreSQL</>, + An important advantage of <application>pg_dump</application> over the other backup + methods described later is that <application>pg_dump</application>'s output can + generally be re-loaded into newer versions of <productname>PostgreSQL</productname>, whereas file-level backups and continuous archiving are both extremely - server-version-specific. <application>pg_dump</> is also the only method + server-version-specific. <application>pg_dump</application> is also the only method that will work when transferring a database to a different machine architecture, such as going from a 32-bit to a 64-bit server. </para> <para> - Dumps created by <application>pg_dump</> are internally consistent, + Dumps created by <application>pg_dump</application> are internally consistent, meaning, the dump represents a snapshot of the database at the time - <application>pg_dump</> began running. <application>pg_dump</> does not + <application>pg_dump</application> began running. <application>pg_dump</application> does not block other operations on the database while it is working. (Exceptions are those operations that need to operate with an exclusive lock, such as most forms of <command>ALTER TABLE</command>.) @@ -105,20 +105,20 @@ pg_dump <replaceable class="parameter">dbname</replaceable> > <replaceable cl <title>Restoring the Dump</title> <para> - Text files created by <application>pg_dump</> are intended to + Text files created by <application>pg_dump</application> are intended to be read in by the <application>psql</application> program. The general command form to restore a dump is <synopsis> psql <replaceable class="parameter">dbname</replaceable> < <replaceable class="parameter">infile</replaceable> </synopsis> where <replaceable class="parameter">infile</replaceable> is the - file output by the <application>pg_dump</> command. The database <replaceable + file output by the <application>pg_dump</application> command. The database <replaceable class="parameter">dbname</replaceable> will not be created by this - command, so you must create it yourself from <literal>template0</> - before executing <application>psql</> (e.g., with + command, so you must create it yourself from <literal>template0</literal> + before executing <application>psql</application> (e.g., with <literal>createdb -T template0 <replaceable - class="parameter">dbname</></literal>). <application>psql</> - supports options similar to <application>pg_dump</> for specifying + class="parameter">dbname</replaceable></literal>). <application>psql</application> + supports options similar to <application>pg_dump</application> for specifying the database server to connect to and the user name to use. See the <xref linkend="app-psql"> reference page for more information. Non-text file dumps are restored using the <xref @@ -134,10 +134,10 @@ psql <replaceable class="parameter">dbname</replaceable> < <replaceable class </para> <para> - By default, the <application>psql</> script will continue to + By default, the <application>psql</application> script will continue to execute after an SQL error is encountered. You might wish to run <application>psql</application> with - the <literal>ON_ERROR_STOP</> variable set to alter that + the <literal>ON_ERROR_STOP</literal> variable set to alter that behavior and have <application>psql</application> exit with an exit status of 3 if an SQL error occurs: <programlisting> @@ -147,8 +147,8 @@ psql --set ON_ERROR_STOP=on dbname < infile Alternatively, you can specify that the whole dump should be restored as a single transaction, so the restore is either fully completed or fully rolled back. This mode can be specified by - passing the <option>-1</> or <option>--single-transaction</> - command-line options to <application>psql</>. When using this + passing the <option>-1</option> or <option>--single-transaction</option> + command-line options to <application>psql</application>. When using this mode, be aware that even a minor error can rollback a restore that has already run for many hours. However, that might still be preferable to manually cleaning up a complex database @@ -156,22 +156,22 @@ psql --set ON_ERROR_STOP=on dbname < infile </para> <para> - The ability of <application>pg_dump</> and <application>psql</> to + The ability of <application>pg_dump</application> and <application>psql</application> to write to or read from pipes makes it possible to dump a database directly from one server to another, for example: <programlisting> -pg_dump -h <replaceable>host1</> <replaceable>dbname</> | psql -h <replaceable>host2</> <replaceable>dbname</> +pg_dump -h <replaceable>host1</replaceable> <replaceable>dbname</replaceable> | psql -h <replaceable>host2</replaceable> <replaceable>dbname</replaceable> </programlisting> </para> <important> <para> - The dumps produced by <application>pg_dump</> are relative to - <literal>template0</>. This means that any languages, procedures, - etc. added via <literal>template1</> will also be dumped by - <application>pg_dump</>. As a result, when restoring, if you are - using a customized <literal>template1</>, you must create the - empty database from <literal>template0</>, as in the example + The dumps produced by <application>pg_dump</application> are relative to + <literal>template0</literal>. This means that any languages, procedures, + etc. added via <literal>template1</literal> will also be dumped by + <application>pg_dump</application>. As a result, when restoring, if you are + using a customized <literal>template1</literal>, you must create the + empty database from <literal>template0</literal>, as in the example above. </para> </important> @@ -183,52 +183,52 @@ pg_dump -h <replaceable>host1</> <replaceable>dbname</> | psql -h <replaceable>h see <xref linkend="vacuum-for-statistics"> and <xref linkend="autovacuum"> for more information. For more advice on how to load large amounts of data - into <productname>PostgreSQL</> efficiently, refer to <xref + into <productname>PostgreSQL</productname> efficiently, refer to <xref linkend="populate">. </para> </sect2> <sect2 id="backup-dump-all"> - <title>Using <application>pg_dumpall</></title> + <title>Using <application>pg_dumpall</application></title> <para> - <application>pg_dump</> dumps only a single database at a time, + <application>pg_dump</application> dumps only a single database at a time, and it does not dump information about roles or tablespaces (because those are cluster-wide rather than per-database). To support convenient dumping of the entire contents of a database cluster, the <xref linkend="app-pg-dumpall"> program is provided. - <application>pg_dumpall</> backs up each database in a given + <application>pg_dumpall</application> backs up each database in a given cluster, and also preserves cluster-wide data such as role and tablespace definitions. The basic usage of this command is: <synopsis> -pg_dumpall > <replaceable>outfile</> +pg_dumpall > <replaceable>outfile</replaceable> </synopsis> - The resulting dump can be restored with <application>psql</>: + The resulting dump can be restored with <application>psql</application>: <synopsis> psql -f <replaceable class="parameter">infile</replaceable> postgres </synopsis> (Actually, you can specify any existing database name to start from, - but if you are loading into an empty cluster then <literal>postgres</> + but if you are loading into an empty cluster then <literal>postgres</literal> should usually be used.) It is always necessary to have - database superuser access when restoring a <application>pg_dumpall</> + database superuser access when restoring a <application>pg_dumpall</application> dump, as that is required to restore the role and tablespace information. If you use tablespaces, make sure that the tablespace paths in the dump are appropriate for the new installation. </para> <para> - <application>pg_dumpall</> works by emitting commands to re-create + <application>pg_dumpall</application> works by emitting commands to re-create roles, tablespaces, and empty databases, then invoking - <application>pg_dump</> for each database. This means that while + <application>pg_dump</application> for each database. This means that while each database will be internally consistent, the snapshots of different databases are not synchronized. </para> <para> Cluster-wide data can be dumped alone using the - <application>pg_dumpall</> <option>--globals-only</> option. + <application>pg_dumpall</application> <option>--globals-only</option> option. This is necessary to fully backup the cluster if running the - <application>pg_dump</> command on individual databases. + <application>pg_dump</application> command on individual databases. </para> </sect2> @@ -237,8 +237,8 @@ psql -f <replaceable class="parameter">infile</replaceable> postgres <para> Some operating systems have maximum file size limits that cause - problems when creating large <application>pg_dump</> output files. - Fortunately, <application>pg_dump</> can write to the standard + problems when creating large <application>pg_dump</application> output files. + Fortunately, <application>pg_dump</application> can write to the standard output, so you can use standard Unix tools to work around this potential problem. There are several possible methods: </para> @@ -268,7 +268,7 @@ cat <replaceable class="parameter">filename</replaceable>.gz | gunzip | psql <re </formalpara> <formalpara> - <title>Use <command>split</>.</title> + <title>Use <command>split</command>.</title> <para> The <command>split</command> command allows you to split the output into smaller files that are @@ -288,10 +288,10 @@ cat <replaceable class="parameter">filename</replaceable>* | psql <replaceable c </formalpara> <formalpara> - <title>Use <application>pg_dump</>'s custom dump format.</title> + <title>Use <application>pg_dump</application>'s custom dump format.</title> <para> If <productname>PostgreSQL</productname> was built on a system with the - <application>zlib</> compression library installed, the custom dump + <application>zlib</application> compression library installed, the custom dump format will compress data as it writes it to the output file. This will produce dump file sizes similar to using <command>gzip</command>, but it has the added advantage that tables can be restored selectively. The @@ -301,8 +301,8 @@ cat <replaceable class="parameter">filename</replaceable>* | psql <replaceable c pg_dump -Fc <replaceable class="parameter">dbname</replaceable> > <replaceable class="parameter">filename</replaceable> </programlisting> - A custom-format dump is not a script for <application>psql</>, but - instead must be restored with <application>pg_restore</>, for example: + A custom-format dump is not a script for <application>psql</application>, but + instead must be restored with <application>pg_restore</application>, for example: <programlisting> pg_restore -d <replaceable class="parameter">dbname</replaceable> <replaceable class="parameter">filename</replaceable> @@ -314,12 +314,12 @@ pg_restore -d <replaceable class="parameter">dbname</replaceable> <replaceable c </formalpara> <para> - For very large databases, you might need to combine <command>split</> + For very large databases, you might need to combine <command>split</command> with one of the other two approaches. </para> <formalpara> - <title>Use <application>pg_dump</>'s parallel dump feature.</title> + <title>Use <application>pg_dump</application>'s parallel dump feature.</title> <para> To speed up the dump of a large database, you can use <application>pg_dump</application>'s parallel mode. This will dump @@ -344,7 +344,7 @@ pg_dump -j <replaceable class="parameter">num</replaceable> -F d -f <replaceable <para> An alternative backup strategy is to directly copy the files that - <productname>PostgreSQL</> uses to store the data in the database; + <productname>PostgreSQL</productname> uses to store the data in the database; <xref linkend="creating-cluster"> explains where these files are located. You can use whatever method you prefer for doing file system backups; for example: @@ -356,13 +356,13 @@ tar -cf backup.tar /usr/local/pgsql/data <para> There are two restrictions, however, which make this method - impractical, or at least inferior to the <application>pg_dump</> + impractical, or at least inferior to the <application>pg_dump</application> method: <orderedlist> <listitem> <para> - The database server <emphasis>must</> be shut down in order to + The database server <emphasis>must</emphasis> be shut down in order to get a usable backup. Half-way measures such as disallowing all connections will <emphasis>not</emphasis> work (in part because <command>tar</command> and similar tools do not take @@ -379,7 +379,7 @@ tar -cf backup.tar /usr/local/pgsql/data If you have dug into the details of the file system layout of the database, you might be tempted to try to back up or restore only certain individual tables or databases from their respective files or - directories. This will <emphasis>not</> work because the + directories. This will <emphasis>not</emphasis> work because the information contained in these files is not usable without the commit log files, <filename>pg_xact/*</filename>, which contain the commit status of @@ -399,7 +399,7 @@ tar -cf backup.tar /usr/local/pgsql/data <quote>consistent snapshot</quote> of the data directory, if the file system supports that functionality (and you are willing to trust that it is implemented correctly). The typical procedure is - to make a <quote>frozen snapshot</> of the volume containing the + to make a <quote>frozen snapshot</quote> of the volume containing the database, then copy the whole data directory (not just parts, see above) from the snapshot to a backup device, then release the frozen snapshot. This will work even while the database server is running. @@ -419,7 +419,7 @@ tar -cf backup.tar /usr/local/pgsql/data the volumes. For example, if your data files and WAL log are on different disks, or if tablespaces are on different file systems, it might not be possible to use snapshot backup because the snapshots - <emphasis>must</> be simultaneous. + <emphasis>must</emphasis> be simultaneous. Read your file system documentation very carefully before trusting the consistent-snapshot technique in such situations. </para> @@ -435,13 +435,13 @@ tar -cf backup.tar /usr/local/pgsql/data </para> <para> - Another option is to use <application>rsync</> to perform a file - system backup. This is done by first running <application>rsync</> + Another option is to use <application>rsync</application> to perform a file + system backup. This is done by first running <application>rsync</application> while the database server is running, then shutting down the database - server long enough to do an <command>rsync --checksum</>. - (<option>--checksum</> is necessary because <command>rsync</> only + server long enough to do an <command>rsync --checksum</command>. + (<option>--checksum</option> is necessary because <command>rsync</command> only has file modification-time granularity of one second.) The - second <application>rsync</> will be quicker than the first, + second <application>rsync</application> will be quicker than the first, because it has relatively little data to transfer, and the end result will be consistent because the server was down. This method allows a file system backup to be performed with minimal downtime. @@ -471,12 +471,12 @@ tar -cf backup.tar /usr/local/pgsql/data </indexterm> <para> - At all times, <productname>PostgreSQL</> maintains a - <firstterm>write ahead log</> (WAL) in the <filename>pg_wal/</> + At all times, <productname>PostgreSQL</productname> maintains a + <firstterm>write ahead log</firstterm> (WAL) in the <filename>pg_wal/</filename> subdirectory of the cluster's data directory. The log records every change made to the database's data files. This log exists primarily for crash-safety purposes: if the system crashes, the - database can be restored to consistency by <quote>replaying</> the + database can be restored to consistency by <quote>replaying</quote> the log entries made since the last checkpoint. However, the existence of the log makes it possible to use a third strategy for backing up databases: we can combine a file-system-level backup with backup of @@ -492,7 +492,7 @@ tar -cf backup.tar /usr/local/pgsql/data Any internal inconsistency in the backup will be corrected by log replay (this is not significantly different from what happens during crash recovery). So we do not need a file system snapshot capability, - just <application>tar</> or a similar archiving tool. + just <application>tar</application> or a similar archiving tool. </para> </listitem> <listitem> @@ -508,7 +508,7 @@ tar -cf backup.tar /usr/local/pgsql/data It is not necessary to replay the WAL entries all the way to the end. We could stop the replay at any point and have a consistent snapshot of the database as it was at that time. Thus, - this technique supports <firstterm>point-in-time recovery</>: it is + this technique supports <firstterm>point-in-time recovery</firstterm>: it is possible to restore the database to its state at any time since your base backup was taken. </para> @@ -517,7 +517,7 @@ tar -cf backup.tar /usr/local/pgsql/data <para> If we continuously feed the series of WAL files to another machine that has been loaded with the same base backup file, we - have a <firstterm>warm standby</> system: at any point we can bring up + have a <firstterm>warm standby</firstterm> system: at any point we can bring up the second machine and it will have a nearly-current copy of the database. </para> @@ -530,7 +530,7 @@ tar -cf backup.tar /usr/local/pgsql/data <application>pg_dump</application> and <application>pg_dumpall</application> do not produce file-system-level backups and cannot be used as part of a continuous-archiving solution. - Such dumps are <emphasis>logical</> and do not contain enough + Such dumps are <emphasis>logical</emphasis> and do not contain enough information to be used by WAL replay. </para> </note> @@ -546,10 +546,10 @@ tar -cf backup.tar /usr/local/pgsql/data <para> To recover successfully using continuous archiving (also called - <quote>online backup</> by many database vendors), you need a continuous + <quote>online backup</quote> by many database vendors), you need a continuous sequence of archived WAL files that extends back at least as far as the start time of your backup. So to get started, you should set up and test - your procedure for archiving WAL files <emphasis>before</> you take your + your procedure for archiving WAL files <emphasis>before</emphasis> you take your first base backup. Accordingly, we first discuss the mechanics of archiving WAL files. </para> @@ -558,15 +558,15 @@ tar -cf backup.tar /usr/local/pgsql/data <title>Setting Up WAL Archiving</title> <para> - In an abstract sense, a running <productname>PostgreSQL</> system + In an abstract sense, a running <productname>PostgreSQL</productname> system produces an indefinitely long sequence of WAL records. The system physically divides this sequence into WAL <firstterm>segment - files</>, which are normally 16MB apiece (although the segment size - can be altered during <application>initdb</>). The segment + files</firstterm>, which are normally 16MB apiece (although the segment size + can be altered during <application>initdb</application>). The segment files are given numeric names that reflect their position in the abstract WAL sequence. When not using WAL archiving, the system normally creates just a few segment files and then - <quote>recycles</> them by renaming no-longer-needed segment files + <quote>recycles</quote> them by renaming no-longer-needed segment files to higher segment numbers. It's assumed that segment files whose contents precede the checkpoint-before-last are no longer of interest and can be recycled. @@ -577,33 +577,33 @@ tar -cf backup.tar /usr/local/pgsql/data file once it is filled, and save that data somewhere before the segment file is recycled for reuse. Depending on the application and the available hardware, there could be many different ways of <quote>saving - the data somewhere</>: we could copy the segment files to an NFS-mounted + the data somewhere</quote>: we could copy the segment files to an NFS-mounted directory on another machine, write them onto a tape drive (ensuring that you have a way of identifying the original name of each file), or batch them together and burn them onto CDs, or something else entirely. To provide the database administrator with flexibility, - <productname>PostgreSQL</> tries not to make any assumptions about how - the archiving will be done. Instead, <productname>PostgreSQL</> lets + <productname>PostgreSQL</productname> tries not to make any assumptions about how + the archiving will be done. Instead, <productname>PostgreSQL</productname> lets the administrator specify a shell command to be executed to copy a completed segment file to wherever it needs to go. The command could be - as simple as a <literal>cp</>, or it could invoke a complex shell + as simple as a <literal>cp</literal>, or it could invoke a complex shell script — it's all up to you. </para> <para> To enable WAL archiving, set the <xref linkend="guc-wal-level"> - configuration parameter to <literal>replica</> or higher, - <xref linkend="guc-archive-mode"> to <literal>on</>, + configuration parameter to <literal>replica</literal> or higher, + <xref linkend="guc-archive-mode"> to <literal>on</literal>, and specify the shell command to use in the <xref linkend="guc-archive-command"> configuration parameter. In practice these settings will always be placed in the <filename>postgresql.conf</filename> file. - In <varname>archive_command</>, - <literal>%p</> is replaced by the path name of the file to - archive, while <literal>%f</> is replaced by only the file name. + In <varname>archive_command</varname>, + <literal>%p</literal> is replaced by the path name of the file to + archive, while <literal>%f</literal> is replaced by only the file name. (The path name is relative to the current working directory, i.e., the cluster's data directory.) - Use <literal>%%</> if you need to embed an actual <literal>%</> + Use <literal>%%</literal> if you need to embed an actual <literal>%</literal> character in the command. The simplest useful command is something like: <programlisting> @@ -611,9 +611,9 @@ archive_command = 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/ser archive_command = 'copy "%p" "C:\\server\\archivedir\\%f"' # Windows </programlisting> which will copy archivable WAL segments to the directory - <filename>/mnt/server/archivedir</>. (This is an example, not a + <filename>/mnt/server/archivedir</filename>. (This is an example, not a recommendation, and might not work on all platforms.) After the - <literal>%p</> and <literal>%f</> parameters have been replaced, + <literal>%p</literal> and <literal>%f</literal> parameters have been replaced, the actual command executed might look like this: <programlisting> test ! -f /mnt/server/archivedir/00000001000000A900000065 && cp pg_wal/00000001000000A900000065 /mnt/server/archivedir/00000001000000A900000065 @@ -623,7 +623,7 @@ test ! -f /mnt/server/archivedir/00000001000000A900000065 && cp pg_wal/0 <para> The archive command will be executed under the ownership of the same - user that the <productname>PostgreSQL</> server is running as. Since + user that the <productname>PostgreSQL</productname> server is running as. Since the series of WAL files being archived contains effectively everything in your database, you will want to be sure that the archived data is protected from prying eyes; for example, archive into a directory that @@ -633,9 +633,9 @@ test ! -f /mnt/server/archivedir/00000001000000A900000065 && cp pg_wal/0 <para> It is important that the archive command return zero exit status if and only if it succeeds. Upon getting a zero result, - <productname>PostgreSQL</> will assume that the file has been + <productname>PostgreSQL</productname> will assume that the file has been successfully archived, and will remove or recycle it. However, a nonzero - status tells <productname>PostgreSQL</> that the file was not archived; + status tells <productname>PostgreSQL</productname> that the file was not archived; it will try again periodically until it succeeds. </para> @@ -650,14 +650,14 @@ test ! -f /mnt/server/archivedir/00000001000000A900000065 && cp pg_wal/0 <para> It is advisable to test your proposed archive command to ensure that it indeed does not overwrite an existing file, <emphasis>and that it returns - nonzero status in this case</>. + nonzero status in this case</emphasis>. The example command above for Unix ensures this by including a separate - <command>test</> step. On some Unix platforms, <command>cp</> has - switches such as <option>-i</> that can be used to do the same thing + <command>test</command> step. On some Unix platforms, <command>cp</command> has + switches such as <option>-i</option> that can be used to do the same thing less verbosely, but you should not rely on these without verifying that - the right exit status is returned. (In particular, GNU <command>cp</> - will return status zero when <option>-i</> is used and the target file - already exists, which is <emphasis>not</> the desired behavior.) + the right exit status is returned. (In particular, GNU <command>cp</command> + will return status zero when <option>-i</option> is used and the target file + already exists, which is <emphasis>not</emphasis> the desired behavior.) </para> <para> @@ -668,10 +668,10 @@ test ! -f /mnt/server/archivedir/00000001000000A900000065 && cp pg_wal/0 fills, nothing further can be archived until the tape is swapped. You should ensure that any error condition or request to a human operator is reported appropriately so that the situation can be - resolved reasonably quickly. The <filename>pg_wal/</> directory will + resolved reasonably quickly. The <filename>pg_wal/</filename> directory will continue to fill with WAL segment files until the situation is resolved. - (If the file system containing <filename>pg_wal/</> fills up, - <productname>PostgreSQL</> will do a PANIC shutdown. No committed + (If the file system containing <filename>pg_wal/</filename> fills up, + <productname>PostgreSQL</productname> will do a PANIC shutdown. No committed transactions will be lost, but the database will remain offline until you free some space.) </para> @@ -682,7 +682,7 @@ test ! -f /mnt/server/archivedir/00000001000000A900000065 && cp pg_wal/0 operation continues even if the archiving process falls a little behind. If archiving falls significantly behind, this will increase the amount of data that would be lost in the event of a disaster. It will also mean that - the <filename>pg_wal/</> directory will contain large numbers of + the <filename>pg_wal/</filename> directory will contain large numbers of not-yet-archived segment files, which could eventually exceed available disk space. You are advised to monitor the archiving process to ensure that it is working as you intend. @@ -692,16 +692,16 @@ test ! -f /mnt/server/archivedir/00000001000000A900000065 && cp pg_wal/0 In writing your archive command, you should assume that the file names to be archived can be up to 64 characters long and can contain any combination of ASCII letters, digits, and dots. It is not necessary to - preserve the original relative path (<literal>%p</>) but it is necessary to - preserve the file name (<literal>%f</>). + preserve the original relative path (<literal>%p</literal>) but it is necessary to + preserve the file name (<literal>%f</literal>). </para> <para> Note that although WAL archiving will allow you to restore any - modifications made to the data in your <productname>PostgreSQL</> database, + modifications made to the data in your <productname>PostgreSQL</productname> database, it will not restore changes made to configuration files (that is, - <filename>postgresql.conf</>, <filename>pg_hba.conf</> and - <filename>pg_ident.conf</>), since those are edited manually rather + <filename>postgresql.conf</filename>, <filename>pg_hba.conf</filename> and + <filename>pg_ident.conf</filename>), since those are edited manually rather than through SQL operations. You might wish to keep the configuration files in a location that will be backed up by your regular file system backup procedures. See @@ -719,32 +719,32 @@ test ! -f /mnt/server/archivedir/00000001000000A900000065 && cp pg_wal/0 to a new WAL segment file at least that often. Note that archived files that are archived early due to a forced switch are still the same length as completely full files. It is therefore unwise to set a very - short <varname>archive_timeout</> — it will bloat your archive - storage. <varname>archive_timeout</> settings of a minute or so are + short <varname>archive_timeout</varname> — it will bloat your archive + storage. <varname>archive_timeout</varname> settings of a minute or so are usually reasonable. </para> <para> Also, you can force a segment switch manually with - <function>pg_switch_wal</> if you want to ensure that a + <function>pg_switch_wal</function> if you want to ensure that a just-finished transaction is archived as soon as possible. Other utility functions related to WAL management are listed in <xref linkend="functions-admin-backup-table">. </para> <para> - When <varname>wal_level</> is <literal>minimal</> some SQL commands + When <varname>wal_level</varname> is <literal>minimal</literal> some SQL commands are optimized to avoid WAL logging, as described in <xref linkend="populate-pitr">. If archiving or streaming replication were turned on during execution of one of these statements, WAL would not contain enough information for archive recovery. (Crash recovery is - unaffected.) For this reason, <varname>wal_level</> can only be changed at - server start. However, <varname>archive_command</> can be changed with a + unaffected.) For this reason, <varname>wal_level</varname> can only be changed at + server start. However, <varname>archive_command</varname> can be changed with a configuration file reload. If you wish to temporarily stop archiving, - one way to do it is to set <varname>archive_command</> to the empty - string (<literal>''</>). - This will cause WAL files to accumulate in <filename>pg_wal/</> until a - working <varname>archive_command</> is re-established. + one way to do it is to set <varname>archive_command</varname> to the empty + string (<literal>''</literal>). + This will cause WAL files to accumulate in <filename>pg_wal/</filename> until a + working <varname>archive_command</varname> is re-established. </para> </sect2> @@ -763,8 +763,8 @@ test ! -f /mnt/server/archivedir/00000001000000A900000065 && cp pg_wal/0 <para> It is not necessary to be concerned about the amount of time it takes to make a base backup. However, if you normally run the - server with <varname>full_page_writes</> disabled, you might notice a drop - in performance while the backup runs since <varname>full_page_writes</> is + server with <varname>full_page_writes</varname> disabled, you might notice a drop + in performance while the backup runs since <varname>full_page_writes</varname> is effectively forced on during backup mode. </para> @@ -772,13 +772,13 @@ test ! -f /mnt/server/archivedir/00000001000000A900000065 && cp pg_wal/0 To make use of the backup, you will need to keep all the WAL segment files generated during and after the file system backup. To aid you in doing this, the base backup process - creates a <firstterm>backup history file</> that is immediately + creates a <firstterm>backup history file</firstterm> that is immediately stored into the WAL archive area. This file is named after the first WAL segment file that you need for the file system backup. For example, if the starting WAL file is - <literal>0000000100001234000055CD</> the backup history file will be + <literal>0000000100001234000055CD</literal> the backup history file will be named something like - <literal>0000000100001234000055CD.007C9330.backup</>. (The second + <literal>0000000100001234000055CD.007C9330.backup</literal>. (The second part of the file name stands for an exact position within the WAL file, and can ordinarily be ignored.) Once you have safely archived the file system backup and the WAL segment files used during the @@ -847,14 +847,14 @@ test ! -f /mnt/server/archivedir/00000001000000A900000065 && cp pg_wal/0 <programlisting> SELECT pg_start_backup('label', false, false); </programlisting> - where <literal>label</> is any string you want to use to uniquely + where <literal>label</literal> is any string you want to use to uniquely identify this backup operation. The connection - calling <function>pg_start_backup</> must be maintained until the end of + calling <function>pg_start_backup</function> must be maintained until the end of the backup, or the backup will be automatically aborted. </para> <para> - By default, <function>pg_start_backup</> can take a long time to finish. + By default, <function>pg_start_backup</function> can take a long time to finish. This is because it performs a checkpoint, and the I/O required for the checkpoint will be spread out over a significant period of time, by default half your inter-checkpoint interval @@ -862,19 +862,19 @@ SELECT pg_start_backup('label', false, false); <xref linkend="guc-checkpoint-completion-target">). This is usually what you want, because it minimizes the impact on query processing. If you want to start the backup as soon as - possible, change the second parameter to <literal>true</>, which will + possible, change the second parameter to <literal>true</literal>, which will issue an immediate checkpoint using as much I/O as available. </para> <para> - The third parameter being <literal>false</> tells - <function>pg_start_backup</> to initiate a non-exclusive base backup. + The third parameter being <literal>false</literal> tells + <function>pg_start_backup</function> to initiate a non-exclusive base backup. </para> </listitem> <listitem> <para> Perform the backup, using any convenient file-system-backup tool - such as <application>tar</> or <application>cpio</> (not + such as <application>tar</application> or <application>cpio</application> (not <application>pg_dump</application> or <application>pg_dumpall</application>). It is neither necessary nor desirable to stop normal operation of the database @@ -898,45 +898,45 @@ SELECT * FROM pg_stop_backup(false, true); ready to archive. </para> <para> - The <function>pg_stop_backup</> will return one row with three + The <function>pg_stop_backup</function> will return one row with three values. The second of these fields should be written to a file named - <filename>backup_label</> in the root directory of the backup. The + <filename>backup_label</filename> in the root directory of the backup. The third field should be written to a file named - <filename>tablespace_map</> unless the field is empty. These files are + <filename>tablespace_map</filename> unless the field is empty. These files are vital to the backup working, and must be written without modification. </para> </listitem> <listitem> <para> Once the WAL segment files active during the backup are archived, you are - done. The file identified by <function>pg_stop_backup</>'s first return + done. The file identified by <function>pg_stop_backup</function>'s first return value is the last segment that is required to form a complete set of - backup files. On a primary, if <varname>archive_mode</> is enabled and the - <literal>wait_for_archive</> parameter is <literal>true</>, - <function>pg_stop_backup</> does not return until the last segment has + backup files. On a primary, if <varname>archive_mode</varname> is enabled and the + <literal>wait_for_archive</literal> parameter is <literal>true</literal>, + <function>pg_stop_backup</function> does not return until the last segment has been archived. - On a standby, <varname>archive_mode</> must be <literal>always</> in order - for <function>pg_stop_backup</> to wait. + On a standby, <varname>archive_mode</varname> must be <literal>always</literal> in order + for <function>pg_stop_backup</function> to wait. Archiving of these files happens automatically since you have - already configured <varname>archive_command</>. In most cases this + already configured <varname>archive_command</varname>. In most cases this happens quickly, but you are advised to monitor your archive system to ensure there are no delays. If the archive process has fallen behind because of failures of the archive command, it will keep retrying until the archive succeeds and the backup is complete. If you wish to place a time limit on the execution of - <function>pg_stop_backup</>, set an appropriate + <function>pg_stop_backup</function>, set an appropriate <varname>statement_timeout</varname> value, but make note that if - <function>pg_stop_backup</> terminates because of this your backup + <function>pg_stop_backup</function> terminates because of this your backup may not be valid. </para> <para> If the backup process monitors and ensures that all WAL segment files required for the backup are successfully archived then the - <literal>wait_for_archive</> parameter (which defaults to true) can be set + <literal>wait_for_archive</literal> parameter (which defaults to true) can be set to false to have - <function>pg_stop_backup</> return as soon as the stop backup record is - written to the WAL. By default, <function>pg_stop_backup</> will wait + <function>pg_stop_backup</function> return as soon as the stop backup record is + written to the WAL. By default, <function>pg_stop_backup</function> will wait until all WAL has been archived, which can take some time. This option must be used with caution: if WAL archiving is not monitored correctly then the backup might not include all of the WAL files and will @@ -952,7 +952,7 @@ SELECT * FROM pg_stop_backup(false, true); The process for an exclusive backup is mostly the same as for a non-exclusive one, but it differs in a few key steps. This type of backup can only be taken on a primary and does not allow concurrent backups. - Prior to <productname>PostgreSQL</> 9.6, this + Prior to <productname>PostgreSQL</productname> 9.6, this was the only low-level method available, but it is now recommended that all users upgrade their scripts to use non-exclusive backups if possible. </para> @@ -971,20 +971,20 @@ SELECT * FROM pg_stop_backup(false, true); <programlisting> SELECT pg_start_backup('label'); </programlisting> - where <literal>label</> is any string you want to use to uniquely + where <literal>label</literal> is any string you want to use to uniquely identify this backup operation. - <function>pg_start_backup</> creates a <firstterm>backup label</> file, - called <filename>backup_label</>, in the cluster directory with + <function>pg_start_backup</function> creates a <firstterm>backup label</firstterm> file, + called <filename>backup_label</filename>, in the cluster directory with information about your backup, including the start time and label string. - The function also creates a <firstterm>tablespace map</> file, - called <filename>tablespace_map</>, in the cluster directory with - information about tablespace symbolic links in <filename>pg_tblspc/</> if + The function also creates a <firstterm>tablespace map</firstterm> file, + called <filename>tablespace_map</filename>, in the cluster directory with + information about tablespace symbolic links in <filename>pg_tblspc/</filename> if one or more such link is present. Both files are critical to the integrity of the backup, should you need to restore from it. </para> <para> - By default, <function>pg_start_backup</> can take a long time to finish. + By default, <function>pg_start_backup</function> can take a long time to finish. This is because it performs a checkpoint, and the I/O required for the checkpoint will be spread out over a significant period of time, by default half your inter-checkpoint interval @@ -1002,7 +1002,7 @@ SELECT pg_start_backup('label', true); <listitem> <para> Perform the backup, using any convenient file-system-backup tool - such as <application>tar</> or <application>cpio</> (not + such as <application>tar</application> or <application>cpio</application> (not <application>pg_dump</application> or <application>pg_dumpall</application>). It is neither necessary nor desirable to stop normal operation of the database @@ -1012,7 +1012,7 @@ SELECT pg_start_backup('label', true); </para> <para> Note that if the server crashes during the backup it may not be - possible to restart until the <literal>backup_label</> file has been + possible to restart until the <literal>backup_label</literal> file has been manually deleted from the <envar>PGDATA</envar> directory. </para> </listitem> @@ -1033,22 +1033,22 @@ SELECT pg_stop_backup(); <listitem> <para> Once the WAL segment files active during the backup are archived, you are - done. The file identified by <function>pg_stop_backup</>'s result is + done. The file identified by <function>pg_stop_backup</function>'s result is the last segment that is required to form a complete set of backup files. - If <varname>archive_mode</> is enabled, - <function>pg_stop_backup</> does not return until the last segment has + If <varname>archive_mode</varname> is enabled, + <function>pg_stop_backup</function> does not return until the last segment has been archived. Archiving of these files happens automatically since you have - already configured <varname>archive_command</>. In most cases this + already configured <varname>archive_command</varname>. In most cases this happens quickly, but you are advised to monitor your archive system to ensure there are no delays. If the archive process has fallen behind because of failures of the archive command, it will keep retrying until the archive succeeds and the backup is complete. If you wish to place a time limit on the execution of - <function>pg_stop_backup</>, set an appropriate + <function>pg_stop_backup</function>, set an appropriate <varname>statement_timeout</varname> value, but make note that if - <function>pg_stop_backup</> terminates because of this your backup + <function>pg_stop_backup</function> terminates because of this your backup may not be valid. </para> </listitem> @@ -1063,21 +1063,21 @@ SELECT pg_stop_backup(); When taking a base backup of an active database, this situation is normal and not an error. However, you need to ensure that you can distinguish complaints of this sort from real errors. For example, some versions - of <application>rsync</> return a separate exit code for - <quote>vanished source files</>, and you can write a driver script to + of <application>rsync</application> return a separate exit code for + <quote>vanished source files</quote>, and you can write a driver script to accept this exit code as a non-error case. Also, some versions of - GNU <application>tar</> return an error code indistinguishable from - a fatal error if a file was truncated while <application>tar</> was - copying it. Fortunately, GNU <application>tar</> versions 1.16 and + GNU <application>tar</application> return an error code indistinguishable from + a fatal error if a file was truncated while <application>tar</application> was + copying it. Fortunately, GNU <application>tar</application> versions 1.16 and later exit with 1 if a file was changed during the backup, - and 2 for other errors. With GNU <application>tar</> version 1.23 and + and 2 for other errors. With GNU <application>tar</application> version 1.23 and later, you can use the warning options <literal>--warning=no-file-changed --warning=no-file-removed</literal> to hide the related warning messages. </para> <para> Be certain that your backup includes all of the files under - the database cluster directory (e.g., <filename>/usr/local/pgsql/data</>). + the database cluster directory (e.g., <filename>/usr/local/pgsql/data</filename>). If you are using tablespaces that do not reside underneath this directory, be careful to include them as well (and be sure that your backup archives symbolic links as links, otherwise the restore will corrupt @@ -1086,21 +1086,21 @@ SELECT pg_stop_backup(); <para> You should, however, omit from the backup the files within the - cluster's <filename>pg_wal/</> subdirectory. This + cluster's <filename>pg_wal/</filename> subdirectory. This slight adjustment is worthwhile because it reduces the risk of mistakes when restoring. This is easy to arrange if - <filename>pg_wal/</> is a symbolic link pointing to someplace outside + <filename>pg_wal/</filename> is a symbolic link pointing to someplace outside the cluster directory, which is a common setup anyway for performance - reasons. You might also want to exclude <filename>postmaster.pid</> - and <filename>postmaster.opts</>, which record information - about the running <application>postmaster</>, not about the - <application>postmaster</> which will eventually use this backup. - (These files can confuse <application>pg_ctl</>.) + reasons. You might also want to exclude <filename>postmaster.pid</filename> + and <filename>postmaster.opts</filename>, which record information + about the running <application>postmaster</application>, not about the + <application>postmaster</application> which will eventually use this backup. + (These files can confuse <application>pg_ctl</application>.) </para> <para> It is often a good idea to also omit from the backup the files - within the cluster's <filename>pg_replslot/</> directory, so that + within the cluster's <filename>pg_replslot/</filename> directory, so that replication slots that exist on the master do not become part of the backup. Otherwise, the subsequent use of the backup to create a standby may result in indefinite retention of WAL files on the standby, and @@ -1114,10 +1114,10 @@ SELECT pg_stop_backup(); </para> <para> - The contents of the directories <filename>pg_dynshmem/</>, - <filename>pg_notify/</>, <filename>pg_serial/</>, - <filename>pg_snapshots/</>, <filename>pg_stat_tmp/</>, - and <filename>pg_subtrans/</> (but not the directories themselves) can be + The contents of the directories <filename>pg_dynshmem/</filename>, + <filename>pg_notify/</filename>, <filename>pg_serial/</filename>, + <filename>pg_snapshots/</filename>, <filename>pg_stat_tmp/</filename>, + and <filename>pg_subtrans/</filename> (but not the directories themselves) can be omitted from the backup as they will be initialized on postmaster startup. If <xref linkend="guc-stats-temp-directory"> is set and is under the data directory then the contents of that directory can also be omitted. @@ -1131,13 +1131,13 @@ SELECT pg_stop_backup(); <para> The backup label - file includes the label string you gave to <function>pg_start_backup</>, - as well as the time at which <function>pg_start_backup</> was run, and + file includes the label string you gave to <function>pg_start_backup</function>, + as well as the time at which <function>pg_start_backup</function> was run, and the name of the starting WAL file. In case of confusion it is therefore possible to look inside a backup file and determine exactly which backup session the dump file came from. The tablespace map file includes the symbolic link names as they exist in the directory - <filename>pg_tblspc/</> and the full path of each symbolic link. + <filename>pg_tblspc/</filename> and the full path of each symbolic link. These files are not merely for your information; their presence and contents are critical to the proper operation of the system's recovery process. @@ -1146,7 +1146,7 @@ SELECT pg_stop_backup(); <para> It is also possible to make a backup while the server is stopped. In this case, you obviously cannot use - <function>pg_start_backup</> or <function>pg_stop_backup</>, and + <function>pg_start_backup</function> or <function>pg_stop_backup</function>, and you will therefore be left to your own devices to keep track of which backup is which and how far back the associated WAL files go. It is generally better to follow the continuous archiving procedure above. @@ -1173,7 +1173,7 @@ SELECT pg_stop_backup(); location in case you need them later. Note that this precaution will require that you have enough free space on your system to hold two copies of your existing database. If you do not have enough space, - you should at least save the contents of the cluster's <filename>pg_wal</> + you should at least save the contents of the cluster's <filename>pg_wal</filename> subdirectory, as it might contain logs which were not archived before the system went down. </para> @@ -1188,17 +1188,17 @@ SELECT pg_stop_backup(); <para> Restore the database files from your file system backup. Be sure that they are restored with the right ownership (the database system user, not - <literal>root</>!) and with the right permissions. If you are using + <literal>root</literal>!) and with the right permissions. If you are using tablespaces, - you should verify that the symbolic links in <filename>pg_tblspc/</> + you should verify that the symbolic links in <filename>pg_tblspc/</filename> were correctly restored. </para> </listitem> <listitem> <para> - Remove any files present in <filename>pg_wal/</>; these came from the + Remove any files present in <filename>pg_wal/</filename>; these came from the file system backup and are therefore probably obsolete rather than current. - If you didn't archive <filename>pg_wal/</> at all, then recreate + If you didn't archive <filename>pg_wal/</filename> at all, then recreate it with proper permissions, being careful to ensure that you re-establish it as a symbolic link if you had it set up that way before. @@ -1207,16 +1207,16 @@ SELECT pg_stop_backup(); <listitem> <para> If you have unarchived WAL segment files that you saved in step 2, - copy them into <filename>pg_wal/</>. (It is best to copy them, + copy them into <filename>pg_wal/</filename>. (It is best to copy them, not move them, so you still have the unmodified files if a problem occurs and you have to start over.) </para> </listitem> <listitem> <para> - Create a recovery command file <filename>recovery.conf</> in the cluster + Create a recovery command file <filename>recovery.conf</filename> in the cluster data directory (see <xref linkend="recovery-config">). You might - also want to temporarily modify <filename>pg_hba.conf</> to prevent + also want to temporarily modify <filename>pg_hba.conf</filename> to prevent ordinary users from connecting until you are sure the recovery was successful. </para> </listitem> @@ -1227,7 +1227,7 @@ SELECT pg_stop_backup(); recovery be terminated because of an external error, the server can simply be restarted and it will continue recovery. Upon completion of the recovery process, the server will rename - <filename>recovery.conf</> to <filename>recovery.done</> (to prevent + <filename>recovery.conf</filename> to <filename>recovery.done</filename> (to prevent accidentally re-entering recovery mode later) and then commence normal database operations. </para> @@ -1236,7 +1236,7 @@ SELECT pg_stop_backup(); <para> Inspect the contents of the database to ensure you have recovered to the desired state. If not, return to step 1. If all is well, - allow your users to connect by restoring <filename>pg_hba.conf</> to normal. + allow your users to connect by restoring <filename>pg_hba.conf</filename> to normal. </para> </listitem> </orderedlist> @@ -1245,32 +1245,32 @@ SELECT pg_stop_backup(); <para> The key part of all this is to set up a recovery configuration file that describes how you want to recover and how far the recovery should - run. You can use <filename>recovery.conf.sample</> (normally - located in the installation's <filename>share/</> directory) as a + run. You can use <filename>recovery.conf.sample</filename> (normally + located in the installation's <filename>share/</filename> directory) as a prototype. The one thing that you absolutely must specify in - <filename>recovery.conf</> is the <varname>restore_command</>, - which tells <productname>PostgreSQL</> how to retrieve archived - WAL file segments. Like the <varname>archive_command</>, this is - a shell command string. It can contain <literal>%f</>, which is - replaced by the name of the desired log file, and <literal>%p</>, + <filename>recovery.conf</filename> is the <varname>restore_command</varname>, + which tells <productname>PostgreSQL</productname> how to retrieve archived + WAL file segments. Like the <varname>archive_command</varname>, this is + a shell command string. It can contain <literal>%f</literal>, which is + replaced by the name of the desired log file, and <literal>%p</literal>, which is replaced by the path name to copy the log file to. (The path name is relative to the current working directory, i.e., the cluster's data directory.) - Write <literal>%%</> if you need to embed an actual <literal>%</> + Write <literal>%%</literal> if you need to embed an actual <literal>%</literal> character in the command. The simplest useful command is something like: <programlisting> restore_command = 'cp /mnt/server/archivedir/%f %p' </programlisting> which will copy previously archived WAL segments from the directory - <filename>/mnt/server/archivedir</>. Of course, you can use something + <filename>/mnt/server/archivedir</filename>. Of course, you can use something much more complicated, perhaps even a shell script that requests the operator to mount an appropriate tape. </para> <para> It is important that the command return nonzero exit status on failure. - The command <emphasis>will</> be called requesting files that are not + The command <emphasis>will</emphasis> be called requesting files that are not present in the archive; it must return nonzero when so asked. This is not an error condition. An exception is that if the command was terminated by a signal (other than <systemitem>SIGTERM</systemitem>, which is used as @@ -1282,27 +1282,27 @@ restore_command = 'cp /mnt/server/archivedir/%f %p' <para> Not all of the requested files will be WAL segment files; you should also expect requests for files with a suffix of - <literal>.backup</> or <literal>.history</>. Also be aware that - the base name of the <literal>%p</> path will be different from - <literal>%f</>; do not expect them to be interchangeable. + <literal>.backup</literal> or <literal>.history</literal>. Also be aware that + the base name of the <literal>%p</literal> path will be different from + <literal>%f</literal>; do not expect them to be interchangeable. </para> <para> WAL segments that cannot be found in the archive will be sought in - <filename>pg_wal/</>; this allows use of recent un-archived segments. + <filename>pg_wal/</filename>; this allows use of recent un-archived segments. However, segments that are available from the archive will be used in - preference to files in <filename>pg_wal/</>. + preference to files in <filename>pg_wal/</filename>. </para> <para> Normally, recovery will proceed through all available WAL segments, thereby restoring the database to the current point in time (or as close as possible given the available WAL segments). Therefore, a normal - recovery will end with a <quote>file not found</> message, the exact text + recovery will end with a <quote>file not found</quote> message, the exact text of the error message depending upon your choice of - <varname>restore_command</>. You may also see an error message + <varname>restore_command</varname>. You may also see an error message at the start of recovery for a file named something like - <filename>00000001.history</>. This is also normal and does not + <filename>00000001.history</filename>. This is also normal and does not indicate a problem in simple recovery situations; see <xref linkend="backup-timelines"> for discussion. </para> @@ -1310,8 +1310,8 @@ restore_command = 'cp /mnt/server/archivedir/%f %p' <para> If you want to recover to some previous point in time (say, right before the junior DBA dropped your main transaction table), just specify the - required <link linkend="recovery-target-settings">stopping point</link> in <filename>recovery.conf</>. You can specify - the stop point, known as the <quote>recovery target</>, either by + required <link linkend="recovery-target-settings">stopping point</link> in <filename>recovery.conf</filename>. You can specify + the stop point, known as the <quote>recovery target</quote>, either by date/time, named restore point or by completion of a specific transaction ID. As of this writing only the date/time and named restore point options are very usable, since there are no tools to help you identify with any @@ -1321,7 +1321,7 @@ restore_command = 'cp /mnt/server/archivedir/%f %p' <note> <para> The stop point must be after the ending time of the base backup, i.e., - the end time of <function>pg_stop_backup</>. You cannot use a base backup + the end time of <function>pg_stop_backup</function>. You cannot use a base backup to recover to a time when that backup was in progress. (To recover to such a time, you must go back to your previous base backup and roll forward from there.) @@ -1332,14 +1332,14 @@ restore_command = 'cp /mnt/server/archivedir/%f %p' If recovery finds corrupted WAL data, recovery will halt at that point and the server will not start. In such a case the recovery process could be re-run from the beginning, specifying a - <quote>recovery target</> before the point of corruption so that recovery + <quote>recovery target</quote> before the point of corruption so that recovery can complete normally. If recovery fails for an external reason, such as a system crash or if the WAL archive has become inaccessible, then the recovery can simply be restarted and it will restart almost from where it failed. Recovery restart works much like checkpointing in normal operation: the server periodically forces all its state to disk, and then updates - the <filename>pg_control</> file to indicate that the already-processed + the <filename>pg_control</filename> file to indicate that the already-processed WAL data need not be scanned again. </para> @@ -1359,7 +1359,7 @@ restore_command = 'cp /mnt/server/archivedir/%f %p' suppose you dropped a critical table at 5:15PM on Tuesday evening, but didn't realize your mistake until Wednesday noon. Unfazed, you get out your backup, restore to the point-in-time 5:14PM - Tuesday evening, and are up and running. In <emphasis>this</> history of + Tuesday evening, and are up and running. In <emphasis>this</emphasis> history of the database universe, you never dropped the table. But suppose you later realize this wasn't such a great idea, and would like to return to sometime Wednesday morning in the original history. @@ -1372,8 +1372,8 @@ restore_command = 'cp /mnt/server/archivedir/%f %p' </para> <para> - To deal with this problem, <productname>PostgreSQL</> has a notion - of <firstterm>timelines</>. Whenever an archive recovery completes, + To deal with this problem, <productname>PostgreSQL</productname> has a notion + of <firstterm>timelines</firstterm>. Whenever an archive recovery completes, a new timeline is created to identify the series of WAL records generated after that recovery. The timeline ID number is part of WAL segment file names so a new timeline does @@ -1384,13 +1384,13 @@ restore_command = 'cp /mnt/server/archivedir/%f %p' and so have to do several point-in-time recoveries by trial and error until you find the best place to branch off from the old history. Without timelines this process would soon generate an unmanageable mess. With - timelines, you can recover to <emphasis>any</> prior state, including + timelines, you can recover to <emphasis>any</emphasis> prior state, including states in timeline branches that you abandoned earlier. </para> <para> - Every time a new timeline is created, <productname>PostgreSQL</> creates - a <quote>timeline history</> file that shows which timeline it branched + Every time a new timeline is created, <productname>PostgreSQL</productname> creates + a <quote>timeline history</quote> file that shows which timeline it branched off from and when. These history files are necessary to allow the system to pick the right WAL segment files when recovering from an archive that contains multiple timelines. Therefore, they are archived into the WAL @@ -1408,7 +1408,7 @@ restore_command = 'cp /mnt/server/archivedir/%f %p' that was current when the base backup was taken. If you wish to recover into some child timeline (that is, you want to return to some state that was itself generated after a recovery attempt), you need to specify the - target timeline ID in <filename>recovery.conf</>. You cannot recover into + target timeline ID in <filename>recovery.conf</filename>. You cannot recover into timelines that branched off earlier than the base backup. </para> </sect2> @@ -1424,18 +1424,18 @@ restore_command = 'cp /mnt/server/archivedir/%f %p' <title>Standalone Hot Backups</title> <para> - It is possible to use <productname>PostgreSQL</>'s backup facilities to + It is possible to use <productname>PostgreSQL</productname>'s backup facilities to produce standalone hot backups. These are backups that cannot be used for point-in-time recovery, yet are typically much faster to backup and - restore than <application>pg_dump</> dumps. (They are also much larger - than <application>pg_dump</> dumps, so in some cases the speed advantage + restore than <application>pg_dump</application> dumps. (They are also much larger + than <application>pg_dump</application> dumps, so in some cases the speed advantage might be negated.) </para> <para> As with base backups, the easiest way to produce a standalone hot backup is to use the <xref linkend="app-pgbasebackup"> - tool. If you include the <literal>-X</> parameter when calling + tool. If you include the <literal>-X</literal> parameter when calling it, all the write-ahead log required to use the backup will be included in the backup automatically, and no special action is required to restore the backup. @@ -1445,16 +1445,16 @@ restore_command = 'cp /mnt/server/archivedir/%f %p' If more flexibility in copying the backup files is needed, a lower level process can be used for standalone hot backups as well. To prepare for low level standalone hot backups, make sure - <varname>wal_level</> is set to - <literal>replica</> or higher, <varname>archive_mode</> to - <literal>on</>, and set up an <varname>archive_command</> that performs - archiving only when a <emphasis>switch file</> exists. For example: + <varname>wal_level</varname> is set to + <literal>replica</literal> or higher, <varname>archive_mode</varname> to + <literal>on</literal>, and set up an <varname>archive_command</varname> that performs + archiving only when a <emphasis>switch file</emphasis> exists. For example: <programlisting> archive_command = 'test ! -f /var/lib/pgsql/backup_in_progress || (test ! -f /var/lib/pgsql/archive/%f && cp %p /var/lib/pgsql/archive/%f)' </programlisting> This command will perform archiving when - <filename>/var/lib/pgsql/backup_in_progress</> exists, and otherwise - silently return zero exit status (allowing <productname>PostgreSQL</> + <filename>/var/lib/pgsql/backup_in_progress</filename> exists, and otherwise + silently return zero exit status (allowing <productname>PostgreSQL</productname> to recycle the unwanted WAL file). </para> @@ -1469,11 +1469,11 @@ psql -c "select pg_stop_backup();" rm /var/lib/pgsql/backup_in_progress tar -rf /var/lib/pgsql/backup.tar /var/lib/pgsql/archive/ </programlisting> - The switch file <filename>/var/lib/pgsql/backup_in_progress</> is + The switch file <filename>/var/lib/pgsql/backup_in_progress</filename> is created first, enabling archiving of completed WAL files to occur. After the backup the switch file is removed. Archived WAL files are then added to the backup so that both base backup and all required - WAL files are part of the same <application>tar</> file. + WAL files are part of the same <application>tar</application> file. Please remember to add error handling to your backup scripts. </para> @@ -1488,7 +1488,7 @@ tar -rf /var/lib/pgsql/backup.tar /var/lib/pgsql/archive/ <programlisting> archive_command = 'gzip < %p > /var/lib/pgsql/archive/%f' </programlisting> - You will then need to use <application>gunzip</> during recovery: + You will then need to use <application>gunzip</application> during recovery: <programlisting> restore_command = 'gunzip < /mnt/server/archivedir/%f > %p' </programlisting> @@ -1501,7 +1501,7 @@ restore_command = 'gunzip < /mnt/server/archivedir/%f > %p' <para> Many people choose to use scripts to define their <varname>archive_command</varname>, so that their - <filename>postgresql.conf</> entry looks very simple: + <filename>postgresql.conf</filename> entry looks very simple: <programlisting> archive_command = 'local_backup_script.sh "%p" "%f"' </programlisting> @@ -1509,7 +1509,7 @@ archive_command = 'local_backup_script.sh "%p" "%f"' more than a single command in the archiving process. This allows all complexity to be managed within the script, which can be written in a popular scripting language such as - <application>bash</> or <application>perl</>. + <application>bash</application> or <application>perl</application>. </para> <para> @@ -1543,7 +1543,7 @@ archive_command = 'local_backup_script.sh "%p" "%f"' <para> When using an <varname>archive_command</varname> script, it's desirable to enable <xref linkend="guc-logging-collector">. - Any messages written to <systemitem>stderr</> from the script will then + Any messages written to <systemitem>stderr</systemitem> from the script will then appear in the database server log, allowing complex configurations to be diagnosed easily if they fail. </para> @@ -1563,7 +1563,7 @@ archive_command = 'local_backup_script.sh "%p" "%f"' <para> If a <xref linkend="sql-createdatabase"> command is executed while a base backup is being taken, and then - the template database that the <command>CREATE DATABASE</> copied + the template database that the <command>CREATE DATABASE</command> copied is modified while the base backup is still in progress, it is possible that recovery will cause those modifications to be propagated into the created database as well. This is of course @@ -1602,7 +1602,7 @@ archive_command = 'local_backup_script.sh "%p" "%f"' before you do so.) Turning off page snapshots does not prevent use of the logs for PITR operations. An area for future development is to compress archived WAL data by removing - unnecessary page copies even when <varname>full_page_writes</> is + unnecessary page copies even when <varname>full_page_writes</varname> is on. In the meantime, administrators might wish to reduce the number of page snapshots included in WAL by increasing the checkpoint interval parameters as much as feasible. diff --git a/doc/src/sgml/bgworker.sgml b/doc/src/sgml/bgworker.sgml index ea1b5c0c8e3..0b092f6e492 100644 --- a/doc/src/sgml/bgworker.sgml +++ b/doc/src/sgml/bgworker.sgml @@ -11,17 +11,17 @@ PostgreSQL can be extended to run user-supplied code in separate processes. Such processes are started, stopped and monitored by <command>postgres</command>, which permits them to have a lifetime closely linked to the server's status. - These processes have the option to attach to <productname>PostgreSQL</>'s + These processes have the option to attach to <productname>PostgreSQL</productname>'s shared memory area and to connect to databases internally; they can also run multiple transactions serially, just like a regular client-connected server - process. Also, by linking to <application>libpq</> they can connect to the + process. Also, by linking to <application>libpq</application> they can connect to the server and behave like a regular client application. </para> <warning> <para> There are considerable robustness and security risks in using background - worker processes because, being written in the <literal>C</> language, + worker processes because, being written in the <literal>C</literal> language, they have unrestricted access to data. Administrators wishing to enable modules that include background worker process should exercise extreme caution. Only carefully audited modules should be permitted to run @@ -31,15 +31,15 @@ <para> Background workers can be initialized at the time that - <productname>PostgreSQL</> is started by including the module name in - <varname>shared_preload_libraries</>. A module wishing to run a background + <productname>PostgreSQL</productname> is started by including the module name in + <varname>shared_preload_libraries</varname>. A module wishing to run a background worker can register it by calling <function>RegisterBackgroundWorker(<type>BackgroundWorker *worker</type>)</function> - from its <function>_PG_init()</>. Background workers can also be started + from its <function>_PG_init()</function>. Background workers can also be started after the system is up and running by calling the function <function>RegisterDynamicBackgroundWorker(<type>BackgroundWorker *worker, BackgroundWorkerHandle **handle</type>)</function>. Unlike - <function>RegisterBackgroundWorker</>, which can only be called from within + <function>RegisterBackgroundWorker</function>, which can only be called from within the postmaster, <function>RegisterDynamicBackgroundWorker</function> must be called from a regular backend. </para> @@ -65,7 +65,7 @@ typedef struct BackgroundWorker </para> <para> - <structfield>bgw_name</> and <structfield>bgw_type</structfield> are + <structfield>bgw_name</structfield> and <structfield>bgw_type</structfield> are strings to be used in log messages, process listings and similar contexts. <structfield>bgw_type</structfield> should be the same for all background workers of the same type, so that it is possible to group such workers in a @@ -76,7 +76,7 @@ typedef struct BackgroundWorker </para> <para> - <structfield>bgw_flags</> is a bitwise-or'd bit mask indicating the + <structfield>bgw_flags</structfield> is a bitwise-or'd bit mask indicating the capabilities that the module wants. Possible values are: <variablelist> @@ -114,14 +114,14 @@ typedef struct BackgroundWorker <para> <structfield>bgw_start_time</structfield> is the server state during which - <command>postgres</> should start the process; it can be one of - <literal>BgWorkerStart_PostmasterStart</> (start as soon as - <command>postgres</> itself has finished its own initialization; processes + <command>postgres</command> should start the process; it can be one of + <literal>BgWorkerStart_PostmasterStart</literal> (start as soon as + <command>postgres</command> itself has finished its own initialization; processes requesting this are not eligible for database connections), - <literal>BgWorkerStart_ConsistentState</> (start as soon as a consistent state + <literal>BgWorkerStart_ConsistentState</literal> (start as soon as a consistent state has been reached in a hot standby, allowing processes to connect to databases and run read-only queries), and - <literal>BgWorkerStart_RecoveryFinished</> (start as soon as the system has + <literal>BgWorkerStart_RecoveryFinished</literal> (start as soon as the system has entered normal read-write state). Note the last two values are equivalent in a server that's not a hot standby. Note that this setting only indicates when the processes are to be started; they do not stop when a different state @@ -152,9 +152,9 @@ typedef struct BackgroundWorker </para> <para> - <structfield>bgw_main_arg</structfield> is the <type>Datum</> argument + <structfield>bgw_main_arg</structfield> is the <type>Datum</type> argument to the background worker main function. This main function should take a - single argument of type <type>Datum</> and return <type>void</>. + single argument of type <type>Datum</type> and return <type>void</type>. <structfield>bgw_main_arg</structfield> will be passed as the argument. In addition, the global variable <literal>MyBgworkerEntry</literal> points to a copy of the <structname>BackgroundWorker</structname> structure @@ -165,39 +165,39 @@ typedef struct BackgroundWorker <para> On Windows (and anywhere else where <literal>EXEC_BACKEND</literal> is defined) or in dynamic background workers it is not safe to pass a - <type>Datum</> by reference, only by value. If an argument is required, it + <type>Datum</type> by reference, only by value. If an argument is required, it is safest to pass an int32 or other small value and use that as an index - into an array allocated in shared memory. If a value like a <type>cstring</> + into an array allocated in shared memory. If a value like a <type>cstring</type> or <type>text</type> is passed then the pointer won't be valid from the new background worker process. </para> <para> <structfield>bgw_extra</structfield> can contain extra data to be passed - to the background worker. Unlike <structfield>bgw_main_arg</>, this data + to the background worker. Unlike <structfield>bgw_main_arg</structfield>, this data is not passed as an argument to the worker's main function, but it can be accessed via <literal>MyBgworkerEntry</literal>, as discussed above. </para> <para> <structfield>bgw_notify_pid</structfield> is the PID of a PostgreSQL - backend process to which the postmaster should send <literal>SIGUSR1</> + backend process to which the postmaster should send <literal>SIGUSR1</literal> when the process is started or exits. It should be 0 for workers registered at postmaster startup time, or when the backend registering the worker does not wish to wait for the worker to start up. Otherwise, it should be - initialized to <literal>MyProcPid</>. + initialized to <literal>MyProcPid</literal>. </para> <para>Once running, the process can connect to a database by calling <function>BackgroundWorkerInitializeConnection(<parameter>char *dbname</parameter>, <parameter>char *username</parameter>)</function> or <function>BackgroundWorkerInitializeConnectionByOid(<parameter>Oid dboid</parameter>, <parameter>Oid useroid</parameter>)</function>. This allows the process to run transactions and queries using the - <literal>SPI</literal> interface. If <varname>dbname</> is NULL or - <varname>dboid</> is <literal>InvalidOid</>, the session is not connected + <literal>SPI</literal> interface. If <varname>dbname</varname> is NULL or + <varname>dboid</varname> is <literal>InvalidOid</literal>, the session is not connected to any particular database, but shared catalogs can be accessed. - If <varname>username</> is NULL or <varname>useroid</> is - <literal>InvalidOid</>, the process will run as the superuser created - during <command>initdb</>. + If <varname>username</varname> is NULL or <varname>useroid</varname> is + <literal>InvalidOid</literal>, the process will run as the superuser created + during <command>initdb</command>. A background worker can only call one of these two functions, and only once. It is not possible to switch databases. </para> @@ -207,24 +207,24 @@ typedef struct BackgroundWorker background worker's main function, and must be unblocked by it; this is to allow the process to customize its signal handlers, if necessary. Signals can be unblocked in the new process by calling - <function>BackgroundWorkerUnblockSignals</> and blocked by calling - <function>BackgroundWorkerBlockSignals</>. + <function>BackgroundWorkerUnblockSignals</function> and blocked by calling + <function>BackgroundWorkerBlockSignals</function>. </para> <para> If <structfield>bgw_restart_time</structfield> for a background worker is - configured as <literal>BGW_NEVER_RESTART</>, or if it exits with an exit - code of 0 or is terminated by <function>TerminateBackgroundWorker</>, + configured as <literal>BGW_NEVER_RESTART</literal>, or if it exits with an exit + code of 0 or is terminated by <function>TerminateBackgroundWorker</function>, it will be automatically unregistered by the postmaster on exit. Otherwise, it will be restarted after the time period configured via - <structfield>bgw_restart_time</>, or immediately if the postmaster + <structfield>bgw_restart_time</structfield>, or immediately if the postmaster reinitializes the cluster due to a backend failure. Backends which need to suspend execution only temporarily should use an interruptible sleep rather than exiting; this can be achieved by calling <function>WaitLatch()</function>. Make sure the - <literal>WL_POSTMASTER_DEATH</> flag is set when calling that function, and + <literal>WL_POSTMASTER_DEATH</literal> flag is set when calling that function, and verify the return code for a prompt exit in the emergency case that - <command>postgres</> itself has terminated. + <command>postgres</command> itself has terminated. </para> <para> @@ -238,29 +238,29 @@ typedef struct BackgroundWorker opaque handle that can subsequently be passed to <function>GetBackgroundWorkerPid(<parameter>BackgroundWorkerHandle *</parameter>, <parameter>pid_t *</parameter>)</function> or <function>TerminateBackgroundWorker(<parameter>BackgroundWorkerHandle *</parameter>)</function>. - <function>GetBackgroundWorkerPid</> can be used to poll the status of the - worker: a return value of <literal>BGWH_NOT_YET_STARTED</> indicates that + <function>GetBackgroundWorkerPid</function> can be used to poll the status of the + worker: a return value of <literal>BGWH_NOT_YET_STARTED</literal> indicates that the worker has not yet been started by the postmaster; <literal>BGWH_STOPPED</literal> indicates that it has been started but is no longer running; and <literal>BGWH_STARTED</literal> indicates that it is currently running. In this last case, the PID will also be returned via the second argument. - <function>TerminateBackgroundWorker</> causes the postmaster to send - <literal>SIGTERM</> to the worker if it is running, and to unregister it + <function>TerminateBackgroundWorker</function> causes the postmaster to send + <literal>SIGTERM</literal> to the worker if it is running, and to unregister it as soon as it is not. </para> <para> In some cases, a process which registers a background worker may wish to wait for the worker to start up. This can be accomplished by initializing - <structfield>bgw_notify_pid</structfield> to <literal>MyProcPid</> and + <structfield>bgw_notify_pid</structfield> to <literal>MyProcPid</literal> and then passing the <type>BackgroundWorkerHandle *</type> obtained at registration time to <function>WaitForBackgroundWorkerStartup(<parameter>BackgroundWorkerHandle *handle</parameter>, <parameter>pid_t *</parameter>)</function> function. This function will block until the postmaster has attempted to start the background worker, or until the postmaster dies. If the background runner - is running, the return value will <literal>BGWH_STARTED</>, and + is running, the return value will <literal>BGWH_STARTED</literal>, and the PID will be written to the provided address. Otherwise, the return value will be <literal>BGWH_STOPPED</literal> or <literal>BGWH_POSTMASTER_DIED</literal>. @@ -279,7 +279,7 @@ typedef struct BackgroundWorker </para> <para> - The <filename>src/test/modules/worker_spi</> module + The <filename>src/test/modules/worker_spi</filename> module contains a working example, which demonstrates some useful techniques. </para> diff --git a/doc/src/sgml/biblio.sgml b/doc/src/sgml/biblio.sgml index 5462bc38e44..d7547e6e921 100644 --- a/doc/src/sgml/biblio.sgml +++ b/doc/src/sgml/biblio.sgml @@ -171,7 +171,7 @@ ssimkovi@ag.or.at <abstract> <para> Discusses SQL history and syntax, and describes the addition of - <literal>INTERSECT</> and <literal>EXCEPT</> constructs into + <literal>INTERSECT</literal> and <literal>EXCEPT</literal> constructs into <productname>PostgreSQL</productname>. Prepared as a Master's Thesis with the support of O. Univ. Prof. Dr. Georg Gottlob and Univ. Ass. Mag. Katrin Seyr at Vienna University of Technology. diff --git a/doc/src/sgml/bki.sgml b/doc/src/sgml/bki.sgml index af6d8d1d2a9..33378b46eaa 100644 --- a/doc/src/sgml/bki.sgml +++ b/doc/src/sgml/bki.sgml @@ -21,7 +21,7 @@ input file used by <application>initdb</application> is created as part of building and installing <productname>PostgreSQL</productname> by a program named <filename>genbki.pl</filename>, which reads some - specially formatted C header files in the <filename>src/include/catalog/</> + specially formatted C header files in the <filename>src/include/catalog/</filename> directory of the source tree. The created <acronym>BKI</acronym> file is called <filename>postgres.bki</filename> and is normally installed in the @@ -67,13 +67,13 @@ <variablelist> <varlistentry> <term> - <literal>create</> + <literal>create</literal> <replaceable class="parameter">tablename</replaceable> <replaceable class="parameter">tableoid</replaceable> - <optional><literal>bootstrap</></optional> - <optional><literal>shared_relation</></optional> - <optional><literal>without_oids</></optional> - <optional><literal>rowtype_oid</> <replaceable>oid</></optional> + <optional><literal>bootstrap</literal></optional> + <optional><literal>shared_relation</literal></optional> + <optional><literal>without_oids</literal></optional> + <optional><literal>rowtype_oid</literal> <replaceable>oid</replaceable></optional> (<replaceable class="parameter">name1</replaceable> = <replaceable class="parameter">type1</replaceable> <optional>FORCE NOT NULL | FORCE NULL </optional> <optional>, @@ -93,7 +93,7 @@ <para> The following column types are supported directly by - <filename>bootstrap.c</>: <type>bool</type>, + <filename>bootstrap.c</filename>: <type>bool</type>, <type>bytea</type>, <type>char</type> (1 byte), <type>name</type>, <type>int2</type>, <type>int4</type>, <type>regproc</type>, <type>regclass</type>, @@ -104,31 +104,31 @@ <type>_oid</type> (array), <type>_char</type> (array), <type>_aclitem</type> (array). Although it is possible to create tables containing columns of other types, this cannot be done until - after <structname>pg_type</> has been created and filled with + after <structname>pg_type</structname> has been created and filled with appropriate entries. (That effectively means that only these column types can be used in bootstrapped tables, but non-bootstrap catalogs can contain any built-in type.) </para> <para> - When <literal>bootstrap</> is specified, + When <literal>bootstrap</literal> is specified, the table will only be created on disk; nothing is entered into <structname>pg_class</structname>, <structname>pg_attribute</structname>, etc, for it. Thus the table will not be accessible by ordinary SQL operations until - such entries are made the hard way (with <literal>insert</> + such entries are made the hard way (with <literal>insert</literal> commands). This option is used for creating <structname>pg_class</structname> etc themselves. </para> <para> - The table is created as shared if <literal>shared_relation</> is + The table is created as shared if <literal>shared_relation</literal> is specified. - It will have OIDs unless <literal>without_oids</> is specified. - The table's row type OID (<structname>pg_type</> OID) can optionally - be specified via the <literal>rowtype_oid</> clause; if not specified, - an OID is automatically generated for it. (The <literal>rowtype_oid</> - clause is useless if <literal>bootstrap</> is specified, but it can be + It will have OIDs unless <literal>without_oids</literal> is specified. + The table's row type OID (<structname>pg_type</structname> OID) can optionally + be specified via the <literal>rowtype_oid</literal> clause; if not specified, + an OID is automatically generated for it. (The <literal>rowtype_oid</literal> + clause is useless if <literal>bootstrap</literal> is specified, but it can be provided anyway for documentation.) </para> </listitem> @@ -136,7 +136,7 @@ <varlistentry> <term> - <literal>open</> <replaceable class="parameter">tablename</replaceable> + <literal>open</literal> <replaceable class="parameter">tablename</replaceable> </term> <listitem> @@ -150,7 +150,7 @@ <varlistentry> <term> - <literal>close</> <optional><replaceable class="parameter">tablename</replaceable></optional> + <literal>close</literal> <optional><replaceable class="parameter">tablename</replaceable></optional> </term> <listitem> @@ -163,7 +163,7 @@ <varlistentry> <term> - <literal>insert</> <optional><literal>OID =</> <replaceable class="parameter">oid_value</replaceable></optional> <literal>(</> <replaceable class="parameter">value1</replaceable> <replaceable class="parameter">value2</replaceable> ... <literal>)</> + <literal>insert</literal> <optional><literal>OID =</literal> <replaceable class="parameter">oid_value</replaceable></optional> <literal>(</literal> <replaceable class="parameter">value1</replaceable> <replaceable class="parameter">value2</replaceable> ... <literal>)</literal> </term> <listitem> @@ -188,14 +188,14 @@ <varlistentry> <term> - <literal>declare</> <optional><literal>unique</></optional> - <literal>index</> <replaceable class="parameter">indexname</replaceable> + <literal>declare</literal> <optional><literal>unique</literal></optional> + <literal>index</literal> <replaceable class="parameter">indexname</replaceable> <replaceable class="parameter">indexoid</replaceable> - <literal>on</> <replaceable class="parameter">tablename</replaceable> - <literal>using</> <replaceable class="parameter">amname</replaceable> - <literal>(</> <replaceable class="parameter">opclass1</replaceable> + <literal>on</literal> <replaceable class="parameter">tablename</replaceable> + <literal>using</literal> <replaceable class="parameter">amname</replaceable> + <literal>(</literal> <replaceable class="parameter">opclass1</replaceable> <replaceable class="parameter">name1</replaceable> - <optional>, ...</optional> <literal>)</> + <optional>, ...</optional> <literal>)</literal> </term> <listitem> @@ -220,10 +220,10 @@ <varlistentry> <term> - <literal>declare toast</> + <literal>declare toast</literal> <replaceable class="parameter">toasttableoid</replaceable> <replaceable class="parameter">toastindexoid</replaceable> - <literal>on</> <replaceable class="parameter">tablename</replaceable> + <literal>on</literal> <replaceable class="parameter">tablename</replaceable> </term> <listitem> @@ -234,14 +234,14 @@ <replaceable class="parameter">toasttableoid</replaceable> and its index is assigned OID <replaceable class="parameter">toastindexoid</replaceable>. - As with <literal>declare index</>, filling of the index + As with <literal>declare index</literal>, filling of the index is postponed. </para> </listitem> </varlistentry> <varlistentry> - <term><literal>build indices</></term> + <term><literal>build indices</literal></term> <listitem> <para> @@ -257,17 +257,17 @@ <title>Structure of the Bootstrap <acronym>BKI</acronym> File</title> <para> - The <literal>open</> command cannot be used until the tables it uses + The <literal>open</literal> command cannot be used until the tables it uses exist and have entries for the table that is to be opened. - (These minimum tables are <structname>pg_class</>, - <structname>pg_attribute</>, <structname>pg_proc</>, and - <structname>pg_type</>.) To allow those tables themselves to be filled, - <literal>create</> with the <literal>bootstrap</> option implicitly opens + (These minimum tables are <structname>pg_class</structname>, + <structname>pg_attribute</structname>, <structname>pg_proc</structname>, and + <structname>pg_type</structname>.) To allow those tables themselves to be filled, + <literal>create</literal> with the <literal>bootstrap</literal> option implicitly opens the created table for data insertion. </para> <para> - Also, the <literal>declare index</> and <literal>declare toast</> + Also, the <literal>declare index</literal> and <literal>declare toast</literal> commands cannot be used until the system catalogs they need have been created and filled in. </para> @@ -278,17 +278,17 @@ <orderedlist> <listitem> <para> - <literal>create bootstrap</> one of the critical tables + <literal>create bootstrap</literal> one of the critical tables </para> </listitem> <listitem> <para> - <literal>insert</> data describing at least the critical tables + <literal>insert</literal> data describing at least the critical tables </para> </listitem> <listitem> <para> - <literal>close</> + <literal>close</literal> </para> </listitem> <listitem> @@ -298,22 +298,22 @@ </listitem> <listitem> <para> - <literal>create</> (without <literal>bootstrap</>) a noncritical table + <literal>create</literal> (without <literal>bootstrap</literal>) a noncritical table </para> </listitem> <listitem> <para> - <literal>open</> + <literal>open</literal> </para> </listitem> <listitem> <para> - <literal>insert</> desired data + <literal>insert</literal> desired data </para> </listitem> <listitem> <para> - <literal>close</> + <literal>close</literal> </para> </listitem> <listitem> @@ -328,7 +328,7 @@ </listitem> <listitem> <para> - <literal>build indices</> + <literal>build indices</literal> </para> </listitem> </orderedlist> diff --git a/doc/src/sgml/bloom.sgml b/doc/src/sgml/bloom.sgml index 396348c5237..e13ebf80fdf 100644 --- a/doc/src/sgml/bloom.sgml +++ b/doc/src/sgml/bloom.sgml @@ -8,7 +8,7 @@ </indexterm> <para> - <literal>bloom</> provides an index access method based on + <literal>bloom</literal> provides an index access method based on <ulink url="http://en.wikipedia.org/wiki/Bloom_filter">Bloom filters</ulink>. </para> @@ -42,29 +42,29 @@ <title>Parameters</title> <para> - A <literal>bloom</> index accepts the following parameters in its - <literal>WITH</> clause: + A <literal>bloom</literal> index accepts the following parameters in its + <literal>WITH</literal> clause: </para> <variablelist> <varlistentry> - <term><literal>length</></term> + <term><literal>length</literal></term> <listitem> <para> Length of each signature (index entry) in bits. The default - is <literal>80</> bits and maximum is <literal>4096</>. + is <literal>80</literal> bits and maximum is <literal>4096</literal>. </para> </listitem> </varlistentry> </variablelist> <variablelist> <varlistentry> - <term><literal>col1 — col32</></term> + <term><literal>col1 — col32</literal></term> <listitem> <para> Number of bits generated for each index column. Each parameter's name refers to the number of the index column that it controls. The default - is <literal>2</> bits and maximum is <literal>4095</>. Parameters for + is <literal>2</literal> bits and maximum is <literal>4095</literal>. Parameters for index columns not actually used are ignored. </para> </listitem> @@ -87,8 +87,8 @@ CREATE INDEX bloomidx ON tbloom USING bloom (i1,i2,i3) <para> The index is created with a signature length of 80 bits, with attributes i1 and i2 mapped to 2 bits, and attribute i3 mapped to 4 bits. We could - have omitted the <literal>length</>, <literal>col1</>, - and <literal>col2</> specifications since those have the default values. + have omitted the <literal>length</literal>, <literal>col1</literal>, + and <literal>col2</literal> specifications since those have the default values. </para> <para> @@ -175,7 +175,7 @@ CREATE INDEX Note the relatively large number of false positives: 2439 rows were selected to be visited in the heap, but none actually matched the query. We could reduce that by specifying a larger signature length. - In this example, creating the index with <literal>length=200</> + In this example, creating the index with <literal>length=200</literal> reduced the number of false positives to 55; but it doubled the index size (to 306 MB) and ended up being slower for this query (125 ms overall). </para> @@ -213,7 +213,7 @@ CREATE INDEX <para> An operator class for bloom indexes requires only a hash function for the indexed data type and an equality operator for searching. This example - shows the operator class definition for the <type>text</> data type: + shows the operator class definition for the <type>text</type> data type: </para> <programlisting> @@ -230,7 +230,7 @@ DEFAULT FOR TYPE text USING bloom AS <itemizedlist> <listitem> <para> - Only operator classes for <type>int4</> and <type>text</> are + Only operator classes for <type>int4</type> and <type>text</type> are included with the module. </para> </listitem> diff --git a/doc/src/sgml/brin.sgml b/doc/src/sgml/brin.sgml index 8dcc29925bc..91c01700ed5 100644 --- a/doc/src/sgml/brin.sgml +++ b/doc/src/sgml/brin.sgml @@ -16,7 +16,7 @@ <acronym>BRIN</acronym> is designed for handling very large tables in which certain columns have some natural correlation with their physical location within the table. - A <firstterm>block range</> is a group of pages that are physically + A <firstterm>block range</firstterm> is a group of pages that are physically adjacent in the table; for each block range, some summary info is stored by the index. For example, a table storing a store's sale orders might have @@ -29,7 +29,7 @@ <para> <acronym>BRIN</acronym> indexes can satisfy queries via regular bitmap index scans, and will return all tuples in all pages within each range if - the summary info stored by the index is <firstterm>consistent</> with the + the summary info stored by the index is <firstterm>consistent</firstterm> with the query conditions. The query executor is in charge of rechecking these tuples and discarding those that do not match the query conditions — in other words, these @@ -51,9 +51,9 @@ <para> The size of the block range is determined at index creation time by - the <literal>pages_per_range</> storage parameter. The number of index + the <literal>pages_per_range</literal> storage parameter. The number of index entries will be equal to the size of the relation in pages divided by - the selected value for <literal>pages_per_range</>. Therefore, the smaller + the selected value for <literal>pages_per_range</literal>. Therefore, the smaller the number, the larger the index becomes (because of the need to store more index entries), but at the same time the summary data stored can be more precise and more data blocks can be skipped during an index scan. @@ -99,9 +99,9 @@ </para> <para> - The <firstterm>minmax</> + The <firstterm>minmax</firstterm> operator classes store the minimum and the maximum values appearing - in the indexed column within the range. The <firstterm>inclusion</> + in the indexed column within the range. The <firstterm>inclusion</firstterm> operator classes store a value which includes the values in the indexed column within the range. </para> @@ -162,21 +162,21 @@ </entry> </row> <row> - <entry><literal>box_inclusion_ops</></entry> + <entry><literal>box_inclusion_ops</literal></entry> <entry><type>box</type></entry> <entry> - <literal><<</> - <literal>&<</> - <literal>&&</> - <literal>&></> - <literal>>></> - <literal>~=</> - <literal>@></> - <literal><@</> - <literal>&<|</> - <literal><<|</> + <literal><<</literal> + <literal>&<</literal> + <literal>&&</literal> + <literal>&></literal> + <literal>>></literal> + <literal>~=</literal> + <literal>@></literal> + <literal><@</literal> + <literal>&<|</literal> + <literal><<|</literal> <literal>|>></literal> - <literal>|&></> + <literal>|&></literal> </entry> </row> <row> @@ -249,11 +249,11 @@ <entry><literal>network_inclusion_ops</literal></entry> <entry><type>inet</type></entry> <entry> - <literal>&&</> - <literal>>>=</> + <literal>&&</literal> + <literal>>>=</literal> <literal><<=</literal> <literal>=</literal> - <literal>>></> + <literal>>></literal> <literal><<</literal> </entry> </row> @@ -346,18 +346,18 @@ </entry> </row> <row> - <entry><literal>range_inclusion_ops</></entry> + <entry><literal>range_inclusion_ops</literal></entry> <entry><type>any range type</type></entry> <entry> - <literal><<</> - <literal>&<</> - <literal>&&</> - <literal>&></> - <literal>>></> - <literal>@></> - <literal><@</> - <literal>-|-</> - <literal>=</> + <literal><<</literal> + <literal>&<</literal> + <literal>&&</literal> + <literal>&></literal> + <literal>>></literal> + <literal>@></literal> + <literal><@</literal> + <literal>-|-</literal> + <literal>=</literal> <literal><</literal> <literal><=</literal> <literal>=</literal> @@ -505,11 +505,11 @@ <variablelist> <varlistentry> - <term><function>BrinOpcInfo *opcInfo(Oid type_oid)</></term> + <term><function>BrinOpcInfo *opcInfo(Oid type_oid)</function></term> <listitem> <para> Returns internal information about the indexed columns' summary data. - The return value must point to a palloc'd <structname>BrinOpcInfo</>, + The return value must point to a palloc'd <structname>BrinOpcInfo</structname>, which has this definition: <programlisting> typedef struct BrinOpcInfo @@ -524,7 +524,7 @@ typedef struct BrinOpcInfo TypeCacheEntry *oi_typcache[FLEXIBLE_ARRAY_MEMBER]; } BrinOpcInfo; </programlisting> - <structname>BrinOpcInfo</>.<structfield>oi_opaque</> can be used by the + <structname>BrinOpcInfo</structname>.<structfield>oi_opaque</structfield> can be used by the operator class routines to pass information between support procedures during an index scan. </para> @@ -797,8 +797,8 @@ typedef struct BrinOpcInfo It should accept two arguments with the same data type as the operator class, and return the union of them. The inclusion operator class can store union values with different data types if it is defined with the - <literal>STORAGE</> parameter. The return value of the union - function should match the <literal>STORAGE</> data type. + <literal>STORAGE</literal> parameter. The return value of the union + function should match the <literal>STORAGE</literal> data type. </para> <para> @@ -823,11 +823,11 @@ typedef struct BrinOpcInfo on another operator strategy as shown in <xref linkend="brin-extensibility-inclusion-table">, or the same operator strategy as themselves. They require the dependency - operator to be defined with the <literal>STORAGE</> data type as the + operator to be defined with the <literal>STORAGE</literal> data type as the left-hand-side argument and the other supported data type to be the right-hand-side argument of the supported operator. See - <literal>float4_minmax_ops</> as an example of minmax, and - <literal>box_inclusion_ops</> as an example of inclusion. + <literal>float4_minmax_ops</literal> as an example of minmax, and + <literal>box_inclusion_ops</literal> as an example of inclusion. </para> </sect1> </chapter> diff --git a/doc/src/sgml/btree-gin.sgml b/doc/src/sgml/btree-gin.sgml index 375e7ec4be6..e491fa76e7d 100644 --- a/doc/src/sgml/btree-gin.sgml +++ b/doc/src/sgml/btree-gin.sgml @@ -8,16 +8,16 @@ </indexterm> <para> - <filename>btree_gin</> provides sample GIN operator classes that + <filename>btree_gin</filename> provides sample GIN operator classes that implement B-tree equivalent behavior for the data types - <type>int2</>, <type>int4</>, <type>int8</>, <type>float4</>, - <type>float8</>, <type>timestamp with time zone</>, - <type>timestamp without time zone</>, <type>time with time zone</>, - <type>time without time zone</>, <type>date</>, <type>interval</>, - <type>oid</>, <type>money</>, <type>"char"</>, - <type>varchar</>, <type>text</>, <type>bytea</>, <type>bit</>, - <type>varbit</>, <type>macaddr</>, <type>macaddr8</>, <type>inet</>, - <type>cidr</>, and all <type>enum</> types. + <type>int2</type>, <type>int4</type>, <type>int8</type>, <type>float4</type>, + <type>float8</type>, <type>timestamp with time zone</type>, + <type>timestamp without time zone</type>, <type>time with time zone</type>, + <type>time without time zone</type>, <type>date</type>, <type>interval</type>, + <type>oid</type>, <type>money</type>, <type>"char"</type>, + <type>varchar</type>, <type>text</type>, <type>bytea</type>, <type>bit</type>, + <type>varbit</type>, <type>macaddr</type>, <type>macaddr8</type>, <type>inet</type>, + <type>cidr</type>, and all <type>enum</type> types. </para> <para> diff --git a/doc/src/sgml/btree-gist.sgml b/doc/src/sgml/btree-gist.sgml index f3c639c2f3b..dcb939f1fbf 100644 --- a/doc/src/sgml/btree-gist.sgml +++ b/doc/src/sgml/btree-gist.sgml @@ -8,16 +8,16 @@ </indexterm> <para> - <filename>btree_gist</> provides GiST index operator classes that + <filename>btree_gist</filename> provides GiST index operator classes that implement B-tree equivalent behavior for the data types - <type>int2</>, <type>int4</>, <type>int8</>, <type>float4</>, - <type>float8</>, <type>numeric</>, <type>timestamp with time zone</>, - <type>timestamp without time zone</>, <type>time with time zone</>, - <type>time without time zone</>, <type>date</>, <type>interval</>, - <type>oid</>, <type>money</>, <type>char</>, - <type>varchar</>, <type>text</>, <type>bytea</>, <type>bit</>, - <type>varbit</>, <type>macaddr</>, <type>macaddr8</>, <type>inet</>, - <type>cidr</>, <type>uuid</>, and all <type>enum</> types. + <type>int2</type>, <type>int4</type>, <type>int8</type>, <type>float4</type>, + <type>float8</type>, <type>numeric</type>, <type>timestamp with time zone</type>, + <type>timestamp without time zone</type>, <type>time with time zone</type>, + <type>time without time zone</type>, <type>date</type>, <type>interval</type>, + <type>oid</type>, <type>money</type>, <type>char</type>, + <type>varchar</type>, <type>text</type>, <type>bytea</type>, <type>bit</type>, + <type>varbit</type>, <type>macaddr</type>, <type>macaddr8</type>, <type>inet</type>, + <type>cidr</type>, <type>uuid</type>, and all <type>enum</type> types. </para> <para> @@ -33,7 +33,7 @@ </para> <para> - In addition to the typical B-tree search operators, <filename>btree_gist</> + In addition to the typical B-tree search operators, <filename>btree_gist</filename> also provides index support for <literal><></literal> (<quote>not equals</quote>). This may be useful in combination with an <link linkend="SQL-CREATETABLE-EXCLUDE">exclusion constraint</link>, @@ -42,14 +42,14 @@ <para> Also, for data types for which there is a natural distance metric, - <filename>btree_gist</> defines a distance operator <literal><-></>, + <filename>btree_gist</filename> defines a distance operator <literal><-></literal>, and provides GiST index support for nearest-neighbor searches using this operator. Distance operators are provided for - <type>int2</>, <type>int4</>, <type>int8</>, <type>float4</>, - <type>float8</>, <type>timestamp with time zone</>, - <type>timestamp without time zone</>, - <type>time without time zone</>, <type>date</>, <type>interval</>, - <type>oid</>, and <type>money</>. + <type>int2</type>, <type>int4</type>, <type>int8</type>, <type>float4</type>, + <type>float8</type>, <type>timestamp with time zone</type>, + <type>timestamp without time zone</type>, + <type>time without time zone</type>, <type>date</type>, <type>interval</type>, + <type>oid</type>, and <type>money</type>. </para> <sect2> diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml index cfec2465d26..ef60a58631a 100644 --- a/doc/src/sgml/catalogs.sgml +++ b/doc/src/sgml/catalogs.sgml @@ -387,7 +387,7 @@ </para> <table> - <title><structname>pg_aggregate</> Columns</title> + <title><structname>pg_aggregate</structname> Columns</title> <tgroup cols="4"> <thead> @@ -410,9 +410,9 @@ <entry><type>char</type></entry> <entry></entry> <entry>Aggregate kind: - <literal>n</literal> for <quote>normal</> aggregates, - <literal>o</literal> for <quote>ordered-set</> aggregates, or - <literal>h</literal> for <quote>hypothetical-set</> aggregates + <literal>n</literal> for <quote>normal</quote> aggregates, + <literal>o</literal> for <quote>ordered-set</quote> aggregates, or + <literal>h</literal> for <quote>hypothetical-set</quote> aggregates </entry> </row> <row> @@ -421,7 +421,7 @@ <entry></entry> <entry>Number of direct (non-aggregated) arguments of an ordered-set or hypothetical-set aggregate, counting a variadic array as one argument. - If equal to <structfield>pronargs</>, the aggregate must be variadic + If equal to <structfield>pronargs</structfield>, the aggregate must be variadic and the variadic array describes the aggregated arguments as well as the final direct arguments. Always zero for normal aggregates.</entry> @@ -592,7 +592,7 @@ </para> <table> - <title><structname>pg_am</> Columns</title> + <title><structname>pg_am</structname> Columns</title> <tgroup cols="4"> <thead> @@ -644,7 +644,7 @@ <note> <para> - Before <productname>PostgreSQL</> 9.6, <structname>pg_am</structname> + Before <productname>PostgreSQL</productname> 9.6, <structname>pg_am</structname> contained many additional columns representing properties of index access methods. That data is now only directly visible at the C code level. However, <function>pg_index_column_has_property()</function> and related @@ -667,8 +667,8 @@ The catalog <structname>pg_amop</structname> stores information about operators associated with access method operator families. There is one row for each operator that is a member of an operator family. A family - member can be either a <firstterm>search</> operator or an - <firstterm>ordering</> operator. An operator + member can be either a <firstterm>search</firstterm> operator or an + <firstterm>ordering</firstterm> operator. An operator can appear in more than one family, but cannot appear in more than one search position nor more than one ordering position within a family. (It is allowed, though unlikely, for an operator to be used for both @@ -676,7 +676,7 @@ </para> <table> - <title><structname>pg_amop</> Columns</title> + <title><structname>pg_amop</structname> Columns</title> <tgroup cols="4"> <thead> @@ -728,8 +728,8 @@ <entry><structfield>amoppurpose</structfield></entry> <entry><type>char</type></entry> <entry></entry> - <entry>Operator purpose, either <literal>s</> for search or - <literal>o</> for ordering</entry> + <entry>Operator purpose, either <literal>s</literal> for search or + <literal>o</literal> for ordering</entry> </row> <row> @@ -759,26 +759,26 @@ </table> <para> - A <quote>search</> operator entry indicates that an index of this operator + A <quote>search</quote> operator entry indicates that an index of this operator family can be searched to find all rows satisfying - <literal>WHERE</> - <replaceable>indexed_column</> - <replaceable>operator</> - <replaceable>constant</>. + <literal>WHERE</literal> + <replaceable>indexed_column</replaceable> + <replaceable>operator</replaceable> + <replaceable>constant</replaceable>. Obviously, such an operator must return <type>boolean</type>, and its left-hand input type must match the index's column data type. </para> <para> - An <quote>ordering</> operator entry indicates that an index of this + An <quote>ordering</quote> operator entry indicates that an index of this operator family can be scanned to return rows in the order represented by - <literal>ORDER BY</> - <replaceable>indexed_column</> - <replaceable>operator</> - <replaceable>constant</>. + <literal>ORDER BY</literal> + <replaceable>indexed_column</replaceable> + <replaceable>operator</replaceable> + <replaceable>constant</replaceable>. Such an operator could return any sortable data type, though again its left-hand input type must match the index's column data type. - The exact semantics of the <literal>ORDER BY</> are specified by the + The exact semantics of the <literal>ORDER BY</literal> are specified by the <structfield>amopsortfamily</structfield> column, which must reference a B-tree operator family for the operator's result type. </para> @@ -787,19 +787,19 @@ <para> At present, it's assumed that the sort order for an ordering operator is the default for the referenced operator family, i.e., <literal>ASC NULLS - LAST</>. This might someday be relaxed by adding additional columns + LAST</literal>. This might someday be relaxed by adding additional columns to specify sort options explicitly. </para> </note> <para> - An entry's <structfield>amopmethod</> must match the - <structname>opfmethod</> of its containing operator family (including - <structfield>amopmethod</> here is an intentional denormalization of the + An entry's <structfield>amopmethod</structfield> must match the + <structname>opfmethod</structname> of its containing operator family (including + <structfield>amopmethod</structfield> here is an intentional denormalization of the catalog structure for performance reasons). Also, - <structfield>amoplefttype</> and <structfield>amoprighttype</> must match - the <structfield>oprleft</> and <structfield>oprright</> fields of the - referenced <structname>pg_operator</> entry. + <structfield>amoplefttype</structfield> and <structfield>amoprighttype</structfield> must match + the <structfield>oprleft</structfield> and <structfield>oprright</structfield> fields of the + referenced <structname>pg_operator</structname> entry. </para> </sect1> @@ -880,14 +880,14 @@ <para> The usual interpretation of the - <structfield>amproclefttype</> and <structfield>amprocrighttype</> fields + <structfield>amproclefttype</structfield> and <structfield>amprocrighttype</structfield> fields is that they identify the left and right input types of the operator(s) that a particular support procedure supports. For some access methods these match the input data type(s) of the support procedure itself, for - others not. There is a notion of <quote>default</> support procedures for - an index, which are those with <structfield>amproclefttype</> and - <structfield>amprocrighttype</> both equal to the index operator class's - <structfield>opcintype</>. + others not. There is a notion of <quote>default</quote> support procedures for + an index, which are those with <structfield>amproclefttype</structfield> and + <structfield>amprocrighttype</structfield> both equal to the index operator class's + <structfield>opcintype</structfield>. </para> </sect1> @@ -909,7 +909,7 @@ </para> <table> - <title><structname>pg_attrdef</> Columns</title> + <title><structname>pg_attrdef</structname> Columns</title> <tgroup cols="4"> <thead> @@ -964,7 +964,7 @@ The <structfield>adsrc</structfield> field is historical, and is best not used, because it does not track outside changes that might affect the representation of the default value. Reverse-compiling the - <structfield>adbin</structfield> field (with <function>pg_get_expr</> for + <structfield>adbin</structfield> field (with <function>pg_get_expr</function> for example) is a better way to display the default value. </para> @@ -993,7 +993,7 @@ </para> <table> - <title><structname>pg_attribute</> Columns</title> + <title><structname>pg_attribute</structname> Columns</title> <tgroup cols="4"> <thead> @@ -1072,7 +1072,7 @@ <entry> Number of dimensions, if the column is an array type; otherwise 0. (Presently, the number of dimensions of an array is not enforced, - so any nonzero value effectively means <quote>it's an array</>.) + so any nonzero value effectively means <quote>it's an array</quote>.) </entry> </row> @@ -1096,7 +1096,7 @@ supplied at table creation time (for example, the maximum length of a <type>varchar</type> column). It is passed to type-specific input functions and length coercion functions. - The value will generally be -1 for types that do not need <structfield>atttypmod</>. + The value will generally be -1 for types that do not need <structfield>atttypmod</structfield>. </entry> </row> @@ -1105,7 +1105,7 @@ <entry><type>bool</type></entry> <entry></entry> <entry> - A copy of <literal>pg_type.typbyval</> of this column's type + A copy of <literal>pg_type.typbyval</literal> of this column's type </entry> </row> @@ -1114,7 +1114,7 @@ <entry><type>char</type></entry> <entry></entry> <entry> - Normally a copy of <literal>pg_type.typstorage</> of this + Normally a copy of <literal>pg_type.typstorage</literal> of this column's type. For TOAST-able data types, this can be altered after column creation to control storage policy. </entry> @@ -1125,7 +1125,7 @@ <entry><type>char</type></entry> <entry></entry> <entry> - A copy of <literal>pg_type.typalign</> of this column's type + A copy of <literal>pg_type.typalign</literal> of this column's type </entry> </row> @@ -1216,7 +1216,7 @@ <entry><type>text[]</type></entry> <entry></entry> <entry> - Attribute-level options, as <quote>keyword=value</> strings + Attribute-level options, as <quote>keyword=value</quote> strings </entry> </row> @@ -1225,7 +1225,7 @@ <entry><type>text[]</type></entry> <entry></entry> <entry> - Attribute-level foreign data wrapper options, as <quote>keyword=value</> strings + Attribute-level foreign data wrapper options, as <quote>keyword=value</quote> strings </entry> </row> @@ -1237,9 +1237,9 @@ In a dropped column's <structname>pg_attribute</structname> entry, <structfield>atttypid</structfield> is reset to zero, but <structfield>attlen</structfield> and the other fields copied from - <structname>pg_type</> are still valid. This arrangement is needed + <structname>pg_type</structname> are still valid. This arrangement is needed to cope with the situation where the dropped column's data type was - later dropped, and so there is no <structname>pg_type</> row anymore. + later dropped, and so there is no <structname>pg_type</structname> row anymore. <structfield>attlen</structfield> and the other fields can be used to interpret the contents of a row of the table. </para> @@ -1256,9 +1256,9 @@ <para> The catalog <structname>pg_authid</structname> contains information about database authorization identifiers (roles). A role subsumes the concepts - of <quote>users</> and <quote>groups</>. A user is essentially just a - role with the <structfield>rolcanlogin</> flag set. Any role (with or - without <structfield>rolcanlogin</>) can have other roles as members; see + of <quote>users</quote> and <quote>groups</quote>. A user is essentially just a + role with the <structfield>rolcanlogin</structfield> flag set. Any role (with or + without <structfield>rolcanlogin</structfield>) can have other roles as members; see <link linkend="catalog-pg-auth-members"><structname>pg_auth_members</structname></link>. </para> @@ -1283,7 +1283,7 @@ </para> <table> - <title><structname>pg_authid</> Columns</title> + <title><structname>pg_authid</structname> Columns</title> <tgroup cols="3"> <thead> @@ -1390,20 +1390,20 @@ <para> For an MD5 encrypted password, <structfield>rolpassword</structfield> - column will begin with the string <literal>md5</> followed by a + column will begin with the string <literal>md5</literal> followed by a 32-character hexadecimal MD5 hash. The MD5 hash will be of the user's password concatenated to their user name. For example, if user - <literal>joe</> has password <literal>xyzzy</>, <productname>PostgreSQL</> - will store the md5 hash of <literal>xyzzyjoe</>. + <literal>joe</literal> has password <literal>xyzzy</literal>, <productname>PostgreSQL</productname> + will store the md5 hash of <literal>xyzzyjoe</literal>. </para> <para> If the password is encrypted with SCRAM-SHA-256, it has the format: <synopsis> -SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt></>$<replaceable><StoredKey></>:<replaceable><ServerKey></> +SCRAM-SHA-256$<replaceable><iteration count></replaceable>:<replaceable><salt></replaceable>$<replaceable><StoredKey></replaceable>:<replaceable><ServerKey></replaceable> </synopsis> - where <replaceable>salt</>, <replaceable>StoredKey</> and - <replaceable>ServerKey</> are in Base64 encoded format. This format is + where <replaceable>salt</replaceable>, <replaceable>StoredKey</replaceable> and + <replaceable>ServerKey</replaceable> are in Base64 encoded format. This format is the same as that specified by RFC 5803. </para> @@ -1435,7 +1435,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </para> <table> - <title><structname>pg_auth_members</> Columns</title> + <title><structname>pg_auth_members</structname> Columns</title> <tgroup cols="4"> <thead> @@ -1459,7 +1459,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><structfield>member</structfield></entry> <entry><type>oid</type></entry> <entry><literal><link linkend="catalog-pg-authid"><structname>pg_authid</structname></link>.oid</literal></entry> - <entry>ID of a role that is a member of <structfield>roleid</></entry> + <entry>ID of a role that is a member of <structfield>roleid</structfield></entry> </row> <row> @@ -1473,8 +1473,8 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><structfield>admin_option</structfield></entry> <entry><type>bool</type></entry> <entry></entry> - <entry>True if <structfield>member</> can grant membership in - <structfield>roleid</> to others</entry> + <entry>True if <structfield>member</structfield> can grant membership in + <structfield>roleid</structfield> to others</entry> </row> </tbody> </tgroup> @@ -1501,14 +1501,14 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< cannot be deduced from some generic rule. For example, casting between a domain and its base type is not explicitly represented in <structname>pg_cast</structname>. Another important exception is that - <quote>automatic I/O conversion casts</>, those performed using a data - type's own I/O functions to convert to or from <type>text</> or other + <quote>automatic I/O conversion casts</quote>, those performed using a data + type's own I/O functions to convert to or from <type>text</type> or other string types, are not explicitly represented in <structname>pg_cast</structname>. </para> <table> - <title><structname>pg_cast</> Columns</title> + <title><structname>pg_cast</structname> Columns</title> <tgroup cols="4"> <thead> @@ -1558,11 +1558,11 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry></entry> <entry> Indicates what contexts the cast can be invoked in. - <literal>e</> means only as an explicit cast (using - <literal>CAST</> or <literal>::</> syntax). - <literal>a</> means implicitly in assignment + <literal>e</literal> means only as an explicit cast (using + <literal>CAST</literal> or <literal>::</literal> syntax). + <literal>a</literal> means implicitly in assignment to a target column, as well as explicitly. - <literal>i</> means implicitly in expressions, as well as the + <literal>i</literal> means implicitly in expressions, as well as the other cases. </entry> </row> @@ -1572,9 +1572,9 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry></entry> <entry> Indicates how the cast is performed. - <literal>f</> means that the function specified in the <structfield>castfunc</> field is used. - <literal>i</> means that the input/output functions are used. - <literal>b</> means that the types are binary-coercible, thus no conversion is required. + <literal>f</literal> means that the function specified in the <structfield>castfunc</structfield> field is used. + <literal>i</literal> means that the input/output functions are used. + <literal>b</literal> means that the types are binary-coercible, thus no conversion is required. </entry> </row> </tbody> @@ -1586,18 +1586,18 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< always take the cast source type as their first argument type, and return the cast destination type as their result type. A cast function can have up to three arguments. The second argument, - if present, must be type <type>integer</>; it receives the type + if present, must be type <type>integer</type>; it receives the type modifier associated with the destination type, or -1 if there is none. The third argument, - if present, must be type <type>boolean</>; it receives <literal>true</> - if the cast is an explicit cast, <literal>false</> otherwise. + if present, must be type <type>boolean</type>; it receives <literal>true</literal> + if the cast is an explicit cast, <literal>false</literal> otherwise. </para> <para> It is legitimate to create a <structname>pg_cast</structname> entry in which the source and target types are the same, if the associated function takes more than one argument. Such entries represent - <quote>length coercion functions</> that coerce values of the type + <quote>length coercion functions</quote> that coerce values of the type to be legal for a particular type modifier value. </para> @@ -1624,14 +1624,14 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< table. This includes indexes (but see also <structname>pg_index</structname>), sequences (but see also <structname>pg_sequence</structname>), views, materialized - views, composite types, and TOAST tables; see <structfield>relkind</>. + views, composite types, and TOAST tables; see <structfield>relkind</structfield>. Below, when we mean all of these kinds of objects we speak of <quote>relations</quote>. Not all columns are meaningful for all relation types. </para> <table> - <title><structname>pg_class</> Columns</title> + <title><structname>pg_class</structname> Columns</title> <tgroup cols="4"> <thead> @@ -1673,7 +1673,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><literal><link linkend="catalog-pg-type"><structname>pg_type</structname></link>.oid</literal></entry> <entry> The OID of the data type that corresponds to this table's row type, - if any (zero for indexes, which have no <structname>pg_type</> entry) + if any (zero for indexes, which have no <structname>pg_type</structname> entry) </entry> </row> @@ -1706,7 +1706,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><type>oid</type></entry> <entry></entry> <entry>Name of the on-disk file of this relation; zero means this - is a <quote>mapped</> relation whose disk file name is determined + is a <quote>mapped</quote> relation whose disk file name is determined by low-level state</entry> </row> @@ -1795,8 +1795,8 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><type>char</type></entry> <entry></entry> <entry> - <literal>p</> = permanent table, <literal>u</> = unlogged table, - <literal>t</> = temporary table + <literal>p</literal> = permanent table, <literal>u</literal> = unlogged table, + <literal>t</literal> = temporary table </entry> </row> @@ -1805,15 +1805,15 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><type>char</type></entry> <entry></entry> <entry> - <literal>r</> = ordinary table, - <literal>i</> = index, - <literal>S</> = sequence, - <literal>t</> = TOAST table, - <literal>v</> = view, - <literal>m</> = materialized view, - <literal>c</> = composite type, - <literal>f</> = foreign table, - <literal>p</> = partitioned table + <literal>r</literal> = ordinary table, + <literal>i</literal> = index, + <literal>S</literal> = sequence, + <literal>t</literal> = TOAST table, + <literal>v</literal> = view, + <literal>m</literal> = materialized view, + <literal>c</literal> = composite type, + <literal>f</literal> = foreign table, + <literal>p</literal> = partitioned table </entry> </row> @@ -1834,7 +1834,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><type>int2</type></entry> <entry></entry> <entry> - Number of <literal>CHECK</> constraints on the table; see + Number of <literal>CHECK</literal> constraints on the table; see <link linkend="catalog-pg-constraint"><structname>pg_constraint</structname></link> catalog </entry> </row> @@ -1917,11 +1917,11 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><type>char</type></entry> <entry></entry> <entry> - Columns used to form <quote>replica identity</> for rows: - <literal>d</> = default (primary key, if any), - <literal>n</> = nothing, - <literal>f</> = all columns - <literal>i</> = index with <structfield>indisreplident</structfield> set, or default + Columns used to form <quote>replica identity</quote> for rows: + <literal>d</literal> = default (primary key, if any), + <literal>n</literal> = nothing, + <literal>f</literal> = all columns + <literal>i</literal> = index with <structfield>indisreplident</structfield> set, or default </entry> </row> @@ -1938,9 +1938,9 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry></entry> <entry> All transaction IDs before this one have been replaced with a permanent - (<quote>frozen</>) transaction ID in this table. This is used to track + (<quote>frozen</quote>) transaction ID in this table. This is used to track whether the table needs to be vacuumed in order to prevent transaction - ID wraparound or to allow <literal>pg_xact</> to be shrunk. Zero + ID wraparound or to allow <literal>pg_xact</literal> to be shrunk. Zero (<symbol>InvalidTransactionId</symbol>) if the relation is not a table. </entry> </row> @@ -1953,7 +1953,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< All multixact IDs before this one have been replaced by a transaction ID in this table. This is used to track whether the table needs to be vacuumed in order to prevent multixact ID - wraparound or to allow <literal>pg_multixact</> to be shrunk. Zero + wraparound or to allow <literal>pg_multixact</literal> to be shrunk. Zero (<symbol>InvalidMultiXactId</symbol>) if the relation is not a table. </entry> </row> @@ -1975,7 +1975,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><type>text[]</type></entry> <entry></entry> <entry> - Access-method-specific options, as <quote>keyword=value</> strings + Access-method-specific options, as <quote>keyword=value</quote> strings </entry> </row> @@ -1993,13 +1993,13 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </table> <para> - Several of the Boolean flags in <structname>pg_class</> are maintained + Several of the Boolean flags in <structname>pg_class</structname> are maintained lazily: they are guaranteed to be true if that's the correct state, but may not be reset to false immediately when the condition is no longer - true. For example, <structfield>relhasindex</> is set by + true. For example, <structfield>relhasindex</structfield> is set by <command>CREATE INDEX</command>, but it is never cleared by <command>DROP INDEX</command>. Instead, <command>VACUUM</command> clears - <structfield>relhasindex</> if it finds the table has no indexes. This + <structfield>relhasindex</structfield> if it finds the table has no indexes. This arrangement avoids race conditions and improves concurrency. </para> </sect1> @@ -2019,7 +2019,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </para> <table> - <title><structname>pg_collation</> Columns</title> + <title><structname>pg_collation</structname> Columns</title> <tgroup cols="4"> <thead> @@ -2082,14 +2082,14 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><structfield>collcollate</structfield></entry> <entry><type>name</type></entry> <entry></entry> - <entry><symbol>LC_COLLATE</> for this collation object</entry> + <entry><symbol>LC_COLLATE</symbol> for this collation object</entry> </row> <row> <entry><structfield>collctype</structfield></entry> <entry><type>name</type></entry> <entry></entry> - <entry><symbol>LC_CTYPE</> for this collation object</entry> + <entry><symbol>LC_CTYPE</symbol> for this collation object</entry> </row> <row> @@ -2107,27 +2107,27 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </table> <para> - Note that the unique key on this catalog is (<structfield>collname</>, - <structfield>collencoding</>, <structfield>collnamespace</>) not just - (<structfield>collname</>, <structfield>collnamespace</>). + Note that the unique key on this catalog is (<structfield>collname</structfield>, + <structfield>collencoding</structfield>, <structfield>collnamespace</structfield>) not just + (<structfield>collname</structfield>, <structfield>collnamespace</structfield>). <productname>PostgreSQL</productname> generally ignores all - collations that do not have <structfield>collencoding</> equal to + collations that do not have <structfield>collencoding</structfield> equal to either the current database's encoding or -1, and creation of new entries - with the same name as an entry with <structfield>collencoding</> = -1 + with the same name as an entry with <structfield>collencoding</structfield> = -1 is forbidden. Therefore it is sufficient to use a qualified SQL name - (<replaceable>schema</>.<replaceable>name</>) to identify a collation, + (<replaceable>schema</replaceable>.<replaceable>name</replaceable>) to identify a collation, even though this is not unique according to the catalog definition. The reason for defining the catalog this way is that - <application>initdb</> fills it in at cluster initialization time with + <application>initdb</application> fills it in at cluster initialization time with entries for all locales available on the system, so it must be able to hold entries for all encodings that might ever be used in the cluster. </para> <para> - In the <literal>template0</> database, it could be useful to create + In the <literal>template0</literal> database, it could be useful to create collations whose encoding does not match the database encoding, since they could match the encodings of databases later cloned from - <literal>template0</>. This would currently have to be done manually. + <literal>template0</literal>. This would currently have to be done manually. </para> </sect1> @@ -2143,13 +2143,13 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< key, unique, foreign key, and exclusion constraints on tables. (Column constraints are not treated specially. Every column constraint is equivalent to some table constraint.) - Not-null constraints are represented in the <structname>pg_attribute</> + Not-null constraints are represented in the <structname>pg_attribute</structname> catalog, not here. </para> <para> User-defined constraint triggers (created with <command>CREATE CONSTRAINT - TRIGGER</>) also give rise to an entry in this table. + TRIGGER</command>) also give rise to an entry in this table. </para> <para> @@ -2157,7 +2157,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </para> <table> - <title><structname>pg_constraint</> Columns</title> + <title><structname>pg_constraint</structname> Columns</title> <tgroup cols="4"> <thead> @@ -2198,12 +2198,12 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><type>char</type></entry> <entry></entry> <entry> - <literal>c</> = check constraint, - <literal>f</> = foreign key constraint, - <literal>p</> = primary key constraint, - <literal>u</> = unique constraint, - <literal>t</> = constraint trigger, - <literal>x</> = exclusion constraint + <literal>c</literal> = check constraint, + <literal>f</literal> = foreign key constraint, + <literal>p</literal> = primary key constraint, + <literal>u</literal> = unique constraint, + <literal>t</literal> = constraint trigger, + <literal>x</literal> = exclusion constraint </entry> </row> @@ -2263,11 +2263,11 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><type>char</type></entry> <entry></entry> <entry>Foreign key update action code: - <literal>a</> = no action, - <literal>r</> = restrict, - <literal>c</> = cascade, - <literal>n</> = set null, - <literal>d</> = set default + <literal>a</literal> = no action, + <literal>r</literal> = restrict, + <literal>c</literal> = cascade, + <literal>n</literal> = set null, + <literal>d</literal> = set default </entry> </row> @@ -2276,11 +2276,11 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><type>char</type></entry> <entry></entry> <entry>Foreign key deletion action code: - <literal>a</> = no action, - <literal>r</> = restrict, - <literal>c</> = cascade, - <literal>n</> = set null, - <literal>d</> = set default + <literal>a</literal> = no action, + <literal>r</literal> = restrict, + <literal>c</literal> = cascade, + <literal>n</literal> = set null, + <literal>d</literal> = set default </entry> </row> @@ -2289,9 +2289,9 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><type>char</type></entry> <entry></entry> <entry>Foreign key match type: - <literal>f</> = full, - <literal>p</> = partial, - <literal>s</> = simple + <literal>f</literal> = full, + <literal>p</literal> = partial, + <literal>s</literal> = simple </entry> </row> @@ -2329,7 +2329,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <row> <entry><structfield>conkey</structfield></entry> <entry><type>int2[]</type></entry> - <entry><literal><link linkend="catalog-pg-attribute"><structname>pg_attribute</structname></link>.attnum</></entry> + <entry><literal><link linkend="catalog-pg-attribute"><structname>pg_attribute</structname></link>.attnum</literal></entry> <entry>If a table constraint (including foreign keys, but not constraint triggers), list of the constrained columns</entry> </row> @@ -2337,35 +2337,35 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <row> <entry><structfield>confkey</structfield></entry> <entry><type>int2[]</type></entry> - <entry><literal><link linkend="catalog-pg-attribute"><structname>pg_attribute</structname></link>.attnum</></entry> + <entry><literal><link linkend="catalog-pg-attribute"><structname>pg_attribute</structname></link>.attnum</literal></entry> <entry>If a foreign key, list of the referenced columns</entry> </row> <row> <entry><structfield>conpfeqop</structfield></entry> <entry><type>oid[]</type></entry> - <entry><literal><link linkend="catalog-pg-operator"><structname>pg_operator</structname></link>.oid</></entry> + <entry><literal><link linkend="catalog-pg-operator"><structname>pg_operator</structname></link>.oid</literal></entry> <entry>If a foreign key, list of the equality operators for PK = FK comparisons</entry> </row> <row> <entry><structfield>conppeqop</structfield></entry> <entry><type>oid[]</type></entry> - <entry><literal><link linkend="catalog-pg-operator"><structname>pg_operator</structname></link>.oid</></entry> + <entry><literal><link linkend="catalog-pg-operator"><structname>pg_operator</structname></link>.oid</literal></entry> <entry>If a foreign key, list of the equality operators for PK = PK comparisons</entry> </row> <row> <entry><structfield>conffeqop</structfield></entry> <entry><type>oid[]</type></entry> - <entry><literal><link linkend="catalog-pg-operator"><structname>pg_operator</structname></link>.oid</></entry> + <entry><literal><link linkend="catalog-pg-operator"><structname>pg_operator</structname></link>.oid</literal></entry> <entry>If a foreign key, list of the equality operators for FK = FK comparisons</entry> </row> <row> <entry><structfield>conexclop</structfield></entry> <entry><type>oid[]</type></entry> - <entry><literal><link linkend="catalog-pg-operator"><structname>pg_operator</structname></link>.oid</></entry> + <entry><literal><link linkend="catalog-pg-operator"><structname>pg_operator</structname></link>.oid</literal></entry> <entry>If an exclusion constraint, list of the per-column exclusion operators</entry> </row> @@ -2392,7 +2392,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< For other cases, a zero appears in <structfield>conkey</structfield> and the associated index must be consulted to discover the expression that is constrained. (<structfield>conkey</structfield> thus has the - same contents as <structname>pg_index</>.<structfield>indkey</> for the + same contents as <structname>pg_index</structname>.<structfield>indkey</structfield> for the index.) </para> @@ -2400,7 +2400,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <para> <structfield>consrc</structfield> is not updated when referenced objects change; for example, it won't track renaming of columns. Rather than - relying on this field, it's best to use <function>pg_get_constraintdef()</> + relying on this field, it's best to use <function>pg_get_constraintdef()</function> to extract the definition of a check constraint. </para> </note> @@ -2429,7 +2429,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </para> <table> - <title><structname>pg_conversion</> Columns</title> + <title><structname>pg_conversion</structname> Columns</title> <tgroup cols="4"> <thead> @@ -2529,7 +2529,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </para> <table> - <title><structname>pg_database</> Columns</title> + <title><structname>pg_database</structname> Columns</title> <tgroup cols="4"> <thead> @@ -2592,7 +2592,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry></entry> <entry> If true, then this database can be cloned by - any user with <literal>CREATEDB</> privileges; + any user with <literal>CREATEDB</literal> privileges; if false, then only superusers or the owner of the database can clone it. </entry> @@ -2604,7 +2604,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry></entry> <entry> If false then no one can connect to this database. This is - used to protect the <literal>template0</> database from being altered. + used to protect the <literal>template0</literal> database from being altered. </entry> </row> @@ -2634,11 +2634,11 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry></entry> <entry> All transaction IDs before this one have been replaced with a permanent - (<quote>frozen</>) transaction ID in this database. This is used to + (<quote>frozen</quote>) transaction ID in this database. This is used to track whether the database needs to be vacuumed in order to prevent - transaction ID wraparound or to allow <literal>pg_xact</> to be shrunk. + transaction ID wraparound or to allow <literal>pg_xact</literal> to be shrunk. It is the minimum of the per-table - <structname>pg_class</>.<structfield>relfrozenxid</> values. + <structname>pg_class</structname>.<structfield>relfrozenxid</structfield> values. </entry> </row> @@ -2650,9 +2650,9 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< All multixact IDs before this one have been replaced with a transaction ID in this database. This is used to track whether the database needs to be vacuumed in order to prevent - multixact ID wraparound or to allow <literal>pg_multixact</> to be shrunk. + multixact ID wraparound or to allow <literal>pg_multixact</literal> to be shrunk. It is the minimum of the per-table - <structname>pg_class</>.<structfield>relminmxid</> values. + <structname>pg_class</structname>.<structfield>relminmxid</structfield> values. </entry> </row> @@ -2663,7 +2663,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry> The default tablespace for the database. Within this database, all tables for which - <structname>pg_class</>.<structfield>reltablespace</> is zero + <structname>pg_class</structname>.<structfield>reltablespace</structfield> is zero will be stored in this tablespace; in particular, all the non-shared system catalogs will be there. </entry> @@ -2707,7 +2707,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </para> <table> - <title><structname>pg_db_role_setting</> Columns</title> + <title><structname>pg_db_role_setting</structname> Columns</title> <tgroup cols="4"> <thead> @@ -2754,12 +2754,12 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </indexterm> <para> - The catalog <structname>pg_default_acl</> stores initial + The catalog <structname>pg_default_acl</structname> stores initial privileges to be assigned to newly created objects. </para> <table> - <title><structname>pg_default_acl</> Columns</title> + <title><structname>pg_default_acl</structname> Columns</title> <tgroup cols="4"> <thead> @@ -2800,10 +2800,10 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry></entry> <entry> Type of object this entry is for: - <literal>r</> = relation (table, view), - <literal>S</> = sequence, - <literal>f</> = function, - <literal>T</> = type + <literal>r</literal> = relation (table, view), + <literal>S</literal> = sequence, + <literal>f</literal> = function, + <literal>T</literal> = type </entry> </row> @@ -2820,21 +2820,21 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </table> <para> - A <structname>pg_default_acl</> entry shows the initial privileges to + A <structname>pg_default_acl</structname> entry shows the initial privileges to be assigned to an object belonging to the indicated user. There are - currently two types of entry: <quote>global</> entries with - <structfield>defaclnamespace</> = 0, and <quote>per-schema</> entries + currently two types of entry: <quote>global</quote> entries with + <structfield>defaclnamespace</structfield> = 0, and <quote>per-schema</quote> entries that reference a particular schema. If a global entry is present then - it <emphasis>overrides</> the normal hard-wired default privileges + it <emphasis>overrides</emphasis> the normal hard-wired default privileges for the object type. A per-schema entry, if present, represents privileges - to be <emphasis>added to</> the global or hard-wired default privileges. + to be <emphasis>added to</emphasis> the global or hard-wired default privileges. </para> <para> Note that when an ACL entry in another catalog is null, it is taken to represent the hard-wired default privileges for its object, - <emphasis>not</> whatever might be in <structname>pg_default_acl</> - at the moment. <structname>pg_default_acl</> is only consulted during + <emphasis>not</emphasis> whatever might be in <structname>pg_default_acl</structname> + at the moment. <structname>pg_default_acl</structname> is only consulted during object creation. </para> @@ -2851,9 +2851,9 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <para> The catalog <structname>pg_depend</structname> records the dependency relationships between database objects. This information allows - <command>DROP</> commands to find which other objects must be dropped - by <command>DROP CASCADE</> or prevent dropping in the <command>DROP - RESTRICT</> case. + <command>DROP</command> commands to find which other objects must be dropped + by <command>DROP CASCADE</command> or prevent dropping in the <command>DROP + RESTRICT</command> case. </para> <para> @@ -2863,7 +2863,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </para> <table> - <title><structname>pg_depend</> Columns</title> + <title><structname>pg_depend</structname> Columns</title> <tgroup cols="4"> <thead> @@ -2896,7 +2896,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry></entry> <entry> For a table column, this is the column number (the - <structfield>objid</> and <structfield>classid</> refer to the + <structfield>objid</structfield> and <structfield>classid</structfield> refer to the table itself). For all other object types, this column is zero. </entry> @@ -2922,7 +2922,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry></entry> <entry> For a table column, this is the column number (the - <structfield>refobjid</> and <structfield>refclassid</> refer + <structfield>refobjid</structfield> and <structfield>refclassid</structfield> refer to the table itself). For all other object types, this column is zero. </entry> @@ -2945,17 +2945,17 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< In all cases, a <structname>pg_depend</structname> entry indicates that the referenced object cannot be dropped without also dropping the dependent object. However, there are several subflavors identified by - <structfield>deptype</>: + <structfield>deptype</structfield>: <variablelist> <varlistentry> - <term><symbol>DEPENDENCY_NORMAL</> (<literal>n</>)</term> + <term><symbol>DEPENDENCY_NORMAL</symbol> (<literal>n</literal>)</term> <listitem> <para> A normal relationship between separately-created objects. The dependent object can be dropped without affecting the referenced object. The referenced object can only be dropped - by specifying <literal>CASCADE</>, in which case the dependent + by specifying <literal>CASCADE</literal>, in which case the dependent object is dropped, too. Example: a table column has a normal dependency on its data type. </para> @@ -2963,12 +2963,12 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </varlistentry> <varlistentry> - <term><symbol>DEPENDENCY_AUTO</> (<literal>a</>)</term> + <term><symbol>DEPENDENCY_AUTO</symbol> (<literal>a</literal>)</term> <listitem> <para> The dependent object can be dropped separately from the referenced object, and should be automatically dropped - (regardless of <literal>RESTRICT</> or <literal>CASCADE</> + (regardless of <literal>RESTRICT</literal> or <literal>CASCADE</literal> mode) if the referenced object is dropped. Example: a named constraint on a table is made autodependent on the table, so that it will go away if the table is dropped. @@ -2977,41 +2977,41 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </varlistentry> <varlistentry> - <term><symbol>DEPENDENCY_INTERNAL</> (<literal>i</>)</term> + <term><symbol>DEPENDENCY_INTERNAL</symbol> (<literal>i</literal>)</term> <listitem> <para> The dependent object was created as part of creation of the referenced object, and is really just a part of its internal - implementation. A <command>DROP</> of the dependent object + implementation. A <command>DROP</command> of the dependent object will be disallowed outright (we'll tell the user to issue a - <command>DROP</> against the referenced object, instead). A - <command>DROP</> of the referenced object will be propagated + <command>DROP</command> against the referenced object, instead). A + <command>DROP</command> of the referenced object will be propagated through to drop the dependent object whether - <command>CASCADE</> is specified or not. Example: a trigger + <command>CASCADE</command> is specified or not. Example: a trigger that's created to enforce a foreign-key constraint is made internally dependent on the constraint's - <structname>pg_constraint</> entry. + <structname>pg_constraint</structname> entry. </para> </listitem> </varlistentry> <varlistentry> - <term><symbol>DEPENDENCY_EXTENSION</> (<literal>e</>)</term> + <term><symbol>DEPENDENCY_EXTENSION</symbol> (<literal>e</literal>)</term> <listitem> <para> - The dependent object is a member of the <firstterm>extension</> that is + The dependent object is a member of the <firstterm>extension</firstterm> that is the referenced object (see <link linkend="catalog-pg-extension"><structname>pg_extension</structname></link>). The dependent object can be dropped only via - <command>DROP EXTENSION</> on the referenced object. Functionally + <command>DROP EXTENSION</command> on the referenced object. Functionally this dependency type acts the same as an internal dependency, but - it's kept separate for clarity and to simplify <application>pg_dump</>. + it's kept separate for clarity and to simplify <application>pg_dump</application>. </para> </listitem> </varlistentry> <varlistentry> - <term><symbol>DEPENDENCY_AUTO_EXTENSION</> (<literal>x</>)</term> + <term><symbol>DEPENDENCY_AUTO_EXTENSION</symbol> (<literal>x</literal>)</term> <listitem> <para> The dependent object is not a member of the extension that is the @@ -3024,7 +3024,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </varlistentry> <varlistentry> - <term><symbol>DEPENDENCY_PIN</> (<literal>p</>)</term> + <term><symbol>DEPENDENCY_PIN</symbol> (<literal>p</literal>)</term> <listitem> <para> There is no dependent object; this type of entry is a signal @@ -3051,7 +3051,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </indexterm> <para> - The catalog <structname>pg_description</> stores optional descriptions + The catalog <structname>pg_description</structname> stores optional descriptions (comments) for each database object. Descriptions can be manipulated with the <xref linkend="sql-comment"> command and viewed with <application>psql</application>'s <literal>\d</literal> commands. @@ -3066,7 +3066,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </para> <table> - <title><structname>pg_description</> Columns</title> + <title><structname>pg_description</structname> Columns</title> <tgroup cols="4"> <thead> @@ -3099,7 +3099,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry></entry> <entry> For a comment on a table column, this is the column number (the - <structfield>objoid</> and <structfield>classoid</> refer to + <structfield>objoid</structfield> and <structfield>classoid</structfield> refer to the table itself). For all other object types, this column is zero. </entry> @@ -3133,7 +3133,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </para> <table> - <title><structname>pg_enum</> Columns</title> + <title><structname>pg_enum</structname> Columns</title> <tgroup cols="4"> <thead> @@ -3157,7 +3157,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><structfield>enumtypid</structfield></entry> <entry><type>oid</type></entry> <entry><literal><link linkend="catalog-pg-type"><structname>pg_type</structname></link>.oid</literal></entry> - <entry>The OID of the <structname>pg_type</> entry owning this enum value</entry> + <entry>The OID of the <structname>pg_type</structname> entry owning this enum value</entry> </row> <row> @@ -3191,7 +3191,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <para> When an enum type is created, its members are assigned sort-order - positions 1..<replaceable>n</>. But members added later might be given + positions 1..<replaceable>n</replaceable>. But members added later might be given negative or fractional values of <structfield>enumsortorder</structfield>. The only requirement on these values is that they be correctly ordered and unique within each enum type. @@ -3212,7 +3212,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </para> <table> - <title><structname>pg_event_trigger</> Columns</title> + <title><structname>pg_event_trigger</structname> Columns</title> <tgroup cols="4"> <thead> @@ -3260,10 +3260,10 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry> Controls in which <xref linkend="guc-session-replication-role"> modes the event trigger fires. - <literal>O</> = trigger fires in <quote>origin</> and <quote>local</> modes, - <literal>D</> = trigger is disabled, - <literal>R</> = trigger fires in <quote>replica</> mode, - <literal>A</> = trigger fires always. + <literal>O</literal> = trigger fires in <quote>origin</quote> and <quote>local</quote> modes, + <literal>D</literal> = trigger is disabled, + <literal>R</literal> = trigger fires in <quote>replica</quote> mode, + <literal>A</literal> = trigger fires always. </entry> </row> @@ -3296,7 +3296,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </para> <table> - <title><structname>pg_extension</> Columns</title> + <title><structname>pg_extension</structname> Columns</title> <tgroup cols="4"> <thead> @@ -3355,16 +3355,16 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><structfield>extconfig</structfield></entry> <entry><type>oid[]</type></entry> <entry><literal><link linkend="catalog-pg-class"><structname>pg_class</structname></link>.oid</literal></entry> - <entry>Array of <type>regclass</> OIDs for the extension's configuration - table(s), or <literal>NULL</> if none</entry> + <entry>Array of <type>regclass</type> OIDs for the extension's configuration + table(s), or <literal>NULL</literal> if none</entry> </row> <row> <entry><structfield>extcondition</structfield></entry> <entry><type>text[]</type></entry> <entry></entry> - <entry>Array of <literal>WHERE</>-clause filter conditions for the - extension's configuration table(s), or <literal>NULL</> if none</entry> + <entry>Array of <literal>WHERE</literal>-clause filter conditions for the + extension's configuration table(s), or <literal>NULL</literal> if none</entry> </row> </tbody> @@ -3372,7 +3372,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </table> <para> - Note that unlike most catalogs with a <quote>namespace</> column, + Note that unlike most catalogs with a <quote>namespace</quote> column, <structfield>extnamespace</structfield> is not meant to imply that the extension belongs to that schema. Extension names are never schema-qualified. Rather, <structfield>extnamespace</structfield> @@ -3399,7 +3399,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </para> <table> - <title><structname>pg_foreign_data_wrapper</> Columns</title> + <title><structname>pg_foreign_data_wrapper</structname> Columns</title> <tgroup cols="4"> <thead> @@ -3474,7 +3474,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><type>text[]</type></entry> <entry></entry> <entry> - Foreign-data wrapper specific options, as <quote>keyword=value</> strings + Foreign-data wrapper specific options, as <quote>keyword=value</quote> strings </entry> </row> </tbody> @@ -3498,7 +3498,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </para> <table> - <title><structname>pg_foreign_server</> Columns</title> + <title><structname>pg_foreign_server</structname> Columns</title> <tgroup cols="4"> <thead> @@ -3570,7 +3570,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><type>text[]</type></entry> <entry></entry> <entry> - Foreign server specific options, as <quote>keyword=value</> strings + Foreign server specific options, as <quote>keyword=value</quote> strings </entry> </row> </tbody> @@ -3596,7 +3596,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </para> <table> - <title><structname>pg_foreign_table</> Columns</title> + <title><structname>pg_foreign_table</structname> Columns</title> <tgroup cols="4"> <thead> @@ -3613,7 +3613,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><structfield>ftrelid</structfield></entry> <entry><type>oid</type></entry> <entry><literal><link linkend="catalog-pg-class"><structname>pg_class</structname></link>.oid</literal></entry> - <entry>OID of the <structname>pg_class</> entry for this foreign table</entry> + <entry>OID of the <structname>pg_class</structname> entry for this foreign table</entry> </row> <row> @@ -3628,7 +3628,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><type>text[]</type></entry> <entry></entry> <entry> - Foreign table options, as <quote>keyword=value</> strings + Foreign table options, as <quote>keyword=value</quote> strings </entry> </row> </tbody> @@ -3651,7 +3651,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </para> <table> - <title><structname>pg_index</> Columns</title> + <title><structname>pg_index</structname> Columns</title> <tgroup cols="4"> <thead> @@ -3668,14 +3668,14 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><structfield>indexrelid</structfield></entry> <entry><type>oid</type></entry> <entry><literal><link linkend="catalog-pg-class"><structname>pg_class</structname></link>.oid</literal></entry> - <entry>The OID of the <structname>pg_class</> entry for this index</entry> + <entry>The OID of the <structname>pg_class</structname> entry for this index</entry> </row> <row> <entry><structfield>indrelid</structfield></entry> <entry><type>oid</type></entry> <entry><literal><link linkend="catalog-pg-class"><structname>pg_class</structname></link>.oid</literal></entry> - <entry>The OID of the <structname>pg_class</> entry for the table this index is for</entry> + <entry>The OID of the <structname>pg_class</structname> entry for the table this index is for</entry> </row> <row> @@ -3698,7 +3698,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><type>bool</type></entry> <entry></entry> <entry>If true, this index represents the primary key of the table - (<structfield>indisunique</> should always be true when this is true)</entry> + (<structfield>indisunique</structfield> should always be true when this is true)</entry> </row> <row> @@ -3714,7 +3714,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry></entry> <entry>If true, the uniqueness check is enforced immediately on insertion - (irrelevant if <structfield>indisunique</> is not true)</entry> + (irrelevant if <structfield>indisunique</structfield> is not true)</entry> </row> <row> @@ -3731,7 +3731,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry> If true, the index is currently valid for queries. False means the index is possibly incomplete: it must still be modified by - <command>INSERT</>/<command>UPDATE</> operations, but it cannot safely + <command>INSERT</command>/<command>UPDATE</command> operations, but it cannot safely be used for queries. If it is unique, the uniqueness property is not guaranteed true either. </entry> @@ -3742,8 +3742,8 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><type>bool</type></entry> <entry></entry> <entry> - If true, queries must not use the index until the <structfield>xmin</> - of this <structname>pg_index</> row is below their <symbol>TransactionXmin</symbol> + If true, queries must not use the index until the <structfield>xmin</structfield> + of this <structname>pg_index</structname> row is below their <symbol>TransactionXmin</symbol> event horizon, because the table may contain broken HOT chains with incompatible rows that they can see </entry> @@ -3755,7 +3755,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry></entry> <entry> If true, the index is currently ready for inserts. False means the - index must be ignored by <command>INSERT</>/<command>UPDATE</> + index must be ignored by <command>INSERT</command>/<command>UPDATE</command> operations. </entry> </row> @@ -3775,9 +3775,9 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><type>bool</type></entry> <entry></entry> <entry> - If true this index has been chosen as <quote>replica identity</> + If true this index has been chosen as <quote>replica identity</quote> using <command>ALTER TABLE ... REPLICA IDENTITY USING INDEX - ...</> + ...</command> </entry> </row> @@ -3836,7 +3836,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< Expression trees (in <function>nodeToString()</function> representation) for index attributes that are not simple column references. This is a list with one element for each zero - entry in <structfield>indkey</>. Null if all index attributes + entry in <structfield>indkey</structfield>. Null if all index attributes are simple references. </entry> </row> @@ -3866,14 +3866,14 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </indexterm> <para> - The catalog <structname>pg_inherits</> records information about + The catalog <structname>pg_inherits</structname> records information about table inheritance hierarchies. There is one entry for each direct parent-child table relationship in the database. (Indirect inheritance can be determined by following chains of entries.) </para> <table> - <title><structname>pg_inherits</> Columns</title> + <title><structname>pg_inherits</structname> Columns</title> <tgroup cols="4"> <thead> @@ -3928,7 +3928,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </indexterm> <para> - The catalog <structname>pg_init_privs</> records information about + The catalog <structname>pg_init_privs</structname> records information about the initial privileges of objects in the system. There is one entry for each object in the database which has a non-default (non-NULL) initial set of privileges. @@ -3936,7 +3936,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <para> Objects can have initial privileges either by having those privileges set - when the system is initialized (by <application>initdb</>) or when the + when the system is initialized (by <application>initdb</application>) or when the object is created during a <command>CREATE EXTENSION</command> and the extension script sets initial privileges using the <command>GRANT</command> system. Note that the system will automatically handle recording of the @@ -3944,12 +3944,12 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< only use the <command>GRANT</command> and <command>REVOKE</command> statements in their script to have the privileges recorded. The <literal>privtype</literal> column indicates if the initial privilege was - set by <application>initdb</> or during a + set by <application>initdb</application> or during a <command>CREATE EXTENSION</command> command. </para> <para> - Objects which have initial privileges set by <application>initdb</> will + Objects which have initial privileges set by <application>initdb</application> will have entries where <literal>privtype</literal> is <literal>'i'</literal>, while objects which have initial privileges set by <command>CREATE EXTENSION</command> will have entries where @@ -3957,7 +3957,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </para> <table> - <title><structname>pg_init_privs</> Columns</title> + <title><structname>pg_init_privs</structname> Columns</title> <tgroup cols="4"> <thead> @@ -3990,7 +3990,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry></entry> <entry> For a table column, this is the column number (the - <structfield>objoid</> and <structfield>classoid</> refer to the + <structfield>objoid</structfield> and <structfield>classoid</structfield> refer to the table itself). For all other object types, this column is zero. </entry> @@ -4039,7 +4039,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </para> <table> - <title><structname>pg_language</> Columns</title> + <title><structname>pg_language</structname> Columns</title> <tgroup cols="4"> <thead> @@ -4116,7 +4116,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><literal><link linkend="catalog-pg-proc"><structname>pg_proc</structname></link>.oid</literal></entry> <entry> This references a function that is responsible for executing - <quote>inline</> anonymous code blocks + <quote>inline</quote> anonymous code blocks (<xref linkend="sql-do"> blocks). Zero if inline blocks are not supported. </entry> @@ -4162,24 +4162,24 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< The catalog <structname>pg_largeobject</structname> holds the data making up <quote>large objects</quote>. A large object is identified by an OID assigned when it is created. Each large object is broken into - segments or <quote>pages</> small enough to be conveniently stored as rows + segments or <quote>pages</quote> small enough to be conveniently stored as rows in <structname>pg_largeobject</structname>. - The amount of data per page is defined to be <symbol>LOBLKSIZE</> (which is currently - <literal>BLCKSZ/4</>, or typically 2 kB). + The amount of data per page is defined to be <symbol>LOBLKSIZE</symbol> (which is currently + <literal>BLCKSZ/4</literal>, or typically 2 kB). </para> <para> - Prior to <productname>PostgreSQL</> 9.0, there was no permission structure + Prior to <productname>PostgreSQL</productname> 9.0, there was no permission structure associated with large objects. As a result, <structname>pg_largeobject</structname> was publicly readable and could be used to obtain the OIDs (and contents) of all large objects in the system. This is no longer the case; use - <link linkend="catalog-pg-largeobject-metadata"><structname>pg_largeobject_metadata</></link> + <link linkend="catalog-pg-largeobject-metadata"><structname>pg_largeobject_metadata</structname></link> to obtain a list of large object OIDs. </para> <table> - <title><structname>pg_largeobject</> Columns</title> + <title><structname>pg_largeobject</structname> Columns</title> <tgroup cols="4"> <thead> @@ -4213,7 +4213,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry></entry> <entry> Actual data stored in the large object. - This will never be more than <symbol>LOBLKSIZE</> bytes and might be less. + This will never be more than <symbol>LOBLKSIZE</symbol> bytes and might be less. </entry> </row> </tbody> @@ -4223,9 +4223,9 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <para> Each row of <structname>pg_largeobject</structname> holds data for one page of a large object, beginning at - byte offset (<literal>pageno * LOBLKSIZE</>) within the object. The implementation + byte offset (<literal>pageno * LOBLKSIZE</literal>) within the object. The implementation allows sparse storage: pages might be missing, and might be shorter than - <literal>LOBLKSIZE</> bytes even if they are not the last page of the object. + <literal>LOBLKSIZE</literal> bytes even if they are not the last page of the object. Missing regions within a large object read as zeroes. </para> @@ -4242,11 +4242,11 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< The catalog <structname>pg_largeobject_metadata</structname> holds metadata associated with large objects. The actual large object data is stored in - <link linkend="catalog-pg-largeobject"><structname>pg_largeobject</></link>. + <link linkend="catalog-pg-largeobject"><structname>pg_largeobject</structname></link>. </para> <table> - <title><structname>pg_largeobject_metadata</> Columns</title> + <title><structname>pg_largeobject_metadata</structname> Columns</title> <tgroup cols="4"> <thead> @@ -4299,14 +4299,14 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </indexterm> <para> - The catalog <structname>pg_namespace</> stores namespaces. + The catalog <structname>pg_namespace</structname> stores namespaces. A namespace is the structure underlying SQL schemas: each namespace can have a separate collection of relations, types, etc. without name conflicts. </para> <table> - <title><structname>pg_namespace</> Columns</title> + <title><structname>pg_namespace</structname> Columns</title> <tgroup cols="4"> <thead> @@ -4381,7 +4381,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </para> <table> - <title><structname>pg_opclass</> Columns</title> + <title><structname>pg_opclass</structname> Columns</title> <tgroup cols="4"> <thead> @@ -4447,14 +4447,14 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><structfield>opcdefault</structfield></entry> <entry><type>bool</type></entry> <entry></entry> - <entry>True if this operator class is the default for <structfield>opcintype</></entry> + <entry>True if this operator class is the default for <structfield>opcintype</structfield></entry> </row> <row> <entry><structfield>opckeytype</structfield></entry> <entry><type>oid</type></entry> <entry><literal><link linkend="catalog-pg-type"><structname>pg_type</structname></link>.oid</literal></entry> - <entry>Type of data stored in index, or zero if same as <structfield>opcintype</></entry> + <entry>Type of data stored in index, or zero if same as <structfield>opcintype</structfield></entry> </row> </tbody> @@ -4462,11 +4462,11 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </table> <para> - An operator class's <structfield>opcmethod</> must match the - <structname>opfmethod</> of its containing operator family. + An operator class's <structfield>opcmethod</structfield> must match the + <structname>opfmethod</structname> of its containing operator family. Also, there must be no more than one <structname>pg_opclass</structname> - row having <structname>opcdefault</> true for any given combination of - <structname>opcmethod</> and <structname>opcintype</>. + row having <structname>opcdefault</structname> true for any given combination of + <structname>opcmethod</structname> and <structname>opcintype</structname>. </para> </sect1> @@ -4480,13 +4480,13 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </indexterm> <para> - The catalog <structname>pg_operator</> stores information about operators. + The catalog <structname>pg_operator</structname> stores information about operators. See <xref linkend="sql-createoperator"> and <xref linkend="xoper"> for more information. </para> <table> - <title><structname>pg_operator</> Columns</title> + <title><structname>pg_operator</structname> Columns</title> <tgroup cols="4"> <thead> @@ -4534,8 +4534,8 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><type>char</type></entry> <entry></entry> <entry> - <literal>b</> = infix (<quote>both</quote>), <literal>l</> = prefix - (<quote>left</quote>), <literal>r</> = postfix (<quote>right</quote>) + <literal>b</literal> = infix (<quote>both</quote>), <literal>l</literal> = prefix + (<quote>left</quote>), <literal>r</literal> = postfix (<quote>right</quote>) </entry> </row> @@ -4632,7 +4632,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< Each operator family is a collection of operators and associated support routines that implement the semantics specified for a particular index access method. Furthermore, the operators in a family are all - <quote>compatible</>, in a way that is specified by the access method. + <quote>compatible</quote>, in a way that is specified by the access method. The operator family concept allows cross-data-type operators to be used with indexes and to be reasoned about using knowledge of access method semantics. @@ -4643,7 +4643,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </para> <table> - <title><structname>pg_opfamily</> Columns</title> + <title><structname>pg_opfamily</structname> Columns</title> <tgroup cols="4"> <thead> @@ -4720,7 +4720,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </para> <table> - <title><structname>pg_partitioned_table</> Columns</title> + <title><structname>pg_partitioned_table</structname> Columns</title> <tgroup cols="4"> <thead> @@ -4738,7 +4738,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><structfield>partrelid</structfield></entry> <entry><type>oid</type></entry> <entry><literal><link linkend="catalog-pg-class"><structname>pg_class</structname></link>.oid</literal></entry> - <entry>The OID of the <structname>pg_class</> entry for this partitioned table</entry> + <entry>The OID of the <structname>pg_class</structname> entry for this partitioned table</entry> </row> <row> @@ -4746,8 +4746,8 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><type>char</type></entry> <entry></entry> <entry> - Partitioning strategy; <literal>l</> = list partitioned table, - <literal>r</> = range partitioned table + Partitioning strategy; <literal>l</literal> = list partitioned table, + <literal>r</literal> = range partitioned table </entry> </row> @@ -4763,7 +4763,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><type>oid</type></entry> <entry><literal><link linkend="catalog-pg-class"><structname>pg_class</structname></link>.oid</literal></entry> <entry> - The OID of the <structname>pg_class</> entry for the default partition + The OID of the <structname>pg_class</structname> entry for the default partition of this partitioned table, or zero if this partitioned table does not have a default partition. </entry> @@ -4813,7 +4813,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< Expression trees (in <function>nodeToString()</function> representation) for partition key columns that are not simple column references. This is a list with one element for each zero - entry in <structfield>partattrs</>. Null if all partition key columns + entry in <structfield>partattrs</structfield>. Null if all partition key columns are simple references. </entry> </row> @@ -4833,9 +4833,9 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <para> The catalog <structname>pg_pltemplate</structname> stores - <quote>template</> information for procedural languages. + <quote>template</quote> information for procedural languages. A template for a language allows the language to be created in a - particular database by a simple <command>CREATE LANGUAGE</> command, + particular database by a simple <command>CREATE LANGUAGE</command> command, with no need to specify implementation details. </para> @@ -4848,7 +4848,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </para> <table> - <title><structname>pg_pltemplate</> Columns</title> + <title><structname>pg_pltemplate</structname> Columns</title> <tgroup cols="3"> <thead> @@ -4921,7 +4921,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <note> <para> - It is likely that <structname>pg_pltemplate</> will be removed in some + It is likely that <structname>pg_pltemplate</structname> will be removed in some future release of <productname>PostgreSQL</productname>, in favor of keeping this knowledge about procedural languages in their respective extension installation scripts. @@ -4944,7 +4944,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< command that it applies to (possibly all commands), the roles that it applies to, the expression to be added as a security-barrier qualification to queries that include the table, and the expression - to be added as a <literal>WITH CHECK</> option for queries that attempt to + to be added as a <literal>WITH CHECK</literal> option for queries that attempt to add new records to the table. </para> @@ -4982,11 +4982,11 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><type>char</type></entry> <entry></entry> <entry>The command type to which the policy is applied: - <literal>r</> for <command>SELECT</>, - <literal>a</> for <command>INSERT</>, - <literal>w</> for <command>UPDATE</>, - <literal>d</> for <command>DELETE</>, - or <literal>*</> for all</entry> + <literal>r</literal> for <command>SELECT</command>, + <literal>a</literal> for <command>INSERT</command>, + <literal>w</literal> for <command>UPDATE</command>, + <literal>d</literal> for <command>DELETE</command>, + or <literal>*</literal> for all</entry> </row> <row> @@ -5023,8 +5023,8 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <note> <para> - Policies stored in <structname>pg_policy</> are applied only when - <structname>pg_class</>.<structfield>relrowsecurity</> is set for + Policies stored in <structname>pg_policy</structname> are applied only when + <structname>pg_class</structname>.<structfield>relrowsecurity</structfield> is set for their table. </para> </note> @@ -5039,7 +5039,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </indexterm> <para> - The catalog <structname>pg_proc</> stores information about functions (or procedures). + The catalog <structname>pg_proc</structname> stores information about functions (or procedures). See <xref linkend="sql-createfunction"> and <xref linkend="xfunc"> for more information. </para> @@ -5051,7 +5051,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </para> <table> - <title><structname>pg_proc</> Columns</title> + <title><structname>pg_proc</structname> Columns</title> <tgroup cols="4"> <thead> @@ -5106,7 +5106,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><type>float4</type></entry> <entry></entry> <entry>Estimated execution cost (in units of - <xref linkend="guc-cpu-operator-cost">); if <structfield>proretset</>, + <xref linkend="guc-cpu-operator-cost">); if <structfield>proretset</structfield>, this is cost per row returned</entry> </row> @@ -5114,7 +5114,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><structfield>prorows</structfield></entry> <entry><type>float4</type></entry> <entry></entry> - <entry>Estimated number of result rows (zero if not <structfield>proretset</>)</entry> + <entry>Estimated number of result rows (zero if not <structfield>proretset</structfield>)</entry> </row> <row> @@ -5151,7 +5151,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><structfield>prosecdef</structfield></entry> <entry><type>bool</type></entry> <entry></entry> - <entry>Function is a security definer (i.e., a <quote>setuid</> + <entry>Function is a security definer (i.e., a <quote>setuid</quote> function)</entry> </row> @@ -5195,11 +5195,11 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <structfield>provolatile</structfield> tells whether the function's result depends only on its input arguments, or is affected by outside factors. - It is <literal>i</literal> for <quote>immutable</> functions, + It is <literal>i</literal> for <quote>immutable</quote> functions, which always deliver the same result for the same inputs. - It is <literal>s</literal> for <quote>stable</> functions, + It is <literal>s</literal> for <quote>stable</quote> functions, whose results (for fixed inputs) do not change within a scan. - It is <literal>v</literal> for <quote>volatile</> functions, + It is <literal>v</literal> for <quote>volatile</quote> functions, whose results might change at any time. (Use <literal>v</literal> also for functions with side-effects, so that calls to them cannot get optimized away.) @@ -5251,7 +5251,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry> An array with the data types of the function arguments. This includes only input arguments (including <literal>INOUT</literal> and - <literal>VARIADIC</> arguments), and thus represents + <literal>VARIADIC</literal> arguments), and thus represents the call signature of the function. </entry> </row> @@ -5266,7 +5266,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <literal>INOUT</literal> arguments); however, if all the arguments are <literal>IN</literal> arguments, this field will be null. Note that subscripting is 1-based, whereas for historical reasons - <structfield>proargtypes</> is subscripted from 0. + <structfield>proargtypes</structfield> is subscripted from 0. </entry> </row> @@ -5276,15 +5276,15 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry></entry> <entry> An array with the modes of the function arguments, encoded as - <literal>i</literal> for <literal>IN</> arguments, - <literal>o</literal> for <literal>OUT</> arguments, - <literal>b</literal> for <literal>INOUT</> arguments, - <literal>v</literal> for <literal>VARIADIC</> arguments, - <literal>t</literal> for <literal>TABLE</> arguments. + <literal>i</literal> for <literal>IN</literal> arguments, + <literal>o</literal> for <literal>OUT</literal> arguments, + <literal>b</literal> for <literal>INOUT</literal> arguments, + <literal>v</literal> for <literal>VARIADIC</literal> arguments, + <literal>t</literal> for <literal>TABLE</literal> arguments. If all the arguments are <literal>IN</literal> arguments, this field will be null. Note that subscripts correspond to positions of - <structfield>proallargtypes</> not <structfield>proargtypes</>. + <structfield>proallargtypes</structfield> not <structfield>proargtypes</structfield>. </entry> </row> @@ -5297,7 +5297,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< Arguments without a name are set to empty strings in the array. If none of the arguments have a name, this field will be null. Note that subscripts correspond to positions of - <structfield>proallargtypes</> not <structfield>proargtypes</>. + <structfield>proallargtypes</structfield> not <structfield>proargtypes</structfield>. </entry> </row> @@ -5308,9 +5308,9 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry> Expression trees (in <function>nodeToString()</function> representation) for default values. This is a list with - <structfield>pronargdefaults</> elements, corresponding to the last - <replaceable>N</> <emphasis>input</> arguments (i.e., the last - <replaceable>N</> <structfield>proargtypes</> positions). + <structfield>pronargdefaults</structfield> elements, corresponding to the last + <replaceable>N</replaceable> <emphasis>input</emphasis> arguments (i.e., the last + <replaceable>N</replaceable> <structfield>proargtypes</structfield> positions). If none of the arguments have defaults, this field will be null. </entry> </row> @@ -5525,7 +5525,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </para> <table> - <title><structname>pg_range</> Columns</title> + <title><structname>pg_range</structname> Columns</title> <tgroup cols="4"> <thead> @@ -5586,10 +5586,10 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </table> <para> - <structfield>rngsubopc</> (plus <structfield>rngcollation</>, if the + <structfield>rngsubopc</structfield> (plus <structfield>rngcollation</structfield>, if the element type is collatable) determines the sort ordering used by the range - type. <structfield>rngcanonical</> is used when the element type is - discrete. <structfield>rngsubdiff</> is optional but should be supplied to + type. <structfield>rngcanonical</structfield> is used when the element type is + discrete. <structfield>rngsubdiff</structfield> is optional but should be supplied to improve performance of GiST indexes on the range type. </para> @@ -5655,7 +5655,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </para> <table> - <title><structname>pg_rewrite</> Columns</title> + <title><structname>pg_rewrite</structname> Columns</title> <tgroup cols="4"> <thead> @@ -5694,9 +5694,9 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><type>char</type></entry> <entry></entry> <entry> - Event type that the rule is for: 1 = <command>SELECT</>, 2 = - <command>UPDATE</>, 3 = <command>INSERT</>, 4 = - <command>DELETE</> + Event type that the rule is for: 1 = <command>SELECT</command>, 2 = + <command>UPDATE</command>, 3 = <command>INSERT</command>, 4 = + <command>DELETE</command> </entry> </row> @@ -5707,10 +5707,10 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry> Controls in which <xref linkend="guc-session-replication-role"> modes the rule fires. - <literal>O</> = rule fires in <quote>origin</> and <quote>local</> modes, - <literal>D</> = rule is disabled, - <literal>R</> = rule fires in <quote>replica</> mode, - <literal>A</> = rule fires always. + <literal>O</literal> = rule fires in <quote>origin</quote> and <quote>local</quote> modes, + <literal>D</literal> = rule is disabled, + <literal>R</literal> = rule fires in <quote>replica</quote> mode, + <literal>A</literal> = rule fires always. </entry> </row> @@ -5809,7 +5809,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry></entry> <entry> For a security label on a table column, this is the column number (the - <structfield>objoid</> and <structfield>classoid</> refer to + <structfield>objoid</structfield> and <structfield>classoid</structfield> refer to the table itself). For all other object types, this column is zero. </entry> @@ -5847,7 +5847,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </para> <table> - <title><structname>pg_sequence</> Columns</title> + <title><structname>pg_sequence</structname> Columns</title> <tgroup cols="4"> <thead> @@ -5864,7 +5864,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><structfield>seqrelid</structfield></entry> <entry><type>oid</type></entry> <entry><literal><link linkend="catalog-pg-class"><structname>pg_class</structname></link>.oid</literal></entry> - <entry>The OID of the <structname>pg_class</> entry for this sequence</entry> + <entry>The OID of the <structname>pg_class</structname> entry for this sequence</entry> </row> <row> @@ -5949,7 +5949,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </para> <table> - <title><structname>pg_shdepend</> Columns</title> + <title><structname>pg_shdepend</structname> Columns</title> <tgroup cols="4"> <thead> @@ -5990,7 +5990,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry></entry> <entry> For a table column, this is the column number (the - <structfield>objid</> and <structfield>classid</> refer to the + <structfield>objid</structfield> and <structfield>classid</structfield> refer to the table itself). For all other object types, this column is zero. </entry> </row> @@ -6027,11 +6027,11 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< In all cases, a <structname>pg_shdepend</structname> entry indicates that the referenced object cannot be dropped without also dropping the dependent object. However, there are several subflavors identified by - <structfield>deptype</>: + <structfield>deptype</structfield>: <variablelist> <varlistentry> - <term><symbol>SHARED_DEPENDENCY_OWNER</> (<literal>o</>)</term> + <term><symbol>SHARED_DEPENDENCY_OWNER</symbol> (<literal>o</literal>)</term> <listitem> <para> The referenced object (which must be a role) is the owner of the @@ -6041,20 +6041,20 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </varlistentry> <varlistentry> - <term><symbol>SHARED_DEPENDENCY_ACL</> (<literal>a</>)</term> + <term><symbol>SHARED_DEPENDENCY_ACL</symbol> (<literal>a</literal>)</term> <listitem> <para> The referenced object (which must be a role) is mentioned in the ACL (access control list, i.e., privileges list) of the - dependent object. (A <symbol>SHARED_DEPENDENCY_ACL</> entry is + dependent object. (A <symbol>SHARED_DEPENDENCY_ACL</symbol> entry is not made for the owner of the object, since the owner will have - a <symbol>SHARED_DEPENDENCY_OWNER</> entry anyway.) + a <symbol>SHARED_DEPENDENCY_OWNER</symbol> entry anyway.) </para> </listitem> </varlistentry> <varlistentry> - <term><symbol>SHARED_DEPENDENCY_POLICY</> (<literal>r</>)</term> + <term><symbol>SHARED_DEPENDENCY_POLICY</symbol> (<literal>r</literal>)</term> <listitem> <para> The referenced object (which must be a role) is mentioned as the @@ -6064,7 +6064,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </varlistentry> <varlistentry> - <term><symbol>SHARED_DEPENDENCY_PIN</> (<literal>p</>)</term> + <term><symbol>SHARED_DEPENDENCY_PIN</symbol> (<literal>p</literal>)</term> <listitem> <para> There is no dependent object; this type of entry is a signal @@ -6111,7 +6111,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </para> <table> - <title><structname>pg_shdescription</> Columns</title> + <title><structname>pg_shdescription</structname> Columns</title> <tgroup cols="4"> <thead> @@ -6235,16 +6235,16 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </para> <para> - Normally there is one entry, with <structfield>stainherit</> = - <literal>false</>, for each table column that has been analyzed. + Normally there is one entry, with <structfield>stainherit</structfield> = + <literal>false</literal>, for each table column that has been analyzed. If the table has inheritance children, a second entry with - <structfield>stainherit</> = <literal>true</> is also created. This row + <structfield>stainherit</structfield> = <literal>true</literal> is also created. This row represents the column's statistics over the inheritance tree, i.e., statistics for the data you'd see with - <literal>SELECT <replaceable>column</> FROM <replaceable>table</>*</literal>, - whereas the <structfield>stainherit</> = <literal>false</> row represents + <literal>SELECT <replaceable>column</replaceable> FROM <replaceable>table</replaceable>*</literal>, + whereas the <structfield>stainherit</structfield> = <literal>false</literal> row represents the results of - <literal>SELECT <replaceable>column</> FROM ONLY <replaceable>table</></literal>. + <literal>SELECT <replaceable>column</replaceable> FROM ONLY <replaceable>table</replaceable></literal>. </para> <para> @@ -6254,7 +6254,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< references the index. No entry is made for an ordinary non-expression index column, however, since it would be redundant with the entry for the underlying table column. Currently, entries for index expressions - always have <structfield>stainherit</> = <literal>false</>. + always have <structfield>stainherit</structfield> = <literal>false</literal>. </para> <para> @@ -6281,7 +6281,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </para> <table> - <title><structname>pg_statistic</> Columns</title> + <title><structname>pg_statistic</structname> Columns</title> <tgroup cols="4"> <thead> @@ -6339,56 +6339,56 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< A value less than zero is the negative of a multiplier for the number of rows in the table; for example, a column in which about 80% of the values are nonnull and each nonnull value appears about twice on - average could be represented by <structfield>stadistinct</> = -0.4. + average could be represented by <structfield>stadistinct</structfield> = -0.4. A zero value means the number of distinct values is unknown. </entry> </row> <row> - <entry><structfield>stakind<replaceable>N</></structfield></entry> + <entry><structfield>stakind<replaceable>N</replaceable></structfield></entry> <entry><type>int2</type></entry> <entry></entry> <entry> A code number indicating the kind of statistics stored in the - <replaceable>N</>th <quote>slot</quote> of the + <replaceable>N</replaceable>th <quote>slot</quote> of the <structname>pg_statistic</structname> row. </entry> </row> <row> - <entry><structfield>staop<replaceable>N</></structfield></entry> + <entry><structfield>staop<replaceable>N</replaceable></structfield></entry> <entry><type>oid</type></entry> <entry><literal><link linkend="catalog-pg-operator"><structname>pg_operator</structname></link>.oid</literal></entry> <entry> An operator used to derive the statistics stored in the - <replaceable>N</>th <quote>slot</quote>. For example, a + <replaceable>N</replaceable>th <quote>slot</quote>. For example, a histogram slot would show the <literal><</literal> operator that defines the sort order of the data. </entry> </row> <row> - <entry><structfield>stanumbers<replaceable>N</></structfield></entry> + <entry><structfield>stanumbers<replaceable>N</replaceable></structfield></entry> <entry><type>float4[]</type></entry> <entry></entry> <entry> Numerical statistics of the appropriate kind for the - <replaceable>N</>th <quote>slot</quote>, or null if the slot + <replaceable>N</replaceable>th <quote>slot</quote>, or null if the slot kind does not involve numerical values </entry> </row> <row> - <entry><structfield>stavalues<replaceable>N</></structfield></entry> + <entry><structfield>stavalues<replaceable>N</replaceable></structfield></entry> <entry><type>anyarray</type></entry> <entry></entry> <entry> Column data values of the appropriate kind for the - <replaceable>N</>th <quote>slot</quote>, or null if the slot + <replaceable>N</replaceable>th <quote>slot</quote>, or null if the slot kind does not store any data values. Each array's element values are actually of the specific column's data type, or a related type such as an array's element type, so there is no way to define - these columns' type more specifically than <type>anyarray</>. + these columns' type more specifically than <type>anyarray</type>. </entry> </row> </tbody> @@ -6407,12 +6407,12 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <para> The catalog <structname>pg_statistic_ext</structname> holds extended planner statistics. - Each row in this catalog corresponds to a <firstterm>statistics object</> + Each row in this catalog corresponds to a <firstterm>statistics object</firstterm> created with <xref linkend="sql-createstatistics">. </para> <table> - <title><structname>pg_statistic_ext</> Columns</title> + <title><structname>pg_statistic_ext</structname> Columns</title> <tgroup cols="4"> <thead> @@ -6485,7 +6485,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><type>pg_ndistinct</type></entry> <entry></entry> <entry> - N-distinct counts, serialized as <structname>pg_ndistinct</> type + N-distinct counts, serialized as <structname>pg_ndistinct</structname> type </entry> </row> @@ -6495,7 +6495,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry></entry> <entry> Functional dependency statistics, serialized - as <structname>pg_dependencies</> type + as <structname>pg_dependencies</structname> type </entry> </row> @@ -6507,7 +6507,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< The <structfield>stxkind</structfield> field is filled at creation of the statistics object, indicating which statistic type(s) are desired. The fields after it are initially NULL and are filled only when the - corresponding statistic has been computed by <command>ANALYZE</>. + corresponding statistic has been computed by <command>ANALYZE</command>. </para> </sect1> @@ -6677,10 +6677,10 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry></entry> <entry> State code: - <literal>i</> = initialize, - <literal>d</> = data is being copied, - <literal>s</> = synchronized, - <literal>r</> = ready (normal replication) + <literal>i</literal> = initialize, + <literal>d</literal> = data is being copied, + <literal>s</literal> = synchronized, + <literal>r</literal> = ready (normal replication) </entry> </row> @@ -6689,7 +6689,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><type>pg_lsn</type></entry> <entry></entry> <entry> - End LSN for <literal>s</> and <literal>r</> states. + End LSN for <literal>s</literal> and <literal>r</literal> states. </entry> </row> </tbody> @@ -6718,7 +6718,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </para> <table> - <title><structname>pg_tablespace</> Columns</title> + <title><structname>pg_tablespace</structname> Columns</title> <tgroup cols="4"> <thead> @@ -6769,7 +6769,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><type>text[]</type></entry> <entry></entry> <entry> - Tablespace-level options, as <quote>keyword=value</> strings + Tablespace-level options, as <quote>keyword=value</quote> strings </entry> </row> </tbody> @@ -6792,7 +6792,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </para> <table> - <title><structname>pg_transform</> Columns</title> + <title><structname>pg_transform</structname> Columns</title> <tgroup cols="4"> <thead> @@ -6861,7 +6861,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </para> <table> - <title><structname>pg_trigger</> Columns</title> + <title><structname>pg_trigger</structname> Columns</title> <tgroup cols="4"> <thead> @@ -6916,10 +6916,10 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry> Controls in which <xref linkend="guc-session-replication-role"> modes the trigger fires. - <literal>O</> = trigger fires in <quote>origin</> and <quote>local</> modes, - <literal>D</> = trigger is disabled, - <literal>R</> = trigger fires in <quote>replica</> mode, - <literal>A</> = trigger fires always. + <literal>O</literal> = trigger fires in <quote>origin</quote> and <quote>local</quote> modes, + <literal>D</literal> = trigger is disabled, + <literal>R</literal> = trigger fires in <quote>replica</quote> mode, + <literal>A</literal> = trigger fires always. </entry> </row> @@ -6928,7 +6928,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><type>bool</type></entry> <entry></entry> <entry>True if trigger is internally generated (usually, to enforce - the constraint identified by <structfield>tgconstraint</>)</entry> + the constraint identified by <structfield>tgconstraint</structfield>)</entry> </row> <row> @@ -6950,7 +6950,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><structfield>tgconstraint</structfield></entry> <entry><type>oid</type></entry> <entry><literal><link linkend="catalog-pg-constraint"><structname>pg_constraint</structname></link>.oid</literal></entry> - <entry>The <structname>pg_constraint</> entry associated with the trigger, if any</entry> + <entry>The <structname>pg_constraint</structname> entry associated with the trigger, if any</entry> </row> <row> @@ -6994,7 +6994,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><type>pg_node_tree</type></entry> <entry></entry> <entry>Expression tree (in <function>nodeToString()</function> - representation) for the trigger's <literal>WHEN</> condition, or null + representation) for the trigger's <literal>WHEN</literal> condition, or null if none</entry> </row> @@ -7002,7 +7002,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><structfield>tgoldtable</structfield></entry> <entry><type>name</type></entry> <entry></entry> - <entry><literal>REFERENCING</> clause name for <literal>OLD TABLE</>, + <entry><literal>REFERENCING</literal> clause name for <literal>OLD TABLE</literal>, or null if none</entry> </row> @@ -7010,7 +7010,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><structfield>tgnewtable</structfield></entry> <entry><type>name</type></entry> <entry></entry> - <entry><literal>REFERENCING</> clause name for <literal>NEW TABLE</>, + <entry><literal>REFERENCING</literal> clause name for <literal>NEW TABLE</literal>, or null if none</entry> </row> </tbody> @@ -7019,18 +7019,18 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <para> Currently, column-specific triggering is supported only for - <literal>UPDATE</> events, and so <structfield>tgattr</> is relevant + <literal>UPDATE</literal> events, and so <structfield>tgattr</structfield> is relevant only for that event type. <structfield>tgtype</structfield> might contain bits for other event types as well, but those are presumed - to be table-wide regardless of what is in <structfield>tgattr</>. + to be table-wide regardless of what is in <structfield>tgattr</structfield>. </para> <note> <para> - When <structfield>tgconstraint</> is nonzero, - <structfield>tgconstrrelid</>, <structfield>tgconstrindid</>, - <structfield>tgdeferrable</>, and <structfield>tginitdeferred</> are - largely redundant with the referenced <structname>pg_constraint</> entry. + When <structfield>tgconstraint</structfield> is nonzero, + <structfield>tgconstrrelid</structfield>, <structfield>tgconstrindid</structfield>, + <structfield>tgdeferrable</structfield>, and <structfield>tginitdeferred</structfield> are + largely redundant with the referenced <structname>pg_constraint</structname> entry. However, it is possible for a non-deferrable trigger to be associated with a deferrable constraint: foreign key constraints can have some deferrable and some non-deferrable triggers. @@ -7070,7 +7070,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </para> <table> - <title><structname>pg_ts_config</> Columns</title> + <title><structname>pg_ts_config</structname> Columns</title> <tgroup cols="4"> <thead> @@ -7145,7 +7145,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </para> <table> - <title><structname>pg_ts_config_map</> Columns</title> + <title><structname>pg_ts_config_map</structname> Columns</title> <tgroup cols="4"> <thead> @@ -7162,7 +7162,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><structfield>mapcfg</structfield></entry> <entry><type>oid</type></entry> <entry><literal><link linkend="catalog-pg-ts-config"><structname>pg_ts_config</structname></link>.oid</literal></entry> - <entry>The OID of the <structname>pg_ts_config</> entry owning this map entry</entry> + <entry>The OID of the <structname>pg_ts_config</structname> entry owning this map entry</entry> </row> <row> @@ -7177,7 +7177,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><type>integer</type></entry> <entry></entry> <entry>Order in which to consult this entry (lower - <structfield>mapseqno</>s first)</entry> + <structfield>mapseqno</structfield>s first)</entry> </row> <row> @@ -7206,7 +7206,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< needed; the dictionary itself provides values for the user-settable parameters supported by the template. This division of labor allows dictionaries to be created by unprivileged users. The parameters - are specified by a text string <structfield>dictinitoption</>, + are specified by a text string <structfield>dictinitoption</structfield>, whose format and meaning vary depending on the template. </para> @@ -7216,7 +7216,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </para> <table> - <title><structname>pg_ts_dict</> Columns</title> + <title><structname>pg_ts_dict</structname> Columns</title> <tgroup cols="4"> <thead> @@ -7299,7 +7299,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </para> <table> - <title><structname>pg_ts_parser</> Columns</title> + <title><structname>pg_ts_parser</structname> Columns</title> <tgroup cols="4"> <thead> @@ -7396,7 +7396,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </para> <table> - <title><structname>pg_ts_template</> Columns</title> + <title><structname>pg_ts_template</structname> Columns</title> <tgroup cols="4"> <thead> @@ -7470,7 +7470,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </para> <table> - <title><structname>pg_type</> Columns</title> + <title><structname>pg_type</structname> Columns</title> <tgroup cols="4"> <thead> @@ -7521,7 +7521,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< For a fixed-size type, <structfield>typlen</structfield> is the number of bytes in the internal representation of the type. But for a variable-length type, <structfield>typlen</structfield> is negative. - -1 indicates a <quote>varlena</> type (one that has a length word), + -1 indicates a <quote>varlena</quote> type (one that has a length word), -2 indicates a null-terminated C string. </entry> </row> @@ -7566,7 +7566,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry> <structfield>typcategory</structfield> is an arbitrary classification of data types that is used by the parser to determine which implicit - casts should be <quote>preferred</>. + casts should be <quote>preferred</quote>. See <xref linkend="catalog-typcategory-table">. </entry> </row> @@ -7711,7 +7711,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <structfield>typalign</structfield> is the alignment required when storing a value of this type. It applies to storage on disk as well as most representations of the value inside - <productname>PostgreSQL</>. + <productname>PostgreSQL</productname>. When multiple values are stored consecutively, such as in the representation of a complete row on disk, padding is inserted before a datum of this type so that it begins on the @@ -7723,16 +7723,16 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< Possible values are: <itemizedlist> <listitem> - <para><literal>c</> = <type>char</type> alignment, i.e., no alignment needed.</para> + <para><literal>c</literal> = <type>char</type> alignment, i.e., no alignment needed.</para> </listitem> <listitem> - <para><literal>s</> = <type>short</type> alignment (2 bytes on most machines).</para> + <para><literal>s</literal> = <type>short</type> alignment (2 bytes on most machines).</para> </listitem> <listitem> - <para><literal>i</> = <type>int</type> alignment (4 bytes on most machines).</para> + <para><literal>i</literal> = <type>int</type> alignment (4 bytes on most machines).</para> </listitem> <listitem> - <para><literal>d</> = <type>double</type> alignment (8 bytes on many machines, but by no means all).</para> + <para><literal>d</literal> = <type>double</type> alignment (8 bytes on many machines, but by no means all).</para> </listitem> </itemizedlist> </para><note> @@ -7757,24 +7757,24 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< Possible values are <itemizedlist> <listitem> - <para><literal>p</>: Value must always be stored plain.</para> + <para><literal>p</literal>: Value must always be stored plain.</para> </listitem> <listitem> <para> - <literal>e</>: Value can be stored in a <quote>secondary</quote> + <literal>e</literal>: Value can be stored in a <quote>secondary</quote> relation (if relation has one, see <literal>pg_class.reltoastrelid</literal>). </para> </listitem> <listitem> - <para><literal>m</>: Value can be stored compressed inline.</para> + <para><literal>m</literal>: Value can be stored compressed inline.</para> </listitem> <listitem> - <para><literal>x</>: Value can be stored compressed inline or stored in <quote>secondary</quote> storage.</para> + <para><literal>x</literal>: Value can be stored compressed inline or stored in <quote>secondary</quote> storage.</para> </listitem> </itemizedlist> - Note that <literal>m</> columns can also be moved out to secondary - storage, but only as a last resort (<literal>e</> and <literal>x</> columns are + Note that <literal>m</literal> columns can also be moved out to secondary + storage, but only as a last resort (<literal>e</literal> and <literal>x</literal> columns are moved first). </para></entry> </row> @@ -7805,9 +7805,9 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><type>int4</type></entry> <entry></entry> <entry><para> - Domains use <structfield>typtypmod</structfield> to record the <literal>typmod</> + Domains use <structfield>typtypmod</structfield> to record the <literal>typmod</literal> to be applied to their base type (-1 if base type does not use a - <literal>typmod</>). -1 if this type is not a domain. + <literal>typmod</literal>). -1 if this type is not a domain. </para></entry> </row> @@ -7817,7 +7817,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry></entry> <entry><para> <structfield>typndims</structfield> is the number of array dimensions - for a domain over an array (that is, <structfield>typbasetype</> is + for a domain over an array (that is, <structfield>typbasetype</structfield> is an array type). Zero for types other than domains over array types. </para></entry> @@ -7842,7 +7842,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><type>pg_node_tree</type></entry> <entry></entry> <entry><para> - If <structfield>typdefaultbin</> is not null, it is the + If <structfield>typdefaultbin</structfield> is not null, it is the <function>nodeToString()</function> representation of a default expression for the type. This is only used for domains. @@ -7854,12 +7854,12 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><type>text</type></entry> <entry></entry> <entry><para> - <structfield>typdefault</> is null if the type has no associated - default value. If <structfield>typdefaultbin</> is not null, - <structfield>typdefault</> must contain a human-readable version of the - default expression represented by <structfield>typdefaultbin</>. If - <structfield>typdefaultbin</> is null and <structfield>typdefault</> is - not, then <structfield>typdefault</> is the external representation of + <structfield>typdefault</structfield> is null if the type has no associated + default value. If <structfield>typdefaultbin</structfield> is not null, + <structfield>typdefault</structfield> must contain a human-readable version of the + default expression represented by <structfield>typdefaultbin</structfield>. If + <structfield>typdefaultbin</structfield> is null and <structfield>typdefault</structfield> is + not, then <structfield>typdefault</structfield> is the external representation of the type's default value, which can be fed to the type's input converter to produce a constant. </para></entry> @@ -7882,13 +7882,13 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <para> <xref linkend="catalog-typcategory-table"> lists the system-defined values - of <structfield>typcategory</>. Any future additions to this list will + of <structfield>typcategory</structfield>. Any future additions to this list will also be upper-case ASCII letters. All other ASCII characters are reserved for user-defined categories. </para> <table id="catalog-typcategory-table"> - <title><structfield>typcategory</> Codes</title> + <title><structfield>typcategory</structfield> Codes</title> <tgroup cols="2"> <thead> @@ -7957,7 +7957,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </row> <row> <entry><literal>X</literal></entry> - <entry><type>unknown</> type</entry> + <entry><type>unknown</type> type</entry> </row> </tbody> </tgroup> @@ -7982,7 +7982,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </para> <table> - <title><structname>pg_user_mapping</> Columns</title> + <title><structname>pg_user_mapping</structname> Columns</title> <tgroup cols="4"> <thead> @@ -8023,7 +8023,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><type>text[]</type></entry> <entry></entry> <entry> - User mapping specific options, as <quote>keyword=value</> strings + User mapping specific options, as <quote>keyword=value</quote> strings </entry> </row> </tbody> @@ -8241,7 +8241,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </para> <table> - <title><structname>pg_available_extensions</> Columns</title> + <title><structname>pg_available_extensions</structname> Columns</title> <tgroup cols="3"> <thead> @@ -8303,7 +8303,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </para> <table> - <title><structname>pg_available_extension_versions</> Columns</title> + <title><structname>pg_available_extension_versions</structname> Columns</title> <tgroup cols="3"> <thead> @@ -8385,11 +8385,11 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <para> The view <structname>pg_config</structname> describes the compile-time configuration parameters of the currently installed - version of <productname>PostgreSQL</>. It is intended, for example, to + version of <productname>PostgreSQL</productname>. It is intended, for example, to be used by software packages that want to interface to - <productname>PostgreSQL</> to facilitate finding the required header + <productname>PostgreSQL</productname> to facilitate finding the required header files and libraries. It provides the same basic information as the - <xref linkend="app-pgconfig"> <productname>PostgreSQL</> client + <xref linkend="app-pgconfig"> <productname>PostgreSQL</productname> client application. </para> @@ -8399,7 +8399,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </para> <table> - <title><structname>pg_config</> Columns</title> + <title><structname>pg_config</structname> Columns</title> <tgroup cols="3"> <thead> <row> @@ -8470,15 +8470,15 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <note> <para> Cursors are used internally to implement some of the components - of <productname>PostgreSQL</>, such as procedural languages. - Therefore, the <structname>pg_cursors</> view might include cursors + of <productname>PostgreSQL</productname>, such as procedural languages. + Therefore, the <structname>pg_cursors</structname> view might include cursors that have not been explicitly created by the user. </para> </note> </para> <table> - <title><structname>pg_cursors</> Columns</title> + <title><structname>pg_cursors</structname> Columns</title> <tgroup cols="3"> <thead> @@ -8526,7 +8526,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><structfield>is_scrollable</structfield></entry> <entry><type>boolean</type></entry> <entry> - <literal>true</> if the cursor is scrollable (that is, it + <literal>true</literal> if the cursor is scrollable (that is, it allows rows to be retrieved in a nonsequential manner); <literal>false</literal> otherwise </entry> @@ -8557,16 +8557,16 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <para> The view <structname>pg_file_settings</structname> provides a summary of the contents of the server's configuration file(s). A row appears in - this view for each <quote>name = value</> entry appearing in the files, + this view for each <quote>name = value</quote> entry appearing in the files, with annotations indicating whether the value could be applied successfully. Additional row(s) may appear for problems not linked to - a <quote>name = value</> entry, such as syntax errors in the files. + a <quote>name = value</quote> entry, such as syntax errors in the files. </para> <para> This view is helpful for checking whether planned changes in the configuration files will work, or for diagnosing a previous failure. - Note that this view reports on the <emphasis>current</> contents of the + Note that this view reports on the <emphasis>current</emphasis> contents of the files, not on what was last applied by the server. (The <link linkend="view-pg-settings"><structname>pg_settings</structname></link> view is usually sufficient to determine that.) @@ -8578,7 +8578,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </para> <table> - <title><structname>pg_file_settings</> Columns</title> + <title><structname>pg_file_settings</structname> Columns</title> <tgroup cols="3"> <thead> @@ -8604,7 +8604,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <row> <entry><structfield>seqno</structfield></entry> <entry><structfield>integer</structfield></entry> - <entry>Order in which the entries are processed (1..<replaceable>n</>)</entry> + <entry>Order in which the entries are processed (1..<replaceable>n</replaceable>)</entry> </row> <row> <entry><structfield>name</structfield></entry> @@ -8634,14 +8634,14 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <para> If the configuration file contains syntax errors or invalid parameter names, the server will not attempt to apply any settings from it, and - therefore all the <structfield>applied</> fields will read as false. + therefore all the <structfield>applied</structfield> fields will read as false. In such a case there will be one or more rows with non-null <structfield>error</structfield> fields indicating the problem(s). Otherwise, individual settings will be applied if possible. If an individual setting cannot be applied (e.g., invalid value, or the setting cannot be changed after server start) it will have an appropriate message in the <structfield>error</structfield> field. Another way that - an entry might have <structfield>applied</> = false is that it is + an entry might have <structfield>applied</structfield> = false is that it is overridden by a later entry for the same parameter name; this case is not considered an error so nothing appears in the <structfield>error</structfield> field. @@ -8666,12 +8666,12 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< compatibility: it emulates a catalog that existed in <productname>PostgreSQL</productname> before version 8.1. It shows the names and members of all roles that are marked as not - <structfield>rolcanlogin</>, which is an approximation to the set + <structfield>rolcanlogin</structfield>, which is an approximation to the set of roles that are being used as groups. </para> <table> - <title><structname>pg_group</> Columns</title> + <title><structname>pg_group</structname> Columns</title> <tgroup cols="4"> <thead> @@ -8720,7 +8720,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <para> The view <structname>pg_hba_file_rules</structname> provides a summary of the contents of the client authentication configuration - file, <filename>pg_hba.conf</>. A row appears in this view for each + file, <filename>pg_hba.conf</filename>. A row appears in this view for each non-empty, non-comment line in the file, with annotations indicating whether the rule could be applied successfully. </para> @@ -8728,7 +8728,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <para> This view can be helpful for checking whether planned changes in the authentication configuration file will work, or for diagnosing a previous - failure. Note that this view reports on the <emphasis>current</> contents + failure. Note that this view reports on the <emphasis>current</emphasis> contents of the file, not on what was last loaded by the server. </para> @@ -8738,7 +8738,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </para> <table> - <title><structname>pg_hba_file_rules</> Columns</title> + <title><structname>pg_hba_file_rules</structname> Columns</title> <tgroup cols="3"> <thead> @@ -8753,7 +8753,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry><structfield>line_number</structfield></entry> <entry><structfield>integer</structfield></entry> <entry> - Line number of this rule in <filename>pg_hba.conf</> + Line number of this rule in <filename>pg_hba.conf</filename> </entry> </row> <row> @@ -8809,7 +8809,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <para> Usually, a row reflecting an incorrect entry will have values for only - the <structfield>line_number</> and <structfield>error</> fields. + the <structfield>line_number</structfield> and <structfield>error</structfield> fields. </para> <para> @@ -8831,7 +8831,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< </para> <table> - <title><structname>pg_indexes</> Columns</title> + <title><structname>pg_indexes</structname> Columns</title> <tgroup cols="4"> <thead> @@ -8912,12 +8912,12 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< in the same way as in <structname>pg_description</structname> or <structname>pg_depend</structname>). Also, the right to extend a relation is represented as a separate lockable object. - Also, <quote>advisory</> locks can be taken on numbers that have + Also, <quote>advisory</quote> locks can be taken on numbers that have user-defined meanings. </para> <table> - <title><structname>pg_locks</> Columns</title> + <title><structname>pg_locks</structname> Columns</title> <tgroup cols="4"> <thead> @@ -8935,15 +8935,15 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry></entry> <entry> Type of the lockable object: - <literal>relation</>, - <literal>extend</>, - <literal>page</>, - <literal>tuple</>, - <literal>transactionid</>, - <literal>virtualxid</>, - <literal>object</>, - <literal>userlock</>, or - <literal>advisory</> + <literal>relation</literal>, + <literal>extend</literal>, + <literal>page</literal>, + <literal>tuple</literal>, + <literal>transactionid</literal>, + <literal>virtualxid</literal>, + <literal>object</literal>, + <literal>userlock</literal>, or + <literal>advisory</literal> </entry> </row> <row> @@ -9025,7 +9025,7 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< <entry></entry> <entry> Column number targeted by the lock (the - <structfield>classid</> and <structfield>objid</> refer to the + <structfield>classid</structfield> and <structfield>objid</structfield> refer to the table itself), or zero if the target is some other general database object, or null if the target is not a general database object @@ -9107,23 +9107,23 @@ SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt>< Advisory locks can be acquired on keys consisting of either a single <type>bigint</type> value or two integer values. A <type>bigint</type> key is displayed with its - high-order half in the <structfield>classid</> column, its low-order half - in the <structfield>objid</> column, and <structfield>objsubid</> equal + high-order half in the <structfield>classid</structfield> column, its low-order half + in the <structfield>objid</structfield> column, and <structfield>objsubid</structfield> equal to 1. The original <type>bigint</type> value can be reassembled with the expression <literal>(classid::bigint << 32) | objid::bigint</literal>. Integer keys are displayed with the first key in the - <structfield>classid</> column, the second key in the <structfield>objid</> - column, and <structfield>objsubid</> equal to 2. The actual meaning of + <structfield>classid</structfield> column, the second key in the <structfield>objid</structfield> + column, and <structfield>objsubid</structfield> equal to 2. The actual meaning of the keys is up to the user. Advisory locks are local to each database, - so the <structfield>database</> column is meaningful for an advisory lock. + so the <structfield>database</structfield> column is meaningful for an advisory lock. </para> <para> <structname>pg_locks</structname> provides a global view of all locks in the database cluster, not only those relevant to the current database. Although its <structfield>relation</structfield> column can be joined - against <structname>pg_class</>.<structfield>oid</> to identify locked + against <structname>pg_class</structname>.<structfield>oid</structfield> to identify locked relations, this will only work correctly for relations in the current database (those for which the <structfield>database</structfield> column is either the current database's OID or zero). @@ -9141,7 +9141,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_stat_activity psa ON pl.pid = psa.pid; </programlisting> Also, if you are using prepared transactions, the - <structfield>virtualtransaction</> column can be joined to the + <structfield>virtualtransaction</structfield> column can be joined to the <structfield>transaction</structfield> column of the <link linkend="view-pg-prepared-xacts"><structname>pg_prepared_xacts</structname></link> view to get more information on prepared transactions that hold locks. @@ -9163,7 +9163,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx information about which processes are ahead of which others in lock wait queues, nor information about which processes are parallel workers running on behalf of which other client sessions. It is better to use - the <function>pg_blocking_pids()</> function + the <function>pg_blocking_pids()</function> function (see <xref linkend="functions-info-session-table">) to identify which process(es) a waiting process is blocked behind. </para> @@ -9172,10 +9172,10 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx The <structname>pg_locks</structname> view displays data from both the regular lock manager and the predicate lock manager, which are separate systems; in addition, the regular lock manager subdivides its - locks into regular and <firstterm>fast-path</> locks. + locks into regular and <firstterm>fast-path</firstterm> locks. This data is not guaranteed to be entirely consistent. When the view is queried, - data on fast-path locks (with <structfield>fastpath</> = <literal>true</>) + data on fast-path locks (with <structfield>fastpath</structfield> = <literal>true</literal>) is gathered from each backend one at a time, without freezing the state of the entire lock manager, so it is possible for locks to be taken or released while information is gathered. Note, however, that these locks are @@ -9218,7 +9218,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx </para> <table> - <title><structname>pg_matviews</> Columns</title> + <title><structname>pg_matviews</structname> Columns</title> <tgroup cols="4"> <thead> @@ -9291,7 +9291,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx </para> <table> - <title><structname>pg_policies</> Columns</title> + <title><structname>pg_policies</structname> Columns</title> <tgroup cols="4"> <thead> @@ -9381,7 +9381,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx </para> <table> - <title><structname>pg_prepared_statements</> Columns</title> + <title><structname>pg_prepared_statements</structname> Columns</title> <tgroup cols="3"> <thead> @@ -9467,7 +9467,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx </para> <table> - <title><structname>pg_prepared_xacts</> Columns</title> + <title><structname>pg_prepared_xacts</structname> Columns</title> <tgroup cols="4"> <thead> @@ -9706,7 +9706,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx <entry><structfield>slot_type</structfield></entry> <entry><type>text</type></entry> <entry></entry> - <entry>The slot type - <literal>physical</> or <literal>logical</></entry> + <entry>The slot type - <literal>physical</literal> or <literal>logical</literal></entry> </row> <row> @@ -9787,7 +9787,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx <entry></entry> <entry>The address (<literal>LSN</literal>) up to which the logical slot's consumer has confirmed receiving data. Data older than this is - not available anymore. <literal>NULL</> for physical slots. + not available anymore. <literal>NULL</literal> for physical slots. </entry> </row> @@ -9817,7 +9817,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx </para> <table> - <title><structname>pg_roles</> Columns</title> + <title><structname>pg_roles</structname> Columns</title> <tgroup cols="4"> <thead> @@ -9900,7 +9900,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx <entry><structfield>rolpassword</structfield></entry> <entry><type>text</type></entry> <entry></entry> - <entry>Not the password (always reads as <literal>********</>)</entry> + <entry>Not the password (always reads as <literal>********</literal>)</entry> </row> <row> @@ -9953,7 +9953,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx </para> <table> - <title><structname>pg_rules</> Columns</title> + <title><structname>pg_rules</structname> Columns</title> <tgroup cols="4"> <thead> @@ -9994,9 +9994,9 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx </table> <para> - The <structname>pg_rules</> view excludes the <literal>ON SELECT</> rules + The <structname>pg_rules</structname> view excludes the <literal>ON SELECT</literal> rules of views and materialized views; those can be seen in - <structname>pg_views</> and <structname>pg_matviews</>. + <structname>pg_views</structname> and <structname>pg_matviews</structname>. </para> </sect1> @@ -10011,11 +10011,11 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx <para> The view <structname>pg_seclabels</structname> provides information about security labels. It as an easier-to-query version of the - <link linkend="catalog-pg-seclabel"><structname>pg_seclabel</></> catalog. + <link linkend="catalog-pg-seclabel"><structname>pg_seclabel</structname></link> catalog. </para> <table> - <title><structname>pg_seclabels</> Columns</title> + <title><structname>pg_seclabels</structname> Columns</title> <tgroup cols="4"> <thead> @@ -10045,7 +10045,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx <entry></entry> <entry> For a security label on a table column, this is the column number (the - <structfield>objoid</> and <structfield>classoid</> refer to + <structfield>objoid</structfield> and <structfield>classoid</structfield> refer to the table itself). For all other object types, this column is zero. </entry> @@ -10105,7 +10105,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx </para> <table> - <title><structname>pg_sequences</> Columns</title> + <title><structname>pg_sequences</structname> Columns</title> <tgroup cols="4"> <thead> @@ -10206,12 +10206,12 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx interface to the <xref linkend="sql-show"> and <xref linkend="sql-set"> commands. It also provides access to some facts about each parameter that are - not directly available from <command>SHOW</>, such as minimum and + not directly available from <command>SHOW</command>, such as minimum and maximum values. </para> <table> - <title><structname>pg_settings</> Columns</title> + <title><structname>pg_settings</structname> Columns</title> <tgroup cols="3"> <thead> @@ -10260,8 +10260,8 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx <row> <entry><structfield>vartype</structfield></entry> <entry><type>text</type></entry> - <entry>Parameter type (<literal>bool</>, <literal>enum</>, - <literal>integer</>, <literal>real</>, or <literal>string</>) + <entry>Parameter type (<literal>bool</literal>, <literal>enum</literal>, + <literal>integer</literal>, <literal>real</literal>, or <literal>string</literal>) </entry> </row> <row> @@ -10306,7 +10306,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx values set from sources other than configuration files, or when examined by a user who is neither a superuser or a member of <literal>pg_read_all_settings</literal>); helpful when using - <literal>include</> directives in configuration files</entry> + <literal>include</literal> directives in configuration files</entry> </row> <row> <entry><structfield>sourceline</structfield></entry> @@ -10384,7 +10384,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx Changes to these settings can be made in <filename>postgresql.conf</filename> without restarting the server. They can also be set for a particular session in the connection request - packet (for example, via <application>libpq</>'s <literal>PGOPTIONS</> + packet (for example, via <application>libpq</application>'s <literal>PGOPTIONS</literal> environment variable), but only if the connecting user is a superuser. However, these settings never change in a session after it is started. If you change them in <filename>postgresql.conf</filename>, send a @@ -10402,7 +10402,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx Changes to these settings can be made in <filename>postgresql.conf</filename> without restarting the server. They can also be set for a particular session in the connection request - packet (for example, via <application>libpq</>'s <literal>PGOPTIONS</> + packet (for example, via <application>libpq</application>'s <literal>PGOPTIONS</literal> environment variable); any user can make such a change for their session. However, these settings never change in a session after it is started. If you change them in <filename>postgresql.conf</filename>, send a @@ -10418,10 +10418,10 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx <listitem> <para> These settings can be set from <filename>postgresql.conf</filename>, - or within a session via the <command>SET</> command; but only superusers - can change them via <command>SET</>. Changes in + or within a session via the <command>SET</command> command; but only superusers + can change them via <command>SET</command>. Changes in <filename>postgresql.conf</filename> will affect existing sessions - only if no session-local value has been established with <command>SET</>. + only if no session-local value has been established with <command>SET</command>. </para> </listitem> </varlistentry> @@ -10431,10 +10431,10 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx <listitem> <para> These settings can be set from <filename>postgresql.conf</filename>, - or within a session via the <command>SET</> command. Any user is + or within a session via the <command>SET</command> command. Any user is allowed to change their session-local value. Changes in <filename>postgresql.conf</filename> will affect existing sessions - only if no session-local value has been established with <command>SET</>. + only if no session-local value has been established with <command>SET</command>. </para> </listitem> </varlistentry> @@ -10473,7 +10473,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx compatibility: it emulates a catalog that existed in <productname>PostgreSQL</productname> before version 8.1. It shows properties of all roles that are marked as - <structfield>rolcanlogin</> in + <structfield>rolcanlogin</structfield> in <link linkend="catalog-pg-authid"><structname>pg_authid</structname></link>. </para> @@ -10486,7 +10486,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx </para> <table> - <title><structname>pg_shadow</> Columns</title> + <title><structname>pg_shadow</structname> Columns</title> <tgroup cols="4"> <thead> @@ -10600,7 +10600,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx </para> <table> - <title><structname>pg_stats</> Columns</title> + <title><structname>pg_stats</structname> Columns</title> <tgroup cols="4"> <thead> @@ -10663,7 +10663,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx If greater than zero, the estimated number of distinct values in the column. If less than zero, the negative of the number of distinct values divided by the number of rows. (The negated form is used when - <command>ANALYZE</> believes that the number of distinct values is + <command>ANALYZE</command> believes that the number of distinct values is likely to increase as the table grows; the positive form is used when the column seems to have a fixed number of possible values.) For example, -1 indicates a unique column in which the number of distinct @@ -10699,10 +10699,10 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx <entry> A list of values that divide the column's values into groups of approximately equal population. The values in - <structfield>most_common_vals</>, if present, are omitted from this + <structfield>most_common_vals</structfield>, if present, are omitted from this histogram calculation. (This column is null if the column data type - does not have a <literal><</> operator or if the - <structfield>most_common_vals</> list accounts for the entire + does not have a <literal><</literal> operator or if the + <structfield>most_common_vals</structfield> list accounts for the entire population.) </entry> </row> @@ -10717,7 +10717,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx When the value is near -1 or +1, an index scan on the column will be estimated to be cheaper than when it is near zero, due to reduction of random access to the disk. (This column is null if the column data - type does not have a <literal><</> operator.) + type does not have a <literal><</literal> operator.) </entry> </row> @@ -10761,7 +10761,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx <para> The maximum number of entries in the array fields can be controlled on a - column-by-column basis using the <command>ALTER TABLE SET STATISTICS</> + column-by-column basis using the <command>ALTER TABLE SET STATISTICS</command> command, or globally by setting the <xref linkend="guc-default-statistics-target"> run-time parameter. </para> @@ -10781,7 +10781,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx </para> <table> - <title><structname>pg_tables</> Columns</title> + <title><structname>pg_tables</structname> Columns</title> <tgroup cols="4"> <thead> @@ -10862,7 +10862,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx </para> <table> - <title><structname>pg_timezone_abbrevs</> Columns</title> + <title><structname>pg_timezone_abbrevs</structname> Columns</title> <tgroup cols="3"> <thead> @@ -10910,7 +10910,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx <para> The view <structname>pg_timezone_names</structname> provides a list - of time zone names that are recognized by <command>SET TIMEZONE</>, + of time zone names that are recognized by <command>SET TIMEZONE</command>, along with their associated abbreviations, UTC offsets, and daylight-savings status. (Technically, <productname>PostgreSQL</productname> does not use UTC because leap @@ -10919,11 +10919,11 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx linkend="view-pg-timezone-abbrevs"><structname>pg_timezone_abbrevs</structname></link>, many of these names imply a set of daylight-savings transition date rules. Therefore, the associated information changes across local DST boundaries. The displayed information is computed based on the current - value of <function>CURRENT_TIMESTAMP</>. + value of <function>CURRENT_TIMESTAMP</function>. </para> <table> - <title><structname>pg_timezone_names</> Columns</title> + <title><structname>pg_timezone_names</structname> Columns</title> <tgroup cols="3"> <thead> @@ -10976,7 +10976,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx </para> <table> - <title><structname>pg_user</> Columns</title> + <title><structname>pg_user</structname> Columns</title> <tgroup cols="3"> <thead> @@ -11032,7 +11032,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx <row> <entry><structfield>passwd</structfield></entry> <entry><type>text</type></entry> - <entry>Not the password (always reads as <literal>********</>)</entry> + <entry>Not the password (always reads as <literal>********</literal>)</entry> </row> <row> @@ -11069,7 +11069,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx </para> <table> - <title><structname>pg_user_mappings</> Columns</title> + <title><structname>pg_user_mappings</structname> Columns</title> <tgroup cols="4"> <thead> @@ -11126,7 +11126,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx <entry><type>text[]</type></entry> <entry></entry> <entry> - User mapping specific options, as <quote>keyword=value</> strings + User mapping specific options, as <quote>keyword=value</quote> strings </entry> </row> </tbody> @@ -11141,12 +11141,12 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx <listitem> <para> current user is the user being mapped, and owns the server or - holds <literal>USAGE</> privilege on it + holds <literal>USAGE</literal> privilege on it </para> </listitem> <listitem> <para> - current user is the server owner and mapping is for <literal>PUBLIC</> + current user is the server owner and mapping is for <literal>PUBLIC</literal> </para> </listitem> <listitem> @@ -11173,7 +11173,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx </para> <table> - <title><structname>pg_views</> Columns</title> + <title><structname>pg_views</structname> Columns</title> <tgroup cols="4"> <thead> diff --git a/doc/src/sgml/charset.sgml b/doc/src/sgml/charset.sgml index 63f7de5b438..3874a3f1ea8 100644 --- a/doc/src/sgml/charset.sgml +++ b/doc/src/sgml/charset.sgml @@ -35,12 +35,12 @@ <sect1 id="locale"> <title>Locale Support</title> - <indexterm zone="locale"><primary>locale</></> + <indexterm zone="locale"><primary>locale</primary></indexterm> <para> - <firstterm>Locale</> support refers to an application respecting + <firstterm>Locale</firstterm> support refers to an application respecting cultural preferences regarding alphabets, sorting, number - formatting, etc. <productname>PostgreSQL</> uses the standard ISO + formatting, etc. <productname>PostgreSQL</productname> uses the standard ISO C and <acronym>POSIX</acronym> locale facilities provided by the server operating system. For additional information refer to the documentation of your system. @@ -67,14 +67,14 @@ initdb --locale=sv_SE <para> This example for Unix systems sets the locale to Swedish - (<literal>sv</>) as spoken - in Sweden (<literal>SE</>). Other possibilities might include - <literal>en_US</> (U.S. English) and <literal>fr_CA</> (French + (<literal>sv</literal>) as spoken + in Sweden (<literal>SE</literal>). Other possibilities might include + <literal>en_US</literal> (U.S. English) and <literal>fr_CA</literal> (French Canadian). If more than one character set can be used for a locale then the specifications can take the form - <replaceable>language_territory.codeset</>. For example, - <literal>fr_BE.UTF-8</> represents the French language (fr) as - spoken in Belgium (BE), with a <acronym>UTF-8</> character set + <replaceable>language_territory.codeset</replaceable>. For example, + <literal>fr_BE.UTF-8</literal> represents the French language (fr) as + spoken in Belgium (BE), with a <acronym>UTF-8</acronym> character set encoding. </para> @@ -82,9 +82,9 @@ initdb --locale=sv_SE What locales are available on your system under what names depends on what was provided by the operating system vendor and what was installed. On most Unix systems, the command - <literal>locale -a</> will provide a list of available locales. - Windows uses more verbose locale names, such as <literal>German_Germany</> - or <literal>Swedish_Sweden.1252</>, but the principles are the same. + <literal>locale -a</literal> will provide a list of available locales. + Windows uses more verbose locale names, such as <literal>German_Germany</literal> + or <literal>Swedish_Sweden.1252</literal>, but the principles are the same. </para> <para> @@ -97,28 +97,28 @@ initdb --locale=sv_SE <tgroup cols="2"> <tbody> <row> - <entry><envar>LC_COLLATE</></> - <entry>String sort order</> + <entry><envar>LC_COLLATE</envar></entry> + <entry>String sort order</entry> </row> <row> - <entry><envar>LC_CTYPE</></> - <entry>Character classification (What is a letter? Its upper-case equivalent?)</> + <entry><envar>LC_CTYPE</envar></entry> + <entry>Character classification (What is a letter? Its upper-case equivalent?)</entry> </row> <row> - <entry><envar>LC_MESSAGES</></> - <entry>Language of messages</> + <entry><envar>LC_MESSAGES</envar></entry> + <entry>Language of messages</entry> </row> <row> - <entry><envar>LC_MONETARY</></> - <entry>Formatting of currency amounts</> + <entry><envar>LC_MONETARY</envar></entry> + <entry>Formatting of currency amounts</entry> </row> <row> - <entry><envar>LC_NUMERIC</></> - <entry>Formatting of numbers</> + <entry><envar>LC_NUMERIC</envar></entry> + <entry>Formatting of numbers</entry> </row> <row> - <entry><envar>LC_TIME</></> - <entry>Formatting of dates and times</> + <entry><envar>LC_TIME</envar></entry> + <entry>Formatting of dates and times</entry> </row> </tbody> </tgroup> @@ -133,8 +133,8 @@ initdb --locale=sv_SE <para> If you want the system to behave as if it had no locale support, - use the special locale name <literal>C</>, or equivalently - <literal>POSIX</>. + use the special locale name <literal>C</literal>, or equivalently + <literal>POSIX</literal>. </para> <para> @@ -192,14 +192,14 @@ initdb --locale=sv_SE settings for the purpose of setting the language of messages. If in doubt, please refer to the documentation of your operating system, in particular the documentation about - <application>gettext</>. + <application>gettext</application>. </para> </note> <para> To enable messages to be translated to the user's preferred language, <acronym>NLS</acronym> must have been selected at build time - (<literal>configure --enable-nls</>). All other locale support is + (<literal>configure --enable-nls</literal>). All other locale support is built in automatically. </para> </sect2> @@ -213,63 +213,63 @@ initdb --locale=sv_SE <itemizedlist> <listitem> <para> - Sort order in queries using <literal>ORDER BY</> or the standard + Sort order in queries using <literal>ORDER BY</literal> or the standard comparison operators on textual data - <indexterm><primary>ORDER BY</><secondary>and locales</></indexterm> + <indexterm><primary>ORDER BY</primary><secondary>and locales</secondary></indexterm> </para> </listitem> <listitem> <para> - The <function>upper</>, <function>lower</>, and <function>initcap</> + The <function>upper</function>, <function>lower</function>, and <function>initcap</function> functions - <indexterm><primary>upper</><secondary>and locales</></indexterm> - <indexterm><primary>lower</><secondary>and locales</></indexterm> + <indexterm><primary>upper</primary><secondary>and locales</secondary></indexterm> + <indexterm><primary>lower</primary><secondary>and locales</secondary></indexterm> </para> </listitem> <listitem> <para> - Pattern matching operators (<literal>LIKE</>, <literal>SIMILAR TO</>, + Pattern matching operators (<literal>LIKE</literal>, <literal>SIMILAR TO</literal>, and POSIX-style regular expressions); locales affect both case insensitive matching and the classification of characters by character-class regular expressions - <indexterm><primary>LIKE</><secondary>and locales</></indexterm> - <indexterm><primary>regular expressions</><secondary>and locales</></indexterm> + <indexterm><primary>LIKE</primary><secondary>and locales</secondary></indexterm> + <indexterm><primary>regular expressions</primary><secondary>and locales</secondary></indexterm> </para> </listitem> <listitem> <para> - The <function>to_char</> family of functions - <indexterm><primary>to_char</><secondary>and locales</></indexterm> + The <function>to_char</function> family of functions + <indexterm><primary>to_char</primary><secondary>and locales</secondary></indexterm> </para> </listitem> <listitem> <para> - The ability to use indexes with <literal>LIKE</> clauses + The ability to use indexes with <literal>LIKE</literal> clauses </para> </listitem> </itemizedlist> </para> <para> - The drawback of using locales other than <literal>C</> or - <literal>POSIX</> in <productname>PostgreSQL</> is its performance + The drawback of using locales other than <literal>C</literal> or + <literal>POSIX</literal> in <productname>PostgreSQL</productname> is its performance impact. It slows character handling and prevents ordinary indexes - from being used by <literal>LIKE</>. For this reason use locales + from being used by <literal>LIKE</literal>. For this reason use locales only if you actually need them. </para> <para> - As a workaround to allow <productname>PostgreSQL</> to use indexes - with <literal>LIKE</> clauses under a non-C locale, several custom + As a workaround to allow <productname>PostgreSQL</productname> to use indexes + with <literal>LIKE</literal> clauses under a non-C locale, several custom operator classes exist. These allow the creation of an index that performs a strict character-by-character comparison, ignoring locale comparison rules. Refer to <xref linkend="indexes-opclass"> for more information. Another approach is to create indexes using - the <literal>C</> collation, as discussed in + the <literal>C</literal> collation, as discussed in <xref linkend="collation">. </para> </sect2> @@ -286,20 +286,20 @@ initdb --locale=sv_SE </para> <para> - Check that <productname>PostgreSQL</> is actually using the locale - that you think it is. The <envar>LC_COLLATE</> and <envar>LC_CTYPE</> + Check that <productname>PostgreSQL</productname> is actually using the locale + that you think it is. The <envar>LC_COLLATE</envar> and <envar>LC_CTYPE</envar> settings are determined when a database is created, and cannot be changed except by creating a new database. Other locale - settings including <envar>LC_MESSAGES</> and <envar>LC_MONETARY</> + settings including <envar>LC_MESSAGES</envar> and <envar>LC_MONETARY</envar> are initially determined by the environment the server is started in, but can be changed on-the-fly. You can check the active locale - settings using the <command>SHOW</> command. + settings using the <command>SHOW</command> command. </para> <para> - The directory <filename>src/test/locale</> in the source + The directory <filename>src/test/locale</filename> in the source distribution contains a test suite for - <productname>PostgreSQL</>'s locale support. + <productname>PostgreSQL</productname>'s locale support. </para> <para> @@ -313,7 +313,7 @@ initdb --locale=sv_SE <para> Maintaining catalogs of message translations requires the on-going efforts of many volunteers that want to see - <productname>PostgreSQL</> speak their preferred language well. + <productname>PostgreSQL</productname> speak their preferred language well. If messages in your language are currently not available or not fully translated, your assistance would be appreciated. If you want to help, refer to <xref linkend="nls"> or write to the developers' @@ -326,7 +326,7 @@ initdb --locale=sv_SE <sect1 id="collation"> <title>Collation Support</title> - <indexterm zone="collation"><primary>collation</></> + <indexterm zone="collation"><primary>collation</primary></indexterm> <para> The collation feature allows specifying the sort order and character @@ -370,9 +370,9 @@ initdb --locale=sv_SE function or operator call is derived from the arguments, as described below. In addition to comparison operators, collations are taken into account by functions that convert between lower and upper case - letters, such as <function>lower</>, <function>upper</>, and - <function>initcap</>; by pattern matching operators; and by - <function>to_char</> and related functions. + letters, such as <function>lower</function>, <function>upper</function>, and + <function>initcap</function>; by pattern matching operators; and by + <function>to_char</function> and related functions. </para> <para> @@ -452,7 +452,7 @@ SELECT a < ('foo' COLLATE "fr_FR") FROM test1; SELECT a < b FROM test1; </programlisting> the parser cannot determine which collation to apply, since the - <structfield>a</> and <structfield>b</> columns have conflicting + <structfield>a</structfield> and <structfield>b</structfield> columns have conflicting implicit collations. Since the <literal><</literal> operator does need to know which collation to use, this will result in an error. The error can be resolved by attaching an explicit collation @@ -468,7 +468,7 @@ SELECT a COLLATE "de_DE" < b FROM test1; <programlisting> SELECT a || b FROM test1; </programlisting> - does not result in an error, because the <literal>||</> operator + does not result in an error, because the <literal>||</literal> operator does not care about collations: its result is the same regardless of the collation. </para> @@ -486,8 +486,8 @@ SELECT * FROM test1 ORDER BY a || 'foo'; <programlisting> SELECT * FROM test1 ORDER BY a || b; </programlisting> - results in an error, because even though the <literal>||</> operator - doesn't need to know a collation, the <literal>ORDER BY</> clause does. + results in an error, because even though the <literal>||</literal> operator + doesn't need to know a collation, the <literal>ORDER BY</literal> clause does. As before, the conflict can be resolved with an explicit collation specifier: <programlisting> @@ -508,7 +508,7 @@ SELECT * FROM test1 ORDER BY a || b COLLATE "fr_FR"; operating system C library. These are the locales that most tools provided by the operating system use. Another provider is <literal>icu</literal>, which uses the external - ICU<indexterm><primary>ICU</></> library. ICU locales can only be + ICU<indexterm><primary>ICU</primary></indexterm> library. ICU locales can only be used if support for ICU was configured when PostgreSQL was built. </para> @@ -541,14 +541,14 @@ SELECT * FROM test1 ORDER BY a || b COLLATE "fr_FR"; <title>Standard Collations</title> <para> - On all platforms, the collations named <literal>default</>, - <literal>C</>, and <literal>POSIX</> are available. Additional + On all platforms, the collations named <literal>default</literal>, + <literal>C</literal>, and <literal>POSIX</literal> are available. Additional collations may be available depending on operating system support. - The <literal>default</> collation selects the <symbol>LC_COLLATE</symbol> + The <literal>default</literal> collation selects the <symbol>LC_COLLATE</symbol> and <symbol>LC_CTYPE</symbol> values specified at database creation time. - The <literal>C</> and <literal>POSIX</> collations both specify - <quote>traditional C</> behavior, in which only the ASCII letters - <quote><literal>A</></quote> through <quote><literal>Z</></quote> + The <literal>C</literal> and <literal>POSIX</literal> collations both specify + <quote>traditional C</quote> behavior, in which only the ASCII letters + <quote><literal>A</literal></quote> through <quote><literal>Z</literal></quote> are treated as letters, and sorting is done strictly by character code byte values. </para> @@ -565,7 +565,7 @@ SELECT * FROM test1 ORDER BY a || b COLLATE "fr_FR"; <para> If the operating system provides support for using multiple locales - within a single program (<function>newlocale</> and related functions), + within a single program (<function>newlocale</function> and related functions), or if support for ICU is configured, then when a database cluster is initialized, <command>initdb</command> populates the system catalog <literal>pg_collation</literal> with @@ -618,8 +618,8 @@ SELECT * FROM test1 ORDER BY a || b COLLATE "fr_FR"; within a given database even though it would not be unique globally. Use of the stripped collation names is recommended, since it will make one less thing you need to change if you decide to change to - another database encoding. Note however that the <literal>default</>, - <literal>C</>, and <literal>POSIX</> collations can be used regardless of + another database encoding. Note however that the <literal>default</literal>, + <literal>C</literal>, and <literal>POSIX</literal> collations can be used regardless of the database encoding. </para> @@ -630,7 +630,7 @@ SELECT * FROM test1 ORDER BY a || b COLLATE "fr_FR"; <programlisting> SELECT a COLLATE "C" < b COLLATE "POSIX" FROM test1; </programlisting> - will draw an error even though the <literal>C</> and <literal>POSIX</> + will draw an error even though the <literal>C</literal> and <literal>POSIX</literal> collations have identical behaviors. Mixing stripped and non-stripped collation names is therefore not recommended. </para> @@ -691,7 +691,7 @@ SELECT a COLLATE "C" < b COLLATE "POSIX" FROM test1; database encoding is one of these, ICU collation entries in <literal>pg_collation</literal> are ignored. Attempting to use one will draw an error along the lines of <quote>collation "de-x-icu" for - encoding "WIN874" does not exist</>. + encoding "WIN874" does not exist</quote>. </para> </sect4> </sect3> @@ -889,30 +889,30 @@ CREATE COLLATION french FROM "fr-x-icu"; <sect1 id="multibyte"> <title>Character Set Support</title> - <indexterm zone="multibyte"><primary>character set</></> + <indexterm zone="multibyte"><primary>character set</primary></indexterm> <para> The character set support in <productname>PostgreSQL</productname> allows you to store text in a variety of character sets (also called encodings), including single-byte character sets such as the ISO 8859 series and - multiple-byte character sets such as <acronym>EUC</> (Extended Unix + multiple-byte character sets such as <acronym>EUC</acronym> (Extended Unix Code), UTF-8, and Mule internal code. All supported character sets can be used transparently by clients, but a few are not supported for use within the server (that is, as a server-side encoding). The default character set is selected while initializing your <productname>PostgreSQL</productname> database - cluster using <command>initdb</>. It can be overridden when you + cluster using <command>initdb</command>. It can be overridden when you create a database, so you can have multiple databases each with a different character set. </para> <para> An important restriction, however, is that each database's character set - must be compatible with the database's <envar>LC_CTYPE</> (character - classification) and <envar>LC_COLLATE</> (string sort order) locale - settings. For <literal>C</> or - <literal>POSIX</> locale, any character set is allowed, but for other + must be compatible with the database's <envar>LC_CTYPE</envar> (character + classification) and <envar>LC_COLLATE</envar> (string sort order) locale + settings. For <literal>C</literal> or + <literal>POSIX</literal> locale, any character set is allowed, but for other libc-provided locales there is only one character set that will work correctly. (On Windows, however, UTF-8 encoding can be used with any locale.) @@ -954,7 +954,7 @@ CREATE COLLATION french FROM "fr-x-icu"; <entry>No</entry> <entry>No</entry> <entry>1-2</entry> - <entry><literal>WIN950</>, <literal>Windows950</></entry> + <entry><literal>WIN950</literal>, <literal>Windows950</literal></entry> </row> <row> <entry><literal>EUC_CN</literal></entry> @@ -1017,11 +1017,11 @@ CREATE COLLATION french FROM "fr-x-icu"; <entry>No</entry> <entry>No</entry> <entry>1-2</entry> - <entry><literal>WIN936</>, <literal>Windows936</></entry> + <entry><literal>WIN936</literal>, <literal>Windows936</literal></entry> </row> <row> <entry><literal>ISO_8859_5</literal></entry> - <entry>ISO 8859-5, <acronym>ECMA</> 113</entry> + <entry>ISO 8859-5, <acronym>ECMA</acronym> 113</entry> <entry>Latin/Cyrillic</entry> <entry>Yes</entry> <entry>Yes</entry> @@ -1030,7 +1030,7 @@ CREATE COLLATION french FROM "fr-x-icu"; </row> <row> <entry><literal>ISO_8859_6</literal></entry> - <entry>ISO 8859-6, <acronym>ECMA</> 114</entry> + <entry>ISO 8859-6, <acronym>ECMA</acronym> 114</entry> <entry>Latin/Arabic</entry> <entry>Yes</entry> <entry>Yes</entry> @@ -1039,7 +1039,7 @@ CREATE COLLATION french FROM "fr-x-icu"; </row> <row> <entry><literal>ISO_8859_7</literal></entry> - <entry>ISO 8859-7, <acronym>ECMA</> 118</entry> + <entry>ISO 8859-7, <acronym>ECMA</acronym> 118</entry> <entry>Latin/Greek</entry> <entry>Yes</entry> <entry>Yes</entry> @@ -1048,7 +1048,7 @@ CREATE COLLATION french FROM "fr-x-icu"; </row> <row> <entry><literal>ISO_8859_8</literal></entry> - <entry>ISO 8859-8, <acronym>ECMA</> 121</entry> + <entry>ISO 8859-8, <acronym>ECMA</acronym> 121</entry> <entry>Latin/Hebrew</entry> <entry>Yes</entry> <entry>Yes</entry> @@ -1057,7 +1057,7 @@ CREATE COLLATION french FROM "fr-x-icu"; </row> <row> <entry><literal>JOHAB</literal></entry> - <entry><acronym>JOHAB</></entry> + <entry><acronym>JOHAB</acronym></entry> <entry>Korean (Hangul)</entry> <entry>No</entry> <entry>No</entry> @@ -1071,7 +1071,7 @@ CREATE COLLATION french FROM "fr-x-icu"; <entry>Yes</entry> <entry>Yes</entry> <entry>1</entry> - <entry><literal>KOI8</></entry> + <entry><literal>KOI8</literal></entry> </row> <row> <entry><literal>KOI8U</literal></entry> @@ -1084,57 +1084,57 @@ CREATE COLLATION french FROM "fr-x-icu"; </row> <row> <entry><literal>LATIN1</literal></entry> - <entry>ISO 8859-1, <acronym>ECMA</> 94</entry> + <entry>ISO 8859-1, <acronym>ECMA</acronym> 94</entry> <entry>Western European</entry> <entry>Yes</entry> <entry>Yes</entry> <entry>1</entry> - <entry><literal>ISO88591</></entry> + <entry><literal>ISO88591</literal></entry> </row> <row> <entry><literal>LATIN2</literal></entry> - <entry>ISO 8859-2, <acronym>ECMA</> 94</entry> + <entry>ISO 8859-2, <acronym>ECMA</acronym> 94</entry> <entry>Central European</entry> <entry>Yes</entry> <entry>Yes</entry> <entry>1</entry> - <entry><literal>ISO88592</></entry> + <entry><literal>ISO88592</literal></entry> </row> <row> <entry><literal>LATIN3</literal></entry> - <entry>ISO 8859-3, <acronym>ECMA</> 94</entry> + <entry>ISO 8859-3, <acronym>ECMA</acronym> 94</entry> <entry>South European</entry> <entry>Yes</entry> <entry>Yes</entry> <entry>1</entry> - <entry><literal>ISO88593</></entry> + <entry><literal>ISO88593</literal></entry> </row> <row> <entry><literal>LATIN4</literal></entry> - <entry>ISO 8859-4, <acronym>ECMA</> 94</entry> + <entry>ISO 8859-4, <acronym>ECMA</acronym> 94</entry> <entry>North European</entry> <entry>Yes</entry> <entry>Yes</entry> <entry>1</entry> - <entry><literal>ISO88594</></entry> + <entry><literal>ISO88594</literal></entry> </row> <row> <entry><literal>LATIN5</literal></entry> - <entry>ISO 8859-9, <acronym>ECMA</> 128</entry> + <entry>ISO 8859-9, <acronym>ECMA</acronym> 128</entry> <entry>Turkish</entry> <entry>Yes</entry> <entry>Yes</entry> <entry>1</entry> - <entry><literal>ISO88599</></entry> + <entry><literal>ISO88599</literal></entry> </row> <row> <entry><literal>LATIN6</literal></entry> - <entry>ISO 8859-10, <acronym>ECMA</> 144</entry> + <entry>ISO 8859-10, <acronym>ECMA</acronym> 144</entry> <entry>Nordic</entry> <entry>Yes</entry> <entry>Yes</entry> <entry>1</entry> - <entry><literal>ISO885910</></entry> + <entry><literal>ISO885910</literal></entry> </row> <row> <entry><literal>LATIN7</literal></entry> @@ -1143,7 +1143,7 @@ CREATE COLLATION french FROM "fr-x-icu"; <entry>Yes</entry> <entry>Yes</entry> <entry>1</entry> - <entry><literal>ISO885913</></entry> + <entry><literal>ISO885913</literal></entry> </row> <row> <entry><literal>LATIN8</literal></entry> @@ -1152,7 +1152,7 @@ CREATE COLLATION french FROM "fr-x-icu"; <entry>Yes</entry> <entry>Yes</entry> <entry>1</entry> - <entry><literal>ISO885914</></entry> + <entry><literal>ISO885914</literal></entry> </row> <row> <entry><literal>LATIN9</literal></entry> @@ -1161,16 +1161,16 @@ CREATE COLLATION french FROM "fr-x-icu"; <entry>Yes</entry> <entry>Yes</entry> <entry>1</entry> - <entry><literal>ISO885915</></entry> + <entry><literal>ISO885915</literal></entry> </row> <row> <entry><literal>LATIN10</literal></entry> - <entry>ISO 8859-16, <acronym>ASRO</> SR 14111</entry> + <entry>ISO 8859-16, <acronym>ASRO</acronym> SR 14111</entry> <entry>Romanian</entry> <entry>Yes</entry> <entry>No</entry> <entry>1</entry> - <entry><literal>ISO885916</></entry> + <entry><literal>ISO885916</literal></entry> </row> <row> <entry><literal>MULE_INTERNAL</literal></entry> @@ -1188,7 +1188,7 @@ CREATE COLLATION french FROM "fr-x-icu"; <entry>No</entry> <entry>No</entry> <entry>1-2</entry> - <entry><literal>Mskanji</>, <literal>ShiftJIS</>, <literal>WIN932</>, <literal>Windows932</></entry> + <entry><literal>Mskanji</literal>, <literal>ShiftJIS</literal>, <literal>WIN932</literal>, <literal>Windows932</literal></entry> </row> <row> <entry><literal>SHIFT_JIS_2004</literal></entry> @@ -1202,7 +1202,7 @@ CREATE COLLATION french FROM "fr-x-icu"; <row> <entry><literal>SQL_ASCII</literal></entry> <entry>unspecified (see text)</entry> - <entry><emphasis>any</></entry> + <entry><emphasis>any</emphasis></entry> <entry>Yes</entry> <entry>No</entry> <entry>1</entry> @@ -1215,16 +1215,16 @@ CREATE COLLATION french FROM "fr-x-icu"; <entry>No</entry> <entry>No</entry> <entry>1-2</entry> - <entry><literal>WIN949</>, <literal>Windows949</></entry> + <entry><literal>WIN949</literal>, <literal>Windows949</literal></entry> </row> <row> <entry><literal>UTF8</literal></entry> <entry>Unicode, 8-bit</entry> - <entry><emphasis>all</></entry> + <entry><emphasis>all</emphasis></entry> <entry>Yes</entry> <entry>Yes</entry> <entry>1-4</entry> - <entry><literal>Unicode</></entry> + <entry><literal>Unicode</literal></entry> </row> <row> <entry><literal>WIN866</literal></entry> @@ -1233,7 +1233,7 @@ CREATE COLLATION french FROM "fr-x-icu"; <entry>Yes</entry> <entry>Yes</entry> <entry>1</entry> - <entry><literal>ALT</></entry> + <entry><literal>ALT</literal></entry> </row> <row> <entry><literal>WIN874</literal></entry> @@ -1260,7 +1260,7 @@ CREATE COLLATION french FROM "fr-x-icu"; <entry>Yes</entry> <entry>Yes</entry> <entry>1</entry> - <entry><literal>WIN</></entry> + <entry><literal>WIN</literal></entry> </row> <row> <entry><literal>WIN1252</literal></entry> @@ -1323,30 +1323,30 @@ CREATE COLLATION french FROM "fr-x-icu"; <entry>Yes</entry> <entry>Yes</entry> <entry>1</entry> - <entry><literal>ABC</>, <literal>TCVN</>, <literal>TCVN5712</>, <literal>VSCII</></entry> + <entry><literal>ABC</literal>, <literal>TCVN</literal>, <literal>TCVN5712</literal>, <literal>VSCII</literal></entry> </row> </tbody> </tgroup> </table> <para> - Not all client <acronym>API</>s support all the listed character sets. For example, the - <productname>PostgreSQL</> - JDBC driver does not support <literal>MULE_INTERNAL</>, <literal>LATIN6</>, - <literal>LATIN8</>, and <literal>LATIN10</>. + Not all client <acronym>API</acronym>s support all the listed character sets. For example, the + <productname>PostgreSQL</productname> + JDBC driver does not support <literal>MULE_INTERNAL</literal>, <literal>LATIN6</literal>, + <literal>LATIN8</literal>, and <literal>LATIN10</literal>. </para> <para> - The <literal>SQL_ASCII</> setting behaves considerably differently + The <literal>SQL_ASCII</literal> setting behaves considerably differently from the other settings. When the server character set is - <literal>SQL_ASCII</>, the server interprets byte values 0-127 + <literal>SQL_ASCII</literal>, the server interprets byte values 0-127 according to the ASCII standard, while byte values 128-255 are taken as uninterpreted characters. No encoding conversion will be done when - the setting is <literal>SQL_ASCII</>. Thus, this setting is not so + the setting is <literal>SQL_ASCII</literal>. Thus, this setting is not so much a declaration that a specific encoding is in use, as a declaration of ignorance about the encoding. In most cases, if you are working with any non-ASCII data, it is unwise to use the - <literal>SQL_ASCII</> setting because + <literal>SQL_ASCII</literal> setting because <productname>PostgreSQL</productname> will be unable to help you by converting or validating non-ASCII characters. </para> @@ -1356,7 +1356,7 @@ CREATE COLLATION french FROM "fr-x-icu"; <title>Setting the Character Set</title> <para> - <command>initdb</> defines the default character set (encoding) + <command>initdb</command> defines the default character set (encoding) for a <productname>PostgreSQL</productname> cluster. For example, <screen> @@ -1367,8 +1367,8 @@ initdb -E EUC_JP <literal>EUC_JP</literal> (Extended Unix Code for Japanese). You can use <option>--encoding</option> instead of <option>-E</option> if you prefer longer option strings. - If no <option>-E</> or <option>--encoding</option> option is - given, <command>initdb</> attempts to determine the appropriate + If no <option>-E</option> or <option>--encoding</option> option is + given, <command>initdb</command> attempts to determine the appropriate encoding to use based on the specified or default locale. </para> @@ -1388,7 +1388,7 @@ createdb -E EUC_KR -T template0 --lc-collate=ko_KR.euckr --lc-ctype=ko_KR.euckr CREATE DATABASE korean WITH ENCODING 'EUC_KR' LC_COLLATE='ko_KR.euckr' LC_CTYPE='ko_KR.euckr' TEMPLATE=template0; </programlisting> - Notice that the above commands specify copying the <literal>template0</> + Notice that the above commands specify copying the <literal>template0</literal> database. When copying any other database, the encoding and locale settings cannot be changed from those of the source database, because that might result in corrupt data. For more information see @@ -1420,7 +1420,7 @@ $ <userinput>psql -l</userinput> <important> <para> On most modern operating systems, <productname>PostgreSQL</productname> - can determine which character set is implied by the <envar>LC_CTYPE</> + can determine which character set is implied by the <envar>LC_CTYPE</envar> setting, and it will enforce that only the matching database encoding is used. On older systems it is your responsibility to ensure that you use the encoding expected by the locale you have selected. A mistake in @@ -1430,9 +1430,9 @@ $ <userinput>psql -l</userinput> <para> <productname>PostgreSQL</productname> will allow superusers to create - databases with <literal>SQL_ASCII</> encoding even when - <envar>LC_CTYPE</> is not <literal>C</> or <literal>POSIX</>. As noted - above, <literal>SQL_ASCII</> does not enforce that the data stored in + databases with <literal>SQL_ASCII</literal> encoding even when + <envar>LC_CTYPE</envar> is not <literal>C</literal> or <literal>POSIX</literal>. As noted + above, <literal>SQL_ASCII</literal> does not enforce that the data stored in the database has any particular encoding, and so this choice poses risks of locale-dependent misbehavior. Using this combination of settings is deprecated and may someday be forbidden altogether. @@ -1447,7 +1447,7 @@ $ <userinput>psql -l</userinput> <productname>PostgreSQL</productname> supports automatic character set conversion between server and client for certain character set combinations. The conversion information is stored in the - <literal>pg_conversion</> system catalog. <productname>PostgreSQL</> + <literal>pg_conversion</literal> system catalog. <productname>PostgreSQL</productname> comes with some predefined conversions, as shown in <xref linkend="multibyte-translation-table">. You can create a new conversion using the SQL command <command>CREATE CONVERSION</command>. @@ -1763,7 +1763,7 @@ $ <userinput>psql -l</userinput> <listitem> <para> - <application>libpq</> (<xref linkend="libpq-control">) has functions to control the client encoding. + <application>libpq</application> (<xref linkend="libpq-control">) has functions to control the client encoding. </para> </listitem> @@ -1774,14 +1774,14 @@ $ <userinput>psql -l</userinput> Setting the client encoding can be done with this SQL command: <programlisting> -SET CLIENT_ENCODING TO '<replaceable>value</>'; +SET CLIENT_ENCODING TO '<replaceable>value</replaceable>'; </programlisting> Also you can use the standard SQL syntax <literal>SET NAMES</literal> for this purpose: <programlisting> -SET NAMES '<replaceable>value</>'; +SET NAMES '<replaceable>value</replaceable>'; </programlisting> To query the current client encoding: @@ -1813,7 +1813,7 @@ RESET client_encoding; <para> Using the configuration variable <xref linkend="guc-client-encoding">. If the - <varname>client_encoding</> variable is set, that client + <varname>client_encoding</varname> variable is set, that client encoding is automatically selected when a connection to the server is made. (This can subsequently be overridden using any of the other methods mentioned above.) @@ -1832,9 +1832,9 @@ RESET client_encoding; </para> <para> - If the client character set is defined as <literal>SQL_ASCII</>, + If the client character set is defined as <literal>SQL_ASCII</literal>, encoding conversion is disabled, regardless of the server's character - set. Just as for the server, use of <literal>SQL_ASCII</> is unwise + set. Just as for the server, use of <literal>SQL_ASCII</literal> is unwise unless you are working with all-ASCII data. </para> </sect2> diff --git a/doc/src/sgml/citext.sgml b/doc/src/sgml/citext.sgml index 9b4c68f7d47..82251de8529 100644 --- a/doc/src/sgml/citext.sgml +++ b/doc/src/sgml/citext.sgml @@ -8,10 +8,10 @@ </indexterm> <para> - The <filename>citext</> module provides a case-insensitive - character string type, <type>citext</>. Essentially, it internally calls - <function>lower</> when comparing values. Otherwise, it behaves almost - exactly like <type>text</>. + The <filename>citext</filename> module provides a case-insensitive + character string type, <type>citext</type>. Essentially, it internally calls + <function>lower</function> when comparing values. Otherwise, it behaves almost + exactly like <type>text</type>. </para> <sect2> @@ -19,7 +19,7 @@ <para> The standard approach to doing case-insensitive matches - in <productname>PostgreSQL</> has been to use the <function>lower</> + in <productname>PostgreSQL</productname> has been to use the <function>lower</function> function when comparing values, for example <programlisting> @@ -35,19 +35,19 @@ SELECT * FROM tab WHERE lower(col) = LOWER(?); <listitem> <para> It makes your SQL statements verbose, and you always have to remember to - use <function>lower</> on both the column and the query value. + use <function>lower</function> on both the column and the query value. </para> </listitem> <listitem> <para> It won't use an index, unless you create a functional index using - <function>lower</>. + <function>lower</function>. </para> </listitem> <listitem> <para> - If you declare a column as <literal>UNIQUE</> or <literal>PRIMARY - KEY</>, the implicitly generated index is case-sensitive. So it's + If you declare a column as <literal>UNIQUE</literal> or <literal>PRIMARY + KEY</literal>, the implicitly generated index is case-sensitive. So it's useless for case-insensitive searches, and it won't enforce uniqueness case-insensitively. </para> @@ -55,13 +55,13 @@ SELECT * FROM tab WHERE lower(col) = LOWER(?); </itemizedlist> <para> - The <type>citext</> data type allows you to eliminate calls - to <function>lower</> in SQL queries, and allows a primary key to - be case-insensitive. <type>citext</> is locale-aware, just - like <type>text</>, which means that the matching of upper case and + The <type>citext</type> data type allows you to eliminate calls + to <function>lower</function> in SQL queries, and allows a primary key to + be case-insensitive. <type>citext</type> is locale-aware, just + like <type>text</type>, which means that the matching of upper case and lower case characters is dependent on the rules of - the database's <literal>LC_CTYPE</> setting. Again, this behavior is - identical to the use of <function>lower</> in queries. But because it's + the database's <literal>LC_CTYPE</literal> setting. Again, this behavior is + identical to the use of <function>lower</function> in queries. But because it's done transparently by the data type, you don't have to remember to do anything special in your queries. </para> @@ -89,9 +89,9 @@ INSERT INTO users VALUES ( 'Bjørn', md5(random()::text) ); SELECT * FROM users WHERE nick = 'Larry'; </programlisting> - The <command>SELECT</> statement will return one tuple, even though - the <structfield>nick</> column was set to <literal>larry</> and the query - was for <literal>Larry</>. + The <command>SELECT</command> statement will return one tuple, even though + the <structfield>nick</structfield> column was set to <literal>larry</literal> and the query + was for <literal>Larry</literal>. </para> </sect2> @@ -99,82 +99,82 @@ SELECT * FROM users WHERE nick = 'Larry'; <title>String Comparison Behavior</title> <para> - <type>citext</> performs comparisons by converting each string to lower - case (as though <function>lower</> were called) and then comparing the + <type>citext</type> performs comparisons by converting each string to lower + case (as though <function>lower</function> were called) and then comparing the results normally. Thus, for example, two strings are considered equal - if <function>lower</> would produce identical results for them. + if <function>lower</function> would produce identical results for them. </para> <para> In order to emulate a case-insensitive collation as closely as possible, - there are <type>citext</>-specific versions of a number of string-processing + there are <type>citext</type>-specific versions of a number of string-processing operators and functions. So, for example, the regular expression - operators <literal>~</> and <literal>~*</> exhibit the same behavior when - applied to <type>citext</>: they both match case-insensitively. + operators <literal>~</literal> and <literal>~*</literal> exhibit the same behavior when + applied to <type>citext</type>: they both match case-insensitively. The same is true - for <literal>!~</> and <literal>!~*</>, as well as for the - <literal>LIKE</> operators <literal>~~</> and <literal>~~*</>, and - <literal>!~~</> and <literal>!~~*</>. If you'd like to match - case-sensitively, you can cast the operator's arguments to <type>text</>. + for <literal>!~</literal> and <literal>!~*</literal>, as well as for the + <literal>LIKE</literal> operators <literal>~~</literal> and <literal>~~*</literal>, and + <literal>!~~</literal> and <literal>!~~*</literal>. If you'd like to match + case-sensitively, you can cast the operator's arguments to <type>text</type>. </para> <para> Similarly, all of the following functions perform matching - case-insensitively if their arguments are <type>citext</>: + case-insensitively if their arguments are <type>citext</type>: </para> <itemizedlist> <listitem> <para> - <function>regexp_match()</> + <function>regexp_match()</function> </para> </listitem> <listitem> <para> - <function>regexp_matches()</> + <function>regexp_matches()</function> </para> </listitem> <listitem> <para> - <function>regexp_replace()</> + <function>regexp_replace()</function> </para> </listitem> <listitem> <para> - <function>regexp_split_to_array()</> + <function>regexp_split_to_array()</function> </para> </listitem> <listitem> <para> - <function>regexp_split_to_table()</> + <function>regexp_split_to_table()</function> </para> </listitem> <listitem> <para> - <function>replace()</> + <function>replace()</function> </para> </listitem> <listitem> <para> - <function>split_part()</> + <function>split_part()</function> </para> </listitem> <listitem> <para> - <function>strpos()</> + <function>strpos()</function> </para> </listitem> <listitem> <para> - <function>translate()</> + <function>translate()</function> </para> </listitem> </itemizedlist> <para> For the regexp functions, if you want to match case-sensitively, you can - specify the <quote>c</> flag to force a case-sensitive match. Otherwise, - you must cast to <type>text</> before using one of these functions if + specify the <quote>c</quote> flag to force a case-sensitive match. Otherwise, + you must cast to <type>text</type> before using one of these functions if you want case-sensitive behavior. </para> @@ -186,13 +186,13 @@ SELECT * FROM users WHERE nick = 'Larry'; <itemizedlist> <listitem> <para> - <type>citext</>'s case-folding behavior depends on - the <literal>LC_CTYPE</> setting of your database. How it compares + <type>citext</type>'s case-folding behavior depends on + the <literal>LC_CTYPE</literal> setting of your database. How it compares values is therefore determined when the database is created. It is not truly case-insensitive in the terms defined by the Unicode standard. Effectively, what this means is that, as long as you're happy with your - collation, you should be happy with <type>citext</>'s comparisons. But + collation, you should be happy with <type>citext</type>'s comparisons. But if you have data in different languages stored in your database, users of one language may find their query results are not as expected if the collation is for another language. @@ -201,38 +201,38 @@ SELECT * FROM users WHERE nick = 'Larry'; <listitem> <para> - As of <productname>PostgreSQL</> 9.1, you can attach a - <literal>COLLATE</> specification to <type>citext</> columns or data - values. Currently, <type>citext</> operators will honor a non-default - <literal>COLLATE</> specification while comparing case-folded strings, + As of <productname>PostgreSQL</productname> 9.1, you can attach a + <literal>COLLATE</literal> specification to <type>citext</type> columns or data + values. Currently, <type>citext</type> operators will honor a non-default + <literal>COLLATE</literal> specification while comparing case-folded strings, but the initial folding to lower case is always done according to the - database's <literal>LC_CTYPE</> setting (that is, as though - <literal>COLLATE "default"</> were given). This may be changed in a - future release so that both steps follow the input <literal>COLLATE</> + database's <literal>LC_CTYPE</literal> setting (that is, as though + <literal>COLLATE "default"</literal> were given). This may be changed in a + future release so that both steps follow the input <literal>COLLATE</literal> specification. </para> </listitem> <listitem> <para> - <type>citext</> is not as efficient as <type>text</> because the + <type>citext</type> is not as efficient as <type>text</type> because the operator functions and the B-tree comparison functions must make copies of the data and convert it to lower case for comparisons. It is, - however, slightly more efficient than using <function>lower</> to get + however, slightly more efficient than using <function>lower</function> to get case-insensitive matching. </para> </listitem> <listitem> <para> - <type>citext</> doesn't help much if you need data to compare + <type>citext</type> doesn't help much if you need data to compare case-sensitively in some contexts and case-insensitively in other - contexts. The standard answer is to use the <type>text</> type and - manually use the <function>lower</> function when you need to compare + contexts. The standard answer is to use the <type>text</type> type and + manually use the <function>lower</function> function when you need to compare case-insensitively; this works all right if case-insensitive comparison is needed only infrequently. If you need case-insensitive behavior most of the time and case-sensitive infrequently, consider storing the data - as <type>citext</> and explicitly casting the column to <type>text</> + as <type>citext</type> and explicitly casting the column to <type>text</type> when you want case-sensitive comparison. In either situation, you will need two indexes if you want both types of searches to be fast. </para> @@ -240,9 +240,9 @@ SELECT * FROM users WHERE nick = 'Larry'; <listitem> <para> - The schema containing the <type>citext</> operators must be - in the current <varname>search_path</> (typically <literal>public</>); - if it is not, the normal case-sensitive <type>text</> operators + The schema containing the <type>citext</type> operators must be + in the current <varname>search_path</varname> (typically <literal>public</literal>); + if it is not, the normal case-sensitive <type>text</type> operators will be invoked instead. </para> </listitem> @@ -257,7 +257,7 @@ SELECT * FROM users WHERE nick = 'Larry'; </para> <para> - Inspired by the original <type>citext</> module by Donald Fraser. + Inspired by the original <type>citext</type> module by Donald Fraser. </para> </sect2> diff --git a/doc/src/sgml/client-auth.sgml b/doc/src/sgml/client-auth.sgml index 78c594bbbaa..722f3da8138 100644 --- a/doc/src/sgml/client-auth.sgml +++ b/doc/src/sgml/client-auth.sgml @@ -21,9 +21,9 @@ <para> As explained in <xref linkend="user-manag">, <productname>PostgreSQL</productname> actually does privilege - management in terms of <quote>roles</>. In this chapter, we - consistently use <firstterm>database user</> to mean <quote>role with the - <literal>LOGIN</> privilege</quote>. + management in terms of <quote>roles</quote>. In this chapter, we + consistently use <firstterm>database user</firstterm> to mean <quote>role with the + <literal>LOGIN</literal> privilege</quote>. </para> </note> @@ -66,7 +66,7 @@ which traditionally is named <filename>pg_hba.conf</filename> and is stored in the database cluster's data directory. - (<acronym>HBA</> stands for host-based authentication.) A default + (<acronym>HBA</acronym> stands for host-based authentication.) A default <filename>pg_hba.conf</filename> file is installed when the data directory is initialized by <command>initdb</command>. It is possible to place the authentication configuration file elsewhere, @@ -82,7 +82,7 @@ up of a number of fields which are separated by spaces and/or tabs. Fields can contain white space if the field value is double-quoted. Quoting one of the keywords in a database, user, or address field (e.g., - <literal>all</> or <literal>replication</>) makes the word lose its special + <literal>all</literal> or <literal>replication</literal>) makes the word lose its special meaning, and just match a database, user, or host with that name. </para> @@ -92,8 +92,8 @@ and the authentication method to be used for connections matching these parameters. The first record with a matching connection type, client address, requested database, and user name is used to perform - authentication. There is no <quote>fall-through</> or - <quote>backup</>: if one record is chosen and the authentication + authentication. There is no <quote>fall-through</quote> or + <quote>backup</quote>: if one record is chosen and the authentication fails, subsequent records are not considered. If no record matches, access is denied. </para> @@ -138,7 +138,7 @@ hostnossl <replaceable>database</replaceable> <replaceable>user</replaceable> the server is started with an appropriate value for the <xref linkend="guc-listen-addresses"> configuration parameter, since the default behavior is to listen for TCP/IP connections - only on the local loopback address <literal>localhost</>. + only on the local loopback address <literal>localhost</literal>. </para> </note> </listitem> @@ -169,7 +169,7 @@ hostnossl <replaceable>database</replaceable> <replaceable>user</replaceable> <term><literal>hostnossl</literal></term> <listitem> <para> - This record type has the opposite behavior of <literal>hostssl</>; + This record type has the opposite behavior of <literal>hostssl</literal>; it only matches connection attempts made over TCP/IP that do not use <acronym>SSL</acronym>. </para> @@ -182,24 +182,24 @@ hostnossl <replaceable>database</replaceable> <replaceable>user</replaceable> <para> Specifies which database name(s) this record matches. The value <literal>all</literal> specifies that it matches all databases. - The value <literal>sameuser</> specifies that the record + The value <literal>sameuser</literal> specifies that the record matches if the requested database has the same name as the - requested user. The value <literal>samerole</> specifies that + requested user. The value <literal>samerole</literal> specifies that the requested user must be a member of the role with the same - name as the requested database. (<literal>samegroup</> is an - obsolete but still accepted spelling of <literal>samerole</>.) + name as the requested database. (<literal>samegroup</literal> is an + obsolete but still accepted spelling of <literal>samerole</literal>.) Superusers are not considered to be members of a role for the - purposes of <literal>samerole</> unless they are explicitly + purposes of <literal>samerole</literal> unless they are explicitly members of the role, directly or indirectly, and not just by virtue of being a superuser. - The value <literal>replication</> specifies that the record + The value <literal>replication</literal> specifies that the record matches if a physical replication connection is requested (note that replication connections do not specify any particular database). Otherwise, this is the name of a specific <productname>PostgreSQL</productname> database. Multiple database names can be supplied by separating them with commas. A separate file containing database names can be specified by - preceding the file name with <literal>@</>. + preceding the file name with <literal>@</literal>. </para> </listitem> </varlistentry> @@ -211,18 +211,18 @@ hostnossl <replaceable>database</replaceable> <replaceable>user</replaceable> Specifies which database user name(s) this record matches. The value <literal>all</literal> specifies that it matches all users. Otherwise, this is either the name of a specific - database user, or a group name preceded by <literal>+</>. + database user, or a group name preceded by <literal>+</literal>. (Recall that there is no real distinction between users and groups - in <productname>PostgreSQL</>; a <literal>+</> mark really means + in <productname>PostgreSQL</productname>; a <literal>+</literal> mark really means <quote>match any of the roles that are directly or indirectly members - of this role</>, while a name without a <literal>+</> mark matches + of this role</quote>, while a name without a <literal>+</literal> mark matches only that specific role.) For this purpose, a superuser is only considered to be a member of a role if they are explicitly a member of the role, directly or indirectly, and not just by virtue of being a superuser. Multiple user names can be supplied by separating them with commas. A separate file containing user names can be specified by preceding the - file name with <literal>@</>. + file name with <literal>@</literal>. </para> </listitem> </varlistentry> @@ -239,7 +239,7 @@ hostnossl <replaceable>database</replaceable> <replaceable>user</replaceable> <para> An IP address range is specified using standard numeric notation for the range's starting address, then a slash (<literal>/</literal>) - and a <acronym>CIDR</> mask length. The mask + and a <acronym>CIDR</acronym> mask length. The mask length indicates the number of high-order bits of the client IP address that must match. Bits to the right of this should be zero in the given IP address. @@ -317,7 +317,7 @@ hostnossl <replaceable>database</replaceable> <replaceable>user</replaceable> <para> This field only applies to <literal>host</literal>, - <literal>hostssl</literal>, and <literal>hostnossl</> records. + <literal>hostssl</literal>, and <literal>hostnossl</literal> records. </para> <note> @@ -360,17 +360,17 @@ hostnossl <replaceable>database</replaceable> <replaceable>user</replaceable> <listitem> <para> These two fields can be used as an alternative to the - <replaceable>IP-address</><literal>/</><replaceable>mask-length</> + <replaceable>IP-address</replaceable><literal>/</literal><replaceable>mask-length</replaceable> notation. Instead of specifying the mask length, the actual mask is specified in a - separate column. For example, <literal>255.0.0.0</> represents an IPv4 - CIDR mask length of 8, and <literal>255.255.255.255</> represents a + separate column. For example, <literal>255.0.0.0</literal> represents an IPv4 + CIDR mask length of 8, and <literal>255.255.255.255</literal> represents a CIDR mask length of 32. </para> <para> These fields only apply to <literal>host</literal>, - <literal>hostssl</literal>, and <literal>hostnossl</> records. + <literal>hostssl</literal>, and <literal>hostnossl</literal> records. </para> </listitem> </varlistentry> @@ -385,7 +385,7 @@ hostnossl <replaceable>database</replaceable> <replaceable>user</replaceable> <variablelist> <varlistentry> - <term><literal>trust</></term> + <term><literal>trust</literal></term> <listitem> <para> Allow the connection unconditionally. This method @@ -399,12 +399,12 @@ hostnossl <replaceable>database</replaceable> <replaceable>user</replaceable> </varlistentry> <varlistentry> - <term><literal>reject</></term> + <term><literal>reject</literal></term> <listitem> <para> Reject the connection unconditionally. This is useful for - <quote>filtering out</> certain hosts from a group, for example a - <literal>reject</> line could block a specific host from connecting, + <quote>filtering out</quote> certain hosts from a group, for example a + <literal>reject</literal> line could block a specific host from connecting, while a later line allows the remaining hosts in a specific network to connect. </para> @@ -412,7 +412,7 @@ hostnossl <replaceable>database</replaceable> <replaceable>user</replaceable> </varlistentry> <varlistentry> - <term><literal>scram-sha-256</></term> + <term><literal>scram-sha-256</literal></term> <listitem> <para> Perform SCRAM-SHA-256 authentication to verify the user's @@ -422,7 +422,7 @@ hostnossl <replaceable>database</replaceable> <replaceable>user</replaceable> </varlistentry> <varlistentry> - <term><literal>md5</></term> + <term><literal>md5</literal></term> <listitem> <para> Perform SCRAM-SHA-256 or MD5 authentication to verify the @@ -433,7 +433,7 @@ hostnossl <replaceable>database</replaceable> <replaceable>user</replaceable> </varlistentry> <varlistentry> - <term><literal>password</></term> + <term><literal>password</literal></term> <listitem> <para> Require the client to supply an unencrypted password for @@ -446,7 +446,7 @@ hostnossl <replaceable>database</replaceable> <replaceable>user</replaceable> </varlistentry> <varlistentry> - <term><literal>gss</></term> + <term><literal>gss</literal></term> <listitem> <para> Use GSSAPI to authenticate the user. This is only @@ -457,7 +457,7 @@ hostnossl <replaceable>database</replaceable> <replaceable>user</replaceable> </varlistentry> <varlistentry> - <term><literal>sspi</></term> + <term><literal>sspi</literal></term> <listitem> <para> Use SSPI to authenticate the user. This is only @@ -468,7 +468,7 @@ hostnossl <replaceable>database</replaceable> <replaceable>user</replaceable> </varlistentry> <varlistentry> - <term><literal>ident</></term> + <term><literal>ident</literal></term> <listitem> <para> Obtain the operating system user name of the client @@ -483,7 +483,7 @@ hostnossl <replaceable>database</replaceable> <replaceable>user</replaceable> </varlistentry> <varlistentry> - <term><literal>peer</></term> + <term><literal>peer</literal></term> <listitem> <para> Obtain the client's operating system user name from the operating @@ -495,17 +495,17 @@ hostnossl <replaceable>database</replaceable> <replaceable>user</replaceable> </varlistentry> <varlistentry> - <term><literal>ldap</></term> + <term><literal>ldap</literal></term> <listitem> <para> - Authenticate using an <acronym>LDAP</> server. See <xref + Authenticate using an <acronym>LDAP</acronym> server. See <xref linkend="auth-ldap"> for details. </para> </listitem> </varlistentry> <varlistentry> - <term><literal>radius</></term> + <term><literal>radius</literal></term> <listitem> <para> Authenticate using a RADIUS server. See <xref @@ -515,7 +515,7 @@ hostnossl <replaceable>database</replaceable> <replaceable>user</replaceable> </varlistentry> <varlistentry> - <term><literal>cert</></term> + <term><literal>cert</literal></term> <listitem> <para> Authenticate using SSL client certificates. See @@ -525,7 +525,7 @@ hostnossl <replaceable>database</replaceable> <replaceable>user</replaceable> </varlistentry> <varlistentry> - <term><literal>pam</></term> + <term><literal>pam</literal></term> <listitem> <para> Authenticate using the Pluggable Authentication Modules @@ -536,7 +536,7 @@ hostnossl <replaceable>database</replaceable> <replaceable>user</replaceable> </varlistentry> <varlistentry> - <term><literal>bsd</></term> + <term><literal>bsd</literal></term> <listitem> <para> Authenticate using the BSD Authentication service provided by the @@ -554,17 +554,17 @@ hostnossl <replaceable>database</replaceable> <replaceable>user</replaceable> <term><replaceable>auth-options</replaceable></term> <listitem> <para> - After the <replaceable>auth-method</> field, there can be field(s) of - the form <replaceable>name</><literal>=</><replaceable>value</> that + After the <replaceable>auth-method</replaceable> field, there can be field(s) of + the form <replaceable>name</replaceable><literal>=</literal><replaceable>value</replaceable> that specify options for the authentication method. Details about which options are available for which authentication methods appear below. </para> <para> In addition to the method-specific options listed below, there is one - method-independent authentication option <literal>clientcert</>, which - can be specified in any <literal>hostssl</> record. When set - to <literal>1</>, this option requires the client to present a valid + method-independent authentication option <literal>clientcert</literal>, which + can be specified in any <literal>hostssl</literal> record. When set + to <literal>1</literal>, this option requires the client to present a valid (trusted) SSL certificate, in addition to the other requirements of the authentication method. </para> @@ -574,11 +574,11 @@ hostnossl <replaceable>database</replaceable> <replaceable>user</replaceable> </para> <para> - Files included by <literal>@</> constructs are read as lists of names, + Files included by <literal>@</literal> constructs are read as lists of names, which can be separated by either whitespace or commas. Comments are introduced by <literal>#</literal>, just as in - <filename>pg_hba.conf</filename>, and nested <literal>@</> constructs are - allowed. Unless the file name following <literal>@</> is an absolute + <filename>pg_hba.conf</filename>, and nested <literal>@</literal> constructs are + allowed. Unless the file name following <literal>@</literal> is an absolute path, it is taken to be relative to the directory containing the referencing file. </para> @@ -589,10 +589,10 @@ hostnossl <replaceable>database</replaceable> <replaceable>user</replaceable> significant. Typically, earlier records will have tight connection match parameters and weaker authentication methods, while later records will have looser match parameters and stronger authentication - methods. For example, one might wish to use <literal>trust</> + methods. For example, one might wish to use <literal>trust</literal> authentication for local TCP/IP connections but require a password for remote TCP/IP connections. In this case a record specifying - <literal>trust</> authentication for connections from 127.0.0.1 would + <literal>trust</literal> authentication for connections from 127.0.0.1 would appear before a record specifying password authentication for a wider range of allowed client IP addresses. </para> @@ -603,7 +603,7 @@ hostnossl <replaceable>database</replaceable> <replaceable>user</replaceable> <systemitem>SIGHUP</systemitem><indexterm><primary>SIGHUP</primary></indexterm> signal. If you edit the file on an active system, you will need to signal the postmaster - (using <literal>pg_ctl reload</> or <literal>kill -HUP</>) to make it + (using <literal>pg_ctl reload</literal> or <literal>kill -HUP</literal>) to make it re-read the file. </para> @@ -618,7 +618,7 @@ hostnossl <replaceable>database</replaceable> <replaceable>user</replaceable> <para> The system view <link linkend="view-pg-hba-file-rules"><structname>pg_hba_file_rules</structname></link> - can be helpful for pre-testing changes to the <filename>pg_hba.conf</> + can be helpful for pre-testing changes to the <filename>pg_hba.conf</filename> file, or for diagnosing problems if loading of the file did not have the desired effects. Rows in the view with non-null <structfield>error</structfield> fields indicate problems in the @@ -629,9 +629,9 @@ hostnossl <replaceable>database</replaceable> <replaceable>user</replaceable> <para> To connect to a particular database, a user must not only pass the <filename>pg_hba.conf</filename> checks, but must have the - <literal>CONNECT</> privilege for the database. If you wish to + <literal>CONNECT</literal> privilege for the database. If you wish to restrict which users can connect to which databases, it's usually - easier to control this by granting/revoking <literal>CONNECT</> privilege + easier to control this by granting/revoking <literal>CONNECT</literal> privilege than to put the rules in <filename>pg_hba.conf</filename> entries. </para> </tip> @@ -760,21 +760,21 @@ local db1,db2,@demodbs all md5 <para> User name maps are defined in the ident map file, which by default is named - <filename>pg_ident.conf</><indexterm><primary>pg_ident.conf</primary></indexterm> + <filename>pg_ident.conf</filename><indexterm><primary>pg_ident.conf</primary></indexterm> and is stored in the cluster's data directory. (It is possible to place the map file elsewhere, however; see the <xref linkend="guc-ident-file"> configuration parameter.) The ident map file contains lines of the general form: <synopsis> -<replaceable>map-name</> <replaceable>system-username</> <replaceable>database-username</> +<replaceable>map-name</replaceable> <replaceable>system-username</replaceable> <replaceable>database-username</replaceable> </synopsis> Comments and whitespace are handled in the same way as in - <filename>pg_hba.conf</>. The - <replaceable>map-name</> is an arbitrary name that will be used to + <filename>pg_hba.conf</filename>. The + <replaceable>map-name</replaceable> is an arbitrary name that will be used to refer to this mapping in <filename>pg_hba.conf</filename>. The other two fields specify an operating system user name and a matching - database user name. The same <replaceable>map-name</> can be + database user name. The same <replaceable>map-name</replaceable> can be used repeatedly to specify multiple user-mappings within a single map. </para> <para> @@ -788,13 +788,13 @@ local db1,db2,@demodbs all md5 user has requested to connect as. </para> <para> - If the <replaceable>system-username</> field starts with a slash (<literal>/</>), + If the <replaceable>system-username</replaceable> field starts with a slash (<literal>/</literal>), the remainder of the field is treated as a regular expression. (See <xref linkend="posix-syntax-details"> for details of - <productname>PostgreSQL</>'s regular expression syntax.) The regular + <productname>PostgreSQL</productname>'s regular expression syntax.) The regular expression can include a single capture, or parenthesized subexpression, - which can then be referenced in the <replaceable>database-username</> - field as <literal>\1</> (backslash-one). This allows the mapping of + which can then be referenced in the <replaceable>database-username</replaceable> + field as <literal>\1</literal> (backslash-one). This allows the mapping of multiple user names in a single line, which is particularly useful for simple syntax substitutions. For example, these entries <programlisting> @@ -802,14 +802,14 @@ mymap /^(.*)@mydomain\.com$ \1 mymap /^(.*)@otherdomain\.com$ guest </programlisting> will remove the domain part for users with system user names that end with - <literal>@mydomain.com</>, and allow any user whose system name ends with - <literal>@otherdomain.com</> to log in as <literal>guest</>. + <literal>@mydomain.com</literal>, and allow any user whose system name ends with + <literal>@otherdomain.com</literal> to log in as <literal>guest</literal>. </para> <tip> <para> Keep in mind that by default, a regular expression can match just part of - a string. It's usually wise to use <literal>^</> and <literal>$</>, as + a string. It's usually wise to use <literal>^</literal> and <literal>$</literal>, as shown in the above example, to force the match to be to the entire system user name. </para> @@ -821,28 +821,28 @@ mymap /^(.*)@otherdomain\.com$ guest <systemitem>SIGHUP</systemitem><indexterm><primary>SIGHUP</primary></indexterm> signal. If you edit the file on an active system, you will need to signal the postmaster - (using <literal>pg_ctl reload</> or <literal>kill -HUP</>) to make it + (using <literal>pg_ctl reload</literal> or <literal>kill -HUP</literal>) to make it re-read the file. </para> <para> A <filename>pg_ident.conf</filename> file that could be used in - conjunction with the <filename>pg_hba.conf</> file in <xref + conjunction with the <filename>pg_hba.conf</filename> file in <xref linkend="example-pg-hba.conf"> is shown in <xref linkend="example-pg-ident.conf">. In this example, anyone logged in to a machine on the 192.168 network that does not have the - operating system user name <literal>bryanh</>, <literal>ann</>, or - <literal>robert</> would not be granted access. Unix user - <literal>robert</> would only be allowed access when he tries to - connect as <productname>PostgreSQL</> user <literal>bob</>, not - as <literal>robert</> or anyone else. <literal>ann</> would - only be allowed to connect as <literal>ann</>. User - <literal>bryanh</> would be allowed to connect as either - <literal>bryanh</> or as <literal>guest1</>. + operating system user name <literal>bryanh</literal>, <literal>ann</literal>, or + <literal>robert</literal> would not be granted access. Unix user + <literal>robert</literal> would only be allowed access when he tries to + connect as <productname>PostgreSQL</productname> user <literal>bob</literal>, not + as <literal>robert</literal> or anyone else. <literal>ann</literal> would + only be allowed to connect as <literal>ann</literal>. User + <literal>bryanh</literal> would be allowed to connect as either + <literal>bryanh</literal> or as <literal>guest1</literal>. </para> <example id="example-pg-ident.conf"> - <title>An Example <filename>pg_ident.conf</> File</title> + <title>An Example <filename>pg_ident.conf</filename> File</title> <programlisting> # MAPNAME SYSTEM-USERNAME PG-USERNAME @@ -866,21 +866,21 @@ omicron bryanh guest1 <title>Trust Authentication</title> <para> - When <literal>trust</> authentication is specified, + When <literal>trust</literal> authentication is specified, <productname>PostgreSQL</productname> assumes that anyone who can connect to the server is authorized to access the database with whatever database user name they specify (even superuser names). - Of course, restrictions made in the <literal>database</> and - <literal>user</> columns still apply. + Of course, restrictions made in the <literal>database</literal> and + <literal>user</literal> columns still apply. This method should only be used when there is adequate operating-system-level protection on connections to the server. </para> <para> - <literal>trust</> authentication is appropriate and very + <literal>trust</literal> authentication is appropriate and very convenient for local connections on a single-user workstation. It - is usually <emphasis>not</> appropriate by itself on a multiuser - machine. However, you might be able to use <literal>trust</> even + is usually <emphasis>not</emphasis> appropriate by itself on a multiuser + machine. However, you might be able to use <literal>trust</literal> even on a multiuser machine, if you restrict access to the server's Unix-domain socket file using file-system permissions. To do this, set the <varname>unix_socket_permissions</varname> (and possibly @@ -895,17 +895,17 @@ omicron bryanh guest1 Setting file-system permissions only helps for Unix-socket connections. Local TCP/IP connections are not restricted by file-system permissions. Therefore, if you want to use file-system permissions for local security, - remove the <literal>host ... 127.0.0.1 ...</> line from - <filename>pg_hba.conf</>, or change it to a - non-<literal>trust</> authentication method. + remove the <literal>host ... 127.0.0.1 ...</literal> line from + <filename>pg_hba.conf</filename>, or change it to a + non-<literal>trust</literal> authentication method. </para> <para> - <literal>trust</> authentication is only suitable for TCP/IP connections + <literal>trust</literal> authentication is only suitable for TCP/IP connections if you trust every user on every machine that is allowed to connect - to the server by the <filename>pg_hba.conf</> lines that specify - <literal>trust</>. It is seldom reasonable to use <literal>trust</> - for any TCP/IP connections other than those from <systemitem>localhost</> (127.0.0.1). + to the server by the <filename>pg_hba.conf</filename> lines that specify + <literal>trust</literal>. It is seldom reasonable to use <literal>trust</literal> + for any TCP/IP connections other than those from <systemitem>localhost</systemitem> (127.0.0.1). </para> </sect2> @@ -914,10 +914,10 @@ omicron bryanh guest1 <title>Password Authentication</title> <indexterm> - <primary>MD5</> + <primary>MD5</primary> </indexterm> <indexterm> - <primary>SCRAM</> + <primary>SCRAM</primary> </indexterm> <indexterm> <primary>password</primary> @@ -936,7 +936,7 @@ omicron bryanh guest1 <term><literal>scram-sha-256</literal></term> <listitem> <para> - The method <literal>scram-sha-256</> performs SCRAM-SHA-256 + The method <literal>scram-sha-256</literal> performs SCRAM-SHA-256 authentication, as described in <ulink url="https://tools.ietf.org/html/rfc7677">RFC 7677</ulink>. It is a challenge-response scheme that prevents password sniffing on @@ -955,7 +955,7 @@ omicron bryanh guest1 <term><literal>md5</literal></term> <listitem> <para> - The method <literal>md5</> uses a custom less secure challenge-response + The method <literal>md5</literal> uses a custom less secure challenge-response mechanism. It prevents password sniffing and avoids storing passwords on the server in plain text but provides no protection if an attacker manages to steal the password hash from the server. Also, the MD5 hash @@ -982,10 +982,10 @@ omicron bryanh guest1 <term><literal>password</literal></term> <listitem> <para> - The method <literal>password</> sends the password in clear-text and is - therefore vulnerable to password <quote>sniffing</> attacks. It should + The method <literal>password</literal> sends the password in clear-text and is + therefore vulnerable to password <quote>sniffing</quote> attacks. It should always be avoided if possible. If the connection is protected by SSL - encryption then <literal>password</> can be used safely, though. + encryption then <literal>password</literal> can be used safely, though. (Though SSL certificate authentication might be a better choice if one is depending on using SSL). </para> @@ -996,7 +996,7 @@ omicron bryanh guest1 <para> <productname>PostgreSQL</productname> database passwords are separate from operating system user passwords. The password for - each database user is stored in the <literal>pg_authid</> system + each database user is stored in the <literal>pg_authid</literal> system catalog. Passwords can be managed with the SQL commands <xref linkend="sql-createuser"> and <xref linkend="sql-alterrole">, @@ -1060,7 +1060,7 @@ omicron bryanh guest1 </para> <para> - GSSAPI support has to be enabled when <productname>PostgreSQL</> is built; + GSSAPI support has to be enabled when <productname>PostgreSQL</productname> is built; see <xref linkend="installation"> for more information. </para> @@ -1068,13 +1068,13 @@ omicron bryanh guest1 When <productname>GSSAPI</productname> uses <productname>Kerberos</productname>, it uses a standard principal in the format - <literal><replaceable>servicename</>/<replaceable>hostname</>@<replaceable>realm</></literal>. + <literal><replaceable>servicename</replaceable>/<replaceable>hostname</replaceable>@<replaceable>realm</replaceable></literal>. The PostgreSQL server will accept any principal that is included in the keytab used by the server, but care needs to be taken to specify the correct principal details when - making the connection from the client using the <literal>krbsrvname</> connection parameter. (See + making the connection from the client using the <literal>krbsrvname</literal> connection parameter. (See also <xref linkend="libpq-paramkeywords">.) The installation default can be changed from the default <literal>postgres</literal> at build time using - <literal>./configure --with-krb-srvnam=</><replaceable>whatever</>. + <literal>./configure --with-krb-srvnam=</literal><replaceable>whatever</replaceable>. In most environments, this parameter never needs to be changed. Some Kerberos implementations might require a different service name, @@ -1082,31 +1082,31 @@ omicron bryanh guest1 to be in upper case (<literal>POSTGRES</literal>). </para> <para> - <replaceable>hostname</> is the fully qualified host name of the + <replaceable>hostname</replaceable> is the fully qualified host name of the server machine. The service principal's realm is the preferred realm of the server machine. </para> <para> - Client principals can be mapped to different <productname>PostgreSQL</> - database user names with <filename>pg_ident.conf</>. For example, - <literal>pgusername@realm</> could be mapped to just <literal>pgusername</>. - Alternatively, you can use the full <literal>username@realm</> principal as - the role name in <productname>PostgreSQL</> without any mapping. + Client principals can be mapped to different <productname>PostgreSQL</productname> + database user names with <filename>pg_ident.conf</filename>. For example, + <literal>pgusername@realm</literal> could be mapped to just <literal>pgusername</literal>. + Alternatively, you can use the full <literal>username@realm</literal> principal as + the role name in <productname>PostgreSQL</productname> without any mapping. </para> <para> - <productname>PostgreSQL</> also supports a parameter to strip the realm from + <productname>PostgreSQL</productname> also supports a parameter to strip the realm from the principal. This method is supported for backwards compatibility and is strongly discouraged as it is then impossible to distinguish different users with the same user name but coming from different realms. To enable this, - set <literal>include_realm</> to 0. For simple single-realm + set <literal>include_realm</literal> to 0. For simple single-realm installations, doing that combined with setting the - <literal>krb_realm</> parameter (which checks that the principal's realm + <literal>krb_realm</literal> parameter (which checks that the principal's realm matches exactly what is in the <literal>krb_realm</literal> parameter) is still secure; but this is a less capable approach compared to specifying an explicit mapping in - <filename>pg_ident.conf</>. + <filename>pg_ident.conf</filename>. </para> <para> @@ -1116,8 +1116,8 @@ omicron bryanh guest1 of the key file is specified by the <xref linkend="guc-krb-server-keyfile"> configuration parameter. The default is - <filename>/usr/local/pgsql/etc/krb5.keytab</> (or whatever - directory was specified as <varname>sysconfdir</> at build time). + <filename>/usr/local/pgsql/etc/krb5.keytab</filename> (or whatever + directory was specified as <varname>sysconfdir</varname> at build time). For security reasons, it is recommended to use a separate keytab just for the <productname>PostgreSQL</productname> server rather than opening up permissions on the system keytab file. @@ -1127,17 +1127,17 @@ omicron bryanh guest1 Kerberos documentation for details. The following example is for MIT-compatible Kerberos 5 implementations: <screen> -<prompt>kadmin% </><userinput>ank -randkey postgres/server.my.domain.org</> -<prompt>kadmin% </><userinput>ktadd -k krb5.keytab postgres/server.my.domain.org</> +<prompt>kadmin% </prompt><userinput>ank -randkey postgres/server.my.domain.org</userinput> +<prompt>kadmin% </prompt><userinput>ktadd -k krb5.keytab postgres/server.my.domain.org</userinput> </screen> </para> <para> When connecting to the database make sure you have a ticket for a principal matching the requested database user name. For example, for - database user name <literal>fred</>, principal - <literal>fred@EXAMPLE.COM</> would be able to connect. To also allow - principal <literal>fred/users.example.com@EXAMPLE.COM</>, use a user name + database user name <literal>fred</literal>, principal + <literal>fred@EXAMPLE.COM</literal> would be able to connect. To also allow + principal <literal>fred/users.example.com@EXAMPLE.COM</literal>, use a user name map, as described in <xref linkend="auth-username-maps">. </para> @@ -1155,8 +1155,8 @@ omicron bryanh guest1 in multi-realm environments unless <literal>krb_realm</literal> is also used. It is recommended to leave <literal>include_realm</literal> set to the default (1) and to - provide an explicit mapping in <filename>pg_ident.conf</> to convert - principal names to <productname>PostgreSQL</> user names. + provide an explicit mapping in <filename>pg_ident.conf</filename> to convert + principal names to <productname>PostgreSQL</productname> user names. </para> </listitem> </varlistentry> @@ -1236,8 +1236,8 @@ omicron bryanh guest1 in multi-realm environments unless <literal>krb_realm</literal> is also used. It is recommended to leave <literal>include_realm</literal> set to the default (1) and to - provide an explicit mapping in <filename>pg_ident.conf</> to convert - principal names to <productname>PostgreSQL</> user names. + provide an explicit mapping in <filename>pg_ident.conf</filename> to convert + principal names to <productname>PostgreSQL</productname> user names. </para> </listitem> </varlistentry> @@ -1270,9 +1270,9 @@ omicron bryanh guest1 By default, these two names are identical for new user accounts. </para> <para> - Note that <application>libpq</> uses the SAM-compatible name if no + Note that <application>libpq</application> uses the SAM-compatible name if no explicit user name is specified. If you use - <application>libpq</> or a driver based on it, you should + <application>libpq</application> or a driver based on it, you should leave this option disabled or explicitly specify user name in the connection string. </para> @@ -1357,8 +1357,8 @@ omicron bryanh guest1 is to answer questions like <quote>What user initiated the connection that goes out of your port <replaceable>X</replaceable> and connects to my port <replaceable>Y</replaceable>?</quote>. - Since <productname>PostgreSQL</> knows both <replaceable>X</> and - <replaceable>Y</> when a physical connection is established, it + Since <productname>PostgreSQL</productname> knows both <replaceable>X</replaceable> and + <replaceable>Y</replaceable> when a physical connection is established, it can interrogate the ident server on the host of the connecting client and can theoretically determine the operating system user for any given connection. @@ -1386,9 +1386,9 @@ omicron bryanh guest1 <para> Some ident servers have a nonstandard option that causes the returned user name to be encrypted, using a key that only the originating - machine's administrator knows. This option <emphasis>must not</> be - used when using the ident server with <productname>PostgreSQL</>, - since <productname>PostgreSQL</> does not have any way to decrypt the + machine's administrator knows. This option <emphasis>must not</emphasis> be + used when using the ident server with <productname>PostgreSQL</productname>, + since <productname>PostgreSQL</productname> does not have any way to decrypt the returned string to determine the actual user name. </para> </sect2> @@ -1424,11 +1424,11 @@ omicron bryanh guest1 <para> Peer authentication is only available on operating systems providing - the <function>getpeereid()</> function, the <symbol>SO_PEERCRED</symbol> + the <function>getpeereid()</function> function, the <symbol>SO_PEERCRED</symbol> socket parameter, or similar mechanisms. Currently that includes - <systemitem class="osname">Linux</>, - most flavors of <systemitem class="osname">BSD</> including - <systemitem class="osname">macOS</>, + <systemitem class="osname">Linux</systemitem>, + most flavors of <systemitem class="osname">BSD</systemitem> including + <systemitem class="osname">macOS</systemitem>, and <systemitem class="osname">Solaris</systemitem>. </para> @@ -1454,23 +1454,23 @@ omicron bryanh guest1 LDAP authentication can operate in two modes. In the first mode, which we will call the simple bind mode, the server will bind to the distinguished name constructed as - <replaceable>prefix</> <replaceable>username</> <replaceable>suffix</>. - Typically, the <replaceable>prefix</> parameter is used to specify - <literal>cn=</>, or <replaceable>DOMAIN</><literal>\</> in an Active - Directory environment. <replaceable>suffix</> is used to specify the + <replaceable>prefix</replaceable> <replaceable>username</replaceable> <replaceable>suffix</replaceable>. + Typically, the <replaceable>prefix</replaceable> parameter is used to specify + <literal>cn=</literal>, or <replaceable>DOMAIN</replaceable><literal>\</literal> in an Active + Directory environment. <replaceable>suffix</replaceable> is used to specify the remaining part of the DN in a non-Active Directory environment. </para> <para> In the second mode, which we will call the search+bind mode, the server first binds to the LDAP directory with - a fixed user name and password, specified with <replaceable>ldapbinddn</> - and <replaceable>ldapbindpasswd</>, and performs a search for the user trying + a fixed user name and password, specified with <replaceable>ldapbinddn</replaceable> + and <replaceable>ldapbindpasswd</replaceable>, and performs a search for the user trying to log in to the database. If no user and password is configured, an anonymous bind will be attempted to the directory. The search will be - performed over the subtree at <replaceable>ldapbasedn</>, and will try to + performed over the subtree at <replaceable>ldapbasedn</replaceable>, and will try to do an exact match of the attribute specified in - <replaceable>ldapsearchattribute</>. + <replaceable>ldapsearchattribute</replaceable>. Once the user has been found in this search, the server disconnects and re-binds to the directory as this user, using the password specified by the client, to verify that the @@ -1572,7 +1572,7 @@ omicron bryanh guest1 <para> Attribute to match against the user name in the search when doing search+bind authentication. If no attribute is specified, the - <literal>uid</> attribute will be used. + <literal>uid</literal> attribute will be used. </para> </listitem> </varlistentry> @@ -1719,11 +1719,11 @@ host ... ldap ldapserver=ldap.example.net ldapbasedn="dc=example, dc=net" ldapse When using RADIUS authentication, an Access Request message will be sent to the configured RADIUS server. This request will be of type <literal>Authenticate Only</literal>, and include parameters for - <literal>user name</>, <literal>password</> (encrypted) and - <literal>NAS Identifier</>. The request will be encrypted using + <literal>user name</literal>, <literal>password</literal> (encrypted) and + <literal>NAS Identifier</literal>. The request will be encrypted using a secret shared with the server. The RADIUS server will respond to - this server with either <literal>Access Accept</> or - <literal>Access Reject</>. There is no support for RADIUS accounting. + this server with either <literal>Access Accept</literal> or + <literal>Access Reject</literal>. There is no support for RADIUS accounting. </para> <para> @@ -1762,8 +1762,8 @@ host ... ldap ldapserver=ldap.example.net ldapbasedn="dc=example, dc=net" ldapse <note> <para> The encryption vector used will only be cryptographically - strong if <productname>PostgreSQL</> is built with support for - <productname>OpenSSL</>. In other cases, the transmission to the + strong if <productname>PostgreSQL</productname> is built with support for + <productname>OpenSSL</productname>. In other cases, the transmission to the RADIUS server should only be considered obfuscated, not secured, and external security measures should be applied if necessary. </para> @@ -1777,7 +1777,7 @@ host ... ldap ldapserver=ldap.example.net ldapbasedn="dc=example, dc=net" ldapse <listitem> <para> The port number on the RADIUS servers to connect to. If no port - is specified, the default port <literal>1812</> will be used. + is specified, the default port <literal>1812</literal> will be used. </para> </listitem> </varlistentry> @@ -1786,12 +1786,12 @@ host ... ldap ldapserver=ldap.example.net ldapbasedn="dc=example, dc=net" ldapse <term><literal>radiusidentifiers</literal></term> <listitem> <para> - The string used as <literal>NAS Identifier</> in the RADIUS + The string used as <literal>NAS Identifier</literal> in the RADIUS requests. This parameter can be used as a second parameter identifying for example which database user the user is attempting to authenticate as, which can be used for policy matching on the RADIUS server. If no identifier is specified, the default - <literal>postgresql</> will be used. + <literal>postgresql</literal> will be used. </para> </listitem> </varlistentry> @@ -1836,11 +1836,11 @@ host ... ldap ldapserver=ldap.example.net ldapbasedn="dc=example, dc=net" ldapse </para> <para> - In a <filename>pg_hba.conf</> record specifying certificate - authentication, the authentication option <literal>clientcert</> is - assumed to be <literal>1</>, and it cannot be turned off since a client - certificate is necessary for this method. What the <literal>cert</> - method adds to the basic <literal>clientcert</> certificate validity test + In a <filename>pg_hba.conf</filename> record specifying certificate + authentication, the authentication option <literal>clientcert</literal> is + assumed to be <literal>1</literal>, and it cannot be turned off since a client + certificate is necessary for this method. What the <literal>cert</literal> + method adds to the basic <literal>clientcert</literal> certificate validity test is a check that the <literal>cn</literal> attribute matches the database user name. </para> @@ -1863,7 +1863,7 @@ host ... ldap ldapserver=ldap.example.net ldapbasedn="dc=example, dc=net" ldapse exist in the database before PAM can be used for authentication. For more information about PAM, please read the <ulink url="http://www.kernel.org/pub/linux/libs/pam/"> - <productname>Linux-PAM</> Page</ulink>. + <productname>Linux-PAM</productname> Page</ulink>. </para> <para> @@ -1896,7 +1896,7 @@ host ... ldap ldapserver=ldap.example.net ldapbasedn="dc=example, dc=net" ldapse <note> <para> - If PAM is set up to read <filename>/etc/shadow</>, authentication + If PAM is set up to read <filename>/etc/shadow</filename>, authentication will fail because the PostgreSQL server is started by a non-root user. However, this is not an issue when PAM is configured to use LDAP or other authentication methods. @@ -1922,11 +1922,11 @@ host ... ldap ldapserver=ldap.example.net ldapbasedn="dc=example, dc=net" ldapse </para> <para> - BSD Authentication in <productname>PostgreSQL</> uses + BSD Authentication in <productname>PostgreSQL</productname> uses the <literal>auth-postgresql</literal> login type and authenticates with the <literal>postgresql</literal> login class if that's defined in <filename>login.conf</filename>. By default that login class does not - exist, and <productname>PostgreSQL</> will use the default login class. + exist, and <productname>PostgreSQL</productname> will use the default login class. </para> <note> diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index b012a269911..aeda826d874 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -70,9 +70,9 @@ (typically eight kilobytes), milliseconds, seconds, or minutes. An unadorned numeric value for one of these settings will use the setting's default unit, which can be learned from - <structname>pg_settings</>.<structfield>unit</>. + <structname>pg_settings</structname>.<structfield>unit</structfield>. For convenience, settings can be given with a unit specified explicitly, - for example <literal>'120 ms'</> for a time value, and they will be + for example <literal>'120 ms'</literal> for a time value, and they will be converted to whatever the parameter's actual unit is. Note that the value must be written as a string (with quotes) to use this feature. The unit name is case-sensitive, and there can be whitespace between @@ -105,7 +105,7 @@ Enumerated-type parameters are written in the same way as string parameters, but are restricted to have one of a limited set of values. The values allowable for such a parameter can be found from - <structname>pg_settings</>.<structfield>enumvals</>. + <structname>pg_settings</structname>.<structfield>enumvals</structfield>. Enum parameter values are case-insensitive. </para> </listitem> @@ -117,7 +117,7 @@ <para> The most fundamental way to set these parameters is to edit the file - <filename>postgresql.conf</><indexterm><primary>postgresql.conf</></>, + <filename>postgresql.conf</filename><indexterm><primary>postgresql.conf</primary></indexterm>, which is normally kept in the data directory. A default copy is installed when the database cluster directory is initialized. An example of what this file might look like is: @@ -150,8 +150,8 @@ shared_buffers = 128MB <primary>SIGHUP</primary> </indexterm> The configuration file is reread whenever the main server process - receives a <systemitem>SIGHUP</> signal; this signal is most easily - sent by running <literal>pg_ctl reload</> from the command line or by + receives a <systemitem>SIGHUP</systemitem> signal; this signal is most easily + sent by running <literal>pg_ctl reload</literal> from the command line or by calling the SQL function <function>pg_reload_conf()</function>. The main server process also propagates this signal to all currently running server processes, so that existing sessions also adopt the new values @@ -161,26 +161,26 @@ shared_buffers = 128MB can only be set at server start; any changes to their entries in the configuration file will be ignored until the server is restarted. Invalid parameter settings in the configuration file are likewise - ignored (but logged) during <systemitem>SIGHUP</> processing. + ignored (but logged) during <systemitem>SIGHUP</systemitem> processing. </para> <para> - In addition to <filename>postgresql.conf</>, + In addition to <filename>postgresql.conf</filename>, a <productname>PostgreSQL</productname> data directory contains a file - <filename>postgresql.auto.conf</><indexterm><primary>postgresql.auto.conf</></>, - which has the same format as <filename>postgresql.conf</> but should + <filename>postgresql.auto.conf</filename><indexterm><primary>postgresql.auto.conf</primary></indexterm>, + which has the same format as <filename>postgresql.conf</filename> but should never be edited manually. This file holds settings provided through the <xref linkend="SQL-ALTERSYSTEM"> command. This file is automatically - read whenever <filename>postgresql.conf</> is, and its settings take - effect in the same way. Settings in <filename>postgresql.auto.conf</> - override those in <filename>postgresql.conf</>. + read whenever <filename>postgresql.conf</filename> is, and its settings take + effect in the same way. Settings in <filename>postgresql.auto.conf</filename> + override those in <filename>postgresql.conf</filename>. </para> <para> The system view <link linkend="view-pg-file-settings"><structname>pg_file_settings</structname></link> can be helpful for pre-testing changes to the configuration file, or for - diagnosing problems if a <systemitem>SIGHUP</> signal did not have the + diagnosing problems if a <systemitem>SIGHUP</systemitem> signal did not have the desired effects. </para> </sect2> @@ -193,7 +193,7 @@ shared_buffers = 128MB commands to establish configuration defaults. The already-mentioned <xref linkend="SQL-ALTERSYSTEM"> command provides a SQL-accessible means of changing global defaults; it is - functionally equivalent to editing <filename>postgresql.conf</>. + functionally equivalent to editing <filename>postgresql.conf</filename>. In addition, there are two commands that allow setting of defaults on a per-database or per-role basis: </para> @@ -215,7 +215,7 @@ shared_buffers = 128MB </itemizedlist> <para> - Values set with <command>ALTER DATABASE</> and <command>ALTER ROLE</> + Values set with <command>ALTER DATABASE</command> and <command>ALTER ROLE</command> are applied only when starting a fresh database session. They override values obtained from the configuration files or server command line, and constitute defaults for the rest of the session. @@ -224,7 +224,7 @@ shared_buffers = 128MB </para> <para> - Once a client is connected to the database, <productname>PostgreSQL</> + Once a client is connected to the database, <productname>PostgreSQL</productname> provides two additional SQL commands (and equivalent functions) to interact with session-local configuration settings: </para> @@ -251,14 +251,14 @@ shared_buffers = 128MB <para> In addition, the system view <link - linkend="view-pg-settings"><structname>pg_settings</></> can be + linkend="view-pg-settings"><structname>pg_settings</structname></link> can be used to view and change session-local values: </para> <itemizedlist> <listitem> <para> - Querying this view is similar to using <command>SHOW ALL</> but + Querying this view is similar to using <command>SHOW ALL</command> but provides more detail. It is also more flexible, since it's possible to specify filter conditions or join against other relations. </para> @@ -267,8 +267,8 @@ shared_buffers = 128MB <listitem> <para> Using <xref linkend="SQL-UPDATE"> on this view, specifically - updating the <structname>setting</> column, is the equivalent - of issuing <command>SET</> commands. For example, the equivalent of + updating the <structname>setting</structname> column, is the equivalent + of issuing <command>SET</command> commands. For example, the equivalent of <programlisting> SET configuration_parameter TO DEFAULT; </programlisting> @@ -289,7 +289,7 @@ UPDATE pg_settings SET setting = reset_val WHERE name = 'configuration_parameter In addition to setting global defaults or attaching overrides at the database or role level, you can pass settings to <productname>PostgreSQL</productname> via shell facilities. - Both the server and <application>libpq</> client library + Both the server and <application>libpq</application> client library accept parameter values via the shell. </para> @@ -298,26 +298,26 @@ UPDATE pg_settings SET setting = reset_val WHERE name = 'configuration_parameter <para> During server startup, parameter settings can be passed to the <command>postgres</command> command via the - <option>-c</> command-line parameter. For example, + <option>-c</option> command-line parameter. For example, <programlisting> postgres -c log_connections=yes -c log_destination='syslog' </programlisting> Settings provided in this way override those set via - <filename>postgresql.conf</> or <command>ALTER SYSTEM</>, + <filename>postgresql.conf</filename> or <command>ALTER SYSTEM</command>, so they cannot be changed globally without restarting the server. </para> </listitem> <listitem> <para> - When starting a client session via <application>libpq</>, + When starting a client session via <application>libpq</application>, parameter settings can be specified using the <envar>PGOPTIONS</envar> environment variable. Settings established in this way constitute defaults for the life of the session, but do not affect other sessions. For historical reasons, the format of <envar>PGOPTIONS</envar> is similar to that used when launching the <command>postgres</command> - command; specifically, the <option>-c</> flag must be specified. + command; specifically, the <option>-c</option> flag must be specified. For example, <programlisting> env PGOPTIONS="-c geqo=off -c statement_timeout=5min" psql @@ -338,20 +338,20 @@ env PGOPTIONS="-c geqo=off -c statement_timeout=5min" psql <title>Managing Configuration File Contents</title> <para> - <productname>PostgreSQL</> provides several features for breaking - down complex <filename>postgresql.conf</> files into sub-files. + <productname>PostgreSQL</productname> provides several features for breaking + down complex <filename>postgresql.conf</filename> files into sub-files. These features are especially useful when managing multiple servers with related, but not identical, configurations. </para> <para> <indexterm> - <primary><literal>include</></primary> + <primary><literal>include</literal></primary> <secondary>in configuration file</secondary> </indexterm> In addition to individual parameter settings, - the <filename>postgresql.conf</> file can contain <firstterm>include - directives</>, which specify another file to read and process as if + the <filename>postgresql.conf</filename> file can contain <firstterm>include + directives</firstterm>, which specify another file to read and process as if it were inserted into the configuration file at this point. This feature allows a configuration file to be divided into physically separate parts. Include directives simply look like: @@ -365,23 +365,23 @@ include 'filename' <para> <indexterm> - <primary><literal>include_if_exists</></primary> + <primary><literal>include_if_exists</literal></primary> <secondary>in configuration file</secondary> </indexterm> - There is also an <literal>include_if_exists</> directive, which acts - the same as the <literal>include</> directive, except + There is also an <literal>include_if_exists</literal> directive, which acts + the same as the <literal>include</literal> directive, except when the referenced file does not exist or cannot be read. A regular - <literal>include</> will consider this an error condition, but - <literal>include_if_exists</> merely logs a message and continues + <literal>include</literal> will consider this an error condition, but + <literal>include_if_exists</literal> merely logs a message and continues processing the referencing configuration file. </para> <para> <indexterm> - <primary><literal>include_dir</></primary> + <primary><literal>include_dir</literal></primary> <secondary>in configuration file</secondary> </indexterm> - The <filename>postgresql.conf</> file can also contain + The <filename>postgresql.conf</filename> file can also contain <literal>include_dir</literal> directives, which specify an entire directory of configuration files to include. These look like <programlisting> @@ -401,36 +401,36 @@ include_dir 'directory' <para> Include files or directories can be used to logically separate portions of the database configuration, rather than having a single large - <filename>postgresql.conf</> file. Consider a company that has two + <filename>postgresql.conf</filename> file. Consider a company that has two database servers, each with a different amount of memory. There are likely elements of the configuration both will share, for things such as logging. But memory-related parameters on the server will vary between the two. And there might be server specific customizations, too. One way to manage this situation is to break the custom configuration changes for your site into three files. You could add - this to the end of your <filename>postgresql.conf</> file to include + this to the end of your <filename>postgresql.conf</filename> file to include them: <programlisting> include 'shared.conf' include 'memory.conf' include 'server.conf' </programlisting> - All systems would have the same <filename>shared.conf</>. Each + All systems would have the same <filename>shared.conf</filename>. Each server with a particular amount of memory could share the - same <filename>memory.conf</>; you might have one for all servers + same <filename>memory.conf</filename>; you might have one for all servers with 8GB of RAM, another for those having 16GB. And - finally <filename>server.conf</> could have truly server-specific + finally <filename>server.conf</filename> could have truly server-specific configuration information in it. </para> <para> Another possibility is to create a configuration file directory and - put this information into files there. For example, a <filename>conf.d</> - directory could be referenced at the end of <filename>postgresql.conf</>: + put this information into files there. For example, a <filename>conf.d</filename> + directory could be referenced at the end of <filename>postgresql.conf</filename>: <programlisting> include_dir 'conf.d' </programlisting> - Then you could name the files in the <filename>conf.d</> directory + Then you could name the files in the <filename>conf.d</filename> directory like this: <programlisting> 00shared.conf @@ -441,8 +441,8 @@ include_dir 'conf.d' files will be loaded. This is important because only the last setting encountered for a particular parameter while the server is reading configuration files will be used. In this example, - something set in <filename>conf.d/02server.conf</> would override a - value set in <filename>conf.d/01memory.conf</>. + something set in <filename>conf.d/02server.conf</filename> would override a + value set in <filename>conf.d/01memory.conf</filename>. </para> <para> @@ -483,7 +483,7 @@ include_dir 'conf.d' <varlistentry id="guc-data-directory" xreflabel="data_directory"> <term><varname>data_directory</varname> (<type>string</type>) <indexterm> - <primary><varname>data_directory</> configuration parameter</primary> + <primary><varname>data_directory</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -497,13 +497,13 @@ include_dir 'conf.d' <varlistentry id="guc-config-file" xreflabel="config_file"> <term><varname>config_file</varname> (<type>string</type>) <indexterm> - <primary><varname>config_file</> configuration parameter</primary> + <primary><varname>config_file</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Specifies the main server configuration file - (customarily called <filename>postgresql.conf</>). + (customarily called <filename>postgresql.conf</filename>). This parameter can only be set on the <command>postgres</command> command line. </para> </listitem> @@ -512,13 +512,13 @@ include_dir 'conf.d' <varlistentry id="guc-hba-file" xreflabel="hba_file"> <term><varname>hba_file</varname> (<type>string</type>) <indexterm> - <primary><varname>hba_file</> configuration parameter</primary> + <primary><varname>hba_file</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Specifies the configuration file for host-based authentication - (customarily called <filename>pg_hba.conf</>). + (customarily called <filename>pg_hba.conf</filename>). This parameter can only be set at server start. </para> </listitem> @@ -527,13 +527,13 @@ include_dir 'conf.d' <varlistentry id="guc-ident-file" xreflabel="ident_file"> <term><varname>ident_file</varname> (<type>string</type>) <indexterm> - <primary><varname>ident_file</> configuration parameter</primary> + <primary><varname>ident_file</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Specifies the configuration file for user name mapping - (customarily called <filename>pg_ident.conf</>). + (customarily called <filename>pg_ident.conf</filename>). This parameter can only be set at server start. See also <xref linkend="auth-username-maps">. </para> @@ -543,7 +543,7 @@ include_dir 'conf.d' <varlistentry id="guc-external-pid-file" xreflabel="external_pid_file"> <term><varname>external_pid_file</varname> (<type>string</type>) <indexterm> - <primary><varname>external_pid_file</> configuration parameter</primary> + <primary><varname>external_pid_file</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -569,10 +569,10 @@ include_dir 'conf.d' data directory, the <command>postgres</command> <option>-D</option> command-line option or <envar>PGDATA</envar> environment variable must point to the directory containing the configuration files, - and the <varname>data_directory</> parameter must be set in + and the <varname>data_directory</varname> parameter must be set in <filename>postgresql.conf</filename> (or on the command line) to show where the data directory is actually located. Notice that - <varname>data_directory</> overrides <option>-D</option> and + <varname>data_directory</varname> overrides <option>-D</option> and <envar>PGDATA</envar> for the location of the data directory, but not for the location of the configuration files. @@ -580,12 +580,12 @@ include_dir 'conf.d' <para> If you wish, you can specify the configuration file names and locations - individually using the parameters <varname>config_file</>, - <varname>hba_file</> and/or <varname>ident_file</>. - <varname>config_file</> can only be specified on the + individually using the parameters <varname>config_file</varname>, + <varname>hba_file</varname> and/or <varname>ident_file</varname>. + <varname>config_file</varname> can only be specified on the <command>postgres</command> command line, but the others can be set within the main configuration file. If all three parameters plus - <varname>data_directory</> are explicitly set, then it is not necessary + <varname>data_directory</varname> are explicitly set, then it is not necessary to specify <option>-D</option> or <envar>PGDATA</envar>. </para> @@ -607,7 +607,7 @@ include_dir 'conf.d' <varlistentry id="guc-listen-addresses" xreflabel="listen_addresses"> <term><varname>listen_addresses</varname> (<type>string</type>) <indexterm> - <primary><varname>listen_addresses</> configuration parameter</primary> + <primary><varname>listen_addresses</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -615,15 +615,15 @@ include_dir 'conf.d' Specifies the TCP/IP address(es) on which the server is to listen for connections from client applications. The value takes the form of a comma-separated list of host names - and/or numeric IP addresses. The special entry <literal>*</> + and/or numeric IP addresses. The special entry <literal>*</literal> corresponds to all available IP interfaces. The entry - <literal>0.0.0.0</> allows listening for all IPv4 addresses and - <literal>::</> allows listening for all IPv6 addresses. + <literal>0.0.0.0</literal> allows listening for all IPv4 addresses and + <literal>::</literal> allows listening for all IPv6 addresses. If the list is empty, the server does not listen on any IP interface at all, in which case only Unix-domain sockets can be used to connect to it. - The default value is <systemitem class="systemname">localhost</>, - which allows only local TCP/IP <quote>loopback</> connections to be + The default value is <systemitem class="systemname">localhost</systemitem>, + which allows only local TCP/IP <quote>loopback</quote> connections to be made. While client authentication (<xref linkend="client-authentication">) allows fine-grained control over who can access the server, <varname>listen_addresses</varname> @@ -638,7 +638,7 @@ include_dir 'conf.d' <varlistentry id="guc-port" xreflabel="port"> <term><varname>port</varname> (<type>integer</type>) <indexterm> - <primary><varname>port</> configuration parameter</primary> + <primary><varname>port</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -653,7 +653,7 @@ include_dir 'conf.d' <varlistentry id="guc-max-connections" xreflabel="max_connections"> <term><varname>max_connections</varname> (<type>integer</type>) <indexterm> - <primary><varname>max_connections</> configuration parameter</primary> + <primary><varname>max_connections</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -661,7 +661,7 @@ include_dir 'conf.d' Determines the maximum number of concurrent connections to the database server. The default is typically 100 connections, but might be less if your kernel settings will not support it (as - determined during <application>initdb</>). This parameter can + determined during <application>initdb</application>). This parameter can only be set at server start. </para> @@ -678,17 +678,17 @@ include_dir 'conf.d' <term><varname>superuser_reserved_connections</varname> (<type>integer</type>) <indexterm> - <primary><varname>superuser_reserved_connections</> configuration parameter</primary> + <primary><varname>superuser_reserved_connections</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Determines the number of connection <quote>slots</quote> that - are reserved for connections by <productname>PostgreSQL</> + are reserved for connections by <productname>PostgreSQL</productname> superusers. At most <xref linkend="guc-max-connections"> connections can ever be active simultaneously. Whenever the number of active concurrent connections is at least - <varname>max_connections</> minus + <varname>max_connections</varname> minus <varname>superuser_reserved_connections</varname>, new connections will be accepted only for superusers, and no new replication connections will be accepted. @@ -705,7 +705,7 @@ include_dir 'conf.d' <varlistentry id="guc-unix-socket-directories" xreflabel="unix_socket_directories"> <term><varname>unix_socket_directories</varname> (<type>string</type>) <indexterm> - <primary><varname>unix_socket_directories</> configuration parameter</primary> + <primary><varname>unix_socket_directories</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -726,10 +726,10 @@ include_dir 'conf.d' <para> In addition to the socket file itself, which is named - <literal>.s.PGSQL.<replaceable>nnnn</></literal> where - <replaceable>nnnn</> is the server's port number, an ordinary file - named <literal>.s.PGSQL.<replaceable>nnnn</>.lock</literal> will be - created in each of the <varname>unix_socket_directories</> directories. + <literal>.s.PGSQL.<replaceable>nnnn</replaceable></literal> where + <replaceable>nnnn</replaceable> is the server's port number, an ordinary file + named <literal>.s.PGSQL.<replaceable>nnnn</replaceable>.lock</literal> will be + created in each of the <varname>unix_socket_directories</varname> directories. Neither file should ever be removed manually. </para> @@ -743,7 +743,7 @@ include_dir 'conf.d' <varlistentry id="guc-unix-socket-group" xreflabel="unix_socket_group"> <term><varname>unix_socket_group</varname> (<type>string</type>) <indexterm> - <primary><varname>unix_socket_group</> configuration parameter</primary> + <primary><varname>unix_socket_group</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -768,7 +768,7 @@ include_dir 'conf.d' <varlistentry id="guc-unix-socket-permissions" xreflabel="unix_socket_permissions"> <term><varname>unix_socket_permissions</varname> (<type>integer</type>) <indexterm> - <primary><varname>unix_socket_permissions</> configuration parameter</primary> + <primary><varname>unix_socket_permissions</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -804,7 +804,7 @@ include_dir 'conf.d' <para> This parameter is irrelevant on systems, notably Solaris as of Solaris 10, that ignore socket permissions entirely. There, one can achieve a - similar effect by pointing <varname>unix_socket_directories</> to a + similar effect by pointing <varname>unix_socket_directories</varname> to a directory having search permission limited to the desired audience. This parameter is also irrelevant on Windows, which does not have Unix-domain sockets. @@ -815,7 +815,7 @@ include_dir 'conf.d' <varlistentry id="guc-bonjour" xreflabel="bonjour"> <term><varname>bonjour</varname> (<type>boolean</type>) <indexterm> - <primary><varname>bonjour</> configuration parameter</primary> + <primary><varname>bonjour</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -830,14 +830,14 @@ include_dir 'conf.d' <varlistentry id="guc-bonjour-name" xreflabel="bonjour_name"> <term><varname>bonjour_name</varname> (<type>string</type>) <indexterm> - <primary><varname>bonjour_name</> configuration parameter</primary> + <primary><varname>bonjour_name</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Specifies the <productname>Bonjour</productname> service name. The computer name is used if this parameter is set to the - empty string <literal>''</> (which is the default). This parameter is + empty string <literal>''</literal> (which is the default). This parameter is ignored if the server was not compiled with <productname>Bonjour</productname> support. This parameter can only be set at server start. @@ -848,7 +848,7 @@ include_dir 'conf.d' <varlistentry id="guc-tcp-keepalives-idle" xreflabel="tcp_keepalives_idle"> <term><varname>tcp_keepalives_idle</varname> (<type>integer</type>) <indexterm> - <primary><varname>tcp_keepalives_idle</> configuration parameter</primary> + <primary><varname>tcp_keepalives_idle</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -857,7 +857,7 @@ include_dir 'conf.d' should send a keepalive message to the client. A value of 0 uses the system default. This parameter is supported only on systems that support - <symbol>TCP_KEEPIDLE</> or an equivalent socket option, and on + <symbol>TCP_KEEPIDLE</symbol> or an equivalent socket option, and on Windows; on other systems, it must be zero. In sessions connected via a Unix-domain socket, this parameter is ignored and always reads as zero. @@ -874,7 +874,7 @@ include_dir 'conf.d' <varlistentry id="guc-tcp-keepalives-interval" xreflabel="tcp_keepalives_interval"> <term><varname>tcp_keepalives_interval</varname> (<type>integer</type>) <indexterm> - <primary><varname>tcp_keepalives_interval</> configuration parameter</primary> + <primary><varname>tcp_keepalives_interval</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -883,7 +883,7 @@ include_dir 'conf.d' that is not acknowledged by the client should be retransmitted. A value of 0 uses the system default. This parameter is supported only on systems that support - <symbol>TCP_KEEPINTVL</> or an equivalent socket option, and on + <symbol>TCP_KEEPINTVL</symbol> or an equivalent socket option, and on Windows; on other systems, it must be zero. In sessions connected via a Unix-domain socket, this parameter is ignored and always reads as zero. @@ -900,7 +900,7 @@ include_dir 'conf.d' <varlistentry id="guc-tcp-keepalives-count" xreflabel="tcp_keepalives_count"> <term><varname>tcp_keepalives_count</varname> (<type>integer</type>) <indexterm> - <primary><varname>tcp_keepalives_count</> configuration parameter</primary> + <primary><varname>tcp_keepalives_count</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -909,7 +909,7 @@ include_dir 'conf.d' the server's connection to the client is considered dead. A value of 0 uses the system default. This parameter is supported only on systems that support - <symbol>TCP_KEEPCNT</> or an equivalent socket option; + <symbol>TCP_KEEPCNT</symbol> or an equivalent socket option; on other systems, it must be zero. In sessions connected via a Unix-domain socket, this parameter is ignored and always reads as zero. @@ -930,10 +930,10 @@ include_dir 'conf.d' <variablelist> <varlistentry id="guc-authentication-timeout" xreflabel="authentication_timeout"> <term><varname>authentication_timeout</varname> (<type>integer</type>) - <indexterm><primary>timeout</><secondary>client authentication</></indexterm> - <indexterm><primary>client authentication</><secondary>timeout during</></indexterm> + <indexterm><primary>timeout</primary><secondary>client authentication</secondary></indexterm> + <indexterm><primary>client authentication</primary><secondary>timeout during</secondary></indexterm> <indexterm> - <primary><varname>authentication_timeout</> configuration parameter</primary> + <primary><varname>authentication_timeout</varname> configuration parameter</primary> </indexterm> </term> @@ -943,8 +943,8 @@ include_dir 'conf.d' would-be client has not completed the authentication protocol in this much time, the server closes the connection. This prevents hung clients from occupying a connection indefinitely. - The default is one minute (<literal>1m</>). - This parameter can only be set in the <filename>postgresql.conf</> + The default is one minute (<literal>1m</literal>). + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. </para> </listitem> @@ -953,16 +953,16 @@ include_dir 'conf.d' <varlistentry id="guc-ssl" xreflabel="ssl"> <term><varname>ssl</varname> (<type>boolean</type>) <indexterm> - <primary><varname>ssl</> configuration parameter</primary> + <primary><varname>ssl</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> - Enables <acronym>SSL</> connections. Please read + Enables <acronym>SSL</acronym> connections. Please read <xref linkend="ssl-tcp"> before using this. - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. - The default is <literal>off</>. + The default is <literal>off</literal>. </para> </listitem> </varlistentry> @@ -970,7 +970,7 @@ include_dir 'conf.d' <varlistentry id="guc-ssl-ca-file" xreflabel="ssl_ca_file"> <term><varname>ssl_ca_file</varname> (<type>string</type>) <indexterm> - <primary><varname>ssl_ca_file</> configuration parameter</primary> + <primary><varname>ssl_ca_file</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -978,7 +978,7 @@ include_dir 'conf.d' Specifies the name of the file containing the SSL server certificate authority (CA). Relative paths are relative to the data directory. - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. The default is empty, meaning no CA file is loaded, and client certificate verification is not performed. @@ -989,14 +989,14 @@ include_dir 'conf.d' <varlistentry id="guc-ssl-cert-file" xreflabel="ssl_cert_file"> <term><varname>ssl_cert_file</varname> (<type>string</type>) <indexterm> - <primary><varname>ssl_cert_file</> configuration parameter</primary> + <primary><varname>ssl_cert_file</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Specifies the name of the file containing the SSL server certificate. Relative paths are relative to the data directory. - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. The default is <filename>server.crt</filename>. </para> @@ -1006,7 +1006,7 @@ include_dir 'conf.d' <varlistentry id="guc-ssl-crl-file" xreflabel="ssl_crl_file"> <term><varname>ssl_crl_file</varname> (<type>string</type>) <indexterm> - <primary><varname>ssl_crl_file</> configuration parameter</primary> + <primary><varname>ssl_crl_file</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -1014,7 +1014,7 @@ include_dir 'conf.d' Specifies the name of the file containing the SSL server certificate revocation list (CRL). Relative paths are relative to the data directory. - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. The default is empty, meaning no CRL file is loaded. </para> @@ -1024,14 +1024,14 @@ include_dir 'conf.d' <varlistentry id="guc-ssl-key-file" xreflabel="ssl_key_file"> <term><varname>ssl_key_file</varname> (<type>string</type>) <indexterm> - <primary><varname>ssl_key_file</> configuration parameter</primary> + <primary><varname>ssl_key_file</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Specifies the name of the file containing the SSL server private key. Relative paths are relative to the data directory. - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. The default is <filename>server.key</filename>. </para> @@ -1041,19 +1041,19 @@ include_dir 'conf.d' <varlistentry id="guc-ssl-ciphers" xreflabel="ssl_ciphers"> <term><varname>ssl_ciphers</varname> (<type>string</type>) <indexterm> - <primary><varname>ssl_ciphers</> configuration parameter</primary> + <primary><varname>ssl_ciphers</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> - Specifies a list of <acronym>SSL</> cipher suites that are allowed to be + Specifies a list of <acronym>SSL</acronym> cipher suites that are allowed to be used on secure connections. See - the <citerefentry><refentrytitle>ciphers</></citerefentry> manual page - in the <application>OpenSSL</> package for the syntax of this setting + the <citerefentry><refentrytitle>ciphers</refentrytitle></citerefentry> manual page + in the <application>OpenSSL</application> package for the syntax of this setting and a list of supported values. - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. - The default value is <literal>HIGH:MEDIUM:+3DES:!aNULL</>. The + The default value is <literal>HIGH:MEDIUM:+3DES:!aNULL</literal>. The default is usually a reasonable choice unless you have specific security requirements. </para> @@ -1065,7 +1065,7 @@ include_dir 'conf.d' <term><literal>HIGH</literal></term> <listitem> <para> - Cipher suites that use ciphers from <literal>HIGH</> group (e.g., + Cipher suites that use ciphers from <literal>HIGH</literal> group (e.g., AES, Camellia, 3DES) </para> </listitem> @@ -1075,7 +1075,7 @@ include_dir 'conf.d' <term><literal>MEDIUM</literal></term> <listitem> <para> - Cipher suites that use ciphers from <literal>MEDIUM</> group + Cipher suites that use ciphers from <literal>MEDIUM</literal> group (e.g., RC4, SEED) </para> </listitem> @@ -1085,11 +1085,11 @@ include_dir 'conf.d' <term><literal>+3DES</literal></term> <listitem> <para> - The OpenSSL default order for <literal>HIGH</> is problematic + The OpenSSL default order for <literal>HIGH</literal> is problematic because it orders 3DES higher than AES128. This is wrong because 3DES offers less security than AES128, and it is also much - slower. <literal>+3DES</> reorders it after all other - <literal>HIGH</> and <literal>MEDIUM</> ciphers. + slower. <literal>+3DES</literal> reorders it after all other + <literal>HIGH</literal> and <literal>MEDIUM</literal> ciphers. </para> </listitem> </varlistentry> @@ -1111,7 +1111,7 @@ include_dir 'conf.d' Available cipher suite details will vary across OpenSSL versions. Use the command <literal>openssl ciphers -v 'HIGH:MEDIUM:+3DES:!aNULL'</literal> to - see actual details for the currently installed <application>OpenSSL</> + see actual details for the currently installed <application>OpenSSL</application> version. Note that this list is filtered at run time based on the server key type. </para> @@ -1121,16 +1121,16 @@ include_dir 'conf.d' <varlistentry id="guc-ssl-prefer-server-ciphers" xreflabel="ssl_prefer_server_ciphers"> <term><varname>ssl_prefer_server_ciphers</varname> (<type>boolean</type>) <indexterm> - <primary><varname>ssl_prefer_server_ciphers</> configuration parameter</primary> + <primary><varname>ssl_prefer_server_ciphers</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Specifies whether to use the server's SSL cipher preferences, rather than the client's. - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. - The default is <literal>true</>. + The default is <literal>true</literal>. </para> <para> @@ -1146,28 +1146,28 @@ include_dir 'conf.d' <varlistentry id="guc-ssl-ecdh-curve" xreflabel="ssl_ecdh_curve"> <term><varname>ssl_ecdh_curve</varname> (<type>string</type>) <indexterm> - <primary><varname>ssl_ecdh_curve</> configuration parameter</primary> + <primary><varname>ssl_ecdh_curve</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> - Specifies the name of the curve to use in <acronym>ECDH</> key + Specifies the name of the curve to use in <acronym>ECDH</acronym> key exchange. It needs to be supported by all clients that connect. It does not need to be the same curve used by the server's Elliptic Curve key. - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. - The default is <literal>prime256v1</>. + The default is <literal>prime256v1</literal>. </para> <para> OpenSSL names for the most common curves are: - <literal>prime256v1</> (NIST P-256), - <literal>secp384r1</> (NIST P-384), - <literal>secp521r1</> (NIST P-521). + <literal>prime256v1</literal> (NIST P-256), + <literal>secp384r1</literal> (NIST P-384), + <literal>secp521r1</literal> (NIST P-521). The full list of available curves can be shown with the command <command>openssl ecparam -list_curves</command>. Not all of them - are usable in <acronym>TLS</> though. + are usable in <acronym>TLS</acronym> though. </para> </listitem> </varlistentry> @@ -1175,17 +1175,17 @@ include_dir 'conf.d' <varlistentry id="guc-password-encryption" xreflabel="password_encryption"> <term><varname>password_encryption</varname> (<type>enum</type>) <indexterm> - <primary><varname>password_encryption</> configuration parameter</primary> + <primary><varname>password_encryption</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> When a password is specified in <xref linkend="sql-createrole"> or <xref linkend="sql-alterrole">, this parameter determines the algorithm - to use to encrypt the password. The default value is <literal>md5</>, - which stores the password as an MD5 hash (<literal>on</> is also - accepted, as alias for <literal>md5</>). Setting this parameter to - <literal>scram-sha-256</> will encrypt the password with SCRAM-SHA-256. + to use to encrypt the password. The default value is <literal>md5</literal>, + which stores the password as an MD5 hash (<literal>on</literal> is also + accepted, as alias for <literal>md5</literal>). Setting this parameter to + <literal>scram-sha-256</literal> will encrypt the password with SCRAM-SHA-256. </para> <para> Note that older clients might lack support for the SCRAM authentication @@ -1198,7 +1198,7 @@ include_dir 'conf.d' <varlistentry id="guc-ssl-dh-params-file" xreflabel="ssl_dh_params_file"> <term><varname>ssl_dh_params_file</varname> (<type>string</type>) <indexterm> - <primary><varname>ssl_dh_params_file</> configuration parameter</primary> + <primary><varname>ssl_dh_params_file</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -1213,7 +1213,7 @@ include_dir 'conf.d' </para> <para> - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. </para> </listitem> @@ -1222,7 +1222,7 @@ include_dir 'conf.d' <varlistentry id="guc-krb-server-keyfile" xreflabel="krb_server_keyfile"> <term><varname>krb_server_keyfile</varname> (<type>string</type>) <indexterm> - <primary><varname>krb_server_keyfile</> configuration parameter</primary> + <primary><varname>krb_server_keyfile</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -1230,7 +1230,7 @@ include_dir 'conf.d' Sets the location of the Kerberos server key file. See <xref linkend="gssapi-auth"> for details. This parameter can only be set in the - <filename>postgresql.conf</> file or on the server command line. + <filename>postgresql.conf</filename> file or on the server command line. </para> </listitem> </varlistentry> @@ -1245,8 +1245,8 @@ include_dir 'conf.d' <para> Sets whether GSSAPI user names should be treated case-insensitively. - The default is <literal>off</> (case sensitive). This parameter can only be - set in the <filename>postgresql.conf</> file or on the server command line. + The default is <literal>off</literal> (case sensitive). This parameter can only be + set in the <filename>postgresql.conf</filename> file or on the server command line. </para> </listitem> </varlistentry> @@ -1254,43 +1254,43 @@ include_dir 'conf.d' <varlistentry id="guc-db-user-namespace" xreflabel="db_user_namespace"> <term><varname>db_user_namespace</varname> (<type>boolean</type>) <indexterm> - <primary><varname>db_user_namespace</> configuration parameter</primary> + <primary><varname>db_user_namespace</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> This parameter enables per-database user names. It is off by default. - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. </para> <para> - If this is on, you should create users as <replaceable>username@dbname</>. - When <replaceable>username</> is passed by a connecting client, - <literal>@</> and the database name are appended to the user + If this is on, you should create users as <replaceable>username@dbname</replaceable>. + When <replaceable>username</replaceable> is passed by a connecting client, + <literal>@</literal> and the database name are appended to the user name and that database-specific user name is looked up by the server. Note that when you create users with names containing - <literal>@</> within the SQL environment, you will need to + <literal>@</literal> within the SQL environment, you will need to quote the user name. </para> <para> With this parameter enabled, you can still create ordinary global - users. Simply append <literal>@</> when specifying the user - name in the client, e.g. <literal>joe@</>. The <literal>@</> + users. Simply append <literal>@</literal> when specifying the user + name in the client, e.g. <literal>joe@</literal>. The <literal>@</literal> will be stripped off before the user name is looked up by the server. </para> <para> - <varname>db_user_namespace</> causes the client's and + <varname>db_user_namespace</varname> causes the client's and server's user name representation to differ. Authentication checks are always done with the server's user name so authentication methods must be configured for the server's user name, not the client's. Because - <literal>md5</> uses the user name as salt on both the - client and server, <literal>md5</> cannot be used with - <varname>db_user_namespace</>. + <literal>md5</literal> uses the user name as salt on both the + client and server, <literal>md5</literal> cannot be used with + <varname>db_user_namespace</varname>. </para> <note> @@ -1317,15 +1317,15 @@ include_dir 'conf.d' <varlistentry id="guc-shared-buffers" xreflabel="shared_buffers"> <term><varname>shared_buffers</varname> (<type>integer</type>) <indexterm> - <primary><varname>shared_buffers</> configuration parameter</primary> + <primary><varname>shared_buffers</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Sets the amount of memory the database server uses for shared memory buffers. The default is typically 128 megabytes - (<literal>128MB</>), but might be less if your kernel settings will - not support it (as determined during <application>initdb</>). + (<literal>128MB</literal>), but might be less if your kernel settings will + not support it (as determined during <application>initdb</application>). This setting must be at least 128 kilobytes. (Non-default values of <symbol>BLCKSZ</symbol> change the minimum.) However, settings significantly higher than the minimum are usually needed @@ -1358,7 +1358,7 @@ include_dir 'conf.d' <varlistentry id="guc-huge-pages" xreflabel="huge_pages"> <term><varname>huge_pages</varname> (<type>enum</type>) <indexterm> - <primary><varname>huge_pages</> configuration parameter</primary> + <primary><varname>huge_pages</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -1392,7 +1392,7 @@ include_dir 'conf.d' <varlistentry id="guc-temp-buffers" xreflabel="temp_buffers"> <term><varname>temp_buffers</varname> (<type>integer</type>) <indexterm> - <primary><varname>temp_buffers</> configuration parameter</primary> + <primary><varname>temp_buffers</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -1400,7 +1400,7 @@ include_dir 'conf.d' Sets the maximum number of temporary buffers used by each database session. These are session-local buffers used only for access to temporary tables. The default is eight megabytes - (<literal>8MB</>). The setting can be changed within individual + (<literal>8MB</literal>). The setting can be changed within individual sessions, but only before the first use of temporary tables within the session; subsequent attempts to change the value will have no effect on that session. @@ -1408,10 +1408,10 @@ include_dir 'conf.d' <para> A session will allocate temporary buffers as needed up to the limit - given by <varname>temp_buffers</>. The cost of setting a large + given by <varname>temp_buffers</varname>. The cost of setting a large value in sessions that do not actually need many temporary buffers is only a buffer descriptor, or about 64 bytes, per - increment in <varname>temp_buffers</>. However if a buffer is + increment in <varname>temp_buffers</varname>. However if a buffer is actually used an additional 8192 bytes will be consumed for it (or in general, <symbol>BLCKSZ</symbol> bytes). </para> @@ -1421,13 +1421,13 @@ include_dir 'conf.d' <varlistentry id="guc-max-prepared-transactions" xreflabel="max_prepared_transactions"> <term><varname>max_prepared_transactions</varname> (<type>integer</type>) <indexterm> - <primary><varname>max_prepared_transactions</> configuration parameter</primary> + <primary><varname>max_prepared_transactions</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Sets the maximum number of transactions that can be in the - <quote>prepared</> state simultaneously (see <xref + <quote>prepared</quote> state simultaneously (see <xref linkend="sql-prepare-transaction">). Setting this parameter to zero (which is the default) disables the prepared-transaction feature. @@ -1454,14 +1454,14 @@ include_dir 'conf.d' <varlistentry id="guc-work-mem" xreflabel="work_mem"> <term><varname>work_mem</varname> (<type>integer</type>) <indexterm> - <primary><varname>work_mem</> configuration parameter</primary> + <primary><varname>work_mem</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Specifies the amount of memory to be used by internal sort operations and hash tables before writing to temporary disk files. The value - defaults to four megabytes (<literal>4MB</>). + defaults to four megabytes (<literal>4MB</literal>). Note that for a complex query, several sort or hash operations might be running in parallel; each operation will be allowed to use as much memory as this value specifies before it starts to write data into temporary @@ -1469,10 +1469,10 @@ include_dir 'conf.d' concurrently. Therefore, the total memory used could be many times the value of <varname>work_mem</varname>; it is necessary to keep this fact in mind when choosing the value. Sort operations are - used for <literal>ORDER BY</>, <literal>DISTINCT</>, and + used for <literal>ORDER BY</literal>, <literal>DISTINCT</literal>, and merge joins. Hash tables are used in hash joins, hash-based aggregation, and - hash-based processing of <literal>IN</> subqueries. + hash-based processing of <literal>IN</literal> subqueries. </para> </listitem> </varlistentry> @@ -1480,15 +1480,15 @@ include_dir 'conf.d' <varlistentry id="guc-maintenance-work-mem" xreflabel="maintenance_work_mem"> <term><varname>maintenance_work_mem</varname> (<type>integer</type>) <indexterm> - <primary><varname>maintenance_work_mem</> configuration parameter</primary> + <primary><varname>maintenance_work_mem</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Specifies the maximum amount of memory to be used by maintenance operations, such as <command>VACUUM</command>, <command>CREATE - INDEX</>, and <command>ALTER TABLE ADD FOREIGN KEY</>. It defaults - to 64 megabytes (<literal>64MB</>). Since only one of these + INDEX</command>, and <command>ALTER TABLE ADD FOREIGN KEY</command>. It defaults + to 64 megabytes (<literal>64MB</literal>). Since only one of these operations can be executed at a time by a database session, and an installation normally doesn't have many of them running concurrently, it's safe to set this value significantly larger @@ -1508,7 +1508,7 @@ include_dir 'conf.d' <varlistentry id="guc-autovacuum-work-mem" xreflabel="autovacuum_work_mem"> <term><varname>autovacuum_work_mem</varname> (<type>integer</type>) <indexterm> - <primary><varname>autovacuum_work_mem</> configuration parameter</primary> + <primary><varname>autovacuum_work_mem</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -1525,26 +1525,26 @@ include_dir 'conf.d' <varlistentry id="guc-max-stack-depth" xreflabel="max_stack_depth"> <term><varname>max_stack_depth</varname> (<type>integer</type>) <indexterm> - <primary><varname>max_stack_depth</> configuration parameter</primary> + <primary><varname>max_stack_depth</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Specifies the maximum safe depth of the server's execution stack. The ideal setting for this parameter is the actual stack size limit - enforced by the kernel (as set by <literal>ulimit -s</> or local + enforced by the kernel (as set by <literal>ulimit -s</literal> or local equivalent), less a safety margin of a megabyte or so. The safety margin is needed because the stack depth is not checked in every routine in the server, but only in key potentially-recursive routines such as expression evaluation. The default setting is two - megabytes (<literal>2MB</>), which is conservatively small and + megabytes (<literal>2MB</literal>), which is conservatively small and unlikely to risk crashes. However, it might be too small to allow execution of complex functions. Only superusers can change this setting. </para> <para> - Setting <varname>max_stack_depth</> higher than + Setting <varname>max_stack_depth</varname> higher than the actual kernel limit will mean that a runaway recursive function can crash an individual backend process. On platforms where <productname>PostgreSQL</productname> can determine the kernel limit, @@ -1558,25 +1558,25 @@ include_dir 'conf.d' <varlistentry id="guc-dynamic-shared-memory-type" xreflabel="dynamic_shared_memory_type"> <term><varname>dynamic_shared_memory_type</varname> (<type>enum</type>) <indexterm> - <primary><varname>dynamic_shared_memory_type</> configuration parameter</primary> + <primary><varname>dynamic_shared_memory_type</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Specifies the dynamic shared memory implementation that the server - should use. Possible values are <literal>posix</> (for POSIX shared - memory allocated using <literal>shm_open</>), <literal>sysv</literal> - (for System V shared memory allocated via <literal>shmget</>), - <literal>windows</> (for Windows shared memory), <literal>mmap</> + should use. Possible values are <literal>posix</literal> (for POSIX shared + memory allocated using <literal>shm_open</literal>), <literal>sysv</literal> + (for System V shared memory allocated via <literal>shmget</literal>), + <literal>windows</literal> (for Windows shared memory), <literal>mmap</literal> (to simulate shared memory using memory-mapped files stored in the - data directory), and <literal>none</> (to disable this feature). + data directory), and <literal>none</literal> (to disable this feature). Not all values are supported on all platforms; the first supported option is the default for that platform. The use of the - <literal>mmap</> option, which is not the default on any platform, + <literal>mmap</literal> option, which is not the default on any platform, is generally discouraged because the operating system may write modified pages back to disk repeatedly, increasing system I/O load; however, it may be useful for debugging, when the - <literal>pg_dynshmem</> directory is stored on a RAM disk, or when + <literal>pg_dynshmem</literal> directory is stored on a RAM disk, or when other shared memory facilities are not available. </para> </listitem> @@ -1592,7 +1592,7 @@ include_dir 'conf.d' <varlistentry id="guc-temp-file-limit" xreflabel="temp_file_limit"> <term><varname>temp_file_limit</varname> (<type>integer</type>) <indexterm> - <primary><varname>temp_file_limit</> configuration parameter</primary> + <primary><varname>temp_file_limit</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -1601,13 +1601,13 @@ include_dir 'conf.d' for temporary files, such as sort and hash temporary files, or the storage file for a held cursor. A transaction attempting to exceed this limit will be canceled. - The value is specified in kilobytes, and <literal>-1</> (the + The value is specified in kilobytes, and <literal>-1</literal> (the default) means no limit. Only superusers can change this setting. </para> <para> This setting constrains the total space used at any instant by all - temporary files used by a given <productname>PostgreSQL</> process. + temporary files used by a given <productname>PostgreSQL</productname> process. It should be noted that disk space used for explicit temporary tables, as opposed to temporary files used behind-the-scenes in query execution, does <emphasis>not</emphasis> count against this limit. @@ -1625,7 +1625,7 @@ include_dir 'conf.d' <varlistentry id="guc-max-files-per-process" xreflabel="max_files_per_process"> <term><varname>max_files_per_process</varname> (<type>integer</type>) <indexterm> - <primary><varname>max_files_per_process</> configuration parameter</primary> + <primary><varname>max_files_per_process</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -1637,7 +1637,7 @@ include_dir 'conf.d' allow individual processes to open many more files than the system can actually support if many processes all try to open that many files. If you find yourself seeing <quote>Too many open - files</> failures, try reducing this setting. + files</quote> failures, try reducing this setting. This parameter can only be set at server start. </para> </listitem> @@ -1684,7 +1684,7 @@ include_dir 'conf.d' <varlistentry id="guc-vacuum-cost-delay" xreflabel="vacuum_cost_delay"> <term><varname>vacuum_cost_delay</varname> (<type>integer</type>) <indexterm> - <primary><varname>vacuum_cost_delay</> configuration parameter</primary> + <primary><varname>vacuum_cost_delay</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -1702,7 +1702,7 @@ include_dir 'conf.d' <para> When using cost-based vacuuming, appropriate values for - <varname>vacuum_cost_delay</> are usually quite small, perhaps + <varname>vacuum_cost_delay</varname> are usually quite small, perhaps 10 or 20 milliseconds. Adjusting vacuum's resource consumption is best done by changing the other vacuum cost parameters. </para> @@ -1712,7 +1712,7 @@ include_dir 'conf.d' <varlistentry id="guc-vacuum-cost-page-hit" xreflabel="vacuum_cost_page_hit"> <term><varname>vacuum_cost_page_hit</varname> (<type>integer</type>) <indexterm> - <primary><varname>vacuum_cost_page_hit</> configuration parameter</primary> + <primary><varname>vacuum_cost_page_hit</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -1728,7 +1728,7 @@ include_dir 'conf.d' <varlistentry id="guc-vacuum-cost-page-miss" xreflabel="vacuum_cost_page_miss"> <term><varname>vacuum_cost_page_miss</varname> (<type>integer</type>) <indexterm> - <primary><varname>vacuum_cost_page_miss</> configuration parameter</primary> + <primary><varname>vacuum_cost_page_miss</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -1744,7 +1744,7 @@ include_dir 'conf.d' <varlistentry id="guc-vacuum-cost-page-dirty" xreflabel="vacuum_cost_page_dirty"> <term><varname>vacuum_cost_page_dirty</varname> (<type>integer</type>) <indexterm> - <primary><varname>vacuum_cost_page_dirty</> configuration parameter</primary> + <primary><varname>vacuum_cost_page_dirty</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -1760,7 +1760,7 @@ include_dir 'conf.d' <varlistentry id="guc-vacuum-cost-limit" xreflabel="vacuum_cost_limit"> <term><varname>vacuum_cost_limit</varname> (<type>integer</type>) <indexterm> - <primary><varname>vacuum_cost_limit</> configuration parameter</primary> + <primary><varname>vacuum_cost_limit</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -1792,8 +1792,8 @@ include_dir 'conf.d' <para> There is a separate server - process called the <firstterm>background writer</>, whose function - is to issue writes of <quote>dirty</> (new or modified) shared + process called the <firstterm>background writer</firstterm>, whose function + is to issue writes of <quote>dirty</quote> (new or modified) shared buffers. It writes shared buffers so server processes handling user queries seldom or never need to wait for a write to occur. However, the background writer does cause a net overall @@ -1808,7 +1808,7 @@ include_dir 'conf.d' <varlistentry id="guc-bgwriter-delay" xreflabel="bgwriter_delay"> <term><varname>bgwriter_delay</varname> (<type>integer</type>) <indexterm> - <primary><varname>bgwriter_delay</> configuration parameter</primary> + <primary><varname>bgwriter_delay</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -1816,16 +1816,16 @@ include_dir 'conf.d' Specifies the delay between activity rounds for the background writer. In each round the writer issues writes for some number of dirty buffers (controllable by the - following parameters). It then sleeps for <varname>bgwriter_delay</> + following parameters). It then sleeps for <varname>bgwriter_delay</varname> milliseconds, and repeats. When there are no dirty buffers in the buffer pool, though, it goes into a longer sleep regardless of - <varname>bgwriter_delay</>. The default value is 200 - milliseconds (<literal>200ms</>). Note that on many systems, the + <varname>bgwriter_delay</varname>. The default value is 200 + milliseconds (<literal>200ms</literal>). Note that on many systems, the effective resolution of sleep delays is 10 milliseconds; setting - <varname>bgwriter_delay</> to a value that is not a multiple of 10 + <varname>bgwriter_delay</varname> to a value that is not a multiple of 10 might have the same results as setting it to the next higher multiple of 10. This parameter can only be set in the - <filename>postgresql.conf</> file or on the server command line. + <filename>postgresql.conf</filename> file or on the server command line. </para> </listitem> </varlistentry> @@ -1833,7 +1833,7 @@ include_dir 'conf.d' <varlistentry id="guc-bgwriter-lru-maxpages" xreflabel="bgwriter_lru_maxpages"> <term><varname>bgwriter_lru_maxpages</varname> (<type>integer</type>) <indexterm> - <primary><varname>bgwriter_lru_maxpages</> configuration parameter</primary> + <primary><varname>bgwriter_lru_maxpages</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -1843,7 +1843,7 @@ include_dir 'conf.d' background writing. (Note that checkpoints, which are managed by a separate, dedicated auxiliary process, are unaffected.) The default value is 100 buffers. - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. </para> </listitem> @@ -1852,7 +1852,7 @@ include_dir 'conf.d' <varlistentry id="guc-bgwriter-lru-multiplier" xreflabel="bgwriter_lru_multiplier"> <term><varname>bgwriter_lru_multiplier</varname> (<type>floating point</type>) <indexterm> - <primary><varname>bgwriter_lru_multiplier</> configuration parameter</primary> + <primary><varname>bgwriter_lru_multiplier</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -1860,18 +1860,18 @@ include_dir 'conf.d' The number of dirty buffers written in each round is based on the number of new buffers that have been needed by server processes during recent rounds. The average recent need is multiplied by - <varname>bgwriter_lru_multiplier</> to arrive at an estimate of the + <varname>bgwriter_lru_multiplier</varname> to arrive at an estimate of the number of buffers that will be needed during the next round. Dirty buffers are written until there are that many clean, reusable buffers - available. (However, no more than <varname>bgwriter_lru_maxpages</> + available. (However, no more than <varname>bgwriter_lru_maxpages</varname> buffers will be written per round.) - Thus, a setting of 1.0 represents a <quote>just in time</> policy + Thus, a setting of 1.0 represents a <quote>just in time</quote> policy of writing exactly the number of buffers predicted to be needed. Larger values provide some cushion against spikes in demand, while smaller values intentionally leave writes to be done by server processes. The default is 2.0. - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. </para> </listitem> @@ -1880,7 +1880,7 @@ include_dir 'conf.d' <varlistentry id="guc-bgwriter-flush-after" xreflabel="bgwriter_flush_after"> <term><varname>bgwriter_flush_after</varname> (<type>integer</type>) <indexterm> - <primary><varname>bgwriter_flush_after</> configuration parameter</primary> + <primary><varname>bgwriter_flush_after</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -1897,10 +1897,10 @@ include_dir 'conf.d' cache, where performance might degrade. This setting may have no effect on some platforms. The valid range is between <literal>0</literal>, which disables forced writeback, and - <literal>2MB</literal>. The default is <literal>512kB</> on Linux, - <literal>0</> elsewhere. (If <symbol>BLCKSZ</symbol> is not 8kB, + <literal>2MB</literal>. The default is <literal>512kB</literal> on Linux, + <literal>0</literal> elsewhere. (If <symbol>BLCKSZ</symbol> is not 8kB, the default and maximum values scale proportionally to it.) - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. </para> </listitem> @@ -1923,15 +1923,15 @@ include_dir 'conf.d' <varlistentry id="guc-effective-io-concurrency" xreflabel="effective_io_concurrency"> <term><varname>effective_io_concurrency</varname> (<type>integer</type>) <indexterm> - <primary><varname>effective_io_concurrency</> configuration parameter</primary> + <primary><varname>effective_io_concurrency</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Sets the number of concurrent disk I/O operations that - <productname>PostgreSQL</> expects can be executed + <productname>PostgreSQL</productname> expects can be executed simultaneously. Raising this value will increase the number of I/O - operations that any individual <productname>PostgreSQL</> session + operations that any individual <productname>PostgreSQL</productname> session attempts to initiate in parallel. The allowed range is 1 to 1000, or zero to disable issuance of asynchronous I/O requests. Currently, this setting only affects bitmap heap scans. @@ -1951,7 +1951,7 @@ include_dir 'conf.d' </para> <para> - Asynchronous I/O depends on an effective <function>posix_fadvise</> + Asynchronous I/O depends on an effective <function>posix_fadvise</function> function, which some operating systems lack. If the function is not present then setting this parameter to anything but zero will result in an error. On some operating systems (e.g., Solaris), the function @@ -1970,7 +1970,7 @@ include_dir 'conf.d' <varlistentry id="guc-max-worker-processes" xreflabel="max_worker_processes"> <term><varname>max_worker_processes</varname> (<type>integer</type>) <indexterm> - <primary><varname>max_worker_processes</> configuration parameter</primary> + <primary><varname>max_worker_processes</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -1997,7 +1997,7 @@ include_dir 'conf.d' <varlistentry id="guc-max-parallel-workers-per-gather" xreflabel="max_parallel_workers_per_gather"> <term><varname>max_parallel_workers_per_gather</varname> (<type>integer</type>) <indexterm> - <primary><varname>max_parallel_workers_per_gather</> configuration parameter</primary> + <primary><varname>max_parallel_workers_per_gather</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -2021,7 +2021,7 @@ include_dir 'conf.d' account when choosing a value for this setting, as well as when configuring other settings that control resource utilization, such as <xref linkend="guc-work-mem">. Resource limits such as - <varname>work_mem</> are applied individually to each worker, + <varname>work_mem</varname> are applied individually to each worker, which means the total utilization may be much higher across all processes than it would normally be for any single process. For example, a parallel query using 4 workers may use up to 5 times @@ -2039,7 +2039,7 @@ include_dir 'conf.d' <varlistentry id="guc-max-parallel-workers" xreflabel="max_parallel_workers"> <term><varname>max_parallel_workers</varname> (<type>integer</type>) <indexterm> - <primary><varname>max_parallel_workers</> configuration parameter</primary> + <primary><varname>max_parallel_workers</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -2059,7 +2059,7 @@ include_dir 'conf.d' <varlistentry id="guc-backend-flush-after" xreflabel="backend_flush_after"> <term><varname>backend_flush_after</varname> (<type>integer</type>) <indexterm> - <primary><varname>backend_flush_after</> configuration parameter</primary> + <primary><varname>backend_flush_after</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -2076,7 +2076,7 @@ include_dir 'conf.d' than the OS's page cache, where performance might degrade. This setting may have no effect on some platforms. The valid range is between <literal>0</literal>, which disables forced writeback, - and <literal>2MB</literal>. The default is <literal>0</>, i.e., no + and <literal>2MB</literal>. The default is <literal>0</literal>, i.e., no forced writeback. (If <symbol>BLCKSZ</symbol> is not 8kB, the maximum value scales proportionally to it.) </para> @@ -2086,13 +2086,13 @@ include_dir 'conf.d' <varlistentry id="guc-old-snapshot-threshold" xreflabel="old_snapshot_threshold"> <term><varname>old_snapshot_threshold</varname> (<type>integer</type>) <indexterm> - <primary><varname>old_snapshot_threshold</> configuration parameter</primary> + <primary><varname>old_snapshot_threshold</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Sets the minimum time that a snapshot can be used without risk of a - <literal>snapshot too old</> error occurring when using the snapshot. + <literal>snapshot too old</literal> error occurring when using the snapshot. This parameter can only be set at server start. </para> @@ -2107,12 +2107,12 @@ include_dir 'conf.d' </para> <para> - A value of <literal>-1</> disables this feature, and is the default. + A value of <literal>-1</literal> disables this feature, and is the default. Useful values for production work probably range from a small number of hours to a few days. The setting will be coerced to a granularity - of minutes, and small numbers (such as <literal>0</> or - <literal>1min</>) are only allowed because they may sometimes be - useful for testing. While a setting as high as <literal>60d</> is + of minutes, and small numbers (such as <literal>0</literal> or + <literal>1min</literal>) are only allowed because they may sometimes be + useful for testing. While a setting as high as <literal>60d</literal> is allowed, please note that in many workloads extreme bloat or transaction ID wraparound may occur in much shorter time frames. </para> @@ -2120,10 +2120,10 @@ include_dir 'conf.d' <para> When this feature is enabled, freed space at the end of a relation cannot be released to the operating system, since that could remove - information needed to detect the <literal>snapshot too old</> + information needed to detect the <literal>snapshot too old</literal> condition. All space allocated to a relation remains associated with that relation for reuse only within that relation unless explicitly - freed (for example, with <command>VACUUM FULL</>). + freed (for example, with <command>VACUUM FULL</command>). </para> <para> @@ -2135,7 +2135,7 @@ include_dir 'conf.d' Some tables cannot safely be vacuumed early, and so will not be affected by this setting, such as system catalogs. For such tables this setting will neither reduce bloat nor create a possibility - of a <literal>snapshot too old</> error on scanning. + of a <literal>snapshot too old</literal> error on scanning. </para> </listitem> </varlistentry> @@ -2158,45 +2158,45 @@ include_dir 'conf.d' <varlistentry id="guc-wal-level" xreflabel="wal_level"> <term><varname>wal_level</varname> (<type>enum</type>) <indexterm> - <primary><varname>wal_level</> configuration parameter</primary> + <primary><varname>wal_level</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> - <varname>wal_level</> determines how much information is written to - the WAL. The default value is <literal>replica</>, which writes enough + <varname>wal_level</varname> determines how much information is written to + the WAL. The default value is <literal>replica</literal>, which writes enough data to support WAL archiving and replication, including running - read-only queries on a standby server. <literal>minimal</> removes all + read-only queries on a standby server. <literal>minimal</literal> removes all logging except the information required to recover from a crash or immediate shutdown. Finally, - <literal>logical</> adds information necessary to support logical + <literal>logical</literal> adds information necessary to support logical decoding. Each level includes the information logged at all lower levels. This parameter can only be set at server start. </para> <para> - In <literal>minimal</> level, WAL-logging of some bulk + In <literal>minimal</literal> level, WAL-logging of some bulk operations can be safely skipped, which can make those operations much faster (see <xref linkend="populate-pitr">). Operations in which this optimization can be applied include: <simplelist> - <member><command>CREATE TABLE AS</></member> - <member><command>CREATE INDEX</></member> - <member><command>CLUSTER</></member> - <member><command>COPY</> into tables that were created or truncated in the same + <member><command>CREATE TABLE AS</command></member> + <member><command>CREATE INDEX</command></member> + <member><command>CLUSTER</command></member> + <member><command>COPY</command> into tables that were created or truncated in the same transaction</member> </simplelist> But minimal WAL does not contain enough information to reconstruct the - data from a base backup and the WAL logs, so <literal>replica</> or + data from a base backup and the WAL logs, so <literal>replica</literal> or higher must be used to enable WAL archiving (<xref linkend="guc-archive-mode">) and streaming replication. </para> <para> - In <literal>logical</> level, the same information is logged as - with <literal>replica</>, plus information needed to allow + In <literal>logical</literal> level, the same information is logged as + with <literal>replica</literal>, plus information needed to allow extracting logical change sets from the WAL. Using a level of - <literal>logical</> will increase the WAL volume, particularly if many + <literal>logical</literal> will increase the WAL volume, particularly if many tables are configured for <literal>REPLICA IDENTITY FULL</literal> and - many <command>UPDATE</> and <command>DELETE</> statements are + many <command>UPDATE</command> and <command>DELETE</command> statements are executed. </para> <para> @@ -2210,14 +2210,14 @@ include_dir 'conf.d' <varlistentry id="guc-fsync" xreflabel="fsync"> <term><varname>fsync</varname> (<type>boolean</type>) <indexterm> - <primary><varname>fsync</> configuration parameter</primary> + <primary><varname>fsync</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> - If this parameter is on, the <productname>PostgreSQL</> server + If this parameter is on, the <productname>PostgreSQL</productname> server will try to make sure that updates are physically written to - disk, by issuing <function>fsync()</> system calls or various + disk, by issuing <function>fsync()</function> system calls or various equivalent methods (see <xref linkend="guc-wal-sync-method">). This ensures that the database cluster can recover to a consistent state after an operating system or hardware crash. @@ -2249,7 +2249,7 @@ include_dir 'conf.d' off to on, it is necessary to force all modified buffers in the kernel to durable storage. This can be done while the cluster is shutdown or while <varname>fsync</varname> is on by running <command>initdb - --sync-only</command>, running <command>sync</>, unmounting the + --sync-only</command>, running <command>sync</command>, unmounting the file system, or rebooting the server. </para> @@ -2261,7 +2261,7 @@ include_dir 'conf.d' </para> <para> - <varname>fsync</varname> can only be set in the <filename>postgresql.conf</> + <varname>fsync</varname> can only be set in the <filename>postgresql.conf</filename> file or on the server command line. If you turn this parameter off, also consider turning off <xref linkend="guc-full-page-writes">. @@ -2272,26 +2272,26 @@ include_dir 'conf.d' <varlistentry id="guc-synchronous-commit" xreflabel="synchronous_commit"> <term><varname>synchronous_commit</varname> (<type>enum</type>) <indexterm> - <primary><varname>synchronous_commit</> configuration parameter</primary> + <primary><varname>synchronous_commit</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Specifies whether transaction commit will wait for WAL records - to be written to disk before the command returns a <quote>success</> - indication to the client. Valid values are <literal>on</>, - <literal>remote_apply</>, <literal>remote_write</>, <literal>local</>, - and <literal>off</>. The default, and safe, setting - is <literal>on</>. When <literal>off</>, there can be a delay between + to be written to disk before the command returns a <quote>success</quote> + indication to the client. Valid values are <literal>on</literal>, + <literal>remote_apply</literal>, <literal>remote_write</literal>, <literal>local</literal>, + and <literal>off</literal>. The default, and safe, setting + is <literal>on</literal>. When <literal>off</literal>, there can be a delay between when success is reported to the client and when the transaction is really guaranteed to be safe against a server crash. (The maximum delay is three times <xref linkend="guc-wal-writer-delay">.) Unlike - <xref linkend="guc-fsync">, setting this parameter to <literal>off</> + <xref linkend="guc-fsync">, setting this parameter to <literal>off</literal> does not create any risk of database inconsistency: an operating system or database crash might result in some recent allegedly-committed transactions being lost, but the database state will be just the same as if those transactions had - been aborted cleanly. So, turning <varname>synchronous_commit</> off + been aborted cleanly. So, turning <varname>synchronous_commit</varname> off can be a useful alternative when performance is more important than exact certainty about the durability of a transaction. For more discussion see <xref linkend="wal-async-commit">. @@ -2300,32 +2300,32 @@ include_dir 'conf.d' If <xref linkend="guc-synchronous-standby-names"> is non-empty, this parameter also controls whether or not transaction commits will wait for their WAL records to be replicated to the standby server(s). - When set to <literal>on</>, commits will wait until replies + When set to <literal>on</literal>, commits will wait until replies from the current synchronous standby(s) indicate they have received the commit record of the transaction and flushed it to disk. This ensures the transaction will not be lost unless both the primary and all synchronous standbys suffer corruption of their database storage. - When set to <literal>remote_apply</>, commits will wait until replies + When set to <literal>remote_apply</literal>, commits will wait until replies from the current synchronous standby(s) indicate they have received the commit record of the transaction and applied it, so that it has become visible to queries on the standby(s). - When set to <literal>remote_write</>, commits will wait until replies + When set to <literal>remote_write</literal>, commits will wait until replies from the current synchronous standby(s) indicate they have received the commit record of the transaction and written it out to their operating system. This setting is sufficient to ensure data preservation even if a standby instance of - <productname>PostgreSQL</> were to crash, but not if the standby + <productname>PostgreSQL</productname> were to crash, but not if the standby suffers an operating-system-level crash, since the data has not necessarily reached stable storage on the standby. - Finally, the setting <literal>local</> causes commits to wait for + Finally, the setting <literal>local</literal> causes commits to wait for local flush to disk, but not for replication. This is not usually desirable when synchronous replication is in use, but is provided for completeness. </para> <para> - If <varname>synchronous_standby_names</> is empty, the settings - <literal>on</>, <literal>remote_apply</>, <literal>remote_write</> - and <literal>local</> all provide the same synchronization level: + If <varname>synchronous_standby_names</varname> is empty, the settings + <literal>on</literal>, <literal>remote_apply</literal>, <literal>remote_write</literal> + and <literal>local</literal> all provide the same synchronization level: transaction commits only wait for local flush to disk. </para> <para> @@ -2335,7 +2335,7 @@ include_dir 'conf.d' transactions commit synchronously and others asynchronously. For example, to make a single multistatement transaction commit asynchronously when the default is the opposite, issue <command>SET - LOCAL synchronous_commit TO OFF</> within the transaction. + LOCAL synchronous_commit TO OFF</command> within the transaction. </para> </listitem> </varlistentry> @@ -2343,7 +2343,7 @@ include_dir 'conf.d' <varlistentry id="guc-wal-sync-method" xreflabel="wal_sync_method"> <term><varname>wal_sync_method</varname> (<type>enum</type>) <indexterm> - <primary><varname>wal_sync_method</> configuration parameter</primary> + <primary><varname>wal_sync_method</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -2356,41 +2356,41 @@ include_dir 'conf.d' <itemizedlist> <listitem> <para> - <literal>open_datasync</> (write WAL files with <function>open()</> option <symbol>O_DSYNC</>) + <literal>open_datasync</literal> (write WAL files with <function>open()</function> option <symbol>O_DSYNC</symbol>) </para> </listitem> <listitem> <para> - <literal>fdatasync</> (call <function>fdatasync()</> at each commit) + <literal>fdatasync</literal> (call <function>fdatasync()</function> at each commit) </para> </listitem> <listitem> <para> - <literal>fsync</> (call <function>fsync()</> at each commit) + <literal>fsync</literal> (call <function>fsync()</function> at each commit) </para> </listitem> <listitem> <para> - <literal>fsync_writethrough</> (call <function>fsync()</> at each commit, forcing write-through of any disk write cache) + <literal>fsync_writethrough</literal> (call <function>fsync()</function> at each commit, forcing write-through of any disk write cache) </para> </listitem> <listitem> <para> - <literal>open_sync</> (write WAL files with <function>open()</> option <symbol>O_SYNC</>) + <literal>open_sync</literal> (write WAL files with <function>open()</function> option <symbol>O_SYNC</symbol>) </para> </listitem> </itemizedlist> <para> - The <literal>open_</>* options also use <literal>O_DIRECT</> if available. + The <literal>open_</literal>* options also use <literal>O_DIRECT</literal> if available. Not all of these choices are available on all platforms. The default is the first method in the above list that is supported - by the platform, except that <literal>fdatasync</> is the default on + by the platform, except that <literal>fdatasync</literal> is the default on Linux. The default is not necessarily ideal; it might be necessary to change this setting or other aspects of your system configuration in order to create a crash-safe configuration or achieve optimal performance. These aspects are discussed in <xref linkend="wal-reliability">. - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. </para> </listitem> @@ -2399,12 +2399,12 @@ include_dir 'conf.d' <varlistentry id="guc-full-page-writes" xreflabel="full_page_writes"> <term><varname>full_page_writes</varname> (<type>boolean</type>) <indexterm> - <primary><varname>full_page_writes</> configuration parameter</primary> + <primary><varname>full_page_writes</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> - When this parameter is on, the <productname>PostgreSQL</> server + When this parameter is on, the <productname>PostgreSQL</productname> server writes the entire content of each disk page to WAL during the first modification of that page after a checkpoint. This is needed because @@ -2436,9 +2436,9 @@ include_dir 'conf.d' </para> <para> - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. - The default is <literal>on</>. + The default is <literal>on</literal>. </para> </listitem> </varlistentry> @@ -2446,12 +2446,12 @@ include_dir 'conf.d' <varlistentry id="guc-wal-log-hints" xreflabel="wal_log_hints"> <term><varname>wal_log_hints</varname> (<type>boolean</type>) <indexterm> - <primary><varname>wal_log_hints</> configuration parameter</primary> + <primary><varname>wal_log_hints</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> - When this parameter is <literal>on</>, the <productname>PostgreSQL</> + When this parameter is <literal>on</literal>, the <productname>PostgreSQL</productname> server writes the entire content of each disk page to WAL during the first modification of that page after a checkpoint, even for non-critical modifications of so-called hint bits. @@ -2465,7 +2465,7 @@ include_dir 'conf.d' </para> <para> - This parameter can only be set at server start. The default value is <literal>off</>. + This parameter can only be set at server start. The default value is <literal>off</literal>. </para> </listitem> </varlistentry> @@ -2473,16 +2473,16 @@ include_dir 'conf.d' <varlistentry id="guc-wal-compression" xreflabel="wal_compression"> <term><varname>wal_compression</varname> (<type>boolean</type>) <indexterm> - <primary><varname>wal_compression</> configuration parameter</primary> + <primary><varname>wal_compression</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> - When this parameter is <literal>on</>, the <productname>PostgreSQL</> + When this parameter is <literal>on</literal>, the <productname>PostgreSQL</productname> server compresses a full page image written to WAL when <xref linkend="guc-full-page-writes"> is on or during a base backup. A compressed page image will be decompressed during WAL replay. - The default value is <literal>off</>. + The default value is <literal>off</literal>. Only superusers can change this setting. </para> @@ -2498,7 +2498,7 @@ include_dir 'conf.d' <varlistentry id="guc-wal-buffers" xreflabel="wal_buffers"> <term><varname>wal_buffers</varname> (<type>integer</type>) <indexterm> - <primary><varname>wal_buffers</> configuration parameter</primary> + <primary><varname>wal_buffers</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -2530,24 +2530,24 @@ include_dir 'conf.d' <varlistentry id="guc-wal-writer-delay" xreflabel="wal_writer_delay"> <term><varname>wal_writer_delay</varname> (<type>integer</type>) <indexterm> - <primary><varname>wal_writer_delay</> configuration parameter</primary> + <primary><varname>wal_writer_delay</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Specifies how often the WAL writer flushes WAL. After flushing WAL it - sleeps for <varname>wal_writer_delay</> milliseconds, unless woken up + sleeps for <varname>wal_writer_delay</varname> milliseconds, unless woken up by an asynchronously committing transaction. If the last flush - happened less than <varname>wal_writer_delay</> milliseconds ago and - less than <varname>wal_writer_flush_after</> bytes of WAL have been + happened less than <varname>wal_writer_delay</varname> milliseconds ago and + less than <varname>wal_writer_flush_after</varname> bytes of WAL have been produced since, then WAL is only written to the operating system, not flushed to disk. - The default value is 200 milliseconds (<literal>200ms</>). Note that + The default value is 200 milliseconds (<literal>200ms</literal>). Note that on many systems, the effective resolution of sleep delays is 10 - milliseconds; setting <varname>wal_writer_delay</> to a value that is + milliseconds; setting <varname>wal_writer_delay</varname> to a value that is not a multiple of 10 might have the same results as setting it to the next higher multiple of 10. This parameter can only be set in the - <filename>postgresql.conf</> file or on the server command line. + <filename>postgresql.conf</filename> file or on the server command line. </para> </listitem> </varlistentry> @@ -2555,19 +2555,19 @@ include_dir 'conf.d' <varlistentry id="guc-wal-writer-flush-after" xreflabel="wal_writer_flush_after"> <term><varname>wal_writer_flush_after</varname> (<type>integer</type>) <indexterm> - <primary><varname>wal_writer_flush_after</> configuration parameter</primary> + <primary><varname>wal_writer_flush_after</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Specifies how often the WAL writer flushes WAL. If the last flush - happened less than <varname>wal_writer_delay</> milliseconds ago and - less than <varname>wal_writer_flush_after</> bytes of WAL have been + happened less than <varname>wal_writer_delay</varname> milliseconds ago and + less than <varname>wal_writer_flush_after</varname> bytes of WAL have been produced since, then WAL is only written to the operating system, not - flushed to disk. If <varname>wal_writer_flush_after</> is set - to <literal>0</> then WAL data is flushed immediately. The default is + flushed to disk. If <varname>wal_writer_flush_after</varname> is set + to <literal>0</literal> then WAL data is flushed immediately. The default is <literal>1MB</literal>. This parameter can only be set in the - <filename>postgresql.conf</> file or on the server command line. + <filename>postgresql.conf</filename> file or on the server command line. </para> </listitem> </varlistentry> @@ -2575,7 +2575,7 @@ include_dir 'conf.d' <varlistentry id="guc-commit-delay" xreflabel="commit_delay"> <term><varname>commit_delay</varname> (<type>integer</type>) <indexterm> - <primary><varname>commit_delay</> configuration parameter</primary> + <primary><varname>commit_delay</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -2592,15 +2592,15 @@ include_dir 'conf.d' <varname>commit_siblings</varname> other transactions are active when a flush is about to be initiated. Also, no delays are performed if <varname>fsync</varname> is disabled. - The default <varname>commit_delay</> is zero (no delay). + The default <varname>commit_delay</varname> is zero (no delay). Only superusers can change this setting. </para> <para> - In <productname>PostgreSQL</> releases prior to 9.3, + In <productname>PostgreSQL</productname> releases prior to 9.3, <varname>commit_delay</varname> behaved differently and was much less effective: it affected only commits, rather than all WAL flushes, and waited for the entire configured delay even if the WAL flush - was completed sooner. Beginning in <productname>PostgreSQL</> 9.3, + was completed sooner. Beginning in <productname>PostgreSQL</productname> 9.3, the first process that becomes ready to flush waits for the configured interval, while subsequent processes wait only until the leader completes the flush operation. @@ -2611,13 +2611,13 @@ include_dir 'conf.d' <varlistentry id="guc-commit-siblings" xreflabel="commit_siblings"> <term><varname>commit_siblings</varname> (<type>integer</type>) <indexterm> - <primary><varname>commit_siblings</> configuration parameter</primary> + <primary><varname>commit_siblings</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Minimum number of concurrent open transactions to require - before performing the <varname>commit_delay</> delay. A larger + before performing the <varname>commit_delay</varname> delay. A larger value makes it more probable that at least one other transaction will become ready to commit during the delay interval. The default is five transactions. @@ -2634,17 +2634,17 @@ include_dir 'conf.d' <varlistentry id="guc-checkpoint-timeout" xreflabel="checkpoint_timeout"> <term><varname>checkpoint_timeout</varname> (<type>integer</type>) <indexterm> - <primary><varname>checkpoint_timeout</> configuration parameter</primary> + <primary><varname>checkpoint_timeout</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Maximum time between automatic WAL checkpoints, in seconds. The valid range is between 30 seconds and one day. - The default is five minutes (<literal>5min</>). + The default is five minutes (<literal>5min</literal>). Increasing this parameter can increase the amount of time needed for crash recovery. - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. </para> </listitem> @@ -2653,14 +2653,14 @@ include_dir 'conf.d' <varlistentry id="guc-checkpoint-completion-target" xreflabel="checkpoint_completion_target"> <term><varname>checkpoint_completion_target</varname> (<type>floating point</type>) <indexterm> - <primary><varname>checkpoint_completion_target</> configuration parameter</primary> + <primary><varname>checkpoint_completion_target</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Specifies the target of checkpoint completion, as a fraction of total time between checkpoints. The default is 0.5. - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. </para> </listitem> @@ -2669,7 +2669,7 @@ include_dir 'conf.d' <varlistentry id="guc-checkpoint-flush-after" xreflabel="checkpoint_flush_after"> <term><varname>checkpoint_flush_after</varname> (<type>integer</type>) <indexterm> - <primary><varname>checkpoint_flush_after</> configuration parameter</primary> + <primary><varname>checkpoint_flush_after</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -2686,10 +2686,10 @@ include_dir 'conf.d' than the OS's page cache, where performance might degrade. This setting may have no effect on some platforms. The valid range is between <literal>0</literal>, which disables forced writeback, - and <literal>2MB</literal>. The default is <literal>256kB</> on - Linux, <literal>0</> elsewhere. (If <symbol>BLCKSZ</symbol> is not + and <literal>2MB</literal>. The default is <literal>256kB</literal> on + Linux, <literal>0</literal> elsewhere. (If <symbol>BLCKSZ</symbol> is not 8kB, the default and maximum values scale proportionally to it.) - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. </para> </listitem> @@ -2698,7 +2698,7 @@ include_dir 'conf.d' <varlistentry id="guc-checkpoint-warning" xreflabel="checkpoint_warning"> <term><varname>checkpoint_warning</varname> (<type>integer</type>) <indexterm> - <primary><varname>checkpoint_warning</> configuration parameter</primary> + <primary><varname>checkpoint_warning</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -2706,11 +2706,11 @@ include_dir 'conf.d' Write a message to the server log if checkpoints caused by the filling of checkpoint segment files happen closer together than this many seconds (which suggests that - <varname>max_wal_size</> ought to be raised). The default is - 30 seconds (<literal>30s</>). Zero disables the warning. + <varname>max_wal_size</varname> ought to be raised). The default is + 30 seconds (<literal>30s</literal>). Zero disables the warning. No warnings will be generated if <varname>checkpoint_timeout</varname> is less than <varname>checkpoint_warning</varname>. - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. </para> </listitem> @@ -2719,19 +2719,19 @@ include_dir 'conf.d' <varlistentry id="guc-max-wal-size" xreflabel="max_wal_size"> <term><varname>max_wal_size</varname> (<type>integer</type>) <indexterm> - <primary><varname>max_wal_size</> configuration parameter</primary> + <primary><varname>max_wal_size</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Maximum size to let the WAL grow to between automatic WAL checkpoints. This is a soft limit; WAL size can exceed - <varname>max_wal_size</> under special circumstances, like - under heavy load, a failing <varname>archive_command</>, or a high - <varname>wal_keep_segments</> setting. The default is 1 GB. + <varname>max_wal_size</varname> under special circumstances, like + under heavy load, a failing <varname>archive_command</varname>, or a high + <varname>wal_keep_segments</varname> setting. The default is 1 GB. Increasing this parameter can increase the amount of time needed for crash recovery. - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. </para> </listitem> @@ -2740,7 +2740,7 @@ include_dir 'conf.d' <varlistentry id="guc-min-wal-size" xreflabel="min_wal_size"> <term><varname>min_wal_size</varname> (<type>integer</type>) <indexterm> - <primary><varname>min_wal_size</> configuration parameter</primary> + <primary><varname>min_wal_size</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -2750,7 +2750,7 @@ include_dir 'conf.d' This can be used to ensure that enough WAL space is reserved to handle spikes in WAL usage, for example when running large batch jobs. The default is 80 MB. - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. </para> </listitem> @@ -2765,29 +2765,29 @@ include_dir 'conf.d' <varlistentry id="guc-archive-mode" xreflabel="archive_mode"> <term><varname>archive_mode</varname> (<type>enum</type>) <indexterm> - <primary><varname>archive_mode</> configuration parameter</primary> + <primary><varname>archive_mode</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> - When <varname>archive_mode</> is enabled, completed WAL segments + When <varname>archive_mode</varname> is enabled, completed WAL segments are sent to archive storage by setting - <xref linkend="guc-archive-command">. In addition to <literal>off</>, - to disable, there are two modes: <literal>on</>, and - <literal>always</>. During normal operation, there is no - difference between the two modes, but when set to <literal>always</> + <xref linkend="guc-archive-command">. In addition to <literal>off</literal>, + to disable, there are two modes: <literal>on</literal>, and + <literal>always</literal>. During normal operation, there is no + difference between the two modes, but when set to <literal>always</literal> the WAL archiver is enabled also during archive recovery or standby - mode. In <literal>always</> mode, all files restored from the archive + mode. In <literal>always</literal> mode, all files restored from the archive or streamed with streaming replication will be archived (again). See <xref linkend="continuous-archiving-in-standby"> for details. </para> <para> - <varname>archive_mode</> and <varname>archive_command</> are - separate variables so that <varname>archive_command</> can be + <varname>archive_mode</varname> and <varname>archive_command</varname> are + separate variables so that <varname>archive_command</varname> can be changed without leaving archiving mode. This parameter can only be set at server start. - <varname>archive_mode</> cannot be enabled when - <varname>wal_level</> is set to <literal>minimal</>. + <varname>archive_mode</varname> cannot be enabled when + <varname>wal_level</varname> is set to <literal>minimal</literal>. </para> </listitem> </varlistentry> @@ -2795,32 +2795,32 @@ include_dir 'conf.d' <varlistentry id="guc-archive-command" xreflabel="archive_command"> <term><varname>archive_command</varname> (<type>string</type>) <indexterm> - <primary><varname>archive_command</> configuration parameter</primary> + <primary><varname>archive_command</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> The local shell command to execute to archive a completed WAL file - segment. Any <literal>%p</> in the string is + segment. Any <literal>%p</literal> in the string is replaced by the path name of the file to archive, and any - <literal>%f</> is replaced by only the file name. + <literal>%f</literal> is replaced by only the file name. (The path name is relative to the working directory of the server, i.e., the cluster's data directory.) - Use <literal>%%</> to embed an actual <literal>%</> character in the + Use <literal>%%</literal> to embed an actual <literal>%</literal> character in the command. It is important for the command to return a zero exit status only if it succeeds. For more information see <xref linkend="backup-archiving-wal">. </para> <para> - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. It is ignored unless - <varname>archive_mode</> was enabled at server start. - If <varname>archive_command</> is an empty string (the default) while - <varname>archive_mode</> is enabled, WAL archiving is temporarily + <varname>archive_mode</varname> was enabled at server start. + If <varname>archive_command</varname> is an empty string (the default) while + <varname>archive_mode</varname> is enabled, WAL archiving is temporarily disabled, but the server continues to accumulate WAL segment files in the expectation that a command will soon be provided. Setting - <varname>archive_command</> to a command that does nothing but - return true, e.g. <literal>/bin/true</> (<literal>REM</> on + <varname>archive_command</varname> to a command that does nothing but + return true, e.g. <literal>/bin/true</literal> (<literal>REM</literal> on Windows), effectively disables archiving, but also breaks the chain of WAL files needed for archive recovery, so it should only be used in unusual circumstances. @@ -2831,7 +2831,7 @@ include_dir 'conf.d' <varlistentry id="guc-archive-timeout" xreflabel="archive_timeout"> <term><varname>archive_timeout</varname> (<type>integer</type>) <indexterm> - <primary><varname>archive_timeout</> configuration parameter</primary> + <primary><varname>archive_timeout</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -2841,7 +2841,7 @@ include_dir 'conf.d' traffic (or has slack periods where it does so), there could be a long delay between the completion of a transaction and its safe recording in archive storage. To limit how old unarchived - data can be, you can set <varname>archive_timeout</> to force the + data can be, you can set <varname>archive_timeout</varname> to force the server to switch to a new WAL segment file periodically. When this parameter is greater than zero, the server will switch to a new segment file whenever this many seconds have elapsed since the last @@ -2850,13 +2850,13 @@ include_dir 'conf.d' no database activity). Note that archived files that are closed early due to a forced switch are still the same length as completely full files. Therefore, it is unwise to use a very short - <varname>archive_timeout</> — it will bloat your archive - storage. <varname>archive_timeout</> settings of a minute or so are + <varname>archive_timeout</varname> — it will bloat your archive + storage. <varname>archive_timeout</varname> settings of a minute or so are usually reasonable. You should consider using streaming replication, instead of archiving, if you want data to be copied off the master server more quickly than that. This parameter can only be set in the - <filename>postgresql.conf</> file or on the server command line. + <filename>postgresql.conf</filename> file or on the server command line. </para> </listitem> </varlistentry> @@ -2871,7 +2871,7 @@ include_dir 'conf.d' <para> These settings control the behavior of the built-in - <firstterm>streaming replication</> feature (see + <firstterm>streaming replication</firstterm> feature (see <xref linkend="streaming-replication">). Servers will be either a Master or a Standby server. Masters can send data, while Standby(s) are always receivers of replicated data. When cascading replication @@ -2898,7 +2898,7 @@ include_dir 'conf.d' <varlistentry id="guc-max-wal-senders" xreflabel="max_wal_senders"> <term><varname>max_wal_senders</varname> (<type>integer</type>) <indexterm> - <primary><varname>max_wal_senders</> configuration parameter</primary> + <primary><varname>max_wal_senders</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -2914,8 +2914,8 @@ include_dir 'conf.d' a timeout is reached, so this parameter should be set slightly higher than the maximum number of expected clients so disconnected clients can immediately reconnect. This parameter can only - be set at server start. <varname>wal_level</> must be set to - <literal>replica</> or higher to allow connections from standby + be set at server start. <varname>wal_level</varname> must be set to + <literal>replica</literal> or higher to allow connections from standby servers. </para> </listitem> @@ -2924,7 +2924,7 @@ include_dir 'conf.d' <varlistentry id="guc-max-replication-slots" xreflabel="max_replication_slots"> <term><varname>max_replication_slots</varname> (<type>integer</type>) <indexterm> - <primary><varname>max_replication_slots</> configuration parameter</primary> + <primary><varname>max_replication_slots</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -2944,17 +2944,17 @@ include_dir 'conf.d' <varlistentry id="guc-wal-keep-segments" xreflabel="wal_keep_segments"> <term><varname>wal_keep_segments</varname> (<type>integer</type>) <indexterm> - <primary><varname>wal_keep_segments</> configuration parameter</primary> + <primary><varname>wal_keep_segments</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Specifies the minimum number of past log file segments kept in the - <filename>pg_wal</> + <filename>pg_wal</filename> directory, in case a standby server needs to fetch them for streaming replication. Each segment is normally 16 megabytes. If a standby server connected to the sending server falls behind by more than - <varname>wal_keep_segments</> segments, the sending server might remove + <varname>wal_keep_segments</varname> segments, the sending server might remove a WAL segment still needed by the standby, in which case the replication connection will be terminated. Downstream connections will also eventually fail as a result. (However, the standby @@ -2964,15 +2964,15 @@ include_dir 'conf.d' <para> This sets only the minimum number of segments retained in - <filename>pg_wal</>; the system might need to retain more segments + <filename>pg_wal</filename>; the system might need to retain more segments for WAL archival or to recover from a checkpoint. If - <varname>wal_keep_segments</> is zero (the default), the system + <varname>wal_keep_segments</varname> is zero (the default), the system doesn't keep any extra segments for standby purposes, so the number of old WAL segments available to standby servers is a function of the location of the previous checkpoint and status of WAL archiving. This parameter can only be set in the - <filename>postgresql.conf</> file or on the server command line. + <filename>postgresql.conf</filename> file or on the server command line. </para> </listitem> </varlistentry> @@ -2980,7 +2980,7 @@ include_dir 'conf.d' <varlistentry id="guc-wal-sender-timeout" xreflabel="wal_sender_timeout"> <term><varname>wal_sender_timeout</varname> (<type>integer</type>) <indexterm> - <primary><varname>wal_sender_timeout</> configuration parameter</primary> + <primary><varname>wal_sender_timeout</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -2990,7 +2990,7 @@ include_dir 'conf.d' the sending server to detect a standby crash or network outage. A value of zero disables the timeout mechanism. This parameter can only be set in - the <filename>postgresql.conf</> file or on the server command line. + the <filename>postgresql.conf</filename> file or on the server command line. The default value is 60 seconds. </para> </listitem> @@ -2999,13 +2999,13 @@ include_dir 'conf.d' <varlistentry id="guc-track-commit-timestamp" xreflabel="track_commit_timestamp"> <term><varname>track_commit_timestamp</varname> (<type>boolean</type>) <indexterm> - <primary><varname>track_commit_timestamp</> configuration parameter</primary> + <primary><varname>track_commit_timestamp</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Record commit time of transactions. This parameter - can only be set in <filename>postgresql.conf</> file or on the server + can only be set in <filename>postgresql.conf</filename> file or on the server command line. The default value is <literal>off</literal>. </para> </listitem> @@ -3034,13 +3034,13 @@ include_dir 'conf.d' <varlistentry id="guc-synchronous-standby-names" xreflabel="synchronous_standby_names"> <term><varname>synchronous_standby_names</varname> (<type>string</type>) <indexterm> - <primary><varname>synchronous_standby_names</> configuration parameter</primary> + <primary><varname>synchronous_standby_names</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Specifies a list of standby servers that can support - <firstterm>synchronous replication</>, as described in + <firstterm>synchronous replication</firstterm>, as described in <xref linkend="synchronous-replication">. There will be one or more active synchronous standbys; transactions waiting for commit will be allowed to proceed after @@ -3050,15 +3050,15 @@ include_dir 'conf.d' that are both currently connected and streaming data in real-time (as shown by a state of <literal>streaming</literal> in the <link linkend="monitoring-stats-views-table"> - <literal>pg_stat_replication</></link> view). + <literal>pg_stat_replication</literal></link> view). Specifying more than one synchronous standby can allow for very high availability and protection against data loss. </para> <para> The name of a standby server for this purpose is the - <varname>application_name</> setting of the standby, as set in the + <varname>application_name</varname> setting of the standby, as set in the standby's connection information. In case of a physical replication - standby, this should be set in the <varname>primary_conninfo</> + standby, this should be set in the <varname>primary_conninfo</varname> setting in <filename>recovery.conf</filename>; the default is <literal>walreceiver</literal>. For logical replication, this can be set in the connection information of the subscription, and it @@ -3078,54 +3078,54 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" wait for replies from, and <replaceable class="parameter">standby_name</replaceable> is the name of a standby server. - <literal>FIRST</> and <literal>ANY</> specify the method to choose + <literal>FIRST</literal> and <literal>ANY</literal> specify the method to choose synchronous standbys from the listed servers. </para> <para> - The keyword <literal>FIRST</>, coupled with + The keyword <literal>FIRST</literal>, coupled with <replaceable class="parameter">num_sync</replaceable>, specifies a priority-based synchronous replication and makes transaction commits wait until their WAL records are replicated to <replaceable class="parameter">num_sync</replaceable> synchronous standbys chosen based on their priorities. For example, a setting of - <literal>FIRST 3 (s1, s2, s3, s4)</> will cause each commit to wait for + <literal>FIRST 3 (s1, s2, s3, s4)</literal> will cause each commit to wait for replies from three higher-priority standbys chosen from standby servers - <literal>s1</>, <literal>s2</>, <literal>s3</> and <literal>s4</>. + <literal>s1</literal>, <literal>s2</literal>, <literal>s3</literal> and <literal>s4</literal>. The standbys whose names appear earlier in the list are given higher priority and will be considered as synchronous. Other standby servers appearing later in this list represent potential synchronous standbys. If any of the current synchronous standbys disconnects for whatever reason, it will be replaced immediately with the next-highest-priority - standby. The keyword <literal>FIRST</> is optional. + standby. The keyword <literal>FIRST</literal> is optional. </para> <para> - The keyword <literal>ANY</>, coupled with + The keyword <literal>ANY</literal>, coupled with <replaceable class="parameter">num_sync</replaceable>, specifies a quorum-based synchronous replication and makes transaction commits - wait until their WAL records are replicated to <emphasis>at least</> + wait until their WAL records are replicated to <emphasis>at least</emphasis> <replaceable class="parameter">num_sync</replaceable> listed standbys. - For example, a setting of <literal>ANY 3 (s1, s2, s3, s4)</> will cause + For example, a setting of <literal>ANY 3 (s1, s2, s3, s4)</literal> will cause each commit to proceed as soon as at least any three standbys of - <literal>s1</>, <literal>s2</>, <literal>s3</> and <literal>s4</> + <literal>s1</literal>, <literal>s2</literal>, <literal>s3</literal> and <literal>s4</literal> reply. </para> <para> - <literal>FIRST</> and <literal>ANY</> are case-insensitive. If these + <literal>FIRST</literal> and <literal>ANY</literal> are case-insensitive. If these keywords are used as the name of a standby server, its <replaceable class="parameter">standby_name</replaceable> must be double-quoted. </para> <para> - The third syntax was used before <productname>PostgreSQL</> + The third syntax was used before <productname>PostgreSQL</productname> version 9.6 and is still supported. It's the same as the first syntax - with <literal>FIRST</> and + with <literal>FIRST</literal> and <replaceable class="parameter">num_sync</replaceable> equal to 1. - For example, <literal>FIRST 1 (s1, s2)</> and <literal>s1, s2</> have - the same meaning: either <literal>s1</> or <literal>s2</> is chosen + For example, <literal>FIRST 1 (s1, s2)</literal> and <literal>s1, s2</literal> have + the same meaning: either <literal>s1</literal> or <literal>s2</literal> is chosen as a synchronous standby. </para> <para> - The special entry <literal>*</> matches any standby name. + The special entry <literal>*</literal> matches any standby name. </para> <para> There is no mechanism to enforce uniqueness of standby names. In case @@ -3136,7 +3136,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" <para> Each <replaceable class="parameter">standby_name</replaceable> should have the form of a valid SQL identifier, unless it - is <literal>*</>. You can use double-quoting if necessary. But note + is <literal>*</literal>. You can use double-quoting if necessary. But note that <replaceable class="parameter">standby_name</replaceable>s are compared to standby application names case-insensitively, whether double-quoted or not. @@ -3149,10 +3149,10 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" synchronous replication is enabled, individual transactions can be configured not to wait for replication by setting the <xref linkend="guc-synchronous-commit"> parameter to - <literal>local</> or <literal>off</>. + <literal>local</literal> or <literal>off</literal>. </para> <para> - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. </para> </listitem> @@ -3161,13 +3161,13 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" <varlistentry id="guc-vacuum-defer-cleanup-age" xreflabel="vacuum_defer_cleanup_age"> <term><varname>vacuum_defer_cleanup_age</varname> (<type>integer</type>) <indexterm> - <primary><varname>vacuum_defer_cleanup_age</> configuration parameter</primary> + <primary><varname>vacuum_defer_cleanup_age</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> - Specifies the number of transactions by which <command>VACUUM</> and - <acronym>HOT</> updates will defer cleanup of dead row versions. The + Specifies the number of transactions by which <command>VACUUM</command> and + <acronym>HOT</acronym> updates will defer cleanup of dead row versions. The default is zero transactions, meaning that dead row versions can be removed as soon as possible, that is, as soon as they are no longer visible to any open transaction. You may wish to set this to a @@ -3178,16 +3178,16 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" is measured in terms of number of write transactions occurring on the primary server, it is difficult to predict just how much additional grace time will be made available to standby queries. - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. </para> <para> - You should also consider setting <varname>hot_standby_feedback</> + You should also consider setting <varname>hot_standby_feedback</varname> on standby server(s) as an alternative to using this parameter. </para> <para> This does not prevent cleanup of dead rows which have reached the age - specified by <varname>old_snapshot_threshold</>. + specified by <varname>old_snapshot_threshold</varname>. </para> </listitem> </varlistentry> @@ -3209,7 +3209,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" <varlistentry id="guc-hot-standby" xreflabel="hot_standby"> <term><varname>hot_standby</varname> (<type>boolean</type>) <indexterm> - <primary><varname>hot_standby</> configuration parameter</primary> + <primary><varname>hot_standby</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -3226,7 +3226,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" <varlistentry id="guc-max-standby-archive-delay" xreflabel="max_standby_archive_delay"> <term><varname>max_standby_archive_delay</varname> (<type>integer</type>) <indexterm> - <primary><varname>max_standby_archive_delay</> configuration parameter</primary> + <primary><varname>max_standby_archive_delay</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -3235,16 +3235,16 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" standby server should wait before canceling standby queries that conflict with about-to-be-applied WAL entries, as described in <xref linkend="hot-standby-conflict">. - <varname>max_standby_archive_delay</> applies when WAL data is + <varname>max_standby_archive_delay</varname> applies when WAL data is being read from WAL archive (and is therefore not current). The default is 30 seconds. Units are milliseconds if not specified. A value of -1 allows the standby to wait forever for conflicting queries to complete. - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. </para> <para> - Note that <varname>max_standby_archive_delay</> is not the same as the + Note that <varname>max_standby_archive_delay</varname> is not the same as the maximum length of time a query can run before cancellation; rather it is the maximum total time allowed to apply any one WAL segment's data. Thus, if one query has resulted in significant delay earlier in the @@ -3257,7 +3257,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" <varlistentry id="guc-max-standby-streaming-delay" xreflabel="max_standby_streaming_delay"> <term><varname>max_standby_streaming_delay</varname> (<type>integer</type>) <indexterm> - <primary><varname>max_standby_streaming_delay</> configuration parameter</primary> + <primary><varname>max_standby_streaming_delay</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -3266,16 +3266,16 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" standby server should wait before canceling standby queries that conflict with about-to-be-applied WAL entries, as described in <xref linkend="hot-standby-conflict">. - <varname>max_standby_streaming_delay</> applies when WAL data is + <varname>max_standby_streaming_delay</varname> applies when WAL data is being received via streaming replication. The default is 30 seconds. Units are milliseconds if not specified. A value of -1 allows the standby to wait forever for conflicting queries to complete. - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. </para> <para> - Note that <varname>max_standby_streaming_delay</> is not the same as + Note that <varname>max_standby_streaming_delay</varname> is not the same as the maximum length of time a query can run before cancellation; rather it is the maximum total time allowed to apply WAL data once it has been received from the primary server. Thus, if one query has @@ -3289,7 +3289,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" <varlistentry id="guc-wal-receiver-status-interval" xreflabel="wal_receiver_status_interval"> <term><varname>wal_receiver_status_interval</varname> (<type>integer</type>) <indexterm> - <primary><varname>wal_receiver_status_interval</> configuration parameter</primary> + <primary><varname>wal_receiver_status_interval</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -3298,7 +3298,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" process on the standby to send information about replication progress to the primary or upstream standby, where it can be seen using the <link linkend="monitoring-stats-views-table"> - <literal>pg_stat_replication</></link> view. The standby will report + <literal>pg_stat_replication</literal></link> view. The standby will report the last write-ahead log location it has written, the last position it has flushed to disk, and the last position it has applied. This parameter's @@ -3307,7 +3307,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" often as specified by this parameter. Thus, the apply position may lag slightly behind the true position. Setting this parameter to zero disables status updates completely. This parameter can only be set in - the <filename>postgresql.conf</> file or on the server command line. + the <filename>postgresql.conf</filename> file or on the server command line. The default value is 10 seconds. </para> </listitem> @@ -3316,7 +3316,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" <varlistentry id="guc-hot-standby-feedback" xreflabel="hot_standby_feedback"> <term><varname>hot_standby_feedback</varname> (<type>boolean</type>) <indexterm> - <primary><varname>hot_standby_feedback</> configuration parameter</primary> + <primary><varname>hot_standby_feedback</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -3327,9 +3327,9 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" be used to eliminate query cancels caused by cleanup records, but can cause database bloat on the primary for some workloads. Feedback messages will not be sent more frequently than once per - <varname>wal_receiver_status_interval</>. The default value is + <varname>wal_receiver_status_interval</varname>. The default value is <literal>off</literal>. This parameter can only be set in the - <filename>postgresql.conf</> file or on the server command line. + <filename>postgresql.conf</filename> file or on the server command line. </para> <para> If cascaded replication is in use the feedback is passed upstream @@ -3338,10 +3338,10 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" </para> <para> This setting does not override the behavior of - <varname>old_snapshot_threshold</> on the primary; a snapshot on the + <varname>old_snapshot_threshold</varname> on the primary; a snapshot on the standby which exceeds the primary's age threshold can become invalid, resulting in cancellation of transactions on the standby. This is - because <varname>old_snapshot_threshold</> is intended to provide an + because <varname>old_snapshot_threshold</varname> is intended to provide an absolute limit on the time which dead rows can contribute to bloat, which would otherwise be violated because of the configuration of a standby. @@ -3352,7 +3352,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" <varlistentry id="guc-wal-receiver-timeout" xreflabel="wal_receiver_timeout"> <term><varname>wal_receiver_timeout</varname> (<type>integer</type>) <indexterm> - <primary><varname>wal_receiver_timeout</> configuration parameter</primary> + <primary><varname>wal_receiver_timeout</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -3363,7 +3363,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" outage. A value of zero disables the timeout mechanism. This parameter can only be set in - the <filename>postgresql.conf</> file or on the server command line. + the <filename>postgresql.conf</filename> file or on the server command line. The default value is 60 seconds. </para> </listitem> @@ -3372,16 +3372,16 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" <varlistentry id="guc-wal-retrieve-retry-interval" xreflabel="wal_retrieve_retry_interval"> <term><varname>wal_retrieve_retry_interval</varname> (<type>integer</type>) <indexterm> - <primary><varname>wal_retrieve_retry_interval</> configuration parameter</primary> + <primary><varname>wal_retrieve_retry_interval</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Specify how long the standby server should wait when WAL data is not available from any sources (streaming replication, - local <filename>pg_wal</> or WAL archive) before retrying to + local <filename>pg_wal</filename> or WAL archive) before retrying to retrieve WAL data. This parameter can only be set in the - <filename>postgresql.conf</> file or on the server command line. + <filename>postgresql.conf</filename> file or on the server command line. The default value is 5 seconds. Units are milliseconds if not specified. </para> <para> @@ -3420,7 +3420,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" <varlistentry id="guc-max-logical-replication-workers" xreflabel="max_logical_replication_workers"> <term><varname>max_logical_replication_workers</varname> (<type>int</type>) <indexterm> - <primary><varname>max_logical_replication_workers</> configuration parameter</primary> + <primary><varname>max_logical_replication_workers</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -3441,7 +3441,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" <varlistentry id="guc-max-sync-workers-per-subscription" xreflabel="max_sync_workers_per_subscription"> <term><varname>max_sync_workers_per_subscription</varname> (<type>integer</type>) <indexterm> - <primary><varname>max_sync_workers_per_subscription</> configuration parameter</primary> + <primary><varname>max_sync_workers_per_subscription</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -3478,7 +3478,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" These configuration parameters provide a crude method of influencing the query plans chosen by the query optimizer. If the default plan chosen by the optimizer for a particular query - is not optimal, a <emphasis>temporary</> solution is to use one + is not optimal, a <emphasis>temporary</emphasis> solution is to use one of these configuration parameters to force the optimizer to choose a different plan. Better ways to improve the quality of the @@ -3499,13 +3499,13 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" <primary>bitmap scan</primary> </indexterm> <indexterm> - <primary><varname>enable_bitmapscan</> configuration parameter</primary> + <primary><varname>enable_bitmapscan</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Enables or disables the query planner's use of bitmap-scan plan - types. The default is <literal>on</>. + types. The default is <literal>on</literal>. </para> </listitem> </varlistentry> @@ -3513,13 +3513,13 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" <varlistentry id="guc-enable-gathermerge" xreflabel="enable_gathermerge"> <term><varname>enable_gathermerge</varname> (<type>boolean</type>) <indexterm> - <primary><varname>enable_gathermerge</> configuration parameter</primary> + <primary><varname>enable_gathermerge</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Enables or disables the query planner's use of gather - merge plan types. The default is <literal>on</>. + merge plan types. The default is <literal>on</literal>. </para> </listitem> </varlistentry> @@ -3527,13 +3527,13 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" <varlistentry id="guc-enable-hashagg" xreflabel="enable_hashagg"> <term><varname>enable_hashagg</varname> (<type>boolean</type>) <indexterm> - <primary><varname>enable_hashagg</> configuration parameter</primary> + <primary><varname>enable_hashagg</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Enables or disables the query planner's use of hashed - aggregation plan types. The default is <literal>on</>. + aggregation plan types. The default is <literal>on</literal>. </para> </listitem> </varlistentry> @@ -3541,13 +3541,13 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" <varlistentry id="guc-enable-hashjoin" xreflabel="enable_hashjoin"> <term><varname>enable_hashjoin</varname> (<type>boolean</type>) <indexterm> - <primary><varname>enable_hashjoin</> configuration parameter</primary> + <primary><varname>enable_hashjoin</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Enables or disables the query planner's use of hash-join plan - types. The default is <literal>on</>. + types. The default is <literal>on</literal>. </para> </listitem> </varlistentry> @@ -3558,13 +3558,13 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" <primary>index scan</primary> </indexterm> <indexterm> - <primary><varname>enable_indexscan</> configuration parameter</primary> + <primary><varname>enable_indexscan</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Enables or disables the query planner's use of index-scan plan - types. The default is <literal>on</>. + types. The default is <literal>on</literal>. </para> </listitem> </varlistentry> @@ -3572,14 +3572,14 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" <varlistentry id="guc-enable-indexonlyscan" xreflabel="enable_indexonlyscan"> <term><varname>enable_indexonlyscan</varname> (<type>boolean</type>) <indexterm> - <primary><varname>enable_indexonlyscan</> configuration parameter</primary> + <primary><varname>enable_indexonlyscan</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Enables or disables the query planner's use of index-only-scan plan types (see <xref linkend="indexes-index-only-scans">). - The default is <literal>on</>. + The default is <literal>on</literal>. </para> </listitem> </varlistentry> @@ -3587,7 +3587,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" <varlistentry id="guc-enable-material" xreflabel="enable_material"> <term><varname>enable_material</varname> (<type>boolean</type>) <indexterm> - <primary><varname>enable_material</> configuration parameter</primary> + <primary><varname>enable_material</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -3596,7 +3596,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" It is impossible to suppress materialization entirely, but turning this variable off prevents the planner from inserting materialize nodes except in cases where it is required for correctness. - The default is <literal>on</>. + The default is <literal>on</literal>. </para> </listitem> </varlistentry> @@ -3604,13 +3604,13 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" <varlistentry id="guc-enable-mergejoin" xreflabel="enable_mergejoin"> <term><varname>enable_mergejoin</varname> (<type>boolean</type>) <indexterm> - <primary><varname>enable_mergejoin</> configuration parameter</primary> + <primary><varname>enable_mergejoin</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Enables or disables the query planner's use of merge-join plan - types. The default is <literal>on</>. + types. The default is <literal>on</literal>. </para> </listitem> </varlistentry> @@ -3618,7 +3618,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" <varlistentry id="guc-enable-nestloop" xreflabel="enable_nestloop"> <term><varname>enable_nestloop</varname> (<type>boolean</type>) <indexterm> - <primary><varname>enable_nestloop</> configuration parameter</primary> + <primary><varname>enable_nestloop</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -3627,7 +3627,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" plans. It is impossible to suppress nested-loop joins entirely, but turning this variable off discourages the planner from using one if there are other methods available. The default is - <literal>on</>. + <literal>on</literal>. </para> </listitem> </varlistentry> @@ -3635,7 +3635,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" <varlistentry id="guc-enable-partition-wise-join" xreflabel="enable_partition_wise_join"> <term><varname>enable_partition_wise_join</varname> (<type>boolean</type>) <indexterm> - <primary><varname>enable_partition_wise_join</> configuration parameter</primary> + <primary><varname>enable_partition_wise_join</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -3647,7 +3647,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" must be of the same data type and have exactly matching sets of child partitions. Because partition-wise join planning can use significantly more CPU time and memory during planning, the default is - <literal>off</>. + <literal>off</literal>. </para> </listitem> </varlistentry> @@ -3658,7 +3658,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" <primary>sequential scan</primary> </indexterm> <indexterm> - <primary><varname>enable_seqscan</> configuration parameter</primary> + <primary><varname>enable_seqscan</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -3667,7 +3667,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" plan types. It is impossible to suppress sequential scans entirely, but turning this variable off discourages the planner from using one if there are other methods available. The - default is <literal>on</>. + default is <literal>on</literal>. </para> </listitem> </varlistentry> @@ -3675,7 +3675,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" <varlistentry id="guc-enable-sort" xreflabel="enable_sort"> <term><varname>enable_sort</varname> (<type>boolean</type>) <indexterm> - <primary><varname>enable_sort</> configuration parameter</primary> + <primary><varname>enable_sort</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -3684,7 +3684,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" steps. It is impossible to suppress explicit sorts entirely, but turning this variable off discourages the planner from using one if there are other methods available. The default - is <literal>on</>. + is <literal>on</literal>. </para> </listitem> </varlistentry> @@ -3692,13 +3692,13 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" <varlistentry id="guc-enable-tidscan" xreflabel="enable_tidscan"> <term><varname>enable_tidscan</varname> (<type>boolean</type>) <indexterm> - <primary><varname>enable_tidscan</> configuration parameter</primary> + <primary><varname>enable_tidscan</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> - Enables or disables the query planner's use of <acronym>TID</> - scan plan types. The default is <literal>on</>. + Enables or disables the query planner's use of <acronym>TID</acronym> + scan plan types. The default is <literal>on</literal>. </para> </listitem> </varlistentry> @@ -3709,12 +3709,12 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" <title>Planner Cost Constants</title> <para> - The <firstterm>cost</> variables described in this section are measured + The <firstterm>cost</firstterm> variables described in this section are measured on an arbitrary scale. Only their relative values matter, hence scaling them all up or down by the same factor will result in no change in the planner's choices. By default, these cost variables are based on the cost of sequential page fetches; that is, - <varname>seq_page_cost</> is conventionally set to <literal>1.0</> + <varname>seq_page_cost</varname> is conventionally set to <literal>1.0</literal> and the other cost variables are set with reference to that. But you can use a different scale if you prefer, such as actual execution times in milliseconds on a particular machine. @@ -3735,7 +3735,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" <varlistentry id="guc-seq-page-cost" xreflabel="seq_page_cost"> <term><varname>seq_page_cost</varname> (<type>floating point</type>) <indexterm> - <primary><varname>seq_page_cost</> configuration parameter</primary> + <primary><varname>seq_page_cost</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -3752,7 +3752,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" <varlistentry id="guc-random-page-cost" xreflabel="random_page_cost"> <term><varname>random_page_cost</varname> (<type>floating point</type>) <indexterm> - <primary><varname>random_page_cost</> configuration parameter</primary> + <primary><varname>random_page_cost</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -3765,7 +3765,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" </para> <para> - Reducing this value relative to <varname>seq_page_cost</> + Reducing this value relative to <varname>seq_page_cost</varname> will cause the system to prefer index scans; raising it will make index scans look relatively more expensive. You can raise or lower both values together to change the importance of disk I/O @@ -3795,8 +3795,8 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" <tip> <para> - Although the system will let you set <varname>random_page_cost</> to - less than <varname>seq_page_cost</>, it is not physically sensible + Although the system will let you set <varname>random_page_cost</varname> to + less than <varname>seq_page_cost</varname>, it is not physically sensible to do so. However, setting them equal makes sense if the database is entirely cached in RAM, since in that case there is no penalty for touching pages out of sequence. Also, in a heavily-cached @@ -3811,7 +3811,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" <varlistentry id="guc-cpu-tuple-cost" xreflabel="cpu_tuple_cost"> <term><varname>cpu_tuple_cost</varname> (<type>floating point</type>) <indexterm> - <primary><varname>cpu_tuple_cost</> configuration parameter</primary> + <primary><varname>cpu_tuple_cost</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -3826,7 +3826,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" <varlistentry id="guc-cpu-index-tuple-cost" xreflabel="cpu_index_tuple_cost"> <term><varname>cpu_index_tuple_cost</varname> (<type>floating point</type>) <indexterm> - <primary><varname>cpu_index_tuple_cost</> configuration parameter</primary> + <primary><varname>cpu_index_tuple_cost</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -3841,7 +3841,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" <varlistentry id="guc-cpu-operator-cost" xreflabel="cpu_operator_cost"> <term><varname>cpu_operator_cost</varname> (<type>floating point</type>) <indexterm> - <primary><varname>cpu_operator_cost</> configuration parameter</primary> + <primary><varname>cpu_operator_cost</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -3856,7 +3856,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" <varlistentry id="guc-parallel-setup-cost" xreflabel="parallel_setup_cost"> <term><varname>parallel_setup_cost</varname> (<type>floating point</type>) <indexterm> - <primary><varname>parallel_setup_cost</> configuration parameter</primary> + <primary><varname>parallel_setup_cost</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -3871,7 +3871,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" <varlistentry id="guc-parallel-tuple-cost" xreflabel="parallel_tuple_cost"> <term><varname>parallel_tuple_cost</varname> (<type>floating point</type>) <indexterm> - <primary><varname>parallel_tuple_cost</> configuration parameter</primary> + <primary><varname>parallel_tuple_cost</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -3886,7 +3886,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" <varlistentry id="guc-min-parallel-table-scan-size" xreflabel="min_parallel_table_scan_size"> <term><varname>min_parallel_table_scan_size</varname> (<type>integer</type>) <indexterm> - <primary><varname>min_parallel_table_scan_size</> configuration parameter</primary> + <primary><varname>min_parallel_table_scan_size</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -3896,7 +3896,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" the amount of table data scanned is always equal to the size of the table, but when indexes are used the amount of table data scanned will normally be less. The default is 8 - megabytes (<literal>8MB</>). + megabytes (<literal>8MB</literal>). </para> </listitem> </varlistentry> @@ -3904,7 +3904,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" <varlistentry id="guc-min-parallel-index-scan-size" xreflabel="min_parallel_index_scan_size"> <term><varname>min_parallel_index_scan_size</varname> (<type>integer</type>) <indexterm> - <primary><varname>min_parallel_index_scan_size</> configuration parameter</primary> + <primary><varname>min_parallel_index_scan_size</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -3913,7 +3913,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" for a parallel scan to be considered. Note that a parallel index scan typically won't touch the entire index; it is the number of pages which the planner believes will actually be touched by the scan which - is relevant. The default is 512 kilobytes (<literal>512kB</>). + is relevant. The default is 512 kilobytes (<literal>512kB</literal>). </para> </listitem> </varlistentry> @@ -3921,7 +3921,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" <varlistentry id="guc-effective-cache-size" xreflabel="effective_cache_size"> <term><varname>effective_cache_size</varname> (<type>integer</type>) <indexterm> - <primary><varname>effective_cache_size</> configuration parameter</primary> + <primary><varname>effective_cache_size</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -3942,7 +3942,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" does it reserve kernel disk cache; it is used only for estimation purposes. The system also does not assume data remains in the disk cache between queries. The default is 4 gigabytes - (<literal>4GB</>). + (<literal>4GB</literal>). </para> </listitem> </varlistentry> @@ -3974,7 +3974,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" <see>genetic query optimization</see> </indexterm> <indexterm> - <primary><varname>geqo</> configuration parameter</primary> + <primary><varname>geqo</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -3990,14 +3990,14 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" <varlistentry id="guc-geqo-threshold" xreflabel="geqo_threshold"> <term><varname>geqo_threshold</varname> (<type>integer</type>) <indexterm> - <primary><varname>geqo_threshold</> configuration parameter</primary> + <primary><varname>geqo_threshold</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Use genetic query optimization to plan queries with at least - this many <literal>FROM</> items involved. (Note that a - <literal>FULL OUTER JOIN</> construct counts as only one <literal>FROM</> + this many <literal>FROM</literal> items involved. (Note that a + <literal>FULL OUTER JOIN</literal> construct counts as only one <literal>FROM</literal> item.) The default is 12. For simpler queries it is usually best to use the regular, exhaustive-search planner, but for queries with many tables the exhaustive search takes too long, often @@ -4011,7 +4011,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" <varlistentry id="guc-geqo-effort" xreflabel="geqo_effort"> <term><varname>geqo_effort</varname> (<type>integer</type>) <indexterm> - <primary><varname>geqo_effort</> configuration parameter</primary> + <primary><varname>geqo_effort</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -4037,7 +4037,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" <varlistentry id="guc-geqo-pool-size" xreflabel="geqo_pool_size"> <term><varname>geqo_pool_size</varname> (<type>integer</type>) <indexterm> - <primary><varname>geqo_pool_size</> configuration parameter</primary> + <primary><varname>geqo_pool_size</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -4055,7 +4055,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" <varlistentry id="guc-geqo-generations" xreflabel="geqo_generations"> <term><varname>geqo_generations</varname> (<type>integer</type>) <indexterm> - <primary><varname>geqo_generations</> configuration parameter</primary> + <primary><varname>geqo_generations</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -4073,7 +4073,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" <varlistentry id="guc-geqo-selection-bias" xreflabel="geqo_selection_bias"> <term><varname>geqo_selection_bias</varname> (<type>floating point</type>) <indexterm> - <primary><varname>geqo_selection_bias</> configuration parameter</primary> + <primary><varname>geqo_selection_bias</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -4088,7 +4088,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" <varlistentry id="guc-geqo-seed" xreflabel="geqo_seed"> <term><varname>geqo_seed</varname> (<type>floating point</type>) <indexterm> - <primary><varname>geqo_seed</> configuration parameter</primary> + <primary><varname>geqo_seed</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -4112,17 +4112,17 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" <varlistentry id="guc-default-statistics-target" xreflabel="default_statistics_target"> <term><varname>default_statistics_target</varname> (<type>integer</type>) <indexterm> - <primary><varname>default_statistics_target</> configuration parameter</primary> + <primary><varname>default_statistics_target</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Sets the default statistics target for table columns without a column-specific target set via <command>ALTER TABLE - SET STATISTICS</>. Larger values increase the time needed to - do <command>ANALYZE</>, but might improve the quality of the + SET STATISTICS</command>. Larger values increase the time needed to + do <command>ANALYZE</command>, but might improve the quality of the planner's estimates. The default is 100. For more information - on the use of statistics by the <productname>PostgreSQL</> + on the use of statistics by the <productname>PostgreSQL</productname> query planner, refer to <xref linkend="planner-stats">. </para> </listitem> @@ -4134,26 +4134,26 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" <primary>constraint exclusion</primary> </indexterm> <indexterm> - <primary><varname>constraint_exclusion</> configuration parameter</primary> + <primary><varname>constraint_exclusion</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Controls the query planner's use of table constraints to optimize queries. - The allowed values of <varname>constraint_exclusion</> are - <literal>on</> (examine constraints for all tables), - <literal>off</> (never examine constraints), and - <literal>partition</> (examine constraints only for inheritance child - tables and <literal>UNION ALL</> subqueries). - <literal>partition</> is the default setting. + The allowed values of <varname>constraint_exclusion</varname> are + <literal>on</literal> (examine constraints for all tables), + <literal>off</literal> (never examine constraints), and + <literal>partition</literal> (examine constraints only for inheritance child + tables and <literal>UNION ALL</literal> subqueries). + <literal>partition</literal> is the default setting. It is often used with inheritance and partitioned tables to improve performance. </para> <para> When this parameter allows it for a particular table, the planner - compares query conditions with the table's <literal>CHECK</> + compares query conditions with the table's <literal>CHECK</literal> constraints, and omits scanning tables for which the conditions contradict the constraints. For example: @@ -4165,8 +4165,8 @@ CREATE TABLE child2000(check (key between 2000 and 2999)) INHERITS(parent); SELECT * FROM parent WHERE key = 2400; </programlisting> - With constraint exclusion enabled, this <command>SELECT</> - will not scan <structname>child1000</> at all, improving performance. + With constraint exclusion enabled, this <command>SELECT</command> + will not scan <structname>child1000</structname> at all, improving performance. </para> <para> @@ -4188,14 +4188,14 @@ SELECT * FROM parent WHERE key = 2400; <varlistentry id="guc-cursor-tuple-fraction" xreflabel="cursor_tuple_fraction"> <term><varname>cursor_tuple_fraction</varname> (<type>floating point</type>) <indexterm> - <primary><varname>cursor_tuple_fraction</> configuration parameter</primary> + <primary><varname>cursor_tuple_fraction</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Sets the planner's estimate of the fraction of a cursor's rows that will be retrieved. The default is 0.1. Smaller values of this - setting bias the planner towards using <quote>fast start</> plans + setting bias the planner towards using <quote>fast start</quote> plans for cursors, which will retrieve the first few rows quickly while perhaps taking a long time to fetch all rows. Larger values put more emphasis on the total estimated time. At the maximum @@ -4209,7 +4209,7 @@ SELECT * FROM parent WHERE key = 2400; <varlistentry id="guc-from-collapse-limit" xreflabel="from_collapse_limit"> <term><varname>from_collapse_limit</varname> (<type>integer</type>) <indexterm> - <primary><varname>from_collapse_limit</> configuration parameter</primary> + <primary><varname>from_collapse_limit</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -4232,14 +4232,14 @@ SELECT * FROM parent WHERE key = 2400; <varlistentry id="guc-join-collapse-limit" xreflabel="join_collapse_limit"> <term><varname>join_collapse_limit</varname> (<type>integer</type>) <indexterm> - <primary><varname>join_collapse_limit</> configuration parameter</primary> + <primary><varname>join_collapse_limit</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> - The planner will rewrite explicit <literal>JOIN</> - constructs (except <literal>FULL JOIN</>s) into lists of - <literal>FROM</> items whenever a list of no more than this many items + The planner will rewrite explicit <literal>JOIN</literal> + constructs (except <literal>FULL JOIN</literal>s) into lists of + <literal>FROM</literal> items whenever a list of no more than this many items would result. Smaller values reduce planning time but might yield inferior query plans. </para> @@ -4248,7 +4248,7 @@ SELECT * FROM parent WHERE key = 2400; By default, this variable is set the same as <varname>from_collapse_limit</varname>, which is appropriate for most uses. Setting it to 1 prevents any reordering of - explicit <literal>JOIN</>s. Thus, the explicit join order + explicit <literal>JOIN</literal>s. Thus, the explicit join order specified in the query will be the actual order in which the relations are joined. Because the query planner does not always choose the optimal join order, advanced users can elect to @@ -4268,24 +4268,24 @@ SELECT * FROM parent WHERE key = 2400; <varlistentry id="guc-force-parallel-mode" xreflabel="force_parallel_mode"> <term><varname>force_parallel_mode</varname> (<type>enum</type>) <indexterm> - <primary><varname>force_parallel_mode</> configuration parameter</primary> + <primary><varname>force_parallel_mode</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Allows the use of parallel queries for testing purposes even in cases where no performance benefit is expected. - The allowed values of <varname>force_parallel_mode</> are - <literal>off</> (use parallel mode only when it is expected to improve - performance), <literal>on</> (force parallel query for all queries - for which it is thought to be safe), and <literal>regress</> (like - <literal>on</>, but with additional behavior changes as explained + The allowed values of <varname>force_parallel_mode</varname> are + <literal>off</literal> (use parallel mode only when it is expected to improve + performance), <literal>on</literal> (force parallel query for all queries + for which it is thought to be safe), and <literal>regress</literal> (like + <literal>on</literal>, but with additional behavior changes as explained below). </para> <para> - More specifically, setting this value to <literal>on</> will add - a <literal>Gather</> node to the top of any query plan for which this + More specifically, setting this value to <literal>on</literal> will add + a <literal>Gather</literal> node to the top of any query plan for which this appears to be safe, so that the query runs inside of a parallel worker. Even when a parallel worker is not available or cannot be used, operations such as starting a subtransaction that would be prohibited @@ -4297,15 +4297,15 @@ SELECT * FROM parent WHERE key = 2400; </para> <para> - Setting this value to <literal>regress</> has all of the same effects - as setting it to <literal>on</> plus some additional effects that are + Setting this value to <literal>regress</literal> has all of the same effects + as setting it to <literal>on</literal> plus some additional effects that are intended to facilitate automated regression testing. Normally, messages from a parallel worker include a context line indicating that, - but a setting of <literal>regress</> suppresses this line so that the + but a setting of <literal>regress</literal> suppresses this line so that the output is the same as in non-parallel execution. Also, - the <literal>Gather</> nodes added to plans by this setting are hidden - in <literal>EXPLAIN</> output so that the output matches what - would be obtained if this setting were turned <literal>off</>. + the <literal>Gather</literal> nodes added to plans by this setting are hidden + in <literal>EXPLAIN</literal> output so that the output matches what + would be obtained if this setting were turned <literal>off</literal>. </para> </listitem> </varlistentry> @@ -4338,7 +4338,7 @@ SELECT * FROM parent WHERE key = 2400; <varlistentry id="guc-log-destination" xreflabel="log_destination"> <term><varname>log_destination</varname> (<type>string</type>) <indexterm> - <primary><varname>log_destination</> configuration parameter</primary> + <primary><varname>log_destination</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -4351,13 +4351,13 @@ SELECT * FROM parent WHERE key = 2400; parameter to a list of desired log destinations separated by commas. The default is to log to <systemitem>stderr</systemitem> only. - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. </para> <para> - If <systemitem>csvlog</> is included in <varname>log_destination</>, + If <systemitem>csvlog</systemitem> is included in <varname>log_destination</varname>, log entries are output in <quote>comma separated - value</> (<acronym>CSV</>) format, which is convenient for + value</quote> (<acronym>CSV</acronym>) format, which is convenient for loading logs into programs. See <xref linkend="runtime-config-logging-csvlog"> for details. <xref linkend="guc-logging-collector"> must be enabled to generate @@ -4366,7 +4366,7 @@ SELECT * FROM parent WHERE key = 2400; <para> When either <systemitem>stderr</systemitem> or <systemitem>csvlog</systemitem> are included, the file - <filename>current_logfiles</> is created to record the location + <filename>current_logfiles</filename> is created to record the location of the log file(s) currently in use by the logging collector and the associated logging destination. This provides a convenient way to find the logs currently in use by the instance. Here is an example of @@ -4378,10 +4378,10 @@ csvlog log/postgresql.csv <filename>current_logfiles</filename> is recreated when a new log file is created as an effect of rotation, and - when <varname>log_destination</> is reloaded. It is removed when + when <varname>log_destination</varname> is reloaded. It is removed when neither <systemitem>stderr</systemitem> nor <systemitem>csvlog</systemitem> are included - in <varname>log_destination</>, and when the logging collector is + in <varname>log_destination</varname>, and when the logging collector is disabled. </para> @@ -4390,9 +4390,9 @@ csvlog log/postgresql.csv On most Unix systems, you will need to alter the configuration of your system's <application>syslog</application> daemon in order to make use of the <systemitem>syslog</systemitem> option for - <varname>log_destination</>. <productname>PostgreSQL</productname> + <varname>log_destination</varname>. <productname>PostgreSQL</productname> can log to <application>syslog</application> facilities - <literal>LOCAL0</> through <literal>LOCAL7</> (see <xref + <literal>LOCAL0</literal> through <literal>LOCAL7</literal> (see <xref linkend="guc-syslog-facility">), but the default <application>syslog</application> configuration on most platforms will discard all such messages. You will need to add something like: @@ -4404,7 +4404,7 @@ local0.* /var/log/postgresql </para> <para> On Windows, when you use the <literal>eventlog</literal> - option for <varname>log_destination</>, you should + option for <varname>log_destination</varname>, you should register an event source and its library with the operating system so that the Windows Event Viewer can display event log messages cleanly. @@ -4417,27 +4417,27 @@ local0.* /var/log/postgresql <varlistentry id="guc-logging-collector" xreflabel="logging_collector"> <term><varname>logging_collector</varname> (<type>boolean</type>) <indexterm> - <primary><varname>logging_collector</> configuration parameter</primary> + <primary><varname>logging_collector</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> - This parameter enables the <firstterm>logging collector</>, which + This parameter enables the <firstterm>logging collector</firstterm>, which is a background process that captures log messages - sent to <systemitem>stderr</> and redirects them into log files. + sent to <systemitem>stderr</systemitem> and redirects them into log files. This approach is often more useful than - logging to <application>syslog</>, since some types of messages - might not appear in <application>syslog</> output. (One common + logging to <application>syslog</application>, since some types of messages + might not appear in <application>syslog</application> output. (One common example is dynamic-linker failure messages; another is error messages - produced by scripts such as <varname>archive_command</>.) + produced by scripts such as <varname>archive_command</varname>.) This parameter can only be set at server start. </para> <note> <para> - It is possible to log to <systemitem>stderr</> without using the + It is possible to log to <systemitem>stderr</systemitem> without using the logging collector; the log messages will just go to wherever the - server's <systemitem>stderr</> is directed. However, that method is + server's <systemitem>stderr</systemitem> is directed. However, that method is only suitable for low log volumes, since it provides no convenient way to rotate log files. Also, on some platforms not using the logging collector can result in lost or garbled log output, because @@ -4451,7 +4451,7 @@ local0.* /var/log/postgresql The logging collector is designed to never lose messages. This means that in case of extremely high load, server processes could be blocked while trying to send additional log messages when the - collector has fallen behind. In contrast, <application>syslog</> + collector has fallen behind. In contrast, <application>syslog</application> prefers to drop messages if it cannot write them, which means it may fail to log some messages in such cases but it will not block the rest of the system. @@ -4464,16 +4464,16 @@ local0.* /var/log/postgresql <varlistentry id="guc-log-directory" xreflabel="log_directory"> <term><varname>log_directory</varname> (<type>string</type>) <indexterm> - <primary><varname>log_directory</> configuration parameter</primary> + <primary><varname>log_directory</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> - When <varname>logging_collector</> is enabled, + When <varname>logging_collector</varname> is enabled, this parameter determines the directory in which log files will be created. It can be specified as an absolute path, or relative to the cluster data directory. - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. The default is <literal>log</literal>. </para> @@ -4483,7 +4483,7 @@ local0.* /var/log/postgresql <varlistentry id="guc-log-filename" xreflabel="log_filename"> <term><varname>log_filename</varname> (<type>string</type>) <indexterm> - <primary><varname>log_filename</> configuration parameter</primary> + <primary><varname>log_filename</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -4514,14 +4514,14 @@ local0.* /var/log/postgresql longer the case. </para> <para> - If CSV-format output is enabled in <varname>log_destination</>, - <literal>.csv</> will be appended to the timestamped + If CSV-format output is enabled in <varname>log_destination</varname>, + <literal>.csv</literal> will be appended to the timestamped log file name to create the file name for CSV-format output. - (If <varname>log_filename</> ends in <literal>.log</>, the suffix is + (If <varname>log_filename</varname> ends in <literal>.log</literal>, the suffix is replaced instead.) </para> <para> - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. </para> </listitem> @@ -4530,7 +4530,7 @@ local0.* /var/log/postgresql <varlistentry id="guc-log-file-mode" xreflabel="log_file_mode"> <term><varname>log_file_mode</varname> (<type>integer</type>) <indexterm> - <primary><varname>log_file_mode</> configuration parameter</primary> + <primary><varname>log_file_mode</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -4545,9 +4545,9 @@ local0.* /var/log/postgresql must start with a <literal>0</literal> (zero).) </para> <para> - The default permissions are <literal>0600</>, meaning only the + The default permissions are <literal>0600</literal>, meaning only the server owner can read or write the log files. The other commonly - useful setting is <literal>0640</>, allowing members of the owner's + useful setting is <literal>0640</literal>, allowing members of the owner's group to read the files. Note however that to make use of such a setting, you'll need to alter <xref linkend="guc-log-directory"> to store the files somewhere outside the cluster data directory. In @@ -4555,7 +4555,7 @@ local0.* /var/log/postgresql they might contain sensitive data. </para> <para> - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. </para> </listitem> @@ -4564,7 +4564,7 @@ local0.* /var/log/postgresql <varlistentry id="guc-log-rotation-age" xreflabel="log_rotation_age"> <term><varname>log_rotation_age</varname> (<type>integer</type>) <indexterm> - <primary><varname>log_rotation_age</> configuration parameter</primary> + <primary><varname>log_rotation_age</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -4574,7 +4574,7 @@ local0.* /var/log/postgresql After this many minutes have elapsed, a new log file will be created. Set to zero to disable time-based creation of new log files. - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. </para> </listitem> @@ -4583,7 +4583,7 @@ local0.* /var/log/postgresql <varlistentry id="guc-log-rotation-size" xreflabel="log_rotation_size"> <term><varname>log_rotation_size</varname> (<type>integer</type>) <indexterm> - <primary><varname>log_rotation_size</> configuration parameter</primary> + <primary><varname>log_rotation_size</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -4593,7 +4593,7 @@ local0.* /var/log/postgresql After this many kilobytes have been emitted into a log file, a new log file will be created. Set to zero to disable size-based creation of new log files. - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. </para> </listitem> @@ -4602,7 +4602,7 @@ local0.* /var/log/postgresql <varlistentry id="guc-log-truncate-on-rotation" xreflabel="log_truncate_on_rotation"> <term><varname>log_truncate_on_rotation</varname> (<type>boolean</type>) <indexterm> - <primary><varname>log_truncate_on_rotation</> configuration parameter</primary> + <primary><varname>log_truncate_on_rotation</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -4617,7 +4617,7 @@ local0.* /var/log/postgresql a <varname>log_filename</varname> like <literal>postgresql-%H.log</literal> would result in generating twenty-four hourly log files and then cyclically overwriting them. - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. </para> <para> @@ -4635,7 +4635,7 @@ local0.* /var/log/postgresql <varname>log_truncate_on_rotation</varname> to <literal>on</literal>, <varname>log_rotation_age</varname> to <literal>60</literal>, and <varname>log_rotation_size</varname> to <literal>1000000</literal>. - Including <literal>%M</> in <varname>log_filename</varname> allows + Including <literal>%M</literal> in <varname>log_filename</varname> allows any size-driven rotations that might occur to select a file name different from the hour's initial file name. </para> @@ -4645,21 +4645,21 @@ local0.* /var/log/postgresql <varlistentry id="guc-syslog-facility" xreflabel="syslog_facility"> <term><varname>syslog_facility</varname> (<type>enum</type>) <indexterm> - <primary><varname>syslog_facility</> configuration parameter</primary> + <primary><varname>syslog_facility</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> - When logging to <application>syslog</> is enabled, this parameter + When logging to <application>syslog</application> is enabled, this parameter determines the <application>syslog</application> <quote>facility</quote> to be used. You can choose - from <literal>LOCAL0</>, <literal>LOCAL1</>, - <literal>LOCAL2</>, <literal>LOCAL3</>, <literal>LOCAL4</>, - <literal>LOCAL5</>, <literal>LOCAL6</>, <literal>LOCAL7</>; - the default is <literal>LOCAL0</>. See also the + from <literal>LOCAL0</literal>, <literal>LOCAL1</literal>, + <literal>LOCAL2</literal>, <literal>LOCAL3</literal>, <literal>LOCAL4</literal>, + <literal>LOCAL5</literal>, <literal>LOCAL6</literal>, <literal>LOCAL7</literal>; + the default is <literal>LOCAL0</literal>. See also the documentation of your system's <application>syslog</application> daemon. - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. </para> </listitem> @@ -4668,17 +4668,17 @@ local0.* /var/log/postgresql <varlistentry id="guc-syslog-ident" xreflabel="syslog_ident"> <term><varname>syslog_ident</varname> (<type>string</type>) <indexterm> - <primary><varname>syslog_ident</> configuration parameter</primary> + <primary><varname>syslog_ident</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> - When logging to <application>syslog</> is enabled, this parameter + When logging to <application>syslog</application> is enabled, this parameter determines the program name used to identify <productname>PostgreSQL</productname> messages in <application>syslog</application> logs. The default is <literal>postgres</literal>. - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. </para> </listitem> @@ -4687,7 +4687,7 @@ local0.* /var/log/postgresql <varlistentry id="guc-syslog-sequence-numbers" xreflabel="syslog_sequence_numbers"> <term><varname>syslog_sequence_numbers</varname> (<type>boolean</type>) <indexterm> - <primary><varname>syslog_sequence_numbers</> configuration parameter</primary> + <primary><varname>syslog_sequence_numbers</varname> configuration parameter</primary> </indexterm> </term> @@ -4706,7 +4706,7 @@ local0.* /var/log/postgresql </para> <para> - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. </para> </listitem> @@ -4715,12 +4715,12 @@ local0.* /var/log/postgresql <varlistentry id="guc-syslog-split-messages" xreflabel="syslog_split_messages"> <term><varname>syslog_split_messages</varname> (<type>boolean</type>) <indexterm> - <primary><varname>syslog_split_messages</> configuration parameter</primary> + <primary><varname>syslog_split_messages</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> - When logging to <application>syslog</> is enabled, this parameter + When logging to <application>syslog</application> is enabled, this parameter determines how messages are delivered to syslog. When on (the default), messages are split by lines, and long lines are split so that they will fit into 1024 bytes, which is a typical size limit for @@ -4739,7 +4739,7 @@ local0.* /var/log/postgresql </para> <para> - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. </para> </listitem> @@ -4748,16 +4748,16 @@ local0.* /var/log/postgresql <varlistentry id="guc-event-source" xreflabel="event_source"> <term><varname>event_source</varname> (<type>string</type>) <indexterm> - <primary><varname>event_source</> configuration parameter</primary> + <primary><varname>event_source</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> - When logging to <application>event log</> is enabled, this parameter + When logging to <application>event log</application> is enabled, this parameter determines the program name used to identify <productname>PostgreSQL</productname> messages in the log. The default is <literal>PostgreSQL</literal>. - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. </para> </listitem> @@ -4773,21 +4773,21 @@ local0.* /var/log/postgresql <varlistentry id="guc-client-min-messages" xreflabel="client_min_messages"> <term><varname>client_min_messages</varname> (<type>enum</type>) <indexterm> - <primary><varname>client_min_messages</> configuration parameter</primary> + <primary><varname>client_min_messages</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Controls which message levels are sent to the client. - Valid values are <literal>DEBUG5</>, - <literal>DEBUG4</>, <literal>DEBUG3</>, <literal>DEBUG2</>, - <literal>DEBUG1</>, <literal>LOG</>, <literal>NOTICE</>, - <literal>WARNING</>, <literal>ERROR</>, <literal>FATAL</>, - and <literal>PANIC</>. Each level + Valid values are <literal>DEBUG5</literal>, + <literal>DEBUG4</literal>, <literal>DEBUG3</literal>, <literal>DEBUG2</literal>, + <literal>DEBUG1</literal>, <literal>LOG</literal>, <literal>NOTICE</literal>, + <literal>WARNING</literal>, <literal>ERROR</literal>, <literal>FATAL</literal>, + and <literal>PANIC</literal>. Each level includes all the levels that follow it. The later the level, the fewer messages are sent. The default is - <literal>NOTICE</>. Note that <literal>LOG</> has a different - rank here than in <varname>log_min_messages</>. + <literal>NOTICE</literal>. Note that <literal>LOG</literal> has a different + rank here than in <varname>log_min_messages</varname>. </para> </listitem> </varlistentry> @@ -4795,21 +4795,21 @@ local0.* /var/log/postgresql <varlistentry id="guc-log-min-messages" xreflabel="log_min_messages"> <term><varname>log_min_messages</varname> (<type>enum</type>) <indexterm> - <primary><varname>log_min_messages</> configuration parameter</primary> + <primary><varname>log_min_messages</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Controls which message levels are written to the server log. - Valid values are <literal>DEBUG5</>, <literal>DEBUG4</>, - <literal>DEBUG3</>, <literal>DEBUG2</>, <literal>DEBUG1</>, - <literal>INFO</>, <literal>NOTICE</>, <literal>WARNING</>, - <literal>ERROR</>, <literal>LOG</>, <literal>FATAL</>, and - <literal>PANIC</>. Each level includes all the levels that + Valid values are <literal>DEBUG5</literal>, <literal>DEBUG4</literal>, + <literal>DEBUG3</literal>, <literal>DEBUG2</literal>, <literal>DEBUG1</literal>, + <literal>INFO</literal>, <literal>NOTICE</literal>, <literal>WARNING</literal>, + <literal>ERROR</literal>, <literal>LOG</literal>, <literal>FATAL</literal>, and + <literal>PANIC</literal>. Each level includes all the levels that follow it. The later the level, the fewer messages are sent - to the log. The default is <literal>WARNING</>. Note that - <literal>LOG</> has a different rank here than in - <varname>client_min_messages</>. + to the log. The default is <literal>WARNING</literal>. Note that + <literal>LOG</literal> has a different rank here than in + <varname>client_min_messages</varname>. Only superusers can change this setting. </para> </listitem> @@ -4818,7 +4818,7 @@ local0.* /var/log/postgresql <varlistentry id="guc-log-min-error-statement" xreflabel="log_min_error_statement"> <term><varname>log_min_error_statement</varname> (<type>enum</type>) <indexterm> - <primary><varname>log_min_error_statement</> configuration parameter</primary> + <primary><varname>log_min_error_statement</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -4846,7 +4846,7 @@ local0.* /var/log/postgresql <varlistentry id="guc-log-min-duration-statement" xreflabel="log_min_duration_statement"> <term><varname>log_min_duration_statement</varname> (<type>integer</type>) <indexterm> - <primary><varname>log_min_duration_statement</> configuration parameter</primary> + <primary><varname>log_min_duration_statement</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -4872,9 +4872,9 @@ local0.* /var/log/postgresql When using this option together with <xref linkend="guc-log-statement">, the text of statements that are logged because of - <varname>log_statement</> will not be repeated in the + <varname>log_statement</varname> will not be repeated in the duration log message. - If you are not using <application>syslog</>, it is recommended + If you are not using <application>syslog</application>, it is recommended that you log the PID or session ID using <xref linkend="guc-log-line-prefix"> so that you can link the statement message to the later @@ -4888,7 +4888,7 @@ local0.* /var/log/postgresql <para> <xref linkend="runtime-config-severity-levels"> explains the message - severity levels used by <productname>PostgreSQL</>. If logging output + severity levels used by <productname>PostgreSQL</productname>. If logging output is sent to <systemitem>syslog</systemitem> or Windows' <systemitem>eventlog</systemitem>, the severity levels are translated as shown in the table. @@ -4901,73 +4901,73 @@ local0.* /var/log/postgresql <row> <entry>Severity</entry> <entry>Usage</entry> - <entry><systemitem>syslog</></entry> - <entry><systemitem>eventlog</></entry> + <entry><systemitem>syslog</systemitem></entry> + <entry><systemitem>eventlog</systemitem></entry> </row> </thead> <tbody> <row> - <entry><literal>DEBUG1..DEBUG5</></entry> + <entry><literal>DEBUG1..DEBUG5</literal></entry> <entry>Provides successively-more-detailed information for use by developers.</entry> - <entry><literal>DEBUG</></entry> - <entry><literal>INFORMATION</></entry> + <entry><literal>DEBUG</literal></entry> + <entry><literal>INFORMATION</literal></entry> </row> <row> - <entry><literal>INFO</></entry> + <entry><literal>INFO</literal></entry> <entry>Provides information implicitly requested by the user, - e.g., output from <command>VACUUM VERBOSE</>.</entry> - <entry><literal>INFO</></entry> - <entry><literal>INFORMATION</></entry> + e.g., output from <command>VACUUM VERBOSE</command>.</entry> + <entry><literal>INFO</literal></entry> + <entry><literal>INFORMATION</literal></entry> </row> <row> - <entry><literal>NOTICE</></entry> + <entry><literal>NOTICE</literal></entry> <entry>Provides information that might be helpful to users, e.g., notice of truncation of long identifiers.</entry> - <entry><literal>NOTICE</></entry> - <entry><literal>INFORMATION</></entry> + <entry><literal>NOTICE</literal></entry> + <entry><literal>INFORMATION</literal></entry> </row> <row> - <entry><literal>WARNING</></entry> - <entry>Provides warnings of likely problems, e.g., <command>COMMIT</> + <entry><literal>WARNING</literal></entry> + <entry>Provides warnings of likely problems, e.g., <command>COMMIT</command> outside a transaction block.</entry> - <entry><literal>NOTICE</></entry> - <entry><literal>WARNING</></entry> + <entry><literal>NOTICE</literal></entry> + <entry><literal>WARNING</literal></entry> </row> <row> - <entry><literal>ERROR</></entry> + <entry><literal>ERROR</literal></entry> <entry>Reports an error that caused the current command to abort.</entry> - <entry><literal>WARNING</></entry> - <entry><literal>ERROR</></entry> + <entry><literal>WARNING</literal></entry> + <entry><literal>ERROR</literal></entry> </row> <row> - <entry><literal>LOG</></entry> + <entry><literal>LOG</literal></entry> <entry>Reports information of interest to administrators, e.g., checkpoint activity.</entry> - <entry><literal>INFO</></entry> - <entry><literal>INFORMATION</></entry> + <entry><literal>INFO</literal></entry> + <entry><literal>INFORMATION</literal></entry> </row> <row> - <entry><literal>FATAL</></entry> + <entry><literal>FATAL</literal></entry> <entry>Reports an error that caused the current session to abort.</entry> - <entry><literal>ERR</></entry> - <entry><literal>ERROR</></entry> + <entry><literal>ERR</literal></entry> + <entry><literal>ERROR</literal></entry> </row> <row> - <entry><literal>PANIC</></entry> + <entry><literal>PANIC</literal></entry> <entry>Reports an error that caused all database sessions to abort.</entry> - <entry><literal>CRIT</></entry> - <entry><literal>ERROR</></entry> + <entry><literal>CRIT</literal></entry> + <entry><literal>ERROR</literal></entry> </row> </tbody> </tgroup> @@ -4982,15 +4982,15 @@ local0.* /var/log/postgresql <varlistentry id="guc-application-name" xreflabel="application_name"> <term><varname>application_name</varname> (<type>string</type>) <indexterm> - <primary><varname>application_name</> configuration parameter</primary> + <primary><varname>application_name</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> The <varname>application_name</varname> can be any string of less than - <symbol>NAMEDATALEN</> characters (64 characters in a standard build). + <symbol>NAMEDATALEN</symbol> characters (64 characters in a standard build). It is typically set by an application upon connection to the server. - The name will be displayed in the <structname>pg_stat_activity</> view + The name will be displayed in the <structname>pg_stat_activity</structname> view and included in CSV log entries. It can also be included in regular log entries via the <xref linkend="guc-log-line-prefix"> parameter. Only printable ASCII characters may be used in the @@ -5003,17 +5003,17 @@ local0.* /var/log/postgresql <varlistentry> <term><varname>debug_print_parse</varname> (<type>boolean</type>) <indexterm> - <primary><varname>debug_print_parse</> configuration parameter</primary> + <primary><varname>debug_print_parse</varname> configuration parameter</primary> </indexterm> </term> <term><varname>debug_print_rewritten</varname> (<type>boolean</type>) <indexterm> - <primary><varname>debug_print_rewritten</> configuration parameter</primary> + <primary><varname>debug_print_rewritten</varname> configuration parameter</primary> </indexterm> </term> <term><varname>debug_print_plan</varname> (<type>boolean</type>) <indexterm> - <primary><varname>debug_print_plan</> configuration parameter</primary> + <primary><varname>debug_print_plan</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -5021,7 +5021,7 @@ local0.* /var/log/postgresql These parameters enable various debugging output to be emitted. When set, they print the resulting parse tree, the query rewriter output, or the execution plan for each executed query. - These messages are emitted at <literal>LOG</> message level, so by + These messages are emitted at <literal>LOG</literal> message level, so by default they will appear in the server log but will not be sent to the client. You can change that by adjusting <xref linkend="guc-client-min-messages"> and/or @@ -5034,7 +5034,7 @@ local0.* /var/log/postgresql <varlistentry> <term><varname>debug_pretty_print</varname> (<type>boolean</type>) <indexterm> - <primary><varname>debug_pretty_print</> configuration parameter</primary> + <primary><varname>debug_pretty_print</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -5043,7 +5043,7 @@ local0.* /var/log/postgresql produced by <varname>debug_print_parse</varname>, <varname>debug_print_rewritten</varname>, or <varname>debug_print_plan</varname>. This results in more readable - but much longer output than the <quote>compact</> format used when + but much longer output than the <quote>compact</quote> format used when it is off. It is on by default. </para> </listitem> @@ -5052,7 +5052,7 @@ local0.* /var/log/postgresql <varlistentry id="guc-log-checkpoints" xreflabel="log_checkpoints"> <term><varname>log_checkpoints</varname> (<type>boolean</type>) <indexterm> - <primary><varname>log_checkpoints</> configuration parameter</primary> + <primary><varname>log_checkpoints</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -5060,7 +5060,7 @@ local0.* /var/log/postgresql Causes checkpoints and restartpoints to be logged in the server log. Some statistics are included in the log messages, including the number of buffers written and the time spent writing them. - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. The default is off. </para> </listitem> @@ -5069,7 +5069,7 @@ local0.* /var/log/postgresql <varlistentry id="guc-log-connections" xreflabel="log_connections"> <term><varname>log_connections</varname> (<type>boolean</type>) <indexterm> - <primary><varname>log_connections</> configuration parameter</primary> + <primary><varname>log_connections</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -5078,14 +5078,14 @@ local0.* /var/log/postgresql as well as successful completion of client authentication. Only superusers can change this parameter at session start, and it cannot be changed at all within a session. - The default is <literal>off</>. + The default is <literal>off</literal>. </para> <note> <para> - Some client programs, like <application>psql</>, attempt + Some client programs, like <application>psql</application>, attempt to connect twice while determining if a password is required, so - duplicate <quote>connection received</> messages do not + duplicate <quote>connection received</quote> messages do not necessarily indicate a problem. </para> </note> @@ -5095,7 +5095,7 @@ local0.* /var/log/postgresql <varlistentry id="guc-log-disconnections" xreflabel="log_disconnections"> <term><varname>log_disconnections</varname> (<type>boolean</type>) <indexterm> - <primary><varname>log_disconnections</> configuration parameter</primary> + <primary><varname>log_disconnections</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -5105,7 +5105,7 @@ local0.* /var/log/postgresql plus the duration of the session. Only superusers can change this parameter at session start, and it cannot be changed at all within a session. - The default is <literal>off</>. + The default is <literal>off</literal>. </para> </listitem> </varlistentry> @@ -5114,13 +5114,13 @@ local0.* /var/log/postgresql <varlistentry id="guc-log-duration" xreflabel="log_duration"> <term><varname>log_duration</varname> (<type>boolean</type>) <indexterm> - <primary><varname>log_duration</> configuration parameter</primary> + <primary><varname>log_duration</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Causes the duration of every completed statement to be logged. - The default is <literal>off</>. + The default is <literal>off</literal>. Only superusers can change this setting. </para> @@ -5133,10 +5133,10 @@ local0.* /var/log/postgresql <para> The difference between setting this option and setting <xref linkend="guc-log-min-duration-statement"> to zero is that - exceeding <varname>log_min_duration_statement</> forces the text of + exceeding <varname>log_min_duration_statement</varname> forces the text of the query to be logged, but this option doesn't. Thus, if - <varname>log_duration</> is <literal>on</> and - <varname>log_min_duration_statement</> has a positive value, all + <varname>log_duration</varname> is <literal>on</literal> and + <varname>log_min_duration_statement</varname> has a positive value, all durations are logged but the query text is included only for statements exceeding the threshold. This behavior can be useful for gathering statistics in high-load installations. @@ -5148,18 +5148,18 @@ local0.* /var/log/postgresql <varlistentry id="guc-log-error-verbosity" xreflabel="log_error_verbosity"> <term><varname>log_error_verbosity</varname> (<type>enum</type>) <indexterm> - <primary><varname>log_error_verbosity</> configuration parameter</primary> + <primary><varname>log_error_verbosity</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Controls the amount of detail written in the server log for each - message that is logged. Valid values are <literal>TERSE</>, - <literal>DEFAULT</>, and <literal>VERBOSE</>, each adding more - fields to displayed messages. <literal>TERSE</> excludes - the logging of <literal>DETAIL</>, <literal>HINT</>, - <literal>QUERY</>, and <literal>CONTEXT</> error information. - <literal>VERBOSE</> output includes the <symbol>SQLSTATE</> error + message that is logged. Valid values are <literal>TERSE</literal>, + <literal>DEFAULT</literal>, and <literal>VERBOSE</literal>, each adding more + fields to displayed messages. <literal>TERSE</literal> excludes + the logging of <literal>DETAIL</literal>, <literal>HINT</literal>, + <literal>QUERY</literal>, and <literal>CONTEXT</literal> error information. + <literal>VERBOSE</literal> output includes the <symbol>SQLSTATE</symbol> error code (see also <xref linkend="errcodes-appendix">) and the source code file name, function name, and line number that generated the error. Only superusers can change this setting. @@ -5170,7 +5170,7 @@ local0.* /var/log/postgresql <varlistentry id="guc-log-hostname" xreflabel="log_hostname"> <term><varname>log_hostname</varname> (<type>boolean</type>) <indexterm> - <primary><varname>log_hostname</> configuration parameter</primary> + <primary><varname>log_hostname</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -5179,7 +5179,7 @@ local0.* /var/log/postgresql connecting host. Turning this parameter on causes logging of the host name as well. Note that depending on your host name resolution setup this might impose a non-negligible performance penalty. - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. </para> </listitem> @@ -5188,14 +5188,14 @@ local0.* /var/log/postgresql <varlistentry id="guc-log-line-prefix" xreflabel="log_line_prefix"> <term><varname>log_line_prefix</varname> (<type>string</type>) <indexterm> - <primary><varname>log_line_prefix</> configuration parameter</primary> + <primary><varname>log_line_prefix</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> - This is a <function>printf</>-style string that is output at the + This is a <function>printf</function>-style string that is output at the beginning of each log line. - <literal>%</> characters begin <quote>escape sequences</> + <literal>%</literal> characters begin <quote>escape sequences</quote> that are replaced with status information as outlined below. Unrecognized escapes are ignored. Other characters are copied straight to the log line. Some escapes are @@ -5207,9 +5207,9 @@ local0.* /var/log/postgresql right with spaces to give it a minimum width, whereas a positive value will pad on the left. Padding can be useful to aid human readability in log files. - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. The default is - <literal>'%m [%p] '</> which logs a time stamp and the process ID. + <literal>'%m [%p] '</literal> which logs a time stamp and the process ID. <informaltable> <tgroup cols="3"> @@ -5310,19 +5310,19 @@ local0.* /var/log/postgresql </row> <row> <entry><literal>%%</literal></entry> - <entry>Literal <literal>%</></entry> + <entry>Literal <literal>%</literal></entry> <entry>no</entry> </row> </tbody> </tgroup> </informaltable> - The <literal>%c</> escape prints a quasi-unique session identifier, + The <literal>%c</literal> escape prints a quasi-unique session identifier, consisting of two 4-byte hexadecimal numbers (without leading zeros) separated by a dot. The numbers are the process start time and the - process ID, so <literal>%c</> can also be used as a space saving way + process ID, so <literal>%c</literal> can also be used as a space saving way of printing those items. For example, to generate the session - identifier from <literal>pg_stat_activity</>, use this query: + identifier from <literal>pg_stat_activity</literal>, use this query: <programlisting> SELECT to_hex(trunc(EXTRACT(EPOCH FROM backend_start))::integer) || '.' || to_hex(pid) @@ -5333,7 +5333,7 @@ FROM pg_stat_activity; <tip> <para> - If you set a nonempty value for <varname>log_line_prefix</>, + If you set a nonempty value for <varname>log_line_prefix</varname>, you should usually make its last character be a space, to provide visual separation from the rest of the log line. A punctuation character can be used too. @@ -5342,15 +5342,15 @@ FROM pg_stat_activity; <tip> <para> - <application>Syslog</> produces its own + <application>Syslog</application> produces its own time stamp and process ID information, so you probably do not want to - include those escapes if you are logging to <application>syslog</>. + include those escapes if you are logging to <application>syslog</application>. </para> </tip> <tip> <para> - The <literal>%q</> escape is useful when including information that is + The <literal>%q</literal> escape is useful when including information that is only available in session (backend) context like user or database name. For example: <programlisting> @@ -5364,7 +5364,7 @@ log_line_prefix = '%m [%p] %q%u@%d/%a ' <varlistentry id="guc-log-lock-waits" xreflabel="log_lock_waits"> <term><varname>log_lock_waits</varname> (<type>boolean</type>) <indexterm> - <primary><varname>log_lock_waits</> configuration parameter</primary> + <primary><varname>log_lock_waits</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -5372,7 +5372,7 @@ log_line_prefix = '%m [%p] %q%u@%d/%a ' Controls whether a log message is produced when a session waits longer than <xref linkend="guc-deadlock-timeout"> to acquire a lock. This is useful in determining if lock waits are causing - poor performance. The default is <literal>off</>. + poor performance. The default is <literal>off</literal>. Only superusers can change this setting. </para> </listitem> @@ -5381,22 +5381,22 @@ log_line_prefix = '%m [%p] %q%u@%d/%a ' <varlistentry id="guc-log-statement" xreflabel="log_statement"> <term><varname>log_statement</varname> (<type>enum</type>) <indexterm> - <primary><varname>log_statement</> configuration parameter</primary> + <primary><varname>log_statement</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Controls which SQL statements are logged. Valid values are - <literal>none</> (off), <literal>ddl</>, <literal>mod</>, and - <literal>all</> (all statements). <literal>ddl</> logs all data definition - statements, such as <command>CREATE</>, <command>ALTER</>, and - <command>DROP</> statements. <literal>mod</> logs all - <literal>ddl</> statements, plus data-modifying statements - such as <command>INSERT</>, - <command>UPDATE</>, <command>DELETE</>, <command>TRUNCATE</>, - and <command>COPY FROM</>. - <command>PREPARE</>, <command>EXECUTE</>, and - <command>EXPLAIN ANALYZE</> statements are also logged if their + <literal>none</literal> (off), <literal>ddl</literal>, <literal>mod</literal>, and + <literal>all</literal> (all statements). <literal>ddl</literal> logs all data definition + statements, such as <command>CREATE</command>, <command>ALTER</command>, and + <command>DROP</command> statements. <literal>mod</literal> logs all + <literal>ddl</literal> statements, plus data-modifying statements + such as <command>INSERT</command>, + <command>UPDATE</command>, <command>DELETE</command>, <command>TRUNCATE</command>, + and <command>COPY FROM</command>. + <command>PREPARE</command>, <command>EXECUTE</command>, and + <command>EXPLAIN ANALYZE</command> statements are also logged if their contained command is of an appropriate type. For clients using extended query protocol, logging occurs when an Execute message is received, and values of the Bind parameters are included @@ -5404,20 +5404,20 @@ log_line_prefix = '%m [%p] %q%u@%d/%a ' </para> <para> - The default is <literal>none</>. Only superusers can change this + The default is <literal>none</literal>. Only superusers can change this setting. </para> <note> <para> Statements that contain simple syntax errors are not logged - even by the <varname>log_statement</> = <literal>all</> setting, + even by the <varname>log_statement</varname> = <literal>all</literal> setting, because the log message is emitted only after basic parsing has been done to determine the statement type. In the case of extended query protocol, this setting likewise does not log statements that fail before the Execute phase (i.e., during parse analysis or - planning). Set <varname>log_min_error_statement</> to - <literal>ERROR</> (or lower) to log such statements. + planning). Set <varname>log_min_error_statement</varname> to + <literal>ERROR</literal> (or lower) to log such statements. </para> </note> </listitem> @@ -5426,14 +5426,14 @@ log_line_prefix = '%m [%p] %q%u@%d/%a ' <varlistentry id="guc-log-replication-commands" xreflabel="log_replication_commands"> <term><varname>log_replication_commands</varname> (<type>boolean</type>) <indexterm> - <primary><varname>log_replication_commands</> configuration parameter</primary> + <primary><varname>log_replication_commands</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Causes each replication command to be logged in the server log. See <xref linkend="protocol-replication"> for more information about - replication command. The default value is <literal>off</>. + replication command. The default value is <literal>off</literal>. Only superusers can change this setting. </para> </listitem> @@ -5442,7 +5442,7 @@ log_line_prefix = '%m [%p] %q%u@%d/%a ' <varlistentry id="guc-log-temp-files" xreflabel="log_temp_files"> <term><varname>log_temp_files</varname> (<type>integer</type>) <indexterm> - <primary><varname>log_temp_files</> configuration parameter</primary> + <primary><varname>log_temp_files</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -5463,7 +5463,7 @@ log_line_prefix = '%m [%p] %q%u@%d/%a ' <varlistentry id="guc-log-timezone" xreflabel="log_timezone"> <term><varname>log_timezone</varname> (<type>string</type>) <indexterm> - <primary><varname>log_timezone</> configuration parameter</primary> + <primary><varname>log_timezone</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -5471,11 +5471,11 @@ log_line_prefix = '%m [%p] %q%u@%d/%a ' Sets the time zone used for timestamps written in the server log. Unlike <xref linkend="guc-timezone">, this value is cluster-wide, so that all sessions will report timestamps consistently. - The built-in default is <literal>GMT</>, but that is typically - overridden in <filename>postgresql.conf</>; <application>initdb</> + The built-in default is <literal>GMT</literal>, but that is typically + overridden in <filename>postgresql.conf</filename>; <application>initdb</application> will install a setting there corresponding to its system environment. See <xref linkend="datatype-timezones"> for more information. - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. </para> </listitem> @@ -5487,10 +5487,10 @@ log_line_prefix = '%m [%p] %q%u@%d/%a ' <title>Using CSV-Format Log Output</title> <para> - Including <literal>csvlog</> in the <varname>log_destination</> list + Including <literal>csvlog</literal> in the <varname>log_destination</varname> list provides a convenient way to import log files into a database table. This option emits log lines in comma-separated-values - (<acronym>CSV</>) format, + (<acronym>CSV</acronym>) format, with these columns: time stamp with milliseconds, user name, @@ -5512,10 +5512,10 @@ log_line_prefix = '%m [%p] %q%u@%d/%a ' character count of the error position therein, error context, user query that led to the error (if any and enabled by - <varname>log_min_error_statement</>), + <varname>log_min_error_statement</varname>), character count of the error position therein, location of the error in the PostgreSQL source code - (if <varname>log_error_verbosity</> is set to <literal>verbose</>), + (if <varname>log_error_verbosity</varname> is set to <literal>verbose</literal>), and application name. Here is a sample table definition for storing CSV-format log output: @@ -5551,7 +5551,7 @@ CREATE TABLE postgres_log </para> <para> - To import a log file into this table, use the <command>COPY FROM</> + To import a log file into this table, use the <command>COPY FROM</command> command: <programlisting> @@ -5567,7 +5567,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <listitem> <para> Set <varname>log_filename</varname> and - <varname>log_rotation_age</> to provide a consistent, + <varname>log_rotation_age</varname> to provide a consistent, predictable naming scheme for your log files. This lets you predict what the file name will be and know when an individual log file is complete and therefore ready to be imported. @@ -5584,7 +5584,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <listitem> <para> - Set <varname>log_truncate_on_rotation</varname> to <literal>on</> so + Set <varname>log_truncate_on_rotation</varname> to <literal>on</literal> so that old log data isn't mixed with the new in the same file. </para> </listitem> @@ -5593,14 +5593,14 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <para> The table definition above includes a primary key specification. This is useful to protect against accidentally importing the same - information twice. The <command>COPY</> command commits all of the + information twice. The <command>COPY</command> command commits all of the data it imports at one time, so any error will cause the entire import to fail. If you import a partial log file and later import the file again when it is complete, the primary key violation will cause the import to fail. Wait until the log is complete and closed before importing. This procedure will also protect against accidentally importing a partial line that hasn't been completely - written, which would also cause <command>COPY</> to fail. + written, which would also cause <command>COPY</command> to fail. </para> </listitem> </orderedlist> @@ -5613,7 +5613,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <para> These settings control how process titles of server processes are modified. Process titles are typically viewed using programs like - <application>ps</> or, on Windows, <application>Process Explorer</>. + <application>ps</application> or, on Windows, <application>Process Explorer</application>. See <xref linkend="monitoring-ps"> for details. </para> @@ -5621,18 +5621,18 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <varlistentry id="guc-cluster-name" xreflabel="cluster_name"> <term><varname>cluster_name</varname> (<type>string</type>) <indexterm> - <primary><varname>cluster_name</> configuration parameter</primary> + <primary><varname>cluster_name</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Sets the cluster name that appears in the process title for all server processes in this cluster. The name can be any string of less - than <symbol>NAMEDATALEN</> characters (64 characters in a standard + than <symbol>NAMEDATALEN</symbol> characters (64 characters in a standard build). Only printable ASCII characters may be used in the <varname>cluster_name</varname> value. Other characters will be replaced with question marks (<literal>?</literal>). No name is shown - if this parameter is set to the empty string <literal>''</> (which is + if this parameter is set to the empty string <literal>''</literal> (which is the default). This parameter can only be set at server start. </para> </listitem> @@ -5641,15 +5641,15 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <varlistentry id="guc-update-process-title" xreflabel="update_process_title"> <term><varname>update_process_title</varname> (<type>boolean</type>) <indexterm> - <primary><varname>update_process_title</> configuration parameter</primary> + <primary><varname>update_process_title</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Enables updating of the process title every time a new SQL command is received by the server. - This setting defaults to <literal>on</> on most platforms, but it - defaults to <literal>off</> on Windows due to that platform's larger + This setting defaults to <literal>on</literal> on most platforms, but it + defaults to <literal>off</literal> on Windows due to that platform's larger overhead for updating the process title. Only superusers can change this setting. </para> @@ -5678,7 +5678,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <varlistentry id="guc-track-activities" xreflabel="track_activities"> <term><varname>track_activities</varname> (<type>boolean</type>) <indexterm> - <primary><varname>track_activities</> configuration parameter</primary> + <primary><varname>track_activities</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -5698,14 +5698,14 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <varlistentry id="guc-track-activity-query-size" xreflabel="track_activity_query_size"> <term><varname>track_activity_query_size</varname> (<type>integer</type>) <indexterm> - <primary><varname>track_activity_query_size</> configuration parameter</primary> + <primary><varname>track_activity_query_size</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Specifies the number of bytes reserved to track the currently executing command for each active session, for the - <structname>pg_stat_activity</>.<structfield>query</> field. + <structname>pg_stat_activity</structname>.<structfield>query</structfield> field. The default value is 1024. This parameter can only be set at server start. </para> @@ -5715,7 +5715,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <varlistentry id="guc-track-counts" xreflabel="track_counts"> <term><varname>track_counts</varname> (<type>boolean</type>) <indexterm> - <primary><varname>track_counts</> configuration parameter</primary> + <primary><varname>track_counts</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -5731,7 +5731,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <varlistentry id="guc-track-io-timing" xreflabel="track_io_timing"> <term><varname>track_io_timing</varname> (<type>boolean</type>) <indexterm> - <primary><varname>track_io_timing</> configuration parameter</primary> + <primary><varname>track_io_timing</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -5743,7 +5743,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; measure the overhead of timing on your system. I/O timing information is displayed in <xref linkend="pg-stat-database-view">, in the output of - <xref linkend="sql-explain"> when the <literal>BUFFERS</> option is + <xref linkend="sql-explain"> when the <literal>BUFFERS</literal> option is used, and by <xref linkend="pgstatstatements">. Only superusers can change this setting. </para> @@ -5753,7 +5753,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <varlistentry id="guc-track-functions" xreflabel="track_functions"> <term><varname>track_functions</varname> (<type>enum</type>) <indexterm> - <primary><varname>track_functions</> configuration parameter</primary> + <primary><varname>track_functions</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -5767,7 +5767,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <note> <para> - SQL-language functions that are simple enough to be <quote>inlined</> + SQL-language functions that are simple enough to be <quote>inlined</quote> into the calling query will not be tracked, regardless of this setting. </para> @@ -5778,7 +5778,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <varlistentry id="guc-stats-temp-directory" xreflabel="stats_temp_directory"> <term><varname>stats_temp_directory</varname> (<type>string</type>) <indexterm> - <primary><varname>stats_temp_directory</> configuration parameter</primary> + <primary><varname>stats_temp_directory</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -5788,7 +5788,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; is <filename>pg_stat_tmp</filename>. Pointing this at a RAM-based file system will decrease physical I/O requirements and can lead to improved performance. - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. </para> </listitem> @@ -5804,29 +5804,29 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <varlistentry> <term><varname>log_statement_stats</varname> (<type>boolean</type>) <indexterm> - <primary><varname>log_statement_stats</> configuration parameter</primary> + <primary><varname>log_statement_stats</varname> configuration parameter</primary> </indexterm> </term> <term><varname>log_parser_stats</varname> (<type>boolean</type>) <indexterm> - <primary><varname>log_parser_stats</> configuration parameter</primary> + <primary><varname>log_parser_stats</varname> configuration parameter</primary> </indexterm> </term> <term><varname>log_planner_stats</varname> (<type>boolean</type>) <indexterm> - <primary><varname>log_planner_stats</> configuration parameter</primary> + <primary><varname>log_planner_stats</varname> configuration parameter</primary> </indexterm> </term> <term><varname>log_executor_stats</varname> (<type>boolean</type>) <indexterm> - <primary><varname>log_executor_stats</> configuration parameter</primary> + <primary><varname>log_executor_stats</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> For each query, output performance statistics of the respective module to the server log. This is a crude profiling - instrument, similar to the Unix <function>getrusage()</> operating + instrument, similar to the Unix <function>getrusage()</function> operating system facility. <varname>log_statement_stats</varname> reports total statement statistics, while the others report per-module statistics. <varname>log_statement_stats</varname> cannot be enabled together with @@ -5850,7 +5850,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; </indexterm> <para> - These settings control the behavior of the <firstterm>autovacuum</> + These settings control the behavior of the <firstterm>autovacuum</firstterm> feature. Refer to <xref linkend="autovacuum"> for more information. Note that many of these settings can be overridden on a per-table basis; see <xref linkend="sql-createtable-storage-parameters" @@ -5862,7 +5862,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <varlistentry id="guc-autovacuum" xreflabel="autovacuum"> <term><varname>autovacuum</varname> (<type>boolean</type>) <indexterm> - <primary><varname>autovacuum</> configuration parameter</primary> + <primary><varname>autovacuum</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -5871,7 +5871,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; autovacuum launcher daemon. This is on by default; however, <xref linkend="guc-track-counts"> must also be enabled for autovacuum to work. - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line; however, autovacuuming can be disabled for individual tables by changing table storage parameters. </para> @@ -5887,7 +5887,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <varlistentry id="guc-log-autovacuum-min-duration" xreflabel="log_autovacuum_min_duration"> <term><varname>log_autovacuum_min_duration</varname> (<type>integer</type>) <indexterm> - <primary><varname>log_autovacuum_min_duration</> configuration parameter</primary> + <primary><varname>log_autovacuum_min_duration</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -5902,7 +5902,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; logged if an autovacuum action is skipped due to the existence of a conflicting lock. Enabling this parameter can be helpful in tracking autovacuum activity. This parameter can only be set in - the <filename>postgresql.conf</> file or on the server command line; + the <filename>postgresql.conf</filename> file or on the server command line; but the setting can be overridden for individual tables by changing table storage parameters. </para> @@ -5912,7 +5912,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <varlistentry id="guc-autovacuum-max-workers" xreflabel="autovacuum_max_workers"> <term><varname>autovacuum_max_workers</varname> (<type>integer</type>) <indexterm> - <primary><varname>autovacuum_max_workers</> configuration parameter</primary> + <primary><varname>autovacuum_max_workers</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -5927,17 +5927,17 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <varlistentry id="guc-autovacuum-naptime" xreflabel="autovacuum_naptime"> <term><varname>autovacuum_naptime</varname> (<type>integer</type>) <indexterm> - <primary><varname>autovacuum_naptime</> configuration parameter</primary> + <primary><varname>autovacuum_naptime</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Specifies the minimum delay between autovacuum runs on any given database. In each round the daemon examines the - database and issues <command>VACUUM</> and <command>ANALYZE</> commands + database and issues <command>VACUUM</command> and <command>ANALYZE</command> commands as needed for tables in that database. The delay is measured - in seconds, and the default is one minute (<literal>1min</>). - This parameter can only be set in the <filename>postgresql.conf</> + in seconds, and the default is one minute (<literal>1min</literal>). + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. </para> </listitem> @@ -5946,15 +5946,15 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <varlistentry id="guc-autovacuum-vacuum-threshold" xreflabel="autovacuum_vacuum_threshold"> <term><varname>autovacuum_vacuum_threshold</varname> (<type>integer</type>) <indexterm> - <primary><varname>autovacuum_vacuum_threshold</> configuration parameter</primary> + <primary><varname>autovacuum_vacuum_threshold</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Specifies the minimum number of updated or deleted tuples needed - to trigger a <command>VACUUM</> in any one table. + to trigger a <command>VACUUM</command> in any one table. The default is 50 tuples. - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line; but the setting can be overridden for individual tables by changing table storage parameters. @@ -5965,15 +5965,15 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <varlistentry id="guc-autovacuum-analyze-threshold" xreflabel="autovacuum_analyze_threshold"> <term><varname>autovacuum_analyze_threshold</varname> (<type>integer</type>) <indexterm> - <primary><varname>autovacuum_analyze_threshold</> configuration parameter</primary> + <primary><varname>autovacuum_analyze_threshold</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Specifies the minimum number of inserted, updated or deleted tuples - needed to trigger an <command>ANALYZE</> in any one table. + needed to trigger an <command>ANALYZE</command> in any one table. The default is 50 tuples. - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line; but the setting can be overridden for individual tables by changing table storage parameters. @@ -5984,16 +5984,16 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <varlistentry id="guc-autovacuum-vacuum-scale-factor" xreflabel="autovacuum_vacuum_scale_factor"> <term><varname>autovacuum_vacuum_scale_factor</varname> (<type>floating point</type>) <indexterm> - <primary><varname>autovacuum_vacuum_scale_factor</> configuration parameter</primary> + <primary><varname>autovacuum_vacuum_scale_factor</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Specifies a fraction of the table size to add to <varname>autovacuum_vacuum_threshold</varname> - when deciding whether to trigger a <command>VACUUM</>. + when deciding whether to trigger a <command>VACUUM</command>. The default is 0.2 (20% of table size). - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line; but the setting can be overridden for individual tables by changing table storage parameters. @@ -6004,16 +6004,16 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <varlistentry id="guc-autovacuum-analyze-scale-factor" xreflabel="autovacuum_analyze_scale_factor"> <term><varname>autovacuum_analyze_scale_factor</varname> (<type>floating point</type>) <indexterm> - <primary><varname>autovacuum_analyze_scale_factor</> configuration parameter</primary> + <primary><varname>autovacuum_analyze_scale_factor</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Specifies a fraction of the table size to add to <varname>autovacuum_analyze_threshold</varname> - when deciding whether to trigger an <command>ANALYZE</>. + when deciding whether to trigger an <command>ANALYZE</command>. The default is 0.1 (10% of table size). - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line; but the setting can be overridden for individual tables by changing table storage parameters. @@ -6024,14 +6024,14 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <varlistentry id="guc-autovacuum-freeze-max-age" xreflabel="autovacuum_freeze_max_age"> <term><varname>autovacuum_freeze_max_age</varname> (<type>integer</type>) <indexterm> - <primary><varname>autovacuum_freeze_max_age</> configuration parameter</primary> + <primary><varname>autovacuum_freeze_max_age</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Specifies the maximum age (in transactions) that a table's - <structname>pg_class</>.<structfield>relfrozenxid</> field can - attain before a <command>VACUUM</> operation is forced + <structname>pg_class</structname>.<structfield>relfrozenxid</structfield> field can + attain before a <command>VACUUM</command> operation is forced to prevent transaction ID wraparound within the table. Note that the system will launch autovacuum processes to prevent wraparound even when autovacuum is otherwise disabled. @@ -6039,7 +6039,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <para> Vacuum also allows removal of old files from the - <filename>pg_xact</> subdirectory, which is why the default + <filename>pg_xact</filename> subdirectory, which is why the default is a relatively low 200 million transactions. This parameter can only be set at server start, but the setting can be reduced for individual tables by @@ -6058,8 +6058,8 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <listitem> <para> Specifies the maximum age (in multixacts) that a table's - <structname>pg_class</>.<structfield>relminmxid</> field can - attain before a <command>VACUUM</> operation is forced to + <structname>pg_class</structname>.<structfield>relminmxid</structfield> field can + attain before a <command>VACUUM</command> operation is forced to prevent multixact ID wraparound within the table. Note that the system will launch autovacuum processes to prevent wraparound even when autovacuum is otherwise disabled. @@ -6067,7 +6067,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <para> Vacuuming multixacts also allows removal of old files from the - <filename>pg_multixact/members</> and <filename>pg_multixact/offsets</> + <filename>pg_multixact/members</filename> and <filename>pg_multixact/offsets</filename> subdirectories, which is why the default is a relatively low 400 million multixacts. This parameter can only be set at server start, but the setting can @@ -6080,16 +6080,16 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <varlistentry id="guc-autovacuum-vacuum-cost-delay" xreflabel="autovacuum_vacuum_cost_delay"> <term><varname>autovacuum_vacuum_cost_delay</varname> (<type>integer</type>) <indexterm> - <primary><varname>autovacuum_vacuum_cost_delay</> configuration parameter</primary> + <primary><varname>autovacuum_vacuum_cost_delay</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Specifies the cost delay value that will be used in automatic - <command>VACUUM</> operations. If -1 is specified, the regular + <command>VACUUM</command> operations. If -1 is specified, the regular <xref linkend="guc-vacuum-cost-delay"> value will be used. The default value is 20 milliseconds. - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line; but the setting can be overridden for individual tables by changing table storage parameters. @@ -6100,19 +6100,19 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <varlistentry id="guc-autovacuum-vacuum-cost-limit" xreflabel="autovacuum_vacuum_cost_limit"> <term><varname>autovacuum_vacuum_cost_limit</varname> (<type>integer</type>) <indexterm> - <primary><varname>autovacuum_vacuum_cost_limit</> configuration parameter</primary> + <primary><varname>autovacuum_vacuum_cost_limit</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Specifies the cost limit value that will be used in automatic - <command>VACUUM</> operations. If -1 is specified (which is the + <command>VACUUM</command> operations. If -1 is specified (which is the default), the regular <xref linkend="guc-vacuum-cost-limit"> value will be used. Note that the value is distributed proportionally among the running autovacuum workers, if there is more than one, so that the sum of the limits for each worker does not exceed the value of this variable. - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line; but the setting can be overridden for individual tables by changing table storage parameters. @@ -6133,9 +6133,9 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <varlistentry id="guc-search-path" xreflabel="search_path"> <term><varname>search_path</varname> (<type>string</type>) <indexterm> - <primary><varname>search_path</> configuration parameter</primary> + <primary><varname>search_path</varname> configuration parameter</primary> </indexterm> - <indexterm><primary>path</><secondary>for schemas</></> + <indexterm><primary>path</primary><secondary>for schemas</secondary></indexterm> </term> <listitem> <para> @@ -6151,32 +6151,32 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <para> The value for <varname>search_path</varname> must be a comma-separated list of schema names. Any name that is not an existing schema, or is - a schema for which the user does not have <literal>USAGE</> + a schema for which the user does not have <literal>USAGE</literal> permission, is silently ignored. </para> <para> If one of the list items is the special name <literal>$user</literal>, then the schema having the name returned by - <function>SESSION_USER</> is substituted, if there is such a schema - and the user has <literal>USAGE</> permission for it. + <function>SESSION_USER</function> is substituted, if there is such a schema + and the user has <literal>USAGE</literal> permission for it. (If not, <literal>$user</literal> is ignored.) </para> <para> - The system catalog schema, <literal>pg_catalog</>, is always + The system catalog schema, <literal>pg_catalog</literal>, is always searched, whether it is mentioned in the path or not. If it is mentioned in the path then it will be searched in the specified - order. If <literal>pg_catalog</> is not in the path then it will - be searched <emphasis>before</> searching any of the path items. + order. If <literal>pg_catalog</literal> is not in the path then it will + be searched <emphasis>before</emphasis> searching any of the path items. </para> <para> Likewise, the current session's temporary-table schema, - <literal>pg_temp_<replaceable>nnn</></>, is always searched if it + <literal>pg_temp_<replaceable>nnn</replaceable></literal>, is always searched if it exists. It can be explicitly listed in the path by using the - alias <literal>pg_temp</><indexterm><primary>pg_temp</></>. If it is not listed in the path then - it is searched first (even before <literal>pg_catalog</>). However, + alias <literal>pg_temp</literal><indexterm><primary>pg_temp</primary></indexterm>. If it is not listed in the path then + it is searched first (even before <literal>pg_catalog</literal>). However, the temporary schema is only searched for relation (table, view, sequence, etc) and data type names. It is never searched for function or operator names. @@ -6193,7 +6193,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; The default value for this parameter is <literal>"$user", public</literal>. This setting supports shared use of a database (where no users - have private schemas, and all share use of <literal>public</>), + have private schemas, and all share use of <literal>public</literal>), private per-user schemas, and combinations of these. Other effects can be obtained by altering the default search path setting, either globally or per-user. @@ -6202,11 +6202,11 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <para> The current effective value of the search path can be examined via the <acronym>SQL</acronym> function - <function>current_schemas</> + <function>current_schemas</function> (see <xref linkend="functions-info">). This is not quite the same as examining the value of <varname>search_path</varname>, since - <function>current_schemas</> shows how the items + <function>current_schemas</function> shows how the items appearing in <varname>search_path</varname> were resolved. </para> @@ -6219,20 +6219,20 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <varlistentry id="guc-row-security" xreflabel="row_security"> <term><varname>row_security</varname> (<type>boolean</type>) <indexterm> - <primary><varname>row_security</> configuration parameter</primary> + <primary><varname>row_security</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> This variable controls whether to raise an error in lieu of applying a - row security policy. When set to <literal>on</>, policies apply - normally. When set to <literal>off</>, queries fail which would - otherwise apply at least one policy. The default is <literal>on</>. - Change to <literal>off</> where limited row visibility could cause - incorrect results; for example, <application>pg_dump</> makes that + row security policy. When set to <literal>on</literal>, policies apply + normally. When set to <literal>off</literal>, queries fail which would + otherwise apply at least one policy. The default is <literal>on</literal>. + Change to <literal>off</literal> where limited row visibility could cause + incorrect results; for example, <application>pg_dump</application> makes that change by default. This variable has no effect on roles which bypass every row security policy, to wit, superusers and roles with - the <literal>BYPASSRLS</> attribute. + the <literal>BYPASSRLS</literal> attribute. </para> <para> @@ -6245,14 +6245,14 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <varlistentry id="guc-default-tablespace" xreflabel="default_tablespace"> <term><varname>default_tablespace</varname> (<type>string</type>) <indexterm> - <primary><varname>default_tablespace</> configuration parameter</primary> + <primary><varname>default_tablespace</varname> configuration parameter</primary> </indexterm> - <indexterm><primary>tablespace</><secondary>default</></> + <indexterm><primary>tablespace</primary><secondary>default</secondary></indexterm> </term> <listitem> <para> This variable specifies the default tablespace in which to create - objects (tables and indexes) when a <command>CREATE</> command does + objects (tables and indexes) when a <command>CREATE</command> command does not explicitly specify a tablespace. </para> @@ -6260,9 +6260,9 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; The value is either the name of a tablespace, or an empty string to specify using the default tablespace of the current database. If the value does not match the name of any existing tablespace, - <productname>PostgreSQL</> will automatically use the default + <productname>PostgreSQL</productname> will automatically use the default tablespace of the current database. If a nondefault tablespace - is specified, the user must have <literal>CREATE</> privilege + is specified, the user must have <literal>CREATE</literal> privilege for it, or creation attempts will fail. </para> @@ -6287,38 +6287,38 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <varlistentry id="guc-temp-tablespaces" xreflabel="temp_tablespaces"> <term><varname>temp_tablespaces</varname> (<type>string</type>) <indexterm> - <primary><varname>temp_tablespaces</> configuration parameter</primary> + <primary><varname>temp_tablespaces</varname> configuration parameter</primary> </indexterm> - <indexterm><primary>tablespace</><secondary>temporary</></> + <indexterm><primary>tablespace</primary><secondary>temporary</secondary></indexterm> </term> <listitem> <para> This variable specifies tablespaces in which to create temporary objects (temp tables and indexes on temp tables) when a - <command>CREATE</> command does not explicitly specify a tablespace. + <command>CREATE</command> command does not explicitly specify a tablespace. Temporary files for purposes such as sorting large data sets are also created in these tablespaces. </para> <para> The value is a list of names of tablespaces. When there is more than - one name in the list, <productname>PostgreSQL</> chooses a random + one name in the list, <productname>PostgreSQL</productname> chooses a random member of the list each time a temporary object is to be created; except that within a transaction, successively created temporary objects are placed in successive tablespaces from the list. If the selected element of the list is an empty string, - <productname>PostgreSQL</> will automatically use the default + <productname>PostgreSQL</productname> will automatically use the default tablespace of the current database instead. </para> <para> - When <varname>temp_tablespaces</> is set interactively, specifying a + When <varname>temp_tablespaces</varname> is set interactively, specifying a nonexistent tablespace is an error, as is specifying a tablespace for - which the user does not have <literal>CREATE</> privilege. However, + which the user does not have <literal>CREATE</literal> privilege. However, when using a previously set value, nonexistent tablespaces are ignored, as are tablespaces for which the user lacks - <literal>CREATE</> privilege. In particular, this rule applies when - using a value set in <filename>postgresql.conf</>. + <literal>CREATE</literal> privilege. In particular, this rule applies when + using a value set in <filename>postgresql.conf</filename>. </para> <para> @@ -6336,18 +6336,18 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <varlistentry id="guc-check-function-bodies" xreflabel="check_function_bodies"> <term><varname>check_function_bodies</varname> (<type>boolean</type>) <indexterm> - <primary><varname>check_function_bodies</> configuration parameter</primary> + <primary><varname>check_function_bodies</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> - This parameter is normally on. When set to <literal>off</>, it + This parameter is normally on. When set to <literal>off</literal>, it disables validation of the function body string during <xref linkend="sql-createfunction">. Disabling validation avoids side effects of the validation process and avoids false positives due to problems such as forward references. Set this parameter - to <literal>off</> before loading functions on behalf of other - users; <application>pg_dump</> does so automatically. + to <literal>off</literal> before loading functions on behalf of other + users; <application>pg_dump</application> does so automatically. </para> </listitem> </varlistentry> @@ -6359,7 +6359,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <secondary>setting default</secondary> </indexterm> <indexterm> - <primary><varname>default_transaction_isolation</> configuration parameter</primary> + <primary><varname>default_transaction_isolation</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -6386,14 +6386,14 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <secondary>setting default</secondary> </indexterm> <indexterm> - <primary><varname>default_transaction_read_only</> configuration parameter</primary> + <primary><varname>default_transaction_read_only</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> A read-only SQL transaction cannot alter non-temporary tables. This parameter controls the default read-only status of each new - transaction. The default is <literal>off</> (read/write). + transaction. The default is <literal>off</literal> (read/write). </para> <para> @@ -6409,12 +6409,12 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <secondary>setting default</secondary> </indexterm> <indexterm> - <primary><varname>default_transaction_deferrable</> configuration parameter</primary> + <primary><varname>default_transaction_deferrable</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> - When running at the <literal>serializable</> isolation level, + When running at the <literal>serializable</literal> isolation level, a deferrable read-only SQL transaction may be delayed before it is allowed to proceed. However, once it begins executing it does not incur any of the overhead required to ensure @@ -6427,7 +6427,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; This parameter controls the default deferrable status of each new transaction. It currently has no effect on read-write transactions or those operating at isolation levels lower - than <literal>serializable</>. The default is <literal>off</>. + than <literal>serializable</literal>. The default is <literal>off</literal>. </para> <para> @@ -6440,7 +6440,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <varlistentry id="guc-session-replication-role" xreflabel="session_replication_role"> <term><varname>session_replication_role</varname> (<type>enum</type>) <indexterm> - <primary><varname>session_replication_role</> configuration parameter</primary> + <primary><varname>session_replication_role</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -6448,8 +6448,8 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; Controls firing of replication-related triggers and rules for the current session. Setting this variable requires superuser privilege and results in discarding any previously cached - query plans. Possible values are <literal>origin</> (the default), - <literal>replica</> and <literal>local</>. + query plans. Possible values are <literal>origin</literal> (the default), + <literal>replica</literal> and <literal>local</literal>. See <xref linkend="sql-altertable"> for more information. </para> @@ -6459,21 +6459,21 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <varlistentry id="guc-statement-timeout" xreflabel="statement_timeout"> <term><varname>statement_timeout</varname> (<type>integer</type>) <indexterm> - <primary><varname>statement_timeout</> configuration parameter</primary> + <primary><varname>statement_timeout</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Abort any statement that takes more than the specified number of milliseconds, starting from the time the command arrives at the server - from the client. If <varname>log_min_error_statement</> is set to - <literal>ERROR</> or lower, the statement that timed out will also be + from the client. If <varname>log_min_error_statement</varname> is set to + <literal>ERROR</literal> or lower, the statement that timed out will also be logged. A value of zero (the default) turns this off. </para> <para> - Setting <varname>statement_timeout</> in - <filename>postgresql.conf</> is not recommended because it would + Setting <varname>statement_timeout</varname> in + <filename>postgresql.conf</filename> is not recommended because it would affect all sessions. </para> </listitem> @@ -6482,7 +6482,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <varlistentry id="guc-lock-timeout" xreflabel="lock_timeout"> <term><varname>lock_timeout</varname> (<type>integer</type>) <indexterm> - <primary><varname>lock_timeout</> configuration parameter</primary> + <primary><varname>lock_timeout</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -6491,24 +6491,24 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; milliseconds while attempting to acquire a lock on a table, index, row, or other database object. The time limit applies separately to each lock acquisition attempt. The limit applies both to explicit - locking requests (such as <command>LOCK TABLE</>, or <command>SELECT - FOR UPDATE</> without <literal>NOWAIT</>) and to implicitly-acquired - locks. If <varname>log_min_error_statement</> is set to - <literal>ERROR</> or lower, the statement that timed out will be + locking requests (such as <command>LOCK TABLE</command>, or <command>SELECT + FOR UPDATE</command> without <literal>NOWAIT</literal>) and to implicitly-acquired + locks. If <varname>log_min_error_statement</varname> is set to + <literal>ERROR</literal> or lower, the statement that timed out will be logged. A value of zero (the default) turns this off. </para> <para> - Unlike <varname>statement_timeout</>, this timeout can only occur - while waiting for locks. Note that if <varname>statement_timeout</> - is nonzero, it is rather pointless to set <varname>lock_timeout</> to + Unlike <varname>statement_timeout</varname>, this timeout can only occur + while waiting for locks. Note that if <varname>statement_timeout</varname> + is nonzero, it is rather pointless to set <varname>lock_timeout</varname> to the same or larger value, since the statement timeout would always trigger first. </para> <para> - Setting <varname>lock_timeout</> in - <filename>postgresql.conf</> is not recommended because it would + Setting <varname>lock_timeout</varname> in + <filename>postgresql.conf</filename> is not recommended because it would affect all sessions. </para> </listitem> @@ -6517,7 +6517,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <varlistentry id="guc-idle-in-transaction-session-timeout" xreflabel="idle_in_transaction_session_timeout"> <term><varname>idle_in_transaction_session_timeout</varname> (<type>integer</type>) <indexterm> - <primary><varname>idle_in_transaction_session_timeout</> configuration parameter</primary> + <primary><varname>idle_in_transaction_session_timeout</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -6537,21 +6537,21 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <varlistentry id="guc-vacuum-freeze-table-age" xreflabel="vacuum_freeze_table_age"> <term><varname>vacuum_freeze_table_age</varname> (<type>integer</type>) <indexterm> - <primary><varname>vacuum_freeze_table_age</> configuration parameter</primary> + <primary><varname>vacuum_freeze_table_age</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> - <command>VACUUM</> performs an aggressive scan if the table's - <structname>pg_class</>.<structfield>relfrozenxid</> field has reached + <command>VACUUM</command> performs an aggressive scan if the table's + <structname>pg_class</structname>.<structfield>relfrozenxid</structfield> field has reached the age specified by this setting. An aggressive scan differs from - a regular <command>VACUUM</> in that it visits every page that might + a regular <command>VACUUM</command> in that it visits every page that might contain unfrozen XIDs or MXIDs, not just those that might contain dead tuples. The default is 150 million transactions. Although users can - set this value anywhere from zero to two billions, <command>VACUUM</> + set this value anywhere from zero to two billions, <command>VACUUM</command> will silently limit the effective value to 95% of <xref linkend="guc-autovacuum-freeze-max-age">, so that a - periodical manual <command>VACUUM</> has a chance to run before an + periodical manual <command>VACUUM</command> has a chance to run before an anti-wraparound autovacuum is launched for the table. For more information see <xref linkend="vacuum-for-wraparound">. @@ -6562,17 +6562,17 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <varlistentry id="guc-vacuum-freeze-min-age" xreflabel="vacuum_freeze_min_age"> <term><varname>vacuum_freeze_min_age</varname> (<type>integer</type>) <indexterm> - <primary><varname>vacuum_freeze_min_age</> configuration parameter</primary> + <primary><varname>vacuum_freeze_min_age</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> - Specifies the cutoff age (in transactions) that <command>VACUUM</> + Specifies the cutoff age (in transactions) that <command>VACUUM</command> should use to decide whether to freeze row versions while scanning a table. The default is 50 million transactions. Although users can set this value anywhere from zero to one billion, - <command>VACUUM</> will silently limit the effective value to half + <command>VACUUM</command> will silently limit the effective value to half the value of <xref linkend="guc-autovacuum-freeze-max-age">, so that there is not an unreasonably short time between forced autovacuums. For more information see <xref @@ -6584,21 +6584,21 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <varlistentry id="guc-vacuum-multixact-freeze-table-age" xreflabel="vacuum_multixact_freeze_table_age"> <term><varname>vacuum_multixact_freeze_table_age</varname> (<type>integer</type>) <indexterm> - <primary><varname>vacuum_multixact_freeze_table_age</> configuration parameter</primary> + <primary><varname>vacuum_multixact_freeze_table_age</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> - <command>VACUUM</> performs an aggressive scan if the table's - <structname>pg_class</>.<structfield>relminmxid</> field has reached + <command>VACUUM</command> performs an aggressive scan if the table's + <structname>pg_class</structname>.<structfield>relminmxid</structfield> field has reached the age specified by this setting. An aggressive scan differs from - a regular <command>VACUUM</> in that it visits every page that might + a regular <command>VACUUM</command> in that it visits every page that might contain unfrozen XIDs or MXIDs, not just those that might contain dead tuples. The default is 150 million multixacts. Although users can set this value anywhere from zero to two billions, - <command>VACUUM</> will silently limit the effective value to 95% of + <command>VACUUM</command> will silently limit the effective value to 95% of <xref linkend="guc-autovacuum-multixact-freeze-max-age">, so that a - periodical manual <command>VACUUM</> has a chance to run before an + periodical manual <command>VACUUM</command> has a chance to run before an anti-wraparound is launched for the table. For more information see <xref linkend="vacuum-for-multixact-wraparound">. </para> @@ -6608,17 +6608,17 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <varlistentry id="guc-vacuum-multixact-freeze-min-age" xreflabel="vacuum_multixact_freeze_min_age"> <term><varname>vacuum_multixact_freeze_min_age</varname> (<type>integer</type>) <indexterm> - <primary><varname>vacuum_multixact_freeze_min_age</> configuration parameter</primary> + <primary><varname>vacuum_multixact_freeze_min_age</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> - Specifies the cutoff age (in multixacts) that <command>VACUUM</> + Specifies the cutoff age (in multixacts) that <command>VACUUM</command> should use to decide whether to replace multixact IDs with a newer transaction ID or multixact ID while scanning a table. The default is 5 million multixacts. Although users can set this value anywhere from zero to one billion, - <command>VACUUM</> will silently limit the effective value to half + <command>VACUUM</command> will silently limit the effective value to half the value of <xref linkend="guc-autovacuum-multixact-freeze-max-age">, so that there is not an unreasonably short time between forced autovacuums. @@ -6630,7 +6630,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <varlistentry id="guc-bytea-output" xreflabel="bytea_output"> <term><varname>bytea_output</varname> (<type>enum</type>) <indexterm> - <primary><varname>bytea_output</> configuration parameter</primary> + <primary><varname>bytea_output</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -6648,7 +6648,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <varlistentry id="guc-xmlbinary" xreflabel="xmlbinary"> <term><varname>xmlbinary</varname> (<type>enum</type>) <indexterm> - <primary><varname>xmlbinary</> configuration parameter</primary> + <primary><varname>xmlbinary</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -6676,10 +6676,10 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <varlistentry id="guc-xmloption" xreflabel="xmloption"> <term><varname>xmloption</varname> (<type>enum</type>) <indexterm> - <primary><varname>xmloption</> configuration parameter</primary> + <primary><varname>xmloption</varname> configuration parameter</primary> </indexterm> <indexterm> - <primary><varname>SET XML OPTION</></primary> + <primary><varname>SET XML OPTION</varname></primary> </indexterm> <indexterm> <primary>XML option</primary> @@ -6709,16 +6709,16 @@ SET XML OPTION { DOCUMENT | CONTENT }; <varlistentry id="guc-gin-pending-list-limit" xreflabel="gin_pending_list_limit"> <term><varname>gin_pending_list_limit</varname> (<type>integer</type>) <indexterm> - <primary><varname>gin_pending_list_limit</> configuration parameter</primary> + <primary><varname>gin_pending_list_limit</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Sets the maximum size of the GIN pending list which is used - when <literal>fastupdate</> is enabled. If the list grows + when <literal>fastupdate</literal> is enabled. If the list grows larger than this maximum size, it is cleaned up by moving the entries in it to the main GIN data structure in bulk. - The default is four megabytes (<literal>4MB</>). This setting + The default is four megabytes (<literal>4MB</literal>). This setting can be overridden for individual GIN indexes by changing index storage parameters. See <xref linkend="gin-fast-update"> and <xref linkend="gin-tips"> @@ -6737,7 +6737,7 @@ SET XML OPTION { DOCUMENT | CONTENT }; <varlistentry id="guc-datestyle" xreflabel="DateStyle"> <term><varname>DateStyle</varname> (<type>string</type>) <indexterm> - <primary><varname>DateStyle</> configuration parameter</primary> + <primary><varname>DateStyle</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -6745,16 +6745,16 @@ SET XML OPTION { DOCUMENT | CONTENT }; Sets the display format for date and time values, as well as the rules for interpreting ambiguous date input values. For historical reasons, this variable contains two independent - components: the output format specification (<literal>ISO</>, - <literal>Postgres</>, <literal>SQL</>, or <literal>German</>) + components: the output format specification (<literal>ISO</literal>, + <literal>Postgres</literal>, <literal>SQL</literal>, or <literal>German</literal>) and the input/output specification for year/month/day ordering - (<literal>DMY</>, <literal>MDY</>, or <literal>YMD</>). These - can be set separately or together. The keywords <literal>Euro</> - and <literal>European</> are synonyms for <literal>DMY</>; the - keywords <literal>US</>, <literal>NonEuro</>, and - <literal>NonEuropean</> are synonyms for <literal>MDY</>. See + (<literal>DMY</literal>, <literal>MDY</literal>, or <literal>YMD</literal>). These + can be set separately or together. The keywords <literal>Euro</literal> + and <literal>European</literal> are synonyms for <literal>DMY</literal>; the + keywords <literal>US</literal>, <literal>NonEuro</literal>, and + <literal>NonEuropean</literal> are synonyms for <literal>MDY</literal>. See <xref linkend="datatype-datetime"> for more information. The - built-in default is <literal>ISO, MDY</>, but + built-in default is <literal>ISO, MDY</literal>, but <application>initdb</application> will initialize the configuration file with a setting that corresponds to the behavior of the chosen <varname>lc_time</varname> locale. @@ -6765,28 +6765,28 @@ SET XML OPTION { DOCUMENT | CONTENT }; <varlistentry id="guc-intervalstyle" xreflabel="IntervalStyle"> <term><varname>IntervalStyle</varname> (<type>enum</type>) <indexterm> - <primary><varname>IntervalStyle</> configuration parameter</primary> + <primary><varname>IntervalStyle</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Sets the display format for interval values. - The value <literal>sql_standard</> will produce + The value <literal>sql_standard</literal> will produce output matching <acronym>SQL</acronym> standard interval literals. - The value <literal>postgres</> (which is the default) will produce - output matching <productname>PostgreSQL</> releases prior to 8.4 + The value <literal>postgres</literal> (which is the default) will produce + output matching <productname>PostgreSQL</productname> releases prior to 8.4 when the <xref linkend="guc-datestyle"> - parameter was set to <literal>ISO</>. - The value <literal>postgres_verbose</> will produce output - matching <productname>PostgreSQL</> releases prior to 8.4 - when the <varname>DateStyle</> - parameter was set to non-<literal>ISO</> output. - The value <literal>iso_8601</> will produce output matching the time - interval <quote>format with designators</> defined in section + parameter was set to <literal>ISO</literal>. + The value <literal>postgres_verbose</literal> will produce output + matching <productname>PostgreSQL</productname> releases prior to 8.4 + when the <varname>DateStyle</varname> + parameter was set to non-<literal>ISO</literal> output. + The value <literal>iso_8601</literal> will produce output matching the time + interval <quote>format with designators</quote> defined in section 4.4.3.2 of ISO 8601. </para> <para> - The <varname>IntervalStyle</> parameter also affects the + The <varname>IntervalStyle</varname> parameter also affects the interpretation of ambiguous interval input. See <xref linkend="datatype-interval-input"> for more information. </para> @@ -6796,15 +6796,15 @@ SET XML OPTION { DOCUMENT | CONTENT }; <varlistentry id="guc-timezone" xreflabel="TimeZone"> <term><varname>TimeZone</varname> (<type>string</type>) <indexterm> - <primary><varname>TimeZone</> configuration parameter</primary> + <primary><varname>TimeZone</varname> configuration parameter</primary> </indexterm> - <indexterm><primary>time zone</></> + <indexterm><primary>time zone</primary></indexterm> </term> <listitem> <para> Sets the time zone for displaying and interpreting time stamps. - The built-in default is <literal>GMT</>, but that is typically - overridden in <filename>postgresql.conf</>; <application>initdb</> + The built-in default is <literal>GMT</literal>, but that is typically + overridden in <filename>postgresql.conf</filename>; <application>initdb</application> will install a setting there corresponding to its system environment. See <xref linkend="datatype-timezones"> for more information. </para> @@ -6814,14 +6814,14 @@ SET XML OPTION { DOCUMENT | CONTENT }; <varlistentry id="guc-timezone-abbreviations" xreflabel="timezone_abbreviations"> <term><varname>timezone_abbreviations</varname> (<type>string</type>) <indexterm> - <primary><varname>timezone_abbreviations</> configuration parameter</primary> + <primary><varname>timezone_abbreviations</varname> configuration parameter</primary> </indexterm> - <indexterm><primary>time zone names</></> + <indexterm><primary>time zone names</primary></indexterm> </term> <listitem> <para> Sets the collection of time zone abbreviations that will be accepted - by the server for datetime input. The default is <literal>'Default'</>, + by the server for datetime input. The default is <literal>'Default'</literal>, which is a collection that works in most of the world; there are also <literal>'Australia'</literal> and <literal>'India'</literal>, and other collections can be defined for a particular installation. @@ -6840,15 +6840,15 @@ SET XML OPTION { DOCUMENT | CONTENT }; <secondary>display</secondary> </indexterm> <indexterm> - <primary><varname>extra_float_digits</> configuration parameter</primary> + <primary><varname>extra_float_digits</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> This parameter adjusts the number of digits displayed for - floating-point values, including <type>float4</>, <type>float8</>, + floating-point values, including <type>float4</type>, <type>float8</type>, and geometric data types. The parameter value is added to the - standard number of digits (<literal>FLT_DIG</> or <literal>DBL_DIG</> + standard number of digits (<literal>FLT_DIG</literal> or <literal>DBL_DIG</literal> as appropriate). The value can be set as high as 3, to include partially-significant digits; this is especially useful for dumping float data that needs to be restored exactly. Or it can be set @@ -6861,9 +6861,9 @@ SET XML OPTION { DOCUMENT | CONTENT }; <varlistentry id="guc-client-encoding" xreflabel="client_encoding"> <term><varname>client_encoding</varname> (<type>string</type>) <indexterm> - <primary><varname>client_encoding</> configuration parameter</primary> + <primary><varname>client_encoding</varname> configuration parameter</primary> </indexterm> - <indexterm><primary>character set</></> + <indexterm><primary>character set</primary></indexterm> </term> <listitem> <para> @@ -6878,7 +6878,7 @@ SET XML OPTION { DOCUMENT | CONTENT }; <varlistentry id="guc-lc-messages" xreflabel="lc_messages"> <term><varname>lc_messages</varname> (<type>string</type>) <indexterm> - <primary><varname>lc_messages</> configuration parameter</primary> + <primary><varname>lc_messages</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -6910,7 +6910,7 @@ SET XML OPTION { DOCUMENT | CONTENT }; <varlistentry id="guc-lc-monetary" xreflabel="lc_monetary"> <term><varname>lc_monetary</varname> (<type>string</type>) <indexterm> - <primary><varname>lc_monetary</> configuration parameter</primary> + <primary><varname>lc_monetary</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -6929,7 +6929,7 @@ SET XML OPTION { DOCUMENT | CONTENT }; <varlistentry id="guc-lc-numeric" xreflabel="lc_numeric"> <term><varname>lc_numeric</varname> (<type>string</type>) <indexterm> - <primary><varname>lc_numeric</> configuration parameter</primary> + <primary><varname>lc_numeric</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -6948,7 +6948,7 @@ SET XML OPTION { DOCUMENT | CONTENT }; <varlistentry id="guc-lc-time" xreflabel="lc_time"> <term><varname>lc_time</varname> (<type>string</type>) <indexterm> - <primary><varname>lc_time</> configuration parameter</primary> + <primary><varname>lc_time</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -6967,7 +6967,7 @@ SET XML OPTION { DOCUMENT | CONTENT }; <varlistentry id="guc-default-text-search-config" xreflabel="default_text_search_config"> <term><varname>default_text_search_config</varname> (<type>string</type>) <indexterm> - <primary><varname>default_text_search_config</> configuration parameter</primary> + <primary><varname>default_text_search_config</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -6976,7 +6976,7 @@ SET XML OPTION { DOCUMENT | CONTENT }; of the text search functions that do not have an explicit argument specifying the configuration. See <xref linkend="textsearch"> for further information. - The built-in default is <literal>pg_catalog.simple</>, but + The built-in default is <literal>pg_catalog.simple</literal>, but <application>initdb</application> will initialize the configuration file with a setting that corresponds to the chosen <varname>lc_ctype</varname> locale, if a configuration @@ -6997,8 +6997,8 @@ SET XML OPTION { DOCUMENT | CONTENT }; server, in order to load additional functionality or achieve performance benefits. For example, a setting of <literal>'$libdir/mylib'</literal> would cause - <literal>mylib.so</> (or on some platforms, - <literal>mylib.sl</>) to be preloaded from the installation's standard + <literal>mylib.so</literal> (or on some platforms, + <literal>mylib.sl</literal>) to be preloaded from the installation's standard library directory. The differences between the settings are when they take effect and what privileges are required to change them. </para> @@ -7007,14 +7007,14 @@ SET XML OPTION { DOCUMENT | CONTENT }; <productname>PostgreSQL</productname> procedural language libraries can be preloaded in this way, typically by using the syntax <literal>'$libdir/plXXX'</literal> where - <literal>XXX</literal> is <literal>pgsql</>, <literal>perl</>, - <literal>tcl</>, or <literal>python</>. + <literal>XXX</literal> is <literal>pgsql</literal>, <literal>perl</literal>, + <literal>tcl</literal>, or <literal>python</literal>. </para> <para> Only shared libraries specifically intended to be used with PostgreSQL can be loaded this way. Every PostgreSQL-supported library has - a <quote>magic block</> that is checked to guarantee compatibility. For + a <quote>magic block</quote> that is checked to guarantee compatibility. For this reason, non-PostgreSQL libraries cannot be loaded in this way. You might be able to use operating-system facilities such as <envar>LD_PRELOAD</envar> for that. @@ -7029,10 +7029,10 @@ SET XML OPTION { DOCUMENT | CONTENT }; <varlistentry id="guc-local-preload-libraries" xreflabel="local_preload_libraries"> <term><varname>local_preload_libraries</varname> (<type>string</type>) <indexterm> - <primary><varname>local_preload_libraries</> configuration parameter</primary> + <primary><varname>local_preload_libraries</varname> configuration parameter</primary> </indexterm> <indexterm> - <primary><filename>$libdir/plugins</></primary> + <primary><filename>$libdir/plugins</filename></primary> </indexterm> </term> <listitem> @@ -7051,10 +7051,10 @@ SET XML OPTION { DOCUMENT | CONTENT }; <para> This option can be set by any user. Because of that, the libraries that can be loaded are restricted to those appearing in the - <filename>plugins</> subdirectory of the installation's + <filename>plugins</filename> subdirectory of the installation's standard library directory. (It is the database administrator's - responsibility to ensure that only <quote>safe</> libraries - are installed there.) Entries in <varname>local_preload_libraries</> + responsibility to ensure that only <quote>safe</quote> libraries + are installed there.) Entries in <varname>local_preload_libraries</varname> can specify this directory explicitly, for example <literal>$libdir/plugins/mylib</literal>, or just specify the library name — <literal>mylib</literal> would have @@ -7064,11 +7064,11 @@ SET XML OPTION { DOCUMENT | CONTENT }; <para> The intent of this feature is to allow unprivileged users to load debugging or performance-measurement libraries into specific sessions - without requiring an explicit <command>LOAD</> command. To that end, + without requiring an explicit <command>LOAD</command> command. To that end, it would be typical to set this parameter using the <envar>PGOPTIONS</envar> environment variable on the client or by using - <command>ALTER ROLE SET</>. + <command>ALTER ROLE SET</command>. </para> <para> @@ -7083,7 +7083,7 @@ SET XML OPTION { DOCUMENT | CONTENT }; <varlistentry id="guc-session-preload-libraries" xreflabel="session_preload_libraries"> <term><varname>session_preload_libraries</varname> (<type>string</type>) <indexterm> - <primary><varname>session_preload_libraries</> configuration parameter</primary> + <primary><varname>session_preload_libraries</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -7104,10 +7104,10 @@ SET XML OPTION { DOCUMENT | CONTENT }; The intent of this feature is to allow debugging or performance-measurement libraries to be loaded into specific sessions without an explicit - <command>LOAD</> command being given. For + <command>LOAD</command> command being given. For example, <xref linkend="auto-explain"> could be enabled for all sessions under a given user name by setting this parameter - with <command>ALTER ROLE SET</>. Also, this parameter can be changed + with <command>ALTER ROLE SET</command>. Also, this parameter can be changed without restarting the server (but changes only take effect when a new session is started), so it is easier to add new modules this way, even if they should apply to all sessions. @@ -7125,7 +7125,7 @@ SET XML OPTION { DOCUMENT | CONTENT }; <varlistentry id="guc-shared-preload-libraries" xreflabel="shared_preload_libraries"> <term><varname>shared_preload_libraries</varname> (<type>string</type>) <indexterm> - <primary><varname>shared_preload_libraries</> configuration parameter</primary> + <primary><varname>shared_preload_libraries</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -7182,9 +7182,9 @@ SET XML OPTION { DOCUMENT | CONTENT }; <varlistentry id="guc-dynamic-library-path" xreflabel="dynamic_library_path"> <term><varname>dynamic_library_path</varname> (<type>string</type>) <indexterm> - <primary><varname>dynamic_library_path</> configuration parameter</primary> + <primary><varname>dynamic_library_path</varname> configuration parameter</primary> </indexterm> - <indexterm><primary>dynamic loading</></> + <indexterm><primary>dynamic loading</primary></indexterm> </term> <listitem> <para> @@ -7236,7 +7236,7 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' <varlistentry id="guc-gin-fuzzy-search-limit" xreflabel="gin_fuzzy_search_limit"> <term><varname>gin_fuzzy_search_limit</varname> (<type>integer</type>) <indexterm> - <primary><varname>gin_fuzzy_search_limit</> configuration parameter</primary> + <primary><varname>gin_fuzzy_search_limit</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -7267,7 +7267,7 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' <secondary>deadlock</secondary> </indexterm> <indexterm> - <primary><varname>deadlock_timeout</> configuration parameter</primary> + <primary><varname>deadlock_timeout</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -7280,7 +7280,7 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' just wait on the lock for a while before checking for a deadlock. Increasing this value reduces the amount of time wasted in needless deadlock checks, but slows down reporting of - real deadlock errors. The default is one second (<literal>1s</>), + real deadlock errors. The default is one second (<literal>1s</literal>), which is probably about the smallest value you would want in practice. On a heavily loaded server you might want to raise it. Ideally the setting should exceed your typical transaction time, @@ -7302,7 +7302,7 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' <varlistentry id="guc-max-locks-per-transaction" xreflabel="max_locks_per_transaction"> <term><varname>max_locks_per_transaction</varname> (<type>integer</type>) <indexterm> - <primary><varname>max_locks_per_transaction</> configuration parameter</primary> + <primary><varname>max_locks_per_transaction</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -7315,7 +7315,7 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' any one time. This parameter controls the average number of object locks allocated for each transaction; individual transactions can lock more objects as long as the locks of all transactions - fit in the lock table. This is <emphasis>not</> the number of + fit in the lock table. This is <emphasis>not</emphasis> the number of rows that can be locked; that value is unlimited. The default, 64, has historically proven sufficient, but you might need to raise this value if you have queries that touch many different @@ -7334,7 +7334,7 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' <varlistentry id="guc-max-pred-locks-per-transaction" xreflabel="max_pred_locks_per_transaction"> <term><varname>max_pred_locks_per_transaction</varname> (<type>integer</type>) <indexterm> - <primary><varname>max_pred_locks_per_transaction</> configuration parameter</primary> + <primary><varname>max_pred_locks_per_transaction</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -7347,7 +7347,7 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' any one time. This parameter controls the average number of object locks allocated for each transaction; individual transactions can lock more objects as long as the locks of all transactions - fit in the lock table. This is <emphasis>not</> the number of + fit in the lock table. This is <emphasis>not</emphasis> the number of rows that can be locked; that value is unlimited. The default, 64, has generally been sufficient in testing, but you might need to raise this value if you have clients that touch many different @@ -7360,7 +7360,7 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' <varlistentry id="guc-max-pred-locks-per-relation" xreflabel="max_pred_locks_per_relation"> <term><varname>max_pred_locks_per_relation</varname> (<type>integer</type>) <indexterm> - <primary><varname>max_pred_locks_per_relation</> configuration parameter</primary> + <primary><varname>max_pred_locks_per_relation</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -7371,8 +7371,8 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' limit, while negative values mean <xref linkend="guc-max-pred-locks-per-transaction"> divided by the absolute value of this setting. The default is -2, which keeps - the behavior from previous versions of <productname>PostgreSQL</>. - This parameter can only be set in the <filename>postgresql.conf</> + the behavior from previous versions of <productname>PostgreSQL</productname>. + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. </para> </listitem> @@ -7381,7 +7381,7 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' <varlistentry id="guc-max-pred-locks-per-page" xreflabel="max_pred_locks_per_page"> <term><varname>max_pred_locks_per_page</varname> (<type>integer</type>) <indexterm> - <primary><varname>max_pred_locks_per_page</> configuration parameter</primary> + <primary><varname>max_pred_locks_per_page</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -7389,7 +7389,7 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' This controls how many rows on a single page can be predicate-locked before the lock is promoted to covering the whole page. The default is 2. This parameter can only be set in - the <filename>postgresql.conf</> file or on the server command line. + the <filename>postgresql.conf</filename> file or on the server command line. </para> </listitem> </varlistentry> @@ -7408,62 +7408,62 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' <varlistentry id="guc-array-nulls" xreflabel="array_nulls"> <term><varname>array_nulls</varname> (<type>boolean</type>) <indexterm> - <primary><varname>array_nulls</> configuration parameter</primary> + <primary><varname>array_nulls</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> This controls whether the array input parser recognizes - unquoted <literal>NULL</> as specifying a null array element. - By default, this is <literal>on</>, allowing array values containing - null values to be entered. However, <productname>PostgreSQL</> versions + unquoted <literal>NULL</literal> as specifying a null array element. + By default, this is <literal>on</literal>, allowing array values containing + null values to be entered. However, <productname>PostgreSQL</productname> versions before 8.2 did not support null values in arrays, and therefore would - treat <literal>NULL</> as specifying a normal array element with - the string value <quote>NULL</>. For backward compatibility with + treat <literal>NULL</literal> as specifying a normal array element with + the string value <quote>NULL</quote>. For backward compatibility with applications that require the old behavior, this variable can be - turned <literal>off</>. + turned <literal>off</literal>. </para> <para> Note that it is possible to create array values containing null values - even when this variable is <literal>off</>. + even when this variable is <literal>off</literal>. </para> </listitem> </varlistentry> <varlistentry id="guc-backslash-quote" xreflabel="backslash_quote"> <term><varname>backslash_quote</varname> (<type>enum</type>) - <indexterm><primary>strings</><secondary>backslash quotes</></> + <indexterm><primary>strings</primary><secondary>backslash quotes</secondary></indexterm> <indexterm> - <primary><varname>backslash_quote</> configuration parameter</primary> + <primary><varname>backslash_quote</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> This controls whether a quote mark can be represented by - <literal>\'</> in a string literal. The preferred, SQL-standard way - to represent a quote mark is by doubling it (<literal>''</>) but - <productname>PostgreSQL</> has historically also accepted - <literal>\'</>. However, use of <literal>\'</> creates security risks + <literal>\'</literal> in a string literal. The preferred, SQL-standard way + to represent a quote mark is by doubling it (<literal>''</literal>) but + <productname>PostgreSQL</productname> has historically also accepted + <literal>\'</literal>. However, use of <literal>\'</literal> creates security risks because in some client character set encodings, there are multibyte characters in which the last byte is numerically equivalent to ASCII - <literal>\</>. If client-side code does escaping incorrectly then a + <literal>\</literal>. If client-side code does escaping incorrectly then a SQL-injection attack is possible. This risk can be prevented by making the server reject queries in which a quote mark appears to be escaped by a backslash. - The allowed values of <varname>backslash_quote</> are - <literal>on</> (allow <literal>\'</> always), - <literal>off</> (reject always), and - <literal>safe_encoding</> (allow only if client encoding does not - allow ASCII <literal>\</> within a multibyte character). - <literal>safe_encoding</> is the default setting. + The allowed values of <varname>backslash_quote</varname> are + <literal>on</literal> (allow <literal>\'</literal> always), + <literal>off</literal> (reject always), and + <literal>safe_encoding</literal> (allow only if client encoding does not + allow ASCII <literal>\</literal> within a multibyte character). + <literal>safe_encoding</literal> is the default setting. </para> <para> - Note that in a standard-conforming string literal, <literal>\</> just - means <literal>\</> anyway. This parameter only affects the handling of + Note that in a standard-conforming string literal, <literal>\</literal> just + means <literal>\</literal> anyway. This parameter only affects the handling of non-standard-conforming literals, including - escape string syntax (<literal>E'...'</>). + escape string syntax (<literal>E'...'</literal>). </para> </listitem> </varlistentry> @@ -7471,7 +7471,7 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' <varlistentry id="guc-default-with-oids" xreflabel="default_with_oids"> <term><varname>default_with_oids</varname> (<type>boolean</type>) <indexterm> - <primary><varname>default_with_oids</> configuration parameter</primary> + <primary><varname>default_with_oids</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -7481,9 +7481,9 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' newly-created tables, if neither <literal>WITH OIDS</literal> nor <literal>WITHOUT OIDS</literal> is specified. It also determines whether OIDs will be included in tables created by - <command>SELECT INTO</command>. The parameter is <literal>off</> - by default; in <productname>PostgreSQL</> 8.0 and earlier, it - was <literal>on</> by default. + <command>SELECT INTO</command>. The parameter is <literal>off</literal> + by default; in <productname>PostgreSQL</productname> 8.0 and earlier, it + was <literal>on</literal> by default. </para> <para> @@ -7499,21 +7499,21 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' <varlistentry id="guc-escape-string-warning" xreflabel="escape_string_warning"> <term><varname>escape_string_warning</varname> (<type>boolean</type>) - <indexterm><primary>strings</><secondary>escape warning</></> + <indexterm><primary>strings</primary><secondary>escape warning</secondary></indexterm> <indexterm> - <primary><varname>escape_string_warning</> configuration parameter</primary> + <primary><varname>escape_string_warning</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> - When on, a warning is issued if a backslash (<literal>\</>) - appears in an ordinary string literal (<literal>'...'</> + When on, a warning is issued if a backslash (<literal>\</literal>) + appears in an ordinary string literal (<literal>'...'</literal> syntax) and <varname>standard_conforming_strings</varname> is off. - The default is <literal>on</>. + The default is <literal>on</literal>. </para> <para> Applications that wish to use backslash as escape should be - modified to use escape string syntax (<literal>E'...'</>), + modified to use escape string syntax (<literal>E'...'</literal>), because the default behavior of ordinary strings is now to treat backslash as an ordinary character, per SQL standard. This variable can be enabled to help locate code that needs to be changed. @@ -7524,22 +7524,22 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' <varlistentry id="guc-lo-compat-privileges" xreflabel="lo_compat_privileges"> <term><varname>lo_compat_privileges</varname> (<type>boolean</type>) <indexterm> - <primary><varname>lo_compat_privileges</> configuration parameter</primary> + <primary><varname>lo_compat_privileges</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> - In <productname>PostgreSQL</> releases prior to 9.0, large objects + In <productname>PostgreSQL</productname> releases prior to 9.0, large objects did not have access privileges and were, therefore, always readable - and writable by all users. Setting this variable to <literal>on</> + and writable by all users. Setting this variable to <literal>on</literal> disables the new privilege checks, for compatibility with prior - releases. The default is <literal>off</>. + releases. The default is <literal>off</literal>. Only superusers can change this setting. </para> <para> Setting this variable does not disable all security checks related to large objects — only those for which the default behavior has - changed in <productname>PostgreSQL</> 9.0. + changed in <productname>PostgreSQL</productname> 9.0. For example, <literal>lo_import()</literal> and <literal>lo_export()</literal> need superuser privileges regardless of this setting. @@ -7550,18 +7550,18 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' <varlistentry id="guc-operator-precedence-warning" xreflabel="operator_precedence_warning"> <term><varname>operator_precedence_warning</varname> (<type>boolean</type>) <indexterm> - <primary><varname>operator_precedence_warning</> configuration parameter</primary> + <primary><varname>operator_precedence_warning</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> When on, the parser will emit a warning for any construct that might - have changed meanings since <productname>PostgreSQL</> 9.4 as a result + have changed meanings since <productname>PostgreSQL</productname> 9.4 as a result of changes in operator precedence. This is useful for auditing applications to see if precedence changes have broken anything; but it is not meant to be kept turned on in production, since it will warn about some perfectly valid, standard-compliant SQL code. - The default is <literal>off</>. + The default is <literal>off</literal>. </para> <para> @@ -7573,15 +7573,15 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' <varlistentry id="guc-quote-all-identifiers" xreflabel="quote-all-identifiers"> <term><varname>quote_all_identifiers</varname> (<type>boolean</type>) <indexterm> - <primary><varname>quote_all_identifiers</> configuration parameter</primary> + <primary><varname>quote_all_identifiers</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> When the database generates SQL, force all identifiers to be quoted, even if they are not (currently) keywords. This will affect the - output of <command>EXPLAIN</> as well as the results of functions - like <function>pg_get_viewdef</>. See also the + output of <command>EXPLAIN</command> as well as the results of functions + like <function>pg_get_viewdef</function>. See also the <option>--quote-all-identifiers</option> option of <xref linkend="app-pgdump"> and <xref linkend="app-pg-dumpall">. </para> @@ -7590,22 +7590,22 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' <varlistentry id="guc-standard-conforming-strings" xreflabel="standard_conforming_strings"> <term><varname>standard_conforming_strings</varname> (<type>boolean</type>) - <indexterm><primary>strings</><secondary>standard conforming</></> + <indexterm><primary>strings</primary><secondary>standard conforming</secondary></indexterm> <indexterm> - <primary><varname>standard_conforming_strings</> configuration parameter</primary> + <primary><varname>standard_conforming_strings</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> This controls whether ordinary string literals - (<literal>'...'</>) treat backslashes literally, as specified in + (<literal>'...'</literal>) treat backslashes literally, as specified in the SQL standard. Beginning in <productname>PostgreSQL</productname> 9.1, the default is - <literal>on</> (prior releases defaulted to <literal>off</>). + <literal>on</literal> (prior releases defaulted to <literal>off</literal>). Applications can check this parameter to determine how string literals will be processed. The presence of this parameter can also be taken as an indication - that the escape string syntax (<literal>E'...'</>) is supported. + that the escape string syntax (<literal>E'...'</literal>) is supported. Escape string syntax (<xref linkend="sql-syntax-strings-escape">) should be used if an application desires backslashes to be treated as escape characters. @@ -7616,7 +7616,7 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' <varlistentry id="guc-synchronize-seqscans" xreflabel="synchronize_seqscans"> <term><varname>synchronize_seqscans</varname> (<type>boolean</type>) <indexterm> - <primary><varname>synchronize_seqscans</> configuration parameter</primary> + <primary><varname>synchronize_seqscans</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -7625,13 +7625,13 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' other, so that concurrent scans read the same block at about the same time and hence share the I/O workload. When this is enabled, a scan might start in the middle of the table and then <quote>wrap - around</> the end to cover all rows, so as to synchronize with the + around</quote> the end to cover all rows, so as to synchronize with the activity of scans already in progress. This can result in unpredictable changes in the row ordering returned by queries that - have no <literal>ORDER BY</> clause. Setting this parameter to - <literal>off</> ensures the pre-8.3 behavior in which a sequential + have no <literal>ORDER BY</literal> clause. Setting this parameter to + <literal>off</literal> ensures the pre-8.3 behavior in which a sequential scan always starts from the beginning of the table. The default - is <literal>on</>. + is <literal>on</literal>. </para> </listitem> </varlistentry> @@ -7645,31 +7645,31 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' <varlistentry id="guc-transform-null-equals" xreflabel="transform_null_equals"> <term><varname>transform_null_equals</varname> (<type>boolean</type>) - <indexterm><primary>IS NULL</></> + <indexterm><primary>IS NULL</primary></indexterm> <indexterm> - <primary><varname>transform_null_equals</> configuration parameter</primary> + <primary><varname>transform_null_equals</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> - When on, expressions of the form <literal><replaceable>expr</> = + When on, expressions of the form <literal><replaceable>expr</replaceable> = NULL</literal> (or <literal>NULL = - <replaceable>expr</></literal>) are treated as - <literal><replaceable>expr</> IS NULL</literal>, that is, they - return true if <replaceable>expr</> evaluates to the null value, + <replaceable>expr</replaceable></literal>) are treated as + <literal><replaceable>expr</replaceable> IS NULL</literal>, that is, they + return true if <replaceable>expr</replaceable> evaluates to the null value, and false otherwise. The correct SQL-spec-compliant behavior of - <literal><replaceable>expr</> = NULL</literal> is to always + <literal><replaceable>expr</replaceable> = NULL</literal> is to always return null (unknown). Therefore this parameter defaults to - <literal>off</>. + <literal>off</literal>. </para> <para> However, filtered forms in <productname>Microsoft Access</productname> generate queries that appear to use - <literal><replaceable>expr</> = NULL</literal> to test for + <literal><replaceable>expr</replaceable> = NULL</literal> to test for null values, so if you use that interface to access the database you might want to turn this option on. Since expressions of the - form <literal><replaceable>expr</> = NULL</literal> always + form <literal><replaceable>expr</replaceable> = NULL</literal> always return the null value (using the SQL standard interpretation), they are not very useful and do not appear often in normal applications so this option does little harm in practice. But new users are @@ -7678,7 +7678,7 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' </para> <para> - Note that this option only affects the exact form <literal>= NULL</>, + Note that this option only affects the exact form <literal>= NULL</literal>, not other comparison operators or other expressions that are computationally equivalent to some expression involving the equals operator (such as <literal>IN</literal>). @@ -7703,7 +7703,7 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' <varlistentry id="guc-exit-on-error" xreflabel="exit_on_error"> <term><varname>exit_on_error</varname> (<type>boolean</type>) <indexterm> - <primary><varname>exit_on_error</> configuration parameter</primary> + <primary><varname>exit_on_error</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -7718,16 +7718,16 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' <varlistentry id="guc-restart-after-crash" xreflabel="restart_after_crash"> <term><varname>restart_after_crash</varname> (<type>boolean</type>) <indexterm> - <primary><varname>restart_after_crash</> configuration parameter</primary> + <primary><varname>restart_after_crash</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> - When set to true, which is the default, <productname>PostgreSQL</> + When set to true, which is the default, <productname>PostgreSQL</productname> will automatically reinitialize after a backend crash. Leaving this value set to true is normally the best way to maximize the availability of the database. However, in some circumstances, such as when - <productname>PostgreSQL</> is being invoked by clusterware, it may be + <productname>PostgreSQL</productname> is being invoked by clusterware, it may be useful to disable the restart so that the clusterware can gain control and take any actions it deems appropriate. </para> @@ -7742,10 +7742,10 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' <title>Preset Options</title> <para> - The following <quote>parameters</> are read-only, and are determined + The following <quote>parameters</quote> are read-only, and are determined when <productname>PostgreSQL</productname> is compiled or when it is installed. As such, they have been excluded from the sample - <filename>postgresql.conf</> file. These options report + <filename>postgresql.conf</filename> file. These options report various aspects of <productname>PostgreSQL</productname> behavior that might be of interest to certain applications, particularly administrative front-ends. @@ -7756,13 +7756,13 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' <varlistentry id="guc-block-size" xreflabel="block_size"> <term><varname>block_size</varname> (<type>integer</type>) <indexterm> - <primary><varname>block_size</> configuration parameter</primary> + <primary><varname>block_size</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Reports the size of a disk block. It is determined by the value - of <literal>BLCKSZ</> when building the server. The default + of <literal>BLCKSZ</literal> when building the server. The default value is 8192 bytes. The meaning of some configuration variables (such as <xref linkend="guc-shared-buffers">) is influenced by <varname>block_size</varname>. See <xref @@ -7774,7 +7774,7 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' <varlistentry id="guc-data-checksums" xreflabel="data_checksums"> <term><varname>data_checksums</varname> (<type>boolean</type>) <indexterm> - <primary><varname>data_checksums</> configuration parameter</primary> + <primary><varname>data_checksums</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -7788,7 +7788,7 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' <varlistentry id="guc-debug-assertions" xreflabel="debug_assertions"> <term><varname>debug_assertions</varname> (<type>boolean</type>) <indexterm> - <primary><varname>debug_assertions</> configuration parameter</primary> + <primary><varname>debug_assertions</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -7808,13 +7808,13 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' <varlistentry id="guc-integer-datetimes" xreflabel="integer_datetimes"> <term><varname>integer_datetimes</varname> (<type>boolean</type>) <indexterm> - <primary><varname>integer_datetimes</> configuration parameter</primary> + <primary><varname>integer_datetimes</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> - Reports whether <productname>PostgreSQL</> was built with support for - 64-bit-integer dates and times. As of <productname>PostgreSQL</> 10, + Reports whether <productname>PostgreSQL</productname> was built with support for + 64-bit-integer dates and times. As of <productname>PostgreSQL</productname> 10, this is always <literal>on</literal>. </para> </listitem> @@ -7823,7 +7823,7 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' <varlistentry id="guc-lc-collate" xreflabel="lc_collate"> <term><varname>lc_collate</varname> (<type>string</type>) <indexterm> - <primary><varname>lc_collate</> configuration parameter</primary> + <primary><varname>lc_collate</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -7838,7 +7838,7 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' <varlistentry id="guc-lc-ctype" xreflabel="lc_ctype"> <term><varname>lc_ctype</varname> (<type>string</type>) <indexterm> - <primary><varname>lc_ctype</> configuration parameter</primary> + <primary><varname>lc_ctype</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -7855,13 +7855,13 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' <varlistentry id="guc-max-function-args" xreflabel="max_function_args"> <term><varname>max_function_args</varname> (<type>integer</type>) <indexterm> - <primary><varname>max_function_args</> configuration parameter</primary> + <primary><varname>max_function_args</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Reports the maximum number of function arguments. It is determined by - the value of <literal>FUNC_MAX_ARGS</> when building the server. The + the value of <literal>FUNC_MAX_ARGS</literal> when building the server. The default value is 100 arguments. </para> </listitem> @@ -7870,14 +7870,14 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' <varlistentry id="guc-max-identifier-length" xreflabel="max_identifier_length"> <term><varname>max_identifier_length</varname> (<type>integer</type>) <indexterm> - <primary><varname>max_identifier_length</> configuration parameter</primary> + <primary><varname>max_identifier_length</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Reports the maximum identifier length. It is determined as one - less than the value of <literal>NAMEDATALEN</> when building - the server. The default value of <literal>NAMEDATALEN</> is + less than the value of <literal>NAMEDATALEN</literal> when building + the server. The default value of <literal>NAMEDATALEN</literal> is 64; therefore the default <varname>max_identifier_length</varname> is 63 bytes, which can be less than 63 characters when using multibyte encodings. @@ -7888,13 +7888,13 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' <varlistentry id="guc-max-index-keys" xreflabel="max_index_keys"> <term><varname>max_index_keys</varname> (<type>integer</type>) <indexterm> - <primary><varname>max_index_keys</> configuration parameter</primary> + <primary><varname>max_index_keys</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Reports the maximum number of index keys. It is determined by - the value of <literal>INDEX_MAX_KEYS</> when building the server. The + the value of <literal>INDEX_MAX_KEYS</literal> when building the server. The default value is 32 keys. </para> </listitem> @@ -7903,16 +7903,16 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' <varlistentry id="guc-segment-size" xreflabel="segment_size"> <term><varname>segment_size</varname> (<type>integer</type>) <indexterm> - <primary><varname>segment_size</> configuration parameter</primary> + <primary><varname>segment_size</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Reports the number of blocks (pages) that can be stored within a file - segment. It is determined by the value of <literal>RELSEG_SIZE</> + segment. It is determined by the value of <literal>RELSEG_SIZE</literal> when building the server. The maximum size of a segment file in bytes - is equal to <varname>segment_size</> multiplied by - <varname>block_size</>; by default this is 1GB. + is equal to <varname>segment_size</varname> multiplied by + <varname>block_size</varname>; by default this is 1GB. </para> </listitem> </varlistentry> @@ -7920,9 +7920,9 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' <varlistentry id="guc-server-encoding" xreflabel="server_encoding"> <term><varname>server_encoding</varname> (<type>string</type>) <indexterm> - <primary><varname>server_encoding</> configuration parameter</primary> + <primary><varname>server_encoding</varname> configuration parameter</primary> </indexterm> - <indexterm><primary>character set</></> + <indexterm><primary>character set</primary></indexterm> </term> <listitem> <para> @@ -7937,13 +7937,13 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' <varlistentry id="guc-server-version" xreflabel="server_version"> <term><varname>server_version</varname> (<type>string</type>) <indexterm> - <primary><varname>server_version</> configuration parameter</primary> + <primary><varname>server_version</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Reports the version number of the server. It is determined by the - value of <literal>PG_VERSION</> when building the server. + value of <literal>PG_VERSION</literal> when building the server. </para> </listitem> </varlistentry> @@ -7951,13 +7951,13 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' <varlistentry id="guc-server-version-num" xreflabel="server_version_num"> <term><varname>server_version_num</varname> (<type>integer</type>) <indexterm> - <primary><varname>server_version_num</> configuration parameter</primary> + <primary><varname>server_version_num</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Reports the version number of the server as an integer. It is determined - by the value of <literal>PG_VERSION_NUM</> when building the server. + by the value of <literal>PG_VERSION_NUM</literal> when building the server. </para> </listitem> </varlistentry> @@ -7965,13 +7965,13 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' <varlistentry id="guc-wal-block-size" xreflabel="wal_block_size"> <term><varname>wal_block_size</varname> (<type>integer</type>) <indexterm> - <primary><varname>wal_block_size</> configuration parameter</primary> + <primary><varname>wal_block_size</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Reports the size of a WAL disk block. It is determined by the value - of <literal>XLOG_BLCKSZ</> when building the server. The default value + of <literal>XLOG_BLCKSZ</literal> when building the server. The default value is 8192 bytes. </para> </listitem> @@ -7980,14 +7980,14 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' <varlistentry id="guc-wal-segment-size" xreflabel="wal_segment_size"> <term><varname>wal_segment_size</varname> (<type>integer</type>) <indexterm> - <primary><varname>wal_segment_size</> configuration parameter</primary> + <primary><varname>wal_segment_size</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Reports the number of blocks (pages) in a WAL segment file. The total size of a WAL segment file in bytes is equal to - <varname>wal_segment_size</> multiplied by <varname>wal_block_size</>; + <varname>wal_segment_size</varname> multiplied by <varname>wal_block_size</varname>; by default this is 16MB. See <xref linkend="wal-configuration"> for more information. </para> @@ -8010,12 +8010,12 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' <para> Custom options have two-part names: an extension name, then a dot, then the parameter name proper, much like qualified names in SQL. An example - is <literal>plpgsql.variable_conflict</>. + is <literal>plpgsql.variable_conflict</literal>. </para> <para> Because custom options may need to be set in processes that have not - loaded the relevant extension module, <productname>PostgreSQL</> + loaded the relevant extension module, <productname>PostgreSQL</productname> will accept a setting for any two-part parameter name. Such variables are treated as placeholders and have no function until the module that defines them is loaded. When an extension module is loaded, it will add @@ -8034,7 +8034,7 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' to assist with recovery of severely damaged databases. There should be no reason to use them on a production database. As such, they have been excluded from the sample - <filename>postgresql.conf</> file. Note that many of these + <filename>postgresql.conf</filename> file. Note that many of these parameters require special source compilation flags to work at all. </para> @@ -8073,7 +8073,7 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' <varlistentry id="guc-post-auth-delay" xreflabel="post_auth_delay"> <term><varname>post_auth_delay</varname> (<type>integer</type>) <indexterm> - <primary><varname>post_auth_delay</> configuration parameter</primary> + <primary><varname>post_auth_delay</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -8090,7 +8090,7 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' <varlistentry id="guc-pre-auth-delay" xreflabel="pre_auth_delay"> <term><varname>pre_auth_delay</varname> (<type>integer</type>) <indexterm> - <primary><varname>pre_auth_delay</> configuration parameter</primary> + <primary><varname>pre_auth_delay</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -8100,7 +8100,7 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' authentication procedure. This is intended to give developers an opportunity to attach to the server process with a debugger to trace down misbehavior in authentication. - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. </para> </listitem> @@ -8109,7 +8109,7 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' <varlistentry id="guc-trace-notify" xreflabel="trace_notify"> <term><varname>trace_notify</varname> (<type>boolean</type>) <indexterm> - <primary><varname>trace_notify</> configuration parameter</primary> + <primary><varname>trace_notify</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -8127,7 +8127,7 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' <varlistentry id="guc-trace-recovery-messages" xreflabel="trace_recovery_messages"> <term><varname>trace_recovery_messages</varname> (<type>enum</type>) <indexterm> - <primary><varname>trace_recovery_messages</> configuration parameter</primary> + <primary><varname>trace_recovery_messages</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -8136,15 +8136,15 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' would not be logged. This parameter allows the user to override the normal setting of <xref linkend="guc-log-min-messages">, but only for specific messages. This is intended for use in debugging Hot Standby. - Valid values are <literal>DEBUG5</>, <literal>DEBUG4</>, - <literal>DEBUG3</>, <literal>DEBUG2</>, <literal>DEBUG1</>, and - <literal>LOG</>. The default, <literal>LOG</>, does not affect + Valid values are <literal>DEBUG5</literal>, <literal>DEBUG4</literal>, + <literal>DEBUG3</literal>, <literal>DEBUG2</literal>, <literal>DEBUG1</literal>, and + <literal>LOG</literal>. The default, <literal>LOG</literal>, does not affect logging decisions at all. The other values cause recovery-related debug messages of that priority or higher to be logged as though they - had <literal>LOG</> priority; for common settings of - <varname>log_min_messages</> this results in unconditionally sending + had <literal>LOG</literal> priority; for common settings of + <varname>log_min_messages</varname> this results in unconditionally sending them to the server log. - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. </para> </listitem> @@ -8153,7 +8153,7 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' <varlistentry id="guc-trace-sort" xreflabel="trace_sort"> <term><varname>trace_sort</varname> (<type>boolean</type>) <indexterm> - <primary><varname>trace_sort</> configuration parameter</primary> + <primary><varname>trace_sort</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -8169,7 +8169,7 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' <varlistentry> <term><varname>trace_locks</varname> (<type>boolean</type>) <indexterm> - <primary><varname>trace_locks</> configuration parameter</primary> + <primary><varname>trace_locks</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -8210,7 +8210,7 @@ LOG: CleanUpLock: deleting: lock(0xb7acd844) id(24688,24696,0,0,0,1) <varlistentry> <term><varname>trace_lwlocks</varname> (<type>boolean</type>) <indexterm> - <primary><varname>trace_lwlocks</> configuration parameter</primary> + <primary><varname>trace_lwlocks</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -8230,7 +8230,7 @@ LOG: CleanUpLock: deleting: lock(0xb7acd844) id(24688,24696,0,0,0,1) <varlistentry> <term><varname>trace_userlocks</varname> (<type>boolean</type>) <indexterm> - <primary><varname>trace_userlocks</> configuration parameter</primary> + <primary><varname>trace_userlocks</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -8249,7 +8249,7 @@ LOG: CleanUpLock: deleting: lock(0xb7acd844) id(24688,24696,0,0,0,1) <varlistentry> <term><varname>trace_lock_oidmin</varname> (<type>integer</type>) <indexterm> - <primary><varname>trace_lock_oidmin</> configuration parameter</primary> + <primary><varname>trace_lock_oidmin</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -8268,7 +8268,7 @@ LOG: CleanUpLock: deleting: lock(0xb7acd844) id(24688,24696,0,0,0,1) <varlistentry> <term><varname>trace_lock_table</varname> (<type>integer</type>) <indexterm> - <primary><varname>trace_lock_table</> configuration parameter</primary> + <primary><varname>trace_lock_table</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -8286,7 +8286,7 @@ LOG: CleanUpLock: deleting: lock(0xb7acd844) id(24688,24696,0,0,0,1) <varlistentry> <term><varname>debug_deadlocks</varname> (<type>boolean</type>) <indexterm> - <primary><varname>debug_deadlocks</> configuration parameter</primary> + <primary><varname>debug_deadlocks</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -8305,7 +8305,7 @@ LOG: CleanUpLock: deleting: lock(0xb7acd844) id(24688,24696,0,0,0,1) <varlistentry> <term><varname>log_btree_build_stats</varname> (<type>boolean</type>) <indexterm> - <primary><varname>log_btree_build_stats</> configuration parameter</primary> + <primary><varname>log_btree_build_stats</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -8324,7 +8324,7 @@ LOG: CleanUpLock: deleting: lock(0xb7acd844) id(24688,24696,0,0,0,1) <varlistentry id="guc-wal-consistency-checking" xreflabel="wal_consistency_checking"> <term><varname>wal_consistency_checking</varname> (<type>string</type>) <indexterm> - <primary><varname>wal_consistency_checking</> configuration parameter</primary> + <primary><varname>wal_consistency_checking</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -8344,10 +8344,10 @@ LOG: CleanUpLock: deleting: lock(0xb7acd844) id(24688,24696,0,0,0,1) the feature. It can be set to <literal>all</literal> to check all records, or to a comma-separated list of resource managers to check only records originating from those resource managers. Currently, - the supported resource managers are <literal>heap</>, - <literal>heap2</>, <literal>btree</>, <literal>hash</>, - <literal>gin</>, <literal>gist</>, <literal>sequence</>, - <literal>spgist</>, <literal>brin</>, and <literal>generic</>. Only + the supported resource managers are <literal>heap</literal>, + <literal>heap2</literal>, <literal>btree</literal>, <literal>hash</literal>, + <literal>gin</literal>, <literal>gist</literal>, <literal>sequence</literal>, + <literal>spgist</literal>, <literal>brin</literal>, and <literal>generic</literal>. Only superusers can change this setting. </para> </listitem> @@ -8356,7 +8356,7 @@ LOG: CleanUpLock: deleting: lock(0xb7acd844) id(24688,24696,0,0,0,1) <varlistentry id="guc-wal-debug" xreflabel="wal_debug"> <term><varname>wal_debug</varname> (<type>boolean</type>) <indexterm> - <primary><varname>wal_debug</> configuration parameter</primary> + <primary><varname>wal_debug</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -8372,7 +8372,7 @@ LOG: CleanUpLock: deleting: lock(0xb7acd844) id(24688,24696,0,0,0,1) <varlistentry id="guc-ignore-checksum-failure" xreflabel="ignore_checksum_failure"> <term><varname>ignore_checksum_failure</varname> (<type>boolean</type>) <indexterm> - <primary><varname>ignore_checksum_failure</> configuration parameter</primary> + <primary><varname>ignore_checksum_failure</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -8381,15 +8381,15 @@ LOG: CleanUpLock: deleting: lock(0xb7acd844) id(24688,24696,0,0,0,1) </para> <para> Detection of a checksum failure during a read normally causes - <productname>PostgreSQL</> to report an error, aborting the current - transaction. Setting <varname>ignore_checksum_failure</> to on causes + <productname>PostgreSQL</productname> to report an error, aborting the current + transaction. Setting <varname>ignore_checksum_failure</varname> to on causes the system to ignore the failure (but still report a warning), and continue processing. This behavior may <emphasis>cause crashes, propagate - or hide corruption, or other serious problems</>. However, it may allow + or hide corruption, or other serious problems</emphasis>. However, it may allow you to get past the error and retrieve undamaged tuples that might still be present in the table if the block header is still sane. If the header is corrupt an error will be reported even if this option is enabled. The - default setting is <literal>off</>, and it can only be changed by a superuser. + default setting is <literal>off</literal>, and it can only be changed by a superuser. </para> </listitem> </varlistentry> @@ -8397,16 +8397,16 @@ LOG: CleanUpLock: deleting: lock(0xb7acd844) id(24688,24696,0,0,0,1) <varlistentry id="guc-zero-damaged-pages" xreflabel="zero_damaged_pages"> <term><varname>zero_damaged_pages</varname> (<type>boolean</type>) <indexterm> - <primary><varname>zero_damaged_pages</> configuration parameter</primary> + <primary><varname>zero_damaged_pages</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Detection of a damaged page header normally causes - <productname>PostgreSQL</> to report an error, aborting the current - transaction. Setting <varname>zero_damaged_pages</> to on causes + <productname>PostgreSQL</productname> to report an error, aborting the current + transaction. Setting <varname>zero_damaged_pages</varname> to on causes the system to instead report a warning, zero out the damaged - page in memory, and continue processing. This behavior <emphasis>will destroy data</>, + page in memory, and continue processing. This behavior <emphasis>will destroy data</emphasis>, namely all the rows on the damaged page. However, it does allow you to get past the error and retrieve rows from any undamaged pages that might be present in the table. It is useful for recovering data if @@ -8415,7 +8415,7 @@ LOG: CleanUpLock: deleting: lock(0xb7acd844) id(24688,24696,0,0,0,1) data from the damaged pages of a table. Zeroed-out pages are not forced to disk so it is recommended to recreate the table or the index before turning this parameter off again. The - default setting is <literal>off</>, and it can only be changed + default setting is <literal>off</literal>, and it can only be changed by a superuser. </para> </listitem> @@ -8447,15 +8447,15 @@ LOG: CleanUpLock: deleting: lock(0xb7acd844) id(24688,24696,0,0,0,1) <tbody> <row> <entry><option>-B <replaceable>x</replaceable></option></entry> - <entry><literal>shared_buffers = <replaceable>x</replaceable></></entry> + <entry><literal>shared_buffers = <replaceable>x</replaceable></literal></entry> </row> <row> <entry><option>-d <replaceable>x</replaceable></option></entry> - <entry><literal>log_min_messages = DEBUG<replaceable>x</replaceable></></entry> + <entry><literal>log_min_messages = DEBUG<replaceable>x</replaceable></literal></entry> </row> <row> <entry><option>-e</option></entry> - <entry><literal>datestyle = euro</></entry> + <entry><literal>datestyle = euro</literal></entry> </row> <row> <entry> @@ -8464,69 +8464,69 @@ LOG: CleanUpLock: deleting: lock(0xb7acd844) id(24688,24696,0,0,0,1) <option>-fs</option>, <option>-ft</option> </entry> <entry> - <literal>enable_bitmapscan = off</>, - <literal>enable_hashjoin = off</>, - <literal>enable_indexscan = off</>, - <literal>enable_mergejoin = off</>, - <literal>enable_nestloop = off</>, - <literal>enable_indexonlyscan = off</>, - <literal>enable_seqscan = off</>, - <literal>enable_tidscan = off</> + <literal>enable_bitmapscan = off</literal>, + <literal>enable_hashjoin = off</literal>, + <literal>enable_indexscan = off</literal>, + <literal>enable_mergejoin = off</literal>, + <literal>enable_nestloop = off</literal>, + <literal>enable_indexonlyscan = off</literal>, + <literal>enable_seqscan = off</literal>, + <literal>enable_tidscan = off</literal> </entry> </row> <row> <entry><option>-F</option></entry> - <entry><literal>fsync = off</></entry> + <entry><literal>fsync = off</literal></entry> </row> <row> <entry><option>-h <replaceable>x</replaceable></option></entry> - <entry><literal>listen_addresses = <replaceable>x</replaceable></></entry> + <entry><literal>listen_addresses = <replaceable>x</replaceable></literal></entry> </row> <row> <entry><option>-i</option></entry> - <entry><literal>listen_addresses = '*'</></entry> + <entry><literal>listen_addresses = '*'</literal></entry> </row> <row> <entry><option>-k <replaceable>x</replaceable></option></entry> - <entry><literal>unix_socket_directories = <replaceable>x</replaceable></></entry> + <entry><literal>unix_socket_directories = <replaceable>x</replaceable></literal></entry> </row> <row> <entry><option>-l</option></entry> - <entry><literal>ssl = on</></entry> + <entry><literal>ssl = on</literal></entry> </row> <row> <entry><option>-N <replaceable>x</replaceable></option></entry> - <entry><literal>max_connections = <replaceable>x</replaceable></></entry> + <entry><literal>max_connections = <replaceable>x</replaceable></literal></entry> </row> <row> <entry><option>-O</option></entry> - <entry><literal>allow_system_table_mods = on</></entry> + <entry><literal>allow_system_table_mods = on</literal></entry> </row> <row> <entry><option>-p <replaceable>x</replaceable></option></entry> - <entry><literal>port = <replaceable>x</replaceable></></entry> + <entry><literal>port = <replaceable>x</replaceable></literal></entry> </row> <row> <entry><option>-P</option></entry> - <entry><literal>ignore_system_indexes = on</></entry> + <entry><literal>ignore_system_indexes = on</literal></entry> </row> <row> <entry><option>-s</option></entry> - <entry><literal>log_statement_stats = on</></entry> + <entry><literal>log_statement_stats = on</literal></entry> </row> <row> <entry><option>-S <replaceable>x</replaceable></option></entry> - <entry><literal>work_mem = <replaceable>x</replaceable></></entry> + <entry><literal>work_mem = <replaceable>x</replaceable></literal></entry> </row> <row> <entry><option>-tpa</option>, <option>-tpl</option>, <option>-te</option></entry> - <entry><literal>log_parser_stats = on</>, - <literal>log_planner_stats = on</>, - <literal>log_executor_stats = on</></entry> + <entry><literal>log_parser_stats = on</literal>, + <literal>log_planner_stats = on</literal>, + <literal>log_executor_stats = on</literal></entry> </row> <row> <entry><option>-W <replaceable>x</replaceable></option></entry> - <entry><literal>post_auth_delay = <replaceable>x</replaceable></></entry> + <entry><literal>post_auth_delay = <replaceable>x</replaceable></literal></entry> </row> </tbody> </tgroup> diff --git a/doc/src/sgml/contrib-spi.sgml b/doc/src/sgml/contrib-spi.sgml index 3287c18d27d..32c7105cf64 100644 --- a/doc/src/sgml/contrib-spi.sgml +++ b/doc/src/sgml/contrib-spi.sgml @@ -9,7 +9,7 @@ </indexterm> <para> - The <application>spi</> module provides several workable examples + The <application>spi</application> module provides several workable examples of using SPI and triggers. While these functions are of some value in their own right, they are even more useful as examples to modify for your own purposes. The functions are general enough to be used @@ -26,15 +26,15 @@ <title>refint — Functions for Implementing Referential Integrity</title> <para> - <function>check_primary_key()</> and - <function>check_foreign_key()</> are used to check foreign key constraints. + <function>check_primary_key()</function> and + <function>check_foreign_key()</function> are used to check foreign key constraints. (This functionality is long since superseded by the built-in foreign key mechanism, of course, but the module is still useful as an example.) </para> <para> - <function>check_primary_key()</> checks the referencing table. - To use, create a <literal>BEFORE INSERT OR UPDATE</> trigger using this + <function>check_primary_key()</function> checks the referencing table. + To use, create a <literal>BEFORE INSERT OR UPDATE</literal> trigger using this function on a table referencing another table. Specify as the trigger arguments: the referencing table's column name(s) which form the foreign key, the referenced table name, and the column names in the referenced table @@ -43,14 +43,14 @@ </para> <para> - <function>check_foreign_key()</> checks the referenced table. - To use, create a <literal>BEFORE DELETE OR UPDATE</> trigger using this + <function>check_foreign_key()</function> checks the referenced table. + To use, create a <literal>BEFORE DELETE OR UPDATE</literal> trigger using this function on a table referenced by other table(s). Specify as the trigger arguments: the number of referencing tables for which the function has to perform checking, the action if a referencing key is found - (<literal>cascade</> — to delete the referencing row, - <literal>restrict</> — to abort transaction if referencing keys - exist, <literal>setnull</> — to set referencing key fields to null), + (<literal>cascade</literal> — to delete the referencing row, + <literal>restrict</literal> — to abort transaction if referencing keys + exist, <literal>setnull</literal> — to set referencing key fields to null), the triggered table's column names which form the primary/unique key, then the referencing table name and column names (repeated for as many referencing tables as were specified by first argument). Note that the @@ -59,7 +59,7 @@ </para> <para> - There are examples in <filename>refint.example</>. + There are examples in <filename>refint.example</filename>. </para> </sect2> @@ -67,10 +67,10 @@ <title>timetravel — Functions for Implementing Time Travel</title> <para> - Long ago, <productname>PostgreSQL</> had a built-in time travel feature + Long ago, <productname>PostgreSQL</productname> had a built-in time travel feature that kept the insert and delete times for each tuple. This can be emulated using these functions. To use these functions, - you must add to a table two columns of <type>abstime</> type to store + you must add to a table two columns of <type>abstime</type> type to store the date when a tuple was inserted (start_date) and changed/deleted (stop_date): @@ -89,7 +89,7 @@ CREATE TABLE mytab ( <para> When a new row is inserted, start_date should normally be set to - current time, and stop_date to <literal>infinity</>. The trigger + current time, and stop_date to <literal>infinity</literal>. The trigger will automatically substitute these values if the inserted data contains nulls in these columns. Generally, inserting explicit non-null data in these columns should only be done when re-loading @@ -97,7 +97,7 @@ CREATE TABLE mytab ( </para> <para> - Tuples with stop_date equal to <literal>infinity</> are <quote>valid + Tuples with stop_date equal to <literal>infinity</literal> are <quote>valid now</quote>, and can be modified. Tuples with a finite stop_date cannot be modified anymore — the trigger will prevent it. (If you need to do that, you can turn off time travel as shown below.) @@ -107,7 +107,7 @@ CREATE TABLE mytab ( For a modifiable row, on update only the stop_date in the tuple being updated will be changed (to current time) and a new tuple with the modified data will be inserted. Start_date in this new tuple will be set to current - time and stop_date to <literal>infinity</>. + time and stop_date to <literal>infinity</literal>. </para> <para> @@ -117,29 +117,29 @@ CREATE TABLE mytab ( <para> To query for tuples <quote>valid now</quote>, include - <literal>stop_date = 'infinity'</> in the query's WHERE condition. + <literal>stop_date = 'infinity'</literal> in the query's WHERE condition. (You might wish to incorporate that in a view.) Similarly, you can query for tuples valid at any past time with suitable conditions on start_date and stop_date. </para> <para> - <function>timetravel()</> is the general trigger function that supports - this behavior. Create a <literal>BEFORE INSERT OR UPDATE OR DELETE</> + <function>timetravel()</function> is the general trigger function that supports + this behavior. Create a <literal>BEFORE INSERT OR UPDATE OR DELETE</literal> trigger using this function on each time-traveled table. Specify two trigger arguments: the actual names of the start_date and stop_date columns. Optionally, you can specify one to three more arguments, which must refer - to columns of type <type>text</>. The trigger will store the name of + to columns of type <type>text</type>. The trigger will store the name of the current user into the first of these columns during INSERT, the second column during UPDATE, and the third during DELETE. </para> <para> - <function>set_timetravel()</> allows you to turn time-travel on or off for + <function>set_timetravel()</function> allows you to turn time-travel on or off for a table. - <literal>set_timetravel('mytab', 1)</> will turn TT ON for table <literal>mytab</>. - <literal>set_timetravel('mytab', 0)</> will turn TT OFF for table <literal>mytab</>. + <literal>set_timetravel('mytab', 1)</literal> will turn TT ON for table <literal>mytab</literal>. + <literal>set_timetravel('mytab', 0)</literal> will turn TT OFF for table <literal>mytab</literal>. In both cases the old status is reported. While TT is off, you can modify the start_date and stop_date columns freely. Note that the on/off status is local to the current database session — fresh sessions will @@ -147,12 +147,12 @@ CREATE TABLE mytab ( </para> <para> - <function>get_timetravel()</> returns the TT state for a table without + <function>get_timetravel()</function> returns the TT state for a table without changing it. </para> <para> - There is an example in <filename>timetravel.example</>. + There is an example in <filename>timetravel.example</filename>. </para> </sect2> @@ -160,17 +160,17 @@ CREATE TABLE mytab ( <title>autoinc — Functions for Autoincrementing Fields</title> <para> - <function>autoinc()</> is a trigger that stores the next value of + <function>autoinc()</function> is a trigger that stores the next value of a sequence into an integer field. This has some overlap with the - built-in <quote>serial column</> feature, but it is not the same: - <function>autoinc()</> will override attempts to substitute a + built-in <quote>serial column</quote> feature, but it is not the same: + <function>autoinc()</function> will override attempts to substitute a different field value during inserts, and optionally it can be used to increment the field during updates, too. </para> <para> - To use, create a <literal>BEFORE INSERT</> (or optionally <literal>BEFORE - INSERT OR UPDATE</>) trigger using this function. Specify two + To use, create a <literal>BEFORE INSERT</literal> (or optionally <literal>BEFORE + INSERT OR UPDATE</literal>) trigger using this function. Specify two trigger arguments: the name of the integer column to be modified, and the name of the sequence object that will supply values. (Actually, you can specify any number of pairs of such names, if @@ -178,7 +178,7 @@ CREATE TABLE mytab ( </para> <para> - There is an example in <filename>autoinc.example</>. + There is an example in <filename>autoinc.example</filename>. </para> </sect2> @@ -187,19 +187,19 @@ CREATE TABLE mytab ( <title>insert_username — Functions for Tracking Who Changed a Table</title> <para> - <function>insert_username()</> is a trigger that stores the current + <function>insert_username()</function> is a trigger that stores the current user's name into a text field. This can be useful for tracking who last modified a particular row within a table. </para> <para> - To use, create a <literal>BEFORE INSERT</> and/or <literal>UPDATE</> + To use, create a <literal>BEFORE INSERT</literal> and/or <literal>UPDATE</literal> trigger using this function. Specify a single trigger argument: the name of the text column to be modified. </para> <para> - There is an example in <filename>insert_username.example</>. + There is an example in <filename>insert_username.example</filename>. </para> </sect2> @@ -208,21 +208,21 @@ CREATE TABLE mytab ( <title>moddatetime — Functions for Tracking Last Modification Time</title> <para> - <function>moddatetime()</> is a trigger that stores the current - time into a <type>timestamp</> field. This can be useful for tracking + <function>moddatetime()</function> is a trigger that stores the current + time into a <type>timestamp</type> field. This can be useful for tracking the last modification time of a particular row within a table. </para> <para> - To use, create a <literal>BEFORE UPDATE</> + To use, create a <literal>BEFORE UPDATE</literal> trigger using this function. Specify a single trigger argument: the name of the column to be modified. - The column must be of type <type>timestamp</> or <type>timestamp with - time zone</>. + The column must be of type <type>timestamp</type> or <type>timestamp with + time zone</type>. </para> <para> - There is an example in <filename>moddatetime.example</>. + There is an example in <filename>moddatetime.example</filename>. </para> </sect2> diff --git a/doc/src/sgml/contrib.sgml b/doc/src/sgml/contrib.sgml index f32b8a81a21..7dd203e9cdc 100644 --- a/doc/src/sgml/contrib.sgml +++ b/doc/src/sgml/contrib.sgml @@ -6,7 +6,7 @@ <para> This appendix and the next one contain information regarding the modules that can be found in the <literal>contrib</literal> directory of the - <productname>PostgreSQL</> distribution. + <productname>PostgreSQL</productname> distribution. These include porting tools, analysis utilities, and plug-in features that are not part of the core PostgreSQL system, mainly because they address a limited audience or are too experimental @@ -41,54 +41,54 @@ <screen> <userinput>make installcheck</userinput> </screen> - once you have a <productname>PostgreSQL</> server running. + once you have a <productname>PostgreSQL</productname> server running. </para> <para> - If you are using a pre-packaged version of <productname>PostgreSQL</>, + If you are using a pre-packaged version of <productname>PostgreSQL</productname>, these modules are typically made available as a separate subpackage, - such as <literal>postgresql-contrib</>. + such as <literal>postgresql-contrib</literal>. </para> <para> Many modules supply new user-defined functions, operators, or types. To make use of one of these modules, after you have installed the code you need to register the new SQL objects in the database system. - In <productname>PostgreSQL</> 9.1 and later, this is done by executing + In <productname>PostgreSQL</productname> 9.1 and later, this is done by executing a <xref linkend="sql-createextension"> command. In a fresh database, you can simply do <programlisting> -CREATE EXTENSION <replaceable>module_name</>; +CREATE EXTENSION <replaceable>module_name</replaceable>; </programlisting> This command must be run by a database superuser. This registers the new SQL objects in the current database only, so you need to run this command in each database that you want the module's facilities to be available in. Alternatively, run it in - database <literal>template1</> so that the extension will be copied into + database <literal>template1</literal> so that the extension will be copied into subsequently-created databases by default. </para> <para> Many modules allow you to install their objects in a schema of your choice. To do that, add <literal>SCHEMA - <replaceable>schema_name</></literal> to the <command>CREATE EXTENSION</> + <replaceable>schema_name</replaceable></literal> to the <command>CREATE EXTENSION</command> command. By default, the objects will be placed in your current creation - target schema, typically <literal>public</>. + target schema, typically <literal>public</literal>. </para> <para> If your database was brought forward by dump and reload from a pre-9.1 - version of <productname>PostgreSQL</>, and you had been using the pre-9.1 + version of <productname>PostgreSQL</productname>, and you had been using the pre-9.1 version of the module in it, you should instead do <programlisting> -CREATE EXTENSION <replaceable>module_name</> FROM unpackaged; +CREATE EXTENSION <replaceable>module_name</replaceable> FROM unpackaged; </programlisting> This will update the pre-9.1 objects of the module into a proper - <firstterm>extension</> object. Future updates to the module will be + <firstterm>extension</firstterm> object. Future updates to the module will be managed by <xref linkend="sql-alterextension">. For more information about extension updates, see <xref linkend="extend-extensions">. @@ -163,7 +163,7 @@ pages. <para> This appendix and the previous one contain information regarding the modules that can be found in the <literal>contrib</literal> directory of the - <productname>PostgreSQL</> distribution. See <xref linkend="contrib"> for + <productname>PostgreSQL</productname> distribution. See <xref linkend="contrib"> for more information about the <literal>contrib</literal> section in general and server extensions and plug-ins found in <literal>contrib</literal> specifically. diff --git a/doc/src/sgml/cube.sgml b/doc/src/sgml/cube.sgml index 1ffc40f1a5b..46d8e4eb8fe 100644 --- a/doc/src/sgml/cube.sgml +++ b/doc/src/sgml/cube.sgml @@ -8,7 +8,7 @@ </indexterm> <para> - This module implements a data type <type>cube</> for + This module implements a data type <type>cube</type> for representing multidimensional cubes. </para> @@ -17,8 +17,8 @@ <para> <xref linkend="cube-repr-table"> shows the valid external - representations for the <type>cube</> - type. <replaceable>x</>, <replaceable>y</>, etc. denote + representations for the <type>cube</type> + type. <replaceable>x</replaceable>, <replaceable>y</replaceable>, etc. denote floating-point numbers. </para> @@ -34,43 +34,43 @@ <tbody> <row> - <entry><literal><replaceable>x</></literal></entry> + <entry><literal><replaceable>x</replaceable></literal></entry> <entry>A one-dimensional point (or, zero-length one-dimensional interval) </entry> </row> <row> - <entry><literal>(<replaceable>x</>)</literal></entry> + <entry><literal>(<replaceable>x</replaceable>)</literal></entry> <entry>Same as above</entry> </row> <row> - <entry><literal><replaceable>x1</>,<replaceable>x2</>,...,<replaceable>xn</></literal></entry> + <entry><literal><replaceable>x1</replaceable>,<replaceable>x2</replaceable>,...,<replaceable>xn</replaceable></literal></entry> <entry>A point in n-dimensional space, represented internally as a zero-volume cube </entry> </row> <row> - <entry><literal>(<replaceable>x1</>,<replaceable>x2</>,...,<replaceable>xn</>)</literal></entry> + <entry><literal>(<replaceable>x1</replaceable>,<replaceable>x2</replaceable>,...,<replaceable>xn</replaceable>)</literal></entry> <entry>Same as above</entry> </row> <row> - <entry><literal>(<replaceable>x</>),(<replaceable>y</>)</literal></entry> - <entry>A one-dimensional interval starting at <replaceable>x</> and ending at <replaceable>y</> or vice versa; the + <entry><literal>(<replaceable>x</replaceable>),(<replaceable>y</replaceable>)</literal></entry> + <entry>A one-dimensional interval starting at <replaceable>x</replaceable> and ending at <replaceable>y</replaceable> or vice versa; the order does not matter </entry> </row> <row> - <entry><literal>[(<replaceable>x</>),(<replaceable>y</>)]</literal></entry> + <entry><literal>[(<replaceable>x</replaceable>),(<replaceable>y</replaceable>)]</literal></entry> <entry>Same as above</entry> </row> <row> - <entry><literal>(<replaceable>x1</>,...,<replaceable>xn</>),(<replaceable>y1</>,...,<replaceable>yn</>)</literal></entry> + <entry><literal>(<replaceable>x1</replaceable>,...,<replaceable>xn</replaceable>),(<replaceable>y1</replaceable>,...,<replaceable>yn</replaceable>)</literal></entry> <entry>An n-dimensional cube represented by a pair of its diagonally opposite corners </entry> </row> <row> - <entry><literal>[(<replaceable>x1</>,...,<replaceable>xn</>),(<replaceable>y1</>,...,<replaceable>yn</>)]</literal></entry> + <entry><literal>[(<replaceable>x1</replaceable>,...,<replaceable>xn</replaceable>),(<replaceable>y1</replaceable>,...,<replaceable>yn</replaceable>)]</literal></entry> <entry>Same as above</entry> </row> </tbody> @@ -79,17 +79,17 @@ <para> It does not matter which order the opposite corners of a cube are - entered in. The <type>cube</> functions + entered in. The <type>cube</type> functions automatically swap values if needed to create a uniform - <quote>lower left — upper right</> internal representation. - When the corners coincide, <type>cube</> stores only one corner - along with an <quote>is point</> flag to avoid wasting space. + <quote>lower left — upper right</quote> internal representation. + When the corners coincide, <type>cube</type> stores only one corner + along with an <quote>is point</quote> flag to avoid wasting space. </para> <para> White space is ignored on input, so - <literal>[(<replaceable>x</>),(<replaceable>y</>)]</literal> is the same as - <literal>[ ( <replaceable>x</> ), ( <replaceable>y</> ) ]</literal>. + <literal>[(<replaceable>x</replaceable>),(<replaceable>y</replaceable>)]</literal> is the same as + <literal>[ ( <replaceable>x</replaceable> ), ( <replaceable>y</replaceable> ) ]</literal>. </para> </sect2> @@ -107,7 +107,7 @@ <para> <xref linkend="cube-operators-table"> shows the operators provided for - type <type>cube</>. + type <type>cube</type>. </para> <table id="cube-operators-table"> @@ -123,91 +123,91 @@ <tbody> <row> - <entry><literal>a = b</></entry> - <entry><type>boolean</></entry> + <entry><literal>a = b</literal></entry> + <entry><type>boolean</type></entry> <entry>The cubes a and b are identical.</entry> </row> <row> - <entry><literal>a && b</></entry> - <entry><type>boolean</></entry> + <entry><literal>a && b</literal></entry> + <entry><type>boolean</type></entry> <entry>The cubes a and b overlap.</entry> </row> <row> - <entry><literal>a @> b</></entry> - <entry><type>boolean</></entry> + <entry><literal>a @> b</literal></entry> + <entry><type>boolean</type></entry> <entry>The cube a contains the cube b.</entry> </row> <row> - <entry><literal>a <@ b</></entry> - <entry><type>boolean</></entry> + <entry><literal>a <@ b</literal></entry> + <entry><type>boolean</type></entry> <entry>The cube a is contained in the cube b.</entry> </row> <row> - <entry><literal>a < b</></entry> - <entry><type>boolean</></entry> + <entry><literal>a < b</literal></entry> + <entry><type>boolean</type></entry> <entry>The cube a is less than the cube b.</entry> </row> <row> - <entry><literal>a <= b</></entry> - <entry><type>boolean</></entry> + <entry><literal>a <= b</literal></entry> + <entry><type>boolean</type></entry> <entry>The cube a is less than or equal to the cube b.</entry> </row> <row> - <entry><literal>a > b</></entry> - <entry><type>boolean</></entry> + <entry><literal>a > b</literal></entry> + <entry><type>boolean</type></entry> <entry>The cube a is greater than the cube b.</entry> </row> <row> - <entry><literal>a >= b</></entry> - <entry><type>boolean</></entry> + <entry><literal>a >= b</literal></entry> + <entry><type>boolean</type></entry> <entry>The cube a is greater than or equal to the cube b.</entry> </row> <row> - <entry><literal>a <> b</></entry> - <entry><type>boolean</></entry> + <entry><literal>a <> b</literal></entry> + <entry><type>boolean</type></entry> <entry>The cube a is not equal to the cube b.</entry> </row> <row> - <entry><literal>a -> n</></entry> - <entry><type>float8</></entry> - <entry>Get <replaceable>n</>-th coordinate of cube (counting from 1).</entry> + <entry><literal>a -> n</literal></entry> + <entry><type>float8</type></entry> + <entry>Get <replaceable>n</replaceable>-th coordinate of cube (counting from 1).</entry> </row> <row> - <entry><literal>a ~> n</></entry> - <entry><type>float8</></entry> + <entry><literal>a ~> n</literal></entry> + <entry><type>float8</type></entry> <entry> - Get <replaceable>n</>-th coordinate in <quote>normalized</> cube + Get <replaceable>n</replaceable>-th coordinate in <quote>normalized</quote> cube representation, in which the coordinates have been rearranged into - the form <quote>lower left — upper right</>; that is, the + the form <quote>lower left — upper right</quote>; that is, the smaller endpoint along each dimension appears first. </entry> </row> <row> - <entry><literal>a <-> b</></entry> - <entry><type>float8</></entry> + <entry><literal>a <-> b</literal></entry> + <entry><type>float8</type></entry> <entry>Euclidean distance between a and b.</entry> </row> <row> - <entry><literal>a <#> b</></entry> - <entry><type>float8</></entry> + <entry><literal>a <#> b</literal></entry> + <entry><type>float8</type></entry> <entry>Taxicab (L-1 metric) distance between a and b.</entry> </row> <row> - <entry><literal>a <=> b</></entry> - <entry><type>float8</></entry> + <entry><literal>a <=> b</literal></entry> + <entry><type>float8</type></entry> <entry>Chebyshev (L-inf metric) distance between a and b.</entry> </row> @@ -216,35 +216,35 @@ </table> <para> - (Before PostgreSQL 8.2, the containment operators <literal>@></> and <literal><@</> were - respectively called <literal>@</> and <literal>~</>. These names are still available, but are + (Before PostgreSQL 8.2, the containment operators <literal>@></literal> and <literal><@</literal> were + respectively called <literal>@</literal> and <literal>~</literal>. These names are still available, but are deprecated and will eventually be retired. Notice that the old names are reversed from the convention formerly followed by the core geometric data types!) </para> <para> - The scalar ordering operators (<literal><</>, <literal>>=</>, etc) + The scalar ordering operators (<literal><</literal>, <literal>>=</literal>, etc) do not make a lot of sense for any practical purpose but sorting. These operators first compare the first coordinates, and if those are equal, compare the second coordinates, etc. They exist mainly to support the - b-tree index operator class for <type>cube</>, which can be useful for - example if you would like a UNIQUE constraint on a <type>cube</> column. + b-tree index operator class for <type>cube</type>, which can be useful for + example if you would like a UNIQUE constraint on a <type>cube</type> column. </para> <para> - The <filename>cube</> module also provides a GiST index operator class for - <type>cube</> values. - A <type>cube</> GiST index can be used to search for values using the - <literal>=</>, <literal>&&</>, <literal>@></>, and - <literal><@</> operators in <literal>WHERE</> clauses. + The <filename>cube</filename> module also provides a GiST index operator class for + <type>cube</type> values. + A <type>cube</type> GiST index can be used to search for values using the + <literal>=</literal>, <literal>&&</literal>, <literal>@></literal>, and + <literal><@</literal> operators in <literal>WHERE</literal> clauses. </para> <para> - In addition, a <type>cube</> GiST index can be used to find nearest + In addition, a <type>cube</type> GiST index can be used to find nearest neighbors using the metric operators - <literal><-></>, <literal><#></>, and - <literal><=></> in <literal>ORDER BY</> clauses. + <literal><-></literal>, <literal><#></literal>, and + <literal><=></literal> in <literal>ORDER BY</literal> clauses. For example, the nearest neighbor of the 3-D point (0.5, 0.5, 0.5) could be found efficiently with: <programlisting> @@ -253,7 +253,7 @@ SELECT c FROM test ORDER BY c <-> cube(array[0.5,0.5,0.5]) LIMIT 1; </para> <para> - The <literal>~></> operator can also be used in this way to + The <literal>~></literal> operator can also be used in this way to efficiently retrieve the first few values sorted by a selected coordinate. For example, to get the first few cubes ordered by the first coordinate (lower left corner) ascending one could use the following query: @@ -365,7 +365,7 @@ SELECT c FROM test ORDER BY c ~> 3 DESC LIMIT 5; <row> <entry><literal>cube_ll_coord(cube, integer)</literal></entry> <entry><type>float8</type></entry> - <entry>Returns the <replaceable>n</>-th coordinate value for the lower + <entry>Returns the <replaceable>n</replaceable>-th coordinate value for the lower left corner of the cube. </entry> <entry> @@ -376,7 +376,7 @@ SELECT c FROM test ORDER BY c ~> 3 DESC LIMIT 5; <row> <entry><literal>cube_ur_coord(cube, integer)</literal></entry> <entry><type>float8</type></entry> - <entry>Returns the <replaceable>n</>-th coordinate value for the + <entry>Returns the <replaceable>n</replaceable>-th coordinate value for the upper right corner of the cube. </entry> <entry> @@ -412,9 +412,9 @@ SELECT c FROM test ORDER BY c ~> 3 DESC LIMIT 5; desired. </entry> <entry> - <literal>cube_subset(cube('(1,3,5),(6,7,8)'), ARRAY[2]) == '(3),(7)'</> + <literal>cube_subset(cube('(1,3,5),(6,7,8)'), ARRAY[2]) == '(3),(7)'</literal> <literal>cube_subset(cube('(1,3,5),(6,7,8)'), ARRAY[3,2,1,1]) == - '(5,3,1,1),(8,7,6,6)'</> + '(5,3,1,1),(8,7,6,6)'</literal> </entry> </row> @@ -440,24 +440,24 @@ SELECT c FROM test ORDER BY c ~> 3 DESC LIMIT 5; <entry><literal>cube_enlarge(c cube, r double, n integer)</literal></entry> <entry><type>cube</type></entry> <entry>Increases the size of the cube by the specified - radius <replaceable>r</> in at least <replaceable>n</> dimensions. + radius <replaceable>r</replaceable> in at least <replaceable>n</replaceable> dimensions. If the radius is negative the cube is shrunk instead. - All defined dimensions are changed by the radius <replaceable>r</>. - Lower-left coordinates are decreased by <replaceable>r</> and - upper-right coordinates are increased by <replaceable>r</>. If a + All defined dimensions are changed by the radius <replaceable>r</replaceable>. + Lower-left coordinates are decreased by <replaceable>r</replaceable> and + upper-right coordinates are increased by <replaceable>r</replaceable>. If a lower-left coordinate is increased to more than the corresponding - upper-right coordinate (this can only happen when <replaceable>r</> + upper-right coordinate (this can only happen when <replaceable>r</replaceable> < 0) than both coordinates are set to their average. - If <replaceable>n</> is greater than the number of defined dimensions - and the cube is being enlarged (<replaceable>r</> > 0), then extra - dimensions are added to make <replaceable>n</> altogether; + If <replaceable>n</replaceable> is greater than the number of defined dimensions + and the cube is being enlarged (<replaceable>r</replaceable> > 0), then extra + dimensions are added to make <replaceable>n</replaceable> altogether; 0 is used as the initial value for the extra coordinates. This function is useful for creating bounding boxes around a point for searching for nearby points. </entry> <entry> <literal>cube_enlarge('(1,2),(3,4)', 0.5, 3) == - '(0.5,1.5,-0.5),(3.5,4.5,0.5)'</> + '(0.5,1.5,-0.5),(3.5,4.5,0.5)'</literal> </entry> </row> </tbody> @@ -523,13 +523,13 @@ t <title>Notes</title> <para> - For examples of usage, see the regression test <filename>sql/cube.sql</>. + For examples of usage, see the regression test <filename>sql/cube.sql</filename>. </para> <para> To make it harder for people to break things, there is a limit of 100 on the number of dimensions of cubes. This is set - in <filename>cubedata.h</> if you need something bigger. + in <filename>cubedata.h</filename> if you need something bigger. </para> </sect2> diff --git a/doc/src/sgml/custom-scan.sgml b/doc/src/sgml/custom-scan.sgml index 9d1ca7bfe16..a46641674fa 100644 --- a/doc/src/sgml/custom-scan.sgml +++ b/doc/src/sgml/custom-scan.sgml @@ -9,9 +9,9 @@ </indexterm> <para> - <productname>PostgreSQL</> supports a set of experimental facilities which + <productname>PostgreSQL</productname> supports a set of experimental facilities which are intended to allow extension modules to add new scan types to the system. - Unlike a <link linkend="fdwhandler">foreign data wrapper</>, which is only + Unlike a <link linkend="fdwhandler">foreign data wrapper</link>, which is only responsible for knowing how to scan its own foreign tables, a custom scan provider can provide an alternative method of scanning any relation in the system. Typically, the motivation for writing a custom scan provider will @@ -51,9 +51,9 @@ extern PGDLLIMPORT set_rel_pathlist_hook_type set_rel_pathlist_hook; <para> Although this hook function can be used to examine, modify, or remove paths generated by the core system, a custom scan provider will typically - confine itself to generating <structname>CustomPath</> objects and adding - them to <literal>rel</> using <function>add_path</>. The custom scan - provider is responsible for initializing the <structname>CustomPath</> + confine itself to generating <structname>CustomPath</structname> objects and adding + them to <literal>rel</literal> using <function>add_path</function>. The custom scan + provider is responsible for initializing the <structname>CustomPath</structname> object, which is declared like this: <programlisting> typedef struct CustomPath @@ -68,22 +68,22 @@ typedef struct CustomPath </para> <para> - <structfield>path</> must be initialized as for any other path, including + <structfield>path</structfield> must be initialized as for any other path, including the row-count estimate, start and total cost, and sort ordering provided - by this path. <structfield>flags</> is a bit mask, which should include - <literal>CUSTOMPATH_SUPPORT_BACKWARD_SCAN</> if the custom path can support - a backward scan and <literal>CUSTOMPATH_SUPPORT_MARK_RESTORE</> if it + by this path. <structfield>flags</structfield> is a bit mask, which should include + <literal>CUSTOMPATH_SUPPORT_BACKWARD_SCAN</literal> if the custom path can support + a backward scan and <literal>CUSTOMPATH_SUPPORT_MARK_RESTORE</literal> if it can support mark and restore. Both capabilities are optional. - An optional <structfield>custom_paths</> is a list of <structname>Path</> + An optional <structfield>custom_paths</structfield> is a list of <structname>Path</structname> nodes used by this custom-path node; these will be transformed into - <structname>Plan</> nodes by planner. - <structfield>custom_private</> can be used to store the custom path's + <structname>Plan</structname> nodes by planner. + <structfield>custom_private</structfield> can be used to store the custom path's private data. Private data should be stored in a form that can be handled - by <literal>nodeToString</>, so that debugging routines that attempt to - print the custom path will work as designed. <structfield>methods</> must + by <literal>nodeToString</literal>, so that debugging routines that attempt to + print the custom path will work as designed. <structfield>methods</structfield> must point to a (usually statically allocated) object implementing the required custom path methods, of which there is currently only one. The - <structfield>LibraryName</> and <structfield>SymbolName</> fields must also + <structfield>LibraryName</structfield> and <structfield>SymbolName</structfield> fields must also be initialized so that the dynamic loader can resolve them to locate the method table. </para> @@ -93,7 +93,7 @@ typedef struct CustomPath relations, such a path must produce the same output as would normally be produced by the join it replaces. To do this, the join provider should set the following hook, and then within the hook function, - create <structname>CustomPath</> path(s) for the join relation. + create <structname>CustomPath</structname> path(s) for the join relation. <programlisting> typedef void (*set_join_pathlist_hook_type) (PlannerInfo *root, RelOptInfo *joinrel, @@ -122,7 +122,7 @@ Plan *(*PlanCustomPath) (PlannerInfo *root, List *custom_plans); </programlisting> Convert a custom path to a finished plan. The return value will generally - be a <literal>CustomScan</> object, which the callback must allocate and + be a <literal>CustomScan</literal> object, which the callback must allocate and initialize. See <xref linkend="custom-scan-plan"> for more details. </para> </sect2> @@ -150,45 +150,45 @@ typedef struct CustomScan </para> <para> - <structfield>scan</> must be initialized as for any other scan, including + <structfield>scan</structfield> must be initialized as for any other scan, including estimated costs, target lists, qualifications, and so on. - <structfield>flags</> is a bit mask with the same meaning as in - <structname>CustomPath</>. - <structfield>custom_plans</> can be used to store child - <structname>Plan</> nodes. - <structfield>custom_exprs</> should be used to + <structfield>flags</structfield> is a bit mask with the same meaning as in + <structname>CustomPath</structname>. + <structfield>custom_plans</structfield> can be used to store child + <structname>Plan</structname> nodes. + <structfield>custom_exprs</structfield> should be used to store expression trees that will need to be fixed up by - <filename>setrefs.c</> and <filename>subselect.c</>, while - <structfield>custom_private</> should be used to store other private data + <filename>setrefs.c</filename> and <filename>subselect.c</filename>, while + <structfield>custom_private</structfield> should be used to store other private data that is only used by the custom scan provider itself. - <structfield>custom_scan_tlist</> can be NIL when scanning a base + <structfield>custom_scan_tlist</structfield> can be NIL when scanning a base relation, indicating that the custom scan returns scan tuples that match the base relation's row type. Otherwise it is a target list describing - the actual scan tuples. <structfield>custom_scan_tlist</> must be + the actual scan tuples. <structfield>custom_scan_tlist</structfield> must be provided for joins, and could be provided for scans if the custom scan provider can compute some non-Var expressions. - <structfield>custom_relids</> is set by the core code to the set of + <structfield>custom_relids</structfield> is set by the core code to the set of relations (range table indexes) that this scan node handles; except when this scan is replacing a join, it will have only one member. - <structfield>methods</> must point to a (usually statically allocated) + <structfield>methods</structfield> must point to a (usually statically allocated) object implementing the required custom scan methods, which are further detailed below. </para> <para> - When a <structname>CustomScan</> scans a single relation, - <structfield>scan.scanrelid</> must be the range table index of the table - to be scanned. When it replaces a join, <structfield>scan.scanrelid</> + When a <structname>CustomScan</structname> scans a single relation, + <structfield>scan.scanrelid</structfield> must be the range table index of the table + to be scanned. When it replaces a join, <structfield>scan.scanrelid</structfield> should be zero. </para> <para> - Plan trees must be able to be duplicated using <function>copyObject</>, - so all the data stored within the <quote>custom</> fields must consist of + Plan trees must be able to be duplicated using <function>copyObject</function>, + so all the data stored within the <quote>custom</quote> fields must consist of nodes that that function can handle. Furthermore, custom scan providers cannot substitute a larger structure that embeds - a <structname>CustomScan</> for the structure itself, as would be possible - for a <structname>CustomPath</> or <structname>CustomScanState</>. + a <structname>CustomScan</structname> for the structure itself, as would be possible + for a <structname>CustomPath</structname> or <structname>CustomScanState</structname>. </para> <sect2 id="custom-scan-plan-callbacks"> @@ -197,14 +197,14 @@ typedef struct CustomScan <programlisting> Node *(*CreateCustomScanState) (CustomScan *cscan); </programlisting> - Allocate a <structname>CustomScanState</> for this - <structname>CustomScan</>. The actual allocation will often be larger than - required for an ordinary <structname>CustomScanState</>, because many + Allocate a <structname>CustomScanState</structname> for this + <structname>CustomScan</structname>. The actual allocation will often be larger than + required for an ordinary <structname>CustomScanState</structname>, because many providers will wish to embed that as the first field of a larger structure. - The value returned must have the node tag and <structfield>methods</> + The value returned must have the node tag and <structfield>methods</structfield> set appropriately, but other fields should be left as zeroes at this - stage; after <function>ExecInitCustomScan</> performs basic initialization, - the <function>BeginCustomScan</> callback will be invoked to give the + stage; after <function>ExecInitCustomScan</function> performs basic initialization, + the <function>BeginCustomScan</function> callback will be invoked to give the custom scan provider a chance to do whatever else is needed. </para> </sect2> @@ -214,8 +214,8 @@ Node *(*CreateCustomScanState) (CustomScan *cscan); <title>Executing Custom Scans</title> <para> - When a <structfield>CustomScan</> is executed, its execution state is - represented by a <structfield>CustomScanState</>, which is declared as + When a <structfield>CustomScan</structfield> is executed, its execution state is + represented by a <structfield>CustomScanState</structfield>, which is declared as follows: <programlisting> typedef struct CustomScanState @@ -228,15 +228,15 @@ typedef struct CustomScanState </para> <para> - <structfield>ss</> is initialized as for any other scan state, + <structfield>ss</structfield> is initialized as for any other scan state, except that if the scan is for a join rather than a base relation, - <literal>ss.ss_currentRelation</> is left NULL. - <structfield>flags</> is a bit mask with the same meaning as in - <structname>CustomPath</> and <structname>CustomScan</>. - <structfield>methods</> must point to a (usually statically allocated) + <literal>ss.ss_currentRelation</literal> is left NULL. + <structfield>flags</structfield> is a bit mask with the same meaning as in + <structname>CustomPath</structname> and <structname>CustomScan</structname>. + <structfield>methods</structfield> must point to a (usually statically allocated) object implementing the required custom scan state methods, which are - further detailed below. Typically, a <structname>CustomScanState</>, which - need not support <function>copyObject</>, will actually be a larger + further detailed below. Typically, a <structname>CustomScanState</structname>, which + need not support <function>copyObject</function>, will actually be a larger structure embedding the above as its first member. </para> @@ -249,8 +249,8 @@ void (*BeginCustomScan) (CustomScanState *node, EState *estate, int eflags); </programlisting> - Complete initialization of the supplied <structname>CustomScanState</>. - Standard fields have been initialized by <function>ExecInitCustomScan</>, + Complete initialization of the supplied <structname>CustomScanState</structname>. + Standard fields have been initialized by <function>ExecInitCustomScan</function>, but any private fields should be initialized here. </para> @@ -259,16 +259,16 @@ void (*BeginCustomScan) (CustomScanState *node, TupleTableSlot *(*ExecCustomScan) (CustomScanState *node); </programlisting> Fetch the next scan tuple. If any tuples remain, it should fill - <literal>ps_ResultTupleSlot</> with the next tuple in the current scan + <literal>ps_ResultTupleSlot</literal> with the next tuple in the current scan direction, and then return the tuple slot. If not, - <literal>NULL</> or an empty slot should be returned. + <literal>NULL</literal> or an empty slot should be returned. </para> <para> <programlisting> void (*EndCustomScan) (CustomScanState *node); </programlisting> - Clean up any private data associated with the <literal>CustomScanState</>. + Clean up any private data associated with the <literal>CustomScanState</literal>. This method is required, but it does not need to do anything if there is no associated data or it will be cleaned up automatically. </para> @@ -286,9 +286,9 @@ void (*ReScanCustomScan) (CustomScanState *node); void (*MarkPosCustomScan) (CustomScanState *node); </programlisting> Save the current scan position so that it can subsequently be restored - by the <function>RestrPosCustomScan</> callback. This callback is + by the <function>RestrPosCustomScan</function> callback. This callback is optional, and need only be supplied if the - <literal>CUSTOMPATH_SUPPORT_MARK_RESTORE</> flag is set. + <literal>CUSTOMPATH_SUPPORT_MARK_RESTORE</literal> flag is set. </para> <para> @@ -296,9 +296,9 @@ void (*MarkPosCustomScan) (CustomScanState *node); void (*RestrPosCustomScan) (CustomScanState *node); </programlisting> Restore the previous scan position as saved by the - <function>MarkPosCustomScan</> callback. This callback is optional, + <function>MarkPosCustomScan</function> callback. This callback is optional, and need only be supplied if the - <literal>CUSTOMPATH_SUPPORT_MARK_RESTORE</> flag is set. + <literal>CUSTOMPATH_SUPPORT_MARK_RESTORE</literal> flag is set. </para> <para> @@ -320,8 +320,8 @@ void (*InitializeDSMCustomScan) (CustomScanState *node, void *coordinate); </programlisting> Initialize the dynamic shared memory that will be required for parallel - operation. <literal>coordinate</> points to a shared memory area of - size equal to the return value of <function>EstimateDSMCustomScan</>. + operation. <literal>coordinate</literal> points to a shared memory area of + size equal to the return value of <function>EstimateDSMCustomScan</function>. This callback is optional, and need only be supplied if this custom scan provider supports parallel execution. </para> @@ -337,9 +337,9 @@ void (*ReInitializeDSMCustomScan) (CustomScanState *node, This callback is optional, and need only be supplied if this custom scan provider supports parallel execution. Recommended practice is that this callback reset only shared state, - while the <function>ReScanCustomScan</> callback resets only local + while the <function>ReScanCustomScan</function> callback resets only local state. Currently, this callback will be called - before <function>ReScanCustomScan</>, but it's best not to rely on + before <function>ReScanCustomScan</function>, but it's best not to rely on that ordering. </para> @@ -350,7 +350,7 @@ void (*InitializeWorkerCustomScan) (CustomScanState *node, void *coordinate); </programlisting> Initialize a parallel worker's local state based on the shared state - set up by the leader during <function>InitializeDSMCustomScan</>. + set up by the leader during <function>InitializeDSMCustomScan</function>. This callback is optional, and need only be supplied if this custom scan provider supports parallel execution. </para> @@ -361,7 +361,7 @@ void (*ShutdownCustomScan) (CustomScanState *node); </programlisting> Release resources when it is anticipated the node will not be executed to completion. This is not called in all cases; sometimes, - <literal>EndCustomScan</> may be called without this function having + <literal>EndCustomScan</literal> may be called without this function having been called first. Since the DSM segment used by parallel query is destroyed just after this callback is invoked, custom scan providers that wish to take some action before the DSM segment goes away should implement @@ -374,9 +374,9 @@ void (*ExplainCustomScan) (CustomScanState *node, List *ancestors, ExplainState *es); </programlisting> - Output additional information for <command>EXPLAIN</> of a custom-scan + Output additional information for <command>EXPLAIN</command> of a custom-scan plan node. This callback is optional. Common data stored in the - <structname>ScanState</>, such as the target list and scan relation, will + <structname>ScanState</structname>, such as the target list and scan relation, will be shown even without this callback, but the callback allows the display of additional, private state. </para> diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml index 512756df4af..6a15f9030c9 100644 --- a/doc/src/sgml/datatype.sgml +++ b/doc/src/sgml/datatype.sgml @@ -79,7 +79,7 @@ <row> <entry><type>bytea</type></entry> <entry></entry> - <entry>binary data (<quote>byte array</>)</entry> + <entry>binary data (<quote>byte array</quote>)</entry> </row> <row> @@ -354,45 +354,45 @@ <tbody> <row> - <entry><type>smallint</></entry> + <entry><type>smallint</type></entry> <entry>2 bytes</entry> <entry>small-range integer</entry> <entry>-32768 to +32767</entry> </row> <row> - <entry><type>integer</></entry> + <entry><type>integer</type></entry> <entry>4 bytes</entry> <entry>typical choice for integer</entry> <entry>-2147483648 to +2147483647</entry> </row> <row> - <entry><type>bigint</></entry> + <entry><type>bigint</type></entry> <entry>8 bytes</entry> <entry>large-range integer</entry> <entry>-9223372036854775808 to +9223372036854775807</entry> </row> <row> - <entry><type>decimal</></entry> + <entry><type>decimal</type></entry> <entry>variable</entry> <entry>user-specified precision, exact</entry> <entry>up to 131072 digits before the decimal point; up to 16383 digits after the decimal point</entry> </row> <row> - <entry><type>numeric</></entry> + <entry><type>numeric</type></entry> <entry>variable</entry> <entry>user-specified precision, exact</entry> <entry>up to 131072 digits before the decimal point; up to 16383 digits after the decimal point</entry> </row> <row> - <entry><type>real</></entry> + <entry><type>real</type></entry> <entry>4 bytes</entry> <entry>variable-precision, inexact</entry> <entry>6 decimal digits precision</entry> </row> <row> - <entry><type>double precision</></entry> + <entry><type>double precision</type></entry> <entry>8 bytes</entry> <entry>variable-precision, inexact</entry> <entry>15 decimal digits precision</entry> @@ -406,7 +406,7 @@ </row> <row> - <entry><type>serial</></entry> + <entry><type>serial</type></entry> <entry>4 bytes</entry> <entry>autoincrementing integer</entry> <entry>1 to 2147483647</entry> @@ -574,9 +574,9 @@ NUMERIC <para> Numeric values are physically stored without any extra leading or trailing zeroes. Thus, the declared precision and scale of a column - are maximums, not fixed allocations. (In this sense the <type>numeric</> - type is more akin to <type>varchar(<replaceable>n</>)</type> - than to <type>char(<replaceable>n</>)</type>.) The actual storage + are maximums, not fixed allocations. (In this sense the <type>numeric</type> + type is more akin to <type>varchar(<replaceable>n</replaceable>)</type> + than to <type>char(<replaceable>n</replaceable>)</type>.) The actual storage requirement is two bytes for each group of four decimal digits, plus three to eight bytes overhead. </para> @@ -593,22 +593,22 @@ NUMERIC <para> In addition to ordinary numeric values, the <type>numeric</type> - type allows the special value <literal>NaN</>, meaning - <quote>not-a-number</quote>. Any operation on <literal>NaN</> - yields another <literal>NaN</>. When writing this value + type allows the special value <literal>NaN</literal>, meaning + <quote>not-a-number</quote>. Any operation on <literal>NaN</literal> + yields another <literal>NaN</literal>. When writing this value as a constant in an SQL command, you must put quotes around it, - for example <literal>UPDATE table SET x = 'NaN'</>. On input, - the string <literal>NaN</> is recognized in a case-insensitive manner. + for example <literal>UPDATE table SET x = 'NaN'</literal>. On input, + the string <literal>NaN</literal> is recognized in a case-insensitive manner. </para> <note> <para> - In most implementations of the <quote>not-a-number</> concept, - <literal>NaN</> is not considered equal to any other numeric - value (including <literal>NaN</>). In order to allow - <type>numeric</> values to be sorted and used in tree-based - indexes, <productname>PostgreSQL</> treats <literal>NaN</> - values as equal, and greater than all non-<literal>NaN</> + In most implementations of the <quote>not-a-number</quote> concept, + <literal>NaN</literal> is not considered equal to any other numeric + value (including <literal>NaN</literal>). In order to allow + <type>numeric</type> values to be sorted and used in tree-based + indexes, <productname>PostgreSQL</productname> treats <literal>NaN</literal> + values as equal, and greater than all non-<literal>NaN</literal> values. </para> </note> @@ -756,18 +756,18 @@ FROM generate_series(-3.5, 3.5, 1) as x; floating-point arithmetic does not follow IEEE 754, these values will probably not work as expected.) When writing these values as constants in an SQL command, you must put quotes around them, - for example <literal>UPDATE table SET x = '-Infinity'</>. On input, + for example <literal>UPDATE table SET x = '-Infinity'</literal>. On input, these strings are recognized in a case-insensitive manner. </para> <note> <para> - IEEE754 specifies that <literal>NaN</> should not compare equal - to any other floating-point value (including <literal>NaN</>). + IEEE754 specifies that <literal>NaN</literal> should not compare equal + to any other floating-point value (including <literal>NaN</literal>). In order to allow floating-point values to be sorted and used - in tree-based indexes, <productname>PostgreSQL</> treats - <literal>NaN</> values as equal, and greater than all - non-<literal>NaN</> values. + in tree-based indexes, <productname>PostgreSQL</productname> treats + <literal>NaN</literal> values as equal, and greater than all + non-<literal>NaN</literal> values. </para> </note> @@ -776,7 +776,7 @@ FROM generate_series(-3.5, 3.5, 1) as x; notations <type>float</type> and <type>float(<replaceable>p</replaceable>)</type> for specifying inexact numeric types. Here, <replaceable>p</replaceable> specifies - the minimum acceptable precision in <emphasis>binary</> digits. + the minimum acceptable precision in <emphasis>binary</emphasis> digits. <productname>PostgreSQL</productname> accepts <type>float(1)</type> to <type>float(24)</type> as selecting the <type>real</type> type, while @@ -870,12 +870,12 @@ ALTER SEQUENCE <replaceable class="parameter">tablename</replaceable>_<replaceab </programlisting> Thus, we have created an integer column and arranged for its default - values to be assigned from a sequence generator. A <literal>NOT NULL</> + values to be assigned from a sequence generator. A <literal>NOT NULL</literal> constraint is applied to ensure that a null value cannot be inserted. (In most cases you would also want to attach a - <literal>UNIQUE</> or <literal>PRIMARY KEY</> constraint to prevent + <literal>UNIQUE</literal> or <literal>PRIMARY KEY</literal> constraint to prevent duplicate values from being inserted by accident, but this is - not automatic.) Lastly, the sequence is marked as <quote>owned by</> + not automatic.) Lastly, the sequence is marked as <quote>owned by</quote> the column, so that it will be dropped if the column or table is dropped. </para> @@ -908,7 +908,7 @@ ALTER SEQUENCE <replaceable class="parameter">tablename</replaceable>_<replaceab names <type>bigserial</type> and <type>serial8</type> work the same way, except that they create a <type>bigint</type> column. <type>bigserial</type> should be used if you anticipate - the use of more than 2<superscript>31</> identifiers over the + the use of more than 2<superscript>31</superscript> identifiers over the lifetime of the table. The type names <type>smallserial</type> and <type>serial2</type> also work the same way, except that they create a <type>smallint</type> column. @@ -962,9 +962,9 @@ ALTER SEQUENCE <replaceable class="parameter">tablename</replaceable>_<replaceab <para> Since the output of this data type is locale-sensitive, it might not - work to load <type>money</> data into a database that has a different - setting of <varname>lc_monetary</>. To avoid problems, before - restoring a dump into a new database make sure <varname>lc_monetary</> has + work to load <type>money</type> data into a database that has a different + setting of <varname>lc_monetary</varname>. To avoid problems, before + restoring a dump into a new database make sure <varname>lc_monetary</varname> has the same or equivalent value as in the database that was dumped. </para> @@ -994,7 +994,7 @@ SELECT '52093.89'::money::numeric::float8; Division of a <type>money</type> value by an integer value is performed with truncation of the fractional part towards zero. To get a rounded result, divide by a floating-point value, or cast the <type>money</type> - value to <type>numeric</> before dividing and back to <type>money</type> + value to <type>numeric</type> before dividing and back to <type>money</type> afterwards. (The latter is preferable to avoid risking precision loss.) When a <type>money</type> value is divided by another <type>money</type> value, the result is <type>double precision</type> (i.e., a pure number, @@ -1047,11 +1047,11 @@ SELECT '52093.89'::money::numeric::float8; </thead> <tbody> <row> - <entry><type>character varying(<replaceable>n</>)</type>, <type>varchar(<replaceable>n</>)</type></entry> + <entry><type>character varying(<replaceable>n</replaceable>)</type>, <type>varchar(<replaceable>n</replaceable>)</type></entry> <entry>variable-length with limit</entry> </row> <row> - <entry><type>character(<replaceable>n</>)</type>, <type>char(<replaceable>n</>)</type></entry> + <entry><type>character(<replaceable>n</replaceable>)</type>, <type>char(<replaceable>n</replaceable>)</type></entry> <entry>fixed-length, blank padded</entry> </row> <row> @@ -1070,10 +1070,10 @@ SELECT '52093.89'::money::numeric::float8; <para> <acronym>SQL</acronym> defines two primary character types: - <type>character varying(<replaceable>n</>)</type> and - <type>character(<replaceable>n</>)</type>, where <replaceable>n</> + <type>character varying(<replaceable>n</replaceable>)</type> and + <type>character(<replaceable>n</replaceable>)</type>, where <replaceable>n</replaceable> is a positive integer. Both of these types can store strings up to - <replaceable>n</> characters (not bytes) in length. An attempt to store a + <replaceable>n</replaceable> characters (not bytes) in length. An attempt to store a longer string into a column of these types will result in an error, unless the excess characters are all spaces, in which case the string will be truncated to the maximum length. (This somewhat @@ -1087,22 +1087,22 @@ SELECT '52093.89'::money::numeric::float8; <para> If one explicitly casts a value to <type>character - varying(<replaceable>n</>)</type> or - <type>character(<replaceable>n</>)</type>, then an over-length - value will be truncated to <replaceable>n</> characters without + varying(<replaceable>n</replaceable>)</type> or + <type>character(<replaceable>n</replaceable>)</type>, then an over-length + value will be truncated to <replaceable>n</replaceable> characters without raising an error. (This too is required by the <acronym>SQL</acronym> standard.) </para> <para> - The notations <type>varchar(<replaceable>n</>)</type> and - <type>char(<replaceable>n</>)</type> are aliases for <type>character - varying(<replaceable>n</>)</type> and - <type>character(<replaceable>n</>)</type>, respectively. + The notations <type>varchar(<replaceable>n</replaceable>)</type> and + <type>char(<replaceable>n</replaceable>)</type> are aliases for <type>character + varying(<replaceable>n</replaceable>)</type> and + <type>character(<replaceable>n</replaceable>)</type>, respectively. <type>character</type> without length specifier is equivalent to <type>character(1)</type>. If <type>character varying</type> is used without length specifier, the type accepts strings of any size. The - latter is a <productname>PostgreSQL</> extension. + latter is a <productname>PostgreSQL</productname> extension. </para> <para> @@ -1115,19 +1115,19 @@ SELECT '52093.89'::money::numeric::float8; <para> Values of type <type>character</type> are physically padded - with spaces to the specified width <replaceable>n</>, and are + with spaces to the specified width <replaceable>n</replaceable>, and are stored and displayed that way. However, trailing spaces are treated as semantically insignificant and disregarded when comparing two values of type <type>character</type>. In collations where whitespace is significant, this behavior can produce unexpected results; for example <command>SELECT 'a '::CHAR(2) collate "C" < - E'a\n'::CHAR(2)</command> returns true, even though <literal>C</> + E'a\n'::CHAR(2)</command> returns true, even though <literal>C</literal> locale would consider a space to be greater than a newline. Trailing spaces are removed when converting a <type>character</type> value to one of the other string types. Note that trailing spaces - <emphasis>are</> semantically significant in + <emphasis>are</emphasis> semantically significant in <type>character varying</type> and <type>text</type> values, and - when using pattern matching, that is <literal>LIKE</> and + when using pattern matching, that is <literal>LIKE</literal> and regular expressions. </para> @@ -1140,7 +1140,7 @@ SELECT '52093.89'::money::numeric::float8; stored in background tables so that they do not interfere with rapid access to shorter column values. In any case, the longest possible character string that can be stored is about 1 GB. (The - maximum value that will be allowed for <replaceable>n</> in the data + maximum value that will be allowed for <replaceable>n</replaceable> in the data type declaration is less than that. It wouldn't be useful to change this because with multibyte character encodings the number of characters and bytes can be quite different. If you desire to @@ -1155,10 +1155,10 @@ SELECT '52093.89'::money::numeric::float8; apart from increased storage space when using the blank-padded type, and a few extra CPU cycles to check the length when storing into a length-constrained column. While - <type>character(<replaceable>n</>)</type> has performance + <type>character(<replaceable>n</replaceable>)</type> has performance advantages in some other database systems, there is no such advantage in <productname>PostgreSQL</productname>; in fact - <type>character(<replaceable>n</>)</type> is usually the slowest of + <type>character(<replaceable>n</replaceable>)</type> is usually the slowest of the three because of its additional storage costs. In most situations <type>text</type> or <type>character varying</type> should be used instead. @@ -1220,7 +1220,7 @@ SELECT b, char_length(b) FROM test2; in the internal system catalogs and is not intended for use by the general user. Its length is currently defined as 64 bytes (63 usable characters plus terminator) but should be referenced using the constant - <symbol>NAMEDATALEN</symbol> in <literal>C</> source code. + <symbol>NAMEDATALEN</symbol> in <literal>C</literal> source code. The length is set at compile time (and is therefore adjustable for special uses); the default maximum length might change in a future release. The type <type>"char"</type> @@ -1304,7 +1304,7 @@ SELECT b, char_length(b) FROM test2; Second, operations on binary strings process the actual bytes, whereas the processing of character strings depends on locale settings. In short, binary strings are appropriate for storing data that the - programmer thinks of as <quote>raw bytes</>, whereas character + programmer thinks of as <quote>raw bytes</quote>, whereas character strings are appropriate for storing text. </para> @@ -1328,10 +1328,10 @@ SELECT b, char_length(b) FROM test2; </para> <sect2> - <title><type>bytea</> Hex Format</title> + <title><type>bytea</type> Hex Format</title> <para> - The <quote>hex</> format encodes binary data as 2 hexadecimal digits + The <quote>hex</quote> format encodes binary data as 2 hexadecimal digits per byte, most significant nibble first. The entire string is preceded by the sequence <literal>\x</literal> (to distinguish it from the escape format). In some contexts, the initial backslash may @@ -1355,7 +1355,7 @@ SELECT E'\\xDEADBEEF'; </sect2> <sect2> - <title><type>bytea</> Escape Format</title> + <title><type>bytea</type> Escape Format</title> <para> The <quote>escape</quote> format is the traditional @@ -1390,7 +1390,7 @@ SELECT E'\\xDEADBEEF'; </para> <table id="datatype-binary-sqlesc"> - <title><type>bytea</> Literal Escaped Octets</title> + <title><type>bytea</type> Literal Escaped Octets</title> <tgroup cols="5"> <thead> <row> @@ -1430,7 +1430,7 @@ SELECT E'\\xDEADBEEF'; <row> <entry>0 to 31 and 127 to 255</entry> <entry><quote>non-printable</quote> octets</entry> - <entry><literal>E'\\<replaceable>xxx'</></literal> (octal value)</entry> + <entry><literal>E'\\<replaceable>xxx'</replaceable></literal> (octal value)</entry> <entry><literal>SELECT E'\\001'::bytea;</literal></entry> <entry><literal>\001</literal></entry> </row> @@ -1481,7 +1481,7 @@ SELECT E'\\xDEADBEEF'; </para> <table id="datatype-binary-resesc"> - <title><type>bytea</> Output Escaped Octets</title> + <title><type>bytea</type> Output Escaped Octets</title> <tgroup cols="5"> <thead> <row> @@ -1506,7 +1506,7 @@ SELECT E'\\xDEADBEEF'; <row> <entry>0 to 31 and 127 to 255</entry> <entry><quote>non-printable</quote> octets</entry> - <entry><literal>\<replaceable>xxx</></literal> (octal value)</entry> + <entry><literal>\<replaceable>xxx</replaceable></literal> (octal value)</entry> <entry><literal>SELECT E'\\001'::bytea;</literal></entry> <entry><literal>\001</literal></entry> </row> @@ -1524,7 +1524,7 @@ SELECT E'\\xDEADBEEF'; </table> <para> - Depending on the front end to <productname>PostgreSQL</> you use, + Depending on the front end to <productname>PostgreSQL</productname> you use, you might have additional work to do in terms of escaping and unescaping <type>bytea</type> strings. For example, you might also have to escape line feeds and carriage returns if your interface @@ -1685,7 +1685,7 @@ MINUTE TO SECOND </literallayout> Note that if both <replaceable>fields</replaceable> and <replaceable>p</replaceable> are specified, the - <replaceable>fields</replaceable> must include <literal>SECOND</>, + <replaceable>fields</replaceable> must include <literal>SECOND</literal>, since the precision applies only to the seconds. </para> @@ -1717,9 +1717,9 @@ MINUTE TO SECOND For some formats, ordering of day, month, and year in date input is ambiguous and there is support for specifying the expected ordering of these fields. Set the <xref linkend="guc-datestyle"> parameter - to <literal>MDY</> to select month-day-year interpretation, - <literal>DMY</> to select day-month-year interpretation, or - <literal>YMD</> to select year-month-day interpretation. + to <literal>MDY</literal> to select month-day-year interpretation, + <literal>DMY</literal> to select day-month-year interpretation, or + <literal>YMD</literal> to select year-month-day interpretation. </para> <para> @@ -1784,19 +1784,19 @@ MINUTE TO SECOND </row> <row> <entry>1/8/1999</entry> - <entry>January 8 in <literal>MDY</> mode; - August 1 in <literal>DMY</> mode</entry> + <entry>January 8 in <literal>MDY</literal> mode; + August 1 in <literal>DMY</literal> mode</entry> </row> <row> <entry>1/18/1999</entry> - <entry>January 18 in <literal>MDY</> mode; + <entry>January 18 in <literal>MDY</literal> mode; rejected in other modes</entry> </row> <row> <entry>01/02/03</entry> - <entry>January 2, 2003 in <literal>MDY</> mode; - February 1, 2003 in <literal>DMY</> mode; - February 3, 2001 in <literal>YMD</> mode + <entry>January 2, 2003 in <literal>MDY</literal> mode; + February 1, 2003 in <literal>DMY</literal> mode; + February 3, 2001 in <literal>YMD</literal> mode </entry> </row> <row> @@ -1813,15 +1813,15 @@ MINUTE TO SECOND </row> <row> <entry>99-Jan-08</entry> - <entry>January 8 in <literal>YMD</> mode, else error</entry> + <entry>January 8 in <literal>YMD</literal> mode, else error</entry> </row> <row> <entry>08-Jan-99</entry> - <entry>January 8, except error in <literal>YMD</> mode</entry> + <entry>January 8, except error in <literal>YMD</literal> mode</entry> </row> <row> <entry>Jan-08-99</entry> - <entry>January 8, except error in <literal>YMD</> mode</entry> + <entry>January 8, except error in <literal>YMD</literal> mode</entry> </row> <row> <entry>19990108</entry> @@ -2070,20 +2070,20 @@ January 8 04:05:06 1999 PST For <type>timestamp with time zone</type>, the internally stored value is always in UTC (Universal Coordinated Time, traditionally known as Greenwich Mean Time, - <acronym>GMT</>). An input value that has an explicit + <acronym>GMT</acronym>). An input value that has an explicit time zone specified is converted to UTC using the appropriate offset for that time zone. If no time zone is stated in the input string, then it is assumed to be in the time zone indicated by the system's <xref linkend="guc-timezone"> parameter, and is converted to UTC using the - offset for the <varname>timezone</> zone. + offset for the <varname>timezone</varname> zone. </para> <para> When a <type>timestamp with time zone</type> value is output, it is always converted from UTC to the - current <varname>timezone</> zone, and displayed as local time in that + current <varname>timezone</varname> zone, and displayed as local time in that zone. To see the time in another time zone, either change - <varname>timezone</> or use the <literal>AT TIME ZONE</> construct + <varname>timezone</varname> or use the <literal>AT TIME ZONE</literal> construct (see <xref linkend="functions-datetime-zoneconvert">). </para> @@ -2091,8 +2091,8 @@ January 8 04:05:06 1999 PST Conversions between <type>timestamp without time zone</type> and <type>timestamp with time zone</type> normally assume that the <type>timestamp without time zone</type> value should be taken or given - as <varname>timezone</> local time. A different time zone can - be specified for the conversion using <literal>AT TIME ZONE</>. + as <varname>timezone</varname> local time. A different time zone can + be specified for the conversion using <literal>AT TIME ZONE</literal>. </para> </sect3> @@ -2117,7 +2117,7 @@ January 8 04:05:06 1999 PST are specially represented inside the system and will be displayed unchanged; but the others are simply notational shorthands that will be converted to ordinary date/time values when read. - (In particular, <literal>now</> and related strings are converted + (In particular, <literal>now</literal> and related strings are converted to a specific time value as soon as they are read.) All of these values need to be enclosed in single quotes when used as constants in SQL commands. @@ -2187,7 +2187,7 @@ January 8 04:05:06 1999 PST <literal>LOCALTIMESTAMP</literal>. The latter four accept an optional subsecond precision specification. (See <xref linkend="functions-datetime-current">.) Note that these are - SQL functions and are <emphasis>not</> recognized in data input strings. + SQL functions and are <emphasis>not</emphasis> recognized in data input strings. </para> </sect3> @@ -2211,8 +2211,8 @@ January 8 04:05:06 1999 PST <para> The output format of the date/time types can be set to one of the four styles ISO 8601, - <acronym>SQL</acronym> (Ingres), traditional <productname>POSTGRES</> - (Unix <application>date</> format), or + <acronym>SQL</acronym> (Ingres), traditional <productname>POSTGRES</productname> + (Unix <application>date</application> format), or German. The default is the <acronym>ISO</acronym> format. (The <acronym>SQL</acronym> standard requires the use of the ISO 8601 @@ -2222,7 +2222,7 @@ January 8 04:05:06 1999 PST output style. The output of the <type>date</type> and <type>time</type> types is generally only the date or time part in accordance with the given examples. However, the - <productname>POSTGRES</> style outputs date-only values in + <productname>POSTGRES</productname> style outputs date-only values in <acronym>ISO</acronym> format. </para> @@ -2263,9 +2263,9 @@ January 8 04:05:06 1999 PST <note> <para> - ISO 8601 specifies the use of uppercase letter <literal>T</> to separate - the date and time. <productname>PostgreSQL</> accepts that format on - input, but on output it uses a space rather than <literal>T</>, as shown + ISO 8601 specifies the use of uppercase letter <literal>T</literal> to separate + the date and time. <productname>PostgreSQL</productname> accepts that format on + input, but on output it uses a space rather than <literal>T</literal>, as shown above. This is for readability and for consistency with RFC 3339 as well as some other database systems. </para> @@ -2292,17 +2292,17 @@ January 8 04:05:06 1999 PST </thead> <tbody> <row> - <entry><literal>SQL, DMY</></entry> + <entry><literal>SQL, DMY</literal></entry> <entry><replaceable>day</replaceable>/<replaceable>month</replaceable>/<replaceable>year</replaceable></entry> <entry><literal>17/12/1997 15:37:16.00 CET</literal></entry> </row> <row> - <entry><literal>SQL, MDY</></entry> + <entry><literal>SQL, MDY</literal></entry> <entry><replaceable>month</replaceable>/<replaceable>day</replaceable>/<replaceable>year</replaceable></entry> <entry><literal>12/17/1997 07:37:16.00 PST</literal></entry> </row> <row> - <entry><literal>Postgres, DMY</></entry> + <entry><literal>Postgres, DMY</literal></entry> <entry><replaceable>day</replaceable>/<replaceable>month</replaceable>/<replaceable>year</replaceable></entry> <entry><literal>Wed 17 Dec 07:37:16 1997 PST</literal></entry> </row> @@ -2368,7 +2368,7 @@ January 8 04:05:06 1999 PST <listitem> <para> The default time zone is specified as a constant numeric offset - from <acronym>UTC</>. It is therefore impossible to adapt to + from <acronym>UTC</acronym>. It is therefore impossible to adapt to daylight-saving time when doing date/time arithmetic across <acronym>DST</acronym> boundaries. </para> @@ -2380,7 +2380,7 @@ January 8 04:05:06 1999 PST <para> To address these difficulties, we recommend using date/time types that contain both date and time when using time zones. We - do <emphasis>not</> recommend using the type <type>time with + do <emphasis>not</emphasis> recommend using the type <type>time with time zone</type> (though it is supported by <productname>PostgreSQL</productname> for legacy applications and for compliance with the <acronym>SQL</acronym> standard). @@ -2401,7 +2401,7 @@ January 8 04:05:06 1999 PST <itemizedlist> <listitem> <para> - A full time zone name, for example <literal>America/New_York</>. + A full time zone name, for example <literal>America/New_York</literal>. The recognized time zone names are listed in the <literal>pg_timezone_names</literal> view (see <xref linkend="view-pg-timezone-names">). @@ -2412,16 +2412,16 @@ January 8 04:05:06 1999 PST </listitem> <listitem> <para> - A time zone abbreviation, for example <literal>PST</>. Such a + A time zone abbreviation, for example <literal>PST</literal>. Such a specification merely defines a particular offset from UTC, in contrast to full time zone names which can imply a set of daylight savings transition-date rules as well. The recognized abbreviations - are listed in the <literal>pg_timezone_abbrevs</> view (see <xref + are listed in the <literal>pg_timezone_abbrevs</literal> view (see <xref linkend="view-pg-timezone-abbrevs">). You cannot set the configuration parameters <xref linkend="guc-timezone"> or <xref linkend="guc-log-timezone"> to a time zone abbreviation, but you can use abbreviations in - date/time input values and with the <literal>AT TIME ZONE</> + date/time input values and with the <literal>AT TIME ZONE</literal> operator. </para> </listitem> @@ -2429,25 +2429,25 @@ January 8 04:05:06 1999 PST <para> In addition to the timezone names and abbreviations, <productname>PostgreSQL</productname> will accept POSIX-style time zone - specifications of the form <replaceable>STD</><replaceable>offset</> or - <replaceable>STD</><replaceable>offset</><replaceable>DST</>, where - <replaceable>STD</> is a zone abbreviation, <replaceable>offset</> is a - numeric offset in hours west from UTC, and <replaceable>DST</> is an + specifications of the form <replaceable>STD</replaceable><replaceable>offset</replaceable> or + <replaceable>STD</replaceable><replaceable>offset</replaceable><replaceable>DST</replaceable>, where + <replaceable>STD</replaceable> is a zone abbreviation, <replaceable>offset</replaceable> is a + numeric offset in hours west from UTC, and <replaceable>DST</replaceable> is an optional daylight-savings zone abbreviation, assumed to stand for one - hour ahead of the given offset. For example, if <literal>EST5EDT</> + hour ahead of the given offset. For example, if <literal>EST5EDT</literal> were not already a recognized zone name, it would be accepted and would be functionally equivalent to United States East Coast time. In this syntax, a zone abbreviation can be a string of letters, or an - arbitrary string surrounded by angle brackets (<literal><></>). + arbitrary string surrounded by angle brackets (<literal><></literal>). When a daylight-savings zone abbreviation is present, it is assumed to be used according to the same daylight-savings transition rules used in the - IANA time zone database's <filename>posixrules</> entry. + IANA time zone database's <filename>posixrules</filename> entry. In a standard <productname>PostgreSQL</productname> installation, - <filename>posixrules</> is the same as <literal>US/Eastern</>, so + <filename>posixrules</filename> is the same as <literal>US/Eastern</literal>, so that POSIX-style time zone specifications follow USA daylight-savings rules. If needed, you can adjust this behavior by replacing the - <filename>posixrules</> file. + <filename>posixrules</filename> file. </para> </listitem> </itemizedlist> @@ -2456,10 +2456,10 @@ January 8 04:05:06 1999 PST and full names: abbreviations represent a specific offset from UTC, whereas many of the full names imply a local daylight-savings time rule, and so have two possible UTC offsets. As an example, - <literal>2014-06-04 12:00 America/New_York</> represents noon local + <literal>2014-06-04 12:00 America/New_York</literal> represents noon local time in New York, which for this particular date was Eastern Daylight - Time (UTC-4). So <literal>2014-06-04 12:00 EDT</> specifies that - same time instant. But <literal>2014-06-04 12:00 EST</> specifies + Time (UTC-4). So <literal>2014-06-04 12:00 EDT</literal> specifies that + same time instant. But <literal>2014-06-04 12:00 EST</literal> specifies noon Eastern Standard Time (UTC-5), regardless of whether daylight savings was nominally in effect on that date. </para> @@ -2467,10 +2467,10 @@ January 8 04:05:06 1999 PST <para> To complicate matters, some jurisdictions have used the same timezone abbreviation to mean different UTC offsets at different times; for - example, in Moscow <literal>MSK</> has meant UTC+3 in some years and - UTC+4 in others. <application>PostgreSQL</> interprets such + example, in Moscow <literal>MSK</literal> has meant UTC+3 in some years and + UTC+4 in others. <application>PostgreSQL</application> interprets such abbreviations according to whatever they meant (or had most recently - meant) on the specified date; but, as with the <literal>EST</> example + meant) on the specified date; but, as with the <literal>EST</literal> example above, this is not necessarily the same as local civil time on that date. </para> @@ -2478,18 +2478,18 @@ January 8 04:05:06 1999 PST One should be wary that the POSIX-style time zone feature can lead to silently accepting bogus input, since there is no check on the reasonableness of the zone abbreviations. For example, <literal>SET - TIMEZONE TO FOOBAR0</> will work, leaving the system effectively using + TIMEZONE TO FOOBAR0</literal> will work, leaving the system effectively using a rather peculiar abbreviation for UTC. Another issue to keep in mind is that in POSIX time zone names, - positive offsets are used for locations <emphasis>west</> of Greenwich. + positive offsets are used for locations <emphasis>west</emphasis> of Greenwich. Everywhere else, <productname>PostgreSQL</productname> follows the - ISO-8601 convention that positive timezone offsets are <emphasis>east</> + ISO-8601 convention that positive timezone offsets are <emphasis>east</emphasis> of Greenwich. </para> <para> In all cases, timezone names and abbreviations are recognized - case-insensitively. (This is a change from <productname>PostgreSQL</> + case-insensitively. (This is a change from <productname>PostgreSQL</productname> versions prior to 8.2, which were case-sensitive in some contexts but not others.) </para> @@ -2497,14 +2497,14 @@ January 8 04:05:06 1999 PST <para> Neither timezone names nor abbreviations are hard-wired into the server; they are obtained from configuration files stored under - <filename>.../share/timezone/</> and <filename>.../share/timezonesets/</> + <filename>.../share/timezone/</filename> and <filename>.../share/timezonesets/</filename> of the installation directory (see <xref linkend="datetime-config-files">). </para> <para> The <xref linkend="guc-timezone"> configuration parameter can - be set in the file <filename>postgresql.conf</>, or in any of the + be set in the file <filename>postgresql.conf</filename>, or in any of the other standard ways described in <xref linkend="runtime-config">. There are also some special ways to set it: @@ -2513,7 +2513,7 @@ January 8 04:05:06 1999 PST <para> The <acronym>SQL</acronym> command <command>SET TIME ZONE</command> sets the time zone for the session. This is an alternative spelling - of <command>SET TIMEZONE TO</> with a more SQL-spec-compatible syntax. + of <command>SET TIMEZONE TO</command> with a more SQL-spec-compatible syntax. </para> </listitem> @@ -2541,52 +2541,52 @@ January 8 04:05:06 1999 PST verbose syntax: <synopsis> -<optional>@</> <replaceable>quantity</> <replaceable>unit</> <optional><replaceable>quantity</> <replaceable>unit</>...</> <optional><replaceable>direction</></optional> +<optional>@</optional> <replaceable>quantity</replaceable> <replaceable>unit</replaceable> <optional><replaceable>quantity</replaceable> <replaceable>unit</replaceable>...</optional> <optional><replaceable>direction</replaceable></optional> </synopsis> - where <replaceable>quantity</> is a number (possibly signed); - <replaceable>unit</> is <literal>microsecond</literal>, + where <replaceable>quantity</replaceable> is a number (possibly signed); + <replaceable>unit</replaceable> is <literal>microsecond</literal>, <literal>millisecond</literal>, <literal>second</literal>, <literal>minute</literal>, <literal>hour</literal>, <literal>day</literal>, <literal>week</literal>, <literal>month</literal>, <literal>year</literal>, <literal>decade</literal>, <literal>century</literal>, <literal>millennium</literal>, or abbreviations or plurals of these units; - <replaceable>direction</> can be <literal>ago</literal> or - empty. The at sign (<literal>@</>) is optional noise. The amounts + <replaceable>direction</replaceable> can be <literal>ago</literal> or + empty. The at sign (<literal>@</literal>) is optional noise. The amounts of the different units are implicitly added with appropriate sign accounting. <literal>ago</literal> negates all the fields. This syntax is also used for interval output, if <xref linkend="guc-intervalstyle"> is set to - <literal>postgres_verbose</>. + <literal>postgres_verbose</literal>. </para> <para> Quantities of days, hours, minutes, and seconds can be specified without - explicit unit markings. For example, <literal>'1 12:59:10'</> is read - the same as <literal>'1 day 12 hours 59 min 10 sec'</>. Also, + explicit unit markings. For example, <literal>'1 12:59:10'</literal> is read + the same as <literal>'1 day 12 hours 59 min 10 sec'</literal>. Also, a combination of years and months can be specified with a dash; - for example <literal>'200-10'</> is read the same as <literal>'200 years - 10 months'</>. (These shorter forms are in fact the only ones allowed + for example <literal>'200-10'</literal> is read the same as <literal>'200 years + 10 months'</literal>. (These shorter forms are in fact the only ones allowed by the <acronym>SQL</acronym> standard, and are used for output when - <varname>IntervalStyle</> is set to <literal>sql_standard</literal>.) + <varname>IntervalStyle</varname> is set to <literal>sql_standard</literal>.) </para> <para> Interval values can also be written as ISO 8601 time intervals, using - either the <quote>format with designators</> of the standard's section - 4.4.3.2 or the <quote>alternative format</> of section 4.4.3.3. The + either the <quote>format with designators</quote> of the standard's section + 4.4.3.2 or the <quote>alternative format</quote> of section 4.4.3.3. The format with designators looks like this: <synopsis> -P <replaceable>quantity</> <replaceable>unit</> <optional> <replaceable>quantity</> <replaceable>unit</> ...</optional> <optional> T <optional> <replaceable>quantity</> <replaceable>unit</> ...</optional></optional> +P <replaceable>quantity</replaceable> <replaceable>unit</replaceable> <optional> <replaceable>quantity</replaceable> <replaceable>unit</replaceable> ...</optional> <optional> T <optional> <replaceable>quantity</replaceable> <replaceable>unit</replaceable> ...</optional></optional> </synopsis> - The string must start with a <literal>P</>, and may include a - <literal>T</> that introduces the time-of-day units. The + The string must start with a <literal>P</literal>, and may include a + <literal>T</literal> that introduces the time-of-day units. The available unit abbreviations are given in <xref linkend="datatype-interval-iso8601-units">. Units may be omitted, and may be specified in any order, but units smaller than - a day must appear after <literal>T</>. In particular, the meaning of - <literal>M</> depends on whether it is before or after - <literal>T</>. + a day must appear after <literal>T</literal>. In particular, the meaning of + <literal>M</literal> depends on whether it is before or after + <literal>T</literal>. </para> <table id="datatype-interval-iso8601-units"> @@ -2634,51 +2634,51 @@ P <replaceable>quantity</> <replaceable>unit</> <optional> <replaceable>quantity <para> In the alternative format: <synopsis> -P <optional> <replaceable>years</>-<replaceable>months</>-<replaceable>days</> </optional> <optional> T <replaceable>hours</>:<replaceable>minutes</>:<replaceable>seconds</> </optional> +P <optional> <replaceable>years</replaceable>-<replaceable>months</replaceable>-<replaceable>days</replaceable> </optional> <optional> T <replaceable>hours</replaceable>:<replaceable>minutes</replaceable>:<replaceable>seconds</replaceable> </optional> </synopsis> the string must begin with <literal>P</literal>, and a - <literal>T</> separates the date and time parts of the interval. + <literal>T</literal> separates the date and time parts of the interval. The values are given as numbers similar to ISO 8601 dates. </para> <para> - When writing an interval constant with a <replaceable>fields</> + When writing an interval constant with a <replaceable>fields</replaceable> specification, or when assigning a string to an interval column that was - defined with a <replaceable>fields</> specification, the interpretation of - unmarked quantities depends on the <replaceable>fields</>. For - example <literal>INTERVAL '1' YEAR</> is read as 1 year, whereas - <literal>INTERVAL '1'</> means 1 second. Also, field values - <quote>to the right</> of the least significant field allowed by the - <replaceable>fields</> specification are silently discarded. For - example, writing <literal>INTERVAL '1 day 2:03:04' HOUR TO MINUTE</> + defined with a <replaceable>fields</replaceable> specification, the interpretation of + unmarked quantities depends on the <replaceable>fields</replaceable>. For + example <literal>INTERVAL '1' YEAR</literal> is read as 1 year, whereas + <literal>INTERVAL '1'</literal> means 1 second. Also, field values + <quote>to the right</quote> of the least significant field allowed by the + <replaceable>fields</replaceable> specification are silently discarded. For + example, writing <literal>INTERVAL '1 day 2:03:04' HOUR TO MINUTE</literal> results in dropping the seconds field, but not the day field. </para> <para> - According to the <acronym>SQL</> standard all fields of an interval + According to the <acronym>SQL</acronym> standard all fields of an interval value must have the same sign, so a leading negative sign applies to all fields; for example the negative sign in the interval literal - <literal>'-1 2:03:04'</> applies to both the days and hour/minute/second - parts. <productname>PostgreSQL</> allows the fields to have different + <literal>'-1 2:03:04'</literal> applies to both the days and hour/minute/second + parts. <productname>PostgreSQL</productname> allows the fields to have different signs, and traditionally treats each field in the textual representation as independently signed, so that the hour/minute/second part is - considered positive in this example. If <varname>IntervalStyle</> is + considered positive in this example. If <varname>IntervalStyle</varname> is set to <literal>sql_standard</literal> then a leading sign is considered to apply to all fields (but only if no additional signs appear). - Otherwise the traditional <productname>PostgreSQL</> interpretation is + Otherwise the traditional <productname>PostgreSQL</productname> interpretation is used. To avoid ambiguity, it's recommended to attach an explicit sign to each field if any field is negative. </para> <para> - Internally <type>interval</> values are stored as months, days, + Internally <type>interval</type> values are stored as months, days, and seconds. This is done because the number of days in a month varies, and a day can have 23 or 25 hours if a daylight savings time adjustment is involved. The months and days fields are integers while the seconds field can store fractions. Because intervals are - usually created from constant strings or <type>timestamp</> subtraction, + usually created from constant strings or <type>timestamp</type> subtraction, this storage method works well in most cases. Functions - <function>justify_days</> and <function>justify_hours</> are + <function>justify_days</function> and <function>justify_hours</function> are available for adjusting days and hours that overflow their normal ranges. </para> @@ -2686,18 +2686,18 @@ P <optional> <replaceable>years</>-<replaceable>months</>-<replaceable>days</> < <para> In the verbose input format, and in some fields of the more compact input formats, field values can have fractional parts; for example - <literal>'1.5 week'</> or <literal>'01:02:03.45'</>. Such input is + <literal>'1.5 week'</literal> or <literal>'01:02:03.45'</literal>. Such input is converted to the appropriate number of months, days, and seconds for storage. When this would result in a fractional number of months or days, the fraction is added to the lower-order fields using the conversion factors 1 month = 30 days and 1 day = 24 hours. - For example, <literal>'1.5 month'</> becomes 1 month and 15 days. + For example, <literal>'1.5 month'</literal> becomes 1 month and 15 days. Only seconds will ever be shown as fractional on output. </para> <para> <xref linkend="datatype-interval-input-examples"> shows some examples - of valid <type>interval</> input. + of valid <type>interval</type> input. </para> <table id="datatype-interval-input-examples"> @@ -2724,11 +2724,11 @@ P <optional> <replaceable>years</>-<replaceable>months</>-<replaceable>days</> < </row> <row> <entry>P1Y2M3DT4H5M6S</entry> - <entry>ISO 8601 <quote>format with designators</>: same meaning as above</entry> + <entry>ISO 8601 <quote>format with designators</quote>: same meaning as above</entry> </row> <row> <entry>P0001-02-03T04:05:06</entry> - <entry>ISO 8601 <quote>alternative format</>: same meaning as above</entry> + <entry>ISO 8601 <quote>alternative format</quote>: same meaning as above</entry> </row> </tbody> </tgroup> @@ -2747,16 +2747,16 @@ P <optional> <replaceable>years</>-<replaceable>months</>-<replaceable>days</> < <para> The output format of the interval type can be set to one of the - four styles <literal>sql_standard</>, <literal>postgres</>, - <literal>postgres_verbose</>, or <literal>iso_8601</>, + four styles <literal>sql_standard</literal>, <literal>postgres</literal>, + <literal>postgres_verbose</literal>, or <literal>iso_8601</literal>, using the command <literal>SET intervalstyle</literal>. - The default is the <literal>postgres</> format. + The default is the <literal>postgres</literal> format. <xref linkend="interval-style-output-table"> shows examples of each output style. </para> <para> - The <literal>sql_standard</> style produces output that conforms to + The <literal>sql_standard</literal> style produces output that conforms to the SQL standard's specification for interval literal strings, if the interval value meets the standard's restrictions (either year-month only or day-time only, with no mixing of positive @@ -2766,20 +2766,20 @@ P <optional> <replaceable>years</>-<replaceable>months</>-<replaceable>days</> < </para> <para> - The output of the <literal>postgres</> style matches the output of - <productname>PostgreSQL</> releases prior to 8.4 when the - <xref linkend="guc-datestyle"> parameter was set to <literal>ISO</>. + The output of the <literal>postgres</literal> style matches the output of + <productname>PostgreSQL</productname> releases prior to 8.4 when the + <xref linkend="guc-datestyle"> parameter was set to <literal>ISO</literal>. </para> <para> - The output of the <literal>postgres_verbose</> style matches the output of - <productname>PostgreSQL</> releases prior to 8.4 when the - <varname>DateStyle</> parameter was set to non-<literal>ISO</> output. + The output of the <literal>postgres_verbose</literal> style matches the output of + <productname>PostgreSQL</productname> releases prior to 8.4 when the + <varname>DateStyle</varname> parameter was set to non-<literal>ISO</literal> output. </para> <para> - The output of the <literal>iso_8601</> style matches the <quote>format - with designators</> described in section 4.4.3.2 of the + The output of the <literal>iso_8601</literal> style matches the <quote>format + with designators</quote> described in section 4.4.3.2 of the ISO 8601 standard. </para> @@ -2796,25 +2796,25 @@ P <optional> <replaceable>years</>-<replaceable>months</>-<replaceable>days</> < </thead> <tbody> <row> - <entry><literal>sql_standard</></entry> + <entry><literal>sql_standard</literal></entry> <entry>1-2</entry> <entry>3 4:05:06</entry> <entry>-1-2 +3 -4:05:06</entry> </row> <row> - <entry><literal>postgres</></entry> + <entry><literal>postgres</literal></entry> <entry>1 year 2 mons</entry> <entry>3 days 04:05:06</entry> <entry>-1 year -2 mons +3 days -04:05:06</entry> </row> <row> - <entry><literal>postgres_verbose</></entry> + <entry><literal>postgres_verbose</literal></entry> <entry>@ 1 year 2 mons</entry> <entry>@ 3 days 4 hours 5 mins 6 secs</entry> <entry>@ 1 year 2 mons -3 days 4 hours 5 mins 6 secs ago</entry> </row> <row> - <entry><literal>iso_8601</></entry> + <entry><literal>iso_8601</literal></entry> <entry>P1Y2M</entry> <entry>P3DT4H5M6S</entry> <entry>P-1Y-2M3DT-4H-5M-6S</entry> @@ -3178,7 +3178,7 @@ SELECT person.name, holidays.num_weeks FROM person, holidays <replaceable>x</replaceable> , <replaceable>y</replaceable> </synopsis> - where <replaceable>x</> and <replaceable>y</> are the respective + where <replaceable>x</replaceable> and <replaceable>y</replaceable> are the respective coordinates, as floating-point numbers. </para> @@ -3196,8 +3196,8 @@ SELECT person.name, holidays.num_weeks FROM person, holidays <para> Lines are represented by the linear - equation <replaceable>A</>x + <replaceable>B</>y + <replaceable>C</> = 0, - where <replaceable>A</> and <replaceable>B</> are not both zero. Values + equation <replaceable>A</replaceable>x + <replaceable>B</replaceable>y + <replaceable>C</replaceable> = 0, + where <replaceable>A</replaceable> and <replaceable>B</replaceable> are not both zero. Values of type <type>line</type> are input and output in the following form: <synopsis> { <replaceable>A</replaceable>, <replaceable>B</replaceable>, <replaceable>C</replaceable> } @@ -3324,8 +3324,8 @@ SELECT person.name, holidays.num_weeks FROM person, holidays </synopsis> where the points are the end points of the line segments - comprising the path. Square brackets (<literal>[]</>) indicate - an open path, while parentheses (<literal>()</>) indicate a + comprising the path. Square brackets (<literal>[]</literal>) indicate + an open path, while parentheses (<literal>()</literal>) indicate a closed path. When the outermost parentheses are omitted, as in the third through fifth syntaxes, a closed path is assumed. </para> @@ -3388,7 +3388,7 @@ SELECT person.name, holidays.num_weeks FROM person, holidays </synopsis> where - <literal>(<replaceable>x</replaceable>,<replaceable>y</replaceable>)</> + <literal>(<replaceable>x</replaceable>,<replaceable>y</replaceable>)</literal> is the center point and <replaceable>r</replaceable> is the radius of the circle. </para> @@ -3409,7 +3409,7 @@ SELECT person.name, holidays.num_weeks FROM person, holidays </indexterm> <para> - <productname>PostgreSQL</> offers data types to store IPv4, IPv6, and MAC + <productname>PostgreSQL</productname> offers data types to store IPv4, IPv6, and MAC addresses, as shown in <xref linkend="datatype-net-types-table">. It is better to use these types instead of plain text types to store network addresses, because @@ -3503,7 +3503,7 @@ SELECT person.name, holidays.num_weeks FROM person, holidays </sect2> <sect2 id="datatype-cidr"> - <title><type>cidr</></title> + <title><type>cidr</type></title> <indexterm> <primary>cidr</primary> @@ -3514,11 +3514,11 @@ SELECT person.name, holidays.num_weeks FROM person, holidays Input and output formats follow Classless Internet Domain Routing conventions. The format for specifying networks is <replaceable - class="parameter">address/y</> where <replaceable - class="parameter">address</> is the network represented as an + class="parameter">address/y</replaceable> where <replaceable + class="parameter">address</replaceable> is the network represented as an IPv4 or IPv6 address, and <replaceable - class="parameter">y</> is the number of bits in the netmask. If - <replaceable class="parameter">y</> is omitted, it is calculated + class="parameter">y</replaceable> is the number of bits in the netmask. If + <replaceable class="parameter">y</replaceable> is omitted, it is calculated using assumptions from the older classful network numbering system, except it will be at least large enough to include all of the octets written in the input. It is an error to specify a network address @@ -3530,7 +3530,7 @@ SELECT person.name, holidays.num_weeks FROM person, holidays </para> <table id="datatype-net-cidr-table"> - <title><type>cidr</> Type Input Examples</title> + <title><type>cidr</type> Type Input Examples</title> <tgroup cols="3"> <thead> <row> @@ -3639,8 +3639,8 @@ SELECT person.name, holidays.num_weeks FROM person, holidays <tip> <para> If you do not like the output format for <type>inet</type> or - <type>cidr</type> values, try the functions <function>host</>, - <function>text</>, and <function>abbrev</>. + <type>cidr</type> values, try the functions <function>host</function>, + <function>text</function>, and <function>abbrev</function>. </para> </tip> </sect2> @@ -3658,24 +3658,24 @@ SELECT person.name, holidays.num_weeks FROM person, holidays </indexterm> <para> - The <type>macaddr</> type stores MAC addresses, known for example + The <type>macaddr</type> type stores MAC addresses, known for example from Ethernet card hardware addresses (although MAC addresses are used for other purposes as well). Input is accepted in the following formats: <simplelist> - <member><literal>'08:00:2b:01:02:03'</></member> - <member><literal>'08-00-2b-01-02-03'</></member> - <member><literal>'08002b:010203'</></member> - <member><literal>'08002b-010203'</></member> - <member><literal>'0800.2b01.0203'</></member> - <member><literal>'0800-2b01-0203'</></member> - <member><literal>'08002b010203'</></member> + <member><literal>'08:00:2b:01:02:03'</literal></member> + <member><literal>'08-00-2b-01-02-03'</literal></member> + <member><literal>'08002b:010203'</literal></member> + <member><literal>'08002b-010203'</literal></member> + <member><literal>'0800.2b01.0203'</literal></member> + <member><literal>'0800-2b01-0203'</literal></member> + <member><literal>'08002b010203'</literal></member> </simplelist> These examples would all specify the same address. Upper and lower case is accepted for the digits - <literal>a</> through <literal>f</>. Output is always in the + <literal>a</literal> through <literal>f</literal>. Output is always in the first of the forms shown. </para> @@ -3708,7 +3708,7 @@ SELECT person.name, holidays.num_weeks FROM person, holidays </indexterm> <para> - The <type>macaddr8</> type stores MAC addresses in EUI-64 + The <type>macaddr8</type> type stores MAC addresses in EUI-64 format, known for example from Ethernet card hardware addresses (although MAC addresses are used for other purposes as well). This type can accept both 6 and 8 byte length MAC addresses @@ -3718,31 +3718,31 @@ SELECT person.name, holidays.num_weeks FROM person, holidays Note that IPv6 uses a modified EUI-64 format where the 7th bit should be set to one after the conversion from EUI-48. The - function <function>macaddr8_set7bit</> is provided to make this + function <function>macaddr8_set7bit</function> is provided to make this change. Generally speaking, any input which is comprised of pairs of hex digits (on byte boundaries), optionally separated consistently by - one of <literal>':'</>, <literal>'-'</> or <literal>'.'</>, is + one of <literal>':'</literal>, <literal>'-'</literal> or <literal>'.'</literal>, is accepted. The number of hex digits must be either 16 (8 bytes) or 12 (6 bytes). Leading and trailing whitespace is ignored. The following are examples of input formats that are accepted: <simplelist> - <member><literal>'08:00:2b:01:02:03:04:05'</></member> - <member><literal>'08-00-2b-01-02-03-04-05'</></member> - <member><literal>'08002b:0102030405'</></member> - <member><literal>'08002b-0102030405'</></member> - <member><literal>'0800.2b01.0203.0405'</></member> - <member><literal>'0800-2b01-0203-0405'</></member> - <member><literal>'08002b01:02030405'</></member> - <member><literal>'08002b0102030405'</></member> + <member><literal>'08:00:2b:01:02:03:04:05'</literal></member> + <member><literal>'08-00-2b-01-02-03-04-05'</literal></member> + <member><literal>'08002b:0102030405'</literal></member> + <member><literal>'08002b-0102030405'</literal></member> + <member><literal>'0800.2b01.0203.0405'</literal></member> + <member><literal>'0800-2b01-0203-0405'</literal></member> + <member><literal>'08002b01:02030405'</literal></member> + <member><literal>'08002b0102030405'</literal></member> </simplelist> These examples would all specify the same address. Upper and lower case is accepted for the digits - <literal>a</> through <literal>f</>. Output is always in the + <literal>a</literal> through <literal>f</literal>. Output is always in the first of the forms shown. The last six input formats that are mentioned above are not part @@ -3750,7 +3750,7 @@ SELECT person.name, holidays.num_weeks FROM person, holidays To convert a traditional 48 bit MAC address in EUI-48 format to modified EUI-64 format to be included as the host portion of an - IPv6 address, use <function>macaddr8_set7bit</> as shown: + IPv6 address, use <function>macaddr8_set7bit</function> as shown: <programlisting> SELECT macaddr8_set7bit('08:00:2b:01:02:03'); @@ -3798,12 +3798,12 @@ SELECT macaddr8_set7bit('08:00:2b:01:02:03'); <note> <para> If one explicitly casts a bit-string value to - <type>bit(<replaceable>n</>)</type>, it will be truncated or - zero-padded on the right to be exactly <replaceable>n</> bits, + <type>bit(<replaceable>n</replaceable>)</type>, it will be truncated or + zero-padded on the right to be exactly <replaceable>n</replaceable> bits, without raising an error. Similarly, if one explicitly casts a bit-string value to - <type>bit varying(<replaceable>n</>)</type>, it will be truncated - on the right if it is more than <replaceable>n</> bits. + <type>bit varying(<replaceable>n</replaceable>)</type>, it will be truncated + on the right if it is more than <replaceable>n</replaceable> bits. </para> </note> @@ -3860,8 +3860,8 @@ SELECT * FROM test; <para> <productname>PostgreSQL</productname> provides two data types that are designed to support full text search, which is the activity of - searching through a collection of natural-language <firstterm>documents</> - to locate those that best match a <firstterm>query</>. + searching through a collection of natural-language <firstterm>documents</firstterm> + to locate those that best match a <firstterm>query</firstterm>. The <type>tsvector</type> type represents a document in a form optimized for text search; the <type>tsquery</type> type similarly represents a text query. @@ -3879,8 +3879,8 @@ SELECT * FROM test; <para> A <type>tsvector</type> value is a sorted list of distinct - <firstterm>lexemes</>, which are words that have been - <firstterm>normalized</> to merge different variants of the same word + <firstterm>lexemes</firstterm>, which are words that have been + <firstterm>normalized</firstterm> to merge different variants of the same word (see <xref linkend="textsearch"> for details). Sorting and duplicate-elimination are done automatically during input, as shown in this example: @@ -3913,7 +3913,7 @@ SELECT $$the lexeme 'Joe''s' contains a quote$$::tsvector; 'Joe''s' 'a' 'contains' 'lexeme' 'quote' 'the' </programlisting> - Optionally, integer <firstterm>positions</> + Optionally, integer <firstterm>positions</firstterm> can be attached to lexemes: <programlisting> @@ -3932,7 +3932,7 @@ SELECT 'a:1 fat:2 cat:3 sat:4 on:5 a:6 mat:7 and:8 ate:9 a:10 fat:11 rat:12'::ts <para> Lexemes that have positions can further be labeled with a - <firstterm>weight</>, which can be <literal>A</literal>, + <firstterm>weight</firstterm>, which can be <literal>A</literal>, <literal>B</literal>, <literal>C</literal>, or <literal>D</literal>. <literal>D</literal> is the default and hence is not shown on output: @@ -3965,7 +3965,7 @@ SELECT 'The Fat Rats'::tsvector; For most English-text-searching applications the above words would be considered non-normalized, but <type>tsvector</type> doesn't care. Raw document text should usually be passed through - <function>to_tsvector</> to normalize the words appropriately + <function>to_tsvector</function> to normalize the words appropriately for searching: <programlisting> @@ -3991,17 +3991,17 @@ SELECT to_tsvector('english', 'The Fat Rats'); A <type>tsquery</type> value stores lexemes that are to be searched for, and can combine them using the Boolean operators <literal>&</literal> (AND), <literal>|</literal> (OR), and - <literal>!</> (NOT), as well as the phrase search operator - <literal><-></> (FOLLOWED BY). There is also a variant - <literal><<replaceable>N</>></literal> of the FOLLOWED BY - operator, where <replaceable>N</> is an integer constant that + <literal>!</literal> (NOT), as well as the phrase search operator + <literal><-></literal> (FOLLOWED BY). There is also a variant + <literal><<replaceable>N</replaceable>></literal> of the FOLLOWED BY + operator, where <replaceable>N</replaceable> is an integer constant that specifies the distance between the two lexemes being searched - for. <literal><-></> is equivalent to <literal><1></>. + for. <literal><-></literal> is equivalent to <literal><1></literal>. </para> <para> Parentheses can be used to enforce grouping of these operators. - In the absence of parentheses, <literal>!</> (NOT) binds most tightly, + In the absence of parentheses, <literal>!</literal> (NOT) binds most tightly, <literal><-></literal> (FOLLOWED BY) next most tightly, then <literal>&</literal> (AND), with <literal>|</literal> (OR) binding the least tightly. @@ -4031,7 +4031,7 @@ SELECT 'fat & rat & ! cat'::tsquery; <para> Optionally, lexemes in a <type>tsquery</type> can be labeled with one or more weight letters, which restricts them to match only - <type>tsvector</> lexemes with one of those weights: + <type>tsvector</type> lexemes with one of those weights: <programlisting> SELECT 'fat:ab & cat'::tsquery; @@ -4042,7 +4042,7 @@ SELECT 'fat:ab & cat'::tsquery; </para> <para> - Also, lexemes in a <type>tsquery</type> can be labeled with <literal>*</> + Also, lexemes in a <type>tsquery</type> can be labeled with <literal>*</literal> to specify prefix matching: <programlisting> SELECT 'super:*'::tsquery; @@ -4050,15 +4050,15 @@ SELECT 'super:*'::tsquery; ----------- 'super':* </programlisting> - This query will match any word in a <type>tsvector</> that begins - with <quote>super</>. + This query will match any word in a <type>tsvector</type> that begins + with <quote>super</quote>. </para> <para> Quoting rules for lexemes are the same as described previously for - lexemes in <type>tsvector</>; and, as with <type>tsvector</>, + lexemes in <type>tsvector</type>; and, as with <type>tsvector</type>, any required normalization of words must be done before converting - to the <type>tsquery</> type. The <function>to_tsquery</> + to the <type>tsquery</type> type. The <function>to_tsquery</function> function is convenient for performing such normalization: <programlisting> @@ -4068,7 +4068,7 @@ SELECT to_tsquery('Fat:ab & Cats'); 'fat':AB & 'cat' </programlisting> - Note that <function>to_tsquery</> will process prefixes in the same way + Note that <function>to_tsquery</function> will process prefixes in the same way as other words, which means this comparison returns true: <programlisting> @@ -4077,14 +4077,14 @@ SELECT to_tsvector( 'postgraduate' ) @@ to_tsquery( 'postgres:*' ); ---------- t </programlisting> - because <literal>postgres</> gets stemmed to <literal>postgr</>: + because <literal>postgres</literal> gets stemmed to <literal>postgr</literal>: <programlisting> SELECT to_tsvector( 'postgraduate' ), to_tsquery( 'postgres:*' ); to_tsvector | to_tsquery ---------------+------------ 'postgradu':1 | 'postgr':* </programlisting> - which will match the stemmed form of <literal>postgraduate</>. + which will match the stemmed form of <literal>postgraduate</literal>. </para> </sect2> @@ -4150,7 +4150,7 @@ a0ee-bc99-9c0b-4ef8-bb6d-6bb9-bd38-0a11 </sect1> <sect1 id="datatype-xml"> - <title><acronym>XML</> Type</title> + <title><acronym>XML</acronym> Type</title> <indexterm zone="datatype-xml"> <primary>XML</primary> @@ -4163,7 +4163,7 @@ a0ee-bc99-9c0b-4ef8-bb6d-6bb9-bd38-0a11 functions to perform type-safe operations on it; see <xref linkend="functions-xml">. Use of this data type requires the installation to have been built with <command>configure - --with-libxml</>. + --with-libxml</command>. </para> <para> @@ -4311,7 +4311,7 @@ SET xmloption TO { DOCUMENT | CONTENT }; <para> Some XML-related functions may not work at all on non-ASCII data when the server encoding is not UTF-8. This is known to be an - issue for <function>xmltable()</> and <function>xpath()</> in particular. + issue for <function>xmltable()</function> and <function>xpath()</function> in particular. </para> </caution> </sect2> @@ -4421,17 +4421,17 @@ SET xmloption TO { DOCUMENT | CONTENT }; system tables. OIDs are not added to user-created tables, unless <literal>WITH OIDS</literal> is specified when the table is created, or the <xref linkend="guc-default-with-oids"> - configuration variable is enabled. Type <type>oid</> represents + configuration variable is enabled. Type <type>oid</type> represents an object identifier. There are also several alias types for - <type>oid</>: <type>regproc</>, <type>regprocedure</>, - <type>regoper</>, <type>regoperator</>, <type>regclass</>, - <type>regtype</>, <type>regrole</>, <type>regnamespace</>, - <type>regconfig</>, and <type>regdictionary</>. + <type>oid</type>: <type>regproc</type>, <type>regprocedure</type>, + <type>regoper</type>, <type>regoperator</type>, <type>regclass</type>, + <type>regtype</type>, <type>regrole</type>, <type>regnamespace</type>, + <type>regconfig</type>, and <type>regdictionary</type>. <xref linkend="datatype-oid-table"> shows an overview. </para> <para> - The <type>oid</> type is currently implemented as an unsigned + The <type>oid</type> type is currently implemented as an unsigned four-byte integer. Therefore, it is not large enough to provide database-wide uniqueness in large databases, or even in large individual tables. So, using a user-created table's OID column as @@ -4440,7 +4440,7 @@ SET xmloption TO { DOCUMENT | CONTENT }; </para> <para> - The <type>oid</> type itself has few operations beyond comparison. + The <type>oid</type> type itself has few operations beyond comparison. It can be cast to integer, however, and then manipulated using the standard integer operators. (Beware of possible signed-versus-unsigned confusion if you do this.) @@ -4450,10 +4450,10 @@ SET xmloption TO { DOCUMENT | CONTENT }; The OID alias types have no operations of their own except for specialized input and output routines. These routines are able to accept and display symbolic names for system objects, rather than - the raw numeric value that type <type>oid</> would use. The alias + the raw numeric value that type <type>oid</type> would use. The alias types allow simplified lookup of OID values for objects. For example, - to examine the <structname>pg_attribute</> rows related to a table - <literal>mytable</>, one could write: + to examine the <structname>pg_attribute</structname> rows related to a table + <literal>mytable</literal>, one could write: <programlisting> SELECT * FROM pg_attribute WHERE attrelid = 'mytable'::regclass; </programlisting> @@ -4465,11 +4465,11 @@ SELECT * FROM pg_attribute While that doesn't look all that bad by itself, it's still oversimplified. A far more complicated sub-select would be needed to select the right OID if there are multiple tables named - <literal>mytable</> in different schemas. - The <type>regclass</> input converter handles the table lookup according - to the schema path setting, and so it does the <quote>right thing</> + <literal>mytable</literal> in different schemas. + The <type>regclass</type> input converter handles the table lookup according + to the schema path setting, and so it does the <quote>right thing</quote> automatically. Similarly, casting a table's OID to - <type>regclass</> is handy for symbolic display of a numeric OID. + <type>regclass</type> is handy for symbolic display of a numeric OID. </para> <table id="datatype-oid-table"> @@ -4487,80 +4487,80 @@ SELECT * FROM pg_attribute <tbody> <row> - <entry><type>oid</></entry> + <entry><type>oid</type></entry> <entry>any</entry> <entry>numeric object identifier</entry> - <entry><literal>564182</></entry> + <entry><literal>564182</literal></entry> </row> <row> - <entry><type>regproc</></entry> - <entry><structname>pg_proc</></entry> + <entry><type>regproc</type></entry> + <entry><structname>pg_proc</structname></entry> <entry>function name</entry> - <entry><literal>sum</></entry> + <entry><literal>sum</literal></entry> </row> <row> - <entry><type>regprocedure</></entry> - <entry><structname>pg_proc</></entry> + <entry><type>regprocedure</type></entry> + <entry><structname>pg_proc</structname></entry> <entry>function with argument types</entry> - <entry><literal>sum(int4)</></entry> + <entry><literal>sum(int4)</literal></entry> </row> <row> - <entry><type>regoper</></entry> - <entry><structname>pg_operator</></entry> + <entry><type>regoper</type></entry> + <entry><structname>pg_operator</structname></entry> <entry>operator name</entry> - <entry><literal>+</></entry> + <entry><literal>+</literal></entry> </row> <row> - <entry><type>regoperator</></entry> - <entry><structname>pg_operator</></entry> + <entry><type>regoperator</type></entry> + <entry><structname>pg_operator</structname></entry> <entry>operator with argument types</entry> - <entry><literal>*(integer,integer)</> or <literal>-(NONE,integer)</></entry> + <entry><literal>*(integer,integer)</literal> or <literal>-(NONE,integer)</literal></entry> </row> <row> - <entry><type>regclass</></entry> - <entry><structname>pg_class</></entry> + <entry><type>regclass</type></entry> + <entry><structname>pg_class</structname></entry> <entry>relation name</entry> - <entry><literal>pg_type</></entry> + <entry><literal>pg_type</literal></entry> </row> <row> - <entry><type>regtype</></entry> - <entry><structname>pg_type</></entry> + <entry><type>regtype</type></entry> + <entry><structname>pg_type</structname></entry> <entry>data type name</entry> - <entry><literal>integer</></entry> + <entry><literal>integer</literal></entry> </row> <row> - <entry><type>regrole</></entry> - <entry><structname>pg_authid</></entry> + <entry><type>regrole</type></entry> + <entry><structname>pg_authid</structname></entry> <entry>role name</entry> - <entry><literal>smithee</></entry> + <entry><literal>smithee</literal></entry> </row> <row> - <entry><type>regnamespace</></entry> - <entry><structname>pg_namespace</></entry> + <entry><type>regnamespace</type></entry> + <entry><structname>pg_namespace</structname></entry> <entry>namespace name</entry> - <entry><literal>pg_catalog</></entry> + <entry><literal>pg_catalog</literal></entry> </row> <row> - <entry><type>regconfig</></entry> - <entry><structname>pg_ts_config</></entry> + <entry><type>regconfig</type></entry> + <entry><structname>pg_ts_config</structname></entry> <entry>text search configuration</entry> - <entry><literal>english</></entry> + <entry><literal>english</literal></entry> </row> <row> - <entry><type>regdictionary</></entry> - <entry><structname>pg_ts_dict</></entry> + <entry><type>regdictionary</type></entry> + <entry><structname>pg_ts_dict</structname></entry> <entry>text search dictionary</entry> - <entry><literal>simple</></entry> + <entry><literal>simple</literal></entry> </row> </tbody> </tgroup> @@ -4571,11 +4571,11 @@ SELECT * FROM pg_attribute schema-qualified names, and will display schema-qualified names on output if the object would not be found in the current search path without being qualified. - The <type>regproc</> and <type>regoper</> alias types will only + The <type>regproc</type> and <type>regoper</type> alias types will only accept input names that are unique (not overloaded), so they are - of limited use; for most uses <type>regprocedure</> or - <type>regoperator</> are more appropriate. For <type>regoperator</>, - unary operators are identified by writing <literal>NONE</> for the unused + of limited use; for most uses <type>regprocedure</type> or + <type>regoperator</type> are more appropriate. For <type>regoperator</type>, + unary operators are identified by writing <literal>NONE</literal> for the unused operand. </para> @@ -4585,12 +4585,12 @@ SELECT * FROM pg_attribute constant of one of these types appears in a stored expression (such as a column default expression or view), it creates a dependency on the referenced object. For example, if a column has a default - expression <literal>nextval('my_seq'::regclass)</>, + expression <literal>nextval('my_seq'::regclass)</literal>, <productname>PostgreSQL</productname> understands that the default expression depends on the sequence - <literal>my_seq</>; the system will not let the sequence be dropped + <literal>my_seq</literal>; the system will not let the sequence be dropped without first removing the default expression. - <type>regrole</> is the only exception for the property. Constants of this + <type>regrole</type> is the only exception for the property. Constants of this type are not allowed in such expressions. </para> @@ -4603,21 +4603,21 @@ SELECT * FROM pg_attribute </note> <para> - Another identifier type used by the system is <type>xid</>, or transaction - (abbreviated <abbrev>xact</>) identifier. This is the data type of the system columns - <structfield>xmin</> and <structfield>xmax</>. Transaction identifiers are 32-bit quantities. + Another identifier type used by the system is <type>xid</type>, or transaction + (abbreviated <abbrev>xact</abbrev>) identifier. This is the data type of the system columns + <structfield>xmin</structfield> and <structfield>xmax</structfield>. Transaction identifiers are 32-bit quantities. </para> <para> - A third identifier type used by the system is <type>cid</>, or + A third identifier type used by the system is <type>cid</type>, or command identifier. This is the data type of the system columns - <structfield>cmin</> and <structfield>cmax</>. Command identifiers are also 32-bit quantities. + <structfield>cmin</structfield> and <structfield>cmax</structfield>. Command identifiers are also 32-bit quantities. </para> <para> - A final identifier type used by the system is <type>tid</>, or tuple + A final identifier type used by the system is <type>tid</type>, or tuple identifier (row identifier). This is the data type of the system column - <structfield>ctid</>. A tuple ID is a pair + <structfield>ctid</structfield>. A tuple ID is a pair (block number, tuple index within block) that identifies the physical location of the row within its table. </para> @@ -4646,7 +4646,7 @@ SELECT * FROM pg_attribute Internally, an LSN is a 64-bit integer, representing a byte position in the write-ahead log stream. It is printed as two hexadecimal numbers of up to 8 digits each, separated by a slash; for example, - <literal>16/B374D848</>. The <type>pg_lsn</type> type supports the + <literal>16/B374D848</literal>. The <type>pg_lsn</type> type supports the standard comparison operators, like <literal>=</literal> and <literal>></literal>. Two LSNs can be subtracted using the <literal>-</literal> operator; the result is the number of bytes separating @@ -4736,7 +4736,7 @@ SELECT * FROM pg_attribute <para> The <productname>PostgreSQL</productname> type system contains a number of special-purpose entries that are collectively called - <firstterm>pseudo-types</>. A pseudo-type cannot be used as a + <firstterm>pseudo-types</firstterm>. A pseudo-type cannot be used as a column data type, but it can be used to declare a function's argument or result type. Each of the available pseudo-types is useful in situations where a function's behavior does not @@ -4758,106 +4758,106 @@ SELECT * FROM pg_attribute <tbody> <row> - <entry><type>any</></entry> + <entry><type>any</type></entry> <entry>Indicates that a function accepts any input data type.</entry> </row> <row> - <entry><type>anyelement</></entry> + <entry><type>anyelement</type></entry> <entry>Indicates that a function accepts any data type (see <xref linkend="extend-types-polymorphic">).</entry> </row> <row> - <entry><type>anyarray</></entry> + <entry><type>anyarray</type></entry> <entry>Indicates that a function accepts any array data type (see <xref linkend="extend-types-polymorphic">).</entry> </row> <row> - <entry><type>anynonarray</></entry> + <entry><type>anynonarray</type></entry> <entry>Indicates that a function accepts any non-array data type (see <xref linkend="extend-types-polymorphic">).</entry> </row> <row> - <entry><type>anyenum</></entry> + <entry><type>anyenum</type></entry> <entry>Indicates that a function accepts any enum data type (see <xref linkend="extend-types-polymorphic"> and <xref linkend="datatype-enum">).</entry> </row> <row> - <entry><type>anyrange</></entry> + <entry><type>anyrange</type></entry> <entry>Indicates that a function accepts any range data type (see <xref linkend="extend-types-polymorphic"> and <xref linkend="rangetypes">).</entry> </row> <row> - <entry><type>cstring</></entry> + <entry><type>cstring</type></entry> <entry>Indicates that a function accepts or returns a null-terminated C string.</entry> </row> <row> - <entry><type>internal</></entry> + <entry><type>internal</type></entry> <entry>Indicates that a function accepts or returns a server-internal data type.</entry> </row> <row> - <entry><type>language_handler</></entry> - <entry>A procedural language call handler is declared to return <type>language_handler</>.</entry> + <entry><type>language_handler</type></entry> + <entry>A procedural language call handler is declared to return <type>language_handler</type>.</entry> </row> <row> - <entry><type>fdw_handler</></entry> - <entry>A foreign-data wrapper handler is declared to return <type>fdw_handler</>.</entry> + <entry><type>fdw_handler</type></entry> + <entry>A foreign-data wrapper handler is declared to return <type>fdw_handler</type>.</entry> </row> <row> - <entry><type>index_am_handler</></entry> - <entry>An index access method handler is declared to return <type>index_am_handler</>.</entry> + <entry><type>index_am_handler</type></entry> + <entry>An index access method handler is declared to return <type>index_am_handler</type>.</entry> </row> <row> - <entry><type>tsm_handler</></entry> - <entry>A tablesample method handler is declared to return <type>tsm_handler</>.</entry> + <entry><type>tsm_handler</type></entry> + <entry>A tablesample method handler is declared to return <type>tsm_handler</type>.</entry> </row> <row> - <entry><type>record</></entry> + <entry><type>record</type></entry> <entry>Identifies a function taking or returning an unspecified row type.</entry> </row> <row> - <entry><type>trigger</></entry> - <entry>A trigger function is declared to return <type>trigger.</></entry> + <entry><type>trigger</type></entry> + <entry>A trigger function is declared to return <type>trigger.</type></entry> </row> <row> - <entry><type>event_trigger</></entry> - <entry>An event trigger function is declared to return <type>event_trigger.</></entry> + <entry><type>event_trigger</type></entry> + <entry>An event trigger function is declared to return <type>event_trigger.</type></entry> </row> <row> - <entry><type>pg_ddl_command</></entry> + <entry><type>pg_ddl_command</type></entry> <entry>Identifies a representation of DDL commands that is available to event triggers.</entry> </row> <row> - <entry><type>void</></entry> + <entry><type>void</type></entry> <entry>Indicates that a function returns no value.</entry> </row> <row> - <entry><type>unknown</></entry> + <entry><type>unknown</type></entry> <entry>Identifies a not-yet-resolved type, e.g. of an undecorated string literal.</entry> </row> <row> - <entry><type>opaque</></entry> + <entry><type>opaque</type></entry> <entry>An obsolete type name that formerly served many of the above purposes.</entry> </row> @@ -4876,24 +4876,24 @@ SELECT * FROM pg_attribute Functions coded in procedural languages can use pseudo-types only as allowed by their implementation languages. At present most procedural languages forbid use of a pseudo-type as an argument type, and allow - only <type>void</> and <type>record</> as a result type (plus - <type>trigger</> or <type>event_trigger</> when the function is used + only <type>void</type> and <type>record</type> as a result type (plus + <type>trigger</type> or <type>event_trigger</type> when the function is used as a trigger or event trigger). Some also - support polymorphic functions using the types <type>anyelement</>, - <type>anyarray</>, <type>anynonarray</>, <type>anyenum</>, and - <type>anyrange</>. + support polymorphic functions using the types <type>anyelement</type>, + <type>anyarray</type>, <type>anynonarray</type>, <type>anyenum</type>, and + <type>anyrange</type>. </para> <para> - The <type>internal</> pseudo-type is used to declare functions + The <type>internal</type> pseudo-type is used to declare functions that are meant only to be called internally by the database system, and not by direct invocation in an <acronym>SQL</acronym> - query. If a function has at least one <type>internal</>-type + query. If a function has at least one <type>internal</type>-type argument then it cannot be called from <acronym>SQL</acronym>. To preserve the type safety of this restriction it is important to follow this coding rule: do not create any function that is - declared to return <type>internal</> unless it has at least one - <type>internal</> argument. + declared to return <type>internal</type> unless it has at least one + <type>internal</type> argument. </para> </sect1> diff --git a/doc/src/sgml/datetime.sgml b/doc/src/sgml/datetime.sgml index ef9139f9e38..a533bbf8d2e 100644 --- a/doc/src/sgml/datetime.sgml +++ b/doc/src/sgml/datetime.sgml @@ -37,18 +37,18 @@ <substeps> <step> <para> - If the numeric token contains a colon (<literal>:</>), this is + If the numeric token contains a colon (<literal>:</literal>), this is a time string. Include all subsequent digits and colons. </para> </step> <step> <para> - If the numeric token contains a dash (<literal>-</>), slash - (<literal>/</>), or two or more dots (<literal>.</>), this is + If the numeric token contains a dash (<literal>-</literal>), slash + (<literal>/</literal>), or two or more dots (<literal>.</literal>), this is a date string which might have a text month. If a date token has already been seen, it is instead interpreted as a time zone - name (e.g., <literal>America/New_York</>). + name (e.g., <literal>America/New_York</literal>). </para> </step> @@ -63,8 +63,8 @@ <step> <para> - If the token starts with a plus (<literal>+</>) or minus - (<literal>-</>), then it is either a numeric time zone or a special + If the token starts with a plus (<literal>+</literal>) or minus + (<literal>-</literal>), then it is either a numeric time zone or a special field. </para> </step> @@ -114,7 +114,7 @@ and if no other date fields have been previously read, then interpret as a <quote>concatenated date</quote> (e.g., <literal>19990118</literal> or <literal>990118</literal>). - The interpretation is <literal>YYYYMMDD</> or <literal>YYMMDD</>. + The interpretation is <literal>YYYYMMDD</literal> or <literal>YYMMDD</literal>. </para> </step> @@ -128,7 +128,7 @@ <step> <para> If four or six digits and a year has already been read, then - interpret as a time (<literal>HHMM</> or <literal>HHMMSS</>). + interpret as a time (<literal>HHMM</literal> or <literal>HHMMSS</literal>). </para> </step> @@ -143,7 +143,7 @@ <step> <para> Otherwise the date field ordering is assumed to follow the - <varname>DateStyle</> setting: mm-dd-yy, dd-mm-yy, or yy-mm-dd. + <varname>DateStyle</varname> setting: mm-dd-yy, dd-mm-yy, or yy-mm-dd. Throw an error if a month or day field is found to be out of range. </para> </step> @@ -167,7 +167,7 @@ <tip> <para> Gregorian years AD 1-99 can be entered by using 4 digits with leading - zeros (e.g., <literal>0099</> is AD 99). + zeros (e.g., <literal>0099</literal> is AD 99). </para> </tip> </para> @@ -317,7 +317,7 @@ <entry>Ignored</entry> </row> <row> - <entry><literal>JULIAN</>, <literal>JD</>, <literal>J</></entry> + <entry><literal>JULIAN</literal>, <literal>JD</literal>, <literal>J</literal></entry> <entry>Next field is Julian Date</entry> </row> <row> @@ -354,23 +354,23 @@ can be altered by any database user, the possible values for it are under the control of the database administrator — they are in fact names of configuration files stored in - <filename>.../share/timezonesets/</> of the installation directory. + <filename>.../share/timezonesets/</filename> of the installation directory. By adding or altering files in that directory, the administrator can set local policy for timezone abbreviations. </para> <para> - <varname>timezone_abbreviations</> can be set to any file name - found in <filename>.../share/timezonesets/</>, if the file's name + <varname>timezone_abbreviations</varname> can be set to any file name + found in <filename>.../share/timezonesets/</filename>, if the file's name is entirely alphabetic. (The prohibition against non-alphabetic - characters in <varname>timezone_abbreviations</> prevents reading + characters in <varname>timezone_abbreviations</varname> prevents reading files outside the intended directory, as well as reading editor backup files and other extraneous files.) </para> <para> A timezone abbreviation file can contain blank lines and comments - beginning with <literal>#</>. Non-comment lines must have one of + beginning with <literal>#</literal>. Non-comment lines must have one of these formats: <synopsis> @@ -388,12 +388,12 @@ the equivalent offset in seconds from UTC, positive being east from Greenwich and negative being west. For example, -18000 would be five hours west of Greenwich, or North American east coast standard time. - <literal>D</> indicates that the zone name represents local + <literal>D</literal> indicates that the zone name represents local daylight-savings time rather than standard time. </para> <para> - Alternatively, a <replaceable>time_zone_name</> can be given, referencing + Alternatively, a <replaceable>time_zone_name</replaceable> can be given, referencing a zone name defined in the IANA timezone database. The zone's definition is consulted to see whether the abbreviation is or has been in use in that zone, and if so, the appropriate meaning is used — that is, @@ -417,34 +417,34 @@ </tip> <para> - The <literal>@INCLUDE</> syntax allows inclusion of another file in the - <filename>.../share/timezonesets/</> directory. Inclusion can be nested, + The <literal>@INCLUDE</literal> syntax allows inclusion of another file in the + <filename>.../share/timezonesets/</filename> directory. Inclusion can be nested, to a limited depth. </para> <para> - The <literal>@OVERRIDE</> syntax indicates that subsequent entries in the + The <literal>@OVERRIDE</literal> syntax indicates that subsequent entries in the file can override previous entries (typically, entries obtained from included files). Without this, conflicting definitions of the same timezone abbreviation are considered an error. </para> <para> - In an unmodified installation, the file <filename>Default</> contains + In an unmodified installation, the file <filename>Default</filename> contains all the non-conflicting time zone abbreviations for most of the world. - Additional files <filename>Australia</> and <filename>India</> are + Additional files <filename>Australia</filename> and <filename>India</filename> are provided for those regions: these files first include the - <literal>Default</> file and then add or modify abbreviations as needed. + <literal>Default</literal> file and then add or modify abbreviations as needed. </para> <para> For reference purposes, a standard installation also contains files - <filename>Africa.txt</>, <filename>America.txt</>, etc, containing + <filename>Africa.txt</filename>, <filename>America.txt</filename>, etc, containing information about every time zone abbreviation known to be in use according to the IANA timezone database. The zone name definitions found in these files can be copied and pasted into a custom configuration file as needed. Note that these files cannot be directly - referenced as <varname>timezone_abbreviations</> settings, because of + referenced as <varname>timezone_abbreviations</varname> settings, because of the dot embedded in their names. </para> @@ -460,16 +460,16 @@ <para> Time zone abbreviations defined in the configuration file override non-timezone meanings built into <productname>PostgreSQL</productname>. - For example, the <filename>Australia</> configuration file defines - <literal>SAT</> (for South Australian Standard Time). When this - file is active, <literal>SAT</> will not be recognized as an abbreviation + For example, the <filename>Australia</filename> configuration file defines + <literal>SAT</literal> (for South Australian Standard Time). When this + file is active, <literal>SAT</literal> will not be recognized as an abbreviation for Saturday. </para> </caution> <caution> <para> - If you modify files in <filename>.../share/timezonesets/</>, + If you modify files in <filename>.../share/timezonesets/</filename>, it is up to you to make backups — a normal database dump will not include this directory. </para> @@ -492,10 +492,10 @@ <quote>datetime literal</quote>, the <quote>datetime values</quote> are constrained by the natural rules for dates and times according to the Gregorian calendar</quote>. - <productname>PostgreSQL</> follows the SQL + <productname>PostgreSQL</productname> follows the SQL standard's lead by counting dates exclusively in the Gregorian calendar, even for years before that calendar was in use. - This rule is known as the <firstterm>proleptic Gregorian calendar</>. + This rule is known as the <firstterm>proleptic Gregorian calendar</firstterm>. </para> <para> @@ -569,7 +569,7 @@ $ <userinput>cal 9 1752</userinput> dominions, not other places. Since it would be difficult and confusing to try to track the actual calendars that were in use in various places at various times, - <productname>PostgreSQL</> does not try, but rather follows the Gregorian + <productname>PostgreSQL</productname> does not try, but rather follows the Gregorian calendar rules for all dates, even though this method is not historically accurate. </para> @@ -597,7 +597,7 @@ $ <userinput>cal 9 1752</userinput> and probably takes its name from Scaliger's father, the Italian scholar Julius Caesar Scaliger (1484-1558). In the Julian Date system, each day has a sequential number, starting - from JD 0 (which is sometimes called <emphasis>the</> Julian Date). + from JD 0 (which is sometimes called <emphasis>the</emphasis> Julian Date). JD 0 corresponds to 1 January 4713 BC in the Julian calendar, or 24 November 4714 BC in the Gregorian calendar. Julian Date counting is most often used by astronomers for labeling their nightly observations, @@ -607,10 +607,10 @@ $ <userinput>cal 9 1752</userinput> </para> <para> - Although <productname>PostgreSQL</> supports Julian Date notation for + Although <productname>PostgreSQL</productname> supports Julian Date notation for input and output of dates (and also uses Julian dates for some internal datetime calculations), it does not observe the nicety of having dates - run from noon to noon. <productname>PostgreSQL</> treats a Julian Date + run from noon to noon. <productname>PostgreSQL</productname> treats a Julian Date as running from midnight to midnight. </para> diff --git a/doc/src/sgml/dblink.sgml b/doc/src/sgml/dblink.sgml index f19c6b19f53..1f17d3ad2dc 100644 --- a/doc/src/sgml/dblink.sgml +++ b/doc/src/sgml/dblink.sgml @@ -8,8 +8,8 @@ </indexterm> <para> - <filename>dblink</> is a module that supports connections to - other <productname>PostgreSQL</> databases from within a database + <filename>dblink</filename> is a module that supports connections to + other <productname>PostgreSQL</productname> databases from within a database session. </para> @@ -44,9 +44,9 @@ dblink_connect(text connname, text connstr) returns text <title>Description</title> <para> - <function>dblink_connect()</> establishes a connection to a remote - <productname>PostgreSQL</> database. The server and database to - be contacted are identified through a standard <application>libpq</> + <function>dblink_connect()</function> establishes a connection to a remote + <productname>PostgreSQL</productname> database. The server and database to + be contacted are identified through a standard <application>libpq</application> connection string. Optionally, a name can be assigned to the connection. Multiple named connections can be open at once, but only one unnamed connection is permitted at a time. The connection @@ -81,9 +81,9 @@ dblink_connect(text connname, text connstr) returns text <varlistentry> <term><parameter>connstr</parameter></term> <listitem> - <para><application>libpq</>-style connection info string, for example + <para><application>libpq</application>-style connection info string, for example <literal>hostaddr=127.0.0.1 port=5432 dbname=mydb user=postgres - password=mypasswd</>. + password=mypasswd</literal>. For details see <xref linkend="libpq-connstring">. Alternatively, the name of a foreign server. </para> @@ -96,7 +96,7 @@ dblink_connect(text connname, text connstr) returns text <title>Return Value</title> <para> - Returns status, which is always <literal>OK</> (since any error + Returns status, which is always <literal>OK</literal> (since any error causes the function to throw an error instead of returning). </para> </refsect1> @@ -105,15 +105,15 @@ dblink_connect(text connname, text connstr) returns text <title>Notes</title> <para> - Only superusers may use <function>dblink_connect</> to create + Only superusers may use <function>dblink_connect</function> to create non-password-authenticated connections. If non-superusers need this - capability, use <function>dblink_connect_u</> instead. + capability, use <function>dblink_connect_u</function> instead. </para> <para> It is unwise to choose connection names that contain equal signs, as this opens a risk of confusion with connection info strings - in other <filename>dblink</> functions. + in other <filename>dblink</filename> functions. </para> </refsect1> @@ -208,8 +208,8 @@ dblink_connect_u(text connname, text connstr) returns text <title>Description</title> <para> - <function>dblink_connect_u()</> is identical to - <function>dblink_connect()</>, except that it will allow non-superusers + <function>dblink_connect_u()</function> is identical to + <function>dblink_connect()</function>, except that it will allow non-superusers to connect using any authentication method. </para> @@ -217,24 +217,24 @@ dblink_connect_u(text connname, text connstr) returns text If the remote server selects an authentication method that does not involve a password, then impersonation and subsequent escalation of privileges can occur, because the session will appear to have - originated from the user as which the local <productname>PostgreSQL</> + originated from the user as which the local <productname>PostgreSQL</productname> server runs. Also, even if the remote server does demand a password, it is possible for the password to be supplied from the server - environment, such as a <filename>~/.pgpass</> file belonging to the + environment, such as a <filename>~/.pgpass</filename> file belonging to the server's user. This opens not only a risk of impersonation, but the possibility of exposing a password to an untrustworthy remote server. - Therefore, <function>dblink_connect_u()</> is initially - installed with all privileges revoked from <literal>PUBLIC</>, + Therefore, <function>dblink_connect_u()</function> is initially + installed with all privileges revoked from <literal>PUBLIC</literal>, making it un-callable except by superusers. In some situations - it may be appropriate to grant <literal>EXECUTE</> permission for - <function>dblink_connect_u()</> to specific users who are considered + it may be appropriate to grant <literal>EXECUTE</literal> permission for + <function>dblink_connect_u()</function> to specific users who are considered trustworthy, but this should be done with care. It is also recommended - that any <filename>~/.pgpass</> file belonging to the server's user - <emphasis>not</> contain any records specifying a wildcard host name. + that any <filename>~/.pgpass</filename> file belonging to the server's user + <emphasis>not</emphasis> contain any records specifying a wildcard host name. </para> <para> - For further details see <function>dblink_connect()</>. + For further details see <function>dblink_connect()</function>. </para> </refsect1> </refentry> @@ -265,8 +265,8 @@ dblink_disconnect(text connname) returns text <title>Description</title> <para> - <function>dblink_disconnect()</> closes a connection previously opened - by <function>dblink_connect()</>. The form with no arguments closes + <function>dblink_disconnect()</function> closes a connection previously opened + by <function>dblink_connect()</function>. The form with no arguments closes an unnamed connection. </para> </refsect1> @@ -290,7 +290,7 @@ dblink_disconnect(text connname) returns text <title>Return Value</title> <para> - Returns status, which is always <literal>OK</> (since any error + Returns status, which is always <literal>OK</literal> (since any error causes the function to throw an error instead of returning). </para> </refsect1> @@ -341,15 +341,15 @@ dblink(text sql [, bool fail_on_error]) returns setof record <title>Description</title> <para> - <function>dblink</> executes a query (usually a <command>SELECT</>, + <function>dblink</function> executes a query (usually a <command>SELECT</command>, but it can be any SQL statement that returns rows) in a remote database. </para> <para> - When two <type>text</> arguments are given, the first one is first + When two <type>text</type> arguments are given, the first one is first looked up as a persistent connection's name; if found, the command is executed on that connection. If not found, the first argument - is treated as a connection info string as for <function>dblink_connect</>, + is treated as a connection info string as for <function>dblink_connect</function>, and the indicated connection is made just for the duration of this command. </para> </refsect1> @@ -373,7 +373,7 @@ dblink(text sql [, bool fail_on_error]) returns setof record <listitem> <para> A connection info string, as previously described for - <function>dblink_connect</>. + <function>dblink_connect</function>. </para> </listitem> </varlistentry> @@ -383,7 +383,7 @@ dblink(text sql [, bool fail_on_error]) returns setof record <listitem> <para> The SQL query that you wish to execute in the remote database, - for example <literal>select * from foo</>. + for example <literal>select * from foo</literal>. </para> </listitem> </varlistentry> @@ -407,11 +407,11 @@ dblink(text sql [, bool fail_on_error]) returns setof record <para> The function returns the row(s) produced by the query. Since - <function>dblink</> can be used with any query, it is declared - to return <type>record</>, rather than specifying any particular + <function>dblink</function> can be used with any query, it is declared + to return <type>record</type>, rather than specifying any particular set of columns. This means that you must specify the expected set of columns in the calling query — otherwise - <productname>PostgreSQL</> would not know what to expect. + <productname>PostgreSQL</productname> would not know what to expect. Here is an example: <programlisting> @@ -421,20 +421,20 @@ SELECT * WHERE proname LIKE 'bytea%'; </programlisting> - The <quote>alias</> part of the <literal>FROM</> clause must + The <quote>alias</quote> part of the <literal>FROM</literal> clause must specify the column names and types that the function will return. (Specifying column names in an alias is actually standard SQL - syntax, but specifying column types is a <productname>PostgreSQL</> + syntax, but specifying column types is a <productname>PostgreSQL</productname> extension.) This allows the system to understand what - <literal>*</> should expand to, and what <structname>proname</> - in the <literal>WHERE</> clause refers to, in advance of trying + <literal>*</literal> should expand to, and what <structname>proname</structname> + in the <literal>WHERE</literal> clause refers to, in advance of trying to execute the function. At run time, an error will be thrown if the actual query result from the remote database does not - have the same number of columns shown in the <literal>FROM</> clause. - The column names need not match, however, and <function>dblink</> + have the same number of columns shown in the <literal>FROM</literal> clause. + The column names need not match, however, and <function>dblink</function> does not insist on exact type matches either. It will succeed so long as the returned data strings are valid input for the - column type declared in the <literal>FROM</> clause. + column type declared in the <literal>FROM</literal> clause. </para> </refsect1> @@ -442,7 +442,7 @@ SELECT * <title>Notes</title> <para> - A convenient way to use <function>dblink</> with predetermined + A convenient way to use <function>dblink</function> with predetermined queries is to create a view. This allows the column type information to be buried in the view, instead of having to spell it out in every query. For example, @@ -559,15 +559,15 @@ dblink_exec(text sql [, bool fail_on_error]) returns text <title>Description</title> <para> - <function>dblink_exec</> executes a command (that is, any SQL statement + <function>dblink_exec</function> executes a command (that is, any SQL statement that doesn't return rows) in a remote database. </para> <para> - When two <type>text</> arguments are given, the first one is first + When two <type>text</type> arguments are given, the first one is first looked up as a persistent connection's name; if found, the command is executed on that connection. If not found, the first argument - is treated as a connection info string as for <function>dblink_connect</>, + is treated as a connection info string as for <function>dblink_connect</function>, and the indicated connection is made just for the duration of this command. </para> </refsect1> @@ -591,7 +591,7 @@ dblink_exec(text sql [, bool fail_on_error]) returns text <listitem> <para> A connection info string, as previously described for - <function>dblink_connect</>. + <function>dblink_connect</function>. </para> </listitem> </varlistentry> @@ -602,7 +602,7 @@ dblink_exec(text sql [, bool fail_on_error]) returns text <para> The SQL command that you wish to execute in the remote database, for example - <literal>insert into foo values(0,'a','{"a0","b0","c0"}')</>. + <literal>insert into foo values(0,'a','{"a0","b0","c0"}')</literal>. </para> </listitem> </varlistentry> @@ -614,7 +614,7 @@ dblink_exec(text sql [, bool fail_on_error]) returns text If true (the default when omitted) then an error thrown on the remote side of the connection causes an error to also be thrown locally. If false, the remote error is locally reported as a NOTICE, - and the function's return value is set to <literal>ERROR</>. + and the function's return value is set to <literal>ERROR</literal>. </para> </listitem> </varlistentry> @@ -625,7 +625,7 @@ dblink_exec(text sql [, bool fail_on_error]) returns text <title>Return Value</title> <para> - Returns status, either the command's status string or <literal>ERROR</>. + Returns status, either the command's status string or <literal>ERROR</literal>. </para> </refsect1> @@ -695,9 +695,9 @@ dblink_open(text connname, text cursorname, text sql [, bool fail_on_error]) ret <title>Description</title> <para> - <function>dblink_open()</> opens a cursor in a remote database. + <function>dblink_open()</function> opens a cursor in a remote database. The cursor can subsequently be manipulated with - <function>dblink_fetch()</> and <function>dblink_close()</>. + <function>dblink_fetch()</function> and <function>dblink_close()</function>. </para> </refsect1> @@ -728,8 +728,8 @@ dblink_open(text connname, text cursorname, text sql [, bool fail_on_error]) ret <term><parameter>sql</parameter></term> <listitem> <para> - The <command>SELECT</> statement that you wish to execute in the remote - database, for example <literal>select * from pg_class</>. + The <command>SELECT</command> statement that you wish to execute in the remote + database, for example <literal>select * from pg_class</literal>. </para> </listitem> </varlistentry> @@ -741,7 +741,7 @@ dblink_open(text connname, text cursorname, text sql [, bool fail_on_error]) ret If true (the default when omitted) then an error thrown on the remote side of the connection causes an error to also be thrown locally. If false, the remote error is locally reported as a NOTICE, - and the function's return value is set to <literal>ERROR</>. + and the function's return value is set to <literal>ERROR</literal>. </para> </listitem> </varlistentry> @@ -752,7 +752,7 @@ dblink_open(text connname, text cursorname, text sql [, bool fail_on_error]) ret <title>Return Value</title> <para> - Returns status, either <literal>OK</> or <literal>ERROR</>. + Returns status, either <literal>OK</literal> or <literal>ERROR</literal>. </para> </refsect1> @@ -761,16 +761,16 @@ dblink_open(text connname, text cursorname, text sql [, bool fail_on_error]) ret <para> Since a cursor can only persist within a transaction, - <function>dblink_open</> starts an explicit transaction block - (<command>BEGIN</>) on the remote side, if the remote side was + <function>dblink_open</function> starts an explicit transaction block + (<command>BEGIN</command>) on the remote side, if the remote side was not already within a transaction. This transaction will be - closed again when the matching <function>dblink_close</> is + closed again when the matching <function>dblink_close</function> is executed. Note that if - you use <function>dblink_exec</> to change data between - <function>dblink_open</> and <function>dblink_close</>, - and then an error occurs or you use <function>dblink_disconnect</> before - <function>dblink_close</>, your change <emphasis>will be - lost</> because the transaction will be aborted. + you use <function>dblink_exec</function> to change data between + <function>dblink_open</function> and <function>dblink_close</function>, + and then an error occurs or you use <function>dblink_disconnect</function> before + <function>dblink_close</function>, your change <emphasis>will be + lost</emphasis> because the transaction will be aborted. </para> </refsect1> @@ -819,8 +819,8 @@ dblink_fetch(text connname, text cursorname, int howmany [, bool fail_on_error]) <title>Description</title> <para> - <function>dblink_fetch</> fetches rows from a cursor previously - established by <function>dblink_open</>. + <function>dblink_fetch</function> fetches rows from a cursor previously + established by <function>dblink_open</function>. </para> </refsect1> @@ -851,7 +851,7 @@ dblink_fetch(text connname, text cursorname, int howmany [, bool fail_on_error]) <term><parameter>howmany</parameter></term> <listitem> <para> - The maximum number of rows to retrieve. The next <parameter>howmany</> + The maximum number of rows to retrieve. The next <parameter>howmany</parameter> rows are fetched, starting at the current cursor position, moving forward. Once the cursor has reached its end, no more rows are produced. </para> @@ -878,7 +878,7 @@ dblink_fetch(text connname, text cursorname, int howmany [, bool fail_on_error]) <para> The function returns the row(s) fetched from the cursor. To use this function, you will need to specify the expected set of columns, - as previously discussed for <function>dblink</>. + as previously discussed for <function>dblink</function>. </para> </refsect1> @@ -887,11 +887,11 @@ dblink_fetch(text connname, text cursorname, int howmany [, bool fail_on_error]) <para> On a mismatch between the number of return columns specified in the - <literal>FROM</> clause, and the actual number of columns returned by the + <literal>FROM</literal> clause, and the actual number of columns returned by the remote cursor, an error will be thrown. In this event, the remote cursor is still advanced by as many rows as it would have been if the error had not occurred. The same is true for any other error occurring in the local - query after the remote <command>FETCH</> has been done. + query after the remote <command>FETCH</command> has been done. </para> </refsect1> @@ -972,8 +972,8 @@ dblink_close(text connname, text cursorname [, bool fail_on_error]) returns text <title>Description</title> <para> - <function>dblink_close</> closes a cursor previously opened with - <function>dblink_open</>. + <function>dblink_close</function> closes a cursor previously opened with + <function>dblink_open</function>. </para> </refsect1> @@ -1007,7 +1007,7 @@ dblink_close(text connname, text cursorname [, bool fail_on_error]) returns text If true (the default when omitted) then an error thrown on the remote side of the connection causes an error to also be thrown locally. If false, the remote error is locally reported as a NOTICE, - and the function's return value is set to <literal>ERROR</>. + and the function's return value is set to <literal>ERROR</literal>. </para> </listitem> </varlistentry> @@ -1018,7 +1018,7 @@ dblink_close(text connname, text cursorname [, bool fail_on_error]) returns text <title>Return Value</title> <para> - Returns status, either <literal>OK</> or <literal>ERROR</>. + Returns status, either <literal>OK</literal> or <literal>ERROR</literal>. </para> </refsect1> @@ -1026,9 +1026,9 @@ dblink_close(text connname, text cursorname [, bool fail_on_error]) returns text <title>Notes</title> <para> - If <function>dblink_open</> started an explicit transaction block, + If <function>dblink_open</function> started an explicit transaction block, and this is the last remaining open cursor in this connection, - <function>dblink_close</> will issue the matching <command>COMMIT</>. + <function>dblink_close</function> will issue the matching <command>COMMIT</command>. </para> </refsect1> @@ -1082,8 +1082,8 @@ dblink_get_connections() returns text[] <title>Description</title> <para> - <function>dblink_get_connections</> returns an array of the names - of all open named <filename>dblink</> connections. + <function>dblink_get_connections</function> returns an array of the names + of all open named <filename>dblink</filename> connections. </para> </refsect1> @@ -1127,7 +1127,7 @@ dblink_error_message(text connname) returns text <title>Description</title> <para> - <function>dblink_error_message</> fetches the most recent remote + <function>dblink_error_message</function> fetches the most recent remote error message for a given connection. </para> </refsect1> @@ -1190,7 +1190,7 @@ dblink_send_query(text connname, text sql) returns int <title>Description</title> <para> - <function>dblink_send_query</> sends a query to be executed + <function>dblink_send_query</function> sends a query to be executed asynchronously, that is, without immediately waiting for the result. There must not be an async query already in progress on the connection. @@ -1198,10 +1198,10 @@ dblink_send_query(text connname, text sql) returns int <para> After successfully dispatching an async query, completion status - can be checked with <function>dblink_is_busy</>, and the results - are ultimately collected with <function>dblink_get_result</>. + can be checked with <function>dblink_is_busy</function>, and the results + are ultimately collected with <function>dblink_get_result</function>. It is also possible to attempt to cancel an active async query - using <function>dblink_cancel_query</>. + using <function>dblink_cancel_query</function>. </para> </refsect1> @@ -1223,7 +1223,7 @@ dblink_send_query(text connname, text sql) returns int <listitem> <para> The SQL statement that you wish to execute in the remote database, - for example <literal>select * from pg_class</>. + for example <literal>select * from pg_class</literal>. </para> </listitem> </varlistentry> @@ -1272,7 +1272,7 @@ dblink_is_busy(text connname) returns int <title>Description</title> <para> - <function>dblink_is_busy</> tests whether an async query is in progress. + <function>dblink_is_busy</function> tests whether an async query is in progress. </para> </refsect1> @@ -1297,7 +1297,7 @@ dblink_is_busy(text connname) returns int <para> Returns 1 if connection is busy, 0 if it is not busy. If this function returns 0, it is guaranteed that - <function>dblink_get_result</> will not block. + <function>dblink_get_result</function> will not block. </para> </refsect1> @@ -1336,10 +1336,10 @@ dblink_get_notify(text connname) returns setof (notify_name text, be_pid int, ex <title>Description</title> <para> - <function>dblink_get_notify</> retrieves notifications on either + <function>dblink_get_notify</function> retrieves notifications on either the unnamed connection, or on a named connection if specified. - To receive notifications via dblink, <function>LISTEN</> must - first be issued, using <function>dblink_exec</>. + To receive notifications via dblink, <function>LISTEN</function> must + first be issued, using <function>dblink_exec</function>. For details see <xref linkend="sql-listen"> and <xref linkend="sql-notify">. </para> @@ -1417,9 +1417,9 @@ dblink_get_result(text connname [, bool fail_on_error]) returns setof record <title>Description</title> <para> - <function>dblink_get_result</> collects the results of an - asynchronous query previously sent with <function>dblink_send_query</>. - If the query is not already completed, <function>dblink_get_result</> + <function>dblink_get_result</function> collects the results of an + asynchronous query previously sent with <function>dblink_send_query</function>. + If the query is not already completed, <function>dblink_get_result</function> will wait until it is. </para> </refsect1> @@ -1458,14 +1458,14 @@ dblink_get_result(text connname [, bool fail_on_error]) returns setof record For an async query (that is, a SQL statement returning rows), the function returns the row(s) produced by the query. To use this function, you will need to specify the expected set of columns, - as previously discussed for <function>dblink</>. + as previously discussed for <function>dblink</function>. </para> <para> For an async command (that is, a SQL statement not returning rows), the function returns a single row with a single text column containing the command's status string. It is still necessary to specify that - the result will have a single text column in the calling <literal>FROM</> + the result will have a single text column in the calling <literal>FROM</literal> clause. </para> </refsect1> @@ -1474,22 +1474,22 @@ dblink_get_result(text connname [, bool fail_on_error]) returns setof record <title>Notes</title> <para> - This function <emphasis>must</> be called if - <function>dblink_send_query</> returned 1. + This function <emphasis>must</emphasis> be called if + <function>dblink_send_query</function> returned 1. It must be called once for each query sent, and one additional time to obtain an empty set result, before the connection can be used again. </para> <para> - When using <function>dblink_send_query</> and - <function>dblink_get_result</>, <application>dblink</> fetches the entire + When using <function>dblink_send_query</function> and + <function>dblink_get_result</function>, <application>dblink</application> fetches the entire remote query result before returning any of it to the local query processor. If the query returns a large number of rows, this can result in transient memory bloat in the local session. It may be better to open - such a query as a cursor with <function>dblink_open</> and then fetch a + such a query as a cursor with <function>dblink_open</function> and then fetch a manageable number of rows at a time. Alternatively, use plain - <function>dblink()</>, which avoids memory bloat by spooling large result + <function>dblink()</function>, which avoids memory bloat by spooling large result sets to disk. </para> </refsect1> @@ -1581,13 +1581,13 @@ dblink_cancel_query(text connname) returns text <title>Description</title> <para> - <function>dblink_cancel_query</> attempts to cancel any query that + <function>dblink_cancel_query</function> attempts to cancel any query that is in progress on the named connection. Note that this is not certain to succeed (since, for example, the remote query might already have finished). A cancel request simply improves the odds that the query will fail soon. You must still complete the normal query protocol, for example by calling - <function>dblink_get_result</>. + <function>dblink_get_result</function>. </para> </refsect1> @@ -1610,7 +1610,7 @@ dblink_cancel_query(text connname) returns text <title>Return Value</title> <para> - Returns <literal>OK</> if the cancel request has been sent, or + Returns <literal>OK</literal> if the cancel request has been sent, or the text of an error message on failure. </para> </refsect1> @@ -1651,7 +1651,7 @@ dblink_get_pkey(text relname) returns setof dblink_pkey_results <title>Description</title> <para> - <function>dblink_get_pkey</> provides information about the primary + <function>dblink_get_pkey</function> provides information about the primary key of a relation in the local database. This is sometimes useful in generating queries to be sent to remote databases. </para> @@ -1665,10 +1665,10 @@ dblink_get_pkey(text relname) returns setof dblink_pkey_results <term><parameter>relname</parameter></term> <listitem> <para> - Name of a local relation, for example <literal>foo</> or - <literal>myschema.mytab</>. Include double quotes if the + Name of a local relation, for example <literal>foo</literal> or + <literal>myschema.mytab</literal>. Include double quotes if the name is mixed-case or contains special characters, for - example <literal>"FooBar"</>; without quotes, the string + example <literal>"FooBar"</literal>; without quotes, the string will be folded to lower case. </para> </listitem> @@ -1687,7 +1687,7 @@ dblink_get_pkey(text relname) returns setof dblink_pkey_results CREATE TYPE dblink_pkey_results AS (position int, colname text); </programlisting> - The <literal>position</> column simply runs from 1 to <replaceable>N</>; + The <literal>position</literal> column simply runs from 1 to <replaceable>N</replaceable>; it is the number of the field within the primary key, not the number within the table's columns. </para> @@ -1748,10 +1748,10 @@ dblink_build_sql_insert(text relname, <title>Description</title> <para> - <function>dblink_build_sql_insert</> can be useful in doing selective + <function>dblink_build_sql_insert</function> can be useful in doing selective replication of a local table to a remote database. It selects a row from the local table based on primary key, and then builds a SQL - <command>INSERT</> command that will duplicate that row, but with + <command>INSERT</command> command that will duplicate that row, but with the primary key values replaced by the values in the last argument. (To make an exact copy of the row, just specify the same values for the last two arguments.) @@ -1766,10 +1766,10 @@ dblink_build_sql_insert(text relname, <term><parameter>relname</parameter></term> <listitem> <para> - Name of a local relation, for example <literal>foo</> or - <literal>myschema.mytab</>. Include double quotes if the + Name of a local relation, for example <literal>foo</literal> or + <literal>myschema.mytab</literal>. Include double quotes if the name is mixed-case or contains special characters, for - example <literal>"FooBar"</>; without quotes, the string + example <literal>"FooBar"</literal>; without quotes, the string will be folded to lower case. </para> </listitem> @@ -1780,7 +1780,7 @@ dblink_build_sql_insert(text relname, <listitem> <para> Attribute numbers (1-based) of the primary key fields, - for example <literal>1 2</>. + for example <literal>1 2</literal>. </para> </listitem> </varlistentry> @@ -1811,7 +1811,7 @@ dblink_build_sql_insert(text relname, <listitem> <para> Values of the primary key fields to be placed in the resulting - <command>INSERT</> command. Each field is represented in text form. + <command>INSERT</command> command. Each field is represented in text form. </para> </listitem> </varlistentry> @@ -1828,10 +1828,10 @@ dblink_build_sql_insert(text relname, <title>Notes</title> <para> - As of <productname>PostgreSQL</> 9.0, the attribute numbers in + As of <productname>PostgreSQL</productname> 9.0, the attribute numbers in <parameter>primary_key_attnums</parameter> are interpreted as logical column numbers, corresponding to the column's position in - <literal>SELECT * FROM relname</>. Previous versions interpreted the + <literal>SELECT * FROM relname</literal>. Previous versions interpreted the numbers as physical column positions. There is a difference if any column(s) to the left of the indicated column have been dropped during the lifetime of the table. @@ -1881,9 +1881,9 @@ dblink_build_sql_delete(text relname, <title>Description</title> <para> - <function>dblink_build_sql_delete</> can be useful in doing selective + <function>dblink_build_sql_delete</function> can be useful in doing selective replication of a local table to a remote database. It builds a SQL - <command>DELETE</> command that will delete the row with the given + <command>DELETE</command> command that will delete the row with the given primary key values. </para> </refsect1> @@ -1896,10 +1896,10 @@ dblink_build_sql_delete(text relname, <term><parameter>relname</parameter></term> <listitem> <para> - Name of a local relation, for example <literal>foo</> or - <literal>myschema.mytab</>. Include double quotes if the + Name of a local relation, for example <literal>foo</literal> or + <literal>myschema.mytab</literal>. Include double quotes if the name is mixed-case or contains special characters, for - example <literal>"FooBar"</>; without quotes, the string + example <literal>"FooBar"</literal>; without quotes, the string will be folded to lower case. </para> </listitem> @@ -1910,7 +1910,7 @@ dblink_build_sql_delete(text relname, <listitem> <para> Attribute numbers (1-based) of the primary key fields, - for example <literal>1 2</>. + for example <literal>1 2</literal>. </para> </listitem> </varlistentry> @@ -1929,7 +1929,7 @@ dblink_build_sql_delete(text relname, <listitem> <para> Values of the primary key fields to be used in the resulting - <command>DELETE</> command. Each field is represented in text form. + <command>DELETE</command> command. Each field is represented in text form. </para> </listitem> </varlistentry> @@ -1946,10 +1946,10 @@ dblink_build_sql_delete(text relname, <title>Notes</title> <para> - As of <productname>PostgreSQL</> 9.0, the attribute numbers in + As of <productname>PostgreSQL</productname> 9.0, the attribute numbers in <parameter>primary_key_attnums</parameter> are interpreted as logical column numbers, corresponding to the column's position in - <literal>SELECT * FROM relname</>. Previous versions interpreted the + <literal>SELECT * FROM relname</literal>. Previous versions interpreted the numbers as physical column positions. There is a difference if any column(s) to the left of the indicated column have been dropped during the lifetime of the table. @@ -2000,15 +2000,15 @@ dblink_build_sql_update(text relname, <title>Description</title> <para> - <function>dblink_build_sql_update</> can be useful in doing selective + <function>dblink_build_sql_update</function> can be useful in doing selective replication of a local table to a remote database. It selects a row from the local table based on primary key, and then builds a SQL - <command>UPDATE</> command that will duplicate that row, but with + <command>UPDATE</command> command that will duplicate that row, but with the primary key values replaced by the values in the last argument. (To make an exact copy of the row, just specify the same values for - the last two arguments.) The <command>UPDATE</> command always assigns + the last two arguments.) The <command>UPDATE</command> command always assigns all fields of the row — the main difference between this and - <function>dblink_build_sql_insert</> is that it's assumed that + <function>dblink_build_sql_insert</function> is that it's assumed that the target row already exists in the remote table. </para> </refsect1> @@ -2021,10 +2021,10 @@ dblink_build_sql_update(text relname, <term><parameter>relname</parameter></term> <listitem> <para> - Name of a local relation, for example <literal>foo</> or - <literal>myschema.mytab</>. Include double quotes if the + Name of a local relation, for example <literal>foo</literal> or + <literal>myschema.mytab</literal>. Include double quotes if the name is mixed-case or contains special characters, for - example <literal>"FooBar"</>; without quotes, the string + example <literal>"FooBar"</literal>; without quotes, the string will be folded to lower case. </para> </listitem> @@ -2035,7 +2035,7 @@ dblink_build_sql_update(text relname, <listitem> <para> Attribute numbers (1-based) of the primary key fields, - for example <literal>1 2</>. + for example <literal>1 2</literal>. </para> </listitem> </varlistentry> @@ -2066,7 +2066,7 @@ dblink_build_sql_update(text relname, <listitem> <para> Values of the primary key fields to be placed in the resulting - <command>UPDATE</> command. Each field is represented in text form. + <command>UPDATE</command> command. Each field is represented in text form. </para> </listitem> </varlistentry> @@ -2083,10 +2083,10 @@ dblink_build_sql_update(text relname, <title>Notes</title> <para> - As of <productname>PostgreSQL</> 9.0, the attribute numbers in + As of <productname>PostgreSQL</productname> 9.0, the attribute numbers in <parameter>primary_key_attnums</parameter> are interpreted as logical column numbers, corresponding to the column's position in - <literal>SELECT * FROM relname</>. Previous versions interpreted the + <literal>SELECT * FROM relname</literal>. Previous versions interpreted the numbers as physical column positions. There is a difference if any column(s) to the left of the indicated column have been dropped during the lifetime of the table. diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml index b05a9c21500..817db92af2d 100644 --- a/doc/src/sgml/ddl.sgml +++ b/doc/src/sgml/ddl.sgml @@ -149,7 +149,7 @@ DROP TABLE products; Nevertheless, it is common in SQL script files to unconditionally try to drop each table before creating it, ignoring any error messages, so that the script works whether or not the table exists. - (If you like, you can use the <literal>DROP TABLE IF EXISTS</> variant + (If you like, you can use the <literal>DROP TABLE IF EXISTS</literal> variant to avoid the error messages, but this is not standard SQL.) </para> @@ -207,9 +207,9 @@ CREATE TABLE products ( The default value can be an expression, which will be evaluated whenever the default value is inserted (<emphasis>not</emphasis> when the table is created). A common example - is for a <type>timestamp</type> column to have a default of <literal>CURRENT_TIMESTAMP</>, + is for a <type>timestamp</type> column to have a default of <literal>CURRENT_TIMESTAMP</literal>, so that it gets set to the time of row insertion. Another common - example is generating a <quote>serial number</> for each row. + example is generating a <quote>serial number</quote> for each row. In <productname>PostgreSQL</productname> this is typically done by something like: <programlisting> @@ -218,8 +218,8 @@ CREATE TABLE products ( ... ); </programlisting> - where the <literal>nextval()</> function supplies successive values - from a <firstterm>sequence object</> (see <xref + where the <literal>nextval()</literal> function supplies successive values + from a <firstterm>sequence object</firstterm> (see <xref linkend="functions-sequence">). This arrangement is sufficiently common that there's a special shorthand for it: <programlisting> @@ -228,7 +228,7 @@ CREATE TABLE products ( ... ); </programlisting> - The <literal>SERIAL</> shorthand is discussed further in <xref + The <literal>SERIAL</literal> shorthand is discussed further in <xref linkend="datatype-serial">. </para> </sect1> @@ -385,7 +385,7 @@ CREATE TABLE products ( CHECK (price > 0), discounted_price numeric, CHECK (discounted_price > 0), - <emphasis>CONSTRAINT valid_discount</> CHECK (price > discounted_price) + <emphasis>CONSTRAINT valid_discount</emphasis> CHECK (price > discounted_price) ); </programlisting> </para> @@ -623,7 +623,7 @@ CREATE TABLE example ( <para> Adding a primary key will automatically create a unique B-tree index on the column or group of columns listed in the primary key, and will - force the column(s) to be marked <literal>NOT NULL</>. + force the column(s) to be marked <literal>NOT NULL</literal>. </para> <para> @@ -828,7 +828,7 @@ CREATE TABLE order_items ( (The essential difference between these two choices is that <literal>NO ACTION</literal> allows the check to be deferred until later in the transaction, whereas <literal>RESTRICT</literal> does not.) - <literal>CASCADE</> specifies that when a referenced row is deleted, + <literal>CASCADE</literal> specifies that when a referenced row is deleted, row(s) referencing it should be automatically deleted as well. There are two other options: <literal>SET NULL</literal> and <literal>SET DEFAULT</literal>. @@ -845,19 +845,19 @@ CREATE TABLE order_items ( Analogous to <literal>ON DELETE</literal> there is also <literal>ON UPDATE</literal> which is invoked when a referenced column is changed (updated). The possible actions are the same. - In this case, <literal>CASCADE</> means that the updated values of the + In this case, <literal>CASCADE</literal> means that the updated values of the referenced column(s) should be copied into the referencing row(s). </para> <para> Normally, a referencing row need not satisfy the foreign key constraint - if any of its referencing columns are null. If <literal>MATCH FULL</> + if any of its referencing columns are null. If <literal>MATCH FULL</literal> is added to the foreign key declaration, a referencing row escapes satisfying the constraint only if all its referencing columns are null (so a mix of null and non-null values is guaranteed to fail a - <literal>MATCH FULL</> constraint). If you don't want referencing rows + <literal>MATCH FULL</literal> constraint). If you don't want referencing rows to be able to avoid satisfying the foreign key constraint, declare the - referencing column(s) as <literal>NOT NULL</>. + referencing column(s) as <literal>NOT NULL</literal>. </para> <para> @@ -909,7 +909,7 @@ CREATE TABLE circles ( <para> See also <link linkend="SQL-CREATETABLE-EXCLUDE"><command>CREATE - TABLE ... CONSTRAINT ... EXCLUDE</></link> for details. + TABLE ... CONSTRAINT ... EXCLUDE</command></link> for details. </para> <para> @@ -923,7 +923,7 @@ CREATE TABLE circles ( <title>System Columns</title> <para> - Every table has several <firstterm>system columns</> that are + Every table has several <firstterm>system columns</firstterm> that are implicitly defined by the system. Therefore, these names cannot be used as names of user-defined columns. (Note that these restrictions are separate from whether the name is a key word or @@ -939,7 +939,7 @@ CREATE TABLE circles ( <variablelist> <varlistentry> - <term><structfield>oid</></term> + <term><structfield>oid</structfield></term> <listitem> <para> <indexterm> @@ -957,7 +957,7 @@ CREATE TABLE circles ( </varlistentry> <varlistentry> - <term><structfield>tableoid</></term> + <term><structfield>tableoid</structfield></term> <listitem> <indexterm> <primary>tableoid</primary> @@ -976,7 +976,7 @@ CREATE TABLE circles ( </varlistentry> <varlistentry> - <term><structfield>xmin</></term> + <term><structfield>xmin</structfield></term> <listitem> <indexterm> <primary>xmin</primary> @@ -992,7 +992,7 @@ CREATE TABLE circles ( </varlistentry> <varlistentry> - <term><structfield>cmin</></term> + <term><structfield>cmin</structfield></term> <listitem> <indexterm> <primary>cmin</primary> @@ -1006,7 +1006,7 @@ CREATE TABLE circles ( </varlistentry> <varlistentry> - <term><structfield>xmax</></term> + <term><structfield>xmax</structfield></term> <listitem> <indexterm> <primary>xmax</primary> @@ -1023,7 +1023,7 @@ CREATE TABLE circles ( </varlistentry> <varlistentry> - <term><structfield>cmax</></term> + <term><structfield>cmax</structfield></term> <listitem> <indexterm> <primary>cmax</primary> @@ -1036,7 +1036,7 @@ CREATE TABLE circles ( </varlistentry> <varlistentry> - <term><structfield>ctid</></term> + <term><structfield>ctid</structfield></term> <listitem> <indexterm> <primary>ctid</primary> @@ -1047,7 +1047,7 @@ CREATE TABLE circles ( although the <structfield>ctid</structfield> can be used to locate the row version very quickly, a row's <structfield>ctid</structfield> will change if it is - updated or moved by <command>VACUUM FULL</>. Therefore + updated or moved by <command>VACUUM FULL</command>. Therefore <structfield>ctid</structfield> is useless as a long-term row identifier. The OID, or even better a user-defined serial number, should be used to identify logical rows. @@ -1074,7 +1074,7 @@ CREATE TABLE circles ( a unique constraint (or unique index) exists, the system takes care not to generate an OID matching an already-existing row. (Of course, this is only possible if the table contains fewer - than 2<superscript>32</> (4 billion) rows, and in practice the + than 2<superscript>32</superscript> (4 billion) rows, and in practice the table size had better be much less than that, or performance might suffer.) </para> @@ -1082,7 +1082,7 @@ CREATE TABLE circles ( <listitem> <para> OIDs should never be assumed to be unique across tables; use - the combination of <structfield>tableoid</> and row OID if you + the combination of <structfield>tableoid</structfield> and row OID if you need a database-wide identifier. </para> </listitem> @@ -1090,7 +1090,7 @@ CREATE TABLE circles ( <para> Of course, the tables in question must be created <literal>WITH OIDS</literal>. As of <productname>PostgreSQL</productname> 8.1, - <literal>WITHOUT OIDS</> is the default. + <literal>WITHOUT OIDS</literal> is the default. </para> </listitem> </itemizedlist> @@ -1107,7 +1107,7 @@ CREATE TABLE circles ( <para> Command identifiers are also 32-bit quantities. This creates a hard limit - of 2<superscript>32</> (4 billion) <acronym>SQL</acronym> commands + of 2<superscript>32</superscript> (4 billion) <acronym>SQL</acronym> commands within a single transaction. In practice this limit is not a problem — note that the limit is on the number of <acronym>SQL</acronym> commands, not the number of rows processed. @@ -1186,7 +1186,7 @@ CREATE TABLE circles ( ALTER TABLE products ADD COLUMN description text; </programlisting> The new column is initially filled with whatever default - value is given (null if you don't specify a <literal>DEFAULT</> clause). + value is given (null if you don't specify a <literal>DEFAULT</literal> clause). </para> <para> @@ -1196,9 +1196,9 @@ ALTER TABLE products ADD COLUMN description text; ALTER TABLE products ADD COLUMN description text CHECK (description <> ''); </programlisting> In fact all the options that can be applied to a column description - in <command>CREATE TABLE</> can be used here. Keep in mind however + in <command>CREATE TABLE</command> can be used here. Keep in mind however that the default value must satisfy the given constraints, or the - <literal>ADD</> will fail. Alternatively, you can add + <literal>ADD</literal> will fail. Alternatively, you can add constraints later (see below) after you've filled in the new column correctly. </para> @@ -1210,7 +1210,7 @@ ALTER TABLE products ADD COLUMN description text CHECK (description <> '') specified, <productname>PostgreSQL</productname> is able to avoid the physical update. So if you intend to fill the column with mostly nondefault values, it's best to add the column with no default, - insert the correct values using <command>UPDATE</>, and then add any + insert the correct values using <command>UPDATE</command>, and then add any desired default as described below. </para> </tip> @@ -1234,7 +1234,7 @@ ALTER TABLE products DROP COLUMN description; foreign key constraint of another table, <productname>PostgreSQL</productname> will not silently drop that constraint. You can authorize dropping everything that depends on - the column by adding <literal>CASCADE</>: + the column by adding <literal>CASCADE</literal>: <programlisting> ALTER TABLE products DROP COLUMN description CASCADE; </programlisting> @@ -1290,13 +1290,13 @@ ALTER TABLE products ALTER COLUMN product_no SET NOT NULL; <programlisting> ALTER TABLE products DROP CONSTRAINT some_name; </programlisting> - (If you are dealing with a generated constraint name like <literal>$2</>, + (If you are dealing with a generated constraint name like <literal>$2</literal>, don't forget that you'll need to double-quote it to make it a valid identifier.) </para> <para> - As with dropping a column, you need to add <literal>CASCADE</> if you + As with dropping a column, you need to add <literal>CASCADE</literal> if you want to drop a constraint that something else depends on. An example is that a foreign key constraint depends on a unique or primary key constraint on the referenced column(s). @@ -1326,7 +1326,7 @@ ALTER TABLE products ALTER COLUMN product_no DROP NOT NULL; ALTER TABLE products ALTER COLUMN price SET DEFAULT 7.77; </programlisting> Note that this doesn't affect any existing rows in the table, it - just changes the default for future <command>INSERT</> commands. + just changes the default for future <command>INSERT</command> commands. </para> <para> @@ -1356,12 +1356,12 @@ ALTER TABLE products ALTER COLUMN price TYPE numeric(10,2); </programlisting> This will succeed only if each existing entry in the column can be converted to the new type by an implicit cast. If a more complex - conversion is needed, you can add a <literal>USING</> clause that + conversion is needed, you can add a <literal>USING</literal> clause that specifies how to compute the new values from the old. </para> <para> - <productname>PostgreSQL</> will attempt to convert the column's + <productname>PostgreSQL</productname> will attempt to convert the column's default value (if any) to the new type, as well as any constraints that involve the column. But these conversions might fail, or might produce surprising results. It's often best to drop any constraints @@ -1437,11 +1437,11 @@ ALTER TABLE products RENAME TO items; </para> <para> - There are different kinds of privileges: <literal>SELECT</>, - <literal>INSERT</>, <literal>UPDATE</>, <literal>DELETE</>, - <literal>TRUNCATE</>, <literal>REFERENCES</>, <literal>TRIGGER</>, - <literal>CREATE</>, <literal>CONNECT</>, <literal>TEMPORARY</>, - <literal>EXECUTE</>, and <literal>USAGE</>. + There are different kinds of privileges: <literal>SELECT</literal>, + <literal>INSERT</literal>, <literal>UPDATE</literal>, <literal>DELETE</literal>, + <literal>TRUNCATE</literal>, <literal>REFERENCES</literal>, <literal>TRIGGER</literal>, + <literal>CREATE</literal>, <literal>CONNECT</literal>, <literal>TEMPORARY</literal>, + <literal>EXECUTE</literal>, and <literal>USAGE</literal>. The privileges applicable to a particular object vary depending on the object's type (table, function, etc). For complete information on the different types of privileges @@ -1480,7 +1480,7 @@ GRANT UPDATE ON accounts TO joe; <para> The special <quote>role</quote> name <literal>PUBLIC</literal> can be used to grant a privilege to every role on the system. Also, - <quote>group</> roles can be set up to help manage privileges when + <quote>group</quote> roles can be set up to help manage privileges when there are many users of a database — for details see <xref linkend="user-manag">. </para> @@ -1492,7 +1492,7 @@ GRANT UPDATE ON accounts TO joe; REVOKE ALL ON accounts FROM PUBLIC; </programlisting> The special privileges of the object owner (i.e., the right to do - <command>DROP</>, <command>GRANT</>, <command>REVOKE</>, etc.) + <command>DROP</command>, <command>GRANT</command>, <command>REVOKE</command>, etc.) are always implicit in being the owner, and cannot be granted or revoked. But the object owner can choose to revoke their own ordinary privileges, for example to make a @@ -1502,7 +1502,7 @@ REVOKE ALL ON accounts FROM PUBLIC; <para> Ordinarily, only the object's owner (or a superuser) can grant or revoke privileges on an object. However, it is possible to grant a - privilege <quote>with grant option</>, which gives the recipient + privilege <quote>with grant option</quote>, which gives the recipient the right to grant it in turn to others. If the grant option is subsequently revoked then all who received the privilege from that recipient (directly or through a chain of grants) will lose the @@ -1525,10 +1525,10 @@ REVOKE ALL ON accounts FROM PUBLIC; <para> In addition to the SQL-standard <link linkend="ddl-priv">privilege system</link> available through <xref linkend="sql-grant">, - tables can have <firstterm>row security policies</> that restrict, + tables can have <firstterm>row security policies</firstterm> that restrict, on a per-user basis, which rows can be returned by normal queries or inserted, updated, or deleted by data modification commands. - This feature is also known as <firstterm>Row-Level Security</>. + This feature is also known as <firstterm>Row-Level Security</firstterm>. By default, tables do not have any policies, so that if a user has access privileges to a table according to the SQL privilege system, all rows within it are equally available for querying or updating. @@ -1537,20 +1537,20 @@ REVOKE ALL ON accounts FROM PUBLIC; <para> When row security is enabled on a table (with <link linkend="sql-altertable">ALTER TABLE ... ENABLE ROW LEVEL - SECURITY</>), all normal access to the table for selecting rows or + SECURITY</link>), all normal access to the table for selecting rows or modifying rows must be allowed by a row security policy. (However, the table's owner is typically not subject to row security policies.) If no policy exists for the table, a default-deny policy is used, meaning that no rows are visible or can be modified. Operations that apply to the - whole table, such as <command>TRUNCATE</> and <literal>REFERENCES</>, + whole table, such as <command>TRUNCATE</command> and <literal>REFERENCES</literal>, are not subject to row security. </para> <para> Row security policies can be specific to commands, or to roles, or to both. A policy can be specified to apply to <literal>ALL</literal> - commands, or to <literal>SELECT</>, <literal>INSERT</>, <literal>UPDATE</>, - or <literal>DELETE</>. Multiple roles can be assigned to a given + commands, or to <literal>SELECT</literal>, <literal>INSERT</literal>, <literal>UPDATE</literal>, + or <literal>DELETE</literal>. Multiple roles can be assigned to a given policy, and normal role membership and inheritance rules apply. </para> @@ -1562,7 +1562,7 @@ REVOKE ALL ON accounts FROM PUBLIC; rule are <literal>leakproof</literal> functions, which are guaranteed to not leak information; the optimizer may choose to apply such functions ahead of the row-security check.) Rows for which the expression does - not return <literal>true</> will not be processed. Separate expressions + not return <literal>true</literal> will not be processed. Separate expressions may be specified to provide independent control over the rows which are visible and the rows which are allowed to be modified. Policy expressions are run as part of the query and with the privileges of the @@ -1571,11 +1571,11 @@ REVOKE ALL ON accounts FROM PUBLIC; </para> <para> - Superusers and roles with the <literal>BYPASSRLS</> attribute always + Superusers and roles with the <literal>BYPASSRLS</literal> attribute always bypass the row security system when accessing a table. Table owners normally bypass row security as well, though a table owner can choose to be subject to row security with <link linkend="sql-altertable">ALTER - TABLE ... FORCE ROW LEVEL SECURITY</>. + TABLE ... FORCE ROW LEVEL SECURITY</link>. </para> <para> @@ -1609,8 +1609,8 @@ REVOKE ALL ON accounts FROM PUBLIC; <para> As a simple example, here is how to create a policy on - the <literal>account</> relation to allow only members of - the <literal>managers</> role to access rows, and only rows of their + the <literal>account</literal> relation to allow only members of + the <literal>managers</literal> role to access rows, and only rows of their accounts: </para> @@ -1627,7 +1627,7 @@ CREATE POLICY account_managers ON accounts TO managers If no role is specified, or the special user name <literal>PUBLIC</literal> is used, then the policy applies to all users on the system. To allow all users to access their own row in - a <literal>users</> table, a simple policy can be used: + a <literal>users</literal> table, a simple policy can be used: </para> <programlisting> @@ -1637,9 +1637,9 @@ CREATE POLICY user_policy ON users <para> To use a different policy for rows that are being added to the table - compared to those rows that are visible, the <literal>WITH CHECK</> + compared to those rows that are visible, the <literal>WITH CHECK</literal> clause can be used. This policy would allow all users to view all rows - in the <literal>users</> table, but only modify their own: + in the <literal>users</literal> table, but only modify their own: </para> <programlisting> @@ -1649,7 +1649,7 @@ CREATE POLICY user_policy ON users </programlisting> <para> - Row security can also be disabled with the <command>ALTER TABLE</> + Row security can also be disabled with the <command>ALTER TABLE</command> command. Disabling row security does not remove any policies that are defined on the table; they are simply ignored. Then all rows in the table are visible and modifiable, subject to the standard SQL privileges @@ -1658,7 +1658,7 @@ CREATE POLICY user_policy ON users <para> Below is a larger example of how this feature can be used in production - environments. The table <literal>passwd</> emulates a Unix password + environments. The table <literal>passwd</literal> emulates a Unix password file: </para> @@ -1820,7 +1820,7 @@ UPDATE 0 Referential integrity checks, such as unique or primary key constraints and foreign key references, always bypass row security to ensure that data integrity is maintained. Care must be taken when developing - schemas and row level policies to avoid <quote>covert channel</> leaks of + schemas and row level policies to avoid <quote>covert channel</quote> leaks of information through such referential integrity checks. </para> @@ -1830,7 +1830,7 @@ UPDATE 0 disastrous if row security silently caused some rows to be omitted from the backup. In such a situation, you can set the <xref linkend="guc-row-security"> configuration parameter - to <literal>off</>. This does not in itself bypass row security; + to <literal>off</literal>. This does not in itself bypass row security; what it does is throw an error if any query's results would get filtered by a policy. The reason for the error can then be investigated and fixed. @@ -1842,7 +1842,7 @@ UPDATE 0 best-performing case; when possible, it's best to design row security applications to work this way. If it is necessary to consult other rows or other tables to make a policy decision, that can be accomplished using - sub-<command>SELECT</>s, or functions that contain <command>SELECT</>s, + sub-<command>SELECT</command>s, or functions that contain <command>SELECT</command>s, in the policy expressions. Be aware however that such accesses can create race conditions that could allow information leakage if care is not taken. As an example, consider the following table design: @@ -1896,8 +1896,8 @@ GRANT ALL ON information TO public; </programlisting> <para> - Now suppose that <literal>alice</> wishes to change the <quote>slightly - secret</> information, but decides that <literal>mallory</> should not + Now suppose that <literal>alice</literal> wishes to change the <quote>slightly + secret</quote> information, but decides that <literal>mallory</literal> should not be trusted with the new content of that row, so she does: </para> @@ -1909,36 +1909,36 @@ COMMIT; </programlisting> <para> - That looks safe; there is no window wherein <literal>mallory</> should be - able to see the <quote>secret from mallory</> string. However, there is - a race condition here. If <literal>mallory</> is concurrently doing, + That looks safe; there is no window wherein <literal>mallory</literal> should be + able to see the <quote>secret from mallory</quote> string. However, there is + a race condition here. If <literal>mallory</literal> is concurrently doing, say, <programlisting> SELECT * FROM information WHERE group_id = 2 FOR UPDATE; </programlisting> - and her transaction is in <literal>READ COMMITTED</> mode, it is possible - for her to see <quote>secret from mallory</>. That happens if her - transaction reaches the <structname>information</> row just - after <literal>alice</>'s does. It blocks waiting - for <literal>alice</>'s transaction to commit, then fetches the updated - row contents thanks to the <literal>FOR UPDATE</> clause. However, it - does <emphasis>not</> fetch an updated row for the - implicit <command>SELECT</> from <structname>users</>, because that - sub-<command>SELECT</> did not have <literal>FOR UPDATE</>; instead - the <structname>users</> row is read with the snapshot taken at the start + and her transaction is in <literal>READ COMMITTED</literal> mode, it is possible + for her to see <quote>secret from mallory</quote>. That happens if her + transaction reaches the <structname>information</structname> row just + after <literal>alice</literal>'s does. It blocks waiting + for <literal>alice</literal>'s transaction to commit, then fetches the updated + row contents thanks to the <literal>FOR UPDATE</literal> clause. However, it + does <emphasis>not</emphasis> fetch an updated row for the + implicit <command>SELECT</command> from <structname>users</structname>, because that + sub-<command>SELECT</command> did not have <literal>FOR UPDATE</literal>; instead + the <structname>users</structname> row is read with the snapshot taken at the start of the query. Therefore, the policy expression tests the old value - of <literal>mallory</>'s privilege level and allows her to see the + of <literal>mallory</literal>'s privilege level and allows her to see the updated row. </para> <para> There are several ways around this problem. One simple answer is to use - <literal>SELECT ... FOR SHARE</> in sub-<command>SELECT</>s in row - security policies. However, that requires granting <literal>UPDATE</> - privilege on the referenced table (here <structname>users</>) to the + <literal>SELECT ... FOR SHARE</literal> in sub-<command>SELECT</command>s in row + security policies. However, that requires granting <literal>UPDATE</literal> + privilege on the referenced table (here <structname>users</structname>) to the affected users, which might be undesirable. (But another row security policy could be applied to prevent them from actually exercising that - privilege; or the sub-<command>SELECT</> could be embedded into a security + privilege; or the sub-<command>SELECT</command> could be embedded into a security definer function.) Also, heavy concurrent use of row share locks on the referenced table could pose a performance problem, especially if updates of it are frequent. Another solution, practical if updates of the @@ -1977,19 +1977,19 @@ SELECT * FROM information WHERE group_id = 2 FOR UPDATE; <para> Users of a cluster do not necessarily have the privilege to access every database in the cluster. Sharing of user names means that there - cannot be different users named, say, <literal>joe</> in two databases + cannot be different users named, say, <literal>joe</literal> in two databases in the same cluster; but the system can be configured to allow - <literal>joe</> access to only some of the databases. + <literal>joe</literal> access to only some of the databases. </para> </note> <para> - A database contains one or more named <firstterm>schemas</>, which + A database contains one or more named <firstterm>schemas</firstterm>, which in turn contain tables. Schemas also contain other kinds of named objects, including data types, functions, and operators. The same object name can be used in different schemas without conflict; for - example, both <literal>schema1</> and <literal>myschema</> can - contain tables named <literal>mytable</>. Unlike databases, + example, both <literal>schema1</literal> and <literal>myschema</literal> can + contain tables named <literal>mytable</literal>. Unlike databases, schemas are not rigidly separated: a user can access objects in any of the schemas in the database they are connected to, if they have privileges to do so. @@ -2053,10 +2053,10 @@ CREATE SCHEMA myschema; <para> To create or access objects in a schema, write a - <firstterm>qualified name</> consisting of the schema name and + <firstterm>qualified name</firstterm> consisting of the schema name and table name separated by a dot: <synopsis> -<replaceable>schema</><literal>.</><replaceable>table</> +<replaceable>schema</replaceable><literal>.</literal><replaceable>table</replaceable> </synopsis> This works anywhere a table name is expected, including the table modification commands and the data access commands discussed in @@ -2068,10 +2068,10 @@ CREATE SCHEMA myschema; <para> Actually, the even more general syntax <synopsis> -<replaceable>database</><literal>.</><replaceable>schema</><literal>.</><replaceable>table</> +<replaceable>database</replaceable><literal>.</literal><replaceable>schema</replaceable><literal>.</literal><replaceable>table</replaceable> </synopsis> can be used too, but at present this is just for <foreignphrase>pro - forma</> compliance with the SQL standard. If you write a database name, + forma</foreignphrase> compliance with the SQL standard. If you write a database name, it must be the same as the database you are connected to. </para> @@ -2116,7 +2116,7 @@ CREATE SCHEMA <replaceable>schema_name</replaceable> AUTHORIZATION <replaceable> </para> <para> - Schema names beginning with <literal>pg_</> are reserved for + Schema names beginning with <literal>pg_</literal> are reserved for system purposes and cannot be created by users. </para> </sect2> @@ -2163,9 +2163,9 @@ CREATE TABLE public.products ( ... ); <para> Qualified names are tedious to write, and it's often best not to wire a particular schema name into applications anyway. Therefore - tables are often referred to by <firstterm>unqualified names</>, + tables are often referred to by <firstterm>unqualified names</firstterm>, which consist of just the table name. The system determines which table - is meant by following a <firstterm>search path</>, which is a list + is meant by following a <firstterm>search path</firstterm>, which is a list of schemas to look in. The first matching table in the search path is taken to be the one wanted. If there is no match in the search path, an error is reported, even if matching table names exist @@ -2180,7 +2180,7 @@ CREATE TABLE public.products ( ... ); <para> The first schema named in the search path is called the current schema. Aside from being the first schema searched, it is also the schema in - which new tables will be created if the <command>CREATE TABLE</> + which new tables will be created if the <command>CREATE TABLE</command> command does not specify a schema name. </para> @@ -2253,7 +2253,7 @@ SET search_path TO myschema; need to write a qualified operator name in an expression, there is a special provision: you must write <synopsis> -<literal>OPERATOR(</><replaceable>schema</><literal>.</><replaceable>operator</><literal>)</> +<literal>OPERATOR(</literal><replaceable>schema</replaceable><literal>.</literal><replaceable>operator</replaceable><literal>)</literal> </synopsis> This is needed to avoid syntactic ambiguity. An example is: <programlisting> @@ -2310,28 +2310,28 @@ REVOKE CREATE ON SCHEMA public FROM PUBLIC; </indexterm> <para> - In addition to <literal>public</> and user-created schemas, each - database contains a <literal>pg_catalog</> schema, which contains + In addition to <literal>public</literal> and user-created schemas, each + database contains a <literal>pg_catalog</literal> schema, which contains the system tables and all the built-in data types, functions, and - operators. <literal>pg_catalog</> is always effectively part of + operators. <literal>pg_catalog</literal> is always effectively part of the search path. If it is not named explicitly in the path then - it is implicitly searched <emphasis>before</> searching the path's + it is implicitly searched <emphasis>before</emphasis> searching the path's schemas. This ensures that built-in names will always be findable. However, you can explicitly place - <literal>pg_catalog</> at the end of your search path if you + <literal>pg_catalog</literal> at the end of your search path if you prefer to have user-defined names override built-in names. </para> <para> - Since system table names begin with <literal>pg_</>, it is best to + Since system table names begin with <literal>pg_</literal>, it is best to avoid such names to ensure that you won't suffer a conflict if some future version defines a system table named the same as your table. (With the default search path, an unqualified reference to your table name would then be resolved as the system table instead.) System tables will continue to follow the convention of having - names beginning with <literal>pg_</>, so that they will not + names beginning with <literal>pg_</literal>, so that they will not conflict with unqualified user-table names so long as users avoid - the <literal>pg_</> prefix. + the <literal>pg_</literal> prefix. </para> </sect2> @@ -2397,15 +2397,15 @@ REVOKE CREATE ON SCHEMA public FROM PUBLIC; implements only the basic schema support specified in the standard. Therefore, many users consider qualified names to really consist of - <literal><replaceable>user_name</>.<replaceable>table_name</></literal>. + <literal><replaceable>user_name</replaceable>.<replaceable>table_name</replaceable></literal>. This is how <productname>PostgreSQL</productname> will effectively behave if you create a per-user schema for every user. </para> <para> - Also, there is no concept of a <literal>public</> schema in the + Also, there is no concept of a <literal>public</literal> schema in the SQL standard. For maximum conformance to the standard, you should - not use (perhaps even remove) the <literal>public</> schema. + not use (perhaps even remove) the <literal>public</literal> schema. </para> <para> @@ -2461,9 +2461,9 @@ CREATE TABLE capitals ( ) INHERITS (cities); </programlisting> - In this case, the <structname>capitals</> table <firstterm>inherits</> - all the columns of its parent table, <structname>cities</>. State - capitals also have an extra column, <structfield>state</>, that shows + In this case, the <structname>capitals</structname> table <firstterm>inherits</firstterm> + all the columns of its parent table, <structname>cities</structname>. State + capitals also have an extra column, <structfield>state</structfield>, that shows their state. </para> @@ -2521,7 +2521,7 @@ SELECT name, altitude </para> <para> - You can also write the table name with a trailing <literal>*</> + You can also write the table name with a trailing <literal>*</literal> to explicitly specify that descendant tables are included: <programlisting> @@ -2530,7 +2530,7 @@ SELECT name, altitude WHERE altitude > 500; </programlisting> - Writing <literal>*</> is not necessary, since this behavior is always + Writing <literal>*</literal> is not necessary, since this behavior is always the default. However, this syntax is still supported for compatibility with older releases where the default could be changed. </para> @@ -2559,7 +2559,7 @@ WHERE c.altitude > 500; (If you try to reproduce this example, you will probably get different numeric OIDs.) By doing a join with - <structname>pg_class</> you can see the actual table names: + <structname>pg_class</structname> you can see the actual table names: <programlisting> SELECT p.relname, c.name, c.altitude @@ -2579,7 +2579,7 @@ WHERE c.altitude > 500 AND c.tableoid = p.oid; </para> <para> - Another way to get the same effect is to use the <type>regclass</> + Another way to get the same effect is to use the <type>regclass</type> alias type, which will print the table OID symbolically: <programlisting> @@ -2603,15 +2603,15 @@ VALUES ('Albany', NULL, NULL, 'NY'); <command>INSERT</command> always inserts into exactly the table specified. In some cases it is possible to redirect the insertion using a rule (see <xref linkend="rules">). However that does not - help for the above case because the <structname>cities</> table - does not contain the column <structfield>state</>, and so the + help for the above case because the <structname>cities</structname> table + does not contain the column <structfield>state</structfield>, and so the command will be rejected before the rule can be applied. </para> <para> All check constraints and not-null constraints on a parent table are automatically inherited by its children, unless explicitly specified - otherwise with <literal>NO INHERIT</> clauses. Other types of constraints + otherwise with <literal>NO INHERIT</literal> clauses. Other types of constraints (unique, primary key, and foreign key constraints) are not inherited. </para> @@ -2620,7 +2620,7 @@ VALUES ('Albany', NULL, NULL, 'NY'); the union of the columns defined by the parent tables. Any columns declared in the child table's definition are added to these. If the same column name appears in multiple parent tables, or in both a parent - table and the child's definition, then these columns are <quote>merged</> + table and the child's definition, then these columns are <quote>merged</quote> so that there is only one such column in the child table. To be merged, columns must have the same data types, else an error is raised. Inheritable check constraints and not-null constraints are merged in a @@ -2632,7 +2632,7 @@ VALUES ('Albany', NULL, NULL, 'NY'); <para> Table inheritance is typically established when the child table is - created, using the <literal>INHERITS</> clause of the + created, using the <literal>INHERITS</literal> clause of the <xref linkend="sql-createtable"> statement. Alternatively, a table which is already defined in a compatible way can @@ -2642,7 +2642,7 @@ VALUES ('Albany', NULL, NULL, 'NY'); the same names and types as the columns of the parent. It must also include check constraints with the same names and check expressions as those of the parent. Similarly an inheritance link can be removed from a child using the - <literal>NO INHERIT</literal> variant of <command>ALTER TABLE</>. + <literal>NO INHERIT</literal> variant of <command>ALTER TABLE</command>. Dynamically adding and removing inheritance links like this can be useful when the inheritance relationship is being used for table partitioning (see <xref linkend="ddl-partitioning">). @@ -2680,10 +2680,10 @@ VALUES ('Albany', NULL, NULL, 'NY'); <para> Inherited queries perform access permission checks on the parent table - only. Thus, for example, granting <literal>UPDATE</> permission on - the <structname>cities</> table implies permission to update rows in + only. Thus, for example, granting <literal>UPDATE</literal> permission on + the <structname>cities</structname> table implies permission to update rows in the <structname>capitals</structname> table as well, when they are - accessed through <structname>cities</>. This preserves the appearance + accessed through <structname>cities</structname>. This preserves the appearance that the data is (also) in the parent table. But the <structname>capitals</structname> table could not be updated directly without an additional grant. In a similar way, the parent table's row @@ -2732,33 +2732,33 @@ VALUES ('Albany', NULL, NULL, 'NY'); <itemizedlist> <listitem> <para> - If we declared <structname>cities</>.<structfield>name</> to be - <literal>UNIQUE</> or a <literal>PRIMARY KEY</>, this would not stop the - <structname>capitals</> table from having rows with names duplicating - rows in <structname>cities</>. And those duplicate rows would by - default show up in queries from <structname>cities</>. In fact, by - default <structname>capitals</> would have no unique constraint at all, + If we declared <structname>cities</structname>.<structfield>name</structfield> to be + <literal>UNIQUE</literal> or a <literal>PRIMARY KEY</literal>, this would not stop the + <structname>capitals</structname> table from having rows with names duplicating + rows in <structname>cities</structname>. And those duplicate rows would by + default show up in queries from <structname>cities</structname>. In fact, by + default <structname>capitals</structname> would have no unique constraint at all, and so could contain multiple rows with the same name. - You could add a unique constraint to <structname>capitals</>, but this - would not prevent duplication compared to <structname>cities</>. + You could add a unique constraint to <structname>capitals</structname>, but this + would not prevent duplication compared to <structname>cities</structname>. </para> </listitem> <listitem> <para> Similarly, if we were to specify that - <structname>cities</>.<structfield>name</> <literal>REFERENCES</> some + <structname>cities</structname>.<structfield>name</structfield> <literal>REFERENCES</literal> some other table, this constraint would not automatically propagate to - <structname>capitals</>. In this case you could work around it by - manually adding the same <literal>REFERENCES</> constraint to - <structname>capitals</>. + <structname>capitals</structname>. In this case you could work around it by + manually adding the same <literal>REFERENCES</literal> constraint to + <structname>capitals</structname>. </para> </listitem> <listitem> <para> Specifying that another table's column <literal>REFERENCES - cities(name)</> would allow the other table to contain city names, but + cities(name)</literal> would allow the other table to contain city names, but not capital names. There is no good workaround for this case. </para> </listitem> @@ -2825,10 +2825,10 @@ VALUES ('Albany', NULL, NULL, 'NY'); <para> Bulk loads and deletes can be accomplished by adding or removing partitions, if that requirement is planned into the partitioning design. - Doing <command>ALTER TABLE DETACH PARTITION</> or dropping an individual - partition using <command>DROP TABLE</> is far faster than a bulk + Doing <command>ALTER TABLE DETACH PARTITION</command> or dropping an individual + partition using <command>DROP TABLE</command> is far faster than a bulk operation. These commands also entirely avoid the - <command>VACUUM</command> overhead caused by a bulk <command>DELETE</>. + <command>VACUUM</command> overhead caused by a bulk <command>DELETE</command>. </para> </listitem> @@ -2921,7 +2921,7 @@ VALUES ('Albany', NULL, NULL, 'NY'); containing data as a partition of a partitioned table, or remove a partition from a partitioned table turning it into a standalone table; see <xref linkend="sql-altertable"> to learn more about the - <command>ATTACH PARTITION</> and <command>DETACH PARTITION</> + <command>ATTACH PARTITION</command> and <command>DETACH PARTITION</command> sub-commands. </para> @@ -2968,9 +2968,9 @@ VALUES ('Albany', NULL, NULL, 'NY'); <para> Partitions cannot have columns that are not present in the parent. It is neither possible to specify columns when creating partitions with - <command>CREATE TABLE</> nor is it possible to add columns to - partitions after-the-fact using <command>ALTER TABLE</>. Tables may be - added as a partition with <command>ALTER TABLE ... ATTACH PARTITION</> + <command>CREATE TABLE</command> nor is it possible to add columns to + partitions after-the-fact using <command>ALTER TABLE</command>. Tables may be + added as a partition with <command>ALTER TABLE ... ATTACH PARTITION</command> only if their columns exactly match the parent, including any <literal>oid</literal> column. </para> @@ -3049,7 +3049,7 @@ CREATE TABLE measurement ( accessing the partitioned table will have to scan fewer partitions if the conditions involve some or all of these columns. For example, consider a table range partitioned using columns - <structfield>lastname</> and <structfield>firstname</> (in that order) + <structfield>lastname</structfield> and <structfield>firstname</structfield> (in that order) as the partition key. </para> </listitem> @@ -3067,7 +3067,7 @@ CREATE TABLE measurement ( <para> Partitions thus created are in every way normal - <productname>PostgreSQL</> + <productname>PostgreSQL</productname> tables (or, possibly, foreign tables). It is possible to specify a tablespace and storage parameters for each partition separately. </para> @@ -3111,12 +3111,12 @@ CREATE TABLE measurement_y2006m02 PARTITION OF measurement PARTITION BY RANGE (peaktemp); </programlisting> - After creating partitions of <structname>measurement_y2006m02</>, - any data inserted into <structname>measurement</> that is mapped to - <structname>measurement_y2006m02</> (or data that is directly inserted - into <structname>measurement_y2006m02</>, provided it satisfies its + After creating partitions of <structname>measurement_y2006m02</structname>, + any data inserted into <structname>measurement</structname> that is mapped to + <structname>measurement_y2006m02</structname> (or data that is directly inserted + into <structname>measurement_y2006m02</structname>, provided it satisfies its partition constraint) will be further redirected to one of its - partitions based on the <structfield>peaktemp</> column. The partition + partitions based on the <structfield>peaktemp</structfield> column. The partition key specified may overlap with the parent's partition key, although care should be taken when specifying the bounds of a sub-partition such that the set of data it accepts constitutes a subset of what @@ -3147,7 +3147,7 @@ CREATE INDEX ON measurement_y2008m01 (logdate); <listitem> <para> Ensure that the <xref linkend="guc-constraint-exclusion"> - configuration parameter is not disabled in <filename>postgresql.conf</>. + configuration parameter is not disabled in <filename>postgresql.conf</filename>. If it is, queries will not be optimized as desired. </para> </listitem> @@ -3197,7 +3197,7 @@ ALTER TABLE measurement DETACH PARTITION measurement_y2006m02; This allows further operations to be performed on the data before it is dropped. For example, this is often a useful time to back up - the data using <command>COPY</>, <application>pg_dump</>, or + the data using <command>COPY</command>, <application>pg_dump</application>, or similar tools. It might also be a useful time to aggregate data into smaller formats, perform other data manipulations, or run reports. @@ -3236,14 +3236,14 @@ ALTER TABLE measurement ATTACH PARTITION measurement_y2008m02 </para> <para> - Before running the <command>ATTACH PARTITION</> command, it is - recommended to create a <literal>CHECK</> constraint on the table to + Before running the <command>ATTACH PARTITION</command> command, it is + recommended to create a <literal>CHECK</literal> constraint on the table to be attached describing the desired partition constraint. That way, the system will be able to skip the scan to validate the implicit partition constraint. Without such a constraint, the table will be scanned to validate the partition constraint while holding an <literal>ACCESS EXCLUSIVE</literal> lock on the parent table. - One may then drop the constraint after <command>ATTACH PARTITION</> + One may then drop the constraint after <command>ATTACH PARTITION</command> is finished, because it is no longer necessary. </para> </sect3> @@ -3285,7 +3285,7 @@ ALTER TABLE measurement ATTACH PARTITION measurement_y2008m02 <listitem> <para> - An <command>UPDATE</> that causes a row to move from one partition to + An <command>UPDATE</command> that causes a row to move from one partition to another fails, because the new value of the row fails to satisfy the implicit partition constraint of the original partition. </para> @@ -3376,7 +3376,7 @@ ALTER TABLE measurement ATTACH PARTITION measurement_y2008m02 the master table. Normally, these tables will not add any columns to the set inherited from the master. Just as with declarative partitioning, these partitions are in every way normal - <productname>PostgreSQL</> tables (or foreign tables). + <productname>PostgreSQL</productname> tables (or foreign tables). </para> <para> @@ -3460,7 +3460,7 @@ CREATE INDEX measurement_y2008m01_logdate ON measurement_y2008m01 (logdate); <listitem> <para> We want our application to be able to say <literal>INSERT INTO - measurement ...</> and have the data be redirected into the + measurement ...</literal> and have the data be redirected into the appropriate partition table. We can arrange that by attaching a suitable trigger function to the master table. If data will be added only to the latest partition, we can @@ -3567,9 +3567,9 @@ DO INSTEAD </para> <para> - Be aware that <command>COPY</> ignores rules. If you want to - use <command>COPY</> to insert data, you'll need to copy into the - correct partition table rather than into the master. <command>COPY</> + Be aware that <command>COPY</command> ignores rules. If you want to + use <command>COPY</command> to insert data, you'll need to copy into the + correct partition table rather than into the master. <command>COPY</command> does fire triggers, so you can use it normally if you use the trigger approach. </para> @@ -3585,7 +3585,7 @@ DO INSTEAD <para> Ensure that the <xref linkend="guc-constraint-exclusion"> configuration parameter is not disabled in - <filename>postgresql.conf</>. + <filename>postgresql.conf</filename>. If it is, queries will not be optimized as desired. </para> </listitem> @@ -3666,8 +3666,8 @@ ALTER TABLE measurement_y2008m02 INHERIT measurement; <para> The schemes shown here assume that the partition key column(s) of a row never change, or at least do not change enough to require - it to move to another partition. An <command>UPDATE</> that attempts - to do that will fail because of the <literal>CHECK</> constraints. + it to move to another partition. An <command>UPDATE</command> that attempts + to do that will fail because of the <literal>CHECK</literal> constraints. If you need to handle such cases, you can put suitable update triggers on the partition tables, but it makes management of the structure much more complicated. @@ -3688,8 +3688,8 @@ ANALYZE measurement; <listitem> <para> - <command>INSERT</command> statements with <literal>ON CONFLICT</> - clauses are unlikely to work as expected, as the <literal>ON CONFLICT</> + <command>INSERT</command> statements with <literal>ON CONFLICT</literal> + clauses are unlikely to work as expected, as the <literal>ON CONFLICT</literal> action is only taken in case of unique violations on the specified target relation, not its child relations. </para> @@ -3717,7 +3717,7 @@ ANALYZE measurement; </indexterm> <para> - <firstterm>Constraint exclusion</> is a query optimization technique + <firstterm>Constraint exclusion</firstterm> is a query optimization technique that improves performance for partitioned tables defined in the fashion described above (both declaratively partitioned tables and those implemented using inheritance). As an example: @@ -3728,17 +3728,17 @@ SELECT count(*) FROM measurement WHERE logdate >= DATE '2008-01-01'; </programlisting> Without constraint exclusion, the above query would scan each of - the partitions of the <structname>measurement</> table. With constraint + the partitions of the <structname>measurement</structname> table. With constraint exclusion enabled, the planner will examine the constraints of each partition and try to prove that the partition need not be scanned because it could not contain any rows meeting the query's - <literal>WHERE</> clause. When the planner can prove this, it + <literal>WHERE</literal> clause. When the planner can prove this, it excludes the partition from the query plan. </para> <para> - You can use the <command>EXPLAIN</> command to show the difference - between a plan with <varname>constraint_exclusion</> on and a plan + You can use the <command>EXPLAIN</command> command to show the difference + between a plan with <varname>constraint_exclusion</varname> on and a plan with it off. A typical unoptimized plan for this type of table setup is: <programlisting> @@ -3783,7 +3783,7 @@ EXPLAIN SELECT count(*) FROM measurement WHERE logdate >= DATE '2008-01-01'; </para> <para> - Note that constraint exclusion is driven only by <literal>CHECK</> + Note that constraint exclusion is driven only by <literal>CHECK</literal> constraints, not by the presence of indexes. Therefore it isn't necessary to define indexes on the key columns. Whether an index needs to be created for a given partition depends on whether you @@ -3795,11 +3795,11 @@ EXPLAIN SELECT count(*) FROM measurement WHERE logdate >= DATE '2008-01-01'; <para> The default (and recommended) setting of <xref linkend="guc-constraint-exclusion"> is actually neither - <literal>on</> nor <literal>off</>, but an intermediate setting - called <literal>partition</>, which causes the technique to be + <literal>on</literal> nor <literal>off</literal>, but an intermediate setting + called <literal>partition</literal>, which causes the technique to be applied only to queries that are likely to be working on partitioned - tables. The <literal>on</> setting causes the planner to examine - <literal>CHECK</> constraints in all queries, even simple ones that + tables. The <literal>on</literal> setting causes the planner to examine + <literal>CHECK</literal> constraints in all queries, even simple ones that are unlikely to benefit. </para> @@ -3810,7 +3810,7 @@ EXPLAIN SELECT count(*) FROM measurement WHERE logdate >= DATE '2008-01-01'; <itemizedlist> <listitem> <para> - Constraint exclusion only works when the query's <literal>WHERE</> + Constraint exclusion only works when the query's <literal>WHERE</literal> clause contains constants (or externally supplied parameters). For example, a comparison against a non-immutable function such as <function>CURRENT_TIMESTAMP</function> cannot be optimized, since the @@ -3867,7 +3867,7 @@ EXPLAIN SELECT count(*) FROM measurement WHERE logdate >= DATE '2008-01-01'; <productname>PostgreSQL</productname> implements portions of the SQL/MED specification, allowing you to access data that resides outside PostgreSQL using regular SQL queries. Such data is referred to as - <firstterm>foreign data</>. (Note that this usage is not to be confused + <firstterm>foreign data</firstterm>. (Note that this usage is not to be confused with foreign keys, which are a type of constraint within the database.) </para> @@ -3876,7 +3876,7 @@ EXPLAIN SELECT count(*) FROM measurement WHERE logdate >= DATE '2008-01-01'; <firstterm>foreign data wrapper</firstterm>. A foreign data wrapper is a library that can communicate with an external data source, hiding the details of connecting to the data source and obtaining data from it. - There are some foreign data wrappers available as <filename>contrib</> + There are some foreign data wrappers available as <filename>contrib</filename> modules; see <xref linkend="contrib">. Other kinds of foreign data wrappers might be found as third party products. If none of the existing foreign data wrappers suit your needs, you can write your own; see <xref @@ -3884,7 +3884,7 @@ EXPLAIN SELECT count(*) FROM measurement WHERE logdate >= DATE '2008-01-01'; </para> <para> - To access foreign data, you need to create a <firstterm>foreign server</> + To access foreign data, you need to create a <firstterm>foreign server</firstterm> object, which defines how to connect to a particular external data source according to the set of options used by its supporting foreign data wrapper. Then you need to create one or more <firstterm>foreign @@ -3899,7 +3899,7 @@ EXPLAIN SELECT count(*) FROM measurement WHERE logdate >= DATE '2008-01-01'; <para> Accessing remote data may require authenticating to the external data source. This information can be provided by a - <firstterm>user mapping</>, which can provide additional data + <firstterm>user mapping</firstterm>, which can provide additional data such as user names and passwords based on the current <productname>PostgreSQL</productname> role. </para> @@ -4002,13 +4002,13 @@ DROP TABLE products CASCADE; that depend on them, recursively. In this case, it doesn't remove the orders table, it only removes the foreign key constraint. It stops there because nothing depends on the foreign key constraint. - (If you want to check what <command>DROP ... CASCADE</> will do, - run <command>DROP</> without <literal>CASCADE</> and read the - <literal>DETAIL</> output.) + (If you want to check what <command>DROP ... CASCADE</command> will do, + run <command>DROP</command> without <literal>CASCADE</literal> and read the + <literal>DETAIL</literal> output.) </para> <para> - Almost all <command>DROP</> commands in <productname>PostgreSQL</> support + Almost all <command>DROP</command> commands in <productname>PostgreSQL</productname> support specifying <literal>CASCADE</literal>. Of course, the nature of the possible dependencies varies with the type of the object. You can also write <literal>RESTRICT</literal> instead of @@ -4020,7 +4020,7 @@ DROP TABLE products CASCADE; <para> According to the SQL standard, specifying either <literal>RESTRICT</literal> or <literal>CASCADE</literal> is - required in a <command>DROP</> command. No database system actually + required in a <command>DROP</command> command. No database system actually enforces that rule, but whether the default behavior is <literal>RESTRICT</literal> or <literal>CASCADE</literal> varies across systems. @@ -4028,18 +4028,18 @@ DROP TABLE products CASCADE; </note> <para> - If a <command>DROP</> command lists multiple + If a <command>DROP</command> command lists multiple objects, <literal>CASCADE</literal> is only required when there are dependencies outside the specified group. For example, when saying <literal>DROP TABLE tab1, tab2</literal> the existence of a foreign - key referencing <literal>tab1</> from <literal>tab2</> would not mean + key referencing <literal>tab1</literal> from <literal>tab2</literal> would not mean that <literal>CASCADE</literal> is needed to succeed. </para> <para> For user-defined functions, <productname>PostgreSQL</productname> tracks dependencies associated with a function's externally-visible properties, - such as its argument and result types, but <emphasis>not</> dependencies + such as its argument and result types, but <emphasis>not</emphasis> dependencies that could only be known by examining the function body. As an example, consider this situation: @@ -4056,11 +4056,11 @@ CREATE FUNCTION get_color_note (rainbow) RETURNS text AS (See <xref linkend="xfunc-sql"> for an explanation of SQL-language functions.) <productname>PostgreSQL</productname> will be aware that - the <function>get_color_note</> function depends on the <type>rainbow</> + the <function>get_color_note</function> function depends on the <type>rainbow</type> type: dropping the type would force dropping the function, because its - argument type would no longer be defined. But <productname>PostgreSQL</> - will not consider <function>get_color_note</> to depend on - the <structname>my_colors</> table, and so will not drop the function if + argument type would no longer be defined. But <productname>PostgreSQL</productname> + will not consider <function>get_color_note</function> to depend on + the <structname>my_colors</structname> table, and so will not drop the function if the table is dropped. While there are disadvantages to this approach, there are also benefits. The function is still valid in some sense if the table is missing, though executing it would cause an error; creating a new diff --git a/doc/src/sgml/dfunc.sgml b/doc/src/sgml/dfunc.sgml index 23af270e32c..7ef996b51f7 100644 --- a/doc/src/sgml/dfunc.sgml +++ b/doc/src/sgml/dfunc.sgml @@ -9,7 +9,7 @@ C, they must be compiled and linked in a special way to produce a file that can be dynamically loaded by the server. To be precise, a <firstterm>shared library</firstterm> needs to be - created.<indexterm><primary>shared library</></indexterm> + created.<indexterm><primary>shared library</primary></indexterm> </para> @@ -30,7 +30,7 @@ executables: first the source files are compiled into object files, then the object files are linked together. The object files need to be created as <firstterm>position-independent code</firstterm> - (<acronym>PIC</acronym>),<indexterm><primary>PIC</></> which + (<acronym>PIC</acronym>),<indexterm><primary>PIC</primary></indexterm> which conceptually means that they can be placed at an arbitrary location in memory when they are loaded by the executable. (Object files intended for executables are usually not compiled that way.) The @@ -57,8 +57,8 @@ <variablelist> <varlistentry> <term> - <systemitem class="osname">FreeBSD</> - <indexterm><primary>FreeBSD</><secondary>shared library</></> + <systemitem class="osname">FreeBSD</systemitem> + <indexterm><primary>FreeBSD</primary><secondary>shared library</secondary></indexterm> </term> <listitem> <para> @@ -70,15 +70,15 @@ gcc -fPIC -c foo.c gcc -shared -o foo.so foo.o </programlisting> This is applicable as of version 3.0 of - <systemitem class="osname">FreeBSD</>. + <systemitem class="osname">FreeBSD</systemitem>. </para> </listitem> </varlistentry> <varlistentry> <term> - <systemitem class="osname">HP-UX</> - <indexterm><primary>HP-UX</><secondary>shared library</></> + <systemitem class="osname">HP-UX</systemitem> + <indexterm><primary>HP-UX</primary><secondary>shared library</secondary></indexterm> </term> <listitem> <para> @@ -97,7 +97,7 @@ gcc -fPIC -c foo.c <programlisting> ld -b -o foo.sl foo.o </programlisting> - <systemitem class="osname">HP-UX</> uses the extension + <systemitem class="osname">HP-UX</systemitem> uses the extension <filename>.sl</filename> for shared libraries, unlike most other systems. </para> @@ -106,8 +106,8 @@ ld -b -o foo.sl foo.o <varlistentry> <term> - <systemitem class="osname">Linux</> - <indexterm><primary>Linux</><secondary>shared library</></> + <systemitem class="osname">Linux</systemitem> + <indexterm><primary>Linux</primary><secondary>shared library</secondary></indexterm> </term> <listitem> <para> @@ -125,8 +125,8 @@ cc -shared -o foo.so foo.o <varlistentry> <term> - <systemitem class="osname">macOS</> - <indexterm><primary>macOS</><secondary>shared library</></> + <systemitem class="osname">macOS</systemitem> + <indexterm><primary>macOS</primary><secondary>shared library</secondary></indexterm> </term> <listitem> <para> @@ -141,8 +141,8 @@ cc -bundle -flat_namespace -undefined suppress -o foo.so foo.o <varlistentry> <term> - <systemitem class="osname">NetBSD</> - <indexterm><primary>NetBSD</><secondary>shared library</></> + <systemitem class="osname">NetBSD</systemitem> + <indexterm><primary>NetBSD</primary><secondary>shared library</secondary></indexterm> </term> <listitem> <para> @@ -161,8 +161,8 @@ gcc -shared -o foo.so foo.o <varlistentry> <term> - <systemitem class="osname">OpenBSD</> - <indexterm><primary>OpenBSD</><secondary>shared library</></> + <systemitem class="osname">OpenBSD</systemitem> + <indexterm><primary>OpenBSD</primary><secondary>shared library</secondary></indexterm> </term> <listitem> <para> @@ -179,17 +179,17 @@ ld -Bshareable -o foo.so foo.o <varlistentry> <term> - <systemitem class="osname">Solaris</> - <indexterm><primary>Solaris</><secondary>shared library</></> + <systemitem class="osname">Solaris</systemitem> + <indexterm><primary>Solaris</primary><secondary>shared library</secondary></indexterm> </term> <listitem> <para> The compiler flag to create <acronym>PIC</acronym> is <option>-KPIC</option> with the Sun compiler and - <option>-fPIC</option> with <application>GCC</>. To + <option>-fPIC</option> with <application>GCC</application>. To link shared libraries, the compiler option is <option>-G</option> with either compiler or alternatively - <option>-shared</option> with <application>GCC</>. + <option>-shared</option> with <application>GCC</application>. <programlisting> cc -KPIC -c foo.c cc -G -o foo.so foo.o diff --git a/doc/src/sgml/dict-int.sgml b/doc/src/sgml/dict-int.sgml index d49f3e2a3a3..04cf14a73d9 100644 --- a/doc/src/sgml/dict-int.sgml +++ b/doc/src/sgml/dict-int.sgml @@ -8,7 +8,7 @@ </indexterm> <para> - <filename>dict_int</> is an example of an add-on dictionary template + <filename>dict_int</filename> is an example of an add-on dictionary template for full-text search. The motivation for this example dictionary is to control the indexing of integers (signed and unsigned), allowing such numbers to be indexed while preventing excessive growth in the number of @@ -25,17 +25,17 @@ <itemizedlist> <listitem> <para> - The <literal>maxlen</> parameter specifies the maximum number of + The <literal>maxlen</literal> parameter specifies the maximum number of digits allowed in an integer word. The default value is 6. </para> </listitem> <listitem> <para> - The <literal>rejectlong</> parameter specifies whether an overlength - integer should be truncated or ignored. If <literal>rejectlong</> is - <literal>false</> (the default), the dictionary returns the first - <literal>maxlen</> digits of the integer. If <literal>rejectlong</> is - <literal>true</>, the dictionary treats an overlength integer as a stop + The <literal>rejectlong</literal> parameter specifies whether an overlength + integer should be truncated or ignored. If <literal>rejectlong</literal> is + <literal>false</literal> (the default), the dictionary returns the first + <literal>maxlen</literal> digits of the integer. If <literal>rejectlong</literal> is + <literal>true</literal>, the dictionary treats an overlength integer as a stop word, so that it will not be indexed. Note that this also means that such an integer cannot be searched for. </para> @@ -47,8 +47,8 @@ <title>Usage</title> <para> - Installing the <literal>dict_int</> extension creates a text search - template <literal>intdict_template</> and a dictionary <literal>intdict</> + Installing the <literal>dict_int</literal> extension creates a text search + template <literal>intdict_template</literal> and a dictionary <literal>intdict</literal> based on it, with the default parameters. You can alter the parameters, for example diff --git a/doc/src/sgml/dict-xsyn.sgml b/doc/src/sgml/dict-xsyn.sgml index 42362ffbc8d..bf4965c36fd 100644 --- a/doc/src/sgml/dict-xsyn.sgml +++ b/doc/src/sgml/dict-xsyn.sgml @@ -8,7 +8,7 @@ </indexterm> <para> - <filename>dict_xsyn</> (Extended Synonym Dictionary) is an example of an + <filename>dict_xsyn</filename> (Extended Synonym Dictionary) is an example of an add-on dictionary template for full-text search. This dictionary type replaces words with groups of their synonyms, and so makes it possible to search for a word using any of its synonyms. @@ -18,41 +18,41 @@ <title>Configuration</title> <para> - A <literal>dict_xsyn</> dictionary accepts the following options: + A <literal>dict_xsyn</literal> dictionary accepts the following options: </para> <itemizedlist> <listitem> <para> - <literal>matchorig</> controls whether the original word is accepted by - the dictionary. Default is <literal>true</>. + <literal>matchorig</literal> controls whether the original word is accepted by + the dictionary. Default is <literal>true</literal>. </para> </listitem> <listitem> <para> - <literal>matchsynonyms</> controls whether the synonyms are - accepted by the dictionary. Default is <literal>false</>. + <literal>matchsynonyms</literal> controls whether the synonyms are + accepted by the dictionary. Default is <literal>false</literal>. </para> </listitem> <listitem> <para> - <literal>keeporig</> controls whether the original word is included in - the dictionary's output. Default is <literal>true</>. + <literal>keeporig</literal> controls whether the original word is included in + the dictionary's output. Default is <literal>true</literal>. </para> </listitem> <listitem> <para> - <literal>keepsynonyms</> controls whether the synonyms are included in - the dictionary's output. Default is <literal>true</>. + <literal>keepsynonyms</literal> controls whether the synonyms are included in + the dictionary's output. Default is <literal>true</literal>. </para> </listitem> <listitem> <para> - <literal>rules</> is the base name of the file containing the list of + <literal>rules</literal> is the base name of the file containing the list of synonyms. This file must be stored in - <filename>$SHAREDIR/tsearch_data/</> (where <literal>$SHAREDIR</> means - the <productname>PostgreSQL</> installation's shared-data directory). - Its name must end in <literal>.rules</> (which is not to be included in - the <literal>rules</> parameter). + <filename>$SHAREDIR/tsearch_data/</filename> (where <literal>$SHAREDIR</literal> means + the <productname>PostgreSQL</productname> installation's shared-data directory). + Its name must end in <literal>.rules</literal> (which is not to be included in + the <literal>rules</literal> parameter). </para> </listitem> </itemizedlist> @@ -71,15 +71,15 @@ word syn1 syn2 syn3 </listitem> <listitem> <para> - The sharp (<literal>#</>) sign is a comment delimiter. It may appear at + The sharp (<literal>#</literal>) sign is a comment delimiter. It may appear at any position in a line. The rest of the line will be skipped. </para> </listitem> </itemizedlist> <para> - Look at <filename>xsyn_sample.rules</>, which is installed in - <filename>$SHAREDIR/tsearch_data/</>, for an example. + Look at <filename>xsyn_sample.rules</filename>, which is installed in + <filename>$SHAREDIR/tsearch_data/</filename>, for an example. </para> </sect2> @@ -87,8 +87,8 @@ word syn1 syn2 syn3 <title>Usage</title> <para> - Installing the <literal>dict_xsyn</> extension creates a text search - template <literal>xsyn_template</> and a dictionary <literal>xsyn</> + Installing the <literal>dict_xsyn</literal> extension creates a text search + template <literal>xsyn_template</literal> and a dictionary <literal>xsyn</literal> based on it, with default parameters. You can alter the parameters, for example diff --git a/doc/src/sgml/diskusage.sgml b/doc/src/sgml/diskusage.sgml index 461deb9dbad..ba230843549 100644 --- a/doc/src/sgml/diskusage.sgml +++ b/doc/src/sgml/diskusage.sgml @@ -5,7 +5,7 @@ <para> This chapter discusses how to monitor the disk usage of a - <productname>PostgreSQL</> database system. + <productname>PostgreSQL</productname> database system. </para> <sect1 id="disk-usage"> @@ -18,10 +18,10 @@ <para> Each table has a primary heap disk file where most of the data is stored. If the table has any columns with potentially-wide values, - there also might be a <acronym>TOAST</> file associated with the table, + there also might be a <acronym>TOAST</acronym> file associated with the table, which is used to store values too wide to fit comfortably in the main table (see <xref linkend="storage-toast">). There will be one valid index - on the <acronym>TOAST</> table, if present. There also might be indexes + on the <acronym>TOAST</acronym> table, if present. There also might be indexes associated with the base table. Each table and index is stored in a separate disk file — possibly more than one file, if the file would exceed one gigabyte. Naming conventions for these files are described @@ -39,7 +39,7 @@ </para> <para> - Using <application>psql</> on a recently vacuumed or analyzed database, + Using <application>psql</application> on a recently vacuumed or analyzed database, you can issue queries to see the disk usage of any table: <programlisting> SELECT pg_relation_filepath(oid), relpages FROM pg_class WHERE relname = 'customer'; @@ -49,14 +49,14 @@ SELECT pg_relation_filepath(oid), relpages FROM pg_class WHERE relname = 'custom base/16384/16806 | 60 (1 row) </programlisting> - Each page is typically 8 kilobytes. (Remember, <structfield>relpages</> - is only updated by <command>VACUUM</>, <command>ANALYZE</>, and - a few DDL commands such as <command>CREATE INDEX</>.) The file path name + Each page is typically 8 kilobytes. (Remember, <structfield>relpages</structfield> + is only updated by <command>VACUUM</command>, <command>ANALYZE</command>, and + a few DDL commands such as <command>CREATE INDEX</command>.) The file path name is of interest if you want to examine the table's disk file directly. </para> <para> - To show the space used by <acronym>TOAST</> tables, use a query + To show the space used by <acronym>TOAST</acronym> tables, use a query like the following: <programlisting> SELECT relname, relpages diff --git a/doc/src/sgml/dml.sgml b/doc/src/sgml/dml.sgml index 071cdb610f0..bc016d3cae6 100644 --- a/doc/src/sgml/dml.sgml +++ b/doc/src/sgml/dml.sgml @@ -285,42 +285,42 @@ DELETE FROM products; <para> Sometimes it is useful to obtain data from modified rows while they are - being manipulated. The <command>INSERT</>, <command>UPDATE</>, - and <command>DELETE</> commands all have an - optional <literal>RETURNING</> clause that supports this. Use - of <literal>RETURNING</> avoids performing an extra database query to + being manipulated. The <command>INSERT</command>, <command>UPDATE</command>, + and <command>DELETE</command> commands all have an + optional <literal>RETURNING</literal> clause that supports this. Use + of <literal>RETURNING</literal> avoids performing an extra database query to collect the data, and is especially valuable when it would otherwise be difficult to identify the modified rows reliably. </para> <para> - The allowed contents of a <literal>RETURNING</> clause are the same as - a <command>SELECT</> command's output list + The allowed contents of a <literal>RETURNING</literal> clause are the same as + a <command>SELECT</command> command's output list (see <xref linkend="queries-select-lists">). It can contain column names of the command's target table, or value expressions using those - columns. A common shorthand is <literal>RETURNING *</>, which selects + columns. A common shorthand is <literal>RETURNING *</literal>, which selects all columns of the target table in order. </para> <para> - In an <command>INSERT</>, the data available to <literal>RETURNING</> is + In an <command>INSERT</command>, the data available to <literal>RETURNING</literal> is the row as it was inserted. This is not so useful in trivial inserts, since it would just repeat the data provided by the client. But it can be very handy when relying on computed default values. For example, - when using a <link linkend="datatype-serial"><type>serial</></link> - column to provide unique identifiers, <literal>RETURNING</> can return + when using a <link linkend="datatype-serial"><type>serial</type></link> + column to provide unique identifiers, <literal>RETURNING</literal> can return the ID assigned to a new row: <programlisting> CREATE TABLE users (firstname text, lastname text, id serial primary key); INSERT INTO users (firstname, lastname) VALUES ('Joe', 'Cool') RETURNING id; </programlisting> - The <literal>RETURNING</> clause is also very useful - with <literal>INSERT ... SELECT</>. + The <literal>RETURNING</literal> clause is also very useful + with <literal>INSERT ... SELECT</literal>. </para> <para> - In an <command>UPDATE</>, the data available to <literal>RETURNING</> is + In an <command>UPDATE</command>, the data available to <literal>RETURNING</literal> is the new content of the modified row. For example: <programlisting> UPDATE products SET price = price * 1.10 @@ -330,7 +330,7 @@ UPDATE products SET price = price * 1.10 </para> <para> - In a <command>DELETE</>, the data available to <literal>RETURNING</> is + In a <command>DELETE</command>, the data available to <literal>RETURNING</literal> is the content of the deleted row. For example: <programlisting> DELETE FROM products @@ -341,9 +341,9 @@ DELETE FROM products <para> If there are triggers (<xref linkend="triggers">) on the target table, - the data available to <literal>RETURNING</> is the row as modified by + the data available to <literal>RETURNING</literal> is the row as modified by the triggers. Thus, inspecting columns computed by triggers is another - common use-case for <literal>RETURNING</>. + common use-case for <literal>RETURNING</literal>. </para> </sect1> diff --git a/doc/src/sgml/docguide.sgml b/doc/src/sgml/docguide.sgml index ff58a173356..3a5b88ca1ca 100644 --- a/doc/src/sgml/docguide.sgml +++ b/doc/src/sgml/docguide.sgml @@ -449,7 +449,7 @@ checking for fop... fop <para> To produce HTML documentation with the stylesheet used on <ulink - url="https://www.postgresql.org/docs/current">postgresql.org</> instead of the + url="https://www.postgresql.org/docs/current">postgresql.org</ulink> instead of the default simple style use: <screen> <prompt>doc/src/sgml$ </prompt><userinput>make STYLE=website html</userinput> diff --git a/doc/src/sgml/earthdistance.sgml b/doc/src/sgml/earthdistance.sgml index 6dedc4a5f49..1bdcf64629f 100644 --- a/doc/src/sgml/earthdistance.sgml +++ b/doc/src/sgml/earthdistance.sgml @@ -8,18 +8,18 @@ </indexterm> <para> - The <filename>earthdistance</> module provides two different approaches to + The <filename>earthdistance</filename> module provides two different approaches to calculating great circle distances on the surface of the Earth. The one - described first depends on the <filename>cube</> module (which - <emphasis>must</> be installed before <filename>earthdistance</> can be - installed). The second one is based on the built-in <type>point</> data type, + described first depends on the <filename>cube</filename> module (which + <emphasis>must</emphasis> be installed before <filename>earthdistance</filename> can be + installed). The second one is based on the built-in <type>point</type> data type, using longitude and latitude for the coordinates. </para> <para> In this module, the Earth is assumed to be perfectly spherical. (If that's too inaccurate for you, you might want to look at the - <application><ulink url="http://postgis.net/">PostGIS</ulink></> + <application><ulink url="http://postgis.net/">PostGIS</ulink></application> project.) </para> @@ -29,13 +29,13 @@ <para> Data is stored in cubes that are points (both corners are the same) using 3 coordinates representing the x, y, and z distance from the center of the - Earth. A domain <type>earth</> over <type>cube</> is provided, which + Earth. A domain <type>earth</type> over <type>cube</type> is provided, which includes constraint checks that the value meets these restrictions and is reasonably close to the actual surface of the Earth. </para> <para> - The radius of the Earth is obtained from the <function>earth()</> + The radius of the Earth is obtained from the <function>earth()</function> function. It is given in meters. But by changing this one function you can change the module to use some other units, or to use a different value of the radius that you feel is more appropriate. @@ -43,8 +43,8 @@ <para> This package has applications to astronomical databases as well. - Astronomers will probably want to change <function>earth()</> to return a - radius of <literal>180/pi()</> so that distances are in degrees. + Astronomers will probably want to change <function>earth()</function> to return a + radius of <literal>180/pi()</literal> so that distances are in degrees. </para> <para> @@ -123,11 +123,11 @@ <entry><function>earth_box(earth, float8)</function><indexterm><primary>earth_box</primary></indexterm></entry> <entry><type>cube</type></entry> <entry>Returns a box suitable for an indexed search using the cube - <literal>@></> + <literal>@></literal> operator for points within a given great circle distance of a location. Some points in this box are further than the specified great circle distance from the location, so a second check using - <function>earth_distance</> should be included in the query. + <function>earth_distance</function> should be included in the query. </entry> </row> </tbody> @@ -141,7 +141,7 @@ <para> The second part of the module relies on representing Earth locations as - values of type <type>point</>, in which the first component is taken to + values of type <type>point</type>, in which the first component is taken to represent longitude in degrees, and the second component is taken to represent latitude in degrees. Points are taken as (longitude, latitude) and not vice versa because longitude is closer to the intuitive idea of @@ -165,7 +165,7 @@ </thead> <tbody> <row> - <entry><type>point</> <literal><@></literal> <type>point</></entry> + <entry><type>point</type> <literal><@></literal> <type>point</type></entry> <entry><type>float8</type></entry> <entry>Gives the distance in statute miles between two points on the Earth's surface. @@ -176,15 +176,15 @@ </table> <para> - Note that unlike the <type>cube</>-based part of the module, units - are hardwired here: changing the <function>earth()</> function will + Note that unlike the <type>cube</type>-based part of the module, units + are hardwired here: changing the <function>earth()</function> function will not affect the results of this operator. </para> <para> One disadvantage of the longitude/latitude representation is that you need to be careful about the edge conditions near the poles - and near +/- 180 degrees of longitude. The <type>cube</>-based + and near +/- 180 degrees of longitude. The <type>cube</type>-based representation avoids these discontinuities. </para> diff --git a/doc/src/sgml/ecpg.sgml b/doc/src/sgml/ecpg.sgml index 716a101838a..0f9ff3a8eb8 100644 --- a/doc/src/sgml/ecpg.sgml +++ b/doc/src/sgml/ecpg.sgml @@ -46,7 +46,7 @@ correctness. Third, embedded <acronym>SQL</acronym> in C is specified in the <acronym>SQL</acronym> standard and supported by many other <acronym>SQL</acronym> database systems. The - <productname>PostgreSQL</> implementation is designed to match this + <productname>PostgreSQL</productname> implementation is designed to match this standard as much as possible, and it is usually possible to port embedded <acronym>SQL</acronym> programs written for other SQL databases to <productname>PostgreSQL</productname> with relative @@ -97,19 +97,19 @@ EXEC SQL CONNECT TO <replaceable>target</replaceable> <optional>AS <replaceable> <itemizedlist> <listitem> <simpara> - <literal><replaceable>dbname</><optional>@<replaceable>hostname</></optional><optional>:<replaceable>port</></optional></literal> + <literal><replaceable>dbname</replaceable><optional>@<replaceable>hostname</replaceable></optional><optional>:<replaceable>port</replaceable></optional></literal> </simpara> </listitem> <listitem> <simpara> - <literal>tcp:postgresql://<replaceable>hostname</><optional>:<replaceable>port</></optional><optional>/<replaceable>dbname</></optional><optional>?<replaceable>options</></optional></literal> + <literal>tcp:postgresql://<replaceable>hostname</replaceable><optional>:<replaceable>port</replaceable></optional><optional>/<replaceable>dbname</replaceable></optional><optional>?<replaceable>options</replaceable></optional></literal> </simpara> </listitem> <listitem> <simpara> - <literal>unix:postgresql://<replaceable>hostname</><optional>:<replaceable>port</></optional><optional>/<replaceable>dbname</></optional><optional>?<replaceable>options</></optional></literal> + <literal>unix:postgresql://<replaceable>hostname</replaceable><optional>:<replaceable>port</replaceable></optional><optional>/<replaceable>dbname</replaceable></optional><optional>?<replaceable>options</replaceable></optional></literal> </simpara> </listitem> @@ -475,7 +475,7 @@ EXEC SQL COMMIT; In the default mode, statements are committed only when <command>EXEC SQL COMMIT</command> is issued. The embedded SQL interface also supports autocommit of transactions (similar to - <application>psql</>'s default behavior) via the <option>-t</option> + <application>psql</application>'s default behavior) via the <option>-t</option> command-line option to <command>ecpg</command> (see <xref linkend="app-ecpg">) or via the <literal>EXEC SQL SET AUTOCOMMIT TO ON</literal> statement. In autocommit mode, each command is @@ -507,7 +507,7 @@ EXEC SQL COMMIT; </varlistentry> <varlistentry> - <term><literal>EXEC SQL PREPARE TRANSACTION </literal><replaceable class="parameter">transaction_id</></term> + <term><literal>EXEC SQL PREPARE TRANSACTION </literal><replaceable class="parameter">transaction_id</replaceable></term> <listitem> <para> Prepare the current transaction for two-phase commit. @@ -516,7 +516,7 @@ EXEC SQL COMMIT; </varlistentry> <varlistentry> - <term><literal>EXEC SQL COMMIT PREPARED </literal><replaceable class="parameter">transaction_id</></term> + <term><literal>EXEC SQL COMMIT PREPARED </literal><replaceable class="parameter">transaction_id</replaceable></term> <listitem> <para> Commit a transaction that is in prepared state. @@ -525,7 +525,7 @@ EXEC SQL COMMIT; </varlistentry> <varlistentry> - <term><literal>EXEC SQL ROLLBACK PREPARED </literal><replaceable class="parameter">transaction_id</></term> + <term><literal>EXEC SQL ROLLBACK PREPARED </literal><replaceable class="parameter">transaction_id</replaceable></term> <listitem> <para> Roll back a transaction that is in prepared state. @@ -720,7 +720,7 @@ EXEC SQL int i = 4; <para> The definition of a structure or union also must be listed inside - a <literal>DECLARE</> section. Otherwise the preprocessor cannot + a <literal>DECLARE</literal> section. Otherwise the preprocessor cannot handle these types since it does not know the definition. </para> </sect2> @@ -890,8 +890,8 @@ do </row> <row> - <entry><type>character(<replaceable>n</>)</type>, <type>varchar(<replaceable>n</>)</type>, <type>text</type></entry> - <entry><type>char[<replaceable>n</>+1]</type>, <type>VARCHAR[<replaceable>n</>+1]</type><footnote><para>declared in <filename>ecpglib.h</filename></para></footnote></entry> + <entry><type>character(<replaceable>n</replaceable>)</type>, <type>varchar(<replaceable>n</replaceable>)</type>, <type>text</type></entry> + <entry><type>char[<replaceable>n</replaceable>+1]</type>, <type>VARCHAR[<replaceable>n</replaceable>+1]</type><footnote><para>declared in <filename>ecpglib.h</filename></para></footnote></entry> </row> <row> @@ -955,7 +955,7 @@ EXEC SQL END DECLARE SECTION; The other way is using the <type>VARCHAR</type> type, which is a special type provided by ECPG. The definition on an array of type <type>VARCHAR</type> is converted into a - named <type>struct</> for every variable. A declaration like: + named <type>struct</type> for every variable. A declaration like: <programlisting> VARCHAR var[180]; </programlisting> @@ -994,10 +994,10 @@ struct varchar_var { int len; char arr[180]; } var; ECPG contains some special types that help you to interact easily with some special data types from the PostgreSQL server. In particular, it has implemented support for the - <type>numeric</>, <type>decimal</type>, <type>date</>, <type>timestamp</>, - and <type>interval</> types. These data types cannot usefully be + <type>numeric</type>, <type>decimal</type>, <type>date</type>, <type>timestamp</type>, + and <type>interval</type> types. These data types cannot usefully be mapped to primitive host variable types (such - as <type>int</>, <type>long long int</type>, + as <type>int</type>, <type>long long int</type>, or <type>char[]</type>), because they have a complex internal structure. Applications deal with these types by declaring host variables in special types and accessing them using functions in @@ -1942,10 +1942,10 @@ free(out); <para> The numeric type offers to do calculations with arbitrary precision. See <xref linkend="datatype-numeric"> for the equivalent type in the - <productname>PostgreSQL</> server. Because of the arbitrary precision this + <productname>PostgreSQL</productname> server. Because of the arbitrary precision this variable needs to be able to expand and shrink dynamically. That's why you can only create numeric variables on the heap, by means of the - <function>PGTYPESnumeric_new</> and <function>PGTYPESnumeric_free</> + <function>PGTYPESnumeric_new</function> and <function>PGTYPESnumeric_free</function> functions. The decimal type, which is similar but limited in precision, can be created on the stack as well as on the heap. </para> @@ -2092,17 +2092,17 @@ int PGTYPESnumeric_cmp(numeric *var1, numeric *var2) <itemizedlist> <listitem> <para> - 1, if <literal>var1</> is bigger than <literal>var2</> + 1, if <literal>var1</literal> is bigger than <literal>var2</literal> </para> </listitem> <listitem> <para> - -1, if <literal>var1</> is smaller than <literal>var2</> + -1, if <literal>var1</literal> is smaller than <literal>var2</literal> </para> </listitem> <listitem> <para> - 0, if <literal>var1</> and <literal>var2</> are equal + 0, if <literal>var1</literal> and <literal>var2</literal> are equal </para> </listitem> </itemizedlist> @@ -2119,7 +2119,7 @@ int PGTYPESnumeric_cmp(numeric *var1, numeric *var2) int PGTYPESnumeric_from_int(signed int int_val, numeric *var); </synopsis> This function accepts a variable of type signed int and stores it - in the numeric variable <literal>var</>. Upon success, 0 is returned and + in the numeric variable <literal>var</literal>. Upon success, 0 is returned and -1 in case of a failure. </para> </listitem> @@ -2134,7 +2134,7 @@ int PGTYPESnumeric_from_int(signed int int_val, numeric *var); int PGTYPESnumeric_from_long(signed long int long_val, numeric *var); </synopsis> This function accepts a variable of type signed long int and stores it - in the numeric variable <literal>var</>. Upon success, 0 is returned and + in the numeric variable <literal>var</literal>. Upon success, 0 is returned and -1 in case of a failure. </para> </listitem> @@ -2149,7 +2149,7 @@ int PGTYPESnumeric_from_long(signed long int long_val, numeric *var); int PGTYPESnumeric_copy(numeric *src, numeric *dst); </synopsis> This function copies over the value of the variable that - <literal>src</literal> points to into the variable that <literal>dst</> + <literal>src</literal> points to into the variable that <literal>dst</literal> points to. It returns 0 on success and -1 if an error occurs. </para> </listitem> @@ -2164,7 +2164,7 @@ int PGTYPESnumeric_copy(numeric *src, numeric *dst); int PGTYPESnumeric_from_double(double d, numeric *dst); </synopsis> This function accepts a variable of type double and stores the result - in the variable that <literal>dst</> points to. It returns 0 on success + in the variable that <literal>dst</literal> points to. It returns 0 on success and -1 if an error occurs. </para> </listitem> @@ -2179,10 +2179,10 @@ int PGTYPESnumeric_from_double(double d, numeric *dst); int PGTYPESnumeric_to_double(numeric *nv, double *dp) </synopsis> The function converts the numeric value from the variable that - <literal>nv</> points to into the double variable that <literal>dp</> points + <literal>nv</literal> points to into the double variable that <literal>dp</literal> points to. It returns 0 on success and -1 if an error occurs, including - overflow. On overflow, the global variable <literal>errno</> will be set - to <literal>PGTYPES_NUM_OVERFLOW</> additionally. + overflow. On overflow, the global variable <literal>errno</literal> will be set + to <literal>PGTYPES_NUM_OVERFLOW</literal> additionally. </para> </listitem> </varlistentry> @@ -2196,10 +2196,10 @@ int PGTYPESnumeric_to_double(numeric *nv, double *dp) int PGTYPESnumeric_to_int(numeric *nv, int *ip); </synopsis> The function converts the numeric value from the variable that - <literal>nv</> points to into the integer variable that <literal>ip</> + <literal>nv</literal> points to into the integer variable that <literal>ip</literal> points to. It returns 0 on success and -1 if an error occurs, including - overflow. On overflow, the global variable <literal>errno</> will be set - to <literal>PGTYPES_NUM_OVERFLOW</> additionally. + overflow. On overflow, the global variable <literal>errno</literal> will be set + to <literal>PGTYPES_NUM_OVERFLOW</literal> additionally. </para> </listitem> </varlistentry> @@ -2213,10 +2213,10 @@ int PGTYPESnumeric_to_int(numeric *nv, int *ip); int PGTYPESnumeric_to_long(numeric *nv, long *lp); </synopsis> The function converts the numeric value from the variable that - <literal>nv</> points to into the long integer variable that - <literal>lp</> points to. It returns 0 on success and -1 if an error + <literal>nv</literal> points to into the long integer variable that + <literal>lp</literal> points to. It returns 0 on success and -1 if an error occurs, including overflow. On overflow, the global variable - <literal>errno</> will be set to <literal>PGTYPES_NUM_OVERFLOW</> + <literal>errno</literal> will be set to <literal>PGTYPES_NUM_OVERFLOW</literal> additionally. </para> </listitem> @@ -2231,10 +2231,10 @@ int PGTYPESnumeric_to_long(numeric *nv, long *lp); int PGTYPESnumeric_to_decimal(numeric *src, decimal *dst); </synopsis> The function converts the numeric value from the variable that - <literal>src</> points to into the decimal variable that - <literal>dst</> points to. It returns 0 on success and -1 if an error + <literal>src</literal> points to into the decimal variable that + <literal>dst</literal> points to. It returns 0 on success and -1 if an error occurs, including overflow. On overflow, the global variable - <literal>errno</> will be set to <literal>PGTYPES_NUM_OVERFLOW</> + <literal>errno</literal> will be set to <literal>PGTYPES_NUM_OVERFLOW</literal> additionally. </para> </listitem> @@ -2249,8 +2249,8 @@ int PGTYPESnumeric_to_decimal(numeric *src, decimal *dst); int PGTYPESnumeric_from_decimal(decimal *src, numeric *dst); </synopsis> The function converts the decimal value from the variable that - <literal>src</> points to into the numeric variable that - <literal>dst</> points to. It returns 0 on success and -1 if an error + <literal>src</literal> points to into the numeric variable that + <literal>dst</literal> points to. It returns 0 on success and -1 if an error occurs. Since the decimal type is implemented as a limited version of the numeric type, overflow cannot occur with this conversion. </para> @@ -2265,7 +2265,7 @@ int PGTYPESnumeric_from_decimal(decimal *src, numeric *dst); <para> The date type in C enables your programs to deal with data of the SQL type date. See <xref linkend="datatype-datetime"> for the equivalent type in the - <productname>PostgreSQL</> server. + <productname>PostgreSQL</productname> server. </para> <para> The following functions can be used to work with the date type: @@ -2292,8 +2292,8 @@ date PGTYPESdate_from_timestamp(timestamp dt); <synopsis> date PGTYPESdate_from_asc(char *str, char **endptr); </synopsis> - The function receives a C char* string <literal>str</> and a pointer to - a C char* string <literal>endptr</>. At the moment ECPG always parses + The function receives a C char* string <literal>str</literal> and a pointer to + a C char* string <literal>endptr</literal>. At the moment ECPG always parses the complete string and so it currently does not support to store the address of the first invalid character in <literal>*endptr</literal>. You can safely set <literal>endptr</literal> to NULL. @@ -2397,9 +2397,9 @@ date PGTYPESdate_from_asc(char *str, char **endptr); <synopsis> char *PGTYPESdate_to_asc(date dDate); </synopsis> - The function receives the date <literal>dDate</> as its only parameter. - It will output the date in the form <literal>1999-01-18</>, i.e., in the - <literal>YYYY-MM-DD</> format. + The function receives the date <literal>dDate</literal> as its only parameter. + It will output the date in the form <literal>1999-01-18</literal>, i.e., in the + <literal>YYYY-MM-DD</literal> format. </para> </listitem> </varlistentry> @@ -2414,11 +2414,11 @@ char *PGTYPESdate_to_asc(date dDate); void PGTYPESdate_julmdy(date d, int *mdy); </synopsis> <!-- almost same description as for rjulmdy() --> - The function receives the date <literal>d</> and a pointer to an array - of 3 integer values <literal>mdy</>. The variable name indicates - the sequential order: <literal>mdy[0]</> will be set to contain the - number of the month, <literal>mdy[1]</> will be set to the value of the - day and <literal>mdy[2]</> will contain the year. + The function receives the date <literal>d</literal> and a pointer to an array + of 3 integer values <literal>mdy</literal>. The variable name indicates + the sequential order: <literal>mdy[0]</literal> will be set to contain the + number of the month, <literal>mdy[1]</literal> will be set to the value of the + day and <literal>mdy[2]</literal> will contain the year. </para> </listitem> </varlistentry> @@ -2432,7 +2432,7 @@ void PGTYPESdate_julmdy(date d, int *mdy); <synopsis> void PGTYPESdate_mdyjul(int *mdy, date *jdate); </synopsis> - The function receives the array of the 3 integers (<literal>mdy</>) as + The function receives the array of the 3 integers (<literal>mdy</literal>) as its first argument and as its second argument a pointer to a variable of type date that should hold the result of the operation. </para> @@ -2447,7 +2447,7 @@ void PGTYPESdate_mdyjul(int *mdy, date *jdate); <synopsis> int PGTYPESdate_dayofweek(date d); </synopsis> - The function receives the date variable <literal>d</> as its only + The function receives the date variable <literal>d</literal> as its only argument and returns an integer that indicates the day of the week for this date. <itemizedlist> @@ -2499,7 +2499,7 @@ int PGTYPESdate_dayofweek(date d); <synopsis> void PGTYPESdate_today(date *d); </synopsis> - The function receives a pointer to a date variable (<literal>d</>) + The function receives a pointer to a date variable (<literal>d</literal>) that it sets to the current date. </para> </listitem> @@ -2514,9 +2514,9 @@ void PGTYPESdate_today(date *d); <synopsis> int PGTYPESdate_fmt_asc(date dDate, char *fmtstring, char *outbuf); </synopsis> - The function receives the date to convert (<literal>dDate</>), the - format mask (<literal>fmtstring</>) and the string that will hold the - textual representation of the date (<literal>outbuf</>). + The function receives the date to convert (<literal>dDate</literal>), the + format mask (<literal>fmtstring</literal>) and the string that will hold the + textual representation of the date (<literal>outbuf</literal>). </para> <para> On success, 0 is returned and a negative value if an error occurred. @@ -2637,9 +2637,9 @@ int PGTYPESdate_defmt_asc(date *d, char *fmt, char *str); </synopsis> <!-- same description as rdefmtdate --> The function receives a pointer to the date value that should hold the - result of the operation (<literal>d</>), the format mask to use for - parsing the date (<literal>fmt</>) and the C char* string containing - the textual representation of the date (<literal>str</>). The textual + result of the operation (<literal>d</literal>), the format mask to use for + parsing the date (<literal>fmt</literal>) and the C char* string containing + the textual representation of the date (<literal>str</literal>). The textual representation is expected to match the format mask. However you do not need to have a 1:1 mapping of the string to the format mask. The function only analyzes the sequential order and looks for the literals @@ -2742,7 +2742,7 @@ int PGTYPESdate_defmt_asc(date *d, char *fmt, char *str); <para> The timestamp type in C enables your programs to deal with data of the SQL type timestamp. See <xref linkend="datatype-datetime"> for the equivalent - type in the <productname>PostgreSQL</> server. + type in the <productname>PostgreSQL</productname> server. </para> <para> The following functions can be used to work with the timestamp type: @@ -2756,8 +2756,8 @@ int PGTYPESdate_defmt_asc(date *d, char *fmt, char *str); <synopsis> timestamp PGTYPEStimestamp_from_asc(char *str, char **endptr); </synopsis> - The function receives the string to parse (<literal>str</>) and a - pointer to a C char* (<literal>endptr</>). + The function receives the string to parse (<literal>str</literal>) and a + pointer to a C char* (<literal>endptr</literal>). At the moment ECPG always parses the complete string and so it currently does not support to store the address of the first invalid character in <literal>*endptr</literal>. @@ -2765,15 +2765,15 @@ timestamp PGTYPEStimestamp_from_asc(char *str, char **endptr); </para> <para> The function returns the parsed timestamp on success. On error, - <literal>PGTYPESInvalidTimestamp</literal> is returned and <varname>errno</> is - set to <literal>PGTYPES_TS_BAD_TIMESTAMP</>. See <xref linkend="PGTYPESInvalidTimestamp"> for important notes on this value. + <literal>PGTYPESInvalidTimestamp</literal> is returned and <varname>errno</varname> is + set to <literal>PGTYPES_TS_BAD_TIMESTAMP</literal>. See <xref linkend="PGTYPESInvalidTimestamp"> for important notes on this value. </para> <para> In general, the input string can contain any combination of an allowed date specification, a whitespace character and an allowed time specification. Note that time zones are not supported by ECPG. It can parse them but does not apply any calculation as the - <productname>PostgreSQL</> server does for example. Timezone + <productname>PostgreSQL</productname> server does for example. Timezone specifiers are silently discarded. </para> <para> @@ -2819,7 +2819,7 @@ timestamp PGTYPEStimestamp_from_asc(char *str, char **endptr); <synopsis> char *PGTYPEStimestamp_to_asc(timestamp tstamp); </synopsis> - The function receives the timestamp <literal>tstamp</> as + The function receives the timestamp <literal>tstamp</literal> as its only argument and returns an allocated string that contains the textual representation of the timestamp. </para> @@ -2835,7 +2835,7 @@ char *PGTYPEStimestamp_to_asc(timestamp tstamp); void PGTYPEStimestamp_current(timestamp *ts); </synopsis> The function retrieves the current timestamp and saves it into the - timestamp variable that <literal>ts</> points to. + timestamp variable that <literal>ts</literal> points to. </para> </listitem> </varlistentry> @@ -2849,8 +2849,8 @@ void PGTYPEStimestamp_current(timestamp *ts); int PGTYPEStimestamp_fmt_asc(timestamp *ts, char *output, int str_len, char *fmtstr); </synopsis> The function receives a pointer to the timestamp to convert as its - first argument (<literal>ts</>), a pointer to the output buffer - (<literal>output</>), the maximal length that has been allocated for + first argument (<literal>ts</literal>), a pointer to the output buffer + (<literal>output</literal>), the maximal length that has been allocated for the output buffer (<literal>str_len</literal>) and the format mask to use for the conversion (<literal>fmtstr</literal>). </para> @@ -2861,7 +2861,7 @@ int PGTYPEStimestamp_fmt_asc(timestamp *ts, char *output, int str_len, char *fmt <para> You can use the following format specifiers for the format mask. The format specifiers are the same ones that are used in the - <function>strftime</> function in <productname>libc</productname>. Any + <function>strftime</function> function in <productname>libc</productname>. Any non-format specifier will be copied into the output buffer. <!-- This is from the FreeBSD man page: http://www.freebsd.org/cgi/man.cgi?query=strftime&apropos=0&sektion=3&manpath=FreeBSD+7.0-current&format=html @@ -3184,9 +3184,9 @@ int PGTYPEStimestamp_fmt_asc(timestamp *ts, char *output, int str_len, char *fmt <synopsis> int PGTYPEStimestamp_sub(timestamp *ts1, timestamp *ts2, interval *iv); </synopsis> - The function will subtract the timestamp variable that <literal>ts2</> - points to from the timestamp variable that <literal>ts1</> points to - and will store the result in the interval variable that <literal>iv</> + The function will subtract the timestamp variable that <literal>ts2</literal> + points to from the timestamp variable that <literal>ts1</literal> points to + and will store the result in the interval variable that <literal>iv</literal> points to. </para> <para> @@ -3206,12 +3206,12 @@ int PGTYPEStimestamp_sub(timestamp *ts1, timestamp *ts2, interval *iv); int PGTYPEStimestamp_defmt_asc(char *str, char *fmt, timestamp *d); </synopsis> The function receives the textual representation of a timestamp in the - variable <literal>str</> as well as the formatting mask to use in the - variable <literal>fmt</>. The result will be stored in the variable - that <literal>d</> points to. + variable <literal>str</literal> as well as the formatting mask to use in the + variable <literal>fmt</literal>. The result will be stored in the variable + that <literal>d</literal> points to. </para> <para> - If the formatting mask <literal>fmt</> is NULL, the function will fall + If the formatting mask <literal>fmt</literal> is NULL, the function will fall back to the default formatting mask which is <literal>%Y-%m-%d %H:%M:%S</literal>. </para> @@ -3231,10 +3231,10 @@ int PGTYPEStimestamp_defmt_asc(char *str, char *fmt, timestamp *d); <synopsis> int PGTYPEStimestamp_add_interval(timestamp *tin, interval *span, timestamp *tout); </synopsis> - The function receives a pointer to a timestamp variable <literal>tin</> - and a pointer to an interval variable <literal>span</>. It adds the + The function receives a pointer to a timestamp variable <literal>tin</literal> + and a pointer to an interval variable <literal>span</literal>. It adds the interval to the timestamp and saves the resulting timestamp in the - variable that <literal>tout</> points to. + variable that <literal>tout</literal> points to. </para> <para> Upon success, the function returns 0 and a negative value if an @@ -3251,9 +3251,9 @@ int PGTYPEStimestamp_add_interval(timestamp *tin, interval *span, timestamp *tou <synopsis> int PGTYPEStimestamp_sub_interval(timestamp *tin, interval *span, timestamp *tout); </synopsis> - The function subtracts the interval variable that <literal>span</> - points to from the timestamp variable that <literal>tin</> points to - and saves the result into the variable that <literal>tout</> points + The function subtracts the interval variable that <literal>span</literal> + points to from the timestamp variable that <literal>tin</literal> points to + and saves the result into the variable that <literal>tout</literal> points to. </para> <para> @@ -3271,7 +3271,7 @@ int PGTYPEStimestamp_sub_interval(timestamp *tin, interval *span, timestamp *tou <para> The interval type in C enables your programs to deal with data of the SQL type interval. See <xref linkend="datatype-datetime"> for the equivalent - type in the <productname>PostgreSQL</> server. + type in the <productname>PostgreSQL</productname> server. </para> <para> The following functions can be used to work with the interval type: @@ -3309,7 +3309,7 @@ void PGTYPESinterval_new(interval *intvl); <synopsis> interval *PGTYPESinterval_from_asc(char *str, char **endptr); </synopsis> - The function parses the input string <literal>str</> and returns a + The function parses the input string <literal>str</literal> and returns a pointer to an allocated interval variable. At the moment ECPG always parses the complete string and so it currently does not support to store the @@ -3327,7 +3327,7 @@ interval *PGTYPESinterval_from_asc(char *str, char **endptr); <synopsis> char *PGTYPESinterval_to_asc(interval *span); </synopsis> - The function converts the interval variable that <literal>span</> + The function converts the interval variable that <literal>span</literal> points to into a C char*. The output looks like this example: <literal>@ 1 day 12 hours 59 mins 10 secs</literal>. </para> @@ -3342,8 +3342,8 @@ char *PGTYPESinterval_to_asc(interval *span); <synopsis> int PGTYPESinterval_copy(interval *intvlsrc, interval *intvldest); </synopsis> - The function copies the interval variable that <literal>intvlsrc</> - points to into the variable that <literal>intvldest</> points to. Note + The function copies the interval variable that <literal>intvlsrc</literal> + points to into the variable that <literal>intvldest</literal> points to. Note that you need to allocate the memory for the destination variable before. </para> @@ -3360,15 +3360,15 @@ int PGTYPESinterval_copy(interval *intvlsrc, interval *intvldest); a maximum precision of 30 significant digits. In contrast to the numeric type which can be created on the heap only, the decimal type can be created either on the stack or on the heap (by means of the functions - <function>PGTYPESdecimal_new</> and - <function>PGTYPESdecimal_free</>). + <function>PGTYPESdecimal_new</function> and + <function>PGTYPESdecimal_free</function>). There are a lot of other functions that deal with the decimal type in the <productname>Informix</productname> compatibility mode described in <xref linkend="ecpg-informix-compat">. </para> <para> The following functions can be used to work with the decimal type and are - not only contained in the <literal>libcompat</> library. + not only contained in the <literal>libcompat</literal> library. <variablelist> <varlistentry> <term><function>PGTYPESdecimal_new</function></term> @@ -3548,15 +3548,15 @@ void PGTYPESdecimal_free(decimal *var); <listitem> <para> A value of type timestamp representing an invalid time stamp. This is - returned by the function <function>PGTYPEStimestamp_from_asc</> on + returned by the function <function>PGTYPEStimestamp_from_asc</function> on parse error. Note that due to the internal representation of the <type>timestamp</type> data type, <literal>PGTYPESInvalidTimestamp</literal> is also a valid timestamp at - the same time. It is set to <literal>1899-12-31 23:59:59</>. In order + the same time. It is set to <literal>1899-12-31 23:59:59</literal>. In order to detect errors, make sure that your application does not only test for <literal>PGTYPESInvalidTimestamp</literal> but also for - <literal>errno != 0</> after each call to - <function>PGTYPEStimestamp_from_asc</>. + <literal>errno != 0</literal> after each call to + <function>PGTYPEStimestamp_from_asc</function>. </para> </listitem> </varlistentry> @@ -3927,7 +3927,7 @@ typedef struct sqlda_struct sqlda_t; <variablelist> <varlistentry> - <term><literal>sqldaid</></term> + <term><literal>sqldaid</literal></term> <listitem> <para> It contains the literal string <literal>"SQLDA "</literal>. @@ -3936,7 +3936,7 @@ typedef struct sqlda_struct sqlda_t; </varlistentry> <varlistentry> - <term><literal>sqldabc</></term> + <term><literal>sqldabc</literal></term> <listitem> <para> It contains the size of the allocated space in bytes. @@ -3945,7 +3945,7 @@ typedef struct sqlda_struct sqlda_t; </varlistentry> <varlistentry> - <term><literal>sqln</></term> + <term><literal>sqln</literal></term> <listitem> <para> It contains the number of input parameters for a parameterized query in @@ -3960,7 +3960,7 @@ typedef struct sqlda_struct sqlda_t; </varlistentry> <varlistentry> - <term><literal>sqld</></term> + <term><literal>sqld</literal></term> <listitem> <para> It contains the number of fields in a result set. @@ -3969,17 +3969,17 @@ typedef struct sqlda_struct sqlda_t; </varlistentry> <varlistentry> - <term><literal>desc_next</></term> + <term><literal>desc_next</literal></term> <listitem> <para> If the query returns more than one record, multiple linked - SQLDA structures are returned, and <literal>desc_next</> holds + SQLDA structures are returned, and <literal>desc_next</literal> holds a pointer to the next entry in the list. </para> </listitem> </varlistentry> <varlistentry> - <term><literal>sqlvar</></term> + <term><literal>sqlvar</literal></term> <listitem> <para> This is the array of the columns in the result set. @@ -4015,7 +4015,7 @@ typedef struct sqlvar_struct sqlvar_t; <variablelist> <varlistentry> - <term><literal>sqltype</></term> + <term><literal>sqltype</literal></term> <listitem> <para> Contains the type identifier of the field. For values, @@ -4025,7 +4025,7 @@ typedef struct sqlvar_struct sqlvar_t; </varlistentry> <varlistentry> - <term><literal>sqllen</></term> + <term><literal>sqllen</literal></term> <listitem> <para> Contains the binary length of the field. e.g. 4 bytes for <type>ECPGt_int</type>. @@ -4034,7 +4034,7 @@ typedef struct sqlvar_struct sqlvar_t; </varlistentry> <varlistentry> - <term><literal>sqldata</></term> + <term><literal>sqldata</literal></term> <listitem> <para> Points to the data. The format of the data is described @@ -4044,7 +4044,7 @@ typedef struct sqlvar_struct sqlvar_t; </varlistentry> <varlistentry> - <term><literal>sqlind</></term> + <term><literal>sqlind</literal></term> <listitem> <para> Points to the null indicator. 0 means not null, -1 means @@ -4054,7 +4054,7 @@ typedef struct sqlvar_struct sqlvar_t; </varlistentry> <varlistentry> - <term><literal>sqlname</></term> + <term><literal>sqlname</literal></term> <listitem> <para> The name of the field. @@ -4084,7 +4084,7 @@ struct sqlname The meaning of the fields is: <variablelist> <varlistentry> - <term><literal>length</></term> + <term><literal>length</literal></term> <listitem> <para> Contains the length of the field name. @@ -4092,7 +4092,7 @@ struct sqlname </listitem> </varlistentry> <varlistentry> - <term><literal>data</></term> + <term><literal>data</literal></term> <listitem> <para> Contains the actual field name. @@ -4113,10 +4113,10 @@ struct sqlname SQLDA are: </para> <step><simpara>Declare an <type>sqlda_t</type> structure to receive the result set.</simpara></step> - <step><simpara>Execute <command>FETCH</>/<command>EXECUTE</>/<command>DESCRIBE</> commands to process a query specifying the declared SQLDA.</simpara></step> - <step><simpara>Check the number of records in the result set by looking at <structfield>sqln</>, a member of the <type>sqlda_t</type> structure.</simpara></step> - <step><simpara>Get the values of each column from <literal>sqlvar[0]</>, <literal>sqlvar[1]</>, etc., members of the <type>sqlda_t</type> structure.</simpara></step> - <step><simpara>Go to next row (<type>sqlda_t</type> structure) by following the <structfield>desc_next</> pointer, a member of the <type>sqlda_t</type> structure.</simpara></step> + <step><simpara>Execute <command>FETCH</command>/<command>EXECUTE</command>/<command>DESCRIBE</command> commands to process a query specifying the declared SQLDA.</simpara></step> + <step><simpara>Check the number of records in the result set by looking at <structfield>sqln</structfield>, a member of the <type>sqlda_t</type> structure.</simpara></step> + <step><simpara>Get the values of each column from <literal>sqlvar[0]</literal>, <literal>sqlvar[1]</literal>, etc., members of the <type>sqlda_t</type> structure.</simpara></step> + <step><simpara>Go to next row (<type>sqlda_t</type> structure) by following the <structfield>desc_next</structfield> pointer, a member of the <type>sqlda_t</type> structure.</simpara></step> <step><simpara>Repeat above as you need.</simpara></step> </procedure> @@ -4133,7 +4133,7 @@ sqlda_t *sqlda1; <para> Next, specify the SQLDA in a command. This is - a <command>FETCH</> command example. + a <command>FETCH</command> command example. <programlisting> EXEC SQL FETCH NEXT FROM cur1 INTO DESCRIPTOR sqlda1; </programlisting> @@ -4168,10 +4168,10 @@ for (i = 0; i < cur_sqlda->sqld; i++) </para> <para> - To get a column value, check the <structfield>sqltype</> value, + To get a column value, check the <structfield>sqltype</structfield> value, a member of the <type>sqlvar_t</type> structure. Then, switch to an appropriate way, depending on the column type, to copy - data from the <structfield>sqlvar</> field to a host variable. + data from the <structfield>sqlvar</structfield> field to a host variable. <programlisting> char var_buf[1024]; @@ -4225,7 +4225,7 @@ EXEC SQL PREPARE stmt1 FROM :query; <para> Next, allocate memory for an SQLDA, and set the number of input - parameters in <structfield>sqln</>, a member variable of + parameters in <structfield>sqln</structfield>, a member variable of the <type>sqlda_t</type> structure. When two or more input parameters are required for the prepared query, the application has to allocate additional memory space which is calculated by @@ -4386,8 +4386,8 @@ main(void) <para> Read each columns in the first record. The number of columns is - stored in <structfield>sqld</>, the actual data of the first - column is stored in <literal>sqlvar[0]</>, both members of + stored in <structfield>sqld</structfield>, the actual data of the first + column is stored in <literal>sqlvar[0]</literal>, both members of the <type>sqlda_t</type> structure. <programlisting> @@ -4404,9 +4404,9 @@ main(void) </para> <para> - Now, the column data is stored in the variable <varname>v</>. + Now, the column data is stored in the variable <varname>v</varname>. Copy every datum into host variables, looking - at <literal>v.sqltype</> for the type of the column. + at <literal>v.sqltype</literal> for the type of the column. <programlisting> switch (v.sqltype) { int intval; @@ -4947,7 +4947,7 @@ struct </para> <para> - Here is one example that combines the use of <literal>WHENEVER</> + Here is one example that combines the use of <literal>WHENEVER</literal> and <varname>sqlca</varname>, printing out the contents of <varname>sqlca</varname> when an error occurs. This is perhaps useful for debugging or prototyping applications, before @@ -5227,8 +5227,8 @@ while (1) <listitem> <para> This means the host variable is of type <type>bool</type> and - the datum in the database is neither <literal>'t'</> nor - <literal>'f'</>. (SQLSTATE 42804) + the datum in the database is neither <literal>'t'</literal> nor + <literal>'f'</literal>. (SQLSTATE 42804) </para> </listitem> </varlistentry> @@ -5575,8 +5575,8 @@ EXEC SQL INCLUDE "<replaceable>filename</replaceable>"; Similar to the directive <literal>#define</literal> that is known from C, embedded SQL has a similar concept: <programlisting> -EXEC SQL DEFINE <replaceable>name</>; -EXEC SQL DEFINE <replaceable>name</> <replaceable>value</>; +EXEC SQL DEFINE <replaceable>name</replaceable>; +EXEC SQL DEFINE <replaceable>name</replaceable> <replaceable>value</replaceable>; </programlisting> So you can define a name: <programlisting> @@ -5587,7 +5587,7 @@ EXEC SQL DEFINE HAVE_FEATURE; EXEC SQL DEFINE MYNUMBER 12; EXEC SQL DEFINE MYSTRING 'abc'; </programlisting> - Use <literal>undef</> to remove a previous definition: + Use <literal>undef</literal> to remove a previous definition: <programlisting> EXEC SQL UNDEF MYNUMBER; </programlisting> @@ -5597,15 +5597,15 @@ EXEC SQL UNDEF MYNUMBER; Of course you can continue to use the C versions <literal>#define</literal> and <literal>#undef</literal> in your embedded SQL program. The difference is where your defined values get evaluated. If you use <literal>EXEC SQL - DEFINE</> then the <command>ecpg</> preprocessor evaluates the defines and substitutes + DEFINE</literal> then the <command>ecpg</command> preprocessor evaluates the defines and substitutes the values. For example if you write: <programlisting> EXEC SQL DEFINE MYNUMBER 12; ... EXEC SQL UPDATE Tbl SET col = MYNUMBER; </programlisting> - then <command>ecpg</> will already do the substitution and your C compiler will never - see any name or identifier <literal>MYNUMBER</>. Note that you cannot use + then <command>ecpg</command> will already do the substitution and your C compiler will never + see any name or identifier <literal>MYNUMBER</literal>. Note that you cannot use <literal>#define</literal> for a constant that you are going to use in an embedded SQL query because in this case the embedded SQL precompiler is not able to see this declaration. @@ -5619,23 +5619,23 @@ EXEC SQL UPDATE Tbl SET col = MYNUMBER; <variablelist> <varlistentry> - <term><literal>EXEC SQL ifdef <replaceable>name</>;</literal></term> + <term><literal>EXEC SQL ifdef <replaceable>name</replaceable>;</literal></term> <listitem> <para> - Checks a <replaceable>name</> and processes subsequent lines if - <replaceable>name</> has been created with <literal>EXEC SQL define - <replaceable>name</></literal>. + Checks a <replaceable>name</replaceable> and processes subsequent lines if + <replaceable>name</replaceable> has been created with <literal>EXEC SQL define + <replaceable>name</replaceable></literal>. </para> </listitem> </varlistentry> <varlistentry> - <term><literal>EXEC SQL ifndef <replaceable>name</>;</literal></term> + <term><literal>EXEC SQL ifndef <replaceable>name</replaceable>;</literal></term> <listitem> <para> - Checks a <replaceable>name</> and processes subsequent lines if - <replaceable>name</> has <emphasis>not</emphasis> been created with - <literal>EXEC SQL define <replaceable>name</></literal>. + Checks a <replaceable>name</replaceable> and processes subsequent lines if + <replaceable>name</replaceable> has <emphasis>not</emphasis> been created with + <literal>EXEC SQL define <replaceable>name</replaceable></literal>. </para> </listitem> </varlistentry> @@ -5645,19 +5645,19 @@ EXEC SQL UPDATE Tbl SET col = MYNUMBER; <listitem> <para> Starts processing an alternative section to a section introduced by - either <literal>EXEC SQL ifdef <replaceable>name</></literal> or - <literal>EXEC SQL ifndef <replaceable>name</></literal>. + either <literal>EXEC SQL ifdef <replaceable>name</replaceable></literal> or + <literal>EXEC SQL ifndef <replaceable>name</replaceable></literal>. </para> </listitem> </varlistentry> <varlistentry> - <term><literal>EXEC SQL elif <replaceable>name</>;</literal></term> + <term><literal>EXEC SQL elif <replaceable>name</replaceable>;</literal></term> <listitem> <para> - Checks <replaceable>name</> and starts an alternative section if - <replaceable>name</> has been created with <literal>EXEC SQL define - <replaceable>name</></literal>. + Checks <replaceable>name</replaceable> and starts an alternative section if + <replaceable>name</replaceable> has been created with <literal>EXEC SQL define + <replaceable>name</replaceable></literal>. </para> </listitem> </varlistentry> @@ -5707,7 +5707,7 @@ EXEC SQL endif; <para> The preprocessor program is called <filename>ecpg</filename> and is - included in a normal <productname>PostgreSQL</> installation. + included in a normal <productname>PostgreSQL</productname> installation. Embedded SQL programs are typically named with an extension <filename>.pgc</filename>. If you have a program file called <filename>prog1.pgc</filename>, you can preprocess it by simply @@ -5727,8 +5727,8 @@ ecpg prog1.pgc cc -c prog1.c </programlisting> The generated C source files include header files from the - <productname>PostgreSQL</> installation, so if you installed - <productname>PostgreSQL</> in a location that is not searched by + <productname>PostgreSQL</productname> installation, so if you installed + <productname>PostgreSQL</productname> in a location that is not searched by default, you have to add an option such as <literal>-I/usr/local/pgsql/include</literal> to the compilation command line. @@ -5803,10 +5803,10 @@ ECPG = ecpg </para> <note> <para> - On Windows, if the <application>ecpg</> libraries and an application are + On Windows, if the <application>ecpg</application> libraries and an application are compiled with different flags, this function call will crash the application because the internal representation of the - <literal>FILE</> pointers differ. Specifically, + <literal>FILE</literal> pointers differ. Specifically, multithreaded/single-threaded, release/debug, and static/dynamic flags should be the same for the library and all applications using that library. @@ -5844,7 +5844,7 @@ ECPG = ecpg <function>ECPGstatus(int <replaceable>lineno</replaceable>, const char* <replaceable>connection_name</replaceable>)</function> returns true if you are connected to a database and false if not. - <replaceable>connection_name</replaceable> can be <literal>NULL</> + <replaceable>connection_name</replaceable> can be <literal>NULL</literal> if a single connection is being used. </para> </listitem> @@ -6217,10 +6217,10 @@ main(void) <para> To build the application, proceed as follows. Convert - <filename>test_mod.pgc</> into <filename>test_mod.c</> by + <filename>test_mod.pgc</filename> into <filename>test_mod.c</filename> by running <command>ecpg</command>, and generate - <filename>test_mod.o</> by compiling - <filename>test_mod.c</> with the C compiler: + <filename>test_mod.o</filename> by compiling + <filename>test_mod.c</filename> with the C compiler: <programlisting> ecpg -o test_mod.c test_mod.pgc cc -c test_mod.c -o test_mod.o @@ -6228,16 +6228,16 @@ cc -c test_mod.c -o test_mod.o </para> <para> - Next, generate <filename>test_cpp.o</> by compiling - <filename>test_cpp.cpp</> with the C++ compiler: + Next, generate <filename>test_cpp.o</filename> by compiling + <filename>test_cpp.cpp</filename> with the C++ compiler: <programlisting> c++ -c test_cpp.cpp -o test_cpp.o </programlisting> </para> <para> - Finally, link these object files, <filename>test_cpp.o</> - and <filename>test_mod.o</>, into one executable, using the C++ + Finally, link these object files, <filename>test_cpp.o</filename> + and <filename>test_mod.o</filename>, into one executable, using the C++ compiler driver: <programlisting> c++ test_cpp.o test_mod.o -lecpg -o test_cpp @@ -7101,7 +7101,7 @@ EXEC SQL GET DESCRIPTOR d VALUE 2 :d_data = DATA; <para> Here is an example for a whole procedure of - executing <literal>SELECT current_database();</> and showing the number of + executing <literal>SELECT current_database();</literal> and showing the number of columns, the column data length, and the column data: <programlisting> int @@ -7866,10 +7866,10 @@ main(void) <sect1 id="ecpg-informix-compat"> <title><productname>Informix</productname> Compatibility Mode</title> <para> - <command>ecpg</command> can be run in a so-called <firstterm>Informix compatibility mode</>. If + <command>ecpg</command> can be run in a so-called <firstterm>Informix compatibility mode</firstterm>. If this mode is active, it tries to behave as if it were the <productname>Informix</productname> precompiler for <productname>Informix</productname> E/SQL. Generally spoken this will allow you to use - the dollar sign instead of the <literal>EXEC SQL</> primitive to introduce + the dollar sign instead of the <literal>EXEC SQL</literal> primitive to introduce embedded SQL commands: <programlisting> $int j = 3; @@ -7891,11 +7891,11 @@ $COMMIT; </note> <para> - There are two compatibility modes: <literal>INFORMIX</>, <literal>INFORMIX_SE</> + There are two compatibility modes: <literal>INFORMIX</literal>, <literal>INFORMIX_SE</literal> </para> <para> When linking programs that use this compatibility mode, remember to link - against <literal>libcompat</> that is shipped with ECPG. + against <literal>libcompat</literal> that is shipped with ECPG. </para> <para> Besides the previously explained syntactic sugar, the <productname>Informix</productname> compatibility @@ -7913,7 +7913,7 @@ $COMMIT; no drop-in replacement if you are using <productname>Informix</productname> at the moment. Moreover, some of the data types are different. For example, <productname>PostgreSQL's</productname> datetime and interval types do not - know about ranges like for example <literal>YEAR TO MINUTE</> so you won't + know about ranges like for example <literal>YEAR TO MINUTE</literal> so you won't find support in ECPG for that either. </para> @@ -7938,11 +7938,11 @@ EXEC SQL FETCH MYCUR INTO :userid; <para> <variablelist> <varlistentry> - <term><literal>CLOSE DATABASE</></term> + <term><literal>CLOSE DATABASE</literal></term> <listitem> <para> This statement closes the current connection. In fact, this is a - synonym for ECPG's <literal>DISCONNECT CURRENT</>: + synonym for ECPG's <literal>DISCONNECT CURRENT</literal>: <programlisting> $CLOSE DATABASE; /* close the current connection */ EXEC SQL CLOSE DATABASE; @@ -7951,12 +7951,12 @@ EXEC SQL CLOSE DATABASE; </listitem> </varlistentry> <varlistentry> - <term><literal>FREE cursor_name</></term> + <term><literal>FREE cursor_name</literal></term> <listitem> <para> Due to the differences how ECPG works compared to Informix's ESQL/C (i.e. which steps are purely grammar transformations and which steps rely on the underlying run-time library) - there is no <literal>FREE cursor_name</> statement in ECPG. This is because in ECPG, + there is no <literal>FREE cursor_name</literal> statement in ECPG. This is because in ECPG, <literal>DECLARE CURSOR</literal> doesn't translate to a function call into the run-time library that uses to the cursor name. This means that there's no run-time bookkeeping of SQL cursors in the ECPG run-time library, only in the PostgreSQL server. @@ -7964,10 +7964,10 @@ EXEC SQL CLOSE DATABASE; </listitem> </varlistentry> <varlistentry> - <term><literal>FREE statement_name</></term> + <term><literal>FREE statement_name</literal></term> <listitem> <para> - <literal>FREE statement_name</> is a synonym for <literal>DEALLOCATE PREPARE statement_name</>. + <literal>FREE statement_name</literal> is a synonym for <literal>DEALLOCATE PREPARE statement_name</literal>. </para> </listitem> </varlistentry> @@ -8024,16 +8024,16 @@ typedef struct sqlda_compat sqlda_t; <variablelist> <varlistentry> - <term><literal>sqld</></term> + <term><literal>sqld</literal></term> <listitem> <para> - The number of fields in the <literal>SQLDA</> descriptor. + The number of fields in the <literal>SQLDA</literal> descriptor. </para> </listitem> </varlistentry> <varlistentry> - <term><literal>sqlvar</></term> + <term><literal>sqlvar</literal></term> <listitem> <para> Pointer to the per-field properties. @@ -8042,7 +8042,7 @@ typedef struct sqlda_compat sqlda_t; </varlistentry> <varlistentry> - <term><literal>desc_name</></term> + <term><literal>desc_name</literal></term> <listitem> <para> Unused, filled with zero-bytes. @@ -8051,7 +8051,7 @@ typedef struct sqlda_compat sqlda_t; </varlistentry> <varlistentry> - <term><literal>desc_occ</></term> + <term><literal>desc_occ</literal></term> <listitem> <para> Size of the allocated structure. @@ -8060,7 +8060,7 @@ typedef struct sqlda_compat sqlda_t; </varlistentry> <varlistentry> - <term><literal>desc_next</></term> + <term><literal>desc_next</literal></term> <listitem> <para> Pointer to the next SQLDA structure if the result set contains more than one record. @@ -8069,7 +8069,7 @@ typedef struct sqlda_compat sqlda_t; </varlistentry> <varlistentry> - <term><literal>reserved</></term> + <term><literal>reserved</literal></term> <listitem> <para> Unused pointer, contains NULL. Kept for Informix-compatibility. @@ -8084,7 +8084,7 @@ typedef struct sqlda_compat sqlda_t; <variablelist> <varlistentry> - <term><literal>sqltype</></term> + <term><literal>sqltype</literal></term> <listitem> <para> Type of the field. Constants are in <literal>sqltypes.h</literal> @@ -8093,7 +8093,7 @@ typedef struct sqlda_compat sqlda_t; </varlistentry> <varlistentry> - <term><literal>sqllen</></term> + <term><literal>sqllen</literal></term> <listitem> <para> Length of the field data. @@ -8102,7 +8102,7 @@ typedef struct sqlda_compat sqlda_t; </varlistentry> <varlistentry> - <term><literal>sqldata</></term> + <term><literal>sqldata</literal></term> <listitem> <para> Pointer to the field data. The pointer is of <literal>char *</literal> type, @@ -8123,7 +8123,7 @@ switch (sqldata->sqlvar[i].sqltype) </varlistentry> <varlistentry> - <term><literal>sqlind</></term> + <term><literal>sqlind</literal></term> <listitem> <para> Pointer to the NULL indicator. If returned by DESCRIBE or FETCH then it's always a valid pointer. @@ -8139,7 +8139,7 @@ if (*(int2 *)sqldata->sqlvar[i].sqlind != 0) </varlistentry> <varlistentry> - <term><literal>sqlname</></term> + <term><literal>sqlname</literal></term> <listitem> <para> Name of the field. 0-terminated string. @@ -8148,16 +8148,16 @@ if (*(int2 *)sqldata->sqlvar[i].sqlind != 0) </varlistentry> <varlistentry> - <term><literal>sqlformat</></term> + <term><literal>sqlformat</literal></term> <listitem> <para> - Reserved in Informix, value of <function>PQfformat()</> for the field. + Reserved in Informix, value of <function>PQfformat()</function> for the field. </para> </listitem> </varlistentry> <varlistentry> - <term><literal>sqlitype</></term> + <term><literal>sqlitype</literal></term> <listitem> <para> Type of the NULL indicator data. It's always SQLSMINT when returning data from the server. @@ -8168,7 +8168,7 @@ if (*(int2 *)sqldata->sqlvar[i].sqlind != 0) </varlistentry> <varlistentry> - <term><literal>sqlilen</></term> + <term><literal>sqlilen</literal></term> <listitem> <para> Length of the NULL indicator data. @@ -8177,23 +8177,23 @@ if (*(int2 *)sqldata->sqlvar[i].sqlind != 0) </varlistentry> <varlistentry> - <term><literal>sqlxid</></term> + <term><literal>sqlxid</literal></term> <listitem> <para> - Extended type of the field, result of <function>PQftype()</>. + Extended type of the field, result of <function>PQftype()</function>. </para> </listitem> </varlistentry> <varlistentry> - <term><literal>sqltypename</></term> - <term><literal>sqltypelen</></term> - <term><literal>sqlownerlen</></term> - <term><literal>sqlsourcetype</></term> - <term><literal>sqlownername</></term> - <term><literal>sqlsourceid</></term> - <term><literal>sqlflags</></term> - <term><literal>sqlreserved</></term> + <term><literal>sqltypename</literal></term> + <term><literal>sqltypelen</literal></term> + <term><literal>sqlownerlen</literal></term> + <term><literal>sqlsourcetype</literal></term> + <term><literal>sqlownername</literal></term> + <term><literal>sqlsourceid</literal></term> + <term><literal>sqlflags</literal></term> + <term><literal>sqlreserved</literal></term> <listitem> <para> Unused. @@ -8202,7 +8202,7 @@ if (*(int2 *)sqldata->sqlvar[i].sqlind != 0) </varlistentry> <varlistentry> - <term><literal>sqlilongdata</></term> + <term><literal>sqlilongdata</literal></term> <listitem> <para> It equals to <literal>sqldata</literal> if <literal>sqllen</literal> is larger than 32kB. @@ -8247,7 +8247,7 @@ EXEC SQL INCLUDE sqlda.h; free(sqlda); /* The main structure is all to be free(), * sqlda and sqlda->sqlvar is in one allocated area */ </programlisting> - For more information, see the <literal>sqlda.h</> header and the + For more information, see the <literal>sqlda.h</literal> header and the <literal>src/interfaces/ecpg/test/compat_informix/sqlda.pgc</literal> regression test. </para> </sect2> @@ -8257,7 +8257,7 @@ EXEC SQL INCLUDE sqlda.h; <para> <variablelist> <varlistentry> - <term><function>decadd</></term> + <term><function>decadd</function></term> <listitem> <para> Add two decimal type values. @@ -8265,19 +8265,19 @@ EXEC SQL INCLUDE sqlda.h; int decadd(decimal *arg1, decimal *arg2, decimal *sum); </synopsis> The function receives a pointer to the first operand of type decimal - (<literal>arg1</>), a pointer to the second operand of type decimal - (<literal>arg2</>) and a pointer to a value of type decimal that will - contain the sum (<literal>sum</>). On success, the function returns 0. - <symbol>ECPG_INFORMIX_NUM_OVERFLOW</> is returned in case of overflow and - <symbol>ECPG_INFORMIX_NUM_UNDERFLOW</> in case of underflow. -1 is returned for - other failures and <varname>errno</> is set to the respective <varname>errno</> number of the + (<literal>arg1</literal>), a pointer to the second operand of type decimal + (<literal>arg2</literal>) and a pointer to a value of type decimal that will + contain the sum (<literal>sum</literal>). On success, the function returns 0. + <symbol>ECPG_INFORMIX_NUM_OVERFLOW</symbol> is returned in case of overflow and + <symbol>ECPG_INFORMIX_NUM_UNDERFLOW</symbol> in case of underflow. -1 is returned for + other failures and <varname>errno</varname> is set to the respective <varname>errno</varname> number of the pgtypeslib. </para> </listitem> </varlistentry> <varlistentry> - <term><function>deccmp</></term> + <term><function>deccmp</function></term> <listitem> <para> Compare two variables of type decimal. @@ -8285,25 +8285,25 @@ int decadd(decimal *arg1, decimal *arg2, decimal *sum); int deccmp(decimal *arg1, decimal *arg2); </synopsis> The function receives a pointer to the first decimal value - (<literal>arg1</>), a pointer to the second decimal value - (<literal>arg2</>) and returns an integer value that indicates which is + (<literal>arg1</literal>), a pointer to the second decimal value + (<literal>arg2</literal>) and returns an integer value that indicates which is the bigger value. <itemizedlist> <listitem> <para> - 1, if the value that <literal>arg1</> points to is bigger than the - value that <literal>var2</> points to + 1, if the value that <literal>arg1</literal> points to is bigger than the + value that <literal>var2</literal> points to </para> </listitem> <listitem> <para> - -1, if the value that <literal>arg1</> points to is smaller than the - value that <literal>arg2</> points to </para> + -1, if the value that <literal>arg1</literal> points to is smaller than the + value that <literal>arg2</literal> points to </para> </listitem> <listitem> <para> - 0, if the value that <literal>arg1</> points to and the value that - <literal>arg2</> points to are equal + 0, if the value that <literal>arg1</literal> points to and the value that + <literal>arg2</literal> points to are equal </para> </listitem> </itemizedlist> @@ -8312,7 +8312,7 @@ int deccmp(decimal *arg1, decimal *arg2); </varlistentry> <varlistentry> - <term><function>deccopy</></term> + <term><function>deccopy</function></term> <listitem> <para> Copy a decimal value. @@ -8320,15 +8320,15 @@ int deccmp(decimal *arg1, decimal *arg2); void deccopy(decimal *src, decimal *target); </synopsis> The function receives a pointer to the decimal value that should be - copied as the first argument (<literal>src</>) and a pointer to the - target structure of type decimal (<literal>target</>) as the second + copied as the first argument (<literal>src</literal>) and a pointer to the + target structure of type decimal (<literal>target</literal>) as the second argument. </para> </listitem> </varlistentry> <varlistentry> - <term><function>deccvasc</></term> + <term><function>deccvasc</function></term> <listitem> <para> Convert a value from its ASCII representation into a decimal type. @@ -8336,8 +8336,8 @@ void deccopy(decimal *src, decimal *target); int deccvasc(char *cp, int len, decimal *np); </synopsis> The function receives a pointer to string that contains the string - representation of the number to be converted (<literal>cp</>) as well - as its length <literal>len</>. <literal>np</> is a pointer to the + representation of the number to be converted (<literal>cp</literal>) as well + as its length <literal>len</literal>. <literal>np</literal> is a pointer to the decimal value that saves the result of the operation. </para> <para> @@ -8350,18 +8350,18 @@ int deccvasc(char *cp, int len, decimal *np); </para> <para> The function returns 0 on success. If overflow or underflow occurred, - <literal>ECPG_INFORMIX_NUM_OVERFLOW</> or - <literal>ECPG_INFORMIX_NUM_UNDERFLOW</> is returned. If the ASCII + <literal>ECPG_INFORMIX_NUM_OVERFLOW</literal> or + <literal>ECPG_INFORMIX_NUM_UNDERFLOW</literal> is returned. If the ASCII representation could not be parsed, - <literal>ECPG_INFORMIX_BAD_NUMERIC</> is returned or - <literal>ECPG_INFORMIX_BAD_EXPONENT</> if this problem occurred while + <literal>ECPG_INFORMIX_BAD_NUMERIC</literal> is returned or + <literal>ECPG_INFORMIX_BAD_EXPONENT</literal> if this problem occurred while parsing the exponent. </para> </listitem> </varlistentry> <varlistentry> - <term><function>deccvdbl</></term> + <term><function>deccvdbl</function></term> <listitem> <para> Convert a value of type double to a value of type decimal. @@ -8369,8 +8369,8 @@ int deccvasc(char *cp, int len, decimal *np); int deccvdbl(double dbl, decimal *np); </synopsis> The function receives the variable of type double that should be - converted as its first argument (<literal>dbl</>). As the second - argument (<literal>np</>), the function receives a pointer to the + converted as its first argument (<literal>dbl</literal>). As the second + argument (<literal>np</literal>), the function receives a pointer to the decimal variable that should hold the result of the operation. </para> <para> @@ -8381,7 +8381,7 @@ int deccvdbl(double dbl, decimal *np); </varlistentry> <varlistentry> - <term><function>deccvint</></term> + <term><function>deccvint</function></term> <listitem> <para> Convert a value of type int to a value of type decimal. @@ -8389,8 +8389,8 @@ int deccvdbl(double dbl, decimal *np); int deccvint(int in, decimal *np); </synopsis> The function receives the variable of type int that should be - converted as its first argument (<literal>in</>). As the second - argument (<literal>np</>), the function receives a pointer to the + converted as its first argument (<literal>in</literal>). As the second + argument (<literal>np</literal>), the function receives a pointer to the decimal variable that should hold the result of the operation. </para> <para> @@ -8401,7 +8401,7 @@ int deccvint(int in, decimal *np); </varlistentry> <varlistentry> - <term><function>deccvlong</></term> + <term><function>deccvlong</function></term> <listitem> <para> Convert a value of type long to a value of type decimal. @@ -8409,8 +8409,8 @@ int deccvint(int in, decimal *np); int deccvlong(long lng, decimal *np); </synopsis> The function receives the variable of type long that should be - converted as its first argument (<literal>lng</>). As the second - argument (<literal>np</>), the function receives a pointer to the + converted as its first argument (<literal>lng</literal>). As the second + argument (<literal>np</literal>), the function receives a pointer to the decimal variable that should hold the result of the operation. </para> <para> @@ -8421,7 +8421,7 @@ int deccvlong(long lng, decimal *np); </varlistentry> <varlistentry> - <term><function>decdiv</></term> + <term><function>decdiv</function></term> <listitem> <para> Divide two variables of type decimal. @@ -8429,15 +8429,15 @@ int deccvlong(long lng, decimal *np); int decdiv(decimal *n1, decimal *n2, decimal *result); </synopsis> The function receives pointers to the variables that are the first - (<literal>n1</>) and the second (<literal>n2</>) operands and - calculates <literal>n1</>/<literal>n2</>. <literal>result</> is a + (<literal>n1</literal>) and the second (<literal>n2</literal>) operands and + calculates <literal>n1</literal>/<literal>n2</literal>. <literal>result</literal> is a pointer to the variable that should hold the result of the operation. </para> <para> On success, 0 is returned and a negative value if the division fails. If overflow or underflow occurred, the function returns - <literal>ECPG_INFORMIX_NUM_OVERFLOW</> or - <literal>ECPG_INFORMIX_NUM_UNDERFLOW</> respectively. If an attempt to + <literal>ECPG_INFORMIX_NUM_OVERFLOW</literal> or + <literal>ECPG_INFORMIX_NUM_UNDERFLOW</literal> respectively. If an attempt to divide by zero is observed, the function returns <literal>ECPG_INFORMIX_DIVIDE_ZERO</literal>. </para> @@ -8445,7 +8445,7 @@ int decdiv(decimal *n1, decimal *n2, decimal *result); </varlistentry> <varlistentry> - <term><function>decmul</></term> + <term><function>decmul</function></term> <listitem> <para> Multiply two decimal values. @@ -8453,21 +8453,21 @@ int decdiv(decimal *n1, decimal *n2, decimal *result); int decmul(decimal *n1, decimal *n2, decimal *result); </synopsis> The function receives pointers to the variables that are the first - (<literal>n1</>) and the second (<literal>n2</>) operands and - calculates <literal>n1</>*<literal>n2</>. <literal>result</> is a + (<literal>n1</literal>) and the second (<literal>n2</literal>) operands and + calculates <literal>n1</literal>*<literal>n2</literal>. <literal>result</literal> is a pointer to the variable that should hold the result of the operation. </para> <para> On success, 0 is returned and a negative value if the multiplication fails. If overflow or underflow occurred, the function returns - <literal>ECPG_INFORMIX_NUM_OVERFLOW</> or - <literal>ECPG_INFORMIX_NUM_UNDERFLOW</> respectively. + <literal>ECPG_INFORMIX_NUM_OVERFLOW</literal> or + <literal>ECPG_INFORMIX_NUM_UNDERFLOW</literal> respectively. </para> </listitem> </varlistentry> <varlistentry> - <term><function>decsub</></term> + <term><function>decsub</function></term> <listitem> <para> Subtract one decimal value from another. @@ -8475,21 +8475,21 @@ int decmul(decimal *n1, decimal *n2, decimal *result); int decsub(decimal *n1, decimal *n2, decimal *result); </synopsis> The function receives pointers to the variables that are the first - (<literal>n1</>) and the second (<literal>n2</>) operands and - calculates <literal>n1</>-<literal>n2</>. <literal>result</> is a + (<literal>n1</literal>) and the second (<literal>n2</literal>) operands and + calculates <literal>n1</literal>-<literal>n2</literal>. <literal>result</literal> is a pointer to the variable that should hold the result of the operation. </para> <para> On success, 0 is returned and a negative value if the subtraction fails. If overflow or underflow occurred, the function returns - <literal>ECPG_INFORMIX_NUM_OVERFLOW</> or - <literal>ECPG_INFORMIX_NUM_UNDERFLOW</> respectively. + <literal>ECPG_INFORMIX_NUM_OVERFLOW</literal> or + <literal>ECPG_INFORMIX_NUM_UNDERFLOW</literal> respectively. </para> </listitem> </varlistentry> <varlistentry> - <term><function>dectoasc</></term> + <term><function>dectoasc</function></term> <listitem> <para> Convert a variable of type decimal to its ASCII representation in a C @@ -8498,28 +8498,28 @@ int decsub(decimal *n1, decimal *n2, decimal *result); int dectoasc(decimal *np, char *cp, int len, int right) </synopsis> The function receives a pointer to a variable of type decimal - (<literal>np</>) that it converts to its textual representation. - <literal>cp</> is the buffer that should hold the result of the - operation. The parameter <literal>right</> specifies, how many digits + (<literal>np</literal>) that it converts to its textual representation. + <literal>cp</literal> is the buffer that should hold the result of the + operation. The parameter <literal>right</literal> specifies, how many digits right of the decimal point should be included in the output. The result will be rounded to this number of decimal digits. Setting - <literal>right</> to -1 indicates that all available decimal digits + <literal>right</literal> to -1 indicates that all available decimal digits should be included in the output. If the length of the output buffer, - which is indicated by <literal>len</> is not sufficient to hold the + which is indicated by <literal>len</literal> is not sufficient to hold the textual representation including the trailing zero byte, only a - single <literal>*</> character is stored in the result and -1 is + single <literal>*</literal> character is stored in the result and -1 is returned. </para> <para> - The function returns either -1 if the buffer <literal>cp</> was too - small or <literal>ECPG_INFORMIX_OUT_OF_MEMORY</> if memory was + The function returns either -1 if the buffer <literal>cp</literal> was too + small or <literal>ECPG_INFORMIX_OUT_OF_MEMORY</literal> if memory was exhausted. </para> </listitem> </varlistentry> <varlistentry> - <term><function>dectodbl</></term> + <term><function>dectodbl</function></term> <listitem> <para> Convert a variable of type decimal to a double. @@ -8527,8 +8527,8 @@ int dectoasc(decimal *np, char *cp, int len, int right) int dectodbl(decimal *np, double *dblp); </synopsis> The function receives a pointer to the decimal value to convert - (<literal>np</>) and a pointer to the double variable that - should hold the result of the operation (<literal>dblp</>). + (<literal>np</literal>) and a pointer to the double variable that + should hold the result of the operation (<literal>dblp</literal>). </para> <para> On success, 0 is returned and a negative value if the conversion @@ -8538,7 +8538,7 @@ int dectodbl(decimal *np, double *dblp); </varlistentry> <varlistentry> - <term><function>dectoint</></term> + <term><function>dectoint</function></term> <listitem> <para> Convert a variable to type decimal to an integer. @@ -8546,25 +8546,25 @@ int dectodbl(decimal *np, double *dblp); int dectoint(decimal *np, int *ip); </synopsis> The function receives a pointer to the decimal value to convert - (<literal>np</>) and a pointer to the integer variable that - should hold the result of the operation (<literal>ip</>). + (<literal>np</literal>) and a pointer to the integer variable that + should hold the result of the operation (<literal>ip</literal>). </para> <para> On success, 0 is returned and a negative value if the conversion - failed. If an overflow occurred, <literal>ECPG_INFORMIX_NUM_OVERFLOW</> + failed. If an overflow occurred, <literal>ECPG_INFORMIX_NUM_OVERFLOW</literal> is returned. </para> <para> Note that the ECPG implementation differs from the <productname>Informix</productname> implementation. <productname>Informix</productname> limits an integer to the range from -32767 to 32767, while the limits in the ECPG implementation depend on the - architecture (<literal>-INT_MAX .. INT_MAX</>). + architecture (<literal>-INT_MAX .. INT_MAX</literal>). </para> </listitem> </varlistentry> <varlistentry> - <term><function>dectolong</></term> + <term><function>dectolong</function></term> <listitem> <para> Convert a variable to type decimal to a long integer. @@ -8572,12 +8572,12 @@ int dectoint(decimal *np, int *ip); int dectolong(decimal *np, long *lngp); </synopsis> The function receives a pointer to the decimal value to convert - (<literal>np</>) and a pointer to the long variable that - should hold the result of the operation (<literal>lngp</>). + (<literal>np</literal>) and a pointer to the long variable that + should hold the result of the operation (<literal>lngp</literal>). </para> <para> On success, 0 is returned and a negative value if the conversion - failed. If an overflow occurred, <literal>ECPG_INFORMIX_NUM_OVERFLOW</> + failed. If an overflow occurred, <literal>ECPG_INFORMIX_NUM_OVERFLOW</literal> is returned. </para> <para> @@ -8585,13 +8585,13 @@ int dectolong(decimal *np, long *lngp); implementation. <productname>Informix</productname> limits a long integer to the range from -2,147,483,647 to 2,147,483,647, while the limits in the ECPG implementation depend on the architecture (<literal>-LONG_MAX .. - LONG_MAX</>). + LONG_MAX</literal>). </para> </listitem> </varlistentry> <varlistentry> - <term><function>rdatestr</></term> + <term><function>rdatestr</function></term> <listitem> <para> Converts a date to a C char* string. @@ -8599,8 +8599,8 @@ int dectolong(decimal *np, long *lngp); int rdatestr(date d, char *str); </synopsis> The function receives two arguments, the first one is the date to - convert (<literal>d</>) and the second one is a pointer to the target - string. The output format is always <literal>yyyy-mm-dd</>, so you need + convert (<literal>d</literal>) and the second one is a pointer to the target + string. The output format is always <literal>yyyy-mm-dd</literal>, so you need to allocate at least 11 bytes (including the zero-byte terminator) for the string. </para> @@ -8618,7 +8618,7 @@ int rdatestr(date d, char *str); </varlistentry> <varlistentry> - <term><function>rstrdate</></term> + <term><function>rstrdate</function></term> <listitem> <para> Parse the textual representation of a date. @@ -8626,30 +8626,30 @@ int rdatestr(date d, char *str); int rstrdate(char *str, date *d); </synopsis> The function receives the textual representation of the date to convert - (<literal>str</>) and a pointer to a variable of type date - (<literal>d</>). This function does not allow you to specify a format + (<literal>str</literal>) and a pointer to a variable of type date + (<literal>d</literal>). This function does not allow you to specify a format mask. It uses the default format mask of <productname>Informix</productname> which is - <literal>mm/dd/yyyy</>. Internally, this function is implemented by - means of <function>rdefmtdate</>. Therefore, <function>rstrdate</> is + <literal>mm/dd/yyyy</literal>. Internally, this function is implemented by + means of <function>rdefmtdate</function>. Therefore, <function>rstrdate</function> is not faster and if you have the choice you should opt for - <function>rdefmtdate</> which allows you to specify the format mask + <function>rdefmtdate</function> which allows you to specify the format mask explicitly. </para> <para> - The function returns the same values as <function>rdefmtdate</>. + The function returns the same values as <function>rdefmtdate</function>. </para> </listitem> </varlistentry> <varlistentry> - <term><function>rtoday</></term> + <term><function>rtoday</function></term> <listitem> <para> Get the current date. <synopsis> void rtoday(date *d); </synopsis> - The function receives a pointer to a date variable (<literal>d</>) + The function receives a pointer to a date variable (<literal>d</literal>) that it sets to the current date. </para> <para> @@ -8660,7 +8660,7 @@ void rtoday(date *d); </varlistentry> <varlistentry> - <term><function>rjulmdy</></term> + <term><function>rjulmdy</function></term> <listitem> <para> Extract the values for the day, the month and the year from a variable @@ -8668,11 +8668,11 @@ void rtoday(date *d); <synopsis> int rjulmdy(date d, short mdy[3]); </synopsis> - The function receives the date <literal>d</> and a pointer to an array - of 3 short integer values <literal>mdy</>. The variable name indicates - the sequential order: <literal>mdy[0]</> will be set to contain the - number of the month, <literal>mdy[1]</> will be set to the value of the - day and <literal>mdy[2]</> will contain the year. + The function receives the date <literal>d</literal> and a pointer to an array + of 3 short integer values <literal>mdy</literal>. The variable name indicates + the sequential order: <literal>mdy[0]</literal> will be set to contain the + number of the month, <literal>mdy[1]</literal> will be set to the value of the + day and <literal>mdy[2]</literal> will contain the year. </para> <para> The function always returns 0 at the moment. @@ -8685,7 +8685,7 @@ int rjulmdy(date d, short mdy[3]); </varlistentry> <varlistentry> - <term><function>rdefmtdate</></term> + <term><function>rdefmtdate</function></term> <listitem> <para> Use a format mask to convert a character string to a value of type @@ -8694,9 +8694,9 @@ int rjulmdy(date d, short mdy[3]); int rdefmtdate(date *d, char *fmt, char *str); </synopsis> The function receives a pointer to the date value that should hold the - result of the operation (<literal>d</>), the format mask to use for - parsing the date (<literal>fmt</>) and the C char* string containing - the textual representation of the date (<literal>str</>). The textual + result of the operation (<literal>d</literal>), the format mask to use for + parsing the date (<literal>fmt</literal>) and the C char* string containing + the textual representation of the date (<literal>str</literal>). The textual representation is expected to match the format mask. However you do not need to have a 1:1 mapping of the string to the format mask. The function only analyzes the sequential order and looks for the literals @@ -8715,32 +8715,32 @@ int rdefmtdate(date *d, char *fmt, char *str); </listitem> <listitem> <para> - <literal>ECPG_INFORMIX_ENOSHORTDATE</> - The date does not contain + <literal>ECPG_INFORMIX_ENOSHORTDATE</literal> - The date does not contain delimiters between day, month and year. In this case the input string must be exactly 6 or 8 bytes long but isn't. </para> </listitem> <listitem> <para> - <literal>ECPG_INFORMIX_ENOTDMY</> - The format string did not + <literal>ECPG_INFORMIX_ENOTDMY</literal> - The format string did not correctly indicate the sequential order of year, month and day. </para> </listitem> <listitem> <para> - <literal>ECPG_INFORMIX_BAD_DAY</> - The input string does not + <literal>ECPG_INFORMIX_BAD_DAY</literal> - The input string does not contain a valid day. </para> </listitem> <listitem> <para> - <literal>ECPG_INFORMIX_BAD_MONTH</> - The input string does not + <literal>ECPG_INFORMIX_BAD_MONTH</literal> - The input string does not contain a valid month. </para> </listitem> <listitem> <para> - <literal>ECPG_INFORMIX_BAD_YEAR</> - The input string does not + <literal>ECPG_INFORMIX_BAD_YEAR</literal> - The input string does not contain a valid year. </para> </listitem> @@ -8755,7 +8755,7 @@ int rdefmtdate(date *d, char *fmt, char *str); </varlistentry> <varlistentry> - <term><function>rfmtdate</></term> + <term><function>rfmtdate</function></term> <listitem> <para> Convert a variable of type date to its textual representation using a @@ -8763,9 +8763,9 @@ int rdefmtdate(date *d, char *fmt, char *str); <synopsis> int rfmtdate(date d, char *fmt, char *str); </synopsis> - The function receives the date to convert (<literal>d</>), the format - mask (<literal>fmt</>) and the string that will hold the textual - representation of the date (<literal>str</>). + The function receives the date to convert (<literal>d</literal>), the format + mask (<literal>fmt</literal>) and the string that will hold the textual + representation of the date (<literal>str</literal>). </para> <para> On success, 0 is returned and a negative value if an error occurred. @@ -8778,7 +8778,7 @@ int rfmtdate(date d, char *fmt, char *str); </varlistentry> <varlistentry> - <term><function>rmdyjul</></term> + <term><function>rmdyjul</function></term> <listitem> <para> Create a date value from an array of 3 short integers that specify the @@ -8787,7 +8787,7 @@ int rfmtdate(date d, char *fmt, char *str); int rmdyjul(short mdy[3], date *d); </synopsis> The function receives the array of the 3 short integers - (<literal>mdy</>) and a pointer to a variable of type date that should + (<literal>mdy</literal>) and a pointer to a variable of type date that should hold the result of the operation. </para> <para> @@ -8801,14 +8801,14 @@ int rmdyjul(short mdy[3], date *d); </varlistentry> <varlistentry> - <term><function>rdayofweek</></term> + <term><function>rdayofweek</function></term> <listitem> <para> Return a number representing the day of the week for a date value. <synopsis> int rdayofweek(date d); </synopsis> - The function receives the date variable <literal>d</> as its only + The function receives the date variable <literal>d</literal> as its only argument and returns an integer that indicates the day of the week for this date. <itemizedlist> @@ -8857,7 +8857,7 @@ int rdayofweek(date d); </varlistentry> <varlistentry> - <term><function>dtcurrent</></term> + <term><function>dtcurrent</function></term> <listitem> <para> Retrieve the current timestamp. @@ -8865,13 +8865,13 @@ int rdayofweek(date d); void dtcurrent(timestamp *ts); </synopsis> The function retrieves the current timestamp and saves it into the - timestamp variable that <literal>ts</> points to. + timestamp variable that <literal>ts</literal> points to. </para> </listitem> </varlistentry> <varlistentry> - <term><function>dtcvasc</></term> + <term><function>dtcvasc</function></term> <listitem> <para> Parses a timestamp from its textual representation @@ -8879,9 +8879,9 @@ void dtcurrent(timestamp *ts); <synopsis> int dtcvasc(char *str, timestamp *ts); </synopsis> - The function receives the string to parse (<literal>str</>) and a + The function receives the string to parse (<literal>str</literal>) and a pointer to the timestamp variable that should hold the result of the - operation (<literal>ts</>). + operation (<literal>ts</literal>). </para> <para> The function returns 0 on success and a negative value in case of @@ -8896,7 +8896,7 @@ int dtcvasc(char *str, timestamp *ts); </varlistentry> <varlistentry> - <term><function>dtcvfmtasc</></term> + <term><function>dtcvfmtasc</function></term> <listitem> <para> Parses a timestamp from its textual representation @@ -8904,10 +8904,10 @@ int dtcvasc(char *str, timestamp *ts); <synopsis> dtcvfmtasc(char *inbuf, char *fmtstr, timestamp *dtvalue) </synopsis> - The function receives the string to parse (<literal>inbuf</>), the - format mask to use (<literal>fmtstr</>) and a pointer to the timestamp + The function receives the string to parse (<literal>inbuf</literal>), the + format mask to use (<literal>fmtstr</literal>) and a pointer to the timestamp variable that should hold the result of the operation - (<literal>dtvalue</>). + (<literal>dtvalue</literal>). </para> <para> This function is implemented by means of the <xref @@ -8922,7 +8922,7 @@ dtcvfmtasc(char *inbuf, char *fmtstr, timestamp *dtvalue) </varlistentry> <varlistentry> - <term><function>dtsub</></term> + <term><function>dtsub</function></term> <listitem> <para> Subtract one timestamp from another and return a variable of type @@ -8930,9 +8930,9 @@ dtcvfmtasc(char *inbuf, char *fmtstr, timestamp *dtvalue) <synopsis> int dtsub(timestamp *ts1, timestamp *ts2, interval *iv); </synopsis> - The function will subtract the timestamp variable that <literal>ts2</> - points to from the timestamp variable that <literal>ts1</> points to - and will store the result in the interval variable that <literal>iv</> + The function will subtract the timestamp variable that <literal>ts2</literal> + points to from the timestamp variable that <literal>ts1</literal> points to + and will store the result in the interval variable that <literal>iv</literal> points to. </para> <para> @@ -8943,7 +8943,7 @@ int dtsub(timestamp *ts1, timestamp *ts2, interval *iv); </varlistentry> <varlistentry> - <term><function>dttoasc</></term> + <term><function>dttoasc</function></term> <listitem> <para> Convert a timestamp variable to a C char* string. @@ -8951,8 +8951,8 @@ int dtsub(timestamp *ts1, timestamp *ts2, interval *iv); int dttoasc(timestamp *ts, char *output); </synopsis> The function receives a pointer to the timestamp variable to convert - (<literal>ts</>) and the string that should hold the result of the - operation (<literal>output</>). It converts <literal>ts</> to its + (<literal>ts</literal>) and the string that should hold the result of the + operation (<literal>output</literal>). It converts <literal>ts</literal> to its textual representation according to the SQL standard, which is be <literal>YYYY-MM-DD HH:MM:SS</literal>. </para> @@ -8964,7 +8964,7 @@ int dttoasc(timestamp *ts, char *output); </varlistentry> <varlistentry> - <term><function>dttofmtasc</></term> + <term><function>dttofmtasc</function></term> <listitem> <para> Convert a timestamp variable to a C char* using a format mask. @@ -8972,8 +8972,8 @@ int dttoasc(timestamp *ts, char *output); int dttofmtasc(timestamp *ts, char *output, int str_len, char *fmtstr); </synopsis> The function receives a pointer to the timestamp to convert as its - first argument (<literal>ts</>), a pointer to the output buffer - (<literal>output</>), the maximal length that has been allocated for + first argument (<literal>ts</literal>), a pointer to the output buffer + (<literal>output</literal>), the maximal length that has been allocated for the output buffer (<literal>str_len</literal>) and the format mask to use for the conversion (<literal>fmtstr</literal>). </para> @@ -8990,7 +8990,7 @@ int dttofmtasc(timestamp *ts, char *output, int str_len, char *fmtstr); </varlistentry> <varlistentry> - <term><function>intoasc</></term> + <term><function>intoasc</function></term> <listitem> <para> Convert an interval variable to a C char* string. @@ -8998,8 +8998,8 @@ int dttofmtasc(timestamp *ts, char *output, int str_len, char *fmtstr); int intoasc(interval *i, char *str); </synopsis> The function receives a pointer to the interval variable to convert - (<literal>i</>) and the string that should hold the result of the - operation (<literal>str</>). It converts <literal>i</> to its + (<literal>i</literal>) and the string that should hold the result of the + operation (<literal>str</literal>). It converts <literal>i</literal> to its textual representation according to the SQL standard, which is be <literal>YYYY-MM-DD HH:MM:SS</literal>. </para> @@ -9011,7 +9011,7 @@ int intoasc(interval *i, char *str); </varlistentry> <varlistentry> - <term><function>rfmtlong</></term> + <term><function>rfmtlong</function></term> <listitem> <para> Convert a long integer value to its textual representation using a @@ -9019,9 +9019,9 @@ int intoasc(interval *i, char *str); <synopsis> int rfmtlong(long lng_val, char *fmt, char *outbuf); </synopsis> - The function receives the long value <literal>lng_val</>, the format - mask <literal>fmt</> and a pointer to the output buffer - <literal>outbuf</>. It converts the long value according to the format + The function receives the long value <literal>lng_val</literal>, the format + mask <literal>fmt</literal> and a pointer to the output buffer + <literal>outbuf</literal>. It converts the long value according to the format mask to its textual representation. </para> <para> @@ -9097,7 +9097,7 @@ int rfmtlong(long lng_val, char *fmt, char *outbuf); </varlistentry> <varlistentry> - <term><function>rupshift</></term> + <term><function>rupshift</function></term> <listitem> <para> Convert a string to upper case. @@ -9111,7 +9111,7 @@ void rupshift(char *str); </varlistentry> <varlistentry> - <term><function>byleng</></term> + <term><function>byleng</function></term> <listitem> <para> Return the number of characters in a string without counting trailing @@ -9120,15 +9120,15 @@ void rupshift(char *str); int byleng(char *str, int len); </synopsis> The function expects a fixed-length string as its first argument - (<literal>str</>) and its length as its second argument - (<literal>len</>). It returns the number of significant characters, + (<literal>str</literal>) and its length as its second argument + (<literal>len</literal>). It returns the number of significant characters, that is the length of the string without trailing blanks. </para> </listitem> </varlistentry> <varlistentry> - <term><function>ldchar</></term> + <term><function>ldchar</function></term> <listitem> <para> Copy a fixed-length string into a null-terminated string. @@ -9136,10 +9136,10 @@ int byleng(char *str, int len); void ldchar(char *src, int len, char *dest); </synopsis> The function receives the fixed-length string to copy - (<literal>src</>), its length (<literal>len</>) and a pointer to the - destination memory (<literal>dest</>). Note that you need to reserve at - least <literal>len+1</> bytes for the string that <literal>dest</> - points to. The function copies at most <literal>len</> bytes to the new + (<literal>src</literal>), its length (<literal>len</literal>) and a pointer to the + destination memory (<literal>dest</literal>). Note that you need to reserve at + least <literal>len+1</literal> bytes for the string that <literal>dest</literal> + points to. The function copies at most <literal>len</literal> bytes to the new location (less if the source string has trailing blanks) and adds the null-terminator. </para> @@ -9147,7 +9147,7 @@ void ldchar(char *src, int len, char *dest); </varlistentry> <varlistentry> - <term><function>rgetmsg</></term> + <term><function>rgetmsg</function></term> <listitem> <para> <synopsis> @@ -9159,7 +9159,7 @@ int rgetmsg(int msgnum, char *s, int maxsize); </varlistentry> <varlistentry> - <term><function>rtypalign</></term> + <term><function>rtypalign</function></term> <listitem> <para> <synopsis> @@ -9171,7 +9171,7 @@ int rtypalign(int offset, int type); </varlistentry> <varlistentry> - <term><function>rtypmsize</></term> + <term><function>rtypmsize</function></term> <listitem> <para> <synopsis> @@ -9183,7 +9183,7 @@ int rtypmsize(int type, int len); </varlistentry> <varlistentry> - <term><function>rtypwidth</></term> + <term><function>rtypwidth</function></term> <listitem> <para> <synopsis> @@ -9195,7 +9195,7 @@ int rtypwidth(int sqltype, int sqllen); </varlistentry> <varlistentry id="rsetnull"> - <term><function>rsetnull</></term> + <term><function>rsetnull</function></term> <listitem> <para> Set a variable to NULL. @@ -9279,15 +9279,15 @@ rsetnull(CINTTYPE, (char *) &i); </varlistentry> <varlistentry> - <term><function>risnull</></term> + <term><function>risnull</function></term> <listitem> <para> Test if a variable is NULL. <synopsis> int risnull(int t, char *ptr); </synopsis> - The function receives the type of the variable to test (<literal>t</>) - as well a pointer to this variable (<literal>ptr</>). Note that the + The function receives the type of the variable to test (<literal>t</literal>) + as well a pointer to this variable (<literal>ptr</literal>). Note that the latter needs to be cast to a char*. See the function <xref linkend="rsetnull"> for a list of possible variable types. </para> @@ -9321,7 +9321,7 @@ risnull(CINTTYPE, (char *) &i); values. <variablelist> <varlistentry> - <term><literal>ECPG_INFORMIX_NUM_OVERFLOW</></term> + <term><literal>ECPG_INFORMIX_NUM_OVERFLOW</literal></term> <listitem> <para> Functions return this value if an overflow occurred in a @@ -9332,7 +9332,7 @@ risnull(CINTTYPE, (char *) &i); </varlistentry> <varlistentry> - <term><literal>ECPG_INFORMIX_NUM_UNDERFLOW</></term> + <term><literal>ECPG_INFORMIX_NUM_UNDERFLOW</literal></term> <listitem> <para> Functions return this value if an underflow occurred in a calculation. @@ -9342,7 +9342,7 @@ risnull(CINTTYPE, (char *) &i); </varlistentry> <varlistentry> - <term><literal>ECPG_INFORMIX_DIVIDE_ZERO</></term> + <term><literal>ECPG_INFORMIX_DIVIDE_ZERO</literal></term> <listitem> <para> Functions return this value if an attempt to divide by zero is @@ -9352,7 +9352,7 @@ risnull(CINTTYPE, (char *) &i); </varlistentry> <varlistentry> - <term><literal>ECPG_INFORMIX_BAD_YEAR</></term> + <term><literal>ECPG_INFORMIX_BAD_YEAR</literal></term> <listitem> <para> Functions return this value if a bad value for a year was found while @@ -9363,7 +9363,7 @@ risnull(CINTTYPE, (char *) &i); </varlistentry> <varlistentry> - <term><literal>ECPG_INFORMIX_BAD_MONTH</></term> + <term><literal>ECPG_INFORMIX_BAD_MONTH</literal></term> <listitem> <para> Functions return this value if a bad value for a month was found while @@ -9374,7 +9374,7 @@ risnull(CINTTYPE, (char *) &i); </varlistentry> <varlistentry> - <term><literal>ECPG_INFORMIX_BAD_DAY</></term> + <term><literal>ECPG_INFORMIX_BAD_DAY</literal></term> <listitem> <para> Functions return this value if a bad value for a day was found while @@ -9385,7 +9385,7 @@ risnull(CINTTYPE, (char *) &i); </varlistentry> <varlistentry> - <term><literal>ECPG_INFORMIX_ENOSHORTDATE</></term> + <term><literal>ECPG_INFORMIX_ENOSHORTDATE</literal></term> <listitem> <para> Functions return this value if a parsing routine needs a short date @@ -9396,7 +9396,7 @@ risnull(CINTTYPE, (char *) &i); </varlistentry> <varlistentry> - <term><literal>ECPG_INFORMIX_DATE_CONVERT</></term> + <term><literal>ECPG_INFORMIX_DATE_CONVERT</literal></term> <listitem> <para> Functions return this value if an error occurred during date @@ -9407,7 +9407,7 @@ risnull(CINTTYPE, (char *) &i); </varlistentry> <varlistentry> - <term><literal>ECPG_INFORMIX_OUT_OF_MEMORY</></term> + <term><literal>ECPG_INFORMIX_OUT_OF_MEMORY</literal></term> <listitem> <para> Functions return this value if memory was exhausted during @@ -9418,18 +9418,18 @@ risnull(CINTTYPE, (char *) &i); </varlistentry> <varlistentry> - <term><literal>ECPG_INFORMIX_ENOTDMY</></term> + <term><literal>ECPG_INFORMIX_ENOTDMY</literal></term> <listitem> <para> Functions return this value if a parsing routine was supposed to get a - format mask (like <literal>mmddyy</>) but not all fields were listed + format mask (like <literal>mmddyy</literal>) but not all fields were listed correctly. Internally it is defined as -1212 (the <productname>Informix</productname> definition). </para> </listitem> </varlistentry> <varlistentry> - <term><literal>ECPG_INFORMIX_BAD_NUMERIC</></term> + <term><literal>ECPG_INFORMIX_BAD_NUMERIC</literal></term> <listitem> <para> Functions return this value either if a parsing routine cannot parse @@ -9442,7 +9442,7 @@ risnull(CINTTYPE, (char *) &i); </varlistentry> <varlistentry> - <term><literal>ECPG_INFORMIX_BAD_EXPONENT</></term> + <term><literal>ECPG_INFORMIX_BAD_EXPONENT</literal></term> <listitem> <para> Functions return this value if a parsing routine cannot parse @@ -9453,7 +9453,7 @@ risnull(CINTTYPE, (char *) &i); </varlistentry> <varlistentry> - <term><literal>ECPG_INFORMIX_BAD_DATE</></term> + <term><literal>ECPG_INFORMIX_BAD_DATE</literal></term> <listitem> <para> Functions return this value if a parsing routine cannot parse @@ -9464,7 +9464,7 @@ risnull(CINTTYPE, (char *) &i); </varlistentry> <varlistentry> - <term><literal>ECPG_INFORMIX_EXTRA_CHARS</></term> + <term><literal>ECPG_INFORMIX_EXTRA_CHARS</literal></term> <listitem> <para> Functions return this value if a parsing routine is passed extra @@ -9507,7 +9507,7 @@ risnull(CINTTYPE, (char *) &i); Variable substitution occurs when a symbol starts with a colon (<literal>:</literal>). The variable with that name is looked up among the variables that were previously declared within a - <literal>EXEC SQL DECLARE</> section. + <literal>EXEC SQL DECLARE</literal> section. </para> <para> @@ -9555,10 +9555,10 @@ risnull(CINTTYPE, (char *) &i); </varlistentry> <varlistentry> - <term><parameter>ECPGt_EOIT</></term> + <term><parameter>ECPGt_EOIT</parameter></term> <listitem> <para> - An <type>enum</> telling that there are no more input + An <type>enum</type> telling that there are no more input variables. </para> </listitem> @@ -9575,10 +9575,10 @@ risnull(CINTTYPE, (char *) &i); </varlistentry> <varlistentry> - <term><parameter>ECPGt_EORT</></term> + <term><parameter>ECPGt_EORT</parameter></term> <listitem> <para> - An <type>enum</> telling that there are no more variables. + An <type>enum</type> telling that there are no more variables. </para> </listitem> </varlistentry> @@ -9660,7 +9660,7 @@ risnull(CINTTYPE, (char *) &i); EXEC SQL OPEN <replaceable>cursor</replaceable>; </programlisting> is not copied to the output. Instead, the cursor's - <command>DECLARE</> command is used at the position of the <command>OPEN</> command + <command>DECLARE</command> command is used at the position of the <command>OPEN</command> command because it indeed opens the cursor. </para> diff --git a/doc/src/sgml/errcodes.sgml b/doc/src/sgml/errcodes.sgml index 40b4191c104..61ad3e00e91 100644 --- a/doc/src/sgml/errcodes.sgml +++ b/doc/src/sgml/errcodes.sgml @@ -11,13 +11,13 @@ <para> All messages emitted by the <productname>PostgreSQL</productname> server are assigned five-character error codes that follow the SQL - standard's conventions for <quote>SQLSTATE</> codes. Applications + standard's conventions for <quote>SQLSTATE</quote> codes. Applications that need to know which error condition has occurred should usually test the error code, rather than looking at the textual error message. The error codes are less likely to change across - <productname>PostgreSQL</> releases, and also are not subject to + <productname>PostgreSQL</productname> releases, and also are not subject to change due to localization of error messages. Note that some, but - not all, of the error codes produced by <productname>PostgreSQL</> + not all, of the error codes produced by <productname>PostgreSQL</productname> are defined by the SQL standard; some additional error codes for conditions not defined by the standard have been invented or borrowed from other databases. @@ -36,16 +36,16 @@ <productname>PostgreSQL</productname> &version;. (Some are not actually used at present, but are defined by the SQL standard.) The error classes are also shown. For each error class there is a - <quote>standard</> error code having the last three characters - <literal>000</>. This code is used only for error conditions that fall + <quote>standard</quote> error code having the last three characters + <literal>000</literal>. This code is used only for error conditions that fall within the class but do not have any more-specific code assigned. </para> <para> The symbol shown in the column <quote>Condition Name</quote> is - the condition name to use in <application>PL/pgSQL</>. Condition + the condition name to use in <application>PL/pgSQL</application>. Condition names can be written in either upper or lower case. (Note that - <application>PL/pgSQL</> does not recognize warning, as opposed to error, + <application>PL/pgSQL</application> does not recognize warning, as opposed to error, condition names; those are classes 00, 01, and 02.) </para> @@ -53,10 +53,10 @@ For some types of errors, the server reports the name of a database object (a table, table column, data type, or constraint) associated with the error; for example, the name of the unique constraint that caused a - <symbol>unique_violation</> error. Such names are supplied in separate + <symbol>unique_violation</symbol> error. Such names are supplied in separate fields of the error report message so that applications need not try to extract them from the possibly-localized human-readable text of the message. - As of <productname>PostgreSQL</> 9.3, complete coverage for this feature + As of <productname>PostgreSQL</productname> 9.3, complete coverage for this feature exists only for errors in SQLSTATE class 23 (integrity constraint violation), but this is likely to be expanded in future. </para> diff --git a/doc/src/sgml/event-trigger.sgml b/doc/src/sgml/event-trigger.sgml index c7b880d7c9c..e19571b8eb7 100644 --- a/doc/src/sgml/event-trigger.sgml +++ b/doc/src/sgml/event-trigger.sgml @@ -9,7 +9,7 @@ <para> To supplement the trigger mechanism discussed in <xref linkend="triggers">, - <productname>PostgreSQL</> also provides event triggers. Unlike regular + <productname>PostgreSQL</productname> also provides event triggers. Unlike regular triggers, which are attached to a single table and capture only DML events, event triggers are global to a particular database and are capable of capturing DDL events. @@ -28,67 +28,67 @@ An event trigger fires whenever the event with which it is associated occurs in the database in which it is defined. Currently, the only supported events are - <literal>ddl_command_start</>, - <literal>ddl_command_end</>, - <literal>table_rewrite</> - and <literal>sql_drop</>. + <literal>ddl_command_start</literal>, + <literal>ddl_command_end</literal>, + <literal>table_rewrite</literal> + and <literal>sql_drop</literal>. Support for additional events may be added in future releases. </para> <para> - The <literal>ddl_command_start</> event occurs just before the - execution of a <literal>CREATE</>, <literal>ALTER</>, <literal>DROP</>, - <literal>SECURITY LABEL</>, - <literal>COMMENT</>, <literal>GRANT</> or <literal>REVOKE</> + The <literal>ddl_command_start</literal> event occurs just before the + execution of a <literal>CREATE</literal>, <literal>ALTER</literal>, <literal>DROP</literal>, + <literal>SECURITY LABEL</literal>, + <literal>COMMENT</literal>, <literal>GRANT</literal> or <literal>REVOKE</literal> command. No check whether the affected object exists or doesn't exist is performed before the event trigger fires. As an exception, however, this event does not occur for DDL commands targeting shared objects — databases, roles, and tablespaces — or for commands targeting event triggers themselves. The event trigger mechanism does not support these object types. - <literal>ddl_command_start</> also occurs just before the execution of a + <literal>ddl_command_start</literal> also occurs just before the execution of a <literal>SELECT INTO</literal> command, since this is equivalent to <literal>CREATE TABLE AS</literal>. </para> <para> - The <literal>ddl_command_end</> event occurs just after the execution of - this same set of commands. To obtain more details on the <acronym>DDL</> + The <literal>ddl_command_end</literal> event occurs just after the execution of + this same set of commands. To obtain more details on the <acronym>DDL</acronym> operations that took place, use the set-returning function - <literal>pg_event_trigger_ddl_commands()</> from the - <literal>ddl_command_end</> event trigger code (see + <literal>pg_event_trigger_ddl_commands()</literal> from the + <literal>ddl_command_end</literal> event trigger code (see <xref linkend="functions-event-triggers">). Note that the trigger fires after the actions have taken place (but before the transaction commits), and thus the system catalogs can be read as already changed. </para> <para> - The <literal>sql_drop</> event occurs just before the - <literal>ddl_command_end</> event trigger for any operation that drops + The <literal>sql_drop</literal> event occurs just before the + <literal>ddl_command_end</literal> event trigger for any operation that drops database objects. To list the objects that have been dropped, use the - set-returning function <literal>pg_event_trigger_dropped_objects()</> from the - <literal>sql_drop</> event trigger code (see + set-returning function <literal>pg_event_trigger_dropped_objects()</literal> from the + <literal>sql_drop</literal> event trigger code (see <xref linkend="functions-event-triggers">). Note that the trigger is executed after the objects have been deleted from the system catalogs, so it's not possible to look them up anymore. </para> <para> - The <literal>table_rewrite</> event occurs just before a table is - rewritten by some actions of the commands <literal>ALTER TABLE</> and - <literal>ALTER TYPE</>. While other + The <literal>table_rewrite</literal> event occurs just before a table is + rewritten by some actions of the commands <literal>ALTER TABLE</literal> and + <literal>ALTER TYPE</literal>. While other control statements are available to rewrite a table, like <literal>CLUSTER</literal> and <literal>VACUUM</literal>, - the <literal>table_rewrite</> event is not triggered by them. + the <literal>table_rewrite</literal> event is not triggered by them. </para> <para> Event triggers (like other functions) cannot be executed in an aborted transaction. Thus, if a DDL command fails with an error, any associated - <literal>ddl_command_end</> triggers will not be executed. Conversely, - if a <literal>ddl_command_start</> trigger fails with an error, no + <literal>ddl_command_end</literal> triggers will not be executed. Conversely, + if a <literal>ddl_command_start</literal> trigger fails with an error, no further event triggers will fire, and no attempt will be made to execute - the command itself. Similarly, if a <literal>ddl_command_end</> trigger + the command itself. Similarly, if a <literal>ddl_command_end</literal> trigger fails with an error, the effects of the DDL statement will be rolled back, just as they would be in any other case where the containing transaction aborts. @@ -879,14 +879,14 @@ </para> <para> - Event trigger functions must use the <quote>version 1</> function + Event trigger functions must use the <quote>version 1</quote> function manager interface. </para> <para> When a function is called by the event trigger manager, it is not passed - any normal arguments, but it is passed a <quote>context</> pointer - pointing to a <structname>EventTriggerData</> structure. C functions can + any normal arguments, but it is passed a <quote>context</quote> pointer + pointing to a <structname>EventTriggerData</structname> structure. C functions can check whether they were called from the event trigger manager or not by executing the macro: <programlisting> @@ -897,10 +897,10 @@ CALLED_AS_EVENT_TRIGGER(fcinfo) ((fcinfo)->context != NULL && IsA((fcinfo)->context, EventTriggerData)) </programlisting> If this returns true, then it is safe to cast - <literal>fcinfo->context</> to type <literal>EventTriggerData + <literal>fcinfo->context</literal> to type <literal>EventTriggerData *</literal> and make use of the pointed-to - <structname>EventTriggerData</> structure. The function must - <emphasis>not</emphasis> alter the <structname>EventTriggerData</> + <structname>EventTriggerData</structname> structure. The function must + <emphasis>not</emphasis> alter the <structname>EventTriggerData</structname> structure or any of the data it points to. </para> @@ -922,7 +922,7 @@ typedef struct EventTriggerData <variablelist> <varlistentry> - <term><structfield>type</></term> + <term><structfield>type</structfield></term> <listitem> <para> Always <literal>T_EventTriggerData</literal>. @@ -931,7 +931,7 @@ typedef struct EventTriggerData </varlistentry> <varlistentry> - <term><structfield>event</></term> + <term><structfield>event</structfield></term> <listitem> <para> Describes the event for which the function is called, one of @@ -944,7 +944,7 @@ typedef struct EventTriggerData </varlistentry> <varlistentry> - <term><structfield>parsetree</></term> + <term><structfield>parsetree</structfield></term> <listitem> <para> A pointer to the parse tree of the command. Check the PostgreSQL @@ -955,7 +955,7 @@ typedef struct EventTriggerData </varlistentry> <varlistentry> - <term><structfield>tag</></term> + <term><structfield>tag</structfield></term> <listitem> <para> The command tag associated with the event for which the event trigger @@ -967,8 +967,8 @@ typedef struct EventTriggerData </para> <para> - An event trigger function must return a <symbol>NULL</> pointer - (<emphasis>not</> an SQL null value, that is, do not + An event trigger function must return a <symbol>NULL</symbol> pointer + (<emphasis>not</emphasis> an SQL null value, that is, do not set <parameter>isNull</parameter> true). </para> </sect1> @@ -983,7 +983,7 @@ typedef struct EventTriggerData </para> <para> - The function <function>noddl</> raises an exception each time it is called. + The function <function>noddl</function> raises an exception each time it is called. The event trigger definition associated the function with the <literal>ddl_command_start</literal> event. The effect is that all DDL commands (with the exceptions mentioned @@ -1068,7 +1068,7 @@ COMMIT; <title>A Table Rewrite Event Trigger Example</title> <para> - Thanks to the <literal>table_rewrite</> event, it is possible to implement + Thanks to the <literal>table_rewrite</literal> event, it is possible to implement a table rewriting policy only allowing the rewrite in maintenance windows. </para> diff --git a/doc/src/sgml/extend.sgml b/doc/src/sgml/extend.sgml index b96ef389a28..c1bd03ad4c9 100644 --- a/doc/src/sgml/extend.sgml +++ b/doc/src/sgml/extend.sgml @@ -116,7 +116,7 @@ <para> Base types are those, like <type>int4</type>, that are - implemented below the level of the <acronym>SQL</> language + implemented below the level of the <acronym>SQL</acronym> language (typically in a low-level language such as C). They generally correspond to what are often known as abstract data types. <productname>PostgreSQL</productname> can only operate on such @@ -136,11 +136,11 @@ Composite types, or row types, are created whenever the user creates a table. It is also possible to use <xref linkend="sql-createtype"> to - define a <quote>stand-alone</> composite type with no associated + define a <quote>stand-alone</quote> composite type with no associated table. A composite type is simply a list of types with associated field names. A value of a composite type is a row or record of field values. The user can access the component fields - from <acronym>SQL</> queries. Refer to <xref linkend="rowtypes"> + from <acronym>SQL</acronym> queries. Refer to <xref linkend="rowtypes"> for more information on composite types. </para> </sect2> @@ -156,7 +156,7 @@ </para> <para> - Domains can be created using the <acronym>SQL</> command + Domains can be created using the <acronym>SQL</acronym> command <xref linkend="sql-createdomain">. Their creation and use is not discussed in this chapter. </para> @@ -166,7 +166,7 @@ <title>Pseudo-Types</title> <para> - There are a few <quote>pseudo-types</> for special purposes. + There are a few <quote>pseudo-types</quote> for special purposes. Pseudo-types cannot appear as columns of tables or attributes of composite types, but they can be used to declare the argument and result types of functions. This provides a mechanism within the @@ -198,12 +198,12 @@ </indexterm> <para> - Five pseudo-types of special interest are <type>anyelement</>, - <type>anyarray</>, <type>anynonarray</>, <type>anyenum</>, - and <type>anyrange</>, - which are collectively called <firstterm>polymorphic types</>. + Five pseudo-types of special interest are <type>anyelement</type>, + <type>anyarray</type>, <type>anynonarray</type>, <type>anyenum</type>, + and <type>anyrange</type>, + which are collectively called <firstterm>polymorphic types</firstterm>. Any function declared using these types is said to be - a <firstterm>polymorphic function</>. A polymorphic function can + a <firstterm>polymorphic function</firstterm>. A polymorphic function can operate on many different data types, with the specific data type(s) being determined by the data types actually passed to it in a particular call. @@ -228,10 +228,10 @@ and others declared <type>anyelement</type>, the actual range type in the <type>anyrange</type> positions must be a range whose subtype is the same type appearing in the <type>anyelement</type> positions. - <type>anynonarray</> is treated exactly the same as <type>anyelement</>, + <type>anynonarray</type> is treated exactly the same as <type>anyelement</type>, but adds the additional constraint that the actual type must not be an array type. - <type>anyenum</> is treated exactly the same as <type>anyelement</>, + <type>anyenum</type> is treated exactly the same as <type>anyelement</type>, but adds the additional constraint that the actual type must be an enum type. </para> @@ -240,7 +240,7 @@ Thus, when more than one argument position is declared with a polymorphic type, the net effect is that only certain combinations of actual argument types are allowed. For example, a function declared as - <literal>equal(anyelement, anyelement)</> will take any two input values, + <literal>equal(anyelement, anyelement)</literal> will take any two input values, so long as they are of the same data type. </para> @@ -251,19 +251,19 @@ result type for that call. For example, if there were not already an array subscripting mechanism, one could define a function that implements subscripting as <literal>subscript(anyarray, integer) - returns anyelement</>. This declaration constrains the actual first + returns anyelement</literal>. This declaration constrains the actual first argument to be an array type, and allows the parser to infer the correct result type from the actual first argument's type. Another example - is that a function declared as <literal>f(anyarray) returns anyenum</> + is that a function declared as <literal>f(anyarray) returns anyenum</literal> will only accept arrays of enum types. </para> <para> - Note that <type>anynonarray</> and <type>anyenum</> do not represent + Note that <type>anynonarray</type> and <type>anyenum</type> do not represent separate type variables; they are the same type as <type>anyelement</type>, just with an additional constraint. For - example, declaring a function as <literal>f(anyelement, anyenum)</> - is equivalent to declaring it as <literal>f(anyenum, anyenum)</>: + example, declaring a function as <literal>f(anyelement, anyenum)</literal> + is equivalent to declaring it as <literal>f(anyenum, anyenum)</literal>: both actual arguments have to be the same enum type. </para> @@ -271,10 +271,10 @@ A variadic function (one taking a variable number of arguments, as in <xref linkend="xfunc-sql-variadic-functions">) can be polymorphic: this is accomplished by declaring its last parameter as - <literal>VARIADIC</> <type>anyarray</>. For purposes of argument + <literal>VARIADIC</literal> <type>anyarray</type>. For purposes of argument matching and determining the actual result type, such a function behaves the same as if you had written the appropriate number of - <type>anynonarray</> parameters. + <type>anynonarray</type> parameters. </para> </sect2> </sect1> @@ -294,15 +294,15 @@ </indexterm> <para> - A useful extension to <productname>PostgreSQL</> typically includes + A useful extension to <productname>PostgreSQL</productname> typically includes multiple SQL objects; for example, a new data type will require new functions, new operators, and probably new index operator classes. It is helpful to collect all these objects into a single package - to simplify database management. <productname>PostgreSQL</> calls - such a package an <firstterm>extension</>. To define an extension, - you need at least a <firstterm>script file</> that contains the - <acronym>SQL</> commands to create the extension's objects, and a - <firstterm>control file</> that specifies a few basic properties + to simplify database management. <productname>PostgreSQL</productname> calls + such a package an <firstterm>extension</firstterm>. To define an extension, + you need at least a <firstterm>script file</firstterm> that contains the + <acronym>SQL</acronym> commands to create the extension's objects, and a + <firstterm>control file</firstterm> that specifies a few basic properties of the extension itself. If the extension includes C code, there will typically also be a shared library file into which the C code has been built. Once you have these files, a simple @@ -312,14 +312,14 @@ <para> The main advantage of using an extension, rather than just running the - <acronym>SQL</> script to load a bunch of <quote>loose</> objects - into your database, is that <productname>PostgreSQL</> will then + <acronym>SQL</acronym> script to load a bunch of <quote>loose</quote> objects + into your database, is that <productname>PostgreSQL</productname> will then understand that the objects of the extension go together. You can drop all the objects with a single <xref linkend="sql-dropextension"> - command (no need to maintain a separate <quote>uninstall</> script). - Even more useful, <application>pg_dump</> knows that it should not + command (no need to maintain a separate <quote>uninstall</quote> script). + Even more useful, <application>pg_dump</application> knows that it should not dump the individual member objects of the extension — it will - just include a <command>CREATE EXTENSION</> command in dumps, instead. + just include a <command>CREATE EXTENSION</command> command in dumps, instead. This vastly simplifies migration to a new version of the extension that might contain more or different objects than the old version. Note however that you must have the extension's control, script, and @@ -327,12 +327,12 @@ </para> <para> - <productname>PostgreSQL</> will not let you drop an individual object + <productname>PostgreSQL</productname> will not let you drop an individual object contained in an extension, except by dropping the whole extension. Also, while you can change the definition of an extension member object (for example, via <command>CREATE OR REPLACE FUNCTION</command> for a function), bear in mind that the modified definition will not be dumped - by <application>pg_dump</>. Such a change is usually only sensible if + by <application>pg_dump</application>. Such a change is usually only sensible if you concurrently make the same change in the extension's script file. (But there are special provisions for tables containing configuration data; see <xref linkend="extend-extensions-config-tables">.) @@ -346,19 +346,19 @@ statements. The final set of privileges for each object (if any are set) will be stored in the <link linkend="catalog-pg-init-privs"><structname>pg_init_privs</structname></link> - system catalog. When <application>pg_dump</> is used, the - <command>CREATE EXTENSION</> command will be included in the dump, followed + system catalog. When <application>pg_dump</application> is used, the + <command>CREATE EXTENSION</command> command will be included in the dump, followed by the set of <command>GRANT</command> and <command>REVOKE</command> statements necessary to set the privileges on the objects to what they were at the time the dump was taken. </para> <para> - <productname>PostgreSQL</> does not currently support extension scripts + <productname>PostgreSQL</productname> does not currently support extension scripts issuing <command>CREATE POLICY</command> or <command>SECURITY LABEL</command> statements. These are expected to be set after the extension has been created. All RLS policies and security labels on extension objects will be - included in dumps created by <application>pg_dump</>. + included in dumps created by <application>pg_dump</application>. </para> <para> @@ -366,8 +366,8 @@ scripts that adjust the definitions of the SQL objects contained in an extension. For example, if version 1.1 of an extension adds one function and changes the body of another function compared to 1.0, the extension - author can provide an <firstterm>update script</> that makes just those - two changes. The <command>ALTER EXTENSION UPDATE</> command can then + author can provide an <firstterm>update script</firstterm> that makes just those + two changes. The <command>ALTER EXTENSION UPDATE</command> command can then be used to apply these changes and track which version of the extension is actually installed in a given database. </para> @@ -384,7 +384,7 @@ considered members of the extension. Another important point is that schemas can belong to extensions, but not vice versa: an extension as such has an unqualified name and does not - exist <quote>within</> any schema. The extension's member objects, + exist <quote>within</quote> any schema. The extension's member objects, however, will belong to schemas whenever appropriate for their object types. It may or may not be appropriate for an extension to own the schema(s) its member objects are within. @@ -409,23 +409,23 @@ <para> The <xref linkend="sql-createextension"> command relies on a control file for each extension, which must be named the same as the extension - with a suffix of <literal>.control</>, and must be placed in the + with a suffix of <literal>.control</literal>, and must be placed in the installation's <literal>SHAREDIR/extension</literal> directory. There - must also be at least one <acronym>SQL</> script file, which follows the + must also be at least one <acronym>SQL</acronym> script file, which follows the naming pattern - <literal><replaceable>extension</>--<replaceable>version</>.sql</literal> - (for example, <literal>foo--1.0.sql</> for version <literal>1.0</> of - extension <literal>foo</>). By default, the script file(s) are also + <literal><replaceable>extension</replaceable>--<replaceable>version</replaceable>.sql</literal> + (for example, <literal>foo--1.0.sql</literal> for version <literal>1.0</literal> of + extension <literal>foo</literal>). By default, the script file(s) are also placed in the <literal>SHAREDIR/extension</literal> directory; but the control file can specify a different directory for the script file(s). </para> <para> The file format for an extension control file is the same as for the - <filename>postgresql.conf</> file, namely a list of - <replaceable>parameter_name</> <literal>=</> <replaceable>value</> + <filename>postgresql.conf</filename> file, namely a list of + <replaceable>parameter_name</replaceable> <literal>=</literal> <replaceable>value</replaceable> assignments, one per line. Blank lines and comments introduced by - <literal>#</> are allowed. Be sure to quote any value that is not + <literal>#</literal> are allowed. Be sure to quote any value that is not a single word or number. </para> @@ -438,11 +438,11 @@ <term><varname>directory</varname> (<type>string</type>)</term> <listitem> <para> - The directory containing the extension's <acronym>SQL</> script + The directory containing the extension's <acronym>SQL</acronym> script file(s). Unless an absolute path is given, the name is relative to the installation's <literal>SHAREDIR</literal> directory. The default behavior is equivalent to specifying - <literal>directory = 'extension'</>. + <literal>directory = 'extension'</literal>. </para> </listitem> </varlistentry> @@ -452,9 +452,9 @@ <listitem> <para> The default version of the extension (the one that will be installed - if no version is specified in <command>CREATE EXTENSION</>). Although - this can be omitted, that will result in <command>CREATE EXTENSION</> - failing if no <literal>VERSION</> option appears, so you generally + if no version is specified in <command>CREATE EXTENSION</command>). Although + this can be omitted, that will result in <command>CREATE EXTENSION</command> + failing if no <literal>VERSION</literal> option appears, so you generally don't want to do that. </para> </listitem> @@ -489,11 +489,11 @@ <listitem> <para> The value of this parameter will be substituted for each occurrence - of <literal>MODULE_PATHNAME</> in the script file(s). If it is not + of <literal>MODULE_PATHNAME</literal> in the script file(s). If it is not set, no substitution is made. Typically, this is set to - <literal>$libdir/<replaceable>shared_library_name</></literal> and - then <literal>MODULE_PATHNAME</> is used in <command>CREATE - FUNCTION</> commands for C-language functions, so that the script + <literal>$libdir/<replaceable>shared_library_name</replaceable></literal> and + then <literal>MODULE_PATHNAME</literal> is used in <command>CREATE + FUNCTION</command> commands for C-language functions, so that the script files do not need to hard-wire the name of the shared library. </para> </listitem> @@ -514,9 +514,9 @@ <term><varname>superuser</varname> (<type>boolean</type>)</term> <listitem> <para> - If this parameter is <literal>true</> (which is the default), + If this parameter is <literal>true</literal> (which is the default), only superusers can create the extension or update it to a new - version. If it is set to <literal>false</>, just the privileges + version. If it is set to <literal>false</literal>, just the privileges required to execute the commands in the installation or update script are required. </para> @@ -527,9 +527,9 @@ <term><varname>relocatable</varname> (<type>boolean</type>)</term> <listitem> <para> - An extension is <firstterm>relocatable</> if it is possible to move + An extension is <firstterm>relocatable</firstterm> if it is possible to move its contained objects into a different schema after initial creation - of the extension. The default is <literal>false</>, i.e. the + of the extension. The default is <literal>false</literal>, i.e. the extension is not relocatable. See <xref linkend="extend-extensions-relocation"> for more information. </para> @@ -553,45 +553,45 @@ <para> In addition to the primary control file - <literal><replaceable>extension</>.control</literal>, + <literal><replaceable>extension</replaceable>.control</literal>, an extension can have secondary control files named in the style - <literal><replaceable>extension</>--<replaceable>version</>.control</literal>. + <literal><replaceable>extension</replaceable>--<replaceable>version</replaceable>.control</literal>. If supplied, these must be located in the script file directory. Secondary control files follow the same format as the primary control file. Any parameters set in a secondary control file override the primary control file when installing or updating to that version of - the extension. However, the parameters <varname>directory</> and - <varname>default_version</> cannot be set in a secondary control file. + the extension. However, the parameters <varname>directory</varname> and + <varname>default_version</varname> cannot be set in a secondary control file. </para> <para> - An extension's <acronym>SQL</> script files can contain any SQL commands, - except for transaction control commands (<command>BEGIN</>, - <command>COMMIT</>, etc) and commands that cannot be executed inside a - transaction block (such as <command>VACUUM</>). This is because the + An extension's <acronym>SQL</acronym> script files can contain any SQL commands, + except for transaction control commands (<command>BEGIN</command>, + <command>COMMIT</command>, etc) and commands that cannot be executed inside a + transaction block (such as <command>VACUUM</command>). This is because the script files are implicitly executed within a transaction block. </para> <para> - An extension's <acronym>SQL</> script files can also contain lines - beginning with <literal>\echo</>, which will be ignored (treated as + An extension's <acronym>SQL</acronym> script files can also contain lines + beginning with <literal>\echo</literal>, which will be ignored (treated as comments) by the extension mechanism. This provision is commonly used - to throw an error if the script file is fed to <application>psql</> - rather than being loaded via <command>CREATE EXTENSION</> (see example + to throw an error if the script file is fed to <application>psql</application> + rather than being loaded via <command>CREATE EXTENSION</command> (see example script in <xref linkend="extend-extensions-example">). Without that, users might accidentally load the - extension's contents as <quote>loose</> objects rather than as an + extension's contents as <quote>loose</quote> objects rather than as an extension, a state of affairs that's a bit tedious to recover from. </para> <para> While the script files can contain any characters allowed by the specified encoding, control files should contain only plain ASCII, because there - is no way for <productname>PostgreSQL</> to know what encoding a + is no way for <productname>PostgreSQL</productname> to know what encoding a control file is in. In practice this is only an issue if you want to use non-ASCII characters in the extension's comment. Recommended - practice in that case is to not use the control file <varname>comment</> - parameter, but instead use <command>COMMENT ON EXTENSION</> + practice in that case is to not use the control file <varname>comment</varname> + parameter, but instead use <command>COMMENT ON EXTENSION</command> within a script file to set the comment. </para> @@ -611,14 +611,14 @@ <para> A fully relocatable extension can be moved into another schema at any time, even after it's been loaded into a database. - This is done with the <command>ALTER EXTENSION SET SCHEMA</> + This is done with the <command>ALTER EXTENSION SET SCHEMA</command> command, which automatically renames all the member objects into the new schema. Normally, this is only possible if the extension contains no internal assumptions about what schema any of its objects are in. Also, the extension's objects must all be in one schema to begin with (ignoring objects that do not belong to any schema, such as procedural languages). Mark a fully relocatable - extension by setting <literal>relocatable = true</> in its control + extension by setting <literal>relocatable = true</literal> in its control file. </para> </listitem> @@ -628,26 +628,26 @@ An extension might be relocatable during installation but not afterwards. This is typically the case if the extension's script file needs to reference the target schema explicitly, for example - in setting <literal>search_path</> properties for SQL functions. - For such an extension, set <literal>relocatable = false</> in its - control file, and use <literal>@extschema@</> to refer to the target + in setting <literal>search_path</literal> properties for SQL functions. + For such an extension, set <literal>relocatable = false</literal> in its + control file, and use <literal>@extschema@</literal> to refer to the target schema in the script file. All occurrences of this string will be replaced by the actual target schema's name before the script is executed. The user can set the target schema using the - <literal>SCHEMA</> option of <command>CREATE EXTENSION</>. + <literal>SCHEMA</literal> option of <command>CREATE EXTENSION</command>. </para> </listitem> <listitem> <para> If the extension does not support relocation at all, set - <literal>relocatable = false</> in its control file, and also set - <literal>schema</> to the name of the intended target schema. This - will prevent use of the <literal>SCHEMA</> option of <command>CREATE - EXTENSION</>, unless it specifies the same schema named in the control + <literal>relocatable = false</literal> in its control file, and also set + <literal>schema</literal> to the name of the intended target schema. This + will prevent use of the <literal>SCHEMA</literal> option of <command>CREATE + EXTENSION</command>, unless it specifies the same schema named in the control file. This choice is typically necessary if the extension contains internal assumptions about schema names that can't be replaced by - uses of <literal>@extschema@</>. The <literal>@extschema@</> + uses of <literal>@extschema@</literal>. The <literal>@extschema@</literal> substitution mechanism is available in this case too, although it is of limited use since the schema name is determined by the control file. </para> @@ -657,23 +657,23 @@ <para> In all cases, the script file will be executed with <xref linkend="guc-search-path"> initially set to point to the target - schema; that is, <command>CREATE EXTENSION</> does the equivalent of + schema; that is, <command>CREATE EXTENSION</command> does the equivalent of this: <programlisting> SET LOCAL search_path TO @extschema@; </programlisting> This allows the objects created by the script file to go into the target - schema. The script file can change <varname>search_path</> if it wishes, - but that is generally undesirable. <varname>search_path</> is restored - to its previous setting upon completion of <command>CREATE EXTENSION</>. + schema. The script file can change <varname>search_path</varname> if it wishes, + but that is generally undesirable. <varname>search_path</varname> is restored + to its previous setting upon completion of <command>CREATE EXTENSION</command>. </para> <para> - The target schema is determined by the <varname>schema</> parameter in - the control file if that is given, otherwise by the <literal>SCHEMA</> - option of <command>CREATE EXTENSION</> if that is given, otherwise the + The target schema is determined by the <varname>schema</varname> parameter in + the control file if that is given, otherwise by the <literal>SCHEMA</literal> + option of <command>CREATE EXTENSION</command> if that is given, otherwise the current default object creation schema (the first one in the caller's - <varname>search_path</>). When the control file <varname>schema</> + <varname>search_path</varname>). When the control file <varname>schema</varname> parameter is used, the target schema will be created if it doesn't already exist, but in the other two cases it must already exist. </para> @@ -681,7 +681,7 @@ SET LOCAL search_path TO @extschema@; <para> If any prerequisite extensions are listed in <varname>requires</varname> in the control file, their target schemas are appended to the initial - setting of <varname>search_path</>. This allows their objects to be + setting of <varname>search_path</varname>. This allows their objects to be visible to the new extension's script file. </para> @@ -690,7 +690,7 @@ SET LOCAL search_path TO @extschema@; multiple schemas, it is usually desirable to place all the objects meant for external use into a single schema, which is considered the extension's target schema. Such an arrangement works conveniently with the default - setting of <varname>search_path</> during creation of dependent + setting of <varname>search_path</varname> during creation of dependent extensions. </para> </sect2> @@ -703,7 +703,7 @@ SET LOCAL search_path TO @extschema@; might be added or changed by the user after installation of the extension. Ordinarily, if a table is part of an extension, neither the table's definition nor its content will be dumped by - <application>pg_dump</>. But that behavior is undesirable for a + <application>pg_dump</application>. But that behavior is undesirable for a configuration table; any data changes made by the user need to be included in dumps, or the extension will behave differently after a dump and reload. @@ -716,9 +716,9 @@ SET LOCAL search_path TO @extschema@; <para> To solve this problem, an extension's script file can mark a table or a sequence it has created as a configuration relation, which will - cause <application>pg_dump</> to include the table's or the sequence's + cause <application>pg_dump</application> to include the table's or the sequence's contents (not its definition) in dumps. To do that, call the function - <function>pg_extension_config_dump(regclass, text)</> after creating the + <function>pg_extension_config_dump(regclass, text)</function> after creating the table or the sequence, for example <programlisting> CREATE TABLE my_config (key text, value text); @@ -728,30 +728,30 @@ SELECT pg_catalog.pg_extension_config_dump('my_config', ''); SELECT pg_catalog.pg_extension_config_dump('my_config_seq', ''); </programlisting> Any number of tables or sequences can be marked this way. Sequences - associated with <type>serial</> or <type>bigserial</> columns can + associated with <type>serial</type> or <type>bigserial</type> columns can be marked as well. </para> <para> - When the second argument of <function>pg_extension_config_dump</> is + When the second argument of <function>pg_extension_config_dump</function> is an empty string, the entire contents of the table are dumped by - <application>pg_dump</>. This is usually only correct if the table + <application>pg_dump</application>. This is usually only correct if the table is initially empty as created by the extension script. If there is a mixture of initial data and user-provided data in the table, - the second argument of <function>pg_extension_config_dump</> provides - a <literal>WHERE</> condition that selects the data to be dumped. + the second argument of <function>pg_extension_config_dump</function> provides + a <literal>WHERE</literal> condition that selects the data to be dumped. For example, you might do <programlisting> CREATE TABLE my_config (key text, value text, standard_entry boolean); SELECT pg_catalog.pg_extension_config_dump('my_config', 'WHERE NOT standard_entry'); </programlisting> - and then make sure that <structfield>standard_entry</> is true only + and then make sure that <structfield>standard_entry</structfield> is true only in the rows created by the extension's script. </para> <para> - For sequences, the second argument of <function>pg_extension_config_dump</> + For sequences, the second argument of <function>pg_extension_config_dump</function> has no effect. </para> @@ -763,10 +763,10 @@ SELECT pg_catalog.pg_extension_config_dump('my_config', 'WHERE NOT standard_entr <para> You can alter the filter condition associated with a configuration table - by calling <function>pg_extension_config_dump</> again. (This would + by calling <function>pg_extension_config_dump</function> again. (This would typically be useful in an extension update script.) The only way to mark a table as no longer a configuration table is to dissociate it from the - extension with <command>ALTER EXTENSION ... DROP TABLE</>. + extension with <command>ALTER EXTENSION ... DROP TABLE</command>. </para> <para> @@ -781,7 +781,7 @@ SELECT pg_catalog.pg_extension_config_dump('my_config', 'WHERE NOT standard_entr </para> <para> - Sequences associated with <type>serial</> or <type>bigserial</> columns + Sequences associated with <type>serial</type> or <type>bigserial</type> columns need to be directly marked to dump their state. Marking their parent relation is not enough for this purpose. </para> @@ -797,20 +797,20 @@ SELECT pg_catalog.pg_extension_config_dump('my_config', 'WHERE NOT standard_entr each released version of the extension's installation script. In addition, if you want users to be able to update their databases dynamically from one version to the next, you should provide - <firstterm>update scripts</> that make the necessary changes to go from + <firstterm>update scripts</firstterm> that make the necessary changes to go from one version to the next. Update scripts have names following the pattern - <literal><replaceable>extension</>--<replaceable>oldversion</>--<replaceable>newversion</>.sql</literal> - (for example, <literal>foo--1.0--1.1.sql</> contains the commands to modify - version <literal>1.0</> of extension <literal>foo</> into version - <literal>1.1</>). + <literal><replaceable>extension</replaceable>--<replaceable>oldversion</replaceable>--<replaceable>newversion</replaceable>.sql</literal> + (for example, <literal>foo--1.0--1.1.sql</literal> contains the commands to modify + version <literal>1.0</literal> of extension <literal>foo</literal> into version + <literal>1.1</literal>). </para> <para> Given that a suitable update script is available, the command - <command>ALTER EXTENSION UPDATE</> will update an installed extension + <command>ALTER EXTENSION UPDATE</command> will update an installed extension to the specified new version. The update script is run in the same - environment that <command>CREATE EXTENSION</> provides for installation - scripts: in particular, <varname>search_path</> is set up in the same + environment that <command>CREATE EXTENSION</command> provides for installation + scripts: in particular, <varname>search_path</varname> is set up in the same way, and any new objects created by the script are automatically added to the extension. Also, if the script chooses to drop extension member objects, they are automatically dissociated from the extension. @@ -824,56 +824,56 @@ SELECT pg_catalog.pg_extension_config_dump('my_config', 'WHERE NOT standard_entr <para> The update mechanism can be used to solve an important special case: - converting a <quote>loose</> collection of objects into an extension. + converting a <quote>loose</quote> collection of objects into an extension. Before the extension mechanism was added to <productname>PostgreSQL</productname> (in 9.1), many people wrote extension modules that simply created assorted unpackaged objects. Given an existing database containing such objects, how can we convert the objects into a properly packaged extension? Dropping them and then - doing a plain <command>CREATE EXTENSION</> is one way, but it's not + doing a plain <command>CREATE EXTENSION</command> is one way, but it's not desirable if the objects have dependencies (for example, if there are table columns of a data type created by the extension). The way to fix this situation is to create an empty extension, then use <command>ALTER - EXTENSION ADD</> to attach each pre-existing object to the extension, + EXTENSION ADD</command> to attach each pre-existing object to the extension, then finally create any new objects that are in the current extension version but were not in the unpackaged release. <command>CREATE - EXTENSION</> supports this case with its <literal>FROM</> <replaceable - class="parameter">old_version</> option, which causes it to not run the + EXTENSION</command> supports this case with its <literal>FROM</literal> <replaceable + class="parameter">old_version</replaceable> option, which causes it to not run the normal installation script for the target version, but instead the update script named - <literal><replaceable>extension</>--<replaceable>old_version</>--<replaceable>target_version</>.sql</literal>. + <literal><replaceable>extension</replaceable>--<replaceable>old_version</replaceable>--<replaceable>target_version</replaceable>.sql</literal>. The choice of the dummy version name to use as <replaceable - class="parameter">old_version</> is up to the extension author, though - <literal>unpackaged</> is a common convention. If you have multiple + class="parameter">old_version</replaceable> is up to the extension author, though + <literal>unpackaged</literal> is a common convention. If you have multiple prior versions you need to be able to update into extension style, use multiple dummy version names to identify them. </para> <para> - <command>ALTER EXTENSION</> is able to execute sequences of update + <command>ALTER EXTENSION</command> is able to execute sequences of update script files to achieve a requested update. For example, if only - <literal>foo--1.0--1.1.sql</> and <literal>foo--1.1--2.0.sql</> are - available, <command>ALTER EXTENSION</> will apply them in sequence if an - update to version <literal>2.0</> is requested when <literal>1.0</> is + <literal>foo--1.0--1.1.sql</literal> and <literal>foo--1.1--2.0.sql</literal> are + available, <command>ALTER EXTENSION</command> will apply them in sequence if an + update to version <literal>2.0</literal> is requested when <literal>1.0</literal> is currently installed. </para> <para> - <productname>PostgreSQL</> doesn't assume anything about the properties - of version names: for example, it does not know whether <literal>1.1</> - follows <literal>1.0</>. It just matches up the available version names + <productname>PostgreSQL</productname> doesn't assume anything about the properties + of version names: for example, it does not know whether <literal>1.1</literal> + follows <literal>1.0</literal>. It just matches up the available version names and follows the path that requires applying the fewest update scripts. (A version name can actually be any string that doesn't contain - <literal>--</> or leading or trailing <literal>-</>.) + <literal>--</literal> or leading or trailing <literal>-</literal>.) </para> <para> - Sometimes it is useful to provide <quote>downgrade</> scripts, for - example <literal>foo--1.1--1.0.sql</> to allow reverting the changes - associated with version <literal>1.1</>. If you do that, be careful + Sometimes it is useful to provide <quote>downgrade</quote> scripts, for + example <literal>foo--1.1--1.0.sql</literal> to allow reverting the changes + associated with version <literal>1.1</literal>. If you do that, be careful of the possibility that a downgrade script might unexpectedly get applied because it yields a shorter path. The risky case is where - there is a <quote>fast path</> update script that jumps ahead several + there is a <quote>fast path</quote> update script that jumps ahead several versions as well as a downgrade script to the fast path's start point. It might take fewer steps to apply the downgrade and then the fast path than to move ahead one version at a time. If the downgrade script @@ -883,14 +883,14 @@ SELECT pg_catalog.pg_extension_config_dump('my_config', 'WHERE NOT standard_entr <para> To check for unexpected update paths, use this command: <programlisting> -SELECT * FROM pg_extension_update_paths('<replaceable>extension_name</>'); +SELECT * FROM pg_extension_update_paths('<replaceable>extension_name</replaceable>'); </programlisting> This shows each pair of distinct known version names for the specified extension, together with the update path sequence that would be taken to - get from the source version to the target version, or <literal>NULL</> if + get from the source version to the target version, or <literal>NULL</literal> if there is no available update path. The path is shown in textual form - with <literal>--</> separators. You can use - <literal>regexp_split_to_array(path,'--')</> if you prefer an array + with <literal>--</literal> separators. You can use + <literal>regexp_split_to_array(path,'--')</literal> if you prefer an array format. </para> </sect2> @@ -901,24 +901,24 @@ SELECT * FROM pg_extension_update_paths('<replaceable>extension_name</>'); <para> An extension that has been around for awhile will probably exist in several versions, for which the author will need to write update scripts. - For example, if you have released a <literal>foo</> extension in - versions <literal>1.0</>, <literal>1.1</>, and <literal>1.2</>, there - should be update scripts <filename>foo--1.0--1.1.sql</> - and <filename>foo--1.1--1.2.sql</>. - Before <productname>PostgreSQL</> 10, it was necessary to also create - new script files <filename>foo--1.1.sql</> and <filename>foo--1.2.sql</> + For example, if you have released a <literal>foo</literal> extension in + versions <literal>1.0</literal>, <literal>1.1</literal>, and <literal>1.2</literal>, there + should be update scripts <filename>foo--1.0--1.1.sql</filename> + and <filename>foo--1.1--1.2.sql</filename>. + Before <productname>PostgreSQL</productname> 10, it was necessary to also create + new script files <filename>foo--1.1.sql</filename> and <filename>foo--1.2.sql</filename> that directly build the newer extension versions, or else the newer versions could not be installed directly, only by - installing <literal>1.0</> and then updating. That was tedious and + installing <literal>1.0</literal> and then updating. That was tedious and duplicative, but now it's unnecessary, because <command>CREATE - EXTENSION</> can follow update chains automatically. + EXTENSION</command> can follow update chains automatically. For example, if only the script - files <filename>foo--1.0.sql</>, <filename>foo--1.0--1.1.sql</>, - and <filename>foo--1.1--1.2.sql</> are available then a request to - install version <literal>1.2</> is honored by running those three + files <filename>foo--1.0.sql</filename>, <filename>foo--1.0--1.1.sql</filename>, + and <filename>foo--1.1--1.2.sql</filename> are available then a request to + install version <literal>1.2</literal> is honored by running those three scripts in sequence. The processing is the same as if you'd first - installed <literal>1.0</> and then updated to <literal>1.2</>. - (As with <command>ALTER EXTENSION UPDATE</>, if multiple pathways are + installed <literal>1.0</literal> and then updated to <literal>1.2</literal>. + (As with <command>ALTER EXTENSION UPDATE</command>, if multiple pathways are available then the shortest is preferred.) Arranging an extension's script files in this style can reduce the amount of maintenance effort needed to produce small updates. @@ -929,10 +929,10 @@ SELECT * FROM pg_extension_update_paths('<replaceable>extension_name</>'); maintained in this style, keep in mind that each version needs a control file even if it has no stand-alone installation script, as that control file will determine how the implicit update to that version is performed. - For example, if <filename>foo--1.0.control</> specifies <literal>requires - = 'bar'</> but <literal>foo</>'s other control files do not, the - extension's dependency on <literal>bar</> will be dropped when updating - from <literal>1.0</> to another version. + For example, if <filename>foo--1.0.control</filename> specifies <literal>requires + = 'bar'</literal> but <literal>foo</literal>'s other control files do not, the + extension's dependency on <literal>bar</literal> will be dropped when updating + from <literal>1.0</literal> to another version. </para> </sect2> @@ -940,14 +940,14 @@ SELECT * FROM pg_extension_update_paths('<replaceable>extension_name</>'); <title>Extension Example</title> <para> - Here is a complete example of an <acronym>SQL</>-only + Here is a complete example of an <acronym>SQL</acronym>-only extension, a two-element composite type that can store any type of value - in its slots, which are named <quote>k</> and <quote>v</>. Non-text + in its slots, which are named <quote>k</quote> and <quote>v</quote>. Non-text values are automatically coerced to text for storage. </para> <para> - The script file <filename>pair--1.0.sql</> looks like this: + The script file <filename>pair--1.0.sql</filename> looks like this: <programlisting><![CDATA[ -- complain if script is sourced in psql, rather than via CREATE EXTENSION @@ -976,7 +976,7 @@ CREATE OPERATOR ~> (LEFTARG = text, RIGHTARG = text, PROCEDURE = pair); </para> <para> - The control file <filename>pair.control</> looks like this: + The control file <filename>pair.control</filename> looks like this: <programlisting> # pair extension @@ -988,7 +988,7 @@ relocatable = true <para> While you hardly need a makefile to install these two files into the - correct directory, you could use a <filename>Makefile</> containing this: + correct directory, you could use a <filename>Makefile</filename> containing this: <programlisting> EXTENSION = pair @@ -1000,9 +1000,9 @@ include $(PGXS) </programlisting> This makefile relies on <acronym>PGXS</acronym>, which is described - in <xref linkend="extend-pgxs">. The command <literal>make install</> + in <xref linkend="extend-pgxs">. The command <literal>make install</literal> will install the control and script files into the correct - directory as reported by <application>pg_config</>. + directory as reported by <application>pg_config</application>. </para> <para> @@ -1022,16 +1022,16 @@ include $(PGXS) <para> If you are thinking about distributing your - <productname>PostgreSQL</> extension modules, setting up a + <productname>PostgreSQL</productname> extension modules, setting up a portable build system for them can be fairly difficult. Therefore - the <productname>PostgreSQL</> installation provides a build + the <productname>PostgreSQL</productname> installation provides a build infrastructure for extensions, called <acronym>PGXS</acronym>, so that simple extension modules can be built simply against an already installed server. <acronym>PGXS</acronym> is mainly intended for extensions that include C code, although it can be used for pure-SQL extensions too. Note that <acronym>PGXS</acronym> is not intended to be a universal build system framework that can be used - to build any software interfacing to <productname>PostgreSQL</>; + to build any software interfacing to <productname>PostgreSQL</productname>; it simply automates common build rules for simple server extension modules. For more complicated packages, you might need to write your own build system. @@ -1115,7 +1115,7 @@ include $(PGXS) <term><varname>MODULEDIR</varname></term> <listitem> <para> - subdirectory of <literal><replaceable>prefix</>/share</literal> + subdirectory of <literal><replaceable>prefix</replaceable>/share</literal> into which DATA and DOCS files should be installed (if not set, default is <literal>extension</literal> if <varname>EXTENSION</varname> is set, @@ -1198,7 +1198,7 @@ include $(PGXS) <term><varname>REGRESS_OPTS</varname></term> <listitem> <para> - additional switches to pass to <application>pg_regress</> + additional switches to pass to <application>pg_regress</application> </para> </listitem> </varlistentry> @@ -1252,10 +1252,10 @@ include $(PGXS) <term><varname>PG_CONFIG</varname></term> <listitem> <para> - path to <application>pg_config</> program for the + path to <application>pg_config</application> program for the <productname>PostgreSQL</productname> installation to build against - (typically just <literal>pg_config</> to use the first one in your - <varname>PATH</>) + (typically just <literal>pg_config</literal> to use the first one in your + <varname>PATH</varname>) </para> </listitem> </varlistentry> @@ -1270,7 +1270,7 @@ include $(PGXS) compiled and installed for the <productname>PostgreSQL</productname> installation that corresponds to the first <command>pg_config</command> program - found in your <varname>PATH</>. You can use a different installation by + found in your <varname>PATH</varname>. You can use a different installation by setting <varname>PG_CONFIG</varname> to point to its <command>pg_config</command> program, either within the makefile or on the <literal>make</literal> command line. @@ -1293,7 +1293,7 @@ make -f /path/to/extension/source/tree/Makefile install <para> Alternatively, you can set up a directory for a VPATH build in a similar way to how it is done for the core code. One way to do this is using the - core script <filename>config/prep_buildtree</>. Once this has been done + core script <filename>config/prep_buildtree</filename>. Once this has been done you can build by setting the <literal>make</literal> variable <varname>VPATH</varname> like this: <programlisting> @@ -1304,18 +1304,18 @@ make VPATH=/path/to/extension/source/tree install </para> <para> - The scripts listed in the <varname>REGRESS</> variable are used for + The scripts listed in the <varname>REGRESS</varname> variable are used for regression testing of your module, which can be invoked by <literal>make - installcheck</literal> after doing <literal>make install</>. For this to + installcheck</literal> after doing <literal>make install</literal>. For this to work you must have a running <productname>PostgreSQL</productname> server. - The script files listed in <varname>REGRESS</> must appear in a + The script files listed in <varname>REGRESS</varname> must appear in a subdirectory named <literal>sql/</literal> in your extension's directory. These files must have extension <literal>.sql</literal>, which must not be included in the <varname>REGRESS</varname> list in the makefile. For each test there should also be a file containing the expected output in a subdirectory named <literal>expected/</literal>, with the same stem and extension <literal>.out</literal>. <literal>make installcheck</literal> - executes each test script with <application>psql</>, and compares the + executes each test script with <application>psql</application>, and compares the resulting output to the matching expected file. Any differences will be written to the file <literal>regression.diffs</literal> in <command>diff -c</command> format. Note that trying to run a test that is missing its diff --git a/doc/src/sgml/external-projects.sgml b/doc/src/sgml/external-projects.sgml index 82eaf4a3554..03fd18aeb80 100644 --- a/doc/src/sgml/external-projects.sgml +++ b/doc/src/sgml/external-projects.sgml @@ -42,7 +42,7 @@ All other language interfaces are external projects and are distributed separately. <xref linkend="language-interface-table"> includes a list of some of these projects. Note that some of these packages might not be - released under the same license as <productname>PostgreSQL</>. For more + released under the same license as <productname>PostgreSQL</productname>. For more information on each language interface, including licensing terms, refer to its website and documentation. </para> @@ -145,8 +145,8 @@ <para> There are several administration tools available for - <productname>PostgreSQL</>. The most popular is - <application><ulink url="http://www.pgadmin.org/">pgAdmin III</ulink></>, + <productname>PostgreSQL</productname>. The most popular is + <application><ulink url="http://www.pgadmin.org/">pgAdmin III</ulink></application>, and there are several commercially available ones as well. </para> </sect1> @@ -172,7 +172,7 @@ and maintained outside the core <productname>PostgreSQL</productname> distribution. <xref linkend="pl-language-table"> lists some of these packages. Note that some of these projects might not be released under the same - license as <productname>PostgreSQL</>. For more information on each + license as <productname>PostgreSQL</productname>. For more information on each procedural language, including licensing information, refer to its website and documentation. </para> @@ -233,17 +233,17 @@ </indexterm> <para> - <productname>PostgreSQL</> is designed to be easily extensible. For + <productname>PostgreSQL</productname> is designed to be easily extensible. For this reason, extensions loaded into the database can function just like features that are built in. The - <filename>contrib/</> directory shipped with the source code + <filename>contrib/</filename> directory shipped with the source code contains several extensions, which are described in <xref linkend="contrib">. Other extensions are developed independently, like <application><ulink - url="http://postgis.net/">PostGIS</ulink></>. Even - <productname>PostgreSQL</> replication solutions can be developed + url="http://postgis.net/">PostGIS</ulink></application>. Even + <productname>PostgreSQL</productname> replication solutions can be developed externally. For example, <application> <ulink - url="http://www.slony.info">Slony-I</ulink></> is a popular + url="http://www.slony.info">Slony-I</ulink></application> is a popular master/standby replication solution that is developed independently from the core project. </para> diff --git a/doc/src/sgml/fdwhandler.sgml b/doc/src/sgml/fdwhandler.sgml index e63e29fd96f..4250a03f16e 100644 --- a/doc/src/sgml/fdwhandler.sgml +++ b/doc/src/sgml/fdwhandler.sgml @@ -21,7 +21,7 @@ <para> The foreign data wrappers included in the standard distribution are good references when trying to write your own. Look into the - <filename>contrib</> subdirectory of the source tree. + <filename>contrib</filename> subdirectory of the source tree. The <xref linkend="sql-createforeigndatawrapper"> reference page also has some useful details. </para> @@ -70,10 +70,10 @@ representing the type of object the options are associated with (in the form of the OID of the system catalog the object would be stored in, either - <literal>ForeignDataWrapperRelationId</>, - <literal>ForeignServerRelationId</>, - <literal>UserMappingRelationId</>, - or <literal>ForeignTableRelationId</>). + <literal>ForeignDataWrapperRelationId</literal>, + <literal>ForeignServerRelationId</literal>, + <literal>UserMappingRelationId</literal>, + or <literal>ForeignTableRelationId</literal>). If no validator function is supplied, options are not checked at object creation time or object alteration time. </para> @@ -84,14 +84,14 @@ <title>Foreign Data Wrapper Callback Routines</title> <para> - The FDW handler function returns a palloc'd <structname>FdwRoutine</> + The FDW handler function returns a palloc'd <structname>FdwRoutine</structname> struct containing pointers to the callback functions described below. The scan-related functions are required, the rest are optional. </para> <para> - The <structname>FdwRoutine</> struct type is declared in - <filename>src/include/foreign/fdwapi.h</>, which see for additional + The <structname>FdwRoutine</structname> struct type is declared in + <filename>src/include/foreign/fdwapi.h</filename>, which see for additional details. </para> @@ -108,20 +108,20 @@ GetForeignRelSize(PlannerInfo *root, Obtain relation size estimates for a foreign table. This is called at the beginning of planning for a query that scans a foreign table. - <literal>root</> is the planner's global information about the query; - <literal>baserel</> is the planner's information about this table; and - <literal>foreigntableid</> is the <structname>pg_class</> OID of the - foreign table. (<literal>foreigntableid</> could be obtained from the + <literal>root</literal> is the planner's global information about the query; + <literal>baserel</literal> is the planner's information about this table; and + <literal>foreigntableid</literal> is the <structname>pg_class</structname> OID of the + foreign table. (<literal>foreigntableid</literal> could be obtained from the planner data structures, but it's passed explicitly to save effort.) </para> <para> - This function should update <literal>baserel->rows</> to be the + This function should update <literal>baserel->rows</literal> to be the expected number of rows returned by the table scan, after accounting for the filtering done by the restriction quals. The initial value of - <literal>baserel->rows</> is just a constant default estimate, which + <literal>baserel->rows</literal> is just a constant default estimate, which should be replaced if at all possible. The function may also choose to - update <literal>baserel->width</> if it can compute a better estimate + update <literal>baserel->width</literal> if it can compute a better estimate of the average result row width. </para> @@ -139,18 +139,18 @@ GetForeignPaths(PlannerInfo *root, Create possible access paths for a scan on a foreign table. This is called during query planning. - The parameters are the same as for <function>GetForeignRelSize</>, + The parameters are the same as for <function>GetForeignRelSize</function>, which has already been called. </para> <para> This function must generate at least one access path - (<structname>ForeignPath</> node) for a scan on the foreign table and - must call <function>add_path</> to add each such path to - <literal>baserel->pathlist</>. It's recommended to use - <function>create_foreignscan_path</> to build the - <structname>ForeignPath</> nodes. The function can generate multiple - access paths, e.g., a path which has valid <literal>pathkeys</> to + (<structname>ForeignPath</structname> node) for a scan on the foreign table and + must call <function>add_path</function> to add each such path to + <literal>baserel->pathlist</literal>. It's recommended to use + <function>create_foreignscan_path</function> to build the + <structname>ForeignPath</structname> nodes. The function can generate multiple + access paths, e.g., a path which has valid <literal>pathkeys</literal> to represent a pre-sorted result. Each access path must contain cost estimates, and can contain any FDW-private information that is needed to identify the specific scan method intended. @@ -172,24 +172,24 @@ GetForeignPlan(PlannerInfo *root, Plan *outer_plan); </programlisting> - Create a <structname>ForeignScan</> plan node from the selected foreign + Create a <structname>ForeignScan</structname> plan node from the selected foreign access path. This is called at the end of query planning. - The parameters are as for <function>GetForeignRelSize</>, plus - the selected <structname>ForeignPath</> (previously produced by - <function>GetForeignPaths</>, <function>GetForeignJoinPaths</>, - or <function>GetForeignUpperPaths</>), + The parameters are as for <function>GetForeignRelSize</function>, plus + the selected <structname>ForeignPath</structname> (previously produced by + <function>GetForeignPaths</function>, <function>GetForeignJoinPaths</function>, + or <function>GetForeignUpperPaths</function>), the target list to be emitted by the plan node, the restriction clauses to be enforced by the plan node, - and the outer subplan of the <structname>ForeignScan</>, - which is used for rechecks performed by <function>RecheckForeignScan</>. + and the outer subplan of the <structname>ForeignScan</structname>, + which is used for rechecks performed by <function>RecheckForeignScan</function>. (If the path is for a join rather than a base - relation, <literal>foreigntableid</> is <literal>InvalidOid</>.) + relation, <literal>foreigntableid</literal> is <literal>InvalidOid</literal>.) </para> <para> - This function must create and return a <structname>ForeignScan</> plan - node; it's recommended to use <function>make_foreignscan</> to build the - <structname>ForeignScan</> node. + This function must create and return a <structname>ForeignScan</structname> plan + node; it's recommended to use <function>make_foreignscan</function> to build the + <structname>ForeignScan</structname> node. </para> <para> @@ -206,22 +206,22 @@ BeginForeignScan(ForeignScanState *node, Begin executing a foreign scan. This is called during executor startup. It should perform any initialization needed before the scan can start, but not start executing the actual scan (that should be done upon the - first call to <function>IterateForeignScan</>). - The <structname>ForeignScanState</> node has already been created, but - its <structfield>fdw_state</> field is still NULL. Information about + first call to <function>IterateForeignScan</function>). + The <structname>ForeignScanState</structname> node has already been created, but + its <structfield>fdw_state</structfield> field is still NULL. Information about the table to scan is accessible through the - <structname>ForeignScanState</> node (in particular, from the underlying - <structname>ForeignScan</> plan node, which contains any FDW-private - information provided by <function>GetForeignPlan</>). - <literal>eflags</> contains flag bits describing the executor's + <structname>ForeignScanState</structname> node (in particular, from the underlying + <structname>ForeignScan</structname> plan node, which contains any FDW-private + information provided by <function>GetForeignPlan</function>). + <literal>eflags</literal> contains flag bits describing the executor's operating mode for this plan node. </para> <para> - Note that when <literal>(eflags & EXEC_FLAG_EXPLAIN_ONLY)</> is + Note that when <literal>(eflags & EXEC_FLAG_EXPLAIN_ONLY)</literal> is true, this function should not perform any externally-visible actions; it should only do the minimum required to make the node state valid - for <function>ExplainForeignScan</> and <function>EndForeignScan</>. + for <function>ExplainForeignScan</function> and <function>EndForeignScan</function>. </para> <para> @@ -231,22 +231,22 @@ IterateForeignScan(ForeignScanState *node); </programlisting> Fetch one row from the foreign source, returning it in a tuple table slot - (the node's <structfield>ScanTupleSlot</> should be used for this + (the node's <structfield>ScanTupleSlot</structfield> should be used for this purpose). Return NULL if no more rows are available. The tuple table slot infrastructure allows either a physical or virtual tuple to be returned; in most cases the latter choice is preferable from a performance standpoint. Note that this is called in a short-lived memory context that will be reset between invocations. Create a memory context - in <function>BeginForeignScan</> if you need longer-lived storage, or use - the <structfield>es_query_cxt</> of the node's <structname>EState</>. + in <function>BeginForeignScan</function> if you need longer-lived storage, or use + the <structfield>es_query_cxt</structfield> of the node's <structname>EState</structname>. </para> <para> - The rows returned must match the <structfield>fdw_scan_tlist</> target + The rows returned must match the <structfield>fdw_scan_tlist</structfield> target list if one was supplied, otherwise they must match the row type of the foreign table being scanned. If you choose to optimize away fetching columns that are not needed, you should insert nulls in those column - positions, or else generate a <structfield>fdw_scan_tlist</> list with + positions, or else generate a <structfield>fdw_scan_tlist</structfield> list with those columns omitted. </para> @@ -307,11 +307,11 @@ GetForeignJoinPaths(PlannerInfo *root, Create possible access paths for a join of two (or more) foreign tables that all belong to the same foreign server. This optional function is called during query planning. As - with <function>GetForeignPaths</>, this function should - generate <structname>ForeignPath</> path(s) for the - supplied <literal>joinrel</>, and call <function>add_path</> to add these + with <function>GetForeignPaths</function>, this function should + generate <structname>ForeignPath</structname> path(s) for the + supplied <literal>joinrel</literal>, and call <function>add_path</function> to add these paths to the set of paths considered for the join. But unlike - <function>GetForeignPaths</>, it is not necessary that this function + <function>GetForeignPaths</function>, it is not necessary that this function succeed in creating at least one path, since paths involving local joining are always possible. </para> @@ -323,20 +323,20 @@ GetForeignJoinPaths(PlannerInfo *root, </para> <para> - If a <structname>ForeignPath</> path is chosen for the join, it will + If a <structname>ForeignPath</structname> path is chosen for the join, it will represent the entire join process; paths generated for the component tables and subsidiary joins will not be used. Subsequent processing of the join path proceeds much as it does for a path scanning a single - foreign table. One difference is that the <structfield>scanrelid</> of - the resulting <structname>ForeignScan</> plan node should be set to zero, + foreign table. One difference is that the <structfield>scanrelid</structfield> of + the resulting <structname>ForeignScan</structname> plan node should be set to zero, since there is no single relation that it represents; instead, - the <structfield>fs_relids</> field of the <structname>ForeignScan</> + the <structfield>fs_relids</structfield> field of the <structname>ForeignScan</structname> node represents the set of relations that were joined. (The latter field is set up automatically by the core planner code, and need not be filled by the FDW.) Another difference is that, because the column list for a remote join cannot be found from the system catalogs, the FDW must - fill <structfield>fdw_scan_tlist</> with an appropriate list - of <structfield>TargetEntry</> nodes, representing the set of columns + fill <structfield>fdw_scan_tlist</structfield> with an appropriate list + of <structfield>TargetEntry</structfield> nodes, representing the set of columns it will supply at run time in the tuples it returns. </para> @@ -361,27 +361,27 @@ GetForeignUpperPaths(PlannerInfo *root, RelOptInfo *input_rel, RelOptInfo *output_rel); </programlisting> - Create possible access paths for <firstterm>upper relation</> processing, + Create possible access paths for <firstterm>upper relation</firstterm> processing, which is the planner's term for all post-scan/join query processing, such as aggregation, window functions, sorting, and table updates. This optional function is called during query planning. Currently, it is called only if all base relation(s) involved in the query belong to the - same FDW. This function should generate <structname>ForeignPath</> + same FDW. This function should generate <structname>ForeignPath</structname> path(s) for any post-scan/join processing that the FDW knows how to - perform remotely, and call <function>add_path</> to add these paths to - the indicated upper relation. As with <function>GetForeignJoinPaths</>, + perform remotely, and call <function>add_path</function> to add these paths to + the indicated upper relation. As with <function>GetForeignJoinPaths</function>, it is not necessary that this function succeed in creating any paths, since paths involving local processing are always possible. </para> <para> - The <literal>stage</> parameter identifies which post-scan/join step is - currently being considered. <literal>output_rel</> is the upper relation + The <literal>stage</literal> parameter identifies which post-scan/join step is + currently being considered. <literal>output_rel</literal> is the upper relation that should receive paths representing computation of this step, - and <literal>input_rel</> is the relation representing the input to this - step. (Note that <structname>ForeignPath</> paths added - to <literal>output_rel</> would typically not have any direct dependency - on paths of the <literal>input_rel</>, since their processing is expected + and <literal>input_rel</literal> is the relation representing the input to this + step. (Note that <structname>ForeignPath</structname> paths added + to <literal>output_rel</literal> would typically not have any direct dependency + on paths of the <literal>input_rel</literal>, since their processing is expected to be done externally. However, examining paths previously generated for the previous processing step can be useful to avoid redundant planning work.) @@ -409,25 +409,25 @@ AddForeignUpdateTargets(Query *parsetree, Relation target_relation); </programlisting> - <command>UPDATE</> and <command>DELETE</> operations are performed + <command>UPDATE</command> and <command>DELETE</command> operations are performed against rows previously fetched by the table-scanning functions. The FDW may need extra information, such as a row ID or the values of primary-key columns, to ensure that it can identify the exact row to update or delete. To support that, this function can add extra hidden, - or <quote>junk</>, target columns to the list of columns that are to be - retrieved from the foreign table during an <command>UPDATE</> or - <command>DELETE</>. + or <quote>junk</quote>, target columns to the list of columns that are to be + retrieved from the foreign table during an <command>UPDATE</command> or + <command>DELETE</command>. </para> <para> - To do that, add <structname>TargetEntry</> items to - <literal>parsetree->targetList</>, containing expressions for the + To do that, add <structname>TargetEntry</structname> items to + <literal>parsetree->targetList</literal>, containing expressions for the extra values to be fetched. Each such entry must be marked - <structfield>resjunk</> = <literal>true</>, and must have a distinct - <structfield>resname</> that will identify it at execution time. - Avoid using names matching <literal>ctid<replaceable>N</></literal>, + <structfield>resjunk</structfield> = <literal>true</literal>, and must have a distinct + <structfield>resname</structfield> that will identify it at execution time. + Avoid using names matching <literal>ctid<replaceable>N</replaceable></literal>, <literal>wholerow</literal>, or - <literal>wholerow<replaceable>N</></literal>, as the core system can + <literal>wholerow<replaceable>N</replaceable></literal>, as the core system can generate junk columns of these names. </para> @@ -435,16 +435,16 @@ AddForeignUpdateTargets(Query *parsetree, This function is called in the rewriter, not the planner, so the information available is a bit different from that available to the planning routines. - <literal>parsetree</> is the parse tree for the <command>UPDATE</> or - <command>DELETE</> command, while <literal>target_rte</> and - <literal>target_relation</> describe the target foreign table. + <literal>parsetree</literal> is the parse tree for the <command>UPDATE</command> or + <command>DELETE</command> command, while <literal>target_rte</literal> and + <literal>target_relation</literal> describe the target foreign table. </para> <para> - If the <function>AddForeignUpdateTargets</> pointer is set to - <literal>NULL</>, no extra target expressions are added. - (This will make it impossible to implement <command>DELETE</> - operations, though <command>UPDATE</> may still be feasible if the FDW + If the <function>AddForeignUpdateTargets</function> pointer is set to + <literal>NULL</literal>, no extra target expressions are added. + (This will make it impossible to implement <command>DELETE</command> + operations, though <command>UPDATE</command> may still be feasible if the FDW relies on an unchanging primary key to identify rows.) </para> @@ -459,21 +459,21 @@ PlanForeignModify(PlannerInfo *root, Perform any additional planning actions needed for an insert, update, or delete on a foreign table. This function generates the FDW-private - information that will be attached to the <structname>ModifyTable</> plan + information that will be attached to the <structname>ModifyTable</structname> plan node that performs the update action. This private information must - have the form of a <literal>List</>, and will be delivered to - <function>BeginForeignModify</> during the execution stage. + have the form of a <literal>List</literal>, and will be delivered to + <function>BeginForeignModify</function> during the execution stage. </para> <para> - <literal>root</> is the planner's global information about the query. - <literal>plan</> is the <structname>ModifyTable</> plan node, which is - complete except for the <structfield>fdwPrivLists</> field. - <literal>resultRelation</> identifies the target foreign table by its - range table index. <literal>subplan_index</> identifies which target of - the <structname>ModifyTable</> plan node this is, counting from zero; - use this if you want to index into <literal>plan->plans</> or other - substructure of the <literal>plan</> node. + <literal>root</literal> is the planner's global information about the query. + <literal>plan</literal> is the <structname>ModifyTable</structname> plan node, which is + complete except for the <structfield>fdwPrivLists</structfield> field. + <literal>resultRelation</literal> identifies the target foreign table by its + range table index. <literal>subplan_index</literal> identifies which target of + the <structname>ModifyTable</structname> plan node this is, counting from zero; + use this if you want to index into <literal>plan->plans</literal> or other + substructure of the <literal>plan</literal> node. </para> <para> @@ -481,10 +481,10 @@ PlanForeignModify(PlannerInfo *root, </para> <para> - If the <function>PlanForeignModify</> pointer is set to - <literal>NULL</>, no additional plan-time actions are taken, and the - <literal>fdw_private</> list delivered to - <function>BeginForeignModify</> will be NIL. + If the <function>PlanForeignModify</function> pointer is set to + <literal>NULL</literal>, no additional plan-time actions are taken, and the + <literal>fdw_private</literal> list delivered to + <function>BeginForeignModify</function> will be NIL. </para> <para> @@ -500,37 +500,37 @@ BeginForeignModify(ModifyTableState *mtstate, Begin executing a foreign table modification operation. This routine is called during executor startup. It should perform any initialization needed prior to the actual table modifications. Subsequently, - <function>ExecForeignInsert</>, <function>ExecForeignUpdate</> or - <function>ExecForeignDelete</> will be called for each tuple to be + <function>ExecForeignInsert</function>, <function>ExecForeignUpdate</function> or + <function>ExecForeignDelete</function> will be called for each tuple to be inserted, updated, or deleted. </para> <para> - <literal>mtstate</> is the overall state of the - <structname>ModifyTable</> plan node being executed; global data about + <literal>mtstate</literal> is the overall state of the + <structname>ModifyTable</structname> plan node being executed; global data about the plan and execution state is available via this structure. - <literal>rinfo</> is the <structname>ResultRelInfo</> struct describing - the target foreign table. (The <structfield>ri_FdwState</> field of - <structname>ResultRelInfo</> is available for the FDW to store any + <literal>rinfo</literal> is the <structname>ResultRelInfo</structname> struct describing + the target foreign table. (The <structfield>ri_FdwState</structfield> field of + <structname>ResultRelInfo</structname> is available for the FDW to store any private state it needs for this operation.) - <literal>fdw_private</> contains the private data generated by - <function>PlanForeignModify</>, if any. - <literal>subplan_index</> identifies which target of - the <structname>ModifyTable</> plan node this is. - <literal>eflags</> contains flag bits describing the executor's + <literal>fdw_private</literal> contains the private data generated by + <function>PlanForeignModify</function>, if any. + <literal>subplan_index</literal> identifies which target of + the <structname>ModifyTable</structname> plan node this is. + <literal>eflags</literal> contains flag bits describing the executor's operating mode for this plan node. </para> <para> - Note that when <literal>(eflags & EXEC_FLAG_EXPLAIN_ONLY)</> is + Note that when <literal>(eflags & EXEC_FLAG_EXPLAIN_ONLY)</literal> is true, this function should not perform any externally-visible actions; it should only do the minimum required to make the node state valid - for <function>ExplainForeignModify</> and <function>EndForeignModify</>. + for <function>ExplainForeignModify</function> and <function>EndForeignModify</function>. </para> <para> - If the <function>BeginForeignModify</> pointer is set to - <literal>NULL</>, no action is taken during executor startup. + If the <function>BeginForeignModify</function> pointer is set to + <literal>NULL</literal>, no action is taken during executor startup. </para> <para> @@ -543,16 +543,16 @@ ExecForeignInsert(EState *estate, </programlisting> Insert one tuple into the foreign table. - <literal>estate</> is global execution state for the query. - <literal>rinfo</> is the <structname>ResultRelInfo</> struct describing + <literal>estate</literal> is global execution state for the query. + <literal>rinfo</literal> is the <structname>ResultRelInfo</structname> struct describing the target foreign table. - <literal>slot</> contains the tuple to be inserted; it will match the + <literal>slot</literal> contains the tuple to be inserted; it will match the row-type definition of the foreign table. - <literal>planSlot</> contains the tuple that was generated by the - <structname>ModifyTable</> plan node's subplan; it differs from - <literal>slot</> in possibly containing additional <quote>junk</> - columns. (The <literal>planSlot</> is typically of little interest - for <command>INSERT</> cases, but is provided for completeness.) + <literal>planSlot</literal> contains the tuple that was generated by the + <structname>ModifyTable</structname> plan node's subplan; it differs from + <literal>slot</literal> in possibly containing additional <quote>junk</quote> + columns. (The <literal>planSlot</literal> is typically of little interest + for <command>INSERT</command> cases, but is provided for completeness.) </para> <para> @@ -560,22 +560,22 @@ ExecForeignInsert(EState *estate, inserted (this might differ from the data supplied, for example as a result of trigger actions), or NULL if no row was actually inserted (again, typically as a result of triggers). The passed-in - <literal>slot</> can be re-used for this purpose. + <literal>slot</literal> can be re-used for this purpose. </para> <para> - The data in the returned slot is used only if the <command>INSERT</> - query has a <literal>RETURNING</> clause or the foreign table has - an <literal>AFTER ROW</> trigger. Triggers require all columns, but the + The data in the returned slot is used only if the <command>INSERT</command> + query has a <literal>RETURNING</literal> clause or the foreign table has + an <literal>AFTER ROW</literal> trigger. Triggers require all columns, but the FDW could choose to optimize away returning some or all columns depending - on the contents of the <literal>RETURNING</> clause. Regardless, some + on the contents of the <literal>RETURNING</literal> clause. Regardless, some slot must be returned to indicate success, or the query's reported row count will be wrong. </para> <para> - If the <function>ExecForeignInsert</> pointer is set to - <literal>NULL</>, attempts to insert into the foreign table will fail + If the <function>ExecForeignInsert</function> pointer is set to + <literal>NULL</literal>, attempts to insert into the foreign table will fail with an error message. </para> @@ -589,16 +589,16 @@ ExecForeignUpdate(EState *estate, </programlisting> Update one tuple in the foreign table. - <literal>estate</> is global execution state for the query. - <literal>rinfo</> is the <structname>ResultRelInfo</> struct describing + <literal>estate</literal> is global execution state for the query. + <literal>rinfo</literal> is the <structname>ResultRelInfo</structname> struct describing the target foreign table. - <literal>slot</> contains the new data for the tuple; it will match the + <literal>slot</literal> contains the new data for the tuple; it will match the row-type definition of the foreign table. - <literal>planSlot</> contains the tuple that was generated by the - <structname>ModifyTable</> plan node's subplan; it differs from - <literal>slot</> in possibly containing additional <quote>junk</> + <literal>planSlot</literal> contains the tuple that was generated by the + <structname>ModifyTable</structname> plan node's subplan; it differs from + <literal>slot</literal> in possibly containing additional <quote>junk</quote> columns. In particular, any junk columns that were requested by - <function>AddForeignUpdateTargets</> will be available from this slot. + <function>AddForeignUpdateTargets</function> will be available from this slot. </para> <para> @@ -606,22 +606,22 @@ ExecForeignUpdate(EState *estate, updated (this might differ from the data supplied, for example as a result of trigger actions), or NULL if no row was actually updated (again, typically as a result of triggers). The passed-in - <literal>slot</> can be re-used for this purpose. + <literal>slot</literal> can be re-used for this purpose. </para> <para> - The data in the returned slot is used only if the <command>UPDATE</> - query has a <literal>RETURNING</> clause or the foreign table has - an <literal>AFTER ROW</> trigger. Triggers require all columns, but the + The data in the returned slot is used only if the <command>UPDATE</command> + query has a <literal>RETURNING</literal> clause or the foreign table has + an <literal>AFTER ROW</literal> trigger. Triggers require all columns, but the FDW could choose to optimize away returning some or all columns depending - on the contents of the <literal>RETURNING</> clause. Regardless, some + on the contents of the <literal>RETURNING</literal> clause. Regardless, some slot must be returned to indicate success, or the query's reported row count will be wrong. </para> <para> - If the <function>ExecForeignUpdate</> pointer is set to - <literal>NULL</>, attempts to update the foreign table will fail + If the <function>ExecForeignUpdate</function> pointer is set to + <literal>NULL</literal>, attempts to update the foreign table will fail with an error message. </para> @@ -635,37 +635,37 @@ ExecForeignDelete(EState *estate, </programlisting> Delete one tuple from the foreign table. - <literal>estate</> is global execution state for the query. - <literal>rinfo</> is the <structname>ResultRelInfo</> struct describing + <literal>estate</literal> is global execution state for the query. + <literal>rinfo</literal> is the <structname>ResultRelInfo</structname> struct describing the target foreign table. - <literal>slot</> contains nothing useful upon call, but can be used to + <literal>slot</literal> contains nothing useful upon call, but can be used to hold the returned tuple. - <literal>planSlot</> contains the tuple that was generated by the - <structname>ModifyTable</> plan node's subplan; in particular, it will + <literal>planSlot</literal> contains the tuple that was generated by the + <structname>ModifyTable</structname> plan node's subplan; in particular, it will carry any junk columns that were requested by - <function>AddForeignUpdateTargets</>. The junk column(s) must be used + <function>AddForeignUpdateTargets</function>. The junk column(s) must be used to identify the tuple to be deleted. </para> <para> The return value is either a slot containing the row that was deleted, or NULL if no row was deleted (typically as a result of triggers). The - passed-in <literal>slot</> can be used to hold the tuple to be returned. + passed-in <literal>slot</literal> can be used to hold the tuple to be returned. </para> <para> - The data in the returned slot is used only if the <command>DELETE</> - query has a <literal>RETURNING</> clause or the foreign table has - an <literal>AFTER ROW</> trigger. Triggers require all columns, but the + The data in the returned slot is used only if the <command>DELETE</command> + query has a <literal>RETURNING</literal> clause or the foreign table has + an <literal>AFTER ROW</literal> trigger. Triggers require all columns, but the FDW could choose to optimize away returning some or all columns depending - on the contents of the <literal>RETURNING</> clause. Regardless, some + on the contents of the <literal>RETURNING</literal> clause. Regardless, some slot must be returned to indicate success, or the query's reported row count will be wrong. </para> <para> - If the <function>ExecForeignDelete</> pointer is set to - <literal>NULL</>, attempts to delete from the foreign table will fail + If the <function>ExecForeignDelete</function> pointer is set to + <literal>NULL</literal>, attempts to delete from the foreign table will fail with an error message. </para> @@ -682,8 +682,8 @@ EndForeignModify(EState *estate, </para> <para> - If the <function>EndForeignModify</> pointer is set to - <literal>NULL</>, no action is taken during executor shutdown. + If the <function>EndForeignModify</function> pointer is set to + <literal>NULL</literal>, no action is taken during executor shutdown. </para> <para> @@ -695,22 +695,22 @@ IsForeignRelUpdatable(Relation rel); Report which update operations the specified foreign table supports. The return value should be a bit mask of rule event numbers indicating which operations are supported by the foreign table, using the - <literal>CmdType</> enumeration; that is, - <literal>(1 << CMD_UPDATE) = 4</> for <command>UPDATE</>, - <literal>(1 << CMD_INSERT) = 8</> for <command>INSERT</>, and - <literal>(1 << CMD_DELETE) = 16</> for <command>DELETE</>. + <literal>CmdType</literal> enumeration; that is, + <literal>(1 << CMD_UPDATE) = 4</literal> for <command>UPDATE</command>, + <literal>(1 << CMD_INSERT) = 8</literal> for <command>INSERT</command>, and + <literal>(1 << CMD_DELETE) = 16</literal> for <command>DELETE</command>. </para> <para> - If the <function>IsForeignRelUpdatable</> pointer is set to - <literal>NULL</>, foreign tables are assumed to be insertable, updatable, - or deletable if the FDW provides <function>ExecForeignInsert</>, - <function>ExecForeignUpdate</>, or <function>ExecForeignDelete</> + If the <function>IsForeignRelUpdatable</function> pointer is set to + <literal>NULL</literal>, foreign tables are assumed to be insertable, updatable, + or deletable if the FDW provides <function>ExecForeignInsert</function>, + <function>ExecForeignUpdate</function>, or <function>ExecForeignDelete</function> respectively. This function is only needed if the FDW supports some tables that are updatable and some that are not. (Even then, it's permissible to throw an error in the execution routine instead of checking in this function. However, this function is used to determine - updatability for display in the <literal>information_schema</> views.) + updatability for display in the <literal>information_schema</literal> views.) </para> <para> @@ -736,26 +736,26 @@ PlanDirectModify(PlannerInfo *root, </programlisting> Decide whether it is safe to execute a direct modification - on the remote server. If so, return <literal>true</> after performing - planning actions needed for that. Otherwise, return <literal>false</>. + on the remote server. If so, return <literal>true</literal> after performing + planning actions needed for that. Otherwise, return <literal>false</literal>. This optional function is called during query planning. - If this function succeeds, <function>BeginDirectModify</>, - <function>IterateDirectModify</> and <function>EndDirectModify</> will + If this function succeeds, <function>BeginDirectModify</function>, + <function>IterateDirectModify</function> and <function>EndDirectModify</function> will be called at the execution stage, instead. Otherwise, the table modification will be executed using the table-updating functions described above. - The parameters are the same as for <function>PlanForeignModify</>. + The parameters are the same as for <function>PlanForeignModify</function>. </para> <para> To execute the direct modification on the remote server, this function - must rewrite the target subplan with a <structname>ForeignScan</> plan + must rewrite the target subplan with a <structname>ForeignScan</structname> plan node that executes the direct modification on the remote server. The - <structfield>operation</> field of the <structname>ForeignScan</> must - be set to the <literal>CmdType</> enumeration appropriately; that is, - <literal>CMD_UPDATE</> for <command>UPDATE</>, - <literal>CMD_INSERT</> for <command>INSERT</>, and - <literal>CMD_DELETE</> for <command>DELETE</>. + <structfield>operation</structfield> field of the <structname>ForeignScan</structname> must + be set to the <literal>CmdType</literal> enumeration appropriately; that is, + <literal>CMD_UPDATE</literal> for <command>UPDATE</command>, + <literal>CMD_INSERT</literal> for <command>INSERT</command>, and + <literal>CMD_DELETE</literal> for <command>DELETE</command>. </para> <para> @@ -763,8 +763,8 @@ PlanDirectModify(PlannerInfo *root, </para> <para> - If the <function>PlanDirectModify</> pointer is set to - <literal>NULL</>, no attempts to execute a direct modification on the + If the <function>PlanDirectModify</function> pointer is set to + <literal>NULL</literal>, no attempts to execute a direct modification on the remote server are taken. </para> @@ -778,27 +778,27 @@ BeginDirectModify(ForeignScanState *node, Prepare to execute a direct modification on the remote server. This is called during executor startup. It should perform any initialization needed prior to the direct modification (that should be - done upon the first call to <function>IterateDirectModify</>). - The <structname>ForeignScanState</> node has already been created, but - its <structfield>fdw_state</> field is still NULL. Information about + done upon the first call to <function>IterateDirectModify</function>). + The <structname>ForeignScanState</structname> node has already been created, but + its <structfield>fdw_state</structfield> field is still NULL. Information about the table to modify is accessible through the - <structname>ForeignScanState</> node (in particular, from the underlying - <structname>ForeignScan</> plan node, which contains any FDW-private - information provided by <function>PlanDirectModify</>). - <literal>eflags</> contains flag bits describing the executor's + <structname>ForeignScanState</structname> node (in particular, from the underlying + <structname>ForeignScan</structname> plan node, which contains any FDW-private + information provided by <function>PlanDirectModify</function>). + <literal>eflags</literal> contains flag bits describing the executor's operating mode for this plan node. </para> <para> - Note that when <literal>(eflags & EXEC_FLAG_EXPLAIN_ONLY)</> is + Note that when <literal>(eflags & EXEC_FLAG_EXPLAIN_ONLY)</literal> is true, this function should not perform any externally-visible actions; it should only do the minimum required to make the node state valid - for <function>ExplainDirectModify</> and <function>EndDirectModify</>. + for <function>ExplainDirectModify</function> and <function>EndDirectModify</function>. </para> <para> - If the <function>BeginDirectModify</> pointer is set to - <literal>NULL</>, no attempts to execute a direct modification on the + If the <function>BeginDirectModify</function> pointer is set to + <literal>NULL</literal>, no attempts to execute a direct modification on the remote server are taken. </para> @@ -808,43 +808,43 @@ TupleTableSlot * IterateDirectModify(ForeignScanState *node); </programlisting> - When the <command>INSERT</>, <command>UPDATE</> or <command>DELETE</> - query doesn't have a <literal>RETURNING</> clause, just return NULL + When the <command>INSERT</command>, <command>UPDATE</command> or <command>DELETE</command> + query doesn't have a <literal>RETURNING</literal> clause, just return NULL after a direct modification on the remote server. When the query has the clause, fetch one result containing the data - needed for the <literal>RETURNING</> calculation, returning it in a - tuple table slot (the node's <structfield>ScanTupleSlot</> should be + needed for the <literal>RETURNING</literal> calculation, returning it in a + tuple table slot (the node's <structfield>ScanTupleSlot</structfield> should be used for this purpose). The data that was actually inserted, updated or deleted must be stored in the - <literal>es_result_relation_info->ri_projectReturning->pi_exprContext->ecxt_scantuple</> - of the node's <structname>EState</>. + <literal>es_result_relation_info->ri_projectReturning->pi_exprContext->ecxt_scantuple</literal> + of the node's <structname>EState</structname>. Return NULL if no more rows are available. Note that this is called in a short-lived memory context that will be reset between invocations. Create a memory context in - <function>BeginDirectModify</> if you need longer-lived storage, or use - the <structfield>es_query_cxt</> of the node's <structname>EState</>. + <function>BeginDirectModify</function> if you need longer-lived storage, or use + the <structfield>es_query_cxt</structfield> of the node's <structname>EState</structname>. </para> <para> - The rows returned must match the <structfield>fdw_scan_tlist</> target + The rows returned must match the <structfield>fdw_scan_tlist</structfield> target list if one was supplied, otherwise they must match the row type of the foreign table being updated. If you choose to optimize away fetching - columns that are not needed for the <literal>RETURNING</> calculation, + columns that are not needed for the <literal>RETURNING</literal> calculation, you should insert nulls in those column positions, or else generate a - <structfield>fdw_scan_tlist</> list with those columns omitted. + <structfield>fdw_scan_tlist</structfield> list with those columns omitted. </para> <para> Whether the query has the clause or not, the query's reported row count must be incremented by the FDW itself. When the query doesn't have the clause, the FDW must also increment the row count for the - <structname>ForeignScanState</> node in the <command>EXPLAIN ANALYZE</> + <structname>ForeignScanState</structname> node in the <command>EXPLAIN ANALYZE</command> case. </para> <para> - If the <function>IterateDirectModify</> pointer is set to - <literal>NULL</>, no attempts to execute a direct modification on the + If the <function>IterateDirectModify</function> pointer is set to + <literal>NULL</literal>, no attempts to execute a direct modification on the remote server are taken. </para> @@ -860,8 +860,8 @@ EndDirectModify(ForeignScanState *node); </para> <para> - If the <function>EndDirectModify</> pointer is set to - <literal>NULL</>, no attempts to execute a direct modification on the + If the <function>EndDirectModify</function> pointer is set to + <literal>NULL</literal>, no attempts to execute a direct modification on the remote server are taken. </para> @@ -871,7 +871,7 @@ EndDirectModify(ForeignScanState *node); <title>FDW Routines For Row Locking</title> <para> - If an FDW wishes to support <firstterm>late row locking</> (as described + If an FDW wishes to support <firstterm>late row locking</firstterm> (as described in <xref linkend="fdw-row-locking">), it must provide the following callback functions: </para> @@ -884,23 +884,23 @@ GetForeignRowMarkType(RangeTblEntry *rte, </programlisting> Report which row-marking option to use for a foreign table. - <literal>rte</> is the <structname>RangeTblEntry</> node for the table - and <literal>strength</> describes the lock strength requested by the - relevant <literal>FOR UPDATE/SHARE</> clause, if any. The result must be - a member of the <literal>RowMarkType</> enum type. + <literal>rte</literal> is the <structname>RangeTblEntry</structname> node for the table + and <literal>strength</literal> describes the lock strength requested by the + relevant <literal>FOR UPDATE/SHARE</literal> clause, if any. The result must be + a member of the <literal>RowMarkType</literal> enum type. </para> <para> This function is called during query planning for each foreign table that - appears in an <command>UPDATE</>, <command>DELETE</>, or <command>SELECT - FOR UPDATE/SHARE</> query and is not the target of <command>UPDATE</> - or <command>DELETE</>. + appears in an <command>UPDATE</command>, <command>DELETE</command>, or <command>SELECT + FOR UPDATE/SHARE</command> query and is not the target of <command>UPDATE</command> + or <command>DELETE</command>. </para> <para> - If the <function>GetForeignRowMarkType</> pointer is set to - <literal>NULL</>, the <literal>ROW_MARK_COPY</> option is always used. - (This implies that <function>RefetchForeignRow</> will never be called, + If the <function>GetForeignRowMarkType</function> pointer is set to + <literal>NULL</literal>, the <literal>ROW_MARK_COPY</literal> option is always used. + (This implies that <function>RefetchForeignRow</function> will never be called, so it need not be provided either.) </para> @@ -918,48 +918,48 @@ RefetchForeignRow(EState *estate, </programlisting> Re-fetch one tuple from the foreign table, after locking it if required. - <literal>estate</> is global execution state for the query. - <literal>erm</> is the <structname>ExecRowMark</> struct describing + <literal>estate</literal> is global execution state for the query. + <literal>erm</literal> is the <structname>ExecRowMark</structname> struct describing the target foreign table and the row lock type (if any) to acquire. - <literal>rowid</> identifies the tuple to be fetched. - <literal>updated</> is an output parameter. + <literal>rowid</literal> identifies the tuple to be fetched. + <literal>updated</literal> is an output parameter. </para> <para> This function should return a palloc'ed copy of the fetched tuple, - or <literal>NULL</> if the row lock couldn't be obtained. The row lock - type to acquire is defined by <literal>erm->markType</>, which is the - value previously returned by <function>GetForeignRowMarkType</>. - (<literal>ROW_MARK_REFERENCE</> means to just re-fetch the tuple without - acquiring any lock, and <literal>ROW_MARK_COPY</> will never be seen by + or <literal>NULL</literal> if the row lock couldn't be obtained. The row lock + type to acquire is defined by <literal>erm->markType</literal>, which is the + value previously returned by <function>GetForeignRowMarkType</function>. + (<literal>ROW_MARK_REFERENCE</literal> means to just re-fetch the tuple without + acquiring any lock, and <literal>ROW_MARK_COPY</literal> will never be seen by this routine.) </para> <para> - In addition, <literal>*updated</> should be set to <literal>true</> + In addition, <literal>*updated</literal> should be set to <literal>true</literal> if what was fetched was an updated version of the tuple rather than the same version previously obtained. (If the FDW cannot be sure about - this, always returning <literal>true</> is recommended.) + this, always returning <literal>true</literal> is recommended.) </para> <para> Note that by default, failure to acquire a row lock should result in - raising an error; a <literal>NULL</> return is only appropriate if - the <literal>SKIP LOCKED</> option is specified - by <literal>erm->waitPolicy</>. + raising an error; a <literal>NULL</literal> return is only appropriate if + the <literal>SKIP LOCKED</literal> option is specified + by <literal>erm->waitPolicy</literal>. </para> <para> - The <literal>rowid</> is the <structfield>ctid</> value previously read - for the row to be re-fetched. Although the <literal>rowid</> value is - passed as a <type>Datum</>, it can currently only be a <type>tid</>. The + The <literal>rowid</literal> is the <structfield>ctid</structfield> value previously read + for the row to be re-fetched. Although the <literal>rowid</literal> value is + passed as a <type>Datum</type>, it can currently only be a <type>tid</type>. The function API is chosen in hopes that it may be possible to allow other data types for row IDs in future. </para> <para> - If the <function>RefetchForeignRow</> pointer is set to - <literal>NULL</>, attempts to re-fetch rows will fail + If the <function>RefetchForeignRow</function> pointer is set to + <literal>NULL</literal>, attempts to re-fetch rows will fail with an error message. </para> @@ -976,13 +976,13 @@ RecheckForeignScan(ForeignScanState *node, Recheck that a previously-returned tuple still matches the relevant scan and join qualifiers, and possibly provide a modified version of the tuple. For foreign data wrappers which do not perform join pushdown, - it will typically be more convenient to set this to <literal>NULL</> and + it will typically be more convenient to set this to <literal>NULL</literal> and instead set <structfield>fdw_recheck_quals</structfield> appropriately. When outer joins are pushed down, however, it isn't sufficient to reapply the checks relevant to all the base tables to the result tuple, even if all needed attributes are present, because failure to match some qualifier might result in some attributes going to NULL, rather than in - no tuple being returned. <literal>RecheckForeignScan</> can recheck + no tuple being returned. <literal>RecheckForeignScan</literal> can recheck qualifiers and return true if they are still satisfied and false otherwise, but it can also store a replacement tuple into the supplied slot. @@ -992,13 +992,13 @@ RecheckForeignScan(ForeignScanState *node, To implement join pushdown, a foreign data wrapper will typically construct an alternative local join plan which is used only for rechecks; this will become the outer subplan of the - <literal>ForeignScan</>. When a recheck is required, this subplan + <literal>ForeignScan</literal>. When a recheck is required, this subplan can be executed and the resulting tuple can be stored in the slot. This plan need not be efficient since no base table will return more than one row; for example, it may implement all joins as nested loops. - The function <literal>GetExistingLocalJoinPath</> may be used to search + The function <literal>GetExistingLocalJoinPath</literal> may be used to search existing paths for a suitable local join path, which can be used as the - alternative local join plan. <literal>GetExistingLocalJoinPath</> + alternative local join plan. <literal>GetExistingLocalJoinPath</literal> searches for an unparameterized path in the path list of the specified join relation. (If it does not find such a path, it returns NULL, in which case a foreign data wrapper may build the local path by itself or @@ -1007,7 +1007,7 @@ RecheckForeignScan(ForeignScanState *node, </sect2> <sect2 id="fdw-callbacks-explain"> - <title>FDW Routines for <command>EXPLAIN</></title> + <title>FDW Routines for <command>EXPLAIN</command></title> <para> <programlisting> @@ -1016,19 +1016,19 @@ ExplainForeignScan(ForeignScanState *node, ExplainState *es); </programlisting> - Print additional <command>EXPLAIN</> output for a foreign table scan. - This function can call <function>ExplainPropertyText</> and - related functions to add fields to the <command>EXPLAIN</> output. - The flag fields in <literal>es</> can be used to determine what to - print, and the state of the <structname>ForeignScanState</> node + Print additional <command>EXPLAIN</command> output for a foreign table scan. + This function can call <function>ExplainPropertyText</function> and + related functions to add fields to the <command>EXPLAIN</command> output. + The flag fields in <literal>es</literal> can be used to determine what to + print, and the state of the <structname>ForeignScanState</structname> node can be inspected to provide run-time statistics in the <command>EXPLAIN - ANALYZE</> case. + ANALYZE</command> case. </para> <para> - If the <function>ExplainForeignScan</> pointer is set to - <literal>NULL</>, no additional information is printed during - <command>EXPLAIN</>. + If the <function>ExplainForeignScan</function> pointer is set to + <literal>NULL</literal>, no additional information is printed during + <command>EXPLAIN</command>. </para> <para> @@ -1041,20 +1041,20 @@ ExplainForeignModify(ModifyTableState *mtstate, struct ExplainState *es); </programlisting> - Print additional <command>EXPLAIN</> output for a foreign table update. - This function can call <function>ExplainPropertyText</> and - related functions to add fields to the <command>EXPLAIN</> output. - The flag fields in <literal>es</> can be used to determine what to - print, and the state of the <structname>ModifyTableState</> node + Print additional <command>EXPLAIN</command> output for a foreign table update. + This function can call <function>ExplainPropertyText</function> and + related functions to add fields to the <command>EXPLAIN</command> output. + The flag fields in <literal>es</literal> can be used to determine what to + print, and the state of the <structname>ModifyTableState</structname> node can be inspected to provide run-time statistics in the <command>EXPLAIN - ANALYZE</> case. The first four arguments are the same as for - <function>BeginForeignModify</>. + ANALYZE</command> case. The first four arguments are the same as for + <function>BeginForeignModify</function>. </para> <para> - If the <function>ExplainForeignModify</> pointer is set to - <literal>NULL</>, no additional information is printed during - <command>EXPLAIN</>. + If the <function>ExplainForeignModify</function> pointer is set to + <literal>NULL</literal>, no additional information is printed during + <command>EXPLAIN</command>. </para> <para> @@ -1064,26 +1064,26 @@ ExplainDirectModify(ForeignScanState *node, ExplainState *es); </programlisting> - Print additional <command>EXPLAIN</> output for a direct modification + Print additional <command>EXPLAIN</command> output for a direct modification on the remote server. - This function can call <function>ExplainPropertyText</> and - related functions to add fields to the <command>EXPLAIN</> output. - The flag fields in <literal>es</> can be used to determine what to - print, and the state of the <structname>ForeignScanState</> node + This function can call <function>ExplainPropertyText</function> and + related functions to add fields to the <command>EXPLAIN</command> output. + The flag fields in <literal>es</literal> can be used to determine what to + print, and the state of the <structname>ForeignScanState</structname> node can be inspected to provide run-time statistics in the <command>EXPLAIN - ANALYZE</> case. + ANALYZE</command> case. </para> <para> - If the <function>ExplainDirectModify</> pointer is set to - <literal>NULL</>, no additional information is printed during - <command>EXPLAIN</>. + If the <function>ExplainDirectModify</function> pointer is set to + <literal>NULL</literal>, no additional information is printed during + <command>EXPLAIN</command>. </para> </sect2> <sect2 id="fdw-callbacks-analyze"> - <title>FDW Routines for <command>ANALYZE</></title> + <title>FDW Routines for <command>ANALYZE</command></title> <para> <programlisting> @@ -1095,15 +1095,15 @@ AnalyzeForeignTable(Relation relation, This function is called when <xref linkend="sql-analyze"> is executed on a foreign table. If the FDW can collect statistics for this - foreign table, it should return <literal>true</>, and provide a pointer + foreign table, it should return <literal>true</literal>, and provide a pointer to a function that will collect sample rows from the table in - <parameter>func</>, plus the estimated size of the table in pages in - <parameter>totalpages</>. Otherwise, return <literal>false</>. + <parameter>func</parameter>, plus the estimated size of the table in pages in + <parameter>totalpages</parameter>. Otherwise, return <literal>false</literal>. </para> <para> If the FDW does not support collecting statistics for any tables, the - <function>AnalyzeForeignTable</> pointer can be set to <literal>NULL</>. + <function>AnalyzeForeignTable</function> pointer can be set to <literal>NULL</literal>. </para> <para> @@ -1118,19 +1118,19 @@ AcquireSampleRowsFunc(Relation relation, double *totaldeadrows); </programlisting> - A random sample of up to <parameter>targrows</> rows should be collected - from the table and stored into the caller-provided <parameter>rows</> + A random sample of up to <parameter>targrows</parameter> rows should be collected + from the table and stored into the caller-provided <parameter>rows</parameter> array. The actual number of rows collected must be returned. In addition, store estimates of the total numbers of live and dead rows in - the table into the output parameters <parameter>totalrows</> and - <parameter>totaldeadrows</>. (Set <parameter>totaldeadrows</> to zero + the table into the output parameters <parameter>totalrows</parameter> and + <parameter>totaldeadrows</parameter>. (Set <parameter>totaldeadrows</parameter> to zero if the FDW does not have any concept of dead rows.) </para> </sect2> <sect2 id="fdw-callbacks-import"> - <title>FDW Routines For <command>IMPORT FOREIGN SCHEMA</></title> + <title>FDW Routines For <command>IMPORT FOREIGN SCHEMA</command></title> <para> <programlisting> @@ -1147,44 +1147,44 @@ ImportForeignSchema(ImportForeignSchemaStmt *stmt, Oid serverOid); </para> <para> - Within the <structname>ImportForeignSchemaStmt</> struct, - <structfield>remote_schema</> is the name of the remote schema from + Within the <structname>ImportForeignSchemaStmt</structname> struct, + <structfield>remote_schema</structfield> is the name of the remote schema from which tables are to be imported. - <structfield>list_type</> identifies how to filter table names: - <literal>FDW_IMPORT_SCHEMA_ALL</> means that all tables in the remote - schema should be imported (in this case <structfield>table_list</> is - empty), <literal>FDW_IMPORT_SCHEMA_LIMIT_TO</> means to include only - tables listed in <structfield>table_list</>, - and <literal>FDW_IMPORT_SCHEMA_EXCEPT</> means to exclude the tables - listed in <structfield>table_list</>. - <structfield>options</> is a list of options used for the import process. + <structfield>list_type</structfield> identifies how to filter table names: + <literal>FDW_IMPORT_SCHEMA_ALL</literal> means that all tables in the remote + schema should be imported (in this case <structfield>table_list</structfield> is + empty), <literal>FDW_IMPORT_SCHEMA_LIMIT_TO</literal> means to include only + tables listed in <structfield>table_list</structfield>, + and <literal>FDW_IMPORT_SCHEMA_EXCEPT</literal> means to exclude the tables + listed in <structfield>table_list</structfield>. + <structfield>options</structfield> is a list of options used for the import process. The meanings of the options are up to the FDW. For example, an FDW could use an option to define whether the - <literal>NOT NULL</> attributes of columns should be imported. + <literal>NOT NULL</literal> attributes of columns should be imported. These options need not have anything to do with those supported by the FDW as database object options. </para> <para> - The FDW may ignore the <structfield>local_schema</> field of - the <structname>ImportForeignSchemaStmt</>, because the core server + The FDW may ignore the <structfield>local_schema</structfield> field of + the <structname>ImportForeignSchemaStmt</structname>, because the core server will automatically insert that name into the parsed <command>CREATE - FOREIGN TABLE</> commands. + FOREIGN TABLE</command> commands. </para> <para> The FDW does not have to concern itself with implementing the filtering - specified by <structfield>list_type</> and <structfield>table_list</>, + specified by <structfield>list_type</structfield> and <structfield>table_list</structfield>, either, as the core server will automatically skip any returned commands for tables excluded according to those options. However, it's often useful to avoid the work of creating commands for excluded tables in the - first place. The function <function>IsImportableForeignTable()</> may be + first place. The function <function>IsImportableForeignTable()</function> may be useful to test whether a given foreign-table name will pass the filter. </para> <para> If the FDW does not support importing table definitions, the - <function>ImportForeignSchema</> pointer can be set to <literal>NULL</>. + <function>ImportForeignSchema</function> pointer can be set to <literal>NULL</literal>. </para> </sect2> @@ -1192,8 +1192,8 @@ ImportForeignSchema(ImportForeignSchemaStmt *stmt, Oid serverOid); <sect2 id="fdw-callbacks-parallel"> <title>FDW Routines for Parallel Execution</title> <para> - A <structname>ForeignScan</> node can, optionally, support parallel - execution. A parallel <structname>ForeignScan</> will be executed + A <structname>ForeignScan</structname> node can, optionally, support parallel + execution. A parallel <structname>ForeignScan</structname> will be executed in multiple processes and must return each row exactly once across all cooperating processes. To do this, processes can coordinate through fixed-size chunks of dynamic shared memory. This shared memory is not @@ -1245,8 +1245,8 @@ InitializeDSMForeignScan(ForeignScanState *node, ParallelContext *pcxt, void *coordinate); </programlisting> Initialize the dynamic shared memory that will be required for parallel - operation. <literal>coordinate</> points to a shared memory area of - size equal to the return value of <function>EstimateDSMForeignScan</>. + operation. <literal>coordinate</literal> points to a shared memory area of + size equal to the return value of <function>EstimateDSMForeignScan</function>. This function is optional, and can be omitted if not needed. </para> @@ -1260,9 +1260,9 @@ ReInitializeDSMForeignScan(ForeignScanState *node, ParallelContext *pcxt, when the foreign-scan plan node is about to be re-scanned. This function is optional, and can be omitted if not needed. Recommended practice is that this function reset only shared state, - while the <function>ReScanForeignScan</> function resets only local + while the <function>ReScanForeignScan</function> function resets only local state. Currently, this function will be called - before <function>ReScanForeignScan</>, but it's best not to rely on + before <function>ReScanForeignScan</function>, but it's best not to rely on that ordering. </para> @@ -1273,7 +1273,7 @@ InitializeWorkerForeignScan(ForeignScanState *node, shm_toc *toc, void *coordinate); </programlisting> Initialize a parallel worker's local state based on the shared state - set up by the leader during <function>InitializeDSMForeignScan</>. + set up by the leader during <function>InitializeDSMForeignScan</function>. This function is optional, and can be omitted if not needed. </para> @@ -1284,7 +1284,7 @@ ShutdownForeignScan(ForeignScanState *node); </programlisting> Release resources when it is anticipated the node will not be executed to completion. This is not called in all cases; sometimes, - <literal>EndForeignScan</> may be called without this function having + <literal>EndForeignScan</literal> may be called without this function having been called first. Since the DSM segment used by parallel query is destroyed just after this callback is invoked, foreign data wrappers that wish to take some action before the DSM segment goes away should implement @@ -1302,13 +1302,13 @@ ReparameterizeForeignPathByChild(PlannerInfo *root, List *fdw_private, RelOptInfo *child_rel); </programlisting> This function is called while converting a path parameterized by the - top-most parent of the given child relation <literal>child_rel</> to be + top-most parent of the given child relation <literal>child_rel</literal> to be parameterized by the child relation. The function is used to reparameterize any paths or translate any expression nodes saved in the given - <literal>fdw_private</> member of a <structname>ForeignPath</>. The - callback may use <literal>reparameterize_path_by_child</>, - <literal>adjust_appendrel_attrs</> or - <literal>adjust_appendrel_attrs_multilevel</> as required. + <literal>fdw_private</literal> member of a <structname>ForeignPath</structname>. The + callback may use <literal>reparameterize_path_by_child</literal>, + <literal>adjust_appendrel_attrs</literal> or + <literal>adjust_appendrel_attrs_multilevel</literal> as required. </para> </sect2> @@ -1360,7 +1360,7 @@ GetUserMapping(Oid userid, Oid serverid); This function returns a <structname>UserMapping</structname> object for the user mapping of the given role on the given server. (If there is no mapping for the specific user, it will return the mapping for - <literal>PUBLIC</>, or throw error if there is none.) A + <literal>PUBLIC</literal>, or throw error if there is none.) A <structname>UserMapping</structname> object contains properties of the user mapping (see <filename>foreign/foreign.h</filename> for details). </para> @@ -1423,25 +1423,25 @@ GetForeignServerByName(const char *name, bool missing_ok); <title>Foreign Data Wrapper Query Planning</title> <para> - The FDW callback functions <function>GetForeignRelSize</>, - <function>GetForeignPaths</>, <function>GetForeignPlan</>, - <function>PlanForeignModify</>, <function>GetForeignJoinPaths</>, - <function>GetForeignUpperPaths</>, and <function>PlanDirectModify</> - must fit into the workings of the <productname>PostgreSQL</> planner. + The FDW callback functions <function>GetForeignRelSize</function>, + <function>GetForeignPaths</function>, <function>GetForeignPlan</function>, + <function>PlanForeignModify</function>, <function>GetForeignJoinPaths</function>, + <function>GetForeignUpperPaths</function>, and <function>PlanDirectModify</function> + must fit into the workings of the <productname>PostgreSQL</productname> planner. Here are some notes about what they must do. </para> <para> - The information in <literal>root</> and <literal>baserel</> can be used + The information in <literal>root</literal> and <literal>baserel</literal> can be used to reduce the amount of information that has to be fetched from the foreign table (and therefore reduce the cost). - <literal>baserel->baserestrictinfo</> is particularly interesting, as - it contains restriction quals (<literal>WHERE</> clauses) that should be + <literal>baserel->baserestrictinfo</literal> is particularly interesting, as + it contains restriction quals (<literal>WHERE</literal> clauses) that should be used to filter the rows to be fetched. (The FDW itself is not required to enforce these quals, as the core executor can check them instead.) - <literal>baserel->reltarget->exprs</> can be used to determine which + <literal>baserel->reltarget->exprs</literal> can be used to determine which columns need to be fetched; but note that it only lists columns that - have to be emitted by the <structname>ForeignScan</> plan node, not + have to be emitted by the <structname>ForeignScan</structname> plan node, not columns that are used in qual evaluation but not output by the query. </para> @@ -1452,49 +1452,49 @@ GetForeignServerByName(const char *name, bool missing_ok); </para> <para> - <literal>baserel->fdw_private</> is a <type>void</> pointer that is + <literal>baserel->fdw_private</literal> is a <type>void</type> pointer that is available for FDW planning functions to store information relevant to the particular foreign table. The core planner does not touch it except - to initialize it to NULL when the <literal>RelOptInfo</> node is created. + to initialize it to NULL when the <literal>RelOptInfo</literal> node is created. It is useful for passing information forward from - <function>GetForeignRelSize</> to <function>GetForeignPaths</> and/or - <function>GetForeignPaths</> to <function>GetForeignPlan</>, thereby + <function>GetForeignRelSize</function> to <function>GetForeignPaths</function> and/or + <function>GetForeignPaths</function> to <function>GetForeignPlan</function>, thereby avoiding recalculation. </para> <para> - <function>GetForeignPaths</> can identify the meaning of different + <function>GetForeignPaths</function> can identify the meaning of different access paths by storing private information in the - <structfield>fdw_private</> field of <structname>ForeignPath</> nodes. - <structfield>fdw_private</> is declared as a <type>List</> pointer, but + <structfield>fdw_private</structfield> field of <structname>ForeignPath</structname> nodes. + <structfield>fdw_private</structfield> is declared as a <type>List</type> pointer, but could actually contain anything since the core planner does not touch it. However, best practice is to use a representation that's dumpable - by <function>nodeToString</>, for use with debugging support available + by <function>nodeToString</function>, for use with debugging support available in the backend. </para> <para> - <function>GetForeignPlan</> can examine the <structfield>fdw_private</> - field of the selected <structname>ForeignPath</> node, and can generate - <structfield>fdw_exprs</> and <structfield>fdw_private</> lists to be - placed in the <structname>ForeignScan</> plan node, where they will be + <function>GetForeignPlan</function> can examine the <structfield>fdw_private</structfield> + field of the selected <structname>ForeignPath</structname> node, and can generate + <structfield>fdw_exprs</structfield> and <structfield>fdw_private</structfield> lists to be + placed in the <structname>ForeignScan</structname> plan node, where they will be available at execution time. Both of these lists must be - represented in a form that <function>copyObject</> knows how to copy. - The <structfield>fdw_private</> list has no other restrictions and is + represented in a form that <function>copyObject</function> knows how to copy. + The <structfield>fdw_private</structfield> list has no other restrictions and is not interpreted by the core backend in any way. The - <structfield>fdw_exprs</> list, if not NIL, is expected to contain + <structfield>fdw_exprs</structfield> list, if not NIL, is expected to contain expression trees that are intended to be executed at run time. These trees will undergo post-processing by the planner to make them fully executable. </para> <para> - In <function>GetForeignPlan</>, generally the passed-in target list can - be copied into the plan node as-is. The passed <literal>scan_clauses</> list - contains the same clauses as <literal>baserel->baserestrictinfo</>, + In <function>GetForeignPlan</function>, generally the passed-in target list can + be copied into the plan node as-is. The passed <literal>scan_clauses</literal> list + contains the same clauses as <literal>baserel->baserestrictinfo</literal>, but may be re-ordered for better execution efficiency. In simple cases - the FDW can just strip <structname>RestrictInfo</> nodes from the - <literal>scan_clauses</> list (using <function>extract_actual_clauses</>) and put + the FDW can just strip <structname>RestrictInfo</structname> nodes from the + <literal>scan_clauses</literal> list (using <function>extract_actual_clauses</function>) and put all the clauses into the plan node's qual list, which means that all the clauses will be checked by the executor at run time. More complex FDWs may be able to check some of the clauses internally, in which case those @@ -1504,54 +1504,54 @@ GetForeignServerByName(const char *name, bool missing_ok); <para> As an example, the FDW might identify some restriction clauses of the - form <replaceable>foreign_variable</> <literal>=</> - <replaceable>sub_expression</>, which it determines can be executed on + form <replaceable>foreign_variable</replaceable> <literal>=</literal> + <replaceable>sub_expression</replaceable>, which it determines can be executed on the remote server given the locally-evaluated value of the - <replaceable>sub_expression</>. The actual identification of such a - clause should happen during <function>GetForeignPaths</>, since it would + <replaceable>sub_expression</replaceable>. The actual identification of such a + clause should happen during <function>GetForeignPaths</function>, since it would affect the cost estimate for the path. The path's - <structfield>fdw_private</> field would probably include a pointer to - the identified clause's <structname>RestrictInfo</> node. Then - <function>GetForeignPlan</> would remove that clause from <literal>scan_clauses</>, - but add the <replaceable>sub_expression</> to <structfield>fdw_exprs</> + <structfield>fdw_private</structfield> field would probably include a pointer to + the identified clause's <structname>RestrictInfo</structname> node. Then + <function>GetForeignPlan</function> would remove that clause from <literal>scan_clauses</literal>, + but add the <replaceable>sub_expression</replaceable> to <structfield>fdw_exprs</structfield> to ensure that it gets massaged into executable form. It would probably also put control information into the plan node's - <structfield>fdw_private</> field to tell the execution functions what + <structfield>fdw_private</structfield> field to tell the execution functions what to do at run time. The query transmitted to the remote server would - involve something like <literal>WHERE <replaceable>foreign_variable</> = + involve something like <literal>WHERE <replaceable>foreign_variable</replaceable> = $1</literal>, with the parameter value obtained at run time from - evaluation of the <structfield>fdw_exprs</> expression tree. + evaluation of the <structfield>fdw_exprs</structfield> expression tree. </para> <para> Any clauses removed from the plan node's qual list must instead be added - to <literal>fdw_recheck_quals</> or rechecked by - <literal>RecheckForeignScan</> in order to ensure correct behavior - at the <literal>READ COMMITTED</> isolation level. When a concurrent + to <literal>fdw_recheck_quals</literal> or rechecked by + <literal>RecheckForeignScan</literal> in order to ensure correct behavior + at the <literal>READ COMMITTED</literal> isolation level. When a concurrent update occurs for some other table involved in the query, the executor may need to verify that all of the original quals are still satisfied for the tuple, possibly against a different set of parameter values. Using - <literal>fdw_recheck_quals</> is typically easier than implementing checks - inside <literal>RecheckForeignScan</>, but this method will be + <literal>fdw_recheck_quals</literal> is typically easier than implementing checks + inside <literal>RecheckForeignScan</literal>, but this method will be insufficient when outer joins have been pushed down, since the join tuples in that case might have some fields go to NULL without rejecting the tuple entirely. </para> <para> - Another <structname>ForeignScan</> field that can be filled by FDWs - is <structfield>fdw_scan_tlist</>, which describes the tuples returned by + Another <structname>ForeignScan</structname> field that can be filled by FDWs + is <structfield>fdw_scan_tlist</structfield>, which describes the tuples returned by the FDW for this plan node. For simple foreign table scans this can be - set to <literal>NIL</>, implying that the returned tuples have the + set to <literal>NIL</literal>, implying that the returned tuples have the row type declared for the foreign table. A non-<symbol>NIL</symbol> value must be a - target list (list of <structname>TargetEntry</>s) containing Vars and/or + target list (list of <structname>TargetEntry</structname>s) containing Vars and/or expressions representing the returned columns. This might be used, for example, to show that the FDW has omitted some columns that it noticed won't be needed for the query. Also, if the FDW can compute expressions used by the query more cheaply than can be done locally, it could add - those expressions to <structfield>fdw_scan_tlist</>. Note that join - plans (created from paths made by <function>GetForeignJoinPaths</>) must - always supply <structfield>fdw_scan_tlist</> to describe the set of + those expressions to <structfield>fdw_scan_tlist</structfield>. Note that join + plans (created from paths made by <function>GetForeignJoinPaths</function>) must + always supply <structfield>fdw_scan_tlist</structfield> to describe the set of columns they will return. </para> @@ -1559,87 +1559,87 @@ GetForeignServerByName(const char *name, bool missing_ok); The FDW should always construct at least one path that depends only on the table's restriction clauses. In join queries, it might also choose to construct path(s) that depend on join clauses, for example - <replaceable>foreign_variable</> <literal>=</> - <replaceable>local_variable</>. Such clauses will not be found in - <literal>baserel->baserestrictinfo</> but must be sought in the + <replaceable>foreign_variable</replaceable> <literal>=</literal> + <replaceable>local_variable</replaceable>. Such clauses will not be found in + <literal>baserel->baserestrictinfo</literal> but must be sought in the relation's join lists. A path using such a clause is called a - <quote>parameterized path</>. It must identify the other relations + <quote>parameterized path</quote>. It must identify the other relations used in the selected join clause(s) with a suitable value of - <literal>param_info</>; use <function>get_baserel_parampathinfo</> - to compute that value. In <function>GetForeignPlan</>, the - <replaceable>local_variable</> portion of the join clause would be added - to <structfield>fdw_exprs</>, and then at run time the case works the + <literal>param_info</literal>; use <function>get_baserel_parampathinfo</function> + to compute that value. In <function>GetForeignPlan</function>, the + <replaceable>local_variable</replaceable> portion of the join clause would be added + to <structfield>fdw_exprs</structfield>, and then at run time the case works the same as for an ordinary restriction clause. </para> <para> - If an FDW supports remote joins, <function>GetForeignJoinPaths</> should - produce <structname>ForeignPath</>s for potential remote joins in much - the same way as <function>GetForeignPaths</> works for base tables. + If an FDW supports remote joins, <function>GetForeignJoinPaths</function> should + produce <structname>ForeignPath</structname>s for potential remote joins in much + the same way as <function>GetForeignPaths</function> works for base tables. Information about the intended join can be passed forward - to <function>GetForeignPlan</> in the same ways described above. - However, <structfield>baserestrictinfo</> is not relevant for join + to <function>GetForeignPlan</function> in the same ways described above. + However, <structfield>baserestrictinfo</structfield> is not relevant for join relations; instead, the relevant join clauses for a particular join are - passed to <function>GetForeignJoinPaths</> as a separate parameter - (<literal>extra->restrictlist</>). + passed to <function>GetForeignJoinPaths</function> as a separate parameter + (<literal>extra->restrictlist</literal>). </para> <para> An FDW might additionally support direct execution of some plan actions that are above the level of scans and joins, such as grouping or aggregation. To offer such options, the FDW should generate paths and - insert them into the appropriate <firstterm>upper relation</>. For + insert them into the appropriate <firstterm>upper relation</firstterm>. For example, a path representing remote aggregation should be inserted into - the <literal>UPPERREL_GROUP_AGG</> relation, using <function>add_path</>. + the <literal>UPPERREL_GROUP_AGG</literal> relation, using <function>add_path</function>. This path will be compared on a cost basis with local aggregation performed by reading a simple scan path for the foreign relation (note that such a path must also be supplied, else there will be an error at plan time). If the remote-aggregation path wins, which it usually would, it will be converted into a plan in the usual way, by - calling <function>GetForeignPlan</>. The recommended place to generate - such paths is in the <function>GetForeignUpperPaths</> + calling <function>GetForeignPlan</function>. The recommended place to generate + such paths is in the <function>GetForeignUpperPaths</function> callback function, which is called for each upper relation (i.e., each post-scan/join processing step), if all the base relations of the query come from the same FDW. </para> <para> - <function>PlanForeignModify</> and the other callbacks described in + <function>PlanForeignModify</function> and the other callbacks described in <xref linkend="fdw-callbacks-update"> are designed around the assumption that the foreign relation will be scanned in the usual way and then - individual row updates will be driven by a local <literal>ModifyTable</> + individual row updates will be driven by a local <literal>ModifyTable</literal> plan node. This approach is necessary for the general case where an update requires reading local tables as well as foreign tables. However, if the operation could be executed entirely by the foreign server, the FDW could generate a path representing that and insert it - into the <literal>UPPERREL_FINAL</> upper relation, where it would - compete against the <literal>ModifyTable</> approach. This approach - could also be used to implement remote <literal>SELECT FOR UPDATE</>, + into the <literal>UPPERREL_FINAL</literal> upper relation, where it would + compete against the <literal>ModifyTable</literal> approach. This approach + could also be used to implement remote <literal>SELECT FOR UPDATE</literal>, rather than using the row locking callbacks described in <xref linkend="fdw-callbacks-row-locking">. Keep in mind that a path - inserted into <literal>UPPERREL_FINAL</> is responsible for - implementing <emphasis>all</> behavior of the query. + inserted into <literal>UPPERREL_FINAL</literal> is responsible for + implementing <emphasis>all</emphasis> behavior of the query. </para> <para> - When planning an <command>UPDATE</> or <command>DELETE</>, - <function>PlanForeignModify</> and <function>PlanDirectModify</> - can look up the <structname>RelOptInfo</> + When planning an <command>UPDATE</command> or <command>DELETE</command>, + <function>PlanForeignModify</function> and <function>PlanDirectModify</function> + can look up the <structname>RelOptInfo</structname> struct for the foreign table and make use of the - <literal>baserel->fdw_private</> data previously created by the - scan-planning functions. However, in <command>INSERT</> the target - table is not scanned so there is no <structname>RelOptInfo</> for it. - The <structname>List</> returned by <function>PlanForeignModify</> has - the same restrictions as the <structfield>fdw_private</> list of a - <structname>ForeignScan</> plan node, that is it must contain only - structures that <function>copyObject</> knows how to copy. + <literal>baserel->fdw_private</literal> data previously created by the + scan-planning functions. However, in <command>INSERT</command> the target + table is not scanned so there is no <structname>RelOptInfo</structname> for it. + The <structname>List</structname> returned by <function>PlanForeignModify</function> has + the same restrictions as the <structfield>fdw_private</structfield> list of a + <structname>ForeignScan</structname> plan node, that is it must contain only + structures that <function>copyObject</function> knows how to copy. </para> <para> - <command>INSERT</> with an <literal>ON CONFLICT</> clause does not + <command>INSERT</command> with an <literal>ON CONFLICT</literal> clause does not support specifying the conflict target, as unique constraints or exclusion constraints on remote tables are not locally known. This - in turn implies that <literal>ON CONFLICT DO UPDATE</> is not supported, + in turn implies that <literal>ON CONFLICT DO UPDATE</literal> is not supported, since the specification is mandatory there. </para> @@ -1653,13 +1653,13 @@ GetForeignServerByName(const char *name, bool missing_ok); individual rows to prevent concurrent updates of those rows, it is usually worthwhile for the FDW to perform row-level locking with as close an approximation as practical to the semantics used in - ordinary <productname>PostgreSQL</> tables. There are multiple + ordinary <productname>PostgreSQL</productname> tables. There are multiple considerations involved in this. </para> <para> One key decision to be made is whether to perform <firstterm>early - locking</> or <firstterm>late locking</>. In early locking, a row is + locking</firstterm> or <firstterm>late locking</firstterm>. In early locking, a row is locked when it is first retrieved from the underlying store, while in late locking, the row is locked only when it is known that it needs to be locked. (The difference arises because some rows may be discarded by @@ -1669,25 +1669,25 @@ GetForeignServerByName(const char *name, bool missing_ok); concurrency or even unexpected deadlocks. Also, late locking is only possible if the row to be locked can be uniquely re-identified later. Preferably the row identifier should identify a specific version of the - row, as <productname>PostgreSQL</> TIDs do. + row, as <productname>PostgreSQL</productname> TIDs do. </para> <para> - By default, <productname>PostgreSQL</> ignores locking considerations + By default, <productname>PostgreSQL</productname> ignores locking considerations when interfacing to FDWs, but an FDW can perform early locking without any explicit support from the core code. The API functions described in <xref linkend="fdw-callbacks-row-locking">, which were added - in <productname>PostgreSQL</> 9.5, allow an FDW to use late locking if + in <productname>PostgreSQL</productname> 9.5, allow an FDW to use late locking if it wishes. </para> <para> - An additional consideration is that in <literal>READ COMMITTED</> - isolation mode, <productname>PostgreSQL</> may need to re-check + An additional consideration is that in <literal>READ COMMITTED</literal> + isolation mode, <productname>PostgreSQL</productname> may need to re-check restriction and join conditions against an updated version of some target tuple. Rechecking join conditions requires re-obtaining copies of the non-target rows that were previously joined to the target tuple. - When working with standard <productname>PostgreSQL</> tables, this is + When working with standard <productname>PostgreSQL</productname> tables, this is done by including the TIDs of the non-target tables in the column list projected through the join, and then re-fetching non-target rows when required. This approach keeps the join data set compact, but it @@ -1702,56 +1702,56 @@ GetForeignServerByName(const char *name, bool missing_ok); </para> <para> - For an <command>UPDATE</> or <command>DELETE</> on a foreign table, it - is recommended that the <literal>ForeignScan</> operation on the target + For an <command>UPDATE</command> or <command>DELETE</command> on a foreign table, it + is recommended that the <literal>ForeignScan</literal> operation on the target table perform early locking on the rows that it fetches, perhaps via the - equivalent of <command>SELECT FOR UPDATE</>. An FDW can detect whether - a table is an <command>UPDATE</>/<command>DELETE</> target at plan time - by comparing its relid to <literal>root->parse->resultRelation</>, - or at execution time by using <function>ExecRelationIsTargetRelation()</>. + equivalent of <command>SELECT FOR UPDATE</command>. An FDW can detect whether + a table is an <command>UPDATE</command>/<command>DELETE</command> target at plan time + by comparing its relid to <literal>root->parse->resultRelation</literal>, + or at execution time by using <function>ExecRelationIsTargetRelation()</function>. An alternative possibility is to perform late locking within the - <function>ExecForeignUpdate</> or <function>ExecForeignDelete</> + <function>ExecForeignUpdate</function> or <function>ExecForeignDelete</function> callback, but no special support is provided for this. </para> <para> For foreign tables that are specified to be locked by a <command>SELECT - FOR UPDATE/SHARE</> command, the <literal>ForeignScan</> operation can + FOR UPDATE/SHARE</command> command, the <literal>ForeignScan</literal> operation can again perform early locking by fetching tuples with the equivalent - of <command>SELECT FOR UPDATE/SHARE</>. To perform late locking + of <command>SELECT FOR UPDATE/SHARE</command>. To perform late locking instead, provide the callback functions defined in <xref linkend="fdw-callbacks-row-locking">. - In <function>GetForeignRowMarkType</>, select rowmark option - <literal>ROW_MARK_EXCLUSIVE</>, <literal>ROW_MARK_NOKEYEXCLUSIVE</>, - <literal>ROW_MARK_SHARE</>, or <literal>ROW_MARK_KEYSHARE</> depending + In <function>GetForeignRowMarkType</function>, select rowmark option + <literal>ROW_MARK_EXCLUSIVE</literal>, <literal>ROW_MARK_NOKEYEXCLUSIVE</literal>, + <literal>ROW_MARK_SHARE</literal>, or <literal>ROW_MARK_KEYSHARE</literal> depending on the requested lock strength. (The core code will act the same regardless of which of these four options you choose.) Elsewhere, you can detect whether a foreign table was specified to be - locked by this type of command by using <function>get_plan_rowmark</> at - plan time, or <function>ExecFindRowMark</> at execution time; you must + locked by this type of command by using <function>get_plan_rowmark</function> at + plan time, or <function>ExecFindRowMark</function> at execution time; you must check not only whether a non-null rowmark struct is returned, but that - its <structfield>strength</> field is not <literal>LCS_NONE</>. + its <structfield>strength</structfield> field is not <literal>LCS_NONE</literal>. </para> <para> - Lastly, for foreign tables that are used in an <command>UPDATE</>, - <command>DELETE</> or <command>SELECT FOR UPDATE/SHARE</> command but + Lastly, for foreign tables that are used in an <command>UPDATE</command>, + <command>DELETE</command> or <command>SELECT FOR UPDATE/SHARE</command> command but are not specified to be row-locked, you can override the default choice - to copy entire rows by having <function>GetForeignRowMarkType</> select - option <literal>ROW_MARK_REFERENCE</> when it sees lock strength - <literal>LCS_NONE</>. This will cause <function>RefetchForeignRow</> to - be called with that value for <structfield>markType</>; it should then + to copy entire rows by having <function>GetForeignRowMarkType</function> select + option <literal>ROW_MARK_REFERENCE</literal> when it sees lock strength + <literal>LCS_NONE</literal>. This will cause <function>RefetchForeignRow</function> to + be called with that value for <structfield>markType</structfield>; it should then re-fetch the row without acquiring any new lock. (If you have - a <function>GetForeignRowMarkType</> function but don't wish to re-fetch - unlocked rows, select option <literal>ROW_MARK_COPY</> - for <literal>LCS_NONE</>.) + a <function>GetForeignRowMarkType</function> function but don't wish to re-fetch + unlocked rows, select option <literal>ROW_MARK_COPY</literal> + for <literal>LCS_NONE</literal>.) </para> <para> - See <filename>src/include/nodes/lockoptions.h</>, the comments - for <type>RowMarkType</> and <type>PlanRowMark</> - in <filename>src/include/nodes/plannodes.h</>, and the comments for - <type>ExecRowMark</> in <filename>src/include/nodes/execnodes.h</> for + See <filename>src/include/nodes/lockoptions.h</filename>, the comments + for <type>RowMarkType</type> and <type>PlanRowMark</type> + in <filename>src/include/nodes/plannodes.h</filename>, and the comments for + <type>ExecRowMark</type> in <filename>src/include/nodes/execnodes.h</filename> for additional information. </para> diff --git a/doc/src/sgml/file-fdw.sgml b/doc/src/sgml/file-fdw.sgml index 74941a6f1ec..88aefb8ef07 100644 --- a/doc/src/sgml/file-fdw.sgml +++ b/doc/src/sgml/file-fdw.sgml @@ -8,7 +8,7 @@ </indexterm> <para> - The <filename>file_fdw</> module provides the foreign-data wrapper + The <filename>file_fdw</filename> module provides the foreign-data wrapper <function>file_fdw</function>, which can be used to access data files in the server's file system, or to execute programs on the server and read their output. The data file or program output must be in a format @@ -41,7 +41,7 @@ <listitem> <para> Specifies the command to be executed. The standard output of this - command will be read as though <command>COPY FROM PROGRAM</> were used. + command will be read as though <command>COPY FROM PROGRAM</command> were used. Either <literal>program</literal> or <literal>filename</literal> must be specified, but not both. </para> @@ -54,7 +54,7 @@ <listitem> <para> Specifies the data format, - the same as <command>COPY</>'s <literal>FORMAT</literal> option. + the same as <command>COPY</command>'s <literal>FORMAT</literal> option. </para> </listitem> </varlistentry> @@ -65,7 +65,7 @@ <listitem> <para> Specifies whether the data has a header line, - the same as <command>COPY</>'s <literal>HEADER</literal> option. + the same as <command>COPY</command>'s <literal>HEADER</literal> option. </para> </listitem> </varlistentry> @@ -76,7 +76,7 @@ <listitem> <para> Specifies the data delimiter character, - the same as <command>COPY</>'s <literal>DELIMITER</literal> option. + the same as <command>COPY</command>'s <literal>DELIMITER</literal> option. </para> </listitem> </varlistentry> @@ -87,7 +87,7 @@ <listitem> <para> Specifies the data quote character, - the same as <command>COPY</>'s <literal>QUOTE</literal> option. + the same as <command>COPY</command>'s <literal>QUOTE</literal> option. </para> </listitem> </varlistentry> @@ -98,7 +98,7 @@ <listitem> <para> Specifies the data escape character, - the same as <command>COPY</>'s <literal>ESCAPE</literal> option. + the same as <command>COPY</command>'s <literal>ESCAPE</literal> option. </para> </listitem> </varlistentry> @@ -109,7 +109,7 @@ <listitem> <para> Specifies the data null string, - the same as <command>COPY</>'s <literal>NULL</literal> option. + the same as <command>COPY</command>'s <literal>NULL</literal> option. </para> </listitem> </varlistentry> @@ -120,7 +120,7 @@ <listitem> <para> Specifies the data encoding, - the same as <command>COPY</>'s <literal>ENCODING</literal> option. + the same as <command>COPY</command>'s <literal>ENCODING</literal> option. </para> </listitem> </varlistentry> @@ -128,10 +128,10 @@ </variablelist> <para> - Note that while <command>COPY</> allows options such as <literal>HEADER</> + Note that while <command>COPY</command> allows options such as <literal>HEADER</literal> to be specified without a corresponding value, the foreign table option syntax requires a value to be present in all cases. To activate - <command>COPY</> options typically written without a value, you can pass + <command>COPY</command> options typically written without a value, you can pass the value TRUE, since all such options are Booleans. </para> @@ -150,7 +150,7 @@ This is a Boolean option. If true, it specifies that values of the column should not be matched against the null string (that is, the table-level <literal>null</literal> option). This has the same effect - as listing the column in <command>COPY</>'s + as listing the column in <command>COPY</command>'s <literal>FORCE_NOT_NULL</literal> option. </para> </listitem> @@ -162,11 +162,11 @@ <listitem> <para> This is a Boolean option. If true, it specifies that values of the - column which match the null string are returned as <literal>NULL</> + column which match the null string are returned as <literal>NULL</literal> even if the value is quoted. Without this option, only unquoted - values matching the null string are returned as <literal>NULL</>. + values matching the null string are returned as <literal>NULL</literal>. This has the same effect as listing the column in - <command>COPY</>'s <literal>FORCE_NULL</literal> option. + <command>COPY</command>'s <literal>FORCE_NULL</literal> option. </para> </listitem> </varlistentry> @@ -174,14 +174,14 @@ </variablelist> <para> - <command>COPY</>'s <literal>OIDS</literal> and + <command>COPY</command>'s <literal>OIDS</literal> and <literal>FORCE_QUOTE</literal> options are currently not supported by - <literal>file_fdw</>. + <literal>file_fdw</literal>. </para> <para> These options can only be specified for a foreign table or its columns, not - in the options of the <literal>file_fdw</> foreign-data wrapper, nor in the + in the options of the <literal>file_fdw</literal> foreign-data wrapper, nor in the options of a server or user mapping using the wrapper. </para> @@ -193,7 +193,7 @@ </para> <para> - When specifying the <literal>program</> option, keep in mind that the option + When specifying the <literal>program</literal> option, keep in mind that the option string is executed by the shell. If you need to pass any arguments to the command that come from an untrusted source, you must be careful to strip or escape any characters that might have special meaning to the shell. @@ -202,9 +202,9 @@ </para> <para> - For a foreign table using <literal>file_fdw</>, <command>EXPLAIN</> shows + For a foreign table using <literal>file_fdw</literal>, <command>EXPLAIN</command> shows the name of the file to be read or program to be run. - For a file, unless <literal>COSTS OFF</> is + For a file, unless <literal>COSTS OFF</literal> is specified, the file size (in bytes) is shown as well. </para> @@ -212,10 +212,10 @@ <title id="csvlog-fdw">Create a Foreign Table for PostgreSQL CSV Logs</title> <para> - One of the obvious uses for <literal>file_fdw</> is to make + One of the obvious uses for <literal>file_fdw</literal> is to make the PostgreSQL activity log available as a table for querying. To do this, first you must be logging to a CSV file, which here we - will call <literal>pglog.csv</>. First, install <literal>file_fdw</> + will call <literal>pglog.csv</literal>. First, install <literal>file_fdw</literal> as an extension: </para> @@ -233,7 +233,7 @@ CREATE SERVER pglog FOREIGN DATA WRAPPER file_fdw; <para> Now you are ready to create the foreign data table. Using the - <command>CREATE FOREIGN TABLE</> command, you will need to define + <command>CREATE FOREIGN TABLE</command> command, you will need to define the columns for the table, the CSV file name, and its format: <programlisting> diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index b52407822dd..c672988cc51 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -77,13 +77,13 @@ </indexterm> <simplelist> - <member><literal>AND</></member> - <member><literal>OR</></member> - <member><literal>NOT</></member> + <member><literal>AND</literal></member> + <member><literal>OR</literal></member> + <member><literal>NOT</literal></member> </simplelist> <acronym>SQL</acronym> uses a three-valued logic system with true, - false, and <literal>null</>, which represents <quote>unknown</quote>. + false, and <literal>null</literal>, which represents <quote>unknown</quote>. Observe the following truth tables: <informaltable> @@ -274,82 +274,82 @@ <tbody> <row> - <entry> <replaceable>a</> <literal>BETWEEN</> <replaceable>x</> <literal>AND</> <replaceable>y</> </entry> + <entry> <replaceable>a</replaceable> <literal>BETWEEN</literal> <replaceable>x</replaceable> <literal>AND</literal> <replaceable>y</replaceable> </entry> <entry>between</entry> </row> <row> - <entry> <replaceable>a</> <literal>NOT BETWEEN</> <replaceable>x</> <literal>AND</> <replaceable>y</> </entry> + <entry> <replaceable>a</replaceable> <literal>NOT BETWEEN</literal> <replaceable>x</replaceable> <literal>AND</literal> <replaceable>y</replaceable> </entry> <entry>not between</entry> </row> <row> - <entry> <replaceable>a</> <literal>BETWEEN SYMMETRIC</> <replaceable>x</> <literal>AND</> <replaceable>y</> </entry> + <entry> <replaceable>a</replaceable> <literal>BETWEEN SYMMETRIC</literal> <replaceable>x</replaceable> <literal>AND</literal> <replaceable>y</replaceable> </entry> <entry>between, after sorting the comparison values</entry> </row> <row> - <entry> <replaceable>a</> <literal>NOT BETWEEN SYMMETRIC</> <replaceable>x</> <literal>AND</> <replaceable>y</> </entry> + <entry> <replaceable>a</replaceable> <literal>NOT BETWEEN SYMMETRIC</literal> <replaceable>x</replaceable> <literal>AND</literal> <replaceable>y</replaceable> </entry> <entry>not between, after sorting the comparison values</entry> </row> <row> - <entry> <replaceable>a</> <literal>IS DISTINCT FROM</> <replaceable>b</> </entry> + <entry> <replaceable>a</replaceable> <literal>IS DISTINCT FROM</literal> <replaceable>b</replaceable> </entry> <entry>not equal, treating null like an ordinary value</entry> </row> <row> - <entry><replaceable>a</> <literal>IS NOT DISTINCT FROM</> <replaceable>b</></entry> + <entry><replaceable>a</replaceable> <literal>IS NOT DISTINCT FROM</literal> <replaceable>b</replaceable></entry> <entry>equal, treating null like an ordinary value</entry> </row> <row> - <entry> <replaceable>expression</> <literal>IS NULL</> </entry> + <entry> <replaceable>expression</replaceable> <literal>IS NULL</literal> </entry> <entry>is null</entry> </row> <row> - <entry> <replaceable>expression</> <literal>IS NOT NULL</> </entry> + <entry> <replaceable>expression</replaceable> <literal>IS NOT NULL</literal> </entry> <entry>is not null</entry> </row> <row> - <entry> <replaceable>expression</> <literal>ISNULL</> </entry> + <entry> <replaceable>expression</replaceable> <literal>ISNULL</literal> </entry> <entry>is null (nonstandard syntax)</entry> </row> <row> - <entry> <replaceable>expression</> <literal>NOTNULL</> </entry> + <entry> <replaceable>expression</replaceable> <literal>NOTNULL</literal> </entry> <entry>is not null (nonstandard syntax)</entry> </row> <row> - <entry> <replaceable>boolean_expression</> <literal>IS TRUE</> </entry> + <entry> <replaceable>boolean_expression</replaceable> <literal>IS TRUE</literal> </entry> <entry>is true</entry> </row> <row> - <entry> <replaceable>boolean_expression</> <literal>IS NOT TRUE</> </entry> + <entry> <replaceable>boolean_expression</replaceable> <literal>IS NOT TRUE</literal> </entry> <entry>is false or unknown</entry> </row> <row> - <entry> <replaceable>boolean_expression</> <literal>IS FALSE</> </entry> + <entry> <replaceable>boolean_expression</replaceable> <literal>IS FALSE</literal> </entry> <entry>is false</entry> </row> <row> - <entry> <replaceable>boolean_expression</> <literal>IS NOT FALSE</> </entry> + <entry> <replaceable>boolean_expression</replaceable> <literal>IS NOT FALSE</literal> </entry> <entry>is true or unknown</entry> </row> <row> - <entry> <replaceable>boolean_expression</> <literal>IS UNKNOWN</> </entry> + <entry> <replaceable>boolean_expression</replaceable> <literal>IS UNKNOWN</literal> </entry> <entry>is unknown</entry> </row> <row> - <entry> <replaceable>boolean_expression</> <literal>IS NOT UNKNOWN</> </entry> + <entry> <replaceable>boolean_expression</replaceable> <literal>IS NOT UNKNOWN</literal> </entry> <entry>is true or false</entry> </row> </tbody> @@ -381,9 +381,9 @@ <indexterm> <primary>BETWEEN SYMMETRIC</primary> </indexterm> - <literal>BETWEEN SYMMETRIC</> is like <literal>BETWEEN</> + <literal>BETWEEN SYMMETRIC</literal> is like <literal>BETWEEN</literal> except there is no requirement that the argument to the left of - <literal>AND</> be less than or equal to the argument on the right. + <literal>AND</literal> be less than or equal to the argument on the right. If it is not, those two arguments are automatically swapped, so that a nonempty range is always implied. </para> @@ -395,23 +395,23 @@ <indexterm> <primary>IS NOT DISTINCT FROM</primary> </indexterm> - Ordinary comparison operators yield null (signifying <quote>unknown</>), + Ordinary comparison operators yield null (signifying <quote>unknown</quote>), not true or false, when either input is null. For example, - <literal>7 = NULL</> yields null, as does <literal>7 <> NULL</>. When + <literal>7 = NULL</literal> yields null, as does <literal>7 <> NULL</literal>. When this behavior is not suitable, use the - <literal>IS <optional> NOT </> DISTINCT FROM</literal> predicates: + <literal>IS <optional> NOT </optional> DISTINCT FROM</literal> predicates: <synopsis> <replaceable>a</replaceable> IS DISTINCT FROM <replaceable>b</replaceable> <replaceable>a</replaceable> IS NOT DISTINCT FROM <replaceable>b</replaceable> </synopsis> For non-null inputs, <literal>IS DISTINCT FROM</literal> is - the same as the <literal><></> operator. However, if both + the same as the <literal><></literal> operator. However, if both inputs are null it returns false, and if only one input is null it returns true. Similarly, <literal>IS NOT DISTINCT FROM</literal> is identical to <literal>=</literal> for non-null inputs, but it returns true when both inputs are null, and false when only one input is null. Thus, these predicates effectively act as though null - were a normal data value, rather than <quote>unknown</>. + were a normal data value, rather than <quote>unknown</quote>. </para> <para> @@ -443,8 +443,8 @@ <para> Do <emphasis>not</emphasis> write <literal><replaceable>expression</replaceable> = NULL</literal> - because <literal>NULL</> is not <quote>equal to</quote> - <literal>NULL</>. (The null value represents an unknown value, + because <literal>NULL</literal> is not <quote>equal to</quote> + <literal>NULL</literal>. (The null value represents an unknown value, and it is not known whether two unknown values are equal.) </para> @@ -464,16 +464,16 @@ <para> If the <replaceable>expression</replaceable> is row-valued, then - <literal>IS NULL</> is true when the row expression itself is null + <literal>IS NULL</literal> is true when the row expression itself is null or when all the row's fields are null, while - <literal>IS NOT NULL</> is true when the row expression itself is non-null + <literal>IS NOT NULL</literal> is true when the row expression itself is non-null and all the row's fields are non-null. Because of this behavior, - <literal>IS NULL</> and <literal>IS NOT NULL</> do not always return + <literal>IS NULL</literal> and <literal>IS NOT NULL</literal> do not always return inverse results for row-valued expressions; in particular, a row-valued expression that contains both null and non-null fields will return false for both tests. In some cases, it may be preferable to - write <replaceable>row</replaceable> <literal>IS DISTINCT FROM NULL</> - or <replaceable>row</replaceable> <literal>IS NOT DISTINCT FROM NULL</>, + write <replaceable>row</replaceable> <literal>IS DISTINCT FROM NULL</literal> + or <replaceable>row</replaceable> <literal>IS NOT DISTINCT FROM NULL</literal>, which will simply check whether the overall row value is null without any additional tests on the row fields. </para> @@ -508,8 +508,8 @@ </synopsis> These will always return true or false, never a null value, even when the operand is null. - A null input is treated as the logical value <quote>unknown</>. - Notice that <literal>IS UNKNOWN</> and <literal>IS NOT UNKNOWN</> are + A null input is treated as the logical value <quote>unknown</quote>. + Notice that <literal>IS UNKNOWN</literal> and <literal>IS NOT UNKNOWN</literal> are effectively the same as <literal>IS NULL</literal> and <literal>IS NOT NULL</literal>, respectively, except that the input expression must be of Boolean type. @@ -835,10 +835,10 @@ <indexterm> <primary>div</primary> </indexterm> - <literal><function>div(<parameter>y</parameter> <type>numeric</>, - <parameter>x</parameter> <type>numeric</>)</function></literal> + <literal><function>div(<parameter>y</parameter> <type>numeric</type>, + <parameter>x</parameter> <type>numeric</type>)</function></literal> </entry> - <entry><type>numeric</></entry> + <entry><type>numeric</type></entry> <entry>integer quotient of <parameter>y</parameter>/<parameter>x</parameter></entry> <entry><literal>div(9,4)</literal></entry> <entry><literal>2</literal></entry> @@ -941,7 +941,7 @@ <parameter>b</parameter> <type>dp</type>)</function></literal> </entry> <entry><type>dp</type></entry> - <entry><parameter>a</> raised to the power of <parameter>b</parameter></entry> + <entry><parameter>a</parameter> raised to the power of <parameter>b</parameter></entry> <entry><literal>power(9.0, 3.0)</literal></entry> <entry><literal>729</literal></entry> </row> @@ -950,7 +950,7 @@ <entry><literal><function>power(<parameter>a</parameter> <type>numeric</type>, <parameter>b</parameter> <type>numeric</type>)</function></literal></entry> <entry><type>numeric</type></entry> - <entry><parameter>a</> raised to the power of <parameter>b</parameter></entry> + <entry><parameter>a</parameter> raised to the power of <parameter>b</parameter></entry> <entry><literal>power(9.0, 3.0)</literal></entry> <entry><literal>729</literal></entry> </row> @@ -1056,10 +1056,10 @@ </indexterm> <literal><function>width_bucket(<parameter>operand</parameter> <type>dp</type>, <parameter>b1</parameter> <type>dp</type>, <parameter>b2</parameter> <type>dp</type>, <parameter>count</parameter> <type>int</type>)</function></literal></entry> <entry><type>int</type></entry> - <entry>return the bucket number to which <parameter>operand</> would - be assigned in a histogram having <parameter>count</> equal-width - buckets spanning the range <parameter>b1</> to <parameter>b2</>; - returns <literal>0</> or <literal><parameter>count</>+1</literal> for + <entry>return the bucket number to which <parameter>operand</parameter> would + be assigned in a histogram having <parameter>count</parameter> equal-width + buckets spanning the range <parameter>b1</parameter> to <parameter>b2</parameter>; + returns <literal>0</literal> or <literal><parameter>count</parameter>+1</literal> for an input outside the range</entry> <entry><literal>width_bucket(5.35, 0.024, 10.06, 5)</literal></entry> <entry><literal>3</literal></entry> @@ -1068,10 +1068,10 @@ <row> <entry><literal><function>width_bucket(<parameter>operand</parameter> <type>numeric</type>, <parameter>b1</parameter> <type>numeric</type>, <parameter>b2</parameter> <type>numeric</type>, <parameter>count</parameter> <type>int</type>)</function></literal></entry> <entry><type>int</type></entry> - <entry>return the bucket number to which <parameter>operand</> would - be assigned in a histogram having <parameter>count</> equal-width - buckets spanning the range <parameter>b1</> to <parameter>b2</>; - returns <literal>0</> or <literal><parameter>count</>+1</literal> for + <entry>return the bucket number to which <parameter>operand</parameter> would + be assigned in a histogram having <parameter>count</parameter> equal-width + buckets spanning the range <parameter>b1</parameter> to <parameter>b2</parameter>; + returns <literal>0</literal> or <literal><parameter>count</parameter>+1</literal> for an input outside the range</entry> <entry><literal>width_bucket(5.35, 0.024, 10.06, 5)</literal></entry> <entry><literal>3</literal></entry> @@ -1080,10 +1080,10 @@ <row> <entry><literal><function>width_bucket(<parameter>operand</parameter> <type>anyelement</type>, <parameter>thresholds</parameter> <type>anyarray</type>)</function></literal></entry> <entry><type>int</type></entry> - <entry>return the bucket number to which <parameter>operand</> would + <entry>return the bucket number to which <parameter>operand</parameter> would be assigned given an array listing the lower bounds of the buckets; - returns <literal>0</> for an input less than the first lower bound; - the <parameter>thresholds</> array <emphasis>must be sorted</>, + returns <literal>0</literal> for an input less than the first lower bound; + the <parameter>thresholds</parameter> array <emphasis>must be sorted</emphasis>, smallest first, or unexpected results will be obtained</entry> <entry><literal>width_bucket(now(), array['yesterday', 'today', 'tomorrow']::timestamptz[])</literal></entry> <entry><literal>2</literal></entry> @@ -1303,7 +1303,7 @@ and <literal><function>degrees()</function></literal> shown earlier. However, using the degree-based trigonometric functions is preferred, as that way avoids round-off error for special cases such - as <literal>sind(30)</>. + as <literal>sind(30)</literal>. </para> </note> @@ -1329,7 +1329,7 @@ key words, rather than commas, to separate arguments. Details are in <xref linkend="functions-string-sql">. - <productname>PostgreSQL</> also provides versions of these functions + <productname>PostgreSQL</productname> also provides versions of these functions that use the regular function invocation syntax (see <xref linkend="functions-string-other">). </para> @@ -1339,12 +1339,12 @@ Before <productname>PostgreSQL</productname> 8.3, these functions would silently accept values of several non-string data types as well, due to the presence of implicit coercions from those data types to - <type>text</>. Those coercions have been removed because they frequently + <type>text</type>. Those coercions have been removed because they frequently caused surprising behaviors. However, the string concatenation operator - (<literal>||</>) still accepts non-string input, so long as at least one + (<literal>||</literal>) still accepts non-string input, so long as at least one input is of a string type, as shown in <xref linkend="functions-string-sql">. For other cases, insert an explicit - coercion to <type>text</> if you need to duplicate the previous behavior. + coercion to <type>text</type> if you need to duplicate the previous behavior. </para> </note> @@ -1536,7 +1536,7 @@ <entry> Remove the longest string containing only characters from <parameter>characters</parameter> (a space by default) from the - start, end, or both ends (<literal>both</> is the default) + start, end, or both ends (<literal>both</literal> is the default) of <parameter>string</parameter> </entry> <entry><literal>trim(both 'xyz' from 'yxTomxx')</literal></entry> @@ -1553,7 +1553,7 @@ </entry> <entry><type>text</type></entry> <entry> - Non-standard syntax for <function>trim()</> + Non-standard syntax for <function>trim()</function> </entry> <entry><literal>trim(both from 'yxTomxx', 'xyz')</literal></entry> <entry><literal>Tom</literal></entry> @@ -1753,8 +1753,8 @@ </entry> <entry><type>bytea</type></entry> <entry> - Decode binary data from textual representation in <parameter>string</>. - Options for <parameter>format</> are same as in <function>encode</>. + Decode binary data from textual representation in <parameter>string</parameter>. + Options for <parameter>format</parameter> are same as in <function>encode</function>. </entry> <entry><literal>decode('MTIzAAE=', 'base64')</literal></entry> <entry><literal>\x3132330001</literal></entry> @@ -1771,9 +1771,9 @@ <entry><type>text</type></entry> <entry> Encode binary data into a textual representation. Supported - formats are: <literal>base64</>, <literal>hex</>, <literal>escape</>. - <literal>escape</> converts zero bytes and high-bit-set bytes to - octal sequences (<literal>\</><replaceable>nnn</>) and + formats are: <literal>base64</literal>, <literal>hex</literal>, <literal>escape</literal>. + <literal>escape</literal> converts zero bytes and high-bit-set bytes to + octal sequences (<literal>\</literal><replaceable>nnn</replaceable>) and doubles backslashes. </entry> <entry><literal>encode(E'123\\000\\001', 'base64')</literal></entry> @@ -1791,7 +1791,7 @@ <entry><type>text</type></entry> <entry> Format arguments according to a format string. - This function is similar to the C function <function>sprintf</>. + This function is similar to the C function <function>sprintf</function>. See <xref linkend="functions-string-format">. </entry> <entry><literal>format('Hello %s, %1$s', 'World')</literal></entry> @@ -1825,8 +1825,8 @@ </entry> <entry><type>text</type></entry> <entry> - Return first <replaceable>n</> characters in the string. When <replaceable>n</> - is negative, return all but last |<replaceable>n</>| characters. + Return first <replaceable>n</replaceable> characters in the string. When <replaceable>n</replaceable> + is negative, return all but last |<replaceable>n</replaceable>| characters. </entry> <entry><literal>left('abcde', 2)</literal></entry> <entry><literal>ab</literal></entry> @@ -1929,11 +1929,11 @@ Split <parameter>qualified_identifier</parameter> into an array of identifiers, removing any quoting of individual identifiers. By default, extra characters after the last identifier are considered an - error; but if the second parameter is <literal>false</>, then such + error; but if the second parameter is <literal>false</literal>, then such extra characters are ignored. (This behavior is useful for parsing names for objects like functions.) Note that this function does not truncate over-length identifiers. If you want truncation you can cast - the result to <type>name[]</>. + the result to <type>name[]</type>. </entry> <entry><literal>parse_ident('"SomeSchema".someTable')</literal></entry> <entry><literal>{SomeSchema,sometable}</literal></entry> @@ -2017,7 +2017,7 @@ <entry> Return the given string suitably quoted to be used as a string literal in an <acronym>SQL</acronym> statement string; or, if the argument - is null, return <literal>NULL</>. + is null, return <literal>NULL</literal>. Embedded single-quotes and backslashes are properly doubled. See also <xref linkend="plpgsql-quote-literal-example">. </entry> @@ -2030,7 +2030,7 @@ <entry><type>text</type></entry> <entry> Coerce the given value to text and then quote it as a literal; - or, if the argument is null, return <literal>NULL</>. + or, if the argument is null, return <literal>NULL</literal>. Embedded single-quotes and backslashes are properly doubled. </entry> <entry><literal>quote_nullable(42.5)</literal></entry> @@ -2177,8 +2177,8 @@ </entry> <entry><type>text</type></entry> <entry> - Return last <replaceable>n</> characters in the string. When <replaceable>n</> - is negative, return all but first |<replaceable>n</>| characters. + Return last <replaceable>n</replaceable> characters in the string. When <replaceable>n</replaceable> + is negative, return all but first |<replaceable>n</replaceable>| characters. </entry> <entry><literal>right('abcde', 2)</literal></entry> <entry><literal>de</literal></entry> @@ -2285,8 +2285,8 @@ <entry><type>text</type></entry> <entry> Convert <parameter>string</parameter> to <acronym>ASCII</acronym> from another encoding - (only supports conversion from <literal>LATIN1</>, <literal>LATIN2</>, <literal>LATIN9</>, - and <literal>WIN1250</> encodings) + (only supports conversion from <literal>LATIN1</literal>, <literal>LATIN2</literal>, <literal>LATIN9</literal>, + and <literal>WIN1250</literal> encodings) </entry> <entry><literal>to_ascii('Karel')</literal></entry> <entry><literal>Karel</literal></entry> @@ -3154,30 +3154,30 @@ </indexterm> <para> - The function <function>format</> produces output formatted according to + The function <function>format</function> produces output formatted according to a format string, in a style similar to the C function - <function>sprintf</>. + <function>sprintf</function>. </para> <para> <synopsis> -<function>format</>(<parameter>formatstr</> <type>text</> [, <parameter>formatarg</> <type>"any"</> [, ...] ]) +<function>format</function>(<parameter>formatstr</parameter> <type>text</type> [, <parameter>formatarg</parameter> <type>"any"</type> [, ...] ]) </synopsis> - <replaceable>formatstr</> is a format string that specifies how the + <replaceable>formatstr</replaceable> is a format string that specifies how the result should be formatted. Text in the format string is copied - directly to the result, except where <firstterm>format specifiers</> are + directly to the result, except where <firstterm>format specifiers</firstterm> are used. Format specifiers act as placeholders in the string, defining how subsequent function arguments should be formatted and inserted into the - result. Each <replaceable>formatarg</> argument is converted to text + result. Each <replaceable>formatarg</replaceable> argument is converted to text according to the usual output rules for its data type, and then formatted and inserted into the result string according to the format specifier(s). </para> <para> - Format specifiers are introduced by a <literal>%</> character and have + Format specifiers are introduced by a <literal>%</literal> character and have the form <synopsis> -%[<replaceable>position</>][<replaceable>flags</>][<replaceable>width</>]<replaceable>type</> +%[<replaceable>position</replaceable>][<replaceable>flags</replaceable>][<replaceable>width</replaceable>]<replaceable>type</replaceable> </synopsis> where the component fields are: @@ -3186,10 +3186,10 @@ <term><replaceable>position</replaceable> (optional)</term> <listitem> <para> - A string of the form <literal><replaceable>n</>$</> where - <replaceable>n</> is the index of the argument to print. + A string of the form <literal><replaceable>n</replaceable>$</literal> where + <replaceable>n</replaceable> is the index of the argument to print. Index 1 means the first argument after - <replaceable>formatstr</>. If the <replaceable>position</> is + <replaceable>formatstr</replaceable>. If the <replaceable>position</replaceable> is omitted, the default is to use the next argument in sequence. </para> </listitem> @@ -3201,8 +3201,8 @@ <para> Additional options controlling how the format specifier's output is formatted. Currently the only supported flag is a minus sign - (<literal>-</>) which will cause the format specifier's output to be - left-justified. This has no effect unless the <replaceable>width</> + (<literal>-</literal>) which will cause the format specifier's output to be + left-justified. This has no effect unless the <replaceable>width</replaceable> field is also specified. </para> </listitem> @@ -3212,23 +3212,23 @@ <term><replaceable>width</replaceable> (optional)</term> <listitem> <para> - Specifies the <emphasis>minimum</> number of characters to use to + Specifies the <emphasis>minimum</emphasis> number of characters to use to display the format specifier's output. The output is padded on the - left or right (depending on the <literal>-</> flag) with spaces as + left or right (depending on the <literal>-</literal> flag) with spaces as needed to fill the width. A too-small width does not cause truncation of the output, but is simply ignored. The width may be specified using any of the following: a positive integer; an - asterisk (<literal>*</>) to use the next function argument as the - width; or a string of the form <literal>*<replaceable>n</>$</> to - use the <replaceable>n</>th function argument as the width. + asterisk (<literal>*</literal>) to use the next function argument as the + width; or a string of the form <literal>*<replaceable>n</replaceable>$</literal> to + use the <replaceable>n</replaceable>th function argument as the width. </para> <para> If the width comes from a function argument, that argument is consumed before the argument that is used for the format specifier's value. If the width argument is negative, the result is left - aligned (as if the <literal>-</> flag had been specified) within a - field of length <function>abs</>(<replaceable>width</replaceable>). + aligned (as if the <literal>-</literal> flag had been specified) within a + field of length <function>abs</function>(<replaceable>width</replaceable>). </para> </listitem> </varlistentry> @@ -3251,13 +3251,13 @@ <literal>I</literal> treats the argument value as an SQL identifier, double-quoting it if necessary. It is an error for the value to be null (equivalent to - <function>quote_ident</>). + <function>quote_ident</function>). </para> </listitem> <listitem> <para> <literal>L</literal> quotes the argument value as an SQL literal. - A null value is displayed as the string <literal>NULL</>, without + A null value is displayed as the string <literal>NULL</literal>, without quotes (equivalent to <function>quote_nullable</function>). </para> </listitem> @@ -3270,7 +3270,7 @@ <para> In addition to the format specifiers described above, the special sequence - <literal>%%</> may be used to output a literal <literal>%</> character. + <literal>%%</literal> may be used to output a literal <literal>%</literal> character. </para> <para> @@ -3281,7 +3281,7 @@ SELECT format('Hello %s', 'World'); <lineannotation>Result: </lineannotation><computeroutput>Hello World</computeroutput> SELECT format('Testing %s, %s, %s, %%', 'one', 'two', 'three'); -<lineannotation>Result: </><computeroutput>Testing one, two, three, %</> +<lineannotation>Result: </lineannotation><computeroutput>Testing one, two, three, %</computeroutput> SELECT format('INSERT INTO %I VALUES(%L)', 'Foo bar', E'O\'Reilly'); <lineannotation>Result: </lineannotation><computeroutput>INSERT INTO "Foo bar" VALUES('O''Reilly')</computeroutput> @@ -3293,63 +3293,63 @@ SELECT format('INSERT INTO %I VALUES(%L)', 'locations', E'C:\\Program Files'); <para> Here are examples using <replaceable>width</replaceable> fields - and the <literal>-</> flag: + and the <literal>-</literal> flag: <screen> SELECT format('|%10s|', 'foo'); -<lineannotation>Result: </><computeroutput>| foo|</> +<lineannotation>Result: </lineannotation><computeroutput>| foo|</computeroutput> SELECT format('|%-10s|', 'foo'); -<lineannotation>Result: </><computeroutput>|foo |</> +<lineannotation>Result: </lineannotation><computeroutput>|foo |</computeroutput> SELECT format('|%*s|', 10, 'foo'); -<lineannotation>Result: </><computeroutput>| foo|</> +<lineannotation>Result: </lineannotation><computeroutput>| foo|</computeroutput> SELECT format('|%*s|', -10, 'foo'); -<lineannotation>Result: </><computeroutput>|foo |</> +<lineannotation>Result: </lineannotation><computeroutput>|foo |</computeroutput> SELECT format('|%-*s|', 10, 'foo'); -<lineannotation>Result: </><computeroutput>|foo |</> +<lineannotation>Result: </lineannotation><computeroutput>|foo |</computeroutput> SELECT format('|%-*s|', -10, 'foo'); -<lineannotation>Result: </><computeroutput>|foo |</> +<lineannotation>Result: </lineannotation><computeroutput>|foo |</computeroutput> </screen> </para> <para> - These examples show use of <replaceable>position</> fields: + These examples show use of <replaceable>position</replaceable> fields: <screen> SELECT format('Testing %3$s, %2$s, %1$s', 'one', 'two', 'three'); -<lineannotation>Result: </><computeroutput>Testing three, two, one</> +<lineannotation>Result: </lineannotation><computeroutput>Testing three, two, one</computeroutput> SELECT format('|%*2$s|', 'foo', 10, 'bar'); -<lineannotation>Result: </><computeroutput>| bar|</> +<lineannotation>Result: </lineannotation><computeroutput>| bar|</computeroutput> SELECT format('|%1$*2$s|', 'foo', 10, 'bar'); -<lineannotation>Result: </><computeroutput>| foo|</> +<lineannotation>Result: </lineannotation><computeroutput>| foo|</computeroutput> </screen> </para> <para> - Unlike the standard C function <function>sprintf</>, - <productname>PostgreSQL</>'s <function>format</> function allows format - specifiers with and without <replaceable>position</> fields to be mixed + Unlike the standard C function <function>sprintf</function>, + <productname>PostgreSQL</productname>'s <function>format</function> function allows format + specifiers with and without <replaceable>position</replaceable> fields to be mixed in the same format string. A format specifier without a - <replaceable>position</> field always uses the next argument after the + <replaceable>position</replaceable> field always uses the next argument after the last argument consumed. - In addition, the <function>format</> function does not require all + In addition, the <function>format</function> function does not require all function arguments to be used in the format string. For example: <screen> SELECT format('Testing %3$s, %2$s, %s', 'one', 'two', 'three'); -<lineannotation>Result: </><computeroutput>Testing three, two, three</> +<lineannotation>Result: </lineannotation><computeroutput>Testing three, two, three</computeroutput> </screen> </para> <para> - The <literal>%I</> and <literal>%L</> format specifiers are particularly + The <literal>%I</literal> and <literal>%L</literal> format specifiers are particularly useful for safely constructing dynamic SQL statements. See <xref linkend="plpgsql-quote-literal-example">. </para> @@ -3376,7 +3376,7 @@ SELECT format('Testing %3$s, %2$s, %s', 'one', 'two', 'three'); key words, rather than commas, to separate arguments. Details are in <xref linkend="functions-binarystring-sql">. - <productname>PostgreSQL</> also provides versions of these functions + <productname>PostgreSQL</productname> also provides versions of these functions that use the regular function invocation syntax (see <xref linkend="functions-binarystring-other">). </para> @@ -3384,7 +3384,7 @@ SELECT format('Testing %3$s, %2$s, %s', 'one', 'two', 'three'); <note> <para> The sample results shown on this page assume that the server parameter - <link linkend="guc-bytea-output"><varname>bytea_output</></link> is set + <link linkend="guc-bytea-output"><varname>bytea_output</varname></link> is set to <literal>escape</literal> (the traditional PostgreSQL format). </para> </note> @@ -3546,8 +3546,8 @@ SELECT format('Testing %3$s, %2$s, %s', 'one', 'two', 'three'); </entry> <entry><type>bytea</type></entry> <entry> - Decode binary data from textual representation in <parameter>string</>. - Options for <parameter>format</> are same as in <function>encode</>. + Decode binary data from textual representation in <parameter>string</parameter>. + Options for <parameter>format</parameter> are same as in <function>encode</function>. </entry> <entry><literal>decode(E'123\\000456', 'escape')</literal></entry> <entry><literal>123\000456</literal></entry> @@ -3564,9 +3564,9 @@ SELECT format('Testing %3$s, %2$s, %s', 'one', 'two', 'three'); <entry><type>text</type></entry> <entry> Encode binary data into a textual representation. Supported - formats are: <literal>base64</>, <literal>hex</>, <literal>escape</>. - <literal>escape</> converts zero bytes and high-bit-set bytes to - octal sequences (<literal>\</><replaceable>nnn</>) and + formats are: <literal>base64</literal>, <literal>hex</literal>, <literal>escape</literal>. + <literal>escape</literal> converts zero bytes and high-bit-set bytes to + octal sequences (<literal>\</literal><replaceable>nnn</replaceable>) and doubles backslashes. </entry> <entry><literal>encode(E'123\\000456'::bytea, 'escape')</literal></entry> @@ -3649,7 +3649,7 @@ SELECT format('Testing %3$s, %2$s, %s', 'one', 'two', 'three'); <primary>set_bit</primary> </indexterm> <literal><function>set_bit(<parameter>string</parameter>, - <parameter>offset</parameter>, <parameter>newvalue</>)</function></literal> + <parameter>offset</parameter>, <parameter>newvalue</parameter>)</function></literal> </entry> <entry><type>bytea</type></entry> <entry> @@ -3665,7 +3665,7 @@ SELECT format('Testing %3$s, %2$s, %s', 'one', 'two', 'three'); <primary>set_byte</primary> </indexterm> <literal><function>set_byte(<parameter>string</parameter>, - <parameter>offset</parameter>, <parameter>newvalue</>)</function></literal> + <parameter>offset</parameter>, <parameter>newvalue</parameter>)</function></literal> </entry> <entry><type>bytea</type></entry> <entry> @@ -3679,9 +3679,9 @@ SELECT format('Testing %3$s, %2$s, %s', 'one', 'two', 'three'); </table> <para> - <function>get_byte</> and <function>set_byte</> number the first byte + <function>get_byte</function> and <function>set_byte</function> number the first byte of a binary string as byte 0. - <function>get_bit</> and <function>set_bit</> number bits from the + <function>get_bit</function> and <function>set_bit</function> number bits from the right within each byte; for example bit 0 is the least significant bit of the first byte, and bit 15 is the most significant bit of the second byte. </para> @@ -3802,7 +3802,7 @@ SELECT format('Testing %3$s, %2$s, %s', 'one', 'two', 'three'); <para> In addition, it is possible to cast integral values to and from type - <type>bit</>. + <type>bit</type>. Some examples: <programlisting> 44::bit(10) <lineannotation>0000101100</lineannotation> @@ -3810,15 +3810,15 @@ SELECT format('Testing %3$s, %2$s, %s', 'one', 'two', 'three'); cast(-44 as bit(12)) <lineannotation>111111010100</lineannotation> '1110'::bit(4)::integer <lineannotation>14</lineannotation> </programlisting> - Note that casting to just <quote>bit</> means casting to - <literal>bit(1)</>, and so will deliver only the least significant + Note that casting to just <quote>bit</quote> means casting to + <literal>bit(1)</literal>, and so will deliver only the least significant bit of the integer. </para> <note> <para> - Casting an integer to <type>bit(n)</> copies the rightmost - <literal>n</> bits. Casting an integer to a bit string width wider + Casting an integer to <type>bit(n)</type> copies the rightmost + <literal>n</literal> bits. Casting an integer to a bit string width wider than the integer itself will sign-extend on the left. </para> </note> @@ -3840,7 +3840,7 @@ cast(-44 as bit(12)) <lineannotation>111111010100</lineannotation> more recent <function>SIMILAR TO</function> operator (added in SQL:1999), and <acronym>POSIX</acronym>-style regular expressions. Aside from the basic <quote>does this string match - this pattern?</> operators, functions are available to extract + this pattern?</quote> operators, functions are available to extract or replace matching substrings and to split a string at matching locations. </para> @@ -4004,9 +4004,9 @@ cast(-44 as bit(12)) <lineannotation>111111010100</lineannotation> can match any part of the string. Also like <function>LIKE</function>, <function>SIMILAR TO</function> uses - <literal>_</> and <literal>%</> as wildcard characters denoting + <literal>_</literal> and <literal>%</literal> as wildcard characters denoting any single character and any string, respectively (these are - comparable to <literal>.</> and <literal>.*</> in POSIX regular + comparable to <literal>.</literal> and <literal>.*</literal> in POSIX regular expressions). </para> @@ -4041,21 +4041,21 @@ cast(-44 as bit(12)) <lineannotation>111111010100</lineannotation> </listitem> <listitem> <para> - <literal>{</><replaceable>m</><literal>}</literal> denotes repetition - of the previous item exactly <replaceable>m</> times. + <literal>{</literal><replaceable>m</replaceable><literal>}</literal> denotes repetition + of the previous item exactly <replaceable>m</replaceable> times. </para> </listitem> <listitem> <para> - <literal>{</><replaceable>m</><literal>,}</literal> denotes repetition - of the previous item <replaceable>m</> or more times. + <literal>{</literal><replaceable>m</replaceable><literal>,}</literal> denotes repetition + of the previous item <replaceable>m</replaceable> or more times. </para> </listitem> <listitem> <para> - <literal>{</><replaceable>m</><literal>,</><replaceable>n</><literal>}</> - denotes repetition of the previous item at least <replaceable>m</> and - not more than <replaceable>n</> times. + <literal>{</literal><replaceable>m</replaceable><literal>,</literal><replaceable>n</replaceable><literal>}</literal> + denotes repetition of the previous item at least <replaceable>m</replaceable> and + not more than <replaceable>n</replaceable> times. </para> </listitem> <listitem> @@ -4072,14 +4072,14 @@ cast(-44 as bit(12)) <lineannotation>111111010100</lineannotation> </listitem> </itemizedlist> - Notice that the period (<literal>.</>) is not a metacharacter - for <function>SIMILAR TO</>. + Notice that the period (<literal>.</literal>) is not a metacharacter + for <function>SIMILAR TO</function>. </para> <para> - As with <function>LIKE</>, a backslash disables the special meaning + As with <function>LIKE</function>, a backslash disables the special meaning of any of these metacharacters; or a different escape character can - be specified with <literal>ESCAPE</>. + be specified with <literal>ESCAPE</literal>. </para> <para> @@ -4093,23 +4093,23 @@ cast(-44 as bit(12)) <lineannotation>111111010100</lineannotation> </para> <para> - The <function>substring</> function with three parameters, + The <function>substring</function> function with three parameters, <function>substring(<replaceable>string</replaceable> from <replaceable>pattern</replaceable> for <replaceable>escape-character</replaceable>)</function>, provides extraction of a substring that matches an SQL - regular expression pattern. As with <literal>SIMILAR TO</>, the + regular expression pattern. As with <literal>SIMILAR TO</literal>, the specified pattern must match the entire data string, or else the function fails and returns null. To indicate the part of the pattern that should be returned on success, the pattern must contain two occurrences of the escape character followed by a double quote - (<literal>"</>). <!-- " font-lock sanity --> + (<literal>"</literal>). <!-- " font-lock sanity --> The text matching the portion of the pattern between these markers is returned. </para> <para> - Some examples, with <literal>#"</> delimiting the return string: + Some examples, with <literal>#"</literal> delimiting the return string: <programlisting> substring('foobar' from '%#"o_b#"%' for '#') <lineannotation>oob</lineannotation> substring('foobar' from '#"o_b#"%' for '#') <lineannotation>NULL</lineannotation> @@ -4191,7 +4191,7 @@ substring('foobar' from '#"o_b#"%' for '#') <lineannotation>NULL</lineannotat <para> <acronym>POSIX</acronym> regular expressions provide a more powerful means for pattern matching than the <function>LIKE</function> and - <function>SIMILAR TO</> operators. + <function>SIMILAR TO</function> operators. Many Unix tools such as <command>egrep</command>, <command>sed</command>, or <command>awk</command> use a pattern matching language that is similar to the one described here. @@ -4228,7 +4228,7 @@ substring('foobar' from '#"o_b#"%' for '#') <lineannotation>NULL</lineannotat </para> <para> - The <function>substring</> function with two parameters, + The <function>substring</function> function with two parameters, <function>substring(<replaceable>string</replaceable> from <replaceable>pattern</replaceable>)</function>, provides extraction of a substring @@ -4253,30 +4253,30 @@ substring('foobar' from 'o(.)b') <lineannotation>o</lineannotation> </para> <para> - The <function>regexp_replace</> function provides substitution of + The <function>regexp_replace</function> function provides substitution of new text for substrings that match POSIX regular expression patterns. It has the syntax - <function>regexp_replace</function>(<replaceable>source</>, - <replaceable>pattern</>, <replaceable>replacement</> - <optional>, <replaceable>flags</> </optional>). - The <replaceable>source</> string is returned unchanged if - there is no match to the <replaceable>pattern</>. If there is a - match, the <replaceable>source</> string is returned with the - <replaceable>replacement</> string substituted for the matching - substring. The <replaceable>replacement</> string can contain - <literal>\</><replaceable>n</>, where <replaceable>n</> is 1 + <function>regexp_replace</function>(<replaceable>source</replaceable>, + <replaceable>pattern</replaceable>, <replaceable>replacement</replaceable> + <optional>, <replaceable>flags</replaceable> </optional>). + The <replaceable>source</replaceable> string is returned unchanged if + there is no match to the <replaceable>pattern</replaceable>. If there is a + match, the <replaceable>source</replaceable> string is returned with the + <replaceable>replacement</replaceable> string substituted for the matching + substring. The <replaceable>replacement</replaceable> string can contain + <literal>\</literal><replaceable>n</replaceable>, where <replaceable>n</replaceable> is 1 through 9, to indicate that the source substring matching the - <replaceable>n</>'th parenthesized subexpression of the pattern should be - inserted, and it can contain <literal>\&</> to indicate that the + <replaceable>n</replaceable>'th parenthesized subexpression of the pattern should be + inserted, and it can contain <literal>\&</literal> to indicate that the substring matching the entire pattern should be inserted. Write - <literal>\\</> if you need to put a literal backslash in the replacement + <literal>\\</literal> if you need to put a literal backslash in the replacement text. - The <replaceable>flags</> parameter is an optional text + The <replaceable>flags</replaceable> parameter is an optional text string containing zero or more single-letter flags that change the - function's behavior. Flag <literal>i</> specifies case-insensitive - matching, while flag <literal>g</> specifies replacement of each matching + function's behavior. Flag <literal>i</literal> specifies case-insensitive + matching, while flag <literal>g</literal> specifies replacement of each matching substring rather than only the first one. Supported flags (though - not <literal>g</>) are + not <literal>g</literal>) are described in <xref linkend="posix-embedded-options-table">. </para> @@ -4293,22 +4293,22 @@ regexp_replace('foobarbaz', 'b(..)', E'X\\1Y', 'g') </para> <para> - The <function>regexp_match</> function returns a text array of + The <function>regexp_match</function> function returns a text array of captured substring(s) resulting from the first match of a POSIX regular expression pattern to a string. It has the syntax - <function>regexp_match</function>(<replaceable>string</>, - <replaceable>pattern</> <optional>, <replaceable>flags</> </optional>). - If there is no match, the result is <literal>NULL</>. - If a match is found, and the <replaceable>pattern</> contains no + <function>regexp_match</function>(<replaceable>string</replaceable>, + <replaceable>pattern</replaceable> <optional>, <replaceable>flags</replaceable> </optional>). + If there is no match, the result is <literal>NULL</literal>. + If a match is found, and the <replaceable>pattern</replaceable> contains no parenthesized subexpressions, then the result is a single-element text array containing the substring matching the whole pattern. - If a match is found, and the <replaceable>pattern</> contains + If a match is found, and the <replaceable>pattern</replaceable> contains parenthesized subexpressions, then the result is a text array - whose <replaceable>n</>'th element is the substring matching - the <replaceable>n</>'th parenthesized subexpression of - the <replaceable>pattern</> (not counting <quote>non-capturing</> + whose <replaceable>n</replaceable>'th element is the substring matching + the <replaceable>n</replaceable>'th parenthesized subexpression of + the <replaceable>pattern</replaceable> (not counting <quote>non-capturing</quote> parentheses; see below for details). - The <replaceable>flags</> parameter is an optional text string + The <replaceable>flags</replaceable> parameter is an optional text string containing zero or more single-letter flags that change the function's behavior. Supported flags are described in <xref linkend="posix-embedded-options-table">. @@ -4330,7 +4330,7 @@ SELECT regexp_match('foobarbequebaz', '(bar)(beque)'); (1 row) </programlisting> In the common case where you just want the whole matching substring - or <literal>NULL</> for no match, write something like + or <literal>NULL</literal> for no match, write something like <programlisting> SELECT (regexp_match('foobarbequebaz', 'bar.*que'))[1]; regexp_match @@ -4341,20 +4341,20 @@ SELECT (regexp_match('foobarbequebaz', 'bar.*que'))[1]; </para> <para> - The <function>regexp_matches</> function returns a set of text arrays + The <function>regexp_matches</function> function returns a set of text arrays of captured substring(s) resulting from matching a POSIX regular expression pattern to a string. It has the same syntax as <function>regexp_match</function>. This function returns no rows if there is no match, one row if there is - a match and the <literal>g</> flag is not given, or <replaceable>N</> - rows if there are <replaceable>N</> matches and the <literal>g</> flag + a match and the <literal>g</literal> flag is not given, or <replaceable>N</replaceable> + rows if there are <replaceable>N</replaceable> matches and the <literal>g</literal> flag is given. Each returned row is a text array containing the whole matched substring or the substrings matching parenthesized - subexpressions of the <replaceable>pattern</>, just as described above + subexpressions of the <replaceable>pattern</replaceable>, just as described above for <function>regexp_match</function>. - <function>regexp_matches</> accepts all the flags shown + <function>regexp_matches</function> accepts all the flags shown in <xref linkend="posix-embedded-options-table">, plus - the <literal>g</> flag which commands it to return all matches, not + the <literal>g</literal> flag which commands it to return all matches, not just the first one. </para> @@ -4377,46 +4377,46 @@ SELECT regexp_matches('foobarbequebazilbarfbonk', '(b[^b]+)(b[^b]+)', 'g'); <tip> <para> - In most cases <function>regexp_matches()</> should be used with - the <literal>g</> flag, since if you only want the first match, it's - easier and more efficient to use <function>regexp_match()</>. - However, <function>regexp_match()</> only exists - in <productname>PostgreSQL</> version 10 and up. When working in older - versions, a common trick is to place a <function>regexp_matches()</> + In most cases <function>regexp_matches()</function> should be used with + the <literal>g</literal> flag, since if you only want the first match, it's + easier and more efficient to use <function>regexp_match()</function>. + However, <function>regexp_match()</function> only exists + in <productname>PostgreSQL</productname> version 10 and up. When working in older + versions, a common trick is to place a <function>regexp_matches()</function> call in a sub-select, for example: <programlisting> SELECT col1, (SELECT regexp_matches(col2, '(bar)(beque)')) FROM tab; </programlisting> - This produces a text array if there's a match, or <literal>NULL</> if - not, the same as <function>regexp_match()</> would do. Without the + This produces a text array if there's a match, or <literal>NULL</literal> if + not, the same as <function>regexp_match()</function> would do. Without the sub-select, this query would produce no output at all for table rows without a match, which is typically not the desired behavior. </para> </tip> <para> - The <function>regexp_split_to_table</> function splits a string using a POSIX + The <function>regexp_split_to_table</function> function splits a string using a POSIX regular expression pattern as a delimiter. It has the syntax - <function>regexp_split_to_table</function>(<replaceable>string</>, <replaceable>pattern</> - <optional>, <replaceable>flags</> </optional>). - If there is no match to the <replaceable>pattern</>, the function returns the - <replaceable>string</>. If there is at least one match, for each match it returns + <function>regexp_split_to_table</function>(<replaceable>string</replaceable>, <replaceable>pattern</replaceable> + <optional>, <replaceable>flags</replaceable> </optional>). + If there is no match to the <replaceable>pattern</replaceable>, the function returns the + <replaceable>string</replaceable>. If there is at least one match, for each match it returns the text from the end of the last match (or the beginning of the string) to the beginning of the match. When there are no more matches, it returns the text from the end of the last match to the end of the string. - The <replaceable>flags</> parameter is an optional text string containing + The <replaceable>flags</replaceable> parameter is an optional text string containing zero or more single-letter flags that change the function's behavior. <function>regexp_split_to_table</function> supports the flags described in <xref linkend="posix-embedded-options-table">. </para> <para> - The <function>regexp_split_to_array</> function behaves the same as - <function>regexp_split_to_table</>, except that <function>regexp_split_to_array</> - returns its result as an array of <type>text</>. It has the syntax - <function>regexp_split_to_array</function>(<replaceable>string</>, <replaceable>pattern</> - <optional>, <replaceable>flags</> </optional>). - The parameters are the same as for <function>regexp_split_to_table</>. + The <function>regexp_split_to_array</function> function behaves the same as + <function>regexp_split_to_table</function>, except that <function>regexp_split_to_array</function> + returns its result as an array of <type>text</type>. It has the syntax + <function>regexp_split_to_array</function>(<replaceable>string</replaceable>, <replaceable>pattern</replaceable> + <optional>, <replaceable>flags</replaceable> </optional>). + The parameters are the same as for <function>regexp_split_to_table</function>. </para> <para> @@ -4471,8 +4471,8 @@ SELECT foo FROM regexp_split_to_table('the quick brown fox', E'\\s*') AS foo; zero-length matches that occur at the start or end of the string or immediately after a previous match. This is contrary to the strict definition of regexp matching that is implemented by - <function>regexp_match</> and - <function>regexp_matches</>, but is usually the most convenient behavior + <function>regexp_match</function> and + <function>regexp_matches</function>, but is usually the most convenient behavior in practice. Other software systems such as Perl use similar definitions. </para> @@ -4491,16 +4491,16 @@ SELECT foo FROM regexp_split_to_table('the quick brown fox', E'\\s*') AS foo; <para> Regular expressions (<acronym>RE</acronym>s), as defined in <acronym>POSIX</acronym> 1003.2, come in two forms: - <firstterm>extended</> <acronym>RE</acronym>s or <acronym>ERE</>s + <firstterm>extended</firstterm> <acronym>RE</acronym>s or <acronym>ERE</acronym>s (roughly those of <command>egrep</command>), and - <firstterm>basic</> <acronym>RE</acronym>s or <acronym>BRE</>s + <firstterm>basic</firstterm> <acronym>RE</acronym>s or <acronym>BRE</acronym>s (roughly those of <command>ed</command>). <productname>PostgreSQL</productname> supports both forms, and also implements some extensions that are not in the POSIX standard, but have become widely used due to their availability in programming languages such as Perl and Tcl. <acronym>RE</acronym>s using these non-POSIX extensions are called - <firstterm>advanced</> <acronym>RE</acronym>s or <acronym>ARE</>s + <firstterm>advanced</firstterm> <acronym>RE</acronym>s or <acronym>ARE</acronym>s in this documentation. AREs are almost an exact superset of EREs, but BREs have several notational incompatibilities (as well as being much more limited). @@ -4510,9 +4510,9 @@ SELECT foo FROM regexp_split_to_table('the quick brown fox', E'\\s*') AS foo; <note> <para> - <productname>PostgreSQL</> always initially presumes that a regular + <productname>PostgreSQL</productname> always initially presumes that a regular expression follows the ARE rules. However, the more limited ERE or - BRE rules can be chosen by prepending an <firstterm>embedded option</> + BRE rules can be chosen by prepending an <firstterm>embedded option</firstterm> to the RE pattern, as described in <xref linkend="posix-metasyntax">. This can be useful for compatibility with applications that expect exactly the <acronym>POSIX</acronym> 1003.2 rules. @@ -4527,15 +4527,15 @@ SELECT foo FROM regexp_split_to_table('the quick brown fox', E'\\s*') AS foo; </para> <para> - A branch is zero or more <firstterm>quantified atoms</> or - <firstterm>constraints</>, concatenated. + A branch is zero or more <firstterm>quantified atoms</firstterm> or + <firstterm>constraints</firstterm>, concatenated. It matches a match for the first, followed by a match for the second, etc; an empty branch matches the empty string. </para> <para> - A quantified atom is an <firstterm>atom</> possibly followed - by a single <firstterm>quantifier</>. + A quantified atom is an <firstterm>atom</firstterm> possibly followed + by a single <firstterm>quantifier</firstterm>. Without a quantifier, it matches a match for the atom. With a quantifier, it can match some number of matches of the atom. An <firstterm>atom</firstterm> can be any of the possibilities @@ -4545,7 +4545,7 @@ SELECT foo FROM regexp_split_to_table('the quick brown fox', E'\\s*') AS foo; </para> <para> - A <firstterm>constraint</> matches an empty string, but matches only when + A <firstterm>constraint</firstterm> matches an empty string, but matches only when specific conditions are met. A constraint can be used where an atom could be used, except it cannot be followed by a quantifier. The simple constraints are shown in @@ -4567,57 +4567,57 @@ SELECT foo FROM regexp_split_to_table('the quick brown fox', E'\\s*') AS foo; <tbody> <row> - <entry> <literal>(</><replaceable>re</><literal>)</> </entry> - <entry> (where <replaceable>re</> is any regular expression) + <entry> <literal>(</literal><replaceable>re</replaceable><literal>)</literal> </entry> + <entry> (where <replaceable>re</replaceable> is any regular expression) matches a match for - <replaceable>re</>, with the match noted for possible reporting </entry> + <replaceable>re</replaceable>, with the match noted for possible reporting </entry> </row> <row> - <entry> <literal>(?:</><replaceable>re</><literal>)</> </entry> + <entry> <literal>(?:</literal><replaceable>re</replaceable><literal>)</literal> </entry> <entry> as above, but the match is not noted for reporting - (a <quote>non-capturing</> set of parentheses) + (a <quote>non-capturing</quote> set of parentheses) (AREs only) </entry> </row> <row> - <entry> <literal>.</> </entry> + <entry> <literal>.</literal> </entry> <entry> matches any single character </entry> </row> <row> - <entry> <literal>[</><replaceable>chars</><literal>]</> </entry> - <entry> a <firstterm>bracket expression</>, - matching any one of the <replaceable>chars</> (see + <entry> <literal>[</literal><replaceable>chars</replaceable><literal>]</literal> </entry> + <entry> a <firstterm>bracket expression</firstterm>, + matching any one of the <replaceable>chars</replaceable> (see <xref linkend="posix-bracket-expressions"> for more detail) </entry> </row> <row> - <entry> <literal>\</><replaceable>k</> </entry> - <entry> (where <replaceable>k</> is a non-alphanumeric character) + <entry> <literal>\</literal><replaceable>k</replaceable> </entry> + <entry> (where <replaceable>k</replaceable> is a non-alphanumeric character) matches that character taken as an ordinary character, - e.g., <literal>\\</> matches a backslash character </entry> + e.g., <literal>\\</literal> matches a backslash character </entry> </row> <row> - <entry> <literal>\</><replaceable>c</> </entry> - <entry> where <replaceable>c</> is alphanumeric + <entry> <literal>\</literal><replaceable>c</replaceable> </entry> + <entry> where <replaceable>c</replaceable> is alphanumeric (possibly followed by other characters) - is an <firstterm>escape</>, see <xref linkend="posix-escape-sequences"> - (AREs only; in EREs and BREs, this matches <replaceable>c</>) </entry> + is an <firstterm>escape</firstterm>, see <xref linkend="posix-escape-sequences"> + (AREs only; in EREs and BREs, this matches <replaceable>c</replaceable>) </entry> </row> <row> - <entry> <literal>{</> </entry> + <entry> <literal>{</literal> </entry> <entry> when followed by a character other than a digit, - matches the left-brace character <literal>{</>; + matches the left-brace character <literal>{</literal>; when followed by a digit, it is the beginning of a - <replaceable>bound</> (see below) </entry> + <replaceable>bound</replaceable> (see below) </entry> </row> <row> - <entry> <replaceable>x</> </entry> - <entry> where <replaceable>x</> is a single character with no other + <entry> <replaceable>x</replaceable> </entry> + <entry> where <replaceable>x</replaceable> is a single character with no other significance, matches that character </entry> </row> </tbody> @@ -4625,7 +4625,7 @@ SELECT foo FROM regexp_split_to_table('the quick brown fox', E'\\s*') AS foo; </table> <para> - An RE cannot end with a backslash (<literal>\</>). + An RE cannot end with a backslash (<literal>\</literal>). </para> <note> @@ -4649,82 +4649,82 @@ SELECT foo FROM regexp_split_to_table('the quick brown fox', E'\\s*') AS foo; <tbody> <row> - <entry> <literal>*</> </entry> + <entry> <literal>*</literal> </entry> <entry> a sequence of 0 or more matches of the atom </entry> </row> <row> - <entry> <literal>+</> </entry> + <entry> <literal>+</literal> </entry> <entry> a sequence of 1 or more matches of the atom </entry> </row> <row> - <entry> <literal>?</> </entry> + <entry> <literal>?</literal> </entry> <entry> a sequence of 0 or 1 matches of the atom </entry> </row> <row> - <entry> <literal>{</><replaceable>m</><literal>}</> </entry> - <entry> a sequence of exactly <replaceable>m</> matches of the atom </entry> + <entry> <literal>{</literal><replaceable>m</replaceable><literal>}</literal> </entry> + <entry> a sequence of exactly <replaceable>m</replaceable> matches of the atom </entry> </row> <row> - <entry> <literal>{</><replaceable>m</><literal>,}</> </entry> - <entry> a sequence of <replaceable>m</> or more matches of the atom </entry> + <entry> <literal>{</literal><replaceable>m</replaceable><literal>,}</literal> </entry> + <entry> a sequence of <replaceable>m</replaceable> or more matches of the atom </entry> </row> <row> <entry> - <literal>{</><replaceable>m</><literal>,</><replaceable>n</><literal>}</> </entry> - <entry> a sequence of <replaceable>m</> through <replaceable>n</> - (inclusive) matches of the atom; <replaceable>m</> cannot exceed - <replaceable>n</> </entry> + <literal>{</literal><replaceable>m</replaceable><literal>,</literal><replaceable>n</replaceable><literal>}</literal> </entry> + <entry> a sequence of <replaceable>m</replaceable> through <replaceable>n</replaceable> + (inclusive) matches of the atom; <replaceable>m</replaceable> cannot exceed + <replaceable>n</replaceable> </entry> </row> <row> - <entry> <literal>*?</> </entry> - <entry> non-greedy version of <literal>*</> </entry> + <entry> <literal>*?</literal> </entry> + <entry> non-greedy version of <literal>*</literal> </entry> </row> <row> - <entry> <literal>+?</> </entry> - <entry> non-greedy version of <literal>+</> </entry> + <entry> <literal>+?</literal> </entry> + <entry> non-greedy version of <literal>+</literal> </entry> </row> <row> - <entry> <literal>??</> </entry> - <entry> non-greedy version of <literal>?</> </entry> + <entry> <literal>??</literal> </entry> + <entry> non-greedy version of <literal>?</literal> </entry> </row> <row> - <entry> <literal>{</><replaceable>m</><literal>}?</> </entry> - <entry> non-greedy version of <literal>{</><replaceable>m</><literal>}</> </entry> + <entry> <literal>{</literal><replaceable>m</replaceable><literal>}?</literal> </entry> + <entry> non-greedy version of <literal>{</literal><replaceable>m</replaceable><literal>}</literal> </entry> </row> <row> - <entry> <literal>{</><replaceable>m</><literal>,}?</> </entry> - <entry> non-greedy version of <literal>{</><replaceable>m</><literal>,}</> </entry> + <entry> <literal>{</literal><replaceable>m</replaceable><literal>,}?</literal> </entry> + <entry> non-greedy version of <literal>{</literal><replaceable>m</replaceable><literal>,}</literal> </entry> </row> <row> <entry> - <literal>{</><replaceable>m</><literal>,</><replaceable>n</><literal>}?</> </entry> - <entry> non-greedy version of <literal>{</><replaceable>m</><literal>,</><replaceable>n</><literal>}</> </entry> + <literal>{</literal><replaceable>m</replaceable><literal>,</literal><replaceable>n</replaceable><literal>}?</literal> </entry> + <entry> non-greedy version of <literal>{</literal><replaceable>m</replaceable><literal>,</literal><replaceable>n</replaceable><literal>}</literal> </entry> </row> </tbody> </tgroup> </table> <para> - The forms using <literal>{</><replaceable>...</><literal>}</> - are known as <firstterm>bounds</>. - The numbers <replaceable>m</> and <replaceable>n</> within a bound are + The forms using <literal>{</literal><replaceable>...</replaceable><literal>}</literal> + are known as <firstterm>bounds</firstterm>. + The numbers <replaceable>m</replaceable> and <replaceable>n</replaceable> within a bound are unsigned decimal integers with permissible values from 0 to 255 inclusive. </para> <para> - <firstterm>Non-greedy</> quantifiers (available in AREs only) match the - same possibilities as their corresponding normal (<firstterm>greedy</>) + <firstterm>Non-greedy</firstterm> quantifiers (available in AREs only) match the + same possibilities as their corresponding normal (<firstterm>greedy</firstterm>) counterparts, but prefer the smallest number rather than the largest number of matches. See <xref linkend="posix-matching-rules"> for more detail. @@ -4733,7 +4733,7 @@ SELECT foo FROM regexp_split_to_table('the quick brown fox', E'\\s*') AS foo; <note> <para> A quantifier cannot immediately follow another quantifier, e.g., - <literal>**</> is invalid. + <literal>**</literal> is invalid. A quantifier cannot begin an expression or subexpression or follow <literal>^</literal> or <literal>|</literal>. @@ -4753,40 +4753,40 @@ SELECT foo FROM regexp_split_to_table('the quick brown fox', E'\\s*') AS foo; <tbody> <row> - <entry> <literal>^</> </entry> + <entry> <literal>^</literal> </entry> <entry> matches at the beginning of the string </entry> </row> <row> - <entry> <literal>$</> </entry> + <entry> <literal>$</literal> </entry> <entry> matches at the end of the string </entry> </row> <row> - <entry> <literal>(?=</><replaceable>re</><literal>)</> </entry> - <entry> <firstterm>positive lookahead</> matches at any point - where a substring matching <replaceable>re</> begins + <entry> <literal>(?=</literal><replaceable>re</replaceable><literal>)</literal> </entry> + <entry> <firstterm>positive lookahead</firstterm> matches at any point + where a substring matching <replaceable>re</replaceable> begins (AREs only) </entry> </row> <row> - <entry> <literal>(?!</><replaceable>re</><literal>)</> </entry> - <entry> <firstterm>negative lookahead</> matches at any point - where no substring matching <replaceable>re</> begins + <entry> <literal>(?!</literal><replaceable>re</replaceable><literal>)</literal> </entry> + <entry> <firstterm>negative lookahead</firstterm> matches at any point + where no substring matching <replaceable>re</replaceable> begins (AREs only) </entry> </row> <row> - <entry> <literal>(?<=</><replaceable>re</><literal>)</> </entry> - <entry> <firstterm>positive lookbehind</> matches at any point - where a substring matching <replaceable>re</> ends + <entry> <literal>(?<=</literal><replaceable>re</replaceable><literal>)</literal> </entry> + <entry> <firstterm>positive lookbehind</firstterm> matches at any point + where a substring matching <replaceable>re</replaceable> ends (AREs only) </entry> </row> <row> - <entry> <literal>(?<!</><replaceable>re</><literal>)</> </entry> - <entry> <firstterm>negative lookbehind</> matches at any point - where no substring matching <replaceable>re</> ends + <entry> <literal>(?<!</literal><replaceable>re</replaceable><literal>)</literal> </entry> + <entry> <firstterm>negative lookbehind</firstterm> matches at any point + where no substring matching <replaceable>re</replaceable> ends (AREs only) </entry> </row> </tbody> @@ -4795,7 +4795,7 @@ SELECT foo FROM regexp_split_to_table('the quick brown fox', E'\\s*') AS foo; <para> Lookahead and lookbehind constraints cannot contain <firstterm>back - references</> (see <xref linkend="posix-escape-sequences">), + references</firstterm> (see <xref linkend="posix-escape-sequences">), and all parentheses within them are considered non-capturing. </para> </sect3> @@ -4808,7 +4808,7 @@ SELECT foo FROM regexp_split_to_table('the quick brown fox', E'\\s*') AS foo; characters enclosed in <literal>[]</literal>. It normally matches any single character from the list (but see below). If the list begins with <literal>^</literal>, it matches any single character - <emphasis>not</> from the rest of the list. + <emphasis>not</emphasis> from the rest of the list. If two characters in the list are separated by <literal>-</literal>, this is shorthand for the full range of characters between those two @@ -4853,7 +4853,7 @@ SELECT foo FROM regexp_split_to_table('the quick brown fox', E'\\s*') AS foo; <note> <para> - <productname>PostgreSQL</> currently does not support multi-character collating + <productname>PostgreSQL</productname> currently does not support multi-character collating elements. This information describes possible future behavior. </para> </note> @@ -4861,7 +4861,7 @@ SELECT foo FROM regexp_split_to_table('the quick brown fox', E'\\s*') AS foo; <para> Within a bracket expression, a collating element enclosed in <literal>[=</literal> and <literal>=]</literal> is an <firstterm>equivalence - class</>, standing for the sequences of characters of all collating + class</firstterm>, standing for the sequences of characters of all collating elements equivalent to that one, including itself. (If there are no other equivalent collating elements, the treatment is as if the enclosing delimiters were <literal>[.</literal> and @@ -4896,7 +4896,7 @@ SELECT foo FROM regexp_split_to_table('the quick brown fox', E'\\s*') AS foo; matching empty strings at the beginning and end of a word respectively. A word is defined as a sequence of word characters that is neither preceded nor followed by word - characters. A word character is an <literal>alnum</> character (as + characters. A word character is an <literal>alnum</literal> character (as defined by <citerefentry><refentrytitle>ctype</refentrytitle><manvolnum>3</manvolnum></citerefentry>) or an underscore. This is an extension, compatible with but not @@ -4911,44 +4911,44 @@ SELECT foo FROM regexp_split_to_table('the quick brown fox', E'\\s*') AS foo; <title>Regular Expression Escapes</title> <para> - <firstterm>Escapes</> are special sequences beginning with <literal>\</> + <firstterm>Escapes</firstterm> are special sequences beginning with <literal>\</literal> followed by an alphanumeric character. Escapes come in several varieties: character entry, class shorthands, constraint escapes, and back references. - A <literal>\</> followed by an alphanumeric character but not constituting + A <literal>\</literal> followed by an alphanumeric character but not constituting a valid escape is illegal in AREs. In EREs, there are no escapes: outside a bracket expression, - a <literal>\</> followed by an alphanumeric character merely stands for + a <literal>\</literal> followed by an alphanumeric character merely stands for that character as an ordinary character, and inside a bracket expression, - <literal>\</> is an ordinary character. + <literal>\</literal> is an ordinary character. (The latter is the one actual incompatibility between EREs and AREs.) </para> <para> - <firstterm>Character-entry escapes</> exist to make it easier to specify + <firstterm>Character-entry escapes</firstterm> exist to make it easier to specify non-printing and other inconvenient characters in REs. They are shown in <xref linkend="posix-character-entry-escapes-table">. </para> <para> - <firstterm>Class-shorthand escapes</> provide shorthands for certain + <firstterm>Class-shorthand escapes</firstterm> provide shorthands for certain commonly-used character classes. They are shown in <xref linkend="posix-class-shorthand-escapes-table">. </para> <para> - A <firstterm>constraint escape</> is a constraint, + A <firstterm>constraint escape</firstterm> is a constraint, matching the empty string if specific conditions are met, written as an escape. They are shown in <xref linkend="posix-constraint-escapes-table">. </para> <para> - A <firstterm>back reference</> (<literal>\</><replaceable>n</>) matches the + A <firstterm>back reference</firstterm> (<literal>\</literal><replaceable>n</replaceable>) matches the same string matched by the previous parenthesized subexpression specified - by the number <replaceable>n</> + by the number <replaceable>n</replaceable> (see <xref linkend="posix-constraint-backref-table">). For example, - <literal>([bc])\1</> matches <literal>bb</> or <literal>cc</> - but not <literal>bc</> or <literal>cb</>. + <literal>([bc])\1</literal> matches <literal>bb</literal> or <literal>cc</literal> + but not <literal>bc</literal> or <literal>cb</literal>. The subexpression must entirely precede the back reference in the RE. Subexpressions are numbered in the order of their leading parentheses. Non-capturing parentheses do not define subexpressions. @@ -4967,122 +4967,122 @@ SELECT foo FROM regexp_split_to_table('the quick brown fox', E'\\s*') AS foo; <tbody> <row> - <entry> <literal>\a</> </entry> + <entry> <literal>\a</literal> </entry> <entry> alert (bell) character, as in C </entry> </row> <row> - <entry> <literal>\b</> </entry> + <entry> <literal>\b</literal> </entry> <entry> backspace, as in C </entry> </row> <row> - <entry> <literal>\B</> </entry> - <entry> synonym for backslash (<literal>\</>) to help reduce the need for backslash + <entry> <literal>\B</literal> </entry> + <entry> synonym for backslash (<literal>\</literal>) to help reduce the need for backslash doubling </entry> </row> <row> - <entry> <literal>\c</><replaceable>X</> </entry> - <entry> (where <replaceable>X</> is any character) the character whose + <entry> <literal>\c</literal><replaceable>X</replaceable> </entry> + <entry> (where <replaceable>X</replaceable> is any character) the character whose low-order 5 bits are the same as those of - <replaceable>X</>, and whose other bits are all zero </entry> + <replaceable>X</replaceable>, and whose other bits are all zero </entry> </row> <row> - <entry> <literal>\e</> </entry> + <entry> <literal>\e</literal> </entry> <entry> the character whose collating-sequence name - is <literal>ESC</>, - or failing that, the character with octal value <literal>033</> </entry> + is <literal>ESC</literal>, + or failing that, the character with octal value <literal>033</literal> </entry> </row> <row> - <entry> <literal>\f</> </entry> + <entry> <literal>\f</literal> </entry> <entry> form feed, as in C </entry> </row> <row> - <entry> <literal>\n</> </entry> + <entry> <literal>\n</literal> </entry> <entry> newline, as in C </entry> </row> <row> - <entry> <literal>\r</> </entry> + <entry> <literal>\r</literal> </entry> <entry> carriage return, as in C </entry> </row> <row> - <entry> <literal>\t</> </entry> + <entry> <literal>\t</literal> </entry> <entry> horizontal tab, as in C </entry> </row> <row> - <entry> <literal>\u</><replaceable>wxyz</> </entry> - <entry> (where <replaceable>wxyz</> is exactly four hexadecimal digits) + <entry> <literal>\u</literal><replaceable>wxyz</replaceable> </entry> + <entry> (where <replaceable>wxyz</replaceable> is exactly four hexadecimal digits) the character whose hexadecimal value is - <literal>0x</><replaceable>wxyz</> + <literal>0x</literal><replaceable>wxyz</replaceable> </entry> </row> <row> - <entry> <literal>\U</><replaceable>stuvwxyz</> </entry> - <entry> (where <replaceable>stuvwxyz</> is exactly eight hexadecimal + <entry> <literal>\U</literal><replaceable>stuvwxyz</replaceable> </entry> + <entry> (where <replaceable>stuvwxyz</replaceable> is exactly eight hexadecimal digits) the character whose hexadecimal value is - <literal>0x</><replaceable>stuvwxyz</> + <literal>0x</literal><replaceable>stuvwxyz</replaceable> </entry> </row> <row> - <entry> <literal>\v</> </entry> + <entry> <literal>\v</literal> </entry> <entry> vertical tab, as in C </entry> </row> <row> - <entry> <literal>\x</><replaceable>hhh</> </entry> - <entry> (where <replaceable>hhh</> is any sequence of hexadecimal + <entry> <literal>\x</literal><replaceable>hhh</replaceable> </entry> + <entry> (where <replaceable>hhh</replaceable> is any sequence of hexadecimal digits) the character whose hexadecimal value is - <literal>0x</><replaceable>hhh</> + <literal>0x</literal><replaceable>hhh</replaceable> (a single character no matter how many hexadecimal digits are used) </entry> </row> <row> - <entry> <literal>\0</> </entry> - <entry> the character whose value is <literal>0</> (the null byte)</entry> + <entry> <literal>\0</literal> </entry> + <entry> the character whose value is <literal>0</literal> (the null byte)</entry> </row> <row> - <entry> <literal>\</><replaceable>xy</> </entry> - <entry> (where <replaceable>xy</> is exactly two octal digits, - and is not a <firstterm>back reference</>) + <entry> <literal>\</literal><replaceable>xy</replaceable> </entry> + <entry> (where <replaceable>xy</replaceable> is exactly two octal digits, + and is not a <firstterm>back reference</firstterm>) the character whose octal value is - <literal>0</><replaceable>xy</> </entry> + <literal>0</literal><replaceable>xy</replaceable> </entry> </row> <row> - <entry> <literal>\</><replaceable>xyz</> </entry> - <entry> (where <replaceable>xyz</> is exactly three octal digits, - and is not a <firstterm>back reference</>) + <entry> <literal>\</literal><replaceable>xyz</replaceable> </entry> + <entry> (where <replaceable>xyz</replaceable> is exactly three octal digits, + and is not a <firstterm>back reference</firstterm>) the character whose octal value is - <literal>0</><replaceable>xyz</> </entry> + <literal>0</literal><replaceable>xyz</replaceable> </entry> </row> </tbody> </tgroup> </table> <para> - Hexadecimal digits are <literal>0</>-<literal>9</>, - <literal>a</>-<literal>f</>, and <literal>A</>-<literal>F</>. - Octal digits are <literal>0</>-<literal>7</>. + Hexadecimal digits are <literal>0</literal>-<literal>9</literal>, + <literal>a</literal>-<literal>f</literal>, and <literal>A</literal>-<literal>F</literal>. + Octal digits are <literal>0</literal>-<literal>7</literal>. </para> <para> Numeric character-entry escapes specifying values outside the ASCII range (0-127) have meanings dependent on the database encoding. When the encoding is UTF-8, escape values are equivalent to Unicode code points, - for example <literal>\u1234</> means the character <literal>U+1234</>. + for example <literal>\u1234</literal> means the character <literal>U+1234</literal>. For other multibyte encodings, character-entry escapes usually just specify the concatenation of the byte values for the character. If the escape value does not correspond to any legal character in the database @@ -5091,8 +5091,8 @@ SELECT foo FROM regexp_split_to_table('the quick brown fox', E'\\s*') AS foo; <para> The character-entry escapes are always taken as ordinary characters. - For example, <literal>\135</> is <literal>]</> in ASCII, but - <literal>\135</> does not terminate a bracket expression. + For example, <literal>\135</literal> is <literal>]</literal> in ASCII, but + <literal>\135</literal> does not terminate a bracket expression. </para> <table id="posix-class-shorthand-escapes-table"> @@ -5108,34 +5108,34 @@ SELECT foo FROM regexp_split_to_table('the quick brown fox', E'\\s*') AS foo; <tbody> <row> - <entry> <literal>\d</> </entry> - <entry> <literal>[[:digit:]]</> </entry> + <entry> <literal>\d</literal> </entry> + <entry> <literal>[[:digit:]]</literal> </entry> </row> <row> - <entry> <literal>\s</> </entry> - <entry> <literal>[[:space:]]</> </entry> + <entry> <literal>\s</literal> </entry> + <entry> <literal>[[:space:]]</literal> </entry> </row> <row> - <entry> <literal>\w</> </entry> - <entry> <literal>[[:alnum:]_]</> + <entry> <literal>\w</literal> </entry> + <entry> <literal>[[:alnum:]_]</literal> (note underscore is included) </entry> </row> <row> - <entry> <literal>\D</> </entry> - <entry> <literal>[^[:digit:]]</> </entry> + <entry> <literal>\D</literal> </entry> + <entry> <literal>[^[:digit:]]</literal> </entry> </row> <row> - <entry> <literal>\S</> </entry> - <entry> <literal>[^[:space:]]</> </entry> + <entry> <literal>\S</literal> </entry> + <entry> <literal>[^[:space:]]</literal> </entry> </row> <row> - <entry> <literal>\W</> </entry> - <entry> <literal>[^[:alnum:]_]</> + <entry> <literal>\W</literal> </entry> + <entry> <literal>[^[:alnum:]_]</literal> (note underscore is included) </entry> </row> </tbody> @@ -5143,13 +5143,13 @@ SELECT foo FROM regexp_split_to_table('the quick brown fox', E'\\s*') AS foo; </table> <para> - Within bracket expressions, <literal>\d</>, <literal>\s</>, - and <literal>\w</> lose their outer brackets, - and <literal>\D</>, <literal>\S</>, and <literal>\W</> are illegal. - (So, for example, <literal>[a-c\d]</> is equivalent to - <literal>[a-c[:digit:]]</>. - Also, <literal>[a-c\D]</>, which is equivalent to - <literal>[a-c^[:digit:]]</>, is illegal.) + Within bracket expressions, <literal>\d</literal>, <literal>\s</literal>, + and <literal>\w</literal> lose their outer brackets, + and <literal>\D</literal>, <literal>\S</literal>, and <literal>\W</literal> are illegal. + (So, for example, <literal>[a-c\d]</literal> is equivalent to + <literal>[a-c[:digit:]]</literal>. + Also, <literal>[a-c\D]</literal>, which is equivalent to + <literal>[a-c^[:digit:]]</literal>, is illegal.) </para> <table id="posix-constraint-escapes-table"> @@ -5165,38 +5165,38 @@ SELECT foo FROM regexp_split_to_table('the quick brown fox', E'\\s*') AS foo; <tbody> <row> - <entry> <literal>\A</> </entry> + <entry> <literal>\A</literal> </entry> <entry> matches only at the beginning of the string (see <xref linkend="posix-matching-rules"> for how this differs from - <literal>^</>) </entry> + <literal>^</literal>) </entry> </row> <row> - <entry> <literal>\m</> </entry> + <entry> <literal>\m</literal> </entry> <entry> matches only at the beginning of a word </entry> </row> <row> - <entry> <literal>\M</> </entry> + <entry> <literal>\M</literal> </entry> <entry> matches only at the end of a word </entry> </row> <row> - <entry> <literal>\y</> </entry> + <entry> <literal>\y</literal> </entry> <entry> matches only at the beginning or end of a word </entry> </row> <row> - <entry> <literal>\Y</> </entry> + <entry> <literal>\Y</literal> </entry> <entry> matches only at a point that is not the beginning or end of a word </entry> </row> <row> - <entry> <literal>\Z</> </entry> + <entry> <literal>\Z</literal> </entry> <entry> matches only at the end of the string (see <xref linkend="posix-matching-rules"> for how this differs from - <literal>$</>) </entry> + <literal>$</literal>) </entry> </row> </tbody> </tgroup> @@ -5204,7 +5204,7 @@ SELECT foo FROM regexp_split_to_table('the quick brown fox', E'\\s*') AS foo; <para> A word is defined as in the specification of - <literal>[[:<:]]</> and <literal>[[:>:]]</> above. + <literal>[[:<:]]</literal> and <literal>[[:>:]]</literal> above. Constraint escapes are illegal within bracket expressions. </para> @@ -5221,18 +5221,18 @@ SELECT foo FROM regexp_split_to_table('the quick brown fox', E'\\s*') AS foo; <tbody> <row> - <entry> <literal>\</><replaceable>m</> </entry> - <entry> (where <replaceable>m</> is a nonzero digit) - a back reference to the <replaceable>m</>'th subexpression </entry> + <entry> <literal>\</literal><replaceable>m</replaceable> </entry> + <entry> (where <replaceable>m</replaceable> is a nonzero digit) + a back reference to the <replaceable>m</replaceable>'th subexpression </entry> </row> <row> - <entry> <literal>\</><replaceable>mnn</> </entry> - <entry> (where <replaceable>m</> is a nonzero digit, and - <replaceable>nn</> is some more digits, and the decimal value - <replaceable>mnn</> is not greater than the number of closing capturing + <entry> <literal>\</literal><replaceable>mnn</replaceable> </entry> + <entry> (where <replaceable>m</replaceable> is a nonzero digit, and + <replaceable>nn</replaceable> is some more digits, and the decimal value + <replaceable>mnn</replaceable> is not greater than the number of closing capturing parentheses seen so far) - a back reference to the <replaceable>mnn</>'th subexpression </entry> + a back reference to the <replaceable>mnn</replaceable>'th subexpression </entry> </row> </tbody> </tgroup> @@ -5263,29 +5263,29 @@ SELECT foo FROM regexp_split_to_table('the quick brown fox', E'\\s*') AS foo; </para> <para> - An RE can begin with one of two special <firstterm>director</> prefixes. - If an RE begins with <literal>***:</>, + An RE can begin with one of two special <firstterm>director</firstterm> prefixes. + If an RE begins with <literal>***:</literal>, the rest of the RE is taken as an ARE. (This normally has no effect in - <productname>PostgreSQL</>, since REs are assumed to be AREs; + <productname>PostgreSQL</productname>, since REs are assumed to be AREs; but it does have an effect if ERE or BRE mode had been specified by - the <replaceable>flags</> parameter to a regex function.) - If an RE begins with <literal>***=</>, + the <replaceable>flags</replaceable> parameter to a regex function.) + If an RE begins with <literal>***=</literal>, the rest of the RE is taken to be a literal string, with all characters considered ordinary characters. </para> <para> - An ARE can begin with <firstterm>embedded options</>: - a sequence <literal>(?</><replaceable>xyz</><literal>)</> - (where <replaceable>xyz</> is one or more alphabetic characters) + An ARE can begin with <firstterm>embedded options</firstterm>: + a sequence <literal>(?</literal><replaceable>xyz</replaceable><literal>)</literal> + (where <replaceable>xyz</replaceable> is one or more alphabetic characters) specifies options affecting the rest of the RE. These options override any previously determined options — in particular, they can override the case-sensitivity behavior implied by - a regex operator, or the <replaceable>flags</> parameter to a regex + a regex operator, or the <replaceable>flags</replaceable> parameter to a regex function. The available option letters are shown in <xref linkend="posix-embedded-options-table">. - Note that these same option letters are used in the <replaceable>flags</> + Note that these same option letters are used in the <replaceable>flags</replaceable> parameters of regex functions. </para> @@ -5302,67 +5302,67 @@ SELECT foo FROM regexp_split_to_table('the quick brown fox', E'\\s*') AS foo; <tbody> <row> - <entry> <literal>b</> </entry> + <entry> <literal>b</literal> </entry> <entry> rest of RE is a BRE </entry> </row> <row> - <entry> <literal>c</> </entry> + <entry> <literal>c</literal> </entry> <entry> case-sensitive matching (overrides operator type) </entry> </row> <row> - <entry> <literal>e</> </entry> + <entry> <literal>e</literal> </entry> <entry> rest of RE is an ERE </entry> </row> <row> - <entry> <literal>i</> </entry> + <entry> <literal>i</literal> </entry> <entry> case-insensitive matching (see <xref linkend="posix-matching-rules">) (overrides operator type) </entry> </row> <row> - <entry> <literal>m</> </entry> - <entry> historical synonym for <literal>n</> </entry> + <entry> <literal>m</literal> </entry> + <entry> historical synonym for <literal>n</literal> </entry> </row> <row> - <entry> <literal>n</> </entry> + <entry> <literal>n</literal> </entry> <entry> newline-sensitive matching (see <xref linkend="posix-matching-rules">) </entry> </row> <row> - <entry> <literal>p</> </entry> + <entry> <literal>p</literal> </entry> <entry> partial newline-sensitive matching (see <xref linkend="posix-matching-rules">) </entry> </row> <row> - <entry> <literal>q</> </entry> - <entry> rest of RE is a literal (<quote>quoted</>) string, all ordinary + <entry> <literal>q</literal> </entry> + <entry> rest of RE is a literal (<quote>quoted</quote>) string, all ordinary characters </entry> </row> <row> - <entry> <literal>s</> </entry> + <entry> <literal>s</literal> </entry> <entry> non-newline-sensitive matching (default) </entry> </row> <row> - <entry> <literal>t</> </entry> + <entry> <literal>t</literal> </entry> <entry> tight syntax (default; see below) </entry> </row> <row> - <entry> <literal>w</> </entry> - <entry> inverse partial newline-sensitive (<quote>weird</>) matching + <entry> <literal>w</literal> </entry> + <entry> inverse partial newline-sensitive (<quote>weird</quote>) matching (see <xref linkend="posix-matching-rules">) </entry> </row> <row> - <entry> <literal>x</> </entry> + <entry> <literal>x</literal> </entry> <entry> expanded syntax (see below) </entry> </row> </tbody> @@ -5370,18 +5370,18 @@ SELECT foo FROM regexp_split_to_table('the quick brown fox', E'\\s*') AS foo; </table> <para> - Embedded options take effect at the <literal>)</> terminating the sequence. + Embedded options take effect at the <literal>)</literal> terminating the sequence. They can appear only at the start of an ARE (after the - <literal>***:</> director if any). + <literal>***:</literal> director if any). </para> <para> - In addition to the usual (<firstterm>tight</>) RE syntax, in which all - characters are significant, there is an <firstterm>expanded</> syntax, - available by specifying the embedded <literal>x</> option. + In addition to the usual (<firstterm>tight</firstterm>) RE syntax, in which all + characters are significant, there is an <firstterm>expanded</firstterm> syntax, + available by specifying the embedded <literal>x</literal> option. In the expanded syntax, white-space characters in the RE are ignored, as are - all characters between a <literal>#</> + all characters between a <literal>#</literal> and the following newline (or the end of the RE). This permits paragraphing and commenting a complex RE. There are three exceptions to that basic rule: @@ -5389,41 +5389,41 @@ SELECT foo FROM regexp_split_to_table('the quick brown fox', E'\\s*') AS foo; <itemizedlist> <listitem> <para> - a white-space character or <literal>#</> preceded by <literal>\</> is + a white-space character or <literal>#</literal> preceded by <literal>\</literal> is retained </para> </listitem> <listitem> <para> - white space or <literal>#</> within a bracket expression is retained + white space or <literal>#</literal> within a bracket expression is retained </para> </listitem> <listitem> <para> white space and comments cannot appear within multi-character symbols, - such as <literal>(?:</> + such as <literal>(?:</literal> </para> </listitem> </itemizedlist> For this purpose, white-space characters are blank, tab, newline, and - any character that belongs to the <replaceable>space</> character class. + any character that belongs to the <replaceable>space</replaceable> character class. </para> <para> Finally, in an ARE, outside bracket expressions, the sequence - <literal>(?#</><replaceable>ttt</><literal>)</> - (where <replaceable>ttt</> is any text not containing a <literal>)</>) + <literal>(?#</literal><replaceable>ttt</replaceable><literal>)</literal> + (where <replaceable>ttt</replaceable> is any text not containing a <literal>)</literal>) is a comment, completely ignored. Again, this is not allowed between the characters of - multi-character symbols, like <literal>(?:</>. + multi-character symbols, like <literal>(?:</literal>. Such comments are more a historical artifact than a useful facility, and their use is deprecated; use the expanded syntax instead. </para> <para> - <emphasis>None</> of these metasyntax extensions is available if - an initial <literal>***=</> director + <emphasis>None</emphasis> of these metasyntax extensions is available if + an initial <literal>***=</literal> director has specified that the user's input be treated as a literal string rather than as an RE. </para> @@ -5437,8 +5437,8 @@ SELECT foo FROM regexp_split_to_table('the quick brown fox', E'\\s*') AS foo; string, the RE matches the one starting earliest in the string. If the RE could match more than one substring starting at that point, either the longest possible match or the shortest possible match will - be taken, depending on whether the RE is <firstterm>greedy</> or - <firstterm>non-greedy</>. + be taken, depending on whether the RE is <firstterm>greedy</firstterm> or + <firstterm>non-greedy</firstterm>. </para> <para> @@ -5458,39 +5458,39 @@ SELECT foo FROM regexp_split_to_table('the quick brown fox', E'\\s*') AS foo; <listitem> <para> A quantified atom with a fixed-repetition quantifier - (<literal>{</><replaceable>m</><literal>}</> + (<literal>{</literal><replaceable>m</replaceable><literal>}</literal> or - <literal>{</><replaceable>m</><literal>}?</>) + <literal>{</literal><replaceable>m</replaceable><literal>}?</literal>) has the same greediness (possibly none) as the atom itself. </para> </listitem> <listitem> <para> A quantified atom with other normal quantifiers (including - <literal>{</><replaceable>m</><literal>,</><replaceable>n</><literal>}</> - with <replaceable>m</> equal to <replaceable>n</>) + <literal>{</literal><replaceable>m</replaceable><literal>,</literal><replaceable>n</replaceable><literal>}</literal> + with <replaceable>m</replaceable> equal to <replaceable>n</replaceable>) is greedy (prefers longest match). </para> </listitem> <listitem> <para> A quantified atom with a non-greedy quantifier (including - <literal>{</><replaceable>m</><literal>,</><replaceable>n</><literal>}?</> - with <replaceable>m</> equal to <replaceable>n</>) + <literal>{</literal><replaceable>m</replaceable><literal>,</literal><replaceable>n</replaceable><literal>}?</literal> + with <replaceable>m</replaceable> equal to <replaceable>n</replaceable>) is non-greedy (prefers shortest match). </para> </listitem> <listitem> <para> A branch — that is, an RE that has no top-level - <literal>|</> operator — has the same greediness as the first + <literal>|</literal> operator — has the same greediness as the first quantified atom in it that has a greediness attribute. </para> </listitem> <listitem> <para> An RE consisting of two or more branches connected by the - <literal>|</> operator is always greedy. + <literal>|</literal> operator is always greedy. </para> </listitem> </itemizedlist> @@ -5501,7 +5501,7 @@ SELECT foo FROM regexp_split_to_table('the quick brown fox', E'\\s*') AS foo; quantified atoms, but with branches and entire REs that contain quantified atoms. What that means is that the matching is done in such a way that the branch, or whole RE, matches the longest or shortest possible - substring <emphasis>as a whole</>. Once the length of the entire match + substring <emphasis>as a whole</emphasis>. Once the length of the entire match is determined, the part of it that matches any particular subexpression is determined on the basis of the greediness attribute of that subexpression, with subexpressions starting earlier in the RE taking @@ -5516,16 +5516,16 @@ SELECT SUBSTRING('XY1234Z', 'Y*([0-9]{1,3})'); SELECT SUBSTRING('XY1234Z', 'Y*?([0-9]{1,3})'); <lineannotation>Result: </lineannotation><computeroutput>1</computeroutput> </screen> - In the first case, the RE as a whole is greedy because <literal>Y*</> - is greedy. It can match beginning at the <literal>Y</>, and it matches - the longest possible string starting there, i.e., <literal>Y123</>. - The output is the parenthesized part of that, or <literal>123</>. - In the second case, the RE as a whole is non-greedy because <literal>Y*?</> - is non-greedy. It can match beginning at the <literal>Y</>, and it matches - the shortest possible string starting there, i.e., <literal>Y1</>. - The subexpression <literal>[0-9]{1,3}</> is greedy but it cannot change + In the first case, the RE as a whole is greedy because <literal>Y*</literal> + is greedy. It can match beginning at the <literal>Y</literal>, and it matches + the longest possible string starting there, i.e., <literal>Y123</literal>. + The output is the parenthesized part of that, or <literal>123</literal>. + In the second case, the RE as a whole is non-greedy because <literal>Y*?</literal> + is non-greedy. It can match beginning at the <literal>Y</literal>, and it matches + the shortest possible string starting there, i.e., <literal>Y1</literal>. + The subexpression <literal>[0-9]{1,3}</literal> is greedy but it cannot change the decision as to the overall match length; so it is forced to match - just <literal>1</>. + just <literal>1</literal>. </para> <para> @@ -5533,11 +5533,11 @@ SELECT SUBSTRING('XY1234Z', 'Y*?([0-9]{1,3})'); the total match length is either as long as possible or as short as possible, according to the attribute assigned to the whole RE. The attributes assigned to the subexpressions only affect how much of that - match they are allowed to <quote>eat</> relative to each other. + match they are allowed to <quote>eat</quote> relative to each other. </para> <para> - The quantifiers <literal>{1,1}</> and <literal>{1,1}?</> + The quantifiers <literal>{1,1}</literal> and <literal>{1,1}?</literal> can be used to force greediness or non-greediness, respectively, on a subexpression or a whole RE. This is useful when you need the whole RE to have a greediness attribute @@ -5549,8 +5549,8 @@ SELECT SUBSTRING('XY1234Z', 'Y*?([0-9]{1,3})'); SELECT regexp_match('abc01234xyz', '(.*)(\d+)(.*)'); <lineannotation>Result: </lineannotation><computeroutput>{abc0123,4,xyz}</computeroutput> </screen> - That didn't work: the first <literal>.*</> is greedy so - it <quote>eats</> as much as it can, leaving the <literal>\d+</> to + That didn't work: the first <literal>.*</literal> is greedy so + it <quote>eats</quote> as much as it can, leaving the <literal>\d+</literal> to match at the last possible place, the last digit. We might try to fix that by making it non-greedy: <screen> @@ -5573,14 +5573,14 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}'); match lengths are measured in characters, not collating elements. An empty string is considered longer than no match at all. For example: - <literal>bb*</> - matches the three middle characters of <literal>abbbc</>; - <literal>(week|wee)(night|knights)</> - matches all ten characters of <literal>weeknights</>; - when <literal>(.*).*</> - is matched against <literal>abc</> the parenthesized subexpression + <literal>bb*</literal> + matches the three middle characters of <literal>abbbc</literal>; + <literal>(week|wee)(night|knights)</literal> + matches all ten characters of <literal>weeknights</literal>; + when <literal>(.*).*</literal> + is matched against <literal>abc</literal> the parenthesized subexpression matches all three characters; and when - <literal>(a*)*</> is matched against <literal>bc</> + <literal>(a*)*</literal> is matched against <literal>bc</literal> both the whole RE and the parenthesized subexpression match an empty string. </para> @@ -5592,38 +5592,38 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}'); When an alphabetic that exists in multiple cases appears as an ordinary character outside a bracket expression, it is effectively transformed into a bracket expression containing both cases, - e.g., <literal>x</> becomes <literal>[xX]</>. + e.g., <literal>x</literal> becomes <literal>[xX]</literal>. When it appears inside a bracket expression, all case counterparts of it are added to the bracket expression, e.g., - <literal>[x]</> becomes <literal>[xX]</> - and <literal>[^x]</> becomes <literal>[^xX]</>. + <literal>[x]</literal> becomes <literal>[xX]</literal> + and <literal>[^x]</literal> becomes <literal>[^xX]</literal>. </para> <para> - If newline-sensitive matching is specified, <literal>.</> - and bracket expressions using <literal>^</> + If newline-sensitive matching is specified, <literal>.</literal> + and bracket expressions using <literal>^</literal> will never match the newline character (so that matches will never cross newlines unless the RE explicitly arranges it) - and <literal>^</> and <literal>$</> + and <literal>^</literal> and <literal>$</literal> will match the empty string after and before a newline respectively, in addition to matching at beginning and end of string respectively. - But the ARE escapes <literal>\A</> and <literal>\Z</> - continue to match beginning or end of string <emphasis>only</>. + But the ARE escapes <literal>\A</literal> and <literal>\Z</literal> + continue to match beginning or end of string <emphasis>only</emphasis>. </para> <para> If partial newline-sensitive matching is specified, - this affects <literal>.</> and bracket expressions - as with newline-sensitive matching, but not <literal>^</> - and <literal>$</>. + this affects <literal>.</literal> and bracket expressions + as with newline-sensitive matching, but not <literal>^</literal> + and <literal>$</literal>. </para> <para> If inverse partial newline-sensitive matching is specified, - this affects <literal>^</> and <literal>$</> - as with newline-sensitive matching, but not <literal>.</> + this affects <literal>^</literal> and <literal>$</literal> + as with newline-sensitive matching, but not <literal>.</literal> and bracket expressions. This isn't very useful but is provided for symmetry. </para> @@ -5642,18 +5642,18 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}'); <para> The only feature of AREs that is actually incompatible with - POSIX EREs is that <literal>\</> does not lose its special + POSIX EREs is that <literal>\</literal> does not lose its special significance inside bracket expressions. All other ARE features use syntax which is illegal or has undefined or unspecified effects in POSIX EREs; - the <literal>***</> syntax of directors likewise is outside the POSIX + the <literal>***</literal> syntax of directors likewise is outside the POSIX syntax for both BREs and EREs. </para> <para> Many of the ARE extensions are borrowed from Perl, but some have been changed to clean them up, and a few Perl extensions are not present. - Incompatibilities of note include <literal>\b</>, <literal>\B</>, + Incompatibilities of note include <literal>\b</literal>, <literal>\B</literal>, the lack of special treatment for a trailing newline, the addition of complemented bracket expressions to the things affected by newline-sensitive matching, @@ -5664,12 +5664,12 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}'); <para> Two significant incompatibilities exist between AREs and the ERE syntax - recognized by pre-7.4 releases of <productname>PostgreSQL</>: + recognized by pre-7.4 releases of <productname>PostgreSQL</productname>: <itemizedlist> <listitem> <para> - In AREs, <literal>\</> followed by an alphanumeric character is either + In AREs, <literal>\</literal> followed by an alphanumeric character is either an escape or an error, while in previous releases, it was just another way of writing the alphanumeric. This should not be much of a problem because there was no reason to @@ -5678,9 +5678,9 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}'); </listitem> <listitem> <para> - In AREs, <literal>\</> remains a special character within - <literal>[]</>, so a literal <literal>\</> within a bracket - expression must be written <literal>\\</>. + In AREs, <literal>\</literal> remains a special character within + <literal>[]</literal>, so a literal <literal>\</literal> within a bracket + expression must be written <literal>\\</literal>. </para> </listitem> </itemizedlist> @@ -5692,27 +5692,27 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}'); <para> BREs differ from EREs in several respects. - In BREs, <literal>|</>, <literal>+</>, and <literal>?</> + In BREs, <literal>|</literal>, <literal>+</literal>, and <literal>?</literal> are ordinary characters and there is no equivalent for their functionality. The delimiters for bounds are - <literal>\{</> and <literal>\}</>, - with <literal>{</> and <literal>}</> + <literal>\{</literal> and <literal>\}</literal>, + with <literal>{</literal> and <literal>}</literal> by themselves ordinary characters. The parentheses for nested subexpressions are - <literal>\(</> and <literal>\)</>, - with <literal>(</> and <literal>)</> by themselves ordinary characters. - <literal>^</> is an ordinary character except at the beginning of the + <literal>\(</literal> and <literal>\)</literal>, + with <literal>(</literal> and <literal>)</literal> by themselves ordinary characters. + <literal>^</literal> is an ordinary character except at the beginning of the RE or the beginning of a parenthesized subexpression, - <literal>$</> is an ordinary character except at the end of the + <literal>$</literal> is an ordinary character except at the end of the RE or the end of a parenthesized subexpression, - and <literal>*</> is an ordinary character if it appears at the beginning + and <literal>*</literal> is an ordinary character if it appears at the beginning of the RE or the beginning of a parenthesized subexpression - (after a possible leading <literal>^</>). + (after a possible leading <literal>^</literal>). Finally, single-digit back references are available, and - <literal>\<</> and <literal>\></> + <literal>\<</literal> and <literal>\></literal> are synonyms for - <literal>[[:<:]]</> and <literal>[[:>:]]</> + <literal>[[:<:]]</literal> and <literal>[[:>:]]</literal> respectively; no other escapes are available in BREs. </para> </sect3> @@ -5839,13 +5839,13 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}'); exist to handle input formats that cannot be converted by simple casting. For most standard date/time formats, simply casting the source string to the required data type works, and is much easier. - Similarly, <function>to_number</> is unnecessary for standard numeric + Similarly, <function>to_number</function> is unnecessary for standard numeric representations. </para> </tip> <para> - In a <function>to_char</> output template string, there are certain + In a <function>to_char</function> output template string, there are certain patterns that are recognized and replaced with appropriately-formatted data based on the given value. Any text that is not a template pattern is simply copied verbatim. Similarly, in an input template string (for the @@ -6022,11 +6022,11 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}'); </row> <row> <entry><literal>D</literal></entry> - <entry>day of the week, Sunday (<literal>1</>) to Saturday (<literal>7</>)</entry> + <entry>day of the week, Sunday (<literal>1</literal>) to Saturday (<literal>7</literal>)</entry> </row> <row> <entry><literal>ID</literal></entry> - <entry>ISO 8601 day of the week, Monday (<literal>1</>) to Sunday (<literal>7</>)</entry> + <entry>ISO 8601 day of the week, Monday (<literal>1</literal>) to Sunday (<literal>7</literal>)</entry> </row> <row> <entry><literal>W</literal></entry> @@ -6063,17 +6063,17 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}'); <row> <entry><literal>TZ</literal></entry> <entry>upper case time-zone abbreviation - (only supported in <function>to_char</>)</entry> + (only supported in <function>to_char</function>)</entry> </row> <row> <entry><literal>tz</literal></entry> <entry>lower case time-zone abbreviation - (only supported in <function>to_char</>)</entry> + (only supported in <function>to_char</function>)</entry> </row> <row> <entry><literal>OF</literal></entry> <entry>time-zone offset from UTC - (only supported in <function>to_char</>)</entry> + (only supported in <function>to_char</function>)</entry> </row> </tbody> </tgroup> @@ -6107,12 +6107,12 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}'); <row> <entry><literal>TH</literal> suffix</entry> <entry>upper case ordinal number suffix</entry> - <entry><literal>DDTH</literal>, e.g., <literal>12TH</></entry> + <entry><literal>DDTH</literal>, e.g., <literal>12TH</literal></entry> </row> <row> <entry><literal>th</literal> suffix</entry> <entry>lower case ordinal number suffix</entry> - <entry><literal>DDth</literal>, e.g., <literal>12th</></entry> + <entry><literal>DDth</literal>, e.g., <literal>12th</literal></entry> </row> <row> <entry><literal>FX</literal> prefix</entry> @@ -6153,7 +6153,7 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}'); <listitem> <para> <literal>TM</literal> does not include trailing blanks. - <function>to_timestamp</> and <function>to_date</> ignore + <function>to_timestamp</function> and <function>to_date</function> ignore the <literal>TM</literal> modifier. </para> </listitem> @@ -6179,9 +6179,9 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}'); even if it contains pattern key words. For example, in <literal>'"Hello Year "YYYY'</literal>, the <literal>YYYY</literal> will be replaced by the year data, but the single <literal>Y</literal> in <literal>Year</literal> - will not be. In <function>to_date</>, <function>to_number</>, - and <function>to_timestamp</>, double-quoted strings skip the number of - input characters contained in the string, e.g. <literal>"XX"</> + will not be. In <function>to_date</function>, <function>to_number</function>, + and <function>to_timestamp</function>, double-quoted strings skip the number of + input characters contained in the string, e.g. <literal>"XX"</literal> skips two input characters. </para> </listitem> @@ -6198,9 +6198,9 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}'); <para> In <function>to_timestamp</function> and <function>to_date</function>, if the year format specification is less than four digits, e.g. - <literal>YYY</>, and the supplied year is less than four digits, + <literal>YYY</literal>, and the supplied year is less than four digits, the year will be adjusted to be nearest to the year 2020, e.g. - <literal>95</> becomes 1995. + <literal>95</literal> becomes 1995. </para> </listitem> @@ -6269,7 +6269,7 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}'); Attempting to enter a date using a mixture of ISO 8601 week-numbering fields and Gregorian date fields is nonsensical, and will cause an error. In the context of an ISO 8601 week-numbering year, the - concept of a <quote>month</> or <quote>day of month</> has no + concept of a <quote>month</quote> or <quote>day of month</quote> has no meaning. In the context of a Gregorian year, the ISO week has no meaning. </para> @@ -6278,8 +6278,8 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}'); While <function>to_date</function> will reject a mixture of Gregorian and ISO week-numbering date fields, <function>to_char</function> will not, since output format - specifications like <literal>YYYY-MM-DD (IYYY-IDDD)</> can be - useful. But avoid writing something like <literal>IYYY-MM-DD</>; + specifications like <literal>YYYY-MM-DD (IYYY-IDDD)</literal> can be + useful. But avoid writing something like <literal>IYYY-MM-DD</literal>; that would yield surprising results near the start of the year. (See <xref linkend="functions-datetime-extract"> for more information.) @@ -6323,11 +6323,11 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}'); <listitem> <para> - <function>to_char(interval)</function> formats <literal>HH</> and - <literal>HH12</> as shown on a 12-hour clock, for example zero hours - and 36 hours both output as <literal>12</>, while <literal>HH24</> + <function>to_char(interval)</function> formats <literal>HH</literal> and + <literal>HH12</literal> as shown on a 12-hour clock, for example zero hours + and 36 hours both output as <literal>12</literal>, while <literal>HH24</literal> outputs the full hour value, which can exceed 23 in - an <type>interval</> value. + an <type>interval</type> value. </para> </listitem> @@ -6423,19 +6423,19 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}'); <itemizedlist> <listitem> <para> - <literal>0</> specifies a digit position that will always be printed, - even if it contains a leading/trailing zero. <literal>9</> also + <literal>0</literal> specifies a digit position that will always be printed, + even if it contains a leading/trailing zero. <literal>9</literal> also specifies a digit position, but if it is a leading zero then it will be replaced by a space, while if it is a trailing zero and fill mode - is specified then it will be deleted. (For <function>to_number()</>, + is specified then it will be deleted. (For <function>to_number()</function>, these two pattern characters are equivalent.) </para> </listitem> <listitem> <para> - The pattern characters <literal>S</>, <literal>L</>, <literal>D</>, - and <literal>G</> represent the sign, currency symbol, decimal point, + The pattern characters <literal>S</literal>, <literal>L</literal>, <literal>D</literal>, + and <literal>G</literal> represent the sign, currency symbol, decimal point, and thousands separator characters defined by the current locale (see <xref linkend="guc-lc-monetary"> and <xref linkend="guc-lc-numeric">). The pattern characters period @@ -6447,9 +6447,9 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}'); <listitem> <para> If no explicit provision is made for a sign - in <function>to_char()</>'s pattern, one column will be reserved for + in <function>to_char()</function>'s pattern, one column will be reserved for the sign, and it will be anchored to (appear just left of) the - number. If <literal>S</> appears just left of some <literal>9</>'s, + number. If <literal>S</literal> appears just left of some <literal>9</literal>'s, it will likewise be anchored to the number. </para> </listitem> @@ -6742,7 +6742,7 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}'); inputs actually come in two variants: one that takes <type>time with time zone</type> or <type>timestamp with time zone</type>, and one that takes <type>time without time zone</type> or <type>timestamp without time zone</type>. For brevity, these variants are not shown separately. Also, the - <literal>+</> and <literal>*</> operators come in commutative pairs (for + <literal>+</literal> and <literal>*</literal> operators come in commutative pairs (for example both date + integer and integer + date); we show only one of each such pair. </para> @@ -6899,7 +6899,7 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}'); <literal><function>age(<type>timestamp</type>, <type>timestamp</type>)</function></literal> </entry> <entry><type>interval</type></entry> - <entry>Subtract arguments, producing a <quote>symbolic</> result that + <entry>Subtract arguments, producing a <quote>symbolic</quote> result that uses years and months, rather than just days</entry> <entry><literal>age(timestamp '2001-04-10', timestamp '1957-06-13')</literal></entry> <entry><literal>43 years 9 mons 27 days</literal></entry> @@ -7109,7 +7109,7 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}'); <literal><function>justify_interval(<type>interval</type>)</function></literal> </entry> <entry><type>interval</type></entry> - <entry>Adjust interval using <function>justify_days</> and <function>justify_hours</>, with additional sign adjustments</entry> + <entry>Adjust interval using <function>justify_days</function> and <function>justify_hours</function>, with additional sign adjustments</entry> <entry><literal>justify_interval(interval '1 mon -1 hour')</literal></entry> <entry><literal>29 days 23:00:00</literal></entry> </row> @@ -7302,7 +7302,7 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}'); </entry> <entry><type>text</type></entry> <entry>Current date and time - (like <function>clock_timestamp</>, but as a <type>text</> string); + (like <function>clock_timestamp</function>, but as a <type>text</type> string); see <xref linkend="functions-datetime-current"> </entry> <entry></entry> @@ -7344,7 +7344,7 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}'); <indexterm> <primary>OVERLAPS</primary> </indexterm> - In addition to these functions, the SQL <literal>OVERLAPS</> operator is + In addition to these functions, the SQL <literal>OVERLAPS</literal> operator is supported: <synopsis> (<replaceable>start1</replaceable>, <replaceable>end1</replaceable>) OVERLAPS (<replaceable>start2</replaceable>, <replaceable>end2</replaceable>) @@ -7355,11 +7355,11 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}'); can be specified as pairs of dates, times, or time stamps; or as a date, time, or time stamp followed by an interval. When a pair of values is provided, either the start or the end can be written - first; <literal>OVERLAPS</> automatically takes the earlier value + first; <literal>OVERLAPS</literal> automatically takes the earlier value of the pair as the start. Each time period is considered to - represent the half-open interval <replaceable>start</> <literal><=</> - <replaceable>time</> <literal><</> <replaceable>end</>, unless - <replaceable>start</> and <replaceable>end</> are equal in which case it + represent the half-open interval <replaceable>start</replaceable> <literal><=</literal> + <replaceable>time</replaceable> <literal><</literal> <replaceable>end</replaceable>, unless + <replaceable>start</replaceable> and <replaceable>end</replaceable> are equal in which case it represents that single time instant. This means for instance that two time periods with only an endpoint in common do not overlap. </para> @@ -7398,31 +7398,31 @@ SELECT (DATE '2001-10-30', DATE '2001-10-30') OVERLAPS </para> <para> - Note there can be ambiguity in the <literal>months</> field returned by - <function>age</> because different months have different numbers of - days. <productname>PostgreSQL</>'s approach uses the month from the + Note there can be ambiguity in the <literal>months</literal> field returned by + <function>age</function> because different months have different numbers of + days. <productname>PostgreSQL</productname>'s approach uses the month from the earlier of the two dates when calculating partial months. For example, - <literal>age('2004-06-01', '2004-04-30')</> uses April to yield - <literal>1 mon 1 day</>, while using May would yield <literal>1 mon 2 - days</> because May has 31 days, while April has only 30. + <literal>age('2004-06-01', '2004-04-30')</literal> uses April to yield + <literal>1 mon 1 day</literal>, while using May would yield <literal>1 mon 2 + days</literal> because May has 31 days, while April has only 30. </para> <para> Subtraction of dates and timestamps can also be complex. One conceptually simple way to perform subtraction is to convert each value to a number - of seconds using <literal>EXTRACT(EPOCH FROM ...)</>, then subtract the + of seconds using <literal>EXTRACT(EPOCH FROM ...)</literal>, then subtract the results; this produces the - number of <emphasis>seconds</> between the two values. This will adjust + number of <emphasis>seconds</emphasis> between the two values. This will adjust for the number of days in each month, timezone changes, and daylight saving time adjustments. Subtraction of date or timestamp - values with the <quote><literal>-</></quote> operator + values with the <quote><literal>-</literal></quote> operator returns the number of days (24-hours) and hours/minutes/seconds - between the values, making the same adjustments. The <function>age</> + between the values, making the same adjustments. The <function>age</function> function returns years, months, days, and hours/minutes/seconds, performing field-by-field subtraction and then adjusting for negative field values. The following queries illustrate the differences in these approaches. The sample results were produced with <literal>timezone - = 'US/Eastern'</>; there is a daylight saving time change between the + = 'US/Eastern'</literal>; there is a daylight saving time change between the two dates used: </para> @@ -7534,8 +7534,8 @@ SELECT EXTRACT(DECADE FROM TIMESTAMP '2001-02-16 20:38:40'); <term><literal>dow</literal></term> <listitem> <para> - The day of the week as Sunday (<literal>0</>) to - Saturday (<literal>6</>) + The day of the week as Sunday (<literal>0</literal>) to + Saturday (<literal>6</literal>) </para> <screen> @@ -7587,7 +7587,7 @@ SELECT EXTRACT(EPOCH FROM INTERVAL '5 days 3 hours'); <para> You can convert an epoch value back to a time stamp - with <function>to_timestamp</>: + with <function>to_timestamp</function>: </para> <screen> SELECT to_timestamp(982384720.12); @@ -7614,8 +7614,8 @@ SELECT EXTRACT(HOUR FROM TIMESTAMP '2001-02-16 20:38:40'); <term><literal>isodow</literal></term> <listitem> <para> - The day of the week as Monday (<literal>1</>) to - Sunday (<literal>7</>) + The day of the week as Monday (<literal>1</literal>) to + Sunday (<literal>7</literal>) </para> <screen> @@ -7623,8 +7623,8 @@ SELECT EXTRACT(ISODOW FROM TIMESTAMP '2001-02-18 20:38:40'); <lineannotation>Result: </lineannotation><computeroutput>7</computeroutput> </screen> <para> - This is identical to <literal>dow</> except for Sunday. This - matches the <acronym>ISO</> 8601 day of the week numbering. + This is identical to <literal>dow</literal> except for Sunday. This + matches the <acronym>ISO</acronym> 8601 day of the week numbering. </para> </listitem> @@ -7819,11 +7819,11 @@ SELECT EXTRACT(SECOND FROM TIME '17:12:28.5'); In the ISO week-numbering system, it is possible for early-January dates to be part of the 52nd or 53rd week of the previous year, and for late-December dates to be part of the first week of the next year. - For example, <literal>2005-01-01</> is part of the 53rd week of year - 2004, and <literal>2006-01-01</> is part of the 52nd week of year - 2005, while <literal>2012-12-31</> is part of the first week of 2013. - It's recommended to use the <literal>isoyear</> field together with - <literal>week</> to get consistent results. + For example, <literal>2005-01-01</literal> is part of the 53rd week of year + 2004, and <literal>2006-01-01</literal> is part of the 52nd week of year + 2005, while <literal>2012-12-31</literal> is part of the first week of 2013. + It's recommended to use the <literal>isoyear</literal> field together with + <literal>week</literal> to get consistent results. </para> <screen> @@ -7837,8 +7837,8 @@ SELECT EXTRACT(WEEK FROM TIMESTAMP '2001-02-16 20:38:40'); <term><literal>year</literal></term> <listitem> <para> - The year field. Keep in mind there is no <literal>0 AD</>, so subtracting - <literal>BC</> years from <literal>AD</> years should be done with care. + The year field. Keep in mind there is no <literal>0 AD</literal>, so subtracting + <literal>BC</literal> years from <literal>AD</literal> years should be done with care. </para> <screen> @@ -7853,11 +7853,11 @@ SELECT EXTRACT(YEAR FROM TIMESTAMP '2001-02-16 20:38:40'); <note> <para> - When the input value is +/-Infinity, <function>extract</> returns - +/-Infinity for monotonically-increasing fields (<literal>epoch</>, - <literal>julian</>, <literal>year</>, <literal>isoyear</>, - <literal>decade</>, <literal>century</>, and <literal>millennium</>). - For other fields, NULL is returned. <productname>PostgreSQL</> + When the input value is +/-Infinity, <function>extract</function> returns + +/-Infinity for monotonically-increasing fields (<literal>epoch</literal>, + <literal>julian</literal>, <literal>year</literal>, <literal>isoyear</literal>, + <literal>decade</literal>, <literal>century</literal>, and <literal>millennium</literal>). + For other fields, NULL is returned. <productname>PostgreSQL</productname> versions before 9.6 returned zero for all cases of infinite input. </para> </note> @@ -7908,13 +7908,13 @@ SELECT date_part('hour', INTERVAL '4 hours 3 minutes'); date_trunc('<replaceable>field</replaceable>', <replaceable>source</replaceable>) </synopsis> <replaceable>source</replaceable> is a value expression of type - <type>timestamp</type> or <type>interval</>. + <type>timestamp</type> or <type>interval</type>. (Values of type <type>date</type> and <type>time</type> are cast automatically to <type>timestamp</type> or - <type>interval</>, respectively.) + <type>interval</type>, respectively.) <replaceable>field</replaceable> selects to which precision to truncate the input value. The return value is of type - <type>timestamp</type> or <type>interval</> + <type>timestamp</type> or <type>interval</type> with all fields that are less significant than the selected one set to zero (or one, for day and month). </para> @@ -7983,34 +7983,34 @@ SELECT date_trunc('year', TIMESTAMP '2001-02-16 20:38:40'); <tbody> <row> <entry> - <literal><type>timestamp without time zone</type> AT TIME ZONE <replaceable>zone</></literal> + <literal><type>timestamp without time zone</type> AT TIME ZONE <replaceable>zone</replaceable></literal> </entry> <entry><type>timestamp with time zone</type></entry> - <entry>Treat given time stamp <emphasis>without time zone</> as located in the specified time zone</entry> + <entry>Treat given time stamp <emphasis>without time zone</emphasis> as located in the specified time zone</entry> </row> <row> <entry> - <literal><type>timestamp with time zone</type> AT TIME ZONE <replaceable>zone</></literal> + <literal><type>timestamp with time zone</type> AT TIME ZONE <replaceable>zone</replaceable></literal> </entry> <entry><type>timestamp without time zone</type></entry> - <entry>Convert given time stamp <emphasis>with time zone</> to the new time + <entry>Convert given time stamp <emphasis>with time zone</emphasis> to the new time zone, with no time zone designation</entry> </row> <row> <entry> - <literal><type>time with time zone</type> AT TIME ZONE <replaceable>zone</></literal> + <literal><type>time with time zone</type> AT TIME ZONE <replaceable>zone</replaceable></literal> </entry> <entry><type>time with time zone</type></entry> - <entry>Convert given time <emphasis>with time zone</> to the new time zone</entry> + <entry>Convert given time <emphasis>with time zone</emphasis> to the new time zone</entry> </row> </tbody> </tgroup> </table> <para> - In these expressions, the desired time zone <replaceable>zone</> can be + In these expressions, the desired time zone <replaceable>zone</replaceable> can be specified either as a text string (e.g., <literal>'PST'</literal>) or as an interval (e.g., <literal>INTERVAL '-08:00'</literal>). In the text case, a time zone name can be specified in any of the ways @@ -8018,7 +8018,7 @@ SELECT date_trunc('year', TIMESTAMP '2001-02-16 20:38:40'); </para> <para> - Examples (assuming the local time zone is <literal>PST8PDT</>): + Examples (assuming the local time zone is <literal>PST8PDT</literal>): <screen> SELECT TIMESTAMP '2001-02-16 20:38:40' AT TIME ZONE 'MST'; <lineannotation>Result: </lineannotation><computeroutput>2001-02-16 19:38:40-08</computeroutput> @@ -8032,10 +8032,10 @@ SELECT TIMESTAMP WITH TIME ZONE '2001-02-16 20:38:40-05' AT TIME ZONE 'MST'; </para> <para> - The function <literal><function>timezone</function>(<replaceable>zone</>, - <replaceable>timestamp</>)</literal> is equivalent to the SQL-conforming construct - <literal><replaceable>timestamp</> AT TIME ZONE - <replaceable>zone</></literal>. + The function <literal><function>timezone</function>(<replaceable>zone</replaceable>, + <replaceable>timestamp</replaceable>)</literal> is equivalent to the SQL-conforming construct + <literal><replaceable>timestamp</replaceable> AT TIME ZONE + <replaceable>zone</replaceable></literal>. </para> </sect2> @@ -8140,23 +8140,23 @@ now() </para> <para> - <function>transaction_timestamp()</> is equivalent to + <function>transaction_timestamp()</function> is equivalent to <function>CURRENT_TIMESTAMP</function>, but is named to clearly reflect what it returns. - <function>statement_timestamp()</> returns the start time of the current + <function>statement_timestamp()</function> returns the start time of the current statement (more specifically, the time of receipt of the latest command message from the client). - <function>statement_timestamp()</> and <function>transaction_timestamp()</> + <function>statement_timestamp()</function> and <function>transaction_timestamp()</function> return the same value during the first command of a transaction, but might differ during subsequent commands. - <function>clock_timestamp()</> returns the actual current time, and + <function>clock_timestamp()</function> returns the actual current time, and therefore its value changes even within a single SQL command. - <function>timeofday()</> is a historical + <function>timeofday()</function> is a historical <productname>PostgreSQL</productname> function. Like - <function>clock_timestamp()</>, it returns the actual current time, - but as a formatted <type>text</> string rather than a <type>timestamp - with time zone</> value. - <function>now()</> is a traditional <productname>PostgreSQL</productname> + <function>clock_timestamp()</function>, it returns the actual current time, + but as a formatted <type>text</type> string rather than a <type>timestamp + with time zone</type> value. + <function>now()</function> is a traditional <productname>PostgreSQL</productname> equivalent to <function>transaction_timestamp()</function>. </para> @@ -8174,7 +8174,7 @@ SELECT TIMESTAMP 'now'; -- incorrect for use with DEFAULT <tip> <para> - You do not want to use the third form when specifying a <literal>DEFAULT</> + You do not want to use the third form when specifying a <literal>DEFAULT</literal> clause while creating a table. The system will convert <literal>now</literal> to a <type>timestamp</type> as soon as the constant is parsed, so that when the default value is needed, @@ -8210,16 +8210,16 @@ SELECT TIMESTAMP 'now'; -- incorrect for use with DEFAULT process: <synopsis> pg_sleep(<replaceable>seconds</replaceable>) -pg_sleep_for(<type>interval</>) -pg_sleep_until(<type>timestamp with time zone</>) +pg_sleep_for(<type>interval</type>) +pg_sleep_until(<type>timestamp with time zone</type>) </synopsis> <function>pg_sleep</function> makes the current session's process sleep until <replaceable>seconds</replaceable> seconds have elapsed. <replaceable>seconds</replaceable> is a value of type - <type>double precision</>, so fractional-second delays can be specified. + <type>double precision</type>, so fractional-second delays can be specified. <function>pg_sleep_for</function> is a convenience function for larger - sleep times specified as an <type>interval</>. + sleep times specified as an <type>interval</type>. <function>pg_sleep_until</function> is a convenience function for when a specific wake-up time is desired. For example: @@ -8341,7 +8341,7 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple </table> <para> - Notice that except for the two-argument form of <function>enum_range</>, + Notice that except for the two-argument form of <function>enum_range</function>, these functions disregard the specific value passed to them; they care only about its declared data type. Either null or a specific value of the type can be passed, with the same result. It is more common to @@ -8365,13 +8365,13 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple <caution> <para> - Note that the <quote>same as</> operator, <literal>~=</>, represents + Note that the <quote>same as</quote> operator, <literal>~=</literal>, represents the usual notion of equality for the <type>point</type>, <type>box</type>, <type>polygon</type>, and <type>circle</type> types. - Some of these types also have an <literal>=</> operator, but - <literal>=</> compares - for equal <emphasis>areas</> only. The other scalar comparison operators - (<literal><=</> and so on) likewise compare areas for these types. + Some of these types also have an <literal>=</literal> operator, but + <literal>=</literal> compares + for equal <emphasis>areas</emphasis> only. The other scalar comparison operators + (<literal><=</literal> and so on) likewise compare areas for these types. </para> </caution> @@ -8548,8 +8548,8 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple <note> <para> Before <productname>PostgreSQL</productname> 8.2, the containment - operators <literal>@></> and <literal><@</> were respectively - called <literal>~</> and <literal>@</>. These names are still + operators <literal>@></literal> and <literal><@</literal> were respectively + called <literal>~</literal> and <literal>@</literal>. These names are still available, but are deprecated and will eventually be removed. </para> </note> @@ -8604,67 +8604,67 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple </thead> <tbody> <row> - <entry><literal><function>area(<replaceable>object</>)</function></literal></entry> + <entry><literal><function>area(<replaceable>object</replaceable>)</function></literal></entry> <entry><type>double precision</type></entry> <entry>area</entry> <entry><literal>area(box '((0,0),(1,1))')</literal></entry> </row> <row> - <entry><literal><function>center(<replaceable>object</>)</function></literal></entry> + <entry><literal><function>center(<replaceable>object</replaceable>)</function></literal></entry> <entry><type>point</type></entry> <entry>center</entry> <entry><literal>center(box '((0,0),(1,2))')</literal></entry> </row> <row> - <entry><literal><function>diameter(<type>circle</>)</function></literal></entry> + <entry><literal><function>diameter(<type>circle</type>)</function></literal></entry> <entry><type>double precision</type></entry> <entry>diameter of circle</entry> <entry><literal>diameter(circle '((0,0),2.0)')</literal></entry> </row> <row> - <entry><literal><function>height(<type>box</>)</function></literal></entry> + <entry><literal><function>height(<type>box</type>)</function></literal></entry> <entry><type>double precision</type></entry> <entry>vertical size of box</entry> <entry><literal>height(box '((0,0),(1,1))')</literal></entry> </row> <row> - <entry><literal><function>isclosed(<type>path</>)</function></literal></entry> + <entry><literal><function>isclosed(<type>path</type>)</function></literal></entry> <entry><type>boolean</type></entry> <entry>a closed path?</entry> <entry><literal>isclosed(path '((0,0),(1,1),(2,0))')</literal></entry> </row> <row> - <entry><literal><function>isopen(<type>path</>)</function></literal></entry> + <entry><literal><function>isopen(<type>path</type>)</function></literal></entry> <entry><type>boolean</type></entry> <entry>an open path?</entry> <entry><literal>isopen(path '[(0,0),(1,1),(2,0)]')</literal></entry> </row> <row> - <entry><literal><function>length(<replaceable>object</>)</function></literal></entry> + <entry><literal><function>length(<replaceable>object</replaceable>)</function></literal></entry> <entry><type>double precision</type></entry> <entry>length</entry> <entry><literal>length(path '((-1,0),(1,0))')</literal></entry> </row> <row> - <entry><literal><function>npoints(<type>path</>)</function></literal></entry> + <entry><literal><function>npoints(<type>path</type>)</function></literal></entry> <entry><type>int</type></entry> <entry>number of points</entry> <entry><literal>npoints(path '[(0,0),(1,1),(2,0)]')</literal></entry> </row> <row> - <entry><literal><function>npoints(<type>polygon</>)</function></literal></entry> + <entry><literal><function>npoints(<type>polygon</type>)</function></literal></entry> <entry><type>int</type></entry> <entry>number of points</entry> <entry><literal>npoints(polygon '((1,1),(0,0))')</literal></entry> </row> <row> - <entry><literal><function>pclose(<type>path</>)</function></literal></entry> + <entry><literal><function>pclose(<type>path</type>)</function></literal></entry> <entry><type>path</type></entry> <entry>convert path to closed</entry> <entry><literal>pclose(path '[(0,0),(1,1),(2,0)]')</literal></entry> </row> <row> - <entry><literal><function>popen(<type>path</>)</function></literal></entry> + <entry><literal><function>popen(<type>path</type>)</function></literal></entry> <entry><type>path</type></entry> <entry>convert path to open</entry> <entry><literal>popen(path '((0,0),(1,1),(2,0))')</literal></entry> @@ -8676,7 +8676,7 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple <entry><literal>radius(circle '((0,0),2.0)')</literal></entry> </row> <row> - <entry><literal><function>width(<type>box</>)</function></literal></entry> + <entry><literal><function>width(<type>box</type>)</function></literal></entry> <entry><type>double precision</type></entry> <entry>horizontal size of box</entry> <entry><literal>width(box '((0,0),(1,1))')</literal></entry> @@ -8859,13 +8859,13 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple </table> <para> - It is possible to access the two component numbers of a <type>point</> + It is possible to access the two component numbers of a <type>point</type> as though the point were an array with indexes 0 and 1. For example, if - <literal>t.p</> is a <type>point</> column then - <literal>SELECT p[0] FROM t</> retrieves the X coordinate and - <literal>UPDATE t SET p[1] = ...</> changes the Y coordinate. - In the same way, a value of type <type>box</> or <type>lseg</> can be treated - as an array of two <type>point</> values. + <literal>t.p</literal> is a <type>point</type> column then + <literal>SELECT p[0] FROM t</literal> retrieves the X coordinate and + <literal>UPDATE t SET p[1] = ...</literal> changes the Y coordinate. + In the same way, a value of type <type>box</type> or <type>lseg</type> can be treated + as an array of two <type>point</type> values. </para> <para> @@ -9188,19 +9188,19 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple </table> <para> - Any <type>cidr</> value can be cast to <type>inet</> implicitly + Any <type>cidr</type> value can be cast to <type>inet</type> implicitly or explicitly; therefore, the functions shown above as operating on - <type>inet</> also work on <type>cidr</> values. (Where there are - separate functions for <type>inet</> and <type>cidr</>, it is because + <type>inet</type> also work on <type>cidr</type> values. (Where there are + separate functions for <type>inet</type> and <type>cidr</type>, it is because the behavior should be different for the two cases.) - Also, it is permitted to cast an <type>inet</> value to <type>cidr</>. + Also, it is permitted to cast an <type>inet</type> value to <type>cidr</type>. When this is done, any bits to the right of the netmask are silently zeroed - to create a valid <type>cidr</> value. + to create a valid <type>cidr</type> value. In addition, - you can cast a text value to <type>inet</> or <type>cidr</> + you can cast a text value to <type>inet</type> or <type>cidr</type> using normal casting syntax: for example, - <literal>inet(<replaceable>expression</>)</literal> or - <literal><replaceable>colname</>::cidr</literal>. + <literal>inet(<replaceable>expression</replaceable>)</literal> or + <literal><replaceable>colname</replaceable>::cidr</literal>. </para> <para> @@ -9345,64 +9345,64 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple <tbody> <row> <entry> <literal>@@</literal> </entry> - <entry><type>boolean</></entry> - <entry><type>tsvector</> matches <type>tsquery</> ?</entry> + <entry><type>boolean</type></entry> + <entry><type>tsvector</type> matches <type>tsquery</type> ?</entry> <entry><literal>to_tsvector('fat cats ate rats') @@ to_tsquery('cat & rat')</literal></entry> <entry><literal>t</literal></entry> </row> <row> <entry> <literal>@@@</literal> </entry> - <entry><type>boolean</></entry> - <entry>deprecated synonym for <literal>@@</></entry> + <entry><type>boolean</type></entry> + <entry>deprecated synonym for <literal>@@</literal></entry> <entry><literal>to_tsvector('fat cats ate rats') @@@ to_tsquery('cat & rat')</literal></entry> <entry><literal>t</literal></entry> </row> <row> <entry> <literal>||</literal> </entry> - <entry><type>tsvector</></entry> - <entry>concatenate <type>tsvector</>s</entry> + <entry><type>tsvector</type></entry> + <entry>concatenate <type>tsvector</type>s</entry> <entry><literal>'a:1 b:2'::tsvector || 'c:1 d:2 b:3'::tsvector</literal></entry> <entry><literal>'a':1 'b':2,5 'c':3 'd':4</literal></entry> </row> <row> <entry> <literal>&&</literal> </entry> - <entry><type>tsquery</></entry> - <entry>AND <type>tsquery</>s together</entry> + <entry><type>tsquery</type></entry> + <entry>AND <type>tsquery</type>s together</entry> <entry><literal>'fat | rat'::tsquery && 'cat'::tsquery</literal></entry> <entry><literal>( 'fat' | 'rat' ) & 'cat'</literal></entry> </row> <row> <entry> <literal>||</literal> </entry> - <entry><type>tsquery</></entry> - <entry>OR <type>tsquery</>s together</entry> + <entry><type>tsquery</type></entry> + <entry>OR <type>tsquery</type>s together</entry> <entry><literal>'fat | rat'::tsquery || 'cat'::tsquery</literal></entry> <entry><literal>( 'fat' | 'rat' ) | 'cat'</literal></entry> </row> <row> <entry> <literal>!!</literal> </entry> - <entry><type>tsquery</></entry> - <entry>negate a <type>tsquery</></entry> + <entry><type>tsquery</type></entry> + <entry>negate a <type>tsquery</type></entry> <entry><literal>!! 'cat'::tsquery</literal></entry> <entry><literal>!'cat'</literal></entry> </row> <row> <entry> <literal><-></literal> </entry> - <entry><type>tsquery</></entry> - <entry><type>tsquery</> followed by <type>tsquery</></entry> + <entry><type>tsquery</type></entry> + <entry><type>tsquery</type> followed by <type>tsquery</type></entry> <entry><literal>to_tsquery('fat') <-> to_tsquery('rat')</literal></entry> <entry><literal>'fat' <-> 'rat'</literal></entry> </row> <row> <entry> <literal>@></literal> </entry> - <entry><type>boolean</></entry> - <entry><type>tsquery</> contains another ?</entry> + <entry><type>boolean</type></entry> + <entry><type>tsquery</type> contains another ?</entry> <entry><literal>'cat'::tsquery @> 'cat & rat'::tsquery</literal></entry> <entry><literal>f</literal></entry> </row> <row> <entry> <literal><@</literal> </entry> - <entry><type>boolean</></entry> - <entry><type>tsquery</> is contained in ?</entry> + <entry><type>boolean</type></entry> + <entry><type>tsquery</type> is contained in ?</entry> <entry><literal>'cat'::tsquery <@ 'cat & rat'::tsquery</literal></entry> <entry><literal>t</literal></entry> </row> @@ -9412,15 +9412,15 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple <note> <para> - The <type>tsquery</> containment operators consider only the lexemes + The <type>tsquery</type> containment operators consider only the lexemes listed in the two queries, ignoring the combining operators. </para> </note> <para> In addition to the operators shown in the table, the ordinary B-tree - comparison operators (<literal>=</>, <literal><</>, etc) are defined - for types <type>tsvector</> and <type>tsquery</>. These are not very + comparison operators (<literal>=</literal>, <literal><</literal>, etc) are defined + for types <type>tsvector</type> and <type>tsquery</type>. These are not very useful for text searching but allow, for example, unique indexes to be built on columns of these types. </para> @@ -9443,7 +9443,7 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple <indexterm> <primary>array_to_tsvector</primary> </indexterm> - <literal><function>array_to_tsvector(<type>text[]</>)</function></literal> + <literal><function>array_to_tsvector(<type>text[]</type>)</function></literal> </entry> <entry><type>tsvector</type></entry> <entry>convert array of lexemes to <type>tsvector</type></entry> @@ -9467,10 +9467,10 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple <indexterm> <primary>length</primary> </indexterm> - <literal><function>length(<type>tsvector</>)</function></literal> + <literal><function>length(<type>tsvector</type>)</function></literal> </entry> <entry><type>integer</type></entry> - <entry>number of lexemes in <type>tsvector</></entry> + <entry>number of lexemes in <type>tsvector</type></entry> <entry><literal>length('fat:2,4 cat:3 rat:5A'::tsvector)</literal></entry> <entry><literal>3</literal></entry> </row> @@ -9479,10 +9479,10 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple <indexterm> <primary>numnode</primary> </indexterm> - <literal><function>numnode(<type>tsquery</>)</function></literal> + <literal><function>numnode(<type>tsquery</type>)</function></literal> </entry> <entry><type>integer</type></entry> - <entry>number of lexemes plus operators in <type>tsquery</></entry> + <entry>number of lexemes plus operators in <type>tsquery</type></entry> <entry><literal> numnode('(fat & rat) | cat'::tsquery)</literal></entry> <entry><literal>5</literal></entry> </row> @@ -9491,10 +9491,10 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple <indexterm> <primary>plainto_tsquery</primary> </indexterm> - <literal><function>plainto_tsquery(<optional> <replaceable class="parameter">config</> <type>regconfig</> , </optional> <replaceable class="parameter">query</> <type>text</type>)</function></literal> + <literal><function>plainto_tsquery(<optional> <replaceable class="parameter">config</replaceable> <type>regconfig</type> , </optional> <replaceable class="parameter">query</replaceable> <type>text</type>)</function></literal> </entry> <entry><type>tsquery</type></entry> - <entry>produce <type>tsquery</> ignoring punctuation</entry> + <entry>produce <type>tsquery</type> ignoring punctuation</entry> <entry><literal>plainto_tsquery('english', 'The Fat Rats')</literal></entry> <entry><literal>'fat' & 'rat'</literal></entry> </row> @@ -9503,10 +9503,10 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple <indexterm> <primary>phraseto_tsquery</primary> </indexterm> - <literal><function>phraseto_tsquery(<optional> <replaceable class="parameter">config</> <type>regconfig</> , </optional> <replaceable class="parameter">query</> <type>text</type>)</function></literal> + <literal><function>phraseto_tsquery(<optional> <replaceable class="parameter">config</replaceable> <type>regconfig</type> , </optional> <replaceable class="parameter">query</replaceable> <type>text</type>)</function></literal> </entry> <entry><type>tsquery</type></entry> - <entry>produce <type>tsquery</> that searches for a phrase, + <entry>produce <type>tsquery</type> that searches for a phrase, ignoring punctuation</entry> <entry><literal>phraseto_tsquery('english', 'The Fat Rats')</literal></entry> <entry><literal>'fat' <-> 'rat'</literal></entry> @@ -9516,10 +9516,10 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple <indexterm> <primary>querytree</primary> </indexterm> - <literal><function>querytree(<replaceable class="parameter">query</replaceable> <type>tsquery</>)</function></literal> + <literal><function>querytree(<replaceable class="parameter">query</replaceable> <type>tsquery</type>)</function></literal> </entry> <entry><type>text</type></entry> - <entry>get indexable part of a <type>tsquery</></entry> + <entry>get indexable part of a <type>tsquery</type></entry> <entry><literal>querytree('foo & ! bar'::tsquery)</literal></entry> <entry><literal>'foo'</literal></entry> </row> @@ -9528,7 +9528,7 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple <indexterm> <primary>setweight</primary> </indexterm> - <literal><function>setweight(<replaceable class="parameter">vector</replaceable> <type>tsvector</>, <replaceable class="parameter">weight</replaceable> <type>"char"</>)</function></literal> + <literal><function>setweight(<replaceable class="parameter">vector</replaceable> <type>tsvector</type>, <replaceable class="parameter">weight</replaceable> <type>"char"</type>)</function></literal> </entry> <entry><type>tsvector</type></entry> <entry>assign <replaceable class="parameter">weight</replaceable> to each element of <replaceable class="parameter">vector</replaceable></entry> @@ -9541,7 +9541,7 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple <primary>setweight</primary> <secondary>setweight for specific lexeme(s)</secondary> </indexterm> - <literal><function>setweight(<replaceable class="parameter">vector</replaceable> <type>tsvector</>, <replaceable class="parameter">weight</replaceable> <type>"char"</>, <replaceable class="parameter">lexemes</replaceable> <type>text[]</>)</function></literal> + <literal><function>setweight(<replaceable class="parameter">vector</replaceable> <type>tsvector</type>, <replaceable class="parameter">weight</replaceable> <type>"char"</type>, <replaceable class="parameter">lexemes</replaceable> <type>text[]</type>)</function></literal> </entry> <entry><type>tsvector</type></entry> <entry>assign <replaceable class="parameter">weight</replaceable> to elements of <replaceable class="parameter">vector</replaceable> that are listed in <replaceable class="parameter">lexemes</replaceable></entry> @@ -9553,10 +9553,10 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple <indexterm> <primary>strip</primary> </indexterm> - <literal><function>strip(<type>tsvector</>)</function></literal> + <literal><function>strip(<type>tsvector</type>)</function></literal> </entry> <entry><type>tsvector</type></entry> - <entry>remove positions and weights from <type>tsvector</></entry> + <entry>remove positions and weights from <type>tsvector</type></entry> <entry><literal>strip('fat:2,4 cat:3 rat:5A'::tsvector)</literal></entry> <entry><literal>'cat' 'fat' 'rat'</literal></entry> </row> @@ -9565,10 +9565,10 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple <indexterm> <primary>to_tsquery</primary> </indexterm> - <literal><function>to_tsquery(<optional> <replaceable class="parameter">config</> <type>regconfig</> , </optional> <replaceable class="parameter">query</> <type>text</type>)</function></literal> + <literal><function>to_tsquery(<optional> <replaceable class="parameter">config</replaceable> <type>regconfig</type> , </optional> <replaceable class="parameter">query</replaceable> <type>text</type>)</function></literal> </entry> <entry><type>tsquery</type></entry> - <entry>normalize words and convert to <type>tsquery</></entry> + <entry>normalize words and convert to <type>tsquery</type></entry> <entry><literal>to_tsquery('english', 'The & Fat & Rats')</literal></entry> <entry><literal>'fat' & 'rat'</literal></entry> </row> @@ -9577,21 +9577,21 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple <indexterm> <primary>to_tsvector</primary> </indexterm> - <literal><function>to_tsvector(<optional> <replaceable class="parameter">config</> <type>regconfig</> , </optional> <replaceable class="parameter">document</> <type>text</type>)</function></literal> + <literal><function>to_tsvector(<optional> <replaceable class="parameter">config</replaceable> <type>regconfig</type> , </optional> <replaceable class="parameter">document</replaceable> <type>text</type>)</function></literal> </entry> <entry><type>tsvector</type></entry> - <entry>reduce document text to <type>tsvector</></entry> + <entry>reduce document text to <type>tsvector</type></entry> <entry><literal>to_tsvector('english', 'The Fat Rats')</literal></entry> <entry><literal>'fat':2 'rat':3</literal></entry> </row> <row> <entry> - <literal><function>to_tsvector(<optional> <replaceable class="parameter">config</> <type>regconfig</> , </optional> <replaceable class="parameter">document</> <type>json(b)</type>)</function></literal> + <literal><function>to_tsvector(<optional> <replaceable class="parameter">config</replaceable> <type>regconfig</type> , </optional> <replaceable class="parameter">document</replaceable> <type>json(b)</type>)</function></literal> </entry> <entry><type>tsvector</type></entry> <entry> - reduce each string value in the document to a <type>tsvector</>, and then - concatenate those in document order to produce a single <type>tsvector</> + reduce each string value in the document to a <type>tsvector</type>, and then + concatenate those in document order to produce a single <type>tsvector</type> </entry> <entry><literal>to_tsvector('english', '{"a": "The Fat Rats"}'::json)</literal></entry> <entry><literal>'fat':2 'rat':3</literal></entry> @@ -9601,7 +9601,7 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple <indexterm> <primary>ts_delete</primary> </indexterm> - <literal><function>ts_delete(<replaceable class="parameter">vector</replaceable> <type>tsvector</>, <replaceable class="parameter">lexeme</replaceable> <type>text</>)</function></literal> + <literal><function>ts_delete(<replaceable class="parameter">vector</replaceable> <type>tsvector</type>, <replaceable class="parameter">lexeme</replaceable> <type>text</type>)</function></literal> </entry> <entry><type>tsvector</type></entry> <entry>remove given <replaceable class="parameter">lexeme</replaceable> from <replaceable class="parameter">vector</replaceable></entry> @@ -9611,7 +9611,7 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple <row> <entry> <!-- previous indexterm entry covers this too --> - <literal><function>ts_delete(<replaceable class="parameter">vector</replaceable> <type>tsvector</>, <replaceable class="parameter">lexemes</replaceable> <type>text[]</>)</function></literal> + <literal><function>ts_delete(<replaceable class="parameter">vector</replaceable> <type>tsvector</type>, <replaceable class="parameter">lexemes</replaceable> <type>text[]</type>)</function></literal> </entry> <entry><type>tsvector</type></entry> <entry>remove any occurrence of lexemes in <replaceable class="parameter">lexemes</replaceable> from <replaceable class="parameter">vector</replaceable></entry> @@ -9623,7 +9623,7 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple <indexterm> <primary>ts_filter</primary> </indexterm> - <literal><function>ts_filter(<replaceable class="parameter">vector</replaceable> <type>tsvector</>, <replaceable class="parameter">weights</replaceable> <type>"char"[]</>)</function></literal> + <literal><function>ts_filter(<replaceable class="parameter">vector</replaceable> <type>tsvector</type>, <replaceable class="parameter">weights</replaceable> <type>"char"[]</type>)</function></literal> </entry> <entry><type>tsvector</type></entry> <entry>select only elements with given <replaceable class="parameter">weights</replaceable> from <replaceable class="parameter">vector</replaceable></entry> @@ -9635,7 +9635,7 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple <indexterm> <primary>ts_headline</primary> </indexterm> - <literal><function>ts_headline(<optional> <replaceable class="parameter">config</replaceable> <type>regconfig</>, </optional> <replaceable class="parameter">document</replaceable> <type>text</>, <replaceable class="parameter">query</replaceable> <type>tsquery</> <optional>, <replaceable class="parameter">options</replaceable> <type>text</> </optional>)</function></literal> + <literal><function>ts_headline(<optional> <replaceable class="parameter">config</replaceable> <type>regconfig</type>, </optional> <replaceable class="parameter">document</replaceable> <type>text</type>, <replaceable class="parameter">query</replaceable> <type>tsquery</type> <optional>, <replaceable class="parameter">options</replaceable> <type>text</type> </optional>)</function></literal> </entry> <entry><type>text</type></entry> <entry>display a query match</entry> @@ -9644,7 +9644,7 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple </row> <row> <entry> - <literal><function>ts_headline(<optional> <replaceable class="parameter">config</replaceable> <type>regconfig</>, </optional> <replaceable class="parameter">document</replaceable> <type>json(b)</>, <replaceable class="parameter">query</replaceable> <type>tsquery</> <optional>, <replaceable class="parameter">options</replaceable> <type>text</> </optional>)</function></literal> + <literal><function>ts_headline(<optional> <replaceable class="parameter">config</replaceable> <type>regconfig</type>, </optional> <replaceable class="parameter">document</replaceable> <type>json(b)</type>, <replaceable class="parameter">query</replaceable> <type>tsquery</type> <optional>, <replaceable class="parameter">options</replaceable> <type>text</type> </optional>)</function></literal> </entry> <entry><type>text</type></entry> <entry>display a query match</entry> @@ -9656,7 +9656,7 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple <indexterm> <primary>ts_rank</primary> </indexterm> - <literal><function>ts_rank(<optional> <replaceable class="parameter">weights</replaceable> <type>float4[]</>, </optional> <replaceable class="parameter">vector</replaceable> <type>tsvector</>, <replaceable class="parameter">query</replaceable> <type>tsquery</> <optional>, <replaceable class="parameter">normalization</replaceable> <type>integer</> </optional>)</function></literal> + <literal><function>ts_rank(<optional> <replaceable class="parameter">weights</replaceable> <type>float4[]</type>, </optional> <replaceable class="parameter">vector</replaceable> <type>tsvector</type>, <replaceable class="parameter">query</replaceable> <type>tsquery</type> <optional>, <replaceable class="parameter">normalization</replaceable> <type>integer</type> </optional>)</function></literal> </entry> <entry><type>float4</type></entry> <entry>rank document for query</entry> @@ -9668,7 +9668,7 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple <indexterm> <primary>ts_rank_cd</primary> </indexterm> - <literal><function>ts_rank_cd(<optional> <replaceable class="parameter">weights</replaceable> <type>float4[]</>, </optional> <replaceable class="parameter">vector</replaceable> <type>tsvector</>, <replaceable class="parameter">query</replaceable> <type>tsquery</> <optional>, <replaceable class="parameter">normalization</replaceable> <type>integer</> </optional>)</function></literal> + <literal><function>ts_rank_cd(<optional> <replaceable class="parameter">weights</replaceable> <type>float4[]</type>, </optional> <replaceable class="parameter">vector</replaceable> <type>tsvector</type>, <replaceable class="parameter">query</replaceable> <type>tsquery</type> <optional>, <replaceable class="parameter">normalization</replaceable> <type>integer</type> </optional>)</function></literal> </entry> <entry><type>float4</type></entry> <entry>rank document for query using cover density</entry> @@ -9680,18 +9680,18 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple <indexterm> <primary>ts_rewrite</primary> </indexterm> - <literal><function>ts_rewrite(<replaceable class="parameter">query</replaceable> <type>tsquery</>, <replaceable class="parameter">target</replaceable> <type>tsquery</>, <replaceable class="parameter">substitute</replaceable> <type>tsquery</>)</function></literal> + <literal><function>ts_rewrite(<replaceable class="parameter">query</replaceable> <type>tsquery</type>, <replaceable class="parameter">target</replaceable> <type>tsquery</type>, <replaceable class="parameter">substitute</replaceable> <type>tsquery</type>)</function></literal> </entry> <entry><type>tsquery</type></entry> - <entry>replace <replaceable>target</> with <replaceable>substitute</> + <entry>replace <replaceable>target</replaceable> with <replaceable>substitute</replaceable> within query</entry> <entry><literal>ts_rewrite('a & b'::tsquery, 'a'::tsquery, 'foo|bar'::tsquery)</literal></entry> <entry><literal>'b' & ( 'foo' | 'bar' )</literal></entry> </row> <row> - <entry><literal><function>ts_rewrite(<replaceable class="parameter">query</replaceable> <type>tsquery</>, <replaceable class="parameter">select</replaceable> <type>text</>)</function></literal></entry> + <entry><literal><function>ts_rewrite(<replaceable class="parameter">query</replaceable> <type>tsquery</type>, <replaceable class="parameter">select</replaceable> <type>text</type>)</function></literal></entry> <entry><type>tsquery</type></entry> - <entry>replace using targets and substitutes from a <command>SELECT</> command</entry> + <entry>replace using targets and substitutes from a <command>SELECT</command> command</entry> <entry><literal>SELECT ts_rewrite('a & b'::tsquery, 'SELECT t,s FROM aliases')</literal></entry> <entry><literal>'b' & ( 'foo' | 'bar' )</literal></entry> </row> @@ -9700,22 +9700,22 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple <indexterm> <primary>tsquery_phrase</primary> </indexterm> - <literal><function>tsquery_phrase(<replaceable class="parameter">query1</replaceable> <type>tsquery</>, <replaceable class="parameter">query2</replaceable> <type>tsquery</>)</function></literal> + <literal><function>tsquery_phrase(<replaceable class="parameter">query1</replaceable> <type>tsquery</type>, <replaceable class="parameter">query2</replaceable> <type>tsquery</type>)</function></literal> </entry> <entry><type>tsquery</type></entry> - <entry>make query that searches for <replaceable>query1</> followed - by <replaceable>query2</> (same as <literal><-></> + <entry>make query that searches for <replaceable>query1</replaceable> followed + by <replaceable>query2</replaceable> (same as <literal><-></literal> operator)</entry> <entry><literal>tsquery_phrase(to_tsquery('fat'), to_tsquery('cat'))</literal></entry> <entry><literal>'fat' <-> 'cat'</literal></entry> </row> <row> <entry> - <literal><function>tsquery_phrase(<replaceable class="parameter">query1</replaceable> <type>tsquery</>, <replaceable class="parameter">query2</replaceable> <type>tsquery</>, <replaceable class="parameter">distance</replaceable> <type>integer</>)</function></literal> + <literal><function>tsquery_phrase(<replaceable class="parameter">query1</replaceable> <type>tsquery</type>, <replaceable class="parameter">query2</replaceable> <type>tsquery</type>, <replaceable class="parameter">distance</replaceable> <type>integer</type>)</function></literal> </entry> <entry><type>tsquery</type></entry> - <entry>make query that searches for <replaceable>query1</> followed by - <replaceable>query2</> at distance <replaceable>distance</></entry> + <entry>make query that searches for <replaceable>query1</replaceable> followed by + <replaceable>query2</replaceable> at distance <replaceable>distance</replaceable></entry> <entry><literal>tsquery_phrase(to_tsquery('fat'), to_tsquery('cat'), 10)</literal></entry> <entry><literal>'fat' <10> 'cat'</literal></entry> </row> @@ -9724,10 +9724,10 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple <indexterm> <primary>tsvector_to_array</primary> </indexterm> - <literal><function>tsvector_to_array(<type>tsvector</>)</function></literal> + <literal><function>tsvector_to_array(<type>tsvector</type>)</function></literal> </entry> <entry><type>text[]</type></entry> - <entry>convert <type>tsvector</> to array of lexemes</entry> + <entry>convert <type>tsvector</type> to array of lexemes</entry> <entry><literal>tsvector_to_array('fat:2,4 cat:3 rat:5A'::tsvector)</literal></entry> <entry><literal>{cat,fat,rat}</literal></entry> </row> @@ -9739,7 +9739,7 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple <literal><function>tsvector_update_trigger()</function></literal> </entry> <entry><type>trigger</type></entry> - <entry>trigger function for automatic <type>tsvector</> column update</entry> + <entry>trigger function for automatic <type>tsvector</type> column update</entry> <entry><literal>CREATE TRIGGER ... tsvector_update_trigger(tsvcol, 'pg_catalog.swedish', title, body)</literal></entry> <entry><literal></literal></entry> </row> @@ -9751,7 +9751,7 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple <literal><function>tsvector_update_trigger_column()</function></literal> </entry> <entry><type>trigger</type></entry> - <entry>trigger function for automatic <type>tsvector</> column update</entry> + <entry>trigger function for automatic <type>tsvector</type> column update</entry> <entry><literal>CREATE TRIGGER ... tsvector_update_trigger_column(tsvcol, configcol, title, body)</literal></entry> <entry><literal></literal></entry> </row> @@ -9761,7 +9761,7 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple <primary>unnest</primary> <secondary>for tsvector</secondary> </indexterm> - <literal><function>unnest(<type>tsvector</>, OUT <replaceable class="parameter">lexeme</> <type>text</>, OUT <replaceable class="parameter">positions</> <type>smallint[]</>, OUT <replaceable class="parameter">weights</> <type>text</>)</function></literal> + <literal><function>unnest(<type>tsvector</type>, OUT <replaceable class="parameter">lexeme</replaceable> <type>text</type>, OUT <replaceable class="parameter">positions</replaceable> <type>smallint[]</type>, OUT <replaceable class="parameter">weights</replaceable> <type>text</type>)</function></literal> </entry> <entry><type>setof record</type></entry> <entry>expand a <type>tsvector</type> to a set of rows</entry> @@ -9774,7 +9774,7 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple <note> <para> - All the text search functions that accept an optional <type>regconfig</> + All the text search functions that accept an optional <type>regconfig</type> argument will use the configuration specified by <xref linkend="guc-default-text-search-config"> when that argument is omitted. @@ -9807,7 +9807,7 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple <indexterm> <primary>ts_debug</primary> </indexterm> - <literal><function>ts_debug(<optional> <replaceable class="parameter">config</replaceable> <type>regconfig</>, </optional> <replaceable class="parameter">document</replaceable> <type>text</>, OUT <replaceable class="parameter">alias</> <type>text</>, OUT <replaceable class="parameter">description</> <type>text</>, OUT <replaceable class="parameter">token</> <type>text</>, OUT <replaceable class="parameter">dictionaries</> <type>regdictionary[]</>, OUT <replaceable class="parameter">dictionary</> <type>regdictionary</>, OUT <replaceable class="parameter">lexemes</> <type>text[]</>)</function></literal> + <literal><function>ts_debug(<optional> <replaceable class="parameter">config</replaceable> <type>regconfig</type>, </optional> <replaceable class="parameter">document</replaceable> <type>text</type>, OUT <replaceable class="parameter">alias</replaceable> <type>text</type>, OUT <replaceable class="parameter">description</replaceable> <type>text</type>, OUT <replaceable class="parameter">token</replaceable> <type>text</type>, OUT <replaceable class="parameter">dictionaries</replaceable> <type>regdictionary[]</type>, OUT <replaceable class="parameter">dictionary</replaceable> <type>regdictionary</type>, OUT <replaceable class="parameter">lexemes</replaceable> <type>text[]</type>)</function></literal> </entry> <entry><type>setof record</type></entry> <entry>test a configuration</entry> @@ -9819,7 +9819,7 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple <indexterm> <primary>ts_lexize</primary> </indexterm> - <literal><function>ts_lexize(<replaceable class="parameter">dict</replaceable> <type>regdictionary</>, <replaceable class="parameter">token</replaceable> <type>text</>)</function></literal> + <literal><function>ts_lexize(<replaceable class="parameter">dict</replaceable> <type>regdictionary</type>, <replaceable class="parameter">token</replaceable> <type>text</type>)</function></literal> </entry> <entry><type>text[]</type></entry> <entry>test a dictionary</entry> @@ -9831,7 +9831,7 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple <indexterm> <primary>ts_parse</primary> </indexterm> - <literal><function>ts_parse(<replaceable class="parameter">parser_name</replaceable> <type>text</>, <replaceable class="parameter">document</replaceable> <type>text</>, OUT <replaceable class="parameter">tokid</> <type>integer</>, OUT <replaceable class="parameter">token</> <type>text</>)</function></literal> + <literal><function>ts_parse(<replaceable class="parameter">parser_name</replaceable> <type>text</type>, <replaceable class="parameter">document</replaceable> <type>text</type>, OUT <replaceable class="parameter">tokid</replaceable> <type>integer</type>, OUT <replaceable class="parameter">token</replaceable> <type>text</type>)</function></literal> </entry> <entry><type>setof record</type></entry> <entry>test a parser</entry> @@ -9839,7 +9839,7 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple <entry><literal>(1,foo) ...</literal></entry> </row> <row> - <entry><literal><function>ts_parse(<replaceable class="parameter">parser_oid</replaceable> <type>oid</>, <replaceable class="parameter">document</replaceable> <type>text</>, OUT <replaceable class="parameter">tokid</> <type>integer</>, OUT <replaceable class="parameter">token</> <type>text</>)</function></literal></entry> + <entry><literal><function>ts_parse(<replaceable class="parameter">parser_oid</replaceable> <type>oid</type>, <replaceable class="parameter">document</replaceable> <type>text</type>, OUT <replaceable class="parameter">tokid</replaceable> <type>integer</type>, OUT <replaceable class="parameter">token</replaceable> <type>text</type>)</function></literal></entry> <entry><type>setof record</type></entry> <entry>test a parser</entry> <entry><literal>ts_parse(3722, 'foo - bar')</literal></entry> @@ -9850,7 +9850,7 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple <indexterm> <primary>ts_token_type</primary> </indexterm> - <literal><function>ts_token_type(<replaceable class="parameter">parser_name</> <type>text</>, OUT <replaceable class="parameter">tokid</> <type>integer</>, OUT <replaceable class="parameter">alias</> <type>text</>, OUT <replaceable class="parameter">description</> <type>text</>)</function></literal> + <literal><function>ts_token_type(<replaceable class="parameter">parser_name</replaceable> <type>text</type>, OUT <replaceable class="parameter">tokid</replaceable> <type>integer</type>, OUT <replaceable class="parameter">alias</replaceable> <type>text</type>, OUT <replaceable class="parameter">description</replaceable> <type>text</type>)</function></literal> </entry> <entry><type>setof record</type></entry> <entry>get token types defined by parser</entry> @@ -9858,7 +9858,7 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple <entry><literal>(1,asciiword,"Word, all ASCII") ...</literal></entry> </row> <row> - <entry><literal><function>ts_token_type(<replaceable class="parameter">parser_oid</> <type>oid</>, OUT <replaceable class="parameter">tokid</> <type>integer</>, OUT <replaceable class="parameter">alias</> <type>text</>, OUT <replaceable class="parameter">description</> <type>text</>)</function></literal></entry> + <entry><literal><function>ts_token_type(<replaceable class="parameter">parser_oid</replaceable> <type>oid</type>, OUT <replaceable class="parameter">tokid</replaceable> <type>integer</type>, OUT <replaceable class="parameter">alias</replaceable> <type>text</type>, OUT <replaceable class="parameter">description</replaceable> <type>text</type>)</function></literal></entry> <entry><type>setof record</type></entry> <entry>get token types defined by parser</entry> <entry><literal>ts_token_type(3722)</literal></entry> @@ -9869,10 +9869,10 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple <indexterm> <primary>ts_stat</primary> </indexterm> - <literal><function>ts_stat(<replaceable class="parameter">sqlquery</replaceable> <type>text</>, <optional> <replaceable class="parameter">weights</replaceable> <type>text</>, </optional> OUT <replaceable class="parameter">word</replaceable> <type>text</>, OUT <replaceable class="parameter">ndoc</replaceable> <type>integer</>, OUT <replaceable class="parameter">nentry</replaceable> <type>integer</>)</function></literal> + <literal><function>ts_stat(<replaceable class="parameter">sqlquery</replaceable> <type>text</type>, <optional> <replaceable class="parameter">weights</replaceable> <type>text</type>, </optional> OUT <replaceable class="parameter">word</replaceable> <type>text</type>, OUT <replaceable class="parameter">ndoc</replaceable> <type>integer</type>, OUT <replaceable class="parameter">nentry</replaceable> <type>integer</type>)</function></literal> </entry> <entry><type>setof record</type></entry> - <entry>get statistics of a <type>tsvector</> column</entry> + <entry>get statistics of a <type>tsvector</type> column</entry> <entry><literal>ts_stat('SELECT vector from apod')</literal></entry> <entry><literal>(foo,10,15) ...</literal></entry> </row> @@ -9894,7 +9894,7 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple and <function>xmlserialize</function> for converting to and from type <type>xml</type> are not repeated here. Use of most of these functions requires the installation to have been built - with <command>configure --with-libxml</>. + with <command>configure --with-libxml</command>. </para> <sect2 id="functions-producing-xml"> @@ -10246,7 +10246,7 @@ SELECT xmlagg(x) FROM test; </para> <para> - To determine the order of the concatenation, an <literal>ORDER BY</> + To determine the order of the concatenation, an <literal>ORDER BY</literal> clause may be added to the aggregate call as described in <xref linkend="syntax-aggregates">. For example: @@ -10365,18 +10365,18 @@ SELECT xmlexists('//town[text() = ''Toronto'']' PASSING BY REF '<towns><town>Tor </synopsis> <para> - These functions check whether a <type>text</> string is well-formed XML, + These functions check whether a <type>text</type> string is well-formed XML, returning a Boolean result. <function>xml_is_well_formed_document</function> checks for a well-formed document, while <function>xml_is_well_formed_content</function> checks for well-formed content. <function>xml_is_well_formed</function> does the former if the <xref linkend="guc-xmloption"> configuration - parameter is set to <literal>DOCUMENT</>, or the latter if it is set to - <literal>CONTENT</>. This means that + parameter is set to <literal>DOCUMENT</literal>, or the latter if it is set to + <literal>CONTENT</literal>. This means that <function>xml_is_well_formed</function> is useful for seeing whether - a simple cast to type <type>xml</> will succeed, whereas the other two + a simple cast to type <type>xml</type> will succeed, whereas the other two functions are useful for seeing whether the corresponding variants of - <function>XMLPARSE</> will succeed. + <function>XMLPARSE</function> will succeed. </para> <para> @@ -10446,7 +10446,7 @@ SELECT xml_is_well_formed_document('<pg:foo xmlns:pg="http://postgresql.org/stuf <para> The function <function>xpath</function> evaluates the XPath - expression <replaceable>xpath</replaceable> (a <type>text</> value) + expression <replaceable>xpath</replaceable> (a <type>text</type> value) against the XML value <replaceable>xml</replaceable>. It returns an array of XML values corresponding to the node set produced by the XPath expression. @@ -10461,14 +10461,14 @@ SELECT xml_is_well_formed_document('<pg:foo xmlns:pg="http://postgresql.org/stuf <para> The optional third argument of the function is an array of namespace - mappings. This array should be a two-dimensional <type>text</> array with + mappings. This array should be a two-dimensional <type>text</type> array with the length of the second axis being equal to 2 (i.e., it should be an array of arrays, each of which consists of exactly 2 elements). The first element of each array entry is the namespace name (alias), the second the namespace URI. It is not required that aliases provided in this array be the same as those being used in the XML document itself (in other words, both in the XML document and in the <function>xpath</function> - function context, aliases are <emphasis>local</>). + function context, aliases are <emphasis>local</emphasis>). </para> <para> @@ -10514,7 +10514,7 @@ SELECT xpath('//mydefns:b/text()', '<a xmlns="http://example.com"><b>test</b></a of the <function>xpath</function> function. Instead of returning the individual XML values that satisfy the XPath, this function returns a Boolean indicating whether the query was satisfied or not. This - function is equivalent to the standard <literal>XMLEXISTS</> predicate, + function is equivalent to the standard <literal>XMLEXISTS</literal> predicate, except that it also offers support for a namespace mapping argument. </para> @@ -10560,21 +10560,21 @@ SELECT xpath_exists('/my:a/text()', '<my:a xmlns:my="http://example.com">test</m </para> <para> - The optional <literal>XMLNAMESPACES</> clause is a comma-separated + The optional <literal>XMLNAMESPACES</literal> clause is a comma-separated list of namespaces. It specifies the XML namespaces used in the document and their aliases. A default namespace specification is not currently supported. </para> <para> - The required <replaceable>row_expression</> argument is an XPath + The required <replaceable>row_expression</replaceable> argument is an XPath expression that is evaluated against the supplied XML document to obtain an ordered sequence of XML nodes. This sequence is what - <function>xmltable</> transforms into output rows. + <function>xmltable</function> transforms into output rows. </para> <para> - <replaceable>document_expression</> provides the XML document to + <replaceable>document_expression</replaceable> provides the XML document to operate on. The <literal>BY REF</literal> clauses have no effect in PostgreSQL, but are allowed for SQL conformance and compatibility with other @@ -10586,9 +10586,9 @@ SELECT xpath_exists('/my:a/text()', '<my:a xmlns:my="http://example.com">test</m <para> The mandatory <literal>COLUMNS</literal> clause specifies the list of columns in the output table. - If the <literal>COLUMNS</> clause is omitted, the rows in the result - set contain a single column of type <literal>xml</> containing the - data matched by <replaceable>row_expression</>. + If the <literal>COLUMNS</literal> clause is omitted, the rows in the result + set contain a single column of type <literal>xml</literal> containing the + data matched by <replaceable>row_expression</replaceable>. If <literal>COLUMNS</literal> is specified, each entry describes a single column. See the syntax summary above for the format. @@ -10604,10 +10604,10 @@ SELECT xpath_exists('/my:a/text()', '<my:a xmlns:my="http://example.com">test</m </para> <para> - The <literal>column_expression</> for a column is an XPath expression + The <literal>column_expression</literal> for a column is an XPath expression that is evaluated for each row, relative to the result of the - <replaceable>row_expression</>, to find the value of the column. - If no <literal>column_expression</> is given, then the column name + <replaceable>row_expression</replaceable>, to find the value of the column. + If no <literal>column_expression</literal> is given, then the column name is used as an implicit path. </para> @@ -10615,55 +10615,55 @@ SELECT xpath_exists('/my:a/text()', '<my:a xmlns:my="http://example.com">test</m If a column's XPath expression returns multiple elements, an error is raised. If the expression matches an empty tag, the result is an - empty string (not <literal>NULL</>). - Any <literal>xsi:nil</> attributes are ignored. + empty string (not <literal>NULL</literal>). + Any <literal>xsi:nil</literal> attributes are ignored. </para> <para> - The text body of the XML matched by the <replaceable>column_expression</> + The text body of the XML matched by the <replaceable>column_expression</replaceable> is used as the column value. Multiple <literal>text()</literal> nodes within an element are concatenated in order. Any child elements, processing instructions, and comments are ignored, but the text contents of child elements are concatenated to the result. - Note that the whitespace-only <literal>text()</> node between two non-text - elements is preserved, and that leading whitespace on a <literal>text()</> + Note that the whitespace-only <literal>text()</literal> node between two non-text + elements is preserved, and that leading whitespace on a <literal>text()</literal> node is not flattened. </para> <para> If the path expression does not match for a given row but - <replaceable>default_expression</> is specified, the value resulting + <replaceable>default_expression</replaceable> is specified, the value resulting from evaluating that expression is used. - If no <literal>DEFAULT</> clause is given for the column, - the field will be set to <literal>NULL</>. - It is possible for a <replaceable>default_expression</> to reference + If no <literal>DEFAULT</literal> clause is given for the column, + the field will be set to <literal>NULL</literal>. + It is possible for a <replaceable>default_expression</replaceable> to reference the value of output columns that appear prior to it in the column list, so the default of one column may be based on the value of another column. </para> <para> - Columns may be marked <literal>NOT NULL</>. If the - <replaceable>column_expression</> for a <literal>NOT NULL</> column - does not match anything and there is no <literal>DEFAULT</> or the - <replaceable>default_expression</> also evaluates to null, an error + Columns may be marked <literal>NOT NULL</literal>. If the + <replaceable>column_expression</replaceable> for a <literal>NOT NULL</literal> column + does not match anything and there is no <literal>DEFAULT</literal> or the + <replaceable>default_expression</replaceable> also evaluates to null, an error is reported. </para> <para> - Unlike regular PostgreSQL functions, <replaceable>column_expression</> - and <replaceable>default_expression</> are not evaluated to a simple + Unlike regular PostgreSQL functions, <replaceable>column_expression</replaceable> + and <replaceable>default_expression</replaceable> are not evaluated to a simple value before calling the function. - <replaceable>column_expression</> is normally evaluated - exactly once per input row, and <replaceable>default_expression</> + <replaceable>column_expression</replaceable> is normally evaluated + exactly once per input row, and <replaceable>default_expression</replaceable> is evaluated each time a default is needed for a field. If the expression qualifies as stable or immutable the repeat evaluation may be skipped. - Effectively <function>xmltable</> behaves more like a subquery than a + Effectively <function>xmltable</function> behaves more like a subquery than a function call. This means that you can usefully use volatile functions like - <function>nextval</> in <replaceable>default_expression</>, and - <replaceable>column_expression</> may depend on other parts of the + <function>nextval</function> in <replaceable>default_expression</replaceable>, and + <replaceable>column_expression</replaceable> may depend on other parts of the XML document. </para> @@ -11029,7 +11029,7 @@ table2-mapping </para> <table id="functions-json-op-table"> - <title><type>json</> and <type>jsonb</> Operators</title> + <title><type>json</type> and <type>jsonb</type> Operators</title> <tgroup cols="5"> <thead> <row> @@ -11059,14 +11059,14 @@ table2-mapping <row> <entry><literal>->></literal></entry> <entry><type>int</type></entry> - <entry>Get JSON array element as <type>text</></entry> + <entry>Get JSON array element as <type>text</type></entry> <entry><literal>'[1,2,3]'::json->>2</literal></entry> <entry><literal>3</literal></entry> </row> <row> <entry><literal>->></literal></entry> <entry><type>text</type></entry> - <entry>Get JSON object field as <type>text</></entry> + <entry>Get JSON object field as <type>text</type></entry> <entry><literal>'{"a":1,"b":2}'::json->>'b'</literal></entry> <entry><literal>2</literal></entry> </row> @@ -11080,7 +11080,7 @@ table2-mapping <row> <entry><literal>#>></literal></entry> <entry><type>text[]</type></entry> - <entry>Get JSON object at specified path as <type>text</></entry> + <entry>Get JSON object at specified path as <type>text</type></entry> <entry><literal>'{"a":[1,2,3],"b":[4,5,6]}'::json#>>'{a,2}'</literal></entry> <entry><literal>3</literal></entry> </row> @@ -11095,7 +11095,7 @@ table2-mapping The field/element/path extraction operators return the same type as their left-hand input (either <type>json</type> or <type>jsonb</type>), except for those specified as - returning <type>text</>, which coerce the value to text. + returning <type>text</type>, which coerce the value to text. The field/element/path extraction operators return NULL, rather than failing, if the JSON input does not have the right structure to match the request; for example if no such element exists. The @@ -11115,14 +11115,14 @@ table2-mapping Some further operators also exist only for <type>jsonb</type>, as shown in <xref linkend="functions-jsonb-op-table">. Many of these operators can be indexed by - <type>jsonb</> operator classes. For a full description of - <type>jsonb</> containment and existence semantics, see <xref + <type>jsonb</type> operator classes. For a full description of + <type>jsonb</type> containment and existence semantics, see <xref linkend="json-containment">. <xref linkend="json-indexing"> describes how these operators can be used to effectively index - <type>jsonb</> data. + <type>jsonb</type> data. </para> <table id="functions-jsonb-op-table"> - <title>Additional <type>jsonb</> Operators</title> + <title>Additional <type>jsonb</type> Operators</title> <tgroup cols="4"> <thead> <row> @@ -11211,7 +11211,7 @@ table2-mapping <note> <para> - The <literal>||</> operator concatenates the elements at the top level of + The <literal>||</literal> operator concatenates the elements at the top level of each of its operands. It does not operate recursively. For example, if both operands are objects with a common key field name, the value of the field in the result will just be the value from the right hand operand. @@ -11221,8 +11221,8 @@ table2-mapping <para> <xref linkend="functions-json-creation-table"> shows the functions that are available for creating <type>json</type> and <type>jsonb</type> values. - (There are no equivalent functions for <type>jsonb</>, of the <literal>row_to_json</> - and <literal>array_to_json</> functions. However, the <literal>to_jsonb</> + (There are no equivalent functions for <type>jsonb</type>, of the <literal>row_to_json</literal> + and <literal>array_to_json</literal> functions. However, the <literal>to_jsonb</literal> function supplies much the same functionality as these functions would.) </para> @@ -11274,14 +11274,14 @@ table2-mapping </para><para><literal>to_jsonb(anyelement)</literal> </para></entry> <entry> - Returns the value as <type>json</> or <type>jsonb</>. + Returns the value as <type>json</type> or <type>jsonb</type>. Arrays and composites are converted (recursively) to arrays and objects; otherwise, if there is a cast from the type to <type>json</type>, the cast function will be used to perform the conversion; otherwise, a scalar value is produced. For any scalar type other than a number, a Boolean, or a null value, the text representation will be used, in such a fashion that it is a - valid <type>json</> or <type>jsonb</> value. + valid <type>json</type> or <type>jsonb</type> value. </entry> <entry><literal>to_json('Fred said "Hi."'::text)</literal></entry> <entry><literal>"Fred said \"Hi.\""</literal></entry> @@ -11343,8 +11343,8 @@ table2-mapping such that each inner array has exactly two elements, which are taken as a key/value pair. </entry> - <entry><para><literal>json_object('{a, 1, b, "def", c, 3.5}')</></para> - <para><literal>json_object('{{a, 1},{b, "def"},{c, 3.5}}')</></para></entry> + <entry><para><literal>json_object('{a, 1, b, "def", c, 3.5}')</literal></para> + <para><literal>json_object('{{a, 1},{b, "def"},{c, 3.5}}')</literal></para></entry> <entry><literal>{"a": "1", "b": "def", "c": "3.5"}</literal></entry> </row> <row> @@ -11352,7 +11352,7 @@ table2-mapping </para><para><literal>jsonb_object(keys text[], values text[])</literal> </para></entry> <entry> - This form of <function>json_object</> takes keys and values pairwise from two separate + This form of <function>json_object</function> takes keys and values pairwise from two separate arrays. In all other respects it is identical to the one-argument form. </entry> <entry><literal>json_object('{a, b}', '{1,2}')</literal></entry> @@ -11364,9 +11364,9 @@ table2-mapping <note> <para> - <function>array_to_json</> and <function>row_to_json</> have the same - behavior as <function>to_json</> except for offering a pretty-printing - option. The behavior described for <function>to_json</> likewise applies + <function>array_to_json</function> and <function>row_to_json</function> have the same + behavior as <function>to_json</function> except for offering a pretty-printing + option. The behavior described for <function>to_json</function> likewise applies to each individual value converted by the other JSON creation functions. </para> </note> @@ -11530,7 +11530,7 @@ table2-mapping <entry><type>setof key text, value text</type></entry> <entry> Expands the outermost JSON object into a set of key/value pairs. The - returned values will be of type <type>text</>. + returned values will be of type <type>text</type>. </entry> <entry><literal>select * from json_each_text('{"a":"foo", "b":"bar"}')</literal></entry> <entry> @@ -11562,7 +11562,7 @@ table2-mapping <entry><type>text</type></entry> <entry> Returns JSON value pointed to by <replaceable>path_elems</replaceable> - as <type>text</> + as <type>text</type> (equivalent to <literal>#>></literal> operator). </entry> <entry><literal>json_extract_path_text('{"f2":{"f3":1},"f4":{"f5":99,"f6":"foo"}}','f4', 'f6')</literal></entry> @@ -11593,7 +11593,7 @@ table2-mapping <entry><type>anyelement</type></entry> <entry> Expands the object in <replaceable>from_json</replaceable> to a row - whose columns match the record type defined by <replaceable>base</> + whose columns match the record type defined by <replaceable>base</replaceable> (see note below). </entry> <entry><literal>select * from json_populate_record(null::myrowtype, '{"a": 1, "b": ["2", "a b"], "c": {"d": 4, "e": "a b c"}}')</literal></entry> @@ -11613,7 +11613,7 @@ table2-mapping <entry> Expands the outermost array of objects in <replaceable>from_json</replaceable> to a set of rows whose - columns match the record type defined by <replaceable>base</> (see + columns match the record type defined by <replaceable>base</replaceable> (see note below). </entry> <entry><literal>select * from json_populate_recordset(null::myrowtype, '[{"a":1,"b":2},{"a":3,"b":4}]')</literal></entry> @@ -11653,7 +11653,7 @@ table2-mapping </para></entry> <entry><type>setof text</type></entry> <entry> - Expands a JSON array to a set of <type>text</> values. + Expands a JSON array to a set of <type>text</type> values. </entry> <entry><literal>select * from json_array_elements_text('["foo", "bar"]')</literal></entry> <entry> @@ -11673,8 +11673,8 @@ table2-mapping <entry> Returns the type of the outermost JSON value as a text string. Possible types are - <literal>object</>, <literal>array</>, <literal>string</>, <literal>number</>, - <literal>boolean</>, and <literal>null</>. + <literal>object</literal>, <literal>array</literal>, <literal>string</literal>, <literal>number</literal>, + <literal>boolean</literal>, and <literal>null</literal>. </entry> <entry><literal>json_typeof('-123.4')</literal></entry> <entry><literal>number</literal></entry> @@ -11686,8 +11686,8 @@ table2-mapping <entry><type>record</type></entry> <entry> Builds an arbitrary record from a JSON object (see note below). As - with all functions returning <type>record</>, the caller must - explicitly define the structure of the record with an <literal>AS</> + with all functions returning <type>record</type>, the caller must + explicitly define the structure of the record with an <literal>AS</literal> clause. </entry> <entry><literal>select * from json_to_record('{"a":1,"b":[1,2,3],"c":[1,2,3],"e":"bar","r": {"a": 123, "b": "a b c"}}') as x(a int, b text, c int[], d text, r myrowtype) </literal></entry> @@ -11706,9 +11706,9 @@ table2-mapping <entry><type>setof record</type></entry> <entry> Builds an arbitrary set of records from a JSON array of objects (see - note below). As with all functions returning <type>record</>, the + note below). As with all functions returning <type>record</type>, the caller must explicitly define the structure of the record with - an <literal>AS</> clause. + an <literal>AS</literal> clause. </entry> <entry><literal>select * from json_to_recordset('[{"a":1,"b":"foo"},{"a":"2","c":"bar"}]') as x(a int, b text);</literal></entry> <entry> @@ -11743,7 +11743,7 @@ table2-mapping replaced by <replaceable>new_value</replaceable>, or with <replaceable>new_value</replaceable> added if <replaceable>create_missing</replaceable> is true ( default is - <literal>true</>) and the item + <literal>true</literal>) and the item designated by <replaceable>path</replaceable> does not exist. As with the path orientated operators, negative integers that appear in <replaceable>path</replaceable> count from the end @@ -11770,7 +11770,7 @@ table2-mapping <replaceable>path</replaceable> is in a JSONB array, <replaceable>new_value</replaceable> will be inserted before target or after if <replaceable>insert_after</replaceable> is true (default is - <literal>false</>). If <replaceable>target</replaceable> section + <literal>false</literal>). If <replaceable>target</replaceable> section designated by <replaceable>path</replaceable> is in JSONB object, <replaceable>new_value</replaceable> will be inserted only if <replaceable>target</replaceable> does not exist. As with the path @@ -11820,17 +11820,17 @@ table2-mapping <para> Many of these functions and operators will convert Unicode escapes in JSON strings to the appropriate single character. This is a non-issue - if the input is type <type>jsonb</>, because the conversion was already - done; but for <type>json</> input, this may result in throwing an error, + if the input is type <type>jsonb</type>, because the conversion was already + done; but for <type>json</type> input, this may result in throwing an error, as noted in <xref linkend="datatype-json">. </para> </note> <note> <para> - In <function>json_populate_record</>, <function>json_populate_recordset</>, - <function>json_to_record</> and <function>json_to_recordset</>, - type coercion from the JSON is <quote>best effort</> and may not result + In <function>json_populate_record</function>, <function>json_populate_recordset</function>, + <function>json_to_record</function> and <function>json_to_recordset</function>, + type coercion from the JSON is <quote>best effort</quote> and may not result in desired values for some types. JSON keys are matched to identical column names in the target row type. JSON fields that do not appear in the target row type will be omitted from the output, and @@ -11840,18 +11840,18 @@ table2-mapping <note> <para> - All the items of the <literal>path</> parameter of <literal>jsonb_set</> - as well as <literal>jsonb_insert</> except the last item must be present - in the <literal>target</>. If <literal>create_missing</> is false, all - items of the <literal>path</> parameter of <literal>jsonb_set</> must be - present. If these conditions are not met the <literal>target</> is + All the items of the <literal>path</literal> parameter of <literal>jsonb_set</literal> + as well as <literal>jsonb_insert</literal> except the last item must be present + in the <literal>target</literal>. If <literal>create_missing</literal> is false, all + items of the <literal>path</literal> parameter of <literal>jsonb_set</literal> must be + present. If these conditions are not met the <literal>target</literal> is returned unchanged. </para> <para> If the last path item is an object key, it will be created if it is absent and given the new value. If the last path item is an array index, if it is positive the item to set is found by counting from - the left, and if negative by counting from the right - <literal>-1</> + the left, and if negative by counting from the right - <literal>-1</literal> designates the rightmost element, and so on. If the item is out of the range -array_length .. array_length -1, and create_missing is true, the new value is added at the beginning @@ -11862,20 +11862,20 @@ table2-mapping <note> <para> - The <literal>json_typeof</> function's <literal>null</> return value + The <literal>json_typeof</literal> function's <literal>null</literal> return value should not be confused with a SQL NULL. While - calling <literal>json_typeof('null'::json)</> will - return <literal>null</>, calling <literal>json_typeof(NULL::json)</> + calling <literal>json_typeof('null'::json)</literal> will + return <literal>null</literal>, calling <literal>json_typeof(NULL::json)</literal> will return a SQL NULL. </para> </note> <note> <para> - If the argument to <literal>json_strip_nulls</> contains duplicate + If the argument to <literal>json_strip_nulls</literal> contains duplicate field names in any object, the result could be semantically somewhat different, depending on the order in which they occur. This is not an - issue for <literal>jsonb_strip_nulls</> since <type>jsonb</type> values never have + issue for <literal>jsonb_strip_nulls</literal> since <type>jsonb</type> values never have duplicate object field names. </para> </note> @@ -11886,7 +11886,7 @@ table2-mapping values as JSON, and the aggregate function <function>json_object_agg</function> which aggregates pairs of values into a JSON object, and their <type>jsonb</type> equivalents, - <function>jsonb_agg</> and <function>jsonb_object_agg</>. + <function>jsonb_agg</function> and <function>jsonb_object_agg</function>. </para> </sect1> @@ -11963,52 +11963,52 @@ table2-mapping <para> The sequence to be operated on by a sequence function is specified by - a <type>regclass</> argument, which is simply the OID of the sequence in the - <structname>pg_class</> system catalog. You do not have to look up the - OID by hand, however, since the <type>regclass</> data type's input + a <type>regclass</type> argument, which is simply the OID of the sequence in the + <structname>pg_class</structname> system catalog. You do not have to look up the + OID by hand, however, since the <type>regclass</type> data type's input converter will do the work for you. Just write the sequence name enclosed in single quotes so that it looks like a literal constant. For compatibility with the handling of ordinary <acronym>SQL</acronym> names, the string will be converted to lower case unless it contains double quotes around the sequence name. Thus: <programlisting> -nextval('foo') <lineannotation>operates on sequence <literal>foo</literal></> -nextval('FOO') <lineannotation>operates on sequence <literal>foo</literal></> -nextval('"Foo"') <lineannotation>operates on sequence <literal>Foo</literal></> +nextval('foo') <lineannotation>operates on sequence <literal>foo</literal></lineannotation> +nextval('FOO') <lineannotation>operates on sequence <literal>foo</literal></lineannotation> +nextval('"Foo"') <lineannotation>operates on sequence <literal>Foo</literal></lineannotation> </programlisting> The sequence name can be schema-qualified if necessary: <programlisting> -nextval('myschema.foo') <lineannotation>operates on <literal>myschema.foo</literal></> +nextval('myschema.foo') <lineannotation>operates on <literal>myschema.foo</literal></lineannotation> nextval('"myschema".foo') <lineannotation>same as above</lineannotation> -nextval('foo') <lineannotation>searches search path for <literal>foo</literal></> +nextval('foo') <lineannotation>searches search path for <literal>foo</literal></lineannotation> </programlisting> See <xref linkend="datatype-oid"> for more information about - <type>regclass</>. + <type>regclass</type>. </para> <note> <para> Before <productname>PostgreSQL</productname> 8.1, the arguments of the - sequence functions were of type <type>text</>, not <type>regclass</>, and + sequence functions were of type <type>text</type>, not <type>regclass</type>, and the above-described conversion from a text string to an OID value would happen at run time during each call. For backward compatibility, this facility still exists, but internally it is now handled as an implicit - coercion from <type>text</> to <type>regclass</> before the function is + coercion from <type>text</type> to <type>regclass</type> before the function is invoked. </para> <para> When you write the argument of a sequence function as an unadorned - literal string, it becomes a constant of type <type>regclass</>. + literal string, it becomes a constant of type <type>regclass</type>. Since this is really just an OID, it will track the originally identified sequence despite later renaming, schema reassignment, - etc. This <quote>early binding</> behavior is usually desirable for + etc. This <quote>early binding</quote> behavior is usually desirable for sequence references in column defaults and views. But sometimes you might - want <quote>late binding</> where the sequence reference is resolved + want <quote>late binding</quote> where the sequence reference is resolved at run time. To get late-binding behavior, force the constant to be - stored as a <type>text</> constant instead of <type>regclass</>: + stored as a <type>text</type> constant instead of <type>regclass</type>: <programlisting> -nextval('foo'::text) <lineannotation><literal>foo</literal> is looked up at runtime</> +nextval('foo'::text) <lineannotation><literal>foo</literal> is looked up at runtime</lineannotation> </programlisting> Note that late binding was the only behavior supported in <productname>PostgreSQL</productname> releases before 8.1, so you @@ -12051,14 +12051,14 @@ nextval('foo'::text) <lineannotation><literal>foo</literal> is looked up at rolled back; that is, once a value has been fetched it is considered used and will not be returned again. This is true even if the surrounding transaction later aborts, or if the calling query ends - up not using the value. For example an <command>INSERT</> with - an <literal>ON CONFLICT</> clause will compute the to-be-inserted + up not using the value. For example an <command>INSERT</command> with + an <literal>ON CONFLICT</literal> clause will compute the to-be-inserted tuple, including doing any required <function>nextval</function> calls, before detecting any conflict that would cause it to follow - the <literal>ON CONFLICT</> rule instead. Such cases will leave + the <literal>ON CONFLICT</literal> rule instead. Such cases will leave unused <quote>holes</quote> in the sequence of assigned values. - Thus, <productname>PostgreSQL</> sequence objects <emphasis>cannot - be used to obtain <quote>gapless</> sequences</emphasis>. + Thus, <productname>PostgreSQL</productname> sequence objects <emphasis>cannot + be used to obtain <quote>gapless</quote> sequences</emphasis>. </para> </important> @@ -12094,7 +12094,7 @@ nextval('foo'::text) <lineannotation><literal>foo</literal> is looked up at <listitem> <para> Return the value most recently returned by - <function>nextval</> in the current session. This function is + <function>nextval</function> in the current session. This function is identical to <function>currval</function>, except that instead of taking the sequence name as an argument it refers to whichever sequence <function>nextval</function> was most recently applied to @@ -12119,20 +12119,20 @@ nextval('foo'::text) <lineannotation><literal>foo</literal> is looked up at specified value and sets its <literal>is_called</literal> field to <literal>true</literal>, meaning that the next <function>nextval</function> will advance the sequence before - returning a value. The value reported by <function>currval</> is + returning a value. The value reported by <function>currval</function> is also set to the specified value. In the three-parameter form, <literal>is_called</literal> can be set to either <literal>true</literal> - or <literal>false</literal>. <literal>true</> has the same effect as + or <literal>false</literal>. <literal>true</literal> has the same effect as the two-parameter form. If it is set to <literal>false</literal>, the next <function>nextval</function> will return exactly the specified value, and sequence advancement commences with the following <function>nextval</function>. Furthermore, the value reported by - <function>currval</> is not changed in this case. For example, + <function>currval</function> is not changed in this case. For example, <screen> -SELECT setval('foo', 42); <lineannotation>Next <function>nextval</> will return 43</lineannotation> +SELECT setval('foo', 42); <lineannotation>Next <function>nextval</function> will return 43</lineannotation> SELECT setval('foo', 42, true); <lineannotation>Same as above</lineannotation> -SELECT setval('foo', 42, false); <lineannotation>Next <function>nextval</> will return 42</lineannotation> +SELECT setval('foo', 42, false); <lineannotation>Next <function>nextval</function> will return 42</lineannotation> </screen> The result returned by <function>setval</function> is just the value of its @@ -12183,7 +12183,7 @@ SELECT setval('foo', 42, false); <lineannotation>Next <function>nextval</> wi </tip> <sect2 id="functions-case"> - <title><literal>CASE</></title> + <title><literal>CASE</literal></title> <para> The <acronym>SQL</acronym> <token>CASE</token> expression is a @@ -12206,7 +12206,7 @@ END condition's result is not true, any subsequent <token>WHEN</token> clauses are examined in the same manner. If no <token>WHEN</token> <replaceable>condition</replaceable> yields true, the value of the - <token>CASE</> expression is the <replaceable>result</replaceable> of the + <token>CASE</token> expression is the <replaceable>result</replaceable> of the <token>ELSE</token> clause. If the <token>ELSE</token> clause is omitted and no condition is true, the result is null. </para> @@ -12245,7 +12245,7 @@ SELECT a, </para> <para> - There is a <quote>simple</> form of <token>CASE</token> expression + There is a <quote>simple</quote> form of <token>CASE</token> expression that is a variant of the general form above: <synopsis> @@ -12299,7 +12299,7 @@ SELECT ... WHERE CASE WHEN x <> 0 THEN y/x > 1.5 ELSE false END; situations in which subexpressions of an expression are evaluated at different times, so that the principle that <quote><token>CASE</token> evaluates only necessary subexpressions</quote> is not ironclad. For - example a constant <literal>1/0</> subexpression will usually result in + example a constant <literal>1/0</literal> subexpression will usually result in a division-by-zero failure at planning time, even if it's within a <token>CASE</token> arm that would never be entered at run time. </para> @@ -12307,7 +12307,7 @@ SELECT ... WHERE CASE WHEN x <> 0 THEN y/x > 1.5 ELSE false END; </sect2> <sect2 id="functions-coalesce-nvl-ifnull"> - <title><literal>COALESCE</></title> + <title><literal>COALESCE</literal></title> <indexterm> <primary>COALESCE</primary> @@ -12333,8 +12333,8 @@ SELECT ... WHERE CASE WHEN x <> 0 THEN y/x > 1.5 ELSE false END; <programlisting> SELECT COALESCE(description, short_description, '(none)') ... </programlisting> - This returns <varname>description</> if it is not null, otherwise - <varname>short_description</> if it is not null, otherwise <literal>(none)</>. + This returns <varname>description</varname> if it is not null, otherwise + <varname>short_description</varname> if it is not null, otherwise <literal>(none)</literal>. </para> <para> @@ -12342,13 +12342,13 @@ SELECT COALESCE(description, short_description, '(none)') ... evaluates the arguments that are needed to determine the result; that is, arguments to the right of the first non-null argument are not evaluated. This SQL-standard function provides capabilities similar - to <function>NVL</> and <function>IFNULL</>, which are used in some other + to <function>NVL</function> and <function>IFNULL</function>, which are used in some other database systems. </para> </sect2> <sect2 id="functions-nullif"> - <title><literal>NULLIF</></title> + <title><literal>NULLIF</literal></title> <indexterm> <primary>NULLIF</primary> @@ -12369,7 +12369,7 @@ SELECT NULLIF(value, '(none)') ... </programlisting> </para> <para> - In this example, if <literal>value</literal> is <literal>(none)</>, + In this example, if <literal>value</literal> is <literal>(none)</literal>, null is returned, otherwise the value of <literal>value</literal> is returned. </para> @@ -12394,7 +12394,7 @@ SELECT NULLIF(value, '(none)') ... </synopsis> <para> - The <function>GREATEST</> and <function>LEAST</> functions select the + The <function>GREATEST</function> and <function>LEAST</function> functions select the largest or smallest value from a list of any number of expressions. The expressions must all be convertible to a common data type, which will be the type of the result @@ -12404,7 +12404,7 @@ SELECT NULLIF(value, '(none)') ... </para> <para> - Note that <function>GREATEST</> and <function>LEAST</> are not in + Note that <function>GREATEST</function> and <function>LEAST</function> are not in the SQL standard, but are a common extension. Some other databases make them return NULL if any argument is NULL, rather than only when all are NULL. @@ -12534,7 +12534,7 @@ SELECT NULLIF(value, '(none)') ... If the contents of two arrays are equal but the dimensionality is different, the first difference in the dimensionality information determines the sort order. (This is a change from versions of - <productname>PostgreSQL</> prior to 8.2: older versions would claim + <productname>PostgreSQL</productname> prior to 8.2: older versions would claim that two arrays with the same contents were equal, even if the number of dimensions or subscript ranges were different.) </para> @@ -12833,7 +12833,7 @@ NULL baz</literallayout>(3 rows)</entry> </table> <para> - In <function>array_position</function> and <function>array_positions</>, + In <function>array_position</function> and <function>array_positions</function>, each array element is compared to the searched value using <literal>IS NOT DISTINCT FROM</literal> semantics. </para> @@ -12868,8 +12868,8 @@ NULL baz</literallayout>(3 rows)</entry> <note> <para> - There are two differences in the behavior of <function>string_to_array</> - from pre-9.1 versions of <productname>PostgreSQL</>. + There are two differences in the behavior of <function>string_to_array</function> + from pre-9.1 versions of <productname>PostgreSQL</productname>. First, it will return an empty (zero-element) array rather than NULL when the input string is of zero length. Second, if the delimiter string is NULL, the function splits the input into individual characters, rather @@ -13198,7 +13198,7 @@ NULL baz</literallayout>(3 rows)</entry> </table> <para> - The <function>lower</> and <function>upper</> functions return null + The <function>lower</function> and <function>upper</function> functions return null if the range is empty or the requested bound is infinite. The <function>lower_inc</function>, <function>upper_inc</function>, <function>lower_inf</function>, and <function>upper_inf</function> @@ -13550,7 +13550,7 @@ NULL baz</literallayout>(3 rows)</entry> <type>smallint</type>, <type>int</type>, <type>bigint</type>, <type>real</type>, <type>double precision</type>, <type>numeric</type>, - <type>interval</type>, or <type>money</> + <type>interval</type>, or <type>money</type> </entry> <entry> <type>bigint</type> for <type>smallint</type> or @@ -13647,7 +13647,7 @@ SELECT count(*) FROM sometable; aggregate functions, produce meaningfully different result values depending on the order of the input values. This ordering is unspecified by default, but can be controlled by writing an - <literal>ORDER BY</> clause within the aggregate call, as shown in + <literal>ORDER BY</literal> clause within the aggregate call, as shown in <xref linkend="syntax-aggregates">. Alternatively, supplying the input values from a sorted subquery will usually work. For example: @@ -14082,9 +14082,9 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab; <para> <xref linkend="functions-orderedset-table"> shows some - aggregate functions that use the <firstterm>ordered-set aggregate</> + aggregate functions that use the <firstterm>ordered-set aggregate</firstterm> syntax. These functions are sometimes referred to as <quote>inverse - distribution</> functions. + distribution</quote> functions. </para> <indexterm> @@ -14249,7 +14249,7 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab; window function of the same name defined in <xref linkend="functions-window">. In each case, the aggregate result is the value that the associated window function would have - returned for the <quote>hypothetical</> row constructed from + returned for the <quote>hypothetical</quote> row constructed from <replaceable>args</replaceable>, if such a row had been added to the sorted group of rows computed from the <replaceable>sorted_args</replaceable>. </para> @@ -14280,10 +14280,10 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab; <function>rank(<replaceable class="parameter">args</replaceable>) WITHIN GROUP (ORDER BY <replaceable class="parameter">sorted_args</replaceable>)</function> </entry> <entry> - <literal>VARIADIC</> <type>"any"</type> + <literal>VARIADIC</literal> <type>"any"</type> </entry> <entry> - <literal>VARIADIC</> <type>"any"</type> + <literal>VARIADIC</literal> <type>"any"</type> </entry> <entry> <type>bigint</type> @@ -14303,10 +14303,10 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab; <function>dense_rank(<replaceable class="parameter">args</replaceable>) WITHIN GROUP (ORDER BY <replaceable class="parameter">sorted_args</replaceable>)</function> </entry> <entry> - <literal>VARIADIC</> <type>"any"</type> + <literal>VARIADIC</literal> <type>"any"</type> </entry> <entry> - <literal>VARIADIC</> <type>"any"</type> + <literal>VARIADIC</literal> <type>"any"</type> </entry> <entry> <type>bigint</type> @@ -14326,10 +14326,10 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab; <function>percent_rank(<replaceable class="parameter">args</replaceable>) WITHIN GROUP (ORDER BY <replaceable class="parameter">sorted_args</replaceable>)</function> </entry> <entry> - <literal>VARIADIC</> <type>"any"</type> + <literal>VARIADIC</literal> <type>"any"</type> </entry> <entry> - <literal>VARIADIC</> <type>"any"</type> + <literal>VARIADIC</literal> <type>"any"</type> </entry> <entry> <type>double precision</type> @@ -14349,10 +14349,10 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab; <function>cume_dist(<replaceable class="parameter">args</replaceable>) WITHIN GROUP (ORDER BY <replaceable class="parameter">sorted_args</replaceable>)</function> </entry> <entry> - <literal>VARIADIC</> <type>"any"</type> + <literal>VARIADIC</literal> <type>"any"</type> </entry> <entry> - <literal>VARIADIC</> <type>"any"</type> + <literal>VARIADIC</literal> <type>"any"</type> </entry> <entry> <type>double precision</type> @@ -14360,7 +14360,7 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab; <entry>No</entry> <entry> relative rank of the hypothetical row, ranging from - 1/<replaceable>N</> to 1 + 1/<replaceable>N</replaceable> to 1 </entry> </row> @@ -14374,7 +14374,7 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab; the aggregated arguments given in <replaceable>sorted_args</replaceable>. Unlike most built-in aggregates, these aggregates are not strict, that is they do not drop input rows containing nulls. Null values sort according - to the rule specified in the <literal>ORDER BY</> clause. + to the rule specified in the <literal>ORDER BY</literal> clause. </para> <table id="functions-grouping-table"> @@ -14413,14 +14413,14 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab; <para> Grouping operations are used in conjunction with grouping sets (see <xref linkend="queries-grouping-sets">) to distinguish result rows. The - arguments to the <literal>GROUPING</> operation are not actually evaluated, - but they must match exactly expressions given in the <literal>GROUP BY</> + arguments to the <literal>GROUPING</literal> operation are not actually evaluated, + but they must match exactly expressions given in the <literal>GROUP BY</literal> clause of the associated query level. Bits are assigned with the rightmost argument being the least-significant bit; each bit is 0 if the corresponding expression is included in the grouping criteria of the grouping set generating the result row, and 1 if it is not. For example: <screen> -<prompt>=></> <userinput>SELECT * FROM items_sold;</> +<prompt>=></prompt> <userinput>SELECT * FROM items_sold;</userinput> make | model | sales -------+-------+------- Foo | GT | 10 @@ -14429,7 +14429,7 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab; Bar | Sport | 5 (4 rows) -<prompt>=></> <userinput>SELECT make, model, GROUPING(make,model), sum(sales) FROM items_sold GROUP BY ROLLUP(make,model);</> +<prompt>=></prompt> <userinput>SELECT make, model, GROUPING(make,model), sum(sales) FROM items_sold GROUP BY ROLLUP(make,model);</userinput> make | model | grouping | sum -------+-------+----------+----- Foo | GT | 0 | 10 @@ -14464,8 +14464,8 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab; <para> The built-in window functions are listed in <xref linkend="functions-window-table">. Note that these functions - <emphasis>must</> be invoked using window function syntax, i.e., an - <literal>OVER</> clause is required. + <emphasis>must</emphasis> be invoked using window function syntax, i.e., an + <literal>OVER</literal> clause is required. </para> <para> @@ -14474,7 +14474,7 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab; aggregate (i.e., not ordered-set or hypothetical-set aggregates) can be used as a window function; see <xref linkend="functions-aggregate"> for a list of the built-in aggregates. - Aggregate functions act as window functions only when an <literal>OVER</> + Aggregate functions act as window functions only when an <literal>OVER</literal> clause follows the call; otherwise they act as non-window aggregates and return a single row for the entire set. </para> @@ -14515,7 +14515,7 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab; <entry> <type>bigint</type> </entry> - <entry>rank of the current row with gaps; same as <function>row_number</> of its first peer</entry> + <entry>rank of the current row with gaps; same as <function>row_number</function> of its first peer</entry> </row> <row> @@ -14541,7 +14541,7 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab; <entry> <type>double precision</type> </entry> - <entry>relative rank of the current row: (<function>rank</> - 1) / (total partition rows - 1)</entry> + <entry>relative rank of the current row: (<function>rank</function> - 1) / (total partition rows - 1)</entry> </row> <row> @@ -14562,7 +14562,7 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab; <indexterm> <primary>ntile</primary> </indexterm> - <function>ntile(<replaceable class="parameter">num_buckets</replaceable> <type>integer</>)</function> + <function>ntile(<replaceable class="parameter">num_buckets</replaceable> <type>integer</type>)</function> </entry> <entry> <type>integer</type> @@ -14577,9 +14577,9 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab; <primary>lag</primary> </indexterm> <function> - lag(<replaceable class="parameter">value</replaceable> <type>anyelement</> - [, <replaceable class="parameter">offset</replaceable> <type>integer</> - [, <replaceable class="parameter">default</replaceable> <type>anyelement</> ]]) + lag(<replaceable class="parameter">value</replaceable> <type>anyelement</type> + [, <replaceable class="parameter">offset</replaceable> <type>integer</type> + [, <replaceable class="parameter">default</replaceable> <type>anyelement</type> ]]) </function> </entry> <entry> @@ -14606,9 +14606,9 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab; <primary>lead</primary> </indexterm> <function> - lead(<replaceable class="parameter">value</replaceable> <type>anyelement</> - [, <replaceable class="parameter">offset</replaceable> <type>integer</> - [, <replaceable class="parameter">default</replaceable> <type>anyelement</> ]]) + lead(<replaceable class="parameter">value</replaceable> <type>anyelement</type> + [, <replaceable class="parameter">offset</replaceable> <type>integer</type> + [, <replaceable class="parameter">default</replaceable> <type>anyelement</type> ]]) </function> </entry> <entry> @@ -14634,7 +14634,7 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab; <indexterm> <primary>first_value</primary> </indexterm> - <function>first_value(<replaceable class="parameter">value</replaceable> <type>any</>)</function> + <function>first_value(<replaceable class="parameter">value</replaceable> <type>any</type>)</function> </entry> <entry> <type>same type as <replaceable class="parameter">value</replaceable></type> @@ -14650,7 +14650,7 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab; <indexterm> <primary>last_value</primary> </indexterm> - <function>last_value(<replaceable class="parameter">value</replaceable> <type>any</>)</function> + <function>last_value(<replaceable class="parameter">value</replaceable> <type>any</type>)</function> </entry> <entry> <type>same type as <replaceable class="parameter">value</replaceable></type> @@ -14667,7 +14667,7 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab; <primary>nth_value</primary> </indexterm> <function> - nth_value(<replaceable class="parameter">value</replaceable> <type>any</>, <replaceable class="parameter">nth</replaceable> <type>integer</>) + nth_value(<replaceable class="parameter">value</replaceable> <type>any</type>, <replaceable class="parameter">nth</replaceable> <type>integer</type>) </function> </entry> <entry> @@ -14686,22 +14686,22 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab; <para> All of the functions listed in <xref linkend="functions-window-table"> depend on the sort ordering - specified by the <literal>ORDER BY</> clause of the associated window + specified by the <literal>ORDER BY</literal> clause of the associated window definition. Rows that are not distinct when considering only the - <literal>ORDER BY</> columns are said to be <firstterm>peers</>. - The four ranking functions (including <function>cume_dist</>) are + <literal>ORDER BY</literal> columns are said to be <firstterm>peers</firstterm>. + The four ranking functions (including <function>cume_dist</function>) are defined so that they give the same answer for all peer rows. </para> <para> - Note that <function>first_value</>, <function>last_value</>, and - <function>nth_value</> consider only the rows within the <quote>window - frame</>, which by default contains the rows from the start of the + Note that <function>first_value</function>, <function>last_value</function>, and + <function>nth_value</function> consider only the rows within the <quote>window + frame</quote>, which by default contains the rows from the start of the partition through the last peer of the current row. This is - likely to give unhelpful results for <function>last_value</> and - sometimes also <function>nth_value</>. You can redefine the frame by - adding a suitable frame specification (<literal>RANGE</> or - <literal>ROWS</>) to the <literal>OVER</> clause. + likely to give unhelpful results for <function>last_value</function> and + sometimes also <function>nth_value</function>. You can redefine the frame by + adding a suitable frame specification (<literal>RANGE</literal> or + <literal>ROWS</literal>) to the <literal>OVER</literal> clause. See <xref linkend="syntax-window-functions"> for more information about frame specifications. </para> @@ -14709,34 +14709,34 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab; <para> When an aggregate function is used as a window function, it aggregates over the rows within the current row's window frame. - An aggregate used with <literal>ORDER BY</> and the default window frame - definition produces a <quote>running sum</> type of behavior, which may or + An aggregate used with <literal>ORDER BY</literal> and the default window frame + definition produces a <quote>running sum</quote> type of behavior, which may or may not be what's wanted. To obtain - aggregation over the whole partition, omit <literal>ORDER BY</> or use - <literal>ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING</>. + aggregation over the whole partition, omit <literal>ORDER BY</literal> or use + <literal>ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING</literal>. Other frame specifications can be used to obtain other effects. </para> <note> <para> - The SQL standard defines a <literal>RESPECT NULLS</> or - <literal>IGNORE NULLS</> option for <function>lead</>, <function>lag</>, - <function>first_value</>, <function>last_value</>, and - <function>nth_value</>. This is not implemented in + The SQL standard defines a <literal>RESPECT NULLS</literal> or + <literal>IGNORE NULLS</literal> option for <function>lead</function>, <function>lag</function>, + <function>first_value</function>, <function>last_value</function>, and + <function>nth_value</function>. This is not implemented in <productname>PostgreSQL</productname>: the behavior is always the - same as the standard's default, namely <literal>RESPECT NULLS</>. - Likewise, the standard's <literal>FROM FIRST</> or <literal>FROM LAST</> - option for <function>nth_value</> is not implemented: only the - default <literal>FROM FIRST</> behavior is supported. (You can achieve - the result of <literal>FROM LAST</> by reversing the <literal>ORDER BY</> + same as the standard's default, namely <literal>RESPECT NULLS</literal>. + Likewise, the standard's <literal>FROM FIRST</literal> or <literal>FROM LAST</literal> + option for <function>nth_value</function> is not implemented: only the + default <literal>FROM FIRST</literal> behavior is supported. (You can achieve + the result of <literal>FROM LAST</literal> by reversing the <literal>ORDER BY</literal> ordering.) </para> </note> <para> - <function>cume_dist</> computes the fraction of partition rows that + <function>cume_dist</function> computes the fraction of partition rows that are less than or equal to the current row and its peers, while - <function>percent_rank</> computes the fraction of partition rows that + <function>percent_rank</function> computes the fraction of partition rows that are less than the current row, assuming the current row does not exist in the partition. </para> @@ -14789,12 +14789,12 @@ EXISTS (<replaceable>subquery</replaceable>) </synopsis> <para> - The argument of <token>EXISTS</token> is an arbitrary <command>SELECT</> statement, + The argument of <token>EXISTS</token> is an arbitrary <command>SELECT</command> statement, or <firstterm>subquery</firstterm>. The subquery is evaluated to determine whether it returns any rows. If it returns at least one row, the result of <token>EXISTS</token> is - <quote>true</>; if the subquery returns no rows, the result of <token>EXISTS</token> - is <quote>false</>. + <quote>true</quote>; if the subquery returns no rows, the result of <token>EXISTS</token> + is <quote>false</quote>. </para> <para> @@ -14814,15 +14814,15 @@ EXISTS (<replaceable>subquery</replaceable>) Since the result depends only on whether any rows are returned, and not on the contents of those rows, the output list of the subquery is normally unimportant. A common coding convention is - to write all <literal>EXISTS</> tests in the form + to write all <literal>EXISTS</literal> tests in the form <literal>EXISTS(SELECT 1 WHERE ...)</literal>. There are exceptions to this rule however, such as subqueries that use <token>INTERSECT</token>. </para> <para> - This simple example is like an inner join on <literal>col2</>, but - it produces at most one output row for each <literal>tab1</> row, - even if there are several matching <literal>tab2</> rows: + This simple example is like an inner join on <literal>col2</literal>, but + it produces at most one output row for each <literal>tab1</literal> row, + even if there are several matching <literal>tab2</literal> rows: <screen> SELECT col1 FROM tab1 @@ -14842,8 +14842,8 @@ WHERE EXISTS (SELECT 1 FROM tab2 WHERE col2 = tab1.col2); The right-hand side is a parenthesized subquery, which must return exactly one column. The left-hand expression is evaluated and compared to each row of the subquery result. - The result of <token>IN</token> is <quote>true</> if any equal subquery row is found. - The result is <quote>false</> if no equal row is found (including the + The result of <token>IN</token> is <quote>true</quote> if any equal subquery row is found. + The result is <quote>false</quote> if no equal row is found (including the case where the subquery returns no rows). </para> @@ -14871,8 +14871,8 @@ WHERE EXISTS (SELECT 1 FROM tab2 WHERE col2 = tab1.col2); subquery, which must return exactly as many columns as there are expressions in the left-hand row. The left-hand expressions are evaluated and compared row-wise to each row of the subquery result. - The result of <token>IN</token> is <quote>true</> if any equal subquery row is found. - The result is <quote>false</> if no equal row is found (including the + The result of <token>IN</token> is <quote>true</quote> if any equal subquery row is found. + The result is <quote>false</quote> if no equal row is found (including the case where the subquery returns no rows). </para> @@ -14898,9 +14898,9 @@ WHERE EXISTS (SELECT 1 FROM tab2 WHERE col2 = tab1.col2); The right-hand side is a parenthesized subquery, which must return exactly one column. The left-hand expression is evaluated and compared to each row of the subquery result. - The result of <token>NOT IN</token> is <quote>true</> if only unequal subquery rows + The result of <token>NOT IN</token> is <quote>true</quote> if only unequal subquery rows are found (including the case where the subquery returns no rows). - The result is <quote>false</> if any equal row is found. + The result is <quote>false</quote> if any equal row is found. </para> <para> @@ -14927,9 +14927,9 @@ WHERE EXISTS (SELECT 1 FROM tab2 WHERE col2 = tab1.col2); subquery, which must return exactly as many columns as there are expressions in the left-hand row. The left-hand expressions are evaluated and compared row-wise to each row of the subquery result. - The result of <token>NOT IN</token> is <quote>true</> if only unequal subquery rows + The result of <token>NOT IN</token> is <quote>true</quote> if only unequal subquery rows are found (including the case where the subquery returns no rows). - The result is <quote>false</> if any equal row is found. + The result is <quote>false</quote> if any equal row is found. </para> <para> @@ -14957,8 +14957,8 @@ WHERE EXISTS (SELECT 1 FROM tab2 WHERE col2 = tab1.col2); is evaluated and compared to each row of the subquery result using the given <replaceable>operator</replaceable>, which must yield a Boolean result. - The result of <token>ANY</token> is <quote>true</> if any true result is obtained. - The result is <quote>false</> if no true result is found (including the + The result of <token>ANY</token> is <quote>true</quote> if any true result is obtained. + The result is <quote>false</quote> if no true result is found (including the case where the subquery returns no rows). </para> @@ -14981,8 +14981,8 @@ WHERE EXISTS (SELECT 1 FROM tab2 WHERE col2 = tab1.col2); </para> <synopsis> -<replaceable>row_constructor</replaceable> <replaceable>operator</> ANY (<replaceable>subquery</replaceable>) -<replaceable>row_constructor</replaceable> <replaceable>operator</> SOME (<replaceable>subquery</replaceable>) +<replaceable>row_constructor</replaceable> <replaceable>operator</replaceable> ANY (<replaceable>subquery</replaceable>) +<replaceable>row_constructor</replaceable> <replaceable>operator</replaceable> SOME (<replaceable>subquery</replaceable>) </synopsis> <para> @@ -14993,9 +14993,9 @@ WHERE EXISTS (SELECT 1 FROM tab2 WHERE col2 = tab1.col2); expressions in the left-hand row. The left-hand expressions are evaluated and compared row-wise to each row of the subquery result, using the given <replaceable>operator</replaceable>. - The result of <token>ANY</token> is <quote>true</> if the comparison + The result of <token>ANY</token> is <quote>true</quote> if the comparison returns true for any subquery row. - The result is <quote>false</> if the comparison returns false for every + The result is <quote>false</quote> if the comparison returns false for every subquery row (including the case where the subquery returns no rows). The result is NULL if the comparison does not return true for any row, @@ -15021,9 +15021,9 @@ WHERE EXISTS (SELECT 1 FROM tab2 WHERE col2 = tab1.col2); is evaluated and compared to each row of the subquery result using the given <replaceable>operator</replaceable>, which must yield a Boolean result. - The result of <token>ALL</token> is <quote>true</> if all rows yield true + The result of <token>ALL</token> is <quote>true</quote> if all rows yield true (including the case where the subquery returns no rows). - The result is <quote>false</> if any false result is found. + The result is <quote>false</quote> if any false result is found. The result is NULL if the comparison does not return false for any row, and it returns NULL for at least one row. </para> @@ -15049,10 +15049,10 @@ WHERE EXISTS (SELECT 1 FROM tab2 WHERE col2 = tab1.col2); expressions in the left-hand row. The left-hand expressions are evaluated and compared row-wise to each row of the subquery result, using the given <replaceable>operator</replaceable>. - The result of <token>ALL</token> is <quote>true</> if the comparison + The result of <token>ALL</token> is <quote>true</quote> if the comparison returns true for all subquery rows (including the case where the subquery returns no rows). - The result is <quote>false</> if the comparison returns false for any + The result is <quote>false</quote> if the comparison returns false for any subquery row. The result is NULL if the comparison does not return false for any subquery row, and it returns NULL for at least one row. @@ -15165,7 +15165,7 @@ WHERE EXISTS (SELECT 1 FROM tab2 WHERE col2 = tab1.col2); <para> The right-hand side is a parenthesized list - of scalar expressions. The result is <quote>true</> if the left-hand expression's + of scalar expressions. The result is <quote>true</quote> if the left-hand expression's result is equal to any of the right-hand expressions. This is a shorthand notation for @@ -15243,8 +15243,8 @@ AND is evaluated and compared to each element of the array using the given <replaceable>operator</replaceable>, which must yield a Boolean result. - The result of <token>ANY</token> is <quote>true</> if any true result is obtained. - The result is <quote>false</> if no true result is found (including the + The result of <token>ANY</token> is <quote>true</quote> if any true result is obtained. + The result is <quote>false</quote> if no true result is found (including the case where the array has zero elements). </para> @@ -15279,9 +15279,9 @@ AND is evaluated and compared to each element of the array using the given <replaceable>operator</replaceable>, which must yield a Boolean result. - The result of <token>ALL</token> is <quote>true</> if all comparisons yield true + The result of <token>ALL</token> is <quote>true</quote> if all comparisons yield true (including the case where the array has zero elements). - The result is <quote>false</> if any false result is found. + The result is <quote>false</quote> if any false result is found. </para> <para> @@ -15310,12 +15310,12 @@ AND The two row values must have the same number of fields. Each side is evaluated and they are compared row-wise. Row constructor comparisons are allowed when the <replaceable>operator</replaceable> is - <literal>=</>, - <literal><></>, - <literal><</>, - <literal><=</>, - <literal>></> or - <literal>>=</>. + <literal>=</literal>, + <literal><></literal>, + <literal><</literal>, + <literal><=</literal>, + <literal>></literal> or + <literal>>=</literal>. Every row element must be of a type which has a default B-tree operator class or the attempted comparison may generate an error. </para> @@ -15328,7 +15328,7 @@ AND </note> <para> - The <literal>=</> and <literal><></> cases work slightly differently + The <literal>=</literal> and <literal><></literal> cases work slightly differently from the others. Two rows are considered equal if all their corresponding members are non-null and equal; the rows are unequal if any corresponding members are non-null and unequal; @@ -15336,13 +15336,13 @@ AND </para> <para> - For the <literal><</>, <literal><=</>, <literal>></> and - <literal>>=</> cases, the row elements are compared left-to-right, + For the <literal><</literal>, <literal><=</literal>, <literal>></literal> and + <literal>>=</literal> cases, the row elements are compared left-to-right, stopping as soon as an unequal or null pair of elements is found. If either of this pair of elements is null, the result of the row comparison is unknown (null); otherwise comparison of this pair of elements determines the result. For example, - <literal>ROW(1,2,NULL) < ROW(1,3,0)</> + <literal>ROW(1,2,NULL) < ROW(1,3,0)</literal> yields true, not null, because the third pair of elements are not considered. </para> @@ -15350,13 +15350,13 @@ AND <note> <para> Prior to <productname>PostgreSQL</productname> 8.2, the - <literal><</>, <literal><=</>, <literal>></> and <literal>>=</> + <literal><</literal>, <literal><=</literal>, <literal>></literal> and <literal>>=</literal> cases were not handled per SQL specification. A comparison like - <literal>ROW(a,b) < ROW(c,d)</> + <literal>ROW(a,b) < ROW(c,d)</literal> was implemented as - <literal>a < c AND b < d</> + <literal>a < c AND b < d</literal> whereas the correct behavior is equivalent to - <literal>a < c OR (a = c AND b < d)</>. + <literal>a < c OR (a = c AND b < d)</literal>. </para> </note> @@ -15409,15 +15409,15 @@ AND <para> Each side is evaluated and they are compared row-wise. Composite type comparisons are allowed when the <replaceable>operator</replaceable> is - <literal>=</>, - <literal><></>, - <literal><</>, - <literal><=</>, - <literal>></> or - <literal>>=</>, + <literal>=</literal>, + <literal><></literal>, + <literal><</literal>, + <literal><=</literal>, + <literal>></literal> or + <literal>>=</literal>, or has semantics similar to one of these. (To be specific, an operator can be a row comparison operator if it is a member of a B-tree operator - class, or is the negator of the <literal>=</> member of a B-tree operator + class, or is the negator of the <literal>=</literal> member of a B-tree operator class.) The default behavior of the above operators is the same as for <literal>IS [ NOT ] DISTINCT FROM</literal> for row constructors (see <xref linkend="row-wise-comparison">). @@ -15427,12 +15427,12 @@ AND To support matching of rows which include elements without a default B-tree operator class, the following operators are defined for composite type comparison: - <literal>*=</>, - <literal>*<></>, - <literal>*<</>, - <literal>*<=</>, - <literal>*></>, and - <literal>*>=</>. + <literal>*=</literal>, + <literal>*<></literal>, + <literal>*<</literal>, + <literal>*<=</literal>, + <literal>*></literal>, and + <literal>*>=</literal>. These operators compare the internal binary representation of the two rows. Two rows might have a different binary representation even though comparisons of the two rows with the equality operator is true. @@ -15501,7 +15501,7 @@ AND </row> <row> - <entry><literal><function>generate_series(<parameter>start</parameter>, <parameter>stop</parameter>, <parameter>step</parameter> <type>interval</>)</function></literal></entry> + <entry><literal><function>generate_series(<parameter>start</parameter>, <parameter>stop</parameter>, <parameter>step</parameter> <type>interval</type>)</function></literal></entry> <entry><type>timestamp</type> or <type>timestamp with time zone</type></entry> <entry><type>setof timestamp</type> or <type>setof timestamp with time zone</type> (same as argument type)</entry> <entry> @@ -15616,7 +15616,7 @@ SELECT * FROM generate_series('2008-03-01 00:00'::timestamp, </indexterm> <para> - <function>generate_subscripts</> is a convenience function that generates + <function>generate_subscripts</function> is a convenience function that generates the set of valid subscripts for the specified dimension of the given array. Zero rows are returned for arrays that do not have the requested dimension, @@ -15681,7 +15681,7 @@ SELECT * FROM unnest2(ARRAY[[1,2],[3,4]]); by <literal>WITH ORDINALITY</literal>, a <type>bigint</type> column is appended to the output which starts from 1 and increments by 1 for each row of the function's output. This is most useful in the case of set returning - functions such as <function>unnest()</>. + functions such as <function>unnest()</function>. <programlisting> -- set returning function WITH ORDINALITY @@ -15825,7 +15825,7 @@ SELECT * FROM pg_ls_dir('.') WITH ORDINALITY AS t(ls,n); </row> <row> - <entry><literal><function>pg_current_logfile(<optional><type>text</></optional>)</function></literal></entry> + <entry><literal><function>pg_current_logfile(<optional><type>text</type></optional>)</function></literal></entry> <entry><type>text</type></entry> <entry>Primary log file name, or log in the requested format, currently in use by the logging collector</entry> @@ -15870,7 +15870,7 @@ SELECT * FROM pg_ls_dir('.') WITH ORDINALITY AS t(ls,n); <row> <entry><literal><function>pg_trigger_depth()</function></literal></entry> <entry><type>int</type></entry> - <entry>current nesting level of <productname>PostgreSQL</> triggers + <entry>current nesting level of <productname>PostgreSQL</productname> triggers (0 if not called, directly or indirectly, from inside a trigger)</entry> </row> @@ -15889,7 +15889,7 @@ SELECT * FROM pg_ls_dir('.') WITH ORDINALITY AS t(ls,n); <row> <entry><literal><function>version()</function></literal></entry> <entry><type>text</type></entry> - <entry><productname>PostgreSQL</> version information. See also <xref linkend="guc-server-version-num"> for a machine-readable version.</entry> + <entry><productname>PostgreSQL</productname> version information. See also <xref linkend="guc-server-version-num"> for a machine-readable version.</entry> </row> </tbody> </tgroup> @@ -15979,7 +15979,7 @@ SELECT * FROM pg_ls_dir('.') WITH ORDINALITY AS t(ls,n); <function>current_role</function> and <function>user</function> are synonyms for <function>current_user</function>. (The SQL standard draws a distinction between <function>current_role</function> - and <function>current_user</function>, but <productname>PostgreSQL</> + and <function>current_user</function>, but <productname>PostgreSQL</productname> does not, since it unifies users and roles into a single kind of entity.) </para> @@ -15990,7 +15990,7 @@ SELECT * FROM pg_ls_dir('.') WITH ORDINALITY AS t(ls,n); other named objects that are created without specifying a target schema. <function>current_schemas(boolean)</function> returns an array of the names of all schemas presently in the search path. The Boolean option determines whether or not - implicitly included system schemas such as <literal>pg_catalog</> are included in the + implicitly included system schemas such as <literal>pg_catalog</literal> are included in the returned search path. </para> @@ -15998,7 +15998,7 @@ SELECT * FROM pg_ls_dir('.') WITH ORDINALITY AS t(ls,n); <para> The search path can be altered at run time. The command is: <programlisting> -SET search_path TO <replaceable>schema</> <optional>, <replaceable>schema</>, ...</optional> +SET search_path TO <replaceable>schema</replaceable> <optional>, <replaceable>schema</replaceable>, ...</optional> </programlisting> </para> </note> @@ -16043,7 +16043,7 @@ SET search_path TO <replaceable>schema</> <optional>, <replaceable>schema</>, .. waiting for a lock that would conflict with the blocked process's lock request and is ahead of it in the wait queue (soft block). When using parallel queries the result always lists client-visible process IDs (that - is, <function>pg_backend_pid</> results) even if the actual lock is held + is, <function>pg_backend_pid</function> results) even if the actual lock is held or awaited by a child worker process. As a result of that, there may be duplicated PIDs in the result. Also note that when a prepared transaction holds a conflicting lock, it will be represented by a zero process ID in @@ -16095,15 +16095,15 @@ SET search_path TO <replaceable>schema</> <optional>, <replaceable>schema</>, .. is <literal>NULL</literal>. When multiple log files exist, each in a different format, <function>pg_current_logfile</function> called without arguments returns the path of the file having the first format - found in the ordered list: <systemitem>stderr</>, <systemitem>csvlog</>. + found in the ordered list: <systemitem>stderr</systemitem>, <systemitem>csvlog</systemitem>. <literal>NULL</literal> is returned when no log file has any of these formats. To request a specific file format supply, as <type>text</type>, - either <systemitem>csvlog</> or <systemitem>stderr</> as the value of the + either <systemitem>csvlog</systemitem> or <systemitem>stderr</systemitem> as the value of the optional parameter. The return value is <literal>NULL</literal> when the log format requested is not a configured <xref linkend="guc-log-destination">. The <function>pg_current_logfiles</function> reflects the contents of the - <filename>current_logfiles</> file. + <filename>current_logfiles</filename> file. </para> <indexterm> @@ -16460,7 +16460,7 @@ SET search_path TO <replaceable>schema</> <optional>, <replaceable>schema</>, .. <function>has_table_privilege</function> checks whether a user can access a table in a particular way. The user can be specified by name, by OID (<literal>pg_authid.oid</literal>), - <literal>public</> to indicate the PUBLIC pseudo-role, or if the argument is + <literal>public</literal> to indicate the PUBLIC pseudo-role, or if the argument is omitted <function>current_user</function> is assumed. The table can be specified by name or by OID. (Thus, there are actually six variants of @@ -16470,12 +16470,12 @@ SET search_path TO <replaceable>schema</> <optional>, <replaceable>schema</>, .. The desired access privilege type is specified by a text string, which must evaluate to one of the values <literal>SELECT</literal>, <literal>INSERT</literal>, - <literal>UPDATE</literal>, <literal>DELETE</literal>, <literal>TRUNCATE</>, + <literal>UPDATE</literal>, <literal>DELETE</literal>, <literal>TRUNCATE</literal>, <literal>REFERENCES</literal>, or <literal>TRIGGER</literal>. Optionally, - <literal>WITH GRANT OPTION</> can be added to a privilege type to test + <literal>WITH GRANT OPTION</literal> can be added to a privilege type to test whether the privilege is held with grant option. Also, multiple privilege types can be listed separated by commas, in which case the result will - be <literal>true</> if any of the listed privileges is held. + be <literal>true</literal> if any of the listed privileges is held. (Case of the privilege string is not significant, and extra whitespace is allowed between but not within privilege names.) Some examples: @@ -16499,7 +16499,7 @@ SELECT has_table_privilege('joe', 'mytable', 'INSERT, SELECT WITH GRANT OPTION') <function>has_any_column_privilege</function> checks whether a user can access any column of a table in a particular way. Its argument possibilities - are analogous to <function>has_table_privilege</>, + are analogous to <function>has_table_privilege</function>, except that the desired access privilege type must evaluate to some combination of <literal>SELECT</literal>, @@ -16508,8 +16508,8 @@ SELECT has_table_privilege('joe', 'mytable', 'INSERT, SELECT WITH GRANT OPTION') <literal>REFERENCES</literal>. Note that having any of these privileges at the table level implicitly grants it for each column of the table, so <function>has_any_column_privilege</function> will always return - <literal>true</> if <function>has_table_privilege</> does for the same - arguments. But <function>has_any_column_privilege</> also succeeds if + <literal>true</literal> if <function>has_table_privilege</function> does for the same + arguments. But <function>has_any_column_privilege</function> also succeeds if there is a column-level grant of the privilege for at least one column. </para> @@ -16547,7 +16547,7 @@ SELECT has_table_privilege('joe', 'mytable', 'INSERT, SELECT WITH GRANT OPTION') Its argument possibilities are analogous to <function>has_table_privilege</function>. When specifying a function by a text string rather than by OID, - the allowed input is the same as for the <type>regprocedure</> data type + the allowed input is the same as for the <type>regprocedure</type> data type (see <xref linkend="datatype-oid">). The desired access privilege type must evaluate to <literal>EXECUTE</literal>. @@ -16609,7 +16609,7 @@ SELECT has_function_privilege('joeuser', 'myfunc(int, text)', 'execute'); Its argument possibilities are analogous to <function>has_table_privilege</function>. When specifying a type by a text string rather than by OID, - the allowed input is the same as for the <type>regtype</> data type + the allowed input is the same as for the <type>regtype</type> data type (see <xref linkend="datatype-oid">). The desired access privilege type must evaluate to <literal>USAGE</literal>. @@ -16620,14 +16620,14 @@ SELECT has_function_privilege('joeuser', 'myfunc(int, text)', 'execute'); can access a role in a particular way. Its argument possibilities are analogous to <function>has_table_privilege</function>, - except that <literal>public</> is not allowed as a user name. + except that <literal>public</literal> is not allowed as a user name. The desired access privilege type must evaluate to some combination of <literal>MEMBER</literal> or <literal>USAGE</literal>. <literal>MEMBER</literal> denotes direct or indirect membership in - the role (that is, the right to do <command>SET ROLE</>), while + the role (that is, the right to do <command>SET ROLE</command>), while <literal>USAGE</literal> denotes whether the privileges of the role - are immediately available without doing <command>SET ROLE</>. + are immediately available without doing <command>SET ROLE</command>. </para> <para> @@ -16639,7 +16639,7 @@ SELECT has_function_privilege('joeuser', 'myfunc(int, text)', 'execute'); <para> <xref linkend="functions-info-schema-table"> shows functions that - determine whether a certain object is <firstterm>visible</> in the + determine whether a certain object is <firstterm>visible</firstterm> in the current schema search path. For example, a table is said to be visible if its containing schema is in the search path and no table of the same @@ -16793,16 +16793,16 @@ SELECT relname FROM pg_class WHERE pg_table_is_visible(oid); <function>pg_type_is_visible</function> can also be used with domains. For functions and operators, an object in the search path is visible if there is no object of the same name - <emphasis>and argument data type(s)</> earlier in the path. For operator + <emphasis>and argument data type(s)</emphasis> earlier in the path. For operator classes, both name and associated index access method are considered. </para> <para> All these functions require object OIDs to identify the object to be checked. If you want to test an object by name, it is convenient to use - the OID alias types (<type>regclass</>, <type>regtype</>, - <type>regprocedure</>, <type>regoperator</>, <type>regconfig</>, - or <type>regdictionary</>), + the OID alias types (<type>regclass</type>, <type>regtype</type>, + <type>regprocedure</type>, <type>regoperator</type>, <type>regconfig</type>, + or <type>regdictionary</type>), for example: <programlisting> SELECT pg_type_is_visible('myschema.widget'::regtype); @@ -16949,7 +16949,7 @@ SELECT pg_type_is_visible('myschema.widget'::regtype); <tbody> <row> - <entry><literal><function>format_type(<parameter>type_oid</parameter>, <parameter>typemod</>)</function></literal></entry> + <entry><literal><function>format_type(<parameter>type_oid</parameter>, <parameter>typemod</parameter>)</function></literal></entry> <entry><type>text</type></entry> <entry>get SQL name of a data type</entry> </row> @@ -16959,18 +16959,18 @@ SELECT pg_type_is_visible('myschema.widget'::regtype); <entry>get definition of a constraint</entry> </row> <row> - <entry><literal><function>pg_get_constraintdef(<parameter>constraint_oid</parameter>, <parameter>pretty_bool</>)</function></literal></entry> + <entry><literal><function>pg_get_constraintdef(<parameter>constraint_oid</parameter>, <parameter>pretty_bool</parameter>)</function></literal></entry> <entry><type>text</type></entry> <entry>get definition of a constraint</entry> </row> <row> - <entry><literal><function>pg_get_expr(<parameter>pg_node_tree</parameter>, <parameter>relation_oid</>)</function></literal></entry> + <entry><literal><function>pg_get_expr(<parameter>pg_node_tree</parameter>, <parameter>relation_oid</parameter>)</function></literal></entry> <entry><type>text</type></entry> <entry>decompile internal form of an expression, assuming that any Vars in it refer to the relation indicated by the second parameter</entry> </row> <row> - <entry><literal><function>pg_get_expr(<parameter>pg_node_tree</parameter>, <parameter>relation_oid</>, <parameter>pretty_bool</>)</function></literal></entry> + <entry><literal><function>pg_get_expr(<parameter>pg_node_tree</parameter>, <parameter>relation_oid</parameter>, <parameter>pretty_bool</parameter>)</function></literal></entry> <entry><type>text</type></entry> <entry>decompile internal form of an expression, assuming that any Vars in it refer to the relation indicated by the second parameter</entry> @@ -16993,19 +16993,19 @@ SELECT pg_type_is_visible('myschema.widget'::regtype); <row> <entry><literal><function>pg_get_function_result(<parameter>func_oid</parameter>)</function></literal></entry> <entry><type>text</type></entry> - <entry>get <literal>RETURNS</> clause for function</entry> + <entry>get <literal>RETURNS</literal> clause for function</entry> </row> <row> <entry><literal><function>pg_get_indexdef(<parameter>index_oid</parameter>)</function></literal></entry> <entry><type>text</type></entry> - <entry>get <command>CREATE INDEX</> command for index</entry> + <entry>get <command>CREATE INDEX</command> command for index</entry> </row> <row> - <entry><literal><function>pg_get_indexdef(<parameter>index_oid</parameter>, <parameter>column_no</>, <parameter>pretty_bool</>)</function></literal></entry> + <entry><literal><function>pg_get_indexdef(<parameter>index_oid</parameter>, <parameter>column_no</parameter>, <parameter>pretty_bool</parameter>)</function></literal></entry> <entry><type>text</type></entry> - <entry>get <command>CREATE INDEX</> command for index, + <entry>get <command>CREATE INDEX</command> command for index, or definition of just one index column when - <parameter>column_no</> is not zero</entry> + <parameter>column_no</parameter> is not zero</entry> </row> <row> <entry><literal><function>pg_get_keywords()</function></literal></entry> @@ -17015,12 +17015,12 @@ SELECT pg_type_is_visible('myschema.widget'::regtype); <row> <entry><literal><function>pg_get_ruledef(<parameter>rule_oid</parameter>)</function></literal></entry> <entry><type>text</type></entry> - <entry>get <command>CREATE RULE</> command for rule</entry> + <entry>get <command>CREATE RULE</command> command for rule</entry> </row> <row> - <entry><literal><function>pg_get_ruledef(<parameter>rule_oid</parameter>, <parameter>pretty_bool</>)</function></literal></entry> + <entry><literal><function>pg_get_ruledef(<parameter>rule_oid</parameter>, <parameter>pretty_bool</parameter>)</function></literal></entry> <entry><type>text</type></entry> - <entry>get <command>CREATE RULE</> command for rule</entry> + <entry>get <command>CREATE RULE</command> command for rule</entry> </row> <row> <entry><literal><function>pg_get_serial_sequence(<parameter>table_name</parameter>, <parameter>column_name</parameter>)</function></literal></entry> @@ -17030,17 +17030,17 @@ SELECT pg_type_is_visible('myschema.widget'::regtype); <row> <entry><literal><function>pg_get_statisticsobjdef(<parameter>statobj_oid</parameter>)</function></literal></entry> <entry><type>text</type></entry> - <entry>get <command>CREATE STATISTICS</> command for extended statistics object</entry> + <entry>get <command>CREATE STATISTICS</command> command for extended statistics object</entry> </row> <row> <entry><function>pg_get_triggerdef</function>(<parameter>trigger_oid</parameter>)</entry> <entry><type>text</type></entry> - <entry>get <command>CREATE [ CONSTRAINT ] TRIGGER</> command for trigger</entry> + <entry>get <command>CREATE [ CONSTRAINT ] TRIGGER</command> command for trigger</entry> </row> <row> - <entry><function>pg_get_triggerdef</function>(<parameter>trigger_oid</parameter>, <parameter>pretty_bool</>)</entry> + <entry><function>pg_get_triggerdef</function>(<parameter>trigger_oid</parameter>, <parameter>pretty_bool</parameter>)</entry> <entry><type>text</type></entry> - <entry>get <command>CREATE [ CONSTRAINT ] TRIGGER</> command for trigger</entry> + <entry>get <command>CREATE [ CONSTRAINT ] TRIGGER</command> command for trigger</entry> </row> <row> <entry><literal><function>pg_get_userbyid(<parameter>role_oid</parameter>)</function></literal></entry> @@ -17053,7 +17053,7 @@ SELECT pg_type_is_visible('myschema.widget'::regtype); <entry>get underlying <command>SELECT</command> command for view or materialized view (<emphasis>deprecated</emphasis>)</entry> </row> <row> - <entry><literal><function>pg_get_viewdef(<parameter>view_name</parameter>, <parameter>pretty_bool</>)</function></literal></entry> + <entry><literal><function>pg_get_viewdef(<parameter>view_name</parameter>, <parameter>pretty_bool</parameter>)</function></literal></entry> <entry><type>text</type></entry> <entry>get underlying <command>SELECT</command> command for view or materialized view (<emphasis>deprecated</emphasis>)</entry> </row> @@ -17063,29 +17063,29 @@ SELECT pg_type_is_visible('myschema.widget'::regtype); <entry>get underlying <command>SELECT</command> command for view or materialized view</entry> </row> <row> - <entry><literal><function>pg_get_viewdef(<parameter>view_oid</parameter>, <parameter>pretty_bool</>)</function></literal></entry> + <entry><literal><function>pg_get_viewdef(<parameter>view_oid</parameter>, <parameter>pretty_bool</parameter>)</function></literal></entry> <entry><type>text</type></entry> <entry>get underlying <command>SELECT</command> command for view or materialized view</entry> </row> <row> - <entry><literal><function>pg_get_viewdef(<parameter>view_oid</parameter>, <parameter>wrap_column_int</>)</function></literal></entry> + <entry><literal><function>pg_get_viewdef(<parameter>view_oid</parameter>, <parameter>wrap_column_int</parameter>)</function></literal></entry> <entry><type>text</type></entry> <entry>get underlying <command>SELECT</command> command for view or materialized view; lines with fields are wrapped to specified number of columns, pretty-printing is implied</entry> </row> <row> - <entry><literal><function>pg_index_column_has_property(<parameter>index_oid</parameter>, <parameter>column_no</>, <parameter>prop_name</>)</function></literal></entry> + <entry><literal><function>pg_index_column_has_property(<parameter>index_oid</parameter>, <parameter>column_no</parameter>, <parameter>prop_name</parameter>)</function></literal></entry> <entry><type>boolean</type></entry> <entry>test whether an index column has a specified property</entry> </row> <row> - <entry><literal><function>pg_index_has_property(<parameter>index_oid</parameter>, <parameter>prop_name</>)</function></literal></entry> + <entry><literal><function>pg_index_has_property(<parameter>index_oid</parameter>, <parameter>prop_name</parameter>)</function></literal></entry> <entry><type>boolean</type></entry> <entry>test whether an index has a specified property</entry> </row> <row> - <entry><literal><function>pg_indexam_has_property(<parameter>am_oid</parameter>, <parameter>prop_name</>)</function></literal></entry> + <entry><literal><function>pg_indexam_has_property(<parameter>am_oid</parameter>, <parameter>prop_name</parameter>)</function></literal></entry> <entry><type>boolean</type></entry> <entry>test whether an index access method has a specified property</entry> </row> @@ -17166,11 +17166,11 @@ SELECT pg_type_is_visible('myschema.widget'::regtype); <para> <function>pg_get_keywords</function> returns a set of records describing - the SQL keywords recognized by the server. The <structfield>word</> column - contains the keyword. The <structfield>catcode</> column contains a - category code: <literal>U</> for unreserved, <literal>C</> for column name, - <literal>T</> for type or function name, or <literal>R</> for reserved. - The <structfield>catdesc</> column contains a possibly-localized string + the SQL keywords recognized by the server. The <structfield>word</structfield> column + contains the keyword. The <structfield>catcode</structfield> column contains a + category code: <literal>U</literal> for unreserved, <literal>C</literal> for column name, + <literal>T</literal> for type or function name, or <literal>R</literal> for reserved. + The <structfield>catdesc</structfield> column contains a possibly-localized string describing the category. </para> @@ -17187,26 +17187,26 @@ SELECT pg_type_is_visible('myschema.widget'::regtype); catalogs. If the expression might contain Vars, specify the OID of the relation they refer to as the second parameter; if no Vars are expected, zero is sufficient. <function>pg_get_viewdef</function> reconstructs the - <command>SELECT</> query that defines a view. Most of these functions come - in two variants, one of which can optionally <quote>pretty-print</> the + <command>SELECT</command> query that defines a view. Most of these functions come + in two variants, one of which can optionally <quote>pretty-print</quote> the result. The pretty-printed format is more readable, but the default format is more likely to be interpreted the same way by future versions of - <productname>PostgreSQL</>; avoid using pretty-printed output for dump - purposes. Passing <literal>false</> for the pretty-print parameter yields + <productname>PostgreSQL</productname>; avoid using pretty-printed output for dump + purposes. Passing <literal>false</literal> for the pretty-print parameter yields the same result as the variant that does not have the parameter at all. </para> <para> - <function>pg_get_functiondef</> returns a complete - <command>CREATE OR REPLACE FUNCTION</> statement for a function. + <function>pg_get_functiondef</function> returns a complete + <command>CREATE OR REPLACE FUNCTION</command> statement for a function. <function>pg_get_function_arguments</function> returns the argument list of a function, in the form it would need to appear in within - <command>CREATE FUNCTION</>. + <command>CREATE FUNCTION</command>. <function>pg_get_function_result</function> similarly returns the - appropriate <literal>RETURNS</> clause for the function. + appropriate <literal>RETURNS</literal> clause for the function. <function>pg_get_function_identity_arguments</function> returns the argument list necessary to identify a function, in the form it - would need to appear in within <command>ALTER FUNCTION</>, for + would need to appear in within <command>ALTER FUNCTION</command>, for instance. This form omits default values. </para> @@ -17219,10 +17219,10 @@ SELECT pg_type_is_visible('myschema.widget'::regtype); (<type>serial</type>, <type>smallserial</type>, <type>bigserial</type>), it is the sequence created for that serial column definition. In the latter case, this association can be modified or removed with <command>ALTER - SEQUENCE OWNED BY</>. (The function probably should have been called + SEQUENCE OWNED BY</command>. (The function probably should have been called <function>pg_get_owned_sequence</function>; its current name reflects the - fact that it has typically been used with <type>serial</> - or <type>bigserial</> columns.) The first input parameter is a table name + fact that it has typically been used with <type>serial</type> + or <type>bigserial</type> columns.) The first input parameter is a table name with optional schema, and the second parameter is a column name. Because the first parameter is potentially a schema and table, it is not treated as a double-quoted identifier, meaning it is lower cased by default, while the @@ -17290,8 +17290,8 @@ SELECT currval(pg_get_serial_sequence('sometable', 'id')); </row> <row> <entry><literal>distance_orderable</literal></entry> - <entry>Can the column be scanned in order by a <quote>distance</> - operator, for example <literal>ORDER BY col <-> constant</> ? + <entry>Can the column be scanned in order by a <quote>distance</quote> + operator, for example <literal>ORDER BY col <-> constant</literal> ? </entry> </row> <row> @@ -17301,14 +17301,14 @@ SELECT currval(pg_get_serial_sequence('sometable', 'id')); </row> <row> <entry><literal>search_array</literal></entry> - <entry>Does the column natively support <literal>col = ANY(array)</> + <entry>Does the column natively support <literal>col = ANY(array)</literal> searches? </entry> </row> <row> <entry><literal>search_nulls</literal></entry> - <entry>Does the column support <literal>IS NULL</> and - <literal>IS NOT NULL</> searches? + <entry>Does the column support <literal>IS NULL</literal> and + <literal>IS NOT NULL</literal> searches? </entry> </row> </tbody> @@ -17324,7 +17324,7 @@ SELECT currval(pg_get_serial_sequence('sometable', 'id')); <tbody> <row> <entry><literal>clusterable</literal></entry> - <entry>Can the index be used in a <literal>CLUSTER</> command? + <entry>Can the index be used in a <literal>CLUSTER</literal> command? </entry> </row> <row> @@ -17355,9 +17355,9 @@ SELECT currval(pg_get_serial_sequence('sometable', 'id')); <tbody> <row> <entry><literal>can_order</literal></entry> - <entry>Does the access method support <literal>ASC</>, - <literal>DESC</> and related keywords in - <literal>CREATE INDEX</>? + <entry>Does the access method support <literal>ASC</literal>, + <literal>DESC</literal> and related keywords in + <literal>CREATE INDEX</literal>? </entry> </row> <row> @@ -17382,9 +17382,9 @@ SELECT currval(pg_get_serial_sequence('sometable', 'id')); <para> <function>pg_options_to_table</function> returns the set of storage option name/value pairs - (<replaceable>option_name</>/<replaceable>option_value</>) when passed - <structname>pg_class</>.<structfield>reloptions</> or - <structname>pg_attribute</>.<structfield>attoptions</>. + (<replaceable>option_name</replaceable>/<replaceable>option_value</replaceable>) when passed + <structname>pg_class</structname>.<structfield>reloptions</structfield> or + <structname>pg_attribute</structname>.<structfield>attoptions</structfield>. </para> <para> @@ -17394,14 +17394,14 @@ SELECT currval(pg_get_serial_sequence('sometable', 'id')); empty and cannot be dropped. To display the specific objects populating the tablespace, you will need to connect to the databases identified by <function>pg_tablespace_databases</function> and query their - <structname>pg_class</> catalogs. + <structname>pg_class</structname> catalogs. </para> <para> <function>pg_typeof</function> returns the OID of the data type of the value that is passed to it. This can be helpful for troubleshooting or dynamically constructing SQL queries. The function is declared as - returning <type>regtype</>, which is an OID alias type (see + returning <type>regtype</type>, which is an OID alias type (see <xref linkend="datatype-oid">); this means that it is the same as an OID for comparison purposes but displays as a type name. For example: <programlisting> @@ -17447,10 +17447,10 @@ SELECT collation for ('foo' COLLATE "de_DE"); <function>to_regoperator</function>, <function>to_regtype</function>, <function>to_regnamespace</function>, and <function>to_regrole</function> functions translate relation, function, operator, type, schema, and role - names (given as <type>text</>) to objects of - type <type>regclass</>, <type>regproc</>, <type>regprocedure</type>, - <type>regoper</>, <type>regoperator</type>, <type>regtype</>, - <type>regnamespace</>, and <type>regrole</> + names (given as <type>text</type>) to objects of + type <type>regclass</type>, <type>regproc</type>, <type>regprocedure</type>, + <type>regoper</type>, <type>regoperator</type>, <type>regtype</type>, + <type>regnamespace</type>, and <type>regrole</type> respectively. These functions differ from a cast from text in that they don't accept a numeric OID, and that they return null rather than throwing an error if the name is not found (or, for @@ -17493,18 +17493,18 @@ SELECT collation for ('foo' COLLATE "de_DE"); <entry>get description of a database object</entry> </row> <row> - <entry><literal><function>pg_identify_object(<parameter>catalog_id</parameter> <type>oid</>, <parameter>object_id</parameter> <type>oid</>, <parameter>object_sub_id</parameter> <type>integer</>)</function></literal></entry> - <entry><parameter>type</> <type>text</>, <parameter>schema</> <type>text</>, <parameter>name</> <type>text</>, <parameter>identity</> <type>text</></entry> + <entry><literal><function>pg_identify_object(<parameter>catalog_id</parameter> <type>oid</type>, <parameter>object_id</parameter> <type>oid</type>, <parameter>object_sub_id</parameter> <type>integer</type>)</function></literal></entry> + <entry><parameter>type</parameter> <type>text</type>, <parameter>schema</parameter> <type>text</type>, <parameter>name</parameter> <type>text</type>, <parameter>identity</parameter> <type>text</type></entry> <entry>get identity of a database object</entry> </row> <row> - <entry><literal><function>pg_identify_object_as_address(<parameter>catalog_id</parameter> <type>oid</>, <parameter>object_id</parameter> <type>oid</>, <parameter>object_sub_id</parameter> <type>integer</>)</function></literal></entry> - <entry><parameter>type</> <type>text</>, <parameter>name</> <type>text[]</>, <parameter>args</> <type>text[]</></entry> + <entry><literal><function>pg_identify_object_as_address(<parameter>catalog_id</parameter> <type>oid</type>, <parameter>object_id</parameter> <type>oid</type>, <parameter>object_sub_id</parameter> <type>integer</type>)</function></literal></entry> + <entry><parameter>type</parameter> <type>text</type>, <parameter>name</parameter> <type>text[]</type>, <parameter>args</parameter> <type>text[]</type></entry> <entry>get external representation of a database object's address</entry> </row> <row> - <entry><literal><function>pg_get_object_address(<parameter>type</parameter> <type>text</>, <parameter>name</parameter> <type>text[]</>, <parameter>args</parameter> <type>text[]</>)</function></literal></entry> - <entry><parameter>catalog_id</> <type>oid</>, <parameter>object_id</> <type>oid</>, <parameter>object_sub_id</> <type>int32</></entry> + <entry><literal><function>pg_get_object_address(<parameter>type</parameter> <type>text</type>, <parameter>name</parameter> <type>text[]</type>, <parameter>args</parameter> <type>text[]</type>)</function></literal></entry> + <entry><parameter>catalog_id</parameter> <type>oid</type>, <parameter>object_id</parameter> <type>oid</type>, <parameter>object_sub_id</parameter> <type>int32</type></entry> <entry>get address of a database object, from its external representation</entry> </row> </tbody> @@ -17525,13 +17525,13 @@ SELECT collation for ('foo' COLLATE "de_DE"); to uniquely identify the database object specified by catalog OID, object OID and a (possibly zero) sub-object ID. This information is intended to be machine-readable, and is never translated. - <parameter>type</> identifies the type of database object; - <parameter>schema</> is the schema name that the object belongs in, or - <literal>NULL</> for object types that do not belong to schemas; - <parameter>name</> is the name of the object, quoted if necessary, only + <parameter>type</parameter> identifies the type of database object; + <parameter>schema</parameter> is the schema name that the object belongs in, or + <literal>NULL</literal> for object types that do not belong to schemas; + <parameter>name</parameter> is the name of the object, quoted if necessary, only present if it can be used (alongside schema name, if pertinent) as a unique - identifier of the object, otherwise <literal>NULL</>; - <parameter>identity</> is the complete object identity, with the precise format + identifier of the object, otherwise <literal>NULL</literal>; + <parameter>identity</parameter> is the complete object identity, with the precise format depending on object type, and each part within the format being schema-qualified and quoted as necessary. </para> @@ -17542,10 +17542,10 @@ SELECT collation for ('foo' COLLATE "de_DE"); catalog OID, object OID and a (possibly zero) sub-object ID. The returned information is independent of the current server, that is, it could be used to identify an identically named object in another server. - <parameter>type</> identifies the type of database object; - <parameter>name</> and <parameter>args</> are text arrays that together + <parameter>type</parameter> identifies the type of database object; + <parameter>name</parameter> and <parameter>args</parameter> are text arrays that together form a reference to the object. These three columns can be passed to - <function>pg_get_object_address</> to obtain the internal address + <function>pg_get_object_address</function> to obtain the internal address of the object. This function is the inverse of <function>pg_get_object_address</function>. </para> @@ -17554,13 +17554,13 @@ SELECT collation for ('foo' COLLATE "de_DE"); <function>pg_get_object_address</function> returns a row containing enough information to uniquely identify the database object specified by its type and object name and argument arrays. The returned values are the - ones that would be used in system catalogs such as <structname>pg_depend</> + ones that would be used in system catalogs such as <structname>pg_depend</structname> and can be passed to other system functions such as - <function>pg_identify_object</> or <function>pg_describe_object</>. - <parameter>catalog_id</> is the OID of the system catalog containing the + <function>pg_identify_object</function> or <function>pg_describe_object</function>. + <parameter>catalog_id</parameter> is the OID of the system catalog containing the object; - <parameter>object_id</> is the OID of the object itself, and - <parameter>object_sub_id</> is the object sub-ID, or zero if none. + <parameter>object_id</parameter> is the OID of the object itself, and + <parameter>object_sub_id</parameter> is the object sub-ID, or zero if none. This function is the inverse of <function>pg_identify_object_as_address</function>. </para> @@ -17739,9 +17739,9 @@ SELECT collation for ('foo' COLLATE "de_DE"); </table> <para> - The internal transaction ID type (<type>xid</>) is 32 bits wide and + The internal transaction ID type (<type>xid</type>) is 32 bits wide and wraps around every 4 billion transactions. However, these functions - export a 64-bit format that is extended with an <quote>epoch</> counter + export a 64-bit format that is extended with an <quote>epoch</quote> counter so it will not wrap around during the life of an installation. The data type used by these functions, <type>txid_snapshot</type>, stores information about transaction ID @@ -17782,9 +17782,9 @@ SELECT collation for ('foo' COLLATE "de_DE"); <entry><type>xip_list</type></entry> <entry> Active txids at the time of the snapshot. The list - includes only those active txids between <literal>xmin</> - and <literal>xmax</>; there might be active txids higher - than <literal>xmax</>. A txid that is <literal>xmin <= txid < + includes only those active txids between <literal>xmin</literal> + and <literal>xmax</literal>; there might be active txids higher + than <literal>xmax</literal>. A txid that is <literal>xmin <= txid < xmax</literal> and not in this list was already completed at the time of the snapshot, and thus either visible or dead according to its commit status. The list does not @@ -17797,27 +17797,27 @@ SELECT collation for ('foo' COLLATE "de_DE"); </table> <para> - <type>txid_snapshot</>'s textual representation is - <literal><replaceable>xmin</>:<replaceable>xmax</>:<replaceable>xip_list</></literal>. + <type>txid_snapshot</type>'s textual representation is + <literal><replaceable>xmin</replaceable>:<replaceable>xmax</replaceable>:<replaceable>xip_list</replaceable></literal>. For example <literal>10:20:10,14,15</literal> means <literal>xmin=10, xmax=20, xip_list=10, 14, 15</literal>. </para> <para> - <function>txid_status(bigint)</> reports the commit status of a recent + <function>txid_status(bigint)</function> reports the commit status of a recent transaction. Applications may use it to determine whether a transaction committed or aborted when the application and database server become disconnected while a <literal>COMMIT</literal> is in progress. The status of a transaction will be reported as either - <literal>in progress</>, - <literal>committed</>, or <literal>aborted</>, provided that the + <literal>in progress</literal>, + <literal>committed</literal>, or <literal>aborted</literal>, provided that the transaction is recent enough that the system retains the commit status of that transaction. If is old enough that no references to that transaction survive in the system and the commit status information has been discarded, this function will return NULL. Note that prepared - transactions are reported as <literal>in progress</>; applications must + transactions are reported as <literal>in progress</literal>; applications must check <link - linkend="view-pg-prepared-xacts"><literal>pg_prepared_xacts</></> if they + linkend="view-pg-prepared-xacts"><literal>pg_prepared_xacts</literal></link> if they need to determine whether the txid is a prepared transaction. </para> @@ -17852,7 +17852,7 @@ SELECT collation for ('foo' COLLATE "de_DE"); <indexterm><primary>pg_last_committed_xact</primary></indexterm> <literal><function>pg_last_committed_xact()</function></literal> </entry> - <entry><parameter>xid</> <type>xid</>, <parameter>timestamp</> <type>timestamp with time zone</></entry> + <entry><parameter>xid</parameter> <type>xid</type>, <parameter>timestamp</parameter> <type>timestamp with time zone</type></entry> <entry>get transaction ID and commit timestamp of latest committed transaction</entry> </row> </tbody> @@ -17861,7 +17861,7 @@ SELECT collation for ('foo' COLLATE "de_DE"); <para> The functions shown in <xref linkend="functions-controldata"> - print information initialized during <command>initdb</>, such + print information initialized during <command>initdb</command>, such as the catalog version. They also show information about write-ahead logging and checkpoint processing. This information is cluster-wide, and not specific to any one database. They provide most of the same @@ -17927,12 +17927,12 @@ SELECT collation for ('foo' COLLATE "de_DE"); </table> <para> - <function>pg_control_checkpoint</> returns a record, shown in + <function>pg_control_checkpoint</function> returns a record, shown in <xref linkend="functions-pg-control-checkpoint"> </para> <table id="functions-pg-control-checkpoint"> - <title><function>pg_control_checkpoint</> Columns</title> + <title><function>pg_control_checkpoint</function> Columns</title> <tgroup cols="2"> <thead> <row> @@ -18043,12 +18043,12 @@ SELECT collation for ('foo' COLLATE "de_DE"); </table> <para> - <function>pg_control_system</> returns a record, shown in + <function>pg_control_system</function> returns a record, shown in <xref linkend="functions-pg-control-system"> </para> <table id="functions-pg-control-system"> - <title><function>pg_control_system</> Columns</title> + <title><function>pg_control_system</function> Columns</title> <tgroup cols="2"> <thead> <row> @@ -18084,12 +18084,12 @@ SELECT collation for ('foo' COLLATE "de_DE"); </table> <para> - <function>pg_control_init</> returns a record, shown in + <function>pg_control_init</function> returns a record, shown in <xref linkend="functions-pg-control-init"> </para> <table id="functions-pg-control-init"> - <title><function>pg_control_init</> Columns</title> + <title><function>pg_control_init</function> Columns</title> <tgroup cols="2"> <thead> <row> @@ -18165,12 +18165,12 @@ SELECT collation for ('foo' COLLATE "de_DE"); </table> <para> - <function>pg_control_recovery</> returns a record, shown in + <function>pg_control_recovery</function> returns a record, shown in <xref linkend="functions-pg-control-recovery"> </para> <table id="functions-pg-control-recovery"> - <title><function>pg_control_recovery</> Columns</title> + <title><function>pg_control_recovery</function> Columns</title> <tgroup cols="2"> <thead> <row> @@ -18217,7 +18217,7 @@ SELECT collation for ('foo' COLLATE "de_DE"); <para> The functions described in this section are used to control and - monitor a <productname>PostgreSQL</> installation. + monitor a <productname>PostgreSQL</productname> installation. </para> <sect2 id="functions-admin-set"> @@ -18357,7 +18357,7 @@ SELECT set_config('log_statement_stats', 'off', false); <tbody> <row> <entry> - <literal><function>pg_cancel_backend(<parameter>pid</parameter> <type>int</>)</function></literal> + <literal><function>pg_cancel_backend(<parameter>pid</parameter> <type>int</type>)</function></literal> </entry> <entry><type>boolean</type></entry> <entry>Cancel a backend's current query. This is also allowed if the @@ -18382,7 +18382,7 @@ SELECT set_config('log_statement_stats', 'off', false); </row> <row> <entry> - <literal><function>pg_terminate_backend(<parameter>pid</parameter> <type>int</>)</function></literal> + <literal><function>pg_terminate_backend(<parameter>pid</parameter> <type>int</type>)</function></literal> </entry> <entry><type>boolean</type></entry> <entry>Terminate a backend. This is also allowed if the calling role @@ -18401,28 +18401,28 @@ SELECT set_config('log_statement_stats', 'off', false); </para> <para> - <function>pg_cancel_backend</> and <function>pg_terminate_backend</> - send signals (<systemitem>SIGINT</> or <systemitem>SIGTERM</> + <function>pg_cancel_backend</function> and <function>pg_terminate_backend</function> + send signals (<systemitem>SIGINT</systemitem> or <systemitem>SIGTERM</systemitem> respectively) to backend processes identified by process ID. The process ID of an active backend can be found from the <structfield>pid</structfield> column of the <structname>pg_stat_activity</structname> view, or by listing the <command>postgres</command> processes on the server (using - <application>ps</> on Unix or the <application>Task - Manager</> on <productname>Windows</>). + <application>ps</application> on Unix or the <application>Task + Manager</application> on <productname>Windows</productname>). The role of an active backend can be found from the <structfield>usename</structfield> column of the <structname>pg_stat_activity</structname> view. </para> <para> - <function>pg_reload_conf</> sends a <systemitem>SIGHUP</> signal + <function>pg_reload_conf</function> sends a <systemitem>SIGHUP</systemitem> signal to the server, causing configuration files to be reloaded by all server processes. </para> <para> - <function>pg_rotate_logfile</> signals the log-file manager to switch + <function>pg_rotate_logfile</function> signals the log-file manager to switch to a new output file immediately. This works only when the built-in log collector is running, since otherwise there is no log-file manager subprocess. @@ -18492,7 +18492,7 @@ SELECT set_config('log_statement_stats', 'off', false); <tbody> <row> <entry> - <literal><function>pg_create_restore_point(<parameter>name</> <type>text</>)</function></literal> + <literal><function>pg_create_restore_point(<parameter>name</parameter> <type>text</type>)</function></literal> </entry> <entry><type>pg_lsn</type></entry> <entry>Create a named point for performing restore (restricted to superusers by default, but other users can be granted EXECUTE to run the function)</entry> @@ -18520,7 +18520,7 @@ SELECT set_config('log_statement_stats', 'off', false); </row> <row> <entry> - <literal><function>pg_start_backup(<parameter>label</> <type>text</> <optional>, <parameter>fast</> <type>boolean</> <optional>, <parameter>exclusive</> <type>boolean</> </optional></optional>)</function></literal> + <literal><function>pg_start_backup(<parameter>label</parameter> <type>text</type> <optional>, <parameter>fast</parameter> <type>boolean</type> <optional>, <parameter>exclusive</parameter> <type>boolean</type> </optional></optional>)</function></literal> </entry> <entry><type>pg_lsn</type></entry> <entry>Prepare for performing on-line backup (restricted to superusers by default, but other users can be granted EXECUTE to run the function)</entry> @@ -18534,7 +18534,7 @@ SELECT set_config('log_statement_stats', 'off', false); </row> <row> <entry> - <literal><function>pg_stop_backup(<parameter>exclusive</> <type>boolean</> <optional>, <parameter>wait_for_archive</> <type>boolean</> </optional>)</function></literal> + <literal><function>pg_stop_backup(<parameter>exclusive</parameter> <type>boolean</type> <optional>, <parameter>wait_for_archive</parameter> <type>boolean</type> </optional>)</function></literal> </entry> <entry><type>setof record</type></entry> <entry>Finish performing exclusive or non-exclusive on-line backup (restricted to superusers by default, but other users can be granted EXECUTE to run the function)</entry> @@ -18562,23 +18562,23 @@ SELECT set_config('log_statement_stats', 'off', false); </row> <row> <entry> - <literal><function>pg_walfile_name(<parameter>lsn</> <type>pg_lsn</>)</function></literal> + <literal><function>pg_walfile_name(<parameter>lsn</parameter> <type>pg_lsn</type>)</function></literal> </entry> <entry><type>text</type></entry> <entry>Convert write-ahead log location to file name</entry> </row> <row> <entry> - <literal><function>pg_walfile_name_offset(<parameter>lsn</> <type>pg_lsn</>)</function></literal> + <literal><function>pg_walfile_name_offset(<parameter>lsn</parameter> <type>pg_lsn</type>)</function></literal> </entry> - <entry><type>text</>, <type>integer</></entry> + <entry><type>text</type>, <type>integer</type></entry> <entry>Convert write-ahead log location to file name and decimal byte offset within file</entry> </row> <row> <entry> - <literal><function>pg_wal_lsn_diff(<parameter>lsn</> <type>pg_lsn</>, <parameter>lsn</> <type>pg_lsn</>)</function></literal> + <literal><function>pg_wal_lsn_diff(<parameter>lsn</parameter> <type>pg_lsn</type>, <parameter>lsn</parameter> <type>pg_lsn</type>)</function></literal> </entry> - <entry><type>numeric</></entry> + <entry><type>numeric</type></entry> <entry>Calculate the difference between two write-ahead log locations</entry> </row> </tbody> @@ -18586,17 +18586,17 @@ SELECT set_config('log_statement_stats', 'off', false); </table> <para> - <function>pg_start_backup</> accepts an arbitrary user-defined label for + <function>pg_start_backup</function> accepts an arbitrary user-defined label for the backup. (Typically this would be the name under which the backup dump file will be stored.) When used in exclusive mode, the function writes a - backup label file (<filename>backup_label</>) and, if there are any links - in the <filename>pg_tblspc/</> directory, a tablespace map file - (<filename>tablespace_map</>) into the database cluster's data directory, + backup label file (<filename>backup_label</filename>) and, if there are any links + in the <filename>pg_tblspc/</filename> directory, a tablespace map file + (<filename>tablespace_map</filename>) into the database cluster's data directory, performs a checkpoint, and then returns the backup's starting write-ahead log location as text. The user can ignore this result value, but it is provided in case it is useful. When used in non-exclusive mode, the contents of these files are instead returned by the - <function>pg_stop_backup</> function, and should be written to the backup + <function>pg_stop_backup</function> function, and should be written to the backup by the caller. <programlisting> @@ -18606,29 +18606,29 @@ postgres=# select pg_start_backup('label_goes_here'); 0/D4445B8 (1 row) </programlisting> - There is an optional second parameter of type <type>boolean</type>. If <literal>true</>, - it specifies executing <function>pg_start_backup</> as quickly as + There is an optional second parameter of type <type>boolean</type>. If <literal>true</literal>, + it specifies executing <function>pg_start_backup</function> as quickly as possible. This forces an immediate checkpoint which will cause a spike in I/O operations, slowing any concurrently executing queries. </para> <para> - In an exclusive backup, <function>pg_stop_backup</> removes the label file - and, if it exists, the <filename>tablespace_map</> file created by - <function>pg_start_backup</>. In a non-exclusive backup, the contents of - the <filename>backup_label</> and <filename>tablespace_map</> are returned + In an exclusive backup, <function>pg_stop_backup</function> removes the label file + and, if it exists, the <filename>tablespace_map</filename> file created by + <function>pg_start_backup</function>. In a non-exclusive backup, the contents of + the <filename>backup_label</filename> and <filename>tablespace_map</filename> are returned in the result of the function, and should be written to files in the backup (and not in the data directory). There is an optional second - parameter of type <type>boolean</type>. If false, the <function>pg_stop_backup</> + parameter of type <type>boolean</type>. If false, the <function>pg_stop_backup</function> will return immediately after the backup is completed without waiting for WAL to be archived. This behavior is only useful for backup software which independently monitors WAL archiving. Otherwise, WAL required to make the backup consistent might be missing and make the backup - useless. When this parameter is set to true, <function>pg_stop_backup</> + useless. When this parameter is set to true, <function>pg_stop_backup</function> will wait for WAL to be archived when archiving is enabled; on the standby, - this means that it will wait only when <varname>archive_mode = always</>. + this means that it will wait only when <varname>archive_mode = always</varname>. If write activity on the primary is low, it may be useful to run - <function>pg_switch_wal</> on the primary in order to trigger + <function>pg_switch_wal</function> on the primary in order to trigger an immediate segment switch. </para> @@ -18636,7 +18636,7 @@ postgres=# select pg_start_backup('label_goes_here'); When executed on a primary, the function also creates a backup history file in the write-ahead log archive area. The history file includes the label given to - <function>pg_start_backup</>, the starting and ending write-ahead log locations for + <function>pg_start_backup</function>, the starting and ending write-ahead log locations for the backup, and the starting and ending times of the backup. The return value is the backup's ending write-ahead log location (which again can be ignored). After recording the ending location, the current @@ -18646,16 +18646,16 @@ postgres=# select pg_start_backup('label_goes_here'); </para> <para> - <function>pg_switch_wal</> moves to the next write-ahead log file, allowing the + <function>pg_switch_wal</function> moves to the next write-ahead log file, allowing the current file to be archived (assuming you are using continuous archiving). The return value is the ending write-ahead log location + 1 within the just-completed write-ahead log file. If there has been no write-ahead log activity since the last write-ahead log switch, - <function>pg_switch_wal</> does nothing and returns the start location + <function>pg_switch_wal</function> does nothing and returns the start location of the write-ahead log file currently in use. </para> <para> - <function>pg_create_restore_point</> creates a named write-ahead log + <function>pg_create_restore_point</function> creates a named write-ahead log record that can be used as recovery target, and returns the corresponding write-ahead log location. The given name can then be used with <xref linkend="recovery-target-name"> to specify the point up to which @@ -18665,11 +18665,11 @@ postgres=# select pg_start_backup('label_goes_here'); </para> <para> - <function>pg_current_wal_lsn</> displays the current write-ahead log write + <function>pg_current_wal_lsn</function> displays the current write-ahead log write location in the same format used by the above functions. Similarly, - <function>pg_current_wal_insert_lsn</> displays the current write-ahead log - insertion location and <function>pg_current_wal_flush_lsn</> displays the - current write-ahead log flush location. The insertion location is the <quote>logical</> + <function>pg_current_wal_insert_lsn</function> displays the current write-ahead log + insertion location and <function>pg_current_wal_flush_lsn</function> displays the + current write-ahead log flush location. The insertion location is the <quote>logical</quote> end of the write-ahead log at any instant, while the write location is the end of what has actually been written out from the server's internal buffers and flush location is the location guaranteed to be written to durable storage. The write @@ -18681,7 +18681,7 @@ postgres=# select pg_start_backup('label_goes_here'); </para> <para> - You can use <function>pg_walfile_name_offset</> to extract the + You can use <function>pg_walfile_name_offset</function> to extract the corresponding write-ahead log file name and byte offset from the results of any of the above functions. For example: <programlisting> @@ -18691,7 +18691,7 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup()); 00000001000000000000000D | 4039624 (1 row) </programlisting> - Similarly, <function>pg_walfile_name</> extracts just the write-ahead log file name. + Similarly, <function>pg_walfile_name</function> extracts just the write-ahead log file name. When the given write-ahead log location is exactly at a write-ahead log file boundary, both these functions return the name of the preceding write-ahead log file. This is usually the desired behavior for managing write-ahead log archiving @@ -18700,7 +18700,7 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup()); </para> <para> - <function>pg_wal_lsn_diff</> calculates the difference in bytes + <function>pg_wal_lsn_diff</function> calculates the difference in bytes between two write-ahead log locations. It can be used with <structname>pg_stat_replication</structname> or some functions shown in <xref linkend="functions-admin-backup-table"> to get the replication lag. @@ -18878,21 +18878,21 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup()); </indexterm> <para> - <productname>PostgreSQL</> allows database sessions to synchronize their - snapshots. A <firstterm>snapshot</> determines which data is visible to the + <productname>PostgreSQL</productname> allows database sessions to synchronize their + snapshots. A <firstterm>snapshot</firstterm> determines which data is visible to the transaction that is using the snapshot. Synchronized snapshots are necessary when two or more sessions need to see identical content in the database. If two sessions just start their transactions independently, there is always a possibility that some third transaction commits - between the executions of the two <command>START TRANSACTION</> commands, + between the executions of the two <command>START TRANSACTION</command> commands, so that one session sees the effects of that transaction and the other does not. </para> <para> - To solve this problem, <productname>PostgreSQL</> allows a transaction to - <firstterm>export</> the snapshot it is using. As long as the exporting - transaction remains open, other transactions can <firstterm>import</> its + To solve this problem, <productname>PostgreSQL</productname> allows a transaction to + <firstterm>export</firstterm> the snapshot it is using. As long as the exporting + transaction remains open, other transactions can <firstterm>import</firstterm> its snapshot, and thereby be guaranteed that they see exactly the same view of the database that the first transaction sees. But note that any database changes made by any one of these transactions remain invisible @@ -18902,7 +18902,7 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup()); </para> <para> - Snapshots are exported with the <function>pg_export_snapshot</> function, + Snapshots are exported with the <function>pg_export_snapshot</function> function, shown in <xref linkend="functions-snapshot-synchronization-table">, and imported with the <xref linkend="sql-set-transaction"> command. </para> @@ -18928,13 +18928,13 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup()); </table> <para> - The function <function>pg_export_snapshot</> saves the current snapshot - and returns a <type>text</> string identifying the snapshot. This string + The function <function>pg_export_snapshot</function> saves the current snapshot + and returns a <type>text</type> string identifying the snapshot. This string must be passed (outside the database) to clients that want to import the snapshot. The snapshot is available for import only until the end of the transaction that exported it. A transaction can export more than one snapshot, if needed. Note that doing so is only useful in <literal>READ - COMMITTED</> transactions, since in <literal>REPEATABLE READ</> and + COMMITTED</literal> transactions, since in <literal>REPEATABLE READ</literal> and higher isolation levels, transactions use the same snapshot throughout their lifetime. Once a transaction has exported any snapshots, it cannot be prepared with <xref linkend="sql-prepare-transaction">. @@ -18989,7 +18989,7 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup()); <indexterm> <primary>pg_create_physical_replication_slot</primary> </indexterm> - <literal><function>pg_create_physical_replication_slot(<parameter>slot_name</parameter> <type>name</type> <optional>, <parameter>immediately_reserve</> <type>boolean</>, <parameter>temporary</> <type>boolean</></optional>)</function></literal> + <literal><function>pg_create_physical_replication_slot(<parameter>slot_name</parameter> <type>name</type> <optional>, <parameter>immediately_reserve</parameter> <type>boolean</type>, <parameter>temporary</parameter> <type>boolean</type></optional>)</function></literal> </entry> <entry> (<parameter>slot_name</parameter> <type>name</type>, <parameter>lsn</parameter> <type>pg_lsn</type>) @@ -18997,13 +18997,13 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup()); <entry> Creates a new physical replication slot named <parameter>slot_name</parameter>. The optional second parameter, - when <literal>true</>, specifies that the <acronym>LSN</> for this + when <literal>true</literal>, specifies that the <acronym>LSN</acronym> for this replication slot be reserved immediately; otherwise - the <acronym>LSN</> is reserved on first connection from a streaming + the <acronym>LSN</acronym> is reserved on first connection from a streaming replication client. Streaming changes from a physical slot is only possible with the streaming-replication protocol — see <xref linkend="protocol-replication">. The optional third - parameter, <parameter>temporary</>, when set to true, specifies that + parameter, <parameter>temporary</parameter>, when set to true, specifies that the slot should not be permanently stored to disk and is only meant for use by current session. Temporary slots are also released upon any error. This function corresponds @@ -19024,7 +19024,7 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup()); <entry> Drops the physical or logical replication slot named <parameter>slot_name</parameter>. Same as replication protocol - command <literal>DROP_REPLICATION_SLOT</>. For logical slots, this must + command <literal>DROP_REPLICATION_SLOT</literal>. For logical slots, this must be called when connected to the same database the slot was created on. </entry> </row> @@ -19034,7 +19034,7 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup()); <indexterm> <primary>pg_create_logical_replication_slot</primary> </indexterm> - <literal><function>pg_create_logical_replication_slot(<parameter>slot_name</parameter> <type>name</type>, <parameter>plugin</parameter> <type>name</type> <optional>, <parameter>temporary</> <type>boolean</></optional>)</function></literal> + <literal><function>pg_create_logical_replication_slot(<parameter>slot_name</parameter> <type>name</type>, <parameter>plugin</parameter> <type>name</type> <optional>, <parameter>temporary</parameter> <type>boolean</type></optional>)</function></literal> </entry> <entry> (<parameter>slot_name</parameter> <type>name</type>, <parameter>lsn</parameter> <type>pg_lsn</type>) @@ -19043,7 +19043,7 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup()); Creates a new logical (decoding) replication slot named <parameter>slot_name</parameter> using the output plugin <parameter>plugin</parameter>. The optional third - parameter, <parameter>temporary</>, when set to true, specifies that + parameter, <parameter>temporary</parameter>, when set to true, specifies that the slot should not be permanently stored to disk and is only meant for use by current session. Temporary slots are also released upon any error. A call to this function has the same @@ -19065,9 +19065,9 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup()); <entry> Returns changes in the slot <parameter>slot_name</parameter>, starting from the point at which since changes have been consumed last. If - <parameter>upto_lsn</> and <parameter>upto_nchanges</> are NULL, + <parameter>upto_lsn</parameter> and <parameter>upto_nchanges</parameter> are NULL, logical decoding will continue until end of WAL. If - <parameter>upto_lsn</> is non-NULL, decoding will include only + <parameter>upto_lsn</parameter> is non-NULL, decoding will include only those transactions which commit prior to the specified LSN. If <parameter>upto_nchanges</parameter> is non-NULL, decoding will stop when the number of rows produced by decoding exceeds @@ -19155,7 +19155,7 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup()); <literal><function>pg_replication_origin_drop(<parameter>node_name</parameter> <type>text</type>)</function></literal> </entry> <entry> - <type>void</> + <type>void</type> </entry> <entry> Delete a previously created replication origin, including any @@ -19187,7 +19187,7 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup()); <literal><function>pg_replication_origin_session_setup(<parameter>node_name</parameter> <type>text</type>)</function></literal> </entry> <entry> - <type>void</> + <type>void</type> </entry> <entry> Mark the current session as replaying from the given @@ -19205,7 +19205,7 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup()); <literal><function>pg_replication_origin_session_reset()</function></literal> </entry> <entry> - <type>void</> + <type>void</type> </entry> <entry> Cancel the effects @@ -19254,7 +19254,7 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup()); <literal><function>pg_replication_origin_xact_setup(<parameter>origin_lsn</parameter> <type>pg_lsn</type>, <parameter>origin_timestamp</parameter> <type>timestamptz</type>)</function></literal> </entry> <entry> - <type>void</> + <type>void</type> </entry> <entry> Mark the current transaction as replaying a transaction that has @@ -19273,7 +19273,7 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup()); <literal><function>pg_replication_origin_xact_reset()</function></literal> </entry> <entry> - <type>void</> + <type>void</type> </entry> <entry> Cancel the effects of @@ -19289,7 +19289,7 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup()); <literal>pg_replication_origin_advance<function>(<parameter>node_name</parameter> <type>text</type>, <parameter>lsn</parameter> <type>pg_lsn</type>)</function></literal> </entry> <entry> - <type>void</> + <type>void</type> </entry> <entry> Set replication progress for the given node to the given @@ -19446,7 +19446,7 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup()); <entry><type>bigint</type></entry> <entry> Disk space used by the specified fork (<literal>'main'</literal>, - <literal>'fsm'</literal>, <literal>'vm'</>, or <literal>'init'</>) + <literal>'fsm'</literal>, <literal>'vm'</literal>, or <literal>'init'</literal>) of the specified table or index </entry> </row> @@ -19519,7 +19519,7 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup()); <entry><type>bigint</type></entry> <entry> Total disk space used by the specified table, - including all indexes and <acronym>TOAST</> data + including all indexes and <acronym>TOAST</acronym> data </entry> </row> </tbody> @@ -19527,48 +19527,48 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup()); </table> <para> - <function>pg_column_size</> shows the space used to store any individual + <function>pg_column_size</function> shows the space used to store any individual data value. </para> <para> - <function>pg_total_relation_size</> accepts the OID or name of a + <function>pg_total_relation_size</function> accepts the OID or name of a table or toast table, and returns the total on-disk space used for that table, including all associated indexes. This function is equivalent to <function>pg_table_size</function> - <literal>+</> <function>pg_indexes_size</function>. + <literal>+</literal> <function>pg_indexes_size</function>. </para> <para> - <function>pg_table_size</> accepts the OID or name of a table and + <function>pg_table_size</function> accepts the OID or name of a table and returns the disk space needed for that table, exclusive of indexes. (TOAST space, free space map, and visibility map are included.) </para> <para> - <function>pg_indexes_size</> accepts the OID or name of a table and + <function>pg_indexes_size</function> accepts the OID or name of a table and returns the total disk space used by all the indexes attached to that table. </para> <para> - <function>pg_database_size</function> and <function>pg_tablespace_size</> + <function>pg_database_size</function> and <function>pg_tablespace_size</function> accept the OID or name of a database or tablespace, and return the total disk space used therein. To use <function>pg_database_size</function>, - you must have <literal>CONNECT</> permission on the specified database - (which is granted by default), or be a member of the <literal>pg_read_all_stats</> - role. To use <function>pg_tablespace_size</>, you must have - <literal>CREATE</> permission on the specified tablespace, or be a member - of the <literal>pg_read_all_stats</> role unless it is the default tablespace for + you must have <literal>CONNECT</literal> permission on the specified database + (which is granted by default), or be a member of the <literal>pg_read_all_stats</literal> + role. To use <function>pg_tablespace_size</function>, you must have + <literal>CREATE</literal> permission on the specified tablespace, or be a member + of the <literal>pg_read_all_stats</literal> role unless it is the default tablespace for the current database. </para> <para> - <function>pg_relation_size</> accepts the OID or name of a table, index + <function>pg_relation_size</function> accepts the OID or name of a table, index or toast table, and returns the on-disk size in bytes of one fork of that relation. (Note that for most purposes it is more convenient to - use the higher-level functions <function>pg_total_relation_size</> - or <function>pg_table_size</>, which sum the sizes of all forks.) + use the higher-level functions <function>pg_total_relation_size</function> + or <function>pg_table_size</function>, which sum the sizes of all forks.) With one argument, it returns the size of the main data fork of the relation. The second argument can be provided to specify which fork to examine: @@ -19601,13 +19601,13 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup()); </para> <para> - <function>pg_size_pretty</> can be used to format the result of one of + <function>pg_size_pretty</function> can be used to format the result of one of the other functions in a human-readable way, using bytes, kB, MB, GB or TB as appropriate. </para> <para> - <function>pg_size_bytes</> can be used to get the size in bytes from a + <function>pg_size_bytes</function> can be used to get the size in bytes from a string in human-readable format. The input may have units of bytes, kB, MB, GB or TB, and is parsed case-insensitively. If no units are specified, bytes are assumed. @@ -19616,17 +19616,17 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup()); <note> <para> The units kB, MB, GB and TB used by the functions - <function>pg_size_pretty</> and <function>pg_size_bytes</> are defined + <function>pg_size_pretty</function> and <function>pg_size_bytes</function> are defined using powers of 2 rather than powers of 10, so 1kB is 1024 bytes, 1MB is - 1024<superscript>2</> = 1048576 bytes, and so on. + 1024<superscript>2</superscript> = 1048576 bytes, and so on. </para> </note> <para> The functions above that operate on tables or indexes accept a - <type>regclass</> argument, which is simply the OID of the table or index - in the <structname>pg_class</> system catalog. You do not have to look up - the OID by hand, however, since the <type>regclass</> data type's input + <type>regclass</type> argument, which is simply the OID of the table or index + in the <structname>pg_class</structname> system catalog. You do not have to look up + the OID by hand, however, since the <type>regclass</type> data type's input converter will do the work for you. Just write the table name enclosed in single quotes so that it looks like a literal constant. For compatibility with the handling of ordinary <acronym>SQL</acronym> names, the string @@ -19695,28 +19695,28 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup()); </table> <para> - <function>pg_relation_filenode</> accepts the OID or name of a table, - index, sequence, or toast table, and returns the <quote>filenode</> number + <function>pg_relation_filenode</function> accepts the OID or name of a table, + index, sequence, or toast table, and returns the <quote>filenode</quote> number currently assigned to it. The filenode is the base component of the file name(s) used for the relation (see <xref linkend="storage-file-layout"> for more information). For most tables the result is the same as - <structname>pg_class</>.<structfield>relfilenode</>, but for certain - system catalogs <structfield>relfilenode</> is zero and this function must + <structname>pg_class</structname>.<structfield>relfilenode</structfield>, but for certain + system catalogs <structfield>relfilenode</structfield> is zero and this function must be used to get the correct value. The function returns NULL if passed a relation that does not have storage, such as a view. </para> <para> - <function>pg_relation_filepath</> is similar to - <function>pg_relation_filenode</>, but it returns the entire file path name - (relative to the database cluster's data directory <varname>PGDATA</>) of + <function>pg_relation_filepath</function> is similar to + <function>pg_relation_filenode</function>, but it returns the entire file path name + (relative to the database cluster's data directory <varname>PGDATA</varname>) of the relation. </para> <para> - <function>pg_filenode_relation</> is the reverse of - <function>pg_relation_filenode</>. Given a <quote>tablespace</> OID and - a <quote>filenode</>, it returns the associated relation's OID. For a table + <function>pg_filenode_relation</function> is the reverse of + <function>pg_relation_filenode</function>. Given a <quote>tablespace</quote> OID and + a <quote>filenode</quote>, it returns the associated relation's OID. For a table in the database's default tablespace, the tablespace can be specified as 0. </para> @@ -19736,7 +19736,7 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup()); <row> <entry> <indexterm><primary>pg_collation_actual_version</primary></indexterm> - <literal><function>pg_collation_actual_version(<type>oid</>)</function></literal> + <literal><function>pg_collation_actual_version(<type>oid</type>)</function></literal> </entry> <entry><type>text</type></entry> <entry>Return actual version of collation from operating system</entry> @@ -19744,7 +19744,7 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup()); <row> <entry> <indexterm><primary>pg_import_system_collations</primary></indexterm> - <literal><function>pg_import_system_collations(<parameter>schema</> <type>regnamespace</>)</function></literal> + <literal><function>pg_import_system_collations(<parameter>schema</parameter> <type>regnamespace</type>)</function></literal> </entry> <entry><type>integer</type></entry> <entry>Import operating system collations</entry> @@ -19763,7 +19763,7 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup()); </para> <para> - <function>pg_import_system_collations</> adds collations to the system + <function>pg_import_system_collations</function> adds collations to the system catalog <literal>pg_collation</literal> based on all the locales it finds in the operating system. This is what <command>initdb</command> uses; @@ -19818,28 +19818,28 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup()); <tbody> <row> <entry> - <literal><function>brin_summarize_new_values(<parameter>index</> <type>regclass</>)</function></literal> + <literal><function>brin_summarize_new_values(<parameter>index</parameter> <type>regclass</type>)</function></literal> </entry> <entry><type>integer</type></entry> <entry>summarize page ranges not already summarized</entry> </row> <row> <entry> - <literal><function>brin_summarize_range(<parameter>index</> <type>regclass</>, <parameter>blockNumber</> <type>bigint</type>)</function></literal> + <literal><function>brin_summarize_range(<parameter>index</parameter> <type>regclass</type>, <parameter>blockNumber</parameter> <type>bigint</type>)</function></literal> </entry> <entry><type>integer</type></entry> <entry>summarize the page range covering the given block, if not already summarized</entry> </row> <row> <entry> - <literal><function>brin_desummarize_range(<parameter>index</> <type>regclass</>, <parameter>blockNumber</> <type>bigint</type>)</function></literal> + <literal><function>brin_desummarize_range(<parameter>index</parameter> <type>regclass</type>, <parameter>blockNumber</parameter> <type>bigint</type>)</function></literal> </entry> <entry><type>integer</type></entry> <entry>de-summarize the page range covering the given block, if summarized</entry> </row> <row> <entry> - <literal><function>gin_clean_pending_list(<parameter>index</> <type>regclass</>)</function></literal> + <literal><function>gin_clean_pending_list(<parameter>index</parameter> <type>regclass</type>)</function></literal> </entry> <entry><type>bigint</type></entry> <entry>move GIN pending list entries into main index structure</entry> @@ -19849,25 +19849,25 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup()); </table> <para> - <function>brin_summarize_new_values</> accepts the OID or name of a + <function>brin_summarize_new_values</function> accepts the OID or name of a BRIN index and inspects the index to find page ranges in the base table that are not currently summarized by the index; for any such range it creates a new summary index tuple by scanning the table pages. It returns the number of new page range summaries that were inserted - into the index. <function>brin_summarize_range</> does the same, except + into the index. <function>brin_summarize_range</function> does the same, except it only summarizes the range that covers the given block number. </para> <para> - <function>gin_clean_pending_list</> accepts the OID or name of + <function>gin_clean_pending_list</function> accepts the OID or name of a GIN index and cleans up the pending list of the specified index by moving entries in it to the main GIN data structure in bulk. It returns the number of pages removed from the pending list. Note that if the argument is a GIN index built with - the <literal>fastupdate</> option disabled, no cleanup happens and the + the <literal>fastupdate</literal> option disabled, no cleanup happens and the return value is 0, because the index doesn't have a pending list. Please see <xref linkend="gin-fast-update"> and <xref linkend="gin-tips"> - for details of the pending list and <literal>fastupdate</> option. + for details of the pending list and <literal>fastupdate</literal> option. </para> </sect2> @@ -19879,9 +19879,9 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup()); The functions shown in <xref linkend="functions-admin-genfile-table"> provide native access to files on the machine hosting the server. Only files within the - database cluster directory and the <varname>log_directory</> can be + database cluster directory and the <varname>log_directory</varname> can be accessed. Use a relative path for files in the cluster directory, - and a path matching the <varname>log_directory</> configuration setting + and a path matching the <varname>log_directory</varname> configuration setting for log files. Use of these functions is restricted to superusers except where stated otherwise. </para> @@ -19897,7 +19897,7 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup()); <tbody> <row> <entry> - <literal><function>pg_ls_dir(<parameter>dirname</> <type>text</> [, <parameter>missing_ok</> <type>boolean</>, <parameter>include_dot_dirs</> <type>boolean</>])</function></literal> + <literal><function>pg_ls_dir(<parameter>dirname</parameter> <type>text</type> [, <parameter>missing_ok</parameter> <type>boolean</type>, <parameter>include_dot_dirs</parameter> <type>boolean</type>])</function></literal> </entry> <entry><type>setof text</type></entry> <entry> @@ -19911,7 +19911,7 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup()); <entry><type>setof record</type></entry> <entry> List the name, size, and last modification time of files in the log - directory. Access is granted to members of the <literal>pg_monitor</> + directory. Access is granted to members of the <literal>pg_monitor</literal> role and may be granted to other non-superuser roles. </entry> </row> @@ -19922,13 +19922,13 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup()); <entry><type>setof record</type></entry> <entry> List the name, size, and last modification time of files in the WAL - directory. Access is granted to members of the <literal>pg_monitor</> + directory. Access is granted to members of the <literal>pg_monitor</literal> role and may be granted to other non-superuser roles. </entry> </row> <row> <entry> - <literal><function>pg_read_file(<parameter>filename</> <type>text</> [, <parameter>offset</> <type>bigint</>, <parameter>length</> <type>bigint</> [, <parameter>missing_ok</> <type>boolean</>] ])</function></literal> + <literal><function>pg_read_file(<parameter>filename</parameter> <type>text</type> [, <parameter>offset</parameter> <type>bigint</type>, <parameter>length</parameter> <type>bigint</type> [, <parameter>missing_ok</parameter> <type>boolean</type>] ])</function></literal> </entry> <entry><type>text</type></entry> <entry> @@ -19937,7 +19937,7 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup()); </row> <row> <entry> - <literal><function>pg_read_binary_file(<parameter>filename</> <type>text</> [, <parameter>offset</> <type>bigint</>, <parameter>length</> <type>bigint</> [, <parameter>missing_ok</> <type>boolean</>] ])</function></literal> + <literal><function>pg_read_binary_file(<parameter>filename</parameter> <type>text</type> [, <parameter>offset</parameter> <type>bigint</type>, <parameter>length</parameter> <type>bigint</type> [, <parameter>missing_ok</parameter> <type>boolean</type>] ])</function></literal> </entry> <entry><type>bytea</type></entry> <entry> @@ -19946,7 +19946,7 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup()); </row> <row> <entry> - <literal><function>pg_stat_file(<parameter>filename</> <type>text</>[, <parameter>missing_ok</> <type>boolean</type>])</function></literal> + <literal><function>pg_stat_file(<parameter>filename</parameter> <type>text</type>[, <parameter>missing_ok</parameter> <type>boolean</type>])</function></literal> </entry> <entry><type>record</type></entry> <entry> @@ -19958,23 +19958,23 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup()); </table> <para> - Some of these functions take an optional <parameter>missing_ok</> parameter, + Some of these functions take an optional <parameter>missing_ok</parameter> parameter, which specifies the behavior when the file or directory does not exist. If <literal>true</literal>, the function returns NULL (except - <function>pg_ls_dir</>, which returns an empty result set). If - <literal>false</>, an error is raised. The default is <literal>false</>. + <function>pg_ls_dir</function>, which returns an empty result set). If + <literal>false</literal>, an error is raised. The default is <literal>false</literal>. </para> <indexterm> <primary>pg_ls_dir</primary> </indexterm> <para> - <function>pg_ls_dir</> returns the names of all files (and directories + <function>pg_ls_dir</function> returns the names of all files (and directories and other special files) in the specified directory. The <parameter> - include_dot_dirs</> indicates whether <quote>.</> and <quote>..</> are + include_dot_dirs</parameter> indicates whether <quote>.</quote> and <quote>..</quote> are included in the result set. The default is to exclude them - (<literal>false</>), but including them can be useful when - <parameter>missing_ok</> is <literal>true</literal>, to distinguish an + (<literal>false</literal>), but including them can be useful when + <parameter>missing_ok</parameter> is <literal>true</literal>, to distinguish an empty directory from an non-existent directory. </para> @@ -19982,9 +19982,9 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup()); <primary>pg_ls_logdir</primary> </indexterm> <para> - <function>pg_ls_logdir</> returns the name, size, and last modified time + <function>pg_ls_logdir</function> returns the name, size, and last modified time (mtime) of each file in the log directory. By default, only superusers - and members of the <literal>pg_monitor</> role can use this function. + and members of the <literal>pg_monitor</literal> role can use this function. Access may be granted to others using <command>GRANT</command>. </para> @@ -19992,9 +19992,9 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup()); <primary>pg_ls_waldir</primary> </indexterm> <para> - <function>pg_ls_waldir</> returns the name, size, and last modified time + <function>pg_ls_waldir</function> returns the name, size, and last modified time (mtime) of each file in the write ahead log (WAL) directory. By - default only superusers and members of the <literal>pg_monitor</> role + default only superusers and members of the <literal>pg_monitor</literal> role can use this function. Access may be granted to others using <command>GRANT</command>. </para> @@ -20003,11 +20003,11 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup()); <primary>pg_read_file</primary> </indexterm> <para> - <function>pg_read_file</> returns part of a text file, starting - at the given <parameter>offset</>, returning at most <parameter>length</> - bytes (less if the end of file is reached first). If <parameter>offset</> + <function>pg_read_file</function> returns part of a text file, starting + at the given <parameter>offset</parameter>, returning at most <parameter>length</parameter> + bytes (less if the end of file is reached first). If <parameter>offset</parameter> is negative, it is relative to the end of the file. - If <parameter>offset</> and <parameter>length</> are omitted, the entire + If <parameter>offset</parameter> and <parameter>length</parameter> are omitted, the entire file is returned. The bytes read from the file are interpreted as a string in the server encoding; an error is thrown if they are not valid in that encoding. @@ -20017,10 +20017,10 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup()); <primary>pg_read_binary_file</primary> </indexterm> <para> - <function>pg_read_binary_file</> is similar to - <function>pg_read_file</>, except that the result is a <type>bytea</type> value; + <function>pg_read_binary_file</function> is similar to + <function>pg_read_file</function>, except that the result is a <type>bytea</type> value; accordingly, no encoding checks are performed. - In combination with the <function>convert_from</> function, this function + In combination with the <function>convert_from</function> function, this function can be used to read a file in a specified encoding: <programlisting> SELECT convert_from(pg_read_binary_file('file_in_utf8.txt'), 'UTF8'); @@ -20031,7 +20031,7 @@ SELECT convert_from(pg_read_binary_file('file_in_utf8.txt'), 'UTF8'); <primary>pg_stat_file</primary> </indexterm> <para> - <function>pg_stat_file</> returns a record containing the file + <function>pg_stat_file</function> returns a record containing the file size, last accessed time stamp, last modified time stamp, last file status change time stamp (Unix platforms only), file creation time stamp (Windows only), and a <type>boolean</type> @@ -20064,42 +20064,42 @@ SELECT (pg_stat_file('filename')).modification; <tbody> <row> <entry> - <literal><function>pg_advisory_lock(<parameter>key</> <type>bigint</>)</function></literal> + <literal><function>pg_advisory_lock(<parameter>key</parameter> <type>bigint</type>)</function></literal> </entry> <entry><type>void</type></entry> <entry>Obtain exclusive session level advisory lock</entry> </row> <row> <entry> - <literal><function>pg_advisory_lock(<parameter>key1</> <type>int</>, <parameter>key2</> <type>int</>)</function></literal> + <literal><function>pg_advisory_lock(<parameter>key1</parameter> <type>int</type>, <parameter>key2</parameter> <type>int</type>)</function></literal> </entry> <entry><type>void</type></entry> <entry>Obtain exclusive session level advisory lock</entry> </row> <row> <entry> - <literal><function>pg_advisory_lock_shared(<parameter>key</> <type>bigint</>)</function></literal> + <literal><function>pg_advisory_lock_shared(<parameter>key</parameter> <type>bigint</type>)</function></literal> </entry> <entry><type>void</type></entry> <entry>Obtain shared session level advisory lock</entry> </row> <row> <entry> - <literal><function>pg_advisory_lock_shared(<parameter>key1</> <type>int</>, <parameter>key2</> <type>int</>)</function></literal> + <literal><function>pg_advisory_lock_shared(<parameter>key1</parameter> <type>int</type>, <parameter>key2</parameter> <type>int</type>)</function></literal> </entry> <entry><type>void</type></entry> <entry>Obtain shared session level advisory lock</entry> </row> <row> <entry> - <literal><function>pg_advisory_unlock(<parameter>key</> <type>bigint</>)</function></literal> + <literal><function>pg_advisory_unlock(<parameter>key</parameter> <type>bigint</type>)</function></literal> </entry> <entry><type>boolean</type></entry> <entry>Release an exclusive session level advisory lock</entry> </row> <row> <entry> - <literal><function>pg_advisory_unlock(<parameter>key1</> <type>int</>, <parameter>key2</> <type>int</>)</function></literal> + <literal><function>pg_advisory_unlock(<parameter>key1</parameter> <type>int</type>, <parameter>key2</parameter> <type>int</type>)</function></literal> </entry> <entry><type>boolean</type></entry> <entry>Release an exclusive session level advisory lock</entry> @@ -20113,98 +20113,98 @@ SELECT (pg_stat_file('filename')).modification; </row> <row> <entry> - <literal><function>pg_advisory_unlock_shared(<parameter>key</> <type>bigint</>)</function></literal> + <literal><function>pg_advisory_unlock_shared(<parameter>key</parameter> <type>bigint</type>)</function></literal> </entry> <entry><type>boolean</type></entry> <entry>Release a shared session level advisory lock</entry> </row> <row> <entry> - <literal><function>pg_advisory_unlock_shared(<parameter>key1</> <type>int</>, <parameter>key2</> <type>int</>)</function></literal> + <literal><function>pg_advisory_unlock_shared(<parameter>key1</parameter> <type>int</type>, <parameter>key2</parameter> <type>int</type>)</function></literal> </entry> <entry><type>boolean</type></entry> <entry>Release a shared session level advisory lock</entry> </row> <row> <entry> - <literal><function>pg_advisory_xact_lock(<parameter>key</> <type>bigint</>)</function></literal> + <literal><function>pg_advisory_xact_lock(<parameter>key</parameter> <type>bigint</type>)</function></literal> </entry> <entry><type>void</type></entry> <entry>Obtain exclusive transaction level advisory lock</entry> </row> <row> <entry> - <literal><function>pg_advisory_xact_lock(<parameter>key1</> <type>int</>, <parameter>key2</> <type>int</>)</function></literal> + <literal><function>pg_advisory_xact_lock(<parameter>key1</parameter> <type>int</type>, <parameter>key2</parameter> <type>int</type>)</function></literal> </entry> <entry><type>void</type></entry> <entry>Obtain exclusive transaction level advisory lock</entry> </row> <row> <entry> - <literal><function>pg_advisory_xact_lock_shared(<parameter>key</> <type>bigint</>)</function></literal> + <literal><function>pg_advisory_xact_lock_shared(<parameter>key</parameter> <type>bigint</type>)</function></literal> </entry> <entry><type>void</type></entry> <entry>Obtain shared transaction level advisory lock</entry> </row> <row> <entry> - <literal><function>pg_advisory_xact_lock_shared(<parameter>key1</> <type>int</>, <parameter>key2</> <type>int</>)</function></literal> + <literal><function>pg_advisory_xact_lock_shared(<parameter>key1</parameter> <type>int</type>, <parameter>key2</parameter> <type>int</type>)</function></literal> </entry> <entry><type>void</type></entry> <entry>Obtain shared transaction level advisory lock</entry> </row> <row> <entry> - <literal><function>pg_try_advisory_lock(<parameter>key</> <type>bigint</>)</function></literal> + <literal><function>pg_try_advisory_lock(<parameter>key</parameter> <type>bigint</type>)</function></literal> </entry> <entry><type>boolean</type></entry> <entry>Obtain exclusive session level advisory lock if available</entry> </row> <row> <entry> - <literal><function>pg_try_advisory_lock(<parameter>key1</> <type>int</>, <parameter>key2</> <type>int</>)</function></literal> + <literal><function>pg_try_advisory_lock(<parameter>key1</parameter> <type>int</type>, <parameter>key2</parameter> <type>int</type>)</function></literal> </entry> <entry><type>boolean</type></entry> <entry>Obtain exclusive session level advisory lock if available</entry> </row> <row> <entry> - <literal><function>pg_try_advisory_lock_shared(<parameter>key</> <type>bigint</>)</function></literal> + <literal><function>pg_try_advisory_lock_shared(<parameter>key</parameter> <type>bigint</type>)</function></literal> </entry> <entry><type>boolean</type></entry> <entry>Obtain shared session level advisory lock if available</entry> </row> <row> <entry> - <literal><function>pg_try_advisory_lock_shared(<parameter>key1</> <type>int</>, <parameter>key2</> <type>int</>)</function></literal> + <literal><function>pg_try_advisory_lock_shared(<parameter>key1</parameter> <type>int</type>, <parameter>key2</parameter> <type>int</type>)</function></literal> </entry> <entry><type>boolean</type></entry> <entry>Obtain shared session level advisory lock if available</entry> </row> <row> <entry> - <literal><function>pg_try_advisory_xact_lock(<parameter>key</> <type>bigint</>)</function></literal> + <literal><function>pg_try_advisory_xact_lock(<parameter>key</parameter> <type>bigint</type>)</function></literal> </entry> <entry><type>boolean</type></entry> <entry>Obtain exclusive transaction level advisory lock if available</entry> </row> <row> <entry> - <literal><function>pg_try_advisory_xact_lock(<parameter>key1</> <type>int</>, <parameter>key2</> <type>int</>)</function></literal> + <literal><function>pg_try_advisory_xact_lock(<parameter>key1</parameter> <type>int</type>, <parameter>key2</parameter> <type>int</type>)</function></literal> </entry> <entry><type>boolean</type></entry> <entry>Obtain exclusive transaction level advisory lock if available</entry> </row> <row> <entry> - <literal><function>pg_try_advisory_xact_lock_shared(<parameter>key</> <type>bigint</>)</function></literal> + <literal><function>pg_try_advisory_xact_lock_shared(<parameter>key</parameter> <type>bigint</type>)</function></literal> </entry> <entry><type>boolean</type></entry> <entry>Obtain shared transaction level advisory lock if available</entry> </row> <row> <entry> - <literal><function>pg_try_advisory_xact_lock_shared(<parameter>key1</> <type>int</>, <parameter>key2</> <type>int</>)</function></literal> + <literal><function>pg_try_advisory_xact_lock_shared(<parameter>key1</parameter> <type>int</type>, <parameter>key2</parameter> <type>int</type>)</function></literal> </entry> <entry><type>boolean</type></entry> <entry>Obtain shared transaction level advisory lock if available</entry> @@ -20217,7 +20217,7 @@ SELECT (pg_stat_file('filename')).modification; <primary>pg_advisory_lock</primary> </indexterm> <para> - <function>pg_advisory_lock</> locks an application-defined resource, + <function>pg_advisory_lock</function> locks an application-defined resource, which can be identified either by a single 64-bit key value or two 32-bit key values (note that these two key spaces do not overlap). If another session already holds a lock on the same resource identifier, @@ -20231,8 +20231,8 @@ SELECT (pg_stat_file('filename')).modification; <primary>pg_advisory_lock_shared</primary> </indexterm> <para> - <function>pg_advisory_lock_shared</> works the same as - <function>pg_advisory_lock</>, + <function>pg_advisory_lock_shared</function> works the same as + <function>pg_advisory_lock</function>, except the lock can be shared with other sessions requesting shared locks. Only would-be exclusive lockers are locked out. </para> @@ -20241,10 +20241,10 @@ SELECT (pg_stat_file('filename')).modification; <primary>pg_try_advisory_lock</primary> </indexterm> <para> - <function>pg_try_advisory_lock</> is similar to - <function>pg_advisory_lock</>, except the function will not wait for the + <function>pg_try_advisory_lock</function> is similar to + <function>pg_advisory_lock</function>, except the function will not wait for the lock to become available. It will either obtain the lock immediately and - return <literal>true</>, or return <literal>false</> if the lock cannot be + return <literal>true</literal>, or return <literal>false</literal> if the lock cannot be acquired immediately. </para> @@ -20252,8 +20252,8 @@ SELECT (pg_stat_file('filename')).modification; <primary>pg_try_advisory_lock_shared</primary> </indexterm> <para> - <function>pg_try_advisory_lock_shared</> works the same as - <function>pg_try_advisory_lock</>, except it attempts to acquire + <function>pg_try_advisory_lock_shared</function> works the same as + <function>pg_try_advisory_lock</function>, except it attempts to acquire a shared rather than an exclusive lock. </para> @@ -20261,10 +20261,10 @@ SELECT (pg_stat_file('filename')).modification; <primary>pg_advisory_unlock</primary> </indexterm> <para> - <function>pg_advisory_unlock</> will release a previously-acquired + <function>pg_advisory_unlock</function> will release a previously-acquired exclusive session level advisory lock. It - returns <literal>true</> if the lock is successfully released. - If the lock was not held, it will return <literal>false</>, + returns <literal>true</literal> if the lock is successfully released. + If the lock was not held, it will return <literal>false</literal>, and in addition, an SQL warning will be reported by the server. </para> @@ -20272,8 +20272,8 @@ SELECT (pg_stat_file('filename')).modification; <primary>pg_advisory_unlock_shared</primary> </indexterm> <para> - <function>pg_advisory_unlock_shared</> works the same as - <function>pg_advisory_unlock</>, + <function>pg_advisory_unlock_shared</function> works the same as + <function>pg_advisory_unlock</function>, except it releases a shared session level advisory lock. </para> @@ -20281,7 +20281,7 @@ SELECT (pg_stat_file('filename')).modification; <primary>pg_advisory_unlock_all</primary> </indexterm> <para> - <function>pg_advisory_unlock_all</> will release all session level advisory + <function>pg_advisory_unlock_all</function> will release all session level advisory locks held by the current session. (This function is implicitly invoked at session end, even if the client disconnects ungracefully.) </para> @@ -20290,8 +20290,8 @@ SELECT (pg_stat_file('filename')).modification; <primary>pg_advisory_xact_lock</primary> </indexterm> <para> - <function>pg_advisory_xact_lock</> works the same as - <function>pg_advisory_lock</>, except the lock is automatically released + <function>pg_advisory_xact_lock</function> works the same as + <function>pg_advisory_lock</function>, except the lock is automatically released at the end of the current transaction and cannot be released explicitly. </para> @@ -20299,8 +20299,8 @@ SELECT (pg_stat_file('filename')).modification; <primary>pg_advisory_xact_lock_shared</primary> </indexterm> <para> - <function>pg_advisory_xact_lock_shared</> works the same as - <function>pg_advisory_lock_shared</>, except the lock is automatically released + <function>pg_advisory_xact_lock_shared</function> works the same as + <function>pg_advisory_lock_shared</function>, except the lock is automatically released at the end of the current transaction and cannot be released explicitly. </para> @@ -20308,8 +20308,8 @@ SELECT (pg_stat_file('filename')).modification; <primary>pg_try_advisory_xact_lock</primary> </indexterm> <para> - <function>pg_try_advisory_xact_lock</> works the same as - <function>pg_try_advisory_lock</>, except the lock, if acquired, + <function>pg_try_advisory_xact_lock</function> works the same as + <function>pg_try_advisory_lock</function>, except the lock, if acquired, is automatically released at the end of the current transaction and cannot be released explicitly. </para> @@ -20318,8 +20318,8 @@ SELECT (pg_stat_file('filename')).modification; <primary>pg_try_advisory_xact_lock_shared</primary> </indexterm> <para> - <function>pg_try_advisory_xact_lock_shared</> works the same as - <function>pg_try_advisory_lock_shared</>, except the lock, if acquired, + <function>pg_try_advisory_xact_lock_shared</function> works the same as + <function>pg_try_advisory_lock_shared</function>, except the lock, if acquired, is automatically released at the end of the current transaction and cannot be released explicitly. </para> @@ -20336,8 +20336,8 @@ SELECT (pg_stat_file('filename')).modification; </indexterm> <para> - Currently <productname>PostgreSQL</> provides one built in trigger - function, <function>suppress_redundant_updates_trigger</>, + Currently <productname>PostgreSQL</productname> provides one built in trigger + function, <function>suppress_redundant_updates_trigger</function>, which will prevent any update that does not actually change the data in the row from taking place, in contrast to the normal behavior which always performs the update @@ -20354,7 +20354,7 @@ SELECT (pg_stat_file('filename')).modification; However, detecting such situations in client code is not always easy, or even possible, and writing expressions to detect them can be error-prone. An alternative is to use - <function>suppress_redundant_updates_trigger</>, which will skip + <function>suppress_redundant_updates_trigger</function>, which will skip updates that don't change the data. You should use this with care, however. The trigger takes a small but non-trivial time for each record, so if most of the records affected by an update are actually changed, @@ -20362,7 +20362,7 @@ SELECT (pg_stat_file('filename')).modification; </para> <para> - The <function>suppress_redundant_updates_trigger</> function can be + The <function>suppress_redundant_updates_trigger</function> function can be added to a table like this: <programlisting> CREATE TRIGGER z_min_update @@ -20384,7 +20384,7 @@ FOR EACH ROW EXECUTE PROCEDURE suppress_redundant_updates_trigger(); <title>Event Trigger Functions</title> <para> - <productname>PostgreSQL</> provides these helper functions + <productname>PostgreSQL</productname> provides these helper functions to retrieve information from event triggers. </para> @@ -20401,12 +20401,12 @@ FOR EACH ROW EXECUTE PROCEDURE suppress_redundant_updates_trigger(); </indexterm> <para> - <function>pg_event_trigger_ddl_commands</> returns a list of + <function>pg_event_trigger_ddl_commands</function> returns a list of <acronym>DDL</acronym> commands executed by each user action, when invoked in a function attached to a - <literal>ddl_command_end</> event trigger. If called in any other + <literal>ddl_command_end</literal> event trigger. If called in any other context, an error is raised. - <function>pg_event_trigger_ddl_commands</> returns one row for each + <function>pg_event_trigger_ddl_commands</function> returns one row for each base command executed; some commands that are a single SQL sentence may return more than one row. This function returns the following columns: @@ -20451,7 +20451,7 @@ FOR EACH ROW EXECUTE PROCEDURE suppress_redundant_updates_trigger(); <entry><literal>schema_name</literal></entry> <entry><type>text</type></entry> <entry> - Name of the schema the object belongs in, if any; otherwise <literal>NULL</>. + Name of the schema the object belongs in, if any; otherwise <literal>NULL</literal>. No quoting is applied. </entry> </row> @@ -20492,11 +20492,11 @@ FOR EACH ROW EXECUTE PROCEDURE suppress_redundant_updates_trigger(); </indexterm> <para> - <function>pg_event_trigger_dropped_objects</> returns a list of all objects - dropped by the command in whose <literal>sql_drop</> event it is called. + <function>pg_event_trigger_dropped_objects</function> returns a list of all objects + dropped by the command in whose <literal>sql_drop</literal> event it is called. If called in any other context, - <function>pg_event_trigger_dropped_objects</> raises an error. - <function>pg_event_trigger_dropped_objects</> returns the following columns: + <function>pg_event_trigger_dropped_objects</function> raises an error. + <function>pg_event_trigger_dropped_objects</function> returns the following columns: <informaltable> <tgroup cols="3"> @@ -20553,7 +20553,7 @@ FOR EACH ROW EXECUTE PROCEDURE suppress_redundant_updates_trigger(); <entry><literal>schema_name</literal></entry> <entry><type>text</type></entry> <entry> - Name of the schema the object belonged in, if any; otherwise <literal>NULL</>. + Name of the schema the object belonged in, if any; otherwise <literal>NULL</literal>. No quoting is applied. </entry> </row> @@ -20562,7 +20562,7 @@ FOR EACH ROW EXECUTE PROCEDURE suppress_redundant_updates_trigger(); <entry><type>text</type></entry> <entry> Name of the object, if the combination of schema and name can be - used as a unique identifier for the object; otherwise <literal>NULL</>. + used as a unique identifier for the object; otherwise <literal>NULL</literal>. No quoting is applied, and name is never schema-qualified. </entry> </row> @@ -20598,7 +20598,7 @@ FOR EACH ROW EXECUTE PROCEDURE suppress_redundant_updates_trigger(); </para> <para> - The <function>pg_event_trigger_dropped_objects</> function can be used + The <function>pg_event_trigger_dropped_objects</function> function can be used in an event trigger like this: <programlisting> CREATE FUNCTION test_event_trigger_for_drops() @@ -20631,7 +20631,7 @@ CREATE EVENT TRIGGER test_event_trigger_for_drops The functions shown in <xref linkend="functions-event-trigger-table-rewrite"> provide information about a table for which a - <literal>table_rewrite</> event has just been called. + <literal>table_rewrite</literal> event has just been called. If called in any other context, an error is raised. </para> @@ -20668,7 +20668,7 @@ CREATE EVENT TRIGGER test_event_trigger_for_drops </table> <para> - The <function>pg_event_trigger_table_rewrite_oid</> function can be used + The <function>pg_event_trigger_table_rewrite_oid</function> function can be used in an event trigger like this: <programlisting> CREATE FUNCTION test_event_trigger_table_rewrite_oid() diff --git a/doc/src/sgml/fuzzystrmatch.sgml b/doc/src/sgml/fuzzystrmatch.sgml index ff5bc08fea8..373ac4891df 100644 --- a/doc/src/sgml/fuzzystrmatch.sgml +++ b/doc/src/sgml/fuzzystrmatch.sgml @@ -8,14 +8,14 @@ </indexterm> <para> - The <filename>fuzzystrmatch</> module provides several + The <filename>fuzzystrmatch</filename> module provides several functions to determine similarities and distance between strings. </para> <caution> <para> - At present, the <function>soundex</>, <function>metaphone</>, - <function>dmetaphone</>, and <function>dmetaphone_alt</> functions do + At present, the <function>soundex</function>, <function>metaphone</function>, + <function>dmetaphone</function>, and <function>dmetaphone_alt</function> functions do not work well with multibyte encodings (such as UTF-8). </para> </caution> @@ -31,7 +31,7 @@ </para> <para> - The <filename>fuzzystrmatch</> module provides two functions + The <filename>fuzzystrmatch</filename> module provides two functions for working with Soundex codes: </para> @@ -49,12 +49,12 @@ difference(text, text) returns int </synopsis> <para> - The <function>soundex</> function converts a string to its Soundex code. - The <function>difference</> function converts two strings to their Soundex + The <function>soundex</function> function converts a string to its Soundex code. + The <function>difference</function> function converts two strings to their Soundex codes and then reports the number of matching code positions. Since Soundex codes have four characters, the result ranges from zero to four, with zero being no match and four being an exact match. (Thus, the - function is misnamed — <function>similarity</> would have been + function is misnamed — <function>similarity</function> would have been a better name.) </para> @@ -115,10 +115,10 @@ levenshtein_less_equal(text source, text target, int max_d) returns int <para> <function>levenshtein_less_equal</function> is an accelerated version of the Levenshtein function for use when only small distances are of interest. - If the actual distance is less than or equal to <literal>max_d</>, + If the actual distance is less than or equal to <literal>max_d</literal>, then <function>levenshtein_less_equal</function> returns the correct - distance; otherwise it returns some value greater than <literal>max_d</>. - If <literal>max_d</> is negative then the behavior is the same as + distance; otherwise it returns some value greater than <literal>max_d</literal>. + If <literal>max_d</literal> is negative then the behavior is the same as <function>levenshtein</function>. </para> @@ -198,9 +198,9 @@ test=# SELECT metaphone('GUMBO', 4); <title>Double Metaphone</title> <para> - The Double Metaphone system computes two <quote>sounds like</> strings - for a given input string — a <quote>primary</> and an - <quote>alternate</>. In most cases they are the same, but for non-English + The Double Metaphone system computes two <quote>sounds like</quote> strings + for a given input string — a <quote>primary</quote> and an + <quote>alternate</quote>. In most cases they are the same, but for non-English names especially they can be a bit different, depending on pronunciation. These functions compute the primary and alternate codes: </para> diff --git a/doc/src/sgml/generate-errcodes-table.pl b/doc/src/sgml/generate-errcodes-table.pl index 01fc6166bf4..e655703b5b5 100644 --- a/doc/src/sgml/generate-errcodes-table.pl +++ b/doc/src/sgml/generate-errcodes-table.pl @@ -30,12 +30,12 @@ while (<$errcodes>) s/-/—/; # Wrap PostgreSQL in <productname/> - s/PostgreSQL/<productname>PostgreSQL<\/>/g; + s/PostgreSQL/<productname>PostgreSQL<\/productname>/g; print "\n\n"; print "<row>\n"; print "<entry spanname=\"span12\">"; - print "<emphasis role=\"bold\">$_</></entry>\n"; + print "<emphasis role=\"bold\">$_</emphasis></entry>\n"; print "</row>\n"; next; diff --git a/doc/src/sgml/generic-wal.sgml b/doc/src/sgml/generic-wal.sgml index dfa78c5ca21..7a0284994c9 100644 --- a/doc/src/sgml/generic-wal.sgml +++ b/doc/src/sgml/generic-wal.sgml @@ -13,8 +13,8 @@ <para> The API for constructing generic WAL records is defined in - <filename>access/generic_xlog.h</> and implemented - in <filename>access/transam/generic_xlog.c</>. + <filename>access/generic_xlog.h</filename> and implemented + in <filename>access/transam/generic_xlog.c</filename>. </para> <para> @@ -24,24 +24,24 @@ <orderedlist> <listitem> <para> - <function>state = GenericXLogStart(relation)</> — start + <function>state = GenericXLogStart(relation)</function> — start construction of a generic WAL record for the given relation. </para> </listitem> <listitem> <para> - <function>page = GenericXLogRegisterBuffer(state, buffer, flags)</> + <function>page = GenericXLogRegisterBuffer(state, buffer, flags)</function> — register a buffer to be modified within the current generic WAL record. This function returns a pointer to a temporary copy of the buffer's page, where modifications should be made. (Do not modify the buffer's contents directly.) The third argument is a bit mask of flags applicable to the operation. Currently the only such flag is - <literal>GENERIC_XLOG_FULL_IMAGE</>, which indicates that a full-page + <literal>GENERIC_XLOG_FULL_IMAGE</literal>, which indicates that a full-page image rather than a delta update should be included in the WAL record. Typically this flag would be set if the page is new or has been rewritten completely. - <function>GenericXLogRegisterBuffer</> can be repeated if the + <function>GenericXLogRegisterBuffer</function> can be repeated if the WAL-logged action needs to modify multiple pages. </para> </listitem> @@ -54,7 +54,7 @@ <listitem> <para> - <function>GenericXLogFinish(state)</> — apply the changes to + <function>GenericXLogFinish(state)</function> — apply the changes to the buffers and emit the generic WAL record. </para> </listitem> @@ -63,7 +63,7 @@ <para> WAL record construction can be canceled between any of the above steps by - calling <function>GenericXLogAbort(state)</>. This will discard all + calling <function>GenericXLogAbort(state)</function>. This will discard all changes to the page image copies. </para> @@ -75,13 +75,13 @@ <listitem> <para> No direct modifications of buffers are allowed! All modifications must - be done in copies acquired from <function>GenericXLogRegisterBuffer()</>. + be done in copies acquired from <function>GenericXLogRegisterBuffer()</function>. In other words, code that makes generic WAL records should never call - <function>BufferGetPage()</> for itself. However, it remains the + <function>BufferGetPage()</function> for itself. However, it remains the caller's responsibility to pin/unpin and lock/unlock the buffers at appropriate times. Exclusive lock must be held on each target buffer - from before <function>GenericXLogRegisterBuffer()</> until after - <function>GenericXLogFinish()</>. + from before <function>GenericXLogRegisterBuffer()</function> until after + <function>GenericXLogFinish()</function>. </para> </listitem> @@ -97,7 +97,7 @@ <listitem> <para> The maximum number of buffers that can be registered for a generic WAL - record is <literal>MAX_GENERIC_XLOG_PAGES</>. An error will be thrown + record is <literal>MAX_GENERIC_XLOG_PAGES</literal>. An error will be thrown if this limit is exceeded. </para> </listitem> @@ -106,26 +106,26 @@ <para> Generic WAL assumes that the pages to be modified have standard layout, and in particular that there is no useful data between - <structfield>pd_lower</> and <structfield>pd_upper</>. + <structfield>pd_lower</structfield> and <structfield>pd_upper</structfield>. </para> </listitem> <listitem> <para> Since you are modifying copies of buffer - pages, <function>GenericXLogStart()</> does not start a critical + pages, <function>GenericXLogStart()</function> does not start a critical section. Thus, you can safely do memory allocation, error throwing, - etc. between <function>GenericXLogStart()</> and - <function>GenericXLogFinish()</>. The only actual critical section is - present inside <function>GenericXLogFinish()</>. There is no need to - worry about calling <function>GenericXLogAbort()</> during an error + etc. between <function>GenericXLogStart()</function> and + <function>GenericXLogFinish()</function>. The only actual critical section is + present inside <function>GenericXLogFinish()</function>. There is no need to + worry about calling <function>GenericXLogAbort()</function> during an error exit, either. </para> </listitem> <listitem> <para> - <function>GenericXLogFinish()</> takes care of marking buffers dirty + <function>GenericXLogFinish()</function> takes care of marking buffers dirty and setting their LSNs. You do not need to do this explicitly. </para> </listitem> @@ -148,7 +148,7 @@ <listitem> <para> - If <literal>GENERIC_XLOG_FULL_IMAGE</> is not specified for a + If <literal>GENERIC_XLOG_FULL_IMAGE</literal> is not specified for a registered buffer, the generic WAL record contains a delta between the old and the new page images. This delta is based on byte-by-byte comparison. This is not very compact for the case of moving data diff --git a/doc/src/sgml/geqo.sgml b/doc/src/sgml/geqo.sgml index e0f8adcd6ed..99ee3ebca01 100644 --- a/doc/src/sgml/geqo.sgml +++ b/doc/src/sgml/geqo.sgml @@ -88,7 +88,7 @@ </para> <para> - According to the <systemitem class="resource">comp.ai.genetic</> <acronym>FAQ</acronym> it cannot be stressed too + According to the <systemitem class="resource">comp.ai.genetic</systemitem> <acronym>FAQ</acronym> it cannot be stressed too strongly that a <acronym>GA</acronym> is not a pure random search for a solution to a problem. A <acronym>GA</acronym> uses stochastic processes, but the result is distinctly non-random (better than random). @@ -222,7 +222,7 @@ are considered; and all the initially-determined relation scan plans are available. The estimated cost is the cheapest of these possibilities.) Join sequences with lower estimated cost are considered - <quote>more fit</> than those with higher cost. The genetic algorithm + <quote>more fit</quote> than those with higher cost. The genetic algorithm discards the least fit candidates. Then new candidates are generated by combining genes of more-fit candidates — that is, by using randomly-chosen portions of known low-cost join sequences to create @@ -235,20 +235,20 @@ <para> This process is inherently nondeterministic, because of the randomized choices made during both the initial population selection and subsequent - <quote>mutation</> of the best candidates. To avoid surprising changes + <quote>mutation</quote> of the best candidates. To avoid surprising changes of the selected plan, each run of the GEQO algorithm restarts its random number generator with the current <xref linkend="guc-geqo-seed"> - parameter setting. As long as <varname>geqo_seed</> and the other + parameter setting. As long as <varname>geqo_seed</varname> and the other GEQO parameters are kept fixed, the same plan will be generated for a given query (and other planner inputs such as statistics). To experiment - with different search paths, try changing <varname>geqo_seed</>. + with different search paths, try changing <varname>geqo_seed</varname>. </para> </sect2> <sect2 id="geqo-future"> <title>Future Implementation Tasks for - <productname>PostgreSQL</> <acronym>GEQO</acronym></title> + <productname>PostgreSQL</productname> <acronym>GEQO</acronym></title> <para> Work is still needed to improve the genetic algorithm parameter diff --git a/doc/src/sgml/gin.sgml b/doc/src/sgml/gin.sgml index 7c2321ec3c3..873627a210b 100644 --- a/doc/src/sgml/gin.sgml +++ b/doc/src/sgml/gin.sgml @@ -21,15 +21,15 @@ </para> <para> - We use the word <firstterm>item</> to refer to a composite value that - is to be indexed, and the word <firstterm>key</> to refer to an element + We use the word <firstterm>item</firstterm> to refer to a composite value that + is to be indexed, and the word <firstterm>key</firstterm> to refer to an element value. <acronym>GIN</acronym> always stores and searches for keys, not item values per se. </para> <para> A <acronym>GIN</acronym> index stores a set of (key, posting list) pairs, - where a <firstterm>posting list</> is a set of row IDs in which the key + where a <firstterm>posting list</firstterm> is a set of row IDs in which the key occurs. The same row ID can appear in multiple posting lists, since an item can contain more than one key. Each key value is stored only once, so a <acronym>GIN</acronym> index is very compact for cases @@ -66,7 +66,7 @@ <title>Built-in Operator Classes</title> <para> - The core <productname>PostgreSQL</> distribution + The core <productname>PostgreSQL</productname> distribution includes the <acronym>GIN</acronym> operator classes shown in <xref linkend="gin-builtin-opclasses-table">. (Some of the optional modules described in <xref linkend="contrib"> @@ -85,38 +85,38 @@ </thead> <tbody> <row> - <entry><literal>array_ops</></entry> - <entry><type>anyarray</></entry> + <entry><literal>array_ops</literal></entry> + <entry><type>anyarray</type></entry> <entry> - <literal>&&</> - <literal><@</> - <literal>=</> - <literal>@></> + <literal>&&</literal> + <literal><@</literal> + <literal>=</literal> + <literal>@></literal> </entry> </row> <row> - <entry><literal>jsonb_ops</></entry> - <entry><type>jsonb</></entry> + <entry><literal>jsonb_ops</literal></entry> + <entry><type>jsonb</type></entry> <entry> - <literal>?</> - <literal>?&</> - <literal>?|</> - <literal>@></> + <literal>?</literal> + <literal>?&</literal> + <literal>?|</literal> + <literal>@></literal> </entry> </row> <row> - <entry><literal>jsonb_path_ops</></entry> - <entry><type>jsonb</></entry> + <entry><literal>jsonb_path_ops</literal></entry> + <entry><type>jsonb</type></entry> <entry> - <literal>@></> + <literal>@></literal> </entry> </row> <row> - <entry><literal>tsvector_ops</></entry> - <entry><type>tsvector</></entry> + <entry><literal>tsvector_ops</literal></entry> + <entry><type>tsvector</type></entry> <entry> - <literal>@@</> - <literal>@@@</> + <literal>@@</literal> + <literal>@@@</literal> </entry> </row> </tbody> @@ -124,8 +124,8 @@ </table> <para> - Of the two operator classes for type <type>jsonb</>, <literal>jsonb_ops</> - is the default. <literal>jsonb_path_ops</> supports fewer operators but + Of the two operator classes for type <type>jsonb</type>, <literal>jsonb_ops</literal> + is the default. <literal>jsonb_path_ops</literal> supports fewer operators but offers better performance for those operators. See <xref linkend="json-indexing"> for details. </para> @@ -157,15 +157,15 @@ <variablelist> <varlistentry> <term><function>Datum *extractValue(Datum itemValue, int32 *nkeys, - bool **nullFlags)</></term> + bool **nullFlags)</function></term> <listitem> <para> Returns a palloc'd array of keys given an item to be indexed. The - number of returned keys must be stored into <literal>*nkeys</>. + number of returned keys must be stored into <literal>*nkeys</literal>. If any of the keys can be null, also palloc an array of - <literal>*nkeys</> <type>bool</type> fields, store its address at - <literal>*nullFlags</>, and set these null flags as needed. - <literal>*nullFlags</> can be left <symbol>NULL</symbol> (its initial value) + <literal>*nkeys</literal> <type>bool</type> fields, store its address at + <literal>*nullFlags</literal>, and set these null flags as needed. + <literal>*nullFlags</literal> can be left <symbol>NULL</symbol> (its initial value) if all keys are non-null. The return value can be <symbol>NULL</symbol> if the item contains no keys. </para> @@ -175,40 +175,40 @@ <varlistentry> <term><function>Datum *extractQuery(Datum query, int32 *nkeys, StrategyNumber n, bool **pmatch, Pointer **extra_data, - bool **nullFlags, int32 *searchMode)</></term> + bool **nullFlags, int32 *searchMode)</function></term> <listitem> <para> Returns a palloc'd array of keys given a value to be queried; that is, - <literal>query</> is the value on the right-hand side of an + <literal>query</literal> is the value on the right-hand side of an indexable operator whose left-hand side is the indexed column. - <literal>n</> is the strategy number of the operator within the + <literal>n</literal> is the strategy number of the operator within the operator class (see <xref linkend="xindex-strategies">). - Often, <function>extractQuery</> will need - to consult <literal>n</> to determine the data type of - <literal>query</> and the method it should use to extract key values. - The number of returned keys must be stored into <literal>*nkeys</>. + Often, <function>extractQuery</function> will need + to consult <literal>n</literal> to determine the data type of + <literal>query</literal> and the method it should use to extract key values. + The number of returned keys must be stored into <literal>*nkeys</literal>. If any of the keys can be null, also palloc an array of - <literal>*nkeys</> <type>bool</type> fields, store its address at - <literal>*nullFlags</>, and set these null flags as needed. - <literal>*nullFlags</> can be left <symbol>NULL</symbol> (its initial value) + <literal>*nkeys</literal> <type>bool</type> fields, store its address at + <literal>*nullFlags</literal>, and set these null flags as needed. + <literal>*nullFlags</literal> can be left <symbol>NULL</symbol> (its initial value) if all keys are non-null. - The return value can be <symbol>NULL</symbol> if the <literal>query</> contains no keys. + The return value can be <symbol>NULL</symbol> if the <literal>query</literal> contains no keys. </para> <para> - <literal>searchMode</> is an output argument that allows - <function>extractQuery</> to specify details about how the search + <literal>searchMode</literal> is an output argument that allows + <function>extractQuery</function> to specify details about how the search will be done. - If <literal>*searchMode</> is set to - <literal>GIN_SEARCH_MODE_DEFAULT</> (which is the value it is + If <literal>*searchMode</literal> is set to + <literal>GIN_SEARCH_MODE_DEFAULT</literal> (which is the value it is initialized to before call), only items that match at least one of the returned keys are considered candidate matches. - If <literal>*searchMode</> is set to - <literal>GIN_SEARCH_MODE_INCLUDE_EMPTY</>, then in addition to items + If <literal>*searchMode</literal> is set to + <literal>GIN_SEARCH_MODE_INCLUDE_EMPTY</literal>, then in addition to items containing at least one matching key, items that contain no keys at all are considered candidate matches. (This mode is useful for implementing is-subset-of operators, for example.) - If <literal>*searchMode</> is set to <literal>GIN_SEARCH_MODE_ALL</>, + If <literal>*searchMode</literal> is set to <literal>GIN_SEARCH_MODE_ALL</literal>, then all non-null items in the index are considered candidate matches, whether they match any of the returned keys or not. (This mode is much slower than the other two choices, since it requires @@ -217,33 +217,33 @@ in most cases is probably not a good candidate for a GIN operator class.) The symbols to use for setting this mode are defined in - <filename>access/gin.h</>. + <filename>access/gin.h</filename>. </para> <para> - <literal>pmatch</> is an output argument for use when partial match - is supported. To use it, <function>extractQuery</> must allocate - an array of <literal>*nkeys</> booleans and store its address at - <literal>*pmatch</>. Each element of the array should be set to TRUE + <literal>pmatch</literal> is an output argument for use when partial match + is supported. To use it, <function>extractQuery</function> must allocate + an array of <literal>*nkeys</literal> booleans and store its address at + <literal>*pmatch</literal>. Each element of the array should be set to TRUE if the corresponding key requires partial match, FALSE if not. - If <literal>*pmatch</> is set to <symbol>NULL</symbol> then GIN assumes partial match + If <literal>*pmatch</literal> is set to <symbol>NULL</symbol> then GIN assumes partial match is not required. The variable is initialized to <symbol>NULL</symbol> before call, so this argument can simply be ignored by operator classes that do not support partial match. </para> <para> - <literal>extra_data</> is an output argument that allows - <function>extractQuery</> to pass additional data to the - <function>consistent</> and <function>comparePartial</> methods. - To use it, <function>extractQuery</> must allocate - an array of <literal>*nkeys</> pointers and store its address at - <literal>*extra_data</>, then store whatever it wants to into the + <literal>extra_data</literal> is an output argument that allows + <function>extractQuery</function> to pass additional data to the + <function>consistent</function> and <function>comparePartial</function> methods. + To use it, <function>extractQuery</function> must allocate + an array of <literal>*nkeys</literal> pointers and store its address at + <literal>*extra_data</literal>, then store whatever it wants to into the individual pointers. The variable is initialized to <symbol>NULL</symbol> before call, so this argument can simply be ignored by operator classes that - do not require extra data. If <literal>*extra_data</> is set, the - whole array is passed to the <function>consistent</> method, and - the appropriate element to the <function>comparePartial</> method. + do not require extra data. If <literal>*extra_data</literal> is set, the + whole array is passed to the <function>consistent</function> method, and + the appropriate element to the <function>comparePartial</function> method. </para> </listitem> @@ -251,10 +251,10 @@ </variablelist> An operator class must also provide a function to check if an indexed item - matches the query. It comes in two flavors, a boolean <function>consistent</> - function, and a ternary <function>triConsistent</> function. - <function>triConsistent</> covers the functionality of both, so providing - <function>triConsistent</> alone is sufficient. However, if the boolean + matches the query. It comes in two flavors, a boolean <function>consistent</function> + function, and a ternary <function>triConsistent</function> function. + <function>triConsistent</function> covers the functionality of both, so providing + <function>triConsistent</function> alone is sufficient. However, if the boolean variant is significantly cheaper to calculate, it can be advantageous to provide both. If only the boolean variant is provided, some optimizations that depend on refuting index items before fetching all the keys are @@ -264,48 +264,48 @@ <varlistentry> <term><function>bool consistent(bool check[], StrategyNumber n, Datum query, int32 nkeys, Pointer extra_data[], bool *recheck, - Datum queryKeys[], bool nullFlags[])</></term> + Datum queryKeys[], bool nullFlags[])</function></term> <listitem> <para> Returns TRUE if an indexed item satisfies the query operator with - strategy number <literal>n</> (or might satisfy it, if the recheck + strategy number <literal>n</literal> (or might satisfy it, if the recheck indication is returned). This function does not have direct access to the indexed item's value, since <acronym>GIN</acronym> does not store items explicitly. Rather, what is available is knowledge about which key values extracted from the query appear in a given - indexed item. The <literal>check</> array has length - <literal>nkeys</>, which is the same as the number of keys previously - returned by <function>extractQuery</> for this <literal>query</> datum. + indexed item. The <literal>check</literal> array has length + <literal>nkeys</literal>, which is the same as the number of keys previously + returned by <function>extractQuery</function> for this <literal>query</literal> datum. Each element of the - <literal>check</> array is TRUE if the indexed item contains the + <literal>check</literal> array is TRUE if the indexed item contains the corresponding query key, i.e., if (check[i] == TRUE) the i-th key of the - <function>extractQuery</> result array is present in the indexed item. - The original <literal>query</> datum is - passed in case the <function>consistent</> method needs to consult it, - and so are the <literal>queryKeys[]</> and <literal>nullFlags[]</> - arrays previously returned by <function>extractQuery</>. - <literal>extra_data</> is the extra-data array returned by - <function>extractQuery</>, or <symbol>NULL</symbol> if none. + <function>extractQuery</function> result array is present in the indexed item. + The original <literal>query</literal> datum is + passed in case the <function>consistent</function> method needs to consult it, + and so are the <literal>queryKeys[]</literal> and <literal>nullFlags[]</literal> + arrays previously returned by <function>extractQuery</function>. + <literal>extra_data</literal> is the extra-data array returned by + <function>extractQuery</function>, or <symbol>NULL</symbol> if none. </para> <para> - When <function>extractQuery</> returns a null key in - <literal>queryKeys[]</>, the corresponding <literal>check[]</> element + When <function>extractQuery</function> returns a null key in + <literal>queryKeys[]</literal>, the corresponding <literal>check[]</literal> element is TRUE if the indexed item contains a null key; that is, the - semantics of <literal>check[]</> are like <literal>IS NOT DISTINCT - FROM</>. The <function>consistent</> function can examine the - corresponding <literal>nullFlags[]</> element if it needs to tell + semantics of <literal>check[]</literal> are like <literal>IS NOT DISTINCT + FROM</literal>. The <function>consistent</function> function can examine the + corresponding <literal>nullFlags[]</literal> element if it needs to tell the difference between a regular value match and a null match. </para> <para> - On success, <literal>*recheck</> should be set to TRUE if the heap + On success, <literal>*recheck</literal> should be set to TRUE if the heap tuple needs to be rechecked against the query operator, or FALSE if the index test is exact. That is, a FALSE return value guarantees that the heap tuple does not match the query; a TRUE return value with - <literal>*recheck</> set to FALSE guarantees that the heap tuple does + <literal>*recheck</literal> set to FALSE guarantees that the heap tuple does match the query; and a TRUE return value with - <literal>*recheck</> set to TRUE means that the heap tuple might match + <literal>*recheck</literal> set to TRUE means that the heap tuple might match the query, so it needs to be fetched and rechecked by evaluating the query operator directly against the originally indexed item. </para> @@ -315,30 +315,30 @@ <varlistentry> <term><function>GinTernaryValue triConsistent(GinTernaryValue check[], StrategyNumber n, Datum query, int32 nkeys, Pointer extra_data[], - Datum queryKeys[], bool nullFlags[])</></term> + Datum queryKeys[], bool nullFlags[])</function></term> <listitem> <para> - <function>triConsistent</> is similar to <function>consistent</>, - but instead of booleans in the <literal>check</> vector, there are + <function>triConsistent</function> is similar to <function>consistent</function>, + but instead of booleans in the <literal>check</literal> vector, there are three possible values for each - key: <literal>GIN_TRUE</>, <literal>GIN_FALSE</> and - <literal>GIN_MAYBE</>. <literal>GIN_FALSE</> and <literal>GIN_TRUE</> + key: <literal>GIN_TRUE</literal>, <literal>GIN_FALSE</literal> and + <literal>GIN_MAYBE</literal>. <literal>GIN_FALSE</literal> and <literal>GIN_TRUE</literal> have the same meaning as regular boolean values, while - <literal>GIN_MAYBE</> means that the presence of that key is not known. - When <literal>GIN_MAYBE</> values are present, the function should only - return <literal>GIN_TRUE</> if the item certainly matches whether or + <literal>GIN_MAYBE</literal> means that the presence of that key is not known. + When <literal>GIN_MAYBE</literal> values are present, the function should only + return <literal>GIN_TRUE</literal> if the item certainly matches whether or not the index item contains the corresponding query keys. Likewise, the - function must return <literal>GIN_FALSE</> only if the item certainly - does not match, whether or not it contains the <literal>GIN_MAYBE</> - keys. If the result depends on the <literal>GIN_MAYBE</> entries, i.e., + function must return <literal>GIN_FALSE</literal> only if the item certainly + does not match, whether or not it contains the <literal>GIN_MAYBE</literal> + keys. If the result depends on the <literal>GIN_MAYBE</literal> entries, i.e., the match cannot be confirmed or refuted based on the known query keys, - the function must return <literal>GIN_MAYBE</>. + the function must return <literal>GIN_MAYBE</literal>. </para> <para> - When there are no <literal>GIN_MAYBE</> values in the <literal>check</> - vector, a <literal>GIN_MAYBE</> return value is the equivalent of - setting the <literal>recheck</> flag in the - boolean <function>consistent</> function. + When there are no <literal>GIN_MAYBE</literal> values in the <literal>check</literal> + vector, a <literal>GIN_MAYBE</literal> return value is the equivalent of + setting the <literal>recheck</literal> flag in the + boolean <function>consistent</function> function. </para> </listitem> </varlistentry> @@ -352,7 +352,7 @@ <variablelist> <varlistentry> - <term><function>int compare(Datum a, Datum b)</></term> + <term><function>int compare(Datum a, Datum b)</function></term> <listitem> <para> Compares two keys (not indexed items!) and returns an integer less than @@ -364,13 +364,13 @@ </varlistentry> </variablelist> - Alternatively, if the operator class does not provide a <function>compare</> + Alternatively, if the operator class does not provide a <function>compare</function> method, GIN will look up the default btree operator class for the index key data type, and use its comparison function. It is recommended to specify the comparison function in a GIN operator class that is meant for just one data type, as looking up the btree operator class costs a few cycles. However, polymorphic GIN operator classes (such - as <literal>array_ops</>) typically cannot specify a single comparison + as <literal>array_ops</literal>) typically cannot specify a single comparison function. </para> @@ -381,7 +381,7 @@ <variablelist> <varlistentry> <term><function>int comparePartial(Datum partial_key, Datum key, StrategyNumber n, - Pointer extra_data)</></term> + Pointer extra_data)</function></term> <listitem> <para> Compare a partial-match query key to an index key. Returns an integer @@ -389,11 +389,11 @@ does not match the query, but the index scan should continue; zero means that the index key does match the query; greater than zero indicates that the index scan should stop because no more matches - are possible. The strategy number <literal>n</> of the operator + are possible. The strategy number <literal>n</literal> of the operator that generated the partial match query is provided, in case its semantics are needed to determine when to end the scan. Also, - <literal>extra_data</> is the corresponding element of the extra-data - array made by <function>extractQuery</>, or <symbol>NULL</symbol> if none. + <literal>extra_data</literal> is the corresponding element of the extra-data + array made by <function>extractQuery</function>, or <symbol>NULL</symbol> if none. Null keys are never passed to this function. </para> </listitem> @@ -402,25 +402,25 @@ </para> <para> - To support <quote>partial match</> queries, an operator class must - provide the <function>comparePartial</> method, and its - <function>extractQuery</> method must set the <literal>pmatch</> + To support <quote>partial match</quote> queries, an operator class must + provide the <function>comparePartial</function> method, and its + <function>extractQuery</function> method must set the <literal>pmatch</literal> parameter when a partial-match query is encountered. See <xref linkend="gin-partial-match"> for details. </para> <para> - The actual data types of the various <literal>Datum</> values mentioned + The actual data types of the various <literal>Datum</literal> values mentioned above vary depending on the operator class. The item values passed to - <function>extractValue</> are always of the operator class's input type, and - all key values must be of the class's <literal>STORAGE</> type. The type of - the <literal>query</> argument passed to <function>extractQuery</>, - <function>consistent</> and <function>triConsistent</> is whatever is the + <function>extractValue</function> are always of the operator class's input type, and + all key values must be of the class's <literal>STORAGE</literal> type. The type of + the <literal>query</literal> argument passed to <function>extractQuery</function>, + <function>consistent</function> and <function>triConsistent</function> is whatever is the right-hand input type of the class member operator identified by the strategy number. This need not be the same as the indexed type, so long as key values of the correct type can be extracted from it. However, it is recommended that the SQL declarations of these three support functions use - the opclass's indexed data type for the <literal>query</> argument, even + the opclass's indexed data type for the <literal>query</literal> argument, even though the actual type might be something else depending on the operator. </para> @@ -434,8 +434,8 @@ constructed over keys, where each key is an element of one or more indexed items (a member of an array, for example) and where each tuple in a leaf page contains either a pointer to a B-tree of heap pointers (a - <quote>posting tree</>), or a simple list of heap pointers (a <quote>posting - list</>) when the list is small enough to fit into a single index tuple along + <quote>posting tree</quote>), or a simple list of heap pointers (a <quote>posting + list</quote>) when the list is small enough to fit into a single index tuple along with the key value. </para> @@ -443,7 +443,7 @@ As of <productname>PostgreSQL</productname> 9.1, null key values can be included in the index. Also, placeholder nulls are included in the index for indexed items that are null or contain no keys according to - <function>extractValue</>. This allows searches that should find empty + <function>extractValue</function>. This allows searches that should find empty items to do so. </para> @@ -461,7 +461,7 @@ intrinsic nature of inverted indexes: inserting or updating one heap row can cause many inserts into the index (one for each key extracted from the indexed item). As of <productname>PostgreSQL</productname> 8.4, - <acronym>GIN</> is capable of postponing much of this work by inserting + <acronym>GIN</acronym> is capable of postponing much of this work by inserting new tuples into a temporary, unsorted list of pending entries. When the table is vacuumed or autoanalyzed, or when <function>gin_clean_pending_list</function> function is called, or if the @@ -479,7 +479,7 @@ of pending entries in addition to searching the regular index, and so a large list of pending entries will slow searches significantly. Another disadvantage is that, while most updates are fast, an update - that causes the pending list to become <quote>too large</> will incur an + that causes the pending list to become <quote>too large</quote> will incur an immediate cleanup cycle and thus be much slower than other updates. Proper use of autovacuum can minimize both of these problems. </para> @@ -497,15 +497,15 @@ <title>Partial Match Algorithm</title> <para> - GIN can support <quote>partial match</> queries, in which the query + GIN can support <quote>partial match</quote> queries, in which the query does not determine an exact match for one or more keys, but the possible matches fall within a reasonably narrow range of key values (within the - key sorting order determined by the <function>compare</> support method). - The <function>extractQuery</> method, instead of returning a key value + key sorting order determined by the <function>compare</function> support method). + The <function>extractQuery</function> method, instead of returning a key value to be matched exactly, returns a key value that is the lower bound of - the range to be searched, and sets the <literal>pmatch</> flag true. - The key range is then scanned using the <function>comparePartial</> - method. <function>comparePartial</> must return zero for a matching + the range to be searched, and sets the <literal>pmatch</literal> flag true. + The key range is then scanned using the <function>comparePartial</function> + method. <function>comparePartial</function> must return zero for a matching index key, less than zero for a non-match that is still within the range to be searched, or greater than zero if the index key is past the range that could match. @@ -542,7 +542,7 @@ <listitem> <para> Build time for a <acronym>GIN</acronym> index is very sensitive to - the <varname>maintenance_work_mem</> setting; it doesn't pay to + the <varname>maintenance_work_mem</varname> setting; it doesn't pay to skimp on work memory during index creation. </para> </listitem> @@ -553,18 +553,18 @@ <listitem> <para> During a series of insertions into an existing <acronym>GIN</acronym> - index that has <literal>fastupdate</> enabled, the system will clean up + index that has <literal>fastupdate</literal> enabled, the system will clean up the pending-entry list whenever the list grows larger than - <varname>gin_pending_list_limit</>. To avoid fluctuations in observed + <varname>gin_pending_list_limit</varname>. To avoid fluctuations in observed response time, it's desirable to have pending-list cleanup occur in the background (i.e., via autovacuum). Foreground cleanup operations - can be avoided by increasing <varname>gin_pending_list_limit</> + can be avoided by increasing <varname>gin_pending_list_limit</varname> or making autovacuum more aggressive. However, enlarging the threshold of the cleanup operation means that if a foreground cleanup does occur, it will take even longer. </para> <para> - <varname>gin_pending_list_limit</> can be overridden for individual + <varname>gin_pending_list_limit</varname> can be overridden for individual GIN indexes by changing storage parameters, and which allows each GIN index to have its own cleanup threshold. For example, it's possible to increase the threshold only for the GIN @@ -616,7 +616,7 @@ <para> <acronym>GIN</acronym> assumes that indexable operators are strict. This - means that <function>extractValue</> will not be called at all on a null + means that <function>extractValue</function> will not be called at all on a null item value (instead, a placeholder index entry is created automatically), and <function>extractQuery</function> will not be called on a null query value either (instead, the query is presumed to be unsatisfiable). Note @@ -629,36 +629,36 @@ <title>Examples</title> <para> - The core <productname>PostgreSQL</> distribution + The core <productname>PostgreSQL</productname> distribution includes the <acronym>GIN</acronym> operator classes previously shown in <xref linkend="gin-builtin-opclasses-table">. - The following <filename>contrib</> modules also contain + The following <filename>contrib</filename> modules also contain <acronym>GIN</acronym> operator classes: <variablelist> <varlistentry> - <term><filename>btree_gin</></term> + <term><filename>btree_gin</filename></term> <listitem> <para>B-tree equivalent functionality for several data types</para> </listitem> </varlistentry> <varlistentry> - <term><filename>hstore</></term> + <term><filename>hstore</filename></term> <listitem> <para>Module for storing (key, value) pairs</para> </listitem> </varlistentry> <varlistentry> - <term><filename>intarray</></term> + <term><filename>intarray</filename></term> <listitem> <para>Enhanced support for <type>int[]</type></para> </listitem> </varlistentry> <varlistentry> - <term><filename>pg_trgm</></term> + <term><filename>pg_trgm</filename></term> <listitem> <para>Text similarity using trigram matching</para> </listitem> diff --git a/doc/src/sgml/gist.sgml b/doc/src/sgml/gist.sgml index 1648eb3672f..4e4470d439b 100644 --- a/doc/src/sgml/gist.sgml +++ b/doc/src/sgml/gist.sgml @@ -44,7 +44,7 @@ <title>Built-in Operator Classes</title> <para> - The core <productname>PostgreSQL</> distribution + The core <productname>PostgreSQL</productname> distribution includes the <acronym>GiST</acronym> operator classes shown in <xref linkend="gist-builtin-opclasses-table">. (Some of the optional modules described in <xref linkend="contrib"> @@ -64,142 +64,142 @@ </thead> <tbody> <row> - <entry><literal>box_ops</></entry> - <entry><type>box</></entry> + <entry><literal>box_ops</literal></entry> + <entry><type>box</type></entry> <entry> - <literal>&&</> - <literal>&></> - <literal>&<</> - <literal>&<|</> - <literal>>></> - <literal><<</> - <literal><<|</> - <literal><@</> - <literal>@></> - <literal>@</> - <literal>|&></> - <literal>|>></> - <literal>~</> - <literal>~=</> + <literal>&&</literal> + <literal>&></literal> + <literal>&<</literal> + <literal>&<|</literal> + <literal>>></literal> + <literal><<</literal> + <literal><<|</literal> + <literal><@</literal> + <literal>@></literal> + <literal>@</literal> + <literal>|&></literal> + <literal>|>></literal> + <literal>~</literal> + <literal>~=</literal> </entry> <entry> </entry> </row> <row> - <entry><literal>circle_ops</></entry> - <entry><type>circle</></entry> + <entry><literal>circle_ops</literal></entry> + <entry><type>circle</type></entry> <entry> - <literal>&&</> - <literal>&></> - <literal>&<</> - <literal>&<|</> - <literal>>></> - <literal><<</> - <literal><<|</> - <literal><@</> - <literal>@></> - <literal>@</> - <literal>|&></> - <literal>|>></> - <literal>~</> - <literal>~=</> + <literal>&&</literal> + <literal>&></literal> + <literal>&<</literal> + <literal>&<|</literal> + <literal>>></literal> + <literal><<</literal> + <literal><<|</literal> + <literal><@</literal> + <literal>@></literal> + <literal>@</literal> + <literal>|&></literal> + <literal>|>></literal> + <literal>~</literal> + <literal>~=</literal> </entry> <entry> - <literal><-></> + <literal><-></literal> </entry> </row> <row> - <entry><literal>inet_ops</></entry> - <entry><type>inet</>, <type>cidr</></entry> + <entry><literal>inet_ops</literal></entry> + <entry><type>inet</type>, <type>cidr</type></entry> <entry> - <literal>&&</> - <literal>>></> - <literal>>>=</> - <literal>></> - <literal>>=</> - <literal><></> - <literal><<</> - <literal><<=</> - <literal><</> - <literal><=</> - <literal>=</> + <literal>&&</literal> + <literal>>></literal> + <literal>>>=</literal> + <literal>></literal> + <literal>>=</literal> + <literal><></literal> + <literal><<</literal> + <literal><<=</literal> + <literal><</literal> + <literal><=</literal> + <literal>=</literal> </entry> <entry> </entry> </row> <row> - <entry><literal>point_ops</></entry> - <entry><type>point</></entry> + <entry><literal>point_ops</literal></entry> + <entry><type>point</type></entry> <entry> - <literal>>></> - <literal>>^</> - <literal><<</> - <literal><@</> - <literal><@</> - <literal><@</> - <literal><^</> - <literal>~=</> + <literal>>></literal> + <literal>>^</literal> + <literal><<</literal> + <literal><@</literal> + <literal><@</literal> + <literal><@</literal> + <literal><^</literal> + <literal>~=</literal> </entry> <entry> - <literal><-></> + <literal><-></literal> </entry> </row> <row> - <entry><literal>poly_ops</></entry> - <entry><type>polygon</></entry> + <entry><literal>poly_ops</literal></entry> + <entry><type>polygon</type></entry> <entry> - <literal>&&</> - <literal>&></> - <literal>&<</> - <literal>&<|</> - <literal>>></> - <literal><<</> - <literal><<|</> - <literal><@</> - <literal>@></> - <literal>@</> - <literal>|&></> - <literal>|>></> - <literal>~</> - <literal>~=</> + <literal>&&</literal> + <literal>&></literal> + <literal>&<</literal> + <literal>&<|</literal> + <literal>>></literal> + <literal><<</literal> + <literal><<|</literal> + <literal><@</literal> + <literal>@></literal> + <literal>@</literal> + <literal>|&></literal> + <literal>|>></literal> + <literal>~</literal> + <literal>~=</literal> </entry> <entry> - <literal><-></> + <literal><-></literal> </entry> </row> <row> - <entry><literal>range_ops</></entry> + <entry><literal>range_ops</literal></entry> <entry>any range type</entry> <entry> - <literal>&&</> - <literal>&></> - <literal>&<</> - <literal>>></> - <literal><<</> - <literal><@</> - <literal>-|-</> - <literal>=</> - <literal>@></> - <literal>@></> + <literal>&&</literal> + <literal>&></literal> + <literal>&<</literal> + <literal>>></literal> + <literal><<</literal> + <literal><@</literal> + <literal>-|-</literal> + <literal>=</literal> + <literal>@></literal> + <literal>@></literal> </entry> <entry> </entry> </row> <row> - <entry><literal>tsquery_ops</></entry> - <entry><type>tsquery</></entry> + <entry><literal>tsquery_ops</literal></entry> + <entry><type>tsquery</type></entry> <entry> - <literal><@</> - <literal>@></> + <literal><@</literal> + <literal>@></literal> </entry> <entry> </entry> </row> <row> - <entry><literal>tsvector_ops</></entry> - <entry><type>tsvector</></entry> + <entry><literal>tsvector_ops</literal></entry> + <entry><type>tsvector</type></entry> <entry> - <literal>@@</> + <literal>@@</literal> </entry> <entry> </entry> @@ -209,9 +209,9 @@ </table> <para> - For historical reasons, the <literal>inet_ops</> operator class is - not the default class for types <type>inet</> and <type>cidr</>. - To use it, mention the class name in <command>CREATE INDEX</>, + For historical reasons, the <literal>inet_ops</literal> operator class is + not the default class for types <type>inet</type> and <type>cidr</type>. + To use it, mention the class name in <command>CREATE INDEX</command>, for example <programlisting> CREATE INDEX ON my_table USING GIST (my_inet_column inet_ops); @@ -270,53 +270,53 @@ CREATE INDEX ON my_table USING GIST (my_inet_column inet_ops); There are five methods that an index operator class for <acronym>GiST</acronym> must provide, and four that are optional. Correctness of the index is ensured - by proper implementation of the <function>same</>, <function>consistent</> - and <function>union</> methods, while efficiency (size and speed) of the - index will depend on the <function>penalty</> and <function>picksplit</> + by proper implementation of the <function>same</function>, <function>consistent</function> + and <function>union</function> methods, while efficiency (size and speed) of the + index will depend on the <function>penalty</function> and <function>picksplit</function> methods. - Two optional methods are <function>compress</> and - <function>decompress</>, which allow an index to have internal tree data of + Two optional methods are <function>compress</function> and + <function>decompress</function>, which allow an index to have internal tree data of a different type than the data it indexes. The leaves are to be of the indexed data type, while the other tree nodes can be of any C struct (but - you still have to follow <productname>PostgreSQL</> data type rules here, - see about <literal>varlena</> for variable sized data). If the tree's - internal data type exists at the SQL level, the <literal>STORAGE</> option - of the <command>CREATE OPERATOR CLASS</> command can be used. - The optional eighth method is <function>distance</>, which is needed + you still have to follow <productname>PostgreSQL</productname> data type rules here, + see about <literal>varlena</literal> for variable sized data). If the tree's + internal data type exists at the SQL level, the <literal>STORAGE</literal> option + of the <command>CREATE OPERATOR CLASS</command> command can be used. + The optional eighth method is <function>distance</function>, which is needed if the operator class wishes to support ordered scans (nearest-neighbor - searches). The optional ninth method <function>fetch</> is needed if the + searches). The optional ninth method <function>fetch</function> is needed if the operator class wishes to support index-only scans, except when the - <function>compress</> method is omitted. + <function>compress</function> method is omitted. </para> <variablelist> <varlistentry> - <term><function>consistent</></term> + <term><function>consistent</function></term> <listitem> <para> - Given an index entry <literal>p</> and a query value <literal>q</>, + Given an index entry <literal>p</literal> and a query value <literal>q</literal>, this function determines whether the index entry is - <quote>consistent</> with the query; that is, could the predicate - <quote><replaceable>indexed_column</> - <replaceable>indexable_operator</> <literal>q</></quote> be true for + <quote>consistent</quote> with the query; that is, could the predicate + <quote><replaceable>indexed_column</replaceable> + <replaceable>indexable_operator</replaceable> <literal>q</literal></quote> be true for any row represented by the index entry? For a leaf index entry this is equivalent to testing the indexable condition, while for an internal tree node this determines whether it is necessary to scan the subtree of the index represented by the tree node. When the result is - <literal>true</>, a <literal>recheck</> flag must also be returned. + <literal>true</literal>, a <literal>recheck</literal> flag must also be returned. This indicates whether the predicate is certainly true or only possibly - true. If <literal>recheck</> = <literal>false</> then the index has - tested the predicate condition exactly, whereas if <literal>recheck</> - = <literal>true</> the row is only a candidate match. In that case the + true. If <literal>recheck</literal> = <literal>false</literal> then the index has + tested the predicate condition exactly, whereas if <literal>recheck</literal> + = <literal>true</literal> the row is only a candidate match. In that case the system will automatically evaluate the - <replaceable>indexable_operator</> against the actual row value to see + <replaceable>indexable_operator</replaceable> against the actual row value to see if it is really a match. This convention allows <acronym>GiST</acronym> to support both lossless and lossy index structures. </para> <para> - The <acronym>SQL</> declaration of the function must look like this: + The <acronym>SQL</acronym> declaration of the function must look like this: <programlisting> CREATE OR REPLACE FUNCTION my_consistent(internal, data_type, smallint, oid, internal) @@ -356,23 +356,23 @@ my_consistent(PG_FUNCTION_ARGS) } </programlisting> - Here, <varname>key</> is an element in the index and <varname>query</> - the value being looked up in the index. The <literal>StrategyNumber</> + Here, <varname>key</varname> is an element in the index and <varname>query</varname> + the value being looked up in the index. The <literal>StrategyNumber</literal> parameter indicates which operator of your operator class is being applied — it matches one of the operator numbers in the - <command>CREATE OPERATOR CLASS</> command. + <command>CREATE OPERATOR CLASS</command> command. </para> <para> Depending on which operators you have included in the class, the data - type of <varname>query</> could vary with the operator, since it will + type of <varname>query</varname> could vary with the operator, since it will be whatever type is on the righthand side of the operator, which might be different from the indexed data type appearing on the lefthand side. (The above code skeleton assumes that only one type is possible; if - not, fetching the <varname>query</> argument value would have to depend + not, fetching the <varname>query</varname> argument value would have to depend on the operator.) It is recommended that the SQL declaration of - the <function>consistent</> function use the opclass's indexed data - type for the <varname>query</> argument, even though the actual type + the <function>consistent</function> function use the opclass's indexed data + type for the <varname>query</varname> argument, even though the actual type might be something else depending on the operator. </para> @@ -380,7 +380,7 @@ my_consistent(PG_FUNCTION_ARGS) </varlistentry> <varlistentry> - <term><function>union</></term> + <term><function>union</function></term> <listitem> <para> This method consolidates information in the tree. Given a set of @@ -389,7 +389,7 @@ my_consistent(PG_FUNCTION_ARGS) </para> <para> - The <acronym>SQL</> declaration of the function must look like this: + The <acronym>SQL</acronym> declaration of the function must look like this: <programlisting> CREATE OR REPLACE FUNCTION my_union(internal, internal) @@ -439,44 +439,44 @@ my_union(PG_FUNCTION_ARGS) <para> As you can see, in this skeleton we're dealing with a data type - where <literal>union(X, Y, Z) = union(union(X, Y), Z)</>. It's easy + where <literal>union(X, Y, Z) = union(union(X, Y), Z)</literal>. It's easy enough to support data types where this is not the case, by implementing the proper union algorithm in this - <acronym>GiST</> support method. + <acronym>GiST</acronym> support method. </para> <para> - The result of the <function>union</> function must be a value of the + The result of the <function>union</function> function must be a value of the index's storage type, whatever that is (it might or might not be - different from the indexed column's type). The <function>union</> - function should return a pointer to newly <function>palloc()</>ed + different from the indexed column's type). The <function>union</function> + function should return a pointer to newly <function>palloc()</function>ed memory. You can't just return the input value as-is, even if there is no type change. </para> <para> - As shown above, the <function>union</> function's - first <type>internal</> argument is actually - a <structname>GistEntryVector</> pointer. The second argument is a + As shown above, the <function>union</function> function's + first <type>internal</type> argument is actually + a <structname>GistEntryVector</structname> pointer. The second argument is a pointer to an integer variable, which can be ignored. (It used to be - required that the <function>union</> function store the size of its + required that the <function>union</function> function store the size of its result value into that variable, but this is no longer necessary.) </para> </listitem> </varlistentry> <varlistentry> - <term><function>compress</></term> + <term><function>compress</function></term> <listitem> <para> Converts a data item into a format suitable for physical storage in an index page. - If the <function>compress</> method is omitted, data items are stored + If the <function>compress</function> method is omitted, data items are stored in the index without modification. </para> <para> - The <acronym>SQL</> declaration of the function must look like this: + The <acronym>SQL</acronym> declaration of the function must look like this: <programlisting> CREATE OR REPLACE FUNCTION my_compress(internal) @@ -519,7 +519,7 @@ my_compress(PG_FUNCTION_ARGS) </para> <para> - You have to adapt <replaceable>compressed_data_type</> to the specific + You have to adapt <replaceable>compressed_data_type</replaceable> to the specific type you're converting to in order to compress your leaf nodes, of course. </para> @@ -527,24 +527,24 @@ my_compress(PG_FUNCTION_ARGS) </varlistentry> <varlistentry> - <term><function>decompress</></term> + <term><function>decompress</function></term> <listitem> <para> Converts the stored representation of a data item into a format that can be manipulated by the other GiST methods in the operator class. - If the <function>decompress</> method is omitted, it is assumed that + If the <function>decompress</function> method is omitted, it is assumed that the other GiST methods can work directly on the stored data format. - (<function>decompress</> is not necessarily the reverse of + (<function>decompress</function> is not necessarily the reverse of the <function>compress</function> method; in particular, if <function>compress</function> is lossy then it's impossible - for <function>decompress</> to exactly reconstruct the original - data. <function>decompress</> is not necessarily equivalent - to <function>fetch</>, either, since the other GiST methods might not + for <function>decompress</function> to exactly reconstruct the original + data. <function>decompress</function> is not necessarily equivalent + to <function>fetch</function>, either, since the other GiST methods might not require full reconstruction of the data.) </para> <para> - The <acronym>SQL</> declaration of the function must look like this: + The <acronym>SQL</acronym> declaration of the function must look like this: <programlisting> CREATE OR REPLACE FUNCTION my_decompress(internal) @@ -573,7 +573,7 @@ my_decompress(PG_FUNCTION_ARGS) </varlistentry> <varlistentry> - <term><function>penalty</></term> + <term><function>penalty</function></term> <listitem> <para> Returns a value indicating the <quote>cost</quote> of inserting the new @@ -584,7 +584,7 @@ my_decompress(PG_FUNCTION_ARGS) </para> <para> - The <acronym>SQL</> declaration of the function must look like this: + The <acronym>SQL</acronym> declaration of the function must look like this: <programlisting> CREATE OR REPLACE FUNCTION my_penalty(internal, internal, internal) @@ -612,15 +612,15 @@ my_penalty(PG_FUNCTION_ARGS) } </programlisting> - For historical reasons, the <function>penalty</> function doesn't - just return a <type>float</> result; instead it has to store the value + For historical reasons, the <function>penalty</function> function doesn't + just return a <type>float</type> result; instead it has to store the value at the location indicated by the third argument. The return value per se is ignored, though it's conventional to pass back the address of that argument. </para> <para> - The <function>penalty</> function is crucial to good performance of + The <function>penalty</function> function is crucial to good performance of the index. It'll get used at insertion time to determine which branch to follow when choosing where to add the new entry in the tree. At query time, the more balanced the index, the quicker the lookup. @@ -629,7 +629,7 @@ my_penalty(PG_FUNCTION_ARGS) </varlistentry> <varlistentry> - <term><function>picksplit</></term> + <term><function>picksplit</function></term> <listitem> <para> When an index page split is necessary, this function decides which @@ -638,7 +638,7 @@ my_penalty(PG_FUNCTION_ARGS) </para> <para> - The <acronym>SQL</> declaration of the function must look like this: + The <acronym>SQL</acronym> declaration of the function must look like this: <programlisting> CREATE OR REPLACE FUNCTION my_picksplit(internal, internal) @@ -725,33 +725,33 @@ my_picksplit(PG_FUNCTION_ARGS) } </programlisting> - Notice that the <function>picksplit</> function's result is delivered - by modifying the passed-in <structname>v</> structure. The return + Notice that the <function>picksplit</function> function's result is delivered + by modifying the passed-in <structname>v</structname> structure. The return value per se is ignored, though it's conventional to pass back the - address of <structname>v</>. + address of <structname>v</structname>. </para> <para> - Like <function>penalty</>, the <function>picksplit</> function + Like <function>penalty</function>, the <function>picksplit</function> function is crucial to good performance of the index. Designing suitable - <function>penalty</> and <function>picksplit</> implementations + <function>penalty</function> and <function>picksplit</function> implementations is where the challenge of implementing well-performing - <acronym>GiST</> indexes lies. + <acronym>GiST</acronym> indexes lies. </para> </listitem> </varlistentry> <varlistentry> - <term><function>same</></term> + <term><function>same</function></term> <listitem> <para> Returns true if two index entries are identical, false otherwise. - (An <quote>index entry</> is a value of the index's storage type, + (An <quote>index entry</quote> is a value of the index's storage type, not necessarily the original indexed column's type.) </para> <para> - The <acronym>SQL</> declaration of the function must look like this: + The <acronym>SQL</acronym> declaration of the function must look like this: <programlisting> CREATE OR REPLACE FUNCTION my_same(storage_type, storage_type, internal) @@ -777,7 +777,7 @@ my_same(PG_FUNCTION_ARGS) } </programlisting> - For historical reasons, the <function>same</> function doesn't + For historical reasons, the <function>same</function> function doesn't just return a Boolean result; instead it has to store the flag at the location indicated by the third argument. The return value per se is ignored, though it's conventional to pass back the @@ -787,15 +787,15 @@ my_same(PG_FUNCTION_ARGS) </varlistentry> <varlistentry> - <term><function>distance</></term> + <term><function>distance</function></term> <listitem> <para> - Given an index entry <literal>p</> and a query value <literal>q</>, + Given an index entry <literal>p</literal> and a query value <literal>q</literal>, this function determines the index entry's - <quote>distance</> from the query value. This function must be + <quote>distance</quote> from the query value. This function must be supplied if the operator class contains any ordering operators. A query using the ordering operator will be implemented by returning - index entries with the smallest <quote>distance</> values first, + index entries with the smallest <quote>distance</quote> values first, so the results must be consistent with the operator's semantics. For a leaf index entry the result just represents the distance to the index entry; for an internal tree node, the result must be the @@ -803,7 +803,7 @@ my_same(PG_FUNCTION_ARGS) </para> <para> - The <acronym>SQL</> declaration of the function must look like this: + The <acronym>SQL</acronym> declaration of the function must look like this: <programlisting> CREATE OR REPLACE FUNCTION my_distance(internal, data_type, smallint, oid, internal) @@ -836,8 +836,8 @@ my_distance(PG_FUNCTION_ARGS) } </programlisting> - The arguments to the <function>distance</> function are identical to - the arguments of the <function>consistent</> function. + The arguments to the <function>distance</function> function are identical to + the arguments of the <function>consistent</function> function. </para> <para> @@ -847,31 +847,31 @@ my_distance(PG_FUNCTION_ARGS) geometric applications. For an internal tree node, the distance returned must not be greater than the distance to any of the child nodes. If the returned distance is not exact, the function must set - <literal>*recheck</> to true. (This is not necessary for internal tree + <literal>*recheck</literal> to true. (This is not necessary for internal tree nodes; for them, the calculation is always assumed to be inexact.) In this case the executor will calculate the accurate distance after fetching the tuple from the heap, and reorder the tuples if necessary. </para> <para> - If the distance function returns <literal>*recheck = true</> for any + If the distance function returns <literal>*recheck = true</literal> for any leaf node, the original ordering operator's return type must - be <type>float8</> or <type>float4</>, and the distance function's + be <type>float8</type> or <type>float4</type>, and the distance function's result values must be comparable to those of the original ordering operator, since the executor will sort using both distance function results and recalculated ordering-operator results. Otherwise, the - distance function's result values can be any finite <type>float8</> + distance function's result values can be any finite <type>float8</type> values, so long as the relative order of the result values matches the order returned by the ordering operator. (Infinity and minus infinity are used internally to handle cases such as nulls, so it is not - recommended that <function>distance</> functions return these values.) + recommended that <function>distance</function> functions return these values.) </para> </listitem> </varlistentry> <varlistentry> - <term><function>fetch</></term> + <term><function>fetch</function></term> <listitem> <para> Converts the compressed index representation of a data item into the @@ -880,7 +880,7 @@ my_distance(PG_FUNCTION_ARGS) </para> <para> - The <acronym>SQL</> declaration of the function must look like this: + The <acronym>SQL</acronym> declaration of the function must look like this: <programlisting> CREATE OR REPLACE FUNCTION my_fetch(internal) @@ -889,14 +889,14 @@ AS 'MODULE_PATHNAME' LANGUAGE C STRICT; </programlisting> - The argument is a pointer to a <structname>GISTENTRY</> struct. On - entry, its <structfield>key</> field contains a non-NULL leaf datum in - compressed form. The return value is another <structname>GISTENTRY</> - struct, whose <structfield>key</> field contains the same datum in its + The argument is a pointer to a <structname>GISTENTRY</structname> struct. On + entry, its <structfield>key</structfield> field contains a non-NULL leaf datum in + compressed form. The return value is another <structname>GISTENTRY</structname> + struct, whose <structfield>key</structfield> field contains the same datum in its original, uncompressed form. If the opclass's compress function does - nothing for leaf entries, the <function>fetch</> method can return the + nothing for leaf entries, the <function>fetch</function> method can return the argument as-is. Or, if the opclass does not have a compress function, - the <function>fetch</> method can be omitted as well, since it would + the <function>fetch</function> method can be omitted as well, since it would necessarily be a no-op. </para> @@ -933,7 +933,7 @@ my_fetch(PG_FUNCTION_ARGS) <para> If the compress method is lossy for leaf entries, the operator class cannot support index-only scans, and must not define - a <function>fetch</> function. + a <function>fetch</function> function. </para> </listitem> @@ -942,15 +942,15 @@ my_fetch(PG_FUNCTION_ARGS) <para> All the GiST support methods are normally called in short-lived memory - contexts; that is, <varname>CurrentMemoryContext</> will get reset after + contexts; that is, <varname>CurrentMemoryContext</varname> will get reset after each tuple is processed. It is therefore not very important to worry about pfree'ing everything you palloc. However, in some cases it's useful for a support method to cache data across repeated calls. To do that, allocate - the longer-lived data in <literal>fcinfo->flinfo->fn_mcxt</>, and - keep a pointer to it in <literal>fcinfo->flinfo->fn_extra</>. Such + the longer-lived data in <literal>fcinfo->flinfo->fn_mcxt</literal>, and + keep a pointer to it in <literal>fcinfo->flinfo->fn_extra</literal>. Such data will survive for the life of the index operation (e.g., a single GiST index scan, index build, or index tuple insertion). Be careful to pfree - the previous value when replacing a <literal>fn_extra</> value, or the leak + the previous value when replacing a <literal>fn_extra</literal> value, or the leak will accumulate for the duration of the operation. </para> @@ -974,7 +974,7 @@ my_fetch(PG_FUNCTION_ARGS) </para> <para> - However, buffering index build needs to call the <function>penalty</> + However, buffering index build needs to call the <function>penalty</function> function more often, which consumes some extra CPU resources. Also, the buffers used in the buffering build need temporary disk space, up to the size of the resulting index. Buffering can also influence the quality @@ -1002,57 +1002,57 @@ my_fetch(PG_FUNCTION_ARGS) The <productname>PostgreSQL</productname> source distribution includes several examples of index methods implemented using <acronym>GiST</acronym>. The core system currently provides text search - support (indexing for <type>tsvector</> and <type>tsquery</>) as well as + support (indexing for <type>tsvector</type> and <type>tsquery</type>) as well as R-Tree equivalent functionality for some of the built-in geometric data types - (see <filename>src/backend/access/gist/gistproc.c</>). The following - <filename>contrib</> modules also contain <acronym>GiST</acronym> + (see <filename>src/backend/access/gist/gistproc.c</filename>). The following + <filename>contrib</filename> modules also contain <acronym>GiST</acronym> operator classes: <variablelist> <varlistentry> - <term><filename>btree_gist</></term> + <term><filename>btree_gist</filename></term> <listitem> <para>B-tree equivalent functionality for several data types</para> </listitem> </varlistentry> <varlistentry> - <term><filename>cube</></term> + <term><filename>cube</filename></term> <listitem> <para>Indexing for multidimensional cubes</para> </listitem> </varlistentry> <varlistentry> - <term><filename>hstore</></term> + <term><filename>hstore</filename></term> <listitem> <para>Module for storing (key, value) pairs</para> </listitem> </varlistentry> <varlistentry> - <term><filename>intarray</></term> + <term><filename>intarray</filename></term> <listitem> <para>RD-Tree for one-dimensional array of int4 values</para> </listitem> </varlistentry> <varlistentry> - <term><filename>ltree</></term> + <term><filename>ltree</filename></term> <listitem> <para>Indexing for tree-like structures</para> </listitem> </varlistentry> <varlistentry> - <term><filename>pg_trgm</></term> + <term><filename>pg_trgm</filename></term> <listitem> <para>Text similarity using trigram matching</para> </listitem> </varlistentry> <varlistentry> - <term><filename>seg</></term> + <term><filename>seg</filename></term> <listitem> <para>Indexing for <quote>float ranges</quote></para> </listitem> diff --git a/doc/src/sgml/high-availability.sgml b/doc/src/sgml/high-availability.sgml index 6c54fbd40d8..086d6abb302 100644 --- a/doc/src/sgml/high-availability.sgml +++ b/doc/src/sgml/high-availability.sgml @@ -3,12 +3,12 @@ <chapter id="high-availability"> <title>High Availability, Load Balancing, and Replication</title> - <indexterm><primary>high availability</></> - <indexterm><primary>failover</></> - <indexterm><primary>replication</></> - <indexterm><primary>load balancing</></> - <indexterm><primary>clustering</></> - <indexterm><primary>data partitioning</></> + <indexterm><primary>high availability</primary></indexterm> + <indexterm><primary>failover</primary></indexterm> + <indexterm><primary>replication</primary></indexterm> + <indexterm><primary>load balancing</primary></indexterm> + <indexterm><primary>clustering</primary></indexterm> + <indexterm><primary>data partitioning</primary></indexterm> <para> Database servers can work together to allow a second server to @@ -38,12 +38,12 @@ <para> Some solutions deal with synchronization by allowing only one server to modify the data. Servers that can modify data are - called read/write, <firstterm>master</> or <firstterm>primary</> servers. - Servers that track changes in the master are called <firstterm>standby</> - or <firstterm>secondary</> servers. A standby server that cannot be connected + called read/write, <firstterm>master</firstterm> or <firstterm>primary</firstterm> servers. + Servers that track changes in the master are called <firstterm>standby</firstterm> + or <firstterm>secondary</firstterm> servers. A standby server that cannot be connected to until it is promoted to a master server is called a <firstterm>warm - standby</> server, and one that can accept connections and serves read-only - queries is called a <firstterm>hot standby</> server. + standby</firstterm> server, and one that can accept connections and serves read-only + queries is called a <firstterm>hot standby</firstterm> server. </para> <para> @@ -99,7 +99,7 @@ <para> Shared hardware functionality is common in network storage devices. Using a network file system is also possible, though care must be - taken that the file system has full <acronym>POSIX</> behavior (see <xref + taken that the file system has full <acronym>POSIX</acronym> behavior (see <xref linkend="creating-cluster-nfs">). One significant limitation of this method is that if the shared disk array fails or becomes corrupt, the primary and standby servers are both nonfunctional. Another issue is @@ -121,7 +121,7 @@ the mirroring must be done in a way that ensures the standby server has a consistent copy of the file system — specifically, writes to the standby must be done in the same order as those on the master. - <productname>DRBD</> is a popular file system replication solution + <productname>DRBD</productname> is a popular file system replication solution for Linux. </para> @@ -143,7 +143,7 @@ protocol to make nodes agree on a serializable transactional order. <para> Warm and hot standby servers can be kept current by reading a - stream of write-ahead log (<acronym>WAL</>) + stream of write-ahead log (<acronym>WAL</acronym>) records. If the main server fails, the standby contains almost all of the data of the main server, and can be quickly made the new master database server. This can be synchronous or @@ -189,7 +189,7 @@ protocol to make nodes agree on a serializable transactional order. </para> <para> - <productname>Slony-I</> is an example of this type of replication, with per-table + <productname>Slony-I</productname> is an example of this type of replication, with per-table granularity, and support for multiple standby servers. Because it updates the standby server asynchronously (in batches), there is possible data loss during fail over. @@ -212,7 +212,7 @@ protocol to make nodes agree on a serializable transactional order. <para> If queries are simply broadcast unmodified, functions like - <function>random()</>, <function>CURRENT_TIMESTAMP</>, and + <function>random()</function>, <function>CURRENT_TIMESTAMP</function>, and sequences can have different values on different servers. This is because each server operates independently, and because SQL queries are broadcast (and not actual modified rows). If @@ -226,7 +226,7 @@ protocol to make nodes agree on a serializable transactional order. transactions either commit or abort on all servers, perhaps using two-phase commit (<xref linkend="sql-prepare-transaction"> and <xref linkend="sql-commit-prepared">). - <productname>Pgpool-II</> and <productname>Continuent Tungsten</> + <productname>Pgpool-II</productname> and <productname>Continuent Tungsten</productname> are examples of this type of replication. </para> </listitem> @@ -266,12 +266,12 @@ protocol to make nodes agree on a serializable transactional order. there is no need to partition workloads between master and standby servers, and because the data changes are sent from one server to another, there is no problem with non-deterministic - functions like <function>random()</>. + functions like <function>random()</function>. </para> <para> - <productname>PostgreSQL</> does not offer this type of replication, - though <productname>PostgreSQL</> two-phase commit (<xref + <productname>PostgreSQL</productname> does not offer this type of replication, + though <productname>PostgreSQL</productname> two-phase commit (<xref linkend="sql-prepare-transaction"> and <xref linkend="sql-commit-prepared">) can be used to implement this in application code or middleware. @@ -284,8 +284,8 @@ protocol to make nodes agree on a serializable transactional order. <listitem> <para> - Because <productname>PostgreSQL</> is open source and easily - extended, a number of companies have taken <productname>PostgreSQL</> + Because <productname>PostgreSQL</productname> is open source and easily + extended, a number of companies have taken <productname>PostgreSQL</productname> and created commercial closed-source solutions with unique failover, replication, and load balancing capabilities. </para> @@ -475,9 +475,9 @@ protocol to make nodes agree on a serializable transactional order. concurrently on a single query. It is usually accomplished by splitting the data among servers and having each server execute its part of the query and return results to a central server where they - are combined and returned to the user. <productname>Pgpool-II</> + are combined and returned to the user. <productname>Pgpool-II</productname> has this capability. Also, this can be implemented using the - <productname>PL/Proxy</> tool set. + <productname>PL/Proxy</productname> tool set. </para> </listitem> @@ -494,10 +494,10 @@ protocol to make nodes agree on a serializable transactional order. <para> Continuous archiving can be used to create a <firstterm>high - availability</> (HA) cluster configuration with one or more - <firstterm>standby servers</> ready to take over operations if the + availability</firstterm> (HA) cluster configuration with one or more + <firstterm>standby servers</firstterm> ready to take over operations if the primary server fails. This capability is widely referred to as - <firstterm>warm standby</> or <firstterm>log shipping</>. + <firstterm>warm standby</firstterm> or <firstterm>log shipping</firstterm>. </para> <para> @@ -513,7 +513,7 @@ protocol to make nodes agree on a serializable transactional order. <para> Directly moving WAL records from one database server to another - is typically described as log shipping. <productname>PostgreSQL</> + is typically described as log shipping. <productname>PostgreSQL</productname> implements file-based log shipping by transferring WAL records one file (WAL segment) at a time. WAL files (16MB) can be shipped easily and cheaply over any distance, whether it be to an @@ -597,7 +597,7 @@ protocol to make nodes agree on a serializable transactional order. <para> In general, log shipping between servers running different major - <productname>PostgreSQL</> release + <productname>PostgreSQL</productname> release levels is not possible. It is the policy of the PostgreSQL Global Development Group not to make changes to disk formats during minor release upgrades, so it is likely that running different minor release levels @@ -621,32 +621,32 @@ protocol to make nodes agree on a serializable transactional order. (see <xref linkend="restore-command">) or directly from the master over a TCP connection (streaming replication). The standby server will also attempt to restore any WAL found in the standby cluster's - <filename>pg_wal</> directory. That typically happens after a server + <filename>pg_wal</filename> directory. That typically happens after a server restart, when the standby replays again WAL that was streamed from the master before the restart, but you can also manually copy files to - <filename>pg_wal</> at any time to have them replayed. + <filename>pg_wal</filename> at any time to have them replayed. </para> <para> At startup, the standby begins by restoring all WAL available in the - archive location, calling <varname>restore_command</>. Once it - reaches the end of WAL available there and <varname>restore_command</> - fails, it tries to restore any WAL available in the <filename>pg_wal</> directory. + archive location, calling <varname>restore_command</varname>. Once it + reaches the end of WAL available there and <varname>restore_command</varname> + fails, it tries to restore any WAL available in the <filename>pg_wal</filename> directory. If that fails, and streaming replication has been configured, the standby tries to connect to the primary server and start streaming WAL - from the last valid record found in archive or <filename>pg_wal</>. If that fails + from the last valid record found in archive or <filename>pg_wal</filename>. If that fails or streaming replication is not configured, or if the connection is later disconnected, the standby goes back to step 1 and tries to restore the file from the archive again. This loop of retries from the - archive, <filename>pg_wal</>, and via streaming replication goes on until the server + archive, <filename>pg_wal</filename>, and via streaming replication goes on until the server is stopped or failover is triggered by a trigger file. </para> <para> Standby mode is exited and the server switches to normal operation - when <command>pg_ctl promote</> is run or a trigger file is found - (<varname>trigger_file</>). Before failover, - any WAL immediately available in the archive or in <filename>pg_wal</> will be + when <command>pg_ctl promote</command> is run or a trigger file is found + (<varname>trigger_file</varname>). Before failover, + any WAL immediately available in the archive or in <filename>pg_wal</filename> will be restored, but no attempt is made to connect to the master. </para> </sect2> @@ -667,8 +667,8 @@ protocol to make nodes agree on a serializable transactional order. If you want to use streaming replication, set up authentication on the primary server to allow replication connections from the standby server(s); that is, create a role and provide a suitable entry or - entries in <filename>pg_hba.conf</> with the database field set to - <literal>replication</>. Also ensure <varname>max_wal_senders</> is set + entries in <filename>pg_hba.conf</filename> with the database field set to + <literal>replication</literal>. Also ensure <varname>max_wal_senders</varname> is set to a sufficiently large value in the configuration file of the primary server. If replication slots will be used, ensure that <varname>max_replication_slots</varname> is set sufficiently @@ -687,19 +687,19 @@ protocol to make nodes agree on a serializable transactional order. <para> To set up the standby server, restore the base backup taken from primary server (see <xref linkend="backup-pitr-recovery">). Create a recovery - command file <filename>recovery.conf</> in the standby's cluster data - directory, and turn on <varname>standby_mode</>. Set - <varname>restore_command</> to a simple command to copy files from + command file <filename>recovery.conf</filename> in the standby's cluster data + directory, and turn on <varname>standby_mode</varname>. Set + <varname>restore_command</varname> to a simple command to copy files from the WAL archive. If you plan to have multiple standby servers for high - availability purposes, set <varname>recovery_target_timeline</> to - <literal>latest</>, to make the standby server follow the timeline change + availability purposes, set <varname>recovery_target_timeline</varname> to + <literal>latest</literal>, to make the standby server follow the timeline change that occurs at failover to another standby. </para> <note> <para> Do not use pg_standby or similar tools with the built-in standby mode - described here. <varname>restore_command</> should return immediately + described here. <varname>restore_command</varname> should return immediately if the file does not exist; the server will retry the command again if necessary. See <xref linkend="log-shipping-alternative"> for using tools like pg_standby. @@ -708,11 +708,11 @@ protocol to make nodes agree on a serializable transactional order. <para> If you want to use streaming replication, fill in - <varname>primary_conninfo</> with a libpq connection string, including + <varname>primary_conninfo</varname> with a libpq connection string, including the host name (or IP address) and any additional details needed to connect to the primary server. If the primary needs a password for authentication, the password needs to be specified in - <varname>primary_conninfo</> as well. + <varname>primary_conninfo</varname> as well. </para> <para> @@ -726,8 +726,8 @@ protocol to make nodes agree on a serializable transactional order. If you're using a WAL archive, its size can be minimized using the <xref linkend="archive-cleanup-command"> parameter to remove files that are no longer required by the standby server. - The <application>pg_archivecleanup</> utility is designed specifically to - be used with <varname>archive_cleanup_command</> in typical single-standby + The <application>pg_archivecleanup</application> utility is designed specifically to + be used with <varname>archive_cleanup_command</varname> in typical single-standby configurations, see <xref linkend="pgarchivecleanup">. Note however, that if you're using the archive for backup purposes, you need to retain files needed to recover from at least the latest base @@ -735,7 +735,7 @@ protocol to make nodes agree on a serializable transactional order. </para> <para> - A simple example of a <filename>recovery.conf</> is: + A simple example of a <filename>recovery.conf</filename> is: <programlisting> standby_mode = 'on' primary_conninfo = 'host=192.168.1.50 port=5432 user=foo password=foopass' @@ -746,7 +746,7 @@ archive_cleanup_command = 'pg_archivecleanup /path/to/archive %r' <para> You can have any number of standby servers, but if you use streaming - replication, make sure you set <varname>max_wal_senders</> high enough in + replication, make sure you set <varname>max_wal_senders</varname> high enough in the primary to allow them to be connected simultaneously. </para> @@ -773,7 +773,7 @@ archive_cleanup_command = 'pg_archivecleanup /path/to/archive %r' changes becoming visible in the standby. This delay is however much smaller than with file-based log shipping, typically under one second assuming the standby is powerful enough to keep up with the load. With - streaming replication, <varname>archive_timeout</> is not required to + streaming replication, <varname>archive_timeout</varname> is not required to reduce the data loss window. </para> @@ -782,7 +782,7 @@ archive_cleanup_command = 'pg_archivecleanup /path/to/archive %r' archiving, the server might recycle old WAL segments before the standby has received them. If this occurs, the standby will need to be reinitialized from a new base backup. You can avoid this by setting - <varname>wal_keep_segments</> to a value large enough to ensure that + <varname>wal_keep_segments</varname> to a value large enough to ensure that WAL segments are not recycled too early, or by configuring a replication slot for the standby. If you set up a WAL archive that's accessible from the standby, these solutions are not required, since the standby can @@ -793,11 +793,11 @@ archive_cleanup_command = 'pg_archivecleanup /path/to/archive %r' To use streaming replication, set up a file-based log-shipping standby server as described in <xref linkend="warm-standby">. The step that turns a file-based log-shipping standby into streaming replication - standby is setting <varname>primary_conninfo</> setting in the - <filename>recovery.conf</> file to point to the primary server. Set + standby is setting <varname>primary_conninfo</varname> setting in the + <filename>recovery.conf</filename> file to point to the primary server. Set <xref linkend="guc-listen-addresses"> and authentication options - (see <filename>pg_hba.conf</>) on the primary so that the standby server - can connect to the <literal>replication</> pseudo-database on the primary + (see <filename>pg_hba.conf</filename>) on the primary so that the standby server + can connect to the <literal>replication</literal> pseudo-database on the primary server (see <xref linkend="streaming-replication-authentication">). </para> @@ -815,7 +815,7 @@ archive_cleanup_command = 'pg_archivecleanup /path/to/archive %r' </para> <para> - When the standby is started and <varname>primary_conninfo</> is set + When the standby is started and <varname>primary_conninfo</varname> is set correctly, the standby will connect to the primary after replaying all WAL files available in the archive. If the connection is established successfully, you will see a walreceiver process in the standby, and @@ -829,20 +829,20 @@ archive_cleanup_command = 'pg_archivecleanup /path/to/archive %r' so that only trusted users can read the WAL stream, because it is easy to extract privileged information from it. Standby servers must authenticate to the primary as a superuser or an account that has the - <literal>REPLICATION</> privilege. It is recommended to create a - dedicated user account with <literal>REPLICATION</> and <literal>LOGIN</> - privileges for replication. While <literal>REPLICATION</> privilege gives + <literal>REPLICATION</literal> privilege. It is recommended to create a + dedicated user account with <literal>REPLICATION</literal> and <literal>LOGIN</literal> + privileges for replication. While <literal>REPLICATION</literal> privilege gives very high permissions, it does not allow the user to modify any data on - the primary system, which the <literal>SUPERUSER</> privilege does. + the primary system, which the <literal>SUPERUSER</literal> privilege does. </para> <para> Client authentication for replication is controlled by a - <filename>pg_hba.conf</> record specifying <literal>replication</> in the - <replaceable>database</> field. For example, if the standby is running on - host IP <literal>192.168.1.100</> and the account name for replication - is <literal>foo</>, the administrator can add the following line to the - <filename>pg_hba.conf</> file on the primary: + <filename>pg_hba.conf</filename> record specifying <literal>replication</literal> in the + <replaceable>database</replaceable> field. For example, if the standby is running on + host IP <literal>192.168.1.100</literal> and the account name for replication + is <literal>foo</literal>, the administrator can add the following line to the + <filename>pg_hba.conf</filename> file on the primary: <programlisting> # Allow the user "foo" from host 192.168.1.100 to connect to the primary @@ -854,14 +854,14 @@ host replication foo 192.168.1.100/32 md5 </para> <para> The host name and port number of the primary, connection user name, - and password are specified in the <filename>recovery.conf</> file. - The password can also be set in the <filename>~/.pgpass</> file on the - standby (specify <literal>replication</> in the <replaceable>database</> + and password are specified in the <filename>recovery.conf</filename> file. + The password can also be set in the <filename>~/.pgpass</filename> file on the + standby (specify <literal>replication</literal> in the <replaceable>database</replaceable> field). - For example, if the primary is running on host IP <literal>192.168.1.50</>, + For example, if the primary is running on host IP <literal>192.168.1.50</literal>, port <literal>5432</literal>, the account name for replication is - <literal>foo</>, and the password is <literal>foopass</>, the administrator - can add the following line to the <filename>recovery.conf</> file on the + <literal>foo</literal>, and the password is <literal>foopass</literal>, the administrator + can add the following line to the <filename>recovery.conf</filename> file on the standby: <programlisting> @@ -880,22 +880,22 @@ primary_conninfo = 'host=192.168.1.50 port=5432 user=foo password=foopass' standby. You can calculate this lag by comparing the current WAL write location on the primary with the last WAL location received by the standby. These locations can be retrieved using - <function>pg_current_wal_lsn</> on the primary and - <function>pg_last_wal_receive_lsn</> on the standby, + <function>pg_current_wal_lsn</function> on the primary and + <function>pg_last_wal_receive_lsn</function> on the standby, respectively (see <xref linkend="functions-admin-backup-table"> and <xref linkend="functions-recovery-info-table"> for details). The last WAL receive location in the standby is also displayed in the process status of the WAL receiver process, displayed using the - <command>ps</> command (see <xref linkend="monitoring-ps"> for details). + <command>ps</command> command (see <xref linkend="monitoring-ps"> for details). </para> <para> You can retrieve a list of WAL sender processes via the <link linkend="monitoring-stats-views-table"> - <literal>pg_stat_replication</></link> view. Large differences between - <function>pg_current_wal_lsn</> and the view's <literal>sent_lsn</> field + <literal>pg_stat_replication</literal></link> view. Large differences between + <function>pg_current_wal_lsn</function> and the view's <literal>sent_lsn</literal> field might indicate that the master server is under heavy load, while - differences between <literal>sent_lsn</> and - <function>pg_last_wal_receive_lsn</> on the standby might indicate + differences between <literal>sent_lsn</literal> and + <function>pg_last_wal_receive_lsn</function> on the standby might indicate network delay, or that the standby is under heavy load. </para> </sect3> @@ -911,7 +911,7 @@ primary_conninfo = 'host=192.168.1.50 port=5432 user=foo password=foopass' Replication slots provide an automated way to ensure that the master does not remove WAL segments until they have been received by all standbys, and that the master does not remove rows which could cause a - <link linkend="hot-standby-conflict">recovery conflict</> even when the + <link linkend="hot-standby-conflict">recovery conflict</link> even when the standby is disconnected. </para> <para> @@ -922,7 +922,7 @@ primary_conninfo = 'host=192.168.1.50 port=5432 user=foo password=foopass' However, these methods often result in retaining more WAL segments than required, whereas replication slots retain only the number of segments known to be needed. An advantage of these methods is that they bound - the space requirement for <literal>pg_wal</>; there is currently no way + the space requirement for <literal>pg_wal</literal>; there is currently no way to do this using replication slots. </para> <para> @@ -966,8 +966,8 @@ postgres=# SELECT * FROM pg_replication_slots; node_a_slot | physical | | | f | | | (1 row) </programlisting> - To configure the standby to use this slot, <varname>primary_slot_name</> - should be configured in the standby's <filename>recovery.conf</>. + To configure the standby to use this slot, <varname>primary_slot_name</varname> + should be configured in the standby's <filename>recovery.conf</filename>. Here is a simple example: <programlisting> standby_mode = 'on' @@ -1022,7 +1022,7 @@ primary_slot_name = 'node_a_slot' <para> If an upstream standby server is promoted to become new master, downstream servers will continue to stream from the new master if - <varname>recovery_target_timeline</> is set to <literal>'latest'</>. + <varname>recovery_target_timeline</varname> is set to <literal>'latest'</literal>. </para> <para> @@ -1031,7 +1031,7 @@ primary_slot_name = 'node_a_slot' <xref linkend="guc-max-wal-senders"> and <xref linkend="guc-hot-standby">, and configure <link linkend="auth-pg-hba-conf">host-based authentication</link>). - You will also need to set <varname>primary_conninfo</> in the downstream + You will also need to set <varname>primary_conninfo</varname> in the downstream standby to point to the cascading standby. </para> </sect2> @@ -1044,7 +1044,7 @@ primary_slot_name = 'node_a_slot' </indexterm> <para> - <productname>PostgreSQL</> streaming replication is asynchronous by + <productname>PostgreSQL</productname> streaming replication is asynchronous by default. If the primary server crashes then some transactions that were committed may not have been replicated to the standby server, causing data loss. The amount @@ -1058,8 +1058,8 @@ primary_slot_name = 'node_a_slot' standby servers. This extends that standard level of durability offered by a transaction commit. This level of protection is referred to as 2-safe replication in computer science theory, and group-1-safe - (group-safe and 1-safe) when <varname>synchronous_commit</> is set to - <literal>remote_write</>. + (group-safe and 1-safe) when <varname>synchronous_commit</varname> is set to + <literal>remote_write</literal>. </para> <para> @@ -1104,14 +1104,14 @@ primary_slot_name = 'node_a_slot' Once streaming replication has been configured, configuring synchronous replication requires only one additional configuration step: <xref linkend="guc-synchronous-standby-names"> must be set to - a non-empty value. <varname>synchronous_commit</> must also be set to - <literal>on</>, but since this is the default value, typically no change is + a non-empty value. <varname>synchronous_commit</varname> must also be set to + <literal>on</literal>, but since this is the default value, typically no change is required. (See <xref linkend="runtime-config-wal-settings"> and <xref linkend="runtime-config-replication-master">.) This configuration will cause each commit to wait for confirmation that the standby has written the commit record to durable storage. - <varname>synchronous_commit</> can be set by individual + <varname>synchronous_commit</varname> can be set by individual users, so it can be configured in the configuration file, for particular users or databases, or dynamically by applications, in order to control the durability guarantee on a per-transaction basis. @@ -1121,12 +1121,12 @@ primary_slot_name = 'node_a_slot' After a commit record has been written to disk on the primary, the WAL record is then sent to the standby. The standby sends reply messages each time a new batch of WAL data is written to disk, unless - <varname>wal_receiver_status_interval</> is set to zero on the standby. - In the case that <varname>synchronous_commit</> is set to - <literal>remote_apply</>, the standby sends reply messages when the commit + <varname>wal_receiver_status_interval</varname> is set to zero on the standby. + In the case that <varname>synchronous_commit</varname> is set to + <literal>remote_apply</literal>, the standby sends reply messages when the commit record is replayed, making the transaction visible. If the standby is chosen as a synchronous standby, according to the setting - of <varname>synchronous_standby_names</> on the primary, the reply + of <varname>synchronous_standby_names</varname> on the primary, the reply messages from that standby will be considered along with those from other synchronous standbys to decide when to release transactions waiting for confirmation that the commit record has been received. These parameters @@ -1138,13 +1138,13 @@ primary_slot_name = 'node_a_slot' </para> <para> - Setting <varname>synchronous_commit</> to <literal>remote_write</> will + Setting <varname>synchronous_commit</varname> to <literal>remote_write</literal> will cause each commit to wait for confirmation that the standby has received the commit record and written it out to its own operating system, but not for the data to be flushed to disk on the standby. This - setting provides a weaker guarantee of durability than <literal>on</> + setting provides a weaker guarantee of durability than <literal>on</literal> does: the standby could lose the data in the event of an operating system - crash, though not a <productname>PostgreSQL</> crash. + crash, though not a <productname>PostgreSQL</productname> crash. However, it's a useful setting in practice because it can decrease the response time for the transaction. Data loss could only occur if both the primary and the standby crash and @@ -1152,7 +1152,7 @@ primary_slot_name = 'node_a_slot' </para> <para> - Setting <varname>synchronous_commit</> to <literal>remote_apply</> will + Setting <varname>synchronous_commit</varname> to <literal>remote_apply</literal> will cause each commit to wait until the current synchronous standbys report that they have replayed the transaction, making it visible to user queries. In simple cases, this allows for load balancing with causal @@ -1176,12 +1176,12 @@ primary_slot_name = 'node_a_slot' transactions will wait until all the standby servers which are considered as synchronous confirm receipt of their data. The number of synchronous standbys that transactions must wait for replies from is specified in - <varname>synchronous_standby_names</>. This parameter also specifies - a list of standby names and the method (<literal>FIRST</> and - <literal>ANY</>) to choose synchronous standbys from the listed ones. + <varname>synchronous_standby_names</varname>. This parameter also specifies + a list of standby names and the method (<literal>FIRST</literal> and + <literal>ANY</literal>) to choose synchronous standbys from the listed ones. </para> <para> - The method <literal>FIRST</> specifies a priority-based synchronous + The method <literal>FIRST</literal> specifies a priority-based synchronous replication and makes transaction commits wait until their WAL records are replicated to the requested number of synchronous standbys chosen based on their priorities. The standbys whose names appear earlier in the list are @@ -1192,36 +1192,36 @@ primary_slot_name = 'node_a_slot' next-highest-priority standby. </para> <para> - An example of <varname>synchronous_standby_names</> for + An example of <varname>synchronous_standby_names</varname> for a priority-based multiple synchronous standbys is: <programlisting> synchronous_standby_names = 'FIRST 2 (s1, s2, s3)' </programlisting> - In this example, if four standby servers <literal>s1</>, <literal>s2</>, - <literal>s3</> and <literal>s4</> are running, the two standbys - <literal>s1</> and <literal>s2</> will be chosen as synchronous standbys + In this example, if four standby servers <literal>s1</literal>, <literal>s2</literal>, + <literal>s3</literal> and <literal>s4</literal> are running, the two standbys + <literal>s1</literal> and <literal>s2</literal> will be chosen as synchronous standbys because their names appear early in the list of standby names. - <literal>s3</> is a potential synchronous standby and will take over - the role of synchronous standby when either of <literal>s1</> or - <literal>s2</> fails. <literal>s4</> is an asynchronous standby since + <literal>s3</literal> is a potential synchronous standby and will take over + the role of synchronous standby when either of <literal>s1</literal> or + <literal>s2</literal> fails. <literal>s4</literal> is an asynchronous standby since its name is not in the list. </para> <para> - The method <literal>ANY</> specifies a quorum-based synchronous + The method <literal>ANY</literal> specifies a quorum-based synchronous replication and makes transaction commits wait until their WAL records - are replicated to <emphasis>at least</> the requested number of + are replicated to <emphasis>at least</emphasis> the requested number of synchronous standbys in the list. </para> <para> - An example of <varname>synchronous_standby_names</> for + An example of <varname>synchronous_standby_names</varname> for a quorum-based multiple synchronous standbys is: <programlisting> synchronous_standby_names = 'ANY 2 (s1, s2, s3)' </programlisting> - In this example, if four standby servers <literal>s1</>, <literal>s2</>, - <literal>s3</> and <literal>s4</> are running, transaction commits will - wait for replies from at least any two standbys of <literal>s1</>, - <literal>s2</> and <literal>s3</>. <literal>s4</> is an asynchronous + In this example, if four standby servers <literal>s1</literal>, <literal>s2</literal>, + <literal>s3</literal> and <literal>s4</literal> are running, transaction commits will + wait for replies from at least any two standbys of <literal>s1</literal>, + <literal>s2</literal> and <literal>s3</literal>. <literal>s4</literal> is an asynchronous standby since its name is not in the list. </para> <para> @@ -1243,7 +1243,7 @@ synchronous_standby_names = 'ANY 2 (s1, s2, s3)' </para> <para> - <productname>PostgreSQL</> allows the application developer + <productname>PostgreSQL</productname> allows the application developer to specify the durability level required via replication. This can be specified for the system overall, though it can also be specified for specific users or connections, or even individual transactions. @@ -1275,10 +1275,10 @@ synchronous_standby_names = 'ANY 2 (s1, s2, s3)' <title>Planning for High Availability</title> <para> - <varname>synchronous_standby_names</> specifies the number and + <varname>synchronous_standby_names</varname> specifies the number and names of synchronous standbys that transaction commits made when - <varname>synchronous_commit</> is set to <literal>on</>, - <literal>remote_apply</> or <literal>remote_write</> will wait for + <varname>synchronous_commit</varname> is set to <literal>on</literal>, + <literal>remote_apply</literal> or <literal>remote_write</literal> will wait for responses from. Such transaction commits may never be completed if any one of synchronous standbys should crash. </para> @@ -1286,7 +1286,7 @@ synchronous_standby_names = 'ANY 2 (s1, s2, s3)' <para> The best solution for high availability is to ensure you keep as many synchronous standbys as requested. This can be achieved by naming multiple - potential synchronous standbys using <varname>synchronous_standby_names</>. + potential synchronous standbys using <varname>synchronous_standby_names</varname>. </para> <para> @@ -1305,14 +1305,14 @@ synchronous_standby_names = 'ANY 2 (s1, s2, s3)' <para> When a standby first attaches to the primary, it will not yet be properly - synchronized. This is described as <literal>catchup</> mode. Once + synchronized. This is described as <literal>catchup</literal> mode. Once the lag between standby and primary reaches zero for the first time - we move to real-time <literal>streaming</> state. + we move to real-time <literal>streaming</literal> state. The catch-up duration may be long immediately after the standby has been created. If the standby is shut down, then the catch-up period will increase according to the length of time the standby has been down. The standby is only able to become a synchronous standby - once it has reached <literal>streaming</> state. + once it has reached <literal>streaming</literal> state. This state can be viewed using the <structname>pg_stat_replication</structname> view. </para> @@ -1334,7 +1334,7 @@ synchronous_standby_names = 'ANY 2 (s1, s2, s3)' If you really cannot keep as many synchronous standbys as requested then you should decrease the number of synchronous standbys that transaction commits must wait for responses from - in <varname>synchronous_standby_names</> (or disable it) and + in <varname>synchronous_standby_names</varname> (or disable it) and reload the configuration file on the primary server. </para> @@ -1347,7 +1347,7 @@ synchronous_standby_names = 'ANY 2 (s1, s2, s3)' If you need to re-create a standby server while transactions are waiting, make sure that the commands pg_start_backup() and pg_stop_backup() are run in a session with - <varname>synchronous_commit</> = <literal>off</>, otherwise those + <varname>synchronous_commit</varname> = <literal>off</literal>, otherwise those requests will wait forever for the standby to appear. </para> @@ -1381,7 +1381,7 @@ synchronous_standby_names = 'ANY 2 (s1, s2, s3)' </para> <para> - If <varname>archive_mode</varname> is set to <literal>on</>, the + If <varname>archive_mode</varname> is set to <literal>on</literal>, the archiver is not enabled during recovery or standby mode. If the standby server is promoted, it will start archiving after the promotion, but will not archive any WAL it did not generate itself. To get a complete @@ -1415,7 +1415,7 @@ synchronous_standby_names = 'ANY 2 (s1, s2, s3)' If the primary server fails and the standby server becomes the new primary, and then the old primary restarts, you must have a mechanism for informing the old primary that it is no longer the primary. This is - sometimes known as <acronym>STONITH</> (Shoot The Other Node In The Head), which is + sometimes known as <acronym>STONITH</acronym> (Shoot The Other Node In The Head), which is necessary to avoid situations where both systems think they are the primary, which will lead to confusion and ultimately data loss. </para> @@ -1466,10 +1466,10 @@ synchronous_standby_names = 'ANY 2 (s1, s2, s3)' <para> To trigger failover of a log-shipping standby server, - run <command>pg_ctl promote</> or create a trigger - file with the file name and path specified by the <varname>trigger_file</> - setting in <filename>recovery.conf</>. If you're planning to use - <command>pg_ctl promote</> to fail over, <varname>trigger_file</> is + run <command>pg_ctl promote</command> or create a trigger + file with the file name and path specified by the <varname>trigger_file</varname> + setting in <filename>recovery.conf</filename>. If you're planning to use + <command>pg_ctl promote</command> to fail over, <varname>trigger_file</varname> is not required. If you're setting up the reporting servers that are only used to offload read-only queries from the primary, not for high availability purposes, you don't need to promote it. @@ -1481,9 +1481,9 @@ synchronous_standby_names = 'ANY 2 (s1, s2, s3)' <para> An alternative to the built-in standby mode described in the previous - sections is to use a <varname>restore_command</> that polls the archive location. + sections is to use a <varname>restore_command</varname> that polls the archive location. This was the only option available in versions 8.4 and below. In this - setup, set <varname>standby_mode</> off, because you are implementing + setup, set <varname>standby_mode</varname> off, because you are implementing the polling required for standby operation yourself. See the <xref linkend="pgstandby"> module for a reference implementation of this. @@ -1494,7 +1494,7 @@ synchronous_standby_names = 'ANY 2 (s1, s2, s3)' time, so if you use the standby server for queries (see Hot Standby), there is a delay between an action in the master and when the action becomes visible in the standby, corresponding the time it takes - to fill up the WAL file. <varname>archive_timeout</> can be used to make that delay + to fill up the WAL file. <varname>archive_timeout</varname> can be used to make that delay shorter. Also note that you can't combine streaming replication with this method. </para> @@ -1511,25 +1511,25 @@ synchronous_standby_names = 'ANY 2 (s1, s2, s3)' <para> The magic that makes the two loosely coupled servers work together is - simply a <varname>restore_command</> used on the standby that, + simply a <varname>restore_command</varname> used on the standby that, when asked for the next WAL file, waits for it to become available from - the primary. The <varname>restore_command</> is specified in the - <filename>recovery.conf</> file on the standby server. Normal recovery + the primary. The <varname>restore_command</varname> is specified in the + <filename>recovery.conf</filename> file on the standby server. Normal recovery processing would request a file from the WAL archive, reporting failure if the file was unavailable. For standby processing it is normal for the next WAL file to be unavailable, so the standby must wait for - it to appear. For files ending in <literal>.backup</> or - <literal>.history</> there is no need to wait, and a non-zero return - code must be returned. A waiting <varname>restore_command</> can be + it to appear. For files ending in <literal>.backup</literal> or + <literal>.history</literal> there is no need to wait, and a non-zero return + code must be returned. A waiting <varname>restore_command</varname> can be written as a custom script that loops after polling for the existence of the next WAL file. There must also be some way to trigger failover, which - should interrupt the <varname>restore_command</>, break the loop and + should interrupt the <varname>restore_command</varname>, break the loop and return a file-not-found error to the standby server. This ends recovery and the standby will then come up as a normal server. </para> <para> - Pseudocode for a suitable <varname>restore_command</> is: + Pseudocode for a suitable <varname>restore_command</varname> is: <programlisting> triggered = false; while (!NextWALFileReady() && !triggered) @@ -1544,7 +1544,7 @@ if (!triggered) </para> <para> - A working example of a waiting <varname>restore_command</> is provided + A working example of a waiting <varname>restore_command</varname> is provided in the <xref linkend="pgstandby"> module. It should be used as a reference on how to correctly implement the logic described above. It can also be extended as needed to support specific @@ -1553,14 +1553,14 @@ if (!triggered) <para> The method for triggering failover is an important part of planning - and design. One potential option is the <varname>restore_command</> + and design. One potential option is the <varname>restore_command</varname> command. It is executed once for each WAL file, but the process - running the <varname>restore_command</> is created and dies for + running the <varname>restore_command</varname> is created and dies for each file, so there is no daemon or server process, and signals or a signal handler cannot be used. Therefore, the - <varname>restore_command</> is not suitable to trigger failover. + <varname>restore_command</varname> is not suitable to trigger failover. It is possible to use a simple timeout facility, especially if - used in conjunction with a known <varname>archive_timeout</> + used in conjunction with a known <varname>archive_timeout</varname> setting on the primary. However, this is somewhat error prone since a network problem or busy primary server might be sufficient to initiate failover. A notification mechanism such as the explicit @@ -1579,7 +1579,7 @@ if (!triggered) <para> Set up primary and standby systems as nearly identical as possible, including two identical copies of - <productname>PostgreSQL</> at the same release level. + <productname>PostgreSQL</productname> at the same release level. </para> </listitem> <listitem> @@ -1602,8 +1602,8 @@ if (!triggered) <listitem> <para> Begin recovery on the standby server from the local WAL - archive, using a <filename>recovery.conf</> that specifies a - <varname>restore_command</> that waits as described + archive, using a <filename>recovery.conf</filename> that specifies a + <varname>restore_command</varname> that waits as described previously (see <xref linkend="backup-pitr-recovery">). </para> </listitem> @@ -1637,7 +1637,7 @@ if (!triggered) </para> <para> - An external program can call the <function>pg_walfile_name_offset()</> + An external program can call the <function>pg_walfile_name_offset()</function> function (see <xref linkend="functions-admin">) to find out the file name and the exact byte offset within it of the current end of WAL. It can then access the WAL file directly @@ -1646,17 +1646,17 @@ if (!triggered) loss is the polling cycle time of the copying program, which can be very small, and there is no wasted bandwidth from forcing partially-used segment files to be archived. Note that the standby servers' - <varname>restore_command</> scripts can only deal with whole WAL files, + <varname>restore_command</varname> scripts can only deal with whole WAL files, so the incrementally copied data is not ordinarily made available to the standby servers. It is of use only when the primary dies — then the last partial WAL file is fed to the standby before allowing it to come up. The correct implementation of this process requires - cooperation of the <varname>restore_command</> script with the data + cooperation of the <varname>restore_command</varname> script with the data copying program. </para> <para> - Starting with <productname>PostgreSQL</> version 9.0, you can use + Starting with <productname>PostgreSQL</productname> version 9.0, you can use streaming replication (see <xref linkend="streaming-replication">) to achieve the same benefits with less effort. </para> @@ -1716,17 +1716,17 @@ if (!triggered) <itemizedlist> <listitem> <para> - Query access - <command>SELECT</>, <command>COPY TO</> + Query access - <command>SELECT</command>, <command>COPY TO</command> </para> </listitem> <listitem> <para> - Cursor commands - <command>DECLARE</>, <command>FETCH</>, <command>CLOSE</> + Cursor commands - <command>DECLARE</command>, <command>FETCH</command>, <command>CLOSE</command> </para> </listitem> <listitem> <para> - Parameters - <command>SHOW</>, <command>SET</>, <command>RESET</> + Parameters - <command>SHOW</command>, <command>SET</command>, <command>RESET</command> </para> </listitem> <listitem> @@ -1735,17 +1735,17 @@ if (!triggered) <itemizedlist> <listitem> <para> - <command>BEGIN</>, <command>END</>, <command>ABORT</>, <command>START TRANSACTION</> + <command>BEGIN</command>, <command>END</command>, <command>ABORT</command>, <command>START TRANSACTION</command> </para> </listitem> <listitem> <para> - <command>SAVEPOINT</>, <command>RELEASE</>, <command>ROLLBACK TO SAVEPOINT</> + <command>SAVEPOINT</command>, <command>RELEASE</command>, <command>ROLLBACK TO SAVEPOINT</command> </para> </listitem> <listitem> <para> - <command>EXCEPTION</> blocks and other internal subtransactions + <command>EXCEPTION</command> blocks and other internal subtransactions </para> </listitem> </itemizedlist> @@ -1753,19 +1753,19 @@ if (!triggered) </listitem> <listitem> <para> - <command>LOCK TABLE</>, though only when explicitly in one of these modes: - <literal>ACCESS SHARE</>, <literal>ROW SHARE</> or <literal>ROW EXCLUSIVE</>. + <command>LOCK TABLE</command>, though only when explicitly in one of these modes: + <literal>ACCESS SHARE</literal>, <literal>ROW SHARE</literal> or <literal>ROW EXCLUSIVE</literal>. </para> </listitem> <listitem> <para> - Plans and resources - <command>PREPARE</>, <command>EXECUTE</>, - <command>DEALLOCATE</>, <command>DISCARD</> + Plans and resources - <command>PREPARE</command>, <command>EXECUTE</command>, + <command>DEALLOCATE</command>, <command>DISCARD</command> </para> </listitem> <listitem> <para> - Plugins and extensions - <command>LOAD</> + Plugins and extensions - <command>LOAD</command> </para> </listitem> </itemizedlist> @@ -1779,9 +1779,9 @@ if (!triggered) <itemizedlist> <listitem> <para> - Data Manipulation Language (DML) - <command>INSERT</>, - <command>UPDATE</>, <command>DELETE</>, <command>COPY FROM</>, - <command>TRUNCATE</>. + Data Manipulation Language (DML) - <command>INSERT</command>, + <command>UPDATE</command>, <command>DELETE</command>, <command>COPY FROM</command>, + <command>TRUNCATE</command>. Note that there are no allowed actions that result in a trigger being executed during recovery. This restriction applies even to temporary tables, because table rows cannot be read or written without @@ -1791,31 +1791,31 @@ if (!triggered) </listitem> <listitem> <para> - Data Definition Language (DDL) - <command>CREATE</>, - <command>DROP</>, <command>ALTER</>, <command>COMMENT</>. + Data Definition Language (DDL) - <command>CREATE</command>, + <command>DROP</command>, <command>ALTER</command>, <command>COMMENT</command>. This restriction applies even to temporary tables, because carrying out these operations would require updating the system catalog tables. </para> </listitem> <listitem> <para> - <command>SELECT ... FOR SHARE | UPDATE</>, because row locks cannot be + <command>SELECT ... FOR SHARE | UPDATE</command>, because row locks cannot be taken without updating the underlying data files. </para> </listitem> <listitem> <para> - Rules on <command>SELECT</> statements that generate DML commands. + Rules on <command>SELECT</command> statements that generate DML commands. </para> </listitem> <listitem> <para> - <command>LOCK</> that explicitly requests a mode higher than <literal>ROW EXCLUSIVE MODE</>. + <command>LOCK</command> that explicitly requests a mode higher than <literal>ROW EXCLUSIVE MODE</literal>. </para> </listitem> <listitem> <para> - <command>LOCK</> in short default form, since it requests <literal>ACCESS EXCLUSIVE MODE</>. + <command>LOCK</command> in short default form, since it requests <literal>ACCESS EXCLUSIVE MODE</literal>. </para> </listitem> <listitem> @@ -1824,19 +1824,19 @@ if (!triggered) <itemizedlist> <listitem> <para> - <command>BEGIN READ WRITE</>, - <command>START TRANSACTION READ WRITE</> + <command>BEGIN READ WRITE</command>, + <command>START TRANSACTION READ WRITE</command> </para> </listitem> <listitem> <para> - <command>SET TRANSACTION READ WRITE</>, - <command>SET SESSION CHARACTERISTICS AS TRANSACTION READ WRITE</> + <command>SET TRANSACTION READ WRITE</command>, + <command>SET SESSION CHARACTERISTICS AS TRANSACTION READ WRITE</command> </para> </listitem> <listitem> <para> - <command>SET transaction_read_only = off</> + <command>SET transaction_read_only = off</command> </para> </listitem> </itemizedlist> @@ -1844,35 +1844,35 @@ if (!triggered) </listitem> <listitem> <para> - Two-phase commit commands - <command>PREPARE TRANSACTION</>, - <command>COMMIT PREPARED</>, <command>ROLLBACK PREPARED</> + Two-phase commit commands - <command>PREPARE TRANSACTION</command>, + <command>COMMIT PREPARED</command>, <command>ROLLBACK PREPARED</command> because even read-only transactions need to write WAL in the prepare phase (the first phase of two phase commit). </para> </listitem> <listitem> <para> - Sequence updates - <function>nextval()</>, <function>setval()</> + Sequence updates - <function>nextval()</function>, <function>setval()</function> </para> </listitem> <listitem> <para> - <command>LISTEN</>, <command>UNLISTEN</>, <command>NOTIFY</> + <command>LISTEN</command>, <command>UNLISTEN</command>, <command>NOTIFY</command> </para> </listitem> </itemizedlist> </para> <para> - In normal operation, <quote>read-only</> transactions are allowed to - use <command>LISTEN</>, <command>UNLISTEN</>, and - <command>NOTIFY</>, so Hot Standby sessions operate under slightly tighter + In normal operation, <quote>read-only</quote> transactions are allowed to + use <command>LISTEN</command>, <command>UNLISTEN</command>, and + <command>NOTIFY</command>, so Hot Standby sessions operate under slightly tighter restrictions than ordinary read-only sessions. It is possible that some of these restrictions might be loosened in a future release. </para> <para> - During hot standby, the parameter <varname>transaction_read_only</> is always + During hot standby, the parameter <varname>transaction_read_only</varname> is always true and may not be changed. But as long as no attempt is made to modify the database, connections during hot standby will act much like any other database connection. If failover or switchover occurs, the database will @@ -1884,7 +1884,7 @@ if (!triggered) <para> Users will be able to tell whether their session is read-only by - issuing <command>SHOW transaction_read_only</>. In addition, a set of + issuing <command>SHOW transaction_read_only</command>. In addition, a set of functions (<xref linkend="functions-recovery-info-table">) allow users to access information about the standby server. These allow you to write programs that are aware of the current state of the database. These @@ -1907,7 +1907,7 @@ if (!triggered) <para> There are also additional types of conflict that can occur with Hot Standby. - These conflicts are <emphasis>hard conflicts</> in the sense that queries + These conflicts are <emphasis>hard conflicts</emphasis> in the sense that queries might need to be canceled and, in some cases, sessions disconnected to resolve them. The user is provided with several ways to handle these conflicts. Conflict cases include: @@ -1916,7 +1916,7 @@ if (!triggered) <listitem> <para> Access Exclusive locks taken on the primary server, including both - explicit <command>LOCK</> commands and various <acronym>DDL</> + explicit <command>LOCK</command> commands and various <acronym>DDL</acronym> actions, conflict with table accesses in standby queries. </para> </listitem> @@ -1935,7 +1935,7 @@ if (!triggered) <listitem> <para> Application of a vacuum cleanup record from WAL conflicts with - standby transactions whose snapshots can still <quote>see</> any of + standby transactions whose snapshots can still <quote>see</quote> any of the rows to be removed. </para> </listitem> @@ -1962,18 +1962,18 @@ if (!triggered) <para> An example of the problem situation is an administrator on the primary - server running <command>DROP TABLE</> on a table that is currently being + server running <command>DROP TABLE</command> on a table that is currently being queried on the standby server. Clearly the standby query cannot continue - if the <command>DROP TABLE</> is applied on the standby. If this situation - occurred on the primary, the <command>DROP TABLE</> would wait until the - other query had finished. But when <command>DROP TABLE</> is run on the + if the <command>DROP TABLE</command> is applied on the standby. If this situation + occurred on the primary, the <command>DROP TABLE</command> would wait until the + other query had finished. But when <command>DROP TABLE</command> is run on the primary, the primary doesn't have information about what queries are running on the standby, so it will not wait for any such standby queries. The WAL change records come through to the standby while the standby query is still running, causing a conflict. The standby server must either delay application of the WAL records (and everything after them, too) or else cancel the conflicting query so that the <command>DROP - TABLE</> can be applied. + TABLE</command> can be applied. </para> <para> @@ -1986,7 +1986,7 @@ if (!triggered) once it has taken longer than the relevant delay setting to apply any newly-received WAL data. There are two parameters so that different delay values can be specified for the case of reading WAL data from an archive - (i.e., initial recovery from a base backup or <quote>catching up</> a + (i.e., initial recovery from a base backup or <quote>catching up</quote> a standby server that has fallen far behind) versus reading WAL data via streaming replication. </para> @@ -2003,10 +2003,10 @@ if (!triggered) </para> <para> - Once the delay specified by <varname>max_standby_archive_delay</> or - <varname>max_standby_streaming_delay</> has been exceeded, conflicting + Once the delay specified by <varname>max_standby_archive_delay</varname> or + <varname>max_standby_streaming_delay</varname> has been exceeded, conflicting queries will be canceled. This usually results just in a cancellation - error, although in the case of replaying a <command>DROP DATABASE</> + error, although in the case of replaying a <command>DROP DATABASE</command> the entire conflicting session will be terminated. Also, if the conflict is over a lock held by an idle transaction, the conflicting session is terminated (this behavior might change in the future). @@ -2030,7 +2030,7 @@ if (!triggered) <para> The most common reason for conflict between standby queries and WAL replay - is <quote>early cleanup</>. Normally, <productname>PostgreSQL</> allows + is <quote>early cleanup</quote>. Normally, <productname>PostgreSQL</productname> allows cleanup of old row versions when there are no transactions that need to see them to ensure correct visibility of data according to MVCC rules. However, this rule can only be applied for transactions executing on the @@ -2041,7 +2041,7 @@ if (!triggered) <para> Experienced users should note that both row version cleanup and row version freezing will potentially conflict with standby queries. Running a manual - <command>VACUUM FREEZE</> is likely to cause conflicts even on tables with + <command>VACUUM FREEZE</command> is likely to cause conflicts even on tables with no updated or deleted rows. </para> @@ -2049,15 +2049,15 @@ if (!triggered) Users should be clear that tables that are regularly and heavily updated on the primary server will quickly cause cancellation of longer running queries on the standby. In such cases the setting of a finite value for - <varname>max_standby_archive_delay</> or - <varname>max_standby_streaming_delay</> can be considered similar to - setting <varname>statement_timeout</>. + <varname>max_standby_archive_delay</varname> or + <varname>max_standby_streaming_delay</varname> can be considered similar to + setting <varname>statement_timeout</varname>. </para> <para> Remedial possibilities exist if the number of standby-query cancellations is found to be unacceptable. The first option is to set the parameter - <varname>hot_standby_feedback</>, which prevents <command>VACUUM</> from + <varname>hot_standby_feedback</varname>, which prevents <command>VACUUM</command> from removing recently-dead rows and so cleanup conflicts do not occur. If you do this, you should note that this will delay cleanup of dead rows on the primary, @@ -2067,11 +2067,11 @@ if (!triggered) off-loading execution onto the standby. If standby servers connect and disconnect frequently, you might want to make adjustments to handle the period when - <varname>hot_standby_feedback</> feedback is not being provided. - For example, consider increasing <varname>max_standby_archive_delay</> + <varname>hot_standby_feedback</varname> feedback is not being provided. + For example, consider increasing <varname>max_standby_archive_delay</varname> so that queries are not rapidly canceled by conflicts in WAL archive files during disconnected periods. You should also consider increasing - <varname>max_standby_streaming_delay</> to avoid rapid cancellations + <varname>max_standby_streaming_delay</varname> to avoid rapid cancellations by newly-arrived streaming WAL entries after reconnection. </para> @@ -2080,16 +2080,16 @@ if (!triggered) on the primary server, so that dead rows will not be cleaned up as quickly as they normally would be. This will allow more time for queries to execute before they are canceled on the standby, without having to set - a high <varname>max_standby_streaming_delay</>. However it is + a high <varname>max_standby_streaming_delay</varname>. However it is difficult to guarantee any specific execution-time window with this - approach, since <varname>vacuum_defer_cleanup_age</> is measured in + approach, since <varname>vacuum_defer_cleanup_age</varname> is measured in transactions executed on the primary server. </para> <para> The number of query cancels and the reason for them can be viewed using - the <structname>pg_stat_database_conflicts</> system view on the standby - server. The <structname>pg_stat_database</> system view also contains + the <structname>pg_stat_database_conflicts</structname> system view on the standby + server. The <structname>pg_stat_database</structname> system view also contains summary information. </para> </sect2> @@ -2098,8 +2098,8 @@ if (!triggered) <title>Administrator's Overview</title> <para> - If <varname>hot_standby</> is <literal>on</> in <filename>postgresql.conf</> - (the default value) and there is a <filename>recovery.conf</> + If <varname>hot_standby</varname> is <literal>on</literal> in <filename>postgresql.conf</filename> + (the default value) and there is a <filename>recovery.conf</filename> file present, the server will run in Hot Standby mode. However, it may take some time for Hot Standby connections to be allowed, because the server will not accept connections until it has completed @@ -2120,8 +2120,8 @@ LOG: database system is ready to accept read only connections Consistency information is recorded once per checkpoint on the primary. It is not possible to enable hot standby when reading WAL - written during a period when <varname>wal_level</> was not set to - <literal>replica</> or <literal>logical</> on the primary. Reaching + written during a period when <varname>wal_level</varname> was not set to + <literal>replica</literal> or <literal>logical</literal> on the primary. Reaching a consistent state can also be delayed in the presence of both of these conditions: @@ -2140,7 +2140,7 @@ LOG: database system is ready to accept read only connections If you are running file-based log shipping ("warm standby"), you might need to wait until the next WAL file arrives, which could be as long as the - <varname>archive_timeout</> setting on the primary. + <varname>archive_timeout</varname> setting on the primary. </para> <para> @@ -2155,22 +2155,22 @@ LOG: database system is ready to accept read only connections <itemizedlist> <listitem> <para> - <varname>max_connections</> + <varname>max_connections</varname> </para> </listitem> <listitem> <para> - <varname>max_prepared_transactions</> + <varname>max_prepared_transactions</varname> </para> </listitem> <listitem> <para> - <varname>max_locks_per_transaction</> + <varname>max_locks_per_transaction</varname> </para> </listitem> <listitem> <para> - <varname>max_worker_processes</> + <varname>max_worker_processes</varname> </para> </listitem> </itemizedlist> @@ -2209,19 +2209,19 @@ LOG: database system is ready to accept read only connections <itemizedlist> <listitem> <para> - Data Definition Language (DDL) - e.g. <command>CREATE INDEX</> + Data Definition Language (DDL) - e.g. <command>CREATE INDEX</command> </para> </listitem> <listitem> <para> - Privilege and Ownership - <command>GRANT</>, <command>REVOKE</>, - <command>REASSIGN</> + Privilege and Ownership - <command>GRANT</command>, <command>REVOKE</command>, + <command>REASSIGN</command> </para> </listitem> <listitem> <para> - Maintenance commands - <command>ANALYZE</>, <command>VACUUM</>, - <command>CLUSTER</>, <command>REINDEX</> + Maintenance commands - <command>ANALYZE</command>, <command>VACUUM</command>, + <command>CLUSTER</command>, <command>REINDEX</command> </para> </listitem> </itemizedlist> @@ -2241,14 +2241,14 @@ LOG: database system is ready to accept read only connections </para> <para> - <function>pg_cancel_backend()</> - and <function>pg_terminate_backend()</> will work on user backends, + <function>pg_cancel_backend()</function> + and <function>pg_terminate_backend()</function> will work on user backends, but not the Startup process, which performs recovery. <structname>pg_stat_activity</structname> does not show recovering transactions as active. As a result, <structname>pg_prepared_xacts</structname> is always empty during recovery. If you wish to resolve in-doubt prepared transactions, view - <literal>pg_prepared_xacts</> on the primary and issue commands to + <literal>pg_prepared_xacts</literal> on the primary and issue commands to resolve transactions there or resolve them after the end of recovery. </para> @@ -2256,17 +2256,17 @@ LOG: database system is ready to accept read only connections <structname>pg_locks</structname> will show locks held by backends, as normal. <structname>pg_locks</structname> also shows a virtual transaction managed by the Startup process that owns all - <literal>AccessExclusiveLocks</> held by transactions being replayed by recovery. + <literal>AccessExclusiveLocks</literal> held by transactions being replayed by recovery. Note that the Startup process does not acquire locks to - make database changes, and thus locks other than <literal>AccessExclusiveLocks</> + make database changes, and thus locks other than <literal>AccessExclusiveLocks</literal> do not show in <structname>pg_locks</structname> for the Startup process; they are just presumed to exist. </para> <para> - The <productname>Nagios</> plugin <productname>check_pgsql</> will + The <productname>Nagios</productname> plugin <productname>check_pgsql</productname> will work, because the simple information it checks for exists. - The <productname>check_postgres</> monitoring script will also work, + The <productname>check_postgres</productname> monitoring script will also work, though some reported values could give different or confusing results. For example, last vacuum time will not be maintained, since no vacuum occurs on the standby. Vacuums running on the primary @@ -2275,11 +2275,11 @@ LOG: database system is ready to accept read only connections <para> WAL file control commands will not work during recovery, - e.g. <function>pg_start_backup</>, <function>pg_switch_wal</> etc. + e.g. <function>pg_start_backup</function>, <function>pg_switch_wal</function> etc. </para> <para> - Dynamically loadable modules work, including <structname>pg_stat_statements</>. + Dynamically loadable modules work, including <structname>pg_stat_statements</structname>. </para> <para> @@ -2292,8 +2292,8 @@ LOG: database system is ready to accept read only connections </para> <para> - Trigger-based replication systems such as <productname>Slony</>, - <productname>Londiste</> and <productname>Bucardo</> won't run on the + Trigger-based replication systems such as <productname>Slony</productname>, + <productname>Londiste</productname> and <productname>Bucardo</productname> won't run on the standby at all, though they will run happily on the primary server as long as the changes are not sent to standby servers to be applied. WAL replay is not trigger-based so you cannot relay from the @@ -2302,7 +2302,7 @@ LOG: database system is ready to accept read only connections </para> <para> - New OIDs cannot be assigned, though some <acronym>UUID</> generators may still + New OIDs cannot be assigned, though some <acronym>UUID</acronym> generators may still work as long as they do not rely on writing new status to the database. </para> @@ -2314,32 +2314,32 @@ LOG: database system is ready to accept read only connections </para> <para> - <command>DROP TABLESPACE</> can only succeed if the tablespace is empty. + <command>DROP TABLESPACE</command> can only succeed if the tablespace is empty. Some standby users may be actively using the tablespace via their - <varname>temp_tablespaces</> parameter. If there are temporary files in the + <varname>temp_tablespaces</varname> parameter. If there are temporary files in the tablespace, all active queries are canceled to ensure that temporary files are removed, so the tablespace can be removed and WAL replay can continue. </para> <para> - Running <command>DROP DATABASE</> or <command>ALTER DATABASE ... SET - TABLESPACE</> on the primary + Running <command>DROP DATABASE</command> or <command>ALTER DATABASE ... SET + TABLESPACE</command> on the primary will generate a WAL entry that will cause all users connected to that database on the standby to be forcibly disconnected. This action occurs immediately, whatever the setting of - <varname>max_standby_streaming_delay</>. Note that - <command>ALTER DATABASE ... RENAME</> does not disconnect users, which + <varname>max_standby_streaming_delay</varname>. Note that + <command>ALTER DATABASE ... RENAME</command> does not disconnect users, which in most cases will go unnoticed, though might in some cases cause a program confusion if it depends in some way upon database name. </para> <para> - In normal (non-recovery) mode, if you issue <command>DROP USER</> or <command>DROP ROLE</> + In normal (non-recovery) mode, if you issue <command>DROP USER</command> or <command>DROP ROLE</command> for a role with login capability while that user is still connected then nothing happens to the connected user - they remain connected. The user cannot reconnect however. This behavior applies in recovery also, so a - <command>DROP USER</> on the primary does not disconnect that user on the standby. + <command>DROP USER</command> on the primary does not disconnect that user on the standby. </para> <para> @@ -2361,7 +2361,7 @@ LOG: database system is ready to accept read only connections restartpoints (similar to checkpoints on the primary) and normal block cleaning activities. This can include updates of the hint bit information stored on the standby server. - The <command>CHECKPOINT</> command is accepted during recovery, + The <command>CHECKPOINT</command> command is accepted during recovery, though it performs a restartpoint rather than a new checkpoint. </para> </sect2> @@ -2427,15 +2427,15 @@ LOG: database system is ready to accept read only connections </listitem> <listitem> <para> - At the end of recovery, <literal>AccessExclusiveLocks</> held by prepared transactions + At the end of recovery, <literal>AccessExclusiveLocks</literal> held by prepared transactions will require twice the normal number of lock table entries. If you plan on running either a large number of concurrent prepared transactions - that normally take <literal>AccessExclusiveLocks</>, or you plan on having one - large transaction that takes many <literal>AccessExclusiveLocks</>, you are - advised to select a larger value of <varname>max_locks_per_transaction</>, + that normally take <literal>AccessExclusiveLocks</literal>, or you plan on having one + large transaction that takes many <literal>AccessExclusiveLocks</literal>, you are + advised to select a larger value of <varname>max_locks_per_transaction</varname>, perhaps as much as twice the value of the parameter on the primary server. You need not consider this at all if - your setting of <varname>max_prepared_transactions</> is 0. + your setting of <varname>max_prepared_transactions</varname> is 0. </para> </listitem> <listitem> diff --git a/doc/src/sgml/history.sgml b/doc/src/sgml/history.sgml index a7f4b701ead..d1535469f98 100644 --- a/doc/src/sgml/history.sgml +++ b/doc/src/sgml/history.sgml @@ -132,7 +132,7 @@ (<application>psql</application>) was provided for interactive SQL queries, which used <acronym>GNU</acronym> <application>Readline</application>. This largely superseded - the old <application>monitor</> program. + the old <application>monitor</application> program. </para> </listitem> @@ -215,7 +215,7 @@ </para> <para> - Details about what has happened in <productname>PostgreSQL</> since + Details about what has happened in <productname>PostgreSQL</productname> since then can be found in <xref linkend="release">. </para> </sect2> diff --git a/doc/src/sgml/hstore.sgml b/doc/src/sgml/hstore.sgml index db5d4409a6e..0264e4e532e 100644 --- a/doc/src/sgml/hstore.sgml +++ b/doc/src/sgml/hstore.sgml @@ -8,21 +8,21 @@ </indexterm> <para> - This module implements the <type>hstore</> data type for storing sets of - key/value pairs within a single <productname>PostgreSQL</> value. + This module implements the <type>hstore</type> data type for storing sets of + key/value pairs within a single <productname>PostgreSQL</productname> value. This can be useful in various scenarios, such as rows with many attributes that are rarely examined, or semi-structured data. Keys and values are simply text strings. </para> <sect2> - <title><type>hstore</> External Representation</title> + <title><type>hstore</type> External Representation</title> <para> - The text representation of an <type>hstore</>, used for input and output, - includes zero or more <replaceable>key</> <literal>=></> - <replaceable>value</> pairs separated by commas. Some examples: + The text representation of an <type>hstore</type>, used for input and output, + includes zero or more <replaceable>key</replaceable> <literal>=></literal> + <replaceable>value</replaceable> pairs separated by commas. Some examples: <synopsis> k => v @@ -31,15 +31,15 @@ foo => bar, baz => whatever </synopsis> The order of the pairs is not significant (and may not be reproduced on - output). Whitespace between pairs or around the <literal>=></> sign is + output). Whitespace between pairs or around the <literal>=></literal> sign is ignored. Double-quote keys and values that include whitespace, commas, - <literal>=</>s or <literal>></>s. To include a double quote or a + <literal>=</literal>s or <literal>></literal>s. To include a double quote or a backslash in a key or value, escape it with a backslash. </para> <para> - Each key in an <type>hstore</> is unique. If you declare an <type>hstore</> - with duplicate keys, only one will be stored in the <type>hstore</> and + Each key in an <type>hstore</type> is unique. If you declare an <type>hstore</type> + with duplicate keys, only one will be stored in the <type>hstore</type> and there is no guarantee as to which will be kept: <programlisting> @@ -51,24 +51,24 @@ SELECT 'a=>1,a=>2'::hstore; </para> <para> - A value (but not a key) can be an SQL <literal>NULL</>. For example: + A value (but not a key) can be an SQL <literal>NULL</literal>. For example: <programlisting> key => NULL </programlisting> - The <literal>NULL</> keyword is case-insensitive. Double-quote the - <literal>NULL</> to treat it as the ordinary string <quote>NULL</quote>. + The <literal>NULL</literal> keyword is case-insensitive. Double-quote the + <literal>NULL</literal> to treat it as the ordinary string <quote>NULL</quote>. </para> <note> <para> - Keep in mind that the <type>hstore</> text format, when used for input, - applies <emphasis>before</> any required quoting or escaping. If you are - passing an <type>hstore</> literal via a parameter, then no additional + Keep in mind that the <type>hstore</type> text format, when used for input, + applies <emphasis>before</emphasis> any required quoting or escaping. If you are + passing an <type>hstore</type> literal via a parameter, then no additional processing is needed. But if you're passing it as a quoted literal constant, then any single-quote characters and (depending on the setting of - the <varname>standard_conforming_strings</> configuration parameter) + the <varname>standard_conforming_strings</varname> configuration parameter) backslash characters need to be escaped correctly. See <xref linkend="sql-syntax-strings"> for more on the handling of string constants. @@ -83,7 +83,7 @@ key => NULL </sect2> <sect2> - <title><type>hstore</> Operators and Functions</title> + <title><type>hstore</type> Operators and Functions</title> <para> The operators provided by the <literal>hstore</literal> module are @@ -92,7 +92,7 @@ key => NULL </para> <table id="hstore-op-table"> - <title><type>hstore</> Operators</title> + <title><type>hstore</type> Operators</title> <tgroup cols="4"> <thead> @@ -106,99 +106,99 @@ key => NULL <tbody> <row> - <entry><type>hstore</> <literal>-></> <type>text</></entry> - <entry>get value for key (<literal>NULL</> if not present)</entry> + <entry><type>hstore</type> <literal>-></literal> <type>text</type></entry> + <entry>get value for key (<literal>NULL</literal> if not present)</entry> <entry><literal>'a=>x, b=>y'::hstore -> 'a'</literal></entry> <entry><literal>x</literal></entry> </row> <row> - <entry><type>hstore</> <literal>-></> <type>text[]</></entry> - <entry>get values for keys (<literal>NULL</> if not present)</entry> + <entry><type>hstore</type> <literal>-></literal> <type>text[]</type></entry> + <entry>get values for keys (<literal>NULL</literal> if not present)</entry> <entry><literal>'a=>x, b=>y, c=>z'::hstore -> ARRAY['c','a']</literal></entry> <entry><literal>{"z","x"}</literal></entry> </row> <row> - <entry><type>hstore</> <literal>||</> <type>hstore</></entry> - <entry>concatenate <type>hstore</>s</entry> + <entry><type>hstore</type> <literal>||</literal> <type>hstore</type></entry> + <entry>concatenate <type>hstore</type>s</entry> <entry><literal>'a=>b, c=>d'::hstore || 'c=>x, d=>q'::hstore</literal></entry> <entry><literal>"a"=>"b", "c"=>"x", "d"=>"q"</literal></entry> </row> <row> - <entry><type>hstore</> <literal>?</> <type>text</></entry> - <entry>does <type>hstore</> contain key?</entry> + <entry><type>hstore</type> <literal>?</literal> <type>text</type></entry> + <entry>does <type>hstore</type> contain key?</entry> <entry><literal>'a=>1'::hstore ? 'a'</literal></entry> <entry><literal>t</literal></entry> </row> <row> - <entry><type>hstore</> <literal>?&</> <type>text[]</></entry> - <entry>does <type>hstore</> contain all specified keys?</entry> + <entry><type>hstore</type> <literal>?&</literal> <type>text[]</type></entry> + <entry>does <type>hstore</type> contain all specified keys?</entry> <entry><literal>'a=>1,b=>2'::hstore ?& ARRAY['a','b']</literal></entry> <entry><literal>t</literal></entry> </row> <row> - <entry><type>hstore</> <literal>?|</> <type>text[]</></entry> - <entry>does <type>hstore</> contain any of the specified keys?</entry> + <entry><type>hstore</type> <literal>?|</literal> <type>text[]</type></entry> + <entry>does <type>hstore</type> contain any of the specified keys?</entry> <entry><literal>'a=>1,b=>2'::hstore ?| ARRAY['b','c']</literal></entry> <entry><literal>t</literal></entry> </row> <row> - <entry><type>hstore</> <literal>@></> <type>hstore</></entry> + <entry><type>hstore</type> <literal>@></literal> <type>hstore</type></entry> <entry>does left operand contain right?</entry> <entry><literal>'a=>b, b=>1, c=>NULL'::hstore @> 'b=>1'</literal></entry> <entry><literal>t</literal></entry> </row> <row> - <entry><type>hstore</> <literal><@</> <type>hstore</></entry> + <entry><type>hstore</type> <literal><@</literal> <type>hstore</type></entry> <entry>is left operand contained in right?</entry> <entry><literal>'a=>c'::hstore <@ 'a=>b, b=>1, c=>NULL'</literal></entry> <entry><literal>f</literal></entry> </row> <row> - <entry><type>hstore</> <literal>-</> <type>text</></entry> + <entry><type>hstore</type> <literal>-</literal> <type>text</type></entry> <entry>delete key from left operand</entry> <entry><literal>'a=>1, b=>2, c=>3'::hstore - 'b'::text</literal></entry> <entry><literal>"a"=>"1", "c"=>"3"</literal></entry> </row> <row> - <entry><type>hstore</> <literal>-</> <type>text[]</></entry> + <entry><type>hstore</type> <literal>-</literal> <type>text[]</type></entry> <entry>delete keys from left operand</entry> <entry><literal>'a=>1, b=>2, c=>3'::hstore - ARRAY['a','b']</literal></entry> <entry><literal>"c"=>"3"</literal></entry> </row> <row> - <entry><type>hstore</> <literal>-</> <type>hstore</></entry> + <entry><type>hstore</type> <literal>-</literal> <type>hstore</type></entry> <entry>delete matching pairs from left operand</entry> <entry><literal>'a=>1, b=>2, c=>3'::hstore - 'a=>4, b=>2'::hstore</literal></entry> <entry><literal>"a"=>"1", "c"=>"3"</literal></entry> </row> <row> - <entry><type>record</> <literal>#=</> <type>hstore</></entry> - <entry>replace fields in <type>record</> with matching values from <type>hstore</></entry> + <entry><type>record</type> <literal>#=</literal> <type>hstore</type></entry> + <entry>replace fields in <type>record</type> with matching values from <type>hstore</type></entry> <entry>see Examples section</entry> <entry></entry> </row> <row> - <entry><literal>%%</> <type>hstore</></entry> - <entry>convert <type>hstore</> to array of alternating keys and values</entry> + <entry><literal>%%</literal> <type>hstore</type></entry> + <entry>convert <type>hstore</type> to array of alternating keys and values</entry> <entry><literal>%% 'a=>foo, b=>bar'::hstore</literal></entry> <entry><literal>{a,foo,b,bar}</literal></entry> </row> <row> - <entry><literal>%#</> <type>hstore</></entry> - <entry>convert <type>hstore</> to two-dimensional key/value array</entry> + <entry><literal>%#</literal> <type>hstore</type></entry> + <entry>convert <type>hstore</type> to two-dimensional key/value array</entry> <entry><literal>%# 'a=>foo, b=>bar'::hstore</literal></entry> <entry><literal>{{a,foo},{b,bar}}</literal></entry> </row> @@ -209,8 +209,8 @@ key => NULL <note> <para> - Prior to PostgreSQL 8.2, the containment operators <literal>@></> - and <literal><@</> were called <literal>@</> and <literal>~</>, + Prior to PostgreSQL 8.2, the containment operators <literal>@></literal> + and <literal><@</literal> were called <literal>@</literal> and <literal>~</literal>, respectively. These names are still available, but are deprecated and will eventually be removed. Notice that the old names are reversed from the convention formerly followed by the core geometric data types! @@ -218,7 +218,7 @@ key => NULL </note> <table id="hstore-func-table"> - <title><type>hstore</> Functions</title> + <title><type>hstore</type> Functions</title> <tgroup cols="5"> <thead> @@ -235,7 +235,7 @@ key => NULL <row> <entry><function>hstore(record)</function><indexterm><primary>hstore</primary></indexterm></entry> <entry><type>hstore</type></entry> - <entry>construct an <type>hstore</> from a record or row</entry> + <entry>construct an <type>hstore</type> from a record or row</entry> <entry><literal>hstore(ROW(1,2))</literal></entry> <entry><literal>f1=>1,f2=>2</literal></entry> </row> @@ -243,7 +243,7 @@ key => NULL <row> <entry><function>hstore(text[])</function></entry> <entry><type>hstore</type></entry> - <entry>construct an <type>hstore</> from an array, which may be either + <entry>construct an <type>hstore</type> from an array, which may be either a key/value array, or a two-dimensional array</entry> <entry><literal>hstore(ARRAY['a','1','b','2']) || hstore(ARRAY[['c','3'],['d','4']])</literal></entry> <entry><literal>a=>1, b=>2, c=>3, d=>4</literal></entry> @@ -252,7 +252,7 @@ key => NULL <row> <entry><function>hstore(text[], text[])</function></entry> <entry><type>hstore</type></entry> - <entry>construct an <type>hstore</> from separate key and value arrays</entry> + <entry>construct an <type>hstore</type> from separate key and value arrays</entry> <entry><literal>hstore(ARRAY['a','b'], ARRAY['1','2'])</literal></entry> <entry><literal>"a"=>"1","b"=>"2"</literal></entry> </row> @@ -260,7 +260,7 @@ key => NULL <row> <entry><function>hstore(text, text)</function></entry> <entry><type>hstore</type></entry> - <entry>make single-item <type>hstore</></entry> + <entry>make single-item <type>hstore</type></entry> <entry><literal>hstore('a', 'b')</literal></entry> <entry><literal>"a"=>"b"</literal></entry> </row> @@ -268,7 +268,7 @@ key => NULL <row> <entry><function>akeys(hstore)</function><indexterm><primary>akeys</primary></indexterm></entry> <entry><type>text[]</type></entry> - <entry>get <type>hstore</>'s keys as an array</entry> + <entry>get <type>hstore</type>'s keys as an array</entry> <entry><literal>akeys('a=>1,b=>2')</literal></entry> <entry><literal>{a,b}</literal></entry> </row> @@ -276,7 +276,7 @@ key => NULL <row> <entry><function>skeys(hstore)</function><indexterm><primary>skeys</primary></indexterm></entry> <entry><type>setof text</type></entry> - <entry>get <type>hstore</>'s keys as a set</entry> + <entry>get <type>hstore</type>'s keys as a set</entry> <entry><literal>skeys('a=>1,b=>2')</literal></entry> <entry> <programlisting> @@ -288,7 +288,7 @@ b <row> <entry><function>avals(hstore)</function><indexterm><primary>avals</primary></indexterm></entry> <entry><type>text[]</type></entry> - <entry>get <type>hstore</>'s values as an array</entry> + <entry>get <type>hstore</type>'s values as an array</entry> <entry><literal>avals('a=>1,b=>2')</literal></entry> <entry><literal>{1,2}</literal></entry> </row> @@ -296,7 +296,7 @@ b <row> <entry><function>svals(hstore)</function><indexterm><primary>svals</primary></indexterm></entry> <entry><type>setof text</type></entry> - <entry>get <type>hstore</>'s values as a set</entry> + <entry>get <type>hstore</type>'s values as a set</entry> <entry><literal>svals('a=>1,b=>2')</literal></entry> <entry> <programlisting> @@ -308,7 +308,7 @@ b <row> <entry><function>hstore_to_array(hstore)</function><indexterm><primary>hstore_to_array</primary></indexterm></entry> <entry><type>text[]</type></entry> - <entry>get <type>hstore</>'s keys and values as an array of alternating + <entry>get <type>hstore</type>'s keys and values as an array of alternating keys and values</entry> <entry><literal>hstore_to_array('a=>1,b=>2')</literal></entry> <entry><literal>{a,1,b,2}</literal></entry> @@ -317,7 +317,7 @@ b <row> <entry><function>hstore_to_matrix(hstore)</function><indexterm><primary>hstore_to_matrix</primary></indexterm></entry> <entry><type>text[]</type></entry> - <entry>get <type>hstore</>'s keys and values as a two-dimensional array</entry> + <entry>get <type>hstore</type>'s keys and values as a two-dimensional array</entry> <entry><literal>hstore_to_matrix('a=>1,b=>2')</literal></entry> <entry><literal>{{a,1},{b,2}}</literal></entry> </row> @@ -359,7 +359,7 @@ b <row> <entry><function>slice(hstore, text[])</function><indexterm><primary>slice</primary></indexterm></entry> <entry><type>hstore</type></entry> - <entry>extract a subset of an <type>hstore</></entry> + <entry>extract a subset of an <type>hstore</type></entry> <entry><literal>slice('a=>1,b=>2,c=>3'::hstore, ARRAY['b','c','x'])</literal></entry> <entry><literal>"b"=>"2", "c"=>"3"</literal></entry> </row> @@ -367,7 +367,7 @@ b <row> <entry><function>each(hstore)</function><indexterm><primary>each</primary></indexterm></entry> <entry><type>setof(key text, value text)</type></entry> - <entry>get <type>hstore</>'s keys and values as a set</entry> + <entry>get <type>hstore</type>'s keys and values as a set</entry> <entry><literal>select * from each('a=>1,b=>2')</literal></entry> <entry> <programlisting> @@ -381,7 +381,7 @@ b <row> <entry><function>exist(hstore,text)</function><indexterm><primary>exist</primary></indexterm></entry> <entry><type>boolean</type></entry> - <entry>does <type>hstore</> contain key?</entry> + <entry>does <type>hstore</type> contain key?</entry> <entry><literal>exist('a=>1','a')</literal></entry> <entry><literal>t</literal></entry> </row> @@ -389,7 +389,7 @@ b <row> <entry><function>defined(hstore,text)</function><indexterm><primary>defined</primary></indexterm></entry> <entry><type>boolean</type></entry> - <entry>does <type>hstore</> contain non-<literal>NULL</> value for key?</entry> + <entry>does <type>hstore</type> contain non-<literal>NULL</literal> value for key?</entry> <entry><literal>defined('a=>NULL','a')</literal></entry> <entry><literal>f</literal></entry> </row> @@ -421,7 +421,7 @@ b <row> <entry><function>populate_record(record,hstore)</function><indexterm><primary>populate_record</primary></indexterm></entry> <entry><type>record</type></entry> - <entry>replace fields in <type>record</> with matching values from <type>hstore</></entry> + <entry>replace fields in <type>record</type> with matching values from <type>hstore</type></entry> <entry>see Examples section</entry> <entry></entry> </row> @@ -442,7 +442,7 @@ b <note> <para> The function <function>populate_record</function> is actually declared - with <type>anyelement</>, not <type>record</>, as its first argument, + with <type>anyelement</type>, not <type>record</type>, as its first argument, but it will reject non-record types with a run-time error. </para> </note> @@ -452,8 +452,8 @@ b <title>Indexes</title> <para> - <type>hstore</> has GiST and GIN index support for the <literal>@></>, - <literal>?</>, <literal>?&</> and <literal>?|</> operators. For example: + <type>hstore</type> has GiST and GIN index support for the <literal>@></literal>, + <literal>?</literal>, <literal>?&</literal> and <literal>?|</literal> operators. For example: </para> <programlisting> CREATE INDEX hidx ON testhstore USING GIST (h); @@ -462,12 +462,12 @@ CREATE INDEX hidx ON testhstore USING GIN (h); </programlisting> <para> - <type>hstore</> also supports <type>btree</> or <type>hash</> indexes for - the <literal>=</> operator. This allows <type>hstore</> columns to be - declared <literal>UNIQUE</>, or to be used in <literal>GROUP BY</>, - <literal>ORDER BY</> or <literal>DISTINCT</> expressions. The sort ordering - for <type>hstore</> values is not particularly useful, but these indexes - may be useful for equivalence lookups. Create indexes for <literal>=</> + <type>hstore</type> also supports <type>btree</type> or <type>hash</type> indexes for + the <literal>=</literal> operator. This allows <type>hstore</type> columns to be + declared <literal>UNIQUE</literal>, or to be used in <literal>GROUP BY</literal>, + <literal>ORDER BY</literal> or <literal>DISTINCT</literal> expressions. The sort ordering + for <type>hstore</type> values is not particularly useful, but these indexes + may be useful for equivalence lookups. Create indexes for <literal>=</literal> comparisons as follows: </para> <programlisting> @@ -495,7 +495,7 @@ UPDATE tab SET h = delete(h, 'k1'); </para> <para> - Convert a <type>record</> to an <type>hstore</>: + Convert a <type>record</type> to an <type>hstore</type>: <programlisting> CREATE TABLE test (col1 integer, col2 text, col3 text); INSERT INTO test VALUES (123, 'foo', 'bar'); @@ -509,7 +509,7 @@ SELECT hstore(t) FROM test AS t; </para> <para> - Convert an <type>hstore</> to a predefined <type>record</> type: + Convert an <type>hstore</type> to a predefined <type>record</type> type: <programlisting> CREATE TABLE test (col1 integer, col2 text, col3 text); @@ -523,7 +523,7 @@ SELECT * FROM populate_record(null::test, </para> <para> - Modify an existing record using the values from an <type>hstore</>: + Modify an existing record using the values from an <type>hstore</type>: <programlisting> CREATE TABLE test (col1 integer, col2 text, col3 text); INSERT INTO test VALUES (123, 'foo', 'bar'); @@ -541,7 +541,7 @@ SELECT (r).* FROM (SELECT t #= '"col3"=>"baz"' AS r FROM test t) s; <title>Statistics</title> <para> - The <type>hstore</> type, because of its intrinsic liberality, could + The <type>hstore</type> type, because of its intrinsic liberality, could contain a lot of different keys. Checking for valid keys is the task of the application. The following examples demonstrate several techniques for checking keys and obtaining statistics. @@ -588,7 +588,7 @@ SELECT key, count(*) FROM <title>Compatibility</title> <para> - As of PostgreSQL 9.0, <type>hstore</> uses a different internal + As of PostgreSQL 9.0, <type>hstore</type> uses a different internal representation than previous versions. This presents no obstacle for dump/restore upgrades since the text representation (used in the dump) is unchanged. @@ -599,7 +599,7 @@ SELECT key, count(*) FROM having the new code recognize old-format data. This will entail a slight performance penalty when processing data that has not yet been modified by the new code. It is possible to force an upgrade of all values in a table - column by doing an <literal>UPDATE</> statement as follows: + column by doing an <literal>UPDATE</literal> statement as follows: <programlisting> UPDATE tablename SET hstorecol = hstorecol || ''; </programlisting> @@ -610,7 +610,7 @@ UPDATE tablename SET hstorecol = hstorecol || ''; <programlisting> ALTER TABLE tablename ALTER hstorecol TYPE hstore USING hstorecol || ''; </programlisting> - The <command>ALTER TABLE</> method requires an exclusive lock on the table, + The <command>ALTER TABLE</command> method requires an exclusive lock on the table, but does not result in bloating the table with old row versions. </para> diff --git a/doc/src/sgml/indexam.sgml b/doc/src/sgml/indexam.sgml index aa3d371d2e3..b06ffcdbffe 100644 --- a/doc/src/sgml/indexam.sgml +++ b/doc/src/sgml/indexam.sgml @@ -6,17 +6,17 @@ <para> This chapter defines the interface between the core <productname>PostgreSQL</productname> system and <firstterm>index access - methods</>, which manage individual index types. The core system + methods</firstterm>, which manage individual index types. The core system knows nothing about indexes beyond what is specified here, so it is possible to develop entirely new index types by writing add-on code. </para> <para> All indexes in <productname>PostgreSQL</productname> are what are known - technically as <firstterm>secondary indexes</>; that is, the index is + technically as <firstterm>secondary indexes</firstterm>; that is, the index is physically separate from the table file that it describes. Each index - is stored as its own physical <firstterm>relation</> and so is described - by an entry in the <structname>pg_class</> catalog. The contents of an + is stored as its own physical <firstterm>relation</firstterm> and so is described + by an entry in the <structname>pg_class</structname> catalog. The contents of an index are entirely under the control of its index access method. In practice, all index access methods divide indexes into standard-size pages so that they can use the regular storage manager and buffer manager @@ -28,7 +28,7 @@ <para> An index is effectively a mapping from some data key values to - <firstterm>tuple identifiers</>, or <acronym>TIDs</>, of row versions + <firstterm>tuple identifiers</firstterm>, or <acronym>TIDs</acronym>, of row versions (tuples) in the index's parent table. A TID consists of a block number and an item number within that block (see <xref linkend="storage-page-layout">). This is sufficient @@ -50,7 +50,7 @@ Each index access method is described by a row in the <link linkend="catalog-pg-am"><structname>pg_am</structname></link> system catalog. The <structname>pg_am</structname> entry - specifies a name and a <firstterm>handler function</> for the access + specifies a name and a <firstterm>handler function</firstterm> for the access method. These entries can be created and deleted using the <xref linkend="sql-create-access-method"> and <xref linkend="sql-drop-access-method"> SQL commands. @@ -58,14 +58,14 @@ <para> An index access method handler function must be declared to accept a - single argument of type <type>internal</> and to return the - pseudo-type <type>index_am_handler</>. The argument is a dummy value that + single argument of type <type>internal</type> and to return the + pseudo-type <type>index_am_handler</type>. The argument is a dummy value that simply serves to prevent handler functions from being called directly from SQL commands. The result of the function must be a palloc'd struct of type <structname>IndexAmRoutine</structname>, which contains everything that the core code needs to know to make use of the index access method. The <structname>IndexAmRoutine</structname> struct, also called the access - method's <firstterm>API struct</>, includes fields specifying assorted + method's <firstterm>API struct</firstterm>, includes fields specifying assorted fixed properties of the access method, such as whether it can support multicolumn indexes. More importantly, it contains pointers to support functions for the access method, which do all of the real work to access @@ -144,8 +144,8 @@ typedef struct IndexAmRoutine <para> To be useful, an index access method must also have one or more - <firstterm>operator families</> and - <firstterm>operator classes</> defined in + <firstterm>operator families</firstterm> and + <firstterm>operator classes</firstterm> defined in <link linkend="catalog-pg-opfamily"><structname>pg_opfamily</structname></link>, <link linkend="catalog-pg-opclass"><structname>pg_opclass</structname></link>, <link linkend="catalog-pg-amop"><structname>pg_amop</structname></link>, and @@ -170,12 +170,12 @@ typedef struct IndexAmRoutine key values come from (it is always handed precomputed key values) but it will be very interested in the operator class information in <structname>pg_index</structname>. Both of these catalog entries can be - accessed as part of the <structname>Relation</> data structure that is + accessed as part of the <structname>Relation</structname> data structure that is passed to all operations on the index. </para> <para> - Some of the flag fields of <structname>IndexAmRoutine</> have nonobvious + Some of the flag fields of <structname>IndexAmRoutine</structname> have nonobvious implications. The requirements of <structfield>amcanunique</structfield> are discussed in <xref linkend="index-unique-checks">. The <structfield>amcanmulticol</structfield> flag asserts that the @@ -185,7 +185,7 @@ typedef struct IndexAmRoutine When <structfield>amcanmulticol</structfield> is false, <structfield>amoptionalkey</structfield> essentially says whether the access method supports full-index scans without any restriction clause. - Access methods that support multiple index columns <emphasis>must</> + Access methods that support multiple index columns <emphasis>must</emphasis> support scans that omit restrictions on any or all of the columns after the first; however they are permitted to require some restriction to appear for the first index column, and this is signaled by setting @@ -201,17 +201,17 @@ typedef struct IndexAmRoutine indexes that have <structfield>amoptionalkey</structfield> true must index nulls, since the planner might decide to use such an index with no scan keys at all. A related restriction is that an index - access method that supports multiple index columns <emphasis>must</> + access method that supports multiple index columns <emphasis>must</emphasis> support indexing null values in columns after the first, because the planner will assume the index can be used for queries that do not restrict these columns. For example, consider an index on (a,b) and a query with <literal>WHERE a = 4</literal>. The system will assume the index can be used to scan for rows with <literal>a = 4</literal>, which is wrong if the - index omits rows where <literal>b</> is null. + index omits rows where <literal>b</literal> is null. It is, however, OK to omit rows where the first indexed column is null. An index access method that does index nulls may also set <structfield>amsearchnulls</structfield>, indicating that it supports - <literal>IS NULL</> and <literal>IS NOT NULL</> clauses as search + <literal>IS NULL</literal> and <literal>IS NOT NULL</literal> clauses as search conditions. </para> @@ -235,8 +235,8 @@ ambuild (Relation heapRelation, Build a new index. The index relation has been physically created, but is empty. It must be filled in with whatever fixed data the access method requires, plus entries for all tuples already existing - in the table. Ordinarily the <function>ambuild</> function will call - <function>IndexBuildHeapScan()</> to scan the table for existing tuples + in the table. Ordinarily the <function>ambuild</function> function will call + <function>IndexBuildHeapScan()</function> to scan the table for existing tuples and compute the keys that need to be inserted into the index. The function must return a palloc'd struct containing statistics about the new index. @@ -264,22 +264,22 @@ aminsert (Relation indexRelation, IndexUniqueCheck checkUnique, IndexInfo *indexInfo); </programlisting> - Insert a new tuple into an existing index. The <literal>values</> and - <literal>isnull</> arrays give the key values to be indexed, and - <literal>heap_tid</> is the TID to be indexed. + Insert a new tuple into an existing index. The <literal>values</literal> and + <literal>isnull</literal> arrays give the key values to be indexed, and + <literal>heap_tid</literal> is the TID to be indexed. If the access method supports unique indexes (its - <structfield>amcanunique</> flag is true) then - <literal>checkUnique</> indicates the type of uniqueness check to + <structfield>amcanunique</structfield> flag is true) then + <literal>checkUnique</literal> indicates the type of uniqueness check to perform. This varies depending on whether the unique constraint is deferrable; see <xref linkend="index-unique-checks"> for details. - Normally the access method only needs the <literal>heapRelation</> + Normally the access method only needs the <literal>heapRelation</literal> parameter when performing uniqueness checking (since then it will have to look into the heap to verify tuple liveness). </para> <para> The function's Boolean result value is significant only when - <literal>checkUnique</> is <literal>UNIQUE_CHECK_PARTIAL</>. + <literal>checkUnique</literal> is <literal>UNIQUE_CHECK_PARTIAL</literal>. In this case a TRUE result means the new entry is known unique, whereas FALSE means it might be non-unique (and a deferred uniqueness check must be scheduled). For other cases a constant FALSE result is recommended. @@ -287,7 +287,7 @@ aminsert (Relation indexRelation, <para> Some indexes might not index all tuples. If the tuple is not to be - indexed, <function>aminsert</> should just return without doing anything. + indexed, <function>aminsert</function> should just return without doing anything. </para> <para> @@ -306,26 +306,26 @@ ambulkdelete (IndexVacuumInfo *info, IndexBulkDeleteCallback callback, void *callback_state); </programlisting> - Delete tuple(s) from the index. This is a <quote>bulk delete</> operation + Delete tuple(s) from the index. This is a <quote>bulk delete</quote> operation that is intended to be implemented by scanning the whole index and checking each entry to see if it should be deleted. - The passed-in <literal>callback</> function must be called, in the style - <literal>callback(<replaceable>TID</>, callback_state) returns bool</literal>, + The passed-in <literal>callback</literal> function must be called, in the style + <literal>callback(<replaceable>TID</replaceable>, callback_state) returns bool</literal>, to determine whether any particular index entry, as identified by its referenced TID, is to be deleted. Must return either NULL or a palloc'd struct containing statistics about the effects of the deletion operation. It is OK to return NULL if no information needs to be passed on to - <function>amvacuumcleanup</>. + <function>amvacuumcleanup</function>. </para> <para> - Because of limited <varname>maintenance_work_mem</>, - <function>ambulkdelete</> might need to be called more than once when many - tuples are to be deleted. The <literal>stats</> argument is the result + Because of limited <varname>maintenance_work_mem</varname>, + <function>ambulkdelete</function> might need to be called more than once when many + tuples are to be deleted. The <literal>stats</literal> argument is the result of the previous call for this index (it is NULL for the first call within a - <command>VACUUM</> operation). This allows the AM to accumulate statistics - across the whole operation. Typically, <function>ambulkdelete</> will - modify and return the same struct if the passed <literal>stats</> is not + <command>VACUUM</command> operation). This allows the AM to accumulate statistics + across the whole operation. Typically, <function>ambulkdelete</function> will + modify and return the same struct if the passed <literal>stats</literal> is not null. </para> @@ -336,14 +336,14 @@ amvacuumcleanup (IndexVacuumInfo *info, IndexBulkDeleteResult *stats); </programlisting> Clean up after a <command>VACUUM</command> operation (zero or more - <function>ambulkdelete</> calls). This does not have to do anything + <function>ambulkdelete</function> calls). This does not have to do anything beyond returning index statistics, but it might perform bulk cleanup - such as reclaiming empty index pages. <literal>stats</> is whatever the - last <function>ambulkdelete</> call returned, or NULL if - <function>ambulkdelete</> was not called because no tuples needed to be + such as reclaiming empty index pages. <literal>stats</literal> is whatever the + last <function>ambulkdelete</function> call returned, or NULL if + <function>ambulkdelete</function> was not called because no tuples needed to be deleted. If the result is not NULL it must be a palloc'd struct. - The statistics it contains will be used to update <structname>pg_class</>, - and will be reported by <command>VACUUM</> if <literal>VERBOSE</> is given. + The statistics it contains will be used to update <structname>pg_class</structname>, + and will be reported by <command>VACUUM</command> if <literal>VERBOSE</literal> is given. It is OK to return NULL if the index was not changed at all during the <command>VACUUM</command> operation, but otherwise correct stats should be returned. @@ -351,8 +351,8 @@ amvacuumcleanup (IndexVacuumInfo *info, <para> As of <productname>PostgreSQL</productname> 8.4, - <function>amvacuumcleanup</> will also be called at completion of an - <command>ANALYZE</> operation. In this case <literal>stats</> is always + <function>amvacuumcleanup</function> will also be called at completion of an + <command>ANALYZE</command> operation. In this case <literal>stats</literal> is always NULL and any return value will be ignored. This case can be distinguished by checking <literal>info->analyze_only</literal>. It is recommended that the access method do nothing except post-insert cleanup in such a @@ -365,12 +365,12 @@ bool amcanreturn (Relation indexRelation, int attno); </programlisting> Check whether the index can support <link - linkend="indexes-index-only-scans"><firstterm>index-only scans</></link> on + linkend="indexes-index-only-scans"><firstterm>index-only scans</firstterm></link> on the given column, by returning the indexed column values for an index entry in the form of an <structname>IndexTuple</structname>. The attribute number is 1-based, i.e. the first column's attno is 1. Returns TRUE if supported, else FALSE. If the access method does not support index-only scans at all, - the <structfield>amcanreturn</> field in its <structname>IndexAmRoutine</> + the <structfield>amcanreturn</structfield> field in its <structname>IndexAmRoutine</structname> struct can be set to NULL. </para> @@ -397,18 +397,18 @@ amoptions (ArrayType *reloptions, </programlisting> Parse and validate the reloptions array for an index. This is called only when a non-null reloptions array exists for the index. - <parameter>reloptions</> is a <type>text</> array containing entries of the - form <replaceable>name</><literal>=</><replaceable>value</>. - The function should construct a <type>bytea</> value, which will be copied - into the <structfield>rd_options</> field of the index's relcache entry. - The data contents of the <type>bytea</> value are open for the access + <parameter>reloptions</parameter> is a <type>text</type> array containing entries of the + form <replaceable>name</replaceable><literal>=</literal><replaceable>value</replaceable>. + The function should construct a <type>bytea</type> value, which will be copied + into the <structfield>rd_options</structfield> field of the index's relcache entry. + The data contents of the <type>bytea</type> value are open for the access method to define; most of the standard access methods use struct - <structname>StdRdOptions</>. - When <parameter>validate</> is true, the function should report a suitable + <structname>StdRdOptions</structname>. + When <parameter>validate</parameter> is true, the function should report a suitable error message if any of the options are unrecognized or have invalid - values; when <parameter>validate</> is false, invalid entries should be - silently ignored. (<parameter>validate</> is false when loading options - already stored in <structname>pg_catalog</>; an invalid entry could only + values; when <parameter>validate</parameter> is false, invalid entries should be + silently ignored. (<parameter>validate</parameter> is false when loading options + already stored in <structname>pg_catalog</structname>; an invalid entry could only be found if the access method has changed its rules for options, and in that case ignoring obsolete entries is appropriate.) It is OK to return NULL if default behavior is wanted. @@ -421,44 +421,44 @@ amproperty (Oid index_oid, int attno, IndexAMProperty prop, const char *propname, bool *res, bool *isnull); </programlisting> - The <function>amproperty</> method allows index access methods to override + The <function>amproperty</function> method allows index access methods to override the default behavior of <function>pg_index_column_has_property</function> and related functions. If the access method does not have any special behavior for index property - inquiries, the <structfield>amproperty</> field in - its <structname>IndexAmRoutine</> struct can be set to NULL. - Otherwise, the <function>amproperty</> method will be called with - <parameter>index_oid</> and <parameter>attno</> both zero for + inquiries, the <structfield>amproperty</structfield> field in + its <structname>IndexAmRoutine</structname> struct can be set to NULL. + Otherwise, the <function>amproperty</function> method will be called with + <parameter>index_oid</parameter> and <parameter>attno</parameter> both zero for <function>pg_indexam_has_property</function> calls, - or with <parameter>index_oid</> valid and <parameter>attno</> zero for + or with <parameter>index_oid</parameter> valid and <parameter>attno</parameter> zero for <function>pg_index_has_property</function> calls, - or with <parameter>index_oid</> valid and <parameter>attno</> greater than + or with <parameter>index_oid</parameter> valid and <parameter>attno</parameter> greater than zero for <function>pg_index_column_has_property</function> calls. - <parameter>prop</> is an enum value identifying the property being tested, - while <parameter>propname</> is the original property name string. + <parameter>prop</parameter> is an enum value identifying the property being tested, + while <parameter>propname</parameter> is the original property name string. If the core code does not recognize the property name - then <parameter>prop</> is <literal>AMPROP_UNKNOWN</>. + then <parameter>prop</parameter> is <literal>AMPROP_UNKNOWN</literal>. Access methods can define custom property names by - checking <parameter>propname</> for a match (use <function>pg_strcasecmp</> + checking <parameter>propname</parameter> for a match (use <function>pg_strcasecmp</function> to match, for consistency with the core code); for names known to the core - code, it's better to inspect <parameter>prop</>. - If the <structfield>amproperty</> method returns <literal>true</> then - it has determined the property test result: it must set <literal>*res</> - to the boolean value to return, or set <literal>*isnull</> - to <literal>true</> to return a NULL. (Both of the referenced variables - are initialized to <literal>false</> before the call.) - If the <structfield>amproperty</> method returns <literal>false</> then + code, it's better to inspect <parameter>prop</parameter>. + If the <structfield>amproperty</structfield> method returns <literal>true</literal> then + it has determined the property test result: it must set <literal>*res</literal> + to the boolean value to return, or set <literal>*isnull</literal> + to <literal>true</literal> to return a NULL. (Both of the referenced variables + are initialized to <literal>false</literal> before the call.) + If the <structfield>amproperty</structfield> method returns <literal>false</literal> then the core code will proceed with its normal logic for determining the property test result. </para> <para> Access methods that support ordering operators should - implement <literal>AMPROP_DISTANCE_ORDERABLE</> property testing, as the + implement <literal>AMPROP_DISTANCE_ORDERABLE</literal> property testing, as the core code does not know how to do that and will return NULL. It may - also be advantageous to implement <literal>AMPROP_RETURNABLE</> testing, + also be advantageous to implement <literal>AMPROP_RETURNABLE</literal> testing, if that can be done more cheaply than by opening the index and calling - <structfield>amcanreturn</>, which is the core code's default behavior. + <structfield>amcanreturn</structfield>, which is the core code's default behavior. The default behavior should be satisfactory for all other standard properties. </para> @@ -471,18 +471,18 @@ amvalidate (Oid opclassoid); Validate the catalog entries for the specified operator class, so far as the access method can reasonably do that. For example, this might include testing that all required support functions are provided. - The <function>amvalidate</> function must return false if the opclass is - invalid. Problems should be reported with <function>ereport</> messages. + The <function>amvalidate</function> function must return false if the opclass is + invalid. Problems should be reported with <function>ereport</function> messages. </para> <para> The purpose of an index, of course, is to support scans for tuples matching - an indexable <literal>WHERE</> condition, often called a - <firstterm>qualifier</> or <firstterm>scan key</>. The semantics of + an indexable <literal>WHERE</literal> condition, often called a + <firstterm>qualifier</firstterm> or <firstterm>scan key</firstterm>. The semantics of index scanning are described more fully in <xref linkend="index-scanning">, - below. An index access method can support <quote>plain</> index scans, - <quote>bitmap</> index scans, or both. The scan-related functions that an + below. An index access method can support <quote>plain</quote> index scans, + <quote>bitmap</quote> index scans, or both. The scan-related functions that an index access method must or may provide are: </para> @@ -493,17 +493,17 @@ ambeginscan (Relation indexRelation, int nkeys, int norderbys); </programlisting> - Prepare for an index scan. The <literal>nkeys</> and <literal>norderbys</> + Prepare for an index scan. The <literal>nkeys</literal> and <literal>norderbys</literal> parameters indicate the number of quals and ordering operators that will be used in the scan; these may be useful for space allocation purposes. Note that the actual values of the scan keys aren't provided yet. The result must be a palloc'd struct. For implementation reasons the index access method - <emphasis>must</> create this struct by calling - <function>RelationGetIndexScan()</>. In most cases - <function>ambeginscan</> does little beyond making that call and perhaps + <emphasis>must</emphasis> create this struct by calling + <function>RelationGetIndexScan()</function>. In most cases + <function>ambeginscan</function> does little beyond making that call and perhaps acquiring locks; - the interesting parts of index-scan startup are in <function>amrescan</>. + the interesting parts of index-scan startup are in <function>amrescan</function>. </para> <para> @@ -516,10 +516,10 @@ amrescan (IndexScanDesc scan, int norderbys); </programlisting> Start or restart an index scan, possibly with new scan keys. (To restart - using previously-passed keys, NULL is passed for <literal>keys</> and/or - <literal>orderbys</>.) Note that it is not allowed for + using previously-passed keys, NULL is passed for <literal>keys</literal> and/or + <literal>orderbys</literal>.) Note that it is not allowed for the number of keys or order-by operators to be larger than - what was passed to <function>ambeginscan</>. In practice the restart + what was passed to <function>ambeginscan</function>. In practice the restart feature is used when a new outer tuple is selected by a nested-loop join and so a new key comparison value is needed, but the scan key structure remains the same. @@ -534,42 +534,42 @@ amgettuple (IndexScanDesc scan, Fetch the next tuple in the given scan, moving in the given direction (forward or backward in the index). Returns TRUE if a tuple was obtained, FALSE if no matching tuples remain. In the TRUE case the tuple - TID is stored into the <literal>scan</> structure. Note that - <quote>success</> means only that the index contains an entry that matches + TID is stored into the <literal>scan</literal> structure. Note that + <quote>success</quote> means only that the index contains an entry that matches the scan keys, not that the tuple necessarily still exists in the heap or - will pass the caller's snapshot test. On success, <function>amgettuple</> - must also set <literal>scan->xs_recheck</> to TRUE or FALSE. + will pass the caller's snapshot test. On success, <function>amgettuple</function> + must also set <literal>scan->xs_recheck</literal> to TRUE or FALSE. FALSE means it is certain that the index entry matches the scan keys. TRUE means this is not certain, and the conditions represented by the scan keys must be rechecked against the heap tuple after fetching it. - This provision supports <quote>lossy</> index operators. + This provision supports <quote>lossy</quote> index operators. Note that rechecking will extend only to the scan conditions; a partial - index predicate (if any) is never rechecked by <function>amgettuple</> + index predicate (if any) is never rechecked by <function>amgettuple</function> callers. </para> <para> If the index supports <link linkend="indexes-index-only-scans">index-only scans</link> (i.e., <function>amcanreturn</function> returns TRUE for it), - then on success the AM must also check <literal>scan->xs_want_itup</>, + then on success the AM must also check <literal>scan->xs_want_itup</literal>, and if that is true it must return the originally indexed data for the index entry. The data can be returned in the form of an - <structname>IndexTuple</> pointer stored at <literal>scan->xs_itup</>, - with tuple descriptor <literal>scan->xs_itupdesc</>; or in the form of - a <structname>HeapTuple</> pointer stored at <literal>scan->xs_hitup</>, - with tuple descriptor <literal>scan->xs_hitupdesc</>. (The latter + <structname>IndexTuple</structname> pointer stored at <literal>scan->xs_itup</literal>, + with tuple descriptor <literal>scan->xs_itupdesc</literal>; or in the form of + a <structname>HeapTuple</structname> pointer stored at <literal>scan->xs_hitup</literal>, + with tuple descriptor <literal>scan->xs_hitupdesc</literal>. (The latter format should be used when reconstructing data that might possibly not fit - into an <structname>IndexTuple</>.) In either case, + into an <structname>IndexTuple</structname>.) In either case, management of the data referenced by the pointer is the access method's responsibility. The data must remain good at least until the next - <function>amgettuple</>, <function>amrescan</>, or <function>amendscan</> + <function>amgettuple</function>, <function>amrescan</function>, or <function>amendscan</function> call for the scan. </para> <para> - The <function>amgettuple</> function need only be provided if the access - method supports <quote>plain</> index scans. If it doesn't, the - <structfield>amgettuple</> field in its <structname>IndexAmRoutine</> + The <function>amgettuple</function> function need only be provided if the access + method supports <quote>plain</quote> index scans. If it doesn't, the + <structfield>amgettuple</structfield> field in its <structname>IndexAmRoutine</structname> struct must be set to NULL. </para> @@ -583,24 +583,24 @@ amgetbitmap (IndexScanDesc scan, <type>TIDBitmap</type> (that is, OR the set of tuple IDs into whatever set is already in the bitmap). The number of tuples fetched is returned (this might be just an approximate count, for instance some AMs do not detect duplicates). - While inserting tuple IDs into the bitmap, <function>amgetbitmap</> can + While inserting tuple IDs into the bitmap, <function>amgetbitmap</function> can indicate that rechecking of the scan conditions is required for specific - tuple IDs. This is analogous to the <literal>xs_recheck</> output parameter - of <function>amgettuple</>. Note: in the current implementation, support + tuple IDs. This is analogous to the <literal>xs_recheck</literal> output parameter + of <function>amgettuple</function>. Note: in the current implementation, support for this feature is conflated with support for lossy storage of the bitmap itself, and therefore callers recheck both the scan conditions and the partial index predicate (if any) for recheckable tuples. That might not always be true, however. - <function>amgetbitmap</> and - <function>amgettuple</> cannot be used in the same index scan; there - are other restrictions too when using <function>amgetbitmap</>, as explained + <function>amgetbitmap</function> and + <function>amgettuple</function> cannot be used in the same index scan; there + are other restrictions too when using <function>amgetbitmap</function>, as explained in <xref linkend="index-scanning">. </para> <para> - The <function>amgetbitmap</> function need only be provided if the access - method supports <quote>bitmap</> index scans. If it doesn't, the - <structfield>amgetbitmap</> field in its <structname>IndexAmRoutine</> + The <function>amgetbitmap</function> function need only be provided if the access + method supports <quote>bitmap</quote> index scans. If it doesn't, the + <structfield>amgetbitmap</structfield> field in its <structname>IndexAmRoutine</structname> struct must be set to NULL. </para> @@ -609,7 +609,7 @@ amgetbitmap (IndexScanDesc scan, void amendscan (IndexScanDesc scan); </programlisting> - End a scan and release resources. The <literal>scan</> struct itself + End a scan and release resources. The <literal>scan</literal> struct itself should not be freed, but any locks or pins taken internally by the access method must be released. </para> @@ -624,9 +624,9 @@ ammarkpos (IndexScanDesc scan); </para> <para> - The <function>ammarkpos</> function need only be provided if the access + The <function>ammarkpos</function> function need only be provided if the access method supports ordered scans. If it doesn't, - the <structfield>ammarkpos</> field in its <structname>IndexAmRoutine</> + the <structfield>ammarkpos</structfield> field in its <structname>IndexAmRoutine</structname> struct may be set to NULL. </para> @@ -639,15 +639,15 @@ amrestrpos (IndexScanDesc scan); </para> <para> - The <function>amrestrpos</> function need only be provided if the access + The <function>amrestrpos</function> function need only be provided if the access method supports ordered scans. If it doesn't, - the <structfield>amrestrpos</> field in its <structname>IndexAmRoutine</> + the <structfield>amrestrpos</structfield> field in its <structname>IndexAmRoutine</structname> struct may be set to NULL. </para> <para> In addition to supporting ordinary index scans, some types of index - may wish to support <firstterm>parallel index scans</>, which allow + may wish to support <firstterm>parallel index scans</firstterm>, which allow multiple backends to cooperate in performing an index scan. The index access method should arrange things so that each cooperating process returns a subset of the tuples that would be performed by @@ -668,7 +668,7 @@ amestimateparallelscan (void); Estimate and return the number of bytes of dynamic shared memory which the access method will be needed to perform a parallel scan. (This number is in addition to, not in lieu of, the amount of space needed for - AM-independent data in <structname>ParallelIndexScanDescData</>.) + AM-independent data in <structname>ParallelIndexScanDescData</structname>.) </para> <para> @@ -683,9 +683,9 @@ void aminitparallelscan (void *target); </programlisting> This function will be called to initialize dynamic shared memory at the - beginning of a parallel scan. <parameter>target</> will point to at least + beginning of a parallel scan. <parameter>target</parameter> will point to at least the number of bytes previously returned by - <function>amestimateparallelscan</>, and this function may use that + <function>amestimateparallelscan</function>, and this function may use that amount of space to store whatever data it wishes. </para> @@ -702,7 +702,7 @@ amparallelrescan (IndexScanDesc scan); </programlisting> This function, if implemented, will be called when a parallel index scan must be restarted. It should reset any shared state set up by - <function>aminitparallelscan</> such that the scan will be restarted from + <function>aminitparallelscan</function> such that the scan will be restarted from the beginning. </para> @@ -714,16 +714,16 @@ amparallelrescan (IndexScanDesc scan); <para> In an index scan, the index access method is responsible for regurgitating the TIDs of all the tuples it has been told about that match the - <firstterm>scan keys</>. The access method is <emphasis>not</> involved in + <firstterm>scan keys</firstterm>. The access method is <emphasis>not</emphasis> involved in actually fetching those tuples from the index's parent table, nor in determining whether they pass the scan's time qualification test or other conditions. </para> <para> - A scan key is the internal representation of a <literal>WHERE</> clause of - the form <replaceable>index_key</> <replaceable>operator</> - <replaceable>constant</>, where the index key is one of the columns of the + A scan key is the internal representation of a <literal>WHERE</literal> clause of + the form <replaceable>index_key</replaceable> <replaceable>operator</replaceable> + <replaceable>constant</replaceable>, where the index key is one of the columns of the index and the operator is one of the members of the operator family associated with that index column. An index scan has zero or more scan keys, which are implicitly ANDed — the returned tuples are expected @@ -731,7 +731,7 @@ amparallelrescan (IndexScanDesc scan); </para> <para> - The access method can report that the index is <firstterm>lossy</>, or + The access method can report that the index is <firstterm>lossy</firstterm>, or requires rechecks, for a particular query. This implies that the index scan will return all the entries that pass the scan key, plus possibly additional entries that do not. The core system's index-scan machinery @@ -743,16 +743,16 @@ amparallelrescan (IndexScanDesc scan); <para> Note that it is entirely up to the access method to ensure that it correctly finds all and only the entries passing all the given scan keys. - Also, the core system will simply hand off all the <literal>WHERE</> + Also, the core system will simply hand off all the <literal>WHERE</literal> clauses that match the index keys and operator families, without any semantic analysis to determine whether they are redundant or contradictory. As an example, given - <literal>WHERE x > 4 AND x > 14</> where <literal>x</> is a b-tree - indexed column, it is left to the b-tree <function>amrescan</> function + <literal>WHERE x > 4 AND x > 14</literal> where <literal>x</literal> is a b-tree + indexed column, it is left to the b-tree <function>amrescan</function> function to realize that the first scan key is redundant and can be discarded. - The extent of preprocessing needed during <function>amrescan</> will + The extent of preprocessing needed during <function>amrescan</function> will depend on the extent to which the index access method needs to reduce - the scan keys to a <quote>normalized</> form. + the scan keys to a <quote>normalized</quote> form. </para> <para> @@ -765,7 +765,7 @@ amparallelrescan (IndexScanDesc scan); <para> Access methods that always return entries in the natural ordering of their data (such as btree) should set - <structfield>amcanorder</> to true. + <structfield>amcanorder</structfield> to true. Currently, such access methods must use btree-compatible strategy numbers for their equality and ordering operators. </para> @@ -773,11 +773,11 @@ amparallelrescan (IndexScanDesc scan); <listitem> <para> Access methods that support ordering operators should set - <structfield>amcanorderbyop</> to true. + <structfield>amcanorderbyop</structfield> to true. This indicates that the index is capable of returning entries in - an order satisfying <literal>ORDER BY</> <replaceable>index_key</> - <replaceable>operator</> <replaceable>constant</>. Scan modifiers - of that form can be passed to <function>amrescan</> as described + an order satisfying <literal>ORDER BY</literal> <replaceable>index_key</replaceable> + <replaceable>operator</replaceable> <replaceable>constant</replaceable>. Scan modifiers + of that form can be passed to <function>amrescan</function> as described previously. </para> </listitem> @@ -785,29 +785,29 @@ amparallelrescan (IndexScanDesc scan); </para> <para> - The <function>amgettuple</> function has a <literal>direction</> argument, - which can be either <literal>ForwardScanDirection</> (the normal case) - or <literal>BackwardScanDirection</>. If the first call after - <function>amrescan</> specifies <literal>BackwardScanDirection</>, then the + The <function>amgettuple</function> function has a <literal>direction</literal> argument, + which can be either <literal>ForwardScanDirection</literal> (the normal case) + or <literal>BackwardScanDirection</literal>. If the first call after + <function>amrescan</function> specifies <literal>BackwardScanDirection</literal>, then the set of matching index entries is to be scanned back-to-front rather than in - the normal front-to-back direction, so <function>amgettuple</> must return + the normal front-to-back direction, so <function>amgettuple</function> must return the last matching tuple in the index, rather than the first one as it normally would. (This will only occur for access - methods that set <structfield>amcanorder</> to true.) After the - first call, <function>amgettuple</> must be prepared to advance the scan in + methods that set <structfield>amcanorder</structfield> to true.) After the + first call, <function>amgettuple</function> must be prepared to advance the scan in either direction from the most recently returned entry. (But if - <structfield>amcanbackward</> is false, all subsequent + <structfield>amcanbackward</structfield> is false, all subsequent calls will have the same direction as the first one.) </para> <para> - Access methods that support ordered scans must support <quote>marking</> a + Access methods that support ordered scans must support <quote>marking</quote> a position in a scan and later returning to the marked position. The same position might be restored multiple times. However, only one position need - be remembered per scan; a new <function>ammarkpos</> call overrides the + be remembered per scan; a new <function>ammarkpos</function> call overrides the previously marked position. An access method that does not support ordered - scans need not provide <function>ammarkpos</> and <function>amrestrpos</> - functions in <structname>IndexAmRoutine</>; set those pointers to NULL + scans need not provide <function>ammarkpos</function> and <function>amrestrpos</function> + functions in <structname>IndexAmRoutine</structname>; set those pointers to NULL instead. </para> @@ -835,29 +835,29 @@ amparallelrescan (IndexScanDesc scan); </para> <para> - Instead of using <function>amgettuple</>, an index scan can be done with - <function>amgetbitmap</> to fetch all tuples in one call. This can be - noticeably more efficient than <function>amgettuple</> because it allows + Instead of using <function>amgettuple</function>, an index scan can be done with + <function>amgetbitmap</function> to fetch all tuples in one call. This can be + noticeably more efficient than <function>amgettuple</function> because it allows avoiding lock/unlock cycles within the access method. In principle - <function>amgetbitmap</> should have the same effects as repeated - <function>amgettuple</> calls, but we impose several restrictions to - simplify matters. First of all, <function>amgetbitmap</> returns all + <function>amgetbitmap</function> should have the same effects as repeated + <function>amgettuple</function> calls, but we impose several restrictions to + simplify matters. First of all, <function>amgetbitmap</function> returns all tuples at once and marking or restoring scan positions isn't supported. Secondly, the tuples are returned in a bitmap which doesn't - have any specific ordering, which is why <function>amgetbitmap</> doesn't - take a <literal>direction</> argument. (Ordering operators will never be + have any specific ordering, which is why <function>amgetbitmap</function> doesn't + take a <literal>direction</literal> argument. (Ordering operators will never be supplied for such a scan, either.) Also, there is no provision for index-only scans with - <function>amgetbitmap</>, since there is no way to return the contents of + <function>amgetbitmap</function>, since there is no way to return the contents of index tuples. - Finally, <function>amgetbitmap</> + Finally, <function>amgetbitmap</function> does not guarantee any locking of the returned tuples, with implications spelled out in <xref linkend="index-locking">. </para> <para> Note that it is permitted for an access method to implement only - <function>amgetbitmap</> and not <function>amgettuple</>, or vice versa, + <function>amgetbitmap</function> and not <function>amgettuple</function>, or vice versa, if its internal implementation is unsuited to one API or the other. </para> @@ -870,26 +870,26 @@ amparallelrescan (IndexScanDesc scan); Index access methods must handle concurrent updates of the index by multiple processes. The core <productname>PostgreSQL</productname> system obtains - <literal>AccessShareLock</> on the index during an index scan, and - <literal>RowExclusiveLock</> when updating the index (including plain - <command>VACUUM</>). Since these lock types do not conflict, the access + <literal>AccessShareLock</literal> on the index during an index scan, and + <literal>RowExclusiveLock</literal> when updating the index (including plain + <command>VACUUM</command>). Since these lock types do not conflict, the access method is responsible for handling any fine-grained locking it might need. An exclusive lock on the index as a whole will be taken only during index - creation, destruction, or <command>REINDEX</>. + creation, destruction, or <command>REINDEX</command>. </para> <para> Building an index type that supports concurrent updates usually requires extensive and subtle analysis of the required behavior. For the b-tree and hash index types, you can read about the design decisions involved in - <filename>src/backend/access/nbtree/README</> and - <filename>src/backend/access/hash/README</>. + <filename>src/backend/access/nbtree/README</filename> and + <filename>src/backend/access/hash/README</filename>. </para> <para> Aside from the index's own internal consistency requirements, concurrent updates create issues about consistency between the parent table (the - <firstterm>heap</>) and the index. Because + <firstterm>heap</firstterm>) and the index. Because <productname>PostgreSQL</productname> separates accesses and updates of the heap from those of the index, there are windows in which the index might be inconsistent with the heap. We handle this problem @@ -906,7 +906,7 @@ amparallelrescan (IndexScanDesc scan); </listitem> <listitem> <para> - When a heap entry is to be deleted (by <command>VACUUM</>), all its + When a heap entry is to be deleted (by <command>VACUUM</command>), all its index entries must be removed first. </para> </listitem> @@ -914,7 +914,7 @@ amparallelrescan (IndexScanDesc scan); <para> An index scan must maintain a pin on the index page holding the item last returned by - <function>amgettuple</>, and <function>ambulkdelete</> cannot delete + <function>amgettuple</function>, and <function>ambulkdelete</function> cannot delete entries from pages that are pinned by other backends. The need for this rule is explained below. </para> @@ -922,33 +922,33 @@ amparallelrescan (IndexScanDesc scan); </itemizedlist> Without the third rule, it is possible for an index reader to - see an index entry just before it is removed by <command>VACUUM</>, and + see an index entry just before it is removed by <command>VACUUM</command>, and then to arrive at the corresponding heap entry after that was removed by - <command>VACUUM</>. + <command>VACUUM</command>. This creates no serious problems if that item number is still unused when the reader reaches it, since an empty - item slot will be ignored by <function>heap_fetch()</>. But what if a + item slot will be ignored by <function>heap_fetch()</function>. But what if a third backend has already re-used the item slot for something else? When using an MVCC-compliant snapshot, there is no problem because the new occupant of the slot is certain to be too new to pass the snapshot test. However, with a non-MVCC-compliant snapshot (such as - <literal>SnapshotAny</>), it would be possible to accept and return + <literal>SnapshotAny</literal>), it would be possible to accept and return a row that does not in fact match the scan keys. We could defend against this scenario by requiring the scan keys to be rechecked against the heap row in all cases, but that is too expensive. Instead, we use a pin on an index page as a proxy to indicate that the reader - might still be <quote>in flight</> from the index entry to the matching - heap entry. Making <function>ambulkdelete</> block on such a pin ensures - that <command>VACUUM</> cannot delete the heap entry before the reader + might still be <quote>in flight</quote> from the index entry to the matching + heap entry. Making <function>ambulkdelete</function> block on such a pin ensures + that <command>VACUUM</command> cannot delete the heap entry before the reader is done with it. This solution costs little in run time, and adds blocking overhead only in the rare cases where there actually is a conflict. </para> <para> - This solution requires that index scans be <quote>synchronous</>: we have + This solution requires that index scans be <quote>synchronous</quote>: we have to fetch each heap tuple immediately after scanning the corresponding index entry. This is expensive for a number of reasons. An - <quote>asynchronous</> scan in which we collect many TIDs from the index, + <quote>asynchronous</quote> scan in which we collect many TIDs from the index, and only visit the heap tuples sometime later, requires much less index locking overhead and can allow a more efficient heap access pattern. Per the above analysis, we must use the synchronous approach for @@ -957,13 +957,13 @@ amparallelrescan (IndexScanDesc scan); </para> <para> - In an <function>amgetbitmap</> index scan, the access method does not + In an <function>amgetbitmap</function> index scan, the access method does not keep an index pin on any of the returned tuples. Therefore it is only safe to use such scans with MVCC-compliant snapshots. </para> <para> - When the <structfield>ampredlocks</> flag is not set, any scan using that + When the <structfield>ampredlocks</structfield> flag is not set, any scan using that index access method within a serializable transaction will acquire a nonblocking predicate lock on the full index. This will generate a read-write conflict with the insert of any tuple into that index by a @@ -982,9 +982,9 @@ amparallelrescan (IndexScanDesc scan); <para> <productname>PostgreSQL</productname> enforces SQL uniqueness constraints - using <firstterm>unique indexes</>, which are indexes that disallow + using <firstterm>unique indexes</firstterm>, which are indexes that disallow multiple entries with identical keys. An access method that supports this - feature sets <structfield>amcanunique</> true. + feature sets <structfield>amcanunique</structfield> true. (At present, only b-tree supports it.) </para> @@ -1032,7 +1032,7 @@ amparallelrescan (IndexScanDesc scan); no violation should be reported. (This case cannot occur during the ordinary scenario of inserting a row that's just been created by the current transaction. It can happen during - <command>CREATE UNIQUE INDEX CONCURRENTLY</>, however.) + <command>CREATE UNIQUE INDEX CONCURRENTLY</command>, however.) </para> <para> @@ -1057,32 +1057,32 @@ amparallelrescan (IndexScanDesc scan); are done. Otherwise, we schedule a recheck to occur when it is time to enforce the constraint. If, at the time of the recheck, both the inserted tuple and some other tuple with the same key are live, then the error - must be reported. (Note that for this purpose, <quote>live</> actually - means <quote>any tuple in the index entry's HOT chain is live</>.) - To implement this, the <function>aminsert</> function is passed a - <literal>checkUnique</> parameter having one of the following values: + must be reported. (Note that for this purpose, <quote>live</quote> actually + means <quote>any tuple in the index entry's HOT chain is live</quote>.) + To implement this, the <function>aminsert</function> function is passed a + <literal>checkUnique</literal> parameter having one of the following values: <itemizedlist> <listitem> <para> - <literal>UNIQUE_CHECK_NO</> indicates that no uniqueness checking + <literal>UNIQUE_CHECK_NO</literal> indicates that no uniqueness checking should be done (this is not a unique index). </para> </listitem> <listitem> <para> - <literal>UNIQUE_CHECK_YES</> indicates that this is a non-deferrable + <literal>UNIQUE_CHECK_YES</literal> indicates that this is a non-deferrable unique index, and the uniqueness check must be done immediately, as described above. </para> </listitem> <listitem> <para> - <literal>UNIQUE_CHECK_PARTIAL</> indicates that the unique + <literal>UNIQUE_CHECK_PARTIAL</literal> indicates that the unique constraint is deferrable. <productname>PostgreSQL</productname> will use this mode to insert each row's index entry. The access method must allow duplicate entries into the index, and report any - potential duplicates by returning FALSE from <function>aminsert</>. + potential duplicates by returning FALSE from <function>aminsert</function>. For each row for which FALSE is returned, a deferred recheck will be scheduled. </para> @@ -1098,21 +1098,21 @@ amparallelrescan (IndexScanDesc scan); </listitem> <listitem> <para> - <literal>UNIQUE_CHECK_EXISTING</> indicates that this is a deferred + <literal>UNIQUE_CHECK_EXISTING</literal> indicates that this is a deferred recheck of a row that was reported as a potential uniqueness violation. - Although this is implemented by calling <function>aminsert</>, the - access method must <emphasis>not</> insert a new index entry in this + Although this is implemented by calling <function>aminsert</function>, the + access method must <emphasis>not</emphasis> insert a new index entry in this case. The index entry is already present. Rather, the access method must check to see if there is another live index entry. If so, and if the target row is also still live, report error. </para> <para> - It is recommended that in a <literal>UNIQUE_CHECK_EXISTING</> call, + It is recommended that in a <literal>UNIQUE_CHECK_EXISTING</literal> call, the access method further verify that the target row actually does have an existing entry in the index, and report error if not. This is a good idea because the index tuple values passed to - <function>aminsert</> will have been recomputed. If the index + <function>aminsert</function> will have been recomputed. If the index definition involves functions that are not really immutable, we might be checking the wrong area of the index. Checking that the target row is found in the recheck verifies that we are scanning @@ -1128,20 +1128,20 @@ amparallelrescan (IndexScanDesc scan); <title>Index Cost Estimation Functions</title> <para> - The <function>amcostestimate</> function is given information describing + The <function>amcostestimate</function> function is given information describing a possible index scan, including lists of WHERE and ORDER BY clauses that have been determined to be usable with the index. It must return estimates of the cost of accessing the index and the selectivity of the WHERE clauses (that is, the fraction of parent-table rows that will be retrieved during the index scan). For simple cases, nearly all the work of the cost estimator can be done by calling standard routines - in the optimizer; the point of having an <function>amcostestimate</> function is + in the optimizer; the point of having an <function>amcostestimate</function> function is to allow index access methods to provide index-type-specific knowledge, in case it is possible to improve on the standard estimates. </para> <para> - Each <function>amcostestimate</> function must have the signature: + Each <function>amcostestimate</function> function must have the signature: <programlisting> void @@ -1158,7 +1158,7 @@ amcostestimate (PlannerInfo *root, <variablelist> <varlistentry> - <term><parameter>root</></term> + <term><parameter>root</parameter></term> <listitem> <para> The planner's information about the query being processed. @@ -1167,7 +1167,7 @@ amcostestimate (PlannerInfo *root, </varlistentry> <varlistentry> - <term><parameter>path</></term> + <term><parameter>path</parameter></term> <listitem> <para> The index access path being considered. All fields except cost and @@ -1177,14 +1177,14 @@ amcostestimate (PlannerInfo *root, </varlistentry> <varlistentry> - <term><parameter>loop_count</></term> + <term><parameter>loop_count</parameter></term> <listitem> <para> The number of repetitions of the index scan that should be factored into the cost estimates. This will typically be greater than one when considering a parameterized scan for use in the inside of a nestloop join. Note that the cost estimates should still be for just one scan; - a larger <parameter>loop_count</> means that it may be appropriate + a larger <parameter>loop_count</parameter> means that it may be appropriate to allow for some caching effects across multiple scans. </para> </listitem> @@ -1197,7 +1197,7 @@ amcostestimate (PlannerInfo *root, <variablelist> <varlistentry> - <term><parameter>*indexStartupCost</></term> + <term><parameter>*indexStartupCost</parameter></term> <listitem> <para> Set to cost of index start-up processing @@ -1206,7 +1206,7 @@ amcostestimate (PlannerInfo *root, </varlistentry> <varlistentry> - <term><parameter>*indexTotalCost</></term> + <term><parameter>*indexTotalCost</parameter></term> <listitem> <para> Set to total cost of index processing @@ -1215,7 +1215,7 @@ amcostestimate (PlannerInfo *root, </varlistentry> <varlistentry> - <term><parameter>*indexSelectivity</></term> + <term><parameter>*indexSelectivity</parameter></term> <listitem> <para> Set to index selectivity @@ -1224,7 +1224,7 @@ amcostestimate (PlannerInfo *root, </varlistentry> <varlistentry> - <term><parameter>*indexCorrelation</></term> + <term><parameter>*indexCorrelation</parameter></term> <listitem> <para> Set to correlation coefficient between index scan order and @@ -1244,17 +1244,17 @@ amcostestimate (PlannerInfo *root, <para> The index access costs should be computed using the parameters used by <filename>src/backend/optimizer/path/costsize.c</filename>: a sequential - disk block fetch has cost <varname>seq_page_cost</>, a nonsequential fetch - has cost <varname>random_page_cost</>, and the cost of processing one index - row should usually be taken as <varname>cpu_index_tuple_cost</>. In - addition, an appropriate multiple of <varname>cpu_operator_cost</> should + disk block fetch has cost <varname>seq_page_cost</varname>, a nonsequential fetch + has cost <varname>random_page_cost</varname>, and the cost of processing one index + row should usually be taken as <varname>cpu_index_tuple_cost</varname>. In + addition, an appropriate multiple of <varname>cpu_operator_cost</varname> should be charged for any comparison operators invoked during index processing (especially evaluation of the indexquals themselves). </para> <para> The access costs should include all disk and CPU costs associated with - scanning the index itself, but <emphasis>not</> the costs of retrieving or + scanning the index itself, but <emphasis>not</emphasis> the costs of retrieving or processing the parent-table rows that are identified by the index. </para> @@ -1266,21 +1266,21 @@ amcostestimate (PlannerInfo *root, </para> <para> - The <parameter>indexSelectivity</> should be set to the estimated fraction of the parent + The <parameter>indexSelectivity</parameter> should be set to the estimated fraction of the parent table rows that will be retrieved during the index scan. In the case of a lossy query, this will typically be higher than the fraction of rows that actually pass the given qual conditions. </para> <para> - The <parameter>indexCorrelation</> should be set to the correlation (ranging between + The <parameter>indexCorrelation</parameter> should be set to the correlation (ranging between -1.0 and 1.0) between the index order and the table order. This is used to adjust the estimate for the cost of fetching rows from the parent table. </para> <para> - When <parameter>loop_count</> is greater than one, the returned numbers + When <parameter>loop_count</parameter> is greater than one, the returned numbers should be averages expected for any one scan of the index. </para> @@ -1307,17 +1307,17 @@ amcostestimate (PlannerInfo *root, <step> <para> Estimate the number of index rows that will be visited during the - scan. For many index types this is the same as <parameter>indexSelectivity</> times + scan. For many index types this is the same as <parameter>indexSelectivity</parameter> times the number of rows in the index, but it might be more. (Note that the index's size in pages and rows is available from the - <literal>path->indexinfo</> struct.) + <literal>path->indexinfo</literal> struct.) </para> </step> <step> <para> Estimate the number of index pages that will be retrieved during the scan. - This might be just <parameter>indexSelectivity</> times the index's size in pages. + This might be just <parameter>indexSelectivity</parameter> times the index's size in pages. </para> </step> diff --git a/doc/src/sgml/indices.sgml b/doc/src/sgml/indices.sgml index e40750e8ec2..4cdd387b7be 100644 --- a/doc/src/sgml/indices.sgml +++ b/doc/src/sgml/indices.sgml @@ -147,14 +147,14 @@ CREATE INDEX test1_id_index ON test1 (id); </simplelist> Constructs equivalent to combinations of these operators, such as - <literal>BETWEEN</> and <literal>IN</>, can also be implemented with - a B-tree index search. Also, an <literal>IS NULL</> or <literal>IS NOT - NULL</> condition on an index column can be used with a B-tree index. + <literal>BETWEEN</literal> and <literal>IN</literal>, can also be implemented with + a B-tree index search. Also, an <literal>IS NULL</literal> or <literal>IS NOT + NULL</literal> condition on an index column can be used with a B-tree index. </para> <para> The optimizer can also use a B-tree index for queries involving the - pattern matching operators <literal>LIKE</> and <literal>~</literal> + pattern matching operators <literal>LIKE</literal> and <literal>~</literal> <emphasis>if</emphasis> the pattern is a constant and is anchored to the beginning of the string — for example, <literal>col LIKE 'foo%'</literal> or <literal>col ~ '^foo'</literal>, but not @@ -206,7 +206,7 @@ CREATE INDEX <replaceable>name</replaceable> ON <replaceable>table</replaceable> within which many different indexing strategies can be implemented. Accordingly, the particular operators with which a GiST index can be used vary depending on the indexing strategy (the <firstterm>operator - class</>). As an example, the standard distribution of + class</firstterm>). As an example, the standard distribution of <productname>PostgreSQL</productname> includes GiST operator classes for several two-dimensional geometric data types, which support indexed queries using these operators: @@ -231,12 +231,12 @@ CREATE INDEX <replaceable>name</replaceable> ON <replaceable>table</replaceable> The GiST operator classes included in the standard distribution are documented in <xref linkend="gist-builtin-opclasses-table">. Many other GiST operator - classes are available in the <literal>contrib</> collection or as separate + classes are available in the <literal>contrib</literal> collection or as separate projects. For more information see <xref linkend="GiST">. </para> <para> - GiST indexes are also capable of optimizing <quote>nearest-neighbor</> + GiST indexes are also capable of optimizing <quote>nearest-neighbor</quote> searches, such as <programlisting><![CDATA[ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; @@ -245,7 +245,7 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; which finds the ten places closest to a given target point. The ability to do this is again dependent on the particular operator class being used. In <xref linkend="gist-builtin-opclasses-table">, operators that can be - used in this way are listed in the column <quote>Ordering Operators</>. + used in this way are listed in the column <quote>Ordering Operators</quote>. </para> <para> @@ -290,7 +290,7 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <primary>GIN</primary> <see>index</see> </indexterm> - GIN indexes are <quote>inverted indexes</> which are appropriate for + GIN indexes are <quote>inverted indexes</quote> which are appropriate for data values that contain multiple component values, such as arrays. An inverted index contains a separate entry for each component value, and can efficiently handle queries that test for the presence of specific @@ -318,7 +318,7 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; The GIN operator classes included in the standard distribution are documented in <xref linkend="gin-builtin-opclasses-table">. Many other GIN operator - classes are available in the <literal>contrib</> collection or as separate + classes are available in the <literal>contrib</literal> collection or as separate projects. For more information see <xref linkend="GIN">. </para> @@ -407,13 +407,13 @@ CREATE INDEX test2_mm_idx ON test2 (major, minor); are checked in the index, so they save visits to the table proper, but they do not reduce the portion of the index that has to be scanned. For example, given an index on <literal>(a, b, c)</literal> and a - query condition <literal>WHERE a = 5 AND b >= 42 AND c < 77</>, + query condition <literal>WHERE a = 5 AND b >= 42 AND c < 77</literal>, the index would have to be scanned from the first entry with - <literal>a</> = 5 and <literal>b</> = 42 up through the last entry with - <literal>a</> = 5. Index entries with <literal>c</> >= 77 would be + <literal>a</literal> = 5 and <literal>b</literal> = 42 up through the last entry with + <literal>a</literal> = 5. Index entries with <literal>c</literal> >= 77 would be skipped, but they'd still have to be scanned through. This index could in principle be used for queries that have constraints - on <literal>b</> and/or <literal>c</> with no constraint on <literal>a</> + on <literal>b</literal> and/or <literal>c</literal> with no constraint on <literal>a</literal> — but the entire index would have to be scanned, so in most cases the planner would prefer a sequential table scan over using the index. </para> @@ -462,17 +462,17 @@ CREATE INDEX test2_mm_idx ON test2 (major, minor); <sect1 id="indexes-ordering"> - <title>Indexes and <literal>ORDER BY</></title> + <title>Indexes and <literal>ORDER BY</literal></title> <indexterm zone="indexes-ordering"> <primary>index</primary> - <secondary>and <literal>ORDER BY</></secondary> + <secondary>and <literal>ORDER BY</literal></secondary> </indexterm> <para> In addition to simply finding the rows to be returned by a query, an index may be able to deliver them in a specific sorted order. - This allows a query's <literal>ORDER BY</> specification to be honored + This allows a query's <literal>ORDER BY</literal> specification to be honored without a separate sorting step. Of the index types currently supported by <productname>PostgreSQL</productname>, only B-tree can produce sorted output — the other index types return @@ -480,7 +480,7 @@ CREATE INDEX test2_mm_idx ON test2 (major, minor); </para> <para> - The planner will consider satisfying an <literal>ORDER BY</> specification + The planner will consider satisfying an <literal>ORDER BY</literal> specification either by scanning an available index that matches the specification, or by scanning the table in physical order and doing an explicit sort. For a query that requires scanning a large fraction of the @@ -488,50 +488,50 @@ CREATE INDEX test2_mm_idx ON test2 (major, minor); because it requires less disk I/O due to following a sequential access pattern. Indexes are more useful when only a few rows need be fetched. An important - special case is <literal>ORDER BY</> in combination with - <literal>LIMIT</> <replaceable>n</>: an explicit sort will have to process - all the data to identify the first <replaceable>n</> rows, but if there is - an index matching the <literal>ORDER BY</>, the first <replaceable>n</> + special case is <literal>ORDER BY</literal> in combination with + <literal>LIMIT</literal> <replaceable>n</replaceable>: an explicit sort will have to process + all the data to identify the first <replaceable>n</replaceable> rows, but if there is + an index matching the <literal>ORDER BY</literal>, the first <replaceable>n</replaceable> rows can be retrieved directly, without scanning the remainder at all. </para> <para> By default, B-tree indexes store their entries in ascending order with nulls last. This means that a forward scan of an index on - column <literal>x</> produces output satisfying <literal>ORDER BY x</> - (or more verbosely, <literal>ORDER BY x ASC NULLS LAST</>). The + column <literal>x</literal> produces output satisfying <literal>ORDER BY x</literal> + (or more verbosely, <literal>ORDER BY x ASC NULLS LAST</literal>). The index can also be scanned backward, producing output satisfying - <literal>ORDER BY x DESC</> - (or more verbosely, <literal>ORDER BY x DESC NULLS FIRST</>, since - <literal>NULLS FIRST</> is the default for <literal>ORDER BY DESC</>). + <literal>ORDER BY x DESC</literal> + (or more verbosely, <literal>ORDER BY x DESC NULLS FIRST</literal>, since + <literal>NULLS FIRST</literal> is the default for <literal>ORDER BY DESC</literal>). </para> <para> You can adjust the ordering of a B-tree index by including the - options <literal>ASC</>, <literal>DESC</>, <literal>NULLS FIRST</>, - and/or <literal>NULLS LAST</> when creating the index; for example: + options <literal>ASC</literal>, <literal>DESC</literal>, <literal>NULLS FIRST</literal>, + and/or <literal>NULLS LAST</literal> when creating the index; for example: <programlisting> CREATE INDEX test2_info_nulls_low ON test2 (info NULLS FIRST); CREATE INDEX test3_desc_index ON test3 (id DESC NULLS LAST); </programlisting> An index stored in ascending order with nulls first can satisfy - either <literal>ORDER BY x ASC NULLS FIRST</> or - <literal>ORDER BY x DESC NULLS LAST</> depending on which direction + either <literal>ORDER BY x ASC NULLS FIRST</literal> or + <literal>ORDER BY x DESC NULLS LAST</literal> depending on which direction it is scanned in. </para> <para> You might wonder why bother providing all four options, when two options together with the possibility of backward scan would cover - all the variants of <literal>ORDER BY</>. In single-column indexes + all the variants of <literal>ORDER BY</literal>. In single-column indexes the options are indeed redundant, but in multicolumn indexes they can be - useful. Consider a two-column index on <literal>(x, y)</>: this can - satisfy <literal>ORDER BY x, y</> if we scan forward, or - <literal>ORDER BY x DESC, y DESC</> if we scan backward. + useful. Consider a two-column index on <literal>(x, y)</literal>: this can + satisfy <literal>ORDER BY x, y</literal> if we scan forward, or + <literal>ORDER BY x DESC, y DESC</literal> if we scan backward. But it might be that the application frequently needs to use - <literal>ORDER BY x ASC, y DESC</>. There is no way to get that + <literal>ORDER BY x ASC, y DESC</literal>. There is no way to get that ordering from a plain index, but it is possible if the index is defined - as <literal>(x ASC, y DESC)</> or <literal>(x DESC, y ASC)</>. + as <literal>(x ASC, y DESC)</literal> or <literal>(x DESC, y ASC)</literal>. </para> <para> @@ -559,38 +559,38 @@ CREATE INDEX test3_desc_index ON test3 (id DESC NULLS LAST); <para> A single index scan can only use query clauses that use the index's columns with operators of its operator class and are joined with - <literal>AND</>. For example, given an index on <literal>(a, b)</literal> - a query condition like <literal>WHERE a = 5 AND b = 6</> could - use the index, but a query like <literal>WHERE a = 5 OR b = 6</> could not + <literal>AND</literal>. For example, given an index on <literal>(a, b)</literal> + a query condition like <literal>WHERE a = 5 AND b = 6</literal> could + use the index, but a query like <literal>WHERE a = 5 OR b = 6</literal> could not directly use the index. </para> <para> Fortunately, - <productname>PostgreSQL</> has the ability to combine multiple indexes + <productname>PostgreSQL</productname> has the ability to combine multiple indexes (including multiple uses of the same index) to handle cases that cannot - be implemented by single index scans. The system can form <literal>AND</> - and <literal>OR</> conditions across several index scans. For example, - a query like <literal>WHERE x = 42 OR x = 47 OR x = 53 OR x = 99</> - could be broken down into four separate scans of an index on <literal>x</>, + be implemented by single index scans. The system can form <literal>AND</literal> + and <literal>OR</literal> conditions across several index scans. For example, + a query like <literal>WHERE x = 42 OR x = 47 OR x = 53 OR x = 99</literal> + could be broken down into four separate scans of an index on <literal>x</literal>, each scan using one of the query clauses. The results of these scans are then ORed together to produce the result. Another example is that if we - have separate indexes on <literal>x</> and <literal>y</>, one possible - implementation of a query like <literal>WHERE x = 5 AND y = 6</> is to + have separate indexes on <literal>x</literal> and <literal>y</literal>, one possible + implementation of a query like <literal>WHERE x = 5 AND y = 6</literal> is to use each index with the appropriate query clause and then AND together the index results to identify the result rows. </para> <para> To combine multiple indexes, the system scans each needed index and - prepares a <firstterm>bitmap</> in memory giving the locations of + prepares a <firstterm>bitmap</firstterm> in memory giving the locations of table rows that are reported as matching that index's conditions. The bitmaps are then ANDed and ORed together as needed by the query. Finally, the actual table rows are visited and returned. The table rows are visited in physical order, because that is how the bitmap is laid out; this means that any ordering of the original indexes is lost, and so a separate sort step will be needed if the query has an <literal>ORDER - BY</> clause. For this reason, and because each additional index scan + BY</literal> clause. For this reason, and because each additional index scan adds extra time, the planner will sometimes choose to use a simple index scan even though additional indexes are available that could have been used as well. @@ -603,19 +603,19 @@ CREATE INDEX test3_desc_index ON test3 (id DESC NULLS LAST); indexes are best, but sometimes it's better to create separate indexes and rely on the index-combination feature. For example, if your workload includes a mix of queries that sometimes involve only column - <literal>x</>, sometimes only column <literal>y</>, and sometimes both + <literal>x</literal>, sometimes only column <literal>y</literal>, and sometimes both columns, you might choose to create two separate indexes on - <literal>x</> and <literal>y</>, relying on index combination to + <literal>x</literal> and <literal>y</literal>, relying on index combination to process the queries that use both columns. You could also create a - multicolumn index on <literal>(x, y)</>. This index would typically be + multicolumn index on <literal>(x, y)</literal>. This index would typically be more efficient than index combination for queries involving both columns, but as discussed in <xref linkend="indexes-multicolumn">, it - would be almost useless for queries involving only <literal>y</>, so it + would be almost useless for queries involving only <literal>y</literal>, so it should not be the only index. A combination of the multicolumn index - and a separate index on <literal>y</> would serve reasonably well. For - queries involving only <literal>x</>, the multicolumn index could be + and a separate index on <literal>y</literal> would serve reasonably well. For + queries involving only <literal>x</literal>, the multicolumn index could be used, though it would be larger and hence slower than an index on - <literal>x</> alone. The last alternative is to create all three + <literal>x</literal> alone. The last alternative is to create all three indexes, but this is probably only reasonable if the table is searched much more often than it is updated and all three types of query are common. If one of the types of query is much less common than the @@ -698,9 +698,9 @@ CREATE INDEX test1_lower_col1_idx ON test1 (lower(col1)); </para> <para> - If we were to declare this index <literal>UNIQUE</>, it would prevent - creation of rows whose <literal>col1</> values differ only in case, - as well as rows whose <literal>col1</> values are actually identical. + If we were to declare this index <literal>UNIQUE</literal>, it would prevent + creation of rows whose <literal>col1</literal> values differ only in case, + as well as rows whose <literal>col1</literal> values are actually identical. Thus, indexes on expressions can be used to enforce constraints that are not definable as simple unique constraints. </para> @@ -717,7 +717,7 @@ CREATE INDEX people_names ON people ((first_name || ' ' || last_name)); </para> <para> - The syntax of the <command>CREATE INDEX</> command normally requires + The syntax of the <command>CREATE INDEX</command> command normally requires writing parentheses around index expressions, as shown in the second example. The parentheses can be omitted when the expression is just a function call, as in the first example. @@ -727,9 +727,9 @@ CREATE INDEX people_names ON people ((first_name || ' ' || last_name)); Index expressions are relatively expensive to maintain, because the derived expression(s) must be computed for each row upon insertion and whenever it is updated. However, the index expressions are - <emphasis>not</> recomputed during an indexed search, since they are + <emphasis>not</emphasis> recomputed during an indexed search, since they are already stored in the index. In both examples above, the system - sees the query as just <literal>WHERE indexedcolumn = 'constant'</> + sees the query as just <literal>WHERE indexedcolumn = 'constant'</literal> and so the speed of the search is equivalent to any other simple index query. Thus, indexes on expressions are useful when retrieval speed is more important than insertion and update speed. @@ -856,12 +856,12 @@ CREATE INDEX orders_unbilled_index ON orders (order_nr) SELECT * FROM orders WHERE billed is not true AND order_nr < 10000; </programlisting> However, the index can also be used in queries that do not involve - <structfield>order_nr</> at all, e.g.: + <structfield>order_nr</structfield> at all, e.g.: <programlisting> SELECT * FROM orders WHERE billed is not true AND amount > 5000.00; </programlisting> This is not as efficient as a partial index on the - <structfield>amount</> column would be, since the system has to + <structfield>amount</structfield> column would be, since the system has to scan the entire index. Yet, if there are relatively few unbilled orders, using this partial index just to find the unbilled orders could be a win. @@ -886,7 +886,7 @@ SELECT * FROM orders WHERE order_nr = 3501; predicate must match the conditions used in the queries that are supposed to benefit from the index. To be precise, a partial index can be used in a query only if the system can recognize that - the <literal>WHERE</> condition of the query mathematically implies + the <literal>WHERE</literal> condition of the query mathematically implies the predicate of the index. <productname>PostgreSQL</productname> does not have a sophisticated theorem prover that can recognize mathematically equivalent @@ -896,7 +896,7 @@ SELECT * FROM orders WHERE order_nr = 3501; The system can recognize simple inequality implications, for example <quote>x < 1</quote> implies <quote>x < 2</quote>; otherwise the predicate condition must exactly match part of the query's - <literal>WHERE</> condition + <literal>WHERE</literal> condition or the index will not be recognized as usable. Matching takes place at query planning time, not at run time. As a result, parameterized query clauses do not work with a partial index. For @@ -919,9 +919,9 @@ SELECT * FROM orders WHERE order_nr = 3501; <para> Suppose that we have a table describing test outcomes. We wish - to ensure that there is only one <quote>successful</> entry for + to ensure that there is only one <quote>successful</quote> entry for a given subject and target combination, but there might be any number of - <quote>unsuccessful</> entries. Here is one way to do it: + <quote>unsuccessful</quote> entries. Here is one way to do it: <programlisting> CREATE TABLE tests ( subject text, @@ -944,7 +944,7 @@ CREATE UNIQUE INDEX tests_success_constraint ON tests (subject, target) distributions might cause the system to use an index when it really should not. In that case the index can be set up so that it is not available for the offending query. Normally, - <productname>PostgreSQL</> makes reasonable choices about index + <productname>PostgreSQL</productname> makes reasonable choices about index usage (e.g., it avoids them when retrieving common values, so the earlier example really only saves index size, it is not required to avoid index usage), and grossly incorrect plan choices are cause @@ -956,7 +956,7 @@ CREATE UNIQUE INDEX tests_success_constraint ON tests (subject, target) know at least as much as the query planner knows, in particular you know when an index might be profitable. Forming this knowledge requires experience and understanding of how indexes in - <productname>PostgreSQL</> work. In most cases, the advantage of a + <productname>PostgreSQL</productname> work. In most cases, the advantage of a partial index over a regular index will be minimal. </para> @@ -998,8 +998,8 @@ CREATE INDEX <replaceable>name</replaceable> ON <replaceable>table</replaceable> the proper class when making an index. The operator class determines the basic sort ordering (which can then be modified by adding sort options <literal>COLLATE</literal>, - <literal>ASC</>/<literal>DESC</> and/or - <literal>NULLS FIRST</>/<literal>NULLS LAST</>). + <literal>ASC</literal>/<literal>DESC</literal> and/or + <literal>NULLS FIRST</literal>/<literal>NULLS LAST</literal>). </para> <para> @@ -1025,8 +1025,8 @@ CREATE INDEX <replaceable>name</replaceable> ON <replaceable>table</replaceable> CREATE INDEX test_index ON test_table (col varchar_pattern_ops); </programlisting> Note that you should also create an index with the default operator - class if you want queries involving ordinary <literal><</>, - <literal><=</>, <literal>></>, or <literal>>=</> comparisons + class if you want queries involving ordinary <literal><</literal>, + <literal><=</literal>, <literal>></literal>, or <literal>>=</literal> comparisons to use an index. Such queries cannot use the <literal><replaceable>xxx</replaceable>_pattern_ops</literal> operator classes. (Ordinary equality comparisons can use these @@ -1057,7 +1057,7 @@ SELECT am.amname AS index_method, <para> An operator class is actually just a subset of a larger structure called an - <firstterm>operator family</>. In cases where several data types have + <firstterm>operator family</firstterm>. In cases where several data types have similar behaviors, it is frequently useful to define cross-data-type operators and allow these to work with indexes. To do this, the operator classes for each of the types must be grouped into the same operator @@ -1147,13 +1147,13 @@ CREATE INDEX test1c_content_y_index ON test1c (content COLLATE "y"); </indexterm> <para> - All indexes in <productname>PostgreSQL</> are <firstterm>secondary</> + All indexes in <productname>PostgreSQL</productname> are <firstterm>secondary</firstterm> indexes, meaning that each index is stored separately from the table's - main data area (which is called the table's <firstterm>heap</> - in <productname>PostgreSQL</> terminology). This means that in an + main data area (which is called the table's <firstterm>heap</firstterm> + in <productname>PostgreSQL</productname> terminology). This means that in an ordinary index scan, each row retrieval requires fetching data from both the index and the heap. Furthermore, while the index entries that match a - given indexable <literal>WHERE</> condition are usually close together in + given indexable <literal>WHERE</literal> condition are usually close together in the index, the table rows they reference might be anywhere in the heap. The heap-access portion of an index scan thus involves a lot of random access into the heap, which can be slow, particularly on traditional @@ -1163,8 +1163,8 @@ CREATE INDEX test1c_content_y_index ON test1c (content COLLATE "y"); </para> <para> - To solve this performance problem, <productname>PostgreSQL</> - supports <firstterm>index-only scans</>, which can answer queries from an + To solve this performance problem, <productname>PostgreSQL</productname> + supports <firstterm>index-only scans</firstterm>, which can answer queries from an index alone without any heap access. The basic idea is to return values directly out of each index entry instead of consulting the associated heap entry. There are two fundamental restrictions on when this method can be @@ -1187,8 +1187,8 @@ CREATE INDEX test1c_content_y_index ON test1c (content COLLATE "y"); <listitem> <para> The query must reference only columns stored in the index. For - example, given an index on columns <literal>x</> and <literal>y</> of a - table that also has a column <literal>z</>, these queries could use + example, given an index on columns <literal>x</literal> and <literal>y</literal> of a + table that also has a column <literal>z</literal>, these queries could use index-only scans: <programlisting> SELECT x, y FROM tab WHERE x = 'key'; @@ -1210,17 +1210,17 @@ SELECT x FROM tab WHERE x = 'key' AND z < 42; If these two fundamental requirements are met, then all the data values required by the query are available from the index, so an index-only scan is physically possible. But there is an additional requirement for any - table scan in <productname>PostgreSQL</>: it must verify that each - retrieved row be <quote>visible</> to the query's MVCC snapshot, as + table scan in <productname>PostgreSQL</productname>: it must verify that each + retrieved row be <quote>visible</quote> to the query's MVCC snapshot, as discussed in <xref linkend="mvcc">. Visibility information is not stored in index entries, only in heap entries; so at first glance it would seem that every row retrieval would require a heap access anyway. And this is indeed the case, if the table row has been modified recently. However, for seldom-changing data there is a way around this - problem. <productname>PostgreSQL</> tracks, for each page in a table's + problem. <productname>PostgreSQL</productname> tracks, for each page in a table's heap, whether all rows stored in that page are old enough to be visible to all current and future transactions. This information is stored in a bit - in the table's <firstterm>visibility map</>. An index-only scan, after + in the table's <firstterm>visibility map</firstterm>. An index-only scan, after finding a candidate index entry, checks the visibility map bit for the corresponding heap page. If it's set, the row is known visible and so the data can be returned with no further work. If it's not set, the heap @@ -1243,48 +1243,48 @@ SELECT x FROM tab WHERE x = 'key' AND z < 42; <para> To make effective use of the index-only scan feature, you might choose to create indexes in which only the leading columns are meant to - match <literal>WHERE</> clauses, while the trailing columns - hold <quote>payload</> data to be returned by a query. For example, if + match <literal>WHERE</literal> clauses, while the trailing columns + hold <quote>payload</quote> data to be returned by a query. For example, if you commonly run queries like <programlisting> SELECT y FROM tab WHERE x = 'key'; </programlisting> the traditional approach to speeding up such queries would be to create an - index on <literal>x</> only. However, an index on <literal>(x, y)</> + index on <literal>x</literal> only. However, an index on <literal>(x, y)</literal> would offer the possibility of implementing this query as an index-only scan. As previously discussed, such an index would be larger and hence - more expensive than an index on <literal>x</> alone, so this is attractive + more expensive than an index on <literal>x</literal> alone, so this is attractive only if the table is known to be mostly static. Note it's important that - the index be declared on <literal>(x, y)</> not <literal>(y, x)</>, as for + the index be declared on <literal>(x, y)</literal> not <literal>(y, x)</literal>, as for most index types (particularly B-trees) searches that do not constrain the leading index columns are not very efficient. </para> <para> In principle, index-only scans can be used with expression indexes. - For example, given an index on <literal>f(x)</> where <literal>x</> is a + For example, given an index on <literal>f(x)</literal> where <literal>x</literal> is a table column, it should be possible to execute <programlisting> SELECT f(x) FROM tab WHERE f(x) < 1; </programlisting> - as an index-only scan; and this is very attractive if <literal>f()</> is - an expensive-to-compute function. However, <productname>PostgreSQL</>'s + as an index-only scan; and this is very attractive if <literal>f()</literal> is + an expensive-to-compute function. However, <productname>PostgreSQL</productname>'s planner is currently not very smart about such cases. It considers a query to be potentially executable by index-only scan only when - all <emphasis>columns</> needed by the query are available from the index. - In this example, <literal>x</> is not needed except in the - context <literal>f(x)</>, but the planner does not notice that and + all <emphasis>columns</emphasis> needed by the query are available from the index. + In this example, <literal>x</literal> is not needed except in the + context <literal>f(x)</literal>, but the planner does not notice that and concludes that an index-only scan is not possible. If an index-only scan seems sufficiently worthwhile, this can be worked around by declaring the - index to be on <literal>(f(x), x)</>, where the second column is not + index to be on <literal>(f(x), x)</literal>, where the second column is not expected to be used in practice but is just there to convince the planner that an index-only scan is possible. An additional caveat, if the goal is - to avoid recalculating <literal>f(x)</>, is that the planner won't - necessarily match uses of <literal>f(x)</> that aren't in - indexable <literal>WHERE</> clauses to the index column. It will usually + to avoid recalculating <literal>f(x)</literal>, is that the planner won't + necessarily match uses of <literal>f(x)</literal> that aren't in + indexable <literal>WHERE</literal> clauses to the index column. It will usually get this right in simple queries such as shown above, but not in queries that involve joins. These deficiencies may be remedied in future versions - of <productname>PostgreSQL</>. + of <productname>PostgreSQL</productname>. </para> <para> @@ -1299,13 +1299,13 @@ CREATE UNIQUE INDEX tests_success_constraint ON tests (subject, target) <programlisting> SELECT target FROM tests WHERE subject = 'some-subject' AND success; </programlisting> - But there's a problem: the <literal>WHERE</> clause refers - to <literal>success</> which is not available as a result column of the + But there's a problem: the <literal>WHERE</literal> clause refers + to <literal>success</literal> which is not available as a result column of the index. Nonetheless, an index-only scan is possible because the plan does - not need to recheck that part of the <literal>WHERE</> clause at run time: - all entries found in the index necessarily have <literal>success = true</> + not need to recheck that part of the <literal>WHERE</literal> clause at run time: + all entries found in the index necessarily have <literal>success = true</literal> so this need not be explicitly checked in the - plan. <productname>PostgreSQL</> versions 9.6 and later will recognize + plan. <productname>PostgreSQL</productname> versions 9.6 and later will recognize such cases and allow index-only scans to be generated, but older versions will not. </para> @@ -1321,7 +1321,7 @@ SELECT target FROM tests WHERE subject = 'some-subject' AND success; </indexterm> <para> - Although indexes in <productname>PostgreSQL</> do not need + Although indexes in <productname>PostgreSQL</productname> do not need maintenance or tuning, it is still important to check which indexes are actually used by the real-life query workload. Examining index usage for an individual query is done with the @@ -1388,8 +1388,8 @@ SELECT target FROM tests WHERE subject = 'some-subject' AND success; their use. There are run-time parameters that can turn off various plan types (see <xref linkend="runtime-config-query-enable">). For instance, turning off sequential scans - (<varname>enable_seqscan</>) and nested-loop joins - (<varname>enable_nestloop</>), which are the most basic plans, + (<varname>enable_seqscan</varname>) and nested-loop joins + (<varname>enable_nestloop</varname>), which are the most basic plans, will force the system to use a different plan. If the system still chooses a sequential scan or nested-loop join then there is probably a more fundamental reason why the index is not being @@ -1428,7 +1428,7 @@ SELECT target FROM tests WHERE subject = 'some-subject' AND success; If you do not succeed in adjusting the costs to be more appropriate, then you might have to resort to forcing index usage explicitly. You might also want to contact the - <productname>PostgreSQL</> developers to examine the issue. + <productname>PostgreSQL</productname> developers to examine the issue. </para> </listitem> </itemizedlist> diff --git a/doc/src/sgml/info.sgml b/doc/src/sgml/info.sgml index 233ba0e6687..6b9f1b5d814 100644 --- a/doc/src/sgml/info.sgml +++ b/doc/src/sgml/info.sgml @@ -15,9 +15,9 @@ <para> The <productname>PostgreSQL</productname> <ulink url="https://wiki.postgresql.org">wiki</ulink> contains the project's <ulink - url="https://wiki.postgresql.org/wiki/Frequently_Asked_Questions">FAQ</> + url="https://wiki.postgresql.org/wiki/Frequently_Asked_Questions">FAQ</ulink> (Frequently Asked Questions) list, <ulink - url="https://wiki.postgresql.org/wiki/Todo">TODO</> list, and + url="https://wiki.postgresql.org/wiki/Todo">TODO</ulink> list, and detailed information about many more topics. </para> </listitem> @@ -42,7 +42,7 @@ <para> The mailing lists are a good place to have your questions answered, to share experiences with other users, and to contact - the developers. Consult the <productname>PostgreSQL</> web site + the developers. Consult the <productname>PostgreSQL</productname> web site for details. </para> </listitem> diff --git a/doc/src/sgml/information_schema.sgml b/doc/src/sgml/information_schema.sgml index e07ff35bca0..58c54254d7b 100644 --- a/doc/src/sgml/information_schema.sgml +++ b/doc/src/sgml/information_schema.sgml @@ -35,12 +35,12 @@ <para> This problem can appear when querying information schema views such - as <literal>check_constraint_routine_usage</>, - <literal>check_constraints</>, <literal>domain_constraints</>, and - <literal>referential_constraints</>. Some other views have similar + as <literal>check_constraint_routine_usage</literal>, + <literal>check_constraints</literal>, <literal>domain_constraints</literal>, and + <literal>referential_constraints</literal>. Some other views have similar issues but contain the table name to help distinguish duplicate - rows, e.g., <literal>constraint_column_usage</>, - <literal>constraint_table_usage</>, <literal>table_constraints</>. + rows, e.g., <literal>constraint_column_usage</literal>, + <literal>constraint_table_usage</literal>, <literal>table_constraints</literal>. </para> </note> @@ -384,19 +384,19 @@ <row> <entry><literal>character_set_catalog</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>character_set_schema</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>character_set_name</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> @@ -535,25 +535,25 @@ <row> <entry><literal>scope_catalog</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>scope_schema</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>scope_name</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>maximum_cardinality</literal></entry> <entry><type>cardinal_number</type></entry> - <entry>Always null, because arrays always have unlimited maximum cardinality in <productname>PostgreSQL</></entry> + <entry>Always null, because arrays always have unlimited maximum cardinality in <productname>PostgreSQL</productname></entry> </row> <row> @@ -572,7 +572,7 @@ <row> <entry><literal>is_derived_reference_attribute</literal></entry> <entry><type>yes_or_no</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> </tbody> </tgroup> @@ -1256,7 +1256,7 @@ <para> The view <literal>columns</literal> contains information about all table columns (or view columns) in the database. System columns - (<literal>oid</>, etc.) are not included. Only those columns are + (<literal>oid</literal>, etc.) are not included. Only those columns are shown that the current user has access to (by way of being the owner or having some privilege). </para> @@ -1441,19 +1441,19 @@ <row> <entry><literal>character_set_catalog</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>character_set_schema</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>character_set_name</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> @@ -1540,25 +1540,25 @@ <row> <entry><literal>scope_catalog</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>scope_schema</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>scope_name</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>maximum_cardinality</literal></entry> <entry><type>cardinal_number</type></entry> - <entry>Always null, because arrays always have unlimited maximum cardinality in <productname>PostgreSQL</></entry> + <entry>Always null, because arrays always have unlimited maximum cardinality in <productname>PostgreSQL</productname></entry> </row> <row> @@ -1577,7 +1577,7 @@ <row> <entry><literal>is_self_referencing</literal></entry> <entry><type>yes_or_no</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> @@ -1648,13 +1648,13 @@ <row> <entry><literal>is_generated</literal></entry> <entry><type>character_data</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>generation_expression</literal></entry> <entry><type>character_data</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> @@ -2152,19 +2152,19 @@ <row> <entry><literal>character_set_catalog</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>character_set_schema</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>character_set_name</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> @@ -2300,25 +2300,25 @@ <row> <entry><literal>scope_catalog</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>scope_schema</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>scope_name</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>maximum_cardinality</literal></entry> <entry><type>cardinal_number</type></entry> - <entry>Always null, because arrays always have unlimited maximum cardinality in <productname>PostgreSQL</></entry> + <entry>Always null, because arrays always have unlimited maximum cardinality in <productname>PostgreSQL</productname></entry> </row> <row> @@ -2442,31 +2442,31 @@ ORDER BY c.ordinal_position; <row> <entry><literal>character_maximum_length</literal></entry> <entry><type>cardinal_number</type></entry> - <entry>Always null, since this information is not applied to array element data types in <productname>PostgreSQL</></entry> + <entry>Always null, since this information is not applied to array element data types in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>character_octet_length</literal></entry> <entry><type>cardinal_number</type></entry> - <entry>Always null, since this information is not applied to array element data types in <productname>PostgreSQL</></entry> + <entry>Always null, since this information is not applied to array element data types in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>character_set_catalog</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>character_set_schema</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>character_set_name</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> @@ -2501,37 +2501,37 @@ ORDER BY c.ordinal_position; <row> <entry><literal>numeric_precision</literal></entry> <entry><type>cardinal_number</type></entry> - <entry>Always null, since this information is not applied to array element data types in <productname>PostgreSQL</></entry> + <entry>Always null, since this information is not applied to array element data types in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>numeric_precision_radix</literal></entry> <entry><type>cardinal_number</type></entry> - <entry>Always null, since this information is not applied to array element data types in <productname>PostgreSQL</></entry> + <entry>Always null, since this information is not applied to array element data types in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>numeric_scale</literal></entry> <entry><type>cardinal_number</type></entry> - <entry>Always null, since this information is not applied to array element data types in <productname>PostgreSQL</></entry> + <entry>Always null, since this information is not applied to array element data types in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>datetime_precision</literal></entry> <entry><type>cardinal_number</type></entry> - <entry>Always null, since this information is not applied to array element data types in <productname>PostgreSQL</></entry> + <entry>Always null, since this information is not applied to array element data types in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>interval_type</literal></entry> <entry><type>character_data</type></entry> - <entry>Always null, since this information is not applied to array element data types in <productname>PostgreSQL</></entry> + <entry>Always null, since this information is not applied to array element data types in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>interval_precision</literal></entry> <entry><type>cardinal_number</type></entry> - <entry>Always null, since this information is not applied to array element data types in <productname>PostgreSQL</></entry> + <entry>Always null, since this information is not applied to array element data types in <productname>PostgreSQL</productname></entry> </row> <row> @@ -2569,25 +2569,25 @@ ORDER BY c.ordinal_position; <row> <entry><literal>scope_catalog</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>scope_schema</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>scope_name</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>maximum_cardinality</literal></entry> <entry><type>cardinal_number</type></entry> - <entry>Always null, because arrays always have unlimited maximum cardinality in <productname>PostgreSQL</></entry> + <entry>Always null, because arrays always have unlimited maximum cardinality in <productname>PostgreSQL</productname></entry> </row> <row> @@ -3160,13 +3160,13 @@ ORDER BY c.ordinal_position; <row> <entry><literal>is_result</literal></entry> <entry><type>yes_or_no</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>as_locator</literal></entry> <entry><type>yes_or_no</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> @@ -3191,85 +3191,85 @@ ORDER BY c.ordinal_position; <row> <entry><literal>character_maximum_length</literal></entry> <entry><type>cardinal_number</type></entry> - <entry>Always null, since this information is not applied to parameter data types in <productname>PostgreSQL</></entry> + <entry>Always null, since this information is not applied to parameter data types in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>character_octet_length</literal></entry> <entry><type>cardinal_number</type></entry> - <entry>Always null, since this information is not applied to parameter data types in <productname>PostgreSQL</></entry> + <entry>Always null, since this information is not applied to parameter data types in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>character_set_catalog</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>character_set_schema</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>character_set_name</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>collation_catalog</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Always null, since this information is not applied to parameter data types in <productname>PostgreSQL</></entry> + <entry>Always null, since this information is not applied to parameter data types in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>collation_schema</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Always null, since this information is not applied to parameter data types in <productname>PostgreSQL</></entry> + <entry>Always null, since this information is not applied to parameter data types in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>collation_name</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Always null, since this information is not applied to parameter data types in <productname>PostgreSQL</></entry> + <entry>Always null, since this information is not applied to parameter data types in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>numeric_precision</literal></entry> <entry><type>cardinal_number</type></entry> - <entry>Always null, since this information is not applied to parameter data types in <productname>PostgreSQL</></entry> + <entry>Always null, since this information is not applied to parameter data types in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>numeric_precision_radix</literal></entry> <entry><type>cardinal_number</type></entry> - <entry>Always null, since this information is not applied to parameter data types in <productname>PostgreSQL</></entry> + <entry>Always null, since this information is not applied to parameter data types in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>numeric_scale</literal></entry> <entry><type>cardinal_number</type></entry> - <entry>Always null, since this information is not applied to parameter data types in <productname>PostgreSQL</></entry> + <entry>Always null, since this information is not applied to parameter data types in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>datetime_precision</literal></entry> <entry><type>cardinal_number</type></entry> - <entry>Always null, since this information is not applied to parameter data types in <productname>PostgreSQL</></entry> + <entry>Always null, since this information is not applied to parameter data types in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>interval_type</literal></entry> <entry><type>character_data</type></entry> - <entry>Always null, since this information is not applied to parameter data types in <productname>PostgreSQL</></entry> + <entry>Always null, since this information is not applied to parameter data types in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>interval_precision</literal></entry> <entry><type>cardinal_number</type></entry> - <entry>Always null, since this information is not applied to parameter data types in <productname>PostgreSQL</></entry> + <entry>Always null, since this information is not applied to parameter data types in <productname>PostgreSQL</productname></entry> </row> <row> @@ -3301,25 +3301,25 @@ ORDER BY c.ordinal_position; <row> <entry><literal>scope_catalog</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>scope_schema</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>scope_name</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>maximum_cardinality</literal></entry> <entry><type>cardinal_number</type></entry> - <entry>Always null, because arrays always have unlimited maximum cardinality in <productname>PostgreSQL</></entry> + <entry>Always null, because arrays always have unlimited maximum cardinality in <productname>PostgreSQL</productname></entry> </row> <row> @@ -4045,37 +4045,37 @@ ORDER BY c.ordinal_position; <row> <entry><literal>module_catalog</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>module_schema</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>module_name</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>udt_catalog</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>udt_schema</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>udt_name</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> @@ -4094,85 +4094,85 @@ ORDER BY c.ordinal_position; <row> <entry><literal>character_maximum_length</literal></entry> <entry><type>cardinal_number</type></entry> - <entry>Always null, since this information is not applied to return data types in <productname>PostgreSQL</></entry> + <entry>Always null, since this information is not applied to return data types in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>character_octet_length</literal></entry> <entry><type>cardinal_number</type></entry> - <entry>Always null, since this information is not applied to return data types in <productname>PostgreSQL</></entry> + <entry>Always null, since this information is not applied to return data types in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>character_set_catalog</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>character_set_schema</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>character_set_name</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>collation_catalog</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Always null, since this information is not applied to return data types in <productname>PostgreSQL</></entry> + <entry>Always null, since this information is not applied to return data types in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>collation_schema</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Always null, since this information is not applied to return data types in <productname>PostgreSQL</></entry> + <entry>Always null, since this information is not applied to return data types in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>collation_name</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Always null, since this information is not applied to return data types in <productname>PostgreSQL</></entry> + <entry>Always null, since this information is not applied to return data types in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>numeric_precision</literal></entry> <entry><type>cardinal_number</type></entry> - <entry>Always null, since this information is not applied to return data types in <productname>PostgreSQL</></entry> + <entry>Always null, since this information is not applied to return data types in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>numeric_precision_radix</literal></entry> <entry><type>cardinal_number</type></entry> - <entry>Always null, since this information is not applied to return data types in <productname>PostgreSQL</></entry> + <entry>Always null, since this information is not applied to return data types in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>numeric_scale</literal></entry> <entry><type>cardinal_number</type></entry> - <entry>Always null, since this information is not applied to return data types in <productname>PostgreSQL</></entry> + <entry>Always null, since this information is not applied to return data types in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>datetime_precision</literal></entry> <entry><type>cardinal_number</type></entry> - <entry>Always null, since this information is not applied to return data types in <productname>PostgreSQL</></entry> + <entry>Always null, since this information is not applied to return data types in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>interval_type</literal></entry> <entry><type>character_data</type></entry> - <entry>Always null, since this information is not applied to return data types in <productname>PostgreSQL</></entry> + <entry>Always null, since this information is not applied to return data types in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>interval_precision</literal></entry> <entry><type>cardinal_number</type></entry> - <entry>Always null, since this information is not applied to return data types in <productname>PostgreSQL</></entry> + <entry>Always null, since this information is not applied to return data types in <productname>PostgreSQL</productname></entry> </row> <row> @@ -4204,25 +4204,25 @@ ORDER BY c.ordinal_position; <row> <entry><literal>scope_catalog</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>scope_schema</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>scope_name</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>maximum_cardinality</literal></entry> <entry><type>cardinal_number</type></entry> - <entry>Always null, because arrays always have unlimited maximum cardinality in <productname>PostgreSQL</></entry> + <entry>Always null, because arrays always have unlimited maximum cardinality in <productname>PostgreSQL</productname></entry> </row> <row> @@ -4283,7 +4283,7 @@ ORDER BY c.ordinal_position; <entry><type>character_data</type></entry> <entry> Always <literal>GENERAL</literal> (The SQL standard defines - other parameter styles, which are not available in <productname>PostgreSQL</>.) + other parameter styles, which are not available in <productname>PostgreSQL</productname>.) </entry> </row> @@ -4294,7 +4294,7 @@ ORDER BY c.ordinal_position; If the function is declared immutable (called deterministic in the SQL standard), then <literal>YES</literal>, else <literal>NO</literal>. (You cannot query the other volatility - levels available in <productname>PostgreSQL</> through the information schema.) + levels available in <productname>PostgreSQL</productname> through the information schema.) </entry> </row> @@ -4304,7 +4304,7 @@ ORDER BY c.ordinal_position; <entry> Always <literal>MODIFIES</literal>, meaning that the function possibly modifies SQL data. This information is not useful for - <productname>PostgreSQL</>. + <productname>PostgreSQL</productname>. </entry> </row> @@ -4321,7 +4321,7 @@ ORDER BY c.ordinal_position; <row> <entry><literal>sql_path</literal></entry> <entry><type>character_data</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> @@ -4330,26 +4330,26 @@ ORDER BY c.ordinal_position; <entry> Always <literal>YES</literal> (The opposite would be a method of a user-defined type, which is a feature not available in - <productname>PostgreSQL</>.) + <productname>PostgreSQL</productname>.) </entry> </row> <row> <entry><literal>max_dynamic_result_sets</literal></entry> <entry><type>cardinal_number</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>is_user_defined_cast</literal></entry> <entry><type>yes_or_no</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>is_implicitly_invocable</literal></entry> <entry><type>yes_or_no</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> @@ -4366,43 +4366,43 @@ ORDER BY c.ordinal_position; <row> <entry><literal>to_sql_specific_catalog</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>to_sql_specific_schema</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>to_sql_specific_name</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>as_locator</literal></entry> <entry><type>yes_or_no</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>created</literal></entry> <entry><type>time_stamp</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>last_altered</literal></entry> <entry><type>time_stamp</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>new_savepoint_level</literal></entry> <entry><type>yes_or_no</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> @@ -4411,152 +4411,152 @@ ORDER BY c.ordinal_position; <entry> Currently always <literal>NO</literal>. The alternative <literal>YES</literal> applies to a feature not available in - <productname>PostgreSQL</>. + <productname>PostgreSQL</productname>. </entry> </row> <row> <entry><literal>result_cast_from_data_type</literal></entry> <entry><type>character_data</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>result_cast_as_locator</literal></entry> <entry><type>yes_or_no</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>result_cast_char_max_length</literal></entry> <entry><type>cardinal_number</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>result_cast_char_octet_length</literal></entry> <entry><type>character_data</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>result_cast_char_set_catalog</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>result_cast_char_set_schema</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>result_cast_char_set_name</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>result_cast_collation_catalog</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>result_cast_collation_schema</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>result_cast_collation_name</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>result_cast_numeric_precision</literal></entry> <entry><type>cardinal_number</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>result_cast_numeric_precision_radix</literal></entry> <entry><type>cardinal_number</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>result_cast_numeric_scale</literal></entry> <entry><type>cardinal_number</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>result_cast_datetime_precision</literal></entry> <entry><type>character_data</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>result_cast_interval_type</literal></entry> <entry><type>character_data</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>result_cast_interval_precision</literal></entry> <entry><type>cardinal_number</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>result_cast_type_udt_catalog</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>result_cast_type_udt_schema</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>result_cast_type_udt_name</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>result_cast_scope_catalog</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>result_cast_scope_schema</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>result_cast_scope_name</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>result_cast_maximum_cardinality</literal></entry> <entry><type>cardinal_number</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>result_cast_dtd_identifier</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> </tbody> </tgroup> @@ -4606,25 +4606,25 @@ ORDER BY c.ordinal_position; <row> <entry><literal>default_character_set_catalog</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>default_character_set_schema</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>default_character_set_name</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>sql_path</literal></entry> <entry><type>character_data</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> </tbody> </tgroup> @@ -4808,7 +4808,7 @@ ORDER BY c.ordinal_position; <entry><type>yes_or_no</type></entry> <entry> <literal>YES</literal> if the feature is fully supported by the - current version of <productname>PostgreSQL</>, <literal>NO</literal> if not + current version of <productname>PostgreSQL</productname>, <literal>NO</literal> if not </entry> </row> @@ -4816,7 +4816,7 @@ ORDER BY c.ordinal_position; <entry><literal>is_verified_by</literal></entry> <entry><type>character_data</type></entry> <entry> - Always null, since the <productname>PostgreSQL</> development group does not + Always null, since the <productname>PostgreSQL</productname> development group does not perform formal testing of feature conformance </entry> </row> @@ -4982,7 +4982,7 @@ ORDER BY c.ordinal_position; <entry><type>character_data</type></entry> <entry> The programming language, if the binding style is - <literal>EMBEDDED</literal>, else null. <productname>PostgreSQL</> only + <literal>EMBEDDED</literal>, else null. <productname>PostgreSQL</productname> only supports the language C. </entry> </row> @@ -5031,7 +5031,7 @@ ORDER BY c.ordinal_position; <entry><type>yes_or_no</type></entry> <entry> <literal>YES</literal> if the package is fully supported by the - current version of <productname>PostgreSQL</>, <literal>NO</literal> if not + current version of <productname>PostgreSQL</productname>, <literal>NO</literal> if not </entry> </row> @@ -5039,7 +5039,7 @@ ORDER BY c.ordinal_position; <entry><literal>is_verified_by</literal></entry> <entry><type>character_data</type></entry> <entry> - Always null, since the <productname>PostgreSQL</> development group does not + Always null, since the <productname>PostgreSQL</productname> development group does not perform formal testing of feature conformance </entry> </row> @@ -5093,7 +5093,7 @@ ORDER BY c.ordinal_position; <entry><type>yes_or_no</type></entry> <entry> <literal>YES</literal> if the part is fully supported by the - current version of <productname>PostgreSQL</>, + current version of <productname>PostgreSQL</productname>, <literal>NO</literal> if not </entry> </row> @@ -5102,7 +5102,7 @@ ORDER BY c.ordinal_position; <entry><literal>is_verified_by</literal></entry> <entry><type>character_data</type></entry> <entry> - Always null, since the <productname>PostgreSQL</> development group does not + Always null, since the <productname>PostgreSQL</productname> development group does not perform formal testing of feature conformance </entry> </row> @@ -5182,7 +5182,7 @@ ORDER BY c.ordinal_position; <para> The table <literal>sql_sizing_profiles</literal> contains information about the <literal>sql_sizing</literal> values that are - required by various profiles of the SQL standard. <productname>PostgreSQL</> does + required by various profiles of the SQL standard. <productname>PostgreSQL</productname> does not track any SQL profiles, so this table is empty. </para> @@ -5465,13 +5465,13 @@ ORDER BY c.ordinal_position; <row> <entry><literal>self_referencing_column_name</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>reference_generation</literal></entry> <entry><type>character_data</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> @@ -5806,31 +5806,31 @@ ORDER BY c.ordinal_position; <row> <entry><literal>action_reference_old_table</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>action_reference_new_table</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>action_reference_old_row</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>action_reference_new_row</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>created</literal></entry> <entry><type>time_stamp</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> </tbody> </tgroup> @@ -5864,7 +5864,7 @@ ORDER BY c.ordinal_position; <note> <para> - Prior to <productname>PostgreSQL</> 9.1, this view's columns + Prior to <productname>PostgreSQL</productname> 9.1, this view's columns <structfield>action_timing</structfield>, <structfield>action_reference_old_table</structfield>, <structfield>action_reference_new_table</structfield>, @@ -6113,151 +6113,151 @@ ORDER BY c.ordinal_position; <row> <entry><literal>is_instantiable</literal></entry> <entry><type>yes_or_no</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>is_final</literal></entry> <entry><type>yes_or_no</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>ordering_form</literal></entry> <entry><type>character_data</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>ordering_category</literal></entry> <entry><type>character_data</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>ordering_routine_catalog</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>ordering_routine_schema</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>ordering_routine_name</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>reference_type</literal></entry> <entry><type>character_data</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>data_type</literal></entry> <entry><type>character_data</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>character_maximum_length</literal></entry> <entry><type>cardinal_number</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>character_octet_length</literal></entry> <entry><type>cardinal_number</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>character_set_catalog</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>character_set_schema</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>character_set_name</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>collation_catalog</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>collation_schema</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>collation_name</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>numeric_precision</literal></entry> <entry><type>cardinal_number</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>numeric_precision_radix</literal></entry> <entry><type>cardinal_number</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>numeric_scale</literal></entry> <entry><type>cardinal_number</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>datetime_precision</literal></entry> <entry><type>cardinal_number</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>interval_type</literal></entry> <entry><type>character_data</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>interval_precision</literal></entry> <entry><type>cardinal_number</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>source_dtd_identifier</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> <entry><literal>ref_dtd_identifier</literal></entry> <entry><type>sql_identifier</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> </tbody> </tgroup> @@ -6660,7 +6660,7 @@ ORDER BY c.ordinal_position; <row> <entry><literal>check_option</literal></entry> <entry><type>character_data</type></entry> - <entry>Applies to a feature not available in <productname>PostgreSQL</></entry> + <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry> </row> <row> @@ -6686,8 +6686,8 @@ ORDER BY c.ordinal_position; <entry><literal>is_trigger_updatable</literal></entry> <entry><type>yes_or_no</type></entry> <entry> - <literal>YES</> if the view has an <literal>INSTEAD OF</> - <command>UPDATE</> trigger defined on it, <literal>NO</> if not + <literal>YES</literal> if the view has an <literal>INSTEAD OF</literal> + <command>UPDATE</command> trigger defined on it, <literal>NO</literal> if not </entry> </row> @@ -6695,8 +6695,8 @@ ORDER BY c.ordinal_position; <entry><literal>is_trigger_deletable</literal></entry> <entry><type>yes_or_no</type></entry> <entry> - <literal>YES</> if the view has an <literal>INSTEAD OF</> - <command>DELETE</> trigger defined on it, <literal>NO</> if not + <literal>YES</literal> if the view has an <literal>INSTEAD OF</literal> + <command>DELETE</command> trigger defined on it, <literal>NO</literal> if not </entry> </row> @@ -6704,8 +6704,8 @@ ORDER BY c.ordinal_position; <entry><literal>is_trigger_insertable_into</literal></entry> <entry><type>yes_or_no</type></entry> <entry> - <literal>YES</> if the view has an <literal>INSTEAD OF</> - <command>INSERT</> trigger defined on it, <literal>NO</> if not + <literal>YES</literal> if the view has an <literal>INSTEAD OF</literal> + <command>INSERT</command> trigger defined on it, <literal>NO</literal> if not </entry> </row> </tbody> diff --git a/doc/src/sgml/install-windows.sgml b/doc/src/sgml/install-windows.sgml index 696c620b181..029e1dbc285 100644 --- a/doc/src/sgml/install-windows.sgml +++ b/doc/src/sgml/install-windows.sgml @@ -84,13 +84,13 @@ <productname>Microsoft Windows SDK</productname> version 6.0a to 8.1 or <productname>Visual Studio 2008</productname> and above. Compilation is supported down to <productname>Windows XP</productname> and - <productname>Windows Server 2003</> when building with - <productname>Visual Studio 2005</> to + <productname>Windows Server 2003</productname> when building with + <productname>Visual Studio 2005</productname> to <productname>Visual Studio 2013</productname>. Building with <productname>Visual Studio 2015</productname> is supported down to - <productname>Windows Vista</> and <productname>Windows Server 2008</>. + <productname>Windows Vista</productname> and <productname>Windows Server 2008</productname>. Building with <productname>Visual Studio 2017</productname> is supported - down to <productname>Windows 7 SP1</> and <productname>Windows Server 2008 R2 SP1</>. + down to <productname>Windows 7 SP1</productname> and <productname>Windows Server 2008 R2 SP1</productname>. </para> <para> @@ -163,7 +163,7 @@ $ENV{MSBFLAGS}="/m"; <productname>Microsoft Windows SDK</productname> it is recommended that you upgrade to the latest version (currently version 7.1), available for download from - <ulink url="https://www.microsoft.com/download"></>. + <ulink url="https://www.microsoft.com/download"></ulink>. </para> <para> You must always include the @@ -182,7 +182,7 @@ $ENV{MSBFLAGS}="/m"; ActiveState Perl is required to run the build generation scripts. MinGW or Cygwin Perl will not work. It must also be present in the PATH. Binaries can be downloaded from - <ulink url="http://www.activestate.com"></> + <ulink url="http://www.activestate.com"></ulink> (Note: version 5.8.3 or later is required, the free Standard Distribution is sufficient). </para></listitem> @@ -219,7 +219,7 @@ $ENV{MSBFLAGS}="/m"; <para> Both <productname>Bison</productname> and <productname>Flex</productname> are included in the <productname>msys</productname> tool suite, available - from <ulink url="http://www.mingw.org/wiki/MSYS"></> as part of the + from <ulink url="http://www.mingw.org/wiki/MSYS"></ulink> as part of the <productname>MinGW</productname> compiler suite. </para> @@ -259,7 +259,7 @@ $ENV{MSBFLAGS}="/m"; <term><productname>Diff</productname></term> <listitem><para> Diff is required to run the regression tests, and can be downloaded - from <ulink url="http://gnuwin32.sourceforge.net"></>. + from <ulink url="http://gnuwin32.sourceforge.net"></ulink>. </para></listitem> </varlistentry> @@ -267,7 +267,7 @@ $ENV{MSBFLAGS}="/m"; <term><productname>Gettext</productname></term> <listitem><para> Gettext is required to build with NLS support, and can be downloaded - from <ulink url="http://gnuwin32.sourceforge.net"></>. Note that binaries, + from <ulink url="http://gnuwin32.sourceforge.net"></ulink>. Note that binaries, dependencies and developer files are all needed. </para></listitem> </varlistentry> @@ -277,7 +277,7 @@ $ENV{MSBFLAGS}="/m"; <listitem><para> Required for GSSAPI authentication support. MIT Kerberos can be downloaded from - <ulink url="http://web.mit.edu/Kerberos/dist/index.html"></>. + <ulink url="http://web.mit.edu/Kerberos/dist/index.html"></ulink>. </para></listitem> </varlistentry> @@ -286,8 +286,8 @@ $ENV{MSBFLAGS}="/m"; <productname>libxslt</productname></term> <listitem><para> Required for XML support. Binaries can be downloaded from - <ulink url="http://zlatkovic.com/pub/libxml"></> or source from - <ulink url="http://xmlsoft.org"></>. Note that libxml2 requires iconv, + <ulink url="http://zlatkovic.com/pub/libxml"></ulink> or source from + <ulink url="http://xmlsoft.org"></ulink>. Note that libxml2 requires iconv, which is available from the same download location. </para></listitem> </varlistentry> @@ -296,8 +296,8 @@ $ENV{MSBFLAGS}="/m"; <term><productname>openssl</productname></term> <listitem><para> Required for SSL support. Binaries can be downloaded from - <ulink url="http://www.slproweb.com/products/Win32OpenSSL.html"></> - or source from <ulink url="http://www.openssl.org"></>. + <ulink url="http://www.slproweb.com/products/Win32OpenSSL.html"></ulink> + or source from <ulink url="http://www.openssl.org"></ulink>. </para></listitem> </varlistentry> @@ -306,7 +306,7 @@ $ENV{MSBFLAGS}="/m"; <listitem><para> Required for UUID-OSSP support (contrib only). Source can be downloaded from - <ulink url="http://www.ossp.org/pkg/lib/uuid/"></>. + <ulink url="http://www.ossp.org/pkg/lib/uuid/"></ulink>. </para></listitem> </varlistentry> @@ -314,7 +314,7 @@ $ENV{MSBFLAGS}="/m"; <term><productname>Python</productname></term> <listitem><para> Required for building <application>PL/Python</application>. Binaries can - be downloaded from <ulink url="http://www.python.org"></>. + be downloaded from <ulink url="http://www.python.org"></ulink>. </para></listitem> </varlistentry> @@ -323,7 +323,7 @@ $ENV{MSBFLAGS}="/m"; <listitem><para> Required for compression support in <application>pg_dump</application> and <application>pg_restore</application>. Binaries can be downloaded - from <ulink url="http://www.zlib.net"></>. + from <ulink url="http://www.zlib.net"></ulink>. </para></listitem> </varlistentry> @@ -347,8 +347,8 @@ $ENV{MSBFLAGS}="/m"; </para> <para> - To use a server-side third party library such as <productname>python</> or - <productname>openssl</>, this library <emphasis>must</emphasis> also be + To use a server-side third party library such as <productname>python</productname> or + <productname>openssl</productname>, this library <emphasis>must</emphasis> also be 64-bit. There is no support for loading a 32-bit library in a 64-bit server. Several of the third party libraries that PostgreSQL supports may only be available in 32-bit versions, in which case they cannot be used with @@ -462,20 +462,20 @@ $ENV{CONFIG}="Debug"; <para> Running the regression tests on client programs, with - <command>vcregress bincheck</>, or on recovery tests, with - <command>vcregress recoverycheck</>, requires an additional Perl module + <command>vcregress bincheck</command>, or on recovery tests, with + <command>vcregress recoverycheck</command>, requires an additional Perl module to be installed: <variablelist> <varlistentry> <term><productname>IPC::Run</productname></term> <listitem><para> - As of this writing, <literal>IPC::Run</> is not included in the + As of this writing, <literal>IPC::Run</literal> is not included in the ActiveState Perl installation, nor in the ActiveState Perl Package Manager (PPM) library. To install, download the - <filename>IPC-Run-<version>.tar.gz</> source archive from CPAN, - at <ulink url="http://search.cpan.org/dist/IPC-Run/"></>, and - uncompress. Edit the <filename>buildenv.pl</> file, and add a PERL5LIB - variable to point to the <filename>lib</> subdirectory from the + <filename>IPC-Run-<version>.tar.gz</filename> source archive from CPAN, + at <ulink url="http://search.cpan.org/dist/IPC-Run/"></ulink>, and + uncompress. Edit the <filename>buildenv.pl</filename> file, and add a PERL5LIB + variable to point to the <filename>lib</filename> subdirectory from the extracted archive. For example: <programlisting> $ENV{PERL5LIB}=$ENV{PERL5LIB} . ';c:\IPC-Run-0.94\lib'; @@ -498,7 +498,7 @@ $ENV{PERL5LIB}=$ENV{PERL5LIB} . ';c:\IPC-Run-0.94\lib'; <term>OpenJade 1.3.1-2</term> <listitem><para> Download from - <ulink url="http://sourceforge.net/projects/openjade/files/openjade/1.3.1/openjade-1_3_1-2-bin.zip/download"></> + <ulink url="http://sourceforge.net/projects/openjade/files/openjade/1.3.1/openjade-1_3_1-2-bin.zip/download"></ulink> and uncompress in the subdirectory <filename>openjade-1.3.1</filename>. </para></listitem> </varlistentry> @@ -507,7 +507,7 @@ $ENV{PERL5LIB}=$ENV{PERL5LIB} . ';c:\IPC-Run-0.94\lib'; <term>DocBook DTD 4.2</term> <listitem><para> Download from - <ulink url="http://www.oasis-open.org/docbook/sgml/4.2/docbook-4.2.zip"></> + <ulink url="http://www.oasis-open.org/docbook/sgml/4.2/docbook-4.2.zip"></ulink> and uncompress in the subdirectory <filename>docbook</filename>. </para></listitem> </varlistentry> @@ -516,7 +516,7 @@ $ENV{PERL5LIB}=$ENV{PERL5LIB} . ';c:\IPC-Run-0.94\lib'; <term>ISO character entities</term> <listitem><para> Download from - <ulink url="http://www.oasis-open.org/cover/ISOEnts.zip"></> and + <ulink url="http://www.oasis-open.org/cover/ISOEnts.zip"></ulink> and uncompress in the subdirectory <filename>docbook</filename>. </para></listitem> </varlistentry> diff --git a/doc/src/sgml/installation.sgml b/doc/src/sgml/installation.sgml index f4e4fc7c5e2..f8e1d60356a 100644 --- a/doc/src/sgml/installation.sgml +++ b/doc/src/sgml/installation.sgml @@ -52,17 +52,17 @@ su - postgres <para> In general, a modern Unix-compatible platform should be able to run - <productname>PostgreSQL</>. + <productname>PostgreSQL</productname>. The platforms that had received specific testing at the time of release are listed in <xref linkend="supported-platforms"> - below. In the <filename>doc</> subdirectory of the distribution - there are several platform-specific <acronym>FAQ</> documents you + below. In the <filename>doc</filename> subdirectory of the distribution + there are several platform-specific <acronym>FAQ</acronym> documents you might wish to consult if you are having trouble. </para> <para> The following software packages are required for building - <productname>PostgreSQL</>: + <productname>PostgreSQL</productname>: <itemizedlist> <listitem> @@ -71,9 +71,9 @@ su - postgres <primary>make</primary> </indexterm> - <acronym>GNU</> <application>make</> version 3.80 or newer is required; other - <application>make</> programs or older <acronym>GNU</> <application>make</> versions will <emphasis>not</> work. - (<acronym>GNU</> <application>make</> is sometimes installed under + <acronym>GNU</acronym> <application>make</application> version 3.80 or newer is required; other + <application>make</application> programs or older <acronym>GNU</acronym> <application>make</application> versions will <emphasis>not</emphasis> work. + (<acronym>GNU</acronym> <application>make</application> is sometimes installed under the name <filename>gmake</filename>.) To test for <acronym>GNU</acronym> <application>make</application> enter: <screen> @@ -84,19 +84,19 @@ su - postgres <listitem> <para> - You need an <acronym>ISO</>/<acronym>ANSI</> C compiler (at least + You need an <acronym>ISO</acronym>/<acronym>ANSI</acronym> C compiler (at least C89-compliant). Recent - versions of <productname>GCC</> are recommended, but - <productname>PostgreSQL</> is known to build using a wide variety + versions of <productname>GCC</productname> are recommended, but + <productname>PostgreSQL</productname> is known to build using a wide variety of compilers from different vendors. </para> </listitem> <listitem> <para> - <application>tar</> is required to unpack the source + <application>tar</application> is required to unpack the source distribution, in addition to either - <application>gzip</> or <application>bzip2</>. + <application>gzip</application> or <application>bzip2</application>. </para> </listitem> @@ -109,23 +109,23 @@ su - postgres <primary>libedit</primary> </indexterm> - The <acronym>GNU</> <productname>Readline</> library is used by + The <acronym>GNU</acronym> <productname>Readline</productname> library is used by default. It allows <application>psql</application> (the PostgreSQL command line SQL interpreter) to remember each command you type, and allows you to use arrow keys to recall and edit previous commands. This is very helpful and is strongly recommended. If you don't want to use it then you must specify the <option>--without-readline</option> option to - <filename>configure</>. As an alternative, you can often use the + <filename>configure</filename>. As an alternative, you can often use the BSD-licensed <filename>libedit</filename> library, originally developed on <productname>NetBSD</productname>. The <filename>libedit</filename> library is GNU <productname>Readline</productname>-compatible and is used if <filename>libreadline</filename> is not found, or if <option>--with-libedit-preferred</option> is used as an - option to <filename>configure</>. If you are using a package-based + option to <filename>configure</filename>. If you are using a package-based Linux distribution, be aware that you need both the - <literal>readline</> and <literal>readline-devel</> packages, if + <literal>readline</literal> and <literal>readline-devel</literal> packages, if those are separate in your distribution. </para> </listitem> @@ -140,8 +140,8 @@ su - postgres used by default. If you don't want to use it then you must specify the <option>--without-zlib</option> option to <filename>configure</filename>. Using this option disables - support for compressed archives in <application>pg_dump</> and - <application>pg_restore</>. + support for compressed archives in <application>pg_dump</application> and + <application>pg_restore</application>. </para> </listitem> </itemizedlist> @@ -179,14 +179,14 @@ su - postgres If you intend to make more than incidental use of <application>PL/Perl</application>, you should ensure that the <productname>Perl</productname> installation was built with the - <literal>usemultiplicity</> option enabled (<literal>perl -V</> + <literal>usemultiplicity</literal> option enabled (<literal>perl -V</literal> will show whether this is the case). </para> </listitem> <listitem> <para> - To build the <application>PL/Python</> server programming + To build the <application>PL/Python</application> server programming language, you need a <productname>Python</productname> installation with the header files and the <application>distutils</application> module. The minimum @@ -209,15 +209,15 @@ su - postgres find a shared <filename>libpython</filename>. That might mean that you either have to install additional packages or rebuild (part of) your <productname>Python</productname> installation to provide this shared - library. When building from source, run <productname>Python</>'s - configure with the <literal>--enable-shared</> flag. + library. When building from source, run <productname>Python</productname>'s + configure with the <literal>--enable-shared</literal> flag. </para> </listitem> <listitem> <para> To build the <application>PL/Tcl</application> - procedural language, you of course need a <productname>Tcl</> + procedural language, you of course need a <productname>Tcl</productname> installation. The minimum required version is <productname>Tcl</productname> 8.4. </para> @@ -228,13 +228,13 @@ su - postgres To enable Native Language Support (<acronym>NLS</acronym>), that is, the ability to display a program's messages in a language other than English, you need an implementation of the - <application>Gettext</> <acronym>API</acronym>. Some operating + <application>Gettext</application> <acronym>API</acronym>. Some operating systems have this built-in (e.g., <systemitem - class="osname">Linux</>, <systemitem class="osname">NetBSD</>, - <systemitem class="osname">Solaris</>), for other systems you + class="osname">Linux</systemitem>, <systemitem class="osname">NetBSD</systemitem>, + <systemitem class="osname">Solaris</systemitem>), for other systems you can download an add-on package from <ulink url="http://www.gnu.org/software/gettext/"></ulink>. - If you are using the <application>Gettext</> implementation in + If you are using the <application>Gettext</application> implementation in the <acronym>GNU</acronym> C library then you will additionally need the <productname>GNU Gettext</productname> package for some utility programs. For any of the other implementations you will @@ -244,7 +244,7 @@ su - postgres <listitem> <para> - You need <productname>OpenSSL</>, if you want to support + You need <productname>OpenSSL</productname>, if you want to support encrypted client connections. The minimum required version is 0.9.8. </para> @@ -252,8 +252,8 @@ su - postgres <listitem> <para> - You need <application>Kerberos</>, <productname>OpenLDAP</>, - and/or <application>PAM</>, if you want to support authentication + You need <application>Kerberos</application>, <productname>OpenLDAP</productname>, + and/or <application>PAM</application>, if you want to support authentication using those services. </para> </listitem> @@ -289,12 +289,12 @@ su - postgres <primary>yacc</primary> </indexterm> - GNU <application>Flex</> and <application>Bison</> + GNU <application>Flex</application> and <application>Bison</application> are needed to build from a Git checkout, or if you changed the actual scanner and parser definition files. If you need them, be sure - to get <application>Flex</> 2.5.31 or later and - <application>Bison</> 1.875 or later. Other <application>lex</> - and <application>yacc</> programs cannot be used. + to get <application>Flex</application> 2.5.31 or later and + <application>Bison</application> 1.875 or later. Other <application>lex</application> + and <application>yacc</application> programs cannot be used. </para> </listitem> <listitem> @@ -303,10 +303,10 @@ su - postgres <primary>perl</primary> </indexterm> - <application>Perl</> 5.8.3 or later is needed to build from a Git checkout, + <application>Perl</application> 5.8.3 or later is needed to build from a Git checkout, or if you changed the input files for any of the build steps that use Perl scripts. If building on Windows you will need - <application>Perl</> in any case. <application>Perl</application> is + <application>Perl</application> in any case. <application>Perl</application> is also required to run some test suites. </para> </listitem> @@ -316,7 +316,7 @@ su - postgres <para> If you need to get a <acronym>GNU</acronym> package, you can find it at your local <acronym>GNU</acronym> mirror site (see <ulink - url="http://www.gnu.org/order/ftp.html"></> + url="http://www.gnu.org/order/ftp.html"></ulink> for a list) or at <ulink url="ftp://ftp.gnu.org/gnu/"></ulink>. </para> @@ -337,7 +337,7 @@ su - postgres <title>Getting The Source</title> <para> - The <productname>PostgreSQL</> &version; sources can be obtained from the + The <productname>PostgreSQL</productname> &version; sources can be obtained from the download section of our website: <ulink url="https://www.postgresql.org/download/"></ulink>. You should get a file named <filename>postgresql-&version;.tar.gz</filename> @@ -351,7 +351,7 @@ su - postgres have the <filename>.bz2</filename> file.) This will create a directory <filename>postgresql-&version;</filename> under the current directory - with the <productname>PostgreSQL</> sources. + with the <productname>PostgreSQL</productname> sources. Change into that directory for the rest of the installation procedure. </para> @@ -377,7 +377,7 @@ su - postgres <para> The first step of the installation procedure is to configure the source tree for your system and choose the options you would like. - This is done by running the <filename>configure</> script. For a + This is done by running the <filename>configure</filename> script. For a default installation simply enter: <screen> <userinput>./configure</userinput> @@ -403,7 +403,7 @@ su - postgres The default configuration will build the server and utilities, as well as all client applications and interfaces that require only a C compiler. All files will be installed under - <filename>/usr/local/pgsql</> by default. + <filename>/usr/local/pgsql</filename> by default. </para> <para> @@ -413,14 +413,14 @@ su - postgres <variablelist> <varlistentry> - <term><option>--prefix=<replaceable>PREFIX</></option></term> + <term><option>--prefix=<replaceable>PREFIX</replaceable></option></term> <listitem> <para> - Install all files under the directory <replaceable>PREFIX</> + Install all files under the directory <replaceable>PREFIX</replaceable> instead of <filename>/usr/local/pgsql</filename>. The actual files will be installed into various subdirectories; no files will ever be installed directly into the - <replaceable>PREFIX</> directory. + <replaceable>PREFIX</replaceable> directory. </para> <para> @@ -428,13 +428,13 @@ su - postgres individual subdirectories with the following options. However, if you leave these with their defaults, the installation will be relocatable, meaning you can move the directory after - installation. (The <literal>man</> and <literal>doc</> + installation. (The <literal>man</literal> and <literal>doc</literal> locations are not affected by this.) </para> <para> For relocatable installs, you might want to use - <filename>configure</filename>'s <literal>--disable-rpath</> + <filename>configure</filename>'s <literal>--disable-rpath</literal> option. Also, you will need to tell the operating system how to find the shared libraries. </para> @@ -442,15 +442,15 @@ su - postgres </varlistentry> <varlistentry> - <term><option>--exec-prefix=<replaceable>EXEC-PREFIX</></option></term> + <term><option>--exec-prefix=<replaceable>EXEC-PREFIX</replaceable></option></term> <listitem> <para> You can install architecture-dependent files under a - different prefix, <replaceable>EXEC-PREFIX</>, than what - <replaceable>PREFIX</> was set to. This can be useful to + different prefix, <replaceable>EXEC-PREFIX</replaceable>, than what + <replaceable>PREFIX</replaceable> was set to. This can be useful to share architecture-independent files between hosts. If you - omit this, then <replaceable>EXEC-PREFIX</> is set equal to - <replaceable>PREFIX</> and both architecture-dependent and + omit this, then <replaceable>EXEC-PREFIX</replaceable> is set equal to + <replaceable>PREFIX</replaceable> and both architecture-dependent and independent files will be installed under the same tree, which is probably what you want. </para> @@ -458,114 +458,114 @@ su - postgres </varlistentry> <varlistentry> - <term><option>--bindir=<replaceable>DIRECTORY</></option></term> + <term><option>--bindir=<replaceable>DIRECTORY</replaceable></option></term> <listitem> <para> Specifies the directory for executable programs. The default - is <filename><replaceable>EXEC-PREFIX</>/bin</>, which - normally means <filename>/usr/local/pgsql/bin</>. + is <filename><replaceable>EXEC-PREFIX</replaceable>/bin</filename>, which + normally means <filename>/usr/local/pgsql/bin</filename>. </para> </listitem> </varlistentry> <varlistentry> - <term><option>--sysconfdir=<replaceable>DIRECTORY</></option></term> + <term><option>--sysconfdir=<replaceable>DIRECTORY</replaceable></option></term> <listitem> <para> Sets the directory for various configuration files, - <filename><replaceable>PREFIX</>/etc</> by default. + <filename><replaceable>PREFIX</replaceable>/etc</filename> by default. </para> </listitem> </varlistentry> <varlistentry> - <term><option>--libdir=<replaceable>DIRECTORY</></option></term> + <term><option>--libdir=<replaceable>DIRECTORY</replaceable></option></term> <listitem> <para> Sets the location to install libraries and dynamically loadable modules. The default is - <filename><replaceable>EXEC-PREFIX</>/lib</>. + <filename><replaceable>EXEC-PREFIX</replaceable>/lib</filename>. </para> </listitem> </varlistentry> <varlistentry> - <term><option>--includedir=<replaceable>DIRECTORY</></option></term> + <term><option>--includedir=<replaceable>DIRECTORY</replaceable></option></term> <listitem> <para> Sets the directory for installing C and C++ header files. The - default is <filename><replaceable>PREFIX</>/include</>. + default is <filename><replaceable>PREFIX</replaceable>/include</filename>. </para> </listitem> </varlistentry> <varlistentry> - <term><option>--datarootdir=<replaceable>DIRECTORY</></option></term> + <term><option>--datarootdir=<replaceable>DIRECTORY</replaceable></option></term> <listitem> <para> Sets the root directory for various types of read-only data files. This only sets the default for some of the following options. The default is - <filename><replaceable>PREFIX</>/share</>. + <filename><replaceable>PREFIX</replaceable>/share</filename>. </para> </listitem> </varlistentry> <varlistentry> - <term><option>--datadir=<replaceable>DIRECTORY</></option></term> + <term><option>--datadir=<replaceable>DIRECTORY</replaceable></option></term> <listitem> <para> Sets the directory for read-only data files used by the installed programs. The default is - <filename><replaceable>DATAROOTDIR</></>. Note that this has + <filename><replaceable>DATAROOTDIR</replaceable></filename>. Note that this has nothing to do with where your database files will be placed. </para> </listitem> </varlistentry> <varlistentry> - <term><option>--localedir=<replaceable>DIRECTORY</></option></term> + <term><option>--localedir=<replaceable>DIRECTORY</replaceable></option></term> <listitem> <para> Sets the directory for installing locale data, in particular message translation catalog files. The default is - <filename><replaceable>DATAROOTDIR</>/locale</>. + <filename><replaceable>DATAROOTDIR</replaceable>/locale</filename>. </para> </listitem> </varlistentry> <varlistentry> - <term><option>--mandir=<replaceable>DIRECTORY</></option></term> + <term><option>--mandir=<replaceable>DIRECTORY</replaceable></option></term> <listitem> <para> - The man pages that come with <productname>PostgreSQL</> will be installed under + The man pages that come with <productname>PostgreSQL</productname> will be installed under this directory, in their respective - <filename>man<replaceable>x</></> subdirectories. - The default is <filename><replaceable>DATAROOTDIR</>/man</>. + <filename>man<replaceable>x</replaceable></filename> subdirectories. + The default is <filename><replaceable>DATAROOTDIR</replaceable>/man</filename>. </para> </listitem> </varlistentry> <varlistentry> - <term><option>--docdir=<replaceable>DIRECTORY</></option></term> + <term><option>--docdir=<replaceable>DIRECTORY</replaceable></option></term> <listitem> <para> Sets the root directory for installing documentation files, - except <quote>man</> pages. This only sets the default for + except <quote>man</quote> pages. This only sets the default for the following options. The default value for this option is - <filename><replaceable>DATAROOTDIR</>/doc/postgresql</>. + <filename><replaceable>DATAROOTDIR</replaceable>/doc/postgresql</filename>. </para> </listitem> </varlistentry> <varlistentry> - <term><option>--htmldir=<replaceable>DIRECTORY</></option></term> + <term><option>--htmldir=<replaceable>DIRECTORY</replaceable></option></term> <listitem> <para> The HTML-formatted documentation for <productname>PostgreSQL</productname> will be installed under this directory. The default is - <filename><replaceable>DATAROOTDIR</></>. + <filename><replaceable>DATAROOTDIR</replaceable></filename>. </para> </listitem> </varlistentry> @@ -574,15 +574,15 @@ su - postgres <note> <para> Care has been taken to make it possible to install - <productname>PostgreSQL</> into shared installation locations + <productname>PostgreSQL</productname> into shared installation locations (such as <filename>/usr/local/include</filename>) without interfering with the namespace of the rest of the system. First, the string <quote><literal>/postgresql</literal></quote> is automatically appended to <varname>datadir</varname>, <varname>sysconfdir</varname>, and <varname>docdir</varname>, unless the fully expanded directory name already contains the - string <quote><literal>postgres</></quote> or - <quote><literal>pgsql</></quote>. For example, if you choose + string <quote><literal>postgres</literal></quote> or + <quote><literal>pgsql</literal></quote>. For example, if you choose <filename>/usr/local</filename> as prefix, the documentation will be installed in <filename>/usr/local/doc/postgresql</filename>, but if the prefix is <filename>/opt/postgres</filename>, then it @@ -602,10 +602,10 @@ su - postgres <para> <variablelist> <varlistentry> - <term><option>--with-extra-version=<replaceable>STRING</></option></term> + <term><option>--with-extra-version=<replaceable>STRING</replaceable></option></term> <listitem> <para> - Append <replaceable>STRING</> to the PostgreSQL version number. You + Append <replaceable>STRING</replaceable> to the PostgreSQL version number. You can use this, for example, to mark binaries built from unreleased Git snapshots or containing custom patches with an extra version string such as a <command>git describe</command> identifier or a @@ -615,35 +615,35 @@ su - postgres </varlistentry> <varlistentry> - <term><option>--with-includes=<replaceable>DIRECTORIES</></option></term> + <term><option>--with-includes=<replaceable>DIRECTORIES</replaceable></option></term> <listitem> <para> - <replaceable>DIRECTORIES</> is a colon-separated list of + <replaceable>DIRECTORIES</replaceable> is a colon-separated list of directories that will be added to the list the compiler searches for header files. If you have optional packages - (such as GNU <application>Readline</>) installed in a non-standard + (such as GNU <application>Readline</application>) installed in a non-standard location, you have to use this option and probably also the corresponding - <option>--with-libraries</> option. + <option>--with-libraries</option> option. </para> <para> - Example: <literal>--with-includes=/opt/gnu/include:/usr/sup/include</>. + Example: <literal>--with-includes=/opt/gnu/include:/usr/sup/include</literal>. </para> </listitem> </varlistentry> <varlistentry> - <term><option>--with-libraries=<replaceable>DIRECTORIES</></option></term> + <term><option>--with-libraries=<replaceable>DIRECTORIES</replaceable></option></term> <listitem> <para> - <replaceable>DIRECTORIES</> is a colon-separated list of + <replaceable>DIRECTORIES</replaceable> is a colon-separated list of directories to search for libraries. You will probably have to use this option (and the corresponding - <option>--with-includes</> option) if you have packages + <option>--with-includes</option> option) if you have packages installed in non-standard locations. </para> <para> - Example: <literal>--with-libraries=/opt/gnu/lib:/usr/sup/lib</>. + Example: <literal>--with-libraries=/opt/gnu/lib:/usr/sup/lib</literal>. </para> </listitem> </varlistentry> @@ -657,7 +657,7 @@ su - postgres language other than English. <replaceable>LANGUAGES</replaceable> is an optional space-separated list of codes of the languages that you want supported, for - example <literal>--enable-nls='de fr'</>. (The intersection + example <literal>--enable-nls='de fr'</literal>. (The intersection between your list and the set of actually provided translations will be computed automatically.) If you do not specify a list, then all available translations are @@ -666,22 +666,22 @@ su - postgres <para> To use this option, you will need an implementation of the - <application>Gettext</> API; see above. + <application>Gettext</application> API; see above. </para> </listitem> </varlistentry> <varlistentry> - <term><option>--with-pgport=<replaceable>NUMBER</></option></term> + <term><option>--with-pgport=<replaceable>NUMBER</replaceable></option></term> <listitem> <para> - Set <replaceable>NUMBER</> as the default port number for + Set <replaceable>NUMBER</replaceable> as the default port number for server and clients. The default is 5432. The port can always be changed later on, but if you specify it here then both server and clients will have the same default compiled in, which can be very convenient. Usually the only good reason to select a non-default value is if you intend to run multiple - <productname>PostgreSQL</> servers on the same machine. + <productname>PostgreSQL</productname> servers on the same machine. </para> </listitem> </varlistentry> @@ -690,7 +690,7 @@ su - postgres <term><option>--with-perl</option></term> <listitem> <para> - Build the <application>PL/Perl</> server-side language. + Build the <application>PL/Perl</application> server-side language. </para> </listitem> </varlistentry> @@ -699,7 +699,7 @@ su - postgres <term><option>--with-python</option></term> <listitem> <para> - Build the <application>PL/Python</> server-side language. + Build the <application>PL/Python</application> server-side language. </para> </listitem> </varlistentry> @@ -708,7 +708,7 @@ su - postgres <term><option>--with-tcl</option></term> <listitem> <para> - Build the <application>PL/Tcl</> server-side language. + Build the <application>PL/Tcl</application> server-side language. </para> </listitem> </varlistentry> @@ -734,10 +734,10 @@ su - postgres Build with support for GSSAPI authentication. On many systems, the GSSAPI (usually a part of the Kerberos installation) system is not installed in a location - that is searched by default (e.g., <filename>/usr/include</>, - <filename>/usr/lib</>), so you must use the options - <option>--with-includes</> and <option>--with-libraries</> in - addition to this option. <filename>configure</> will check + that is searched by default (e.g., <filename>/usr/include</filename>, + <filename>/usr/lib</filename>), so you must use the options + <option>--with-includes</option> and <option>--with-libraries</option> in + addition to this option. <filename>configure</filename> will check for the required header files and libraries to make sure that your GSSAPI installation is sufficient before proceeding. </para> @@ -745,7 +745,7 @@ su - postgres </varlistentry> <varlistentry> - <term><option>--with-krb-srvnam=<replaceable>NAME</></option></term> + <term><option>--with-krb-srvnam=<replaceable>NAME</replaceable></option></term> <listitem> <para> The default name of the Kerberos service principal used @@ -763,7 +763,7 @@ su - postgres <listitem> <para> Build with support for - the <productname>ICU</productname><indexterm><primary>ICU</></> + the <productname>ICU</productname><indexterm><primary>ICU</primary></indexterm> library. This requires the <productname>ICU4C</productname> package to be installed. The minimum required version of <productname>ICU4C</productname> is currently 4.2. @@ -771,7 +771,7 @@ su - postgres <para> By default, - <productname>pkg-config</productname><indexterm><primary>pkg-config</></> + <productname>pkg-config</productname><indexterm><primary>pkg-config</primary></indexterm> will be used to find the required compilation options. This is supported for <productname>ICU4C</productname> version 4.6 and later. For older versions, or if <productname>pkg-config</productname> is @@ -798,11 +798,11 @@ su - postgres </term> <listitem> <para> - Build with support for <acronym>SSL</> (encrypted) - connections. This requires the <productname>OpenSSL</> - package to be installed. <filename>configure</> will check + Build with support for <acronym>SSL</acronym> (encrypted) + connections. This requires the <productname>OpenSSL</productname> + package to be installed. <filename>configure</filename> will check for the required header files and libraries to make sure that - your <productname>OpenSSL</> installation is sufficient + your <productname>OpenSSL</productname> installation is sufficient before proceeding. </para> </listitem> @@ -812,7 +812,7 @@ su - postgres <term><option>--with-pam</option></term> <listitem> <para> - Build with <acronym>PAM</><indexterm><primary>PAM</></> + Build with <acronym>PAM</acronym><indexterm><primary>PAM</primary></indexterm> (Pluggable Authentication Modules) support. </para> </listitem> @@ -833,15 +833,15 @@ su - postgres <term><option>--with-ldap</option></term> <listitem> <para> - Build with <acronym>LDAP</><indexterm><primary>LDAP</></> + Build with <acronym>LDAP</acronym><indexterm><primary>LDAP</primary></indexterm> support for authentication and connection parameter lookup (see <phrase id="install-ldap-links"><xref linkend="libpq-ldap"> and <xref linkend="auth-ldap"></phrase> for more information). On Unix, - this requires the <productname>OpenLDAP</> package to be - installed. On Windows, the default <productname>WinLDAP</> - library is used. <filename>configure</> will check for the required + this requires the <productname>OpenLDAP</productname> package to be + installed. On Windows, the default <productname>WinLDAP</productname> + library is used. <filename>configure</filename> will check for the required header files and libraries to make sure that your - <productname>OpenLDAP</> installation is sufficient before + <productname>OpenLDAP</productname> installation is sufficient before proceeding. </para> </listitem> @@ -867,8 +867,8 @@ su - postgres <term><option>--without-readline</option></term> <listitem> <para> - Prevents use of the <application>Readline</> library - (and <application>libedit</> as well). This option disables + Prevents use of the <application>Readline</application> library + (and <application>libedit</application> as well). This option disables command-line editing and history in <application>psql</application>, so it is not recommended. </para> @@ -879,10 +879,10 @@ su - postgres <term><option>--with-libedit-preferred</option></term> <listitem> <para> - Favors the use of the BSD-licensed <application>libedit</> library - rather than GPL-licensed <application>Readline</>. This option + Favors the use of the BSD-licensed <application>libedit</application> library + rather than GPL-licensed <application>Readline</application>. This option is significant only if you have both libraries installed; the - default in that case is to use <application>Readline</>. + default in that case is to use <application>Readline</application>. </para> </listitem> </varlistentry> @@ -909,21 +909,21 @@ su - postgres <itemizedlist> <listitem> <para> - <option>bsd</> to use the UUID functions found in FreeBSD, NetBSD, + <option>bsd</option> to use the UUID functions found in FreeBSD, NetBSD, and some other BSD-derived systems </para> </listitem> <listitem> <para> - <option>e2fs</> to use the UUID library created by - the <literal>e2fsprogs</> project; this library is present in most + <option>e2fs</option> to use the UUID library created by + the <literal>e2fsprogs</literal> project; this library is present in most Linux systems and in macOS, and can be obtained for other platforms as well </para> </listitem> <listitem> <para> - <option>ossp</> to use the <ulink + <option>ossp</option> to use the <ulink url="http://www.ossp.org/pkg/lib/uuid/">OSSP UUID library</ulink> </para> </listitem> @@ -969,7 +969,7 @@ su - postgres <para> Use libxslt when building the <xref linkend="xml2"> - module. <application>xml2</> relies on this library + module. <application>xml2</application> relies on this library to perform XSL transformations of XML. </para> </listitem> @@ -979,13 +979,13 @@ su - postgres <term><option>--disable-float4-byval</option></term> <listitem> <para> - Disable passing float4 values <quote>by value</>, causing them - to be passed <quote>by reference</> instead. This option costs + Disable passing float4 values <quote>by value</quote>, causing them + to be passed <quote>by reference</quote> instead. This option costs performance, but may be needed for compatibility with old user-defined functions that are written in C and use the - <quote>version 0</> calling convention. A better long-term + <quote>version 0</quote> calling convention. A better long-term solution is to update any such functions to use the - <quote>version 1</> calling convention. + <quote>version 1</quote> calling convention. </para> </listitem> </varlistentry> @@ -994,17 +994,17 @@ su - postgres <term><option>--disable-float8-byval</option></term> <listitem> <para> - Disable passing float8 values <quote>by value</>, causing them - to be passed <quote>by reference</> instead. This option costs + Disable passing float8 values <quote>by value</quote>, causing them + to be passed <quote>by reference</quote> instead. This option costs performance, but may be needed for compatibility with old user-defined functions that are written in C and use the - <quote>version 0</> calling convention. A better long-term + <quote>version 0</quote> calling convention. A better long-term solution is to update any such functions to use the - <quote>version 1</> calling convention. + <quote>version 1</quote> calling convention. Note that this option affects not only float8, but also int8 and some related types such as timestamp. - On 32-bit platforms, <option>--disable-float8-byval</> is the default - and it is not allowed to select <option>--enable-float8-byval</>. + On 32-bit platforms, <option>--disable-float8-byval</option> is the default + and it is not allowed to select <option>--enable-float8-byval</option>. </para> </listitem> </varlistentry> @@ -1013,17 +1013,17 @@ su - postgres <term><option>--with-segsize=<replaceable>SEGSIZE</replaceable></option></term> <listitem> <para> - Set the <firstterm>segment size</>, in gigabytes. Large tables are + Set the <firstterm>segment size</firstterm>, in gigabytes. Large tables are divided into multiple operating-system files, each of size equal to the segment size. This avoids problems with file size limits that exist on many platforms. The default segment size, 1 gigabyte, is safe on all supported platforms. If your operating system has - <quote>largefile</> support (which most do, nowadays), you can use + <quote>largefile</quote> support (which most do, nowadays), you can use a larger segment size. This can be helpful to reduce the number of file descriptors consumed when working with very large tables. But be careful not to select a value larger than is supported by your platform and the file systems you intend to use. Other - tools you might wish to use, such as <application>tar</>, could + tools you might wish to use, such as <application>tar</application>, could also set limits on the usable file size. It is recommended, though not absolutely required, that this value be a power of 2. @@ -1036,7 +1036,7 @@ su - postgres <term><option>--with-blocksize=<replaceable>BLOCKSIZE</replaceable></option></term> <listitem> <para> - Set the <firstterm>block size</>, in kilobytes. This is the unit + Set the <firstterm>block size</firstterm>, in kilobytes. This is the unit of storage and I/O within tables. The default, 8 kilobytes, is suitable for most situations; but other values may be useful in special cases. @@ -1050,7 +1050,7 @@ su - postgres <term><option>--with-wal-blocksize=<replaceable>BLOCKSIZE</replaceable></option></term> <listitem> <para> - Set the <firstterm>WAL block size</>, in kilobytes. This is the unit + Set the <firstterm>WAL block size</firstterm>, in kilobytes. This is the unit of storage and I/O within the WAL log. The default, 8 kilobytes, is suitable for most situations; but other values may be useful in special cases. @@ -1064,14 +1064,14 @@ su - postgres <term><option>--disable-spinlocks</option></term> <listitem> <para> - Allow the build to succeed even if <productname>PostgreSQL</> + Allow the build to succeed even if <productname>PostgreSQL</productname> has no CPU spinlock support for the platform. The lack of spinlock support will result in poor performance; therefore, this option should only be used if the build aborts and informs you that the platform lacks spinlock support. If this - option is required to build <productname>PostgreSQL</> on + option is required to build <productname>PostgreSQL</productname> on your platform, please report the problem to the - <productname>PostgreSQL</> developers. + <productname>PostgreSQL</productname> developers. </para> </listitem> </varlistentry> @@ -1080,7 +1080,7 @@ su - postgres <term><option>--disable-strong-random</option></term> <listitem> <para> - Allow the build to succeed even if <productname>PostgreSQL</> + Allow the build to succeed even if <productname>PostgreSQL</productname> has no support for strong random numbers on the platform. A source of random numbers is needed for some authentication protocols, as well as some routines in the @@ -1114,7 +1114,7 @@ su - postgres </term> <listitem> <para> - <productname>PostgreSQL</> includes its own time zone database, + <productname>PostgreSQL</productname> includes its own time zone database, which it requires for date and time operations. This time zone database is in fact compatible with the IANA time zone database provided by many operating systems such as FreeBSD, @@ -1128,7 +1128,7 @@ su - postgres installation routine will not detect mismatching or erroneous time zone data. If you use this option, you are advised to run the regression tests to verify that the time zone data you have - pointed to works correctly with <productname>PostgreSQL</>. + pointed to works correctly with <productname>PostgreSQL</productname>. </para> <indexterm><primary>cross compilation</primary></indexterm> @@ -1153,7 +1153,7 @@ su - postgres <indexterm> <primary>zlib</primary> </indexterm> - Prevents use of the <application>Zlib</> library. This disables + Prevents use of the <application>Zlib</application> library. This disables support for compressed archives in <application>pg_dump</application> and <application>pg_restore</application>. This option is only intended for those rare systems where this @@ -1201,7 +1201,7 @@ su - postgres <para> If using GCC, all programs and libraries are compiled so they can be profiled. On backend exit, a subdirectory will be created - that contains the <filename>gmon.out</> file for use in profiling. + that contains the <filename>gmon.out</filename> file for use in profiling. This option is for use only with GCC and when doing development work. </para> </listitem> @@ -1211,8 +1211,8 @@ su - postgres <term><option>--enable-cassert</option></term> <listitem> <para> - Enables <firstterm>assertion</> checks in the server, which test for - many <quote>cannot happen</> conditions. This is invaluable for + Enables <firstterm>assertion</firstterm> checks in the server, which test for + many <quote>cannot happen</quote> conditions. This is invaluable for code development purposes, but the tests can slow down the server significantly. Also, having the tests turned on won't necessarily enhance the @@ -1266,7 +1266,7 @@ su - postgres can be specified in the environment variable <envar>DTRACEFLAGS</envar>. On Solaris, to include DTrace support in a 64-bit binary, you must specify - <literal>DTRACEFLAGS="-64"</> to configure. For example, + <literal>DTRACEFLAGS="-64"</literal> to configure. For example, using the GCC compiler: <screen> ./configure CC='gcc -m64' --enable-dtrace DTRACEFLAGS='-64' ... @@ -1295,10 +1295,10 @@ su - postgres <para> If you prefer a C compiler different from the one <filename>configure</filename> picks, you can set the - environment variable <envar>CC</> to the program of your choice. + environment variable <envar>CC</envar> to the program of your choice. By default, <filename>configure</filename> will pick <filename>gcc</filename> if available, else the platform's - default (usually <filename>cc</>). Similarly, you can override the + default (usually <filename>cc</filename>). Similarly, you can override the default compiler flags if needed with the <envar>CFLAGS</envar> variable. </para> @@ -1306,7 +1306,7 @@ su - postgres You can specify environment variables on the <filename>configure</filename> command line, for example: <screen> -<userinput>./configure CC=/opt/bin/gcc CFLAGS='-O2 -pipe'</> +<userinput>./configure CC=/opt/bin/gcc CFLAGS='-O2 -pipe'</userinput> </screen> </para> @@ -1473,51 +1473,51 @@ su - postgres <para> Sometimes it is useful to add compiler flags after-the-fact to the set - that were chosen by <filename>configure</>. An important example is - that <application>gcc</>'s <option>-Werror</> option cannot be included - in the <envar>CFLAGS</envar> passed to <filename>configure</>, because - it will break many of <filename>configure</>'s built-in tests. To add + that were chosen by <filename>configure</filename>. An important example is + that <application>gcc</application>'s <option>-Werror</option> option cannot be included + in the <envar>CFLAGS</envar> passed to <filename>configure</filename>, because + it will break many of <filename>configure</filename>'s built-in tests. To add such flags, include them in the <envar>COPT</envar> environment variable - while running <filename>make</>. The contents of <envar>COPT</envar> + while running <filename>make</filename>. The contents of <envar>COPT</envar> are added to both the <envar>CFLAGS</envar> and <envar>LDFLAGS</envar> - options set up by <filename>configure</>. For example, you could do + options set up by <filename>configure</filename>. For example, you could do <screen> -<userinput>make COPT='-Werror'</> +<userinput>make COPT='-Werror'</userinput> </screen> or <screen> -<userinput>export COPT='-Werror'</> -<userinput>make</> +<userinput>export COPT='-Werror'</userinput> +<userinput>make</userinput> </screen> </para> <note> <para> When developing code inside the server, it is recommended to - use the configure options <option>--enable-cassert</> (which - turns on many run-time error checks) and <option>--enable-debug</> + use the configure options <option>--enable-cassert</option> (which + turns on many run-time error checks) and <option>--enable-debug</option> (which improves the usefulness of debugging tools). </para> <para> If using GCC, it is best to build with an optimization level of - at least <option>-O1</>, because using no optimization - (<option>-O0</>) disables some important compiler warnings (such + at least <option>-O1</option>, because using no optimization + (<option>-O0</option>) disables some important compiler warnings (such as the use of uninitialized variables). However, non-zero optimization levels can complicate debugging because stepping through compiled code will usually not match up one-to-one with source code lines. If you get confused while trying to debug optimized code, recompile the specific files of interest with - <option>-O0</>. An easy way to do this is by passing an option - to <application>make</>: <command>make PROFILE=-O0 file.o</>. + <option>-O0</option>. An easy way to do this is by passing an option + to <application>make</application>: <command>make PROFILE=-O0 file.o</command>. </para> <para> - The <envar>COPT</> and <envar>PROFILE</> environment variables are - actually handled identically by the <productname>PostgreSQL</> + The <envar>COPT</envar> and <envar>PROFILE</envar> environment variables are + actually handled identically by the <productname>PostgreSQL</productname> makefiles. Which to use is a matter of preference, but a common habit - among developers is to use <envar>PROFILE</> for one-time flag - adjustments, while <envar>COPT</> might be kept set all the time. + among developers is to use <envar>PROFILE</envar> for one-time flag + adjustments, while <envar>COPT</envar> might be kept set all the time. </para> </note> </step> @@ -1530,7 +1530,7 @@ su - postgres <screen> <userinput>make</userinput> </screen> - (Remember to use <acronym>GNU</> <application>make</>.) The build + (Remember to use <acronym>GNU</acronym> <application>make</application>.) The build will take a few minutes depending on your hardware. The last line displayed should be: <screen> @@ -1562,7 +1562,7 @@ PostgreSQL, contrib, and documentation successfully made. Ready to install. <para> If you want to test the newly built server before you install it, you can run the regression tests at this point. The regression - tests are a test suite to verify that <productname>PostgreSQL</> + tests are a test suite to verify that <productname>PostgreSQL</productname> runs on your machine in the way the developers expected it to. Type: <screen> @@ -1588,7 +1588,7 @@ PostgreSQL, contrib, and documentation successfully made. Ready to install. </note> <para> - To install <productname>PostgreSQL</> enter: + To install <productname>PostgreSQL</productname> enter: <screen> <userinput>make install</userinput> </screen> @@ -1632,8 +1632,8 @@ PostgreSQL, contrib, and documentation successfully made. Ready to install. The standard installation provides all the header files needed for client application development as well as for server-side program development, such as custom functions or data types written in C. - (Prior to <productname>PostgreSQL</> 8.0, a separate <literal>make - install-all-headers</> command was needed for the latter, but this + (Prior to <productname>PostgreSQL</productname> 8.0, a separate <literal>make + install-all-headers</literal> command was needed for the latter, but this step has been folded into the standard install.) </para> @@ -1643,12 +1643,12 @@ PostgreSQL, contrib, and documentation successfully made. Ready to install. If you want to install only the client applications and interface libraries, then you can use these commands: <screen> -<userinput>make -C src/bin install</> -<userinput>make -C src/include install</> -<userinput>make -C src/interfaces install</> -<userinput>make -C doc install</> +<userinput>make -C src/bin install</userinput> +<userinput>make -C src/include install</userinput> +<userinput>make -C src/interfaces install</userinput> +<userinput>make -C doc install</userinput> </screen> - <filename>src/bin</> has a few binaries for server-only use, + <filename>src/bin</filename> has a few binaries for server-only use, but they are small. </para> </formalpara> @@ -1659,7 +1659,7 @@ PostgreSQL, contrib, and documentation successfully made. Ready to install. <title>Uninstallation:</title> <para> To undo the installation use the command <command>make - uninstall</>. However, this will not remove any created directories. + uninstall</command>. However, this will not remove any created directories. </para> </formalpara> @@ -1669,10 +1669,10 @@ PostgreSQL, contrib, and documentation successfully made. Ready to install. <para> After the installation you can free disk space by removing the built files from the source tree with the command <command>make - clean</>. This will preserve the files made by the <command>configure</command> - program, so that you can rebuild everything with <command>make</> + clean</command>. This will preserve the files made by the <command>configure</command> + program, so that you can rebuild everything with <command>make</command> later on. To reset the source tree to the state in which it was - distributed, use <command>make distclean</>. If you are going to + distributed, use <command>make distclean</command>. If you are going to build for several platforms within the same source tree you must do this and re-configure for each platform. (Alternatively, use a separate build tree for each platform, so that the source tree @@ -1681,10 +1681,10 @@ PostgreSQL, contrib, and documentation successfully made. Ready to install. </formalpara> <para> - If you perform a build and then discover that your <command>configure</> - options were wrong, or if you change anything that <command>configure</> + If you perform a build and then discover that your <command>configure</command> + options were wrong, or if you change anything that <command>configure</command> investigates (for example, software upgrades), then it's a good - idea to do <command>make distclean</> before reconfiguring and + idea to do <command>make distclean</command> before reconfiguring and rebuilding. Without this, your changes in configuration choices might not propagate everywhere they need to. </para> @@ -1705,31 +1705,31 @@ PostgreSQL, contrib, and documentation successfully made. Ready to install. you need to tell the system how to find the newly installed shared libraries. The systems on which this is <emphasis>not</emphasis> necessary include - <systemitem class="osname">FreeBSD</>, - <systemitem class="osname">HP-UX</>, - <systemitem class="osname">Linux</>, - <systemitem class="osname">NetBSD</>, <systemitem - class="osname">OpenBSD</>, and - <systemitem class="osname">Solaris</>. + <systemitem class="osname">FreeBSD</systemitem>, + <systemitem class="osname">HP-UX</systemitem>, + <systemitem class="osname">Linux</systemitem>, + <systemitem class="osname">NetBSD</systemitem>, <systemitem + class="osname">OpenBSD</systemitem>, and + <systemitem class="osname">Solaris</systemitem>. </para> <para> The method to set the shared library search path varies between platforms, but the most widely-used method is to set the - environment variable <envar>LD_LIBRARY_PATH</> like so: In Bourne - shells (<command>sh</>, <command>ksh</>, <command>bash</>, <command>zsh</>): + environment variable <envar>LD_LIBRARY_PATH</envar> like so: In Bourne + shells (<command>sh</command>, <command>ksh</command>, <command>bash</command>, <command>zsh</command>): <programlisting> LD_LIBRARY_PATH=/usr/local/pgsql/lib export LD_LIBRARY_PATH </programlisting> - or in <command>csh</> or <command>tcsh</>: + or in <command>csh</command> or <command>tcsh</command>: <programlisting> setenv LD_LIBRARY_PATH /usr/local/pgsql/lib </programlisting> - Replace <literal>/usr/local/pgsql/lib</> with whatever you set - <option><literal>--libdir</></> to in <xref linkend="configure">. + Replace <literal>/usr/local/pgsql/lib</literal> with whatever you set + <option><literal>--libdir</literal></option> to in <xref linkend="configure">. You should put these commands into a shell start-up file such as - <filename>/etc/profile</> or <filename>~/.bash_profile</>. Some + <filename>/etc/profile</filename> or <filename>~/.bash_profile</filename>. Some good information about the caveats associated with this method can be found at <ulink url="http://xahlee.org/UnixResource_dir/_/ldpath.html"></ulink>. @@ -1763,17 +1763,17 @@ libpq.so.2.1: cannot open shared object file: No such file or directory <indexterm> <primary>ldconfig</primary> </indexterm> - If you are on <systemitem class="osname">Linux</> and you have root + If you are on <systemitem class="osname">Linux</systemitem> and you have root access, you can run: <programlisting> /sbin/ldconfig /usr/local/pgsql/lib </programlisting> (or equivalent directory) after installation to enable the run-time linker to find the shared libraries faster. Refer to the - manual page of <command>ldconfig</> for more information. On - <systemitem class="osname">FreeBSD</>, <systemitem - class="osname">NetBSD</>, and <systemitem - class="osname">OpenBSD</> the command is: + manual page of <command>ldconfig</command> for more information. On + <systemitem class="osname">FreeBSD</systemitem>, <systemitem + class="osname">NetBSD</systemitem>, and <systemitem + class="osname">OpenBSD</systemitem> the command is: <programlisting> /sbin/ldconfig -m /usr/local/pgsql/lib </programlisting> @@ -1790,24 +1790,24 @@ libpq.so.2.1: cannot open shared object file: No such file or directory </indexterm> <para> - If you installed into <filename>/usr/local/pgsql</> or some other + If you installed into <filename>/usr/local/pgsql</filename> or some other location that is not searched for programs by default, you should - add <filename>/usr/local/pgsql/bin</> (or whatever you set - <option><literal>--bindir</></> to in <xref linkend="configure">) - into your <envar>PATH</>. Strictly speaking, this is not - necessary, but it will make the use of <productname>PostgreSQL</> + add <filename>/usr/local/pgsql/bin</filename> (or whatever you set + <option><literal>--bindir</literal></option> to in <xref linkend="configure">) + into your <envar>PATH</envar>. Strictly speaking, this is not + necessary, but it will make the use of <productname>PostgreSQL</productname> much more convenient. </para> <para> To do this, add the following to your shell start-up file, such as - <filename>~/.bash_profile</> (or <filename>/etc/profile</>, if you + <filename>~/.bash_profile</filename> (or <filename>/etc/profile</filename>, if you want it to affect all users): <programlisting> PATH=/usr/local/pgsql/bin:$PATH export PATH </programlisting> - If you are using <command>csh</> or <command>tcsh</>, then use this command: + If you are using <command>csh</command> or <command>tcsh</command>, then use this command: <programlisting> set path = ( /usr/local/pgsql/bin $path ) </programlisting> @@ -1817,7 +1817,7 @@ set path = ( /usr/local/pgsql/bin $path ) <indexterm> <primary><envar>MANPATH</envar></primary> </indexterm> - To enable your system to find the <application>man</> + To enable your system to find the <application>man</application> documentation, you need to add lines like the following to a shell start-up file unless you installed into a location that is searched by default: @@ -1828,11 +1828,11 @@ export MANPATH </para> <para> - The environment variables <envar>PGHOST</> and <envar>PGPORT</> + The environment variables <envar>PGHOST</envar> and <envar>PGPORT</envar> specify to client applications the host and port of the database server, overriding the compiled-in defaults. If you are going to run client applications remotely then it is convenient if every - user that plans to use the database sets <envar>PGHOST</>. This + user that plans to use the database sets <envar>PGHOST</envar>. This is not required, however; the settings can be communicated via command line options to most client programs. </para> @@ -1844,20 +1844,20 @@ export MANPATH <para> A platform (that is, a CPU architecture and operating system combination) - is considered supported by the <productname>PostgreSQL</> development + is considered supported by the <productname>PostgreSQL</productname> development community if the code contains provisions to work on that platform and it has recently been verified to build and pass its regression tests on that platform. Currently, most testing of platform compatibility is done automatically by test machines in the <ulink url="https://buildfarm.postgresql.org/">PostgreSQL Build Farm</ulink>. - If you are interested in using <productname>PostgreSQL</> on a platform + If you are interested in using <productname>PostgreSQL</productname> on a platform that is not represented in the build farm, but on which the code works or can be made to work, you are strongly encouraged to set up a build farm member machine so that continued compatibility can be assured. </para> <para> - In general, <productname>PostgreSQL</> can be expected to work on + In general, <productname>PostgreSQL</productname> can be expected to work on these CPU architectures: x86, x86_64, IA64, PowerPC, PowerPC 64, S/390, S/390x, Sparc, Sparc 64, ARM, MIPS, MIPSEL, and PA-RISC. Code support exists for M68K, M32R, and VAX, but these @@ -1867,7 +1867,7 @@ export MANPATH </para> <para> - <productname>PostgreSQL</> can be expected to work on these operating + <productname>PostgreSQL</productname> can be expected to work on these operating systems: Linux (all recent distributions), Windows (Win2000 SP4 and later), FreeBSD, OpenBSD, NetBSD, macOS, AIX, HP/UX, and Solaris. Other Unix-like systems may also work but are not currently @@ -1882,7 +1882,7 @@ export MANPATH If you have installation problems on a platform that is known to be supported according to recent build farm results, please report it to <email>pgsql-bugs@postgresql.org</email>. If you are interested - in porting <productname>PostgreSQL</> to a new platform, + in porting <productname>PostgreSQL</productname> to a new platform, <email>pgsql-hackers@postgresql.org</email> is the appropriate place to discuss that. </para> @@ -1962,7 +1962,7 @@ export MANPATH <para> Use the following <command>configure</command> flags in addition to your own if you have installed Readline or libz in - <literal>/usr/local</>: + <literal>/usr/local</literal>: <literal>--with-includes=/usr/local/include --with-libraries=/usr/local/lib</literal>. </para> @@ -2015,9 +2015,9 @@ export MANPATH <title>Internet Address Issues</title> <para> - PostgreSQL relies on the system's <function>getaddrinfo</> function - to parse IP addresses in <varname>listen_addresses</>, - <filename>pg_hba.conf</>, etc. Older versions of AIX have assorted + PostgreSQL relies on the system's <function>getaddrinfo</function> function + to parse IP addresses in <varname>listen_addresses</varname>, + <filename>pg_hba.conf</filename>, etc. Older versions of AIX have assorted bugs in this function. If you have problems related to these settings, updating to the appropriate AIX fix level shown above should take care of it. @@ -2163,7 +2163,7 @@ ERROR: could not load library "/opt/dbs/pgsql/lib/plperl.so": Bad address <command>xlc</command> might differ.) If you omit the export of <envar>OBJECT_MODE</envar>, your build may fail with linker errors. When <envar>OBJECT_MODE</envar> is set, it tells AIX's build utilities - such as <command>ar</>, <command>as</>, and <command>ld</> what + such as <command>ar</command>, <command>as</command>, and <command>ld</command> what type of objects to default to handling. </para> @@ -2479,10 +2479,10 @@ PHSS_30849 s700_800 u2comp/be/plugin library Patch <para> If PostgreSQL on Windows crashes, it has the ability to generate - <productname>minidumps</> that can be used to track down the cause + <productname>minidumps</productname> that can be used to track down the cause for the crash, similar to core dumps on Unix. These dumps can be - read using the <productname>Windows Debugger Tools</> or using - <productname>Visual Studio</>. To enable the generation of dumps + read using the <productname>Windows Debugger Tools</productname> or using + <productname>Visual Studio</productname>. To enable the generation of dumps on Windows, create a subdirectory named <filename>crashdumps</filename> inside the cluster data directory. The dumps will then be written into this directory with a unique name based on the identifier of @@ -2545,7 +2545,7 @@ PHSS_30849 s700_800 u2comp/be/plugin library Patch configure ... LDFLAGS="-R /usr/sfw/lib:/opt/sfw/lib:/usr/local/lib" </programlisting> See - the <citerefentry><refentrytitle>ld</><manvolnum>1</></citerefentry> + the <citerefentry><refentrytitle>ld</refentrytitle><manvolnum>1</manvolnum></citerefentry> man page for more information. </para> </sect3> diff --git a/doc/src/sgml/intagg.sgml b/doc/src/sgml/intagg.sgml index 669c901764b..c410f64f3ef 100644 --- a/doc/src/sgml/intagg.sgml +++ b/doc/src/sgml/intagg.sgml @@ -28,10 +28,10 @@ <para> The aggregator is an aggregate function - <function>int_array_aggregate(integer)</> + <function>int_array_aggregate(integer)</function> that produces an integer array containing exactly the integers it is fed. - This is a wrapper around <function>array_agg</>, + This is a wrapper around <function>array_agg</function>, which does the same thing for any array type. </para> @@ -41,10 +41,10 @@ <para> The enumerator is a function - <function>int_array_enum(integer[])</> - that returns <type>setof integer</>. It is essentially the reverse + <function>int_array_enum(integer[])</function> + that returns <type>setof integer</type>. It is essentially the reverse operation of the aggregator: given an array of integers, expand it - into a set of rows. This is a wrapper around <function>unnest</>, + into a set of rows. This is a wrapper around <function>unnest</function>, which does the same thing for any array type. </para> @@ -67,7 +67,7 @@ CREATE TABLE one_to_many(left INT REFERENCES left, right INT REFERENCES right); <programlisting> SELECT right.* from right JOIN one_to_many ON (right.id = one_to_many.right) - WHERE one_to_many.left = <replaceable>item</>; + WHERE one_to_many.left = <replaceable>item</replaceable>; </programlisting> This will return all the items in the right hand table for an entry @@ -76,7 +76,7 @@ SELECT right.* from right JOIN one_to_many ON (right.id = one_to_many.right) <para> Now, this methodology can be cumbersome with a very large number of - entries in the <structname>one_to_many</> table. Often, + entries in the <structname>one_to_many</structname> table. Often, a join like this would result in an index scan and a fetch for each right hand entry in the table for a particular left hand entry. If you have a very dynamic system, there is not much you @@ -95,30 +95,30 @@ CREATE TABLE summary AS the array; that's why there is an array enumerator. You can do <programlisting> -SELECT left, int_array_enum(right) FROM summary WHERE left = <replaceable>item</>; +SELECT left, int_array_enum(right) FROM summary WHERE left = <replaceable>item</replaceable>; </programlisting> - The above query using <function>int_array_enum</> produces the same results + The above query using <function>int_array_enum</function> produces the same results as <programlisting> -SELECT left, right FROM one_to_many WHERE left = <replaceable>item</>; +SELECT left, right FROM one_to_many WHERE left = <replaceable>item</replaceable>; </programlisting> The difference is that the query against the summary table has to get only one row from the table, whereas the direct query against - <structname>one_to_many</> must index scan and fetch a row for each entry. + <structname>one_to_many</structname> must index scan and fetch a row for each entry. </para> <para> - On one system, an <command>EXPLAIN</> showed a query with a cost of 8488 was + On one system, an <command>EXPLAIN</command> showed a query with a cost of 8488 was reduced to a cost of 329. The original query was a join involving the - <structname>one_to_many</> table, which was replaced by: + <structname>one_to_many</structname> table, which was replaced by: <programlisting> SELECT right, count(right) FROM ( SELECT left, int_array_enum(right) AS right - FROM summary JOIN (SELECT left FROM left_table WHERE left = <replaceable>item</>) AS lefts + FROM summary JOIN (SELECT left FROM left_table WHERE left = <replaceable>item</replaceable>) AS lefts ON (summary.left = lefts.left) ) AS list GROUP BY right diff --git a/doc/src/sgml/intarray.sgml b/doc/src/sgml/intarray.sgml index ccb1fdecea1..0cf9d5f3f63 100644 --- a/doc/src/sgml/intarray.sgml +++ b/doc/src/sgml/intarray.sgml @@ -8,7 +8,7 @@ </indexterm> <para> - The <filename>intarray</> module provides a number of useful functions + The <filename>intarray</filename> module provides a number of useful functions and operators for manipulating null-free arrays of integers. There is also support for indexed searches using some of the operators. </para> @@ -25,7 +25,7 @@ </para> <sect2> - <title><filename>intarray</> Functions and Operators</title> + <title><filename>intarray</filename> Functions and Operators</title> <para> The functions provided by the <filename>intarray</filename> module @@ -34,7 +34,7 @@ </para> <table id="intarray-func-table"> - <title><filename>intarray</> Functions</title> + <title><filename>intarray</filename> Functions</title> <tgroup cols="5"> <thead> @@ -59,7 +59,7 @@ <row> <entry><function>sort(int[], text dir)</function><indexterm><primary>sort</primary></indexterm></entry> <entry><type>int[]</type></entry> - <entry>sort array — <parameter>dir</> must be <literal>asc</> or <literal>desc</></entry> + <entry>sort array — <parameter>dir</parameter> must be <literal>asc</literal> or <literal>desc</literal></entry> <entry><literal>sort('{1,2,3}'::int[], 'desc')</literal></entry> <entry><literal>{3,2,1}</literal></entry> </row> @@ -99,7 +99,7 @@ <row> <entry><function>idx(int[], int item)</function><indexterm><primary>idx</primary></indexterm></entry> <entry><type>int</type></entry> - <entry>index of first element matching <parameter>item</> (0 if none)</entry> + <entry>index of first element matching <parameter>item</parameter> (0 if none)</entry> <entry><literal>idx(array[11,22,33,22,11], 22)</literal></entry> <entry><literal>2</literal></entry> </row> @@ -107,7 +107,7 @@ <row> <entry><function>subarray(int[], int start, int len)</function><indexterm><primary>subarray</primary></indexterm></entry> <entry><type>int[]</type></entry> - <entry>portion of array starting at position <parameter>start</>, <parameter>len</> elements</entry> + <entry>portion of array starting at position <parameter>start</parameter>, <parameter>len</parameter> elements</entry> <entry><literal>subarray('{1,2,3,2,1}'::int[], 2, 3)</literal></entry> <entry><literal>{2,3,2}</literal></entry> </row> @@ -115,7 +115,7 @@ <row> <entry><function>subarray(int[], int start)</function></entry> <entry><type>int[]</type></entry> - <entry>portion of array starting at position <parameter>start</></entry> + <entry>portion of array starting at position <parameter>start</parameter></entry> <entry><literal>subarray('{1,2,3,2,1}'::int[], 2)</literal></entry> <entry><literal>{2,3,2,1}</literal></entry> </row> @@ -133,7 +133,7 @@ </table> <table id="intarray-op-table"> - <title><filename>intarray</> Operators</title> + <title><filename>intarray</filename> Operators</title> <tgroup cols="3"> <thead> @@ -148,17 +148,17 @@ <row> <entry><literal>int[] && int[]</literal></entry> <entry><type>boolean</type></entry> - <entry>overlap — <literal>true</> if arrays have at least one common element</entry> + <entry>overlap — <literal>true</literal> if arrays have at least one common element</entry> </row> <row> <entry><literal>int[] @> int[]</literal></entry> <entry><type>boolean</type></entry> - <entry>contains — <literal>true</> if left array contains right array</entry> + <entry>contains — <literal>true</literal> if left array contains right array</entry> </row> <row> <entry><literal>int[] <@ int[]</literal></entry> <entry><type>boolean</type></entry> - <entry>contained — <literal>true</> if left array is contained in right array</entry> + <entry>contained — <literal>true</literal> if left array is contained in right array</entry> </row> <row> <entry><literal># int[]</literal></entry> @@ -168,7 +168,7 @@ <row> <entry><literal>int[] # int</literal></entry> <entry><type>int</type></entry> - <entry>index (same as <function>idx</> function)</entry> + <entry>index (same as <function>idx</function> function)</entry> </row> <row> <entry><literal>int[] + int</literal></entry> @@ -208,28 +208,28 @@ <row> <entry><literal>int[] @@ query_int</literal></entry> <entry><type>boolean</type></entry> - <entry><literal>true</> if array satisfies query (see below)</entry> + <entry><literal>true</literal> if array satisfies query (see below)</entry> </row> <row> <entry><literal>query_int ~~ int[]</literal></entry> <entry><type>boolean</type></entry> - <entry><literal>true</> if array satisfies query (commutator of <literal>@@</>)</entry> + <entry><literal>true</literal> if array satisfies query (commutator of <literal>@@</literal>)</entry> </row> </tbody> </tgroup> </table> <para> - (Before PostgreSQL 8.2, the containment operators <literal>@></> and - <literal><@</> were respectively called <literal>@</> and <literal>~</>. + (Before PostgreSQL 8.2, the containment operators <literal>@></literal> and + <literal><@</literal> were respectively called <literal>@</literal> and <literal>~</literal>. These names are still available, but are deprecated and will eventually be retired. Notice that the old names are reversed from the convention formerly followed by the core geometric data types!) </para> <para> - The operators <literal>&&</>, <literal>@></> and - <literal><@</> are equivalent to <productname>PostgreSQL</>'s built-in + The operators <literal>&&</literal>, <literal>@></literal> and + <literal><@</literal> are equivalent to <productname>PostgreSQL</productname>'s built-in operators of the same names, except that they work only on integer arrays that do not contain nulls, while the built-in operators work for any array type. This restriction makes them faster than the built-in operators @@ -237,14 +237,14 @@ </para> <para> - The <literal>@@</> and <literal>~~</> operators test whether an array - satisfies a <firstterm>query</>, which is expressed as a value of a - specialized data type <type>query_int</>. A <firstterm>query</> + The <literal>@@</literal> and <literal>~~</literal> operators test whether an array + satisfies a <firstterm>query</firstterm>, which is expressed as a value of a + specialized data type <type>query_int</type>. A <firstterm>query</firstterm> consists of integer values that are checked against the elements of - the array, possibly combined using the operators <literal>&</> - (AND), <literal>|</> (OR), and <literal>!</> (NOT). Parentheses + the array, possibly combined using the operators <literal>&</literal> + (AND), <literal>|</literal> (OR), and <literal>!</literal> (NOT). Parentheses can be used as needed. For example, - the query <literal>1&(2|3)</> matches arrays that contain 1 + the query <literal>1&(2|3)</literal> matches arrays that contain 1 and also contain either 2 or 3. </para> </sect2> @@ -253,16 +253,16 @@ <title>Index Support</title> <para> - <filename>intarray</> provides index support for the - <literal>&&</>, <literal>@></>, <literal><@</>, - and <literal>@@</> operators, as well as regular array equality. + <filename>intarray</filename> provides index support for the + <literal>&&</literal>, <literal>@></literal>, <literal><@</literal>, + and <literal>@@</literal> operators, as well as regular array equality. </para> <para> Two GiST index operator classes are provided: - <literal>gist__int_ops</> (used by default) is suitable for + <literal>gist__int_ops</literal> (used by default) is suitable for small- to medium-size data sets, while - <literal>gist__intbig_ops</> uses a larger signature and is more + <literal>gist__intbig_ops</literal> uses a larger signature and is more suitable for indexing large data sets (i.e., columns containing a large number of distinct array values). The implementation uses an RD-tree data structure with @@ -271,7 +271,7 @@ <para> There is also a non-default GIN operator class - <literal>gin__int_ops</> supporting the same operators. + <literal>gin__int_ops</literal> supporting the same operators. </para> <para> @@ -284,7 +284,7 @@ <title>Example</title> <programlisting> --- a message can be in one or more <quote>sections</> +-- a message can be in one or more <quote>sections</quote> CREATE TABLE message (mid INT PRIMARY KEY, sections INT[], ...); -- create specialized index @@ -305,9 +305,9 @@ SELECT message.mid FROM message WHERE message.sections @@ '1&2'::query_int; <title>Benchmark</title> <para> - The source directory <filename>contrib/intarray/bench</> contains a + The source directory <filename>contrib/intarray/bench</filename> contains a benchmark test suite, which can be run against an installed - <productname>PostgreSQL</> server. (It also requires <filename>DBD::Pg</> + <productname>PostgreSQL</productname> server. (It also requires <filename>DBD::Pg</filename> to be installed.) To run: </para> @@ -320,7 +320,7 @@ psql -c "CREATE EXTENSION intarray" TEST </programlisting> <para> - The <filename>bench.pl</> script has numerous options, which + The <filename>bench.pl</filename> script has numerous options, which are displayed when it is run without any arguments. </para> </sect2> diff --git a/doc/src/sgml/intro.sgml b/doc/src/sgml/intro.sgml index f0dba6f56fb..2fb19725f04 100644 --- a/doc/src/sgml/intro.sgml +++ b/doc/src/sgml/intro.sgml @@ -32,7 +32,7 @@ <xref linkend="sql"> documents the <acronym>SQL</acronym> query language environment, including data types and functions, as well as user-level performance tuning. Every - <productname>PostgreSQL</> user should read this. + <productname>PostgreSQL</productname> user should read this. </para> </listitem> @@ -75,7 +75,7 @@ <listitem> <para> <xref linkend="internals"> contains assorted information that might be of - use to <productname>PostgreSQL</> developers. + use to <productname>PostgreSQL</productname> developers. </para> </listitem> </itemizedlist> diff --git a/doc/src/sgml/isn.sgml b/doc/src/sgml/isn.sgml index c1da702df63..329b7b2c54d 100644 --- a/doc/src/sgml/isn.sgml +++ b/doc/src/sgml/isn.sgml @@ -123,7 +123,7 @@ </listitem> <listitem> <para>UPC numbers are a subset of the EAN13 numbers (they are basically - EAN13 without the first <literal>0</> digit).</para> + EAN13 without the first <literal>0</literal> digit).</para> </listitem> <listitem> <para>All UPC, ISBN, ISMN and ISSN numbers can be represented as EAN13 @@ -139,7 +139,7 @@ </para> <para> - The <type>ISBN</>, <type>ISMN</>, and <type>ISSN</> types will display the + The <type>ISBN</type>, <type>ISMN</type>, and <type>ISSN</type> types will display the short version of the number (ISxN 10) whenever it's possible, and will show ISxN 13 format for numbers that do not fit in the short version. The <type>EAN13</type>, <type>ISBN13</type>, <type>ISMN13</type> and @@ -152,7 +152,7 @@ <title>Casts</title> <para> - The <filename>isn</> module provides the following pairs of type casts: + The <filename>isn</filename> module provides the following pairs of type casts: </para> <itemizedlist> @@ -209,7 +209,7 @@ </itemizedlist> <para> - When casting from <type>EAN13</> to another type, there is a run-time + When casting from <type>EAN13</type> to another type, there is a run-time check that the value is within the domain of the other type, and an error is thrown if not. The other casts are simply relabelings that will always succeed. @@ -220,15 +220,15 @@ <title>Functions and Operators</title> <para> - The <filename>isn</> module provides the standard comparison operators, + The <filename>isn</filename> module provides the standard comparison operators, plus B-tree and hash indexing support for all these data types. In addition there are several specialized functions; shown in <xref linkend="isn-functions">. In this table, - <type>isn</> means any one of the module's data types. + <type>isn</type> means any one of the module's data types. </para> <table id="isn-functions"> - <title><filename>isn</> Functions</title> + <title><filename>isn</filename> Functions</title> <tgroup cols="3"> <thead> <row> @@ -285,21 +285,21 @@ <para> When you insert invalid numbers in a table using the weak mode, the number will be inserted with the corrected check digit, but it will be displayed - with an exclamation mark (<literal>!</>) at the end, for example - <literal>0-11-000322-5!</>. This invalid marker can be checked with - the <function>is_valid</> function and cleared with the - <function>make_valid</> function. + with an exclamation mark (<literal>!</literal>) at the end, for example + <literal>0-11-000322-5!</literal>. This invalid marker can be checked with + the <function>is_valid</function> function and cleared with the + <function>make_valid</function> function. </para> <para> You can also force the insertion of invalid numbers even when not in the - weak mode, by appending the <literal>!</> character at the end of the + weak mode, by appending the <literal>!</literal> character at the end of the number. </para> <para> Another special feature is that during input, you can write - <literal>?</> in place of the check digit, and the correct check digit + <literal>?</literal> in place of the check digit, and the correct check digit will be inserted automatically. </para> </sect2> @@ -384,7 +384,7 @@ SELECT isbn13(id) FROM test; <para> This module was inspired by Garrett A. Wollman's - <filename>isbn_issn</> code. + <filename>isbn_issn</filename> code. </para> </sect2> diff --git a/doc/src/sgml/json.sgml b/doc/src/sgml/json.sgml index 7dfdf967645..05ecef2ffc9 100644 --- a/doc/src/sgml/json.sgml +++ b/doc/src/sgml/json.sgml @@ -1,7 +1,7 @@ <!-- doc/src/sgml/json.sgml --> <sect1 id="datatype-json"> - <title><acronym>JSON</> Types</title> + <title><acronym>JSON</acronym> Types</title> <indexterm zone="datatype-json"> <primary>JSON</primary> @@ -22,25 +22,25 @@ </para> <para> - There are two JSON data types: <type>json</> and <type>jsonb</>. - They accept <emphasis>almost</> identical sets of values as + There are two JSON data types: <type>json</type> and <type>jsonb</type>. + They accept <emphasis>almost</emphasis> identical sets of values as input. The major practical difference is one of efficiency. The - <type>json</> data type stores an exact copy of the input text, + <type>json</type> data type stores an exact copy of the input text, which processing functions must reparse on each execution; while - <type>jsonb</> data is stored in a decomposed binary format that + <type>jsonb</type> data is stored in a decomposed binary format that makes it slightly slower to input due to added conversion overhead, but significantly faster to process, since no reparsing - is needed. <type>jsonb</> also supports indexing, which can be a + is needed. <type>jsonb</type> also supports indexing, which can be a significant advantage. </para> <para> - Because the <type>json</> type stores an exact copy of the input text, it + Because the <type>json</type> type stores an exact copy of the input text, it will preserve semantically-insignificant white space between tokens, as well as the order of keys within JSON objects. Also, if a JSON object within the value contains the same key more than once, all the key/value pairs are kept. (The processing functions consider the last value as the - operative one.) By contrast, <type>jsonb</> does not preserve white + operative one.) By contrast, <type>jsonb</type> does not preserve white space, does not preserve the order of object keys, and does not keep duplicate object keys. If duplicate keys are specified in the input, only the last value is kept. @@ -48,7 +48,7 @@ <para> In general, most applications should prefer to store JSON data as - <type>jsonb</>, unless there are quite specialized needs, such as + <type>jsonb</type>, unless there are quite specialized needs, such as legacy assumptions about ordering of object keys. </para> @@ -64,15 +64,15 @@ <para> RFC 7159 permits JSON strings to contain Unicode escape sequences - denoted by <literal>\u<replaceable>XXXX</></literal>. In the input - function for the <type>json</> type, Unicode escapes are allowed + denoted by <literal>\u<replaceable>XXXX</replaceable></literal>. In the input + function for the <type>json</type> type, Unicode escapes are allowed regardless of the database encoding, and are checked only for syntactic - correctness (that is, that four hex digits follow <literal>\u</>). - However, the input function for <type>jsonb</> is stricter: it disallows - Unicode escapes for non-ASCII characters (those above <literal>U+007F</>) - unless the database encoding is UTF8. The <type>jsonb</> type also - rejects <literal>\u0000</> (because that cannot be represented in - <productname>PostgreSQL</productname>'s <type>text</> type), and it insists + correctness (that is, that four hex digits follow <literal>\u</literal>). + However, the input function for <type>jsonb</type> is stricter: it disallows + Unicode escapes for non-ASCII characters (those above <literal>U+007F</literal>) + unless the database encoding is UTF8. The <type>jsonb</type> type also + rejects <literal>\u0000</literal> (because that cannot be represented in + <productname>PostgreSQL</productname>'s <type>text</type> type), and it insists that any use of Unicode surrogate pairs to designate characters outside the Unicode Basic Multilingual Plane be correct. Valid Unicode escapes are converted to the equivalent ASCII or UTF8 character for storage; @@ -84,8 +84,8 @@ Many of the JSON processing functions described in <xref linkend="functions-json"> will convert Unicode escapes to regular characters, and will therefore throw the same types of errors - just described even if their input is of type <type>json</> - not <type>jsonb</>. The fact that the <type>json</> input function does + just described even if their input is of type <type>json</type> + not <type>jsonb</type>. The fact that the <type>json</type> input function does not make these checks may be considered a historical artifact, although it does allow for simple storage (without processing) of JSON Unicode escapes in a non-UTF8 database encoding. In general, it is best to @@ -95,22 +95,22 @@ </note> <para> - When converting textual JSON input into <type>jsonb</>, the primitive - types described by <acronym>RFC</> 7159 are effectively mapped onto + When converting textual JSON input into <type>jsonb</type>, the primitive + types described by <acronym>RFC</acronym> 7159 are effectively mapped onto native <productname>PostgreSQL</productname> types, as shown in <xref linkend="json-type-mapping-table">. Therefore, there are some minor additional constraints on what constitutes valid <type>jsonb</type> data that do not apply to the <type>json</type> type, nor to JSON in the abstract, corresponding to limits on what can be represented by the underlying data type. - Notably, <type>jsonb</> will reject numbers that are outside the - range of the <productname>PostgreSQL</productname> <type>numeric</> data - type, while <type>json</> will not. Such implementation-defined - restrictions are permitted by <acronym>RFC</> 7159. However, in + Notably, <type>jsonb</type> will reject numbers that are outside the + range of the <productname>PostgreSQL</productname> <type>numeric</type> data + type, while <type>json</type> will not. Such implementation-defined + restrictions are permitted by <acronym>RFC</acronym> 7159. However, in practice such problems are far more likely to occur in other - implementations, as it is common to represent JSON's <type>number</> + implementations, as it is common to represent JSON's <type>number</type> primitive type as IEEE 754 double precision floating point - (which <acronym>RFC</> 7159 explicitly anticipates and allows for). + (which <acronym>RFC</acronym> 7159 explicitly anticipates and allows for). When using JSON as an interchange format with such systems, the danger of losing numeric precision compared to data originally stored by <productname>PostgreSQL</productname> should be considered. @@ -134,23 +134,23 @@ </thead> <tbody> <row> - <entry><type>string</></entry> - <entry><type>text</></entry> - <entry><literal>\u0000</> is disallowed, as are non-ASCII Unicode + <entry><type>string</type></entry> + <entry><type>text</type></entry> + <entry><literal>\u0000</literal> is disallowed, as are non-ASCII Unicode escapes if database encoding is not UTF8</entry> </row> <row> - <entry><type>number</></entry> - <entry><type>numeric</></entry> + <entry><type>number</type></entry> + <entry><type>numeric</type></entry> <entry><literal>NaN</literal> and <literal>infinity</literal> values are disallowed</entry> </row> <row> - <entry><type>boolean</></entry> - <entry><type>boolean</></entry> + <entry><type>boolean</type></entry> + <entry><type>boolean</type></entry> <entry>Only lowercase <literal>true</literal> and <literal>false</literal> spellings are accepted</entry> </row> <row> - <entry><type>null</></entry> + <entry><type>null</type></entry> <entry>(none)</entry> <entry>SQL <literal>NULL</literal> is a different concept</entry> </row> @@ -162,10 +162,10 @@ <title>JSON Input and Output Syntax</title> <para> The input/output syntax for the JSON data types is as specified in - <acronym>RFC</> 7159. + <acronym>RFC</acronym> 7159. </para> <para> - The following are all valid <type>json</> (or <type>jsonb</>) expressions: + The following are all valid <type>json</type> (or <type>jsonb</type>) expressions: <programlisting> -- Simple scalar/primitive value -- Primitive values can be numbers, quoted strings, true, false, or null @@ -185,8 +185,8 @@ SELECT '{"foo": [true, "bar"], "tags": {"a": 1, "b": null}}'::json; <para> As previously stated, when a JSON value is input and then printed without - any additional processing, <type>json</> outputs the same text that was - input, while <type>jsonb</> does not preserve semantically-insignificant + any additional processing, <type>json</type> outputs the same text that was + input, while <type>jsonb</type> does not preserve semantically-insignificant details such as whitespace. For example, note the differences here: <programlisting> SELECT '{"bar": "baz", "balance": 7.77, "active":false}'::json; @@ -202,9 +202,9 @@ SELECT '{"bar": "baz", "balance": 7.77, "active":false}'::jsonb; (1 row) </programlisting> One semantically-insignificant detail worth noting is that - in <type>jsonb</>, numbers will be printed according to the behavior of the - underlying <type>numeric</> type. In practice this means that numbers - entered with <literal>E</> notation will be printed without it, for + in <type>jsonb</type>, numbers will be printed according to the behavior of the + underlying <type>numeric</type> type. In practice this means that numbers + entered with <literal>E</literal> notation will be printed without it, for example: <programlisting> SELECT '{"reading": 1.230e-5}'::json, '{"reading": 1.230e-5}'::jsonb; @@ -213,7 +213,7 @@ SELECT '{"reading": 1.230e-5}'::json, '{"reading": 1.230e-5}'::jsonb; {"reading": 1.230e-5} | {"reading": 0.00001230} (1 row) </programlisting> - However, <type>jsonb</> will preserve trailing fractional zeroes, as seen + However, <type>jsonb</type> will preserve trailing fractional zeroes, as seen in this example, even though those are semantically insignificant for purposes such as equality checks. </para> @@ -231,7 +231,7 @@ SELECT '{"reading": 1.230e-5}'::json, '{"reading": 1.230e-5}'::jsonb; have a somewhat fixed structure. The structure is typically unenforced (though enforcing some business rules declaratively is possible), but having a predictable structure makes it easier to write - queries that usefully summarize a set of <quote>documents</> (datums) + queries that usefully summarize a set of <quote>documents</quote> (datums) in a table. </para> <para> @@ -249,7 +249,7 @@ SELECT '{"reading": 1.230e-5}'::json, '{"reading": 1.230e-5}'::jsonb; </sect2> <sect2 id="json-containment"> - <title><type>jsonb</> Containment and Existence</title> + <title><type>jsonb</type> Containment and Existence</title> <indexterm> <primary>jsonb</primary> <secondary>containment</secondary> @@ -259,10 +259,10 @@ SELECT '{"reading": 1.230e-5}'::json, '{"reading": 1.230e-5}'::jsonb; <secondary>existence</secondary> </indexterm> <para> - Testing <firstterm>containment</> is an important capability of - <type>jsonb</>. There is no parallel set of facilities for the - <type>json</> type. Containment tests whether - one <type>jsonb</> document has contained within it another one. + Testing <firstterm>containment</firstterm> is an important capability of + <type>jsonb</type>. There is no parallel set of facilities for the + <type>json</type> type. Containment tests whether + one <type>jsonb</type> document has contained within it another one. These examples return true except as noted: </para> <programlisting> @@ -282,7 +282,7 @@ SELECT '[1, 2, 3]'::jsonb @> '[1, 2, 2]'::jsonb; -- within the object on the left side: SELECT '{"product": "PostgreSQL", "version": 9.4, "jsonb": true}'::jsonb @> '{"version": 9.4}'::jsonb; --- The array on the right side is <emphasis>not</> considered contained within the +-- The array on the right side is <emphasis>not</emphasis> considered contained within the -- array on the left, even though a similar array is nested within it: SELECT '[1, 2, [1, 3]]'::jsonb @> '[1, 3]'::jsonb; -- yields false @@ -319,10 +319,10 @@ SELECT '"bar"'::jsonb @> '["bar"]'::jsonb; -- yields false </programlisting> <para> - <type>jsonb</> also has an <firstterm>existence</> operator, which is + <type>jsonb</type> also has an <firstterm>existence</firstterm> operator, which is a variation on the theme of containment: it tests whether a string - (given as a <type>text</> value) appears as an object key or array - element at the top level of the <type>jsonb</> value. + (given as a <type>text</type> value) appears as an object key or array + element at the top level of the <type>jsonb</type> value. These examples return true except as noted: </para> <programlisting> @@ -353,11 +353,11 @@ SELECT '"foo"'::jsonb ? 'foo'; <para> Because JSON containment is nested, an appropriate query can skip explicit selection of sub-objects. As an example, suppose that we have - a <structfield>doc</> column containing objects at the top level, with - most objects containing <literal>tags</> fields that contain arrays of + a <structfield>doc</structfield> column containing objects at the top level, with + most objects containing <literal>tags</literal> fields that contain arrays of sub-objects. This query finds entries in which sub-objects containing - both <literal>"term":"paris"</> and <literal>"term":"food"</> appear, - while ignoring any such keys outside the <literal>tags</> array: + both <literal>"term":"paris"</literal> and <literal>"term":"food"</literal> appear, + while ignoring any such keys outside the <literal>tags</literal> array: <programlisting> SELECT doc->'site_name' FROM websites WHERE doc @> '{"tags":[{"term":"paris"}, {"term":"food"}]}'; @@ -385,7 +385,7 @@ SELECT doc->'site_name' FROM websites </sect2> <sect2 id="json-indexing"> - <title><type>jsonb</> Indexing</title> + <title><type>jsonb</type> Indexing</title> <indexterm> <primary>jsonb</primary> <secondary>indexes on</secondary> @@ -394,23 +394,23 @@ SELECT doc->'site_name' FROM websites <para> GIN indexes can be used to efficiently search for keys or key/value pairs occurring within a large number of - <type>jsonb</> documents (datums). - Two GIN <quote>operator classes</> are provided, offering different + <type>jsonb</type> documents (datums). + Two GIN <quote>operator classes</quote> are provided, offering different performance and flexibility trade-offs. </para> <para> - The default GIN operator class for <type>jsonb</> supports queries with - top-level key-exists operators <literal>?</>, <literal>?&</> - and <literal>?|</> operators and path/value-exists operator - <literal>@></>. + The default GIN operator class for <type>jsonb</type> supports queries with + top-level key-exists operators <literal>?</literal>, <literal>?&</literal> + and <literal>?|</literal> operators and path/value-exists operator + <literal>@></literal>. (For details of the semantics that these operators implement, see <xref linkend="functions-jsonb-op-table">.) An example of creating an index with this operator class is: <programlisting> CREATE INDEX idxgin ON api USING GIN (jdoc); </programlisting> - The non-default GIN operator class <literal>jsonb_path_ops</> - supports indexing the <literal>@></> operator only. + The non-default GIN operator class <literal>jsonb_path_ops</literal> + supports indexing the <literal>@></literal> operator only. An example of creating an index with this operator class is: <programlisting> CREATE INDEX idxginp ON api USING GIN (jdoc jsonb_path_ops); @@ -438,8 +438,8 @@ CREATE INDEX idxginp ON api USING GIN (jdoc jsonb_path_ops); ] } </programlisting> - We store these documents in a table named <structname>api</>, - in a <type>jsonb</> column named <structfield>jdoc</>. + We store these documents in a table named <structname>api</structname>, + in a <type>jsonb</type> column named <structfield>jdoc</structfield>. If a GIN index is created on this column, queries like the following can make use of the index: <programlisting> @@ -447,23 +447,23 @@ CREATE INDEX idxginp ON api USING GIN (jdoc jsonb_path_ops); SELECT jdoc->'guid', jdoc->'name' FROM api WHERE jdoc @> '{"company": "Magnafone"}'; </programlisting> However, the index could not be used for queries like the - following, because though the operator <literal>?</> is indexable, - it is not applied directly to the indexed column <structfield>jdoc</>: + following, because though the operator <literal>?</literal> is indexable, + it is not applied directly to the indexed column <structfield>jdoc</structfield>: <programlisting> -- Find documents in which the key "tags" contains key or array element "qui" SELECT jdoc->'guid', jdoc->'name' FROM api WHERE jdoc -> 'tags' ? 'qui'; </programlisting> Still, with appropriate use of expression indexes, the above query can use an index. If querying for particular items within - the <literal>"tags"</> key is common, defining an index like this + the <literal>"tags"</literal> key is common, defining an index like this may be worthwhile: <programlisting> CREATE INDEX idxgintags ON api USING GIN ((jdoc -> 'tags')); </programlisting> - Now, the <literal>WHERE</> clause <literal>jdoc -> 'tags' ? 'qui'</> + Now, the <literal>WHERE</literal> clause <literal>jdoc -> 'tags' ? 'qui'</literal> will be recognized as an application of the indexable - operator <literal>?</> to the indexed - expression <literal>jdoc -> 'tags'</>. + operator <literal>?</literal> to the indexed + expression <literal>jdoc -> 'tags'</literal>. (More information on expression indexes can be found in <xref linkend="indexes-expressional">.) </para> @@ -473,11 +473,11 @@ CREATE INDEX idxgintags ON api USING GIN ((jdoc -> 'tags')); -- Find documents in which the key "tags" contains array element "qui" SELECT jdoc->'guid', jdoc->'name' FROM api WHERE jdoc @> '{"tags": ["qui"]}'; </programlisting> - A simple GIN index on the <structfield>jdoc</> column can support this + A simple GIN index on the <structfield>jdoc</structfield> column can support this query. But note that such an index will store copies of every key and - value in the <structfield>jdoc</> column, whereas the expression index + value in the <structfield>jdoc</structfield> column, whereas the expression index of the previous example stores only data found under - the <literal>tags</> key. While the simple-index approach is far more + the <literal>tags</literal> key. While the simple-index approach is far more flexible (since it supports queries about any key), targeted expression indexes are likely to be smaller and faster to search than a simple index. @@ -485,7 +485,7 @@ SELECT jdoc->'guid', jdoc->'name' FROM api WHERE jdoc @> '{"tags": ["qu <para> Although the <literal>jsonb_path_ops</literal> operator class supports - only queries with the <literal>@></> operator, it has notable + only queries with the <literal>@></literal> operator, it has notable performance advantages over the default operator class <literal>jsonb_ops</literal>. A <literal>jsonb_path_ops</literal> index is usually much smaller than a <literal>jsonb_ops</literal> @@ -503,7 +503,7 @@ SELECT jdoc->'guid', jdoc->'name' FROM api WHERE jdoc @> '{"tags": ["qu data. <footnote> <para> - For this purpose, the term <quote>value</> includes array elements, + For this purpose, the term <quote>value</quote> includes array elements, though JSON terminology sometimes considers array elements distinct from values within objects. </para> @@ -511,13 +511,13 @@ SELECT jdoc->'guid', jdoc->'name' FROM api WHERE jdoc @> '{"tags": ["qu Basically, each <literal>jsonb_path_ops</literal> index item is a hash of the value and the key(s) leading to it; for example to index <literal>{"foo": {"bar": "baz"}}</literal>, a single index item would - be created incorporating all three of <literal>foo</>, <literal>bar</>, - and <literal>baz</> into the hash value. Thus a containment query + be created incorporating all three of <literal>foo</literal>, <literal>bar</literal>, + and <literal>baz</literal> into the hash value. Thus a containment query looking for this structure would result in an extremely specific index - search; but there is no way at all to find out whether <literal>foo</> + search; but there is no way at all to find out whether <literal>foo</literal> appears as a key. On the other hand, a <literal>jsonb_ops</literal> - index would create three index items representing <literal>foo</>, - <literal>bar</>, and <literal>baz</> separately; then to do the + index would create three index items representing <literal>foo</literal>, + <literal>bar</literal>, and <literal>baz</literal> separately; then to do the containment query, it would look for rows containing all three of these items. While GIN indexes can perform such an AND search fairly efficiently, it will still be less specific and slower than the @@ -531,15 +531,15 @@ SELECT jdoc->'guid', jdoc->'name' FROM api WHERE jdoc @> '{"tags": ["qu that it produces no index entries for JSON structures not containing any values, such as <literal>{"a": {}}</literal>. If a search for documents containing such a structure is requested, it will require a - full-index scan, which is quite slow. <literal>jsonb_path_ops</> is + full-index scan, which is quite slow. <literal>jsonb_path_ops</literal> is therefore ill-suited for applications that often perform such searches. </para> <para> - <type>jsonb</> also supports <literal>btree</> and <literal>hash</> + <type>jsonb</type> also supports <literal>btree</literal> and <literal>hash</literal> indexes. These are usually useful only if it's important to check equality of complete JSON documents. - The <literal>btree</> ordering for <type>jsonb</> datums is seldom + The <literal>btree</literal> ordering for <type>jsonb</type> datums is seldom of great interest, but for completeness it is: <synopsis> <replaceable>Object</replaceable> > <replaceable>Array</replaceable> > <replaceable>Boolean</replaceable> > <replaceable>Number</replaceable> > <replaceable>String</replaceable> > <replaceable>Null</replaceable> diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml index 0aedd837dc1..a7e26533716 100644 --- a/doc/src/sgml/libpq.sgml +++ b/doc/src/sgml/libpq.sgml @@ -13,23 +13,23 @@ <para> <application>libpq</application> is the <acronym>C</acronym> - application programmer's interface to <productname>PostgreSQL</>. - <application>libpq</> is a set of library functions that allow - client programs to pass queries to the <productname>PostgreSQL</> + application programmer's interface to <productname>PostgreSQL</productname>. + <application>libpq</application> is a set of library functions that allow + client programs to pass queries to the <productname>PostgreSQL</productname> backend server and to receive the results of these queries. </para> <para> - <application>libpq</> is also the underlying engine for several - other <productname>PostgreSQL</> application interfaces, including - those written for C++, Perl, Python, Tcl and <application>ECPG</>. - So some aspects of <application>libpq</>'s behavior will be + <application>libpq</application> is also the underlying engine for several + other <productname>PostgreSQL</productname> application interfaces, including + those written for C++, Perl, Python, Tcl and <application>ECPG</application>. + So some aspects of <application>libpq</application>'s behavior will be important to you if you use one of those packages. In particular, <xref linkend="libpq-envars">, <xref linkend="libpq-pgpass"> and <xref linkend="libpq-ssl"> describe behavior that is visible to the user of any application - that uses <application>libpq</>. + that uses <application>libpq</application>. </para> <para> @@ -42,7 +42,7 @@ <para> Client programs that use <application>libpq</application> must include the header file - <filename>libpq-fe.h</filename><indexterm><primary>libpq-fe.h</></> + <filename>libpq-fe.h</filename><indexterm><primary>libpq-fe.h</primary></indexterm> and must link with the <application>libpq</application> library. </para> @@ -55,13 +55,13 @@ application program can have several backend connections open at one time. (One reason to do that is to access more than one database.) Each connection is represented by a - <structname>PGconn</><indexterm><primary>PGconn</></> object, which - is obtained from the function <function>PQconnectdb</>, - <function>PQconnectdbParams</>, or - <function>PQsetdbLogin</>. Note that these functions will always + <structname>PGconn</structname><indexterm><primary>PGconn</primary></indexterm> object, which + is obtained from the function <function>PQconnectdb</function>, + <function>PQconnectdbParams</function>, or + <function>PQsetdbLogin</function>. Note that these functions will always return a non-null object pointer, unless perhaps there is too - little memory even to allocate the <structname>PGconn</> object. - The <function>PQstatus</> function should be called to check + little memory even to allocate the <structname>PGconn</structname> object. + The <function>PQstatus</function> function should be called to check the return value for a successful connection before queries are sent via the connection object. @@ -70,7 +70,7 @@ On Unix, forking a process with open libpq connections can lead to unpredictable results because the parent and child processes share the same sockets and operating system resources. For this reason, - such usage is not recommended, though doing an <function>exec</> from + such usage is not recommended, though doing an <function>exec</function> from the child process to load a new executable is safe. </para> </warning> @@ -79,20 +79,20 @@ <para> On Windows, there is a way to improve performance if a single database connection is repeatedly started and shutdown. Internally, - libpq calls <function>WSAStartup()</> and <function>WSACleanup()</> for connection startup - and shutdown, respectively. <function>WSAStartup()</> increments an internal - Windows library reference count which is decremented by <function>WSACleanup()</>. - When the reference count is just one, calling <function>WSACleanup()</> frees + libpq calls <function>WSAStartup()</function> and <function>WSACleanup()</function> for connection startup + and shutdown, respectively. <function>WSAStartup()</function> increments an internal + Windows library reference count which is decremented by <function>WSACleanup()</function>. + When the reference count is just one, calling <function>WSACleanup()</function> frees all resources and all DLLs are unloaded. This is an expensive operation. To avoid this, an application can manually call - <function>WSAStartup()</> so resources will not be freed when the last database + <function>WSAStartup()</function> so resources will not be freed when the last database connection is closed. </para> </note> <variablelist> <varlistentry id="libpq-pqconnectdbparams"> - <term><function>PQconnectdbParams</function><indexterm><primary>PQconnectdbParams</></></term> + <term><function>PQconnectdbParams</function><indexterm><primary>PQconnectdbParams</primary></indexterm></term> <listitem> <para> Makes a new connection to the database server. @@ -109,9 +109,9 @@ PGconn *PQconnectdbParams(const char * const *keywords, from two <symbol>NULL</symbol>-terminated arrays. The first, <literal>keywords</literal>, is defined as an array of strings, each one being a key word. The second, <literal>values</literal>, gives the value - for each key word. Unlike <function>PQsetdbLogin</> below, the parameter + for each key word. Unlike <function>PQsetdbLogin</function> below, the parameter set can be extended without changing the function signature, so use of - this function (or its nonblocking analogs <function>PQconnectStartParams</> + this function (or its nonblocking analogs <function>PQconnectStartParams</function> and <function>PQconnectPoll</function>) is preferred for new application programming. </para> @@ -157,7 +157,7 @@ PGconn *PQconnectdbParams(const char * const *keywords, </varlistentry> <varlistentry id="libpq-pqconnectdb"> - <term><function>PQconnectdb</function><indexterm><primary>PQconnectdb</></></term> + <term><function>PQconnectdb</function><indexterm><primary>PQconnectdb</primary></indexterm></term> <listitem> <para> Makes a new connection to the database server. @@ -184,7 +184,7 @@ PGconn *PQconnectdb(const char *conninfo); </varlistentry> <varlistentry id="libpq-pqsetdblogin"> - <term><function>PQsetdbLogin</function><indexterm><primary>PQsetdbLogin</></></term> + <term><function>PQsetdbLogin</function><indexterm><primary>PQsetdbLogin</primary></indexterm></term> <listitem> <para> Makes a new connection to the database server. @@ -211,13 +211,13 @@ PGconn *PQsetdbLogin(const char *pghost, an <symbol>=</symbol> sign or has a valid connection <acronym>URI</acronym> prefix, it is taken as a <parameter>conninfo</parameter> string in exactly the same way as if it had been passed to <function>PQconnectdb</function>, and the remaining - parameters are then applied as specified for <function>PQconnectdbParams</>. + parameters are then applied as specified for <function>PQconnectdbParams</function>. </para> </listitem> </varlistentry> <varlistentry id="libpq-pqsetdb"> - <term><function>PQsetdb</function><indexterm><primary>PQsetdb</></></term> + <term><function>PQsetdb</function><indexterm><primary>PQsetdb</primary></indexterm></term> <listitem> <para> Makes a new connection to the database server. @@ -232,16 +232,16 @@ PGconn *PQsetdb(char *pghost, <para> This is a macro that calls <function>PQsetdbLogin</function> with null pointers - for the <parameter>login</> and <parameter>pwd</> parameters. It is provided + for the <parameter>login</parameter> and <parameter>pwd</parameter> parameters. It is provided for backward compatibility with very old programs. </para> </listitem> </varlistentry> <varlistentry id="libpq-pqconnectstartparams"> - <term><function>PQconnectStartParams</function><indexterm><primary>PQconnectStartParams</></></term> - <term><function>PQconnectStart</function><indexterm><primary>PQconnectStart</></></term> - <term><function>PQconnectPoll</function><indexterm><primary>PQconnectPoll</></></term> + <term><function>PQconnectStartParams</function><indexterm><primary>PQconnectStartParams</primary></indexterm></term> + <term><function>PQconnectStart</function><indexterm><primary>PQconnectStart</primary></indexterm></term> + <term><function>PQconnectPoll</function><indexterm><primary>PQconnectPoll</primary></indexterm></term> <listitem> <para> <indexterm><primary>nonblocking connection</primary></indexterm> @@ -263,7 +263,7 @@ PostgresPollingStatusType PQconnectPoll(PGconn *conn); that your application's thread of execution is not blocked on remote I/O whilst doing so. The point of this approach is that the waits for I/O to complete can occur in the application's main loop, rather than down inside - <function>PQconnectdbParams</> or <function>PQconnectdb</>, and so the + <function>PQconnectdbParams</function> or <function>PQconnectdb</function>, and so the application can manage this operation in parallel with other activities. </para> @@ -287,7 +287,7 @@ PostgresPollingStatusType PQconnectPoll(PGconn *conn); <itemizedlist> <listitem> <para> - The <literal>hostaddr</> and <literal>host</> parameters are used appropriately to ensure that + The <literal>hostaddr</literal> and <literal>host</literal> parameters are used appropriately to ensure that name and reverse name queries are not made. See the documentation of these parameters in <xref linkend="libpq-paramkeywords"> for details. </para> @@ -310,27 +310,27 @@ PostgresPollingStatusType PQconnectPoll(PGconn *conn); </para> <para> - Note: use of <function>PQconnectStartParams</> is analogous to - <function>PQconnectStart</> shown below. + Note: use of <function>PQconnectStartParams</function> is analogous to + <function>PQconnectStart</function> shown below. </para> <para> - To begin a nonblocking connection request, call <literal>conn = PQconnectStart("<replaceable>connection_info_string</>")</literal>. - If <varname>conn</varname> is null, then <application>libpq</> has been unable to allocate a new <structname>PGconn</> - structure. Otherwise, a valid <structname>PGconn</> pointer is returned (though not yet + To begin a nonblocking connection request, call <literal>conn = PQconnectStart("<replaceable>connection_info_string</replaceable>")</literal>. + If <varname>conn</varname> is null, then <application>libpq</application> has been unable to allocate a new <structname>PGconn</structname> + structure. Otherwise, a valid <structname>PGconn</structname> pointer is returned (though not yet representing a valid connection to the database). On return from <function>PQconnectStart</function>, call <literal>status = PQstatus(conn)</literal>. If <varname>status</varname> equals <symbol>CONNECTION_BAD</symbol>, <function>PQconnectStart</function> has failed. </para> <para> - If <function>PQconnectStart</> succeeds, the next stage is to poll - <application>libpq</> so that it can proceed with the connection sequence. + If <function>PQconnectStart</function> succeeds, the next stage is to poll + <application>libpq</application> so that it can proceed with the connection sequence. Use <function>PQsocket(conn)</function> to obtain the descriptor of the socket underlying the database connection. Loop thus: If <function>PQconnectPoll(conn)</function> last returned <symbol>PGRES_POLLING_READING</symbol>, wait until the socket is ready to - read (as indicated by <function>select()</>, <function>poll()</>, or + read (as indicated by <function>select()</function>, <function>poll()</function>, or similar system function). Then call <function>PQconnectPoll(conn)</function> again. Conversely, if <function>PQconnectPoll(conn)</function> last returned @@ -348,10 +348,10 @@ PostgresPollingStatusType PQconnectPoll(PGconn *conn); <para> At any time during connection, the status of the connection can be - checked by calling <function>PQstatus</>. If this call returns <symbol>CONNECTION_BAD</>, then the - connection procedure has failed; if the call returns <function>CONNECTION_OK</>, then the + checked by calling <function>PQstatus</function>. If this call returns <symbol>CONNECTION_BAD</symbol>, then the + connection procedure has failed; if the call returns <function>CONNECTION_OK</function>, then the connection is ready. Both of these states are equally detectable - from the return value of <function>PQconnectPoll</>, described above. Other states might also occur + from the return value of <function>PQconnectPoll</function>, described above. Other states might also occur during (and only during) an asynchronous connection procedure. These indicate the current stage of the connection procedure and might be useful to provide feedback to the user for example. These statuses are: @@ -472,7 +472,7 @@ switch(PQstatus(conn)) </varlistentry> <varlistentry id="libpq-pqconndefaults"> - <term><function>PQconndefaults</function><indexterm><primary>PQconndefaults</></></term> + <term><function>PQconndefaults</function><indexterm><primary>PQconndefaults</primary></indexterm></term> <listitem> <para> Returns the default connection options. @@ -501,7 +501,7 @@ typedef struct all possible <function>PQconnectdb</function> options and their current default values. The return value points to an array of <structname>PQconninfoOption</structname> structures, which ends - with an entry having a null <structfield>keyword</> pointer. The + with an entry having a null <structfield>keyword</structfield> pointer. The null pointer is returned if memory could not be allocated. Note that the current default values (<structfield>val</structfield> fields) will depend on environment variables and other context. A @@ -519,7 +519,7 @@ typedef struct </varlistentry> <varlistentry id="libpq-pqconninfo"> - <term><function>PQconninfo</function><indexterm><primary>PQconninfo</></></term> + <term><function>PQconninfo</function><indexterm><primary>PQconninfo</primary></indexterm></term> <listitem> <para> Returns the connection options used by a live connection. @@ -533,7 +533,7 @@ PQconninfoOption *PQconninfo(PGconn *conn); all possible <function>PQconnectdb</function> options and the values that were used to connect to the server. The return value points to an array of <structname>PQconninfoOption</structname> - structures, which ends with an entry having a null <structfield>keyword</> + structures, which ends with an entry having a null <structfield>keyword</structfield> pointer. All notes above for <function>PQconndefaults</function> also apply to the result of <function>PQconninfo</function>. </para> @@ -543,7 +543,7 @@ PQconninfoOption *PQconninfo(PGconn *conn); <varlistentry id="libpq-pqconninfoparse"> - <term><function>PQconninfoParse</function><indexterm><primary>PQconninfoParse</></></term> + <term><function>PQconninfoParse</function><indexterm><primary>PQconninfoParse</primary></indexterm></term> <listitem> <para> Returns parsed connection options from the provided connection string. @@ -555,12 +555,12 @@ PQconninfoOption *PQconninfoParse(const char *conninfo, char **errmsg); <para> Parses a connection string and returns the resulting options as an - array; or returns <symbol>NULL</> if there is a problem with the connection + array; or returns <symbol>NULL</symbol> if there is a problem with the connection string. This function can be used to extract the <function>PQconnectdb</function> options in the provided connection string. The return value points to an array of <structname>PQconninfoOption</structname> structures, which ends - with an entry having a null <structfield>keyword</> pointer. + with an entry having a null <structfield>keyword</structfield> pointer. </para> <para> @@ -571,10 +571,10 @@ PQconninfoOption *PQconninfoParse(const char *conninfo, char **errmsg); </para> <para> - If <literal>errmsg</> is not <symbol>NULL</>, then <literal>*errmsg</> is set - to <symbol>NULL</> on success, else to a <function>malloc</>'d error string explaining - the problem. (It is also possible for <literal>*errmsg</> to be - set to <symbol>NULL</> and the function to return <symbol>NULL</>; + If <literal>errmsg</literal> is not <symbol>NULL</symbol>, then <literal>*errmsg</literal> is set + to <symbol>NULL</symbol> on success, else to a <function>malloc</function>'d error string explaining + the problem. (It is also possible for <literal>*errmsg</literal> to be + set to <symbol>NULL</symbol> and the function to return <symbol>NULL</symbol>; this indicates an out-of-memory condition.) </para> @@ -582,15 +582,15 @@ PQconninfoOption *PQconninfoParse(const char *conninfo, char **errmsg); After processing the options array, free it by passing it to <function>PQconninfoFree</function>. If this is not done, some memory is leaked for each call to <function>PQconninfoParse</function>. - Conversely, if an error occurs and <literal>errmsg</> is not <symbol>NULL</>, - be sure to free the error string using <function>PQfreemem</>. + Conversely, if an error occurs and <literal>errmsg</literal> is not <symbol>NULL</symbol>, + be sure to free the error string using <function>PQfreemem</function>. </para> </listitem> </varlistentry> <varlistentry id="libpq-pqfinish"> - <term><function>PQfinish</function><indexterm><primary>PQfinish</></></term> + <term><function>PQfinish</function><indexterm><primary>PQfinish</primary></indexterm></term> <listitem> <para> Closes the connection to the server. Also frees @@ -604,14 +604,14 @@ void PQfinish(PGconn *conn); Note that even if the server connection attempt fails (as indicated by <function>PQstatus</function>), the application should call <function>PQfinish</function> to free the memory used by the <structname>PGconn</structname> object. - The <structname>PGconn</> pointer must not be used again after + The <structname>PGconn</structname> pointer must not be used again after <function>PQfinish</function> has been called. </para> </listitem> </varlistentry> <varlistentry id="libpq-pqreset"> - <term><function>PQreset</function><indexterm><primary>PQreset</></></term> + <term><function>PQreset</function><indexterm><primary>PQreset</primary></indexterm></term> <listitem> <para> Resets the communication channel to the server. @@ -631,8 +631,8 @@ void PQreset(PGconn *conn); </varlistentry> <varlistentry id="libpq-pqresetstart"> - <term><function>PQresetStart</function><indexterm><primary>PQresetStart</></></term> - <term><function>PQresetPoll</function><indexterm><primary>PQresetPoll</></></term> + <term><function>PQresetStart</function><indexterm><primary>PQresetStart</primary></indexterm></term> + <term><function>PQresetPoll</function><indexterm><primary>PQresetPoll</primary></indexterm></term> <listitem> <para> Reset the communication channel to the server, in a nonblocking manner. @@ -650,8 +650,8 @@ PostgresPollingStatusType PQresetPoll(PGconn *conn); parameters previously used. This can be useful for error recovery if a working connection is lost. They differ from <function>PQreset</function> (above) in that they act in a nonblocking manner. These functions suffer from the same - restrictions as <function>PQconnectStartParams</>, <function>PQconnectStart</> - and <function>PQconnectPoll</>. + restrictions as <function>PQconnectStartParams</function>, <function>PQconnectStart</function> + and <function>PQconnectPoll</function>. </para> <para> @@ -665,12 +665,12 @@ PostgresPollingStatusType PQresetPoll(PGconn *conn); </varlistentry> <varlistentry id="libpq-pqpingparams"> - <term><function>PQpingParams</function><indexterm><primary>PQpingParams</></></term> + <term><function>PQpingParams</function><indexterm><primary>PQpingParams</primary></indexterm></term> <listitem> <para> <function>PQpingParams</function> reports the status of the server. It accepts connection parameters identical to those of - <function>PQconnectdbParams</>, described above. It is not + <function>PQconnectdbParams</function>, described above. It is not necessary to supply correct user name, password, or database name values to obtain the server status; however, if incorrect values are provided, the server will log a failed connection attempt. @@ -734,12 +734,12 @@ PGPing PQpingParams(const char * const *keywords, </varlistentry> <varlistentry id="libpq-pqping"> - <term><function>PQping</function><indexterm><primary>PQping</></></term> + <term><function>PQping</function><indexterm><primary>PQping</primary></indexterm></term> <listitem> <para> <function>PQping</function> reports the status of the server. It accepts connection parameters identical to those of - <function>PQconnectdb</>, described above. It is not + <function>PQconnectdb</function>, described above. It is not necessary to supply correct user name, password, or database name values to obtain the server status; however, if incorrect values are provided, the server will log a failed connection attempt. @@ -750,7 +750,7 @@ PGPing PQping(const char *conninfo); </para> <para> - The return values are the same as for <function>PQpingParams</>. + The return values are the same as for <function>PQpingParams</function>. </para> </listitem> @@ -771,7 +771,7 @@ PGPing PQping(const char *conninfo); </indexterm> <para> - Several <application>libpq</> functions parse a user-specified string to obtain + Several <application>libpq</application> functions parse a user-specified string to obtain connection parameters. There are two accepted formats for these strings: plain <literal>keyword = value</literal> strings and URIs. URIs generally follow @@ -840,8 +840,8 @@ postgresql:///mydb?host=localhost&port=5433 <para> Percent-encoding may be used to include symbols with special meaning in any - of the <acronym>URI</acronym> parts, e.g. replace <literal>=</> with - <literal>%3D</>. + of the <acronym>URI</acronym> parts, e.g. replace <literal>=</literal> with + <literal>%3D</literal>. </para> @@ -895,18 +895,18 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname <para> It is possible to specify multiple hosts to connect to, so that they are - tried in the given order. In the Keyword/Value format, the <literal>host</>, - <literal>hostaddr</>, and <literal>port</> options accept a comma-separated + tried in the given order. In the Keyword/Value format, the <literal>host</literal>, + <literal>hostaddr</literal>, and <literal>port</literal> options accept a comma-separated list of values. The same number of elements must be given in each option, such - that e.g. the first <literal>hostaddr</> corresponds to the first host name, - the second <literal>hostaddr</> corresponds to the second host name, and so + that e.g. the first <literal>hostaddr</literal> corresponds to the first host name, + the second <literal>hostaddr</literal> corresponds to the second host name, and so forth. As an exception, if only one <literal>port</literal> is specified, it applies to all the hosts. </para> <para> - In the connection URI format, you can list multiple <literal>host:port</> pairs - separated by commas, in the <literal>host</> component of the URI. In either + In the connection URI format, you can list multiple <literal>host:port</literal> pairs + separated by commas, in the <literal>host</literal> component of the URI. In either format, a single hostname can also translate to multiple network addresses. A common example of this is a host that has both an IPv4 and an IPv6 address. </para> @@ -939,17 +939,17 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname <term><literal>host</literal></term> <listitem> <para> - Name of host to connect to.<indexterm><primary>host name</></> + Name of host to connect to.<indexterm><primary>host name</primary></indexterm> If a host name begins with a slash, it specifies Unix-domain communication rather than TCP/IP communication; the value is the name of the directory in which the socket file is stored. If multiple host names are specified, each will be tried in turn in the order given. The default behavior when <literal>host</literal> is not specified is to connect to a Unix-domain - socket<indexterm><primary>Unix domain socket</></> in + socket<indexterm><primary>Unix domain socket</primary></indexterm> in <filename>/tmp</filename> (or whatever socket directory was specified - when <productname>PostgreSQL</> was built). On machines without - Unix-domain sockets, the default is to connect to <literal>localhost</>. + when <productname>PostgreSQL</productname> was built). On machines without + Unix-domain sockets, the default is to connect to <literal>localhost</literal>. </para> <para> A comma-separated list of host names is also accepted, in which case @@ -964,53 +964,53 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname <listitem> <para> Numeric IP address of host to connect to. This should be in the - standard IPv4 address format, e.g., <literal>172.28.40.9</>. If + standard IPv4 address format, e.g., <literal>172.28.40.9</literal>. If your machine supports IPv6, you can also use those addresses. TCP/IP communication is always used when a nonempty string is specified for this parameter. </para> <para> - Using <literal>hostaddr</> instead of <literal>host</> allows the + Using <literal>hostaddr</literal> instead of <literal>host</literal> allows the application to avoid a host name look-up, which might be important in applications with time constraints. However, a host name is required for GSSAPI or SSPI authentication - methods, as well as for <literal>verify-full</> SSL + methods, as well as for <literal>verify-full</literal> SSL certificate verification. The following rules are used: <itemizedlist> <listitem> <para> - If <literal>host</> is specified without <literal>hostaddr</>, + If <literal>host</literal> is specified without <literal>hostaddr</literal>, a host name lookup occurs. </para> </listitem> <listitem> <para> - If <literal>hostaddr</> is specified without <literal>host</>, - the value for <literal>hostaddr</> gives the server network address. + If <literal>hostaddr</literal> is specified without <literal>host</literal>, + the value for <literal>hostaddr</literal> gives the server network address. The connection attempt will fail if the authentication method requires a host name. </para> </listitem> <listitem> <para> - If both <literal>host</> and <literal>hostaddr</> are specified, - the value for <literal>hostaddr</> gives the server network address. - The value for <literal>host</> is ignored unless the + If both <literal>host</literal> and <literal>hostaddr</literal> are specified, + the value for <literal>hostaddr</literal> gives the server network address. + The value for <literal>host</literal> is ignored unless the authentication method requires it, in which case it will be used as the host name. </para> </listitem> </itemizedlist> - Note that authentication is likely to fail if <literal>host</> - is not the name of the server at network address <literal>hostaddr</>. - Also, note that <literal>host</> rather than <literal>hostaddr</> + Note that authentication is likely to fail if <literal>host</literal> + is not the name of the server at network address <literal>hostaddr</literal>. + Also, note that <literal>host</literal> rather than <literal>hostaddr</literal> is used to identify the connection in a password file (see <xref linkend="libpq-pgpass">). </para> <para> - A comma-separated list of <literal>hostaddrs</> is also accepted, in + A comma-separated list of <literal>hostaddrs</literal> is also accepted, in which case each host in the list is tried in order. See <xref linkend="libpq-multiple-hosts"> for details. </para> @@ -1018,7 +1018,7 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname Without either a host name or host address, <application>libpq</application> will connect using a local Unix-domain socket; or on machines without Unix-domain - sockets, it will attempt to connect to <literal>localhost</>. + sockets, it will attempt to connect to <literal>localhost</literal>. </para> </listitem> </varlistentry> @@ -1029,9 +1029,9 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname <para> Port number to connect to at the server host, or socket file name extension for Unix-domain - connections.<indexterm><primary>port</></> + connections.<indexterm><primary>port</primary></indexterm> If multiple hosts were given in the <literal>host</literal> or - <literal>hostaddr</> parameters, this parameter may specify a list + <literal>hostaddr</literal> parameters, this parameter may specify a list of ports of equal length, or it may specify a single port number to be used for all hosts. </para> @@ -1077,7 +1077,7 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname Specifies the name of the file used to store passwords (see <xref linkend="libpq-pgpass">). Defaults to <filename>~/.pgpass</filename>, or - <filename>%APPDATA%\postgresql\pgpass.conf</> on Microsoft Windows. + <filename>%APPDATA%\postgresql\pgpass.conf</filename> on Microsoft Windows. (No error is reported if this file does not exist.) </para> </listitem> @@ -1091,7 +1091,7 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname string). Zero or not specified means wait indefinitely. It is not recommended to use a timeout of less than 2 seconds. This timeout applies separately to each connection attempt. - For example, if you specify two hosts and <literal>connect_timeout</> + For example, if you specify two hosts and <literal>connect_timeout</literal> is 5, each host will time out if no connection is made within 5 seconds, so the total time spent waiting for a connection might be up to 10 seconds. @@ -1119,11 +1119,11 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname <listitem> <para> Specifies command-line options to send to the server at connection - start. For example, setting this to <literal>-c geqo=off</> sets the - session's value of the <varname>geqo</> parameter to - <literal>off</>. Spaces within this string are considered to + start. For example, setting this to <literal>-c geqo=off</literal> sets the + session's value of the <varname>geqo</varname> parameter to + <literal>off</literal>. Spaces within this string are considered to separate command-line arguments, unless escaped with a backslash - (<literal>\</>); write <literal>\\</> to represent a literal + (<literal>\</literal>); write <literal>\\</literal> to represent a literal backslash. For a detailed discussion of the available options, consult <xref linkend="runtime-config">. </para> @@ -1147,7 +1147,7 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname Specifies a fallback value for the <xref linkend="guc-application-name"> configuration parameter. This value will be used if no value has been given for - <literal>application_name</> via a connection parameter or the + <literal>application_name</literal> via a connection parameter or the <envar>PGAPPNAME</envar> environment variable. Specifying a fallback name is useful in generic utility programs that wish to set a default application name but allow it to be @@ -1176,7 +1176,7 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname send a keepalive message to the server. A value of zero uses the system default. This parameter is ignored for connections made via a Unix-domain socket, or if keepalives are disabled. - It is only supported on systems where <symbol>TCP_KEEPIDLE</> or + It is only supported on systems where <symbol>TCP_KEEPIDLE</symbol> or an equivalent socket option is available, and on Windows; on other systems, it has no effect. </para> @@ -1191,7 +1191,7 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname that is not acknowledged by the server should be retransmitted. A value of zero uses the system default. This parameter is ignored for connections made via a Unix-domain socket, or if keepalives are disabled. - It is only supported on systems where <symbol>TCP_KEEPINTVL</> or + It is only supported on systems where <symbol>TCP_KEEPINTVL</symbol> or an equivalent socket option is available, and on Windows; on other systems, it has no effect. </para> @@ -1206,7 +1206,7 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname client's connection to the server is considered dead. A value of zero uses the system default. This parameter is ignored for connections made via a Unix-domain socket, or if keepalives are disabled. - It is only supported on systems where <symbol>TCP_KEEPCNT</> or + It is only supported on systems where <symbol>TCP_KEEPCNT</symbol> or an equivalent socket option is available; on other systems, it has no effect. </para> @@ -1227,7 +1227,7 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname <listitem> <para> This option determines whether or with what priority a secure - <acronym>SSL</> TCP/IP connection will be negotiated with the + <acronym>SSL</acronym> TCP/IP connection will be negotiated with the server. There are six modes: <variablelist> @@ -1235,7 +1235,7 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname <term><literal>disable</literal></term> <listitem> <para> - only try a non-<acronym>SSL</> connection + only try a non-<acronym>SSL</acronym> connection </para> </listitem> </varlistentry> @@ -1244,8 +1244,8 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname <term><literal>allow</literal></term> <listitem> <para> - first try a non-<acronym>SSL</> connection; if that - fails, try an <acronym>SSL</> connection + first try a non-<acronym>SSL</acronym> connection; if that + fails, try an <acronym>SSL</acronym> connection </para> </listitem> </varlistentry> @@ -1254,8 +1254,8 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname <term><literal>prefer</literal> (default)</term> <listitem> <para> - first try an <acronym>SSL</> connection; if that fails, - try a non-<acronym>SSL</> connection + first try an <acronym>SSL</acronym> connection; if that fails, + try a non-<acronym>SSL</acronym> connection </para> </listitem> </varlistentry> @@ -1264,7 +1264,7 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname <term><literal>require</literal></term> <listitem> <para> - only try an <acronym>SSL</> connection. If a root CA + only try an <acronym>SSL</acronym> connection. If a root CA file is present, verify the certificate in the same way as if <literal>verify-ca</literal> was specified </para> @@ -1275,9 +1275,9 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname <term><literal>verify-ca</literal></term> <listitem> <para> - only try an <acronym>SSL</> connection, and verify that + only try an <acronym>SSL</acronym> connection, and verify that the server certificate is issued by a trusted - certificate authority (<acronym>CA</>) + certificate authority (<acronym>CA</acronym>) </para> </listitem> </varlistentry> @@ -1286,9 +1286,9 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname <term><literal>verify-full</literal></term> <listitem> <para> - only try an <acronym>SSL</> connection, verify that the + only try an <acronym>SSL</acronym> connection, verify that the server certificate is issued by a - trusted <acronym>CA</> and that the requested server host name + trusted <acronym>CA</acronym> and that the requested server host name matches that in the certificate </para> </listitem> @@ -1300,16 +1300,16 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname </para> <para> - <literal>sslmode</> is ignored for Unix domain socket + <literal>sslmode</literal> is ignored for Unix domain socket communication. - If <productname>PostgreSQL</> is compiled without SSL support, - using options <literal>require</>, <literal>verify-ca</>, or - <literal>verify-full</> will cause an error, while - options <literal>allow</> and <literal>prefer</> will be - accepted but <application>libpq</> will not actually attempt - an <acronym>SSL</> - connection.<indexterm><primary>SSL</><secondary - sortas="libpq">with libpq</></indexterm> + If <productname>PostgreSQL</productname> is compiled without SSL support, + using options <literal>require</literal>, <literal>verify-ca</literal>, or + <literal>verify-full</literal> will cause an error, while + options <literal>allow</literal> and <literal>prefer</literal> will be + accepted but <application>libpq</application> will not actually attempt + an <acronym>SSL</acronym> + connection.<indexterm><primary>SSL</primary><secondary + sortas="libpq">with libpq</secondary></indexterm> </para> </listitem> </varlistentry> @@ -1318,20 +1318,20 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname <term><literal>requiressl</literal></term> <listitem> <para> - This option is deprecated in favor of the <literal>sslmode</> + This option is deprecated in favor of the <literal>sslmode</literal> setting. </para> <para> If set to 1, an <acronym>SSL</acronym> connection to the server - is required (this is equivalent to <literal>sslmode</> - <literal>require</>). <application>libpq</> will then refuse + is required (this is equivalent to <literal>sslmode</literal> + <literal>require</literal>). <application>libpq</application> will then refuse to connect if the server does not accept an <acronym>SSL</acronym> connection. If set to 0 (default), - <application>libpq</> will negotiate the connection type with - the server (equivalent to <literal>sslmode</> - <literal>prefer</>). This option is only available if - <productname>PostgreSQL</> is compiled with SSL support. + <application>libpq</application> will negotiate the connection type with + the server (equivalent to <literal>sslmode</literal> + <literal>prefer</literal>). This option is only available if + <productname>PostgreSQL</productname> is compiled with SSL support. </para> </listitem> </varlistentry> @@ -1343,9 +1343,9 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname If set to 1 (default), data sent over SSL connections will be compressed. If set to 0, compression will be disabled (this requires - <productname>OpenSSL</> 1.0.0 or later). + <productname>OpenSSL</productname> 1.0.0 or later). This parameter is ignored if a connection without SSL is made, - or if the version of <productname>OpenSSL</> used does not support + or if the version of <productname>OpenSSL</productname> used does not support it. </para> <para> @@ -1363,7 +1363,7 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname <para> This parameter specifies the file name of the client SSL certificate, replacing the default - <filename>~/.postgresql/postgresql.crt</>. + <filename>~/.postgresql/postgresql.crt</filename>. This parameter is ignored if an SSL connection is not made. </para> </listitem> @@ -1376,9 +1376,9 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname This parameter specifies the location for the secret key used for the client certificate. It can either specify a file name that will be used instead of the default - <filename>~/.postgresql/postgresql.key</>, or it can specify a key - obtained from an external <quote>engine</> (engines are - <productname>OpenSSL</> loadable modules). An external engine + <filename>~/.postgresql/postgresql.key</filename>, or it can specify a key + obtained from an external <quote>engine</quote> (engines are + <productname>OpenSSL</productname> loadable modules). An external engine specification should consist of a colon-separated engine name and an engine-specific key identifier. This parameter is ignored if an SSL connection is not made. @@ -1391,10 +1391,10 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname <listitem> <para> This parameter specifies the name of a file containing SSL - certificate authority (<acronym>CA</>) certificate(s). + certificate authority (<acronym>CA</acronym>) certificate(s). If the file exists, the server's certificate will be verified to be signed by one of these authorities. The default is - <filename>~/.postgresql/root.crt</>. + <filename>~/.postgresql/root.crt</filename>. </para> </listitem> </varlistentry> @@ -1407,7 +1407,7 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname revocation list (CRL). Certificates listed in this file, if it exists, will be rejected while attempting to authenticate the server's certificate. The default is - <filename>~/.postgresql/root.crl</>. + <filename>~/.postgresql/root.crl</filename>. </para> </listitem> </varlistentry> @@ -1429,7 +1429,7 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname any user could start a server listening there. Use this parameter to ensure that you are connected to a server run by a trusted user.) This option is only supported on platforms for which the - <literal>peer</> authentication method is implemented; see + <literal>peer</literal> authentication method is implemented; see <xref linkend="auth-peer">. </para> </listitem> @@ -1478,11 +1478,11 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname connection in which read-write transactions are accepted by default is considered acceptable. The query <literal>SHOW transaction_read_only</literal> will be sent upon any - successful connection; if it returns <literal>on</>, the connection + successful connection; if it returns <literal>on</literal>, the connection will be closed. If multiple hosts were specified in the connection string, any remaining servers will be tried just as if the connection attempt had failed. The default value of this parameter, - <literal>any</>, regards all connections as acceptable. + <literal>any</literal>, regards all connections as acceptable. </para> </listitem> </varlistentry> @@ -1501,13 +1501,13 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname <tip> <para> - <indexterm><primary>libpq-fe.h</></> - <indexterm><primary>libpq-int.h</></> + <indexterm><primary>libpq-fe.h</primary></indexterm> + <indexterm><primary>libpq-int.h</primary></indexterm> <application>libpq</application> application programmers should be careful to maintain the <structname>PGconn</structname> abstraction. Use the accessor functions described below to get at the contents of <structname>PGconn</structname>. Reference to internal <structname>PGconn</structname> fields using - <filename>libpq-int.h</> is not recommended because they are subject to change + <filename>libpq-int.h</filename> is not recommended because they are subject to change in the future. </para> </tip> @@ -1515,10 +1515,10 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname <para> The following functions return parameter values established at connection. These values are fixed for the life of the connection. If a multi-host - connection string is used, the values of <function>PQhost</>, - <function>PQport</>, and <function>PQpass</> can change if a new connection - is established using the same <structname>PGconn</> object. Other values - are fixed for the lifetime of the <structname>PGconn</> object. + connection string is used, the values of <function>PQhost</function>, + <function>PQport</function>, and <function>PQpass</function> can change if a new connection + is established using the same <structname>PGconn</structname> object. Other values + are fixed for the lifetime of the <structname>PGconn</structname> object. <variablelist> <varlistentry id="libpq-pqdb"> @@ -1589,7 +1589,7 @@ char *PQpass(const PGconn *conn); This can be a host name, an IP address, or a directory path if the connection is via Unix socket. (The path case can be distinguished because it will always be an absolute path, beginning - with <literal>/</>.) + with <literal>/</literal>.) <synopsis> char *PQhost(const PGconn *conn); </synopsis> @@ -1660,7 +1660,7 @@ char *PQoptions(const PGconn *conn); <para> The following functions return status data that can change as operations - are executed on the <structname>PGconn</> object. + are executed on the <structname>PGconn</structname> object. <variablelist> <varlistentry id="libpq-pqstatus"> @@ -1695,8 +1695,8 @@ ConnStatusType PQstatus(const PGconn *conn); </para> <para> - See the entry for <function>PQconnectStartParams</>, <function>PQconnectStart</> - and <function>PQconnectPoll</> with regards to other status codes that + See the entry for <function>PQconnectStartParams</function>, <function>PQconnectStart</function> + and <function>PQconnectPoll</function> with regards to other status codes that might be returned. </para> </listitem> @@ -1747,62 +1747,62 @@ const char *PQparameterStatus(const PGconn *conn, const char *paramName); Certain parameter values are reported by the server automatically at connection startup or whenever their values change. - <function>PQparameterStatus</> can be used to interrogate these settings. + <function>PQparameterStatus</function> can be used to interrogate these settings. It returns the current value of a parameter if known, or <symbol>NULL</symbol> if the parameter is not known. </para> <para> Parameters reported as of the current release include - <varname>server_version</>, - <varname>server_encoding</>, - <varname>client_encoding</>, - <varname>application_name</>, - <varname>is_superuser</>, - <varname>session_authorization</>, - <varname>DateStyle</>, - <varname>IntervalStyle</>, - <varname>TimeZone</>, - <varname>integer_datetimes</>, and - <varname>standard_conforming_strings</>. - (<varname>server_encoding</>, <varname>TimeZone</>, and - <varname>integer_datetimes</> were not reported by releases before 8.0; - <varname>standard_conforming_strings</> was not reported by releases + <varname>server_version</varname>, + <varname>server_encoding</varname>, + <varname>client_encoding</varname>, + <varname>application_name</varname>, + <varname>is_superuser</varname>, + <varname>session_authorization</varname>, + <varname>DateStyle</varname>, + <varname>IntervalStyle</varname>, + <varname>TimeZone</varname>, + <varname>integer_datetimes</varname>, and + <varname>standard_conforming_strings</varname>. + (<varname>server_encoding</varname>, <varname>TimeZone</varname>, and + <varname>integer_datetimes</varname> were not reported by releases before 8.0; + <varname>standard_conforming_strings</varname> was not reported by releases before 8.1; - <varname>IntervalStyle</> was not reported by releases before 8.4; - <varname>application_name</> was not reported by releases before 9.0.) + <varname>IntervalStyle</varname> was not reported by releases before 8.4; + <varname>application_name</varname> was not reported by releases before 9.0.) Note that - <varname>server_version</>, - <varname>server_encoding</> and - <varname>integer_datetimes</> + <varname>server_version</varname>, + <varname>server_encoding</varname> and + <varname>integer_datetimes</varname> cannot change after startup. </para> <para> Pre-3.0-protocol servers do not report parameter settings, but - <application>libpq</> includes logic to obtain values for - <varname>server_version</> and <varname>client_encoding</> anyway. - Applications are encouraged to use <function>PQparameterStatus</> - rather than <foreignphrase>ad hoc</> code to determine these values. + <application>libpq</application> includes logic to obtain values for + <varname>server_version</varname> and <varname>client_encoding</varname> anyway. + Applications are encouraged to use <function>PQparameterStatus</function> + rather than <foreignphrase>ad hoc</foreignphrase> code to determine these values. (Beware however that on a pre-3.0 connection, changing - <varname>client_encoding</> via <command>SET</> after connection - startup will not be reflected by <function>PQparameterStatus</>.) - For <varname>server_version</>, see also - <function>PQserverVersion</>, which returns the information in a + <varname>client_encoding</varname> via <command>SET</command> after connection + startup will not be reflected by <function>PQparameterStatus</function>.) + For <varname>server_version</varname>, see also + <function>PQserverVersion</function>, which returns the information in a numeric form that is much easier to compare against. </para> <para> - If no value for <varname>standard_conforming_strings</> is reported, - applications can assume it is <literal>off</>, that is, backslashes + If no value for <varname>standard_conforming_strings</varname> is reported, + applications can assume it is <literal>off</literal>, that is, backslashes are treated as escapes in string literals. Also, the presence of this parameter can be taken as an indication that the escape string - syntax (<literal>E'...'</>) is accepted. + syntax (<literal>E'...'</literal>) is accepted. </para> <para> - Although the returned pointer is declared <literal>const</>, it in fact - points to mutable storage associated with the <literal>PGconn</> structure. + Although the returned pointer is declared <literal>const</literal>, it in fact + points to mutable storage associated with the <literal>PGconn</literal> structure. It is unwise to assume the pointer will remain valid across queries. </para> </listitem> @@ -1829,7 +1829,7 @@ int PQprotocolVersion(const PGconn *conn); not change after connection startup is complete, but it could theoretically change during a connection reset. The 3.0 protocol will normally be used when communicating with - <productname>PostgreSQL</> 7.4 or later servers; pre-7.4 servers + <productname>PostgreSQL</productname> 7.4 or later servers; pre-7.4 servers support only protocol 2.0. (Protocol 1.0 is obsolete and not supported by <application>libpq</application>.) </para> @@ -1862,17 +1862,17 @@ int PQserverVersion(const PGconn *conn); </para> <para> - Prior to major version 10, <productname>PostgreSQL</> used + Prior to major version 10, <productname>PostgreSQL</productname> used three-part version numbers in which the first two parts together represented the major version. For those - versions, <function>PQserverVersion</> uses two digits for each + versions, <function>PQserverVersion</function> uses two digits for each part; for example version 9.1.5 will be returned as 90105, and version 9.2.0 will be returned as 90200. </para> <para> Therefore, for purposes of determining feature compatibility, - applications should divide the result of <function>PQserverVersion</> + applications should divide the result of <function>PQserverVersion</function> by 100 not 10000 to determine a logical major version number. In all release series, only the last two digits differ between minor releases (bug-fix releases). @@ -1890,7 +1890,7 @@ int PQserverVersion(const PGconn *conn); <listitem> <para> - <indexterm><primary>error message</></> Returns the error message + <indexterm><primary>error message</primary></indexterm> Returns the error message most recently generated by an operation on the connection. <synopsis> @@ -1900,22 +1900,22 @@ char *PQerrorMessage(const PGconn *conn); </para> <para> - Nearly all <application>libpq</> functions will set a message for + Nearly all <application>libpq</application> functions will set a message for <function>PQerrorMessage</function> if they fail. Note that by <application>libpq</application> convention, a nonempty <function>PQerrorMessage</function> result can consist of multiple lines, and will include a trailing newline. The caller should not free the result directly. It will be freed when the associated - <structname>PGconn</> handle is passed to + <structname>PGconn</structname> handle is passed to <function>PQfinish</function>. The result string should not be expected to remain the same across operations on the - <literal>PGconn</> structure. + <literal>PGconn</literal> structure. </para> </listitem> </varlistentry> <varlistentry id="libpq-pqsocket"> - <term><function>PQsocket</function><indexterm><primary>PQsocket</></></term> + <term><function>PQsocket</function><indexterm><primary>PQsocket</primary></indexterm></term> <listitem> <para> Obtains the file descriptor number of the connection socket to @@ -1933,13 +1933,13 @@ int PQsocket(const PGconn *conn); </varlistentry> <varlistentry id="libpq-pqbackendpid"> - <term><function>PQbackendPID</function><indexterm><primary>PQbackendPID</></></term> + <term><function>PQbackendPID</function><indexterm><primary>PQbackendPID</primary></indexterm></term> <listitem> <para> Returns the process <acronym>ID</acronym> (PID)<indexterm> - <primary>PID</> - <secondary>determining PID of server process</> - <tertiary>in libpq</> + <primary>PID</primary> + <secondary>determining PID of server process</secondary> + <tertiary>in libpq</tertiary> </indexterm> of the backend process handling this connection. @@ -1960,7 +1960,7 @@ int PQbackendPID(const PGconn *conn); </varlistentry> <varlistentry id="libpq-pqconnectionneedspassword"> - <term><function>PQconnectionNeedsPassword</function><indexterm><primary>PQconnectionNeedsPassword</></></term> + <term><function>PQconnectionNeedsPassword</function><indexterm><primary>PQconnectionNeedsPassword</primary></indexterm></term> <listitem> <para> Returns true (1) if the connection authentication method @@ -1980,7 +1980,7 @@ int PQconnectionNeedsPassword(const PGconn *conn); </varlistentry> <varlistentry id="libpq-pqconnectionusedpassword"> - <term><function>PQconnectionUsedPassword</function><indexterm><primary>PQconnectionUsedPassword</></></term> + <term><function>PQconnectionUsedPassword</function><indexterm><primary>PQconnectionUsedPassword</primary></indexterm></term> <listitem> <para> Returns true (1) if the connection authentication method @@ -2006,7 +2006,7 @@ int PQconnectionUsedPassword(const PGconn *conn); <variablelist> <varlistentry id="libpq-pqsslinuse"> - <term><function>PQsslInUse</function><indexterm><primary>PQsslInUse</></></term> + <term><function>PQsslInUse</function><indexterm><primary>PQsslInUse</primary></indexterm></term> <listitem> <para> Returns true (1) if the connection uses SSL, false (0) if not. @@ -2020,7 +2020,7 @@ int PQsslInUse(const PGconn *conn); </varlistentry> <varlistentry id="libpq-pqsslattribute"> - <term><function>PQsslAttribute</function><indexterm><primary>PQsslAttribute</></></term> + <term><function>PQsslAttribute</function><indexterm><primary>PQsslAttribute</primary></indexterm></term> <listitem> <para> Returns SSL-related information about the connection. @@ -2093,7 +2093,7 @@ const char *PQsslAttribute(const PGconn *conn, const char *attribute_name); </varlistentry> <varlistentry id="libpq-pqsslattributenames"> - <term><function>PQsslAttributeNames</function><indexterm><primary>PQsslAttributeNames</></></term> + <term><function>PQsslAttributeNames</function><indexterm><primary>PQsslAttributeNames</primary></indexterm></term> <listitem> <para> Return an array of SSL attribute names available. The array is terminated by a NULL pointer. @@ -2105,7 +2105,7 @@ const char * const * PQsslAttributeNames(const PGconn *conn); </varlistentry> <varlistentry id="libpq-pqsslstruct"> - <term><function>PQsslStruct</function><indexterm><primary>PQsslStruct</></></term> + <term><function>PQsslStruct</function><indexterm><primary>PQsslStruct</primary></indexterm></term> <listitem> <para> Return a pointer to an SSL-implementation-specific object describing @@ -2139,17 +2139,17 @@ void *PQsslStruct(const PGconn *conn, const char *struct_name); </para> <para> This structure can be used to verify encryption levels, check server - certificates, and more. Refer to the <productname>OpenSSL</> + certificates, and more. Refer to the <productname>OpenSSL</productname> documentation for information about this structure. </para> </listitem> </varlistentry> <varlistentry id="libpq-pqgetssl"> - <term><function>PQgetssl</function><indexterm><primary>PQgetssl</></></term> + <term><function>PQgetssl</function><indexterm><primary>PQgetssl</primary></indexterm></term> <listitem> <para> - <indexterm><primary>SSL</><secondary sortas="libpq">in libpq</secondary></indexterm> + <indexterm><primary>SSL</primary><secondary sortas="libpq">in libpq</secondary></indexterm> Returns the SSL structure used in the connection, or null if SSL is not in use. @@ -2163,8 +2163,8 @@ void *PQgetssl(const PGconn *conn); not be used in new applications, because the returned struct is specific to OpenSSL and will not be available if another SSL implementation is used. To check if a connection uses SSL, call - <function>PQsslInUse</> instead, and for more details about the - connection, use <function>PQsslAttribute</>. + <function>PQsslInUse</function> instead, and for more details about the + connection, use <function>PQsslAttribute</function>. </para> </listitem> </varlistentry> @@ -2209,7 +2209,7 @@ PGresult *PQexec(PGconn *conn, const char *command); Returns a <structname>PGresult</structname> pointer or possibly a null pointer. A non-null pointer will generally be returned except in out-of-memory conditions or serious errors such as inability to send - the command to the server. The <function>PQresultStatus</> function + the command to the server. The <function>PQresultStatus</function> function should be called to check the return value for any errors (including the value of a null pointer, in which case it will return <symbol>PGRES_FATAL_ERROR</symbol>). Use @@ -2222,7 +2222,7 @@ PGresult *PQexec(PGconn *conn, const char *command); The command string can include multiple SQL commands (separated by semicolons). Multiple queries sent in a single - <function>PQexec</> call are processed in a single transaction, unless + <function>PQexec</function> call are processed in a single transaction, unless there are explicit <command>BEGIN</command>/<command>COMMIT</command> commands included in the query string to divide it into multiple transactions. (See <xref linkend="protocol-flow-multi-statement"> @@ -2263,10 +2263,10 @@ PGresult *PQexecParams(PGconn *conn, </para> <para> - <function>PQexecParams</> is like <function>PQexec</>, but offers additional + <function>PQexecParams</function> is like <function>PQexec</function>, but offers additional functionality: parameter values can be specified separately from the command string proper, and query results can be requested in either text or binary - format. <function>PQexecParams</> is supported only in protocol 3.0 and later + format. <function>PQexecParams</function> is supported only in protocol 3.0 and later connections; it will fail when using protocol 2.0. </para> @@ -2289,8 +2289,8 @@ PGresult *PQexecParams(PGconn *conn, <listitem> <para> The SQL command string to be executed. If parameters are used, - they are referred to in the command string as <literal>$1</>, - <literal>$2</>, etc. + they are referred to in the command string as <literal>$1</literal>, + <literal>$2</literal>, etc. </para> </listitem> </varlistentry> @@ -2300,9 +2300,9 @@ PGresult *PQexecParams(PGconn *conn, <listitem> <para> The number of parameters supplied; it is the length of the arrays - <parameter>paramTypes[]</>, <parameter>paramValues[]</>, - <parameter>paramLengths[]</>, and <parameter>paramFormats[]</>. (The - array pointers can be <symbol>NULL</symbol> when <parameter>nParams</> + <parameter>paramTypes[]</parameter>, <parameter>paramValues[]</parameter>, + <parameter>paramLengths[]</parameter>, and <parameter>paramFormats[]</parameter>. (The + array pointers can be <symbol>NULL</symbol> when <parameter>nParams</parameter> is zero.) </para> </listitem> @@ -2313,7 +2313,7 @@ PGresult *PQexecParams(PGconn *conn, <listitem> <para> Specifies, by OID, the data types to be assigned to the - parameter symbols. If <parameter>paramTypes</> is + parameter symbols. If <parameter>paramTypes</parameter> is <symbol>NULL</symbol>, or any particular element in the array is zero, the server infers a data type for the parameter symbol in the same way it would do for an untyped literal string. @@ -2359,11 +2359,11 @@ PGresult *PQexecParams(PGconn *conn, Values passed in binary format require knowledge of the internal representation expected by the backend. For example, integers must be passed in network byte - order. Passing <type>numeric</> values requires + order. Passing <type>numeric</type> values requires knowledge of the server storage format, as implemented in - <filename>src/backend/utils/adt/numeric.c::numeric_send()</> and - <filename>src/backend/utils/adt/numeric.c::numeric_recv()</>. + <filename>src/backend/utils/adt/numeric.c::numeric_send()</filename> and + <filename>src/backend/utils/adt/numeric.c::numeric_recv()</filename>. </para> </listitem> </varlistentry> @@ -2387,14 +2387,14 @@ PGresult *PQexecParams(PGconn *conn, </para> <para> - The primary advantage of <function>PQexecParams</> over - <function>PQexec</> is that parameter values can be separated from the + The primary advantage of <function>PQexecParams</function> over + <function>PQexec</function> is that parameter values can be separated from the command string, thus avoiding the need for tedious and error-prone quoting and escaping. </para> <para> - Unlike <function>PQexec</>, <function>PQexecParams</> allows at most + Unlike <function>PQexec</function>, <function>PQexecParams</function> allows at most one SQL command in the given string. (There can be semicolons in it, but not more than one nonempty command.) This is a limitation of the underlying protocol, but has some usefulness as an extra defense against @@ -2412,8 +2412,8 @@ PGresult *PQexecParams(PGconn *conn, <programlisting> SELECT * FROM mytable WHERE x = $1::bigint; </programlisting> - This forces parameter <literal>$1</> to be treated as <type>bigint</>, whereas - by default it would be assigned the same type as <literal>x</>. Forcing the + This forces parameter <literal>$1</literal> to be treated as <type>bigint</type>, whereas + by default it would be assigned the same type as <literal>x</literal>. Forcing the parameter type decision, either this way or by specifying a numeric type OID, is strongly recommended when sending parameter values in binary format, because binary format has less redundancy than text format and so there is less chance @@ -2444,40 +2444,40 @@ PGresult *PQprepare(PGconn *conn, </para> <para> - <function>PQprepare</> creates a prepared statement for later - execution with <function>PQexecPrepared</>. This feature allows + <function>PQprepare</function> creates a prepared statement for later + execution with <function>PQexecPrepared</function>. This feature allows commands to be executed repeatedly without being parsed and planned each time; see <xref linkend="SQL-PREPARE"> for details. - <function>PQprepare</> is supported only in protocol 3.0 and later + <function>PQprepare</function> is supported only in protocol 3.0 and later connections; it will fail when using protocol 2.0. </para> <para> The function creates a prepared statement named - <parameter>stmtName</> from the <parameter>query</> string, which - must contain a single SQL command. <parameter>stmtName</> can be - <literal>""</> to create an unnamed statement, in which case any + <parameter>stmtName</parameter> from the <parameter>query</parameter> string, which + must contain a single SQL command. <parameter>stmtName</parameter> can be + <literal>""</literal> to create an unnamed statement, in which case any pre-existing unnamed statement is automatically replaced; otherwise it is an error if the statement name is already defined in the current session. If any parameters are used, they are referred - to in the query as <literal>$1</>, <literal>$2</>, etc. - <parameter>nParams</> is the number of parameters for which types - are pre-specified in the array <parameter>paramTypes[]</>. (The + to in the query as <literal>$1</literal>, <literal>$2</literal>, etc. + <parameter>nParams</parameter> is the number of parameters for which types + are pre-specified in the array <parameter>paramTypes[]</parameter>. (The array pointer can be <symbol>NULL</symbol> when - <parameter>nParams</> is zero.) <parameter>paramTypes[]</> + <parameter>nParams</parameter> is zero.) <parameter>paramTypes[]</parameter> specifies, by OID, the data types to be assigned to the parameter - symbols. If <parameter>paramTypes</> is <symbol>NULL</symbol>, + symbols. If <parameter>paramTypes</parameter> is <symbol>NULL</symbol>, or any particular element in the array is zero, the server assigns a data type to the parameter symbol in the same way it would do for an untyped literal string. Also, the query can use parameter - symbols with numbers higher than <parameter>nParams</>; data types + symbols with numbers higher than <parameter>nParams</parameter>; data types will be inferred for these symbols as well. (See <function>PQdescribePrepared</function> for a means to find out what data types were inferred.) </para> <para> - As with <function>PQexec</>, the result is normally a + As with <function>PQexec</function>, the result is normally a <structname>PGresult</structname> object whose contents indicate server-side success or failure. A null result indicates out-of-memory or inability to send the command at all. Use @@ -2488,9 +2488,9 @@ PGresult *PQprepare(PGconn *conn, </varlistentry> </variablelist> - Prepared statements for use with <function>PQexecPrepared</> can also + Prepared statements for use with <function>PQexecPrepared</function> can also be created by executing SQL <xref linkend="sql-prepare"> - statements. Also, although there is no <application>libpq</> + statements. Also, although there is no <application>libpq</application> function for deleting a prepared statement, the SQL <xref linkend="sql-deallocate"> statement can be used for that purpose. @@ -2522,21 +2522,21 @@ PGresult *PQexecPrepared(PGconn *conn, </para> <para> - <function>PQexecPrepared</> is like <function>PQexecParams</>, + <function>PQexecPrepared</function> is like <function>PQexecParams</function>, but the command to be executed is specified by naming a previously-prepared statement, instead of giving a query string. This feature allows commands that will be used repeatedly to be parsed and planned just once, rather than each time they are executed. The statement must have been prepared previously in - the current session. <function>PQexecPrepared</> is supported + the current session. <function>PQexecPrepared</function> is supported only in protocol 3.0 and later connections; it will fail when using protocol 2.0. </para> <para> - The parameters are identical to <function>PQexecParams</>, except that the + The parameters are identical to <function>PQexecParams</function>, except that the name of a prepared statement is given instead of a query string, and the - <parameter>paramTypes[]</> parameter is not present (it is not needed since + <parameter>paramTypes[]</parameter> parameter is not present (it is not needed since the prepared statement's parameter types were determined when it was created). </para> </listitem> @@ -2560,20 +2560,20 @@ PGresult *PQdescribePrepared(PGconn *conn, const char *stmtName); </para> <para> - <function>PQdescribePrepared</> allows an application to obtain + <function>PQdescribePrepared</function> allows an application to obtain information about a previously prepared statement. - <function>PQdescribePrepared</> is supported only in protocol 3.0 + <function>PQdescribePrepared</function> is supported only in protocol 3.0 and later connections; it will fail when using protocol 2.0. </para> <para> - <parameter>stmtName</> can be <literal>""</> or <symbol>NULL</> to reference + <parameter>stmtName</parameter> can be <literal>""</literal> or <symbol>NULL</symbol> to reference the unnamed statement, otherwise it must be the name of an existing - prepared statement. On success, a <structname>PGresult</> with + prepared statement. On success, a <structname>PGresult</structname> with status <literal>PGRES_COMMAND_OK</literal> is returned. The functions <function>PQnparams</function> and <function>PQparamtype</function> can be applied to this - <structname>PGresult</> to obtain information about the parameters + <structname>PGresult</structname> to obtain information about the parameters of the prepared statement, and the functions <function>PQnfields</function>, <function>PQfname</function>, <function>PQftype</function>, etc provide information about the @@ -2600,23 +2600,23 @@ PGresult *PQdescribePortal(PGconn *conn, const char *portalName); </para> <para> - <function>PQdescribePortal</> allows an application to obtain + <function>PQdescribePortal</function> allows an application to obtain information about a previously created portal. - (<application>libpq</> does not provide any direct access to + (<application>libpq</application> does not provide any direct access to portals, but you can use this function to inspect the properties - of a cursor created with a <command>DECLARE CURSOR</> SQL command.) - <function>PQdescribePortal</> is supported only in protocol 3.0 + of a cursor created with a <command>DECLARE CURSOR</command> SQL command.) + <function>PQdescribePortal</function> is supported only in protocol 3.0 and later connections; it will fail when using protocol 2.0. </para> <para> - <parameter>portalName</> can be <literal>""</> or <symbol>NULL</> to reference + <parameter>portalName</parameter> can be <literal>""</literal> or <symbol>NULL</symbol> to reference the unnamed portal, otherwise it must be the name of an existing - portal. On success, a <structname>PGresult</> with status + portal. On success, a <structname>PGresult</structname> with status <literal>PGRES_COMMAND_OK</literal> is returned. The functions <function>PQnfields</function>, <function>PQfname</function>, <function>PQftype</function>, etc can be applied to the - <structname>PGresult</> to obtain information about the result + <structname>PGresult</structname> to obtain information about the result columns (if any) of the portal. </para> </listitem> @@ -2625,7 +2625,7 @@ PGresult *PQdescribePortal(PGconn *conn, const char *portalName); </para> <para> - The <structname>PGresult</structname><indexterm><primary>PGresult</></> + The <structname>PGresult</structname><indexterm><primary>PGresult</primary></indexterm> structure encapsulates the result returned by the server. <application>libpq</application> application programmers should be careful to maintain the <structname>PGresult</structname> abstraction. @@ -2678,7 +2678,7 @@ ExecStatusType PQresultStatus(const PGresult *res); <listitem> <para> Successful completion of a command returning data (such as - a <command>SELECT</> or <command>SHOW</>). + a <command>SELECT</command> or <command>SHOW</command>). </para> </listitem> </varlistentry> @@ -2743,7 +2743,7 @@ ExecStatusType PQresultStatus(const PGresult *res); <term><literal>PGRES_SINGLE_TUPLE</literal></term> <listitem> <para> - The <structname>PGresult</> contains a single result tuple + The <structname>PGresult</structname> contains a single result tuple from the current command. This status occurs only when single-row mode has been selected for the query (see <xref linkend="libpq-single-row-mode">). @@ -2786,7 +2786,7 @@ ExecStatusType PQresultStatus(const PGresult *res); <listitem> <para> Converts the enumerated type returned by - <function>PQresultStatus</> into a string constant describing the + <function>PQresultStatus</function> into a string constant describing the status code. The caller should not free the result. <synopsis> @@ -2813,7 +2813,7 @@ char *PQresultErrorMessage(const PGresult *res); </synopsis> If there was an error, the returned string will include a trailing newline. The caller should not free the result directly. It will - be freed when the associated <structname>PGresult</> handle is + be freed when the associated <structname>PGresult</structname> handle is passed to <function>PQclear</function>. </para> @@ -2845,7 +2845,7 @@ char *PQresultErrorMessage(const PGresult *res); <listitem> <para> Returns a reformatted version of the error message associated with - a <structname>PGresult</> object. + a <structname>PGresult</structname> object. <synopsis> char *PQresultVerboseErrorMessage(const PGresult *res, PGVerbosity verbosity, @@ -2857,17 +2857,17 @@ char *PQresultVerboseErrorMessage(const PGresult *res, by computing the message that would have been produced by <function>PQresultErrorMessage</function> if the specified verbosity settings had been in effect for the connection when the - given <structname>PGresult</> was generated. If - the <structname>PGresult</> is not an error result, - <quote>PGresult is not an error result</> is reported instead. + given <structname>PGresult</structname> was generated. If + the <structname>PGresult</structname> is not an error result, + <quote>PGresult is not an error result</quote> is reported instead. The returned string includes a trailing newline. </para> <para> Unlike most other functions for extracting data from - a <structname>PGresult</>, the result of this function is a freshly + a <structname>PGresult</structname>, the result of this function is a freshly allocated string. The caller must free it - using <function>PQfreemem()</> when the string is no longer needed. + using <function>PQfreemem()</function> when the string is no longer needed. </para> <para> @@ -2877,20 +2877,20 @@ char *PQresultVerboseErrorMessage(const PGresult *res, </varlistentry> <varlistentry id="libpq-pqresulterrorfield"> - <term><function>PQresultErrorField</function><indexterm><primary>PQresultErrorField</></></term> + <term><function>PQresultErrorField</function><indexterm><primary>PQresultErrorField</primary></indexterm></term> <listitem> <para> Returns an individual field of an error report. <synopsis> char *PQresultErrorField(const PGresult *res, int fieldcode); </synopsis> - <parameter>fieldcode</> is an error field identifier; see the symbols + <parameter>fieldcode</parameter> is an error field identifier; see the symbols listed below. <symbol>NULL</symbol> is returned if the <structname>PGresult</structname> is not an error or warning result, or does not include the specified field. Field values will normally not include a trailing newline. The caller should not free the result directly. It will be freed when the - associated <structname>PGresult</> handle is passed to + associated <structname>PGresult</structname> handle is passed to <function>PQclear</function>. </para> @@ -2898,29 +2898,29 @@ char *PQresultErrorField(const PGresult *res, int fieldcode); The following field codes are available: <variablelist> <varlistentry id="libpq-pg-diag-severity"> - <term><symbol>PG_DIAG_SEVERITY</></term> + <term><symbol>PG_DIAG_SEVERITY</symbol></term> <listitem> <para> - The severity; the field contents are <literal>ERROR</>, - <literal>FATAL</>, or <literal>PANIC</> (in an error message), - or <literal>WARNING</>, <literal>NOTICE</>, <literal>DEBUG</>, - <literal>INFO</>, or <literal>LOG</> (in a notice message), or + The severity; the field contents are <literal>ERROR</literal>, + <literal>FATAL</literal>, or <literal>PANIC</literal> (in an error message), + or <literal>WARNING</literal>, <literal>NOTICE</literal>, <literal>DEBUG</literal>, + <literal>INFO</literal>, or <literal>LOG</literal> (in a notice message), or a localized translation of one of these. Always present. </para> </listitem> </varlistentry> <varlistentry id="libpq-pg-diag-severity-nonlocalized"> - <term><symbol>PG_DIAG_SEVERITY_NONLOCALIZED</></term> + <term><symbol>PG_DIAG_SEVERITY_NONLOCALIZED</symbol></term> <listitem> <para> - The severity; the field contents are <literal>ERROR</>, - <literal>FATAL</>, or <literal>PANIC</> (in an error message), - or <literal>WARNING</>, <literal>NOTICE</>, <literal>DEBUG</>, - <literal>INFO</>, or <literal>LOG</> (in a notice message). - This is identical to the <symbol>PG_DIAG_SEVERITY</> field except + The severity; the field contents are <literal>ERROR</literal>, + <literal>FATAL</literal>, or <literal>PANIC</literal> (in an error message), + or <literal>WARNING</literal>, <literal>NOTICE</literal>, <literal>DEBUG</literal>, + <literal>INFO</literal>, or <literal>LOG</literal> (in a notice message). + This is identical to the <symbol>PG_DIAG_SEVERITY</symbol> field except that the contents are never localized. This is present only in - reports generated by <productname>PostgreSQL</> versions 9.6 + reports generated by <productname>PostgreSQL</productname> versions 9.6 and later. </para> </listitem> @@ -2928,7 +2928,7 @@ char *PQresultErrorField(const PGresult *res, int fieldcode); <varlistentry id="libpq-pg-diag-sqlstate"> <term> - <symbol>PG_DIAG_SQLSTATE</> + <symbol>PG_DIAG_SQLSTATE</symbol> <indexterm> <primary>error codes</primary> <secondary>libpq</secondary> @@ -2948,7 +2948,7 @@ char *PQresultErrorField(const PGresult *res, int fieldcode); </varlistentry> <varlistentry id="libpq-pg-diag-message-primary"> - <term><symbol>PG_DIAG_MESSAGE_PRIMARY</></term> + <term><symbol>PG_DIAG_MESSAGE_PRIMARY</symbol></term> <listitem> <para> The primary human-readable error message (typically one line). @@ -2958,7 +2958,7 @@ char *PQresultErrorField(const PGresult *res, int fieldcode); </varlistentry> <varlistentry id="libpq-pg-diag-message-detail"> - <term><symbol>PG_DIAG_MESSAGE_DETAIL</></term> + <term><symbol>PG_DIAG_MESSAGE_DETAIL</symbol></term> <listitem> <para> Detail: an optional secondary error message carrying more @@ -2968,7 +2968,7 @@ char *PQresultErrorField(const PGresult *res, int fieldcode); </varlistentry> <varlistentry id="libpq-pg-diag-message-hint"> - <term><symbol>PG_DIAG_MESSAGE_HINT</></term> + <term><symbol>PG_DIAG_MESSAGE_HINT</symbol></term> <listitem> <para> Hint: an optional suggestion what to do about the problem. @@ -2980,7 +2980,7 @@ char *PQresultErrorField(const PGresult *res, int fieldcode); </varlistentry> <varlistentry id="libpq-pg-diag-statement-position"> - <term><symbol>PG_DIAG_STATEMENT_POSITION</></term> + <term><symbol>PG_DIAG_STATEMENT_POSITION</symbol></term> <listitem> <para> A string containing a decimal integer indicating an error cursor @@ -2992,21 +2992,21 @@ char *PQresultErrorField(const PGresult *res, int fieldcode); </varlistentry> <varlistentry id="libpq-pg-diag-internal-position"> - <term><symbol>PG_DIAG_INTERNAL_POSITION</></term> + <term><symbol>PG_DIAG_INTERNAL_POSITION</symbol></term> <listitem> <para> This is defined the same as the - <symbol>PG_DIAG_STATEMENT_POSITION</> field, but it is used + <symbol>PG_DIAG_STATEMENT_POSITION</symbol> field, but it is used when the cursor position refers to an internally generated command rather than the one submitted by the client. The - <symbol>PG_DIAG_INTERNAL_QUERY</> field will always appear when + <symbol>PG_DIAG_INTERNAL_QUERY</symbol> field will always appear when this field appears. </para> </listitem> </varlistentry> <varlistentry id="libpq-pg-diag-internal-query"> - <term><symbol>PG_DIAG_INTERNAL_QUERY</></term> + <term><symbol>PG_DIAG_INTERNAL_QUERY</symbol></term> <listitem> <para> The text of a failed internally-generated command. This could @@ -3016,7 +3016,7 @@ char *PQresultErrorField(const PGresult *res, int fieldcode); </varlistentry> <varlistentry id="libpq-pg-diag-context"> - <term><symbol>PG_DIAG_CONTEXT</></term> + <term><symbol>PG_DIAG_CONTEXT</symbol></term> <listitem> <para> An indication of the context in which the error occurred. @@ -3028,7 +3028,7 @@ char *PQresultErrorField(const PGresult *res, int fieldcode); </varlistentry> <varlistentry id="libpq-pg-diag-schema-name"> - <term><symbol>PG_DIAG_SCHEMA_NAME</></term> + <term><symbol>PG_DIAG_SCHEMA_NAME</symbol></term> <listitem> <para> If the error was associated with a specific database object, @@ -3038,7 +3038,7 @@ char *PQresultErrorField(const PGresult *res, int fieldcode); </varlistentry> <varlistentry id="libpq-pg-diag-table-name"> - <term><symbol>PG_DIAG_TABLE_NAME</></term> + <term><symbol>PG_DIAG_TABLE_NAME</symbol></term> <listitem> <para> If the error was associated with a specific table, the name of the @@ -3049,7 +3049,7 @@ char *PQresultErrorField(const PGresult *res, int fieldcode); </varlistentry> <varlistentry id="libpq-pg-diag-column-name"> - <term><symbol>PG_DIAG_COLUMN_NAME</></term> + <term><symbol>PG_DIAG_COLUMN_NAME</symbol></term> <listitem> <para> If the error was associated with a specific table column, the name @@ -3060,7 +3060,7 @@ char *PQresultErrorField(const PGresult *res, int fieldcode); </varlistentry> <varlistentry id="libpq-pg-diag-datatype-name"> - <term><symbol>PG_DIAG_DATATYPE_NAME</></term> + <term><symbol>PG_DIAG_DATATYPE_NAME</symbol></term> <listitem> <para> If the error was associated with a specific data type, the name of @@ -3071,7 +3071,7 @@ char *PQresultErrorField(const PGresult *res, int fieldcode); </varlistentry> <varlistentry id="libpq-pg-diag-constraint-name"> - <term><symbol>PG_DIAG_CONSTRAINT_NAME</></term> + <term><symbol>PG_DIAG_CONSTRAINT_NAME</symbol></term> <listitem> <para> If the error was associated with a specific constraint, the name @@ -3084,7 +3084,7 @@ char *PQresultErrorField(const PGresult *res, int fieldcode); </varlistentry> <varlistentry id="libpq-pg-diag-source-file"> - <term><symbol>PG_DIAG_SOURCE_FILE</></term> + <term><symbol>PG_DIAG_SOURCE_FILE</symbol></term> <listitem> <para> The file name of the source-code location where the error was @@ -3094,7 +3094,7 @@ char *PQresultErrorField(const PGresult *res, int fieldcode); </varlistentry> <varlistentry id="libpq-pg-diag-source-line"> - <term><symbol>PG_DIAG_SOURCE_LINE</></term> + <term><symbol>PG_DIAG_SOURCE_LINE</symbol></term> <listitem> <para> The line number of the source-code location where the error @@ -3104,7 +3104,7 @@ char *PQresultErrorField(const PGresult *res, int fieldcode); </varlistentry> <varlistentry id="libpq-pg-diag-source-function"> - <term><symbol>PG_DIAG_SOURCE_FUNCTION</></term> + <term><symbol>PG_DIAG_SOURCE_FUNCTION</symbol></term> <listitem> <para> The name of the source-code function reporting the error. @@ -3151,7 +3151,7 @@ char *PQresultErrorField(const PGresult *res, int fieldcode); </varlistentry> <varlistentry id="libpq-pqclear"> - <term><function>PQclear</function><indexterm><primary>PQclear</></></term> + <term><function>PQclear</function><indexterm><primary>PQclear</primary></indexterm></term> <listitem> <para> Frees the storage associated with a @@ -3184,7 +3184,7 @@ void PQclear(PGresult *res); These functions are used to extract information from a <structname>PGresult</structname> object that represents a successful query result (that is, one that has status - <literal>PGRES_TUPLES_OK</literal> or <literal>PGRES_SINGLE_TUPLE</>). + <literal>PGRES_TUPLES_OK</literal> or <literal>PGRES_SINGLE_TUPLE</literal>). They can also be used to extract information from a successful Describe operation: a Describe's result has all the same column information that actual execution of the query @@ -3204,8 +3204,8 @@ void PQclear(PGresult *res); <listitem> <para> Returns the number of rows (tuples) in the query result. - (Note that <structname>PGresult</> objects are limited to no more - than <literal>INT_MAX</> rows, so an <type>int</> result is + (Note that <structname>PGresult</structname> objects are limited to no more + than <literal>INT_MAX</literal> rows, so an <type>int</type> result is sufficient.) <synopsis> @@ -3249,7 +3249,7 @@ int PQnfields(const PGresult *res); Returns the column name associated with the given column number. Column numbers start at 0. The caller should not free the result directly. It will be freed when the associated - <structname>PGresult</> handle is passed to + <structname>PGresult</structname> handle is passed to <function>PQclear</function>. <synopsis> char *PQfname(const PGresult *res, @@ -3323,7 +3323,7 @@ Oid PQftable(const PGresult *res, </para> <para> - <literal>InvalidOid</> is returned if the column number is out of range, + <literal>InvalidOid</literal> is returned if the column number is out of range, or if the specified column is not a simple reference to a table column, or when using pre-3.0 protocol. You can query the system table <literal>pg_class</literal> to determine @@ -3442,7 +3442,7 @@ int PQfmod(const PGresult *res, <para> The interpretation of modifier values is type-specific; they typically indicate precision or size limits. The value -1 is - used to indicate <quote>no information available</>. Most data + used to indicate <quote>no information available</quote>. Most data types do not use modifiers, in which case the value is always -1. </para> @@ -3468,7 +3468,7 @@ int PQfsize(const PGresult *res, </para> <para> - <function>PQfsize</> returns the space allocated for this column + <function>PQfsize</function> returns the space allocated for this column in a database row, in other words the size of the server's internal representation of the data type. (Accordingly, it is not really very useful to clients.) A negative value indicates @@ -3487,7 +3487,7 @@ int PQfsize(const PGresult *res, <listitem> <para> - Returns 1 if the <structname>PGresult</> contains binary data + Returns 1 if the <structname>PGresult</structname> contains binary data and 0 if it contains text data. <synopsis> int PQbinaryTuples(const PGresult *res); @@ -3496,10 +3496,10 @@ int PQbinaryTuples(const PGresult *res); <para> This function is deprecated (except for its use in connection with - <command>COPY</>), because it is possible for a single - <structname>PGresult</> to contain text data in some columns and - binary data in others. <function>PQfformat</> is preferred. - <function>PQbinaryTuples</> returns 1 only if all columns of the + <command>COPY</command>), because it is possible for a single + <structname>PGresult</structname> to contain text data in some columns and + binary data in others. <function>PQfformat</function> is preferred. + <function>PQbinaryTuples</function> returns 1 only if all columns of the result are binary (format 1). </para> </listitem> @@ -3518,7 +3518,7 @@ int PQbinaryTuples(const PGresult *res); Returns a single field value of one row of a <structname>PGresult</structname>. Row and column numbers start at 0. The caller should not free the result directly. It will - be freed when the associated <structname>PGresult</> handle is + be freed when the associated <structname>PGresult</structname> handle is passed to <function>PQclear</function>. <synopsis> char *PQgetvalue(const PGresult *res, @@ -3532,7 +3532,7 @@ char *PQgetvalue(const PGresult *res, <function>PQgetvalue</function> is a null-terminated character string representation of the field value. For data in binary format, the value is in the binary representation determined by - the data type's <function>typsend</> and <function>typreceive</> + the data type's <function>typsend</function> and <function>typreceive</function> functions. (The value is actually followed by a zero byte in this case too, but that is not ordinarily useful, since the value is likely to contain embedded nulls.) @@ -3540,7 +3540,7 @@ char *PQgetvalue(const PGresult *res, <para> An empty string is returned if the field value is null. See - <function>PQgetisnull</> to distinguish null values from + <function>PQgetisnull</function> to distinguish null values from empty-string values. </para> @@ -3609,8 +3609,8 @@ int PQgetlength(const PGresult *res, This is the actual data length for the particular data value, that is, the size of the object pointed to by <function>PQgetvalue</function>. For text data format this is - the same as <function>strlen()</>. For binary format this is - essential information. Note that one should <emphasis>not</> + the same as <function>strlen()</function>. For binary format this is + essential information. Note that one should <emphasis>not</emphasis> rely on <function>PQfsize</function> to obtain the actual data length. </para> @@ -3635,7 +3635,7 @@ int PQnparams(const PGresult *res); <para> This function is only useful when inspecting the result of - <function>PQdescribePrepared</>. For other types of queries it + <function>PQdescribePrepared</function>. For other types of queries it will return zero. </para> </listitem> @@ -3660,7 +3660,7 @@ Oid PQparamtype(const PGresult *res, int param_number); <para> This function is only useful when inspecting the result of - <function>PQdescribePrepared</>. For other types of queries it + <function>PQdescribePrepared</function>. For other types of queries it will return zero. </para> </listitem> @@ -3738,7 +3738,7 @@ char *PQcmdStatus(PGresult *res); Commonly this is just the name of the command, but it might include additional data such as the number of rows processed. The caller should not free the result directly. It will be freed when the - associated <structname>PGresult</> handle is passed to + associated <structname>PGresult</structname> handle is passed to <function>PQclear</function>. </para> </listitem> @@ -3762,17 +3762,17 @@ char *PQcmdTuples(PGresult *res); <para> This function returns a string containing the number of rows - affected by the <acronym>SQL</> statement that generated the - <structname>PGresult</>. This function can only be used following - the execution of a <command>SELECT</>, <command>CREATE TABLE AS</>, - <command>INSERT</>, <command>UPDATE</>, <command>DELETE</>, - <command>MOVE</>, <command>FETCH</>, or <command>COPY</> statement, - or an <command>EXECUTE</> of a prepared query that contains an - <command>INSERT</>, <command>UPDATE</>, or <command>DELETE</> statement. - If the command that generated the <structname>PGresult</> was anything - else, <function>PQcmdTuples</> returns an empty string. The caller + affected by the <acronym>SQL</acronym> statement that generated the + <structname>PGresult</structname>. This function can only be used following + the execution of a <command>SELECT</command>, <command>CREATE TABLE AS</command>, + <command>INSERT</command>, <command>UPDATE</command>, <command>DELETE</command>, + <command>MOVE</command>, <command>FETCH</command>, or <command>COPY</command> statement, + or an <command>EXECUTE</command> of a prepared query that contains an + <command>INSERT</command>, <command>UPDATE</command>, or <command>DELETE</command> statement. + If the command that generated the <structname>PGresult</structname> was anything + else, <function>PQcmdTuples</function> returns an empty string. The caller should not free the return value directly. It will be freed when - the associated <structname>PGresult</> handle is passed to + the associated <structname>PGresult</structname> handle is passed to <function>PQclear</function>. </para> </listitem> @@ -3788,14 +3788,14 @@ char *PQcmdTuples(PGresult *res); <listitem> <para> - Returns the OID<indexterm><primary>OID</><secondary>in libpq</></> - of the inserted row, if the <acronym>SQL</> command was an - <command>INSERT</> that inserted exactly one row into a table that - has OIDs, or a <command>EXECUTE</> of a prepared query containing - a suitable <command>INSERT</> statement. Otherwise, this function + Returns the OID<indexterm><primary>OID</primary><secondary>in libpq</secondary></indexterm> + of the inserted row, if the <acronym>SQL</acronym> command was an + <command>INSERT</command> that inserted exactly one row into a table that + has OIDs, or a <command>EXECUTE</command> of a prepared query containing + a suitable <command>INSERT</command> statement. Otherwise, this function returns <literal>InvalidOid</literal>. This function will also return <literal>InvalidOid</literal> if the table affected by the - <command>INSERT</> statement does not contain OIDs. + <command>INSERT</command> statement does not contain OIDs. <synopsis> Oid PQoidValue(const PGresult *res); </synopsis> @@ -3858,19 +3858,19 @@ char *PQescapeLiteral(PGconn *conn, const char *str, size_t length); values as literal constants in SQL commands. Certain characters (such as quotes and backslashes) must be escaped to prevent them from being interpreted specially by the SQL parser. - <function>PQescapeLiteral</> performs this operation. + <function>PQescapeLiteral</function> performs this operation. </para> <para> - <function>PQescapeLiteral</> returns an escaped version of the + <function>PQescapeLiteral</function> returns an escaped version of the <parameter>str</parameter> parameter in memory allocated with - <function>malloc()</>. This memory should be freed using - <function>PQfreemem()</> when the result is no longer needed. + <function>malloc()</function>. This memory should be freed using + <function>PQfreemem()</function> when the result is no longer needed. A terminating zero byte is not required, and should not be - counted in <parameter>length</>. (If a terminating zero byte is found - before <parameter>length</> bytes are processed, - <function>PQescapeLiteral</> stops at the zero; the behavior is - thus rather like <function>strncpy</>.) The + counted in <parameter>length</parameter>. (If a terminating zero byte is found + before <parameter>length</parameter> bytes are processed, + <function>PQescapeLiteral</function> stops at the zero; the behavior is + thus rather like <function>strncpy</function>.) The return string has all special characters replaced so that they can be properly processed by the <productname>PostgreSQL</productname> string literal parser. A terminating zero byte is also added. The @@ -3879,8 +3879,8 @@ char *PQescapeLiteral(PGconn *conn, const char *str, size_t length); </para> <para> - On error, <function>PQescapeLiteral</> returns <symbol>NULL</> and a suitable - message is stored in the <parameter>conn</> object. + On error, <function>PQescapeLiteral</function> returns <symbol>NULL</symbol> and a suitable + message is stored in the <parameter>conn</parameter> object. </para> <tip> @@ -3888,14 +3888,14 @@ char *PQescapeLiteral(PGconn *conn, const char *str, size_t length); It is especially important to do proper escaping when handling strings that were received from an untrustworthy source. Otherwise there is a security risk: you are vulnerable to - <quote>SQL injection</> attacks wherein unwanted SQL commands are + <quote>SQL injection</quote> attacks wherein unwanted SQL commands are fed to your database. </para> </tip> <para> Note that it is not necessary nor correct to do escaping when a data - value is passed as a separate parameter in <function>PQexecParams</> or + value is passed as a separate parameter in <function>PQexecParams</function> or its sibling routines. </para> </listitem> @@ -3926,15 +3926,15 @@ char *PQescapeIdentifier(PGconn *conn, const char *str, size_t length); </para> <para> - <function>PQescapeIdentifier</> returns a version of the + <function>PQescapeIdentifier</function> returns a version of the <parameter>str</parameter> parameter escaped as an SQL identifier - in memory allocated with <function>malloc()</>. This memory must be - freed using <function>PQfreemem()</> when the result is no longer + in memory allocated with <function>malloc()</function>. This memory must be + freed using <function>PQfreemem()</function> when the result is no longer needed. A terminating zero byte is not required, and should not be - counted in <parameter>length</>. (If a terminating zero byte is found - before <parameter>length</> bytes are processed, - <function>PQescapeIdentifier</> stops at the zero; the behavior is - thus rather like <function>strncpy</>.) The + counted in <parameter>length</parameter>. (If a terminating zero byte is found + before <parameter>length</parameter> bytes are processed, + <function>PQescapeIdentifier</function> stops at the zero; the behavior is + thus rather like <function>strncpy</function>.) The return string has all special characters replaced so that it will be properly processed as an SQL identifier. A terminating zero byte is also added. The return string will also be surrounded by double @@ -3942,8 +3942,8 @@ char *PQescapeIdentifier(PGconn *conn, const char *str, size_t length); </para> <para> - On error, <function>PQescapeIdentifier</> returns <symbol>NULL</> and a suitable - message is stored in the <parameter>conn</> object. + On error, <function>PQescapeIdentifier</function> returns <symbol>NULL</symbol> and a suitable + message is stored in the <parameter>conn</parameter> object. </para> <tip> @@ -3974,39 +3974,39 @@ size_t PQescapeStringConn(PGconn *conn, </para> <para> - <function>PQescapeStringConn</> escapes string literals, much like - <function>PQescapeLiteral</>. Unlike <function>PQescapeLiteral</>, + <function>PQescapeStringConn</function> escapes string literals, much like + <function>PQescapeLiteral</function>. Unlike <function>PQescapeLiteral</function>, the caller is responsible for providing an appropriately sized buffer. - Furthermore, <function>PQescapeStringConn</> does not generate the - single quotes that must surround <productname>PostgreSQL</> string + Furthermore, <function>PQescapeStringConn</function> does not generate the + single quotes that must surround <productname>PostgreSQL</productname> string literals; they should be provided in the SQL command that the - result is inserted into. The parameter <parameter>from</> points to + result is inserted into. The parameter <parameter>from</parameter> points to the first character of the string that is to be escaped, and the - <parameter>length</> parameter gives the number of bytes in this + <parameter>length</parameter> parameter gives the number of bytes in this string. A terminating zero byte is not required, and should not be - counted in <parameter>length</>. (If a terminating zero byte is found - before <parameter>length</> bytes are processed, - <function>PQescapeStringConn</> stops at the zero; the behavior is - thus rather like <function>strncpy</>.) <parameter>to</> shall point + counted in <parameter>length</parameter>. (If a terminating zero byte is found + before <parameter>length</parameter> bytes are processed, + <function>PQescapeStringConn</function> stops at the zero; the behavior is + thus rather like <function>strncpy</function>.) <parameter>to</parameter> shall point to a buffer that is able to hold at least one more byte than twice - the value of <parameter>length</>, otherwise the behavior is undefined. - Behavior is likewise undefined if the <parameter>to</> and - <parameter>from</> strings overlap. + the value of <parameter>length</parameter>, otherwise the behavior is undefined. + Behavior is likewise undefined if the <parameter>to</parameter> and + <parameter>from</parameter> strings overlap. </para> <para> - If the <parameter>error</> parameter is not <symbol>NULL</>, then - <literal>*error</> is set to zero on success, nonzero on error. + If the <parameter>error</parameter> parameter is not <symbol>NULL</symbol>, then + <literal>*error</literal> is set to zero on success, nonzero on error. Presently the only possible error conditions involve invalid multibyte encoding in the source string. The output string is still generated on error, but it can be expected that the server will reject it as malformed. On error, a suitable message is stored in the - <parameter>conn</> object, whether or not <parameter>error</> is <symbol>NULL</>. + <parameter>conn</parameter> object, whether or not <parameter>error</parameter> is <symbol>NULL</symbol>. </para> <para> - <function>PQescapeStringConn</> returns the number of bytes written - to <parameter>to</>, not including the terminating zero byte. + <function>PQescapeStringConn</function> returns the number of bytes written + to <parameter>to</parameter>, not including the terminating zero byte. </para> </listitem> </varlistentry> @@ -4021,30 +4021,30 @@ size_t PQescapeStringConn(PGconn *conn, <listitem> <para> - <function>PQescapeString</> is an older, deprecated version of - <function>PQescapeStringConn</>. + <function>PQescapeString</function> is an older, deprecated version of + <function>PQescapeStringConn</function>. <synopsis> size_t PQescapeString (char *to, const char *from, size_t length); </synopsis> </para> <para> - The only difference from <function>PQescapeStringConn</> is that - <function>PQescapeString</> does not take <structname>PGconn</> - or <parameter>error</> parameters. + The only difference from <function>PQescapeStringConn</function> is that + <function>PQescapeString</function> does not take <structname>PGconn</structname> + or <parameter>error</parameter> parameters. Because of this, it cannot adjust its behavior depending on the connection properties (such as character encoding) and therefore - <emphasis>it might give the wrong results</>. Also, it has no way + <emphasis>it might give the wrong results</emphasis>. Also, it has no way to report error conditions. </para> <para> - <function>PQescapeString</> can be used safely in - client programs that work with only one <productname>PostgreSQL</> + <function>PQescapeString</function> can be used safely in + client programs that work with only one <productname>PostgreSQL</productname> connection at a time (in this case it can find out what it needs to - know <quote>behind the scenes</>). In other contexts it is a security + know <quote>behind the scenes</quote>). In other contexts it is a security hazard and should be avoided in favor of - <function>PQescapeStringConn</>. + <function>PQescapeStringConn</function>. </para> </listitem> </varlistentry> @@ -4090,10 +4090,10 @@ unsigned char *PQescapeByteaConn(PGconn *conn, </para> <para> - <function>PQescapeByteaConn</> returns an escaped version of the + <function>PQescapeByteaConn</function> returns an escaped version of the <parameter>from</parameter> parameter binary string in memory - allocated with <function>malloc()</>. This memory should be freed using - <function>PQfreemem()</> when the result is no longer needed. The + allocated with <function>malloc()</function>. This memory should be freed using + <function>PQfreemem()</function> when the result is no longer needed. The return string has all special characters replaced so that they can be properly processed by the <productname>PostgreSQL</productname> string literal parser, and the <type>bytea</type> input function. A @@ -4104,7 +4104,7 @@ unsigned char *PQescapeByteaConn(PGconn *conn, <para> On error, a null pointer is returned, and a suitable error message - is stored in the <parameter>conn</> object. Currently, the only + is stored in the <parameter>conn</parameter> object. Currently, the only possible error is insufficient memory for the result string. </para> </listitem> @@ -4120,8 +4120,8 @@ unsigned char *PQescapeByteaConn(PGconn *conn, <listitem> <para> - <function>PQescapeBytea</> is an older, deprecated version of - <function>PQescapeByteaConn</>. + <function>PQescapeBytea</function> is an older, deprecated version of + <function>PQescapeByteaConn</function>. <synopsis> unsigned char *PQescapeBytea(const unsigned char *from, size_t from_length, @@ -4130,15 +4130,15 @@ unsigned char *PQescapeBytea(const unsigned char *from, </para> <para> - The only difference from <function>PQescapeByteaConn</> is that - <function>PQescapeBytea</> does not take a <structname>PGconn</> - parameter. Because of this, <function>PQescapeBytea</> can + The only difference from <function>PQescapeByteaConn</function> is that + <function>PQescapeBytea</function> does not take a <structname>PGconn</structname> + parameter. Because of this, <function>PQescapeBytea</function> can only be used safely in client programs that use a single - <productname>PostgreSQL</> connection at a time (in this case + <productname>PostgreSQL</productname> connection at a time (in this case it can find out what it needs to know <quote>behind the - scenes</>). It <emphasis>might give the wrong results</> if + scenes</quote>). It <emphasis>might give the wrong results</emphasis> if used in programs that use multiple database connections (use - <function>PQescapeByteaConn</> in such cases). + <function>PQescapeByteaConn</function> in such cases). </para> </listitem> </varlistentry> @@ -4169,17 +4169,17 @@ unsigned char *PQunescapeBytea(const unsigned char *from, size_t *to_length); to a <type>bytea</type> column. <function>PQunescapeBytea</function> converts this string representation into its binary representation. It returns a pointer to a buffer allocated with - <function>malloc()</function>, or <symbol>NULL</> on error, and puts the size of + <function>malloc()</function>, or <symbol>NULL</symbol> on error, and puts the size of the buffer in <parameter>to_length</parameter>. The result must be - freed using <function>PQfreemem</> when it is no longer needed. + freed using <function>PQfreemem</function> when it is no longer needed. </para> <para> This conversion is not exactly the inverse of <function>PQescapeBytea</function>, because the string is not expected - to be <quote>escaped</> when received from <function>PQgetvalue</function>. + to be <quote>escaped</quote> when received from <function>PQgetvalue</function>. In particular this means there is no need for string quoting considerations, - and so no need for a <structname>PGconn</> parameter. + and so no need for a <structname>PGconn</structname> parameter. </para> </listitem> </varlistentry> @@ -4273,7 +4273,7 @@ unsigned char *PQunescapeBytea(const unsigned char *from, size_t *to_length); <para> Submits a command to the server without waiting for the result(s). 1 is returned if the command was successfully dispatched and 0 if - not (in which case, use <function>PQerrorMessage</> to get more + not (in which case, use <function>PQerrorMessage</function> to get more information about the failure). <synopsis> int PQsendQuery(PGconn *conn, const char *command); @@ -4323,7 +4323,7 @@ int PQsendQueryParams(PGconn *conn, <varlistentry id="libpq-pqsendprepare"> <term> - <function>PQsendPrepare</> + <function>PQsendPrepare</function> <indexterm> <primary>PQsendPrepare</primary> </indexterm> @@ -4341,7 +4341,7 @@ int PQsendPrepare(PGconn *conn, const Oid *paramTypes); </synopsis> - This is an asynchronous version of <function>PQprepare</>: it + This is an asynchronous version of <function>PQprepare</function>: it returns 1 if it was able to dispatch the request, and 0 if not. After a successful call, call <function>PQgetResult</function> to determine whether the server successfully created the prepared @@ -4388,7 +4388,7 @@ int PQsendQueryPrepared(PGconn *conn, <varlistentry id="libpq-pqsenddescribeprepared"> <term> - <function>PQsendDescribePrepared</> + <function>PQsendDescribePrepared</function> <indexterm> <primary>PQsendDescribePrepared</primary> </indexterm> @@ -4402,7 +4402,7 @@ int PQsendQueryPrepared(PGconn *conn, int PQsendDescribePrepared(PGconn *conn, const char *stmtName); </synopsis> - This is an asynchronous version of <function>PQdescribePrepared</>: + This is an asynchronous version of <function>PQdescribePrepared</function>: it returns 1 if it was able to dispatch the request, and 0 if not. After a successful call, call <function>PQgetResult</function> to obtain the results. The function's parameters are handled @@ -4415,7 +4415,7 @@ int PQsendDescribePrepared(PGconn *conn, const char *stmtName); <varlistentry id="libpq-pqsenddescribeportal"> <term> - <function>PQsendDescribePortal</> + <function>PQsendDescribePortal</function> <indexterm> <primary>PQsendDescribePortal</primary> </indexterm> @@ -4429,7 +4429,7 @@ int PQsendDescribePrepared(PGconn *conn, const char *stmtName); int PQsendDescribePortal(PGconn *conn, const char *portalName); </synopsis> - This is an asynchronous version of <function>PQdescribePortal</>: + This is an asynchronous version of <function>PQdescribePortal</function>: it returns 1 if it was able to dispatch the request, and 0 if not. After a successful call, call <function>PQgetResult</function> to obtain the results. The function's parameters are handled @@ -4472,7 +4472,7 @@ PGresult *PQgetResult(PGconn *conn); <function>PQgetResult</function> will just return a null pointer at once.) Each non-null result from <function>PQgetResult</function> should be processed using the - same <structname>PGresult</> accessor functions previously + same <structname>PGresult</structname> accessor functions previously described. Don't forget to free each result object with <function>PQclear</function> when done with it. Note that <function>PQgetResult</function> will block only if a command is @@ -4484,7 +4484,7 @@ PGresult *PQgetResult(PGconn *conn); <para> Even when <function>PQresultStatus</function> indicates a fatal error, <function>PQgetResult</function> should be called until it - returns a null pointer, to allow <application>libpq</> to + returns a null pointer, to allow <application>libpq</application> to process the error information completely. </para> </note> @@ -4589,7 +4589,7 @@ int PQisBusy(PGconn *conn); <para> A typical application using these functions will have a main loop that - uses <function>select()</function> or <function>poll()</> to wait for + uses <function>select()</function> or <function>poll()</function> to wait for all the conditions that it must respond to. One of the conditions will be input available from the server, which in terms of <function>select()</function> means readable data on the file @@ -4599,7 +4599,7 @@ int PQisBusy(PGconn *conn); call <function>PQisBusy</function>, followed by <function>PQgetResult</function> if <function>PQisBusy</function> returns false (0). It can also call <function>PQnotifies</function> - to detect <command>NOTIFY</> messages (see <xref + to detect <command>NOTIFY</command> messages (see <xref linkend="libpq-notify">). </para> @@ -4737,12 +4737,12 @@ int PQflush(PGconn *conn); </indexterm> <para> - Ordinarily, <application>libpq</> collects a SQL command's + Ordinarily, <application>libpq</application> collects a SQL command's entire result and returns it to the application as a single <structname>PGresult</structname>. This can be unworkable for commands that return a large number of rows. For such cases, applications can use <function>PQsendQuery</function> and <function>PQgetResult</function> in - <firstterm>single-row mode</>. In this mode, the result row(s) are + <firstterm>single-row mode</firstterm>. In this mode, the result row(s) are returned to the application one at a time, as they are received from the server. </para> @@ -4807,7 +4807,7 @@ int PQsetSingleRowMode(PGconn *conn); <para> While processing a query, the server may return some rows and then encounter an error, causing the query to be aborted. Ordinarily, - <application>libpq</> discards any such rows and reports only the + <application>libpq</application> discards any such rows and reports only the error. But in single-row mode, those rows will have already been returned to the application. Hence, the application will see some <literal>PGRES_SINGLE_TUPLE</literal> <structname>PGresult</structname> @@ -4853,10 +4853,10 @@ PGcancel *PQgetCancel(PGconn *conn); <para> <function>PQgetCancel</function> creates a - <structname>PGcancel</><indexterm><primary>PGcancel</></> object - given a <structname>PGconn</> connection object. It will return - <symbol>NULL</> if the given <parameter>conn</> is <symbol>NULL</> or an invalid - connection. The <structname>PGcancel</> object is an opaque + <structname>PGcancel</structname><indexterm><primary>PGcancel</primary></indexterm> object + given a <structname>PGconn</structname> connection object. It will return + <symbol>NULL</symbol> if the given <parameter>conn</parameter> is <symbol>NULL</symbol> or an invalid + connection. The <structname>PGcancel</structname> object is an opaque structure that is not meant to be accessed directly by the application; it can only be passed to <function>PQcancel</function> or <function>PQfreeCancel</function>. @@ -4905,9 +4905,9 @@ int PQcancel(PGcancel *cancel, char *errbuf, int errbufsize); <para> The return value is 1 if the cancel request was successfully - dispatched and 0 if not. If not, <parameter>errbuf</> is filled - with an explanatory error message. <parameter>errbuf</> - must be a char array of size <parameter>errbufsize</> (the + dispatched and 0 if not. If not, <parameter>errbuf</parameter> is filled + with an explanatory error message. <parameter>errbuf</parameter> + must be a char array of size <parameter>errbufsize</parameter> (the recommended size is 256 bytes). </para> @@ -4922,11 +4922,11 @@ int PQcancel(PGcancel *cancel, char *errbuf, int errbufsize); <para> <function>PQcancel</function> can safely be invoked from a signal - handler, if the <parameter>errbuf</> is a local variable in the - signal handler. The <structname>PGcancel</> object is read-only + handler, if the <parameter>errbuf</parameter> is a local variable in the + signal handler. The <structname>PGcancel</structname> object is read-only as far as <function>PQcancel</function> is concerned, so it can also be invoked from a thread that is separate from the one - manipulating the <structname>PGconn</> object. + manipulating the <structname>PGconn</structname> object. </para> </listitem> </varlistentry> @@ -4953,12 +4953,12 @@ int PQrequestCancel(PGconn *conn); <para> Requests that the server abandon processing of the current command. It operates directly on the - <structname>PGconn</> object, and in case of failure stores the - error message in the <structname>PGconn</> object (whence it can + <structname>PGconn</structname> object, and in case of failure stores the + error message in the <structname>PGconn</structname> object (whence it can be retrieved by <function>PQerrorMessage</function>). Although the functionality is the same, this approach creates hazards for multiple-thread programs and signal handlers, since it is possible - that overwriting the <structname>PGconn</>'s error message will + that overwriting the <structname>PGconn</structname>'s error message will mess up the operation currently in progress on the connection. </para> </listitem> @@ -4991,7 +4991,7 @@ int PQrequestCancel(PGconn *conn); </tip> <para> - The function <function>PQfn</function><indexterm><primary>PQfn</></> + The function <function>PQfn</function><indexterm><primary>PQfn</primary></indexterm> requests execution of a server function via the fast-path interface: <synopsis> PGresult *PQfn(PGconn *conn, @@ -5016,19 +5016,19 @@ typedef struct </para> <para> - The <parameter>fnid</> argument is the OID of the function to be - executed. <parameter>args</> and <parameter>nargs</> define the + The <parameter>fnid</parameter> argument is the OID of the function to be + executed. <parameter>args</parameter> and <parameter>nargs</parameter> define the parameters to be passed to the function; they must match the declared - function argument list. When the <parameter>isint</> field of a - parameter structure is true, the <parameter>u.integer</> value is sent + function argument list. When the <parameter>isint</parameter> field of a + parameter structure is true, the <parameter>u.integer</parameter> value is sent to the server as an integer of the indicated length (this must be - 2 or 4 bytes); proper byte-swapping occurs. When <parameter>isint</> - is false, the indicated number of bytes at <parameter>*u.ptr</> are + 2 or 4 bytes); proper byte-swapping occurs. When <parameter>isint</parameter> + is false, the indicated number of bytes at <parameter>*u.ptr</parameter> are sent with no processing; the data must be in the format expected by the server for binary transmission of the function's argument data - type. (The declaration of <parameter>u.ptr</> as being of - type <type>int *</> is historical; it would be better to consider - it <type>void *</>.) + type. (The declaration of <parameter>u.ptr</parameter> as being of + type <type>int *</type> is historical; it would be better to consider + it <type>void *</type>.) <parameter>result_buf</parameter> points to the buffer in which to place the function's return value. The caller must have allocated sufficient space to store the return value. (There is no check!) The actual result @@ -5036,14 +5036,14 @@ typedef struct <parameter>result_len</parameter>. If a 2- or 4-byte integer result is expected, set <parameter>result_is_int</parameter> to 1, otherwise set it to 0. Setting <parameter>result_is_int</parameter> to 1 causes - <application>libpq</> to byte-swap the value if necessary, so that it + <application>libpq</application> to byte-swap the value if necessary, so that it is delivered as a proper <type>int</type> value for the client machine; - note that a 4-byte integer is delivered into <parameter>*result_buf</> + note that a 4-byte integer is delivered into <parameter>*result_buf</parameter> for either allowed result size. - When <parameter>result_is_int</> is 0, the binary-format byte string + When <parameter>result_is_int</parameter> is 0, the binary-format byte string sent by the server is returned unmodified. (In this case it's better to consider <parameter>result_buf</parameter> as being of - type <type>void *</>.) + type <type>void *</type>.) </para> <para> @@ -5077,7 +5077,7 @@ typedef struct can stop listening with the <command>UNLISTEN</command> command). All sessions listening on a particular channel will be notified asynchronously when a <command>NOTIFY</command> command with that - channel name is executed by any session. A <quote>payload</> string can + channel name is executed by any session. A <quote>payload</quote> string can be passed to communicate additional data to the listeners. </para> @@ -5087,14 +5087,14 @@ typedef struct and <command>NOTIFY</command> commands as ordinary SQL commands. The arrival of <command>NOTIFY</command> messages can subsequently be detected by calling - <function>PQnotifies</function>.<indexterm><primary>PQnotifies</></> + <function>PQnotifies</function>.<indexterm><primary>PQnotifies</primary></indexterm> </para> <para> The function <function>PQnotifies</function> returns the next notification from a list of unhandled notification messages received from the server. It returns a null pointer if there are no pending notifications. Once a - notification is returned from <function>PQnotifies</>, it is considered + notification is returned from <function>PQnotifies</function>, it is considered handled and will be removed from the list of notifications. <synopsis> @@ -5128,14 +5128,14 @@ typedef struct pgNotify server; it just returns messages previously absorbed by another <application>libpq</application> function. In prior releases of <application>libpq</application>, the only way to ensure timely receipt - of <command>NOTIFY</> messages was to constantly submit commands, even + of <command>NOTIFY</command> messages was to constantly submit commands, even empty ones, and then check <function>PQnotifies</function> after each <function>PQexec</function>. While this still works, it is deprecated as a waste of processing power. </para> <para> - A better way to check for <command>NOTIFY</> messages when you have no + A better way to check for <command>NOTIFY</command> messages when you have no useful commands to execute is to call <function>PQconsumeInput</function>, then check <function>PQnotifies</function>. You can use @@ -5173,12 +5173,12 @@ typedef struct pgNotify The overall process is that the application first issues the SQL <command>COPY</command> command via <function>PQexec</function> or one of the equivalent functions. The response to this (if there is no - error in the command) will be a <structname>PGresult</> object bearing + error in the command) will be a <structname>PGresult</structname> object bearing a status code of <literal>PGRES_COPY_OUT</literal> or <literal>PGRES_COPY_IN</literal> (depending on the specified copy direction). The application should then use the functions of this section to receive or transmit data rows. When the data transfer is - complete, another <structname>PGresult</> object is returned to indicate + complete, another <structname>PGresult</structname> object is returned to indicate success or failure of the transfer. Its status will be <literal>PGRES_COMMAND_OK</literal> for success or <literal>PGRES_FATAL_ERROR</literal> if some problem was encountered. @@ -5192,8 +5192,8 @@ typedef struct pgNotify If a <command>COPY</command> command is issued via <function>PQexec</function> in a string that could contain additional commands, the application must continue fetching results via - <function>PQgetResult</> after completing the <command>COPY</command> - sequence. Only when <function>PQgetResult</> returns + <function>PQgetResult</function> after completing the <command>COPY</command> + sequence. Only when <function>PQgetResult</function> returns <symbol>NULL</symbol> is it certain that the <function>PQexec</function> command string is done and it is safe to issue more commands. </para> @@ -5206,7 +5206,7 @@ typedef struct pgNotify </para> <para> - A <structname>PGresult</> object bearing one of these status values + A <structname>PGresult</structname> object bearing one of these status values carries some additional data about the <command>COPY</command> operation that is starting. This additional data is available using functions that are also used in connection with query results: @@ -5262,7 +5262,7 @@ typedef struct pgNotify each column of the copy operation. The per-column format codes will always be zero when the overall copy format is textual, but the binary format can support both text and binary columns. - (However, as of the current implementation of <command>COPY</>, + (However, as of the current implementation of <command>COPY</command>, only binary columns appear in a binary copy; so the per-column formats always match the overall format at present.) </para> @@ -5283,8 +5283,8 @@ typedef struct pgNotify <para> These functions are used to send data during <literal>COPY FROM - STDIN</>. They will fail if called when the connection is not in - <literal>COPY_IN</> state. + STDIN</literal>. They will fail if called when the connection is not in + <literal>COPY_IN</literal> state. </para> <variablelist> @@ -5298,7 +5298,7 @@ typedef struct pgNotify <listitem> <para> - Sends data to the server during <literal>COPY_IN</> state. + Sends data to the server during <literal>COPY_IN</literal> state. <synopsis> int PQputCopyData(PGconn *conn, const char *buffer, @@ -5308,7 +5308,7 @@ int PQputCopyData(PGconn *conn, <para> Transmits the <command>COPY</command> data in the specified - <parameter>buffer</>, of length <parameter>nbytes</>, to the server. + <parameter>buffer</parameter>, of length <parameter>nbytes</parameter>, to the server. The result is 1 if the data was queued, zero if it was not queued because of full buffers (this will only happen in nonblocking mode), or -1 if an error occurred. @@ -5322,7 +5322,7 @@ int PQputCopyData(PGconn *conn, into buffer loads of any convenient size. Buffer-load boundaries have no semantic significance when sending. The contents of the data stream must match the data format expected by the - <command>COPY</> command; see <xref linkend="sql-copy"> for details. + <command>COPY</command> command; see <xref linkend="sql-copy"> for details. </para> </listitem> </varlistentry> @@ -5337,7 +5337,7 @@ int PQputCopyData(PGconn *conn, <listitem> <para> - Sends end-of-data indication to the server during <literal>COPY_IN</> state. + Sends end-of-data indication to the server during <literal>COPY_IN</literal> state. <synopsis> int PQputCopyEnd(PGconn *conn, const char *errormsg); @@ -5345,14 +5345,14 @@ int PQputCopyEnd(PGconn *conn, </para> <para> - Ends the <literal>COPY_IN</> operation successfully if - <parameter>errormsg</> is <symbol>NULL</symbol>. If - <parameter>errormsg</> is not <symbol>NULL</symbol> then the - <command>COPY</> is forced to fail, with the string pointed to by - <parameter>errormsg</> used as the error message. (One should not + Ends the <literal>COPY_IN</literal> operation successfully if + <parameter>errormsg</parameter> is <symbol>NULL</symbol>. If + <parameter>errormsg</parameter> is not <symbol>NULL</symbol> then the + <command>COPY</command> is forced to fail, with the string pointed to by + <parameter>errormsg</parameter> used as the error message. (One should not assume that this exact error message will come back from the server, however, as the server might have already failed the - <command>COPY</> for its own reasons. Also note that the option + <command>COPY</command> for its own reasons. Also note that the option to force failure does not work when using pre-3.0-protocol connections.) </para> @@ -5362,19 +5362,19 @@ int PQputCopyEnd(PGconn *conn, nonblocking mode, this may only indicate that the termination message was successfully queued. (In nonblocking mode, to be certain that the data has been sent, you should next wait for - write-ready and call <function>PQflush</>, repeating until it + write-ready and call <function>PQflush</function>, repeating until it returns zero.) Zero indicates that the function could not queue the termination message because of full buffers; this will only happen in nonblocking mode. (In this case, wait for - write-ready and try the <function>PQputCopyEnd</> call + write-ready and try the <function>PQputCopyEnd</function> call again.) If a hard error occurs, -1 is returned; you can use <function>PQerrorMessage</function> to retrieve details. </para> <para> - After successfully calling <function>PQputCopyEnd</>, call - <function>PQgetResult</> to obtain the final result status of the - <command>COPY</> command. One can wait for this result to be + After successfully calling <function>PQputCopyEnd</function>, call + <function>PQgetResult</function> to obtain the final result status of the + <command>COPY</command> command. One can wait for this result to be available in the usual way. Then return to normal operation. </para> </listitem> @@ -5388,8 +5388,8 @@ int PQputCopyEnd(PGconn *conn, <para> These functions are used to receive data during <literal>COPY TO - STDOUT</>. They will fail if called when the connection is not in - <literal>COPY_OUT</> state. + STDOUT</literal>. They will fail if called when the connection is not in + <literal>COPY_OUT</literal> state. </para> <variablelist> @@ -5403,7 +5403,7 @@ int PQputCopyEnd(PGconn *conn, <listitem> <para> - Receives data from the server during <literal>COPY_OUT</> state. + Receives data from the server during <literal>COPY_OUT</literal> state. <synopsis> int PQgetCopyData(PGconn *conn, char **buffer, @@ -5416,11 +5416,11 @@ int PQgetCopyData(PGconn *conn, <command>COPY</command>. Data is always returned one data row at a time; if only a partial row is available, it is not returned. Successful return of a data row involves allocating a chunk of - memory to hold the data. The <parameter>buffer</> parameter must - be non-<symbol>NULL</symbol>. <parameter>*buffer</> is set to + memory to hold the data. The <parameter>buffer</parameter> parameter must + be non-<symbol>NULL</symbol>. <parameter>*buffer</parameter> is set to point to the allocated memory, or to <symbol>NULL</symbol> in cases where no buffer is returned. A non-<symbol>NULL</symbol> result - buffer should be freed using <function>PQfreemem</> when no longer + buffer should be freed using <function>PQfreemem</function> when no longer needed. </para> @@ -5431,26 +5431,26 @@ int PQgetCopyData(PGconn *conn, probably only useful for textual <command>COPY</command>. A result of zero indicates that the <command>COPY</command> is still in progress, but no row is yet available (this is only possible when - <parameter>async</> is true). A result of -1 indicates that the + <parameter>async</parameter> is true). A result of -1 indicates that the <command>COPY</command> is done. A result of -2 indicates that an - error occurred (consult <function>PQerrorMessage</> for the reason). + error occurred (consult <function>PQerrorMessage</function> for the reason). </para> <para> - When <parameter>async</> is true (not zero), - <function>PQgetCopyData</> will not block waiting for input; it + When <parameter>async</parameter> is true (not zero), + <function>PQgetCopyData</function> will not block waiting for input; it will return zero if the <command>COPY</command> is still in progress but no complete row is available. (In this case wait for read-ready - and then call <function>PQconsumeInput</> before calling - <function>PQgetCopyData</> again.) When <parameter>async</> is - false (zero), <function>PQgetCopyData</> will block until data is + and then call <function>PQconsumeInput</function> before calling + <function>PQgetCopyData</function> again.) When <parameter>async</parameter> is + false (zero), <function>PQgetCopyData</function> will block until data is available or the operation completes. </para> <para> - After <function>PQgetCopyData</> returns -1, call - <function>PQgetResult</> to obtain the final result status of the - <command>COPY</> command. One can wait for this result to be + After <function>PQgetCopyData</function> returns -1, call + <function>PQgetResult</function> to obtain the final result status of the + <command>COPY</command> command. One can wait for this result to be available in the usual way. Then return to normal operation. </para> </listitem> @@ -5463,7 +5463,7 @@ int PQgetCopyData(PGconn *conn, <title>Obsolete Functions for <command>COPY</command></title> <para> - These functions represent older methods of handling <command>COPY</>. + These functions represent older methods of handling <command>COPY</command>. Although they still work, they are deprecated due to poor error handling, inconvenient methods of detecting end-of-data, and lack of support for binary or nonblocking transfers. @@ -5481,7 +5481,7 @@ int PQgetCopyData(PGconn *conn, <listitem> <para> Reads a newline-terminated line of characters (transmitted - by the server) into a buffer string of size <parameter>length</>. + by the server) into a buffer string of size <parameter>length</parameter>. <synopsis> int PQgetline(PGconn *conn, char *buffer, @@ -5490,7 +5490,7 @@ int PQgetline(PGconn *conn, </para> <para> - This function copies up to <parameter>length</>-1 characters into + This function copies up to <parameter>length</parameter>-1 characters into the buffer and converts the terminating newline into a zero byte. <function>PQgetline</function> returns <symbol>EOF</symbol> at the end of input, 0 if the entire line has been read, and 1 if the @@ -5501,7 +5501,7 @@ int PQgetline(PGconn *conn, of the two characters <literal>\.</literal>, which indicates that the server has finished sending the results of the <command>COPY</command> command. If the application might receive - lines that are more than <parameter>length</>-1 characters long, + lines that are more than <parameter>length</parameter>-1 characters long, care is needed to be sure it recognizes the <literal>\.</literal> line correctly (and does not, for example, mistake the end of a long data line for a terminator line). @@ -5545,7 +5545,7 @@ int PQgetlineAsync(PGconn *conn, <para> On each call, <function>PQgetlineAsync</function> will return data if a - complete data row is available in <application>libpq</>'s input buffer. + complete data row is available in <application>libpq</application>'s input buffer. Otherwise, no data is returned until the rest of the row arrives. The function returns -1 if the end-of-copy-data marker has been recognized, or 0 if no data is available, or a positive number giving the number of @@ -5559,7 +5559,7 @@ int PQgetlineAsync(PGconn *conn, the caller is too small to hold a row sent by the server, then a partial data row will be returned. With textual data this can be detected by testing whether the last returned byte is <literal>\n</literal> or not. (In a binary - <command>COPY</>, actual parsing of the <command>COPY</> data format will be needed to make the + <command>COPY</command>, actual parsing of the <command>COPY</command> data format will be needed to make the equivalent determination.) The returned string is not null-terminated. (If you want to add a terminating null, be sure to pass a <parameter>bufsize</parameter> one smaller @@ -5600,7 +5600,7 @@ int PQputline(PGconn *conn, Before <productname>PostgreSQL</productname> protocol 3.0, it was necessary for the application to explicitly send the two characters <literal>\.</literal> as a final line to indicate to the server that it had - finished sending <command>COPY</> data. While this still works, it is deprecated and the + finished sending <command>COPY</command> data. While this still works, it is deprecated and the special meaning of <literal>\.</literal> can be expected to be removed in a future release. It is sufficient to call <function>PQendcopy</function> after having sent the actual data. @@ -5696,7 +5696,7 @@ int PQendcopy(PGconn *conn); <title>Control Functions</title> <para> - These functions control miscellaneous details of <application>libpq</>'s + These functions control miscellaneous details of <application>libpq</application>'s behavior. </para> @@ -5747,7 +5747,7 @@ int PQsetClientEncoding(PGconn *<replaceable>conn</replaceable>, const char *<re and <replaceable>encoding</replaceable> is the encoding you want to use. If the function successfully sets the encoding, it returns 0, otherwise -1. The current encoding for this connection can be - determined by using <function>PQclientEncoding</>. + determined by using <function>PQclientEncoding</function>. </para> </listitem> </varlistentry> @@ -5763,7 +5763,7 @@ int PQsetClientEncoding(PGconn *<replaceable>conn</replaceable>, const char *<re <listitem> <para> Determines the verbosity of messages returned by - <function>PQerrorMessage</> and <function>PQresultErrorMessage</>. + <function>PQerrorMessage</function> and <function>PQresultErrorMessage</function>. <synopsis> typedef enum { @@ -5775,15 +5775,15 @@ typedef enum PGVerbosity PQsetErrorVerbosity(PGconn *conn, PGVerbosity verbosity); </synopsis> - <function>PQsetErrorVerbosity</> sets the verbosity mode, returning - the connection's previous setting. In <firstterm>TERSE</> mode, + <function>PQsetErrorVerbosity</function> sets the verbosity mode, returning + the connection's previous setting. In <firstterm>TERSE</firstterm> mode, returned messages include severity, primary text, and position only; this will normally fit on a single line. The default mode produces messages that include the above plus any detail, hint, or context - fields (these might span multiple lines). The <firstterm>VERBOSE</> + fields (these might span multiple lines). The <firstterm>VERBOSE</firstterm> mode includes all available fields. Changing the verbosity does not affect the messages available from already-existing - <structname>PGresult</> objects, only subsequently-created ones. + <structname>PGresult</structname> objects, only subsequently-created ones. (But see <function>PQresultVerboseErrorMessage</function> if you want to print a previous error with a different verbosity.) </para> @@ -5800,9 +5800,9 @@ PGVerbosity PQsetErrorVerbosity(PGconn *conn, PGVerbosity verbosity); <listitem> <para> - Determines the handling of <literal>CONTEXT</> fields in messages - returned by <function>PQerrorMessage</> - and <function>PQresultErrorMessage</>. + Determines the handling of <literal>CONTEXT</literal> fields in messages + returned by <function>PQerrorMessage</function> + and <function>PQresultErrorMessage</function>. <synopsis> typedef enum { @@ -5814,17 +5814,17 @@ typedef enum PGContextVisibility PQsetErrorContextVisibility(PGconn *conn, PGContextVisibility show_context); </synopsis> - <function>PQsetErrorContextVisibility</> sets the context display mode, + <function>PQsetErrorContextVisibility</function> sets the context display mode, returning the connection's previous setting. This mode controls whether the <literal>CONTEXT</literal> field is included in messages - (unless the verbosity setting is <firstterm>TERSE</>, in which - case <literal>CONTEXT</> is never shown). The <firstterm>NEVER</> mode - never includes <literal>CONTEXT</>, while <firstterm>ALWAYS</> always - includes it if available. In <firstterm>ERRORS</> mode (the - default), <literal>CONTEXT</> fields are included only for error + (unless the verbosity setting is <firstterm>TERSE</firstterm>, in which + case <literal>CONTEXT</literal> is never shown). The <firstterm>NEVER</firstterm> mode + never includes <literal>CONTEXT</literal>, while <firstterm>ALWAYS</firstterm> always + includes it if available. In <firstterm>ERRORS</firstterm> mode (the + default), <literal>CONTEXT</literal> fields are included only for error messages, not for notices and warnings. Changing this mode does not affect the messages available from - already-existing <structname>PGresult</> objects, only + already-existing <structname>PGresult</structname> objects, only subsequently-created ones. (But see <function>PQresultVerboseErrorMessage</function> if you want to print a previous error with a different display mode.) @@ -5850,9 +5850,9 @@ void PQtrace(PGconn *conn, FILE *stream); <note> <para> - On Windows, if the <application>libpq</> library and an application are + On Windows, if the <application>libpq</application> library and an application are compiled with different flags, this function call will crash the - application because the internal representation of the <literal>FILE</> + application because the internal representation of the <literal>FILE</literal> pointers differ. Specifically, multithreaded/single-threaded, release/debug, and static/dynamic flags should be the same for the library and all applications using that library. @@ -5901,25 +5901,25 @@ void PQuntrace(PGconn *conn); <listitem> <para> - Frees memory allocated by <application>libpq</>. + Frees memory allocated by <application>libpq</application>. <synopsis> void PQfreemem(void *ptr); </synopsis> </para> <para> - Frees memory allocated by <application>libpq</>, particularly + Frees memory allocated by <application>libpq</application>, particularly <function>PQescapeByteaConn</function>, <function>PQescapeBytea</function>, <function>PQunescapeBytea</function>, and <function>PQnotifies</function>. It is particularly important that this function, rather than - <function>free()</>, be used on Microsoft Windows. This is because + <function>free()</function>, be used on Microsoft Windows. This is because allocating memory in a DLL and releasing it in the application works only if multithreaded/single-threaded, release/debug, and static/dynamic flags are the same for the DLL and the application. On non-Microsoft Windows platforms, this function is the same as the standard library - function <function>free()</>. + function <function>free()</function>. </para> </listitem> </varlistentry> @@ -5935,7 +5935,7 @@ void PQfreemem(void *ptr); <listitem> <para> Frees the data structures allocated by - <function>PQconndefaults</> or <function>PQconninfoParse</>. + <function>PQconndefaults</function> or <function>PQconninfoParse</function>. <synopsis> void PQconninfoFree(PQconninfoOption *connOptions); </synopsis> @@ -5958,44 +5958,44 @@ void PQconninfoFree(PQconninfoOption *connOptions); <listitem> <para> - Prepares the encrypted form of a <productname>PostgreSQL</> password. + Prepares the encrypted form of a <productname>PostgreSQL</productname> password. <synopsis> char *PQencryptPasswordConn(PGconn *conn, const char *passwd, const char *user, const char *algorithm); </synopsis> This function is intended to be used by client applications that wish to send commands like <literal>ALTER USER joe PASSWORD - 'pwd'</>. It is good practice not to send the original cleartext + 'pwd'</literal>. It is good practice not to send the original cleartext password in such a command, because it might be exposed in command logs, activity displays, and so on. Instead, use this function to convert the password to encrypted form before it is sent. </para> <para> - The <parameter>passwd</> and <parameter>user</> arguments + The <parameter>passwd</parameter> and <parameter>user</parameter> arguments are the cleartext password, and the SQL name of the user it is for. - <parameter>algorithm</> specifies the encryption algorithm + <parameter>algorithm</parameter> specifies the encryption algorithm to use to encrypt the password. Currently supported algorithms are - <literal>md5</> and <literal>scram-sha-256</> (<literal>on</> and - <literal>off</> are also accepted as aliases for <literal>md5</>, for + <literal>md5</literal> and <literal>scram-sha-256</literal> (<literal>on</literal> and + <literal>off</literal> are also accepted as aliases for <literal>md5</literal>, for compatibility with older server versions). Note that support for - <literal>scram-sha-256</> was introduced in <productname>PostgreSQL</> + <literal>scram-sha-256</literal> was introduced in <productname>PostgreSQL</productname> version 10, and will not work correctly with older server versions. If - <parameter>algorithm</> is <symbol>NULL</>, this function will query + <parameter>algorithm</parameter> is <symbol>NULL</symbol>, this function will query the server for the current value of the <xref linkend="guc-password-encryption"> setting. That can block, and will fail if the current transaction is aborted, or if the connection is busy executing another query. If you wish to use the default algorithm for the server but want to avoid blocking, query - <varname>password_encryption</> yourself before calling - <function>PQencryptPasswordConn</>, and pass that value as the - <parameter>algorithm</>. + <varname>password_encryption</varname> yourself before calling + <function>PQencryptPasswordConn</function>, and pass that value as the + <parameter>algorithm</parameter>. </para> <para> - The return value is a string allocated by <function>malloc</>. + The return value is a string allocated by <function>malloc</function>. The caller can assume the string doesn't contain any special characters - that would require escaping. Use <function>PQfreemem</> to free the - result when done with it. On error, returns <symbol>NULL</>, and + that would require escaping. Use <function>PQfreemem</function> to free the + result when done with it. On error, returns <symbol>NULL</symbol>, and a suitable message is stored in the connection object. </para> @@ -6012,14 +6012,14 @@ char *PQencryptPasswordConn(PGconn *conn, const char *passwd, const char *user, <listitem> <para> - Prepares the md5-encrypted form of a <productname>PostgreSQL</> password. + Prepares the md5-encrypted form of a <productname>PostgreSQL</productname> password. <synopsis> char *PQencryptPassword(const char *passwd, const char *user); </synopsis> - <function>PQencryptPassword</> is an older, deprecated version of - <function>PQencryptPasswodConn</>. The difference is that - <function>PQencryptPassword</> does not - require a connection object, and <literal>md5</> is always used as the + <function>PQencryptPassword</function> is an older, deprecated version of + <function>PQencryptPasswodConn</function>. The difference is that + <function>PQencryptPassword</function> does not + require a connection object, and <literal>md5</literal> is always used as the encryption algorithm. </para> </listitem> @@ -6042,18 +6042,18 @@ PGresult *PQmakeEmptyPGresult(PGconn *conn, ExecStatusType status); </para> <para> - This is <application>libpq</>'s internal function to allocate and + This is <application>libpq</application>'s internal function to allocate and initialize an empty <structname>PGresult</structname> object. This - function returns <symbol>NULL</> if memory could not be allocated. It is + function returns <symbol>NULL</symbol> if memory could not be allocated. It is exported because some applications find it useful to generate result objects (particularly objects with error status) themselves. If - <parameter>conn</parameter> is not null and <parameter>status</> + <parameter>conn</parameter> is not null and <parameter>status</parameter> indicates an error, the current error message of the specified connection is copied into the <structname>PGresult</structname>. Also, if <parameter>conn</parameter> is not null, any event procedures registered in the connection are copied into the <structname>PGresult</structname>. (They do not get - <literal>PGEVT_RESULTCREATE</> calls, but see + <literal>PGEVT_RESULTCREATE</literal> calls, but see <function>PQfireResultCreateEvents</function>.) Note that <function>PQclear</function> should eventually be called on the object, just as with a <structname>PGresult</structname> @@ -6082,14 +6082,14 @@ int PQfireResultCreateEvents(PGconn *conn, PGresult *res); </para> <para> - The <literal>conn</> argument is passed through to event procedures - but not used directly. It can be <symbol>NULL</> if the event + The <literal>conn</literal> argument is passed through to event procedures + but not used directly. It can be <symbol>NULL</symbol> if the event procedures won't use it. </para> <para> Event procedures that have already received a - <literal>PGEVT_RESULTCREATE</> or <literal>PGEVT_RESULTCOPY</> event + <literal>PGEVT_RESULTCREATE</literal> or <literal>PGEVT_RESULTCOPY</literal> event for this object are not fired again. </para> @@ -6115,7 +6115,7 @@ int PQfireResultCreateEvents(PGconn *conn, PGresult *res); Makes a copy of a <structname>PGresult</structname> object. The copy is not linked to the source result in any way and <function>PQclear</function> must be called when the copy is no longer - needed. If the function fails, <symbol>NULL</> is returned. + needed. If the function fails, <symbol>NULL</symbol> is returned. <synopsis> PGresult *PQcopyResult(const PGresult *src, int flags); @@ -6159,7 +6159,7 @@ int PQsetResultAttrs(PGresult *res, int numAttributes, PGresAttDesc *attDescs); <para> The provided <parameter>attDescs</parameter> are copied into the result. - If the <parameter>attDescs</parameter> pointer is <symbol>NULL</> or + If the <parameter>attDescs</parameter> pointer is <symbol>NULL</symbol> or <parameter>numAttributes</parameter> is less than one, the request is ignored and the function succeeds. If <parameter>res</parameter> already contains attributes, the function will fail. If the function @@ -6193,7 +6193,7 @@ int PQsetvalue(PGresult *res, int tup_num, int field_num, char *value, int len); field of any existing tuple can be modified in any order. If a value at <parameter>field_num</parameter> already exists, it will be overwritten. If <parameter>len</parameter> is -1 or - <parameter>value</parameter> is <symbol>NULL</>, the field value + <parameter>value</parameter> is <symbol>NULL</symbol>, the field value will be set to an SQL null value. The <parameter>value</parameter> is copied into the result's private storage, thus is no longer needed after the function @@ -6222,9 +6222,9 @@ void *PQresultAlloc(PGresult *res, size_t nBytes); <para> Any memory allocated with this function will be freed when <parameter>res</parameter> is cleared. If the function fails, - the return value is <symbol>NULL</>. The result is + the return value is <symbol>NULL</symbol>. The result is guaranteed to be adequately aligned for any type of data, - just as for <function>malloc</>. + just as for <function>malloc</function>. </para> </listitem> </varlistentry> @@ -6240,7 +6240,7 @@ void *PQresultAlloc(PGresult *res, size_t nBytes); <listitem> <para> - Return the version of <productname>libpq</> that is being used. + Return the version of <productname>libpq</productname> that is being used. <synopsis> int PQlibVersion(void); </synopsis> @@ -6251,7 +6251,7 @@ int PQlibVersion(void); run time, whether specific functionality is available in the currently loaded version of libpq. The function can be used, for example, to determine which connection options are available in - <function>PQconnectdb</>. + <function>PQconnectdb</function>. </para> <para> @@ -6262,17 +6262,17 @@ int PQlibVersion(void); </para> <para> - Prior to major version 10, <productname>PostgreSQL</> used + Prior to major version 10, <productname>PostgreSQL</productname> used three-part version numbers in which the first two parts together represented the major version. For those - versions, <function>PQlibVersion</> uses two digits for each + versions, <function>PQlibVersion</function> uses two digits for each part; for example version 9.1.5 will be returned as 90105, and version 9.2.0 will be returned as 90200. </para> <para> Therefore, for purposes of determining feature compatibility, - applications should divide the result of <function>PQlibVersion</> + applications should divide the result of <function>PQlibVersion</function> by 100 not 10000 to determine a logical major version number. In all release series, only the last two digits differ between minor releases (bug-fix releases). @@ -6280,7 +6280,7 @@ int PQlibVersion(void); <note> <para> - This function appeared in <productname>PostgreSQL</> version 9.1, so + This function appeared in <productname>PostgreSQL</productname> version 9.1, so it cannot be used to detect required functionality in earlier versions, since calling it will create a link dependency on version 9.1 or later. @@ -6322,12 +6322,12 @@ int PQlibVersion(void); <para> The function <function>PQsetNoticeReceiver</function> - <indexterm><primary>notice receiver</></> - <indexterm><primary>PQsetNoticeReceiver</></> sets or + <indexterm><primary>notice receiver</primary></indexterm> + <indexterm><primary>PQsetNoticeReceiver</primary></indexterm> sets or examines the current notice receiver for a connection object. Similarly, <function>PQsetNoticeProcessor</function> - <indexterm><primary>notice processor</></> - <indexterm><primary>PQsetNoticeProcessor</></> sets or + <indexterm><primary>notice processor</primary></indexterm> + <indexterm><primary>PQsetNoticeProcessor</primary></indexterm> sets or examines the current notice processor. <synopsis> @@ -6358,9 +6358,9 @@ PQsetNoticeProcessor(PGconn *conn, receiver function is called. It is passed the message in the form of a <symbol>PGRES_NONFATAL_ERROR</symbol> <structname>PGresult</structname>. (This allows the receiver to extract - individual fields using <function>PQresultErrorField</>, or obtain a - complete preformatted message using <function>PQresultErrorMessage</> - or <function>PQresultVerboseErrorMessage</>.) The same + individual fields using <function>PQresultErrorField</function>, or obtain a + complete preformatted message using <function>PQresultErrorMessage</function> + or <function>PQresultVerboseErrorMessage</function>.) The same void pointer passed to <function>PQsetNoticeReceiver</function> is also passed. (This pointer can be used to access application-specific state if needed.) @@ -6368,7 +6368,7 @@ PQsetNoticeProcessor(PGconn *conn, <para> The default notice receiver simply extracts the message (using - <function>PQresultErrorMessage</>) and passes it to the notice + <function>PQresultErrorMessage</function>) and passes it to the notice processor. </para> @@ -6394,10 +6394,10 @@ defaultNoticeProcessor(void *arg, const char *message) <para> Once you have set a notice receiver or processor, you should expect that that function could be called as long as either the - <structname>PGconn</> object or <structname>PGresult</> objects made - from it exist. At creation of a <structname>PGresult</>, the - <structname>PGconn</>'s current notice handling pointers are copied - into the <structname>PGresult</> for possible use by functions like + <structname>PGconn</structname> object or <structname>PGresult</structname> objects made + from it exist. At creation of a <structname>PGresult</structname>, the + <structname>PGconn</structname>'s current notice handling pointers are copied + into the <structname>PGresult</structname> for possible use by functions like <function>PQgetvalue</function>. </para> @@ -6419,21 +6419,21 @@ defaultNoticeProcessor(void *arg, const char *message) <para> Each registered event handler is associated with two pieces of data, - known to <application>libpq</application> only as opaque <literal>void *</> - pointers. There is a <firstterm>passthrough</> pointer that is provided + known to <application>libpq</application> only as opaque <literal>void *</literal> + pointers. There is a <firstterm>passthrough</firstterm> pointer that is provided by the application when the event handler is registered with a - <structname>PGconn</>. The passthrough pointer never changes for the - life of the <structname>PGconn</> and all <structname>PGresult</>s + <structname>PGconn</structname>. The passthrough pointer never changes for the + life of the <structname>PGconn</structname> and all <structname>PGresult</structname>s generated from it; so if used, it must point to long-lived data. - In addition there is an <firstterm>instance data</> pointer, which starts - out <symbol>NULL</> in every <structname>PGconn</> and <structname>PGresult</>. + In addition there is an <firstterm>instance data</firstterm> pointer, which starts + out <symbol>NULL</symbol> in every <structname>PGconn</structname> and <structname>PGresult</structname>. This pointer can be manipulated using the <function>PQinstanceData</function>, <function>PQsetInstanceData</function>, <function>PQresultInstanceData</function> and <function>PQsetResultInstanceData</function> functions. Note that - unlike the passthrough pointer, instance data of a <structname>PGconn</> - is not automatically inherited by <structname>PGresult</>s created from + unlike the passthrough pointer, instance data of a <structname>PGconn</structname> + is not automatically inherited by <structname>PGresult</structname>s created from it. <application>libpq</application> does not know what passthrough and instance data pointers point to (if anything) and will never attempt to free them — that is the responsibility of the event handler. @@ -6443,7 +6443,7 @@ defaultNoticeProcessor(void *arg, const char *message) <title>Event Types</title> <para> - The enum <literal>PGEventId</> names the types of events handled by + The enum <literal>PGEventId</literal> names the types of events handled by the event system. All its values have names beginning with <literal>PGEVT</literal>. For each event type, there is a corresponding event info structure that carries the parameters passed to the event @@ -6507,8 +6507,8 @@ typedef struct <structname>PGconn</structname> was just reset, all event data remains unchanged. This event should be used to reset/reload/requery any associated <literal>instanceData</literal>. Note that even if the - event procedure fails to process <literal>PGEVT_CONNRESET</>, it will - still receive a <literal>PGEVT_CONNDESTROY</> event when the connection + event procedure fails to process <literal>PGEVT_CONNRESET</literal>, it will + still receive a <literal>PGEVT_CONNDESTROY</literal> event when the connection is closed. </para> </listitem> @@ -6568,7 +6568,7 @@ typedef struct <literal>instanceData</literal> that needs to be associated with the result. If the event procedure fails, the result will be cleared and the failure will be propagated. The event procedure must not try to - <function>PQclear</> the result object for itself. When returning a + <function>PQclear</function> the result object for itself. When returning a failure code, all cleanup must be performed as no <literal>PGEVT_RESULTDESTROY</literal> event will be sent. </para> @@ -6675,7 +6675,7 @@ int eventproc(PGEventId evtId, void *evtInfo, void *passThrough) <para> A particular event procedure can be registered only once in any - <structname>PGconn</>. This is because the address of the procedure + <structname>PGconn</structname>. This is because the address of the procedure is used as a lookup key to identify the associated instance data. </para> @@ -6684,9 +6684,9 @@ int eventproc(PGEventId evtId, void *evtInfo, void *passThrough) On Windows, functions can have two different addresses: one visible from outside a DLL and another visible from inside the DLL. One should be careful that only one of these addresses is used with - <application>libpq</>'s event-procedure functions, else confusion will + <application>libpq</application>'s event-procedure functions, else confusion will result. The simplest rule for writing code that will work is to - ensure that event procedures are declared <literal>static</>. If the + ensure that event procedures are declared <literal>static</literal>. If the procedure's address must be available outside its own source file, expose a separate function to return the address. </para> @@ -6720,7 +6720,7 @@ int PQregisterEventProc(PGconn *conn, PGEventProc proc, <para> An event procedure must be registered once on each - <structname>PGconn</> you want to receive events about. There is no + <structname>PGconn</structname> you want to receive events about. There is no limit, other than memory, on the number of event procedures that can be registered with a connection. The function returns a non-zero value if it succeeds and zero if it fails. @@ -6731,11 +6731,11 @@ int PQregisterEventProc(PGconn *conn, PGEventProc proc, event is fired. Its memory address is also used to lookup <literal>instanceData</literal>. The <parameter>name</parameter> argument is used to refer to the event procedure in error messages. - This value cannot be <symbol>NULL</> or a zero-length string. The name string is - copied into the <structname>PGconn</>, so what is passed need not be + This value cannot be <symbol>NULL</symbol> or a zero-length string. The name string is + copied into the <structname>PGconn</structname>, so what is passed need not be long-lived. The <parameter>passThrough</parameter> pointer is passed to the <parameter>proc</parameter> whenever an event occurs. This - argument can be <symbol>NULL</>. + argument can be <symbol>NULL</symbol>. </para> </listitem> </varlistentry> @@ -6749,11 +6749,11 @@ int PQregisterEventProc(PGconn *conn, PGEventProc proc, </term> <listitem> <para> - Sets the connection <parameter>conn</>'s <literal>instanceData</> - for procedure <parameter>proc</> to <parameter>data</>. This + Sets the connection <parameter>conn</parameter>'s <literal>instanceData</literal> + for procedure <parameter>proc</parameter> to <parameter>data</parameter>. This returns non-zero for success and zero for failure. (Failure is - only possible if <parameter>proc</> has not been properly - registered in <parameter>conn</>.) + only possible if <parameter>proc</parameter> has not been properly + registered in <parameter>conn</parameter>.) <synopsis> int PQsetInstanceData(PGconn *conn, PGEventProc proc, void *data); @@ -6772,8 +6772,8 @@ int PQsetInstanceData(PGconn *conn, PGEventProc proc, void *data); <listitem> <para> Returns the - connection <parameter>conn</>'s <literal>instanceData</literal> - associated with procedure <parameter>proc</>, + connection <parameter>conn</parameter>'s <literal>instanceData</literal> + associated with procedure <parameter>proc</parameter>, or <symbol>NULL</symbol> if there is none. <synopsis> @@ -6792,10 +6792,10 @@ void *PQinstanceData(const PGconn *conn, PGEventProc proc); </term> <listitem> <para> - Sets the result's <literal>instanceData</> - for <parameter>proc</> to <parameter>data</>. This returns + Sets the result's <literal>instanceData</literal> + for <parameter>proc</parameter> to <parameter>data</parameter>. This returns non-zero for success and zero for failure. (Failure is only - possible if <parameter>proc</> has not been properly registered + possible if <parameter>proc</parameter> has not been properly registered in the result.) <synopsis> @@ -6814,7 +6814,7 @@ int PQresultSetInstanceData(PGresult *res, PGEventProc proc, void *data); </term> <listitem> <para> - Returns the result's <literal>instanceData</> associated with <parameter>proc</>, or <symbol>NULL</> + Returns the result's <literal>instanceData</literal> associated with <parameter>proc</parameter>, or <symbol>NULL</symbol> if there is none. <synopsis> @@ -6992,8 +6992,8 @@ myEventProc(PGEventId evtId, void *evtInfo, void *passThrough) <para> The following environment variables can be used to select default connection parameter values, which will be used by - <function>PQconnectdb</>, <function>PQsetdbLogin</> and - <function>PQsetdb</> if no value is directly specified by the calling + <function>PQconnectdb</function>, <function>PQsetdbLogin</function> and + <function>PQsetdb</function> if no value is directly specified by the calling code. These are useful to avoid hard-coding database connection information into simple client applications, for example. @@ -7060,7 +7060,7 @@ myEventProc(PGEventId evtId, void *evtInfo, void *passThrough) Use of this environment variable is not recommended for security reasons, as some operating systems allow non-root users to see process environment variables via - <application>ps</>; instead consider using a password file + <application>ps</application>; instead consider using a password file (see <xref linkend="libpq-pgpass">). </para> </listitem> @@ -7092,7 +7092,7 @@ myEventProc(PGEventId evtId, void *evtInfo, void *passThrough) </indexterm> <envar>PGSERVICEFILE</envar> specifies the name of the per-user connection service file. If not set, it defaults - to <filename>~/.pg_service.conf</> + to <filename>~/.pg_service.conf</filename> (see <xref linkend="libpq-pgservice">). </para> </listitem> @@ -7309,7 +7309,7 @@ myEventProc(PGEventId evtId, void *evtInfo, void *passThrough) <primary><envar>PGSYSCONFDIR</envar></primary> </indexterm> <envar>PGSYSCONFDIR</envar> sets the directory containing the - <filename>pg_service.conf</> file and in a future version + <filename>pg_service.conf</filename> file and in a future version possibly other system-wide configuration files. </para> </listitem> @@ -7320,7 +7320,7 @@ myEventProc(PGEventId evtId, void *evtInfo, void *passThrough) <primary><envar>PGLOCALEDIR</envar></primary> </indexterm> <envar>PGLOCALEDIR</envar> sets the directory containing the - <literal>locale</> files for message localization. + <literal>locale</literal> files for message localization. </para> </listitem> </itemizedlist> @@ -7344,8 +7344,8 @@ myEventProc(PGEventId evtId, void *evtInfo, void *passThrough) contain passwords to be used if the connection requires a password (and no password has been specified otherwise). On Microsoft Windows the file is named - <filename>%APPDATA%\postgresql\pgpass.conf</> (where - <filename>%APPDATA%</> refers to the Application Data subdirectory in + <filename>%APPDATA%\postgresql\pgpass.conf</filename> (where + <filename>%APPDATA%</filename> refers to the Application Data subdirectory in the user's profile). Alternatively, a password file can be specified using the connection parameter <xref linkend="libpq-connect-passfile"> @@ -7358,19 +7358,19 @@ myEventProc(PGEventId evtId, void *evtInfo, void *passThrough) <replaceable>hostname</replaceable>:<replaceable>port</replaceable>:<replaceable>database</replaceable>:<replaceable>username</replaceable>:<replaceable>password</replaceable> </synopsis> (You can add a reminder comment to the file by copying the line above and - preceding it with <literal>#</>.) + preceding it with <literal>#</literal>.) Each of the first four fields can be a literal value, or <literal>*</literal>, which matches anything. The password field from the first line that matches the current connection parameters will be used. (Therefore, put more-specific entries first when you are using wildcards.) If an entry needs to contain <literal>:</literal> or <literal>\</literal>, escape this character with <literal>\</literal>. - A host name of <literal>localhost</> matches both TCP (host name - <literal>localhost</>) and Unix domain socket (<literal>pghost</> empty + A host name of <literal>localhost</literal> matches both TCP (host name + <literal>localhost</literal>) and Unix domain socket (<literal>pghost</literal> empty or the default socket directory) connections coming from the local - machine. In a standby server, a database name of <literal>replication</> + machine. In a standby server, a database name of <literal>replication</literal> matches streaming replication connections made to the master server. - The <literal>database</> field is of limited usefulness because + The <literal>database</literal> field is of limited usefulness because users have the same password for all databases in the same cluster. </para> @@ -7526,17 +7526,17 @@ ldap://ldap.acme.com/cn=dbserver,cn=hosts?pgconnectinfo?base?(objectclass=*) </indexterm> <para> - <productname>PostgreSQL</> has native support for using <acronym>SSL</> + <productname>PostgreSQL</productname> has native support for using <acronym>SSL</acronym> connections to encrypt client/server communications for increased security. See <xref linkend="ssl-tcp"> for details about the server-side - <acronym>SSL</> functionality. + <acronym>SSL</acronym> functionality. </para> <para> <application>libpq</application> reads the system-wide <productname>OpenSSL</productname> configuration file. By default, this file is named <filename>openssl.cnf</filename> and is located in the - directory reported by <literal>openssl version -d</>. This default + directory reported by <literal>openssl version -d</literal>. This default can be overridden by setting environment variable <envar>OPENSSL_CONF</envar> to the name of the desired configuration file. @@ -7546,43 +7546,43 @@ ldap://ldap.acme.com/cn=dbserver,cn=hosts?pgconnectinfo?base?(objectclass=*) <title>Client Verification of Server Certificates</title> <para> - By default, <productname>PostgreSQL</> will not perform any verification of + By default, <productname>PostgreSQL</productname> will not perform any verification of the server certificate. This means that it is possible to spoof the server identity (for example by modifying a DNS record or by taking over the server IP address) without the client knowing. In order to prevent spoofing, - <acronym>SSL</> certificate verification must be used. + <acronym>SSL</acronym> certificate verification must be used. </para> <para> - If the parameter <literal>sslmode</> is set to <literal>verify-ca</>, + If the parameter <literal>sslmode</literal> is set to <literal>verify-ca</literal>, libpq will verify that the server is trustworthy by checking the certificate chain up to a trusted certificate authority - (<acronym>CA</>). If <literal>sslmode</> is set to <literal>verify-full</>, - libpq will <emphasis>also</> verify that the server host name matches its + (<acronym>CA</acronym>). If <literal>sslmode</literal> is set to <literal>verify-full</literal>, + libpq will <emphasis>also</emphasis> verify that the server host name matches its certificate. The SSL connection will fail if the server certificate cannot - be verified. <literal>verify-full</> is recommended in most + be verified. <literal>verify-full</literal> is recommended in most security-sensitive environments. </para> <para> - In <literal>verify-full</> mode, the host name is matched against the + In <literal>verify-full</literal> mode, the host name is matched against the certificate's Subject Alternative Name attribute(s), or against the Common Name attribute if no Subject Alternative Name of type <literal>dNSName</literal> is present. If the certificate's name attribute starts with an asterisk - (<literal>*</>), the asterisk will be treated as - a wildcard, which will match all characters <emphasis>except</> a dot - (<literal>.</>). This means the certificate will not match subdomains. + (<literal>*</literal>), the asterisk will be treated as + a wildcard, which will match all characters <emphasis>except</emphasis> a dot + (<literal>.</literal>). This means the certificate will not match subdomains. If the connection is made using an IP address instead of a host name, the IP address will be matched (without doing any DNS lookups). </para> <para> To allow server certificate verification, the certificate(s) of one or more - trusted <acronym>CA</>s must be - placed in the file <filename>~/.postgresql/root.crt</> in the user's home - directory. If intermediate <acronym>CA</>s appear in + trusted <acronym>CA</acronym>s must be + placed in the file <filename>~/.postgresql/root.crt</filename> in the user's home + directory. If intermediate <acronym>CA</acronym>s appear in <filename>root.crt</filename>, the file must also contain certificate - chains to their root <acronym>CA</>s. (On Microsoft Windows the file is named + chains to their root <acronym>CA</acronym>s. (On Microsoft Windows the file is named <filename>%APPDATA%\postgresql\root.crt</filename>.) </para> @@ -7596,8 +7596,8 @@ ldap://ldap.acme.com/cn=dbserver,cn=hosts?pgconnectinfo?base?(objectclass=*) <para> The location of the root certificate file and the CRL can be changed by setting - the connection parameters <literal>sslrootcert</> and <literal>sslcrl</> - or the environment variables <envar>PGSSLROOTCERT</> and <envar>PGSSLCRL</>. + the connection parameters <literal>sslrootcert</literal> and <literal>sslcrl</literal> + or the environment variables <envar>PGSSLROOTCERT</envar> and <envar>PGSSLCRL</envar>. </para> <note> @@ -7619,10 +7619,10 @@ ldap://ldap.acme.com/cn=dbserver,cn=hosts?pgconnectinfo?base?(objectclass=*) <para> If the server requests a trusted client certificate, <application>libpq</application> will send the certificate stored in - file <filename>~/.postgresql/postgresql.crt</> in the user's home + file <filename>~/.postgresql/postgresql.crt</filename> in the user's home directory. The certificate must be signed by one of the certificate authorities (<acronym>CA</acronym>) trusted by the server. A matching - private key file <filename>~/.postgresql/postgresql.key</> must also + private key file <filename>~/.postgresql/postgresql.key</filename> must also be present. The private key file must not allow any access to world or group; achieve this by the command <command>chmod 0600 ~/.postgresql/postgresql.key</command>. @@ -7631,23 +7631,23 @@ ldap://ldap.acme.com/cn=dbserver,cn=hosts?pgconnectinfo?base?(objectclass=*) <filename>%APPDATA%\postgresql\postgresql.key</filename>, and there is no special permissions check since the directory is presumed secure. The location of the certificate and key files can be overridden by the - connection parameters <literal>sslcert</> and <literal>sslkey</> or the - environment variables <envar>PGSSLCERT</> and <envar>PGSSLKEY</>. + connection parameters <literal>sslcert</literal> and <literal>sslkey</literal> or the + environment variables <envar>PGSSLCERT</envar> and <envar>PGSSLKEY</envar>. </para> <para> In some cases, the client certificate might be signed by an - <quote>intermediate</> certificate authority, rather than one that is + <quote>intermediate</quote> certificate authority, rather than one that is directly trusted by the server. To use such a certificate, append the - certificate of the signing authority to the <filename>postgresql.crt</> + certificate of the signing authority to the <filename>postgresql.crt</filename> file, then its parent authority's certificate, and so on up to a certificate - authority, <quote>root</> or <quote>intermediate</>, that is trusted by + authority, <quote>root</quote> or <quote>intermediate</quote>, that is trusted by the server, i.e. signed by a certificate in the server's root CA file (<xref linkend="guc-ssl-ca-file">). </para> <para> - Note that the client's <filename>~/.postgresql/root.crt</> lists the top-level CAs + Note that the client's <filename>~/.postgresql/root.crt</filename> lists the top-level CAs that are considered trusted for signing server certificates. In principle it need not list the CA that signed the client's certificate, though in most cases that CA would also be trusted for server certificates. @@ -7659,7 +7659,7 @@ ldap://ldap.acme.com/cn=dbserver,cn=hosts?pgconnectinfo?base?(objectclass=*) <title>Protection Provided in Different Modes</title> <para> - The different values for the <literal>sslmode</> parameter provide different + The different values for the <literal>sslmode</literal> parameter provide different levels of protection. SSL can provide protection against three types of attacks: @@ -7669,23 +7669,23 @@ ldap://ldap.acme.com/cn=dbserver,cn=hosts?pgconnectinfo?base?(objectclass=*) <listitem> <para>If a third party can examine the network traffic between the client and the server, it can read both connection information (including - the user name and password) and the data that is passed. <acronym>SSL</> + the user name and password) and the data that is passed. <acronym>SSL</acronym> uses encryption to prevent this. </para> </listitem> </varlistentry> <varlistentry> - <term>Man in the middle (<acronym>MITM</>)</term> + <term>Man in the middle (<acronym>MITM</acronym>)</term> <listitem> <para>If a third party can modify the data while passing between the client and server, it can pretend to be the server and therefore see and - modify data <emphasis>even if it is encrypted</>. The third party can then + modify data <emphasis>even if it is encrypted</emphasis>. The third party can then forward the connection information and data to the original server, making it impossible to detect this attack. Common vectors to do this include DNS poisoning and address hijacking, whereby the client is directed to a different server than intended. There are also several other - attack methods that can accomplish this. <acronym>SSL</> uses certificate + attack methods that can accomplish this. <acronym>SSL</acronym> uses certificate verification to prevent this, by authenticating the server to the client. </para> </listitem> @@ -7696,7 +7696,7 @@ ldap://ldap.acme.com/cn=dbserver,cn=hosts?pgconnectinfo?base?(objectclass=*) <listitem> <para>If a third party can pretend to be an authorized client, it can simply access data it should not have access to. Typically this can - happen through insecure password management. <acronym>SSL</> uses + happen through insecure password management. <acronym>SSL</acronym> uses client certificates to prevent this, by making sure that only holders of valid certificates can access the server. </para> @@ -7707,15 +7707,15 @@ ldap://ldap.acme.com/cn=dbserver,cn=hosts?pgconnectinfo?base?(objectclass=*) <para> For a connection to be known secure, SSL usage must be configured - on <emphasis>both the client and the server</> before the connection + on <emphasis>both the client and the server</emphasis> before the connection is made. If it is only configured on the server, the client may end up sending sensitive information (e.g. passwords) before it knows that the server requires high security. In libpq, secure connections can be ensured - by setting the <literal>sslmode</> parameter to <literal>verify-full</> or - <literal>verify-ca</>, and providing the system with a root certificate to - verify against. This is analogous to using an <literal>https</> - <acronym>URL</> for encrypted web browsing. + by setting the <literal>sslmode</literal> parameter to <literal>verify-full</literal> or + <literal>verify-ca</literal>, and providing the system with a root certificate to + verify against. This is analogous to using an <literal>https</literal> + <acronym>URL</acronym> for encrypted web browsing. </para> <para> @@ -7726,10 +7726,10 @@ ldap://ldap.acme.com/cn=dbserver,cn=hosts?pgconnectinfo?base?(objectclass=*) </para> <para> - All <acronym>SSL</> options carry overhead in the form of encryption and + All <acronym>SSL</acronym> options carry overhead in the form of encryption and key-exchange, so there is a trade-off that has to be made between performance and security. <xref linkend="libpq-ssl-sslmode-statements"> - illustrates the risks the different <literal>sslmode</> values + illustrates the risks the different <literal>sslmode</literal> values protect against, and what statement they make about security and overhead. </para> @@ -7738,16 +7738,16 @@ ldap://ldap.acme.com/cn=dbserver,cn=hosts?pgconnectinfo?base?(objectclass=*) <tgroup cols="4"> <thead> <row> - <entry><literal>sslmode</></entry> + <entry><literal>sslmode</literal></entry> <entry>Eavesdropping protection</entry> - <entry><acronym>MITM</> protection</entry> + <entry><acronym>MITM</acronym> protection</entry> <entry>Statement</entry> </row> </thead> <tbody> <row> - <entry><literal>disable</></entry> + <entry><literal>disable</literal></entry> <entry>No</entry> <entry>No</entry> <entry>I don't care about security, and I don't want to pay the overhead @@ -7756,7 +7756,7 @@ ldap://ldap.acme.com/cn=dbserver,cn=hosts?pgconnectinfo?base?(objectclass=*) </row> <row> - <entry><literal>allow</></entry> + <entry><literal>allow</literal></entry> <entry>Maybe</entry> <entry>No</entry> <entry>I don't care about security, but I will pay the overhead of @@ -7765,7 +7765,7 @@ ldap://ldap.acme.com/cn=dbserver,cn=hosts?pgconnectinfo?base?(objectclass=*) </row> <row> - <entry><literal>prefer</></entry> + <entry><literal>prefer</literal></entry> <entry>Maybe</entry> <entry>No</entry> <entry>I don't care about encryption, but I wish to pay the overhead of @@ -7774,7 +7774,7 @@ ldap://ldap.acme.com/cn=dbserver,cn=hosts?pgconnectinfo?base?(objectclass=*) </row> <row> - <entry><literal>require</></entry> + <entry><literal>require</literal></entry> <entry>Yes</entry> <entry>No</entry> <entry>I want my data to be encrypted, and I accept the overhead. I trust @@ -7783,16 +7783,16 @@ ldap://ldap.acme.com/cn=dbserver,cn=hosts?pgconnectinfo?base?(objectclass=*) </row> <row> - <entry><literal>verify-ca</></entry> + <entry><literal>verify-ca</literal></entry> <entry>Yes</entry> - <entry><literal>Depends on CA</>-policy</entry> + <entry><literal>Depends on CA</literal>-policy</entry> <entry>I want my data encrypted, and I accept the overhead. I want to be sure that I connect to a server that I trust. </entry> </row> <row> - <entry><literal>verify-full</></entry> + <entry><literal>verify-full</literal></entry> <entry>Yes</entry> <entry>Yes</entry> <entry>I want my data encrypted, and I accept the overhead. I want to be @@ -7806,17 +7806,17 @@ ldap://ldap.acme.com/cn=dbserver,cn=hosts?pgconnectinfo?base?(objectclass=*) </table> <para> - The difference between <literal>verify-ca</> and <literal>verify-full</> - depends on the policy of the root <acronym>CA</>. If a public - <acronym>CA</> is used, <literal>verify-ca</> allows connections to a server - that <emphasis>somebody else</> may have registered with the <acronym>CA</>. - In this case, <literal>verify-full</> should always be used. If - a local <acronym>CA</> is used, or even a self-signed certificate, using - <literal>verify-ca</> often provides enough protection. + The difference between <literal>verify-ca</literal> and <literal>verify-full</literal> + depends on the policy of the root <acronym>CA</acronym>. If a public + <acronym>CA</acronym> is used, <literal>verify-ca</literal> allows connections to a server + that <emphasis>somebody else</emphasis> may have registered with the <acronym>CA</acronym>. + In this case, <literal>verify-full</literal> should always be used. If + a local <acronym>CA</acronym> is used, or even a self-signed certificate, using + <literal>verify-ca</literal> often provides enough protection. </para> <para> - The default value for <literal>sslmode</> is <literal>prefer</>. As is shown + The default value for <literal>sslmode</literal> is <literal>prefer</literal>. As is shown in the table, this makes no sense from a security point of view, and it only promises performance overhead if possible. It is only provided as the default for backward compatibility, and is not recommended in secure deployments. @@ -7846,27 +7846,27 @@ ldap://ldap.acme.com/cn=dbserver,cn=hosts?pgconnectinfo?base?(objectclass=*) <tbody> <row> - <entry><filename>~/.postgresql/postgresql.crt</></entry> + <entry><filename>~/.postgresql/postgresql.crt</filename></entry> <entry>client certificate</entry> <entry>requested by server</entry> </row> <row> - <entry><filename>~/.postgresql/postgresql.key</></entry> + <entry><filename>~/.postgresql/postgresql.key</filename></entry> <entry>client private key</entry> <entry>proves client certificate sent by owner; does not indicate certificate owner is trustworthy</entry> </row> <row> - <entry><filename>~/.postgresql/root.crt</></entry> + <entry><filename>~/.postgresql/root.crt</filename></entry> <entry>trusted certificate authorities</entry> <entry>checks that server certificate is signed by a trusted certificate authority</entry> </row> <row> - <entry><filename>~/.postgresql/root.crl</></entry> + <entry><filename>~/.postgresql/root.crl</filename></entry> <entry>certificates revoked by certificate authorities</entry> <entry>server certificate must not be on this list</entry> </row> @@ -7880,11 +7880,11 @@ ldap://ldap.acme.com/cn=dbserver,cn=hosts?pgconnectinfo?base?(objectclass=*) <title>SSL Library Initialization</title> <para> - If your application initializes <literal>libssl</> and/or - <literal>libcrypto</> libraries and <application>libpq</application> - is built with <acronym>SSL</> support, you should call - <function>PQinitOpenSSL</> to tell <application>libpq</application> - that the <literal>libssl</> and/or <literal>libcrypto</> libraries + If your application initializes <literal>libssl</literal> and/or + <literal>libcrypto</literal> libraries and <application>libpq</application> + is built with <acronym>SSL</acronym> support, you should call + <function>PQinitOpenSSL</function> to tell <application>libpq</application> + that the <literal>libssl</literal> and/or <literal>libcrypto</literal> libraries have been initialized by your application, so that <application>libpq</application> will not also initialize those libraries. <!-- If this URL changes replace it with a URL to www.archive.org. --> @@ -7912,18 +7912,18 @@ void PQinitOpenSSL(int do_ssl, int do_crypto); </para> <para> - When <parameter>do_ssl</> is non-zero, <application>libpq</application> - will initialize the <application>OpenSSL</> library before first - opening a database connection. When <parameter>do_crypto</> is - non-zero, the <literal>libcrypto</> library will be initialized. By - default (if <function>PQinitOpenSSL</> is not called), both libraries + When <parameter>do_ssl</parameter> is non-zero, <application>libpq</application> + will initialize the <application>OpenSSL</application> library before first + opening a database connection. When <parameter>do_crypto</parameter> is + non-zero, the <literal>libcrypto</literal> library will be initialized. By + default (if <function>PQinitOpenSSL</function> is not called), both libraries are initialized. When SSL support is not compiled in, this function is present but does nothing. </para> <para> - If your application uses and initializes either <application>OpenSSL</> - or its underlying <literal>libcrypto</> library, you <emphasis>must</> + If your application uses and initializes either <application>OpenSSL</application> + or its underlying <literal>libcrypto</literal> library, you <emphasis>must</emphasis> call this function with zeroes for the appropriate parameter(s) before first opening a database connection. Also be sure that you have done that initialization before opening a database connection. @@ -7949,15 +7949,15 @@ void PQinitSSL(int do_ssl); <para> This function is equivalent to - <literal>PQinitOpenSSL(do_ssl, do_ssl)</>. + <literal>PQinitOpenSSL(do_ssl, do_ssl)</literal>. It is sufficient for applications that initialize both or neither - of <application>OpenSSL</> and <literal>libcrypto</>. + of <application>OpenSSL</application> and <literal>libcrypto</literal>. </para> <para> - <function>PQinitSSL</> has been present since - <productname>PostgreSQL</> 8.0, while <function>PQinitOpenSSL</> - was added in <productname>PostgreSQL</> 8.4, so <function>PQinitSSL</> + <function>PQinitSSL</function> has been present since + <productname>PostgreSQL</productname> 8.0, while <function>PQinitOpenSSL</function> + was added in <productname>PostgreSQL</productname> 8.4, so <function>PQinitSSL</function> might be preferable for applications that need to work with older versions of <application>libpq</application>. </para> @@ -7984,8 +7984,8 @@ void PQinitSSL(int do_ssl); options when you compile your application code. Refer to your system's documentation for information about how to build thread-enabled applications, or look in - <filename>src/Makefile.global</filename> for <literal>PTHREAD_CFLAGS</> - and <literal>PTHREAD_LIBS</>. This function allows the querying of + <filename>src/Makefile.global</filename> for <literal>PTHREAD_CFLAGS</literal> + and <literal>PTHREAD_LIBS</literal>. This function allows the querying of <application>libpq</application>'s thread-safe status: </para> @@ -8017,18 +8017,18 @@ int PQisthreadsafe(); <para> One thread restriction is that no two threads attempt to manipulate - the same <structname>PGconn</> object at the same time. In particular, + the same <structname>PGconn</structname> object at the same time. In particular, you cannot issue concurrent commands from different threads through the same connection object. (If you need to run concurrent commands, use multiple connections.) </para> <para> - <structname>PGresult</> objects are normally read-only after creation, + <structname>PGresult</structname> objects are normally read-only after creation, and so can be passed around freely between threads. However, if you use - any of the <structname>PGresult</>-modifying functions described in + any of the <structname>PGresult</structname>-modifying functions described in <xref linkend="libpq-misc"> or <xref linkend="libpq-events">, it's up - to you to avoid concurrent operations on the same <structname>PGresult</>, + to you to avoid concurrent operations on the same <structname>PGresult</structname>, too. </para> @@ -8045,14 +8045,14 @@ int PQisthreadsafe(); If you are using Kerberos inside your application (in addition to inside <application>libpq</application>), you will need to do locking around Kerberos calls because Kerberos functions are not thread-safe. See - function <function>PQregisterThreadLock</> in the + function <function>PQregisterThreadLock</function> in the <application>libpq</application> source code for a way to do cooperative locking between <application>libpq</application> and your application. </para> <para> If you experience problems with threaded applications, run the program - in <filename>src/tools/thread</> to see if your platform has + in <filename>src/tools/thread</filename> to see if your platform has thread-unsafe functions. This program is run by <filename>configure</filename>, but for binary distributions your library might not match the library used to build the binaries. @@ -8095,7 +8095,7 @@ foo.c:95: `PGRES_TUPLES_OK' undeclared (first use in this function) <listitem> <para> - Point your compiler to the directory where the <productname>PostgreSQL</> header + Point your compiler to the directory where the <productname>PostgreSQL</productname> header files were installed, by supplying the <literal>-I<replaceable>directory</replaceable></literal> option to your compiler. (In some cases the compiler will look into @@ -8116,8 +8116,8 @@ CPPFLAGS += -I/usr/local/pgsql/include If there is any chance that your program might be compiled by other users then you should not hardcode the directory location like that. Instead, you can run the utility - <command>pg_config</command><indexterm><primary>pg_config</><secondary - sortas="libpq">with libpq</></> to find out where the header + <command>pg_config</command><indexterm><primary>pg_config</primary><secondary + sortas="libpq">with libpq</secondary></indexterm> to find out where the header files are on the local system: <screen> <prompt>$</prompt> pg_config --includedir diff --git a/doc/src/sgml/lo.sgml b/doc/src/sgml/lo.sgml index 9c318f1c987..8d8ee827227 100644 --- a/doc/src/sgml/lo.sgml +++ b/doc/src/sgml/lo.sgml @@ -8,9 +8,9 @@ </indexterm> <para> - The <filename>lo</> module provides support for managing Large Objects - (also called LOs or BLOBs). This includes a data type <type>lo</> - and a trigger <function>lo_manage</>. + The <filename>lo</filename> module provides support for managing Large Objects + (also called LOs or BLOBs). This includes a data type <type>lo</type> + and a trigger <function>lo_manage</function>. </para> <sect2> @@ -24,7 +24,7 @@ </para> <para> - As <productname>PostgreSQL</> stands, this doesn't occur. Large objects + As <productname>PostgreSQL</productname> stands, this doesn't occur. Large objects are treated as objects in their own right; a table entry can reference a large object by OID, but there can be multiple table entries referencing the same large object OID, so the system doesn't delete the large object @@ -32,30 +32,30 @@ </para> <para> - Now this is fine for <productname>PostgreSQL</>-specific applications, but + Now this is fine for <productname>PostgreSQL</productname>-specific applications, but standard code using JDBC or ODBC won't delete the objects, resulting in orphan objects — objects that are not referenced by anything, and simply occupy disk space. </para> <para> - The <filename>lo</> module allows fixing this by attaching a trigger + The <filename>lo</filename> module allows fixing this by attaching a trigger to tables that contain LO reference columns. The trigger essentially just - does a <function>lo_unlink</> whenever you delete or modify a value + does a <function>lo_unlink</function> whenever you delete or modify a value referencing a large object. When you use this trigger, you are assuming that there is only one database reference to any large object that is referenced in a trigger-controlled column! </para> <para> - The module also provides a data type <type>lo</>, which is really just - a domain of the <type>oid</> type. This is useful for differentiating + The module also provides a data type <type>lo</type>, which is really just + a domain of the <type>oid</type> type. This is useful for differentiating database columns that hold large object references from those that are - OIDs of other things. You don't have to use the <type>lo</> type to + OIDs of other things. You don't have to use the <type>lo</type> type to use the trigger, but it may be convenient to use it to keep track of which columns in your database represent large objects that you are managing with the trigger. It is also rumored that the ODBC driver gets confused if you - don't use <type>lo</> for BLOB columns. + don't use <type>lo</type> for BLOB columns. </para> </sect2> @@ -75,11 +75,11 @@ CREATE TRIGGER t_raster BEFORE UPDATE OR DELETE ON image <para> For each column that will contain unique references to large objects, - create a <literal>BEFORE UPDATE OR DELETE</> trigger, and give the column + create a <literal>BEFORE UPDATE OR DELETE</literal> trigger, and give the column name as the sole trigger argument. You can also restrict the trigger to only execute on updates to the column by using <literal>BEFORE UPDATE OF</literal> <replaceable class="parameter">column_name</replaceable>. - If you need multiple <type>lo</> + If you need multiple <type>lo</type> columns in the same table, create a separate trigger for each one, remembering to give a different name to each trigger on the same table. </para> @@ -93,18 +93,18 @@ CREATE TRIGGER t_raster BEFORE UPDATE OR DELETE ON image <para> Dropping a table will still orphan any objects it contains, as the trigger is not executed. You can avoid this by preceding the <command>DROP - TABLE</> with <command>DELETE FROM <replaceable>table</></command>. + TABLE</command> with <command>DELETE FROM <replaceable>table</replaceable></command>. </para> <para> - <command>TRUNCATE</> has the same hazard. + <command>TRUNCATE</command> has the same hazard. </para> <para> If you already have, or suspect you have, orphaned large objects, see the <xref linkend="vacuumlo"> module to help - you clean them up. It's a good idea to run <application>vacuumlo</> - occasionally as a back-stop to the <function>lo_manage</> trigger. + you clean them up. It's a good idea to run <application>vacuumlo</application> + occasionally as a back-stop to the <function>lo_manage</function> trigger. </para> </listitem> diff --git a/doc/src/sgml/lobj.sgml b/doc/src/sgml/lobj.sgml index 7757e1e4413..2e930ac240f 100644 --- a/doc/src/sgml/lobj.sgml +++ b/doc/src/sgml/lobj.sgml @@ -3,11 +3,11 @@ <chapter id="largeObjects"> <title>Large Objects</title> - <indexterm zone="largeobjects"><primary>large object</></> - <indexterm><primary>BLOB</><see>large object</></> + <indexterm zone="largeobjects"><primary>large object</primary></indexterm> + <indexterm><primary>BLOB</primary><see>large object</see></indexterm> <para> - <productname>PostgreSQL</productname> has a <firstterm>large object</> + <productname>PostgreSQL</productname> has a <firstterm>large object</firstterm> facility, which provides stream-style access to user data that is stored in a special large-object structure. Streaming access is useful when working with data values that are too large to manipulate @@ -76,12 +76,12 @@ of 1000000 bytes worth of storage; only of chunks covering the range of data bytes actually written. A read operation will, however, read out zeroes for any unallocated locations preceding the last existing chunk. - This corresponds to the common behavior of <quote>sparsely allocated</> + This corresponds to the common behavior of <quote>sparsely allocated</quote> files in <acronym>Unix</acronym> file systems. </para> <para> - As of <productname>PostgreSQL</> 9.0, large objects have an owner + As of <productname>PostgreSQL</productname> 9.0, large objects have an owner and a set of access permissions, which can be managed using <xref linkend="sql-grant"> and <xref linkend="sql-revoke">. @@ -101,7 +101,7 @@ <para> This section describes the facilities that - <productname>PostgreSQL</productname>'s <application>libpq</> + <productname>PostgreSQL</productname>'s <application>libpq</application> client interface library provides for accessing large objects. The <productname>PostgreSQL</productname> large object interface is modeled after the <acronym>Unix</acronym> file-system interface, with @@ -121,7 +121,7 @@ If an error occurs while executing any one of these functions, the function will return an otherwise-impossible value, typically 0 or -1. A message describing the error is stored in the connection object and - can be retrieved with <function>PQerrorMessage</>. + can be retrieved with <function>PQerrorMessage</function>. </para> <para> @@ -134,7 +134,7 @@ <title>Creating a Large Object</title> <para> - <indexterm><primary>lo_creat</></> + <indexterm><primary>lo_creat</primary></indexterm> The function <synopsis> Oid lo_creat(PGconn *conn, int mode); @@ -147,7 +147,7 @@ Oid lo_creat(PGconn *conn, int mode); ignored as of <productname>PostgreSQL</productname> 8.1; however, for backward compatibility with earlier releases it is best to set it to <symbol>INV_READ</symbol>, <symbol>INV_WRITE</symbol>, - or <symbol>INV_READ</symbol> <literal>|</> <symbol>INV_WRITE</symbol>. + or <symbol>INV_READ</symbol> <literal>|</literal> <symbol>INV_WRITE</symbol>. (These symbolic constants are defined in the header file <filename>libpq/libpq-fs.h</filename>.) </para> @@ -160,7 +160,7 @@ inv_oid = lo_creat(conn, INV_READ|INV_WRITE); </para> <para> - <indexterm><primary>lo_create</></> + <indexterm><primary>lo_create</primary></indexterm> The function <synopsis> Oid lo_create(PGconn *conn, Oid lobjId); @@ -169,14 +169,14 @@ Oid lo_create(PGconn *conn, Oid lobjId); specified by <replaceable class="parameter">lobjId</replaceable>; if so, failure occurs if that OID is already in use for some large object. If <replaceable class="parameter">lobjId</replaceable> - is <symbol>InvalidOid</symbol> (zero) then <function>lo_create</> assigns an unused - OID (this is the same behavior as <function>lo_creat</>). + is <symbol>InvalidOid</symbol> (zero) then <function>lo_create</function> assigns an unused + OID (this is the same behavior as <function>lo_creat</function>). The return value is the OID that was assigned to the new large object, or <symbol>InvalidOid</symbol> (zero) on failure. </para> <para> - <function>lo_create</> is new as of <productname>PostgreSQL</productname> + <function>lo_create</function> is new as of <productname>PostgreSQL</productname> 8.1; if this function is run against an older server version, it will fail and return <symbol>InvalidOid</symbol>. </para> @@ -193,7 +193,7 @@ inv_oid = lo_create(conn, desired_oid); <title>Importing a Large Object</title> <para> - <indexterm><primary>lo_import</></> + <indexterm><primary>lo_import</primary></indexterm> To import an operating system file as a large object, call <synopsis> Oid lo_import(PGconn *conn, const char *filename); @@ -209,7 +209,7 @@ Oid lo_import(PGconn *conn, const char *filename); </para> <para> - <indexterm><primary>lo_import_with_oid</></> + <indexterm><primary>lo_import_with_oid</primary></indexterm> The function <synopsis> Oid lo_import_with_oid(PGconn *conn, const char *filename, Oid lobjId); @@ -218,14 +218,14 @@ Oid lo_import_with_oid(PGconn *conn, const char *filename, Oid lobjId); specified by <replaceable class="parameter">lobjId</replaceable>; if so, failure occurs if that OID is already in use for some large object. If <replaceable class="parameter">lobjId</replaceable> - is <symbol>InvalidOid</symbol> (zero) then <function>lo_import_with_oid</> assigns an unused - OID (this is the same behavior as <function>lo_import</>). + is <symbol>InvalidOid</symbol> (zero) then <function>lo_import_with_oid</function> assigns an unused + OID (this is the same behavior as <function>lo_import</function>). The return value is the OID that was assigned to the new large object, or <symbol>InvalidOid</symbol> (zero) on failure. </para> <para> - <function>lo_import_with_oid</> is new as of <productname>PostgreSQL</productname> + <function>lo_import_with_oid</function> is new as of <productname>PostgreSQL</productname> 8.4 and uses <function>lo_create</function> internally which is new in 8.1; if this function is run against 8.0 or before, it will fail and return <symbol>InvalidOid</symbol>. </para> @@ -235,7 +235,7 @@ Oid lo_import_with_oid(PGconn *conn, const char *filename, Oid lobjId); <title>Exporting a Large Object</title> <para> - <indexterm><primary>lo_export</></> + <indexterm><primary>lo_export</primary></indexterm> To export a large object into an operating system file, call <synopsis> @@ -253,14 +253,14 @@ int lo_export(PGconn *conn, Oid lobjId, const char *filename); <title>Opening an Existing Large Object</title> <para> - <indexterm><primary>lo_open</></> + <indexterm><primary>lo_open</primary></indexterm> To open an existing large object for reading or writing, call <synopsis> int lo_open(PGconn *conn, Oid lobjId, int mode); </synopsis> The <parameter>lobjId</parameter> argument specifies the OID of the large object to open. The <parameter>mode</parameter> bits control whether the - object is opened for reading (<symbol>INV_READ</>), writing + object is opened for reading (<symbol>INV_READ</symbol>), writing (<symbol>INV_WRITE</symbol>), or both. (These symbolic constants are defined in the header file <filename>libpq/libpq-fs.h</filename>.) @@ -277,19 +277,19 @@ int lo_open(PGconn *conn, Oid lobjId, int mode); <para> The server currently does not distinguish between modes - <symbol>INV_WRITE</symbol> and <symbol>INV_READ</> <literal>|</> + <symbol>INV_WRITE</symbol> and <symbol>INV_READ</symbol> <literal>|</literal> <symbol>INV_WRITE</symbol>: you are allowed to read from the descriptor in either case. However there is a significant difference between - these modes and <symbol>INV_READ</> alone: with <symbol>INV_READ</> + these modes and <symbol>INV_READ</symbol> alone: with <symbol>INV_READ</symbol> you cannot write on the descriptor, and the data read from it will reflect the contents of the large object at the time of the transaction - snapshot that was active when <function>lo_open</> was executed, + snapshot that was active when <function>lo_open</function> was executed, regardless of later writes by this or other transactions. Reading from a descriptor opened with <symbol>INV_WRITE</symbol> returns data that reflects all writes of other committed transactions as well as writes of the current transaction. This is similar to the behavior - of <literal>REPEATABLE READ</> versus <literal>READ COMMITTED</> transaction - modes for ordinary SQL <command>SELECT</> commands. + of <literal>REPEATABLE READ</literal> versus <literal>READ COMMITTED</literal> transaction + modes for ordinary SQL <command>SELECT</command> commands. </para> <para> @@ -304,14 +304,14 @@ inv_fd = lo_open(conn, inv_oid, INV_READ|INV_WRITE); <title>Writing Data to a Large Object</title> <para> - <indexterm><primary>lo_write</></> + <indexterm><primary>lo_write</primary></indexterm> The function <synopsis> int lo_write(PGconn *conn, int fd, const char *buf, size_t len); </synopsis> writes <parameter>len</parameter> bytes from <parameter>buf</parameter> (which must be of size <parameter>len</parameter>) to large object - descriptor <parameter>fd</>. The <parameter>fd</parameter> argument must + descriptor <parameter>fd</parameter>. The <parameter>fd</parameter> argument must have been returned by a previous <function>lo_open</function>. The number of bytes actually written is returned (in the current implementation, this will always equal <parameter>len</parameter> unless @@ -320,8 +320,8 @@ int lo_write(PGconn *conn, int fd, const char *buf, size_t len); <para> Although the <parameter>len</parameter> parameter is declared as - <type>size_t</>, this function will reject length values larger than - <literal>INT_MAX</>. In practice, it's best to transfer data in chunks + <type>size_t</type>, this function will reject length values larger than + <literal>INT_MAX</literal>. In practice, it's best to transfer data in chunks of at most a few megabytes anyway. </para> </sect2> @@ -330,7 +330,7 @@ int lo_write(PGconn *conn, int fd, const char *buf, size_t len); <title>Reading Data from a Large Object</title> <para> - <indexterm><primary>lo_read</></> + <indexterm><primary>lo_read</primary></indexterm> The function <synopsis> int lo_read(PGconn *conn, int fd, char *buf, size_t len); @@ -347,8 +347,8 @@ int lo_read(PGconn *conn, int fd, char *buf, size_t len); <para> Although the <parameter>len</parameter> parameter is declared as - <type>size_t</>, this function will reject length values larger than - <literal>INT_MAX</>. In practice, it's best to transfer data in chunks + <type>size_t</type>, this function will reject length values larger than + <literal>INT_MAX</literal>. In practice, it's best to transfer data in chunks of at most a few megabytes anyway. </para> </sect2> @@ -357,7 +357,7 @@ int lo_read(PGconn *conn, int fd, char *buf, size_t len); <title>Seeking in a Large Object</title> <para> - <indexterm><primary>lo_lseek</></> + <indexterm><primary>lo_lseek</primary></indexterm> To change the current read or write location associated with a large object descriptor, call <synopsis> @@ -365,16 +365,16 @@ int lo_lseek(PGconn *conn, int fd, int offset, int whence); </synopsis> This function moves the current location pointer for the large object descriptor identified by - <parameter>fd</> to the new location specified by - <parameter>offset</>. The valid values for <parameter>whence</> - are <symbol>SEEK_SET</> (seek from object start), - <symbol>SEEK_CUR</> (seek from current position), and - <symbol>SEEK_END</> (seek from object end). The return value is + <parameter>fd</parameter> to the new location specified by + <parameter>offset</parameter>. The valid values for <parameter>whence</parameter> + are <symbol>SEEK_SET</symbol> (seek from object start), + <symbol>SEEK_CUR</symbol> (seek from current position), and + <symbol>SEEK_END</symbol> (seek from object end). The return value is the new location pointer, or -1 on error. </para> <para> - <indexterm><primary>lo_lseek64</></> + <indexterm><primary>lo_lseek64</primary></indexterm> When dealing with large objects that might exceed 2GB in size, instead use <synopsis> @@ -382,14 +382,14 @@ pg_int64 lo_lseek64(PGconn *conn, int fd, pg_int64 offset, int whence); </synopsis> This function has the same behavior as <function>lo_lseek</function>, but it can accept an - <parameter>offset</> larger than 2GB and/or deliver a result larger + <parameter>offset</parameter> larger than 2GB and/or deliver a result larger than 2GB. Note that <function>lo_lseek</function> will fail if the new location pointer would be greater than 2GB. </para> <para> - <function>lo_lseek64</> is new as of <productname>PostgreSQL</productname> + <function>lo_lseek64</function> is new as of <productname>PostgreSQL</productname> 9.3. If this function is run against an older server version, it will fail and return -1. </para> @@ -400,7 +400,7 @@ pg_int64 lo_lseek64(PGconn *conn, int fd, pg_int64 offset, int whence); <title>Obtaining the Seek Position of a Large Object</title> <para> - <indexterm><primary>lo_tell</></> + <indexterm><primary>lo_tell</primary></indexterm> To obtain the current read or write location of a large object descriptor, call <synopsis> @@ -410,7 +410,7 @@ int lo_tell(PGconn *conn, int fd); </para> <para> - <indexterm><primary>lo_tell64</></> + <indexterm><primary>lo_tell64</primary></indexterm> When dealing with large objects that might exceed 2GB in size, instead use <synopsis> @@ -424,7 +424,7 @@ pg_int64 lo_tell64(PGconn *conn, int fd); </para> <para> - <function>lo_tell64</> is new as of <productname>PostgreSQL</productname> + <function>lo_tell64</function> is new as of <productname>PostgreSQL</productname> 9.3. If this function is run against an older server version, it will fail and return -1. </para> @@ -434,15 +434,15 @@ pg_int64 lo_tell64(PGconn *conn, int fd); <title>Truncating a Large Object</title> <para> - <indexterm><primary>lo_truncate</></> + <indexterm><primary>lo_truncate</primary></indexterm> To truncate a large object to a given length, call <synopsis> int lo_truncate(PGcon *conn, int fd, size_t len); </synopsis> This function truncates the large object - descriptor <parameter>fd</> to length <parameter>len</>. The + descriptor <parameter>fd</parameter> to length <parameter>len</parameter>. The <parameter>fd</parameter> argument must have been returned by a - previous <function>lo_open</function>. If <parameter>len</> is + previous <function>lo_open</function>. If <parameter>len</parameter> is greater than the large object's current length, the large object is extended to the specified length with null bytes ('\0'). On success, <function>lo_truncate</function> returns @@ -456,12 +456,12 @@ int lo_truncate(PGcon *conn, int fd, size_t len); <para> Although the <parameter>len</parameter> parameter is declared as - <type>size_t</>, <function>lo_truncate</function> will reject length - values larger than <literal>INT_MAX</>. + <type>size_t</type>, <function>lo_truncate</function> will reject length + values larger than <literal>INT_MAX</literal>. </para> <para> - <indexterm><primary>lo_truncate64</></> + <indexterm><primary>lo_truncate64</primary></indexterm> When dealing with large objects that might exceed 2GB in size, instead use <synopsis> @@ -469,17 +469,17 @@ int lo_truncate64(PGcon *conn, int fd, pg_int64 len); </synopsis> This function has the same behavior as <function>lo_truncate</function>, but it can accept a - <parameter>len</> value exceeding 2GB. + <parameter>len</parameter> value exceeding 2GB. </para> <para> - <function>lo_truncate</> is new as of <productname>PostgreSQL</productname> + <function>lo_truncate</function> is new as of <productname>PostgreSQL</productname> 8.3; if this function is run against an older server version, it will fail and return -1. </para> <para> - <function>lo_truncate64</> is new as of <productname>PostgreSQL</productname> + <function>lo_truncate64</function> is new as of <productname>PostgreSQL</productname> 9.3; if this function is run against an older server version, it will fail and return -1. </para> @@ -489,12 +489,12 @@ int lo_truncate64(PGcon *conn, int fd, pg_int64 len); <title>Closing a Large Object Descriptor</title> <para> - <indexterm><primary>lo_close</></> + <indexterm><primary>lo_close</primary></indexterm> A large object descriptor can be closed by calling <synopsis> int lo_close(PGconn *conn, int fd); </synopsis> - where <parameter>fd</> is a + where <parameter>fd</parameter> is a large object descriptor returned by <function>lo_open</function>. On success, <function>lo_close</function> returns zero. On error, the return value is -1. @@ -510,7 +510,7 @@ int lo_close(PGconn *conn, int fd); <title>Removing a Large Object</title> <para> - <indexterm><primary>lo_unlink</></> + <indexterm><primary>lo_unlink</primary></indexterm> To remove a large object from the database, call <synopsis> int lo_unlink(PGconn *conn, Oid lobjId); @@ -554,7 +554,7 @@ int lo_unlink(PGconn *conn, Oid lobjId); <entry><type>oid</type></entry> <entry> Create a large object and store data there, returning its OID. - Pass <literal>0</> to have the system choose an OID. + Pass <literal>0</literal> to have the system choose an OID. </entry> <entry><literal>lo_from_bytea(0, E'\\xffffff00')</literal></entry> <entry><literal>24528</literal></entry> @@ -599,11 +599,11 @@ int lo_unlink(PGconn *conn, Oid lobjId); client-side functions described earlier; indeed, for the most part the client-side functions are simply interfaces to the equivalent server-side functions. The ones just as convenient to call via SQL commands are - <function>lo_creat</function><indexterm><primary>lo_creat</></>, + <function>lo_creat</function><indexterm><primary>lo_creat</primary></indexterm>, <function>lo_create</function>, - <function>lo_unlink</function><indexterm><primary>lo_unlink</></>, - <function>lo_import</function><indexterm><primary>lo_import</></>, and - <function>lo_export</function><indexterm><primary>lo_export</></>. + <function>lo_unlink</function><indexterm><primary>lo_unlink</primary></indexterm>, + <function>lo_import</function><indexterm><primary>lo_import</primary></indexterm>, and + <function>lo_export</function><indexterm><primary>lo_export</primary></indexterm>. Here are examples of their use: <programlisting> @@ -645,7 +645,7 @@ SELECT lo_export(image.raster, '/tmp/motd') FROM image <function>lo_write</function> is also available via server-side calls, but the names of the server-side functions differ from the client side interfaces in that they do not contain underscores. You must call - these functions as <function>loread</> and <function>lowrite</>. + these functions as <function>loread</function> and <function>lowrite</function>. </para> </sect1> @@ -656,7 +656,7 @@ SELECT lo_export(image.raster, '/tmp/motd') FROM image <para> <xref linkend="lo-example"> is a sample program which shows how the large object interface - in <application>libpq</> can be used. Parts of the program are + in <application>libpq</application> can be used. Parts of the program are commented out but are left in the source for the reader's benefit. This program can also be found in <filename>src/test/examples/testlo.c</filename> in the source distribution. diff --git a/doc/src/sgml/logicaldecoding.sgml b/doc/src/sgml/logicaldecoding.sgml index 35ac5abbe5e..c02f6e97652 100644 --- a/doc/src/sgml/logicaldecoding.sgml +++ b/doc/src/sgml/logicaldecoding.sgml @@ -156,13 +156,13 @@ postgres=# SELECT pg_drop_replication_slot('regression_slot'); <programlisting> $ pg_recvlogical -d postgres --slot test --create-slot $ pg_recvlogical -d postgres --slot test --start -f - -<keycombo action="simul"><keycap>Control</><keycap>Z</></> +<keycombo action="simul"><keycap>Control</keycap><keycap>Z</keycap></keycombo> $ psql -d postgres -c "INSERT INTO data(data) VALUES('4');" $ fg BEGIN 693 table public.data: INSERT: id[integer]:4 data[text]:'4' COMMIT 693 -<keycombo action="simul"><keycap>Control</><keycap>C</></> +<keycombo action="simul"><keycap>Control</keycap><keycap>C</keycap></keycombo> $ pg_recvlogical -d postgres --slot test --drop-slot </programlisting> </sect1> @@ -286,7 +286,7 @@ $ pg_recvlogical -d postgres --slot test --drop-slot <para> Creation of a snapshot is not always possible. In particular, it will fail when connected to a hot standby. Applications that do not require - snapshot export may suppress it with the <literal>NOEXPORT_SNAPSHOT</> + snapshot export may suppress it with the <literal>NOEXPORT_SNAPSHOT</literal> option. </para> </sect2> @@ -303,7 +303,7 @@ $ pg_recvlogical -d postgres --slot test --drop-slot </listitem> <listitem> - <para><literal>DROP_REPLICATION_SLOT <replaceable>slot_name</replaceable></literal> <optional> <literal>WAIT</> </></para> + <para><literal>DROP_REPLICATION_SLOT <replaceable>slot_name</replaceable></literal> <optional> <literal>WAIT</literal> </optional></para> </listitem> <listitem> @@ -426,12 +426,12 @@ CREATE TABLE another_catalog_table(data text) WITH (user_catalog_table = true); data in a data type that can contain arbitrary data (e.g., <type>bytea</type>) is cumbersome. If the output plugin only outputs textual data in the server's encoding, it can declare that by - setting <literal>OutputPluginOptions.output_type</> - to <literal>OUTPUT_PLUGIN_TEXTUAL_OUTPUT</> instead - of <literal>OUTPUT_PLUGIN_BINARY_OUTPUT</> in + setting <literal>OutputPluginOptions.output_type</literal> + to <literal>OUTPUT_PLUGIN_TEXTUAL_OUTPUT</literal> instead + of <literal>OUTPUT_PLUGIN_BINARY_OUTPUT</literal> in the <link linkend="logicaldecoding-output-plugin-startup">startup - callback</>. In that case, all the data has to be in the server's encoding - so that a <type>text</> datum can contain it. This is checked in assertion-enabled + callback</link>. In that case, all the data has to be in the server's encoding + so that a <type>text</type> datum can contain it. This is checked in assertion-enabled builds. </para> </sect2> diff --git a/doc/src/sgml/ltree.sgml b/doc/src/sgml/ltree.sgml index fccfd320f50..602d9403f70 100644 --- a/doc/src/sgml/ltree.sgml +++ b/doc/src/sgml/ltree.sgml @@ -8,7 +8,7 @@ </indexterm> <para> - This module implements a data type <type>ltree</> for representing + This module implements a data type <type>ltree</type> for representing labels of data stored in a hierarchical tree-like structure. Extensive facilities for searching through label trees are provided. </para> @@ -19,17 +19,17 @@ <para> A <firstterm>label</firstterm> is a sequence of alphanumeric characters and underscores (for example, in C locale the characters - <literal>A-Za-z0-9_</> are allowed). Labels must be less than 256 bytes + <literal>A-Za-z0-9_</literal> are allowed). Labels must be less than 256 bytes long. </para> <para> - Examples: <literal>42</>, <literal>Personal_Services</> + Examples: <literal>42</literal>, <literal>Personal_Services</literal> </para> <para> A <firstterm>label path</firstterm> is a sequence of zero or more - labels separated by dots, for example <literal>L1.L2.L3</>, representing + labels separated by dots, for example <literal>L1.L2.L3</literal>, representing a path from the root of a hierarchical tree to a particular node. The length of a label path must be less than 65kB, but keeping it under 2kB is preferable. In practice this is not a major limitation; for example, @@ -42,7 +42,7 @@ </para> <para> - The <filename>ltree</> module provides several data types: + The <filename>ltree</filename> module provides several data types: </para> <itemizedlist> @@ -55,13 +55,13 @@ <listitem> <para> <type>lquery</type> represents a regular-expression-like pattern - for matching <type>ltree</> values. A simple word matches that - label within a path. A star symbol (<literal>*</>) matches zero + for matching <type>ltree</type> values. A simple word matches that + label within a path. A star symbol (<literal>*</literal>) matches zero or more labels. For example: <synopsis> -foo <lineannotation>Match the exact label path <literal>foo</></lineannotation> -*.foo.* <lineannotation>Match any label path containing the label <literal>foo</></lineannotation> -*.foo <lineannotation>Match any label path whose last label is <literal>foo</></lineannotation> +foo <lineannotation>Match the exact label path <literal>foo</literal></lineannotation> +*.foo.* <lineannotation>Match any label path containing the label <literal>foo</literal></lineannotation> +*.foo <lineannotation>Match any label path whose last label is <literal>foo</literal></lineannotation> </synopsis> </para> @@ -69,34 +69,34 @@ foo <lineannotation>Match the exact label path <literal>foo</></lineanno Star symbols can also be quantified to restrict how many labels they can match: <synopsis> -*{<replaceable>n</>} <lineannotation>Match exactly <replaceable>n</> labels</lineannotation> -*{<replaceable>n</>,} <lineannotation>Match at least <replaceable>n</> labels</lineannotation> -*{<replaceable>n</>,<replaceable>m</>} <lineannotation>Match at least <replaceable>n</> but not more than <replaceable>m</> labels</lineannotation> -*{,<replaceable>m</>} <lineannotation>Match at most <replaceable>m</> labels — same as </lineannotation> *{0,<replaceable>m</>} +*{<replaceable>n</replaceable>} <lineannotation>Match exactly <replaceable>n</replaceable> labels</lineannotation> +*{<replaceable>n</replaceable>,} <lineannotation>Match at least <replaceable>n</replaceable> labels</lineannotation> +*{<replaceable>n</replaceable>,<replaceable>m</replaceable>} <lineannotation>Match at least <replaceable>n</replaceable> but not more than <replaceable>m</replaceable> labels</lineannotation> +*{,<replaceable>m</replaceable>} <lineannotation>Match at most <replaceable>m</replaceable> labels — same as </lineannotation> *{0,<replaceable>m</replaceable>} </synopsis> </para> <para> There are several modifiers that can be put at the end of a non-star - label in <type>lquery</> to make it match more than just the exact match: + label in <type>lquery</type> to make it match more than just the exact match: <synopsis> -@ <lineannotation>Match case-insensitively, for example <literal>a@</> matches <literal>A</></lineannotation> -* <lineannotation>Match any label with this prefix, for example <literal>foo*</> matches <literal>foobar</></lineannotation> +@ <lineannotation>Match case-insensitively, for example <literal>a@</literal> matches <literal>A</literal></lineannotation> +* <lineannotation>Match any label with this prefix, for example <literal>foo*</literal> matches <literal>foobar</literal></lineannotation> % <lineannotation>Match initial underscore-separated words</lineannotation> </synopsis> - The behavior of <literal>%</> is a bit complicated. It tries to match + The behavior of <literal>%</literal> is a bit complicated. It tries to match words rather than the entire label. For example - <literal>foo_bar%</> matches <literal>foo_bar_baz</> but not - <literal>foo_barbaz</>. If combined with <literal>*</>, prefix + <literal>foo_bar%</literal> matches <literal>foo_bar_baz</literal> but not + <literal>foo_barbaz</literal>. If combined with <literal>*</literal>, prefix matching applies to each word separately, for example - <literal>foo_bar%*</> matches <literal>foo1_bar2_baz</> but - not <literal>foo1_br2_baz</>. + <literal>foo_bar%*</literal> matches <literal>foo1_bar2_baz</literal> but + not <literal>foo1_br2_baz</literal>. </para> <para> Also, you can write several possibly-modified labels separated with - <literal>|</> (OR) to match any of those labels, and you can put - <literal>!</> (NOT) at the start to match any label that doesn't + <literal>|</literal> (OR) to match any of those labels, and you can put + <literal>!</literal> (NOT) at the start to match any label that doesn't match any of the alternatives. </para> @@ -141,14 +141,14 @@ a. b. c. d. e. <listitem> <para><type>ltxtquery</type> represents a full-text-search-like - pattern for matching <type>ltree</> values. An + pattern for matching <type>ltree</type> values. An <type>ltxtquery</type> value contains words, possibly with the - modifiers <literal>@</>, <literal>*</>, <literal>%</> at the end; - the modifiers have the same meanings as in <type>lquery</>. - Words can be combined with <literal>&</> (AND), - <literal>|</> (OR), <literal>!</> (NOT), and parentheses. + modifiers <literal>@</literal>, <literal>*</literal>, <literal>%</literal> at the end; + the modifiers have the same meanings as in <type>lquery</type>. + Words can be combined with <literal>&</literal> (AND), + <literal>|</literal> (OR), <literal>!</literal> (NOT), and parentheses. The key difference from - <type>lquery</> is that <type>ltxtquery</type> matches words without + <type>lquery</type> is that <type>ltxtquery</type> matches words without regard to their position in the label path. </para> @@ -161,7 +161,7 @@ Europe & Russia*@ & !Transportation any label beginning with <literal>Russia</literal> (case-insensitive), but not paths containing the label <literal>Transportation</literal>. The location of these words within the path is not important. - Also, when <literal>%</> is used, the word can be matched to any + Also, when <literal>%</literal> is used, the word can be matched to any underscore-separated word within a label, regardless of position. </para> </listitem> @@ -169,8 +169,8 @@ Europe & Russia*@ & !Transportation </itemizedlist> <para> - Note: <type>ltxtquery</> allows whitespace between symbols, but - <type>ltree</> and <type>lquery</> do not. + Note: <type>ltxtquery</type> allows whitespace between symbols, but + <type>ltree</type> and <type>lquery</type> do not. </para> </sect2> @@ -178,16 +178,16 @@ Europe & Russia*@ & !Transportation <title>Operators and Functions</title> <para> - Type <type>ltree</> has the usual comparison operators - <literal>=</>, <literal><></literal>, - <literal><</>, <literal>></>, <literal><=</>, <literal>>=</>. + Type <type>ltree</type> has the usual comparison operators + <literal>=</literal>, <literal><></literal>, + <literal><</literal>, <literal>></literal>, <literal><=</literal>, <literal>>=</literal>. Comparison sorts in the order of a tree traversal, with the children of a node sorted by label text. In addition, the specialized operators shown in <xref linkend="ltree-op-table"> are available. </para> <table id="ltree-op-table"> - <title><type>ltree</> Operators</title> + <title><type>ltree</type> Operators</title> <tgroup cols="3"> <thead> @@ -200,153 +200,153 @@ Europe & Russia*@ & !Transportation <tbody> <row> - <entry><type>ltree</> <literal>@></> <type>ltree</></entry> + <entry><type>ltree</type> <literal>@></literal> <type>ltree</type></entry> <entry><type>boolean</type></entry> <entry>is left argument an ancestor of right (or equal)?</entry> </row> <row> - <entry><type>ltree</> <literal><@</> <type>ltree</></entry> + <entry><type>ltree</type> <literal><@</literal> <type>ltree</type></entry> <entry><type>boolean</type></entry> <entry>is left argument a descendant of right (or equal)?</entry> </row> <row> - <entry><type>ltree</> <literal>~</> <type>lquery</></entry> + <entry><type>ltree</type> <literal>~</literal> <type>lquery</type></entry> <entry><type>boolean</type></entry> - <entry>does <type>ltree</> match <type>lquery</>?</entry> + <entry>does <type>ltree</type> match <type>lquery</type>?</entry> </row> <row> - <entry><type>lquery</> <literal>~</> <type>ltree</></entry> + <entry><type>lquery</type> <literal>~</literal> <type>ltree</type></entry> <entry><type>boolean</type></entry> - <entry>does <type>ltree</> match <type>lquery</>?</entry> + <entry>does <type>ltree</type> match <type>lquery</type>?</entry> </row> <row> - <entry><type>ltree</> <literal>?</> <type>lquery[]</></entry> + <entry><type>ltree</type> <literal>?</literal> <type>lquery[]</type></entry> <entry><type>boolean</type></entry> - <entry>does <type>ltree</> match any <type>lquery</> in array?</entry> + <entry>does <type>ltree</type> match any <type>lquery</type> in array?</entry> </row> <row> - <entry><type>lquery[]</> <literal>?</> <type>ltree</></entry> + <entry><type>lquery[]</type> <literal>?</literal> <type>ltree</type></entry> <entry><type>boolean</type></entry> - <entry>does <type>ltree</> match any <type>lquery</> in array?</entry> + <entry>does <type>ltree</type> match any <type>lquery</type> in array?</entry> </row> <row> - <entry><type>ltree</> <literal>@</> <type>ltxtquery</></entry> + <entry><type>ltree</type> <literal>@</literal> <type>ltxtquery</type></entry> <entry><type>boolean</type></entry> - <entry>does <type>ltree</> match <type>ltxtquery</>?</entry> + <entry>does <type>ltree</type> match <type>ltxtquery</type>?</entry> </row> <row> - <entry><type>ltxtquery</> <literal>@</> <type>ltree</></entry> + <entry><type>ltxtquery</type> <literal>@</literal> <type>ltree</type></entry> <entry><type>boolean</type></entry> - <entry>does <type>ltree</> match <type>ltxtquery</>?</entry> + <entry>does <type>ltree</type> match <type>ltxtquery</type>?</entry> </row> <row> - <entry><type>ltree</> <literal>||</> <type>ltree</></entry> + <entry><type>ltree</type> <literal>||</literal> <type>ltree</type></entry> <entry><type>ltree</type></entry> - <entry>concatenate <type>ltree</> paths</entry> + <entry>concatenate <type>ltree</type> paths</entry> </row> <row> - <entry><type>ltree</> <literal>||</> <type>text</></entry> + <entry><type>ltree</type> <literal>||</literal> <type>text</type></entry> <entry><type>ltree</type></entry> - <entry>convert text to <type>ltree</> and concatenate</entry> + <entry>convert text to <type>ltree</type> and concatenate</entry> </row> <row> - <entry><type>text</> <literal>||</> <type>ltree</></entry> + <entry><type>text</type> <literal>||</literal> <type>ltree</type></entry> <entry><type>ltree</type></entry> - <entry>convert text to <type>ltree</> and concatenate</entry> + <entry>convert text to <type>ltree</type> and concatenate</entry> </row> <row> - <entry><type>ltree[]</> <literal>@></> <type>ltree</></entry> + <entry><type>ltree[]</type> <literal>@></literal> <type>ltree</type></entry> <entry><type>boolean</type></entry> - <entry>does array contain an ancestor of <type>ltree</>?</entry> + <entry>does array contain an ancestor of <type>ltree</type>?</entry> </row> <row> - <entry><type>ltree</> <literal><@</> <type>ltree[]</></entry> + <entry><type>ltree</type> <literal><@</literal> <type>ltree[]</type></entry> <entry><type>boolean</type></entry> - <entry>does array contain an ancestor of <type>ltree</>?</entry> + <entry>does array contain an ancestor of <type>ltree</type>?</entry> </row> <row> - <entry><type>ltree[]</> <literal><@</> <type>ltree</></entry> + <entry><type>ltree[]</type> <literal><@</literal> <type>ltree</type></entry> <entry><type>boolean</type></entry> - <entry>does array contain a descendant of <type>ltree</>?</entry> + <entry>does array contain a descendant of <type>ltree</type>?</entry> </row> <row> - <entry><type>ltree</> <literal>@></> <type>ltree[]</></entry> + <entry><type>ltree</type> <literal>@></literal> <type>ltree[]</type></entry> <entry><type>boolean</type></entry> - <entry>does array contain a descendant of <type>ltree</>?</entry> + <entry>does array contain a descendant of <type>ltree</type>?</entry> </row> <row> - <entry><type>ltree[]</> <literal>~</> <type>lquery</></entry> + <entry><type>ltree[]</type> <literal>~</literal> <type>lquery</type></entry> <entry><type>boolean</type></entry> - <entry>does array contain any path matching <type>lquery</>?</entry> + <entry>does array contain any path matching <type>lquery</type>?</entry> </row> <row> - <entry><type>lquery</> <literal>~</> <type>ltree[]</></entry> + <entry><type>lquery</type> <literal>~</literal> <type>ltree[]</type></entry> <entry><type>boolean</type></entry> - <entry>does array contain any path matching <type>lquery</>?</entry> + <entry>does array contain any path matching <type>lquery</type>?</entry> </row> <row> - <entry><type>ltree[]</> <literal>?</> <type>lquery[]</></entry> + <entry><type>ltree[]</type> <literal>?</literal> <type>lquery[]</type></entry> <entry><type>boolean</type></entry> - <entry>does <type>ltree</> array contain any path matching any <type>lquery</>?</entry> + <entry>does <type>ltree</type> array contain any path matching any <type>lquery</type>?</entry> </row> <row> - <entry><type>lquery[]</> <literal>?</> <type>ltree[]</></entry> + <entry><type>lquery[]</type> <literal>?</literal> <type>ltree[]</type></entry> <entry><type>boolean</type></entry> - <entry>does <type>ltree</> array contain any path matching any <type>lquery</>?</entry> + <entry>does <type>ltree</type> array contain any path matching any <type>lquery</type>?</entry> </row> <row> - <entry><type>ltree[]</> <literal>@</> <type>ltxtquery</></entry> + <entry><type>ltree[]</type> <literal>@</literal> <type>ltxtquery</type></entry> <entry><type>boolean</type></entry> - <entry>does array contain any path matching <type>ltxtquery</>?</entry> + <entry>does array contain any path matching <type>ltxtquery</type>?</entry> </row> <row> - <entry><type>ltxtquery</> <literal>@</> <type>ltree[]</></entry> + <entry><type>ltxtquery</type> <literal>@</literal> <type>ltree[]</type></entry> <entry><type>boolean</type></entry> - <entry>does array contain any path matching <type>ltxtquery</>?</entry> + <entry>does array contain any path matching <type>ltxtquery</type>?</entry> </row> <row> - <entry><type>ltree[]</> <literal>?@></> <type>ltree</></entry> + <entry><type>ltree[]</type> <literal>?@></literal> <type>ltree</type></entry> <entry><type>ltree</type></entry> - <entry>first array entry that is an ancestor of <type>ltree</>; NULL if none</entry> + <entry>first array entry that is an ancestor of <type>ltree</type>; NULL if none</entry> </row> <row> - <entry><type>ltree[]</> <literal>?<@</> <type>ltree</></entry> + <entry><type>ltree[]</type> <literal>?<@</literal> <type>ltree</type></entry> <entry><type>ltree</type></entry> - <entry>first array entry that is a descendant of <type>ltree</>; NULL if none</entry> + <entry>first array entry that is a descendant of <type>ltree</type>; NULL if none</entry> </row> <row> - <entry><type>ltree[]</> <literal>?~</> <type>lquery</></entry> + <entry><type>ltree[]</type> <literal>?~</literal> <type>lquery</type></entry> <entry><type>ltree</type></entry> - <entry>first array entry that matches <type>lquery</>; NULL if none</entry> + <entry>first array entry that matches <type>lquery</type>; NULL if none</entry> </row> <row> - <entry><type>ltree[]</> <literal>?@</> <type>ltxtquery</></entry> + <entry><type>ltree[]</type> <literal>?@</literal> <type>ltxtquery</type></entry> <entry><type>ltree</type></entry> - <entry>first array entry that matches <type>ltxtquery</>; NULL if none</entry> + <entry>first array entry that matches <type>ltxtquery</type>; NULL if none</entry> </row> </tbody> @@ -356,7 +356,7 @@ Europe & Russia*@ & !Transportation <para> The operators <literal><@</literal>, <literal>@></literal>, <literal>@</literal> and <literal>~</literal> have analogues - <literal>^<@</>, <literal>^@></>, <literal>^@</>, + <literal>^<@</literal>, <literal>^@></literal>, <literal>^@</literal>, <literal>^~</literal>, which are the same except they do not use indexes. These are useful only for testing purposes. </para> @@ -366,7 +366,7 @@ Europe & Russia*@ & !Transportation </para> <table id="ltree-func-table"> - <title><type>ltree</> Functions</title> + <title><type>ltree</type> Functions</title> <tgroup cols="5"> <thead> @@ -383,8 +383,8 @@ Europe & Russia*@ & !Transportation <row> <entry><function>subltree(ltree, int start, int end)</function><indexterm><primary>subltree</primary></indexterm></entry> <entry><type>ltree</type></entry> - <entry>subpath of <type>ltree</> from position <parameter>start</> to - position <parameter>end</>-1 (counting from 0)</entry> + <entry>subpath of <type>ltree</type> from position <parameter>start</parameter> to + position <parameter>end</parameter>-1 (counting from 0)</entry> <entry><literal>subltree('Top.Child1.Child2',1,2)</literal></entry> <entry><literal>Child1</literal></entry> </row> @@ -392,10 +392,10 @@ Europe & Russia*@ & !Transportation <row> <entry><function>subpath(ltree, int offset, int len)</function><indexterm><primary>subpath</primary></indexterm></entry> <entry><type>ltree</type></entry> - <entry>subpath of <type>ltree</> starting at position - <parameter>offset</>, length <parameter>len</>. - If <parameter>offset</> is negative, subpath starts that far from the - end of the path. If <parameter>len</> is negative, leaves that many + <entry>subpath of <type>ltree</type> starting at position + <parameter>offset</parameter>, length <parameter>len</parameter>. + If <parameter>offset</parameter> is negative, subpath starts that far from the + end of the path. If <parameter>len</parameter> is negative, leaves that many labels off the end of the path.</entry> <entry><literal>subpath('Top.Child1.Child2',0,2)</literal></entry> <entry><literal>Top.Child1</literal></entry> @@ -404,9 +404,9 @@ Europe & Russia*@ & !Transportation <row> <entry><function>subpath(ltree, int offset)</function></entry> <entry><type>ltree</type></entry> - <entry>subpath of <type>ltree</> starting at position - <parameter>offset</>, extending to end of path. - If <parameter>offset</> is negative, subpath starts that far from the + <entry>subpath of <type>ltree</type> starting at position + <parameter>offset</parameter>, extending to end of path. + If <parameter>offset</parameter> is negative, subpath starts that far from the end of the path.</entry> <entry><literal>subpath('Top.Child1.Child2',1)</literal></entry> <entry><literal>Child1.Child2</literal></entry> @@ -423,8 +423,8 @@ Europe & Russia*@ & !Transportation <row> <entry><function>index(ltree a, ltree b)</function><indexterm><primary>index</primary></indexterm></entry> <entry><type>integer</type></entry> - <entry>position of first occurrence of <parameter>b</> in - <parameter>a</>; -1 if not found</entry> + <entry>position of first occurrence of <parameter>b</parameter> in + <parameter>a</parameter>; -1 if not found</entry> <entry><literal>index('0.1.2.3.5.4.5.6.8.5.6.8','5.6')</literal></entry> <entry><literal>6</literal></entry> </row> @@ -432,9 +432,9 @@ Europe & Russia*@ & !Transportation <row> <entry><function>index(ltree a, ltree b, int offset)</function></entry> <entry><type>integer</type></entry> - <entry>position of first occurrence of <parameter>b</> in - <parameter>a</>, searching starting at <parameter>offset</>; - negative <parameter>offset</> means start <parameter>-offset</> + <entry>position of first occurrence of <parameter>b</parameter> in + <parameter>a</parameter>, searching starting at <parameter>offset</parameter>; + negative <parameter>offset</parameter> means start <parameter>-offset</parameter> labels from the end of the path</entry> <entry><literal>index('0.1.2.3.5.4.5.6.8.5.6.8','5.6',-4)</literal></entry> <entry><literal>9</literal></entry> @@ -443,7 +443,7 @@ Europe & Russia*@ & !Transportation <row> <entry><function>text2ltree(text)</function><indexterm><primary>text2ltree</primary></indexterm></entry> <entry><type>ltree</type></entry> - <entry>cast <type>text</> to <type>ltree</></entry> + <entry>cast <type>text</type> to <type>ltree</type></entry> <entry><literal></literal></entry> <entry><literal></literal></entry> </row> @@ -451,7 +451,7 @@ Europe & Russia*@ & !Transportation <row> <entry><function>ltree2text(ltree)</function><indexterm><primary>ltree2text</primary></indexterm></entry> <entry><type>text</type></entry> - <entry>cast <type>ltree</> to <type>text</></entry> + <entry>cast <type>ltree</type> to <type>text</type></entry> <entry><literal></literal></entry> <entry><literal></literal></entry> </row> @@ -481,25 +481,25 @@ Europe & Russia*@ & !Transportation <sect2> <title>Indexes</title> <para> - <filename>ltree</> supports several types of indexes that can speed + <filename>ltree</filename> supports several types of indexes that can speed up the indicated operators: </para> <itemizedlist> <listitem> <para> - B-tree index over <type>ltree</>: - <literal><</>, <literal><=</>, <literal>=</>, - <literal>>=</>, <literal>></literal> + B-tree index over <type>ltree</type>: + <literal><</literal>, <literal><=</literal>, <literal>=</literal>, + <literal>>=</literal>, <literal>></literal> </para> </listitem> <listitem> <para> - GiST index over <type>ltree</>: - <literal><</>, <literal><=</>, <literal>=</>, - <literal>>=</>, <literal>></>, - <literal>@></>, <literal><@</>, - <literal>@</>, <literal>~</>, <literal>?</literal> + GiST index over <type>ltree</type>: + <literal><</literal>, <literal><=</literal>, <literal>=</literal>, + <literal>>=</literal>, <literal>></literal>, + <literal>@></literal>, <literal><@</literal>, + <literal>@</literal>, <literal>~</literal>, <literal>?</literal> </para> <para> Example of creating such an index: @@ -510,9 +510,9 @@ CREATE INDEX path_gist_idx ON test USING GIST (path); </listitem> <listitem> <para> - GiST index over <type>ltree[]</>: - <literal>ltree[] <@ ltree</>, <literal>ltree @> ltree[]</>, - <literal>@</>, <literal>~</>, <literal>?</literal> + GiST index over <type>ltree[]</type>: + <literal>ltree[] <@ ltree</literal>, <literal>ltree @> ltree[]</literal>, + <literal>@</literal>, <literal>~</literal>, <literal>?</literal> </para> <para> Example of creating such an index: @@ -532,7 +532,7 @@ CREATE INDEX path_gist_idx ON test USING GIST (array_path); <para> This example uses the following data (also available in file - <filename>contrib/ltree/ltreetest.sql</> in the source distribution): + <filename>contrib/ltree/ltreetest.sql</filename> in the source distribution): </para> <programlisting> @@ -555,7 +555,7 @@ CREATE INDEX path_idx ON test USING BTREE (path); </programlisting> <para> - Now, we have a table <structname>test</> populated with data describing + Now, we have a table <structname>test</structname> populated with data describing the hierarchy shown below: </para> diff --git a/doc/src/sgml/maintenance.sgml b/doc/src/sgml/maintenance.sgml index 616aece6c0e..1952bc91781 100644 --- a/doc/src/sgml/maintenance.sgml +++ b/doc/src/sgml/maintenance.sgml @@ -12,12 +12,12 @@ </indexterm> <para> - <productname>PostgreSQL</>, like any database software, requires that certain tasks + <productname>PostgreSQL</productname>, like any database software, requires that certain tasks be performed regularly to achieve optimum performance. The tasks discussed here are <emphasis>required</emphasis>, but they are repetitive in nature and can easily be automated using standard tools such as <application>cron</application> scripts or - Windows' <application>Task Scheduler</>. It is the database + Windows' <application>Task Scheduler</application>. It is the database administrator's responsibility to set up appropriate scripts, and to check that they execute successfully. </para> @@ -32,7 +32,7 @@ </para> <para> - The other main category of maintenance task is periodic <quote>vacuuming</> + The other main category of maintenance task is periodic <quote>vacuuming</quote> of the database. This activity is discussed in <xref linkend="routine-vacuuming">. Closely related to this is updating the statistics that will be used by the query planner, as discussed in @@ -46,9 +46,9 @@ <para> <ulink - url="http://bucardo.org/wiki/Check_postgres"><application>check_postgres</></ulink> + url="http://bucardo.org/wiki/Check_postgres"><application>check_postgres</application></ulink> is available for monitoring database health and reporting unusual - conditions. <application>check_postgres</> integrates with + conditions. <application>check_postgres</application> integrates with Nagios and MRTG, but can be run standalone too. </para> @@ -68,15 +68,15 @@ <para> <productname>PostgreSQL</productname> databases require periodic - maintenance known as <firstterm>vacuuming</>. For many installations, it + maintenance known as <firstterm>vacuuming</firstterm>. For many installations, it is sufficient to let vacuuming be performed by the <firstterm>autovacuum - daemon</>, which is described in <xref linkend="autovacuum">. You might + daemon</firstterm>, which is described in <xref linkend="autovacuum">. You might need to adjust the autovacuuming parameters described there to obtain best results for your situation. Some database administrators will want to supplement or replace the daemon's activities with manually-managed - <command>VACUUM</> commands, which typically are executed according to a + <command>VACUUM</command> commands, which typically are executed according to a schedule by <application>cron</application> or <application>Task - Scheduler</> scripts. To set up manually-managed vacuuming properly, + Scheduler</application> scripts. To set up manually-managed vacuuming properly, it is essential to understand the issues discussed in the next few subsections. Administrators who rely on autovacuuming may still wish to skim this material to help them understand and adjust autovacuuming. @@ -109,30 +109,30 @@ <listitem> <simpara>To protect against loss of very old data due to - <firstterm>transaction ID wraparound</> or - <firstterm>multixact ID wraparound</>.</simpara> + <firstterm>transaction ID wraparound</firstterm> or + <firstterm>multixact ID wraparound</firstterm>.</simpara> </listitem> </orderedlist> - Each of these reasons dictates performing <command>VACUUM</> operations + Each of these reasons dictates performing <command>VACUUM</command> operations of varying frequency and scope, as explained in the following subsections. </para> <para> - There are two variants of <command>VACUUM</>: standard <command>VACUUM</> - and <command>VACUUM FULL</>. <command>VACUUM FULL</> can reclaim more + There are two variants of <command>VACUUM</command>: standard <command>VACUUM</command> + and <command>VACUUM FULL</command>. <command>VACUUM FULL</command> can reclaim more disk space but runs much more slowly. Also, - the standard form of <command>VACUUM</> can run in parallel with production + the standard form of <command>VACUUM</command> can run in parallel with production database operations. (Commands such as <command>SELECT</command>, <command>INSERT</command>, <command>UPDATE</command>, and <command>DELETE</command> will continue to function normally, though you will not be able to modify the definition of a table with commands such as <command>ALTER TABLE</command> while it is being vacuumed.) - <command>VACUUM FULL</> requires exclusive lock on the table it is + <command>VACUUM FULL</command> requires exclusive lock on the table it is working on, and therefore cannot be done in parallel with other use of the table. Generally, therefore, - administrators should strive to use standard <command>VACUUM</> and - avoid <command>VACUUM FULL</>. + administrators should strive to use standard <command>VACUUM</command> and + avoid <command>VACUUM FULL</command>. </para> <para> @@ -153,15 +153,15 @@ <para> In <productname>PostgreSQL</productname>, an - <command>UPDATE</> or <command>DELETE</> of a row does not + <command>UPDATE</command> or <command>DELETE</command> of a row does not immediately remove the old version of the row. This approach is necessary to gain the benefits of multiversion - concurrency control (<acronym>MVCC</>, see <xref linkend="mvcc">): the row version + concurrency control (<acronym>MVCC</acronym>, see <xref linkend="mvcc">): the row version must not be deleted while it is still potentially visible to other transactions. But eventually, an outdated or deleted row version is no longer of interest to any transaction. The space it occupies must then be reclaimed for reuse by new rows, to avoid unbounded growth of disk - space requirements. This is done by running <command>VACUUM</>. + space requirements. This is done by running <command>VACUUM</command>. </para> <para> @@ -170,7 +170,7 @@ future reuse. However, it will not return the space to the operating system, except in the special case where one or more pages at the end of a table become entirely free and an exclusive table lock can be - easily obtained. In contrast, <command>VACUUM FULL</> actively compacts + easily obtained. In contrast, <command>VACUUM FULL</command> actively compacts tables by writing a complete new version of the table file with no dead space. This minimizes the size of the table, but can take a long time. It also requires extra disk space for the new copy of the table, until @@ -178,18 +178,18 @@ </para> <para> - The usual goal of routine vacuuming is to do standard <command>VACUUM</>s - often enough to avoid needing <command>VACUUM FULL</>. The + The usual goal of routine vacuuming is to do standard <command>VACUUM</command>s + often enough to avoid needing <command>VACUUM FULL</command>. The autovacuum daemon attempts to work this way, and in fact will - never issue <command>VACUUM FULL</>. In this approach, the idea + never issue <command>VACUUM FULL</command>. In this approach, the idea is not to keep tables at their minimum size, but to maintain steady-state usage of disk space: each table occupies space equivalent to its minimum size plus however much space gets used up between vacuumings. - Although <command>VACUUM FULL</> can be used to shrink a table back + Although <command>VACUUM FULL</command> can be used to shrink a table back to its minimum size and return the disk space to the operating system, there is not much point in this if the table will just grow again in the - future. Thus, moderately-frequent standard <command>VACUUM</> runs are a - better approach than infrequent <command>VACUUM FULL</> runs for + future. Thus, moderately-frequent standard <command>VACUUM</command> runs are a + better approach than infrequent <command>VACUUM FULL</command> runs for maintaining heavily-updated tables. </para> @@ -198,20 +198,20 @@ doing all the work at night when load is low. The difficulty with doing vacuuming according to a fixed schedule is that if a table has an unexpected spike in update activity, it may - get bloated to the point that <command>VACUUM FULL</> is really necessary + get bloated to the point that <command>VACUUM FULL</command> is really necessary to reclaim space. Using the autovacuum daemon alleviates this problem, since the daemon schedules vacuuming dynamically in response to update activity. It is unwise to disable the daemon completely unless you have an extremely predictable workload. One possible compromise is to set the daemon's parameters so that it will only react to unusually heavy update activity, thus keeping things from getting out of hand, - while scheduled <command>VACUUM</>s are expected to do the bulk of the + while scheduled <command>VACUUM</command>s are expected to do the bulk of the work when the load is typical. </para> <para> For those not using autovacuum, a typical approach is to schedule a - database-wide <command>VACUUM</> once a day during a low-usage period, + database-wide <command>VACUUM</command> once a day during a low-usage period, supplemented by more frequent vacuuming of heavily-updated tables as necessary. (Some installations with extremely high update rates vacuum their busiest tables as often as once every few minutes.) If you have @@ -222,11 +222,11 @@ <tip> <para> - Plain <command>VACUUM</> may not be satisfactory when + Plain <command>VACUUM</command> may not be satisfactory when a table contains large numbers of dead row versions as a result of massive update or delete activity. If you have such a table and you need to reclaim the excess disk space it occupies, you will need - to use <command>VACUUM FULL</>, or alternatively + to use <command>VACUUM FULL</command>, or alternatively <xref linkend="sql-cluster"> or one of the table-rewriting variants of <xref linkend="sql-altertable">. @@ -271,19 +271,19 @@ generate good plans for queries. These statistics are gathered by the <xref linkend="sql-analyze"> command, which can be invoked by itself or - as an optional step in <command>VACUUM</>. It is important to have + as an optional step in <command>VACUUM</command>. It is important to have reasonably accurate statistics, otherwise poor choices of plans might degrade database performance. </para> <para> The autovacuum daemon, if enabled, will automatically issue - <command>ANALYZE</> commands whenever the content of a table has + <command>ANALYZE</command> commands whenever the content of a table has changed sufficiently. However, administrators might prefer to rely - on manually-scheduled <command>ANALYZE</> operations, particularly + on manually-scheduled <command>ANALYZE</command> operations, particularly if it is known that update activity on a table will not affect the - statistics of <quote>interesting</> columns. The daemon schedules - <command>ANALYZE</> strictly as a function of the number of rows + statistics of <quote>interesting</quote> columns. The daemon schedules + <command>ANALYZE</command> strictly as a function of the number of rows inserted or updated; it has no knowledge of whether that will lead to meaningful statistical changes. </para> @@ -305,24 +305,24 @@ </para> <para> - It is possible to run <command>ANALYZE</> on specific tables and even + It is possible to run <command>ANALYZE</command> on specific tables and even just specific columns of a table, so the flexibility exists to update some statistics more frequently than others if your application requires it. In practice, however, it is usually best to just analyze the entire - database, because it is a fast operation. <command>ANALYZE</> uses a + database, because it is a fast operation. <command>ANALYZE</command> uses a statistically random sampling of the rows of a table rather than reading every single row. </para> <tip> <para> - Although per-column tweaking of <command>ANALYZE</> frequency might not be + Although per-column tweaking of <command>ANALYZE</command> frequency might not be very productive, you might find it worthwhile to do per-column adjustment of the level of detail of the statistics collected by - <command>ANALYZE</>. Columns that are heavily used in <literal>WHERE</> + <command>ANALYZE</command>. Columns that are heavily used in <literal>WHERE</literal> clauses and have highly irregular data distributions might require a finer-grain data histogram than other columns. See <command>ALTER TABLE - SET STATISTICS</>, or change the database-wide default using the <xref + SET STATISTICS</command>, or change the database-wide default using the <xref linkend="guc-default-statistics-target"> configuration parameter. </para> @@ -337,11 +337,11 @@ <tip> <para> - The autovacuum daemon does not issue <command>ANALYZE</> commands for + The autovacuum daemon does not issue <command>ANALYZE</command> commands for foreign tables, since it has no means of determining how often that might be useful. If your queries require statistics on foreign tables for proper planning, it's a good idea to run manually-managed - <command>ANALYZE</> commands on those tables on a suitable schedule. + <command>ANALYZE</command> commands on those tables on a suitable schedule. </para> </tip> </sect2> @@ -350,7 +350,7 @@ <title>Updating The Visibility Map</title> <para> - Vacuum maintains a <link linkend="storage-vm">visibility map</> for each + Vacuum maintains a <link linkend="storage-vm">visibility map</link> for each table to keep track of which pages contain only tuples that are known to be visible to all active transactions (and all future transactions, until the page is again modified). This has two purposes. First, vacuum @@ -366,7 +366,7 @@ matching index entry, to check whether it should be seen by the current transaction. An <link linkend="indexes-index-only-scans"><firstterm>index-only - scan</></link>, on the other hand, checks the visibility map first. + scan</firstterm></link>, on the other hand, checks the visibility map first. If it's known that all tuples on the page are visible, the heap fetch can be skipped. This is most useful on large data sets where the visibility map can prevent disk accesses. @@ -391,13 +391,13 @@ <para> <productname>PostgreSQL</productname>'s <link linkend="mvcc-intro">MVCC</link> transaction semantics - depend on being able to compare transaction ID (<acronym>XID</>) + depend on being able to compare transaction ID (<acronym>XID</acronym>) numbers: a row version with an insertion XID greater than the current - transaction's XID is <quote>in the future</> and should not be visible + transaction's XID is <quote>in the future</quote> and should not be visible to the current transaction. But since transaction IDs have limited size (32 bits) a cluster that runs for a long time (more than 4 billion transactions) would suffer <firstterm>transaction ID - wraparound</>: the XID counter wraps around to zero, and all of a sudden + wraparound</firstterm>: the XID counter wraps around to zero, and all of a sudden transactions that were in the past appear to be in the future — which means their output become invisible. In short, catastrophic data loss. (Actually the data is still there, but that's cold comfort if you cannot @@ -407,47 +407,47 @@ <para> The reason that periodic vacuuming solves the problem is that - <command>VACUUM</> will mark rows as <emphasis>frozen</>, indicating that + <command>VACUUM</command> will mark rows as <emphasis>frozen</emphasis>, indicating that they were inserted by a transaction that committed sufficiently far in the past that the effects of the inserting transaction are certain to be visible to all current and future transactions. Normal XIDs are - compared using modulo-2<superscript>32</> arithmetic. This means + compared using modulo-2<superscript>32</superscript> arithmetic. This means that for every normal XID, there are two billion XIDs that are - <quote>older</> and two billion that are <quote>newer</>; another + <quote>older</quote> and two billion that are <quote>newer</quote>; another way to say it is that the normal XID space is circular with no endpoint. Therefore, once a row version has been created with a particular - normal XID, the row version will appear to be <quote>in the past</> for + normal XID, the row version will appear to be <quote>in the past</quote> for the next two billion transactions, no matter which normal XID we are talking about. If the row version still exists after more than two billion transactions, it will suddenly appear to be in the future. To - prevent this, <productname>PostgreSQL</> reserves a special XID, - <literal>FrozenTransactionId</>, which does not follow the normal XID + prevent this, <productname>PostgreSQL</productname> reserves a special XID, + <literal>FrozenTransactionId</literal>, which does not follow the normal XID comparison rules and is always considered older than every normal XID. Frozen row versions are treated as if the inserting XID were - <literal>FrozenTransactionId</>, so that they will appear to be - <quote>in the past</> to all normal transactions regardless of wraparound + <literal>FrozenTransactionId</literal>, so that they will appear to be + <quote>in the past</quote> to all normal transactions regardless of wraparound issues, and so such row versions will be valid until deleted, no matter how long that is. </para> <note> <para> - In <productname>PostgreSQL</> versions before 9.4, freezing was + In <productname>PostgreSQL</productname> versions before 9.4, freezing was implemented by actually replacing a row's insertion XID - with <literal>FrozenTransactionId</>, which was visible in the - row's <structname>xmin</> system column. Newer versions just set a flag - bit, preserving the row's original <structname>xmin</> for possible - forensic use. However, rows with <structname>xmin</> equal - to <literal>FrozenTransactionId</> (2) may still be found - in databases <application>pg_upgrade</>'d from pre-9.4 versions. + with <literal>FrozenTransactionId</literal>, which was visible in the + row's <structname>xmin</structname> system column. Newer versions just set a flag + bit, preserving the row's original <structname>xmin</structname> for possible + forensic use. However, rows with <structname>xmin</structname> equal + to <literal>FrozenTransactionId</literal> (2) may still be found + in databases <application>pg_upgrade</application>'d from pre-9.4 versions. </para> <para> - Also, system catalogs may contain rows with <structname>xmin</> equal - to <literal>BootstrapTransactionId</> (1), indicating that they were - inserted during the first phase of <application>initdb</>. - Like <literal>FrozenTransactionId</>, this special XID is treated as + Also, system catalogs may contain rows with <structname>xmin</structname> equal + to <literal>BootstrapTransactionId</literal> (1), indicating that they were + inserted during the first phase of <application>initdb</application>. + Like <literal>FrozenTransactionId</literal>, this special XID is treated as older than every normal XID. </para> </note> @@ -463,26 +463,26 @@ </para> <para> - <command>VACUUM</> uses the <link linkend="storage-vm">visibility map</> + <command>VACUUM</command> uses the <link linkend="storage-vm">visibility map</link> to determine which pages of a table must be scanned. Normally, it will skip pages that don't have any dead row versions even if those pages might still have row versions with old XID values. Therefore, normal - <command>VACUUM</>s won't always freeze every old row version in the table. - Periodically, <command>VACUUM</> will perform an <firstterm>aggressive - vacuum</>, skipping only those pages which contain neither dead rows nor + <command>VACUUM</command>s won't always freeze every old row version in the table. + Periodically, <command>VACUUM</command> will perform an <firstterm>aggressive + vacuum</firstterm>, skipping only those pages which contain neither dead rows nor any unfrozen XID or MXID values. <xref linkend="guc-vacuum-freeze-table-age"> - controls when <command>VACUUM</> does that: all-visible but not all-frozen + controls when <command>VACUUM</command> does that: all-visible but not all-frozen pages are scanned if the number of transactions that have passed since the - last such scan is greater than <varname>vacuum_freeze_table_age</> minus - <varname>vacuum_freeze_min_age</>. Setting - <varname>vacuum_freeze_table_age</> to 0 forces <command>VACUUM</> to + last such scan is greater than <varname>vacuum_freeze_table_age</varname> minus + <varname>vacuum_freeze_min_age</varname>. Setting + <varname>vacuum_freeze_table_age</varname> to 0 forces <command>VACUUM</command> to use this more aggressive strategy for all scans. </para> <para> The maximum time that a table can go unvacuumed is two billion - transactions minus the <varname>vacuum_freeze_min_age</> value at + transactions minus the <varname>vacuum_freeze_min_age</varname> value at the time of the last aggressive vacuum. If it were to go unvacuumed for longer than that, data loss could result. To ensure that this does not happen, @@ -495,29 +495,29 @@ <para> This implies that if a table is not otherwise vacuumed, autovacuum will be invoked on it approximately once every - <varname>autovacuum_freeze_max_age</> minus - <varname>vacuum_freeze_min_age</> transactions. + <varname>autovacuum_freeze_max_age</varname> minus + <varname>vacuum_freeze_min_age</varname> transactions. For tables that are regularly vacuumed for space reclamation purposes, this is of little importance. However, for static tables (including tables that receive inserts, but no updates or deletes), there is no need to vacuum for space reclamation, so it can be useful to try to maximize the interval between forced autovacuums on very large static tables. Obviously one can do this either by - increasing <varname>autovacuum_freeze_max_age</> or decreasing - <varname>vacuum_freeze_min_age</>. + increasing <varname>autovacuum_freeze_max_age</varname> or decreasing + <varname>vacuum_freeze_min_age</varname>. </para> <para> - The effective maximum for <varname>vacuum_freeze_table_age</> is 0.95 * - <varname>autovacuum_freeze_max_age</>; a setting higher than that will be + The effective maximum for <varname>vacuum_freeze_table_age</varname> is 0.95 * + <varname>autovacuum_freeze_max_age</varname>; a setting higher than that will be capped to the maximum. A value higher than - <varname>autovacuum_freeze_max_age</> wouldn't make sense because an + <varname>autovacuum_freeze_max_age</varname> wouldn't make sense because an anti-wraparound autovacuum would be triggered at that point anyway, and the 0.95 multiplier leaves some breathing room to run a manual - <command>VACUUM</> before that happens. As a rule of thumb, - <command>vacuum_freeze_table_age</> should be set to a value somewhat - below <varname>autovacuum_freeze_max_age</>, leaving enough gap so that - a regularly scheduled <command>VACUUM</> or an autovacuum triggered by + <command>VACUUM</command> before that happens. As a rule of thumb, + <command>vacuum_freeze_table_age</command> should be set to a value somewhat + below <varname>autovacuum_freeze_max_age</varname>, leaving enough gap so that + a regularly scheduled <command>VACUUM</command> or an autovacuum triggered by normal delete and update activity is run in that window. Setting it too close could lead to anti-wraparound autovacuums, even though the table was recently vacuumed to reclaim space, whereas lower values lead to more @@ -525,29 +525,29 @@ </para> <para> - The sole disadvantage of increasing <varname>autovacuum_freeze_max_age</> - (and <varname>vacuum_freeze_table_age</> along with it) is that - the <filename>pg_xact</> and <filename>pg_commit_ts</filename> + The sole disadvantage of increasing <varname>autovacuum_freeze_max_age</varname> + (and <varname>vacuum_freeze_table_age</varname> along with it) is that + the <filename>pg_xact</filename> and <filename>pg_commit_ts</filename> subdirectories of the database cluster will take more space, because it - must store the commit status and (if <varname>track_commit_timestamp</> is + must store the commit status and (if <varname>track_commit_timestamp</varname> is enabled) timestamp of all transactions back to - the <varname>autovacuum_freeze_max_age</> horizon. The commit status uses + the <varname>autovacuum_freeze_max_age</varname> horizon. The commit status uses two bits per transaction, so if - <varname>autovacuum_freeze_max_age</> is set to its maximum allowed value - of two billion, <filename>pg_xact</> can be expected to grow to about half + <varname>autovacuum_freeze_max_age</varname> is set to its maximum allowed value + of two billion, <filename>pg_xact</filename> can be expected to grow to about half a gigabyte and <filename>pg_commit_ts</filename> to about 20GB. If this is trivial compared to your total database size, - setting <varname>autovacuum_freeze_max_age</> to its maximum allowed value + setting <varname>autovacuum_freeze_max_age</varname> to its maximum allowed value is recommended. Otherwise, set it depending on what you are willing to - allow for <filename>pg_xact</> and <filename>pg_commit_ts</> storage. + allow for <filename>pg_xact</filename> and <filename>pg_commit_ts</filename> storage. (The default, 200 million transactions, translates to about 50MB - of <filename>pg_xact</> storage and about 2GB of <filename>pg_commit_ts</> + of <filename>pg_xact</filename> storage and about 2GB of <filename>pg_commit_ts</filename> storage.) </para> <para> - One disadvantage of decreasing <varname>vacuum_freeze_min_age</> is that - it might cause <command>VACUUM</> to do useless work: freezing a row + One disadvantage of decreasing <varname>vacuum_freeze_min_age</varname> is that + it might cause <command>VACUUM</command> to do useless work: freezing a row version is a waste of time if the row is modified soon thereafter (causing it to acquire a new XID). So the setting should be large enough that rows are not frozen until they are unlikely to change @@ -556,18 +556,18 @@ <para> To track the age of the oldest unfrozen XIDs in a database, - <command>VACUUM</> stores XID - statistics in the system tables <structname>pg_class</> and - <structname>pg_database</>. In particular, - the <structfield>relfrozenxid</> column of a table's - <structname>pg_class</> row contains the freeze cutoff XID that was used - by the last aggressive <command>VACUUM</> for that table. All rows + <command>VACUUM</command> stores XID + statistics in the system tables <structname>pg_class</structname> and + <structname>pg_database</structname>. In particular, + the <structfield>relfrozenxid</structfield> column of a table's + <structname>pg_class</structname> row contains the freeze cutoff XID that was used + by the last aggressive <command>VACUUM</command> for that table. All rows inserted by transactions with XIDs older than this cutoff XID are guaranteed to have been frozen. Similarly, - the <structfield>datfrozenxid</> column of a database's - <structname>pg_database</> row is a lower bound on the unfrozen XIDs + the <structfield>datfrozenxid</structfield> column of a database's + <structname>pg_database</structname> row is a lower bound on the unfrozen XIDs appearing in that database — it is just the minimum of the - per-table <structfield>relfrozenxid</> values within the database. + per-table <structfield>relfrozenxid</structfield> values within the database. A convenient way to examine this information is to execute queries such as: @@ -581,27 +581,27 @@ WHERE c.relkind IN ('r', 'm'); SELECT datname, age(datfrozenxid) FROM pg_database; </programlisting> - The <literal>age</> column measures the number of transactions from the + The <literal>age</literal> column measures the number of transactions from the cutoff XID to the current transaction's XID. </para> <para> - <command>VACUUM</> normally only scans pages that have been modified - since the last vacuum, but <structfield>relfrozenxid</> can only be + <command>VACUUM</command> normally only scans pages that have been modified + since the last vacuum, but <structfield>relfrozenxid</structfield> can only be advanced when every page of the table that might contain unfrozen XIDs is scanned. This happens when - <structfield>relfrozenxid</> is more than - <varname>vacuum_freeze_table_age</> transactions old, when - <command>VACUUM</>'s <literal>FREEZE</> option is used, or when all + <structfield>relfrozenxid</structfield> is more than + <varname>vacuum_freeze_table_age</varname> transactions old, when + <command>VACUUM</command>'s <literal>FREEZE</literal> option is used, or when all pages that are not already all-frozen happen to - require vacuuming to remove dead row versions. When <command>VACUUM</> + require vacuuming to remove dead row versions. When <command>VACUUM</command> scans every page in the table that is not already all-frozen, it should - set <literal>age(relfrozenxid)</> to a value just a little more than the - <varname>vacuum_freeze_min_age</> setting + set <literal>age(relfrozenxid)</literal> to a value just a little more than the + <varname>vacuum_freeze_min_age</varname> setting that was used (more by the number of transactions started since the - <command>VACUUM</> started). If no <structfield>relfrozenxid</>-advancing - <command>VACUUM</> is issued on the table until - <varname>autovacuum_freeze_max_age</> is reached, an autovacuum will soon + <command>VACUUM</command> started). If no <structfield>relfrozenxid</structfield>-advancing + <command>VACUUM</command> is issued on the table until + <varname>autovacuum_freeze_max_age</varname> is reached, an autovacuum will soon be forced for the table. </para> @@ -616,10 +616,10 @@ WARNING: database "mydb" must be vacuumed within 177009986 transactions HINT: To avoid a database shutdown, execute a database-wide VACUUM in "mydb". </programlisting> - (A manual <command>VACUUM</> should fix the problem, as suggested by the - hint; but note that the <command>VACUUM</> must be performed by a + (A manual <command>VACUUM</command> should fix the problem, as suggested by the + hint; but note that the <command>VACUUM</command> must be performed by a superuser, else it will fail to process system catalogs and thus not - be able to advance the database's <structfield>datfrozenxid</>.) + be able to advance the database's <structfield>datfrozenxid</structfield>.) If these warnings are ignored, the system will shut down and refuse to start any new transactions once there are fewer than 1 million transactions left @@ -632,10 +632,10 @@ HINT: Stop the postmaster and vacuum that database in single-user mode. The 1-million-transaction safety margin exists to let the administrator recover without data loss, by manually executing the - required <command>VACUUM</> commands. However, since the system will not + required <command>VACUUM</command> commands. However, since the system will not execute commands once it has gone into the safety shutdown mode, the only way to do this is to stop the server and start the server in single-user - mode to execute <command>VACUUM</>. The shutdown mode is not enforced + mode to execute <command>VACUUM</command>. The shutdown mode is not enforced in single-user mode. See the <xref linkend="app-postgres"> reference page for details about using single-user mode. </para> @@ -653,15 +653,15 @@ HINT: Stop the postmaster and vacuum that database in single-user mode. </indexterm> <para> - <firstterm>Multixact IDs</> are used to support row locking by + <firstterm>Multixact IDs</firstterm> are used to support row locking by multiple transactions. Since there is only limited space in a tuple header to store lock information, that information is encoded as - a <quote>multiple transaction ID</>, or multixact ID for short, + a <quote>multiple transaction ID</quote>, or multixact ID for short, whenever there is more than one transaction concurrently locking a row. Information about which transaction IDs are included in any particular multixact ID is stored separately in - the <filename>pg_multixact</> subdirectory, and only the multixact ID - appears in the <structfield>xmax</> field in the tuple header. + the <filename>pg_multixact</filename> subdirectory, and only the multixact ID + appears in the <structfield>xmax</structfield> field in the tuple header. Like transaction IDs, multixact IDs are implemented as a 32-bit counter and corresponding storage, all of which requires careful aging management, storage cleanup, and wraparound handling. @@ -671,23 +671,23 @@ HINT: Stop the postmaster and vacuum that database in single-user mode. </para> <para> - Whenever <command>VACUUM</> scans any part of a table, it will replace + Whenever <command>VACUUM</command> scans any part of a table, it will replace any multixact ID it encounters which is older than <xref linkend="guc-vacuum-multixact-freeze-min-age"> by a different value, which can be the zero value, a single transaction ID, or a newer multixact ID. For each table, - <structname>pg_class</>.<structfield>relminmxid</> stores the oldest + <structname>pg_class</structname>.<structfield>relminmxid</structfield> stores the oldest possible multixact ID still appearing in any tuple of that table. If this value is older than <xref linkend="guc-vacuum-multixact-freeze-table-age">, an aggressive vacuum is forced. As discussed in the previous section, an aggressive vacuum means that only those pages which are known to be all-frozen will - be skipped. <function>mxid_age()</> can be used on - <structname>pg_class</>.<structfield>relminmxid</> to find its age. + be skipped. <function>mxid_age()</function> can be used on + <structname>pg_class</structname>.<structfield>relminmxid</structfield> to find its age. </para> <para> - Aggressive <command>VACUUM</> scans, regardless of + Aggressive <command>VACUUM</command> scans, regardless of what causes them, enable advancing the value for that table. Eventually, as all tables in all databases are scanned and their oldest multixact values are advanced, on-disk storage for older @@ -729,21 +729,21 @@ HINT: Stop the postmaster and vacuum that database in single-user mode. </para> <para> - The <quote>autovacuum daemon</> actually consists of multiple processes. + The <quote>autovacuum daemon</quote> actually consists of multiple processes. There is a persistent daemon process, called the <firstterm>autovacuum launcher</firstterm>, which is in charge of starting <firstterm>autovacuum worker</firstterm> processes for all databases. The launcher will distribute the work across time, attempting to start one worker within each database every <xref linkend="guc-autovacuum-naptime"> - seconds. (Therefore, if the installation has <replaceable>N</> databases, + seconds. (Therefore, if the installation has <replaceable>N</replaceable> databases, a new worker will be launched every - <varname>autovacuum_naptime</>/<replaceable>N</> seconds.) + <varname>autovacuum_naptime</varname>/<replaceable>N</replaceable> seconds.) A maximum of <xref linkend="guc-autovacuum-max-workers"> worker processes are allowed to run at the same time. If there are more than - <varname>autovacuum_max_workers</> databases to be processed, + <varname>autovacuum_max_workers</varname> databases to be processed, the next database will be processed as soon as the first worker finishes. Each worker process will check each table within its database and - execute <command>VACUUM</> and/or <command>ANALYZE</> as needed. + execute <command>VACUUM</command> and/or <command>ANALYZE</command> as needed. <xref linkend="guc-log-autovacuum-min-duration"> can be set to monitor autovacuum workers' activity. </para> @@ -761,7 +761,7 @@ HINT: Stop the postmaster and vacuum that database in single-user mode. </para> <para> - Tables whose <structfield>relfrozenxid</> value is more than + Tables whose <structfield>relfrozenxid</structfield> value is more than <xref linkend="guc-autovacuum-freeze-max-age"> transactions old are always vacuumed (this also applies to those tables whose freeze max age has been modified via storage parameters; see below). Otherwise, if the @@ -781,10 +781,10 @@ vacuum threshold = vacuum base threshold + vacuum scale factor * number of tuple collector; it is a semi-accurate count updated by each <command>UPDATE</command> and <command>DELETE</command> operation. (It is only semi-accurate because some information might be lost under heavy - load.) If the <structfield>relfrozenxid</> value of the table is more - than <varname>vacuum_freeze_table_age</> transactions old, an aggressive + load.) If the <structfield>relfrozenxid</structfield> value of the table is more + than <varname>vacuum_freeze_table_age</varname> transactions old, an aggressive vacuum is performed to freeze old tuples and advance - <structfield>relfrozenxid</>; otherwise, only pages that have been modified + <structfield>relfrozenxid</structfield>; otherwise, only pages that have been modified since the last vacuum are scanned. </para> @@ -821,8 +821,8 @@ analyze threshold = analyze base threshold + analyze scale factor * number of tu <quote>balanced</quote> among all the running workers, so that the total I/O impact on the system is the same regardless of the number of workers actually running. However, any workers processing tables whose - per-table <literal>autovacuum_vacuum_cost_delay</> or - <literal>autovacuum_vacuum_cost_limit</> storage parameters have been set + per-table <literal>autovacuum_vacuum_cost_delay</literal> or + <literal>autovacuum_vacuum_cost_limit</literal> storage parameters have been set are not considered in the balancing algorithm. </para> </sect2> @@ -872,7 +872,7 @@ analyze threshold = analyze base threshold + analyze scale factor * number of tu But since the command requires an exclusive table lock, it is often preferable to execute an index rebuild with a sequence of creation and replacement steps. Index types that support - <xref linkend="sql-createindex"> with the <literal>CONCURRENTLY</> + <xref linkend="sql-createindex"> with the <literal>CONCURRENTLY</literal> option can instead be recreated that way. If that is successful and the resulting index is valid, the original index can then be replaced by the newly built one using a combination of <xref linkend="sql-alterindex"> @@ -896,17 +896,17 @@ analyze threshold = analyze base threshold + analyze scale factor * number of tu <para> It is a good idea to save the database server's log output - somewhere, rather than just discarding it via <filename>/dev/null</>. + somewhere, rather than just discarding it via <filename>/dev/null</filename>. The log output is invaluable when diagnosing problems. However, the log output tends to be voluminous (especially at higher debug levels) so you won't want to save it - indefinitely. You need to <emphasis>rotate</> the log files so that + indefinitely. You need to <emphasis>rotate</emphasis> the log files so that new log files are started and old ones removed after a reasonable period of time. </para> <para> - If you simply direct the <systemitem>stderr</> of + If you simply direct the <systemitem>stderr</systemitem> of <command>postgres</command> into a file, you will have log output, but the only way to truncate the log file is to stop and restart @@ -917,13 +917,13 @@ analyze threshold = analyze base threshold + analyze scale factor * number of tu <para> A better approach is to send the server's - <systemitem>stderr</> output to some type of log rotation program. + <systemitem>stderr</systemitem> output to some type of log rotation program. There is a built-in log rotation facility, which you can use by - setting the configuration parameter <varname>logging_collector</> to - <literal>true</> in <filename>postgresql.conf</>. The control + setting the configuration parameter <varname>logging_collector</varname> to + <literal>true</literal> in <filename>postgresql.conf</filename>. The control parameters for this program are described in <xref linkend="runtime-config-logging-where">. You can also use this approach - to capture the log data in machine readable <acronym>CSV</> + to capture the log data in machine readable <acronym>CSV</acronym> (comma-separated values) format. </para> @@ -934,10 +934,10 @@ analyze threshold = analyze base threshold + analyze scale factor * number of tu tool included in the <productname>Apache</productname> distribution can be used with <productname>PostgreSQL</productname>. To do this, just pipe the server's - <systemitem>stderr</> output to the desired program. + <systemitem>stderr</systemitem> output to the desired program. If you start the server with - <command>pg_ctl</>, then <systemitem>stderr</> - is already redirected to <systemitem>stdout</>, so you just need a + <command>pg_ctl</command>, then <systemitem>stderr</systemitem> + is already redirected to <systemitem>stdout</systemitem>, so you just need a pipe command, for example: <programlisting> @@ -947,12 +947,12 @@ pg_ctl start | rotatelogs /var/log/pgsql_log 86400 <para> Another production-grade approach to managing log output is to - send it to <application>syslog</> and let - <application>syslog</> deal with file rotation. To do this, set the - configuration parameter <varname>log_destination</> to <literal>syslog</> - (to log to <application>syslog</> only) in - <filename>postgresql.conf</>. Then you can send a <literal>SIGHUP</literal> - signal to the <application>syslog</> daemon whenever you want to force it + send it to <application>syslog</application> and let + <application>syslog</application> deal with file rotation. To do this, set the + configuration parameter <varname>log_destination</varname> to <literal>syslog</literal> + (to log to <application>syslog</application> only) in + <filename>postgresql.conf</filename>. Then you can send a <literal>SIGHUP</literal> + signal to the <application>syslog</application> daemon whenever you want to force it to start writing a new log file. If you want to automate log rotation, the <application>logrotate</application> program can be configured to work with log files from @@ -960,12 +960,12 @@ pg_ctl start | rotatelogs /var/log/pgsql_log 86400 </para> <para> - On many systems, however, <application>syslog</> is not very reliable, + On many systems, however, <application>syslog</application> is not very reliable, particularly with large log messages; it might truncate or drop messages - just when you need them the most. Also, on <productname>Linux</>, - <application>syslog</> will flush each message to disk, yielding poor - performance. (You can use a <quote><literal>-</></> at the start of the file name - in the <application>syslog</> configuration file to disable syncing.) + just when you need them the most. Also, on <productname>Linux</productname>, + <application>syslog</application> will flush each message to disk, yielding poor + performance. (You can use a <quote><literal>-</literal></quote> at the start of the file name + in the <application>syslog</application> configuration file to disable syncing.) </para> <para> diff --git a/doc/src/sgml/manage-ag.sgml b/doc/src/sgml/manage-ag.sgml index fe1a6355c42..f0055382206 100644 --- a/doc/src/sgml/manage-ag.sgml +++ b/doc/src/sgml/manage-ag.sgml @@ -3,7 +3,7 @@ <chapter id="managing-databases"> <title>Managing Databases</title> - <indexterm zone="managing-databases"><primary>database</></> + <indexterm zone="managing-databases"><primary>database</primary></indexterm> <para> Every instance of a running <productname>PostgreSQL</productname> @@ -26,7 +26,7 @@ (<quote>database objects</quote>). Generally, every database object (tables, functions, etc.) belongs to one and only one database. (However there are a few system catalogs, for example - <literal>pg_database</>, that belong to a whole cluster and + <literal>pg_database</literal>, that belong to a whole cluster and are accessible from each database within the cluster.) More accurately, a database is a collection of schemas and the schemas contain the tables, functions, etc. So the full hierarchy is: @@ -41,7 +41,7 @@ connection. However, an application is not restricted in the number of connections it opens to the same or other databases. Databases are physically separated and access control is managed at the - connection level. If one <productname>PostgreSQL</> server + connection level. If one <productname>PostgreSQL</productname> server instance is to house projects or users that should be separate and for the most part unaware of each other, it is therefore recommended to put them into separate databases. If the projects @@ -53,23 +53,23 @@ </para> <para> - Databases are created with the <command>CREATE DATABASE</> command + Databases are created with the <command>CREATE DATABASE</command> command (see <xref linkend="manage-ag-createdb">) and destroyed with the - <command>DROP DATABASE</> command + <command>DROP DATABASE</command> command (see <xref linkend="manage-ag-dropdb">). To determine the set of existing databases, examine the - <structname>pg_database</> system catalog, for example + <structname>pg_database</structname> system catalog, for example <synopsis> SELECT datname FROM pg_database; </synopsis> - The <xref linkend="app-psql"> program's <literal>\l</> meta-command - and <option>-l</> command-line option are also useful for listing the + The <xref linkend="app-psql"> program's <literal>\l</literal> meta-command + and <option>-l</option> command-line option are also useful for listing the existing databases. </para> <note> <para> - The <acronym>SQL</> standard calls databases <quote>catalogs</>, but there + The <acronym>SQL</acronym> standard calls databases <quote>catalogs</quote>, but there is no difference in practice. </para> </note> @@ -78,10 +78,10 @@ SELECT datname FROM pg_database; <sect1 id="manage-ag-createdb"> <title>Creating a Database</title> - <indexterm><primary>CREATE DATABASE</></> + <indexterm><primary>CREATE DATABASE</primary></indexterm> <para> - In order to create a database, the <productname>PostgreSQL</> + In order to create a database, the <productname>PostgreSQL</productname> server must be up and running (see <xref linkend="server-start">). </para> @@ -90,9 +90,9 @@ SELECT datname FROM pg_database; Databases are created with the SQL command <xref linkend="sql-createdatabase">: <synopsis> -CREATE DATABASE <replaceable>name</>; +CREATE DATABASE <replaceable>name</replaceable>; </synopsis> - where <replaceable>name</> follows the usual rules for + where <replaceable>name</replaceable> follows the usual rules for <acronym>SQL</acronym> identifiers. The current role automatically becomes the owner of the new database. It is the privilege of the owner of a database to remove it later (which also removes all @@ -107,25 +107,25 @@ CREATE DATABASE <replaceable>name</>; <para> Since you need to be connected to the database server in order to execute the <command>CREATE DATABASE</command> command, the - question remains how the <emphasis>first</> database at any given + question remains how the <emphasis>first</emphasis> database at any given site can be created. The first database is always created by the - <command>initdb</> command when the data storage area is + <command>initdb</command> command when the data storage area is initialized. (See <xref linkend="creating-cluster">.) This database is called - <literal>postgres</>.<indexterm><primary>postgres</></> So to - create the first <quote>ordinary</> database you can connect to - <literal>postgres</>. + <literal>postgres</literal>.<indexterm><primary>postgres</primary></indexterm> So to + create the first <quote>ordinary</quote> database you can connect to + <literal>postgres</literal>. </para> <para> A second database, - <literal>template1</literal>,<indexterm><primary>template1</></> + <literal>template1</literal>,<indexterm><primary>template1</primary></indexterm> is also created during database cluster initialization. Whenever a new database is created within the cluster, <literal>template1</literal> is essentially cloned. - This means that any changes you make in <literal>template1</> are + This means that any changes you make in <literal>template1</literal> are propagated to all subsequently created databases. Because of this, - avoid creating objects in <literal>template1</> unless you want them + avoid creating objects in <literal>template1</literal> unless you want them propagated to every newly created database. More details appear in <xref linkend="manage-ag-templatedbs">. </para> @@ -133,17 +133,17 @@ CREATE DATABASE <replaceable>name</>; <para> As a convenience, there is a program you can execute from the shell to create new databases, - <command>createdb</>.<indexterm><primary>createdb</></> + <command>createdb</command>.<indexterm><primary>createdb</primary></indexterm> <synopsis> createdb <replaceable class="parameter">dbname</replaceable> </synopsis> - <command>createdb</> does no magic. It connects to the <literal>postgres</> - database and issues the <command>CREATE DATABASE</> command, + <command>createdb</command> does no magic. It connects to the <literal>postgres</literal> + database and issues the <command>CREATE DATABASE</command> command, exactly as described above. The <xref linkend="app-createdb"> reference page contains the invocation - details. Note that <command>createdb</> without any arguments will create + details. Note that <command>createdb</command> without any arguments will create a database with the current user name. </para> @@ -160,11 +160,11 @@ createdb <replaceable class="parameter">dbname</replaceable> configure and manage it themselves. To achieve that, use one of the following commands: <programlisting> -CREATE DATABASE <replaceable>dbname</> OWNER <replaceable>rolename</>; +CREATE DATABASE <replaceable>dbname</replaceable> OWNER <replaceable>rolename</replaceable>; </programlisting> from the SQL environment, or: <programlisting> -createdb -O <replaceable>rolename</> <replaceable>dbname</> +createdb -O <replaceable>rolename</replaceable> <replaceable>dbname</replaceable> </programlisting> from the shell. Only the superuser is allowed to create a database for @@ -176,55 +176,55 @@ createdb -O <replaceable>rolename</> <replaceable>dbname</> <title>Template Databases</title> <para> - <command>CREATE DATABASE</> actually works by copying an existing + <command>CREATE DATABASE</command> actually works by copying an existing database. By default, it copies the standard system database named - <literal>template1</>.<indexterm><primary>template1</></> Thus that - database is the <quote>template</> from which new databases are - made. If you add objects to <literal>template1</>, these objects + <literal>template1</literal>.<indexterm><primary>template1</primary></indexterm> Thus that + database is the <quote>template</quote> from which new databases are + made. If you add objects to <literal>template1</literal>, these objects will be copied into subsequently created user databases. This behavior allows site-local modifications to the standard set of objects in databases. For example, if you install the procedural - language <application>PL/Perl</> in <literal>template1</>, it will + language <application>PL/Perl</application> in <literal>template1</literal>, it will automatically be available in user databases without any extra action being taken when those databases are created. </para> <para> There is a second standard system database named - <literal>template0</>.<indexterm><primary>template0</></> This + <literal>template0</literal>.<indexterm><primary>template0</primary></indexterm> This database contains the same data as the initial contents of - <literal>template1</>, that is, only the standard objects + <literal>template1</literal>, that is, only the standard objects predefined by your version of - <productname>PostgreSQL</productname>. <literal>template0</> + <productname>PostgreSQL</productname>. <literal>template0</literal> should never be changed after the database cluster has been initialized. By instructing - <command>CREATE DATABASE</> to copy <literal>template0</> instead - of <literal>template1</>, you can create a <quote>virgin</> user + <command>CREATE DATABASE</command> to copy <literal>template0</literal> instead + of <literal>template1</literal>, you can create a <quote>virgin</quote> user database that contains none of the site-local additions in - <literal>template1</>. This is particularly handy when restoring a - <literal>pg_dump</> dump: the dump script should be restored in a + <literal>template1</literal>. This is particularly handy when restoring a + <literal>pg_dump</literal> dump: the dump script should be restored in a virgin database to ensure that one recreates the correct contents of the dumped database, without conflicting with objects that - might have been added to <literal>template1</> later on. + might have been added to <literal>template1</literal> later on. </para> <para> - Another common reason for copying <literal>template0</> instead - of <literal>template1</> is that new encoding and locale settings - can be specified when copying <literal>template0</>, whereas a copy - of <literal>template1</> must use the same settings it does. - This is because <literal>template1</> might contain encoding-specific - or locale-specific data, while <literal>template0</> is known not to. + Another common reason for copying <literal>template0</literal> instead + of <literal>template1</literal> is that new encoding and locale settings + can be specified when copying <literal>template0</literal>, whereas a copy + of <literal>template1</literal> must use the same settings it does. + This is because <literal>template1</literal> might contain encoding-specific + or locale-specific data, while <literal>template0</literal> is known not to. </para> <para> To create a database by copying <literal>template0</literal>, use: <programlisting> -CREATE DATABASE <replaceable>dbname</> TEMPLATE template0; +CREATE DATABASE <replaceable>dbname</replaceable> TEMPLATE template0; </programlisting> from the SQL environment, or: <programlisting> -createdb -T template0 <replaceable>dbname</> +createdb -T template0 <replaceable>dbname</replaceable> </programlisting> from the shell. </para> @@ -232,49 +232,49 @@ createdb -T template0 <replaceable>dbname</> <para> It is possible to create additional template databases, and indeed one can copy any database in a cluster by specifying its name - as the template for <command>CREATE DATABASE</>. It is important to + as the template for <command>CREATE DATABASE</command>. It is important to understand, however, that this is not (yet) intended as a general-purpose <quote><command>COPY DATABASE</command></quote> facility. The principal limitation is that no other sessions can be connected to the source database while it is being copied. <command>CREATE - DATABASE</> will fail if any other connection exists when it starts; + DATABASE</command> will fail if any other connection exists when it starts; during the copy operation, new connections to the source database are prevented. </para> <para> - Two useful flags exist in <literal>pg_database</literal><indexterm><primary>pg_database</></> for each + Two useful flags exist in <literal>pg_database</literal><indexterm><primary>pg_database</primary></indexterm> for each database: the columns <literal>datistemplate</literal> and <literal>datallowconn</literal>. <literal>datistemplate</literal> can be set to indicate that a database is intended as a template for - <command>CREATE DATABASE</>. If this flag is set, the database can be - cloned by any user with <literal>CREATEDB</> privileges; if it is not set, + <command>CREATE DATABASE</command>. If this flag is set, the database can be + cloned by any user with <literal>CREATEDB</literal> privileges; if it is not set, only superusers and the owner of the database can clone it. If <literal>datallowconn</literal> is false, then no new connections to that database will be allowed (but existing sessions are not terminated simply by setting the flag false). The <literal>template0</literal> - database is normally marked <literal>datallowconn = false</> to prevent its modification. + database is normally marked <literal>datallowconn = false</literal> to prevent its modification. Both <literal>template0</literal> and <literal>template1</literal> - should always be marked with <literal>datistemplate = true</>. + should always be marked with <literal>datistemplate = true</literal>. </para> <note> <para> - <literal>template1</> and <literal>template0</> do not have any special - status beyond the fact that the name <literal>template1</> is the default - source database name for <command>CREATE DATABASE</>. - For example, one could drop <literal>template1</> and recreate it from - <literal>template0</> without any ill effects. This course of action + <literal>template1</literal> and <literal>template0</literal> do not have any special + status beyond the fact that the name <literal>template1</literal> is the default + source database name for <command>CREATE DATABASE</command>. + For example, one could drop <literal>template1</literal> and recreate it from + <literal>template0</literal> without any ill effects. This course of action might be advisable if one has carelessly added a bunch of junk in - <literal>template1</>. (To delete <literal>template1</literal>, - it must have <literal>pg_database.datistemplate = false</>.) + <literal>template1</literal>. (To delete <literal>template1</literal>, + it must have <literal>pg_database.datistemplate = false</literal>.) </para> <para> - The <literal>postgres</> database is also created when a database + The <literal>postgres</literal> database is also created when a database cluster is initialized. This database is meant as a default database for users and applications to connect to. It is simply a copy of - <literal>template1</> and can be dropped and recreated if necessary. + <literal>template1</literal> and can be dropped and recreated if necessary. </para> </note> </sect1> @@ -284,7 +284,7 @@ createdb -T template0 <replaceable>dbname</> <para> Recall from <xref linkend="runtime-config"> that the - <productname>PostgreSQL</> server provides a large number of + <productname>PostgreSQL</productname> server provides a large number of run-time configuration variables. You can set database-specific default values for many of these settings. </para> @@ -305,8 +305,8 @@ ALTER DATABASE mydb SET geqo TO off; session started. Note that users can still alter this setting during their sessions; it will only be the default. To undo any such setting, use - <literal>ALTER DATABASE <replaceable>dbname</> RESET - <replaceable>varname</></literal>. + <literal>ALTER DATABASE <replaceable>dbname</replaceable> RESET + <replaceable>varname</replaceable></literal>. </para> </sect1> @@ -315,9 +315,9 @@ ALTER DATABASE mydb SET geqo TO off; <para> Databases are destroyed with the command - <xref linkend="sql-dropdatabase">:<indexterm><primary>DROP DATABASE</></> + <xref linkend="sql-dropdatabase">:<indexterm><primary>DROP DATABASE</primary></indexterm> <synopsis> -DROP DATABASE <replaceable>name</>; +DROP DATABASE <replaceable>name</replaceable>; </synopsis> Only the owner of the database, or a superuser, can drop a database. Dropping a database removes all objects @@ -329,19 +329,19 @@ DROP DATABASE <replaceable>name</>; <para> You cannot execute the <command>DROP DATABASE</command> command while connected to the victim database. You can, however, be - connected to any other database, including the <literal>template1</> + connected to any other database, including the <literal>template1</literal> database. - <literal>template1</> would be the only option for dropping the last user database of a + <literal>template1</literal> would be the only option for dropping the last user database of a given cluster. </para> <para> For convenience, there is also a shell program to drop - databases, <xref linkend="app-dropdb">:<indexterm><primary>dropdb</></> + databases, <xref linkend="app-dropdb">:<indexterm><primary>dropdb</primary></indexterm> <synopsis> dropdb <replaceable class="parameter">dbname</replaceable> </synopsis> - (Unlike <command>createdb</>, it is not the default action to drop + (Unlike <command>createdb</command>, it is not the default action to drop the database with the current user name.) </para> </sect1> @@ -354,7 +354,7 @@ dropdb <replaceable class="parameter">dbname</replaceable> </indexterm> <para> - Tablespaces in <productname>PostgreSQL</> allow database administrators to + Tablespaces in <productname>PostgreSQL</productname> allow database administrators to define locations in the file system where the files representing database objects can be stored. Once created, a tablespace can be referred to by name when creating database objects. @@ -362,7 +362,7 @@ dropdb <replaceable class="parameter">dbname</replaceable> <para> By using tablespaces, an administrator can control the disk layout - of a <productname>PostgreSQL</> installation. This is useful in at + of a <productname>PostgreSQL</productname> installation. This is useful in at least two ways. First, if the partition or volume on which the cluster was initialized runs out of space and cannot be extended, a tablespace can be created on a different partition and used @@ -397,12 +397,12 @@ dropdb <replaceable class="parameter">dbname</replaceable> <para> To define a tablespace, use the <xref linkend="sql-createtablespace"> - command, for example:<indexterm><primary>CREATE TABLESPACE</></>: + command, for example:<indexterm><primary>CREATE TABLESPACE</primary></indexterm>: <programlisting> CREATE TABLESPACE fastspace LOCATION '/ssd1/postgresql/data'; </programlisting> The location must be an existing, empty directory that is owned by - the <productname>PostgreSQL</> operating system user. All objects subsequently + the <productname>PostgreSQL</productname> operating system user. All objects subsequently created within the tablespace will be stored in files underneath this directory. The location must not be on removable or transient storage, as the cluster might fail to function if the tablespace is missing @@ -414,7 +414,7 @@ CREATE TABLESPACE fastspace LOCATION '/ssd1/postgresql/data'; There is usually not much point in making more than one tablespace per logical file system, since you cannot control the location of individual files within a logical file system. However, - <productname>PostgreSQL</> does not enforce any such limitation, and + <productname>PostgreSQL</productname> does not enforce any such limitation, and indeed it is not directly aware of the file system boundaries on your system. It just stores files in the directories you tell it to use. </para> @@ -423,15 +423,15 @@ CREATE TABLESPACE fastspace LOCATION '/ssd1/postgresql/data'; <para> Creation of the tablespace itself must be done as a database superuser, but after that you can allow ordinary database users to use it. - To do that, grant them the <literal>CREATE</> privilege on it. + To do that, grant them the <literal>CREATE</literal> privilege on it. </para> <para> Tables, indexes, and entire databases can be assigned to - particular tablespaces. To do so, a user with the <literal>CREATE</> + particular tablespaces. To do so, a user with the <literal>CREATE</literal> privilege on a given tablespace must pass the tablespace name as a parameter to the relevant command. For example, the following creates - a table in the tablespace <literal>space1</>: + a table in the tablespace <literal>space1</literal>: <programlisting> CREATE TABLE foo(i int) TABLESPACE space1; </programlisting> @@ -443,9 +443,9 @@ CREATE TABLE foo(i int) TABLESPACE space1; SET default_tablespace = space1; CREATE TABLE foo(i int); </programlisting> - When <varname>default_tablespace</> is set to anything but an empty - string, it supplies an implicit <literal>TABLESPACE</> clause for - <command>CREATE TABLE</> and <command>CREATE INDEX</> commands that + When <varname>default_tablespace</varname> is set to anything but an empty + string, it supplies an implicit <literal>TABLESPACE</literal> clause for + <command>CREATE TABLE</command> and <command>CREATE INDEX</command> commands that do not have an explicit one. </para> @@ -463,9 +463,9 @@ CREATE TABLE foo(i int); The tablespace associated with a database is used to store the system catalogs of that database. Furthermore, it is the default tablespace used for tables, indexes, and temporary files created within the database, - if no <literal>TABLESPACE</> clause is given and no other selection is - specified by <varname>default_tablespace</> or - <varname>temp_tablespaces</> (as appropriate). + if no <literal>TABLESPACE</literal> clause is given and no other selection is + specified by <varname>default_tablespace</varname> or + <varname>temp_tablespaces</varname> (as appropriate). If a database is created without specifying a tablespace for it, it uses the same tablespace as the template database it is copied from. </para> @@ -473,12 +473,12 @@ CREATE TABLE foo(i int); <para> Two tablespaces are automatically created when the database cluster is initialized. The - <literal>pg_global</> tablespace is used for shared system catalogs. The - <literal>pg_default</> tablespace is the default tablespace of the - <literal>template1</> and <literal>template0</> databases (and, therefore, + <literal>pg_global</literal> tablespace is used for shared system catalogs. The + <literal>pg_default</literal> tablespace is the default tablespace of the + <literal>template1</literal> and <literal>template0</literal> databases (and, therefore, will be the default tablespace for other databases as well, unless - overridden by a <literal>TABLESPACE</> clause in <command>CREATE - DATABASE</>). + overridden by a <literal>TABLESPACE</literal> clause in <command>CREATE + DATABASE</command>). </para> <para> @@ -501,25 +501,25 @@ CREATE TABLE foo(i int); <synopsis> SELECT spcname FROM pg_tablespace; </synopsis> - The <xref linkend="app-psql"> program's <literal>\db</> meta-command + The <xref linkend="app-psql"> program's <literal>\db</literal> meta-command is also useful for listing the existing tablespaces. </para> <para> - <productname>PostgreSQL</> makes use of symbolic links + <productname>PostgreSQL</productname> makes use of symbolic links to simplify the implementation of tablespaces. This - means that tablespaces can be used <emphasis>only</> on systems + means that tablespaces can be used <emphasis>only</emphasis> on systems that support symbolic links. </para> <para> - The directory <filename>$PGDATA/pg_tblspc</> contains symbolic links that + The directory <filename>$PGDATA/pg_tblspc</filename> contains symbolic links that point to each of the non-built-in tablespaces defined in the cluster. Although not recommended, it is possible to adjust the tablespace layout by hand by redefining these links. Under no circumstances perform this operation while the server is running. Note that in PostgreSQL 9.1 - and earlier you will also need to update the <structname>pg_tablespace</> - catalog with the new locations. (If you do not, <literal>pg_dump</> will + and earlier you will also need to update the <structname>pg_tablespace</structname> + catalog with the new locations. (If you do not, <literal>pg_dump</literal> will continue to output the old tablespace locations.) </para> diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index 18fb9c2aa68..6f8203355e7 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -24,11 +24,11 @@ analyzing performance. Most of this chapter is devoted to describing <productname>PostgreSQL</productname>'s statistics collector, but one should not neglect regular Unix monitoring programs such as - <command>ps</>, <command>top</>, <command>iostat</>, and <command>vmstat</>. + <command>ps</command>, <command>top</command>, <command>iostat</command>, and <command>vmstat</command>. Also, once one has identified a poorly-performing query, further investigation might be needed using <productname>PostgreSQL</productname>'s <xref linkend="sql-explain"> command. - <xref linkend="using-explain"> discusses <command>EXPLAIN</> + <xref linkend="using-explain"> discusses <command>EXPLAIN</command> and other methods for understanding the behavior of an individual query. </para> @@ -43,7 +43,7 @@ <para> On most Unix platforms, <productname>PostgreSQL</productname> modifies its - command title as reported by <command>ps</>, so that individual server + command title as reported by <command>ps</command>, so that individual server processes can readily be identified. A sample display is <screen> @@ -59,29 +59,29 @@ postgres 15606 0.0 0.0 58772 3052 ? Ss 18:07 0:00 postgres: tgl postgres 15610 0.0 0.0 58772 3056 ? Ss 18:07 0:00 postgres: tgl regression [local] idle in transaction </screen> - (The appropriate invocation of <command>ps</> varies across different + (The appropriate invocation of <command>ps</command> varies across different platforms, as do the details of what is shown. This example is from a recent Linux system.) The first process listed here is the master server process. The command arguments shown for it are the same ones used when it was launched. The next five processes are background worker processes automatically launched by the - master process. (The <quote>stats collector</> process will not be present + master process. (The <quote>stats collector</quote> process will not be present if you have set the system not to start the statistics collector; likewise - the <quote>autovacuum launcher</> process can be disabled.) + the <quote>autovacuum launcher</quote> process can be disabled.) Each of the remaining processes is a server process handling one client connection. Each such process sets its command line display in the form <screen> -postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <replaceable>activity</> +postgres: <replaceable>user</replaceable> <replaceable>database</replaceable> <replaceable>host</replaceable> <replaceable>activity</replaceable> </screen> The user, database, and (client) host items remain the same for the life of the client connection, but the activity indicator changes. - The activity can be <literal>idle</> (i.e., waiting for a client command), - <literal>idle in transaction</> (waiting for client inside a <command>BEGIN</> block), - or a command type name such as <literal>SELECT</>. Also, - <literal>waiting</> is appended if the server process is presently waiting + The activity can be <literal>idle</literal> (i.e., waiting for a client command), + <literal>idle in transaction</literal> (waiting for client inside a <command>BEGIN</command> block), + or a command type name such as <literal>SELECT</literal>. Also, + <literal>waiting</literal> is appended if the server process is presently waiting on a lock held by another session. In the above example we can infer that process 15606 is waiting for process 15610 to complete its transaction and thereby release some lock. (Process 15610 must be the blocker, because @@ -93,7 +93,7 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re <para> If <xref linkend="guc-cluster-name"> has been configured the - cluster name will also be shown in <command>ps</> output: + cluster name will also be shown in <command>ps</command> output: <screen> $ psql -c 'SHOW cluster_name' cluster_name @@ -122,8 +122,8 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser flags, not just one. In addition, your original invocation of the <command>postgres</command> command must have a shorter <command>ps</command> status display than that provided by each - server process. If you fail to do all three things, the <command>ps</> - output for each server process will be the original <command>postgres</> + server process. If you fail to do all three things, the <command>ps</command> + output for each server process will be the original <command>postgres</command> command line. </para> </tip> @@ -137,7 +137,7 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser </indexterm> <para> - <productname>PostgreSQL</productname>'s <firstterm>statistics collector</> + <productname>PostgreSQL</productname>'s <firstterm>statistics collector</firstterm> is a subsystem that supports collection and reporting of information about server activity. Presently, the collector can count accesses to tables and indexes in both disk-block and individual-row terms. It also tracks @@ -161,7 +161,7 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser Since collection of statistics adds some overhead to query execution, the system can be configured to collect or not collect information. This is controlled by configuration parameters that are normally set in - <filename>postgresql.conf</>. (See <xref linkend="runtime-config"> for + <filename>postgresql.conf</filename>. (See <xref linkend="runtime-config"> for details about setting configuration parameters.) </para> @@ -186,13 +186,13 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser </para> <para> - Normally these parameters are set in <filename>postgresql.conf</> so + Normally these parameters are set in <filename>postgresql.conf</filename> so that they apply to all server processes, but it is possible to turn them on or off in individual sessions using the <xref linkend="sql-set"> command. (To prevent ordinary users from hiding their activity from the administrator, only superusers are allowed to change these parameters with - <command>SET</>.) + <command>SET</command>.) </para> <para> @@ -201,7 +201,7 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser These files are stored in the directory named by the <xref linkend="guc-stats-temp-directory"> parameter, <filename>pg_stat_tmp</filename> by default. - For better performance, <varname>stats_temp_directory</> can be + For better performance, <varname>stats_temp_directory</varname> can be pointed at a RAM-based file system, decreasing physical I/O requirements. When the server shuts down cleanly, a permanent copy of the statistics data is stored in the <filename>pg_stat</filename> subdirectory, so that @@ -261,10 +261,10 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser <para> A transaction can also see its own statistics (as yet untransmitted to the - collector) in the views <structname>pg_stat_xact_all_tables</>, - <structname>pg_stat_xact_sys_tables</>, - <structname>pg_stat_xact_user_tables</>, and - <structname>pg_stat_xact_user_functions</>. These numbers do not act as + collector) in the views <structname>pg_stat_xact_all_tables</structname>, + <structname>pg_stat_xact_sys_tables</structname>, + <structname>pg_stat_xact_user_tables</structname>, and + <structname>pg_stat_xact_user_functions</structname>. These numbers do not act as stated above; instead they update continuously throughout the transaction. </para> @@ -293,7 +293,7 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser </row> <row> - <entry><structname>pg_stat_replication</><indexterm><primary>pg_stat_replication</primary></indexterm></entry> + <entry><structname>pg_stat_replication</structname><indexterm><primary>pg_stat_replication</primary></indexterm></entry> <entry>One row per WAL sender process, showing statistics about replication to that sender's connected standby server. See <xref linkend="pg-stat-replication-view"> for details. @@ -301,7 +301,7 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser </row> <row> - <entry><structname>pg_stat_wal_receiver</><indexterm><primary>pg_stat_wal_receiver</primary></indexterm></entry> + <entry><structname>pg_stat_wal_receiver</structname><indexterm><primary>pg_stat_wal_receiver</primary></indexterm></entry> <entry>Only one row, showing statistics about the WAL receiver from that receiver's connected server. See <xref linkend="pg-stat-wal-receiver-view"> for details. @@ -309,7 +309,7 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser </row> <row> - <entry><structname>pg_stat_subscription</><indexterm><primary>pg_stat_subscription</primary></indexterm></entry> + <entry><structname>pg_stat_subscription</structname><indexterm><primary>pg_stat_subscription</primary></indexterm></entry> <entry>At least one row per subscription, showing information about the subscription workers. See <xref linkend="pg-stat-subscription"> for details. @@ -317,7 +317,7 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser </row> <row> - <entry><structname>pg_stat_ssl</><indexterm><primary>pg_stat_ssl</primary></indexterm></entry> + <entry><structname>pg_stat_ssl</structname><indexterm><primary>pg_stat_ssl</primary></indexterm></entry> <entry>One row per connection (regular and replication), showing information about SSL used on this connection. See <xref linkend="pg-stat-ssl-view"> for details. @@ -325,9 +325,9 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser </row> <row> - <entry><structname>pg_stat_progress_vacuum</><indexterm><primary>pg_stat_progress_vacuum</primary></indexterm></entry> + <entry><structname>pg_stat_progress_vacuum</structname><indexterm><primary>pg_stat_progress_vacuum</primary></indexterm></entry> <entry>One row for each backend (including autovacuum worker processes) running - <command>VACUUM</>, showing current progress. + <command>VACUUM</command>, showing current progress. See <xref linkend='vacuum-progress-reporting'>. </entry> </row> @@ -349,7 +349,7 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser <tbody> <row> - <entry><structname>pg_stat_archiver</><indexterm><primary>pg_stat_archiver</primary></indexterm></entry> + <entry><structname>pg_stat_archiver</structname><indexterm><primary>pg_stat_archiver</primary></indexterm></entry> <entry>One row only, showing statistics about the WAL archiver process's activity. See <xref linkend="pg-stat-archiver-view"> for details. @@ -357,7 +357,7 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser </row> <row> - <entry><structname>pg_stat_bgwriter</><indexterm><primary>pg_stat_bgwriter</primary></indexterm></entry> + <entry><structname>pg_stat_bgwriter</structname><indexterm><primary>pg_stat_bgwriter</primary></indexterm></entry> <entry>One row only, showing statistics about the background writer process's activity. See <xref linkend="pg-stat-bgwriter-view"> for details. @@ -365,14 +365,14 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser </row> <row> - <entry><structname>pg_stat_database</><indexterm><primary>pg_stat_database</primary></indexterm></entry> + <entry><structname>pg_stat_database</structname><indexterm><primary>pg_stat_database</primary></indexterm></entry> <entry>One row per database, showing database-wide statistics. See <xref linkend="pg-stat-database-view"> for details. </entry> </row> <row> - <entry><structname>pg_stat_database_conflicts</><indexterm><primary>pg_stat_database_conflicts</primary></indexterm></entry> + <entry><structname>pg_stat_database_conflicts</structname><indexterm><primary>pg_stat_database_conflicts</primary></indexterm></entry> <entry> One row per database, showing database-wide statistics about query cancels due to conflict with recovery on standby servers. @@ -381,7 +381,7 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser </row> <row> - <entry><structname>pg_stat_all_tables</><indexterm><primary>pg_stat_all_tables</primary></indexterm></entry> + <entry><structname>pg_stat_all_tables</structname><indexterm><primary>pg_stat_all_tables</primary></indexterm></entry> <entry> One row for each table in the current database, showing statistics about accesses to that specific table. @@ -390,40 +390,40 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser </row> <row> - <entry><structname>pg_stat_sys_tables</><indexterm><primary>pg_stat_sys_tables</primary></indexterm></entry> - <entry>Same as <structname>pg_stat_all_tables</>, except that only + <entry><structname>pg_stat_sys_tables</structname><indexterm><primary>pg_stat_sys_tables</primary></indexterm></entry> + <entry>Same as <structname>pg_stat_all_tables</structname>, except that only system tables are shown.</entry> </row> <row> - <entry><structname>pg_stat_user_tables</><indexterm><primary>pg_stat_user_tables</primary></indexterm></entry> - <entry>Same as <structname>pg_stat_all_tables</>, except that only user + <entry><structname>pg_stat_user_tables</structname><indexterm><primary>pg_stat_user_tables</primary></indexterm></entry> + <entry>Same as <structname>pg_stat_all_tables</structname>, except that only user tables are shown.</entry> </row> <row> - <entry><structname>pg_stat_xact_all_tables</><indexterm><primary>pg_stat_xact_all_tables</primary></indexterm></entry> - <entry>Similar to <structname>pg_stat_all_tables</>, but counts actions - taken so far within the current transaction (which are <emphasis>not</> - yet included in <structname>pg_stat_all_tables</> and related views). + <entry><structname>pg_stat_xact_all_tables</structname><indexterm><primary>pg_stat_xact_all_tables</primary></indexterm></entry> + <entry>Similar to <structname>pg_stat_all_tables</structname>, but counts actions + taken so far within the current transaction (which are <emphasis>not</emphasis> + yet included in <structname>pg_stat_all_tables</structname> and related views). The columns for numbers of live and dead rows and vacuum and analyze actions are not present in this view.</entry> </row> <row> - <entry><structname>pg_stat_xact_sys_tables</><indexterm><primary>pg_stat_xact_sys_tables</primary></indexterm></entry> - <entry>Same as <structname>pg_stat_xact_all_tables</>, except that only + <entry><structname>pg_stat_xact_sys_tables</structname><indexterm><primary>pg_stat_xact_sys_tables</primary></indexterm></entry> + <entry>Same as <structname>pg_stat_xact_all_tables</structname>, except that only system tables are shown.</entry> </row> <row> - <entry><structname>pg_stat_xact_user_tables</><indexterm><primary>pg_stat_xact_user_tables</primary></indexterm></entry> - <entry>Same as <structname>pg_stat_xact_all_tables</>, except that only + <entry><structname>pg_stat_xact_user_tables</structname><indexterm><primary>pg_stat_xact_user_tables</primary></indexterm></entry> + <entry>Same as <structname>pg_stat_xact_all_tables</structname>, except that only user tables are shown.</entry> </row> <row> - <entry><structname>pg_stat_all_indexes</><indexterm><primary>pg_stat_all_indexes</primary></indexterm></entry> + <entry><structname>pg_stat_all_indexes</structname><indexterm><primary>pg_stat_all_indexes</primary></indexterm></entry> <entry> One row for each index in the current database, showing statistics about accesses to that specific index. @@ -432,19 +432,19 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser </row> <row> - <entry><structname>pg_stat_sys_indexes</><indexterm><primary>pg_stat_sys_indexes</primary></indexterm></entry> - <entry>Same as <structname>pg_stat_all_indexes</>, except that only + <entry><structname>pg_stat_sys_indexes</structname><indexterm><primary>pg_stat_sys_indexes</primary></indexterm></entry> + <entry>Same as <structname>pg_stat_all_indexes</structname>, except that only indexes on system tables are shown.</entry> </row> <row> - <entry><structname>pg_stat_user_indexes</><indexterm><primary>pg_stat_user_indexes</primary></indexterm></entry> - <entry>Same as <structname>pg_stat_all_indexes</>, except that only + <entry><structname>pg_stat_user_indexes</structname><indexterm><primary>pg_stat_user_indexes</primary></indexterm></entry> + <entry>Same as <structname>pg_stat_all_indexes</structname>, except that only indexes on user tables are shown.</entry> </row> <row> - <entry><structname>pg_statio_all_tables</><indexterm><primary>pg_statio_all_tables</primary></indexterm></entry> + <entry><structname>pg_statio_all_tables</structname><indexterm><primary>pg_statio_all_tables</primary></indexterm></entry> <entry> One row for each table in the current database, showing statistics about I/O on that specific table. @@ -453,19 +453,19 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser </row> <row> - <entry><structname>pg_statio_sys_tables</><indexterm><primary>pg_statio_sys_tables</primary></indexterm></entry> - <entry>Same as <structname>pg_statio_all_tables</>, except that only + <entry><structname>pg_statio_sys_tables</structname><indexterm><primary>pg_statio_sys_tables</primary></indexterm></entry> + <entry>Same as <structname>pg_statio_all_tables</structname>, except that only system tables are shown.</entry> </row> <row> - <entry><structname>pg_statio_user_tables</><indexterm><primary>pg_statio_user_tables</primary></indexterm></entry> - <entry>Same as <structname>pg_statio_all_tables</>, except that only + <entry><structname>pg_statio_user_tables</structname><indexterm><primary>pg_statio_user_tables</primary></indexterm></entry> + <entry>Same as <structname>pg_statio_all_tables</structname>, except that only user tables are shown.</entry> </row> <row> - <entry><structname>pg_statio_all_indexes</><indexterm><primary>pg_statio_all_indexes</primary></indexterm></entry> + <entry><structname>pg_statio_all_indexes</structname><indexterm><primary>pg_statio_all_indexes</primary></indexterm></entry> <entry> One row for each index in the current database, showing statistics about I/O on that specific index. @@ -474,19 +474,19 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser </row> <row> - <entry><structname>pg_statio_sys_indexes</><indexterm><primary>pg_statio_sys_indexes</primary></indexterm></entry> - <entry>Same as <structname>pg_statio_all_indexes</>, except that only + <entry><structname>pg_statio_sys_indexes</structname><indexterm><primary>pg_statio_sys_indexes</primary></indexterm></entry> + <entry>Same as <structname>pg_statio_all_indexes</structname>, except that only indexes on system tables are shown.</entry> </row> <row> - <entry><structname>pg_statio_user_indexes</><indexterm><primary>pg_statio_user_indexes</primary></indexterm></entry> - <entry>Same as <structname>pg_statio_all_indexes</>, except that only + <entry><structname>pg_statio_user_indexes</structname><indexterm><primary>pg_statio_user_indexes</primary></indexterm></entry> + <entry>Same as <structname>pg_statio_all_indexes</structname>, except that only indexes on user tables are shown.</entry> </row> <row> - <entry><structname>pg_statio_all_sequences</><indexterm><primary>pg_statio_all_sequences</primary></indexterm></entry> + <entry><structname>pg_statio_all_sequences</structname><indexterm><primary>pg_statio_all_sequences</primary></indexterm></entry> <entry> One row for each sequence in the current database, showing statistics about I/O on that specific sequence. @@ -495,20 +495,20 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser </row> <row> - <entry><structname>pg_statio_sys_sequences</><indexterm><primary>pg_statio_sys_sequences</primary></indexterm></entry> - <entry>Same as <structname>pg_statio_all_sequences</>, except that only + <entry><structname>pg_statio_sys_sequences</structname><indexterm><primary>pg_statio_sys_sequences</primary></indexterm></entry> + <entry>Same as <structname>pg_statio_all_sequences</structname>, except that only system sequences are shown. (Presently, no system sequences are defined, so this view is always empty.)</entry> </row> <row> - <entry><structname>pg_statio_user_sequences</><indexterm><primary>pg_statio_user_sequences</primary></indexterm></entry> - <entry>Same as <structname>pg_statio_all_sequences</>, except that only + <entry><structname>pg_statio_user_sequences</structname><indexterm><primary>pg_statio_user_sequences</primary></indexterm></entry> + <entry>Same as <structname>pg_statio_all_sequences</structname>, except that only user sequences are shown.</entry> </row> <row> - <entry><structname>pg_stat_user_functions</><indexterm><primary>pg_stat_user_functions</primary></indexterm></entry> + <entry><structname>pg_stat_user_functions</structname><indexterm><primary>pg_stat_user_functions</primary></indexterm></entry> <entry> One row for each tracked function, showing statistics about executions of that function. See @@ -517,10 +517,10 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser </row> <row> - <entry><structname>pg_stat_xact_user_functions</><indexterm><primary>pg_stat_xact_user_functions</primary></indexterm></entry> - <entry>Similar to <structname>pg_stat_user_functions</>, but counts only - calls during the current transaction (which are <emphasis>not</> - yet included in <structname>pg_stat_user_functions</>).</entry> + <entry><structname>pg_stat_xact_user_functions</structname><indexterm><primary>pg_stat_xact_user_functions</primary></indexterm></entry> + <entry>Similar to <structname>pg_stat_user_functions</structname>, but counts only + calls during the current transaction (which are <emphasis>not</emphasis> + yet included in <structname>pg_stat_user_functions</structname>).</entry> </row> </tbody> @@ -533,18 +533,18 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser </para> <para> - The <structname>pg_statio_</> views are primarily useful to + The <structname>pg_statio_</structname> views are primarily useful to determine the effectiveness of the buffer cache. When the number of actual disk reads is much smaller than the number of buffer hits, then the cache is satisfying most read requests without invoking a kernel call. However, these statistics do not give the - entire story: due to the way in which <productname>PostgreSQL</> + entire story: due to the way in which <productname>PostgreSQL</productname> handles disk I/O, data that is not in the - <productname>PostgreSQL</> buffer cache might still reside in the + <productname>PostgreSQL</productname> buffer cache might still reside in the kernel's I/O cache, and might therefore still be fetched without requiring a physical read. Users interested in obtaining more - detailed information on <productname>PostgreSQL</> I/O behavior are - advised to use the <productname>PostgreSQL</> statistics collector + detailed information on <productname>PostgreSQL</productname> I/O behavior are + advised to use the <productname>PostgreSQL</productname> statistics collector in combination with operating system utilities that allow insight into the kernel's handling of I/O. </para> @@ -564,39 +564,39 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser <tbody> <row> - <entry><structfield>datid</></entry> - <entry><type>oid</></entry> + <entry><structfield>datid</structfield></entry> + <entry><type>oid</type></entry> <entry>OID of the database this backend is connected to</entry> </row> <row> - <entry><structfield>datname</></entry> - <entry><type>name</></entry> + <entry><structfield>datname</structfield></entry> + <entry><type>name</type></entry> <entry>Name of the database this backend is connected to</entry> </row> <row> - <entry><structfield>pid</></entry> - <entry><type>integer</></entry> + <entry><structfield>pid</structfield></entry> + <entry><type>integer</type></entry> <entry>Process ID of this backend</entry> </row> <row> - <entry><structfield>usesysid</></entry> - <entry><type>oid</></entry> + <entry><structfield>usesysid</structfield></entry> + <entry><type>oid</type></entry> <entry>OID of the user logged into this backend</entry> </row> <row> - <entry><structfield>usename</></entry> - <entry><type>name</></entry> + <entry><structfield>usename</structfield></entry> + <entry><type>name</type></entry> <entry>Name of the user logged into this backend</entry> </row> <row> - <entry><structfield>application_name</></entry> - <entry><type>text</></entry> + <entry><structfield>application_name</structfield></entry> + <entry><type>text</type></entry> <entry>Name of the application that is connected to this backend</entry> </row> <row> - <entry><structfield>client_addr</></entry> - <entry><type>inet</></entry> + <entry><structfield>client_addr</structfield></entry> + <entry><type>inet</type></entry> <entry>IP address of the client connected to this backend. If this field is null, it indicates either that the client is connected via a Unix socket on the server machine or that this is an @@ -604,78 +604,78 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser </entry> </row> <row> - <entry><structfield>client_hostname</></entry> - <entry><type>text</></entry> + <entry><structfield>client_hostname</structfield></entry> + <entry><type>text</type></entry> <entry>Host name of the connected client, as reported by a - reverse DNS lookup of <structfield>client_addr</>. This field will + reverse DNS lookup of <structfield>client_addr</structfield>. This field will only be non-null for IP connections, and only when <xref linkend="guc-log-hostname"> is enabled. </entry> </row> <row> - <entry><structfield>client_port</></entry> - <entry><type>integer</></entry> + <entry><structfield>client_port</structfield></entry> + <entry><type>integer</type></entry> <entry>TCP port number that the client is using for communication - with this backend, or <literal>-1</> if a Unix socket is used + with this backend, or <literal>-1</literal> if a Unix socket is used </entry> </row> <row> - <entry><structfield>backend_start</></entry> - <entry><type>timestamp with time zone</></entry> + <entry><structfield>backend_start</structfield></entry> + <entry><type>timestamp with time zone</type></entry> <entry>Time when this process was started. For client backends, this is the time the client connected to the server. </entry> </row> <row> - <entry><structfield>xact_start</></entry> - <entry><type>timestamp with time zone</></entry> + <entry><structfield>xact_start</structfield></entry> + <entry><type>timestamp with time zone</type></entry> <entry>Time when this process' current transaction was started, or null if no transaction is active. If the current query is the first of its transaction, this column is equal to the - <structfield>query_start</> column. + <structfield>query_start</structfield> column. </entry> </row> <row> - <entry><structfield>query_start</></entry> - <entry><type>timestamp with time zone</></entry> + <entry><structfield>query_start</structfield></entry> + <entry><type>timestamp with time zone</type></entry> <entry>Time when the currently active query was started, or if - <structfield>state</> is not <literal>active</>, when the last query + <structfield>state</structfield> is not <literal>active</literal>, when the last query was started </entry> </row> <row> - <entry><structfield>state_change</></entry> - <entry><type>timestamp with time zone</></entry> - <entry>Time when the <structfield>state</> was last changed</entry> + <entry><structfield>state_change</structfield></entry> + <entry><type>timestamp with time zone</type></entry> + <entry>Time when the <structfield>state</structfield> was last changed</entry> </row> <row> - <entry><structfield>wait_event_type</></entry> - <entry><type>text</></entry> + <entry><structfield>wait_event_type</structfield></entry> + <entry><type>text</type></entry> <entry>The type of event for which the backend is waiting, if any; otherwise NULL. Possible values are: <itemizedlist> <listitem> <para> - <literal>LWLock</>: The backend is waiting for a lightweight lock. + <literal>LWLock</literal>: The backend is waiting for a lightweight lock. Each such lock protects a particular data structure in shared memory. - <literal>wait_event</> will contain a name identifying the purpose + <literal>wait_event</literal> will contain a name identifying the purpose of the lightweight lock. (Some locks have specific names; others are part of a group of locks each with a similar purpose.) </para> </listitem> <listitem> <para> - <literal>Lock</>: The backend is waiting for a heavyweight lock. + <literal>Lock</literal>: The backend is waiting for a heavyweight lock. Heavyweight locks, also known as lock manager locks or simply locks, primarily protect SQL-visible objects such as tables. However, they are also used to ensure mutual exclusion for certain internal - operations such as relation extension. <literal>wait_event</> will + operations such as relation extension. <literal>wait_event</literal> will identify the type of lock awaited. </para> </listitem> <listitem> <para> - <literal>BufferPin</>: The server process is waiting to access to + <literal>BufferPin</literal>: The server process is waiting to access to a data buffer during a period when no other process can be examining that buffer. Buffer pin waits can be protracted if another process holds an open cursor which last read data from the @@ -684,94 +684,94 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser </listitem> <listitem> <para> - <literal>Activity</>: The server process is idle. This is used by + <literal>Activity</literal>: The server process is idle. This is used by system processes waiting for activity in their main processing loop. - <literal>wait_event</> will identify the specific wait point. + <literal>wait_event</literal> will identify the specific wait point. </para> </listitem> <listitem> <para> - <literal>Extension</>: The server process is waiting for activity + <literal>Extension</literal>: The server process is waiting for activity in an extension module. This category is useful for modules to track custom waiting points. </para> </listitem> <listitem> <para> - <literal>Client</>: The server process is waiting for some activity + <literal>Client</literal>: The server process is waiting for some activity on a socket from user applications, and that the server expects something to happen that is independent from its internal processes. - <literal>wait_event</> will identify the specific wait point. + <literal>wait_event</literal> will identify the specific wait point. </para> </listitem> <listitem> <para> - <literal>IPC</>: The server process is waiting for some activity - from another process in the server. <literal>wait_event</> will + <literal>IPC</literal>: The server process is waiting for some activity + from another process in the server. <literal>wait_event</literal> will identify the specific wait point. </para> </listitem> <listitem> <para> - <literal>Timeout</>: The server process is waiting for a timeout - to expire. <literal>wait_event</> will identify the specific wait + <literal>Timeout</literal>: The server process is waiting for a timeout + to expire. <literal>wait_event</literal> will identify the specific wait point. </para> </listitem> <listitem> <para> - <literal>IO</>: The server process is waiting for a IO to complete. - <literal>wait_event</> will identify the specific wait point. + <literal>IO</literal>: The server process is waiting for a IO to complete. + <literal>wait_event</literal> will identify the specific wait point. </para> </listitem> </itemizedlist> </entry> </row> <row> - <entry><structfield>wait_event</></entry> - <entry><type>text</></entry> + <entry><structfield>wait_event</structfield></entry> + <entry><type>text</type></entry> <entry>Wait event name if backend is currently waiting, otherwise NULL. See <xref linkend="wait-event-table"> for details. </entry> </row> <row> - <entry><structfield>state</></entry> - <entry><type>text</></entry> + <entry><structfield>state</structfield></entry> + <entry><type>text</type></entry> <entry>Current overall state of this backend. Possible values are: <itemizedlist> <listitem> <para> - <literal>active</>: The backend is executing a query. + <literal>active</literal>: The backend is executing a query. </para> </listitem> <listitem> <para> - <literal>idle</>: The backend is waiting for a new client command. + <literal>idle</literal>: The backend is waiting for a new client command. </para> </listitem> <listitem> <para> - <literal>idle in transaction</>: The backend is in a transaction, + <literal>idle in transaction</literal>: The backend is in a transaction, but is not currently executing a query. </para> </listitem> <listitem> <para> - <literal>idle in transaction (aborted)</>: This state is similar to - <literal>idle in transaction</>, except one of the statements in + <literal>idle in transaction (aborted)</literal>: This state is similar to + <literal>idle in transaction</literal>, except one of the statements in the transaction caused an error. </para> </listitem> <listitem> <para> - <literal>fastpath function call</>: The backend is executing a + <literal>fastpath function call</literal>: The backend is executing a fast-path function. </para> </listitem> <listitem> <para> - <literal>disabled</>: This state is reported if <xref + <literal>disabled</literal>: This state is reported if <xref linkend="guc-track-activities"> is disabled in this backend. </para> </listitem> @@ -786,13 +786,13 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser <row> <entry><structfield>backend_xmin</structfield></entry> <entry><type>xid</type></entry> - <entry>The current backend's <literal>xmin</> horizon.</entry> + <entry>The current backend's <literal>xmin</literal> horizon.</entry> </row> <row> - <entry><structfield>query</></entry> - <entry><type>text</></entry> + <entry><structfield>query</structfield></entry> + <entry><type>text</type></entry> <entry>Text of this backend's most recent query. If - <structfield>state</> is <literal>active</> this field shows the + <structfield>state</structfield> is <literal>active</literal> this field shows the currently executing query. In all other states, it shows the last query that was executed. By default the query text is truncated at 1024 characters; this value can be changed via the parameter @@ -803,11 +803,11 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser <entry><structfield>backend_type</structfield></entry> <entry><type>text</type></entry> <entry>Type of current backend. Possible types are - <literal>autovacuum launcher</>, <literal>autovacuum worker</>, - <literal>background worker</>, <literal>background writer</>, - <literal>client backend</>, <literal>checkpointer</>, - <literal>startup</>, <literal>walreceiver</>, - <literal>walsender</> and <literal>walwriter</>. + <literal>autovacuum launcher</literal>, <literal>autovacuum worker</literal>, + <literal>background worker</literal>, <literal>background writer</literal>, + <literal>client backend</literal>, <literal>checkpointer</literal>, + <literal>startup</literal>, <literal>walreceiver</literal>, + <literal>walsender</literal> and <literal>walwriter</literal>. </entry> </row> </tbody> @@ -822,10 +822,10 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser <note> <para> - The <structfield>wait_event</> and <structfield>state</> columns are - independent. If a backend is in the <literal>active</> state, - it may or may not be <literal>waiting</> on some event. If the state - is <literal>active</> and <structfield>wait_event</> is non-null, it + The <structfield>wait_event</structfield> and <structfield>state</structfield> columns are + independent. If a backend is in the <literal>active</literal> state, + it may or may not be <literal>waiting</literal> on some event. If the state + is <literal>active</literal> and <structfield>wait_event</structfield> is non-null, it means that a query is being executed, but is being blocked somewhere in the system. </para> @@ -845,767 +845,767 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser <tbody> <row> - <entry morerows="62"><literal>LWLock</></entry> - <entry><literal>ShmemIndexLock</></entry> + <entry morerows="62"><literal>LWLock</literal></entry> + <entry><literal>ShmemIndexLock</literal></entry> <entry>Waiting to find or allocate space in shared memory.</entry> </row> <row> - <entry><literal>OidGenLock</></entry> + <entry><literal>OidGenLock</literal></entry> <entry>Waiting to allocate or assign an OID.</entry> </row> <row> - <entry><literal>XidGenLock</></entry> + <entry><literal>XidGenLock</literal></entry> <entry>Waiting to allocate or assign a transaction id.</entry> </row> <row> - <entry><literal>ProcArrayLock</></entry> + <entry><literal>ProcArrayLock</literal></entry> <entry>Waiting to get a snapshot or clearing a transaction id at transaction end.</entry> </row> <row> - <entry><literal>SInvalReadLock</></entry> + <entry><literal>SInvalReadLock</literal></entry> <entry>Waiting to retrieve or remove messages from shared invalidation queue.</entry> </row> <row> - <entry><literal>SInvalWriteLock</></entry> + <entry><literal>SInvalWriteLock</literal></entry> <entry>Waiting to add a message in shared invalidation queue.</entry> </row> <row> - <entry><literal>WALBufMappingLock</></entry> + <entry><literal>WALBufMappingLock</literal></entry> <entry>Waiting to replace a page in WAL buffers.</entry> </row> <row> - <entry><literal>WALWriteLock</></entry> + <entry><literal>WALWriteLock</literal></entry> <entry>Waiting for WAL buffers to be written to disk.</entry> </row> <row> - <entry><literal>ControlFileLock</></entry> + <entry><literal>ControlFileLock</literal></entry> <entry>Waiting to read or update the control file or creation of a new WAL file.</entry> </row> <row> - <entry><literal>CheckpointLock</></entry> + <entry><literal>CheckpointLock</literal></entry> <entry>Waiting to perform checkpoint.</entry> </row> <row> - <entry><literal>CLogControlLock</></entry> + <entry><literal>CLogControlLock</literal></entry> <entry>Waiting to read or update transaction status.</entry> </row> <row> - <entry><literal>SubtransControlLock</></entry> + <entry><literal>SubtransControlLock</literal></entry> <entry>Waiting to read or update sub-transaction information.</entry> </row> <row> - <entry><literal>MultiXactGenLock</></entry> + <entry><literal>MultiXactGenLock</literal></entry> <entry>Waiting to read or update shared multixact state.</entry> </row> <row> - <entry><literal>MultiXactOffsetControlLock</></entry> + <entry><literal>MultiXactOffsetControlLock</literal></entry> <entry>Waiting to read or update multixact offset mappings.</entry> </row> <row> - <entry><literal>MultiXactMemberControlLock</></entry> + <entry><literal>MultiXactMemberControlLock</literal></entry> <entry>Waiting to read or update multixact member mappings.</entry> </row> <row> - <entry><literal>RelCacheInitLock</></entry> + <entry><literal>RelCacheInitLock</literal></entry> <entry>Waiting to read or write relation cache initialization file.</entry> </row> <row> - <entry><literal>CheckpointerCommLock</></entry> + <entry><literal>CheckpointerCommLock</literal></entry> <entry>Waiting to manage fsync requests.</entry> </row> <row> - <entry><literal>TwoPhaseStateLock</></entry> + <entry><literal>TwoPhaseStateLock</literal></entry> <entry>Waiting to read or update the state of prepared transactions.</entry> </row> <row> - <entry><literal>TablespaceCreateLock</></entry> + <entry><literal>TablespaceCreateLock</literal></entry> <entry>Waiting to create or drop the tablespace.</entry> </row> <row> - <entry><literal>BtreeVacuumLock</></entry> + <entry><literal>BtreeVacuumLock</literal></entry> <entry>Waiting to read or update vacuum-related information for a B-tree index.</entry> </row> <row> - <entry><literal>AddinShmemInitLock</></entry> + <entry><literal>AddinShmemInitLock</literal></entry> <entry>Waiting to manage space allocation in shared memory.</entry> </row> <row> - <entry><literal>AutovacuumLock</></entry> + <entry><literal>AutovacuumLock</literal></entry> <entry>Autovacuum worker or launcher waiting to update or read the current state of autovacuum workers.</entry> </row> <row> - <entry><literal>AutovacuumScheduleLock</></entry> + <entry><literal>AutovacuumScheduleLock</literal></entry> <entry>Waiting to ensure that the table it has selected for a vacuum still needs vacuuming. </entry> </row> <row> - <entry><literal>SyncScanLock</></entry> + <entry><literal>SyncScanLock</literal></entry> <entry>Waiting to get the start location of a scan on a table for synchronized scans.</entry> </row> <row> - <entry><literal>RelationMappingLock</></entry> + <entry><literal>RelationMappingLock</literal></entry> <entry>Waiting to update the relation map file used to store catalog to filenode mapping. </entry> </row> <row> - <entry><literal>AsyncCtlLock</></entry> + <entry><literal>AsyncCtlLock</literal></entry> <entry>Waiting to read or update shared notification state.</entry> </row> <row> - <entry><literal>AsyncQueueLock</></entry> + <entry><literal>AsyncQueueLock</literal></entry> <entry>Waiting to read or update notification messages.</entry> </row> <row> - <entry><literal>SerializableXactHashLock</></entry> + <entry><literal>SerializableXactHashLock</literal></entry> <entry>Waiting to retrieve or store information about serializable transactions.</entry> </row> <row> - <entry><literal>SerializableFinishedListLock</></entry> + <entry><literal>SerializableFinishedListLock</literal></entry> <entry>Waiting to access the list of finished serializable transactions.</entry> </row> <row> - <entry><literal>SerializablePredicateLockListLock</></entry> + <entry><literal>SerializablePredicateLockListLock</literal></entry> <entry>Waiting to perform an operation on a list of locks held by serializable transactions.</entry> </row> <row> - <entry><literal>OldSerXidLock</></entry> + <entry><literal>OldSerXidLock</literal></entry> <entry>Waiting to read or record conflicting serializable transactions.</entry> </row> <row> - <entry><literal>SyncRepLock</></entry> + <entry><literal>SyncRepLock</literal></entry> <entry>Waiting to read or update information about synchronous replicas.</entry> </row> <row> - <entry><literal>BackgroundWorkerLock</></entry> + <entry><literal>BackgroundWorkerLock</literal></entry> <entry>Waiting to read or update background worker state.</entry> </row> <row> - <entry><literal>DynamicSharedMemoryControlLock</></entry> + <entry><literal>DynamicSharedMemoryControlLock</literal></entry> <entry>Waiting to read or update dynamic shared memory state.</entry> </row> <row> - <entry><literal>AutoFileLock</></entry> - <entry>Waiting to update the <filename>postgresql.auto.conf</> file.</entry> + <entry><literal>AutoFileLock</literal></entry> + <entry>Waiting to update the <filename>postgresql.auto.conf</filename> file.</entry> </row> <row> - <entry><literal>ReplicationSlotAllocationLock</></entry> + <entry><literal>ReplicationSlotAllocationLock</literal></entry> <entry>Waiting to allocate or free a replication slot.</entry> </row> <row> - <entry><literal>ReplicationSlotControlLock</></entry> + <entry><literal>ReplicationSlotControlLock</literal></entry> <entry>Waiting to read or update replication slot state.</entry> </row> <row> - <entry><literal>CommitTsControlLock</></entry> + <entry><literal>CommitTsControlLock</literal></entry> <entry>Waiting to read or update transaction commit timestamps.</entry> </row> <row> - <entry><literal>CommitTsLock</></entry> + <entry><literal>CommitTsLock</literal></entry> <entry>Waiting to read or update the last value set for the transaction timestamp.</entry> </row> <row> - <entry><literal>ReplicationOriginLock</></entry> + <entry><literal>ReplicationOriginLock</literal></entry> <entry>Waiting to setup, drop or use replication origin.</entry> </row> <row> - <entry><literal>MultiXactTruncationLock</></entry> + <entry><literal>MultiXactTruncationLock</literal></entry> <entry>Waiting to read or truncate multixact information.</entry> </row> <row> - <entry><literal>OldSnapshotTimeMapLock</></entry> + <entry><literal>OldSnapshotTimeMapLock</literal></entry> <entry>Waiting to read or update old snapshot control information.</entry> </row> <row> - <entry><literal>BackendRandomLock</></entry> + <entry><literal>BackendRandomLock</literal></entry> <entry>Waiting to generate a random number.</entry> </row> <row> - <entry><literal>LogicalRepWorkerLock</></entry> + <entry><literal>LogicalRepWorkerLock</literal></entry> <entry>Waiting for action on logical replication worker to finish.</entry> </row> <row> - <entry><literal>CLogTruncationLock</></entry> + <entry><literal>CLogTruncationLock</literal></entry> <entry>Waiting to truncate the write-ahead log or waiting for write-ahead log truncation to finish.</entry> </row> <row> - <entry><literal>clog</></entry> + <entry><literal>clog</literal></entry> <entry>Waiting for I/O on a clog (transaction status) buffer.</entry> </row> <row> - <entry><literal>commit_timestamp</></entry> + <entry><literal>commit_timestamp</literal></entry> <entry>Waiting for I/O on commit timestamp buffer.</entry> </row> <row> - <entry><literal>subtrans</></entry> + <entry><literal>subtrans</literal></entry> <entry>Waiting for I/O a subtransaction buffer.</entry> </row> <row> - <entry><literal>multixact_offset</></entry> + <entry><literal>multixact_offset</literal></entry> <entry>Waiting for I/O on a multixact offset buffer.</entry> </row> <row> - <entry><literal>multixact_member</></entry> + <entry><literal>multixact_member</literal></entry> <entry>Waiting for I/O on a multixact_member buffer.</entry> </row> <row> - <entry><literal>async</></entry> + <entry><literal>async</literal></entry> <entry>Waiting for I/O on an async (notify) buffer.</entry> </row> <row> - <entry><literal>oldserxid</></entry> + <entry><literal>oldserxid</literal></entry> <entry>Waiting to I/O on an oldserxid buffer.</entry> </row> <row> - <entry><literal>wal_insert</></entry> + <entry><literal>wal_insert</literal></entry> <entry>Waiting to insert WAL into a memory buffer.</entry> </row> <row> - <entry><literal>buffer_content</></entry> + <entry><literal>buffer_content</literal></entry> <entry>Waiting to read or write a data page in memory.</entry> </row> <row> - <entry><literal>buffer_io</></entry> + <entry><literal>buffer_io</literal></entry> <entry>Waiting for I/O on a data page.</entry> </row> <row> - <entry><literal>replication_origin</></entry> + <entry><literal>replication_origin</literal></entry> <entry>Waiting to read or update the replication progress.</entry> </row> <row> - <entry><literal>replication_slot_io</></entry> + <entry><literal>replication_slot_io</literal></entry> <entry>Waiting for I/O on a replication slot.</entry> </row> <row> - <entry><literal>proc</></entry> + <entry><literal>proc</literal></entry> <entry>Waiting to read or update the fast-path lock information.</entry> </row> <row> - <entry><literal>buffer_mapping</></entry> + <entry><literal>buffer_mapping</literal></entry> <entry>Waiting to associate a data block with a buffer in the buffer pool.</entry> </row> <row> - <entry><literal>lock_manager</></entry> + <entry><literal>lock_manager</literal></entry> <entry>Waiting to add or examine locks for backends, or waiting to join or exit a locking group (used by parallel query).</entry> </row> <row> - <entry><literal>predicate_lock_manager</></entry> + <entry><literal>predicate_lock_manager</literal></entry> <entry>Waiting to add or examine predicate lock information.</entry> </row> <row> - <entry><literal>parallel_query_dsa</></entry> + <entry><literal>parallel_query_dsa</literal></entry> <entry>Waiting for parallel query dynamic shared memory allocation lock.</entry> </row> <row> - <entry><literal>tbm</></entry> + <entry><literal>tbm</literal></entry> <entry>Waiting for TBM shared iterator lock.</entry> </row> <row> - <entry morerows="9"><literal>Lock</></entry> - <entry><literal>relation</></entry> + <entry morerows="9"><literal>Lock</literal></entry> + <entry><literal>relation</literal></entry> <entry>Waiting to acquire a lock on a relation.</entry> </row> <row> - <entry><literal>extend</></entry> + <entry><literal>extend</literal></entry> <entry>Waiting to extend a relation.</entry> </row> <row> - <entry><literal>page</></entry> + <entry><literal>page</literal></entry> <entry>Waiting to acquire a lock on page of a relation.</entry> </row> <row> - <entry><literal>tuple</></entry> + <entry><literal>tuple</literal></entry> <entry>Waiting to acquire a lock on a tuple.</entry> </row> <row> - <entry><literal>transactionid</></entry> + <entry><literal>transactionid</literal></entry> <entry>Waiting for a transaction to finish.</entry> </row> <row> - <entry><literal>virtualxid</></entry> + <entry><literal>virtualxid</literal></entry> <entry>Waiting to acquire a virtual xid lock.</entry> </row> <row> - <entry><literal>speculative token</></entry> + <entry><literal>speculative token</literal></entry> <entry>Waiting to acquire a speculative insertion lock.</entry> </row> <row> - <entry><literal>object</></entry> + <entry><literal>object</literal></entry> <entry>Waiting to acquire a lock on a non-relation database object.</entry> </row> <row> - <entry><literal>userlock</></entry> + <entry><literal>userlock</literal></entry> <entry>Waiting to acquire a user lock.</entry> </row> <row> - <entry><literal>advisory</></entry> + <entry><literal>advisory</literal></entry> <entry>Waiting to acquire an advisory user lock.</entry> </row> <row> - <entry><literal>BufferPin</></entry> - <entry><literal>BufferPin</></entry> + <entry><literal>BufferPin</literal></entry> + <entry><literal>BufferPin</literal></entry> <entry>Waiting to acquire a pin on a buffer.</entry> </row> <row> - <entry morerows="13"><literal>Activity</></entry> - <entry><literal>ArchiverMain</></entry> + <entry morerows="13"><literal>Activity</literal></entry> + <entry><literal>ArchiverMain</literal></entry> <entry>Waiting in main loop of the archiver process.</entry> </row> <row> - <entry><literal>AutoVacuumMain</></entry> + <entry><literal>AutoVacuumMain</literal></entry> <entry>Waiting in main loop of autovacuum launcher process.</entry> </row> <row> - <entry><literal>BgWriterHibernate</></entry> + <entry><literal>BgWriterHibernate</literal></entry> <entry>Waiting in background writer process, hibernating.</entry> </row> <row> - <entry><literal>BgWriterMain</></entry> + <entry><literal>BgWriterMain</literal></entry> <entry>Waiting in main loop of background writer process background worker.</entry> </row> <row> - <entry><literal>CheckpointerMain</></entry> + <entry><literal>CheckpointerMain</literal></entry> <entry>Waiting in main loop of checkpointer process.</entry> </row> <row> - <entry><literal>LogicalLauncherMain</></entry> + <entry><literal>LogicalLauncherMain</literal></entry> <entry>Waiting in main loop of logical launcher process.</entry> </row> <row> - <entry><literal>LogicalApplyMain</></entry> + <entry><literal>LogicalApplyMain</literal></entry> <entry>Waiting in main loop of logical apply process.</entry> </row> <row> - <entry><literal>PgStatMain</></entry> + <entry><literal>PgStatMain</literal></entry> <entry>Waiting in main loop of the statistics collector process.</entry> </row> <row> - <entry><literal>RecoveryWalAll</></entry> + <entry><literal>RecoveryWalAll</literal></entry> <entry>Waiting for WAL from any kind of source (local, archive or stream) at recovery.</entry> </row> <row> - <entry><literal>RecoveryWalStream</></entry> + <entry><literal>RecoveryWalStream</literal></entry> <entry>Waiting for WAL from a stream at recovery.</entry> </row> <row> - <entry><literal>SysLoggerMain</></entry> + <entry><literal>SysLoggerMain</literal></entry> <entry>Waiting in main loop of syslogger process.</entry> </row> <row> - <entry><literal>WalReceiverMain</></entry> + <entry><literal>WalReceiverMain</literal></entry> <entry>Waiting in main loop of WAL receiver process.</entry> </row> <row> - <entry><literal>WalSenderMain</></entry> + <entry><literal>WalSenderMain</literal></entry> <entry>Waiting in main loop of WAL sender process.</entry> </row> <row> - <entry><literal>WalWriterMain</></entry> + <entry><literal>WalWriterMain</literal></entry> <entry>Waiting in main loop of WAL writer process.</entry> </row> <row> - <entry morerows="7"><literal>Client</></entry> - <entry><literal>ClientRead</></entry> + <entry morerows="7"><literal>Client</literal></entry> + <entry><literal>ClientRead</literal></entry> <entry>Waiting to read data from the client.</entry> </row> <row> - <entry><literal>ClientWrite</></entry> + <entry><literal>ClientWrite</literal></entry> <entry>Waiting to write data from the client.</entry> </row> <row> - <entry><literal>LibPQWalReceiverConnect</></entry> + <entry><literal>LibPQWalReceiverConnect</literal></entry> <entry>Waiting in WAL receiver to establish connection to remote server.</entry> </row> <row> - <entry><literal>LibPQWalReceiverReceive</></entry> + <entry><literal>LibPQWalReceiverReceive</literal></entry> <entry>Waiting in WAL receiver to receive data from remote server.</entry> </row> <row> - <entry><literal>SSLOpenServer</></entry> + <entry><literal>SSLOpenServer</literal></entry> <entry>Waiting for SSL while attempting connection.</entry> </row> <row> - <entry><literal>WalReceiverWaitStart</></entry> + <entry><literal>WalReceiverWaitStart</literal></entry> <entry>Waiting for startup process to send initial data for streaming replication.</entry> </row> <row> - <entry><literal>WalSenderWaitForWAL</></entry> + <entry><literal>WalSenderWaitForWAL</literal></entry> <entry>Waiting for WAL to be flushed in WAL sender process.</entry> </row> <row> - <entry><literal>WalSenderWriteData</></entry> + <entry><literal>WalSenderWriteData</literal></entry> <entry>Waiting for any activity when processing replies from WAL receiver in WAL sender process.</entry> </row> <row> - <entry><literal>Extension</></entry> - <entry><literal>Extension</></entry> + <entry><literal>Extension</literal></entry> + <entry><literal>Extension</literal></entry> <entry>Waiting in an extension.</entry> </row> <row> - <entry morerows="17"><literal>IPC</></entry> - <entry><literal>BgWorkerShutdown</></entry> + <entry morerows="17"><literal>IPC</literal></entry> + <entry><literal>BgWorkerShutdown</literal></entry> <entry>Waiting for background worker to shut down.</entry> </row> <row> - <entry><literal>BgWorkerStartup</></entry> + <entry><literal>BgWorkerStartup</literal></entry> <entry>Waiting for background worker to start up.</entry> </row> <row> - <entry><literal>BtreePage</></entry> + <entry><literal>BtreePage</literal></entry> <entry>Waiting for the page number needed to continue a parallel B-tree scan to become available.</entry> </row> <row> - <entry><literal>ExecuteGather</></entry> - <entry>Waiting for activity from child process when executing <literal>Gather</> node.</entry> + <entry><literal>ExecuteGather</literal></entry> + <entry>Waiting for activity from child process when executing <literal>Gather</literal> node.</entry> </row> <row> - <entry><literal>LogicalSyncData</></entry> + <entry><literal>LogicalSyncData</literal></entry> <entry>Waiting for logical replication remote server to send data for initial table synchronization.</entry> </row> <row> - <entry><literal>LogicalSyncStateChange</></entry> + <entry><literal>LogicalSyncStateChange</literal></entry> <entry>Waiting for logical replication remote server to change state.</entry> </row> <row> - <entry><literal>MessageQueueInternal</></entry> + <entry><literal>MessageQueueInternal</literal></entry> <entry>Waiting for other process to be attached in shared message queue.</entry> </row> <row> - <entry><literal>MessageQueuePutMessage</></entry> + <entry><literal>MessageQueuePutMessage</literal></entry> <entry>Waiting to write a protocol message to a shared message queue.</entry> </row> <row> - <entry><literal>MessageQueueReceive</></entry> + <entry><literal>MessageQueueReceive</literal></entry> <entry>Waiting to receive bytes from a shared message queue.</entry> </row> <row> - <entry><literal>MessageQueueSend</></entry> + <entry><literal>MessageQueueSend</literal></entry> <entry>Waiting to send bytes to a shared message queue.</entry> </row> <row> - <entry><literal>ParallelFinish</></entry> + <entry><literal>ParallelFinish</literal></entry> <entry>Waiting for parallel workers to finish computing.</entry> </row> <row> - <entry><literal>ParallelBitmapScan</></entry> + <entry><literal>ParallelBitmapScan</literal></entry> <entry>Waiting for parallel bitmap scan to become initialized.</entry> </row> <row> - <entry><literal>ProcArrayGroupUpdate</></entry> + <entry><literal>ProcArrayGroupUpdate</literal></entry> <entry>Waiting for group leader to clear transaction id at transaction end.</entry> </row> <row> - <entry><literal>ClogGroupUpdate</></entry> + <entry><literal>ClogGroupUpdate</literal></entry> <entry>Waiting for group leader to update transaction status at transaction end.</entry> </row> <row> - <entry><literal>ReplicationOriginDrop</></entry> + <entry><literal>ReplicationOriginDrop</literal></entry> <entry>Waiting for a replication origin to become inactive to be dropped.</entry> </row> <row> - <entry><literal>ReplicationSlotDrop</></entry> + <entry><literal>ReplicationSlotDrop</literal></entry> <entry>Waiting for a replication slot to become inactive to be dropped.</entry> </row> <row> - <entry><literal>SafeSnapshot</></entry> - <entry>Waiting for a snapshot for a <literal>READ ONLY DEFERRABLE</> transaction.</entry> + <entry><literal>SafeSnapshot</literal></entry> + <entry>Waiting for a snapshot for a <literal>READ ONLY DEFERRABLE</literal> transaction.</entry> </row> <row> - <entry><literal>SyncRep</></entry> + <entry><literal>SyncRep</literal></entry> <entry>Waiting for confirmation from remote server during synchronous replication.</entry> </row> <row> - <entry morerows="2"><literal>Timeout</></entry> - <entry><literal>BaseBackupThrottle</></entry> + <entry morerows="2"><literal>Timeout</literal></entry> + <entry><literal>BaseBackupThrottle</literal></entry> <entry>Waiting during base backup when throttling activity.</entry> </row> <row> - <entry><literal>PgSleep</></entry> - <entry>Waiting in process that called <function>pg_sleep</>.</entry> + <entry><literal>PgSleep</literal></entry> + <entry>Waiting in process that called <function>pg_sleep</function>.</entry> </row> <row> - <entry><literal>RecoveryApplyDelay</></entry> + <entry><literal>RecoveryApplyDelay</literal></entry> <entry>Waiting to apply WAL at recovery because it is delayed.</entry> </row> <row> - <entry morerows="65"><literal>IO</></entry> - <entry><literal>BufFileRead</></entry> + <entry morerows="65"><literal>IO</literal></entry> + <entry><literal>BufFileRead</literal></entry> <entry>Waiting for a read from a buffered file.</entry> </row> <row> - <entry><literal>BufFileWrite</></entry> + <entry><literal>BufFileWrite</literal></entry> <entry>Waiting for a write to a buffered file.</entry> </row> <row> - <entry><literal>ControlFileRead</></entry> + <entry><literal>ControlFileRead</literal></entry> <entry>Waiting for a read from the control file.</entry> </row> <row> - <entry><literal>ControlFileSync</></entry> + <entry><literal>ControlFileSync</literal></entry> <entry>Waiting for the control file to reach stable storage.</entry> </row> <row> - <entry><literal>ControlFileSyncUpdate</></entry> + <entry><literal>ControlFileSyncUpdate</literal></entry> <entry>Waiting for an update to the control file to reach stable storage.</entry> </row> <row> - <entry><literal>ControlFileWrite</></entry> + <entry><literal>ControlFileWrite</literal></entry> <entry>Waiting for a write to the control file.</entry> </row> <row> - <entry><literal>ControlFileWriteUpdate</></entry> + <entry><literal>ControlFileWriteUpdate</literal></entry> <entry>Waiting for a write to update the control file.</entry> </row> <row> - <entry><literal>CopyFileRead</></entry> + <entry><literal>CopyFileRead</literal></entry> <entry>Waiting for a read during a file copy operation.</entry> </row> <row> - <entry><literal>CopyFileWrite</></entry> + <entry><literal>CopyFileWrite</literal></entry> <entry>Waiting for a write during a file copy operation.</entry> </row> <row> - <entry><literal>DataFileExtend</></entry> + <entry><literal>DataFileExtend</literal></entry> <entry>Waiting for a relation data file to be extended.</entry> </row> <row> - <entry><literal>DataFileFlush</></entry> + <entry><literal>DataFileFlush</literal></entry> <entry>Waiting for a relation data file to reach stable storage.</entry> </row> <row> - <entry><literal>DataFileImmediateSync</></entry> + <entry><literal>DataFileImmediateSync</literal></entry> <entry>Waiting for an immediate synchronization of a relation data file to stable storage.</entry> </row> <row> - <entry><literal>DataFilePrefetch</></entry> + <entry><literal>DataFilePrefetch</literal></entry> <entry>Waiting for an asynchronous prefetch from a relation data file.</entry> </row> <row> - <entry><literal>DataFileRead</></entry> + <entry><literal>DataFileRead</literal></entry> <entry>Waiting for a read from a relation data file.</entry> </row> <row> - <entry><literal>DataFileSync</></entry> + <entry><literal>DataFileSync</literal></entry> <entry>Waiting for changes to a relation data file to reach stable storage.</entry> </row> <row> - <entry><literal>DataFileTruncate</></entry> + <entry><literal>DataFileTruncate</literal></entry> <entry>Waiting for a relation data file to be truncated.</entry> </row> <row> - <entry><literal>DataFileWrite</></entry> + <entry><literal>DataFileWrite</literal></entry> <entry>Waiting for a write to a relation data file.</entry> </row> <row> - <entry><literal>DSMFillZeroWrite</></entry> + <entry><literal>DSMFillZeroWrite</literal></entry> <entry>Waiting to write zero bytes to a dynamic shared memory backing file.</entry> </row> <row> - <entry><literal>LockFileAddToDataDirRead</></entry> + <entry><literal>LockFileAddToDataDirRead</literal></entry> <entry>Waiting for a read while adding a line to the data directory lock file.</entry> </row> <row> - <entry><literal>LockFileAddToDataDirSync</></entry> + <entry><literal>LockFileAddToDataDirSync</literal></entry> <entry>Waiting for data to reach stable storage while adding a line to the data directory lock file.</entry> </row> <row> - <entry><literal>LockFileAddToDataDirWrite</></entry> + <entry><literal>LockFileAddToDataDirWrite</literal></entry> <entry>Waiting for a write while adding a line to the data directory lock file.</entry> </row> <row> - <entry><literal>LockFileCreateRead</></entry> + <entry><literal>LockFileCreateRead</literal></entry> <entry>Waiting to read while creating the data directory lock file.</entry> </row> <row> - <entry><literal>LockFileCreateSync</></entry> + <entry><literal>LockFileCreateSync</literal></entry> <entry>Waiting for data to reach stable storage while creating the data directory lock file.</entry> </row> <row> - <entry><literal>LockFileCreateWrite</></entry> + <entry><literal>LockFileCreateWrite</literal></entry> <entry>Waiting for a write while creating the data directory lock file.</entry> </row> <row> - <entry><literal>LockFileReCheckDataDirRead</></entry> + <entry><literal>LockFileReCheckDataDirRead</literal></entry> <entry>Waiting for a read during recheck of the data directory lock file.</entry> </row> <row> - <entry><literal>LogicalRewriteCheckpointSync</></entry> + <entry><literal>LogicalRewriteCheckpointSync</literal></entry> <entry>Waiting for logical rewrite mappings to reach stable storage during a checkpoint.</entry> </row> <row> - <entry><literal>LogicalRewriteMappingSync</></entry> + <entry><literal>LogicalRewriteMappingSync</literal></entry> <entry>Waiting for mapping data to reach stable storage during a logical rewrite.</entry> </row> <row> - <entry><literal>LogicalRewriteMappingWrite</></entry> + <entry><literal>LogicalRewriteMappingWrite</literal></entry> <entry>Waiting for a write of mapping data during a logical rewrite.</entry> </row> <row> - <entry><literal>LogicalRewriteSync</></entry> + <entry><literal>LogicalRewriteSync</literal></entry> <entry>Waiting for logical rewrite mappings to reach stable storage.</entry> </row> <row> - <entry><literal>LogicalRewriteWrite</></entry> + <entry><literal>LogicalRewriteWrite</literal></entry> <entry>Waiting for a write of logical rewrite mappings.</entry> </row> <row> - <entry><literal>RelationMapRead</></entry> + <entry><literal>RelationMapRead</literal></entry> <entry>Waiting for a read of the relation map file.</entry> </row> <row> - <entry><literal>RelationMapSync</></entry> + <entry><literal>RelationMapSync</literal></entry> <entry>Waiting for the relation map file to reach stable storage.</entry> </row> <row> - <entry><literal>RelationMapWrite</></entry> + <entry><literal>RelationMapWrite</literal></entry> <entry>Waiting for a write to the relation map file.</entry> </row> <row> - <entry><literal>ReorderBufferRead</></entry> + <entry><literal>ReorderBufferRead</literal></entry> <entry>Waiting for a read during reorder buffer management.</entry> </row> <row> - <entry><literal>ReorderBufferWrite</></entry> + <entry><literal>ReorderBufferWrite</literal></entry> <entry>Waiting for a write during reorder buffer management.</entry> </row> <row> - <entry><literal>ReorderLogicalMappingRead</></entry> + <entry><literal>ReorderLogicalMappingRead</literal></entry> <entry>Waiting for a read of a logical mapping during reorder buffer management.</entry> </row> <row> - <entry><literal>ReplicationSlotRead</></entry> + <entry><literal>ReplicationSlotRead</literal></entry> <entry>Waiting for a read from a replication slot control file.</entry> </row> <row> - <entry><literal>ReplicationSlotRestoreSync</></entry> + <entry><literal>ReplicationSlotRestoreSync</literal></entry> <entry>Waiting for a replication slot control file to reach stable storage while restoring it to memory.</entry> </row> <row> - <entry><literal>ReplicationSlotSync</></entry> + <entry><literal>ReplicationSlotSync</literal></entry> <entry>Waiting for a replication slot control file to reach stable storage.</entry> </row> <row> - <entry><literal>ReplicationSlotWrite</></entry> + <entry><literal>ReplicationSlotWrite</literal></entry> <entry>Waiting for a write to a replication slot control file.</entry> </row> <row> - <entry><literal>SLRUFlushSync</></entry> + <entry><literal>SLRUFlushSync</literal></entry> <entry>Waiting for SLRU data to reach stable storage during a checkpoint or database shutdown.</entry> </row> <row> - <entry><literal>SLRURead</></entry> + <entry><literal>SLRURead</literal></entry> <entry>Waiting for a read of an SLRU page.</entry> </row> <row> - <entry><literal>SLRUSync</></entry> + <entry><literal>SLRUSync</literal></entry> <entry>Waiting for SLRU data to reach stable storage following a page write.</entry> </row> <row> - <entry><literal>SLRUWrite</></entry> + <entry><literal>SLRUWrite</literal></entry> <entry>Waiting for a write of an SLRU page.</entry> </row> <row> - <entry><literal>SnapbuildRead</></entry> + <entry><literal>SnapbuildRead</literal></entry> <entry>Waiting for a read of a serialized historical catalog snapshot.</entry> </row> <row> - <entry><literal>SnapbuildSync</></entry> + <entry><literal>SnapbuildSync</literal></entry> <entry>Waiting for a serialized historical catalog snapshot to reach stable storage.</entry> </row> <row> - <entry><literal>SnapbuildWrite</></entry> + <entry><literal>SnapbuildWrite</literal></entry> <entry>Waiting for a write of a serialized historical catalog snapshot.</entry> </row> <row> - <entry><literal>TimelineHistoryFileSync</></entry> + <entry><literal>TimelineHistoryFileSync</literal></entry> <entry>Waiting for a timeline history file received via streaming replication to reach stable storage.</entry> </row> <row> - <entry><literal>TimelineHistoryFileWrite</></entry> + <entry><literal>TimelineHistoryFileWrite</literal></entry> <entry>Waiting for a write of a timeline history file received via streaming replication.</entry> </row> <row> - <entry><literal>TimelineHistoryRead</></entry> + <entry><literal>TimelineHistoryRead</literal></entry> <entry>Waiting for a read of a timeline history file.</entry> </row> <row> - <entry><literal>TimelineHistorySync</></entry> + <entry><literal>TimelineHistorySync</literal></entry> <entry>Waiting for a newly created timeline history file to reach stable storage.</entry> </row> <row> - <entry><literal>TimelineHistoryWrite</></entry> + <entry><literal>TimelineHistoryWrite</literal></entry> <entry>Waiting for a write of a newly created timeline history file.</entry> </row> <row> - <entry><literal>TwophaseFileRead</></entry> + <entry><literal>TwophaseFileRead</literal></entry> <entry>Waiting for a read of a two phase state file.</entry> </row> <row> - <entry><literal>TwophaseFileSync</></entry> + <entry><literal>TwophaseFileSync</literal></entry> <entry>Waiting for a two phase state file to reach stable storage.</entry> </row> <row> - <entry><literal>TwophaseFileWrite</></entry> + <entry><literal>TwophaseFileWrite</literal></entry> <entry>Waiting for a write of a two phase state file.</entry> </row> <row> - <entry><literal>WALBootstrapSync</></entry> + <entry><literal>WALBootstrapSync</literal></entry> <entry>Waiting for WAL to reach stable storage during bootstrapping.</entry> </row> <row> - <entry><literal>WALBootstrapWrite</></entry> + <entry><literal>WALBootstrapWrite</literal></entry> <entry>Waiting for a write of a WAL page during bootstrapping.</entry> </row> <row> - <entry><literal>WALCopyRead</></entry> + <entry><literal>WALCopyRead</literal></entry> <entry>Waiting for a read when creating a new WAL segment by copying an existing one.</entry> </row> <row> - <entry><literal>WALCopySync</></entry> + <entry><literal>WALCopySync</literal></entry> <entry>Waiting a new WAL segment created by copying an existing one to reach stable storage.</entry> </row> <row> - <entry><literal>WALCopyWrite</></entry> + <entry><literal>WALCopyWrite</literal></entry> <entry>Waiting for a write when creating a new WAL segment by copying an existing one.</entry> </row> <row> - <entry><literal>WALInitSync</></entry> + <entry><literal>WALInitSync</literal></entry> <entry>Waiting for a newly initialized WAL file to reach stable storage.</entry> </row> <row> - <entry><literal>WALInitWrite</></entry> + <entry><literal>WALInitWrite</literal></entry> <entry>Waiting for a write while initializing a new WAL file.</entry> </row> <row> - <entry><literal>WALRead</></entry> + <entry><literal>WALRead</literal></entry> <entry>Waiting for a read from a WAL file.</entry> </row> <row> - <entry><literal>WALSenderTimelineHistoryRead</></entry> + <entry><literal>WALSenderTimelineHistoryRead</literal></entry> <entry>Waiting for a read from a timeline history file during walsender timeline command.</entry> </row> <row> - <entry><literal>WALSyncMethodAssign</></entry> + <entry><literal>WALSyncMethodAssign</literal></entry> <entry>Waiting for data to reach stable storage while assigning WAL sync method.</entry> </row> <row> - <entry><literal>WALWrite</></entry> + <entry><literal>WALWrite</literal></entry> <entry>Waiting for a write to a WAL file.</entry> </row> </tbody> @@ -1615,10 +1615,10 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser <note> <para> For tranches registered by extensions, the name is specified by extension - and this will be displayed as <structfield>wait_event</>. It is quite + and this will be displayed as <structfield>wait_event</structfield>. It is quite possible that user has registered the tranche in one of the backends (by having allocation in dynamic shared memory) in which case other backends - won't have that information, so we display <literal>extension</> for such + won't have that information, so we display <literal>extension</literal> for such cases. </para> </note> @@ -1649,53 +1649,53 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i <tbody> <row> - <entry><structfield>pid</></entry> - <entry><type>integer</></entry> + <entry><structfield>pid</structfield></entry> + <entry><type>integer</type></entry> <entry>Process ID of a WAL sender process</entry> </row> <row> - <entry><structfield>usesysid</></entry> - <entry><type>oid</></entry> + <entry><structfield>usesysid</structfield></entry> + <entry><type>oid</type></entry> <entry>OID of the user logged into this WAL sender process</entry> </row> <row> - <entry><structfield>usename</></entry> - <entry><type>name</></entry> + <entry><structfield>usename</structfield></entry> + <entry><type>name</type></entry> <entry>Name of the user logged into this WAL sender process</entry> </row> <row> - <entry><structfield>application_name</></entry> - <entry><type>text</></entry> + <entry><structfield>application_name</structfield></entry> + <entry><type>text</type></entry> <entry>Name of the application that is connected to this WAL sender</entry> </row> <row> - <entry><structfield>client_addr</></entry> - <entry><type>inet</></entry> + <entry><structfield>client_addr</structfield></entry> + <entry><type>inet</type></entry> <entry>IP address of the client connected to this WAL sender. If this field is null, it indicates that the client is connected via a Unix socket on the server machine. </entry> </row> <row> - <entry><structfield>client_hostname</></entry> - <entry><type>text</></entry> + <entry><structfield>client_hostname</structfield></entry> + <entry><type>text</type></entry> <entry>Host name of the connected client, as reported by a - reverse DNS lookup of <structfield>client_addr</>. This field will + reverse DNS lookup of <structfield>client_addr</structfield>. This field will only be non-null for IP connections, and only when <xref linkend="guc-log-hostname"> is enabled. </entry> </row> <row> - <entry><structfield>client_port</></entry> - <entry><type>integer</></entry> + <entry><structfield>client_port</structfield></entry> + <entry><type>integer</type></entry> <entry>TCP port number that the client is using for communication - with this WAL sender, or <literal>-1</> if a Unix socket is used + with this WAL sender, or <literal>-1</literal> if a Unix socket is used </entry> </row> <row> - <entry><structfield>backend_start</></entry> - <entry><type>timestamp with time zone</></entry> + <entry><structfield>backend_start</structfield></entry> + <entry><type>timestamp with time zone</type></entry> <entry>Time when this process was started, i.e., when the client connected to this WAL sender </entry> @@ -1703,71 +1703,71 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i <row> <entry><structfield>backend_xmin</structfield></entry> <entry><type>xid</type></entry> - <entry>This standby's <literal>xmin</> horizon reported + <entry>This standby's <literal>xmin</literal> horizon reported by <xref linkend="guc-hot-standby-feedback">.</entry> </row> <row> - <entry><structfield>state</></entry> - <entry><type>text</></entry> + <entry><structfield>state</structfield></entry> + <entry><type>text</type></entry> <entry>Current WAL sender state. Possible values are: <itemizedlist> <listitem> <para> - <literal>startup</>: This WAL sender is starting up. + <literal>startup</literal>: This WAL sender is starting up. </para> </listitem> <listitem> <para> - <literal>catchup</>: This WAL sender's connected standby is + <literal>catchup</literal>: This WAL sender's connected standby is catching up with the primary. </para> </listitem> <listitem> <para> - <literal>streaming</>: This WAL sender is streaming changes + <literal>streaming</literal>: This WAL sender is streaming changes after its connected standby server has caught up with the primary. </para> </listitem> <listitem> <para> - <literal>backup</>: This WAL sender is sending a backup. + <literal>backup</literal>: This WAL sender is sending a backup. </para> </listitem> <listitem> <para> - <literal>stopping</>: This WAL sender is stopping. + <literal>stopping</literal>: This WAL sender is stopping. </para> </listitem> </itemizedlist> </entry> </row> <row> - <entry><structfield>sent_lsn</></entry> - <entry><type>pg_lsn</></entry> + <entry><structfield>sent_lsn</structfield></entry> + <entry><type>pg_lsn</type></entry> <entry>Last write-ahead log location sent on this connection</entry> </row> <row> - <entry><structfield>write_lsn</></entry> - <entry><type>pg_lsn</></entry> + <entry><structfield>write_lsn</structfield></entry> + <entry><type>pg_lsn</type></entry> <entry>Last write-ahead log location written to disk by this standby server</entry> </row> <row> - <entry><structfield>flush_lsn</></entry> - <entry><type>pg_lsn</></entry> + <entry><structfield>flush_lsn</structfield></entry> + <entry><type>pg_lsn</type></entry> <entry>Last write-ahead log location flushed to disk by this standby server</entry> </row> <row> - <entry><structfield>replay_lsn</></entry> - <entry><type>pg_lsn</></entry> + <entry><structfield>replay_lsn</structfield></entry> + <entry><type>pg_lsn</type></entry> <entry>Last write-ahead log location replayed into the database on this standby server</entry> </row> <row> - <entry><structfield>write_lag</></entry> - <entry><type>interval</></entry> + <entry><structfield>write_lag</structfield></entry> + <entry><type>interval</type></entry> <entry>Time elapsed between flushing recent WAL locally and receiving notification that this standby server has written it (but not yet flushed it or applied it). This can be used to gauge the delay that @@ -1776,8 +1776,8 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i server was configured as a synchronous standby.</entry> </row> <row> - <entry><structfield>flush_lag</></entry> - <entry><type>interval</></entry> + <entry><structfield>flush_lag</structfield></entry> + <entry><type>interval</type></entry> <entry>Time elapsed between flushing recent WAL locally and receiving notification that this standby server has written and flushed it (but not yet applied it). This can be used to gauge the delay that @@ -1786,8 +1786,8 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i server was configured as a synchronous standby.</entry> </row> <row> - <entry><structfield>replay_lag</></entry> - <entry><type>interval</></entry> + <entry><structfield>replay_lag</structfield></entry> + <entry><type>interval</type></entry> <entry>Time elapsed between flushing recent WAL locally and receiving notification that this standby server has written, flushed and applied it. This can be used to gauge the delay that @@ -1796,38 +1796,38 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i server was configured as a synchronous standby.</entry> </row> <row> - <entry><structfield>sync_priority</></entry> - <entry><type>integer</></entry> + <entry><structfield>sync_priority</structfield></entry> + <entry><type>integer</type></entry> <entry>Priority of this standby server for being chosen as the synchronous standby in a priority-based synchronous replication. This has no effect in a quorum-based synchronous replication.</entry> </row> <row> - <entry><structfield>sync_state</></entry> - <entry><type>text</></entry> + <entry><structfield>sync_state</structfield></entry> + <entry><type>text</type></entry> <entry>Synchronous state of this standby server. Possible values are: <itemizedlist> <listitem> <para> - <literal>async</>: This standby server is asynchronous. + <literal>async</literal>: This standby server is asynchronous. </para> </listitem> <listitem> <para> - <literal>potential</>: This standby server is now asynchronous, + <literal>potential</literal>: This standby server is now asynchronous, but can potentially become synchronous if one of current synchronous ones fails. </para> </listitem> <listitem> <para> - <literal>sync</>: This standby server is synchronous. + <literal>sync</literal>: This standby server is synchronous. </para> </listitem> <listitem> <para> - <literal>quorum</>: This standby server is considered as a candidate + <literal>quorum</literal>: This standby server is considered as a candidate for quorum standbys. </para> </listitem> @@ -1897,69 +1897,69 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i <tbody> <row> - <entry><structfield>pid</></entry> - <entry><type>integer</></entry> + <entry><structfield>pid</structfield></entry> + <entry><type>integer</type></entry> <entry>Process ID of the WAL receiver process</entry> </row> <row> - <entry><structfield>status</></entry> - <entry><type>text</></entry> + <entry><structfield>status</structfield></entry> + <entry><type>text</type></entry> <entry>Activity status of the WAL receiver process</entry> </row> <row> - <entry><structfield>receive_start_lsn</></entry> - <entry><type>pg_lsn</></entry> + <entry><structfield>receive_start_lsn</structfield></entry> + <entry><type>pg_lsn</type></entry> <entry>First write-ahead log location used when WAL receiver is started</entry> </row> <row> - <entry><structfield>receive_start_tli</></entry> - <entry><type>integer</></entry> + <entry><structfield>receive_start_tli</structfield></entry> + <entry><type>integer</type></entry> <entry>First timeline number used when WAL receiver is started</entry> </row> <row> - <entry><structfield>received_lsn</></entry> - <entry><type>pg_lsn</></entry> + <entry><structfield>received_lsn</structfield></entry> + <entry><type>pg_lsn</type></entry> <entry>Last write-ahead log location already received and flushed to disk, the initial value of this field being the first log location used when WAL receiver is started</entry> </row> <row> - <entry><structfield>received_tli</></entry> - <entry><type>integer</></entry> + <entry><structfield>received_tli</structfield></entry> + <entry><type>integer</type></entry> <entry>Timeline number of last write-ahead log location received and flushed to disk, the initial value of this field being the timeline number of the first log location used when WAL receiver is started </entry> </row> <row> - <entry><structfield>last_msg_send_time</></entry> - <entry><type>timestamp with time zone</></entry> + <entry><structfield>last_msg_send_time</structfield></entry> + <entry><type>timestamp with time zone</type></entry> <entry>Send time of last message received from origin WAL sender</entry> </row> <row> - <entry><structfield>last_msg_receipt_time</></entry> - <entry><type>timestamp with time zone</></entry> + <entry><structfield>last_msg_receipt_time</structfield></entry> + <entry><type>timestamp with time zone</type></entry> <entry>Receipt time of last message received from origin WAL sender</entry> </row> <row> - <entry><structfield>latest_end_lsn</></entry> - <entry><type>pg_lsn</></entry> + <entry><structfield>latest_end_lsn</structfield></entry> + <entry><type>pg_lsn</type></entry> <entry>Last write-ahead log location reported to origin WAL sender</entry> </row> <row> - <entry><structfield>latest_end_time</></entry> - <entry><type>timestamp with time zone</></entry> + <entry><structfield>latest_end_time</structfield></entry> + <entry><type>timestamp with time zone</type></entry> <entry>Time of last write-ahead log location reported to origin WAL sender</entry> </row> <row> - <entry><structfield>slot_name</></entry> - <entry><type>text</></entry> + <entry><structfield>slot_name</structfield></entry> + <entry><type>text</type></entry> <entry>Replication slot name used by this WAL receiver</entry> </row> <row> - <entry><structfield>conninfo</></entry> - <entry><type>text</></entry> + <entry><structfield>conninfo</structfield></entry> + <entry><type>text</type></entry> <entry> Connection string used by this WAL receiver, with security-sensitive fields obfuscated. @@ -1988,52 +1988,52 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i <tbody> <row> - <entry><structfield>subid</></entry> - <entry><type>oid</></entry> + <entry><structfield>subid</structfield></entry> + <entry><type>oid</type></entry> <entry>OID of the subscription</entry> </row> <row> - <entry><structfield>subname</></entry> - <entry><type>text</></entry> + <entry><structfield>subname</structfield></entry> + <entry><type>text</type></entry> <entry>Name of the subscription</entry> </row> <row> - <entry><structfield>pid</></entry> - <entry><type>integer</></entry> + <entry><structfield>pid</structfield></entry> + <entry><type>integer</type></entry> <entry>Process ID of the subscription worker process</entry> </row> <row> - <entry><structfield>relid</></entry> - <entry><type>Oid</></entry> + <entry><structfield>relid</structfield></entry> + <entry><type>Oid</type></entry> <entry>OID of the relation that the worker is synchronizing; null for the main apply worker</entry> </row> <row> - <entry><structfield>received_lsn</></entry> - <entry><type>pg_lsn</></entry> + <entry><structfield>received_lsn</structfield></entry> + <entry><type>pg_lsn</type></entry> <entry>Last write-ahead log location received, the initial value of this field being 0</entry> </row> <row> - <entry><structfield>last_msg_send_time</></entry> - <entry><type>timestamp with time zone</></entry> + <entry><structfield>last_msg_send_time</structfield></entry> + <entry><type>timestamp with time zone</type></entry> <entry>Send time of last message received from origin WAL sender</entry> </row> <row> - <entry><structfield>last_msg_receipt_time</></entry> - <entry><type>timestamp with time zone</></entry> + <entry><structfield>last_msg_receipt_time</structfield></entry> + <entry><type>timestamp with time zone</type></entry> <entry>Receipt time of last message received from origin WAL sender </entry> </row> <row> - <entry><structfield>latest_end_lsn</></entry> - <entry><type>pg_lsn</></entry> + <entry><structfield>latest_end_lsn</structfield></entry> + <entry><type>pg_lsn</type></entry> <entry>Last write-ahead log location reported to origin WAL sender </entry> </row> <row> - <entry><structfield>latest_end_time</></entry> - <entry><type>timestamp with time zone</></entry> + <entry><structfield>latest_end_time</structfield></entry> + <entry><type>timestamp with time zone</type></entry> <entry>Time of last write-ahead log location reported to origin WAL sender</entry> </row> @@ -2061,42 +2061,42 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i <tbody> <row> - <entry><structfield>pid</></entry> - <entry><type>integer</></entry> + <entry><structfield>pid</structfield></entry> + <entry><type>integer</type></entry> <entry>Process ID of a backend or WAL sender process</entry> </row> <row> - <entry><structfield>ssl</></entry> - <entry><type>boolean</></entry> + <entry><structfield>ssl</structfield></entry> + <entry><type>boolean</type></entry> <entry>True if SSL is used on this connection</entry> </row> <row> - <entry><structfield>version</></entry> - <entry><type>text</></entry> + <entry><structfield>version</structfield></entry> + <entry><type>text</type></entry> <entry>Version of SSL in use, or NULL if SSL is not in use on this connection</entry> </row> <row> - <entry><structfield>cipher</></entry> - <entry><type>text</></entry> + <entry><structfield>cipher</structfield></entry> + <entry><type>text</type></entry> <entry>Name of SSL cipher in use, or NULL if SSL is not in use on this connection</entry> </row> <row> - <entry><structfield>bits</></entry> - <entry><type>integer</></entry> + <entry><structfield>bits</structfield></entry> + <entry><type>integer</type></entry> <entry>Number of bits in the encryption algorithm used, or NULL if SSL is not used on this connection</entry> </row> <row> - <entry><structfield>compression</></entry> - <entry><type>boolean</></entry> + <entry><structfield>compression</structfield></entry> + <entry><type>boolean</type></entry> <entry>True if SSL compression is in use, false if not, or NULL if SSL is not in use on this connection</entry> </row> <row> - <entry><structfield>clientdn</></entry> - <entry><type>text</></entry> + <entry><structfield>clientdn</structfield></entry> + <entry><type>text</type></entry> <entry>Distinguished Name (DN) field from the client certificate used, or NULL if no client certificate was supplied or if SSL is not in use on this connection. This field is truncated if the @@ -2132,37 +2132,37 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i <tbody> <row> - <entry><structfield>archived_count</></entry> + <entry><structfield>archived_count</structfield></entry> <entry><type>bigint</type></entry> <entry>Number of WAL files that have been successfully archived</entry> </row> <row> - <entry><structfield>last_archived_wal</></entry> + <entry><structfield>last_archived_wal</structfield></entry> <entry><type>text</type></entry> <entry>Name of the last WAL file successfully archived</entry> </row> <row> - <entry><structfield>last_archived_time</></entry> + <entry><structfield>last_archived_time</structfield></entry> <entry><type>timestamp with time zone</type></entry> <entry>Time of the last successful archive operation</entry> </row> <row> - <entry><structfield>failed_count</></entry> + <entry><structfield>failed_count</structfield></entry> <entry><type>bigint</type></entry> <entry>Number of failed attempts for archiving WAL files</entry> </row> <row> - <entry><structfield>last_failed_wal</></entry> + <entry><structfield>last_failed_wal</structfield></entry> <entry><type>text</type></entry> <entry>Name of the WAL file of the last failed archival operation</entry> </row> <row> - <entry><structfield>last_failed_time</></entry> + <entry><structfield>last_failed_time</structfield></entry> <entry><type>timestamp with time zone</type></entry> <entry>Time of the last failed archival operation</entry> </row> <row> - <entry><structfield>stats_reset</></entry> + <entry><structfield>stats_reset</structfield></entry> <entry><type>timestamp with time zone</type></entry> <entry>Time at which these statistics were last reset</entry> </row> @@ -2189,17 +2189,17 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i <tbody> <row> - <entry><structfield>checkpoints_timed</></entry> + <entry><structfield>checkpoints_timed</structfield></entry> <entry><type>bigint</type></entry> <entry>Number of scheduled checkpoints that have been performed</entry> </row> <row> - <entry><structfield>checkpoints_req</></entry> + <entry><structfield>checkpoints_req</structfield></entry> <entry><type>bigint</type></entry> <entry>Number of requested checkpoints that have been performed</entry> </row> <row> - <entry><structfield>checkpoint_write_time</></entry> + <entry><structfield>checkpoint_write_time</structfield></entry> <entry><type>double precision</type></entry> <entry> Total amount of time that has been spent in the portion of @@ -2207,7 +2207,7 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i </entry> </row> <row> - <entry><structfield>checkpoint_sync_time</></entry> + <entry><structfield>checkpoint_sync_time</structfield></entry> <entry><type>double precision</type></entry> <entry> Total amount of time that has been spent in the portion of @@ -2216,40 +2216,40 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i </entry> </row> <row> - <entry><structfield>buffers_checkpoint</></entry> + <entry><structfield>buffers_checkpoint</structfield></entry> <entry><type>bigint</type></entry> <entry>Number of buffers written during checkpoints</entry> </row> <row> - <entry><structfield>buffers_clean</></entry> + <entry><structfield>buffers_clean</structfield></entry> <entry><type>bigint</type></entry> <entry>Number of buffers written by the background writer</entry> </row> <row> - <entry><structfield>maxwritten_clean</></entry> + <entry><structfield>maxwritten_clean</structfield></entry> <entry><type>bigint</type></entry> <entry>Number of times the background writer stopped a cleaning scan because it had written too many buffers</entry> </row> <row> - <entry><structfield>buffers_backend</></entry> + <entry><structfield>buffers_backend</structfield></entry> <entry><type>bigint</type></entry> <entry>Number of buffers written directly by a backend</entry> </row> <row> - <entry><structfield>buffers_backend_fsync</></entry> + <entry><structfield>buffers_backend_fsync</structfield></entry> <entry><type>bigint</type></entry> <entry>Number of times a backend had to execute its own - <function>fsync</> call (normally the background writer handles those + <function>fsync</function> call (normally the background writer handles those even when the backend does its own write)</entry> </row> <row> - <entry><structfield>buffers_alloc</></entry> + <entry><structfield>buffers_alloc</structfield></entry> <entry><type>bigint</type></entry> <entry>Number of buffers allocated</entry> </row> <row> - <entry><structfield>stats_reset</></entry> + <entry><structfield>stats_reset</structfield></entry> <entry><type>timestamp with time zone</type></entry> <entry>Time at which these statistics were last reset</entry> </row> @@ -2275,84 +2275,84 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i <tbody> <row> - <entry><structfield>datid</></entry> - <entry><type>oid</></entry> + <entry><structfield>datid</structfield></entry> + <entry><type>oid</type></entry> <entry>OID of a database</entry> </row> <row> - <entry><structfield>datname</></entry> - <entry><type>name</></entry> + <entry><structfield>datname</structfield></entry> + <entry><type>name</type></entry> <entry>Name of this database</entry> </row> <row> - <entry><structfield>numbackends</></entry> - <entry><type>integer</></entry> + <entry><structfield>numbackends</structfield></entry> + <entry><type>integer</type></entry> <entry>Number of backends currently connected to this database. This is the only column in this view that returns a value reflecting current state; all other columns return the accumulated values since the last reset.</entry> </row> <row> - <entry><structfield>xact_commit</></entry> - <entry><type>bigint</></entry> + <entry><structfield>xact_commit</structfield></entry> + <entry><type>bigint</type></entry> <entry>Number of transactions in this database that have been committed</entry> </row> <row> - <entry><structfield>xact_rollback</></entry> - <entry><type>bigint</></entry> + <entry><structfield>xact_rollback</structfield></entry> + <entry><type>bigint</type></entry> <entry>Number of transactions in this database that have been rolled back</entry> </row> <row> - <entry><structfield>blks_read</></entry> - <entry><type>bigint</></entry> + <entry><structfield>blks_read</structfield></entry> + <entry><type>bigint</type></entry> <entry>Number of disk blocks read in this database</entry> </row> <row> - <entry><structfield>blks_hit</></entry> - <entry><type>bigint</></entry> + <entry><structfield>blks_hit</structfield></entry> + <entry><type>bigint</type></entry> <entry>Number of times disk blocks were found already in the buffer cache, so that a read was not necessary (this only includes hits in the PostgreSQL buffer cache, not the operating system's file system cache) </entry> </row> <row> - <entry><structfield>tup_returned</></entry> - <entry><type>bigint</></entry> + <entry><structfield>tup_returned</structfield></entry> + <entry><type>bigint</type></entry> <entry>Number of rows returned by queries in this database</entry> </row> <row> - <entry><structfield>tup_fetched</></entry> - <entry><type>bigint</></entry> + <entry><structfield>tup_fetched</structfield></entry> + <entry><type>bigint</type></entry> <entry>Number of rows fetched by queries in this database</entry> </row> <row> - <entry><structfield>tup_inserted</></entry> - <entry><type>bigint</></entry> + <entry><structfield>tup_inserted</structfield></entry> + <entry><type>bigint</type></entry> <entry>Number of rows inserted by queries in this database</entry> </row> <row> - <entry><structfield>tup_updated</></entry> - <entry><type>bigint</></entry> + <entry><structfield>tup_updated</structfield></entry> + <entry><type>bigint</type></entry> <entry>Number of rows updated by queries in this database</entry> </row> <row> - <entry><structfield>tup_deleted</></entry> - <entry><type>bigint</></entry> + <entry><structfield>tup_deleted</structfield></entry> + <entry><type>bigint</type></entry> <entry>Number of rows deleted by queries in this database</entry> </row> <row> - <entry><structfield>conflicts</></entry> - <entry><type>bigint</></entry> + <entry><structfield>conflicts</structfield></entry> + <entry><type>bigint</type></entry> <entry>Number of queries canceled due to conflicts with recovery in this database. (Conflicts occur only on standby servers; see <xref linkend="pg-stat-database-conflicts-view"> for details.) </entry> </row> <row> - <entry><structfield>temp_files</></entry> - <entry><type>bigint</></entry> + <entry><structfield>temp_files</structfield></entry> + <entry><type>bigint</type></entry> <entry>Number of temporary files created by queries in this database. All temporary files are counted, regardless of why the temporary file was created (e.g., sorting or hashing), and regardless of the @@ -2360,8 +2360,8 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i </entry> </row> <row> - <entry><structfield>temp_bytes</></entry> - <entry><type>bigint</></entry> + <entry><structfield>temp_bytes</structfield></entry> + <entry><type>bigint</type></entry> <entry>Total amount of data written to temporary files by queries in this database. All temporary files are counted, regardless of why the temporary file was created, and @@ -2369,25 +2369,25 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i </entry> </row> <row> - <entry><structfield>deadlocks</></entry> - <entry><type>bigint</></entry> + <entry><structfield>deadlocks</structfield></entry> + <entry><type>bigint</type></entry> <entry>Number of deadlocks detected in this database</entry> </row> <row> - <entry><structfield>blk_read_time</></entry> - <entry><type>double precision</></entry> + <entry><structfield>blk_read_time</structfield></entry> + <entry><type>double precision</type></entry> <entry>Time spent reading data file blocks by backends in this database, in milliseconds</entry> </row> <row> - <entry><structfield>blk_write_time</></entry> - <entry><type>double precision</></entry> + <entry><structfield>blk_write_time</structfield></entry> + <entry><type>double precision</type></entry> <entry>Time spent writing data file blocks by backends in this database, in milliseconds</entry> </row> <row> - <entry><structfield>stats_reset</></entry> - <entry><type>timestamp with time zone</></entry> + <entry><structfield>stats_reset</structfield></entry> + <entry><type>timestamp with time zone</type></entry> <entry>Time at which these statistics were last reset</entry> </row> </tbody> @@ -2412,42 +2412,42 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i <tbody> <row> - <entry><structfield>datid</></entry> - <entry><type>oid</></entry> + <entry><structfield>datid</structfield></entry> + <entry><type>oid</type></entry> <entry>OID of a database</entry> </row> <row> - <entry><structfield>datname</></entry> - <entry><type>name</></entry> + <entry><structfield>datname</structfield></entry> + <entry><type>name</type></entry> <entry>Name of this database</entry> </row> <row> - <entry><structfield>confl_tablespace</></entry> - <entry><type>bigint</></entry> + <entry><structfield>confl_tablespace</structfield></entry> + <entry><type>bigint</type></entry> <entry>Number of queries in this database that have been canceled due to dropped tablespaces</entry> </row> <row> - <entry><structfield>confl_lock</></entry> - <entry><type>bigint</></entry> + <entry><structfield>confl_lock</structfield></entry> + <entry><type>bigint</type></entry> <entry>Number of queries in this database that have been canceled due to lock timeouts</entry> </row> <row> - <entry><structfield>confl_snapshot</></entry> - <entry><type>bigint</></entry> + <entry><structfield>confl_snapshot</structfield></entry> + <entry><type>bigint</type></entry> <entry>Number of queries in this database that have been canceled due to old snapshots</entry> </row> <row> - <entry><structfield>confl_bufferpin</></entry> - <entry><type>bigint</></entry> + <entry><structfield>confl_bufferpin</structfield></entry> + <entry><type>bigint</type></entry> <entry>Number of queries in this database that have been canceled due to pinned buffers</entry> </row> <row> - <entry><structfield>confl_deadlock</></entry> - <entry><type>bigint</></entry> + <entry><structfield>confl_deadlock</structfield></entry> + <entry><type>bigint</type></entry> <entry>Number of queries in this database that have been canceled due to deadlocks</entry> </row> @@ -2476,119 +2476,119 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i <tbody> <row> - <entry><structfield>relid</></entry> - <entry><type>oid</></entry> + <entry><structfield>relid</structfield></entry> + <entry><type>oid</type></entry> <entry>OID of a table</entry> </row> <row> - <entry><structfield>schemaname</></entry> - <entry><type>name</></entry> + <entry><structfield>schemaname</structfield></entry> + <entry><type>name</type></entry> <entry>Name of the schema that this table is in</entry> </row> <row> - <entry><structfield>relname</></entry> - <entry><type>name</></entry> + <entry><structfield>relname</structfield></entry> + <entry><type>name</type></entry> <entry>Name of this table</entry> </row> <row> - <entry><structfield>seq_scan</></entry> - <entry><type>bigint</></entry> + <entry><structfield>seq_scan</structfield></entry> + <entry><type>bigint</type></entry> <entry>Number of sequential scans initiated on this table</entry> </row> <row> - <entry><structfield>seq_tup_read</></entry> - <entry><type>bigint</></entry> + <entry><structfield>seq_tup_read</structfield></entry> + <entry><type>bigint</type></entry> <entry>Number of live rows fetched by sequential scans</entry> </row> <row> - <entry><structfield>idx_scan</></entry> - <entry><type>bigint</></entry> + <entry><structfield>idx_scan</structfield></entry> + <entry><type>bigint</type></entry> <entry>Number of index scans initiated on this table</entry> </row> <row> - <entry><structfield>idx_tup_fetch</></entry> - <entry><type>bigint</></entry> + <entry><structfield>idx_tup_fetch</structfield></entry> + <entry><type>bigint</type></entry> <entry>Number of live rows fetched by index scans</entry> </row> <row> - <entry><structfield>n_tup_ins</></entry> - <entry><type>bigint</></entry> + <entry><structfield>n_tup_ins</structfield></entry> + <entry><type>bigint</type></entry> <entry>Number of rows inserted</entry> </row> <row> - <entry><structfield>n_tup_upd</></entry> - <entry><type>bigint</></entry> + <entry><structfield>n_tup_upd</structfield></entry> + <entry><type>bigint</type></entry> <entry>Number of rows updated (includes HOT updated rows)</entry> </row> <row> - <entry><structfield>n_tup_del</></entry> - <entry><type>bigint</></entry> + <entry><structfield>n_tup_del</structfield></entry> + <entry><type>bigint</type></entry> <entry>Number of rows deleted</entry> </row> <row> - <entry><structfield>n_tup_hot_upd</></entry> - <entry><type>bigint</></entry> + <entry><structfield>n_tup_hot_upd</structfield></entry> + <entry><type>bigint</type></entry> <entry>Number of rows HOT updated (i.e., with no separate index update required)</entry> </row> <row> - <entry><structfield>n_live_tup</></entry> - <entry><type>bigint</></entry> + <entry><structfield>n_live_tup</structfield></entry> + <entry><type>bigint</type></entry> <entry>Estimated number of live rows</entry> </row> <row> - <entry><structfield>n_dead_tup</></entry> - <entry><type>bigint</></entry> + <entry><structfield>n_dead_tup</structfield></entry> + <entry><type>bigint</type></entry> <entry>Estimated number of dead rows</entry> </row> <row> - <entry><structfield>n_mod_since_analyze</></entry> - <entry><type>bigint</></entry> + <entry><structfield>n_mod_since_analyze</structfield></entry> + <entry><type>bigint</type></entry> <entry>Estimated number of rows modified since this table was last analyzed</entry> </row> <row> - <entry><structfield>last_vacuum</></entry> - <entry><type>timestamp with time zone</></entry> + <entry><structfield>last_vacuum</structfield></entry> + <entry><type>timestamp with time zone</type></entry> <entry>Last time at which this table was manually vacuumed - (not counting <command>VACUUM FULL</>)</entry> + (not counting <command>VACUUM FULL</command>)</entry> </row> <row> - <entry><structfield>last_autovacuum</></entry> - <entry><type>timestamp with time zone</></entry> + <entry><structfield>last_autovacuum</structfield></entry> + <entry><type>timestamp with time zone</type></entry> <entry>Last time at which this table was vacuumed by the autovacuum daemon</entry> </row> <row> - <entry><structfield>last_analyze</></entry> - <entry><type>timestamp with time zone</></entry> + <entry><structfield>last_analyze</structfield></entry> + <entry><type>timestamp with time zone</type></entry> <entry>Last time at which this table was manually analyzed</entry> </row> <row> - <entry><structfield>last_autoanalyze</></entry> - <entry><type>timestamp with time zone</></entry> + <entry><structfield>last_autoanalyze</structfield></entry> + <entry><type>timestamp with time zone</type></entry> <entry>Last time at which this table was analyzed by the autovacuum daemon</entry> </row> <row> - <entry><structfield>vacuum_count</></entry> - <entry><type>bigint</></entry> + <entry><structfield>vacuum_count</structfield></entry> + <entry><type>bigint</type></entry> <entry>Number of times this table has been manually vacuumed - (not counting <command>VACUUM FULL</>)</entry> + (not counting <command>VACUUM FULL</command>)</entry> </row> <row> - <entry><structfield>autovacuum_count</></entry> - <entry><type>bigint</></entry> + <entry><structfield>autovacuum_count</structfield></entry> + <entry><type>bigint</type></entry> <entry>Number of times this table has been vacuumed by the autovacuum daemon</entry> </row> <row> - <entry><structfield>analyze_count</></entry> - <entry><type>bigint</></entry> + <entry><structfield>analyze_count</structfield></entry> + <entry><type>bigint</type></entry> <entry>Number of times this table has been manually analyzed</entry> </row> <row> - <entry><structfield>autoanalyze_count</></entry> - <entry><type>bigint</></entry> + <entry><structfield>autoanalyze_count</structfield></entry> + <entry><type>bigint</type></entry> <entry>Number of times this table has been analyzed by the autovacuum daemon</entry> </row> @@ -2619,43 +2619,43 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i <tbody> <row> - <entry><structfield>relid</></entry> - <entry><type>oid</></entry> + <entry><structfield>relid</structfield></entry> + <entry><type>oid</type></entry> <entry>OID of the table for this index</entry> </row> <row> - <entry><structfield>indexrelid</></entry> - <entry><type>oid</></entry> + <entry><structfield>indexrelid</structfield></entry> + <entry><type>oid</type></entry> <entry>OID of this index</entry> </row> <row> - <entry><structfield>schemaname</></entry> - <entry><type>name</></entry> + <entry><structfield>schemaname</structfield></entry> + <entry><type>name</type></entry> <entry>Name of the schema this index is in</entry> </row> <row> - <entry><structfield>relname</></entry> - <entry><type>name</></entry> + <entry><structfield>relname</structfield></entry> + <entry><type>name</type></entry> <entry>Name of the table for this index</entry> </row> <row> - <entry><structfield>indexrelname</></entry> - <entry><type>name</></entry> + <entry><structfield>indexrelname</structfield></entry> + <entry><type>name</type></entry> <entry>Name of this index</entry> </row> <row> - <entry><structfield>idx_scan</></entry> - <entry><type>bigint</></entry> + <entry><structfield>idx_scan</structfield></entry> + <entry><type>bigint</type></entry> <entry>Number of index scans initiated on this index</entry> </row> <row> - <entry><structfield>idx_tup_read</></entry> - <entry><type>bigint</></entry> + <entry><structfield>idx_tup_read</structfield></entry> + <entry><type>bigint</type></entry> <entry>Number of index entries returned by scans on this index</entry> </row> <row> - <entry><structfield>idx_tup_fetch</></entry> - <entry><type>bigint</></entry> + <entry><structfield>idx_tup_fetch</structfield></entry> + <entry><type>bigint</type></entry> <entry>Number of live table rows fetched by simple index scans using this index</entry> </row> @@ -2674,17 +2674,17 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i </para> <para> - Indexes can be used by simple index scans, <quote>bitmap</> index scans, + Indexes can be used by simple index scans, <quote>bitmap</quote> index scans, and the optimizer. In a bitmap scan the output of several indexes can be combined via AND or OR rules, so it is difficult to associate individual heap row fetches with specific indexes when a bitmap scan is used. Therefore, a bitmap scan increments the - <structname>pg_stat_all_indexes</>.<structfield>idx_tup_read</> + <structname>pg_stat_all_indexes</structname>.<structfield>idx_tup_read</structfield> count(s) for the index(es) it uses, and it increments the - <structname>pg_stat_all_tables</>.<structfield>idx_tup_fetch</> + <structname>pg_stat_all_tables</structname>.<structfield>idx_tup_fetch</structfield> count for the table, but it does not affect - <structname>pg_stat_all_indexes</>.<structfield>idx_tup_fetch</>. + <structname>pg_stat_all_indexes</structname>.<structfield>idx_tup_fetch</structfield>. The optimizer also accesses indexes to check for supplied constants whose values are outside the recorded range of the optimizer statistics because the optimizer statistics might be stale. @@ -2692,10 +2692,10 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i <note> <para> - The <structfield>idx_tup_read</> and <structfield>idx_tup_fetch</> counts + The <structfield>idx_tup_read</structfield> and <structfield>idx_tup_fetch</structfield> counts can be different even without any use of bitmap scans, - because <structfield>idx_tup_read</> counts - index entries retrieved from the index while <structfield>idx_tup_fetch</> + because <structfield>idx_tup_read</structfield> counts + index entries retrieved from the index while <structfield>idx_tup_fetch</structfield> counts live rows fetched from the table. The latter will be less if any dead or not-yet-committed rows are fetched using the index, or if any heap fetches are avoided by means of an index-only scan. @@ -2715,58 +2715,58 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i <tbody> <row> - <entry><structfield>relid</></entry> - <entry><type>oid</></entry> + <entry><structfield>relid</structfield></entry> + <entry><type>oid</type></entry> <entry>OID of a table</entry> </row> <row> - <entry><structfield>schemaname</></entry> - <entry><type>name</></entry> + <entry><structfield>schemaname</structfield></entry> + <entry><type>name</type></entry> <entry>Name of the schema that this table is in</entry> </row> <row> - <entry><structfield>relname</></entry> - <entry><type>name</></entry> + <entry><structfield>relname</structfield></entry> + <entry><type>name</type></entry> <entry>Name of this table</entry> </row> <row> - <entry><structfield>heap_blks_read</></entry> - <entry><type>bigint</></entry> + <entry><structfield>heap_blks_read</structfield></entry> + <entry><type>bigint</type></entry> <entry>Number of disk blocks read from this table</entry> </row> <row> - <entry><structfield>heap_blks_hit</></entry> - <entry><type>bigint</></entry> + <entry><structfield>heap_blks_hit</structfield></entry> + <entry><type>bigint</type></entry> <entry>Number of buffer hits in this table</entry> </row> <row> - <entry><structfield>idx_blks_read</></entry> - <entry><type>bigint</></entry> + <entry><structfield>idx_blks_read</structfield></entry> + <entry><type>bigint</type></entry> <entry>Number of disk blocks read from all indexes on this table</entry> </row> <row> - <entry><structfield>idx_blks_hit</></entry> - <entry><type>bigint</></entry> + <entry><structfield>idx_blks_hit</structfield></entry> + <entry><type>bigint</type></entry> <entry>Number of buffer hits in all indexes on this table</entry> </row> <row> - <entry><structfield>toast_blks_read</></entry> - <entry><type>bigint</></entry> + <entry><structfield>toast_blks_read</structfield></entry> + <entry><type>bigint</type></entry> <entry>Number of disk blocks read from this table's TOAST table (if any)</entry> </row> <row> - <entry><structfield>toast_blks_hit</></entry> - <entry><type>bigint</></entry> + <entry><structfield>toast_blks_hit</structfield></entry> + <entry><type>bigint</type></entry> <entry>Number of buffer hits in this table's TOAST table (if any)</entry> </row> <row> - <entry><structfield>tidx_blks_read</></entry> - <entry><type>bigint</></entry> + <entry><structfield>tidx_blks_read</structfield></entry> + <entry><type>bigint</type></entry> <entry>Number of disk blocks read from this table's TOAST table indexes (if any)</entry> </row> <row> - <entry><structfield>tidx_blks_hit</></entry> - <entry><type>bigint</></entry> + <entry><structfield>tidx_blks_hit</structfield></entry> + <entry><type>bigint</type></entry> <entry>Number of buffer hits in this table's TOAST table indexes (if any)</entry> </row> </tbody> @@ -2796,38 +2796,38 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i <tbody> <row> - <entry><structfield>relid</></entry> - <entry><type>oid</></entry> + <entry><structfield>relid</structfield></entry> + <entry><type>oid</type></entry> <entry>OID of the table for this index</entry> </row> <row> - <entry><structfield>indexrelid</></entry> - <entry><type>oid</></entry> + <entry><structfield>indexrelid</structfield></entry> + <entry><type>oid</type></entry> <entry>OID of this index</entry> </row> <row> - <entry><structfield>schemaname</></entry> - <entry><type>name</></entry> + <entry><structfield>schemaname</structfield></entry> + <entry><type>name</type></entry> <entry>Name of the schema this index is in</entry> </row> <row> - <entry><structfield>relname</></entry> - <entry><type>name</></entry> + <entry><structfield>relname</structfield></entry> + <entry><type>name</type></entry> <entry>Name of the table for this index</entry> </row> <row> - <entry><structfield>indexrelname</></entry> - <entry><type>name</></entry> + <entry><structfield>indexrelname</structfield></entry> + <entry><type>name</type></entry> <entry>Name of this index</entry> </row> <row> - <entry><structfield>idx_blks_read</></entry> - <entry><type>bigint</></entry> + <entry><structfield>idx_blks_read</structfield></entry> + <entry><type>bigint</type></entry> <entry>Number of disk blocks read from this index</entry> </row> <row> - <entry><structfield>idx_blks_hit</></entry> - <entry><type>bigint</></entry> + <entry><structfield>idx_blks_hit</structfield></entry> + <entry><type>bigint</type></entry> <entry>Number of buffer hits in this index</entry> </row> </tbody> @@ -2857,28 +2857,28 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i <tbody> <row> - <entry><structfield>relid</></entry> - <entry><type>oid</></entry> + <entry><structfield>relid</structfield></entry> + <entry><type>oid</type></entry> <entry>OID of a sequence</entry> </row> <row> - <entry><structfield>schemaname</></entry> - <entry><type>name</></entry> + <entry><structfield>schemaname</structfield></entry> + <entry><type>name</type></entry> <entry>Name of the schema this sequence is in</entry> </row> <row> - <entry><structfield>relname</></entry> - <entry><type>name</></entry> + <entry><structfield>relname</structfield></entry> + <entry><type>name</type></entry> <entry>Name of this sequence</entry> </row> <row> - <entry><structfield>blks_read</></entry> - <entry><type>bigint</></entry> + <entry><structfield>blks_read</structfield></entry> + <entry><type>bigint</type></entry> <entry>Number of disk blocks read from this sequence</entry> </row> <row> - <entry><structfield>blks_hit</></entry> - <entry><type>bigint</></entry> + <entry><structfield>blks_hit</structfield></entry> + <entry><type>bigint</type></entry> <entry>Number of buffer hits in this sequence</entry> </row> </tbody> @@ -2904,34 +2904,34 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i <tbody> <row> - <entry><structfield>funcid</></entry> - <entry><type>oid</></entry> + <entry><structfield>funcid</structfield></entry> + <entry><type>oid</type></entry> <entry>OID of a function</entry> </row> <row> - <entry><structfield>schemaname</></entry> - <entry><type>name</></entry> + <entry><structfield>schemaname</structfield></entry> + <entry><type>name</type></entry> <entry>Name of the schema this function is in</entry> </row> <row> - <entry><structfield>funcname</></entry> - <entry><type>name</></entry> + <entry><structfield>funcname</structfield></entry> + <entry><type>name</type></entry> <entry>Name of this function</entry> </row> <row> - <entry><structfield>calls</></entry> - <entry><type>bigint</></entry> + <entry><structfield>calls</structfield></entry> + <entry><type>bigint</type></entry> <entry>Number of times this function has been called</entry> </row> <row> - <entry><structfield>total_time</></entry> - <entry><type>double precision</></entry> + <entry><structfield>total_time</structfield></entry> + <entry><type>double precision</type></entry> <entry>Total time spent in this function and all other functions called by it, in milliseconds</entry> </row> <row> - <entry><structfield>self_time</></entry> - <entry><type>double precision</></entry> + <entry><structfield>self_time</structfield></entry> + <entry><type>double precision</type></entry> <entry>Total time spent in this function itself, not including other functions called by it, in milliseconds</entry> </row> @@ -2956,7 +2956,7 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i queries that use the same underlying statistics access functions used by the standard views shown above. For details such as the functions' names, consult the definitions of the standard views. (For example, in - <application>psql</> you could issue <literal>\d+ pg_stat_activity</>.) + <application>psql</application> you could issue <literal>\d+ pg_stat_activity</literal>.) The access functions for per-database statistics take a database OID as an argument to identify which database to report on. The per-table and per-index functions take a table or index OID. @@ -3037,10 +3037,10 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i Reset some cluster-wide statistics counters to zero, depending on the argument (requires superuser privileges by default, but EXECUTE for this function can be granted to others). - Calling <literal>pg_stat_reset_shared('bgwriter')</> will zero all the - counters shown in the <structname>pg_stat_bgwriter</> view. - Calling <literal>pg_stat_reset_shared('archiver')</> will zero all the - counters shown in the <structname>pg_stat_archiver</> view. + Calling <literal>pg_stat_reset_shared('bgwriter')</literal> will zero all the + counters shown in the <structname>pg_stat_bgwriter</structname> view. + Calling <literal>pg_stat_reset_shared('archiver')</literal> will zero all the + counters shown in the <structname>pg_stat_archiver</structname> view. </entry> </row> @@ -3069,7 +3069,7 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i <para> <function>pg_stat_get_activity</function>, the underlying function of - the <structname>pg_stat_activity</> view, returns a set of records + the <structname>pg_stat_activity</structname> view, returns a set of records containing all the available information about each backend process. Sometimes it may be more convenient to obtain just a subset of this information. In such cases, an older set of per-backend statistics @@ -3079,7 +3079,7 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i to the number of currently active backends. The function <function>pg_stat_get_backend_idset</function> provides a convenient way to generate one row for each active backend for - invoking these functions. For example, to show the <acronym>PID</>s and + invoking these functions. For example, to show the <acronym>PID</acronym>s and current queries of all backends: <programlisting> @@ -3113,7 +3113,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid, <row> <entry><literal><function>pg_stat_get_backend_activity(integer)</function></literal></entry> <entry><type>text</type></entry> - <entry>Text of this backend's most recent query</> + <entry>Text of this backend's most recent query</entry> </row> <row> @@ -3240,9 +3240,9 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid, <title>Progress Reporting</title> <para> - <productname>PostgreSQL</> has the ability to report the progress of + <productname>PostgreSQL</productname> has the ability to report the progress of certain commands during command execution. Currently, the only command - which supports progress reporting is <command>VACUUM</>. This may be + which supports progress reporting is <command>VACUUM</command>. This may be expanded in the future. </para> @@ -3250,13 +3250,13 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid, <title>VACUUM Progress Reporting</title> <para> - Whenever <command>VACUUM</> is running, the + Whenever <command>VACUUM</command> is running, the <structname>pg_stat_progress_vacuum</structname> view will contain one row for each backend (including autovacuum worker processes) that is currently vacuuming. The tables below describe the information that will be reported and provide information about how to interpret it. - Progress reporting is not currently supported for <command>VACUUM FULL</> - and backends running <command>VACUUM FULL</> will not be listed in this + Progress reporting is not currently supported for <command>VACUUM FULL</command> + and backends running <command>VACUUM FULL</command> will not be listed in this view. </para> @@ -3273,73 +3273,73 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid, <tbody> <row> - <entry><structfield>pid</></entry> - <entry><type>integer</></entry> + <entry><structfield>pid</structfield></entry> + <entry><type>integer</type></entry> <entry>Process ID of backend.</entry> </row> <row> - <entry><structfield>datid</></entry> - <entry><type>oid</></entry> + <entry><structfield>datid</structfield></entry> + <entry><type>oid</type></entry> <entry>OID of the database to which this backend is connected.</entry> </row> <row> - <entry><structfield>datname</></entry> - <entry><type>name</></entry> + <entry><structfield>datname</structfield></entry> + <entry><type>name</type></entry> <entry>Name of the database to which this backend is connected.</entry> </row> <row> - <entry><structfield>relid</></entry> - <entry><type>oid</></entry> + <entry><structfield>relid</structfield></entry> + <entry><type>oid</type></entry> <entry>OID of the table being vacuumed.</entry> </row> <row> - <entry><structfield>phase</></entry> - <entry><type>text</></entry> + <entry><structfield>phase</structfield></entry> + <entry><type>text</type></entry> <entry> Current processing phase of vacuum. See <xref linkend='vacuum-phases'>. </entry> </row> <row> - <entry><structfield>heap_blks_total</></entry> - <entry><type>bigint</></entry> + <entry><structfield>heap_blks_total</structfield></entry> + <entry><type>bigint</type></entry> <entry> Total number of heap blocks in the table. This number is reported as of the beginning of the scan; blocks added later will not be (and - need not be) visited by this <command>VACUUM</>. + need not be) visited by this <command>VACUUM</command>. </entry> </row> <row> - <entry><structfield>heap_blks_scanned</></entry> - <entry><type>bigint</></entry> + <entry><structfield>heap_blks_scanned</structfield></entry> + <entry><type>bigint</type></entry> <entry> Number of heap blocks scanned. Because the - <link linkend="storage-vm">visibility map</> is used to optimize scans, + <link linkend="storage-vm">visibility map</link> is used to optimize scans, some blocks will be skipped without inspection; skipped blocks are included in this total, so that this number will eventually become - equal to <structfield>heap_blks_total</> when the vacuum is complete. - This counter only advances when the phase is <literal>scanning heap</>. + equal to <structfield>heap_blks_total</structfield> when the vacuum is complete. + This counter only advances when the phase is <literal>scanning heap</literal>. </entry> </row> <row> - <entry><structfield>heap_blks_vacuumed</></entry> - <entry><type>bigint</></entry> + <entry><structfield>heap_blks_vacuumed</structfield></entry> + <entry><type>bigint</type></entry> <entry> Number of heap blocks vacuumed. Unless the table has no indexes, this - counter only advances when the phase is <literal>vacuuming heap</>. + counter only advances when the phase is <literal>vacuuming heap</literal>. Blocks that contain no dead tuples are skipped, so the counter may sometimes skip forward in large increments. </entry> </row> <row> - <entry><structfield>index_vacuum_count</></entry> - <entry><type>bigint</></entry> + <entry><structfield>index_vacuum_count</structfield></entry> + <entry><type>bigint</type></entry> <entry> Number of completed index vacuum cycles. </entry> </row> <row> - <entry><structfield>max_dead_tuples</></entry> - <entry><type>bigint</></entry> + <entry><structfield>max_dead_tuples</structfield></entry> + <entry><type>bigint</type></entry> <entry> Number of dead tuples that we can store before needing to perform an index vacuum cycle, based on @@ -3347,8 +3347,8 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid, </entry> </row> <row> - <entry><structfield>num_dead_tuples</></entry> - <entry><type>bigint</></entry> + <entry><structfield>num_dead_tuples</structfield></entry> + <entry><type>bigint</type></entry> <entry> Number of dead tuples collected since the last index vacuum cycle. </entry> @@ -3371,23 +3371,23 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid, <row> <entry><literal>initializing</literal></entry> <entry> - <command>VACUUM</> is preparing to begin scanning the heap. This + <command>VACUUM</command> is preparing to begin scanning the heap. This phase is expected to be very brief. </entry> </row> <row> <entry><literal>scanning heap</literal></entry> <entry> - <command>VACUUM</> is currently scanning the heap. It will prune and + <command>VACUUM</command> is currently scanning the heap. It will prune and defragment each page if required, and possibly perform freezing - activity. The <structfield>heap_blks_scanned</> column can be used + activity. The <structfield>heap_blks_scanned</structfield> column can be used to monitor the progress of the scan. </entry> </row> <row> <entry><literal>vacuuming indexes</literal></entry> <entry> - <command>VACUUM</> is currently vacuuming the indexes. If a table has + <command>VACUUM</command> is currently vacuuming the indexes. If a table has any indexes, this will happen at least once per vacuum, after the heap has been completely scanned. It may happen multiple times per vacuum if <xref linkend="guc-maintenance-work-mem"> is insufficient to @@ -3397,10 +3397,10 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid, <row> <entry><literal>vacuuming heap</literal></entry> <entry> - <command>VACUUM</> is currently vacuuming the heap. Vacuuming the heap + <command>VACUUM</command> is currently vacuuming the heap. Vacuuming the heap is distinct from scanning the heap, and occurs after each instance of - vacuuming indexes. If <structfield>heap_blks_scanned</> is less than - <structfield>heap_blks_total</>, the system will return to scanning + vacuuming indexes. If <structfield>heap_blks_scanned</structfield> is less than + <structfield>heap_blks_total</structfield>, the system will return to scanning the heap after this phase is completed; otherwise, it will begin cleaning up indexes after this phase is completed. </entry> @@ -3408,7 +3408,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid, <row> <entry><literal>cleaning up indexes</literal></entry> <entry> - <command>VACUUM</> is currently cleaning up indexes. This occurs after + <command>VACUUM</command> is currently cleaning up indexes. This occurs after the heap has been completely scanned and all vacuuming of the indexes and the heap has been completed. </entry> @@ -3416,7 +3416,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid, <row> <entry><literal>truncating heap</literal></entry> <entry> - <command>VACUUM</> is currently truncating the heap so as to return + <command>VACUUM</command> is currently truncating the heap so as to return empty pages at the end of the relation to the operating system. This occurs after cleaning up indexes. </entry> @@ -3424,10 +3424,10 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid, <row> <entry><literal>performing final cleanup</literal></entry> <entry> - <command>VACUUM</> is performing final cleanup. During this phase, - <command>VACUUM</> will vacuum the free space map, update statistics - in <literal>pg_class</>, and report statistics to the statistics - collector. When this phase is completed, <command>VACUUM</> will end. + <command>VACUUM</command> is performing final cleanup. During this phase, + <command>VACUUM</command> will vacuum the free space map, update statistics + in <literal>pg_class</literal>, and report statistics to the statistics + collector. When this phase is completed, <command>VACUUM</command> will end. </entry> </row> </tbody> @@ -3467,7 +3467,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid, <ulink url="http://sourceware.org/systemtap/">SystemTap</ulink> project for Linux provides a DTrace equivalent and can also be used. Supporting other dynamic tracing utilities is theoretically possible by changing the definitions for - the macros in <filename>src/include/utils/probes.h</>. + the macros in <filename>src/include/utils/probes.h</filename>. </para> <sect2 id="compiling-for-trace"> @@ -3477,7 +3477,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid, By default, probes are not available, so you will need to explicitly tell the configure script to make the probes available in <productname>PostgreSQL</productname>. To include DTrace support - specify <option>--enable-dtrace</> to configure. See <xref + specify <option>--enable-dtrace</option> to configure. See <xref linkend="install-procedure"> for further information. </para> </sect2> @@ -3490,7 +3490,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid, as shown in <xref linkend="dtrace-probe-point-table">; <xref linkend="typedefs-table"> shows the types used in the probes. More probes can certainly be - added to enhance <productname>PostgreSQL</>'s observability. + added to enhance <productname>PostgreSQL</productname>'s observability. </para> <table id="dtrace-probe-point-table"> @@ -3584,7 +3584,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid, <entry><literal>statement-status</literal></entry> <entry><literal>(const char *)</literal></entry> <entry>Probe that fires anytime the server process updates its - <structname>pg_stat_activity</>.<structfield>status</>. + <structname>pg_stat_activity</structname>.<structfield>status</structfield>. arg0 is the new status string.</entry> </row> <row> @@ -3978,7 +3978,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid, <para> The example below shows a DTrace script for analyzing transaction counts in the system, as an alternative to snapshotting - <structname>pg_stat_database</> before and after a performance test: + <structname>pg_stat_database</structname> before and after a performance test: <programlisting> #!/usr/sbin/dtrace -qs @@ -4050,15 +4050,15 @@ Total time (ns) 2312105013 <step> <para> - Add the probe definitions to <filename>src/backend/utils/probes.d</> + Add the probe definitions to <filename>src/backend/utils/probes.d</filename> </para> </step> <step> <para> - Include <filename>pg_trace.h</> if it is not already present in the + Include <filename>pg_trace.h</filename> if it is not already present in the module(s) containing the probe points, and insert - <literal>TRACE_POSTGRESQL</> probe macros at the desired locations + <literal>TRACE_POSTGRESQL</literal> probe macros at the desired locations in the source code </para> </step> @@ -4081,30 +4081,30 @@ Total time (ns) 2312105013 <procedure> <step> <para> - Decide that the probe will be named <literal>transaction-start</> and + Decide that the probe will be named <literal>transaction-start</literal> and requires a parameter of type <type>LocalTransactionId</type> </para> </step> <step> <para> - Add the probe definition to <filename>src/backend/utils/probes.d</>: + Add the probe definition to <filename>src/backend/utils/probes.d</filename>: <programlisting> probe transaction__start(LocalTransactionId); </programlisting> Note the use of the double underline in the probe name. In a DTrace script using the probe, the double underline needs to be replaced with a - hyphen, so <literal>transaction-start</> is the name to document for + hyphen, so <literal>transaction-start</literal> is the name to document for users. </para> </step> <step> <para> - At compile time, <literal>transaction__start</> is converted to a macro - called <literal>TRACE_POSTGRESQL_TRANSACTION_START</> (notice the + At compile time, <literal>transaction__start</literal> is converted to a macro + called <literal>TRACE_POSTGRESQL_TRANSACTION_START</literal> (notice the underscores are single here), which is available by including - <filename>pg_trace.h</>. Add the macro call to the appropriate location + <filename>pg_trace.h</filename>. Add the macro call to the appropriate location in the source code. In this case, it looks like the following: <programlisting> @@ -4148,9 +4148,9 @@ TRACE_POSTGRESQL_TRANSACTION_START(vxid.localTransactionId); <listitem> <para> On most platforms, if <productname>PostgreSQL</productname> is - built with <option>--enable-dtrace</>, the arguments to a trace + built with <option>--enable-dtrace</option>, the arguments to a trace macro will be evaluated whenever control passes through the - macro, <emphasis>even if no tracing is being done</>. This is + macro, <emphasis>even if no tracing is being done</emphasis>. This is usually not worth worrying about if you are just reporting the values of a few local variables. But beware of putting expensive function calls into the arguments. If you need to do that, @@ -4162,7 +4162,7 @@ if (TRACE_POSTGRESQL_TRANSACTION_START_ENABLED()) TRACE_POSTGRESQL_TRANSACTION_START(some_function(...)); </programlisting> - Each trace macro has a corresponding <literal>ENABLED</> macro. + Each trace macro has a corresponding <literal>ENABLED</literal> macro. </para> </listitem> </itemizedlist> diff --git a/doc/src/sgml/mvcc.sgml b/doc/src/sgml/mvcc.sgml index dda01708864..75cb39359fa 100644 --- a/doc/src/sgml/mvcc.sgml +++ b/doc/src/sgml/mvcc.sgml @@ -279,7 +279,7 @@ The table also shows that PostgreSQL's Repeatable Read implementation does not allow phantom reads. Stricter behavior is permitted by the SQL standard: the four isolation levels only define which phenomena - must not happen, not which phenomena <emphasis>must</> happen. + must not happen, not which phenomena <emphasis>must</emphasis> happen. The behavior of the available isolation levels is detailed in the following subsections. </para> @@ -317,7 +317,7 @@ <firstterm>Read Committed</firstterm> is the default isolation level in <productname>PostgreSQL</productname>. When a transaction uses this isolation level, a <command>SELECT</command> query - (without a <literal>FOR UPDATE/SHARE</> clause) sees only data + (without a <literal>FOR UPDATE/SHARE</literal> clause) sees only data committed before the query began; it never sees either uncommitted data or changes committed during query execution by concurrent transactions. In effect, a <command>SELECT</command> query sees @@ -345,7 +345,7 @@ updating the originally found row. If the first updater commits, the second updater will ignore the row if the first updater deleted it, otherwise it will attempt to apply its operation to the updated version of - the row. The search condition of the command (the <literal>WHERE</> clause) is + the row. The search condition of the command (the <literal>WHERE</literal> clause) is re-evaluated to see if the updated version of the row still matches the search condition. If so, the second updater proceeds with its operation using the updated version of the row. In the case of @@ -355,19 +355,19 @@ </para> <para> - <command>INSERT</command> with an <literal>ON CONFLICT DO UPDATE</> clause + <command>INSERT</command> with an <literal>ON CONFLICT DO UPDATE</literal> clause behaves similarly. In Read Committed mode, each row proposed for insertion will either insert or update. Unless there are unrelated errors, one of those two outcomes is guaranteed. If a conflict originates in another transaction whose effects are not yet visible to the <command>INSERT </command>, the <command>UPDATE</command> clause will affect that row, - even though possibly <emphasis>no</> version of that row is + even though possibly <emphasis>no</emphasis> version of that row is conventionally visible to the command. </para> <para> <command>INSERT</command> with an <literal>ON CONFLICT DO - NOTHING</> clause may have insertion not proceed for a row due to + NOTHING</literal> clause may have insertion not proceed for a row due to the outcome of another transaction whose effects are not visible to the <command>INSERT</command> snapshot. Again, this is only the case in Read Committed mode. @@ -416,10 +416,10 @@ COMMIT; The <command>DELETE</command> will have no effect even though there is a <literal>website.hits = 10</literal> row before and after the <command>UPDATE</command>. This occurs because the - pre-update row value <literal>9</> is skipped, and when the + pre-update row value <literal>9</literal> is skipped, and when the <command>UPDATE</command> completes and <command>DELETE</command> - obtains a lock, the new row value is no longer <literal>10</> but - <literal>11</>, which no longer matches the criteria. + obtains a lock, the new row value is no longer <literal>10</literal> but + <literal>11</literal>, which no longer matches the criteria. </para> <para> @@ -427,7 +427,7 @@ COMMIT; that includes all transactions committed up to that instant, subsequent commands in the same transaction will see the effects of the committed concurrent transaction in any case. The point - at issue above is whether or not a <emphasis>single</> command + at issue above is whether or not a <emphasis>single</emphasis> command sees an absolutely consistent view of the database. </para> @@ -472,9 +472,9 @@ COMMIT; This level is different from Read Committed in that a query in a repeatable read transaction sees a snapshot as of the start of the first non-transaction-control statement in the - <emphasis>transaction</>, not as of the start + <emphasis>transaction</emphasis>, not as of the start of the current statement within the transaction. Thus, successive - <command>SELECT</command> commands within a <emphasis>single</> + <command>SELECT</command> commands within a <emphasis>single</emphasis> transaction see the same data, i.e., they do not see changes made by other transactions that committed after their own transaction started. </para> @@ -587,7 +587,7 @@ ERROR: could not serialize access due to concurrent update <para> As an example, - consider a table <structname>mytab</>, initially containing: + consider a table <structname>mytab</structname>, initially containing: <screen> class | value -------+------- @@ -600,14 +600,14 @@ ERROR: could not serialize access due to concurrent update <screen> SELECT SUM(value) FROM mytab WHERE class = 1; </screen> - and then inserts the result (30) as the <structfield>value</> in a - new row with <structfield>class</><literal> = 2</>. Concurrently, serializable + and then inserts the result (30) as the <structfield>value</structfield> in a + new row with <structfield>class</structfield><literal> = 2</literal>. Concurrently, serializable transaction B computes: <screen> SELECT SUM(value) FROM mytab WHERE class = 2; </screen> and obtains the result 300, which it inserts in a new row with - <structfield>class</><literal> = 1</>. Then both transactions try to commit. + <structfield>class</structfield><literal> = 1</literal>. Then both transactions try to commit. If either transaction were running at the Repeatable Read isolation level, both would be allowed to commit; but since there is no serial order of execution consistent with the result, using Serializable transactions will allow one @@ -639,11 +639,11 @@ ERROR: could not serialize access due to read/write dependencies among transact <para> To guarantee true serializability <productname>PostgreSQL</productname> - uses <firstterm>predicate locking</>, which means that it keeps locks + uses <firstterm>predicate locking</firstterm>, which means that it keeps locks which allow it to determine when a write would have had an impact on the result of a previous read from a concurrent transaction, had it run first. In <productname>PostgreSQL</productname> these locks do not - cause any blocking and therefore can <emphasis>not</> play any part in + cause any blocking and therefore can <emphasis>not</emphasis> play any part in causing a deadlock. They are used to identify and flag dependencies among concurrent Serializable transactions which in certain combinations can lead to serialization anomalies. In contrast, a Read Committed or @@ -659,20 +659,20 @@ ERROR: could not serialize access due to read/write dependencies among transact other database systems, are based on data actually accessed by a transaction. These will show up in the <link linkend="view-pg-locks"><structname>pg_locks</structname></link> - system view with a <literal>mode</> of <literal>SIReadLock</>. The + system view with a <literal>mode</literal> of <literal>SIReadLock</literal>. The particular locks acquired during execution of a query will depend on the plan used by the query, and multiple finer-grained locks (e.g., tuple locks) may be combined into fewer coarser-grained locks (e.g., page locks) during the course of the transaction to prevent exhaustion of the memory used to - track the locks. A <literal>READ ONLY</> transaction may be able to + track the locks. A <literal>READ ONLY</literal> transaction may be able to release its SIRead locks before completion, if it detects that no conflicts can still occur which could lead to a serialization anomaly. - In fact, <literal>READ ONLY</> transactions will often be able to + In fact, <literal>READ ONLY</literal> transactions will often be able to establish that fact at startup and avoid taking any predicate locks. - If you explicitly request a <literal>SERIALIZABLE READ ONLY DEFERRABLE</> + If you explicitly request a <literal>SERIALIZABLE READ ONLY DEFERRABLE</literal> transaction, it will block until it can establish this fact. (This is - the <emphasis>only</> case where Serializable transactions block but + the <emphasis>only</emphasis> case where Serializable transactions block but Repeatable Read transactions don't.) On the other hand, SIRead locks often need to be kept past transaction commit, until overlapping read write transactions complete. @@ -695,13 +695,13 @@ ERROR: could not serialize access due to read/write dependencies among transact anomalies. The monitoring of read/write dependencies has a cost, as does the restart of transactions which are terminated with a serialization failure, but balanced against the cost and blocking involved in use of - explicit locks and <literal>SELECT FOR UPDATE</> or <literal>SELECT FOR - SHARE</>, Serializable transactions are the best performance choice + explicit locks and <literal>SELECT FOR UPDATE</literal> or <literal>SELECT FOR + SHARE</literal>, Serializable transactions are the best performance choice for some environments. </para> <para> - While <productname>PostgreSQL</>'s Serializable transaction isolation + While <productname>PostgreSQL</productname>'s Serializable transaction isolation level only allows concurrent transactions to commit if it can prove there is a serial order of execution that would produce the same effect, it doesn't always prevent errors from being raised that would not occur in @@ -709,7 +709,7 @@ ERROR: could not serialize access due to read/write dependencies among transact constraint violations caused by conflicts with overlapping Serializable transactions even after explicitly checking that the key isn't present before attempting to insert it. This can be avoided by making sure - that <emphasis>all</> Serializable transactions that insert potentially + that <emphasis>all</emphasis> Serializable transactions that insert potentially conflicting keys explicitly check if they can do so first. For example, imagine an application that asks the user for a new key and then checks that it doesn't exist already by trying to select it first, or generates @@ -727,7 +727,7 @@ ERROR: could not serialize access due to read/write dependencies among transact <itemizedlist> <listitem> <para> - Declare transactions as <literal>READ ONLY</> when possible. + Declare transactions as <literal>READ ONLY</literal> when possible. </para> </listitem> <listitem> @@ -754,8 +754,8 @@ ERROR: could not serialize access due to read/write dependencies among transact </listitem> <listitem> <para> - Eliminate explicit locks, <literal>SELECT FOR UPDATE</>, and - <literal>SELECT FOR SHARE</> where no longer needed due to the + Eliminate explicit locks, <literal>SELECT FOR UPDATE</literal>, and + <literal>SELECT FOR SHARE</literal> where no longer needed due to the protections automatically provided by Serializable transactions. </para> </listitem> @@ -801,7 +801,7 @@ ERROR: could not serialize access due to read/write dependencies among transact most <productname>PostgreSQL</productname> commands automatically acquire locks of appropriate modes to ensure that referenced tables are not dropped or modified in incompatible ways while the - command executes. (For example, <command>TRUNCATE</> cannot safely be + command executes. (For example, <command>TRUNCATE</command> cannot safely be executed concurrently with other operations on the same table, so it obtains an exclusive lock on the table to enforce that.) </para> @@ -860,7 +860,7 @@ ERROR: could not serialize access due to read/write dependencies among transact <para> The <command>SELECT</command> command acquires a lock of this mode on - referenced tables. In general, any query that only <emphasis>reads</> a table + referenced tables. In general, any query that only <emphasis>reads</emphasis> a table and does not modify it will acquire this lock mode. </para> </listitem> @@ -904,7 +904,7 @@ ERROR: could not serialize access due to read/write dependencies among transact acquire this lock mode on the target table (in addition to <literal>ACCESS SHARE</literal> locks on any other referenced tables). In general, this lock mode will be acquired by any - command that <emphasis>modifies data</> in a table. + command that <emphasis>modifies data</emphasis> in a table. </para> </listitem> </varlistentry> @@ -920,13 +920,13 @@ ERROR: could not serialize access due to read/write dependencies among transact EXCLUSIVE</literal>, <literal>EXCLUSIVE</literal>, and <literal>ACCESS EXCLUSIVE</literal> lock modes. This mode protects a table against - concurrent schema changes and <command>VACUUM</> runs. + concurrent schema changes and <command>VACUUM</command> runs. </para> <para> Acquired by <command>VACUUM</command> (without <option>FULL</option>), - <command>ANALYZE</>, <command>CREATE INDEX CONCURRENTLY</>, - <command>CREATE STATISTICS</> and + <command>ANALYZE</command>, <command>CREATE INDEX CONCURRENTLY</command>, + <command>CREATE STATISTICS</command> and <command>ALTER TABLE VALIDATE</command> and other <command>ALTER TABLE</command> variants (for full details see <xref linkend="SQL-ALTERTABLE">). @@ -1016,12 +1016,12 @@ ERROR: could not serialize access due to read/write dependencies among transact </para> <para> - Acquired by the <command>DROP TABLE</>, + Acquired by the <command>DROP TABLE</command>, <command>TRUNCATE</command>, <command>REINDEX</command>, <command>CLUSTER</command>, <command>VACUUM FULL</command>, and <command>REFRESH MATERIALIZED VIEW</command> (without <option>CONCURRENTLY</option>) - commands. Many forms of <command>ALTER TABLE</> also acquire + commands. Many forms of <command>ALTER TABLE</command> also acquire a lock at this level. This is also the default lock mode for <command>LOCK TABLE</command> statements that do not specify a mode explicitly. @@ -1042,9 +1042,9 @@ ERROR: could not serialize access due to read/write dependencies among transact Once acquired, a lock is normally held till end of transaction. But if a lock is acquired after establishing a savepoint, the lock is released immediately if the savepoint is rolled back to. This is consistent with - the principle that <command>ROLLBACK</> cancels all effects of the + the principle that <command>ROLLBACK</command> cancels all effects of the commands since the savepoint. The same holds for locks acquired within a - <application>PL/pgSQL</> exception block: an error escape from the block + <application>PL/pgSQL</application> exception block: an error escape from the block releases locks acquired within it. </para> @@ -1204,17 +1204,17 @@ ERROR: could not serialize access due to read/write dependencies among transact concurrent transaction that has run any of those commands on the same row, and will then lock and return the updated row (or no row, if the - row was deleted). Within a <literal>REPEATABLE READ</> or - <literal>SERIALIZABLE</> transaction, + row was deleted). Within a <literal>REPEATABLE READ</literal> or + <literal>SERIALIZABLE</literal> transaction, however, an error will be thrown if a row to be locked has changed since the transaction started. For further discussion see <xref linkend="applevel-consistency">. </para> <para> - The <literal>FOR UPDATE</> lock mode - is also acquired by any <command>DELETE</> on a row, and also by an - <command>UPDATE</> that modifies the values on certain columns. Currently, - the set of columns considered for the <command>UPDATE</> case are those that + The <literal>FOR UPDATE</literal> lock mode + is also acquired by any <command>DELETE</command> on a row, and also by an + <command>UPDATE</command> that modifies the values on certain columns. Currently, + the set of columns considered for the <command>UPDATE</command> case are those that have a unique index on them that can be used in a foreign key (so partial indexes and expressional indexes are not considered), but this may change in the future. @@ -1228,11 +1228,11 @@ ERROR: could not serialize access due to read/write dependencies among transact </term> <listitem> <para> - Behaves similarly to <literal>FOR UPDATE</>, except that the lock + Behaves similarly to <literal>FOR UPDATE</literal>, except that the lock acquired is weaker: this lock will not block - <literal>SELECT FOR KEY SHARE</> commands that attempt to acquire + <literal>SELECT FOR KEY SHARE</literal> commands that attempt to acquire a lock on the same rows. This lock mode is also acquired by any - <command>UPDATE</> that does not acquire a <literal>FOR UPDATE</> lock. + <command>UPDATE</command> that does not acquire a <literal>FOR UPDATE</literal> lock. </para> </listitem> </varlistentry> @@ -1243,12 +1243,12 @@ ERROR: could not serialize access due to read/write dependencies among transact </term> <listitem> <para> - Behaves similarly to <literal>FOR NO KEY UPDATE</>, except that it + Behaves similarly to <literal>FOR NO KEY UPDATE</literal>, except that it acquires a shared lock rather than exclusive lock on each retrieved row. A shared lock blocks other transactions from performing <command>UPDATE</command>, <command>DELETE</command>, <command>SELECT FOR UPDATE</command> or - <command>SELECT FOR NO KEY UPDATE</> on these rows, but it does not + <command>SELECT FOR NO KEY UPDATE</command> on these rows, but it does not prevent them from performing <command>SELECT FOR SHARE</command> or <command>SELECT FOR KEY SHARE</command>. </para> @@ -1262,13 +1262,13 @@ ERROR: could not serialize access due to read/write dependencies among transact <listitem> <para> Behaves similarly to <literal>FOR SHARE</literal>, except that the - lock is weaker: <literal>SELECT FOR UPDATE</> is blocked, but not - <literal>SELECT FOR NO KEY UPDATE</>. A key-shared lock blocks + lock is weaker: <literal>SELECT FOR UPDATE</literal> is blocked, but not + <literal>SELECT FOR NO KEY UPDATE</literal>. A key-shared lock blocks other transactions from performing <command>DELETE</command> or any <command>UPDATE</command> that changes the key values, but not - other <command>UPDATE</>, and neither does it prevent - <command>SELECT FOR NO KEY UPDATE</>, <command>SELECT FOR SHARE</>, - or <command>SELECT FOR KEY SHARE</>. + other <command>UPDATE</command>, and neither does it prevent + <command>SELECT FOR NO KEY UPDATE</command>, <command>SELECT FOR SHARE</command>, + or <command>SELECT FOR KEY SHARE</command>. </para> </listitem> </varlistentry> @@ -1357,7 +1357,7 @@ ERROR: could not serialize access due to read/write dependencies among transact <para> The use of explicit locking can increase the likelihood of - <firstterm>deadlocks</>, wherein two (or more) transactions each + <firstterm>deadlocks</firstterm>, wherein two (or more) transactions each hold locks that the other wants. For example, if transaction 1 acquires an exclusive lock on table A and then tries to acquire an exclusive lock on table B, while transaction 2 has already @@ -1447,12 +1447,12 @@ UPDATE accounts SET balance = balance - 100.00 WHERE acctnum = 22222; <para> <productname>PostgreSQL</productname> provides a means for creating locks that have application-defined meanings. These are - called <firstterm>advisory locks</>, because the system does not + called <firstterm>advisory locks</firstterm>, because the system does not enforce their use — it is up to the application to use them correctly. Advisory locks can be useful for locking strategies that are an awkward fit for the MVCC model. For example, a common use of advisory locks is to emulate pessimistic - locking strategies typical of so-called <quote>flat file</> data + locking strategies typical of so-called <quote>flat file</quote> data management systems. While a flag stored in a table could be used for the same purpose, advisory locks are faster, avoid table bloat, and are automatically @@ -1506,7 +1506,7 @@ UPDATE accounts SET balance = balance - 100.00 WHERE acctnum = 22222; <para> In certain cases using advisory locking methods, especially in queries - involving explicit ordering and <literal>LIMIT</> clauses, care must be + involving explicit ordering and <literal>LIMIT</literal> clauses, care must be taken to control the locks acquired because of the order in which SQL expressions are evaluated. For example: <screen> @@ -1518,7 +1518,7 @@ SELECT pg_advisory_lock(q.id) FROM ) q; -- ok </screen> In the above queries, the second form is dangerous because the - <literal>LIMIT</> is not guaranteed to be applied before the locking + <literal>LIMIT</literal> is not guaranteed to be applied before the locking function is executed. This might cause some locks to be acquired that the application was not expecting, and hence would fail to release (until it ends the session). @@ -1590,7 +1590,7 @@ SELECT pg_advisory_lock(q.id) FROM for application programmers if the application software goes through a framework which automatically retries transactions which are rolled back with a serialization failure. It may be a good idea to set - <literal>default_transaction_isolation</> to <literal>serializable</>. + <literal>default_transaction_isolation</literal> to <literal>serializable</literal>. It would also be wise to take some action to ensure that no other transaction isolation level is used, either inadvertently or to subvert integrity checks, through checks of the transaction isolation @@ -1660,7 +1660,7 @@ SELECT pg_advisory_lock(q.id) FROM includes some but not all post-transaction-start changes. In such cases a careful person might wish to lock all tables needed for the check, in order to get an indisputable picture of current reality. A - <literal>SHARE</> mode (or higher) lock guarantees that there are no + <literal>SHARE</literal> mode (or higher) lock guarantees that there are no uncommitted changes in the locked table, other than those of the current transaction. </para> @@ -1675,8 +1675,8 @@ SELECT pg_advisory_lock(q.id) FROM transaction predates obtaining the lock, it might predate some now-committed changes in the table. A repeatable read transaction's snapshot is actually frozen at the start of its first query or data-modification command - (<literal>SELECT</>, <literal>INSERT</>, - <literal>UPDATE</>, or <literal>DELETE</>), so + (<literal>SELECT</literal>, <literal>INSERT</literal>, + <literal>UPDATE</literal>, or <literal>DELETE</literal>), so it is possible to obtain locks explicitly before the snapshot is frozen. </para> diff --git a/doc/src/sgml/nls.sgml b/doc/src/sgml/nls.sgml index 1d331473af3..f312b5bfb5d 100644 --- a/doc/src/sgml/nls.sgml +++ b/doc/src/sgml/nls.sgml @@ -7,12 +7,12 @@ <title>For the Translator</title> <para> - <productname>PostgreSQL</> + <productname>PostgreSQL</productname> programs (server and client) can issue their messages in your favorite language — if the messages have been translated. Creating and maintaining translated message sets needs the help of people who speak their own language well and want to contribute to - the <productname>PostgreSQL</> effort. You do not have to be a + the <productname>PostgreSQL</productname> effort. You do not have to be a programmer at all to do this. This section explains how to help. </para> @@ -170,8 +170,8 @@ make init-po This will create a file <filename><replaceable>progname</replaceable>.pot</filename>. (<filename>.pot</filename> to distinguish it from PO files that - are <quote>in production</quote>. The <literal>T</> stands for - <quote>template</>.) + are <quote>in production</quote>. The <literal>T</literal> stands for + <quote>template</quote>.) Copy this file to <filename><replaceable>language</replaceable>.po</filename> and edit it. To make it known that the new language is available, @@ -234,7 +234,7 @@ make update-po <listitem> <para> - If the original is a <function>printf</> format string, the translation + If the original is a <function>printf</function> format string, the translation also needs to be. The translation also needs to have the same format specifiers in the same order. Sometimes the natural rules of the language make this impossible or at least awkward. @@ -301,7 +301,7 @@ msgstr "Die Datei %2$s hat %1$u Zeichen." <para> This section describes how to implement native language support in a program or library that is part of the - <productname>PostgreSQL</> distribution. + <productname>PostgreSQL</productname> distribution. Currently, it only applies to C programs. </para> @@ -447,7 +447,7 @@ fprintf(stderr, gettext("panic level %d\n"), lvl); printf("Files were %s.\n", flag ? "copied" : "removed"); </programlisting> The word order within the sentence might be different in other - languages. Also, even if you remember to call <function>gettext()</> on + languages. Also, even if you remember to call <function>gettext()</function> on each fragment, the fragments might not translate well separately. It's better to duplicate a little code so that each message to be translated is a coherent whole. Only numbers, file names, and @@ -481,7 +481,7 @@ printf("number of copied files: %d", n); <para> If you really want to construct a properly pluralized message, there is support for this, but it's a bit awkward. When generating - a primary or detail error message in <function>ereport()</>, you can + a primary or detail error message in <function>ereport()</function>, you can write something like this: <programlisting> errmsg_plural("copied %d file", @@ -496,17 +496,17 @@ errmsg_plural("copied %d file", are formatted per the format string as usual. (Normally, the pluralization control value will also be one of the values to be formatted, so it has to be written twice.) In English it only - matters whether <replaceable>n</> is 1 or not 1, but in other + matters whether <replaceable>n</replaceable> is 1 or not 1, but in other languages there can be many different plural forms. The translator sees the two English forms as a group and has the opportunity to supply multiple substitute strings, with the appropriate one being - selected based on the run-time value of <replaceable>n</>. + selected based on the run-time value of <replaceable>n</replaceable>. </para> <para> If you need to pluralize a message that isn't going directly to an - <function>errmsg</> or <function>errdetail</> report, you have to use - the underlying function <function>ngettext</>. See the gettext + <function>errmsg</function> or <function>errdetail</function> report, you have to use + the underlying function <function>ngettext</function>. See the gettext documentation. </para> </listitem> diff --git a/doc/src/sgml/notation.sgml b/doc/src/sgml/notation.sgml index 2f350a329df..bd1e8f629a6 100644 --- a/doc/src/sgml/notation.sgml +++ b/doc/src/sgml/notation.sgml @@ -7,17 +7,17 @@ The following conventions are used in the synopsis of a command: brackets (<literal>[</literal> and <literal>]</literal>) indicate optional parts. (In the synopsis of a Tcl command, question marks - (<literal>?</>) are used instead, as is usual in Tcl.) Braces + (<literal>?</literal>) are used instead, as is usual in Tcl.) Braces (<literal>{</literal> and <literal>}</literal>) and vertical lines (<literal>|</literal>) indicate that you must choose one - alternative. Dots (<literal>...</>) mean that the preceding element + alternative. Dots (<literal>...</literal>) mean that the preceding element can be repeated. </para> <para> Where it enhances the clarity, SQL commands are preceded by the - prompt <literal>=></>, and shell commands are preceded by the - prompt <literal>$</>. Normally, prompts are not shown, though. + prompt <literal>=></literal>, and shell commands are preceded by the + prompt <literal>$</literal>. Normally, prompts are not shown, though. </para> <para> diff --git a/doc/src/sgml/oid2name.sgml b/doc/src/sgml/oid2name.sgml index 97b170a23f7..4ab2cf1a859 100644 --- a/doc/src/sgml/oid2name.sgml +++ b/doc/src/sgml/oid2name.sgml @@ -27,7 +27,7 @@ <title>Description</title> <para> - <application>oid2name</> is a utility program that helps administrators to + <application>oid2name</application> is a utility program that helps administrators to examine the file structure used by PostgreSQL. To make use of it, you need to be familiar with the database file structure, which is described in <xref linkend="storage">. @@ -35,7 +35,7 @@ <note> <para> - The name <quote>oid2name</> is historical, and is actually rather + The name <quote>oid2name</quote> is historical, and is actually rather misleading, since most of the time when you use it, you will really be concerned with tables' filenode numbers (which are the file names visible in the database directories). Be sure you understand the @@ -60,8 +60,8 @@ <variablelist> <varlistentry> - <term><option>-f</option> <replaceable>filenode</></term> - <listitem><para>show info for table with filenode <replaceable>filenode</></para></listitem> + <term><option>-f</option> <replaceable>filenode</replaceable></term> + <listitem><para>show info for table with filenode <replaceable>filenode</replaceable></para></listitem> </varlistentry> <varlistentry> @@ -70,8 +70,8 @@ </varlistentry> <varlistentry> - <term><option>-o</option> <replaceable>oid</></term> - <listitem><para>show info for table with OID <replaceable>oid</></para></listitem> + <term><option>-o</option> <replaceable>oid</replaceable></term> + <listitem><para>show info for table with OID <replaceable>oid</replaceable></para></listitem> </varlistentry> <varlistentry> @@ -93,13 +93,13 @@ </varlistentry> <varlistentry> - <term><option>-t</option> <replaceable>tablename_pattern</></term> - <listitem><para>show info for table(s) matching <replaceable>tablename_pattern</></para></listitem> + <term><option>-t</option> <replaceable>tablename_pattern</replaceable></term> + <listitem><para>show info for table(s) matching <replaceable>tablename_pattern</replaceable></para></listitem> </varlistentry> <varlistentry> - <term><option>-V</></term> - <term><option>--version</></term> + <term><option>-V</option></term> + <term><option>--version</option></term> <listitem> <para> Print the <application>oid2name</application> version and exit. @@ -115,8 +115,8 @@ </varlistentry> <varlistentry> - <term><option>-?</></term> - <term><option>--help</></term> + <term><option>-?</option></term> + <term><option>--help</option></term> <listitem> <para> Show help about <application>oid2name</application> command line @@ -133,27 +133,27 @@ <variablelist> <varlistentry> - <term><option>-d</option> <replaceable>database</></term> + <term><option>-d</option> <replaceable>database</replaceable></term> <listitem><para>database to connect to</para></listitem> </varlistentry> <varlistentry> - <term><option>-H</option> <replaceable>host</></term> + <term><option>-H</option> <replaceable>host</replaceable></term> <listitem><para>database server's host</para></listitem> </varlistentry> <varlistentry> - <term><option>-p</option> <replaceable>port</></term> + <term><option>-p</option> <replaceable>port</replaceable></term> <listitem><para>database server's port</para></listitem> </varlistentry> <varlistentry> - <term><option>-U</option> <replaceable>username</></term> + <term><option>-U</option> <replaceable>username</replaceable></term> <listitem><para>user name to connect as</para></listitem> </varlistentry> <varlistentry> - <term><option>-P</option> <replaceable>password</></term> + <term><option>-P</option> <replaceable>password</replaceable></term> <listitem><para>password (deprecated — putting this on the command line is a security hazard)</para></listitem> </varlistentry> @@ -163,27 +163,27 @@ <para> To display specific tables, select which tables to show by - using <option>-o</>, <option>-f</> and/or <option>-t</>. - <option>-o</> takes an OID, - <option>-f</> takes a filenode, - and <option>-t</> takes a table name (actually, it's a <literal>LIKE</> - pattern, so you can use things like <literal>foo%</>). + using <option>-o</option>, <option>-f</option> and/or <option>-t</option>. + <option>-o</option> takes an OID, + <option>-f</option> takes a filenode, + and <option>-t</option> takes a table name (actually, it's a <literal>LIKE</literal> + pattern, so you can use things like <literal>foo%</literal>). You can use as many of these options as you like, and the listing will include all objects matched by any of the options. But note that these options can only - show objects in the database given by <option>-d</>. + show objects in the database given by <option>-d</option>. </para> <para> - If you don't give any of <option>-o</>, <option>-f</> or <option>-t</>, - but do give <option>-d</>, it will list all tables in the database - named by <option>-d</>. In this mode, the <option>-S</> and - <option>-i</> options control what gets listed. + If you don't give any of <option>-o</option>, <option>-f</option> or <option>-t</option>, + but do give <option>-d</option>, it will list all tables in the database + named by <option>-d</option>. In this mode, the <option>-S</option> and + <option>-i</option> options control what gets listed. </para> <para> - If you don't give <option>-d</> either, it will show a listing of database - OIDs. Alternatively you can give <option>-s</> to get a tablespace + If you don't give <option>-d</option> either, it will show a listing of database + OIDs. Alternatively you can give <option>-s</option> to get a tablespace listing. </para> </refsect1> @@ -192,7 +192,7 @@ <title>Notes</title> <para> - <application>oid2name</> requires a running database server with + <application>oid2name</application> requires a running database server with non-corrupt system catalogs. It is therefore of only limited use for recovering from catastrophic database corruption situations. </para> diff --git a/doc/src/sgml/pageinspect.sgml b/doc/src/sgml/pageinspect.sgml index e46f5ca6bc6..23570af4bf8 100644 --- a/doc/src/sgml/pageinspect.sgml +++ b/doc/src/sgml/pageinspect.sgml @@ -8,7 +8,7 @@ </indexterm> <para> - The <filename>pageinspect</> module provides functions that allow you to + The <filename>pageinspect</filename> module provides functions that allow you to inspect the contents of database pages at a low level, which is useful for debugging purposes. All of these functions may be used only by superusers. </para> @@ -28,7 +28,7 @@ <listitem> <para> <function>get_raw_page</function> reads the specified block of the named - relation and returns a copy as a <type>bytea</> value. This allows a + relation and returns a copy as a <type>bytea</type> value. This allows a single time-consistent copy of the block to be obtained. <replaceable>fork</replaceable> should be <literal>'main'</literal> for the main data fork, <literal>'fsm'</literal> for the free space map, @@ -63,7 +63,7 @@ <listitem> <para> <function>page_header</function> shows fields that are common to all - <productname>PostgreSQL</> heap and index pages. + <productname>PostgreSQL</productname> heap and index pages. </para> <para> @@ -76,8 +76,8 @@ test=# SELECT * FROM page_header(get_raw_page('pg_class', 0)); 0/24A1B50 | 0 | 1 | 232 | 368 | 8192 | 8192 | 4 | 0 </screen> The returned columns correspond to the fields in the - <structname>PageHeaderData</> struct. - See <filename>src/include/storage/bufpage.h</> for details. + <structname>PageHeaderData</structname> struct. + See <filename>src/include/storage/bufpage.h</filename> for details. </para> <para> @@ -147,8 +147,8 @@ test=# SELECT page_checksum(get_raw_page('pg_class', 0), 0); <screen> test=# SELECT * FROM heap_page_items(get_raw_page('pg_class', 0)); </screen> - See <filename>src/include/storage/itemid.h</> and - <filename>src/include/access/htup_details.h</> for explanations of the fields + See <filename>src/include/storage/itemid.h</filename> and + <filename>src/include/access/htup_details.h</filename> for explanations of the fields returned. </para> </listitem> @@ -221,7 +221,7 @@ test=# SELECT * FROM heap_page_item_attrs(get_raw_page('pg_class', 0), 'pg_class next slot to be returned from the page, is also printed. </para> <para> - See <filename>src/backend/storage/freespace/README</> for more + See <filename>src/backend/storage/freespace/README</filename> for more information on the structure of an FSM page. </para> </listitem> @@ -315,21 +315,21 @@ test=# SELECT * FROM bt_page_items('pg_cast_oid_index', 1); 7 | (0,7) | 12 | f | f | 29 27 00 00 8 | (0,8) | 12 | f | f | 2a 27 00 00 </screen> - In a B-tree leaf page, <structfield>ctid</> points to a heap tuple. - In an internal page, the block number part of <structfield>ctid</> + In a B-tree leaf page, <structfield>ctid</structfield> points to a heap tuple. + In an internal page, the block number part of <structfield>ctid</structfield> points to another page in the index itself, while the offset part (the second number) is ignored and is usually 1. </para> <para> Note that the first item on any non-rightmost page (any page with - a non-zero value in the <structfield>btpo_next</> field) is the - page's <quote>high key</quote>, meaning its <structfield>data</> + a non-zero value in the <structfield>btpo_next</structfield> field) is the + page's <quote>high key</quote>, meaning its <structfield>data</structfield> serves as an upper bound on all items appearing on the page, while - its <structfield>ctid</> field is meaningless. Also, on non-leaf + its <structfield>ctid</structfield> field is meaningless. Also, on non-leaf pages, the first real data item (the first item that is not a high key) is a <quote>minus infinity</quote> item, with no actual value - in its <structfield>data</> field. Such an item does have a valid - downlink in its <structfield>ctid</> field, however. + in its <structfield>data</structfield> field. Such an item does have a valid + downlink in its <structfield>ctid</structfield> field, however. </para> </listitem> </varlistentry> @@ -345,7 +345,7 @@ test=# SELECT * FROM bt_page_items('pg_cast_oid_index', 1); <listitem> <para> It is also possible to pass a page to <function>bt_page_items</function> - as a <type>bytea</> value. A page image obtained + as a <type>bytea</type> value. A page image obtained with <function>get_raw_page</function> should be passed as argument. So the last example could also be rewritten like this: <screen> @@ -470,8 +470,8 @@ test=# SELECT * FROM brin_page_items(get_raw_page('brinidx', 5), 139 | 8 | 2 | f | f | f | {177 .. 264} </screen> The returned columns correspond to the fields in the - <structname>BrinMemTuple</> and <structname>BrinValues</> structs. - See <filename>src/include/access/brin_tuple.h</> for details. + <structname>BrinMemTuple</structname> and <structname>BrinValues</structname> structs. + See <filename>src/include/access/brin_tuple.h</filename> for details. </para> </listitem> </varlistentry> diff --git a/doc/src/sgml/parallel.sgml b/doc/src/sgml/parallel.sgml index 1f5efd9e6d9..6aac506942e 100644 --- a/doc/src/sgml/parallel.sgml +++ b/doc/src/sgml/parallel.sgml @@ -8,7 +8,7 @@ </indexterm> <para> - <productname>PostgreSQL</> can devise query plans which can leverage + <productname>PostgreSQL</productname> can devise query plans which can leverage multiple CPUs in order to answer queries faster. This feature is known as parallel query. Many queries cannot benefit from parallel query, either due to limitations of the current implementation or because there is no @@ -47,18 +47,18 @@ EXPLAIN SELECT * FROM pgbench_accounts WHERE filler LIKE '%x%'; In all cases, the <literal>Gather</literal> or <literal>Gather Merge</literal> node will have exactly one child plan, which is the portion of the plan that will be executed in - parallel. If the <literal>Gather</> or <literal>Gather Merge</> node is + parallel. If the <literal>Gather</literal> or <literal>Gather Merge</literal> node is at the very top of the plan tree, then the entire query will execute in parallel. If it is somewhere else in the plan tree, then only the portion of the plan below it will run in parallel. In the example above, the query accesses only one table, so there is only one plan node other than - the <literal>Gather</> node itself; since that plan node is a child of the - <literal>Gather</> node, it will run in parallel. + the <literal>Gather</literal> node itself; since that plan node is a child of the + <literal>Gather</literal> node, it will run in parallel. </para> <para> - <link linkend="using-explain">Using EXPLAIN</>, you can see the number of - workers chosen by the planner. When the <literal>Gather</> node is reached + <link linkend="using-explain">Using EXPLAIN</link>, you can see the number of + workers chosen by the planner. When the <literal>Gather</literal> node is reached during query execution, the process which is implementing the user's session will request a number of <link linkend="bgworker">background worker processes</link> equal to the number @@ -72,7 +72,7 @@ EXPLAIN SELECT * FROM pgbench_accounts WHERE filler LIKE '%x%'; no workers at all. The optimal plan may depend on the number of workers that are available, so this can result in poor query performance. If this occurrence is frequent, consider increasing - <varname>max_worker_processes</> and <varname>max_parallel_workers</> + <varname>max_worker_processes</varname> and <varname>max_parallel_workers</varname> so that more workers can be run simultaneously or alternatively reducing <varname>max_parallel_workers_per_gather</varname> so that the planner requests fewer workers. @@ -96,10 +96,10 @@ EXPLAIN SELECT * FROM pgbench_accounts WHERE filler LIKE '%x%'; <para> When the node at the top of the parallel portion of the plan is - <literal>Gather Merge</> rather than <literal>Gather</>, it indicates that + <literal>Gather Merge</literal> rather than <literal>Gather</literal>, it indicates that each process executing the parallel portion of the plan is producing tuples in sorted order, and that the leader is performing an - order-preserving merge. In contrast, <literal>Gather</> reads tuples + order-preserving merge. In contrast, <literal>Gather</literal> reads tuples from the workers in whatever order is convenient, destroying any sort order that may have existed. </para> @@ -128,7 +128,7 @@ EXPLAIN SELECT * FROM pgbench_accounts WHERE filler LIKE '%x%'; <listitem> <para> <xref linkend="guc-dynamic-shared-memory-type"> must be set to a - value other than <literal>none</>. Parallel query requires dynamic + value other than <literal>none</literal>. Parallel query requires dynamic shared memory in order to pass data between cooperating processes. </para> </listitem> @@ -152,8 +152,8 @@ EXPLAIN SELECT * FROM pgbench_accounts WHERE filler LIKE '%x%'; The query writes any data or locks any database rows. If a query contains a data-modifying operation either at the top level or within a CTE, no parallel plans for that query will be generated. As an - exception, the commands <literal>CREATE TABLE</>, <literal>SELECT - INTO</>, and <literal>CREATE MATERIALIZED VIEW</> which create a new + exception, the commands <literal>CREATE TABLE</literal>, <literal>SELECT + INTO</literal>, and <literal>CREATE MATERIALIZED VIEW</literal> which create a new table and populate it can use a parallel plan. </para> </listitem> @@ -205,8 +205,8 @@ EXPLAIN SELECT * FROM pgbench_accounts WHERE filler LIKE '%x%'; Even when parallel query plan is generated for a particular query, there are several circumstances under which it will be impossible to execute that plan in parallel at execution time. If this occurs, the leader - will execute the portion of the plan below the <literal>Gather</> - node entirely by itself, almost as if the <literal>Gather</> node were + will execute the portion of the plan below the <literal>Gather</literal> + node entirely by itself, almost as if the <literal>Gather</literal> node were not present. This will happen if any of the following conditions are met: </para> @@ -264,7 +264,7 @@ EXPLAIN SELECT * FROM pgbench_accounts WHERE filler LIKE '%x%'; copy of the output result set, so the query would not run any faster than normal but would produce incorrect results. Instead, the parallel portion of the plan must be what is known internally to the query - optimizer as a <firstterm>partial plan</>; that is, it must be constructed + optimizer as a <firstterm>partial plan</firstterm>; that is, it must be constructed so that each process which executes the plan will generate only a subset of the output rows in such a way that each required output row is guaranteed to be generated by exactly one of the cooperating processes. @@ -281,14 +281,14 @@ EXPLAIN SELECT * FROM pgbench_accounts WHERE filler LIKE '%x%'; <itemizedlist> <listitem> <para> - In a <emphasis>parallel sequential scan</>, the table's blocks will + In a <emphasis>parallel sequential scan</emphasis>, the table's blocks will be divided among the cooperating processes. Blocks are handed out one at a time, so that access to the table remains sequential. </para> </listitem> <listitem> <para> - In a <emphasis>parallel bitmap heap scan</>, one process is chosen + In a <emphasis>parallel bitmap heap scan</emphasis>, one process is chosen as the leader. That process performs a scan of one or more indexes and builds a bitmap indicating which table blocks need to be visited. These blocks are then divided among the cooperating processes as in @@ -298,8 +298,8 @@ EXPLAIN SELECT * FROM pgbench_accounts WHERE filler LIKE '%x%'; </listitem> <listitem> <para> - In a <emphasis>parallel index scan</> or <emphasis>parallel index-only - scan</>, the cooperating processes take turns reading data from the + In a <emphasis>parallel index scan</emphasis> or <emphasis>parallel index-only + scan</emphasis>, the cooperating processes take turns reading data from the index. Currently, parallel index scans are supported only for btree indexes. Each process will claim a single index block and will scan and return all tuples referenced by that block; other process can @@ -345,25 +345,25 @@ EXPLAIN SELECT * FROM pgbench_accounts WHERE filler LIKE '%x%'; <sect2 id="parallel-aggregation"> <title>Parallel Aggregation</title> <para> - <productname>PostgreSQL</> supports parallel aggregation by aggregating in + <productname>PostgreSQL</productname> supports parallel aggregation by aggregating in two stages. First, each process participating in the parallel portion of the query performs an aggregation step, producing a partial result for each group of which that process is aware. This is reflected in the plan - as a <literal>Partial Aggregate</> node. Second, the partial results are - transferred to the leader via <literal>Gather</> or <literal>Gather - Merge</>. Finally, the leader re-aggregates the results across all + as a <literal>Partial Aggregate</literal> node. Second, the partial results are + transferred to the leader via <literal>Gather</literal> or <literal>Gather + Merge</literal>. Finally, the leader re-aggregates the results across all workers in order to produce the final result. This is reflected in the - plan as a <literal>Finalize Aggregate</> node. + plan as a <literal>Finalize Aggregate</literal> node. </para> <para> - Because the <literal>Finalize Aggregate</> node runs on the leader + Because the <literal>Finalize Aggregate</literal> node runs on the leader process, queries which produce a relatively large number of groups in comparison to the number of input rows will appear less favorable to the query planner. For example, in the worst-case scenario the number of - groups seen by the <literal>Finalize Aggregate</> node could be as many as + groups seen by the <literal>Finalize Aggregate</literal> node could be as many as the number of input rows which were seen by all worker processes in the - <literal>Partial Aggregate</> stage. For such cases, there is clearly + <literal>Partial Aggregate</literal> stage. For such cases, there is clearly going to be no performance benefit to using parallel aggregation. The query planner takes this into account during the planning process and is unlikely to choose parallel aggregate in this scenario. @@ -371,14 +371,14 @@ EXPLAIN SELECT * FROM pgbench_accounts WHERE filler LIKE '%x%'; <para> Parallel aggregation is not supported in all situations. Each aggregate - must be <link linkend="parallel-safety">safe</> for parallelism and must + must be <link linkend="parallel-safety">safe</link> for parallelism and must have a combine function. If the aggregate has a transition state of type - <literal>internal</>, it must have serialization and deserialization + <literal>internal</literal>, it must have serialization and deserialization functions. See <xref linkend="sql-createaggregate"> for more details. Parallel aggregation is not supported if any aggregate function call - contains <literal>DISTINCT</> or <literal>ORDER BY</> clause and is also + contains <literal>DISTINCT</literal> or <literal>ORDER BY</literal> clause and is also not supported for ordered set aggregates or when the query involves - <literal>GROUPING SETS</>. It can only be used when all joins involved in + <literal>GROUPING SETS</literal>. It can only be used when all joins involved in the query are also part of the parallel portion of the plan. </para> @@ -417,13 +417,13 @@ EXPLAIN SELECT * FROM pgbench_accounts WHERE filler LIKE '%x%'; <para> The planner classifies operations involved in a query as either - <firstterm>parallel safe</>, <firstterm>parallel restricted</>, - or <firstterm>parallel unsafe</>. A parallel safe operation is one which + <firstterm>parallel safe</firstterm>, <firstterm>parallel restricted</firstterm>, + or <firstterm>parallel unsafe</firstterm>. A parallel safe operation is one which does not conflict with the use of parallel query. A parallel restricted operation is one which cannot be performed in a parallel worker, but which can be performed in the leader while parallel query is in use. Therefore, - parallel restricted operations can never occur below a <literal>Gather</> - or <literal>Gather Merge</> node, but can occur elsewhere in a plan which + parallel restricted operations can never occur below a <literal>Gather</literal> + or <literal>Gather Merge</literal> node, but can occur elsewhere in a plan which contains such a node. A parallel unsafe operation is one which cannot be performed while parallel query is in use, not even in the leader. When a query contains anything which is parallel unsafe, parallel query @@ -450,13 +450,13 @@ EXPLAIN SELECT * FROM pgbench_accounts WHERE filler LIKE '%x%'; <listitem> <para> Scans of foreign tables, unless the foreign data wrapper has - an <literal>IsForeignScanParallelSafe</> API which indicates otherwise. + an <literal>IsForeignScanParallelSafe</literal> API which indicates otherwise. </para> </listitem> <listitem> <para> - Access to an <literal>InitPlan</> or correlated <literal>SubPlan</>. + Access to an <literal>InitPlan</literal> or correlated <literal>SubPlan</literal>. </para> </listitem> </itemizedlist> @@ -475,23 +475,23 @@ EXPLAIN SELECT * FROM pgbench_accounts WHERE filler LIKE '%x%'; be parallel unsafe unless otherwise marked. When using <xref linkend="sql-createfunction"> or <xref linkend="sql-alterfunction">, markings can be set by specifying - <literal>PARALLEL SAFE</>, <literal>PARALLEL RESTRICTED</>, or - <literal>PARALLEL UNSAFE</> as appropriate. When using + <literal>PARALLEL SAFE</literal>, <literal>PARALLEL RESTRICTED</literal>, or + <literal>PARALLEL UNSAFE</literal> as appropriate. When using <xref linkend="sql-createaggregate">, the - <literal>PARALLEL</> option can be specified with <literal>SAFE</>, - <literal>RESTRICTED</>, or <literal>UNSAFE</> as the corresponding value. + <literal>PARALLEL</literal> option can be specified with <literal>SAFE</literal>, + <literal>RESTRICTED</literal>, or <literal>UNSAFE</literal> as the corresponding value. </para> <para> - Functions and aggregates must be marked <literal>PARALLEL UNSAFE</> if + Functions and aggregates must be marked <literal>PARALLEL UNSAFE</literal> if they write to the database, access sequences, change the transaction state even temporarily (e.g. a PL/pgSQL function which establishes an - <literal>EXCEPTION</> block to catch errors), or make persistent changes to + <literal>EXCEPTION</literal> block to catch errors), or make persistent changes to settings. Similarly, functions must be marked <literal>PARALLEL - RESTRICTED</> if they access temporary tables, client connection state, + RESTRICTED</literal> if they access temporary tables, client connection state, cursors, prepared statements, or miscellaneous backend-local state which the system cannot synchronize across workers. For example, - <literal>setseed</> and <literal>random</> are parallel restricted for + <literal>setseed</literal> and <literal>random</literal> are parallel restricted for this last reason. </para> @@ -503,7 +503,7 @@ EXPLAIN SELECT * FROM pgbench_accounts WHERE filler LIKE '%x%'; mislabeled, since there is no way for the system to protect itself against arbitrary C code, but in most likely cases the result will be no worse than for any other function. If in doubt, it is probably best to label functions - as <literal>UNSAFE</>. + as <literal>UNSAFE</literal>. </para> <para> @@ -519,13 +519,13 @@ EXPLAIN SELECT * FROM pgbench_accounts WHERE filler LIKE '%x%'; <para> Note that the query planner does not consider deferring the evaluation of parallel-restricted functions or aggregates involved in the query in - order to obtain a superior plan. So, for example, if a <literal>WHERE</> + order to obtain a superior plan. So, for example, if a <literal>WHERE</literal> clause applied to a particular table is parallel restricted, the query planner will not consider performing a scan of that table in the parallel portion of a plan. In some cases, it would be possible (and perhaps even efficient) to include the scan of that table in the parallel portion of the query and defer the evaluation of the - <literal>WHERE</> clause so that it happens above the <literal>Gather</> + <literal>WHERE</literal> clause so that it happens above the <literal>Gather</literal> node. However, the planner does not do this. </para> diff --git a/doc/src/sgml/perform.sgml b/doc/src/sgml/perform.sgml index d3b47bc5a57..6a5182d85b8 100644 --- a/doc/src/sgml/perform.sgml +++ b/doc/src/sgml/perform.sgml @@ -30,7 +30,7 @@ plan</firstterm> for each query it receives. Choosing the right plan to match the query structure and the properties of the data is absolutely critical for good performance, so the system includes - a complex <firstterm>planner</> that tries to choose good plans. + a complex <firstterm>planner</firstterm> that tries to choose good plans. You can use the <xref linkend="sql-explain"> command to see what query plan the planner creates for any query. Plan-reading is an art that requires some experience to master, @@ -39,17 +39,17 @@ <para> Examples in this section are drawn from the regression test database - after doing a <command>VACUUM ANALYZE</>, using 9.3 development sources. + after doing a <command>VACUUM ANALYZE</command>, using 9.3 development sources. You should be able to get similar results if you try the examples yourself, but your estimated costs and row counts might vary slightly - because <command>ANALYZE</>'s statistics are random samples rather + because <command>ANALYZE</command>'s statistics are random samples rather than exact, and because costs are inherently somewhat platform-dependent. </para> <para> - The examples use <command>EXPLAIN</>'s default <quote>text</> output + The examples use <command>EXPLAIN</command>'s default <quote>text</quote> output format, which is compact and convenient for humans to read. - If you want to feed <command>EXPLAIN</>'s output to a program for further + If you want to feed <command>EXPLAIN</command>'s output to a program for further analysis, you should use one of its machine-readable output formats (XML, JSON, or YAML) instead. </para> @@ -58,12 +58,12 @@ <title><command>EXPLAIN</command> Basics</title> <para> - The structure of a query plan is a tree of <firstterm>plan nodes</>. + The structure of a query plan is a tree of <firstterm>plan nodes</firstterm>. Nodes at the bottom level of the tree are scan nodes: they return raw rows from a table. There are different types of scan nodes for different table access methods: sequential scans, index scans, and bitmap index - scans. There are also non-table row sources, such as <literal>VALUES</> - clauses and set-returning functions in <literal>FROM</>, which have their + scans. There are also non-table row sources, such as <literal>VALUES</literal> + clauses and set-returning functions in <literal>FROM</literal>, which have their own scan node types. If the query requires joining, aggregation, sorting, or other operations on the raw rows, then there will be additional nodes @@ -93,7 +93,7 @@ EXPLAIN SELECT * FROM tenk1; </para> <para> - Since this query has no <literal>WHERE</> clause, it must scan all the + Since this query has no <literal>WHERE</literal> clause, it must scan all the rows of the table, so the planner has chosen to use a simple sequential scan plan. The numbers that are quoted in parentheses are (left to right): @@ -111,7 +111,7 @@ EXPLAIN SELECT * FROM tenk1; Estimated total cost. This is stated on the assumption that the plan node is run to completion, i.e., all available rows are retrieved. In practice a node's parent node might stop short of reading all - available rows (see the <literal>LIMIT</> example below). + available rows (see the <literal>LIMIT</literal> example below). </para> </listitem> @@ -135,7 +135,7 @@ EXPLAIN SELECT * FROM tenk1; cost parameters (see <xref linkend="runtime-config-query-constants">). Traditional practice is to measure the costs in units of disk page fetches; that is, <xref linkend="guc-seq-page-cost"> is conventionally - set to <literal>1.0</> and the other cost parameters are set relative + set to <literal>1.0</literal> and the other cost parameters are set relative to that. The examples in this section are run with the default cost parameters. </para> @@ -152,11 +152,11 @@ EXPLAIN SELECT * FROM tenk1; </para> <para> - The <literal>rows</> value is a little tricky because it is + The <literal>rows</literal> value is a little tricky because it is not the number of rows processed or scanned by the plan node, but rather the number emitted by the node. This is often less than the number scanned, as a result of filtering by any - <literal>WHERE</>-clause conditions that are being applied at the node. + <literal>WHERE</literal>-clause conditions that are being applied at the node. Ideally the top-level rows estimate will approximate the number of rows actually returned, updated, or deleted by the query. </para> @@ -184,12 +184,12 @@ SELECT relpages, reltuples FROM pg_class WHERE relname = 'tenk1'; pages and 10000 rows. The estimated cost is computed as (disk pages read * <xref linkend="guc-seq-page-cost">) + (rows scanned * <xref linkend="guc-cpu-tuple-cost">). By default, - <varname>seq_page_cost</> is 1.0 and <varname>cpu_tuple_cost</> is 0.01, + <varname>seq_page_cost</varname> is 1.0 and <varname>cpu_tuple_cost</varname> is 0.01, so the estimated cost is (358 * 1.0) + (10000 * 0.01) = 458. </para> <para> - Now let's modify the query to add a <literal>WHERE</> condition: + Now let's modify the query to add a <literal>WHERE</literal> condition: <screen> EXPLAIN SELECT * FROM tenk1 WHERE unique1 < 7000; @@ -200,21 +200,21 @@ EXPLAIN SELECT * FROM tenk1 WHERE unique1 < 7000; Filter: (unique1 < 7000) </screen> - Notice that the <command>EXPLAIN</> output shows the <literal>WHERE</> - clause being applied as a <quote>filter</> condition attached to the Seq + Notice that the <command>EXPLAIN</command> output shows the <literal>WHERE</literal> + clause being applied as a <quote>filter</quote> condition attached to the Seq Scan plan node. This means that the plan node checks the condition for each row it scans, and outputs only the ones that pass the condition. The estimate of output rows has been reduced because of the - <literal>WHERE</> clause. + <literal>WHERE</literal> clause. However, the scan will still have to visit all 10000 rows, so the cost hasn't decreased; in fact it has gone up a bit (by 10000 * <xref linkend="guc-cpu-operator-cost">, to be exact) to reflect the extra CPU - time spent checking the <literal>WHERE</> condition. + time spent checking the <literal>WHERE</literal> condition. </para> <para> - The actual number of rows this query would select is 7000, but the <literal>rows</> + The actual number of rows this query would select is 7000, but the <literal>rows</literal> estimate is only approximate. If you try to duplicate this experiment, you will probably get a slightly different estimate; moreover, it can change after each <command>ANALYZE</command> command, because the @@ -245,12 +245,12 @@ EXPLAIN SELECT * FROM tenk1 WHERE unique1 < 100; scan. (The reason for using two plan levels is that the upper plan node sorts the row locations identified by the index into physical order before reading them, to minimize the cost of separate fetches. - The <quote>bitmap</> mentioned in the node names is the mechanism that + The <quote>bitmap</quote> mentioned in the node names is the mechanism that does the sorting.) </para> <para> - Now let's add another condition to the <literal>WHERE</> clause: + Now let's add another condition to the <literal>WHERE</literal> clause: <screen> EXPLAIN SELECT * FROM tenk1 WHERE unique1 < 100 AND stringu1 = 'xxx'; @@ -266,15 +266,15 @@ EXPLAIN SELECT * FROM tenk1 WHERE unique1 < 100 AND stringu1 = 'xxx'; The added condition <literal>stringu1 = 'xxx'</literal> reduces the output row count estimate, but not the cost because we still have to visit - the same set of rows. Notice that the <literal>stringu1</> clause + the same set of rows. Notice that the <literal>stringu1</literal> clause cannot be applied as an index condition, since this index is only on - the <literal>unique1</> column. Instead it is applied as a filter on + the <literal>unique1</literal> column. Instead it is applied as a filter on the rows retrieved by the index. Thus the cost has actually gone up slightly to reflect this extra checking. </para> <para> - In some cases the planner will prefer a <quote>simple</> index scan plan: + In some cases the planner will prefer a <quote>simple</quote> index scan plan: <screen> EXPLAIN SELECT * FROM tenk1 WHERE unique1 = 42; @@ -289,14 +289,14 @@ EXPLAIN SELECT * FROM tenk1 WHERE unique1 = 42; makes them even more expensive to read, but there are so few that the extra cost of sorting the row locations is not worth it. You'll most often see this plan type for queries that fetch just a single row. It's - also often used for queries that have an <literal>ORDER BY</> condition + also often used for queries that have an <literal>ORDER BY</literal> condition that matches the index order, because then no extra sorting step is needed - to satisfy the <literal>ORDER BY</>. + to satisfy the <literal>ORDER BY</literal>. </para> <para> If there are separate indexes on several of the columns referenced - in <literal>WHERE</>, the planner might choose to use an AND or OR + in <literal>WHERE</literal>, the planner might choose to use an AND or OR combination of the indexes: <screen> @@ -320,7 +320,7 @@ EXPLAIN SELECT * FROM tenk1 WHERE unique1 < 100 AND unique2 > 9000; </para> <para> - Here is an example showing the effects of <literal>LIMIT</>: + Here is an example showing the effects of <literal>LIMIT</literal>: <screen> EXPLAIN SELECT * FROM tenk1 WHERE unique1 < 100 AND unique2 > 9000 LIMIT 2; @@ -335,7 +335,7 @@ EXPLAIN SELECT * FROM tenk1 WHERE unique1 < 100 AND unique2 > 9000 LIMIT 2 </para> <para> - This is the same query as above, but we added a <literal>LIMIT</> so that + This is the same query as above, but we added a <literal>LIMIT</literal> so that not all the rows need be retrieved, and the planner changed its mind about what to do. Notice that the total cost and row count of the Index Scan node are shown as if it were run to completion. However, the Limit node @@ -370,23 +370,23 @@ WHERE t1.unique1 < 10 AND t1.unique2 = t2.unique2; <para> In this plan, we have a nested-loop join node with two table scans as inputs, or children. The indentation of the node summary lines reflects - the plan tree structure. The join's first, or <quote>outer</>, child + the plan tree structure. The join's first, or <quote>outer</quote>, child is a bitmap scan similar to those we saw before. Its cost and row count - are the same as we'd get from <literal>SELECT ... WHERE unique1 < 10</> + are the same as we'd get from <literal>SELECT ... WHERE unique1 < 10</literal> because we are - applying the <literal>WHERE</> clause <literal>unique1 < 10</literal> + applying the <literal>WHERE</literal> clause <literal>unique1 < 10</literal> at that node. The <literal>t1.unique2 = t2.unique2</literal> clause is not relevant yet, so it doesn't affect the row count of the outer scan. The nested-loop join node will run its second, - or <quote>inner</> child once for each row obtained from the outer child. + or <quote>inner</quote> child once for each row obtained from the outer child. Column values from the current outer row can be plugged into the inner - scan; here, the <literal>t1.unique2</> value from the outer row is available, + scan; here, the <literal>t1.unique2</literal> value from the outer row is available, so we get a plan and costs similar to what we saw above for a simple - <literal>SELECT ... WHERE t2.unique2 = <replaceable>constant</></> case. + <literal>SELECT ... WHERE t2.unique2 = <replaceable>constant</replaceable></literal> case. (The estimated cost is actually a bit lower than what was seen above, as a result of caching that's expected to occur during the repeated - index scans on <literal>t2</>.) The + index scans on <literal>t2</literal>.) The costs of the loop node are then set on the basis of the cost of the outer scan, plus one repetition of the inner scan for each outer row (10 * 7.87, here), plus a little CPU time for join processing. @@ -395,7 +395,7 @@ WHERE t1.unique1 < 10 AND t1.unique2 = t2.unique2; <para> In this example the join's output row count is the same as the product of the two scans' row counts, but that's not true in all cases because - there can be additional <literal>WHERE</> clauses that mention both tables + there can be additional <literal>WHERE</literal> clauses that mention both tables and so can only be applied at the join point, not to either input scan. Here's an example: @@ -418,15 +418,15 @@ WHERE t1.unique1 < 10 AND t2.unique2 < 10 AND t1.hundred < t2.hundred; </screen> The condition <literal>t1.hundred < t2.hundred</literal> can't be - tested in the <literal>tenk2_unique2</> index, so it's applied at the + tested in the <literal>tenk2_unique2</literal> index, so it's applied at the join node. This reduces the estimated output row count of the join node, but does not change either input scan. </para> <para> - Notice that here the planner has chosen to <quote>materialize</> the inner + Notice that here the planner has chosen to <quote>materialize</quote> the inner relation of the join, by putting a Materialize plan node atop it. This - means that the <literal>t2</> index scan will be done just once, even + means that the <literal>t2</literal> index scan will be done just once, even though the nested-loop join node needs to read that data ten times, once for each row from the outer relation. The Materialize node saves the data in memory as it's read, and then returns the data from memory on each @@ -435,8 +435,8 @@ WHERE t1.unique1 < 10 AND t2.unique2 < 10 AND t1.hundred < t2.hundred; <para> When dealing with outer joins, you might see join plan nodes with both - <quote>Join Filter</> and plain <quote>Filter</> conditions attached. - Join Filter conditions come from the outer join's <literal>ON</> clause, + <quote>Join Filter</quote> and plain <quote>Filter</quote> conditions attached. + Join Filter conditions come from the outer join's <literal>ON</literal> clause, so a row that fails the Join Filter condition could still get emitted as a null-extended row. But a plain Filter condition is applied after the outer-join rules and so acts to remove rows unconditionally. In an inner @@ -470,7 +470,7 @@ WHERE t1.unique1 < 100 AND t1.unique2 = t2.unique2; table are entered into an in-memory hash table, after which the other table is scanned and the hash table is probed for matches to each row. Again note how the indentation reflects the plan structure: the bitmap - scan on <literal>tenk1</> is the input to the Hash node, which constructs + scan on <literal>tenk1</literal> is the input to the Hash node, which constructs the hash table. That's then returned to the Hash Join node, which reads rows from its outer child plan and searches the hash table for each one. </para> @@ -497,9 +497,9 @@ WHERE t1.unique1 < 100 AND t1.unique2 = t2.unique2; <para> Merge join requires its input data to be sorted on the join keys. In this - plan the <literal>tenk1</> data is sorted by using an index scan to visit + plan the <literal>tenk1</literal> data is sorted by using an index scan to visit the rows in the correct order, but a sequential scan and sort is preferred - for <literal>onek</>, because there are many more rows to be visited in + for <literal>onek</literal>, because there are many more rows to be visited in that table. (Sequential-scan-and-sort frequently beats an index scan for sorting many rows, because of the nonsequential disk access required by the index scan.) @@ -512,7 +512,7 @@ WHERE t1.unique1 < 100 AND t1.unique2 = t2.unique2; (This is a crude tool, but useful. See also <xref linkend="explicit-joins">.) For example, if we're unconvinced that sequential-scan-and-sort is the best way to - deal with table <literal>onek</> in the previous example, we could try + deal with table <literal>onek</literal> in the previous example, we could try <screen> SET enable_sort = off; @@ -530,10 +530,10 @@ WHERE t1.unique1 < 100 AND t1.unique2 = t2.unique2; -> Index Scan using onek_unique2 on onek t2 (cost=0.28..224.79 rows=1000 width=244) </screen> - which shows that the planner thinks that sorting <literal>onek</> by + which shows that the planner thinks that sorting <literal>onek</literal> by index-scanning is about 12% more expensive than sequential-scan-and-sort. Of course, the next question is whether it's right about that. - We can investigate that using <command>EXPLAIN ANALYZE</>, as discussed + We can investigate that using <command>EXPLAIN ANALYZE</command>, as discussed below. </para> @@ -544,8 +544,8 @@ WHERE t1.unique1 < 100 AND t1.unique2 = t2.unique2; <para> It is possible to check the accuracy of the planner's estimates - by using <command>EXPLAIN</>'s <literal>ANALYZE</> option. With this - option, <command>EXPLAIN</> actually executes the query, and then displays + by using <command>EXPLAIN</command>'s <literal>ANALYZE</literal> option. With this + option, <command>EXPLAIN</command> actually executes the query, and then displays the true row counts and true run time accumulated within each plan node, along with the same estimates that a plain <command>EXPLAIN</command> shows. For example, we might get a result like this: @@ -569,7 +569,7 @@ WHERE t1.unique1 < 10 AND t1.unique2 = t2.unique2; </screen> Note that the <quote>actual time</quote> values are in milliseconds of - real time, whereas the <literal>cost</> estimates are expressed in + real time, whereas the <literal>cost</literal> estimates are expressed in arbitrary units; so they are unlikely to match up. The thing that's usually most important to look for is whether the estimated row counts are reasonably close to reality. In this example @@ -580,17 +580,17 @@ WHERE t1.unique1 < 10 AND t1.unique2 = t2.unique2; In some query plans, it is possible for a subplan node to be executed more than once. For example, the inner index scan will be executed once per outer row in the above nested-loop plan. In such cases, the - <literal>loops</> value reports the + <literal>loops</literal> value reports the total number of executions of the node, and the actual time and rows values shown are averages per-execution. This is done to make the numbers comparable with the way that the cost estimates are shown. Multiply by - the <literal>loops</> value to get the total time actually spent in + the <literal>loops</literal> value to get the total time actually spent in the node. In the above example, we spent a total of 0.220 milliseconds - executing the index scans on <literal>tenk2</>. + executing the index scans on <literal>tenk2</literal>. </para> <para> - In some cases <command>EXPLAIN ANALYZE</> shows additional execution + In some cases <command>EXPLAIN ANALYZE</command> shows additional execution statistics beyond the plan node execution times and row counts. For example, Sort and Hash nodes provide extra information: @@ -642,13 +642,13 @@ EXPLAIN ANALYZE SELECT * FROM tenk1 WHERE ten < 7; </screen> These counts can be particularly valuable for filter conditions applied at - join nodes. The <quote>Rows Removed</> line only appears when at least + join nodes. The <quote>Rows Removed</quote> line only appears when at least one scanned row, or potential join pair in the case of a join node, is rejected by the filter condition. </para> <para> - A case similar to filter conditions occurs with <quote>lossy</> + A case similar to filter conditions occurs with <quote>lossy</quote> index scans. For example, consider this search for polygons containing a specific point: @@ -685,14 +685,14 @@ EXPLAIN ANALYZE SELECT * FROM polygon_tbl WHERE f1 @> polygon '(0.5,2.0)'; Here we can see that the index returned one candidate row, which was then rejected by a recheck of the index condition. This happens because a - GiST index is <quote>lossy</> for polygon containment tests: it actually + GiST index is <quote>lossy</quote> for polygon containment tests: it actually returns the rows with polygons that overlap the target, and then we have to do the exact containment test on those rows. </para> <para> - <command>EXPLAIN</> has a <literal>BUFFERS</> option that can be used with - <literal>ANALYZE</> to get even more run time statistics: + <command>EXPLAIN</command> has a <literal>BUFFERS</literal> option that can be used with + <literal>ANALYZE</literal> to get even more run time statistics: <screen> EXPLAIN (ANALYZE, BUFFERS) SELECT * FROM tenk1 WHERE unique1 < 100 AND unique2 > 9000; @@ -714,7 +714,7 @@ EXPLAIN (ANALYZE, BUFFERS) SELECT * FROM tenk1 WHERE unique1 < 100 AND unique Execution time: 0.423 ms </screen> - The numbers provided by <literal>BUFFERS</> help to identify which parts + The numbers provided by <literal>BUFFERS</literal> help to identify which parts of the query are the most I/O-intensive. </para> @@ -722,7 +722,7 @@ EXPLAIN (ANALYZE, BUFFERS) SELECT * FROM tenk1 WHERE unique1 < 100 AND unique Keep in mind that because <command>EXPLAIN ANALYZE</command> actually runs the query, any side-effects will happen as usual, even though whatever results the query might output are discarded in favor of - printing the <command>EXPLAIN</> data. If you want to analyze a + printing the <command>EXPLAIN</command> data. If you want to analyze a data-modifying query without changing your tables, you can roll the command back afterwards, for example: @@ -746,8 +746,8 @@ ROLLBACK; </para> <para> - As seen in this example, when the query is an <command>INSERT</>, - <command>UPDATE</>, or <command>DELETE</> command, the actual work of + As seen in this example, when the query is an <command>INSERT</command>, + <command>UPDATE</command>, or <command>DELETE</command> command, the actual work of applying the table changes is done by a top-level Insert, Update, or Delete plan node. The plan nodes underneath this node perform the work of locating the old rows and/or computing the new data. @@ -762,7 +762,7 @@ ROLLBACK; </para> <para> - When an <command>UPDATE</> or <command>DELETE</> command affects an + When an <command>UPDATE</command> or <command>DELETE</command> command affects an inheritance hierarchy, the output might look like this: <screen> @@ -789,7 +789,7 @@ EXPLAIN UPDATE parent SET f2 = f2 + 1 WHERE f1 = 101; scanning subplans, one per table. For clarity, the Update node is annotated to show the specific target tables that will be updated, in the same order as the corresponding subplans. (These annotations are new as - of <productname>PostgreSQL</> 9.5; in prior versions the reader had to + of <productname>PostgreSQL</productname> 9.5; in prior versions the reader had to intuit the target tables by inspecting the subplans.) </para> @@ -804,12 +804,12 @@ EXPLAIN UPDATE parent SET f2 = f2 + 1 WHERE f1 = 101; ANALYZE</command> includes executor start-up and shut-down time, as well as the time to run any triggers that are fired, but it does not include parsing, rewriting, or planning time. - Time spent executing <literal>BEFORE</> triggers, if any, is included in + Time spent executing <literal>BEFORE</literal> triggers, if any, is included in the time for the related Insert, Update, or Delete node; but time - spent executing <literal>AFTER</> triggers is not counted there because - <literal>AFTER</> triggers are fired after completion of the whole plan. + spent executing <literal>AFTER</literal> triggers is not counted there because + <literal>AFTER</literal> triggers are fired after completion of the whole plan. The total time spent in each trigger - (either <literal>BEFORE</> or <literal>AFTER</>) is also shown separately. + (either <literal>BEFORE</literal> or <literal>AFTER</literal>) is also shown separately. Note that deferred constraint triggers will not be executed until end of transaction and are thus not considered at all by <command>EXPLAIN ANALYZE</command>. @@ -827,13 +827,13 @@ EXPLAIN UPDATE parent SET f2 = f2 + 1 WHERE f1 = 101; network transmission costs and I/O conversion costs are not included. Second, the measurement overhead added by <command>EXPLAIN ANALYZE</command> can be significant, especially on machines with slow - <function>gettimeofday()</> operating-system calls. You can use the + <function>gettimeofday()</function> operating-system calls. You can use the <xref linkend="pgtesttiming"> tool to measure the overhead of timing on your system. </para> <para> - <command>EXPLAIN</> results should not be extrapolated to situations + <command>EXPLAIN</command> results should not be extrapolated to situations much different from the one you are actually testing; for example, results on a toy-sized table cannot be assumed to apply to large tables. The planner's cost estimates are not linear and so it might choose @@ -843,14 +843,14 @@ EXPLAIN UPDATE parent SET f2 = f2 + 1 WHERE f1 = 101; The planner realizes that it's going to take one disk page read to process the table in any case, so there's no value in expending additional page reads to look at an index. (We saw this happening in the - <literal>polygon_tbl</> example above.) + <literal>polygon_tbl</literal> example above.) </para> <para> There are cases in which the actual and estimated values won't match up well, but nothing is really wrong. One such case occurs when - plan node execution is stopped short by a <literal>LIMIT</> or similar - effect. For example, in the <literal>LIMIT</> query we used before, + plan node execution is stopped short by a <literal>LIMIT</literal> or similar + effect. For example, in the <literal>LIMIT</literal> query we used before, <screen> EXPLAIN ANALYZE SELECT * FROM tenk1 WHERE unique1 < 100 AND unique2 > 9000 LIMIT 2; @@ -880,10 +880,10 @@ EXPLAIN ANALYZE SELECT * FROM tenk1 WHERE unique1 < 100 AND unique2 > 9000 and the next key value in the one input is greater than the last key value of the other input; in such a case there can be no more matches and so no need to scan the rest of the first input. This results in not reading all - of one child, with results like those mentioned for <literal>LIMIT</>. + of one child, with results like those mentioned for <literal>LIMIT</literal>. Also, if the outer (first) child contains rows with duplicate key values, the inner (second) child is backed up and rescanned for the portion of its - rows matching that key value. <command>EXPLAIN ANALYZE</> counts these + rows matching that key value. <command>EXPLAIN ANALYZE</command> counts these repeated emissions of the same inner rows as if they were real additional rows. When there are many outer duplicates, the reported actual row count for the inner child plan node can be significantly larger than the number @@ -948,9 +948,9 @@ WHERE relname LIKE 'tenk1%'; For efficiency reasons, <structfield>reltuples</structfield> and <structfield>relpages</structfield> are not updated on-the-fly, and so they usually contain somewhat out-of-date values. - They are updated by <command>VACUUM</>, <command>ANALYZE</>, and a - few DDL commands such as <command>CREATE INDEX</>. A <command>VACUUM</> - or <command>ANALYZE</> operation that does not scan the entire table + They are updated by <command>VACUUM</command>, <command>ANALYZE</command>, and a + few DDL commands such as <command>CREATE INDEX</command>. A <command>VACUUM</command> + or <command>ANALYZE</command> operation that does not scan the entire table (which is commonly the case) will incrementally update the <structfield>reltuples</structfield> count on the basis of the part of the table it did scan, resulting in an approximate value. @@ -966,16 +966,16 @@ WHERE relname LIKE 'tenk1%'; <para> Most queries retrieve only a fraction of the rows in a table, due - to <literal>WHERE</> clauses that restrict the rows to be + to <literal>WHERE</literal> clauses that restrict the rows to be examined. The planner thus needs to make an estimate of the - <firstterm>selectivity</> of <literal>WHERE</> clauses, that is, + <firstterm>selectivity</firstterm> of <literal>WHERE</literal> clauses, that is, the fraction of rows that match each condition in the - <literal>WHERE</> clause. The information used for this task is + <literal>WHERE</literal> clause. The information used for this task is stored in the <link linkend="catalog-pg-statistic"><structname>pg_statistic</structname></link> system catalog. Entries in <structname>pg_statistic</structname> - are updated by the <command>ANALYZE</> and <command>VACUUM - ANALYZE</> commands, and are always approximate even when freshly + are updated by the <command>ANALYZE</command> and <command>VACUUM + ANALYZE</command> commands, and are always approximate even when freshly updated. </para> @@ -1020,17 +1020,17 @@ WHERE tablename = 'road'; Note that two rows are displayed for the same column, one corresponding to the complete inheritance hierarchy starting at the - <literal>road</literal> table (<literal>inherited</>=<literal>t</>), + <literal>road</literal> table (<literal>inherited</literal>=<literal>t</literal>), and another one including only the <literal>road</literal> table itself - (<literal>inherited</>=<literal>f</>). + (<literal>inherited</literal>=<literal>f</literal>). </para> <para> The amount of information stored in <structname>pg_statistic</structname> - by <command>ANALYZE</>, in particular the maximum number of entries in the - <structfield>most_common_vals</> and <structfield>histogram_bounds</> + by <command>ANALYZE</command>, in particular the maximum number of entries in the + <structfield>most_common_vals</structfield> and <structfield>histogram_bounds</structfield> arrays for each column, can be set on a - column-by-column basis using the <command>ALTER TABLE SET STATISTICS</> + column-by-column basis using the <command>ALTER TABLE SET STATISTICS</command> command, or globally by setting the <xref linkend="guc-default-statistics-target"> configuration variable. The default limit is presently 100 entries. Raising the limit @@ -1072,7 +1072,7 @@ WHERE tablename = 'road'; an assumption that does not hold when column values are correlated. Regular statistics, because of their per-individual-column nature, cannot capture any knowledge about cross-column correlation. - However, <productname>PostgreSQL</> has the ability to compute + However, <productname>PostgreSQL</productname> has the ability to compute <firstterm>multivariate statistics</firstterm>, which can capture such information. </para> @@ -1081,7 +1081,7 @@ WHERE tablename = 'road'; Because the number of possible column combinations is very large, it's impractical to compute multivariate statistics automatically. Instead, <firstterm>extended statistics objects</firstterm>, more often - called just <firstterm>statistics objects</>, can be created to instruct + called just <firstterm>statistics objects</firstterm>, can be created to instruct the server to obtain statistics across interesting sets of columns. </para> @@ -1116,12 +1116,12 @@ WHERE tablename = 'road'; <para> The simplest kind of extended statistics tracks <firstterm>functional - dependencies</>, a concept used in definitions of database normal forms. - We say that column <structfield>b</> is functionally dependent on - column <structfield>a</> if knowledge of the value of - <structfield>a</> is sufficient to determine the value - of <structfield>b</>, that is there are no two rows having the same value - of <structfield>a</> but different values of <structfield>b</>. + dependencies</firstterm>, a concept used in definitions of database normal forms. + We say that column <structfield>b</structfield> is functionally dependent on + column <structfield>a</structfield> if knowledge of the value of + <structfield>a</structfield> is sufficient to determine the value + of <structfield>b</structfield>, that is there are no two rows having the same value + of <structfield>a</structfield> but different values of <structfield>b</structfield>. In a fully normalized database, functional dependencies should exist only on primary keys and superkeys. However, in practice many data sets are not fully normalized for various reasons; intentional @@ -1142,15 +1142,15 @@ WHERE tablename = 'road'; </para> <para> - To inform the planner about functional dependencies, <command>ANALYZE</> + To inform the planner about functional dependencies, <command>ANALYZE</command> can collect measurements of cross-column dependency. Assessing the degree of dependency between all sets of columns would be prohibitively expensive, so data collection is limited to those groups of columns appearing together in a statistics object defined with - the <literal>dependencies</> option. It is advisable to create - <literal>dependencies</> statistics only for column groups that are + the <literal>dependencies</literal> option. It is advisable to create + <literal>dependencies</literal> statistics only for column groups that are strongly correlated, to avoid unnecessary overhead in both - <command>ANALYZE</> and later query planning. + <command>ANALYZE</command> and later query planning. </para> <para> @@ -1189,7 +1189,7 @@ SELECT stxname, stxkeys, stxdependencies simple equality conditions that compare columns to constant values. They are not used to improve estimates for equality conditions comparing two columns or comparing a column to an expression, nor for - range clauses, <literal>LIKE</> or any other type of condition. + range clauses, <literal>LIKE</literal> or any other type of condition. </para> <para> @@ -1200,7 +1200,7 @@ SELECT stxname, stxkeys, stxdependencies <programlisting> SELECT * FROM zipcodes WHERE city = 'San Francisco' AND zip = '94105'; </programlisting> - the planner will disregard the <structfield>city</> clause as not + the planner will disregard the <structfield>city</structfield> clause as not changing the selectivity, which is correct. However, it will make the same assumption about <programlisting> @@ -1233,11 +1233,11 @@ SELECT * FROM zipcodes WHERE city = 'San Francisco' AND zip = '90210'; </para> <para> - To improve such estimates, <command>ANALYZE</> can collect n-distinct + To improve such estimates, <command>ANALYZE</command> can collect n-distinct statistics for groups of columns. As before, it's impractical to do this for every possible column grouping, so data is collected only for those groups of columns appearing together in a statistics object - defined with the <literal>ndistinct</> option. Data will be collected + defined with the <literal>ndistinct</literal> option. Data will be collected for each possible combination of two or more columns from the set of listed columns. </para> @@ -1267,17 +1267,17 @@ nd | {"1, 2": 33178, "1, 5": 33178, "2, 5": 27435, "1, 2, 5": 33178} </para> <para> - It's advisable to create <literal>ndistinct</> statistics objects only + It's advisable to create <literal>ndistinct</literal> statistics objects only on combinations of columns that are actually used for grouping, and for which misestimation of the number of groups is resulting in bad - plans. Otherwise, the <command>ANALYZE</> cycles are just wasted. + plans. Otherwise, the <command>ANALYZE</command> cycles are just wasted. </para> </sect3> </sect2> </sect1> <sect1 id="explicit-joins"> - <title>Controlling the Planner with Explicit <literal>JOIN</> Clauses</title> + <title>Controlling the Planner with Explicit <literal>JOIN</literal> Clauses</title> <indexterm zone="explicit-joins"> <primary>join</primary> @@ -1286,7 +1286,7 @@ nd | {"1, 2": 33178, "1, 5": 33178, "2, 5": 27435, "1, 2, 5": 33178} <para> It is possible - to control the query planner to some extent by using the explicit <literal>JOIN</> + to control the query planner to some extent by using the explicit <literal>JOIN</literal> syntax. To see why this matters, we first need some background. </para> @@ -1297,13 +1297,13 @@ SELECT * FROM a, b, c WHERE a.id = b.id AND b.ref = c.id; </programlisting> the planner is free to join the given tables in any order. For example, it could generate a query plan that joins A to B, using - the <literal>WHERE</> condition <literal>a.id = b.id</>, and then - joins C to this joined table, using the other <literal>WHERE</> + the <literal>WHERE</literal> condition <literal>a.id = b.id</literal>, and then + joins C to this joined table, using the other <literal>WHERE</literal> condition. Or it could join B to C and then join A to that result. Or it could join A to C and then join them with B — but that would be inefficient, since the full Cartesian product of A and C would have to be formed, there being no applicable condition in the - <literal>WHERE</> clause to allow optimization of the join. (All + <literal>WHERE</literal> clause to allow optimization of the join. (All joins in the <productname>PostgreSQL</productname> executor happen between two input tables, so it's necessary to build up the result in one or another of these fashions.) The important point is that @@ -1347,30 +1347,30 @@ SELECT * FROM a LEFT JOIN (b JOIN c ON (b.ref = c.id)) ON (a.id = b.id); SELECT * FROM a LEFT JOIN b ON (a.bid = b.id) LEFT JOIN c ON (a.cid = c.id); </programlisting> it is valid to join A to either B or C first. Currently, only - <literal>FULL JOIN</> completely constrains the join order. Most - practical cases involving <literal>LEFT JOIN</> or <literal>RIGHT JOIN</> + <literal>FULL JOIN</literal> completely constrains the join order. Most + practical cases involving <literal>LEFT JOIN</literal> or <literal>RIGHT JOIN</literal> can be rearranged to some extent. </para> <para> - Explicit inner join syntax (<literal>INNER JOIN</>, <literal>CROSS - JOIN</>, or unadorned <literal>JOIN</>) is semantically the same as - listing the input relations in <literal>FROM</>, so it does not + Explicit inner join syntax (<literal>INNER JOIN</literal>, <literal>CROSS + JOIN</literal>, or unadorned <literal>JOIN</literal>) is semantically the same as + listing the input relations in <literal>FROM</literal>, so it does not constrain the join order. </para> <para> - Even though most kinds of <literal>JOIN</> don't completely constrain + Even though most kinds of <literal>JOIN</literal> don't completely constrain the join order, it is possible to instruct the <productname>PostgreSQL</productname> query planner to treat all - <literal>JOIN</> clauses as constraining the join order anyway. + <literal>JOIN</literal> clauses as constraining the join order anyway. For example, these three queries are logically equivalent: <programlisting> SELECT * FROM a, b, c WHERE a.id = b.id AND b.ref = c.id; SELECT * FROM a CROSS JOIN b CROSS JOIN c WHERE a.id = b.id AND b.ref = c.id; SELECT * FROM a JOIN (b JOIN c ON (b.ref = c.id)) ON (a.id = b.id); </programlisting> - But if we tell the planner to honor the <literal>JOIN</> order, + But if we tell the planner to honor the <literal>JOIN</literal> order, the second and third take less time to plan than the first. This effect is not worth worrying about for only three tables, but it can be a lifesaver with many tables. @@ -1378,19 +1378,19 @@ SELECT * FROM a JOIN (b JOIN c ON (b.ref = c.id)) ON (a.id = b.id); <para> To force the planner to follow the join order laid out by explicit - <literal>JOIN</>s, + <literal>JOIN</literal>s, set the <xref linkend="guc-join-collapse-limit"> run-time parameter to 1. (Other possible values are discussed below.) </para> <para> You do not need to constrain the join order completely in order to - cut search time, because it's OK to use <literal>JOIN</> operators - within items of a plain <literal>FROM</> list. For example, consider: + cut search time, because it's OK to use <literal>JOIN</literal> operators + within items of a plain <literal>FROM</literal> list. For example, consider: <programlisting> SELECT * FROM a CROSS JOIN b, c, d, e WHERE ...; </programlisting> - With <varname>join_collapse_limit</> = 1, this + With <varname>join_collapse_limit</varname> = 1, this forces the planner to join A to B before joining them to other tables, but doesn't constrain its choices otherwise. In this example, the number of possible join orders is reduced by a factor of 5. @@ -1400,7 +1400,7 @@ SELECT * FROM a CROSS JOIN b, c, d, e WHERE ...; Constraining the planner's search in this way is a useful technique both for reducing planning time and for directing the planner to a good query plan. If the planner chooses a bad join order by default, - you can force it to choose a better order via <literal>JOIN</> syntax + you can force it to choose a better order via <literal>JOIN</literal> syntax — assuming that you know of a better order, that is. Experimentation is recommended. </para> @@ -1415,22 +1415,22 @@ FROM x, y, WHERE somethingelse; </programlisting> This situation might arise from use of a view that contains a join; - the view's <literal>SELECT</> rule will be inserted in place of the view + the view's <literal>SELECT</literal> rule will be inserted in place of the view reference, yielding a query much like the above. Normally, the planner will try to collapse the subquery into the parent, yielding: <programlisting> SELECT * FROM x, y, a, b, c WHERE something AND somethingelse; </programlisting> This usually results in a better plan than planning the subquery - separately. (For example, the outer <literal>WHERE</> conditions might be such that + separately. (For example, the outer <literal>WHERE</literal> conditions might be such that joining X to A first eliminates many rows of A, thus avoiding the need to form the full logical output of the subquery.) But at the same time, we have increased the planning time; here, we have a five-way join problem replacing two separate three-way join problems. Because of the exponential growth of the number of possibilities, this makes a big difference. The planner tries to avoid getting stuck in huge join search - problems by not collapsing a subquery if more than <varname>from_collapse_limit</> - <literal>FROM</> items would result in the parent + problems by not collapsing a subquery if more than <varname>from_collapse_limit</varname> + <literal>FROM</literal> items would result in the parent query. You can trade off planning time against quality of plan by adjusting this run-time parameter up or down. </para> @@ -1439,11 +1439,11 @@ SELECT * FROM x, y, a, b, c WHERE something AND somethingelse; <xref linkend="guc-from-collapse-limit"> and <xref linkend="guc-join-collapse-limit"> are similarly named because they do almost the same thing: one controls - when the planner will <quote>flatten out</> subqueries, and the + when the planner will <quote>flatten out</quote> subqueries, and the other controls when it will flatten out explicit joins. Typically - you would either set <varname>join_collapse_limit</> equal to - <varname>from_collapse_limit</> (so that explicit joins and subqueries - act similarly) or set <varname>join_collapse_limit</> to 1 (if you want + you would either set <varname>join_collapse_limit</varname> equal to + <varname>from_collapse_limit</varname> (so that explicit joins and subqueries + act similarly) or set <varname>join_collapse_limit</varname> to 1 (if you want to control join order with explicit joins). But you might set them differently if you are trying to fine-tune the trade-off between planning time and run time. @@ -1468,7 +1468,7 @@ SELECT * FROM x, y, a, b, c WHERE something AND somethingelse; </indexterm> <para> - When using multiple <command>INSERT</>s, turn off autocommit and just do + When using multiple <command>INSERT</command>s, turn off autocommit and just do one commit at the end. (In plain SQL, this means issuing <command>BEGIN</command> at the start and <command>COMMIT</command> at the end. Some client libraries might @@ -1505,14 +1505,14 @@ SELECT * FROM x, y, a, b, c WHERE something AND somethingelse; <command>EXECUTE</command> as many times as required. This avoids some of the overhead of repeatedly parsing and planning <command>INSERT</command>. Different interfaces provide this facility - in different ways; look for <quote>prepared statements</> in the interface + in different ways; look for <quote>prepared statements</quote> in the interface documentation. </para> <para> Note that loading a large number of rows using <command>COPY</command> is almost always faster than using - <command>INSERT</command>, even if <command>PREPARE</> is used and + <command>INSERT</command>, even if <command>PREPARE</command> is used and multiple insertions are batched into a single transaction. </para> @@ -1523,7 +1523,7 @@ SELECT * FROM x, y, a, b, c WHERE something AND somethingelse; needs to be written, because in case of an error, the files containing the newly loaded data will be removed anyway. However, this consideration only applies when - <xref linkend="guc-wal-level"> is <literal>minimal</> as all commands + <xref linkend="guc-wal-level"> is <literal>minimal</literal> as all commands must write WAL otherwise. </para> @@ -1557,7 +1557,7 @@ SELECT * FROM x, y, a, b, c WHERE something AND somethingelse; <para> Just as with indexes, a foreign key constraint can be checked - <quote>in bulk</> more efficiently than row-by-row. So it might be + <quote>in bulk</quote> more efficiently than row-by-row. So it might be useful to drop foreign key constraints, load data, and re-create the constraints. Again, there is a trade-off between data load speed and loss of error checking while the constraint is missing. @@ -1570,7 +1570,7 @@ SELECT * FROM x, y, a, b, c WHERE something AND somethingelse; the row's foreign key constraint). Loading many millions of rows can cause the trigger event queue to overflow available memory, leading to intolerable swapping or even outright failure of the command. Therefore - it may be <emphasis>necessary</>, not just desirable, to drop and re-apply + it may be <emphasis>necessary</emphasis>, not just desirable, to drop and re-apply foreign keys when loading large amounts of data. If temporarily removing the constraint isn't acceptable, the only other recourse may be to split up the load operation into smaller transactions. @@ -1584,8 +1584,8 @@ SELECT * FROM x, y, a, b, c WHERE something AND somethingelse; Temporarily increasing the <xref linkend="guc-maintenance-work-mem"> configuration variable when loading large amounts of data can lead to improved performance. This will help to speed up <command>CREATE - INDEX</> commands and <command>ALTER TABLE ADD FOREIGN KEY</> commands. - It won't do much for <command>COPY</> itself, so this advice is + INDEX</command> commands and <command>ALTER TABLE ADD FOREIGN KEY</command> commands. + It won't do much for <command>COPY</command> itself, so this advice is only useful when you are using one or both of the above techniques. </para> </sect2> @@ -1617,8 +1617,8 @@ SELECT * FROM x, y, a, b, c WHERE something AND somethingelse; new base backup after the load has completed than to process a large amount of incremental WAL data. To prevent incremental WAL logging while loading, disable archiving and streaming replication, by setting - <xref linkend="guc-wal-level"> to <literal>minimal</>, - <xref linkend="guc-archive-mode"> to <literal>off</>, and + <xref linkend="guc-wal-level"> to <literal>minimal</literal>, + <xref linkend="guc-archive-mode"> to <literal>off</literal>, and <xref linkend="guc-max-wal-senders"> to zero. But note that changing these settings requires a server restart. </para> @@ -1628,8 +1628,8 @@ SELECT * FROM x, y, a, b, c WHERE something AND somethingelse; process the WAL data, doing this will actually make certain commands faster, because they are designed not to write WAL at all if <varname>wal_level</varname> - is <literal>minimal</>. (They can guarantee crash safety more cheaply - by doing an <function>fsync</> at the end than by writing WAL.) + is <literal>minimal</literal>. (They can guarantee crash safety more cheaply + by doing an <function>fsync</function> at the end than by writing WAL.) This applies to the following commands: <itemizedlist> <listitem> @@ -1683,21 +1683,21 @@ SELECT * FROM x, y, a, b, c WHERE something AND somethingelse; </sect2> <sect2 id="populate-pg-dump"> - <title>Some Notes About <application>pg_dump</></title> + <title>Some Notes About <application>pg_dump</application></title> <para> - Dump scripts generated by <application>pg_dump</> automatically apply + Dump scripts generated by <application>pg_dump</application> automatically apply several, but not all, of the above guidelines. To reload a - <application>pg_dump</> dump as quickly as possible, you need to + <application>pg_dump</application> dump as quickly as possible, you need to do a few extra things manually. (Note that these points apply while - <emphasis>restoring</> a dump, not while <emphasis>creating</> it. + <emphasis>restoring</emphasis> a dump, not while <emphasis>creating</emphasis> it. The same points apply whether loading a text dump with - <application>psql</> or using <application>pg_restore</> to load - from a <application>pg_dump</> archive file.) + <application>psql</application> or using <application>pg_restore</application> to load + from a <application>pg_dump</application> archive file.) </para> <para> - By default, <application>pg_dump</> uses <command>COPY</>, and when + By default, <application>pg_dump</application> uses <command>COPY</command>, and when it is generating a complete schema-and-data dump, it is careful to load data before creating indexes and foreign keys. So in this case several guidelines are handled automatically. What is left @@ -1713,10 +1713,10 @@ SELECT * FROM x, y, a, b, c WHERE something AND somethingelse; <listitem> <para> If using WAL archiving or streaming replication, consider disabling - them during the restore. To do that, set <varname>archive_mode</> - to <literal>off</>, - <varname>wal_level</varname> to <literal>minimal</>, and - <varname>max_wal_senders</> to zero before loading the dump. + them during the restore. To do that, set <varname>archive_mode</varname> + to <literal>off</literal>, + <varname>wal_level</varname> to <literal>minimal</literal>, and + <varname>max_wal_senders</varname> to zero before loading the dump. Afterwards, set them back to the right values and take a fresh base backup. </para> @@ -1724,49 +1724,49 @@ SELECT * FROM x, y, a, b, c WHERE something AND somethingelse; <listitem> <para> Experiment with the parallel dump and restore modes of both - <application>pg_dump</> and <application>pg_restore</> and find the + <application>pg_dump</application> and <application>pg_restore</application> and find the optimal number of concurrent jobs to use. Dumping and restoring in - parallel by means of the <option>-j</> option should give you a + parallel by means of the <option>-j</option> option should give you a significantly higher performance over the serial mode. </para> </listitem> <listitem> <para> Consider whether the whole dump should be restored as a single - transaction. To do that, pass the <option>-1</> or - <option>--single-transaction</> command-line option to - <application>psql</> or <application>pg_restore</>. When using this + transaction. To do that, pass the <option>-1</option> or + <option>--single-transaction</option> command-line option to + <application>psql</application> or <application>pg_restore</application>. When using this mode, even the smallest of errors will rollback the entire restore, possibly discarding many hours of processing. Depending on how interrelated the data is, that might seem preferable to manual cleanup, - or not. <command>COPY</> commands will run fastest if you use a single + or not. <command>COPY</command> commands will run fastest if you use a single transaction and have WAL archiving turned off. </para> </listitem> <listitem> <para> If multiple CPUs are available in the database server, consider using - <application>pg_restore</>'s <option>--jobs</> option. This + <application>pg_restore</application>'s <option>--jobs</option> option. This allows concurrent data loading and index creation. </para> </listitem> <listitem> <para> - Run <command>ANALYZE</> afterwards. + Run <command>ANALYZE</command> afterwards. </para> </listitem> </itemizedlist> </para> <para> - A data-only dump will still use <command>COPY</>, but it does not + A data-only dump will still use <command>COPY</command>, but it does not drop or recreate indexes, and it does not normally touch foreign keys. <footnote> <para> You can get the effect of disabling foreign keys by using - the <option>--disable-triggers</> option — but realize that + the <option>--disable-triggers</option> option — but realize that that eliminates, rather than just postpones, foreign key validation, and so it is possible to insert bad data if you use it. </para> @@ -1778,7 +1778,7 @@ SELECT * FROM x, y, a, b, c WHERE something AND somethingelse; while loading the data, but don't bother increasing <varname>maintenance_work_mem</varname>; rather, you'd do that while manually recreating indexes and foreign keys afterwards. - And don't forget to <command>ANALYZE</> when you're done; see + And don't forget to <command>ANALYZE</command> when you're done; see <xref linkend="vacuum-for-statistics"> and <xref linkend="autovacuum"> for more information. </para> @@ -1808,7 +1808,7 @@ SELECT * FROM x, y, a, b, c WHERE something AND somethingelse; <listitem> <para> Place the database cluster's data directory in a memory-backed - file system (i.e. <acronym>RAM</> disk). This eliminates all + file system (i.e. <acronym>RAM</acronym> disk). This eliminates all database disk I/O, but limits data storage to the amount of available memory (and perhaps swap). </para> @@ -1826,7 +1826,7 @@ SELECT * FROM x, y, a, b, c WHERE something AND somethingelse; Turn off <xref linkend="guc-synchronous-commit">; there might be no need to force <acronym>WAL</acronym> writes to disk on every commit. This setting does risk transaction loss (though not data - corruption) in case of a crash of the <emphasis>database</>. + corruption) in case of a crash of the <emphasis>database</emphasis>. </para> </listitem> @@ -1842,7 +1842,7 @@ SELECT * FROM x, y, a, b, c WHERE something AND somethingelse; Increase <xref linkend="guc-max-wal-size"> and <xref linkend="guc-checkpoint-timeout">; this reduces the frequency of checkpoints, but increases the storage requirements of - <filename>/pg_wal</>. + <filename>/pg_wal</filename>. </para> </listitem> diff --git a/doc/src/sgml/pgbuffercache.sgml b/doc/src/sgml/pgbuffercache.sgml index 4e53009ae07..18ac781d0db 100644 --- a/doc/src/sgml/pgbuffercache.sgml +++ b/doc/src/sgml/pgbuffercache.sgml @@ -37,7 +37,7 @@ </para> <table id="pgbuffercache-columns"> - <title><structname>pg_buffercache</> Columns</title> + <title><structname>pg_buffercache</structname> Columns</title> <tgroup cols="4"> <thead> @@ -54,7 +54,7 @@ <entry><structfield>bufferid</structfield></entry> <entry><type>integer</type></entry> <entry></entry> - <entry>ID, in the range 1..<varname>shared_buffers</></entry> + <entry>ID, in the range 1..<varname>shared_buffers</varname></entry> </row> <row> @@ -83,7 +83,7 @@ <entry><type>smallint</type></entry> <entry></entry> <entry>Fork number within the relation; see - <filename>include/common/relpath.h</></entry> + <filename>include/common/relpath.h</filename></entry> </row> <row> @@ -120,22 +120,22 @@ <para> There is one row for each buffer in the shared cache. Unused buffers are - shown with all fields null except <structfield>bufferid</>. Shared system + shown with all fields null except <structfield>bufferid</structfield>. Shared system catalogs are shown as belonging to database zero. </para> <para> Because the cache is shared by all the databases, there will normally be pages from relations not belonging to the current database. This means - that there may not be matching join rows in <structname>pg_class</> for + that there may not be matching join rows in <structname>pg_class</structname> for some rows, or that there could even be incorrect joins. If you are - trying to join against <structname>pg_class</>, it's a good idea to - restrict the join to rows having <structfield>reldatabase</> equal to + trying to join against <structname>pg_class</structname>, it's a good idea to + restrict the join to rows having <structfield>reldatabase</structfield> equal to the current database's OID or zero. </para> <para> - When the <structname>pg_buffercache</> view is accessed, internal buffer + When the <structname>pg_buffercache</structname> view is accessed, internal buffer manager locks are taken for long enough to copy all the buffer state data that the view will display. This ensures that the view produces a consistent set of results, while not diff --git a/doc/src/sgml/pgcrypto.sgml b/doc/src/sgml/pgcrypto.sgml index 34d86219584..80595e193b9 100644 --- a/doc/src/sgml/pgcrypto.sgml +++ b/doc/src/sgml/pgcrypto.sgml @@ -13,8 +13,8 @@ </indexterm> <para> - The <filename>pgcrypto</> module provides cryptographic functions for - <productname>PostgreSQL</>. + The <filename>pgcrypto</filename> module provides cryptographic functions for + <productname>PostgreSQL</productname>. </para> <sect2> @@ -33,19 +33,19 @@ digest(data bytea, type text) returns bytea </synopsis> <para> - Computes a binary hash of the given <parameter>data</>. - <parameter>type</> is the algorithm to use. + Computes a binary hash of the given <parameter>data</parameter>. + <parameter>type</parameter> is the algorithm to use. Standard algorithms are <literal>md5</literal>, <literal>sha1</literal>, <literal>sha224</literal>, <literal>sha256</literal>, <literal>sha384</literal> and <literal>sha512</literal>. - If <filename>pgcrypto</> was built with + If <filename>pgcrypto</filename> was built with OpenSSL, more algorithms are available, as detailed in <xref linkend="pgcrypto-with-without-openssl">. </para> <para> If you want the digest as a hexadecimal string, use - <function>encode()</> on the result. For example: + <function>encode()</function> on the result. For example: <programlisting> CREATE OR REPLACE FUNCTION sha1(bytea) returns text AS $$ SELECT encode(digest($1, 'sha1'), 'hex') @@ -67,12 +67,12 @@ hmac(data bytea, key text, type text) returns bytea </synopsis> <para> - Calculates hashed MAC for <parameter>data</> with key <parameter>key</>. - <parameter>type</> is the same as in <function>digest()</>. + Calculates hashed MAC for <parameter>data</parameter> with key <parameter>key</parameter>. + <parameter>type</parameter> is the same as in <function>digest()</function>. </para> <para> - This is similar to <function>digest()</> but the hash can only be + This is similar to <function>digest()</function> but the hash can only be recalculated knowing the key. This prevents the scenario of someone altering data and also changing the hash to match. </para> @@ -88,14 +88,14 @@ hmac(data bytea, key text, type text) returns bytea <title>Password Hashing Functions</title> <para> - The functions <function>crypt()</> and <function>gen_salt()</> + The functions <function>crypt()</function> and <function>gen_salt()</function> are specifically designed for hashing passwords. - <function>crypt()</> does the hashing and <function>gen_salt()</> + <function>crypt()</function> does the hashing and <function>gen_salt()</function> prepares algorithm parameters for it. </para> <para> - The algorithms in <function>crypt()</> differ from the usual + The algorithms in <function>crypt()</function> differ from the usual MD5 or SHA1 hashing algorithms in the following respects: </para> @@ -108,7 +108,7 @@ hmac(data bytea, key text, type text) returns bytea </listitem> <listitem> <para> - They use a random value, called the <firstterm>salt</>, so that users + They use a random value, called the <firstterm>salt</firstterm>, so that users having the same password will have different encrypted passwords. This is also an additional defense against reversing the algorithm. </para> @@ -134,7 +134,7 @@ hmac(data bytea, key text, type text) returns bytea </para> <table id="pgcrypto-crypt-algorithms"> - <title>Supported Algorithms for <function>crypt()</></title> + <title>Supported Algorithms for <function>crypt()</function></title> <tgroup cols="6"> <thead> <row> @@ -148,7 +148,7 @@ hmac(data bytea, key text, type text) returns bytea </thead> <tbody> <row> - <entry><literal>bf</></entry> + <entry><literal>bf</literal></entry> <entry>72</entry> <entry>yes</entry> <entry>128</entry> @@ -156,7 +156,7 @@ hmac(data bytea, key text, type text) returns bytea <entry>Blowfish-based, variant 2a</entry> </row> <row> - <entry><literal>md5</></entry> + <entry><literal>md5</literal></entry> <entry>unlimited</entry> <entry>no</entry> <entry>48</entry> @@ -164,7 +164,7 @@ hmac(data bytea, key text, type text) returns bytea <entry>MD5-based crypt</entry> </row> <row> - <entry><literal>xdes</></entry> + <entry><literal>xdes</literal></entry> <entry>8</entry> <entry>yes</entry> <entry>24</entry> @@ -172,7 +172,7 @@ hmac(data bytea, key text, type text) returns bytea <entry>Extended DES</entry> </row> <row> - <entry><literal>des</></entry> + <entry><literal>des</literal></entry> <entry>8</entry> <entry>no</entry> <entry>12</entry> @@ -184,7 +184,7 @@ hmac(data bytea, key text, type text) returns bytea </table> <sect3> - <title><function>crypt()</></title> + <title><function>crypt()</function></title> <indexterm> <primary>crypt</primary> @@ -195,10 +195,10 @@ crypt(password text, salt text) returns text </synopsis> <para> - Calculates a crypt(3)-style hash of <parameter>password</>. + Calculates a crypt(3)-style hash of <parameter>password</parameter>. When storing a new password, you need to use - <function>gen_salt()</> to generate a new <parameter>salt</> value. - To check a password, pass the stored hash value as <parameter>salt</>, + <function>gen_salt()</function> to generate a new <parameter>salt</parameter> value. + To check a password, pass the stored hash value as <parameter>salt</parameter>, and test whether the result matches the stored value. </para> <para> @@ -212,12 +212,12 @@ UPDATE ... SET pswhash = crypt('new password', gen_salt('md5')); <programlisting> SELECT (pswhash = crypt('entered password', pswhash)) AS pswmatch FROM ... ; </programlisting> - This returns <literal>true</> if the entered password is correct. + This returns <literal>true</literal> if the entered password is correct. </para> </sect3> <sect3> - <title><function>gen_salt()</></title> + <title><function>gen_salt()</function></title> <indexterm> <primary>gen_salt</primary> @@ -228,30 +228,30 @@ gen_salt(type text [, iter_count integer ]) returns text </synopsis> <para> - Generates a new random salt string for use in <function>crypt()</>. - The salt string also tells <function>crypt()</> which algorithm to use. + Generates a new random salt string for use in <function>crypt()</function>. + The salt string also tells <function>crypt()</function> which algorithm to use. </para> <para> - The <parameter>type</> parameter specifies the hashing algorithm. + The <parameter>type</parameter> parameter specifies the hashing algorithm. The accepted types are: <literal>des</literal>, <literal>xdes</literal>, <literal>md5</literal> and <literal>bf</literal>. </para> <para> - The <parameter>iter_count</> parameter lets the user specify the iteration + The <parameter>iter_count</parameter> parameter lets the user specify the iteration count, for algorithms that have one. The higher the count, the more time it takes to hash the password and therefore the more time to break it. Although with too high a count the time to calculate a hash may be several years - — which is somewhat impractical. If the <parameter>iter_count</> + — which is somewhat impractical. If the <parameter>iter_count</parameter> parameter is omitted, the default iteration count is used. - Allowed values for <parameter>iter_count</> depend on the algorithm and + Allowed values for <parameter>iter_count</parameter> depend on the algorithm and are shown in <xref linkend="pgcrypto-icfc-table">. </para> <table id="pgcrypto-icfc-table"> - <title>Iteration Counts for <function>crypt()</></title> + <title>Iteration Counts for <function>crypt()</function></title> <tgroup cols="4"> <thead> <row> @@ -263,13 +263,13 @@ gen_salt(type text [, iter_count integer ]) returns text </thead> <tbody> <row> - <entry><literal>xdes</></entry> + <entry><literal>xdes</literal></entry> <entry>725</entry> <entry>1</entry> <entry>16777215</entry> </row> <row> - <entry><literal>bf</></entry> + <entry><literal>bf</literal></entry> <entry>6</entry> <entry>4</entry> <entry>31</entry> @@ -310,63 +310,63 @@ gen_salt(type text [, iter_count integer ]) returns text <row> <entry>Algorithm</entry> <entry>Hashes/sec</entry> - <entry>For <literal>[a-z]</></entry> - <entry>For <literal>[A-Za-z0-9]</></entry> - <entry>Duration relative to <literal>md5 hash</></entry> + <entry>For <literal>[a-z]</literal></entry> + <entry>For <literal>[A-Za-z0-9]</literal></entry> + <entry>Duration relative to <literal>md5 hash</literal></entry> </row> </thead> <tbody> <row> - <entry><literal>crypt-bf/8</></entry> + <entry><literal>crypt-bf/8</literal></entry> <entry>1792</entry> <entry>4 years</entry> <entry>3927 years</entry> <entry>100k</entry> </row> <row> - <entry><literal>crypt-bf/7</></entry> + <entry><literal>crypt-bf/7</literal></entry> <entry>3648</entry> <entry>2 years</entry> <entry>1929 years</entry> <entry>50k</entry> </row> <row> - <entry><literal>crypt-bf/6</></entry> + <entry><literal>crypt-bf/6</literal></entry> <entry>7168</entry> <entry>1 year</entry> <entry>982 years</entry> <entry>25k</entry> </row> <row> - <entry><literal>crypt-bf/5</></entry> + <entry><literal>crypt-bf/5</literal></entry> <entry>13504</entry> <entry>188 days</entry> <entry>521 years</entry> <entry>12.5k</entry> </row> <row> - <entry><literal>crypt-md5</></entry> + <entry><literal>crypt-md5</literal></entry> <entry>171584</entry> <entry>15 days</entry> <entry>41 years</entry> <entry>1k</entry> </row> <row> - <entry><literal>crypt-des</></entry> + <entry><literal>crypt-des</literal></entry> <entry>23221568</entry> <entry>157.5 minutes</entry> <entry>108 days</entry> <entry>7</entry> </row> <row> - <entry><literal>sha1</></entry> + <entry><literal>sha1</literal></entry> <entry>37774272</entry> <entry>90 minutes</entry> <entry>68 days</entry> <entry>4</entry> </row> <row> - <entry><literal>md5</> (hash)</entry> + <entry><literal>md5</literal> (hash)</entry> <entry>150085504</entry> <entry>22.5 minutes</entry> <entry>17 days</entry> @@ -388,18 +388,18 @@ gen_salt(type text [, iter_count integer ]) returns text </listitem> <listitem> <para> - <literal>crypt-des</> and <literal>crypt-md5</> algorithm numbers are - taken from John the Ripper v1.6.38 <literal>-test</> output. + <literal>crypt-des</literal> and <literal>crypt-md5</literal> algorithm numbers are + taken from John the Ripper v1.6.38 <literal>-test</literal> output. </para> </listitem> <listitem> <para> - <literal>md5 hash</> numbers are from mdcrack 1.2. + <literal>md5 hash</literal> numbers are from mdcrack 1.2. </para> </listitem> <listitem> <para> - <literal>sha1</> numbers are from lcrack-20031130-beta. + <literal>sha1</literal> numbers are from lcrack-20031130-beta. </para> </listitem> <listitem> @@ -407,10 +407,10 @@ gen_salt(type text [, iter_count integer ]) returns text <literal>crypt-bf</literal> numbers are taken using a simple program that loops over 1000 8-character passwords. That way I can show the speed with different numbers of iterations. For reference: <literal>john - -test</literal> shows 13506 loops/sec for <literal>crypt-bf/5</>. + -test</literal> shows 13506 loops/sec for <literal>crypt-bf/5</literal>. (The very small difference in results is in accordance with the fact that the - <literal>crypt-bf</literal> implementation in <filename>pgcrypto</> + <literal>crypt-bf</literal> implementation in <filename>pgcrypto</filename> is the same one used in John the Ripper.) </para> </listitem> @@ -436,7 +436,7 @@ gen_salt(type text [, iter_count integer ]) returns text </para> <para> - An encrypted PGP message consists of 2 parts, or <firstterm>packets</>: + An encrypted PGP message consists of 2 parts, or <firstterm>packets</firstterm>: </para> <itemizedlist> <listitem> @@ -459,7 +459,7 @@ gen_salt(type text [, iter_count integer ]) returns text <listitem> <para> The given password is hashed using a String2Key (S2K) algorithm. This is - rather similar to <function>crypt()</> algorithms — purposefully + rather similar to <function>crypt()</function> algorithms — purposefully slow and with random salt — but it produces a full-length binary key. </para> @@ -540,8 +540,8 @@ pgp_sym_encrypt(data text, psw text [, options text ]) returns bytea pgp_sym_encrypt_bytea(data bytea, psw text [, options text ]) returns bytea </synopsis> <para> - Encrypt <parameter>data</> with a symmetric PGP key <parameter>psw</>. - The <parameter>options</> parameter can contain option settings, + Encrypt <parameter>data</parameter> with a symmetric PGP key <parameter>psw</parameter>. + The <parameter>options</parameter> parameter can contain option settings, as described below. </para> </sect3> @@ -565,12 +565,12 @@ pgp_sym_decrypt_bytea(msg bytea, psw text [, options text ]) returns bytea Decrypt a symmetric-key-encrypted PGP message. </para> <para> - Decrypting <type>bytea</> data with <function>pgp_sym_decrypt</> is disallowed. + Decrypting <type>bytea</type> data with <function>pgp_sym_decrypt</function> is disallowed. This is to avoid outputting invalid character data. Decrypting - originally textual data with <function>pgp_sym_decrypt_bytea</> is fine. + originally textual data with <function>pgp_sym_decrypt_bytea</function> is fine. </para> <para> - The <parameter>options</> parameter can contain option settings, + The <parameter>options</parameter> parameter can contain option settings, as described below. </para> </sect3> @@ -591,11 +591,11 @@ pgp_pub_encrypt(data text, key bytea [, options text ]) returns bytea pgp_pub_encrypt_bytea(data bytea, key bytea [, options text ]) returns bytea </synopsis> <para> - Encrypt <parameter>data</> with a public PGP key <parameter>key</>. + Encrypt <parameter>data</parameter> with a public PGP key <parameter>key</parameter>. Giving this function a secret key will produce an error. </para> <para> - The <parameter>options</> parameter can contain option settings, + The <parameter>options</parameter> parameter can contain option settings, as described below. </para> </sect3> @@ -616,19 +616,19 @@ pgp_pub_decrypt(msg bytea, key bytea [, psw text [, options text ]]) returns tex pgp_pub_decrypt_bytea(msg bytea, key bytea [, psw text [, options text ]]) returns bytea </synopsis> <para> - Decrypt a public-key-encrypted message. <parameter>key</> must be the + Decrypt a public-key-encrypted message. <parameter>key</parameter> must be the secret key corresponding to the public key that was used to encrypt. If the secret key is password-protected, you must give the password in - <parameter>psw</>. If there is no password, but you want to specify + <parameter>psw</parameter>. If there is no password, but you want to specify options, you need to give an empty password. </para> <para> - Decrypting <type>bytea</> data with <function>pgp_pub_decrypt</> is disallowed. + Decrypting <type>bytea</type> data with <function>pgp_pub_decrypt</function> is disallowed. This is to avoid outputting invalid character data. Decrypting - originally textual data with <function>pgp_pub_decrypt_bytea</> is fine. + originally textual data with <function>pgp_pub_decrypt_bytea</function> is fine. </para> <para> - The <parameter>options</> parameter can contain option settings, + The <parameter>options</parameter> parameter can contain option settings, as described below. </para> </sect3> @@ -644,7 +644,7 @@ pgp_pub_decrypt_bytea(msg bytea, key bytea [, psw text [, options text ]]) retur pgp_key_id(bytea) returns text </synopsis> <para> - <function>pgp_key_id</> extracts the key ID of a PGP public or secret key. + <function>pgp_key_id</function> extracts the key ID of a PGP public or secret key. Or it gives the key ID that was used for encrypting the data, if given an encrypted message. </para> @@ -654,7 +654,7 @@ pgp_key_id(bytea) returns text <itemizedlist> <listitem> <para> - <literal>SYMKEY</> + <literal>SYMKEY</literal> </para> <para> The message is encrypted with a symmetric key. @@ -662,12 +662,12 @@ pgp_key_id(bytea) returns text </listitem> <listitem> <para> - <literal>ANYKEY</> + <literal>ANYKEY</literal> </para> <para> The message is public-key encrypted, but the key ID has been removed. That means you will need to try all your secret keys on it to see - which one decrypts it. <filename>pgcrypto</> itself does not produce + which one decrypts it. <filename>pgcrypto</filename> itself does not produce such messages. </para> </listitem> @@ -675,7 +675,7 @@ pgp_key_id(bytea) returns text <para> Note that different keys may have the same ID. This is rare but a normal event. The client application should then try to decrypt with each one, - to see which fits — like handling <literal>ANYKEY</>. + to see which fits — like handling <literal>ANYKEY</literal>. </para> </sect3> @@ -700,8 +700,8 @@ dearmor(data text) returns bytea </para> <para> - If the <parameter>keys</> and <parameter>values</> arrays are specified, - an <firstterm>armor header</> is added to the armored format for each + If the <parameter>keys</parameter> and <parameter>values</parameter> arrays are specified, + an <firstterm>armor header</firstterm> is added to the armored format for each key/value pair. Both arrays must be single-dimensional, and they must be of the same length. The keys and values cannot contain any non-ASCII characters. @@ -719,8 +719,8 @@ dearmor(data text) returns bytea pgp_armor_headers(data text, key out text, value out text) returns setof record </synopsis> <para> - <function>pgp_armor_headers()</> extracts the armor headers from - <parameter>data</>. The return value is a set of rows with two columns, + <function>pgp_armor_headers()</function> extracts the armor headers from + <parameter>data</parameter>. The return value is a set of rows with two columns, key and value. If the keys or values contain any non-ASCII characters, they are treated as UTF-8. </para> @@ -924,7 +924,7 @@ gpg --gen-key </programlisting> </para> <para> - The preferred key type is <quote>DSA and Elgamal</>. + The preferred key type is <quote>DSA and Elgamal</quote>. </para> <para> For RSA encryption you must create either DSA or RSA sign-only key @@ -950,7 +950,7 @@ gpg -a --export-secret-keys KEYID > secret.key </programlisting> </para> <para> - You need to use <function>dearmor()</> on these keys before giving them to + You need to use <function>dearmor()</function> on these keys before giving them to the PGP functions. Or if you can handle binary data, you can drop <literal>-a</literal> from the command. </para> @@ -982,7 +982,7 @@ gpg -a --export-secret-keys KEYID > secret.key <para> No support for several subkeys. This may seem like a problem, as this is common practice. On the other hand, you should not use your regular - GPG/PGP keys with <filename>pgcrypto</>, but create new ones, + GPG/PGP keys with <filename>pgcrypto</filename>, but create new ones, as the usage scenario is rather different. </para> </listitem> @@ -1056,15 +1056,15 @@ decrypt_iv(data bytea, key bytea, iv bytea, type text) returns bytea <parameter>type</parameter> string is: <synopsis> -<replaceable>algorithm</> <optional> <literal>-</> <replaceable>mode</> </optional> <optional> <literal>/pad:</> <replaceable>padding</> </optional> +<replaceable>algorithm</replaceable> <optional> <literal>-</literal> <replaceable>mode</replaceable> </optional> <optional> <literal>/pad:</literal> <replaceable>padding</replaceable> </optional> </synopsis> - where <replaceable>algorithm</> is one of: + where <replaceable>algorithm</replaceable> is one of: <itemizedlist> <listitem><para><literal>bf</literal> — Blowfish</para></listitem> <listitem><para><literal>aes</literal> — AES (Rijndael-128)</para></listitem> </itemizedlist> - and <replaceable>mode</> is one of: + and <replaceable>mode</replaceable> is one of: <itemizedlist> <listitem> <para> @@ -1078,7 +1078,7 @@ decrypt_iv(data bytea, key bytea, iv bytea, type text) returns bytea </para> </listitem> </itemizedlist> - and <replaceable>padding</> is one of: + and <replaceable>padding</replaceable> is one of: <itemizedlist> <listitem> <para> @@ -1100,8 +1100,8 @@ encrypt(data, 'fooz', 'bf-cbc/pad:pkcs') </programlisting> </para> <para> - In <function>encrypt_iv</> and <function>decrypt_iv</>, the - <parameter>iv</> parameter is the initial value for the CBC mode; + In <function>encrypt_iv</function> and <function>decrypt_iv</function>, the + <parameter>iv</parameter> parameter is the initial value for the CBC mode; it is ignored for ECB. It is clipped or padded with zeroes if not exactly block size. It defaults to all zeroes in the functions without this parameter. @@ -1119,7 +1119,7 @@ encrypt(data, 'fooz', 'bf-cbc/pad:pkcs') gen_random_bytes(count integer) returns bytea </synopsis> <para> - Returns <parameter>count</> cryptographically strong random bytes. + Returns <parameter>count</parameter> cryptographically strong random bytes. At most 1024 bytes can be extracted at a time. This is to avoid draining the randomness generator pool. </para> @@ -1143,7 +1143,7 @@ gen_random_uuid() returns uuid <title>Configuration</title> <para> - <filename>pgcrypto</> configures itself according to the findings of the + <filename>pgcrypto</filename> configures itself according to the findings of the main PostgreSQL <literal>configure</literal> script. The options that affect it are <literal>--with-zlib</literal> and <literal>--with-openssl</literal>. @@ -1253,9 +1253,9 @@ gen_random_uuid() returns uuid <title>Security Limitations</title> <para> - All <filename>pgcrypto</> functions run inside the database server. + All <filename>pgcrypto</filename> functions run inside the database server. That means that all - the data and passwords move between <filename>pgcrypto</> and client + the data and passwords move between <filename>pgcrypto</filename> and client applications in clear text. Thus you must: </para> @@ -1276,7 +1276,7 @@ gen_random_uuid() returns uuid The implementation does not resist <ulink url="http://en.wikipedia.org/wiki/Side-channel_attack">side-channel attacks</ulink>. For example, the time required for - a <filename>pgcrypto</> decryption function to complete varies among + a <filename>pgcrypto</filename> decryption function to complete varies among ciphertexts of a given size. </para> </sect3> @@ -1342,7 +1342,7 @@ gen_random_uuid() returns uuid </listitem> <listitem> <para><ulink url="http://jlcooke.ca/random/"></ulink></para> - <para>Jean-Luc Cooke Fortuna-based <filename>/dev/random</> driver for Linux.</para> + <para>Jean-Luc Cooke Fortuna-based <filename>/dev/random</filename> driver for Linux.</para> </listitem> <listitem> <para><ulink url="http://kodu.ut.ee/~lipmaa/crypto/"></ulink></para> diff --git a/doc/src/sgml/pgfreespacemap.sgml b/doc/src/sgml/pgfreespacemap.sgml index 43e154a2f3a..0122d278e39 100644 --- a/doc/src/sgml/pgfreespacemap.sgml +++ b/doc/src/sgml/pgfreespacemap.sgml @@ -8,7 +8,7 @@ </indexterm> <para> - The <filename>pg_freespacemap</> module provides a means for examining the + The <filename>pg_freespacemap</filename> module provides a means for examining the free space map (FSM). It provides a function called <function>pg_freespace</function>, or two overloaded functions, to be precise. The functions show the value recorded in the free space map for @@ -36,7 +36,7 @@ <listitem> <para> Returns the amount of free space on the page of the relation, specified - by <literal>blkno</>, according to the FSM. + by <literal>blkno</literal>, according to the FSM. </para> </listitem> </varlistentry> @@ -50,7 +50,7 @@ <listitem> <para> Displays the amount of free space on each page of the relation, - according to the FSM. A set of <literal>(blkno bigint, avail int2)</> + according to the FSM. A set of <literal>(blkno bigint, avail int2)</literal> tuples is returned, one tuple for each page in the relation. </para> </listitem> @@ -59,7 +59,7 @@ <para> The values stored in the free space map are not exact. They're rounded - to precision of 1/256th of <symbol>BLCKSZ</> (32 bytes with default <symbol>BLCKSZ</>), and + to precision of 1/256th of <symbol>BLCKSZ</symbol> (32 bytes with default <symbol>BLCKSZ</symbol>), and they're not kept fully up-to-date as tuples are inserted and updated. </para> diff --git a/doc/src/sgml/pgprewarm.sgml b/doc/src/sgml/pgprewarm.sgml index c6b94a8b728..e0a6d0503f4 100644 --- a/doc/src/sgml/pgprewarm.sgml +++ b/doc/src/sgml/pgprewarm.sgml @@ -11,11 +11,11 @@ The <filename>pg_prewarm</filename> module provides a convenient way to load relation data into either the operating system buffer cache or the <productname>PostgreSQL</productname> buffer cache. Prewarming - can be performed manually using the <filename>pg_prewarm</> function, - or can be performed automatically by including <literal>pg_prewarm</> in + can be performed manually using the <filename>pg_prewarm</filename> function, + or can be performed automatically by including <literal>pg_prewarm</literal> in <xref linkend="guc-shared-preload-libraries">. In the latter case, the system will run a background worker which periodically records the contents - of shared buffers in a file called <filename>autoprewarm.blocks</> and + of shared buffers in a file called <filename>autoprewarm.blocks</filename> and will, using 2 background workers, reload those same blocks after a restart. </para> @@ -77,10 +77,10 @@ autoprewarm_dump_now() RETURNS int8 </synopsis> <para> - Update <filename>autoprewarm.blocks</> immediately. This may be useful + Update <filename>autoprewarm.blocks</filename> immediately. This may be useful if the autoprewarm worker is not running but you anticipate running it after the next restart. The return value is the number of records written - to <filename>autoprewarm.blocks</>. + to <filename>autoprewarm.blocks</filename>. </para> </sect2> @@ -92,7 +92,7 @@ autoprewarm_dump_now() RETURNS int8 <term> <varname>pg_prewarm.autoprewarm</varname> (<type>boolean</type>) <indexterm> - <primary><varname>pg_prewarm.autoprewarm</> configuration parameter</primary> + <primary><varname>pg_prewarm.autoprewarm</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -109,12 +109,12 @@ autoprewarm_dump_now() RETURNS int8 <term> <varname>pg_prewarm.autoprewarm_interval</varname> (<type>int</type>) <indexterm> - <primary><varname>pg_prewarm.autoprewarm_interval</> configuration parameter</primary> + <primary><varname>pg_prewarm.autoprewarm_interval</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> - This is the interval between updates to <literal>autoprewarm.blocks</>. + This is the interval between updates to <literal>autoprewarm.blocks</literal>. The default is 300 seconds. If set to 0, the file will not be dumped at regular intervals, but only when the server is shut down. </para> diff --git a/doc/src/sgml/pgrowlocks.sgml b/doc/src/sgml/pgrowlocks.sgml index 65d532e0810..57dcf6beb24 100644 --- a/doc/src/sgml/pgrowlocks.sgml +++ b/doc/src/sgml/pgrowlocks.sgml @@ -37,7 +37,7 @@ pgrowlocks(text) returns setof record </para> <table id="pgrowlocks-columns"> - <title><function>pgrowlocks</> Output Columns</title> + <title><function>pgrowlocks</function> Output Columns</title> <tgroup cols="3"> <thead> @@ -73,9 +73,9 @@ pgrowlocks(text) returns setof record <entry><structfield>lock_type</structfield></entry> <entry><type>text[]</type></entry> <entry>Lock mode of lockers (more than one if multitransaction), - an array of <literal>Key Share</>, <literal>Share</>, - <literal>For No Key Update</>, <literal>No Key Update</>, - <literal>For Update</>, <literal>Update</>.</entry> + an array of <literal>Key Share</literal>, <literal>Share</literal>, + <literal>For No Key Update</literal>, <literal>No Key Update</literal>, + <literal>For Update</literal>, <literal>Update</literal>.</entry> </row> <row> @@ -89,7 +89,7 @@ pgrowlocks(text) returns setof record </table> <para> - <function>pgrowlocks</function> takes <literal>AccessShareLock</> for the + <function>pgrowlocks</function> takes <literal>AccessShareLock</literal> for the target table and reads each row one by one to collect the row locking information. This is not very speedy for a large table. Note that: </para> diff --git a/doc/src/sgml/pgstandby.sgml b/doc/src/sgml/pgstandby.sgml index bf4edea9f18..7feba8cdd6e 100644 --- a/doc/src/sgml/pgstandby.sgml +++ b/doc/src/sgml/pgstandby.sgml @@ -31,14 +31,14 @@ <title>Description</title> <para> - <application>pg_standby</> supports creation of a <quote>warm standby</> + <application>pg_standby</application> supports creation of a <quote>warm standby</quote> database server. It is designed to be a production-ready program, as well as a customizable template should you require specific modifications. </para> <para> - <application>pg_standby</> is designed to be a waiting - <varname>restore_command</>, which is needed to turn a standard + <application>pg_standby</application> is designed to be a waiting + <varname>restore_command</varname>, which is needed to turn a standard archive recovery into a warm standby operation. Other configuration is required as well, all of which is described in the main server manual (see <xref linkend="warm-standby">). @@ -46,33 +46,33 @@ <para> To configure a standby - server to use <application>pg_standby</>, put this into its + server to use <application>pg_standby</application>, put this into its <filename>recovery.conf</filename> configuration file: <programlisting> -restore_command = 'pg_standby <replaceable>archiveDir</> %f %p %r' +restore_command = 'pg_standby <replaceable>archiveDir</replaceable> %f %p %r' </programlisting> - where <replaceable>archiveDir</> is the directory from which WAL segment + where <replaceable>archiveDir</replaceable> is the directory from which WAL segment files should be restored. </para> <para> - If <replaceable>restartwalfile</> is specified, normally by using the + If <replaceable>restartwalfile</replaceable> is specified, normally by using the <literal>%r</literal> macro, then all WAL files logically preceding this - file will be removed from <replaceable>archivelocation</>. This minimizes + file will be removed from <replaceable>archivelocation</replaceable>. This minimizes the number of files that need to be retained, while preserving crash-restart capability. Use of this parameter is appropriate if the - <replaceable>archivelocation</> is a transient staging area for this - particular standby server, but <emphasis>not</> when the - <replaceable>archivelocation</> is intended as a long-term WAL archive area. + <replaceable>archivelocation</replaceable> is a transient staging area for this + particular standby server, but <emphasis>not</emphasis> when the + <replaceable>archivelocation</replaceable> is intended as a long-term WAL archive area. </para> <para> <application>pg_standby</application> assumes that - <replaceable>archivelocation</> is a directory readable by the - server-owning user. If <replaceable>restartwalfile</> (or <literal>-k</>) + <replaceable>archivelocation</replaceable> is a directory readable by the + server-owning user. If <replaceable>restartwalfile</replaceable> (or <literal>-k</literal>) is specified, - the <replaceable>archivelocation</> directory must be writable too. + the <replaceable>archivelocation</replaceable> directory must be writable too. </para> <para> - There are two ways to fail over to a <quote>warm standby</> database server + There are two ways to fail over to a <quote>warm standby</quote> database server when the master server fails: <variablelist> @@ -85,7 +85,7 @@ restore_command = 'pg_standby <replaceable>archiveDir</> %f %p %r' the standby server has fallen behind, but if there is a lot of unapplied WAL it can be a long time before the standby server becomes ready. To trigger a smart failover, create a trigger file containing - the word <literal>smart</>, or just create it and leave it empty. + the word <literal>smart</literal>, or just create it and leave it empty. </para> </listitem> </varlistentry> @@ -96,8 +96,8 @@ restore_command = 'pg_standby <replaceable>archiveDir</> %f %p %r' In fast failover, the server is brought up immediately. Any WAL files in the archive that have not yet been applied will be ignored, and all transactions in those files are lost. To trigger a fast failover, - create a trigger file and write the word <literal>fast</> into it. - <application>pg_standby</> can also be configured to execute a fast + create a trigger file and write the word <literal>fast</literal> into it. + <application>pg_standby</application> can also be configured to execute a fast failover automatically if no new WAL file appears within a defined interval. </para> @@ -120,7 +120,7 @@ restore_command = 'pg_standby <replaceable>archiveDir</> %f %p %r' <term><option>-c</option></term> <listitem> <para> - Use <literal>cp</> or <literal>copy</> command to restore WAL files + Use <literal>cp</literal> or <literal>copy</literal> command to restore WAL files from archive. This is the only supported behavior so this option is useless. </para> </listitem> @@ -130,7 +130,7 @@ restore_command = 'pg_standby <replaceable>archiveDir</> %f %p %r' <term><option>-d</option></term> <listitem> <para> - Print lots of debug logging output on <filename>stderr</>. + Print lots of debug logging output on <filename>stderr</filename>. </para> </listitem> </varlistentry> @@ -147,8 +147,8 @@ restore_command = 'pg_standby <replaceable>archiveDir</> %f %p %r' <replaceable>restartwalfile</replaceable> is specified, since that specification method is more accurate in determining the correct archive cut-off point. - Use of this parameter is <emphasis>deprecated</> as of - <productname>PostgreSQL</> 8.3; it is safer and more efficient to + Use of this parameter is <emphasis>deprecated</emphasis> as of + <productname>PostgreSQL</productname> 8.3; it is safer and more efficient to specify a <replaceable>restartwalfile</replaceable> parameter. A too small setting could result in removal of files that are still needed for a restart of the standby server, while a too large setting wastes @@ -158,12 +158,12 @@ restore_command = 'pg_standby <replaceable>archiveDir</> %f %p %r' </varlistentry> <varlistentry> - <term><option>-r</option> <replaceable>maxretries</></term> + <term><option>-r</option> <replaceable>maxretries</replaceable></term> <listitem> <para> Set the maximum number of times to retry the copy command if it fails (default 3). After each failure, we wait for - <replaceable>sleeptime</> * <replaceable>num_retries</> + <replaceable>sleeptime</replaceable> * <replaceable>num_retries</replaceable> so that the wait time increases progressively. So by default, we will wait 5 secs, 10 secs, then 15 secs before reporting the failure back to the standby server. This will be @@ -174,7 +174,7 @@ restore_command = 'pg_standby <replaceable>archiveDir</> %f %p %r' </varlistentry> <varlistentry> - <term><option>-s</option> <replaceable>sleeptime</></term> + <term><option>-s</option> <replaceable>sleeptime</replaceable></term> <listitem> <para> Set the number of seconds (up to 60, default 5) to sleep between @@ -186,21 +186,21 @@ restore_command = 'pg_standby <replaceable>archiveDir</> %f %p %r' </varlistentry> <varlistentry> - <term><option>-t</option> <replaceable>triggerfile</></term> + <term><option>-t</option> <replaceable>triggerfile</replaceable></term> <listitem> <para> Specify a trigger file whose presence should cause failover. It is recommended that you use a structured file name to avoid confusion as to which server is being triggered when multiple servers exist on the same system; for example - <filename>/tmp/pgsql.trigger.5432</>. + <filename>/tmp/pgsql.trigger.5432</filename>. </para> </listitem> </varlistentry> <varlistentry> - <term><option>-V</></term> - <term><option>--version</></term> + <term><option>-V</option></term> + <term><option>--version</option></term> <listitem> <para> Print the <application>pg_standby</application> version and exit. @@ -209,7 +209,7 @@ restore_command = 'pg_standby <replaceable>archiveDir</> %f %p %r' </varlistentry> <varlistentry> - <term><option>-w</option> <replaceable>maxwaittime</></term> + <term><option>-w</option> <replaceable>maxwaittime</replaceable></term> <listitem> <para> Set the maximum number of seconds to wait for the next WAL file, @@ -222,8 +222,8 @@ restore_command = 'pg_standby <replaceable>archiveDir</> %f %p %r' </varlistentry> <varlistentry> - <term><option>-?</></term> - <term><option>--help</></term> + <term><option>-?</option></term> + <term><option>--help</option></term> <listitem> <para> Show help about <application>pg_standby</application> command line @@ -241,18 +241,18 @@ restore_command = 'pg_standby <replaceable>archiveDir</> %f %p %r' <para> <application>pg_standby</application> is designed to work with - <productname>PostgreSQL</> 8.2 and later. + <productname>PostgreSQL</productname> 8.2 and later. </para> <para> - <productname>PostgreSQL</> 8.3 provides the <literal>%r</literal> macro, + <productname>PostgreSQL</productname> 8.3 provides the <literal>%r</literal> macro, which is designed to let <application>pg_standby</application> know the - last file it needs to keep. With <productname>PostgreSQL</> 8.2, the + last file it needs to keep. With <productname>PostgreSQL</productname> 8.2, the <literal>-k</literal> option must be used if archive cleanup is required. This option remains available in 8.3, but its use is deprecated. </para> <para> - <productname>PostgreSQL</> 8.4 provides the - <varname>recovery_end_command</> option. Without this option + <productname>PostgreSQL</productname> 8.4 provides the + <varname>recovery_end_command</varname> option. Without this option a leftover trigger file can be hazardous. </para> @@ -276,13 +276,13 @@ restore_command = 'pg_standby -d -s 2 -t /tmp/pgsql.trigger.5442 .../archive %f recovery_end_command = 'rm -f /tmp/pgsql.trigger.5442' </programlisting> where the archive directory is physically located on the standby server, - so that the <varname>archive_command</> is accessing it across NFS, - but the files are local to the standby (enabling use of <literal>ln</>). + so that the <varname>archive_command</varname> is accessing it across NFS, + but the files are local to the standby (enabling use of <literal>ln</literal>). This will: <itemizedlist> <listitem> <para> - produce debugging output in <filename>standby.log</> + produce debugging output in <filename>standby.log</filename> </para> </listitem> <listitem> @@ -293,7 +293,7 @@ recovery_end_command = 'rm -f /tmp/pgsql.trigger.5442' <listitem> <para> stop waiting only when a trigger file called - <filename>/tmp/pgsql.trigger.5442</> appears, + <filename>/tmp/pgsql.trigger.5442</filename> appears, and perform failover according to its content </para> </listitem> @@ -320,18 +320,18 @@ restore_command = 'pg_standby -d -s 5 -t C:\pgsql.trigger.5442 ...\archive %f %p recovery_end_command = 'del C:\pgsql.trigger.5442' </programlisting> Note that backslashes need to be doubled in the - <varname>archive_command</>, but <emphasis>not</emphasis> in the - <varname>restore_command</> or <varname>recovery_end_command</>. + <varname>archive_command</varname>, but <emphasis>not</emphasis> in the + <varname>restore_command</varname> or <varname>recovery_end_command</varname>. This will: <itemizedlist> <listitem> <para> - use the <literal>copy</> command to restore WAL files from archive + use the <literal>copy</literal> command to restore WAL files from archive </para> </listitem> <listitem> <para> - produce debugging output in <filename>standby.log</> + produce debugging output in <filename>standby.log</filename> </para> </listitem> <listitem> @@ -342,7 +342,7 @@ recovery_end_command = 'del C:\pgsql.trigger.5442' <listitem> <para> stop waiting only when a trigger file called - <filename>C:\pgsql.trigger.5442</> appears, + <filename>C:\pgsql.trigger.5442</filename> appears, and perform failover according to its content </para> </listitem> @@ -360,16 +360,16 @@ recovery_end_command = 'del C:\pgsql.trigger.5442' </para> <para> - The <literal>copy</> command on Windows sets the final file size + The <literal>copy</literal> command on Windows sets the final file size before the file is completely copied, which would ordinarily confuse <application>pg_standby</application>. Therefore - <application>pg_standby</application> waits <replaceable>sleeptime</> - seconds once it sees the proper file size. GNUWin32's <literal>cp</> + <application>pg_standby</application> waits <replaceable>sleeptime</replaceable> + seconds once it sees the proper file size. GNUWin32's <literal>cp</literal> sets the file size only after the file copy is complete. </para> <para> - Since the Windows example uses <literal>copy</> at both ends, either + Since the Windows example uses <literal>copy</literal> at both ends, either or both servers might be accessing the archive directory across the network. </para> diff --git a/doc/src/sgml/pgstatstatements.sgml b/doc/src/sgml/pgstatstatements.sgml index f9dd43e891d..4b15a268cd7 100644 --- a/doc/src/sgml/pgstatstatements.sgml +++ b/doc/src/sgml/pgstatstatements.sgml @@ -13,20 +13,20 @@ </para> <para> - The module must be loaded by adding <literal>pg_stat_statements</> to + The module must be loaded by adding <literal>pg_stat_statements</literal> to <xref linkend="guc-shared-preload-libraries"> in - <filename>postgresql.conf</>, because it requires additional shared memory. + <filename>postgresql.conf</filename>, because it requires additional shared memory. This means that a server restart is needed to add or remove the module. </para> <para> When <filename>pg_stat_statements</filename> is loaded, it tracks statistics across all databases of the server. To access and manipulate - these statistics, the module provides a view, <structname>pg_stat_statements</>, - and the utility functions <function>pg_stat_statements_reset</> and - <function>pg_stat_statements</>. These are not available globally but + these statistics, the module provides a view, <structname>pg_stat_statements</structname>, + and the utility functions <function>pg_stat_statements_reset</function> and + <function>pg_stat_statements</function>. These are not available globally but can be enabled for a specific database with - <command>CREATE EXTENSION pg_stat_statements</>. + <command>CREATE EXTENSION pg_stat_statements</command>. </para> <sect2> @@ -34,7 +34,7 @@ <para> The statistics gathered by the module are made available via a - view named <structname>pg_stat_statements</>. This view + view named <structname>pg_stat_statements</structname>. This view contains one row for each distinct database ID, user ID and query ID (up to the maximum number of distinct statements that the module can track). The columns of the view are shown in @@ -42,7 +42,7 @@ </para> <table id="pgstatstatements-columns"> - <title><structname>pg_stat_statements</> Columns</title> + <title><structname>pg_stat_statements</structname> Columns</title> <tgroup cols="4"> <thead> @@ -234,9 +234,9 @@ </para> <para> - Plannable queries (that is, <command>SELECT</>, <command>INSERT</>, - <command>UPDATE</>, and <command>DELETE</>) are combined into a single - <structname>pg_stat_statements</> entry whenever they have identical query + Plannable queries (that is, <command>SELECT</command>, <command>INSERT</command>, + <command>UPDATE</command>, and <command>DELETE</command>) are combined into a single + <structname>pg_stat_statements</structname> entry whenever they have identical query structures according to an internal hash calculation. Typically, two queries will be considered the same for this purpose if they are semantically equivalent except for the values of literal constants @@ -247,16 +247,16 @@ <para> When a constant's value has been ignored for purposes of matching the query to other queries, the constant is replaced by a parameter symbol, such - as <literal>$1</literal>, in the <structname>pg_stat_statements</> + as <literal>$1</literal>, in the <structname>pg_stat_statements</structname> display. The rest of the query text is that of the first query that had the - particular <structfield>queryid</> hash value associated with the - <structname>pg_stat_statements</> entry. + particular <structfield>queryid</structfield> hash value associated with the + <structname>pg_stat_statements</structname> entry. </para> <para> In some cases, queries with visibly different texts might get merged into a - single <structname>pg_stat_statements</> entry. Normally this will happen + single <structname>pg_stat_statements</structname> entry. Normally this will happen only for semantically equivalent queries, but there is a small chance of hash collisions causing unrelated queries to be merged into one entry. (This cannot happen for queries belonging to different users or databases, @@ -264,41 +264,41 @@ </para> <para> - Since the <structfield>queryid</> hash value is computed on the + Since the <structfield>queryid</structfield> hash value is computed on the post-parse-analysis representation of the queries, the opposite is also possible: queries with identical texts might appear as separate entries, if they have different meanings as a result of - factors such as different <varname>search_path</> settings. + factors such as different <varname>search_path</varname> settings. </para> <para> - Consumers of <structname>pg_stat_statements</> may wish to use - <structfield>queryid</> (perhaps in combination with - <structfield>dbid</> and <structfield>userid</>) as a more stable + Consumers of <structname>pg_stat_statements</structname> may wish to use + <structfield>queryid</structfield> (perhaps in combination with + <structfield>dbid</structfield> and <structfield>userid</structfield>) as a more stable and reliable identifier for each entry than its query text. However, it is important to understand that there are only limited - guarantees around the stability of the <structfield>queryid</> hash + guarantees around the stability of the <structfield>queryid</structfield> hash value. Since the identifier is derived from the post-parse-analysis tree, its value is a function of, among other things, the internal object identifiers appearing in this representation. This has some counterintuitive implications. For example, - <filename>pg_stat_statements</> will consider two apparently-identical + <filename>pg_stat_statements</filename> will consider two apparently-identical queries to be distinct, if they reference a table that was dropped and recreated between the executions of the two queries. The hashing process is also sensitive to differences in machine architecture and other facets of the platform. - Furthermore, it is not safe to assume that <structfield>queryid</> - will be stable across major versions of <productname>PostgreSQL</>. + Furthermore, it is not safe to assume that <structfield>queryid</structfield> + will be stable across major versions of <productname>PostgreSQL</productname>. </para> <para> - As a rule of thumb, <structfield>queryid</> values can be assumed to be + As a rule of thumb, <structfield>queryid</structfield> values can be assumed to be stable and comparable only so long as the underlying server version and catalog metadata details stay exactly the same. Two servers participating in replication based on physical WAL replay can be expected - to have identical <structfield>queryid</> values for the same query. + to have identical <structfield>queryid</structfield> values for the same query. However, logical replication schemes do not promise to keep replicas - identical in all relevant details, so <structfield>queryid</> will + identical in all relevant details, so <structfield>queryid</structfield> will not be a useful identifier for accumulating costs across a set of logical replicas. If in doubt, direct testing is recommended. </para> @@ -306,13 +306,13 @@ <para> The parameter symbols used to replace constants in representative query texts start from the next number after the - highest <literal>$</><replaceable>n</> parameter in the original query - text, or <literal>$1</> if there was none. It's worth noting that in + highest <literal>$</literal><replaceable>n</replaceable> parameter in the original query + text, or <literal>$1</literal> if there was none. It's worth noting that in some cases there may be hidden parameter symbols that affect this - numbering. For example, <application>PL/pgSQL</> uses hidden parameter + numbering. For example, <application>PL/pgSQL</application> uses hidden parameter symbols to insert values of function local variables into queries, so that - a <application>PL/pgSQL</> statement like <literal>SELECT i + 1 INTO j</> - would have representative text like <literal>SELECT i + $2</>. + a <application>PL/pgSQL</application> statement like <literal>SELECT i + 1 INTO j</literal> + would have representative text like <literal>SELECT i + $2</literal>. </para> <para> @@ -320,11 +320,11 @@ not consume shared memory. Therefore, even very lengthy query texts can be stored successfully. However, if many long query texts are accumulated, the external file might grow unmanageably large. As a - recovery method if that happens, <filename>pg_stat_statements</> may + recovery method if that happens, <filename>pg_stat_statements</filename> may choose to discard the query texts, whereupon all existing entries in - the <structname>pg_stat_statements</> view will show - null <structfield>query</> fields, though the statistics associated with - each <structfield>queryid</> are preserved. If this happens, consider + the <structname>pg_stat_statements</structname> view will show + null <structfield>query</structfield> fields, though the statistics associated with + each <structfield>queryid</structfield> are preserved. If this happens, consider reducing <varname>pg_stat_statements.max</varname> to prevent recurrences. </para> @@ -345,7 +345,7 @@ <listitem> <para> <function>pg_stat_statements_reset</function> discards all statistics - gathered so far by <filename>pg_stat_statements</>. + gathered so far by <filename>pg_stat_statements</filename>. By default, this function can only be executed by superusers. </para> </listitem> @@ -363,17 +363,17 @@ <listitem> <para> The <structname>pg_stat_statements</structname> view is defined in - terms of a function also named <function>pg_stat_statements</>. + terms of a function also named <function>pg_stat_statements</function>. It is possible for clients to call the <function>pg_stat_statements</function> function directly, and by specifying <literal>showtext := false</literal> have query text be omitted (that is, the <literal>OUT</literal> argument that corresponds - to the view's <structfield>query</> column will return nulls). This + to the view's <structfield>query</structfield> column will return nulls). This feature is intended to support external tools that might wish to avoid the overhead of repeatedly retrieving query texts of indeterminate length. Such tools can instead cache the first query text observed for each entry themselves, since that is - all <filename>pg_stat_statements</> itself does, and then retrieve + all <filename>pg_stat_statements</filename> itself does, and then retrieve query texts only as needed. Since the server stores query texts in a file, this approach may reduce physical I/O for repeated examination of the <structname>pg_stat_statements</structname> data. @@ -396,7 +396,7 @@ <para> <varname>pg_stat_statements.max</varname> is the maximum number of statements tracked by the module (i.e., the maximum number of rows - in the <structname>pg_stat_statements</> view). If more distinct + in the <structname>pg_stat_statements</structname> view). If more distinct statements than that are observed, information about the least-executed statements is discarded. The default value is 5000. @@ -414,11 +414,11 @@ <para> <varname>pg_stat_statements.track</varname> controls which statements are counted by the module. - Specify <literal>top</> to track top-level statements (those issued - directly by clients), <literal>all</> to also track nested statements - (such as statements invoked within functions), or <literal>none</> to + Specify <literal>top</literal> to track top-level statements (those issued + directly by clients), <literal>all</literal> to also track nested statements + (such as statements invoked within functions), or <literal>none</literal> to disable statement statistics collection. - The default value is <literal>top</>. + The default value is <literal>top</literal>. Only superusers can change this setting. </para> </listitem> @@ -433,9 +433,9 @@ <para> <varname>pg_stat_statements.track_utility</varname> controls whether utility commands are tracked by the module. Utility commands are - all those other than <command>SELECT</>, <command>INSERT</>, - <command>UPDATE</> and <command>DELETE</>. - The default value is <literal>on</>. + all those other than <command>SELECT</command>, <command>INSERT</command>, + <command>UPDATE</command> and <command>DELETE</command>. + The default value is <literal>on</literal>. Only superusers can change this setting. </para> </listitem> @@ -450,10 +450,10 @@ <para> <varname>pg_stat_statements.save</varname> specifies whether to save statement statistics across server shutdowns. - If it is <literal>off</> then statistics are not saved at + If it is <literal>off</literal> then statistics are not saved at shutdown nor reloaded at server start. - The default value is <literal>on</>. - This parameter can only be set in the <filename>postgresql.conf</> + The default value is <literal>on</literal>. + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. </para> </listitem> @@ -464,11 +464,11 @@ The module requires additional shared memory proportional to <varname>pg_stat_statements.max</varname>. Note that this memory is consumed whenever the module is loaded, even if - <varname>pg_stat_statements.track</> is set to <literal>none</>. + <varname>pg_stat_statements.track</varname> is set to <literal>none</literal>. </para> <para> - These parameters must be set in <filename>postgresql.conf</>. + These parameters must be set in <filename>postgresql.conf</filename>. Typical usage might be: <programlisting> diff --git a/doc/src/sgml/pgstattuple.sgml b/doc/src/sgml/pgstattuple.sgml index a7c67ae6452..611df9d0bfd 100644 --- a/doc/src/sgml/pgstattuple.sgml +++ b/doc/src/sgml/pgstattuple.sgml @@ -30,13 +30,13 @@ <indexterm> <primary>pgstattuple</primary> </indexterm> - <function>pgstattuple(regclass) returns record</> + <function>pgstattuple(regclass) returns record</function> </term> <listitem> <para> <function>pgstattuple</function> returns a relation's physical length, - percentage of <quote>dead</> tuples, and other info. This may help users + percentage of <quote>dead</quote> tuples, and other info. This may help users to determine whether vacuum is necessary or not. The argument is the target relation's name (optionally schema-qualified) or OID. For example: @@ -135,15 +135,15 @@ free_percent | 1.95 </para> <para> - <function>pgstattuple</function> judges a tuple is <quote>dead</> if - <function>HeapTupleSatisfiesDirty</> returns false. + <function>pgstattuple</function> judges a tuple is <quote>dead</quote> if + <function>HeapTupleSatisfiesDirty</function> returns false. </para> </listitem> </varlistentry> <varlistentry> <term> - <function>pgstattuple(text) returns record</> + <function>pgstattuple(text) returns record</function> </term> <listitem> @@ -161,7 +161,7 @@ free_percent | 1.95 <indexterm> <primary>pgstatindex</primary> </indexterm> - <function>pgstatindex(regclass) returns record</> + <function>pgstatindex(regclass) returns record</function> </term> <listitem> @@ -225,7 +225,7 @@ leaf_fragmentation | 0 <row> <entry><structfield>internal_pages</structfield></entry> <entry><type>bigint</type></entry> - <entry>Number of <quote>internal</> (upper-level) pages</entry> + <entry>Number of <quote>internal</quote> (upper-level) pages</entry> </row> <row> @@ -264,14 +264,14 @@ leaf_fragmentation | 0 </para> <para> - The reported <literal>index_size</> will normally correspond to one more + The reported <literal>index_size</literal> will normally correspond to one more page than is accounted for by <literal>internal_pages + leaf_pages + empty_pages + deleted_pages</literal>, because it also includes the index's metapage. </para> <para> - As with <function>pgstattuple</>, the results are accumulated + As with <function>pgstattuple</function>, the results are accumulated page-by-page, and should not be expected to represent an instantaneous snapshot of the whole index. </para> @@ -280,7 +280,7 @@ leaf_fragmentation | 0 <varlistentry> <term> - <function>pgstatindex(text) returns record</> + <function>pgstatindex(text) returns record</function> </term> <listitem> @@ -298,7 +298,7 @@ leaf_fragmentation | 0 <indexterm> <primary>pgstatginindex</primary> </indexterm> - <function>pgstatginindex(regclass) returns record</> + <function>pgstatginindex(regclass) returns record</function> </term> <listitem> @@ -358,7 +358,7 @@ pending_tuples | 0 <indexterm> <primary>pgstathashindex</primary> </indexterm> - <function>pgstathashindex(regclass) returns record</> + <function>pgstathashindex(regclass) returns record</function> </term> <listitem> @@ -453,7 +453,7 @@ free_percent | 61.8005949100872 <indexterm> <primary>pg_relpages</primary> </indexterm> - <function>pg_relpages(regclass) returns bigint</> + <function>pg_relpages(regclass) returns bigint</function> </term> <listitem> @@ -466,7 +466,7 @@ free_percent | 61.8005949100872 <varlistentry> <term> - <function>pg_relpages(text) returns bigint</> + <function>pg_relpages(text) returns bigint</function> </term> <listitem> @@ -484,7 +484,7 @@ free_percent | 61.8005949100872 <indexterm> <primary>pgstattuple_approx</primary> </indexterm> - <function>pgstattuple_approx(regclass) returns record</> + <function>pgstattuple_approx(regclass) returns record</function> </term> <listitem> diff --git a/doc/src/sgml/pgtrgm.sgml b/doc/src/sgml/pgtrgm.sgml index 775a7b8be79..7903dc3d82b 100644 --- a/doc/src/sgml/pgtrgm.sgml +++ b/doc/src/sgml/pgtrgm.sgml @@ -111,7 +111,7 @@ <entry><function>show_limit()</function><indexterm><primary>show_limit</primary></indexterm></entry> <entry><type>real</type></entry> <entry> - Returns the current similarity threshold used by the <literal>%</> + Returns the current similarity threshold used by the <literal>%</literal> operator. This sets the minimum similarity between two words for them to be considered similar enough to be misspellings of each other, for example @@ -122,7 +122,7 @@ <entry><function>set_limit(real)</function><indexterm><primary>set_limit</primary></indexterm></entry> <entry><type>real</type></entry> <entry> - Sets the current similarity threshold that is used by the <literal>%</> + Sets the current similarity threshold that is used by the <literal>%</literal> operator. The threshold must be between 0 and 1 (default is 0.3). Returns the same value passed in (<emphasis>deprecated</emphasis>). </entry> @@ -144,56 +144,56 @@ <tbody> <row> - <entry><type>text</> <literal>%</literal> <type>text</></entry> + <entry><type>text</type> <literal>%</literal> <type>text</type></entry> <entry><type>boolean</type></entry> <entry> - Returns <literal>true</> if its arguments have a similarity that is + Returns <literal>true</literal> if its arguments have a similarity that is greater than the current similarity threshold set by - <varname>pg_trgm.similarity_threshold</>. + <varname>pg_trgm.similarity_threshold</varname>. </entry> </row> <row> - <entry><type>text</> <literal><%</literal> <type>text</></entry> + <entry><type>text</type> <literal><%</literal> <type>text</type></entry> <entry><type>boolean</type></entry> <entry> - Returns <literal>true</> if its first argument has the similar word in + Returns <literal>true</literal> if its first argument has the similar word in the second argument and they have a similarity that is greater than the current word similarity threshold set by - <varname>pg_trgm.word_similarity_threshold</> parameter. + <varname>pg_trgm.word_similarity_threshold</varname> parameter. </entry> </row> <row> - <entry><type>text</> <literal>%></literal> <type>text</></entry> + <entry><type>text</type> <literal>%></literal> <type>text</type></entry> <entry><type>boolean</type></entry> <entry> - Commutator of the <literal><%</> operator. + Commutator of the <literal><%</literal> operator. </entry> </row> <row> - <entry><type>text</> <literal><-></literal> <type>text</></entry> + <entry><type>text</type> <literal><-></literal> <type>text</type></entry> <entry><type>real</type></entry> <entry> - Returns the <quote>distance</> between the arguments, that is - one minus the <function>similarity()</> value. + Returns the <quote>distance</quote> between the arguments, that is + one minus the <function>similarity()</function> value. </entry> </row> <row> <entry> - <type>text</> <literal><<-></literal> <type>text</> + <type>text</type> <literal><<-></literal> <type>text</type> </entry> <entry><type>real</type></entry> <entry> - Returns the <quote>distance</> between the arguments, that is - one minus the <function>word_similarity()</> value. + Returns the <quote>distance</quote> between the arguments, that is + one minus the <function>word_similarity()</function> value. </entry> </row> <row> <entry> - <type>text</> <literal><->></literal> <type>text</> + <type>text</type> <literal><->></literal> <type>text</type> </entry> <entry><type>real</type></entry> <entry> - Commutator of the <literal><<-></> operator. + Commutator of the <literal><<-></literal> operator. </entry> </row> </tbody> @@ -207,31 +207,31 @@ <variablelist> <varlistentry id="guc-pgtrgm-similarity-threshold" xreflabel="pg_trgm.similarity_threshold"> <term> - <varname>pg_trgm.similarity_threshold</> (<type>real</type>) + <varname>pg_trgm.similarity_threshold</varname> (<type>real</type>) <indexterm> - <primary><varname>pg_trgm.similarity_threshold</> configuration parameter</primary> + <primary><varname>pg_trgm.similarity_threshold</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> - Sets the current similarity threshold that is used by the <literal>%</> + Sets the current similarity threshold that is used by the <literal>%</literal> operator. The threshold must be between 0 and 1 (default is 0.3). </para> </listitem> </varlistentry> <varlistentry id="guc-pgtrgm-word-similarity-threshold" xreflabel="pg_trgm.word_similarity_threshold"> <term> - <varname>pg_trgm.word_similarity_threshold</> (<type>real</type>) + <varname>pg_trgm.word_similarity_threshold</varname> (<type>real</type>) <indexterm> <primary> - <varname>pg_trgm.word_similarity_threshold</> configuration parameter + <varname>pg_trgm.word_similarity_threshold</varname> configuration parameter </primary> </indexterm> </term> <listitem> <para> Sets the current word similarity threshold that is used by - <literal><%</> and <literal>%></> operators. The threshold + <literal><%</literal> and <literal>%></literal> operators. The threshold must be between 0 and 1 (default is 0.6). </para> </listitem> @@ -247,8 +247,8 @@ operator classes that allow you to create an index over a text column for the purpose of very fast similarity searches. These index types support the above-described similarity operators, and additionally support - trigram-based index searches for <literal>LIKE</>, <literal>ILIKE</>, - <literal>~</> and <literal>~*</> queries. (These indexes do not + trigram-based index searches for <literal>LIKE</literal>, <literal>ILIKE</literal>, + <literal>~</literal> and <literal>~*</literal> queries. (These indexes do not support equality nor simple comparison operators, so you may need a regular B-tree index too.) </para> @@ -267,16 +267,16 @@ CREATE INDEX trgm_idx ON test_trgm USING GIN (t gin_trgm_ops); </para> <para> - At this point, you will have an index on the <structfield>t</> column that + At this point, you will have an index on the <structfield>t</structfield> column that you can use for similarity searching. A typical query is <programlisting> -SELECT t, similarity(t, '<replaceable>word</>') AS sml +SELECT t, similarity(t, '<replaceable>word</replaceable>') AS sml FROM test_trgm - WHERE t % '<replaceable>word</>' + WHERE t % '<replaceable>word</replaceable>' ORDER BY sml DESC, t; </programlisting> This will return all values in the text column that are sufficiently - similar to <replaceable>word</>, sorted from best match to worst. The + similar to <replaceable>word</replaceable>, sorted from best match to worst. The index will be used to make this a fast operation even over very large data sets. </para> @@ -284,7 +284,7 @@ SELECT t, similarity(t, '<replaceable>word</>') AS sml <para> A variant of the above query is <programlisting> -SELECT t, t <-> '<replaceable>word</>' AS dist +SELECT t, t <-> '<replaceable>word</replaceable>' AS dist FROM test_trgm ORDER BY dist LIMIT 10; </programlisting> @@ -294,16 +294,16 @@ SELECT t, t <-> '<replaceable>word</>' AS dist </para> <para> - Also you can use an index on the <structfield>t</> column for word + Also you can use an index on the <structfield>t</structfield> column for word similarity. For example: <programlisting> -SELECT t, word_similarity('<replaceable>word</>', t) AS sml +SELECT t, word_similarity('<replaceable>word</replaceable>', t) AS sml FROM test_trgm - WHERE '<replaceable>word</>' <% t + WHERE '<replaceable>word</replaceable>' <% t ORDER BY sml DESC, t; </programlisting> This will return all values in the text column that have a word - which sufficiently similar to <replaceable>word</>, sorted from best + which sufficiently similar to <replaceable>word</replaceable>, sorted from best match to worst. The index will be used to make this a fast operation even over very large data sets. </para> @@ -311,7 +311,7 @@ SELECT t, word_similarity('<replaceable>word</>', t) AS sml <para> A variant of the above query is <programlisting> -SELECT t, '<replaceable>word</>' <<-> t AS dist +SELECT t, '<replaceable>word</replaceable>' <<-> t AS dist FROM test_trgm ORDER BY dist LIMIT 10; </programlisting> @@ -321,8 +321,8 @@ SELECT t, '<replaceable>word</>' <<-> t AS dist <para> - Beginning in <productname>PostgreSQL</> 9.1, these index types also support - index searches for <literal>LIKE</> and <literal>ILIKE</>, for example + Beginning in <productname>PostgreSQL</productname> 9.1, these index types also support + index searches for <literal>LIKE</literal> and <literal>ILIKE</literal>, for example <programlisting> SELECT * FROM test_trgm WHERE t LIKE '%foo%bar'; </programlisting> @@ -333,9 +333,9 @@ SELECT * FROM test_trgm WHERE t LIKE '%foo%bar'; </para> <para> - Beginning in <productname>PostgreSQL</> 9.3, these index types also support + Beginning in <productname>PostgreSQL</productname> 9.3, these index types also support index searches for regular-expression matches - (<literal>~</> and <literal>~*</> operators), for example + (<literal>~</literal> and <literal>~*</literal> operators), for example <programlisting> SELECT * FROM test_trgm WHERE t ~ '(foo|bar)'; </programlisting> @@ -347,7 +347,7 @@ SELECT * FROM test_trgm WHERE t ~ '(foo|bar)'; </para> <para> - For both <literal>LIKE</> and regular-expression searches, keep in mind + For both <literal>LIKE</literal> and regular-expression searches, keep in mind that a pattern with no extractable trigrams will degenerate to a full-index scan. </para> @@ -377,9 +377,9 @@ CREATE TABLE words AS SELECT word FROM ts_stat('SELECT to_tsvector(''simple'', bodytext) FROM documents'); </programlisting> - where <structname>documents</> is a table that has a text field - <structfield>bodytext</> that we wish to search. The reason for using - the <literal>simple</> configuration with the <function>to_tsvector</> + where <structname>documents</structname> is a table that has a text field + <structfield>bodytext</structfield> that we wish to search. The reason for using + the <literal>simple</literal> configuration with the <function>to_tsvector</function> function, instead of using a language-specific configuration, is that we want a list of the original (unstemmed) words. </para> @@ -399,7 +399,7 @@ CREATE INDEX words_idx ON words USING GIN (word gin_trgm_ops); <note> <para> - Since the <structname>words</> table has been generated as a separate, + Since the <structname>words</structname> table has been generated as a separate, static table, it will need to be periodically regenerated so that it remains reasonably up-to-date with the document collection. Keeping it exactly current is usually unnecessary. diff --git a/doc/src/sgml/pgvisibility.sgml b/doc/src/sgml/pgvisibility.sgml index d466a3bce86..75336946a61 100644 --- a/doc/src/sgml/pgvisibility.sgml +++ b/doc/src/sgml/pgvisibility.sgml @@ -8,7 +8,7 @@ </indexterm> <para> - The <filename>pg_visibility</> module provides a means for examining the + The <filename>pg_visibility</filename> module provides a means for examining the visibility map (VM) and page-level visibility information of a table. It also provides functions to check the integrity of a visibility map and to force it to be rebuilt. @@ -28,13 +28,13 @@ These two bits will normally agree, but the page's all-visible bit can sometimes be set while the visibility map bit is clear after a crash recovery. The reported values can also disagree because of a change that - occurs after <literal>pg_visibility</> examines the visibility map and + occurs after <literal>pg_visibility</literal> examines the visibility map and before it examines the data page. Any event that causes data corruption can also cause these bits to disagree. </para> <para> - Functions that display information about <literal>PD_ALL_VISIBLE</> bits + Functions that display information about <literal>PD_ALL_VISIBLE</literal> bits are much more costly than those that only consult the visibility map, because they must read the relation's data blocks rather than only the (much smaller) visibility map. Functions that check the relation's @@ -61,7 +61,7 @@ <para> Returns the all-visible and all-frozen bits in the visibility map for the given block of the given relation, plus the - <literal>PD_ALL_VISIBLE</> bit of that block. + <literal>PD_ALL_VISIBLE</literal> bit of that block. </para> </listitem> </varlistentry> @@ -82,7 +82,7 @@ <listitem> <para> Returns the all-visible and all-frozen bits in the visibility map for - each block of the given relation, plus the <literal>PD_ALL_VISIBLE</> + each block of the given relation, plus the <literal>PD_ALL_VISIBLE</literal> bit of each block. </para> </listitem> @@ -130,7 +130,7 @@ <para> Truncates the visibility map for the given relation. This function is useful if you believe that the visibility map for the relation is - corrupt and wish to force rebuilding it. The first <command>VACUUM</> + corrupt and wish to force rebuilding it. The first <command>VACUUM</command> executed on the given relation after this function is executed will scan every page in the relation and rebuild the visibility map. (Until that is done, queries will treat the visibility map as containing all zeroes.) diff --git a/doc/src/sgml/planstats.sgml b/doc/src/sgml/planstats.sgml index 838fcda6d21..ee081308a92 100644 --- a/doc/src/sgml/planstats.sgml +++ b/doc/src/sgml/planstats.sgml @@ -28,13 +28,13 @@ </indexterm> <para> - The examples shown below use tables in the <productname>PostgreSQL</> + The examples shown below use tables in the <productname>PostgreSQL</productname> regression test database. The outputs shown are taken from version 8.3. The behavior of earlier (or later) versions might vary. - Note also that since <command>ANALYZE</> uses random sampling + Note also that since <command>ANALYZE</command> uses random sampling while producing statistics, the results will change slightly after - any new <command>ANALYZE</>. + any new <command>ANALYZE</command>. </para> <para> @@ -61,8 +61,8 @@ SELECT relpages, reltuples FROM pg_class WHERE relname = 'tenk1'; 358 | 10000 </programlisting> - These numbers are current as of the last <command>VACUUM</> or - <command>ANALYZE</> on the table. The planner then fetches the + These numbers are current as of the last <command>VACUUM</command> or + <command>ANALYZE</command> on the table. The planner then fetches the actual current number of pages in the table (this is a cheap operation, not requiring a table scan). If that is different from <structfield>relpages</structfield> then @@ -150,7 +150,7 @@ EXPLAIN SELECT * FROM tenk1 WHERE stringu1 = 'CRAAAA'; and looks up the selectivity function for <literal>=</literal>, which is <function>eqsel</function>. For equality estimation the histogram is not useful; instead the list of <firstterm>most - common values</> (<acronym>MCV</acronym>s) is used to determine the + common values</firstterm> (<acronym>MCV</acronym>s) is used to determine the selectivity. Let's have a look at the MCVs, with some additional columns that will be useful later: @@ -165,7 +165,7 @@ most_common_freqs | {0.00333333,0.003,0.003,0.003,0.003,0.003,0.003,0.003,0.003, </programlisting> - Since <literal>CRAAAA</> appears in the list of MCVs, the selectivity is + Since <literal>CRAAAA</literal> appears in the list of MCVs, the selectivity is merely the corresponding entry in the list of most common frequencies (<acronym>MCF</acronym>s): @@ -225,18 +225,18 @@ rows = 10000 * 0.0014559 </para> <para> - The previous example with <literal>unique1 < 1000</> was an + The previous example with <literal>unique1 < 1000</literal> was an oversimplification of what <function>scalarltsel</function> really does; now that we have seen an example of the use of MCVs, we can fill in some more detail. The example was correct as far as it went, because since - <structfield>unique1</> is a unique column it has no MCVs (obviously, no + <structfield>unique1</structfield> is a unique column it has no MCVs (obviously, no value is any more common than any other value). For a non-unique column, there will normally be both a histogram and an MCV list, and <emphasis>the histogram does not include the portion of the column - population represented by the MCVs</>. We do things this way because + population represented by the MCVs</emphasis>. We do things this way because it allows more precise estimation. In this situation <function>scalarltsel</function> directly applies the condition (e.g., - <quote>< 1000</>) to each value of the MCV list, and adds up the + <quote>< 1000</quote>) to each value of the MCV list, and adds up the frequencies of the MCVs for which the condition is true. This gives an exact estimate of the selectivity within the portion of the table that is MCVs. The histogram is then used in the same way as above @@ -253,7 +253,7 @@ EXPLAIN SELECT * FROM tenk1 WHERE stringu1 < 'IAAAAA'; Filter: (stringu1 < 'IAAAAA'::name) </programlisting> - We already saw the MCV information for <structfield>stringu1</>, + We already saw the MCV information for <structfield>stringu1</structfield>, and here is its histogram: <programlisting> @@ -266,7 +266,7 @@ WHERE tablename='tenk1' AND attname='stringu1'; </programlisting> Checking the MCV list, we find that the condition <literal>stringu1 < - 'IAAAAA'</> is satisfied by the first six entries and not the last four, + 'IAAAAA'</literal> is satisfied by the first six entries and not the last four, so the selectivity within the MCV part of the population is <programlisting> @@ -279,11 +279,11 @@ selectivity = sum(relevant mvfs) population represented by MCVs is 0.03033333, and therefore the fraction represented by the histogram is 0.96966667 (again, there are no nulls, else we'd have to exclude them here). We can see - that the value <literal>IAAAAA</> falls nearly at the end of the + that the value <literal>IAAAAA</literal> falls nearly at the end of the third histogram bucket. Using some rather cheesy assumptions about the frequency of different characters, the planner arrives at the estimate 0.298387 for the portion of the histogram population - that is less than <literal>IAAAAA</>. We then combine the estimates + that is less than <literal>IAAAAA</literal>. We then combine the estimates for the MCV and non-MCV populations: <programlisting> @@ -372,7 +372,7 @@ rows = 10000 * 0.005035 = 50 (rounding off) </programlisting> - The restriction for the join is <literal>t2.unique2 = t1.unique2</>. + The restriction for the join is <literal>t2.unique2 = t1.unique2</literal>. The operator is just our familiar <literal>=</literal>, however the selectivity function is obtained from the <structfield>oprjoin</structfield> column of @@ -424,12 +424,12 @@ rows = (outer_cardinality * inner_cardinality) * selectivity </para> <para> - Notice that we showed <literal>inner_cardinality</> as 10000, that is, - the unmodified size of <structname>tenk2</>. It might appear from - inspection of the <command>EXPLAIN</> output that the estimate of + Notice that we showed <literal>inner_cardinality</literal> as 10000, that is, + the unmodified size of <structname>tenk2</structname>. It might appear from + inspection of the <command>EXPLAIN</command> output that the estimate of join rows comes from 50 * 1, that is, the number of outer rows times the estimated number of rows obtained by each inner index scan on - <structname>tenk2</>. But this is not the case: the join relation size + <structname>tenk2</structname>. But this is not the case: the join relation size is estimated before any particular join plan has been considered. If everything is working well then the two ways of estimating the join size will produce about the same answer, but due to round-off error and @@ -438,7 +438,7 @@ rows = (outer_cardinality * inner_cardinality) * selectivity <para> For those interested in further details, estimation of the size of - a table (before any <literal>WHERE</> clauses) is done in + a table (before any <literal>WHERE</literal> clauses) is done in <filename>src/backend/optimizer/util/plancat.c</filename>. The generic logic for clause selectivities is in <filename>src/backend/optimizer/path/clausesel.c</filename>. The @@ -485,8 +485,8 @@ SELECT relpages, reltuples FROM pg_class WHERE relname = 't'; </para> <para> - The following example shows the result of estimating a <literal>WHERE</> - condition on the <structfield>a</> column: + The following example shows the result of estimating a <literal>WHERE</literal> + condition on the <structfield>a</structfield> column: <programlisting> EXPLAIN (ANALYZE, TIMING OFF) SELECT * FROM t WHERE a = 1; @@ -501,9 +501,9 @@ EXPLAIN (ANALYZE, TIMING OFF) SELECT * FROM t WHERE a = 1; of this clause to be 1%. By comparing this estimate and the actual number of rows, we see that the estimate is very accurate (in fact exact, as the table is very small). Changing the - <literal>WHERE</> condition to use the <structfield>b</> column, an + <literal>WHERE</literal> condition to use the <structfield>b</structfield> column, an identical plan is generated. But observe what happens if we apply the same - condition on both columns, combining them with <literal>AND</>: + condition on both columns, combining them with <literal>AND</literal>: <programlisting> EXPLAIN (ANALYZE, TIMING OFF) SELECT * FROM t WHERE a = 1 AND b = 1; @@ -524,7 +524,7 @@ EXPLAIN (ANALYZE, TIMING OFF) SELECT * FROM t WHERE a = 1 AND b = 1; <para> This problem can be fixed by creating a statistics object that - directs <command>ANALYZE</> to calculate functional-dependency + directs <command>ANALYZE</command> to calculate functional-dependency multivariate statistics on the two columns: <programlisting> diff --git a/doc/src/sgml/plhandler.sgml b/doc/src/sgml/plhandler.sgml index 2573e677434..95e7dc9fc0e 100644 --- a/doc/src/sgml/plhandler.sgml +++ b/doc/src/sgml/plhandler.sgml @@ -35,7 +35,7 @@ <para> The call handler is called in the same way as any other function: It receives a pointer to a - <structname>FunctionCallInfoData</structname> <type>struct</> containing + <structname>FunctionCallInfoData</structname> <type>struct</type> containing argument values and information about the called function, and it is expected to return a <type>Datum</type> result (and possibly set the <structfield>isnull</structfield> field of the @@ -54,7 +54,7 @@ <para> It's up to the call handler to fetch the entry of the function from the <classname>pg_proc</classname> system catalog and to analyze the argument - and return types of the called function. The <literal>AS</> clause from the + and return types of the called function. The <literal>AS</literal> clause from the <command>CREATE FUNCTION</command> command for the function will be found in the <literal>prosrc</literal> column of the <classname>pg_proc</classname> row. This is commonly source @@ -68,9 +68,9 @@ A call handler can avoid repeated lookups of information about the called function by using the <structfield>flinfo->fn_extra</structfield> field. This will - initially be <symbol>NULL</>, but can be set by the call handler to point at + initially be <symbol>NULL</symbol>, but can be set by the call handler to point at information about the called function. On subsequent calls, if - <structfield>flinfo->fn_extra</structfield> is already non-<symbol>NULL</> + <structfield>flinfo->fn_extra</structfield> is already non-<symbol>NULL</symbol> then it can be used and the information lookup step skipped. The call handler must make sure that <structfield>flinfo->fn_extra</structfield> is made to point at @@ -90,7 +90,7 @@ are passed in the usual way, but the <structname>FunctionCallInfoData</structname>'s <structfield>context</structfield> field points at a - <structname>TriggerData</structname> structure, rather than being <symbol>NULL</> + <structname>TriggerData</structname> structure, rather than being <symbol>NULL</symbol> as it is in a plain function call. A language handler should provide mechanisms for procedural-language functions to get at the trigger information. @@ -170,21 +170,21 @@ CREATE LANGUAGE plsample <para> If a validator is provided by a procedural language, it must be declared as a function taking a single parameter of type - <type>oid</>. The validator's result is ignored, so it is customarily - declared to return <type>void</>. The validator will be called at - the end of a <command>CREATE FUNCTION</> command that has created + <type>oid</type>. The validator's result is ignored, so it is customarily + declared to return <type>void</type>. The validator will be called at + the end of a <command>CREATE FUNCTION</command> command that has created or updated a function written in the procedural language. - The passed-in OID is the OID of the function's <classname>pg_proc</> + The passed-in OID is the OID of the function's <classname>pg_proc</classname> row. The validator must fetch this row in the usual way, and do whatever checking is appropriate. - First, call <function>CheckFunctionValidatorAccess()</> to diagnose + First, call <function>CheckFunctionValidatorAccess()</function> to diagnose explicit calls to the validator that the user could not achieve through - <command>CREATE FUNCTION</>. Typical checks then include verifying + <command>CREATE FUNCTION</command>. Typical checks then include verifying that the function's argument and result types are supported by the language, and that the function's body is syntactically correct in the language. If the validator finds the function to be okay, it should just return. If it finds an error, it should report that - via the normal <function>ereport()</> error reporting mechanism. + via the normal <function>ereport()</function> error reporting mechanism. Throwing an error will force a transaction rollback and thus prevent the incorrect function definition from being committed. </para> @@ -195,40 +195,40 @@ CREATE LANGUAGE plsample any expensive or context-sensitive checking should be skipped. If the language provides for code execution at compilation time, the validator must suppress checks that would induce such execution. In particular, - this parameter is turned off by <application>pg_dump</> so that it can + this parameter is turned off by <application>pg_dump</application> so that it can load procedural language functions without worrying about side effects or dependencies of the function bodies on other database objects. (Because of this requirement, the call handler should avoid assuming that the validator has fully checked the function. The point of having a validator is not to let the call handler omit checks, but to notify the user immediately if there are obvious errors in a - <command>CREATE FUNCTION</> command.) + <command>CREATE FUNCTION</command> command.) While the choice of exactly what to check is mostly left to the discretion of the validator function, note that the core - <command>CREATE FUNCTION</> code only executes <literal>SET</> clauses - attached to a function when <varname>check_function_bodies</> is on. + <command>CREATE FUNCTION</command> code only executes <literal>SET</literal> clauses + attached to a function when <varname>check_function_bodies</varname> is on. Therefore, checks whose results might be affected by GUC parameters - definitely should be skipped when <varname>check_function_bodies</> is + definitely should be skipped when <varname>check_function_bodies</varname> is off, to avoid false failures when reloading a dump. </para> <para> If an inline handler is provided by a procedural language, it must be declared as a function taking a single parameter of type - <type>internal</>. The inline handler's result is ignored, so it is - customarily declared to return <type>void</>. The inline handler - will be called when a <command>DO</> statement is executed specifying + <type>internal</type>. The inline handler's result is ignored, so it is + customarily declared to return <type>void</type>. The inline handler + will be called when a <command>DO</command> statement is executed specifying the procedural language. The parameter actually passed is a pointer - to an <structname>InlineCodeBlock</> struct, which contains information - about the <command>DO</> statement's parameters, in particular the + to an <structname>InlineCodeBlock</structname> struct, which contains information + about the <command>DO</command> statement's parameters, in particular the text of the anonymous code block to be executed. The inline handler should execute this code and return. </para> <para> It's recommended that you wrap all these function declarations, - as well as the <command>CREATE LANGUAGE</> command itself, into - an <firstterm>extension</> so that a simple <command>CREATE EXTENSION</> + as well as the <command>CREATE LANGUAGE</command> command itself, into + an <firstterm>extension</firstterm> so that a simple <command>CREATE EXTENSION</command> command is sufficient to install the language. See <xref linkend="extend-extensions"> for information about writing extensions. @@ -237,7 +237,7 @@ CREATE LANGUAGE plsample <para> The procedural languages included in the standard distribution are good references when trying to write your own language handler. - Look into the <filename>src/pl</> subdirectory of the source tree. + Look into the <filename>src/pl</filename> subdirectory of the source tree. The <xref linkend="sql-createlanguage"> reference page also has some useful details. </para> diff --git a/doc/src/sgml/plperl.sgml b/doc/src/sgml/plperl.sgml index 37a3557d612..dfffa4077f1 100644 --- a/doc/src/sgml/plperl.sgml +++ b/doc/src/sgml/plperl.sgml @@ -27,12 +27,12 @@ <para> To install PL/Perl in a particular database, use - <literal>CREATE EXTENSION plperl</>. + <literal>CREATE EXTENSION plperl</literal>. </para> <tip> <para> - If a language is installed into <literal>template1</>, all subsequently + If a language is installed into <literal>template1</literal>, all subsequently created databases will have the language installed automatically. </para> </tip> @@ -90,8 +90,8 @@ $$ LANGUAGE plperl; subroutines which you call via a coderef. For more information, see the entries for <literal>Variable "%s" will not stay shared</literal> and <literal>Variable "%s" is not available</literal> in the - <citerefentry><refentrytitle>perldiag</></citerefentry> man page, or - search the Internet for <quote>perl nested named subroutine</>. + <citerefentry><refentrytitle>perldiag</refentrytitle></citerefentry> man page, or + search the Internet for <quote>perl nested named subroutine</quote>. </para> </note> @@ -100,16 +100,16 @@ $$ LANGUAGE plperl; the function body to be written as a string constant. It is usually most convenient to use dollar quoting (see <xref linkend="sql-syntax-dollar-quoting">) for the string constant. - If you choose to use escape string syntax <literal>E''</>, - you must double any single quote marks (<literal>'</>) and backslashes - (<literal>\</>) used in the body of the function + If you choose to use escape string syntax <literal>E''</literal>, + you must double any single quote marks (<literal>'</literal>) and backslashes + (<literal>\</literal>) used in the body of the function (see <xref linkend="sql-syntax-strings">). </para> <para> Arguments and results are handled as in any other Perl subroutine: arguments are passed in <varname>@_</varname>, and a result value - is returned with <literal>return</> or as the last expression + is returned with <literal>return</literal> or as the last expression evaluated in the function. </para> @@ -134,12 +134,12 @@ $$ LANGUAGE plperl; </note> <para> - If an SQL null value<indexterm><primary>null value</><secondary - sortas="PL/Perl">in PL/Perl</></indexterm> is passed to a function, - the argument value will appear as <quote>undefined</> in Perl. The + If an SQL null value<indexterm><primary>null value</primary><secondary + sortas="PL/Perl">in PL/Perl</secondary></indexterm> is passed to a function, + the argument value will appear as <quote>undefined</quote> in Perl. The above function definition will not behave very nicely with null inputs (in fact, it will act as though they are zeroes). We could - add <literal>STRICT</> to the function definition to make + add <literal>STRICT</literal> to the function definition to make <productname>PostgreSQL</productname> do something more reasonable: if a null value is passed, the function will not be called at all, but will just return a null result automatically. Alternatively, @@ -174,14 +174,14 @@ $$ LANGUAGE plperl; other cases the argument will need to be converted into a form that is more usable in Perl. For example, the <function>decode_bytea</function> function can be used to convert an argument of - type <type>bytea</> into unescaped binary. + type <type>bytea</type> into unescaped binary. </para> <para> Similarly, values passed back to <productname>PostgreSQL</productname> must be in the external text representation format. For example, the <function>encode_bytea</function> function can be used to - escape binary data for a return value of type <type>bytea</>. + escape binary data for a return value of type <type>bytea</type>. </para> <para> @@ -330,10 +330,10 @@ SELECT * FROM perl_set(); </para> <para> - If you wish to use the <literal>strict</> pragma with your code you - have a few options. For temporary global use you can <command>SET</> + If you wish to use the <literal>strict</literal> pragma with your code you + have a few options. For temporary global use you can <command>SET</command> <literal>plperl.use_strict</literal> to true. - This will affect subsequent compilations of <application>PL/Perl</> + This will affect subsequent compilations of <application>PL/Perl</application> functions, but not functions already compiled in the current session. For permanent global use you can set <literal>plperl.use_strict</literal> to true in the <filename>postgresql.conf</filename> file. @@ -348,7 +348,7 @@ use strict; </para> <para> - The <literal>feature</> pragma is also available to <function>use</> if your Perl is version 5.10.0 or higher. + The <literal>feature</literal> pragma is also available to <function>use</function> if your Perl is version 5.10.0 or higher. </para> </sect1> @@ -380,7 +380,7 @@ use strict; <variablelist> <varlistentry> <term> - <literal><function>spi_exec_query</>(<replaceable>query</replaceable> [, <replaceable>max-rows</replaceable>])</literal> + <literal><function>spi_exec_query</function>(<replaceable>query</replaceable> [, <replaceable>max-rows</replaceable>])</literal> <indexterm> <primary>spi_exec_query</primary> <secondary>in PL/Perl</secondary> @@ -524,13 +524,13 @@ SELECT * from lotsa_md5(500); </para> <para> - Normally, <function>spi_fetchrow</> should be repeated until it + Normally, <function>spi_fetchrow</function> should be repeated until it returns <literal>undef</literal>, indicating that there are no more rows to read. The cursor returned by <literal>spi_query</literal> is automatically freed when - <function>spi_fetchrow</> returns <literal>undef</literal>. + <function>spi_fetchrow</function> returns <literal>undef</literal>. If you do not wish to read all the rows, instead call - <function>spi_cursor_close</> to free the cursor. + <function>spi_cursor_close</function> to free the cursor. Failure to do so will result in memory leaks. </para> @@ -675,13 +675,13 @@ SELECT release_hosts_query(); <listitem> <para> Emit a log or error message. Possible levels are - <literal>DEBUG</>, <literal>LOG</>, <literal>INFO</>, - <literal>NOTICE</>, <literal>WARNING</>, and <literal>ERROR</>. - <literal>ERROR</> + <literal>DEBUG</literal>, <literal>LOG</literal>, <literal>INFO</literal>, + <literal>NOTICE</literal>, <literal>WARNING</literal>, and <literal>ERROR</literal>. + <literal>ERROR</literal> raises an error condition; if this is not trapped by the surrounding Perl code, the error propagates out to the calling query, causing the current transaction or subtransaction to be aborted. This - is effectively the same as the Perl <literal>die</> command. + is effectively the same as the Perl <literal>die</literal> command. The other levels only generate messages of different priority levels. Whether messages of a particular priority are reported to the client, @@ -706,8 +706,8 @@ SELECT release_hosts_query(); <para> Return the given string suitably quoted to be used as a string literal in an SQL statement string. Embedded single-quotes and backslashes are properly doubled. - Note that <function>quote_literal</> returns undef on undef input; if the argument - might be undef, <function>quote_nullable</> is often more suitable. + Note that <function>quote_literal</function> returns undef on undef input; if the argument + might be undef, <function>quote_nullable</function> is often more suitable. </para> </listitem> </varlistentry> @@ -849,7 +849,7 @@ SELECT release_hosts_query(); Returns a true value if the content of the given string looks like a number, according to Perl, returns false otherwise. Returns undef if the argument is undef. Leading and trailing space is - ignored. <literal>Inf</> and <literal>Infinity</> are regarded as numbers. + ignored. <literal>Inf</literal> and <literal>Infinity</literal> are regarded as numbers. </para> </listitem> </varlistentry> @@ -865,8 +865,8 @@ SELECT release_hosts_query(); <listitem> <para> Returns a true value if the given argument may be treated as an - array reference, that is, if ref of the argument is <literal>ARRAY</> or - <literal>PostgreSQL::InServer::ARRAY</>. Returns false otherwise. + array reference, that is, if ref of the argument is <literal>ARRAY</literal> or + <literal>PostgreSQL::InServer::ARRAY</literal>. Returns false otherwise. </para> </listitem> </varlistentry> @@ -941,11 +941,11 @@ $$ LANGUAGE plperl; PL/Perl functions will share the same value of <varname>%_SHARED</varname> if and only if they are executed by the same SQL role. In an application wherein a single session executes code under multiple SQL roles (via - <literal>SECURITY DEFINER</> functions, use of <command>SET ROLE</>, etc) + <literal>SECURITY DEFINER</literal> functions, use of <command>SET ROLE</command>, etc) you may need to take explicit steps to ensure that PL/Perl functions can share data via <varname>%_SHARED</varname>. To do that, make sure that functions that should communicate are owned by the same user, and mark - them <literal>SECURITY DEFINER</>. You must of course take care that + them <literal>SECURITY DEFINER</literal>. You must of course take care that such functions can't be used to do anything unintended. </para> </sect1> @@ -959,8 +959,8 @@ $$ LANGUAGE plperl; </indexterm> <para> - Normally, PL/Perl is installed as a <quote>trusted</> programming - language named <literal>plperl</>. In this setup, certain Perl + Normally, PL/Perl is installed as a <quote>trusted</quote> programming + language named <literal>plperl</literal>. In this setup, certain Perl operations are disabled to preserve security. In general, the operations that are restricted are those that interact with the environment. This includes file handle operations, @@ -993,15 +993,15 @@ $$ LANGUAGE plperl; Sometimes it is desirable to write Perl functions that are not restricted. For example, one might want a Perl function that sends mail. To handle these cases, PL/Perl can also be installed as an - <quote>untrusted</> language (usually called - <application>PL/PerlU</application><indexterm><primary>PL/PerlU</></indexterm>). + <quote>untrusted</quote> language (usually called + <application>PL/PerlU</application><indexterm><primary>PL/PerlU</primary></indexterm>). In this case the full Perl language is available. When installing the language, the language name <literal>plperlu</literal> will select the untrusted PL/Perl variant. </para> <para> - The writer of a <application>PL/PerlU</> function must take care that the function + The writer of a <application>PL/PerlU</application> function must take care that the function cannot be used to do anything unwanted, since it will be able to do anything that could be done by a user logged in as the database administrator. Note that the database system allows only database @@ -1010,25 +1010,25 @@ $$ LANGUAGE plperl; <para> If the above function was created by a superuser using the language - <literal>plperlu</>, execution would succeed. + <literal>plperlu</literal>, execution would succeed. </para> <para> In the same way, anonymous code blocks written in Perl can use restricted operations if the language is specified as - <literal>plperlu</> rather than <literal>plperl</>, but the caller + <literal>plperlu</literal> rather than <literal>plperl</literal>, but the caller must be a superuser. </para> <note> <para> - While <application>PL/Perl</> functions run in a separate Perl - interpreter for each SQL role, all <application>PL/PerlU</> functions + While <application>PL/Perl</application> functions run in a separate Perl + interpreter for each SQL role, all <application>PL/PerlU</application> functions executed in a given session run in a single Perl interpreter (which is - not any of the ones used for <application>PL/Perl</> functions). - This allows <application>PL/PerlU</> functions to share data freely, - but no communication can occur between <application>PL/Perl</> and - <application>PL/PerlU</> functions. + not any of the ones used for <application>PL/Perl</application> functions). + This allows <application>PL/PerlU</application> functions to share data freely, + but no communication can occur between <application>PL/Perl</application> and + <application>PL/PerlU</application> functions. </para> </note> @@ -1036,14 +1036,14 @@ $$ LANGUAGE plperl; <para> Perl cannot support multiple interpreters within one process unless it was built with the appropriate flags, namely either - <literal>usemultiplicity</> or <literal>useithreads</>. - (<literal>usemultiplicity</> is preferred unless you actually need + <literal>usemultiplicity</literal> or <literal>useithreads</literal>. + (<literal>usemultiplicity</literal> is preferred unless you actually need to use threads. For more details, see the - <citerefentry><refentrytitle>perlembed</></citerefentry> man page.) - If <application>PL/Perl</> is used with a copy of Perl that was not built + <citerefentry><refentrytitle>perlembed</refentrytitle></citerefentry> man page.) + If <application>PL/Perl</application> is used with a copy of Perl that was not built this way, then it is only possible to have one Perl interpreter per session, and so any one session can only execute either - <application>PL/PerlU</> functions, or <application>PL/Perl</> functions + <application>PL/PerlU</application> functions, or <application>PL/Perl</application> functions that are all called by the same SQL role. </para> </note> @@ -1056,7 +1056,7 @@ $$ LANGUAGE plperl; <para> PL/Perl can be used to write trigger functions. In a trigger function, the hash reference <varname>$_TD</varname> contains information about the - current trigger event. <varname>$_TD</> is a global variable, + current trigger event. <varname>$_TD</varname> is a global variable, which gets a separate local value for each invocation of the trigger. The fields of the <varname>$_TD</varname> hash reference are: @@ -1092,8 +1092,8 @@ $$ LANGUAGE plperl; <term><literal>$_TD->{event}</literal></term> <listitem> <para> - Trigger event: <literal>INSERT</>, <literal>UPDATE</>, - <literal>DELETE</>, <literal>TRUNCATE</>, or <literal>UNKNOWN</> + Trigger event: <literal>INSERT</literal>, <literal>UPDATE</literal>, + <literal>DELETE</literal>, <literal>TRUNCATE</literal>, or <literal>UNKNOWN</literal> </para> </listitem> </varlistentry> @@ -1244,7 +1244,7 @@ CREATE TRIGGER test_valid_id_trig <para> PL/Perl can be used to write event trigger functions. In an event trigger function, the hash reference <varname>$_TD</varname> contains information - about the current trigger event. <varname>$_TD</> is a global variable, + about the current trigger event. <varname>$_TD</varname> is a global variable, which gets a separate local value for each invocation of the trigger. The fields of the <varname>$_TD</varname> hash reference are: @@ -1295,7 +1295,7 @@ CREATE EVENT TRIGGER perl_a_snitch <title>Configuration</title> <para> - This section lists configuration parameters that affect <application>PL/Perl</>. + This section lists configuration parameters that affect <application>PL/Perl</application>. </para> <variablelist> @@ -1304,14 +1304,14 @@ CREATE EVENT TRIGGER perl_a_snitch <term> <varname>plperl.on_init</varname> (<type>string</type>) <indexterm> - <primary><varname>plperl.on_init</> configuration parameter</primary> + <primary><varname>plperl.on_init</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> Specifies Perl code to be executed when a Perl interpreter is first - initialized, before it is specialized for use by <literal>plperl</> or - <literal>plperlu</>. + initialized, before it is specialized for use by <literal>plperl</literal> or + <literal>plperlu</literal>. The SPI functions are not available when this code is executed. If the code fails with an error it will abort the initialization of the interpreter and propagate out to the calling query, causing the @@ -1319,7 +1319,7 @@ CREATE EVENT TRIGGER perl_a_snitch </para> <para> The Perl code is limited to a single string. Longer code can be placed - into a module and loaded by the <literal>on_init</> string. + into a module and loaded by the <literal>on_init</literal> string. Examples: <programlisting> plperl.on_init = 'require "plperlinit.pl"' @@ -1327,8 +1327,8 @@ plperl.on_init = 'use lib "/my/app"; use MyApp::PgInit;' </programlisting> </para> <para> - Any modules loaded by <literal>plperl.on_init</>, either directly or - indirectly, will be available for use by <literal>plperl</>. This may + Any modules loaded by <literal>plperl.on_init</literal>, either directly or + indirectly, will be available for use by <literal>plperl</literal>. This may create a security risk. To see what modules have been loaded you can use: <programlisting> DO 'elog(WARNING, join ", ", sort keys %INC)' LANGUAGE plperl; @@ -1339,14 +1339,14 @@ DO 'elog(WARNING, join ", ", sort keys %INC)' LANGUAGE plperl; included in <xref linkend="guc-shared-preload-libraries">, in which case extra consideration should be given to the risk of destabilizing the postmaster. The principal reason for making use of this feature - is that Perl modules loaded by <literal>plperl.on_init</> need be + is that Perl modules loaded by <literal>plperl.on_init</literal> need be loaded only at postmaster start, and will be instantly available without loading overhead in individual database sessions. However, keep in mind that the overhead is avoided only for the first Perl interpreter used by a database session — either PL/PerlU, or PL/Perl for the first SQL role that calls a PL/Perl function. Any additional Perl interpreters created in a database session will have - to execute <literal>plperl.on_init</> afresh. Also, on Windows there + to execute <literal>plperl.on_init</literal> afresh. Also, on Windows there will be no savings whatsoever from preloading, since the Perl interpreter created in the postmaster process does not propagate to child processes. @@ -1361,27 +1361,27 @@ DO 'elog(WARNING, join ", ", sort keys %INC)' LANGUAGE plperl; <term> <varname>plperl.on_plperl_init</varname> (<type>string</type>) <indexterm> - <primary><varname>plperl.on_plperl_init</> configuration parameter</primary> + <primary><varname>plperl.on_plperl_init</varname> configuration parameter</primary> </indexterm> </term> <term> <varname>plperl.on_plperlu_init</varname> (<type>string</type>) <indexterm> - <primary><varname>plperl.on_plperlu_init</> configuration parameter</primary> + <primary><varname>plperl.on_plperlu_init</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> These parameters specify Perl code to be executed when a Perl - interpreter is specialized for <literal>plperl</> or - <literal>plperlu</> respectively. This will happen when a PL/Perl or + interpreter is specialized for <literal>plperl</literal> or + <literal>plperlu</literal> respectively. This will happen when a PL/Perl or PL/PerlU function is first executed in a database session, or when an additional interpreter has to be created because the other language is called or a PL/Perl function is called by a new SQL role. This - follows any initialization done by <literal>plperl.on_init</>. + follows any initialization done by <literal>plperl.on_init</literal>. The SPI functions are not available when this code is executed. - The Perl code in <literal>plperl.on_plperl_init</> is executed after - <quote>locking down</> the interpreter, and thus it can only perform + The Perl code in <literal>plperl.on_plperl_init</literal> is executed after + <quote>locking down</quote> the interpreter, and thus it can only perform trusted operations. </para> <para> @@ -1404,13 +1404,13 @@ DO 'elog(WARNING, join ", ", sort keys %INC)' LANGUAGE plperl; <term> <varname>plperl.use_strict</varname> (<type>boolean</type>) <indexterm> - <primary><varname>plperl.use_strict</> configuration parameter</primary> + <primary><varname>plperl.use_strict</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> When set true subsequent compilations of PL/Perl functions will have - the <literal>strict</> pragma enabled. This parameter does not affect + the <literal>strict</literal> pragma enabled. This parameter does not affect functions already compiled in the current session. </para> </listitem> @@ -1459,7 +1459,7 @@ DO 'elog(WARNING, join ", ", sort keys %INC)' LANGUAGE plperl; <listitem> <para> When a session ends normally, not due to a fatal error, any - <literal>END</> blocks that have been defined are executed. + <literal>END</literal> blocks that have been defined are executed. Currently no other actions are performed. Specifically, file handles are not automatically flushed and objects are not automatically destroyed. diff --git a/doc/src/sgml/plpgsql.sgml b/doc/src/sgml/plpgsql.sgml index d18b48c40cc..7323c2f67d3 100644 --- a/doc/src/sgml/plpgsql.sgml +++ b/doc/src/sgml/plpgsql.sgml @@ -13,7 +13,7 @@ <para> <application>PL/pgSQL</application> is a loadable procedural language for the <productname>PostgreSQL</productname> database - system. The design goals of <application>PL/pgSQL</> were to create + system. The design goals of <application>PL/pgSQL</application> were to create a loadable procedural language that <itemizedlist> @@ -59,7 +59,7 @@ </para> <para> - In <productname>PostgreSQL</> 9.0 and later, + In <productname>PostgreSQL</productname> 9.0 and later, <application>PL/pgSQL</application> is installed by default. However it is still a loadable module, so especially security-conscious administrators could choose to remove it. @@ -69,7 +69,7 @@ <title>Advantages of Using <application>PL/pgSQL</application></title> <para> - <acronym>SQL</acronym> is the language <productname>PostgreSQL</> + <acronym>SQL</acronym> is the language <productname>PostgreSQL</productname> and most other relational databases use as query language. It's portable and easy to learn. But every <acronym>SQL</acronym> statement must be executed individually by the database server. @@ -123,49 +123,49 @@ and they can return a result of any of these types. They can also accept or return any composite type (row type) specified by name. It is also possible to declare a <application>PL/pgSQL</application> - function as returning <type>record</>, which means that the result + function as returning <type>record</type>, which means that the result is a row type whose columns are determined by specification in the calling query, as discussed in <xref linkend="queries-tablefunctions">. </para> <para> - <application>PL/pgSQL</> functions can be declared to accept a variable - number of arguments by using the <literal>VARIADIC</> marker. This + <application>PL/pgSQL</application> functions can be declared to accept a variable + number of arguments by using the <literal>VARIADIC</literal> marker. This works exactly the same way as for SQL functions, as discussed in <xref linkend="xfunc-sql-variadic-functions">. </para> <para> - <application>PL/pgSQL</> functions can also be declared to accept + <application>PL/pgSQL</application> functions can also be declared to accept and return the polymorphic types <type>anyelement</type>, <type>anyarray</type>, <type>anynonarray</type>, - <type>anyenum</>, and <type>anyrange</type>. The actual + <type>anyenum</type>, and <type>anyrange</type>. The actual data types handled by a polymorphic function can vary from call to call, as discussed in <xref linkend="extend-types-polymorphic">. An example is shown in <xref linkend="plpgsql-declaration-parameters">. </para> <para> - <application>PL/pgSQL</> functions can also be declared to return - a <quote>set</> (or table) of any data type that can be returned as + <application>PL/pgSQL</application> functions can also be declared to return + a <quote>set</quote> (or table) of any data type that can be returned as a single instance. Such a function generates its output by executing - <command>RETURN NEXT</> for each desired element of the result - set, or by using <command>RETURN QUERY</> to output the result of + <command>RETURN NEXT</command> for each desired element of the result + set, or by using <command>RETURN QUERY</command> to output the result of evaluating a query. </para> <para> - Finally, a <application>PL/pgSQL</> function can be declared to return - <type>void</> if it has no useful return value. + Finally, a <application>PL/pgSQL</application> function can be declared to return + <type>void</type> if it has no useful return value. </para> <para> - <application>PL/pgSQL</> functions can also be declared with output + <application>PL/pgSQL</application> functions can also be declared with output parameters in place of an explicit specification of the return type. This does not add any fundamental capability to the language, but it is often convenient, especially for returning multiple values. - The <literal>RETURNS TABLE</> notation can also be used in place - of <literal>RETURNS SETOF</>. + The <literal>RETURNS TABLE</literal> notation can also be used in place + of <literal>RETURNS SETOF</literal>. </para> <para> @@ -185,11 +185,11 @@ Such a command would normally look like, say, <programlisting> CREATE FUNCTION somefunc(integer, text) RETURNS integer -AS '<replaceable>function body text</>' +AS '<replaceable>function body text</replaceable>' LANGUAGE plpgsql; </programlisting> The function body is simply a string literal so far as <command>CREATE - FUNCTION</> is concerned. It is often helpful to use dollar quoting + FUNCTION</command> is concerned. It is often helpful to use dollar quoting (see <xref linkend="sql-syntax-dollar-quoting">) to write the function body, rather than the normal single quote syntax. Without dollar quoting, any single quotes or backslashes in the function body must be escaped by @@ -200,7 +200,7 @@ LANGUAGE plpgsql; <para> <application>PL/pgSQL</application> is a block-structured language. The complete text of a function body must be a - <firstterm>block</>. A block is defined as: + <firstterm>block</firstterm>. A block is defined as: <synopsis> <optional> <<<replaceable>label</replaceable>>> </optional> @@ -223,16 +223,16 @@ END <optional> <replaceable>label</replaceable> </optional>; <tip> <para> A common mistake is to write a semicolon immediately after - <literal>BEGIN</>. This is incorrect and will result in a syntax error. + <literal>BEGIN</literal>. This is incorrect and will result in a syntax error. </para> </tip> <para> A <replaceable>label</replaceable> is only needed if you want to identify the block for use - in an <literal>EXIT</> statement, or to qualify the names of the + in an <literal>EXIT</literal> statement, or to qualify the names of the variables declared in the block. If a label is given after - <literal>END</>, it must match the label at the block's beginning. + <literal>END</literal>, it must match the label at the block's beginning. </para> <para> @@ -242,7 +242,7 @@ END <optional> <replaceable>label</replaceable> </optional>; </para> <para> - Comments work the same way in <application>PL/pgSQL</> code as in + Comments work the same way in <application>PL/pgSQL</application> code as in ordinary SQL. A double dash (<literal>--</literal>) starts a comment that extends to the end of the line. A <literal>/*</literal> starts a block comment that extends to the matching occurrence of @@ -251,7 +251,7 @@ END <optional> <replaceable>label</replaceable> </optional>; <para> Any statement in the statement section of a block - can be a <firstterm>subblock</>. Subblocks can be used for + can be a <firstterm>subblock</firstterm>. Subblocks can be used for logical grouping or to localize variables to a small group of statements. Variables declared in a subblock mask any similarly-named variables of outer blocks for the duration @@ -285,8 +285,8 @@ $$ LANGUAGE plpgsql; <note> <para> - There is actually a hidden <quote>outer block</> surrounding the body - of any <application>PL/pgSQL</> function. This block provides the + There is actually a hidden <quote>outer block</quote> surrounding the body + of any <application>PL/pgSQL</application> function. This block provides the declarations of the function's parameters (if any), as well as some special variables such as <literal>FOUND</literal> (see <xref linkend="plpgsql-statements-diagnostics">). The outer block is @@ -297,15 +297,15 @@ $$ LANGUAGE plpgsql; <para> It is important not to confuse the use of - <command>BEGIN</>/<command>END</> for grouping statements in - <application>PL/pgSQL</> with the similarly-named SQL commands + <command>BEGIN</command>/<command>END</command> for grouping statements in + <application>PL/pgSQL</application> with the similarly-named SQL commands for transaction - control. <application>PL/pgSQL</>'s <command>BEGIN</>/<command>END</> + control. <application>PL/pgSQL</application>'s <command>BEGIN</command>/<command>END</command> are only for grouping; they do not start or end a transaction. Functions and trigger procedures are always executed within a transaction established by an outer query — they cannot start or commit that transaction, since there would be no context for them to execute in. - However, a block containing an <literal>EXCEPTION</> clause effectively + However, a block containing an <literal>EXCEPTION</literal> clause effectively forms a subtransaction that can be rolled back without affecting the outer transaction. For more about that see <xref linkend="plpgsql-error-trapping">. @@ -318,15 +318,15 @@ $$ LANGUAGE plpgsql; <para> All variables used in a block must be declared in the declarations section of the block. - (The only exceptions are that the loop variable of a <literal>FOR</> loop + (The only exceptions are that the loop variable of a <literal>FOR</literal> loop iterating over a range of integer values is automatically declared as an - integer variable, and likewise the loop variable of a <literal>FOR</> loop + integer variable, and likewise the loop variable of a <literal>FOR</literal> loop iterating over a cursor's result is automatically declared as a record variable.) </para> <para> - <application>PL/pgSQL</> variables can have any SQL data type, such as + <application>PL/pgSQL</application> variables can have any SQL data type, such as <type>integer</type>, <type>varchar</type>, and <type>char</type>. </para> @@ -348,21 +348,21 @@ arow RECORD; <synopsis> <replaceable>name</replaceable> <optional> CONSTANT </optional> <replaceable>type</replaceable> <optional> COLLATE <replaceable>collation_name</replaceable> </optional> <optional> NOT NULL </optional> <optional> { DEFAULT | := | = } <replaceable>expression</replaceable> </optional>; </synopsis> - The <literal>DEFAULT</> clause, if given, specifies the initial value assigned - to the variable when the block is entered. If the <literal>DEFAULT</> clause + The <literal>DEFAULT</literal> clause, if given, specifies the initial value assigned + to the variable when the block is entered. If the <literal>DEFAULT</literal> clause is not given then the variable is initialized to the <acronym>SQL</acronym> null value. - The <literal>CONSTANT</> option prevents the variable from being + The <literal>CONSTANT</literal> option prevents the variable from being assigned to after initialization, so that its value will remain constant for the duration of the block. - The <literal>COLLATE</> option specifies a collation to use for the + The <literal>COLLATE</literal> option specifies a collation to use for the variable (see <xref linkend="plpgsql-declaration-collation">). - If <literal>NOT NULL</> + If <literal>NOT NULL</literal> is specified, an assignment of a null value results in a run-time - error. All variables declared as <literal>NOT NULL</> + error. All variables declared as <literal>NOT NULL</literal> must have a nonnull default value specified. - Equal (<literal>=</>) can be used instead of PL/SQL-compliant - <literal>:=</>. + Equal (<literal>=</literal>) can be used instead of PL/SQL-compliant + <literal>:=</literal>. </para> <para> @@ -428,9 +428,9 @@ $$ LANGUAGE plpgsql; <note> <para> These two examples are not perfectly equivalent. In the first case, - <literal>subtotal</> could be referenced as - <literal>sales_tax.subtotal</>, but in the second case it could not. - (Had we attached a label to the inner block, <literal>subtotal</> could + <literal>subtotal</literal> could be referenced as + <literal>sales_tax.subtotal</literal>, but in the second case it could not. + (Had we attached a label to the inner block, <literal>subtotal</literal> could be qualified with that label, instead.) </para> </note> @@ -474,7 +474,7 @@ END; $$ LANGUAGE plpgsql; </programlisting> - Notice that we omitted <literal>RETURNS real</> — we could have + Notice that we omitted <literal>RETURNS real</literal> — we could have included it, but it would be redundant. </para> @@ -493,13 +493,13 @@ $$ LANGUAGE plpgsql; As discussed in <xref linkend="xfunc-output-parameters">, this effectively creates an anonymous record type for the function's - results. If a <literal>RETURNS</> clause is given, it must say - <literal>RETURNS record</>. + results. If a <literal>RETURNS</literal> clause is given, it must say + <literal>RETURNS record</literal>. </para> <para> Another way to declare a <application>PL/pgSQL</application> function - is with <literal>RETURNS TABLE</>, for example: + is with <literal>RETURNS TABLE</literal>, for example: <programlisting> CREATE FUNCTION extended_sales(p_itemno int) @@ -511,9 +511,9 @@ END; $$ LANGUAGE plpgsql; </programlisting> - This is exactly equivalent to declaring one or more <literal>OUT</> + This is exactly equivalent to declaring one or more <literal>OUT</literal> parameters and specifying <literal>RETURNS SETOF - <replaceable>sometype</></literal>. + <replaceable>sometype</replaceable></literal>. </para> <para> @@ -530,7 +530,7 @@ $$ LANGUAGE plpgsql; the function, so it can be used to hold the return value if desired, though that is not required. <literal>$0</literal> can also be given an alias. For example, this function works on any data type - that has a <literal>+</> operator: + that has a <literal>+</literal> operator: <programlisting> CREATE FUNCTION add_three_values(v1 anyelement, v2 anyelement, v3 anyelement) @@ -564,14 +564,14 @@ $$ LANGUAGE plpgsql; </sect2> <sect2 id="plpgsql-declaration-alias"> - <title><literal>ALIAS</></title> + <title><literal>ALIAS</literal></title> <synopsis> -<replaceable>newname</> ALIAS FOR <replaceable>oldname</>; +<replaceable>newname</replaceable> ALIAS FOR <replaceable>oldname</replaceable>; </synopsis> <para> - The <literal>ALIAS</> syntax is more general than is suggested in the + The <literal>ALIAS</literal> syntax is more general than is suggested in the previous section: you can declare an alias for any variable, not just function parameters. The main practical use for this is to assign a different name for variables with predetermined names, such as @@ -589,7 +589,7 @@ DECLARE </para> <para> - Since <literal>ALIAS</> creates two different ways to name the same + Since <literal>ALIAS</literal> creates two different ways to name the same object, unrestricted use can be confusing. It's best to use it only for the purpose of overriding predetermined names. </para> @@ -608,7 +608,7 @@ DECLARE database values. For example, let's say you have a column named <literal>user_id</literal> in your <literal>users</literal> table. To declare a variable with the same data type as - <literal>users.user_id</> you write: + <literal>users.user_id</literal> you write: <programlisting> user_id users.user_id%TYPE; </programlisting> @@ -618,7 +618,7 @@ user_id users.user_id%TYPE; By using <literal>%TYPE</literal> you don't need to know the data type of the structure you are referencing, and most importantly, if the data type of the referenced item changes in the future (for - instance: you change the type of <literal>user_id</> + instance: you change the type of <literal>user_id</literal> from <type>integer</type> to <type>real</type>), you might not need to change your function definition. </para> @@ -642,9 +642,9 @@ user_id users.user_id%TYPE; </synopsis> <para> - A variable of a composite type is called a <firstterm>row</> - variable (or <firstterm>row-type</> variable). Such a variable - can hold a whole row of a <command>SELECT</> or <command>FOR</> + A variable of a composite type is called a <firstterm>row</firstterm> + variable (or <firstterm>row-type</firstterm> variable). Such a variable + can hold a whole row of a <command>SELECT</command> or <command>FOR</command> query result, so long as that query's column set matches the declared type of the variable. The individual fields of the row value @@ -658,7 +658,7 @@ user_id users.user_id%TYPE; <replaceable>table_name</replaceable><literal>%ROWTYPE</literal> notation; or it can be declared by giving a composite type's name. (Since every table has an associated composite type of the same name, - it actually does not matter in <productname>PostgreSQL</> whether you + it actually does not matter in <productname>PostgreSQL</productname> whether you write <literal>%ROWTYPE</literal> or not. But the form with <literal>%ROWTYPE</literal> is more portable.) </para> @@ -666,7 +666,7 @@ user_id users.user_id%TYPE; <para> Parameters to a function can be composite types (complete table rows). In that case, the - corresponding identifier <literal>$<replaceable>n</replaceable></> will be a row variable, and fields can + corresponding identifier <literal>$<replaceable>n</replaceable></literal> will be a row variable, and fields can be selected from it, for example <literal>$1.user_id</literal>. </para> @@ -675,12 +675,12 @@ user_id users.user_id%TYPE; row-type variable, not the OID or other system columns (because the row could be from a view). The fields of the row type inherit the table's field size or precision for data types such as - <type>char(<replaceable>n</>)</type>. + <type>char(<replaceable>n</replaceable>)</type>. </para> <para> - Here is an example of using composite types. <structname>table1</> - and <structname>table2</> are existing tables having at least the + Here is an example of using composite types. <structname>table1</structname> + and <structname>table2</structname> are existing tables having at least the mentioned fields: <programlisting> @@ -708,7 +708,7 @@ SELECT merge_fields(t.*) FROM table1 t WHERE ... ; <para> Record variables are similar to row-type variables, but they have no predefined structure. They take on the actual row structure of the - row they are assigned during a <command>SELECT</> or <command>FOR</> command. The substructure + row they are assigned during a <command>SELECT</command> or <command>FOR</command> command. The substructure of a record variable can change each time it is assigned to. A consequence of this is that until a record variable is first assigned to, it has no substructure, and any attempt to access a @@ -716,13 +716,13 @@ SELECT merge_fields(t.*) FROM table1 t WHERE ... ; </para> <para> - Note that <literal>RECORD</> is not a true data type, only a placeholder. + Note that <literal>RECORD</literal> is not a true data type, only a placeholder. One should also realize that when a <application>PL/pgSQL</application> - function is declared to return type <type>record</>, this is not quite the + function is declared to return type <type>record</type>, this is not quite the same concept as a record variable, even though such a function might use a record variable to hold its result. In both cases the actual row structure is unknown when the function is written, but for a function - returning <type>record</> the actual structure is determined when the + returning <type>record</type> the actual structure is determined when the calling query is parsed, whereas a record variable can change its row structure on-the-fly. </para> @@ -732,8 +732,8 @@ SELECT merge_fields(t.*) FROM table1 t WHERE ... ; <title>Collation of <application>PL/pgSQL</application> Variables</title> <indexterm> - <primary>collation</> - <secondary>in PL/pgSQL</> + <primary>collation</primary> + <secondary>in PL/pgSQL</secondary> </indexterm> <para> @@ -758,9 +758,9 @@ SELECT less_than(text_field_1, text_field_2) FROM table1; SELECT less_than(text_field_1, text_field_2 COLLATE "C") FROM table1; </programlisting> - The first use of <function>less_than</> will use the common collation - of <structfield>text_field_1</> and <structfield>text_field_2</> for - the comparison, while the second use will use <literal>C</> collation. + The first use of <function>less_than</function> will use the common collation + of <structfield>text_field_1</structfield> and <structfield>text_field_2</structfield> for + the comparison, while the second use will use <literal>C</literal> collation. </para> <para> @@ -790,7 +790,7 @@ $$ LANGUAGE plpgsql; <para> A local variable of a collatable data type can have a different collation - associated with it by including the <literal>COLLATE</> option in its + associated with it by including the <literal>COLLATE</literal> option in its declaration, for example <programlisting> @@ -803,7 +803,7 @@ DECLARE </para> <para> - Also, of course explicit <literal>COLLATE</> clauses can be written inside + Also, of course explicit <literal>COLLATE</literal> clauses can be written inside a function if it is desired to force a particular collation to be used in a particular operation. For example, @@ -838,7 +838,7 @@ IF <replaceable>expression</replaceable> THEN ... <synopsis> SELECT <replaceable>expression</replaceable> </synopsis> - to the main SQL engine. While forming the <command>SELECT</> command, + to the main SQL engine. While forming the <command>SELECT</command> command, any occurrences of <application>PL/pgSQL</application> variable names are replaced by parameters, as discussed in detail in <xref linkend="plpgsql-var-subst">. @@ -846,17 +846,17 @@ SELECT <replaceable>expression</replaceable> be prepared just once and then reused for subsequent evaluations with different values of the variables. Thus, what really happens on first use of an expression is essentially a - <command>PREPARE</> command. For example, if we have declared - two integer variables <literal>x</> and <literal>y</>, and we write + <command>PREPARE</command> command. For example, if we have declared + two integer variables <literal>x</literal> and <literal>y</literal>, and we write <programlisting> IF x < y THEN ... </programlisting> what happens behind the scenes is equivalent to <programlisting> -PREPARE <replaceable>statement_name</>(integer, integer) AS SELECT $1 < $2; +PREPARE <replaceable>statement_name</replaceable>(integer, integer) AS SELECT $1 < $2; </programlisting> - and then this prepared statement is <command>EXECUTE</>d for each - execution of the <command>IF</> statement, with the current values + and then this prepared statement is <command>EXECUTE</command>d for each + execution of the <command>IF</command> statement, with the current values of the <application>PL/pgSQL</application> variables supplied as parameter values. Normally these details are not important to a <application>PL/pgSQL</application> user, but @@ -888,20 +888,20 @@ PREPARE <replaceable>statement_name</>(integer, integer) AS SELECT $1 < $2; <replaceable>variable</replaceable> { := | = } <replaceable>expression</replaceable>; </synopsis> As explained previously, the expression in such a statement is evaluated - by means of an SQL <command>SELECT</> command sent to the main + by means of an SQL <command>SELECT</command> command sent to the main database engine. The expression must yield a single value (possibly a row value, if the variable is a row or record variable). The target variable can be a simple variable (optionally qualified with a block name), a field of a row or record variable, or an element of an array - that is a simple variable or field. Equal (<literal>=</>) can be - used instead of PL/SQL-compliant <literal>:=</>. + that is a simple variable or field. Equal (<literal>=</literal>) can be + used instead of PL/SQL-compliant <literal>:=</literal>. </para> <para> If the expression's result data type doesn't match the variable's data type, the value will be coerced as though by an assignment cast (see <xref linkend="typeconv-query">). If no assignment cast is known - for the pair of data types involved, the <application>PL/pgSQL</> + for the pair of data types involved, the <application>PL/pgSQL</application> interpreter will attempt to convert the result value textually, that is by applying the result type's output function followed by the variable type's input function. Note that this could result in run-time errors @@ -923,7 +923,7 @@ my_record.user_id := 20; <para> For any SQL command that does not return rows, for example - <command>INSERT</> without a <literal>RETURNING</> clause, you can + <command>INSERT</command> without a <literal>RETURNING</literal> clause, you can execute the command within a <application>PL/pgSQL</application> function just by writing the command. </para> @@ -944,7 +944,7 @@ my_record.user_id := 20; </para> <para> - Sometimes it is useful to evaluate an expression or <command>SELECT</> + Sometimes it is useful to evaluate an expression or <command>SELECT</command> query but discard the result, for example when calling a function that has side-effects but no useful result value. To do this in <application>PL/pgSQL</application>, use the @@ -956,9 +956,9 @@ PERFORM <replaceable>query</replaceable>; This executes <replaceable>query</replaceable> and discards the result. Write the <replaceable>query</replaceable> the same - way you would write an SQL <command>SELECT</> command, but replace the - initial keyword <command>SELECT</> with <command>PERFORM</command>. - For <command>WITH</> queries, use <command>PERFORM</> and then + way you would write an SQL <command>SELECT</command> command, but replace the + initial keyword <command>SELECT</command> with <command>PERFORM</command>. + For <command>WITH</command> queries, use <command>PERFORM</command> and then place the query in parentheses. (In this case, the query can only return one row.) <application>PL/pgSQL</application> variables will be @@ -976,7 +976,7 @@ PERFORM <replaceable>query</replaceable>; present the only accepted way to do it is <command>PERFORM</command>. A SQL command that can return rows, such as <command>SELECT</command>, will be rejected as an error - unless it has an <literal>INTO</> clause as discussed in the + unless it has an <literal>INTO</literal> clause as discussed in the next section. </para> </note> @@ -1006,7 +1006,7 @@ PERFORM create_mv('cs_session_page_requests_mv', my_query); The result of a SQL command yielding a single row (possibly of multiple columns) can be assigned to a record variable, row-type variable, or list of scalar variables. This is done by writing the base SQL command and - adding an <literal>INTO</> clause. For example, + adding an <literal>INTO</literal> clause. For example, <synopsis> SELECT <replaceable>select_expressions</replaceable> INTO <optional>STRICT</optional> <replaceable>target</replaceable> FROM ...; @@ -1021,21 +1021,21 @@ DELETE ... RETURNING <replaceable>expressions</replaceable> INTO <optional>STRIC <application>PL/pgSQL</application> variables will be substituted into the rest of the query, and the plan is cached, just as described above for commands that do not return rows. - This works for <command>SELECT</>, - <command>INSERT</>/<command>UPDATE</>/<command>DELETE</> with - <literal>RETURNING</>, and utility commands that return row-set - results (such as <command>EXPLAIN</>). - Except for the <literal>INTO</> clause, the SQL command is the same + This works for <command>SELECT</command>, + <command>INSERT</command>/<command>UPDATE</command>/<command>DELETE</command> with + <literal>RETURNING</literal>, and utility commands that return row-set + results (such as <command>EXPLAIN</command>). + Except for the <literal>INTO</literal> clause, the SQL command is the same as it would be written outside <application>PL/pgSQL</application>. </para> <tip> <para> - Note that this interpretation of <command>SELECT</> with <literal>INTO</> - is quite different from <productname>PostgreSQL</>'s regular - <command>SELECT INTO</command> command, wherein the <literal>INTO</> + Note that this interpretation of <command>SELECT</command> with <literal>INTO</literal> + is quite different from <productname>PostgreSQL</productname>'s regular + <command>SELECT INTO</command> command, wherein the <literal>INTO</literal> target is a newly created table. If you want to create a table from a - <command>SELECT</> result inside a + <command>SELECT</command> result inside a <application>PL/pgSQL</application> function, use the syntax <command>CREATE TABLE ... AS SELECT</command>. </para> @@ -1050,21 +1050,21 @@ DELETE ... RETURNING <replaceable>expressions</replaceable> INTO <optional>STRIC </para> <para> - The <literal>INTO</> clause can appear almost anywhere in the SQL + The <literal>INTO</literal> clause can appear almost anywhere in the SQL command. Customarily it is written either just before or just after the list of <replaceable>select_expressions</replaceable> in a - <command>SELECT</> command, or at the end of the command for other + <command>SELECT</command> command, or at the end of the command for other command types. It is recommended that you follow this convention in case the <application>PL/pgSQL</application> parser becomes stricter in future versions. </para> <para> - If <literal>STRICT</literal> is not specified in the <literal>INTO</> + If <literal>STRICT</literal> is not specified in the <literal>INTO</literal> clause, then <replaceable>target</replaceable> will be set to the first row returned by the query, or to nulls if the query returned no rows. - (Note that <quote>the first row</> is not - well-defined unless you've used <literal>ORDER BY</>.) Any result rows + (Note that <quote>the first row</quote> is not + well-defined unless you've used <literal>ORDER BY</literal>.) Any result rows after the first row are discarded. You can check the special <literal>FOUND</literal> variable (see <xref linkend="plpgsql-statements-diagnostics">) to @@ -1079,7 +1079,7 @@ END IF; If the <literal>STRICT</literal> option is specified, the query must return exactly one row or a run-time error will be reported, either - <literal>NO_DATA_FOUND</> (no rows) or <literal>TOO_MANY_ROWS</> + <literal>NO_DATA_FOUND</literal> (no rows) or <literal>TOO_MANY_ROWS</literal> (more than one row). You can use an exception block if you wish to catch the error, for example: @@ -1093,28 +1093,28 @@ BEGIN RAISE EXCEPTION 'employee % not unique', myname; END; </programlisting> - Successful execution of a command with <literal>STRICT</> + Successful execution of a command with <literal>STRICT</literal> always sets <literal>FOUND</literal> to true. </para> <para> - For <command>INSERT</>/<command>UPDATE</>/<command>DELETE</> with - <literal>RETURNING</>, <application>PL/pgSQL</application> reports + For <command>INSERT</command>/<command>UPDATE</command>/<command>DELETE</command> with + <literal>RETURNING</literal>, <application>PL/pgSQL</application> reports an error for more than one returned row, even when <literal>STRICT</literal> is not specified. This is because there - is no option such as <literal>ORDER BY</> with which to determine + is no option such as <literal>ORDER BY</literal> with which to determine which affected row should be returned. </para> <para> - If <literal>print_strict_params</> is enabled for the function, + If <literal>print_strict_params</literal> is enabled for the function, then when an error is thrown because the requirements - of <literal>STRICT</> are not met, the <literal>DETAIL</> part of + of <literal>STRICT</literal> are not met, the <literal>DETAIL</literal> part of the error message will include information about the parameters passed to the query. - You can change the <literal>print_strict_params</> + You can change the <literal>print_strict_params</literal> setting for all functions by setting - <varname>plpgsql.print_strict_params</>, though only subsequent + <varname>plpgsql.print_strict_params</varname>, though only subsequent function compilations will be affected. You can also enable it on a per-function basis by using a compiler option, for example: <programlisting> @@ -1140,7 +1140,7 @@ CONTEXT: PL/pgSQL function get_userid(text) line 6 at SQL statement <note> <para> - The <literal>STRICT</> option matches the behavior of + The <literal>STRICT</literal> option matches the behavior of Oracle PL/SQL's <command>SELECT INTO</command> and related statements. </para> </note> @@ -1174,12 +1174,12 @@ EXECUTE <replaceable class="command">command-string</replaceable> <optional> INT command to be executed. The optional <replaceable>target</replaceable> is a record variable, a row variable, or a comma-separated list of simple variables and record/row fields, into which the results of - the command will be stored. The optional <literal>USING</> expressions + the command will be stored. The optional <literal>USING</literal> expressions supply values to be inserted into the command. </para> <para> - No substitution of <application>PL/pgSQL</> variables is done on the + No substitution of <application>PL/pgSQL</application> variables is done on the computed command string. Any required variable values must be inserted in the command string as it is constructed; or you can use parameters as described below. @@ -1207,14 +1207,14 @@ EXECUTE <replaceable class="command">command-string</replaceable> <optional> INT </para> <para> - If the <literal>STRICT</> option is given, an error is reported + If the <literal>STRICT</literal> option is given, an error is reported unless the query produces exactly one row. </para> <para> The command string can use parameter values, which are referenced - in the command as <literal>$1</>, <literal>$2</>, etc. - These symbols refer to values supplied in the <literal>USING</> + in the command as <literal>$1</literal>, <literal>$2</literal>, etc. + These symbols refer to values supplied in the <literal>USING</literal> clause. This method is often preferable to inserting data values into the command string as text: it avoids run-time overhead of converting the values to text and back, and it is much less prone @@ -1240,7 +1240,7 @@ EXECUTE 'SELECT count(*) FROM ' INTO c USING checked_user, checked_date; </programlisting> - A cleaner approach is to use <function>format()</>'s <literal>%I</> + A cleaner approach is to use <function>format()</function>'s <literal>%I</literal> specification for table or column names (strings separated by a newline are concatenated): <programlisting> @@ -1250,32 +1250,32 @@ EXECUTE format('SELECT count(*) FROM %I ' USING checked_user, checked_date; </programlisting> Another restriction on parameter symbols is that they only work in - <command>SELECT</>, <command>INSERT</>, <command>UPDATE</>, and - <command>DELETE</> commands. In other statement + <command>SELECT</command>, <command>INSERT</command>, <command>UPDATE</command>, and + <command>DELETE</command> commands. In other statement types (generically called utility statements), you must insert values textually even if they are just data values. </para> <para> - An <command>EXECUTE</> with a simple constant command string and some - <literal>USING</> parameters, as in the first example above, is + An <command>EXECUTE</command> with a simple constant command string and some + <literal>USING</literal> parameters, as in the first example above, is functionally equivalent to just writing the command directly in <application>PL/pgSQL</application> and allowing replacement of <application>PL/pgSQL</application> variables to happen automatically. - The important difference is that <command>EXECUTE</> will re-plan + The important difference is that <command>EXECUTE</command> will re-plan the command on each execution, generating a plan that is specific to the current parameter values; whereas <application>PL/pgSQL</application> may otherwise create a generic plan and cache it for re-use. In situations where the best plan depends strongly on the parameter values, it can be helpful to use - <command>EXECUTE</> to positively ensure that a generic plan is not + <command>EXECUTE</command> to positively ensure that a generic plan is not selected. </para> <para> <command>SELECT INTO</command> is not currently supported within - <command>EXECUTE</command>; instead, execute a plain <command>SELECT</> - command and specify <literal>INTO</> as part of the <command>EXECUTE</> + <command>EXECUTE</command>; instead, execute a plain <command>SELECT</command> + command and specify <literal>INTO</literal> as part of the <command>EXECUTE</command> itself. </para> @@ -1287,7 +1287,7 @@ EXECUTE format('SELECT count(*) FROM %I ' statement supported by the <productname>PostgreSQL</productname> server. The server's <command>EXECUTE</command> statement cannot be used directly within - <application>PL/pgSQL</> functions (and is not needed). + <application>PL/pgSQL</application> functions (and is not needed). </para> </note> @@ -1326,7 +1326,7 @@ EXECUTE format('SELECT count(*) FROM %I ' <para> Dynamic values require careful handling since they might contain quote characters. - An example using <function>format()</> (this assumes that you are + An example using <function>format()</function> (this assumes that you are dollar quoting the function body so quote marks need not be doubled): <programlisting> EXECUTE format('UPDATE tbl SET %I = $1 ' @@ -1351,7 +1351,7 @@ EXECUTE 'UPDATE tbl SET ' or table identifiers should be passed through <function>quote_ident</function> before insertion in a dynamic query. Expressions containing values that should be literal strings in the - constructed command should be passed through <function>quote_literal</>. + constructed command should be passed through <function>quote_literal</function>. These functions take the appropriate steps to return the input text enclosed in double or single quotes respectively, with any embedded special characters properly escaped. @@ -1360,12 +1360,12 @@ EXECUTE 'UPDATE tbl SET ' <para> Because <function>quote_literal</function> is labeled <literal>STRICT</literal>, it will always return null when called with a - null argument. In the above example, if <literal>newvalue</> or - <literal>keyvalue</> were null, the entire dynamic query string would + null argument. In the above example, if <literal>newvalue</literal> or + <literal>keyvalue</literal> were null, the entire dynamic query string would become null, leading to an error from <command>EXECUTE</command>. - You can avoid this problem by using the <function>quote_nullable</> - function, which works the same as <function>quote_literal</> except that - when called with a null argument it returns the string <literal>NULL</>. + You can avoid this problem by using the <function>quote_nullable</function> + function, which works the same as <function>quote_literal</function> except that + when called with a null argument it returns the string <literal>NULL</literal>. For example, <programlisting> EXECUTE 'UPDATE tbl SET ' @@ -1376,26 +1376,26 @@ EXECUTE 'UPDATE tbl SET ' || quote_nullable(keyvalue); </programlisting> If you are dealing with values that might be null, you should usually - use <function>quote_nullable</> in place of <function>quote_literal</>. + use <function>quote_nullable</function> in place of <function>quote_literal</function>. </para> <para> As always, care must be taken to ensure that null values in a query do - not deliver unintended results. For example the <literal>WHERE</> clause + not deliver unintended results. For example the <literal>WHERE</literal> clause <programlisting> 'WHERE key = ' || quote_nullable(keyvalue) </programlisting> - will never succeed if <literal>keyvalue</> is null, because the - result of using the equality operator <literal>=</> with a null operand + will never succeed if <literal>keyvalue</literal> is null, because the + result of using the equality operator <literal>=</literal> with a null operand is always null. If you wish null to work like an ordinary key value, you would need to rewrite the above as <programlisting> 'WHERE key IS NOT DISTINCT FROM ' || quote_nullable(keyvalue) </programlisting> - (At present, <literal>IS NOT DISTINCT FROM</> is handled much less - efficiently than <literal>=</>, so don't do this unless you must. + (At present, <literal>IS NOT DISTINCT FROM</literal> is handled much less + efficiently than <literal>=</literal>, so don't do this unless you must. See <xref linkend="functions-comparison"> for - more information on nulls and <literal>IS DISTINCT</>.) + more information on nulls and <literal>IS DISTINCT</literal>.) </para> <para> @@ -1409,12 +1409,12 @@ EXECUTE 'UPDATE tbl SET ' || '$$ WHERE key = ' || quote_literal(keyvalue); </programlisting> - because it would break if the contents of <literal>newvalue</> - happened to contain <literal>$$</>. The same objection would + because it would break if the contents of <literal>newvalue</literal> + happened to contain <literal>$$</literal>. The same objection would apply to any other dollar-quoting delimiter you might pick. So, to safely quote text that is not known in advance, you - <emphasis>must</> use <function>quote_literal</>, - <function>quote_nullable</>, or <function>quote_ident</>, as appropriate. + <emphasis>must</emphasis> use <function>quote_literal</function>, + <function>quote_nullable</function>, or <function>quote_ident</function>, as appropriate. </para> <para> @@ -1425,8 +1425,8 @@ EXECUTE 'UPDATE tbl SET ' EXECUTE format('UPDATE tbl SET %I = %L ' 'WHERE key = %L', colname, newvalue, keyvalue); </programlisting> - <literal>%I</> is equivalent to <function>quote_ident</>, and - <literal>%L</> is equivalent to <function>quote_nullable</function>. + <literal>%I</literal> is equivalent to <function>quote_ident</function>, and + <literal>%L</literal> is equivalent to <function>quote_nullable</function>. The <function>format</function> function can be used in conjunction with the <literal>USING</literal> clause: <programlisting> @@ -1435,7 +1435,7 @@ EXECUTE format('UPDATE tbl SET %I = $1 WHERE key = $2', colname) </programlisting> This form is better because the variables are handled in their native data type format, rather than unconditionally converting them to - text and quoting them via <literal>%L</>. It is also more efficient. + text and quoting them via <literal>%L</literal>. It is also more efficient. </para> </example> @@ -1443,7 +1443,7 @@ EXECUTE format('UPDATE tbl SET %I = $1 WHERE key = $2', colname) A much larger example of a dynamic command and <command>EXECUTE</command> can be seen in <xref linkend="plpgsql-porting-ex2">, which builds and executes a - <command>CREATE FUNCTION</> command to define a new function. + <command>CREATE FUNCTION</command> command to define a new function. </para> </sect2> @@ -1460,14 +1460,14 @@ GET <optional> CURRENT </optional> DIAGNOSTICS <replaceable>variable</replaceabl </synopsis> This command allows retrieval of system status indicators. - <literal>CURRENT</> is a noise word (but see also <command>GET STACKED + <literal>CURRENT</literal> is a noise word (but see also <command>GET STACKED DIAGNOSTICS</command> in <xref linkend="plpgsql-exception-diagnostics">). Each <replaceable>item</replaceable> is a key word identifying a status value to be assigned to the specified <replaceable>variable</replaceable> (which should be of the right data type to receive it). The currently available status items are shown in <xref linkend="plpgsql-current-diagnostics-values">. Colon-equal - (<literal>:=</>) can be used instead of the SQL-standard <literal>=</> + (<literal>:=</literal>) can be used instead of the SQL-standard <literal>=</literal> token. An example: <programlisting> GET DIAGNOSTICS integer_var = ROW_COUNT; @@ -1487,13 +1487,13 @@ GET DIAGNOSTICS integer_var = ROW_COUNT; <tbody> <row> <entry><varname>ROW_COUNT</varname></entry> - <entry><type>bigint</></entry> + <entry><type>bigint</type></entry> <entry>the number of rows processed by the most recent <acronym>SQL</acronym> command</entry> </row> <row> <entry><varname>RESULT_OID</varname></entry> - <entry><type>oid</></entry> + <entry><type>oid</type></entry> <entry>the OID of the last row inserted by the most recent <acronym>SQL</acronym> command (only useful after an <command>INSERT</command> command into a table having @@ -1501,7 +1501,7 @@ GET DIAGNOSTICS integer_var = ROW_COUNT; </row> <row> <entry><literal>PG_CONTEXT</literal></entry> - <entry><type>text</></entry> + <entry><type>text</type></entry> <entry>line(s) of text describing the current call stack (see <xref linkend="plpgsql-call-stack">)</entry> </row> @@ -1526,33 +1526,33 @@ GET DIAGNOSTICS integer_var = ROW_COUNT; </listitem> <listitem> <para> - A <command>PERFORM</> statement sets <literal>FOUND</literal> + A <command>PERFORM</command> statement sets <literal>FOUND</literal> true if it produces (and discards) one or more rows, false if no row is produced. </para> </listitem> <listitem> <para> - <command>UPDATE</>, <command>INSERT</>, and <command>DELETE</> + <command>UPDATE</command>, <command>INSERT</command>, and <command>DELETE</command> statements set <literal>FOUND</literal> true if at least one row is affected, false if no row is affected. </para> </listitem> <listitem> <para> - A <command>FETCH</> statement sets <literal>FOUND</literal> + A <command>FETCH</command> statement sets <literal>FOUND</literal> true if it returns a row, false if no row is returned. </para> </listitem> <listitem> <para> - A <command>MOVE</> statement sets <literal>FOUND</literal> + A <command>MOVE</command> statement sets <literal>FOUND</literal> true if it successfully repositions the cursor, false otherwise. </para> </listitem> <listitem> <para> - A <command>FOR</> or <command>FOREACH</> statement sets + A <command>FOR</command> or <command>FOREACH</command> statement sets <literal>FOUND</literal> true if it iterates one or more times, else false. <literal>FOUND</literal> is set this way when the @@ -1625,7 +1625,7 @@ END; <note> <para> In Oracle's PL/SQL, empty statement lists are not allowed, and so - <command>NULL</> statements are <emphasis>required</> for situations + <command>NULL</command> statements are <emphasis>required</emphasis> for situations such as this. <application>PL/pgSQL</application> allows you to just write nothing, instead. </para> @@ -1639,9 +1639,9 @@ END; <para> Control structures are probably the most useful (and - important) part of <application>PL/pgSQL</>. With - <application>PL/pgSQL</>'s control structures, - you can manipulate <productname>PostgreSQL</> data in a very + important) part of <application>PL/pgSQL</application>. With + <application>PL/pgSQL</application>'s control structures, + you can manipulate <productname>PostgreSQL</productname> data in a very flexible and powerful way. </para> @@ -1655,7 +1655,7 @@ END; </para> <sect3> - <title><command>RETURN</></title> + <title><command>RETURN</command></title> <synopsis> RETURN <replaceable>expression</replaceable>; @@ -1665,7 +1665,7 @@ RETURN <replaceable>expression</replaceable>; <command>RETURN</command> with an expression terminates the function and returns the value of <replaceable>expression</replaceable> to the caller. This form - is used for <application>PL/pgSQL</> functions that do + is used for <application>PL/pgSQL</application> functions that do not return a set. </para> @@ -1716,7 +1716,7 @@ RETURN (1, 2, 'three'::text); -- must cast columns to correct types </sect3> <sect3> - <title><command>RETURN NEXT</> and <command>RETURN QUERY</command></title> + <title><command>RETURN NEXT</command> and <command>RETURN QUERY</command></title> <indexterm> <primary>RETURN NEXT</primary> <secondary>in PL/pgSQL</secondary> @@ -1733,8 +1733,8 @@ RETURN QUERY EXECUTE <replaceable class="command">command-string</replaceable> < </synopsis> <para> - When a <application>PL/pgSQL</> function is declared to return - <literal>SETOF <replaceable>sometype</></literal>, the procedure + When a <application>PL/pgSQL</application> function is declared to return + <literal>SETOF <replaceable>sometype</replaceable></literal>, the procedure to follow is slightly different. In that case, the individual items to return are specified by a sequence of <command>RETURN NEXT</command> or <command>RETURN QUERY</command> commands, and @@ -1755,7 +1755,7 @@ RETURN QUERY EXECUTE <replaceable class="command">command-string</replaceable> < QUERY</command> do not actually return from the function — they simply append zero or more rows to the function's result set. Execution then continues with the next statement in the - <application>PL/pgSQL</> function. As successive + <application>PL/pgSQL</application> function. As successive <command>RETURN NEXT</command> or <command>RETURN QUERY</command> commands are executed, the result set is built up. A final <command>RETURN</command>, which should have no @@ -1767,8 +1767,8 @@ RETURN QUERY EXECUTE <replaceable class="command">command-string</replaceable> < <command>RETURN QUERY</command> has a variant <command>RETURN QUERY EXECUTE</command>, which specifies the query to be executed dynamically. Parameter expressions can - be inserted into the computed query string via <literal>USING</>, - in just the same way as in the <command>EXECUTE</> command. + be inserted into the computed query string via <literal>USING</literal>, + in just the same way as in the <command>EXECUTE</command> command. </para> <para> @@ -1778,9 +1778,9 @@ RETURN QUERY EXECUTE <replaceable class="command">command-string</replaceable> < variable(s) will be saved for eventual return as a row of the result. Note that you must declare the function as returning <literal>SETOF record</literal> when there are multiple output - parameters, or <literal>SETOF <replaceable>sometype</></literal> + parameters, or <literal>SETOF <replaceable>sometype</replaceable></literal> when there is just one output parameter of type - <replaceable>sometype</>, in order to create a set-returning + <replaceable>sometype</replaceable>, in order to create a set-returning function with output parameters. </para> @@ -1848,11 +1848,11 @@ SELECT * FROM get_available_flightid(CURRENT_DATE); The current implementation of <command>RETURN NEXT</command> and <command>RETURN QUERY</command> stores the entire result set before returning from the function, as discussed above. That - means that if a <application>PL/pgSQL</> function produces a + means that if a <application>PL/pgSQL</application> function produces a very large result set, performance might be poor: data will be written to disk to avoid memory exhaustion, but the function itself will not return until the entire result set has been - generated. A future version of <application>PL/pgSQL</> might + generated. A future version of <application>PL/pgSQL</application> might allow users to define set-returning functions that do not have this limitation. Currently, the point at which data begins being written to disk is controlled by the @@ -1869,34 +1869,34 @@ SELECT * FROM get_available_flightid(CURRENT_DATE); <title>Conditionals</title> <para> - <command>IF</> and <command>CASE</> statements let you execute + <command>IF</command> and <command>CASE</command> statements let you execute alternative commands based on certain conditions. - <application>PL/pgSQL</> has three forms of <command>IF</>: + <application>PL/pgSQL</application> has three forms of <command>IF</command>: <itemizedlist> <listitem> - <para><literal>IF ... THEN ... END IF</></> + <para><literal>IF ... THEN ... END IF</literal></para> </listitem> <listitem> - <para><literal>IF ... THEN ... ELSE ... END IF</></> + <para><literal>IF ... THEN ... ELSE ... END IF</literal></para> </listitem> <listitem> - <para><literal>IF ... THEN ... ELSIF ... THEN ... ELSE ... END IF</></> + <para><literal>IF ... THEN ... ELSIF ... THEN ... ELSE ... END IF</literal></para> </listitem> </itemizedlist> - and two forms of <command>CASE</>: + and two forms of <command>CASE</command>: <itemizedlist> <listitem> - <para><literal>CASE ... WHEN ... THEN ... ELSE ... END CASE</></> + <para><literal>CASE ... WHEN ... THEN ... ELSE ... END CASE</literal></para> </listitem> <listitem> - <para><literal>CASE WHEN ... THEN ... ELSE ... END CASE</></> + <para><literal>CASE WHEN ... THEN ... ELSE ... END CASE</literal></para> </listitem> </itemizedlist> </para> <sect3> - <title><literal>IF-THEN</></title> + <title><literal>IF-THEN</literal></title> <synopsis> IF <replaceable>boolean-expression</replaceable> THEN @@ -1923,7 +1923,7 @@ END IF; </sect3> <sect3> - <title><literal>IF-THEN-ELSE</></title> + <title><literal>IF-THEN-ELSE</literal></title> <synopsis> IF <replaceable>boolean-expression</replaceable> THEN @@ -1964,7 +1964,7 @@ END IF; </sect3> <sect3> - <title><literal>IF-THEN-ELSIF</></title> + <title><literal>IF-THEN-ELSIF</literal></title> <synopsis> IF <replaceable>boolean-expression</replaceable> THEN @@ -1983,15 +1983,15 @@ END IF; <para> Sometimes there are more than just two alternatives. - <literal>IF-THEN-ELSIF</> provides a convenient + <literal>IF-THEN-ELSIF</literal> provides a convenient method of checking several alternatives in turn. - The <literal>IF</> conditions are tested successively + The <literal>IF</literal> conditions are tested successively until the first one that is true is found. Then the associated statement(s) are executed, after which control - passes to the next statement after <literal>END IF</>. - (Any subsequent <literal>IF</> conditions are <emphasis>not</> - tested.) If none of the <literal>IF</> conditions is true, - then the <literal>ELSE</> block (if any) is executed. + passes to the next statement after <literal>END IF</literal>. + (Any subsequent <literal>IF</literal> conditions are <emphasis>not</emphasis> + tested.) If none of the <literal>IF</literal> conditions is true, + then the <literal>ELSE</literal> block (if any) is executed. </para> <para> @@ -2012,8 +2012,8 @@ END IF; </para> <para> - The key word <literal>ELSIF</> can also be spelled - <literal>ELSEIF</>. + The key word <literal>ELSIF</literal> can also be spelled + <literal>ELSEIF</literal>. </para> <para> @@ -2033,14 +2033,14 @@ END IF; </para> <para> - However, this method requires writing a matching <literal>END IF</> - for each <literal>IF</>, so it is much more cumbersome than - using <literal>ELSIF</> when there are many alternatives. + However, this method requires writing a matching <literal>END IF</literal> + for each <literal>IF</literal>, so it is much more cumbersome than + using <literal>ELSIF</literal> when there are many alternatives. </para> </sect3> <sect3> - <title>Simple <literal>CASE</></title> + <title>Simple <literal>CASE</literal></title> <synopsis> CASE <replaceable>search-expression</replaceable> @@ -2055,16 +2055,16 @@ END CASE; </synopsis> <para> - The simple form of <command>CASE</> provides conditional execution - based on equality of operands. The <replaceable>search-expression</> + The simple form of <command>CASE</command> provides conditional execution + based on equality of operands. The <replaceable>search-expression</replaceable> is evaluated (once) and successively compared to each - <replaceable>expression</> in the <literal>WHEN</> clauses. + <replaceable>expression</replaceable> in the <literal>WHEN</literal> clauses. If a match is found, then the corresponding <replaceable>statements</replaceable> are executed, and then control - passes to the next statement after <literal>END CASE</>. (Subsequent - <literal>WHEN</> expressions are not evaluated.) If no match is - found, the <literal>ELSE</> <replaceable>statements</replaceable> are - executed; but if <literal>ELSE</> is not present, then a + passes to the next statement after <literal>END CASE</literal>. (Subsequent + <literal>WHEN</literal> expressions are not evaluated.) If no match is + found, the <literal>ELSE</literal> <replaceable>statements</replaceable> are + executed; but if <literal>ELSE</literal> is not present, then a <literal>CASE_NOT_FOUND</literal> exception is raised. </para> @@ -2083,7 +2083,7 @@ END CASE; </sect3> <sect3> - <title>Searched <literal>CASE</></title> + <title>Searched <literal>CASE</literal></title> <synopsis> CASE @@ -2098,16 +2098,16 @@ END CASE; </synopsis> <para> - The searched form of <command>CASE</> provides conditional execution - based on truth of Boolean expressions. Each <literal>WHEN</> clause's + The searched form of <command>CASE</command> provides conditional execution + based on truth of Boolean expressions. Each <literal>WHEN</literal> clause's <replaceable>boolean-expression</replaceable> is evaluated in turn, - until one is found that yields <literal>true</>. Then the + until one is found that yields <literal>true</literal>. Then the corresponding <replaceable>statements</replaceable> are executed, and - then control passes to the next statement after <literal>END CASE</>. - (Subsequent <literal>WHEN</> expressions are not evaluated.) - If no true result is found, the <literal>ELSE</> + then control passes to the next statement after <literal>END CASE</literal>. + (Subsequent <literal>WHEN</literal> expressions are not evaluated.) + If no true result is found, the <literal>ELSE</literal> <replaceable>statements</replaceable> are executed; - but if <literal>ELSE</> is not present, then a + but if <literal>ELSE</literal> is not present, then a <literal>CASE_NOT_FOUND</literal> exception is raised. </para> @@ -2125,9 +2125,9 @@ END CASE; </para> <para> - This form of <command>CASE</> is entirely equivalent to - <literal>IF-THEN-ELSIF</>, except for the rule that reaching - an omitted <literal>ELSE</> clause results in an error rather + This form of <command>CASE</command> is entirely equivalent to + <literal>IF-THEN-ELSIF</literal>, except for the rule that reaching + an omitted <literal>ELSE</literal> clause results in an error rather than doing nothing. </para> @@ -2143,14 +2143,14 @@ END CASE; </indexterm> <para> - With the <literal>LOOP</>, <literal>EXIT</>, - <literal>CONTINUE</>, <literal>WHILE</>, <literal>FOR</>, - and <literal>FOREACH</> statements, you can arrange for your - <application>PL/pgSQL</> function to repeat a series of commands. + With the <literal>LOOP</literal>, <literal>EXIT</literal>, + <literal>CONTINUE</literal>, <literal>WHILE</literal>, <literal>FOR</literal>, + and <literal>FOREACH</literal> statements, you can arrange for your + <application>PL/pgSQL</application> function to repeat a series of commands. </para> <sect3> - <title><literal>LOOP</></title> + <title><literal>LOOP</literal></title> <synopsis> <optional> <<<replaceable>label</replaceable>>> </optional> @@ -2160,17 +2160,17 @@ END LOOP <optional> <replaceable>label</replaceable> </optional>; </synopsis> <para> - <literal>LOOP</> defines an unconditional loop that is repeated - indefinitely until terminated by an <literal>EXIT</> or + <literal>LOOP</literal> defines an unconditional loop that is repeated + indefinitely until terminated by an <literal>EXIT</literal> or <command>RETURN</command> statement. The optional - <replaceable>label</replaceable> can be used by <literal>EXIT</> + <replaceable>label</replaceable> can be used by <literal>EXIT</literal> and <literal>CONTINUE</literal> statements within nested loops to specify which loop those statements refer to. </para> </sect3> <sect3> - <title><literal>EXIT</></title> + <title><literal>EXIT</literal></title> <indexterm> <primary>EXIT</primary> @@ -2184,21 +2184,21 @@ EXIT <optional> <replaceable>label</replaceable> </optional> <optional> WHEN <re <para> If no <replaceable>label</replaceable> is given, the innermost loop is terminated and the statement following <literal>END - LOOP</> is executed next. If <replaceable>label</replaceable> + LOOP</literal> is executed next. If <replaceable>label</replaceable> is given, it must be the label of the current or some outer level of nested loop or block. Then the named loop or block is terminated and control continues with the statement after the - loop's/block's corresponding <literal>END</>. + loop's/block's corresponding <literal>END</literal>. </para> <para> - If <literal>WHEN</> is specified, the loop exit occurs only if - <replaceable>boolean-expression</> is true. Otherwise, control passes - to the statement after <literal>EXIT</>. + If <literal>WHEN</literal> is specified, the loop exit occurs only if + <replaceable>boolean-expression</replaceable> is true. Otherwise, control passes + to the statement after <literal>EXIT</literal>. </para> <para> - <literal>EXIT</> can be used with all types of loops; it is + <literal>EXIT</literal> can be used with all types of loops; it is not limited to use with unconditional loops. </para> @@ -2242,7 +2242,7 @@ END; </sect3> <sect3> - <title><literal>CONTINUE</></title> + <title><literal>CONTINUE</literal></title> <indexterm> <primary>CONTINUE</primary> @@ -2254,25 +2254,25 @@ CONTINUE <optional> <replaceable>label</replaceable> </optional> <optional> WHEN </synopsis> <para> - If no <replaceable>label</> is given, the next iteration of + If no <replaceable>label</replaceable> is given, the next iteration of the innermost loop is begun. That is, all statements remaining in the loop body are skipped, and control returns to the loop control expression (if any) to determine whether another loop iteration is needed. - If <replaceable>label</> is present, it + If <replaceable>label</replaceable> is present, it specifies the label of the loop whose execution will be continued. </para> <para> - If <literal>WHEN</> is specified, the next iteration of the - loop is begun only if <replaceable>boolean-expression</> is + If <literal>WHEN</literal> is specified, the next iteration of the + loop is begun only if <replaceable>boolean-expression</replaceable> is true. Otherwise, control passes to the statement after - <literal>CONTINUE</>. + <literal>CONTINUE</literal>. </para> <para> - <literal>CONTINUE</> can be used with all types of loops; it + <literal>CONTINUE</literal> can be used with all types of loops; it is not limited to use with unconditional loops. </para> @@ -2291,7 +2291,7 @@ END LOOP; <sect3> - <title><literal>WHILE</></title> + <title><literal>WHILE</literal></title> <indexterm> <primary>WHILE</primary> @@ -2306,7 +2306,7 @@ END LOOP <optional> <replaceable>label</replaceable> </optional>; </synopsis> <para> - The <literal>WHILE</> statement repeats a + The <literal>WHILE</literal> statement repeats a sequence of statements so long as the <replaceable>boolean-expression</replaceable> evaluates to true. The expression is checked just before @@ -2328,7 +2328,7 @@ END LOOP; </sect3> <sect3 id="plpgsql-integer-for"> - <title><literal>FOR</> (Integer Variant)</title> + <title><literal>FOR</literal> (Integer Variant)</title> <synopsis> <optional> <<<replaceable>label</replaceable>>> </optional> @@ -2338,22 +2338,22 @@ END LOOP <optional> <replaceable>label</replaceable> </optional>; </synopsis> <para> - This form of <literal>FOR</> creates a loop that iterates over a range + This form of <literal>FOR</literal> creates a loop that iterates over a range of integer values. The variable <replaceable>name</replaceable> is automatically defined as type - <type>integer</> and exists only inside the loop (any existing + <type>integer</type> and exists only inside the loop (any existing definition of the variable name is ignored within the loop). The two expressions giving the lower and upper bound of the range are evaluated once when entering - the loop. If the <literal>BY</> clause isn't specified the iteration - step is 1, otherwise it's the value specified in the <literal>BY</> + the loop. If the <literal>BY</literal> clause isn't specified the iteration + step is 1, otherwise it's the value specified in the <literal>BY</literal> clause, which again is evaluated once on loop entry. - If <literal>REVERSE</> is specified then the step value is + If <literal>REVERSE</literal> is specified then the step value is subtracted, rather than added, after each iteration. </para> <para> - Some examples of integer <literal>FOR</> loops: + Some examples of integer <literal>FOR</literal> loops: <programlisting> FOR i IN 1..10 LOOP -- i will take on the values 1,2,3,4,5,6,7,8,9,10 within the loop @@ -2371,13 +2371,13 @@ END LOOP; <para> If the lower bound is greater than the upper bound (or less than, - in the <literal>REVERSE</> case), the loop body is not + in the <literal>REVERSE</literal> case), the loop body is not executed at all. No error is raised. </para> <para> If a <replaceable>label</replaceable> is attached to the - <literal>FOR</> loop then the integer loop variable can be + <literal>FOR</literal> loop then the integer loop variable can be referenced with a qualified name, using that <replaceable>label</replaceable>. </para> @@ -2388,7 +2388,7 @@ END LOOP; <title>Looping Through Query Results</title> <para> - Using a different type of <literal>FOR</> loop, you can iterate through + Using a different type of <literal>FOR</literal> loop, you can iterate through the results of a query and manipulate that data accordingly. The syntax is: <synopsis> @@ -2424,28 +2424,28 @@ END; $$ LANGUAGE plpgsql; </programlisting> - If the loop is terminated by an <literal>EXIT</> statement, the last + If the loop is terminated by an <literal>EXIT</literal> statement, the last assigned row value is still accessible after the loop. </para> <para> - The <replaceable>query</replaceable> used in this type of <literal>FOR</> + The <replaceable>query</replaceable> used in this type of <literal>FOR</literal> statement can be any SQL command that returns rows to the caller: - <command>SELECT</> is the most common case, - but you can also use <command>INSERT</>, <command>UPDATE</>, or - <command>DELETE</> with a <literal>RETURNING</> clause. Some utility - commands such as <command>EXPLAIN</> will work too. + <command>SELECT</command> is the most common case, + but you can also use <command>INSERT</command>, <command>UPDATE</command>, or + <command>DELETE</command> with a <literal>RETURNING</literal> clause. Some utility + commands such as <command>EXPLAIN</command> will work too. </para> <para> - <application>PL/pgSQL</> variables are substituted into the query text, + <application>PL/pgSQL</application> variables are substituted into the query text, and the query plan is cached for possible re-use, as discussed in detail in <xref linkend="plpgsql-var-subst"> and <xref linkend="plpgsql-plan-caching">. </para> <para> - The <literal>FOR-IN-EXECUTE</> statement is another way to iterate over + The <literal>FOR-IN-EXECUTE</literal> statement is another way to iterate over rows: <synopsis> <optional> <<<replaceable>label</replaceable>>> </optional> @@ -2455,11 +2455,11 @@ END LOOP <optional> <replaceable>label</replaceable> </optional>; </synopsis> This is like the previous form, except that the source query is specified as a string expression, which is evaluated and replanned - on each entry to the <literal>FOR</> loop. This allows the programmer to + on each entry to the <literal>FOR</literal> loop. This allows the programmer to choose the speed of a preplanned query or the flexibility of a dynamic query, just as with a plain <command>EXECUTE</command> statement. As with <command>EXECUTE</command>, parameter values can be inserted - into the dynamic command via <literal>USING</>. + into the dynamic command via <literal>USING</literal>. </para> <para> @@ -2473,13 +2473,13 @@ END LOOP <optional> <replaceable>label</replaceable> </optional>; <title>Looping Through Arrays</title> <para> - The <literal>FOREACH</> loop is much like a <literal>FOR</> loop, + The <literal>FOREACH</literal> loop is much like a <literal>FOR</literal> loop, but instead of iterating through the rows returned by a SQL query, it iterates through the elements of an array value. - (In general, <literal>FOREACH</> is meant for looping through + (In general, <literal>FOREACH</literal> is meant for looping through components of a composite-valued expression; variants for looping through composites besides arrays may be added in future.) - The <literal>FOREACH</> statement to loop over an array is: + The <literal>FOREACH</literal> statement to loop over an array is: <synopsis> <optional> <<<replaceable>label</replaceable>>> </optional> @@ -2490,7 +2490,7 @@ END LOOP <optional> <replaceable>label</replaceable> </optional>; </para> <para> - Without <literal>SLICE</>, or if <literal>SLICE 0</> is specified, + Without <literal>SLICE</literal>, or if <literal>SLICE 0</literal> is specified, the loop iterates through individual elements of the array produced by evaluating the <replaceable>expression</replaceable>. The <replaceable>target</replaceable> variable is assigned each @@ -2522,13 +2522,13 @@ $$ LANGUAGE plpgsql; </para> <para> - With a positive <literal>SLICE</> value, <literal>FOREACH</> + With a positive <literal>SLICE</literal> value, <literal>FOREACH</literal> iterates through slices of the array rather than single elements. - The <literal>SLICE</> value must be an integer constant not larger + The <literal>SLICE</literal> value must be an integer constant not larger than the number of dimensions of the array. The <replaceable>target</replaceable> variable must be an array, and it receives successive slices of the array value, where each slice - is of the number of dimensions specified by <literal>SLICE</>. + is of the number of dimensions specified by <literal>SLICE</literal>. Here is an example of iterating through one-dimensional slices: <programlisting> @@ -2562,12 +2562,12 @@ NOTICE: row = {10,11,12} </indexterm> <para> - By default, any error occurring in a <application>PL/pgSQL</> + By default, any error occurring in a <application>PL/pgSQL</application> function aborts execution of the function, and indeed of the surrounding transaction as well. You can trap errors and recover - from them by using a <command>BEGIN</> block with an - <literal>EXCEPTION</> clause. The syntax is an extension of the - normal syntax for a <command>BEGIN</> block: + from them by using a <command>BEGIN</command> block with an + <literal>EXCEPTION</literal> clause. The syntax is an extension of the + normal syntax for a <command>BEGIN</command> block: <synopsis> <optional> <<<replaceable>label</replaceable>>> </optional> @@ -2588,18 +2588,18 @@ END; <para> If no error occurs, this form of block simply executes all the <replaceable>statements</replaceable>, and then control passes - to the next statement after <literal>END</>. But if an error + to the next statement after <literal>END</literal>. But if an error occurs within the <replaceable>statements</replaceable>, further processing of the <replaceable>statements</replaceable> is - abandoned, and control passes to the <literal>EXCEPTION</> list. + abandoned, and control passes to the <literal>EXCEPTION</literal> list. The list is searched for the first <replaceable>condition</replaceable> matching the error that occurred. If a match is found, the corresponding <replaceable>handler_statements</replaceable> are executed, and then control passes to the next statement after - <literal>END</>. If no match is found, the error propagates out - as though the <literal>EXCEPTION</> clause were not there at all: + <literal>END</literal>. If no match is found, the error propagates out + as though the <literal>EXCEPTION</literal> clause were not there at all: the error can be caught by an enclosing block with - <literal>EXCEPTION</>, or if there is none it aborts processing + <literal>EXCEPTION</literal>, or if there is none it aborts processing of the function. </para> @@ -2607,12 +2607,12 @@ END; The <replaceable>condition</replaceable> names can be any of those shown in <xref linkend="errcodes-appendix">. A category name matches any error within its category. The special - condition name <literal>OTHERS</> matches every error type except - <literal>QUERY_CANCELED</> and <literal>ASSERT_FAILURE</>. + condition name <literal>OTHERS</literal> matches every error type except + <literal>QUERY_CANCELED</literal> and <literal>ASSERT_FAILURE</literal>. (It is possible, but often unwise, to trap those two error types by name.) Condition names are not case-sensitive. Also, an error condition can be specified - by <literal>SQLSTATE</> code; for example these are equivalent: + by <literal>SQLSTATE</literal> code; for example these are equivalent: <programlisting> WHEN division_by_zero THEN ... WHEN SQLSTATE '22012' THEN ... @@ -2622,13 +2622,13 @@ WHEN SQLSTATE '22012' THEN ... <para> If a new error occurs within the selected <replaceable>handler_statements</replaceable>, it cannot be caught - by this <literal>EXCEPTION</> clause, but is propagated out. - A surrounding <literal>EXCEPTION</> clause could catch it. + by this <literal>EXCEPTION</literal> clause, but is propagated out. + A surrounding <literal>EXCEPTION</literal> clause could catch it. </para> <para> - When an error is caught by an <literal>EXCEPTION</> clause, - the local variables of the <application>PL/pgSQL</> function + When an error is caught by an <literal>EXCEPTION</literal> clause, + the local variables of the <application>PL/pgSQL</application> function remain as they were when the error occurred, but all changes to persistent database state within the block are rolled back. As an example, consider this fragment: @@ -2646,32 +2646,32 @@ EXCEPTION END; </programlisting> - When control reaches the assignment to <literal>y</>, it will - fail with a <literal>division_by_zero</> error. This will be caught by - the <literal>EXCEPTION</> clause. The value returned in the - <command>RETURN</> statement will be the incremented value of - <literal>x</>, but the effects of the <command>UPDATE</> command will - have been rolled back. The <command>INSERT</> command preceding the + When control reaches the assignment to <literal>y</literal>, it will + fail with a <literal>division_by_zero</literal> error. This will be caught by + the <literal>EXCEPTION</literal> clause. The value returned in the + <command>RETURN</command> statement will be the incremented value of + <literal>x</literal>, but the effects of the <command>UPDATE</command> command will + have been rolled back. The <command>INSERT</command> command preceding the block is not rolled back, however, so the end result is that the database - contains <literal>Tom Jones</> not <literal>Joe Jones</>. + contains <literal>Tom Jones</literal> not <literal>Joe Jones</literal>. </para> <tip> <para> - A block containing an <literal>EXCEPTION</> clause is significantly + A block containing an <literal>EXCEPTION</literal> clause is significantly more expensive to enter and exit than a block without one. Therefore, - don't use <literal>EXCEPTION</> without need. + don't use <literal>EXCEPTION</literal> without need. </para> </tip> <example id="plpgsql-upsert-example"> - <title>Exceptions with <command>UPDATE</>/<command>INSERT</></title> + <title>Exceptions with <command>UPDATE</command>/<command>INSERT</command></title> <para> This example uses exception handling to perform either - <command>UPDATE</> or <command>INSERT</>, as appropriate. It is - recommended that applications use <command>INSERT</> with - <literal>ON CONFLICT DO UPDATE</> rather than actually using + <command>UPDATE</command> or <command>INSERT</command>, as appropriate. It is + recommended that applications use <command>INSERT</command> with + <literal>ON CONFLICT DO UPDATE</literal> rather than actually using this pattern. This example serves primarily to illustrate use of <application>PL/pgSQL</application> control flow structures: @@ -2705,8 +2705,8 @@ SELECT merge_db(1, 'david'); SELECT merge_db(1, 'dennis'); </programlisting> - This coding assumes the <literal>unique_violation</> error is caused by - the <command>INSERT</>, and not by, say, an <command>INSERT</> in a + This coding assumes the <literal>unique_violation</literal> error is caused by + the <command>INSERT</command>, and not by, say, an <command>INSERT</command> in a trigger function on the table. It might also misbehave if there is more than one unique index on the table, since it will retry the operation regardless of which index caused the error. @@ -2722,7 +2722,7 @@ SELECT merge_db(1, 'dennis'); <para> Exception handlers frequently need to identify the specific error that occurred. There are two ways to get information about the current - exception in <application>PL/pgSQL</>: special variables and the + exception in <application>PL/pgSQL</application>: special variables and the <command>GET STACKED DIAGNOSTICS</command> command. </para> @@ -2764,52 +2764,52 @@ GET STACKED DIAGNOSTICS <replaceable>variable</replaceable> { = | := } <replacea <tbody> <row> <entry><literal>RETURNED_SQLSTATE</literal></entry> - <entry><type>text</></entry> + <entry><type>text</type></entry> <entry>the SQLSTATE error code of the exception</entry> </row> <row> <entry><literal>COLUMN_NAME</literal></entry> - <entry><type>text</></entry> + <entry><type>text</type></entry> <entry>the name of the column related to exception</entry> </row> <row> <entry><literal>CONSTRAINT_NAME</literal></entry> - <entry><type>text</></entry> + <entry><type>text</type></entry> <entry>the name of the constraint related to exception</entry> </row> <row> <entry><literal>PG_DATATYPE_NAME</literal></entry> - <entry><type>text</></entry> + <entry><type>text</type></entry> <entry>the name of the data type related to exception</entry> </row> <row> <entry><literal>MESSAGE_TEXT</literal></entry> - <entry><type>text</></entry> + <entry><type>text</type></entry> <entry>the text of the exception's primary message</entry> </row> <row> <entry><literal>TABLE_NAME</literal></entry> - <entry><type>text</></entry> + <entry><type>text</type></entry> <entry>the name of the table related to exception</entry> </row> <row> <entry><literal>SCHEMA_NAME</literal></entry> - <entry><type>text</></entry> + <entry><type>text</type></entry> <entry>the name of the schema related to exception</entry> </row> <row> <entry><literal>PG_EXCEPTION_DETAIL</literal></entry> - <entry><type>text</></entry> + <entry><type>text</type></entry> <entry>the text of the exception's detail message, if any</entry> </row> <row> <entry><literal>PG_EXCEPTION_HINT</literal></entry> - <entry><type>text</></entry> + <entry><type>text</type></entry> <entry>the text of the exception's hint message, if any</entry> </row> <row> <entry><literal>PG_EXCEPTION_CONTEXT</literal></entry> - <entry><type>text</></entry> + <entry><type>text</type></entry> <entry>line(s) of text describing the call stack at the time of the exception (see <xref linkend="plpgsql-call-stack">)</entry> </row> @@ -2850,9 +2850,9 @@ END; in <xref linkend="plpgsql-statements-diagnostics">, retrieves information about current execution state (whereas the <command>GET STACKED DIAGNOSTICS</command> command discussed above reports information about - the execution state as of a previous error). Its <literal>PG_CONTEXT</> + the execution state as of a previous error). Its <literal>PG_CONTEXT</literal> status item is useful for identifying the current execution - location. <literal>PG_CONTEXT</> returns a text string with line(s) + location. <literal>PG_CONTEXT</literal> returns a text string with line(s) of text describing the call stack. The first line refers to the current function and currently executing <command>GET DIAGNOSTICS</command> command. The second and any subsequent lines refer to calling functions @@ -2907,11 +2907,11 @@ CONTEXT: PL/pgSQL function outer_func() line 3 at RETURN <para> Rather than executing a whole query at once, it is possible to set - up a <firstterm>cursor</> that encapsulates the query, and then read + up a <firstterm>cursor</firstterm> that encapsulates the query, and then read the query result a few rows at a time. One reason for doing this is to avoid memory overrun when the result contains a large number of - rows. (However, <application>PL/pgSQL</> users do not normally need - to worry about that, since <literal>FOR</> loops automatically use a cursor + rows. (However, <application>PL/pgSQL</application> users do not normally need + to worry about that, since <literal>FOR</literal> loops automatically use a cursor internally to avoid memory problems.) A more interesting usage is to return a reference to a cursor that a function has created, allowing the caller to read the rows. This provides an efficient way to return @@ -2922,19 +2922,19 @@ CONTEXT: PL/pgSQL function outer_func() line 3 at RETURN <title>Declaring Cursor Variables</title> <para> - All access to cursors in <application>PL/pgSQL</> goes through + All access to cursors in <application>PL/pgSQL</application> goes through cursor variables, which are always of the special data type - <type>refcursor</>. One way to create a cursor variable - is just to declare it as a variable of type <type>refcursor</>. + <type>refcursor</type>. One way to create a cursor variable + is just to declare it as a variable of type <type>refcursor</type>. Another way is to use the cursor declaration syntax, which in general is: <synopsis> <replaceable>name</replaceable> <optional> <optional> NO </optional> SCROLL </optional> CURSOR <optional> ( <replaceable>arguments</replaceable> ) </optional> FOR <replaceable>query</replaceable>; </synopsis> - (<literal>FOR</> can be replaced by <literal>IS</> for + (<literal>FOR</literal> can be replaced by <literal>IS</literal> for <productname>Oracle</productname> compatibility.) - If <literal>SCROLL</> is specified, the cursor will be capable of - scrolling backward; if <literal>NO SCROLL</> is specified, backward + If <literal>SCROLL</literal> is specified, the cursor will be capable of + scrolling backward; if <literal>NO SCROLL</literal> is specified, backward fetches will be rejected; if neither specification appears, it is query-dependent whether backward fetches will be allowed. <replaceable>arguments</replaceable>, if specified, is a @@ -2952,13 +2952,13 @@ DECLARE curs2 CURSOR FOR SELECT * FROM tenk1; curs3 CURSOR (key integer) FOR SELECT * FROM tenk1 WHERE unique1 = key; </programlisting> - All three of these variables have the data type <type>refcursor</>, + All three of these variables have the data type <type>refcursor</type>, but the first can be used with any query, while the second has - a fully specified query already <firstterm>bound</> to it, and the last - has a parameterized query bound to it. (<literal>key</> will be + a fully specified query already <firstterm>bound</firstterm> to it, and the last + has a parameterized query bound to it. (<literal>key</literal> will be replaced by an integer parameter value when the cursor is opened.) - The variable <literal>curs1</> - is said to be <firstterm>unbound</> since it is not bound to + The variable <literal>curs1</literal> + is said to be <firstterm>unbound</firstterm> since it is not bound to any particular query. </para> </sect2> @@ -2968,16 +2968,16 @@ DECLARE <para> Before a cursor can be used to retrieve rows, it must be - <firstterm>opened</>. (This is the equivalent action to the SQL - command <command>DECLARE CURSOR</>.) <application>PL/pgSQL</> has - three forms of the <command>OPEN</> statement, two of which use unbound + <firstterm>opened</firstterm>. (This is the equivalent action to the SQL + command <command>DECLARE CURSOR</command>.) <application>PL/pgSQL</application> has + three forms of the <command>OPEN</command> statement, two of which use unbound cursor variables while the third uses a bound cursor variable. </para> <note> <para> Bound cursor variables can also be used without explicitly opening the cursor, - via the <command>FOR</> statement described in + via the <command>FOR</command> statement described in <xref linkend="plpgsql-cursor-for-loop">. </para> </note> @@ -2993,18 +2993,18 @@ OPEN <replaceable>unbound_cursorvar</replaceable> <optional> <optional> NO </opt The cursor variable is opened and given the specified query to execute. The cursor cannot be open already, and it must have been declared as an unbound cursor variable (that is, as a simple - <type>refcursor</> variable). The query must be a + <type>refcursor</type> variable). The query must be a <command>SELECT</command>, or something else that returns rows - (such as <command>EXPLAIN</>). The query + (such as <command>EXPLAIN</command>). The query is treated in the same way as other SQL commands in - <application>PL/pgSQL</>: <application>PL/pgSQL</> + <application>PL/pgSQL</application>: <application>PL/pgSQL</application> variable names are substituted, and the query plan is cached for - possible reuse. When a <application>PL/pgSQL</> + possible reuse. When a <application>PL/pgSQL</application> variable is substituted into the cursor query, the value that is - substituted is the one it has at the time of the <command>OPEN</>; + substituted is the one it has at the time of the <command>OPEN</command>; subsequent changes to the variable will not affect the cursor's behavior. - The <literal>SCROLL</> and <literal>NO SCROLL</> + The <literal>SCROLL</literal> and <literal>NO SCROLL</literal> options have the same meanings as for a bound cursor. </para> @@ -3028,16 +3028,16 @@ OPEN <replaceable>unbound_cursorvar</replaceable> <optional> <optional> NO </opt The cursor variable is opened and given the specified query to execute. The cursor cannot be open already, and it must have been declared as an unbound cursor variable (that is, as a simple - <type>refcursor</> variable). The query is specified as a string + <type>refcursor</type> variable). The query is specified as a string expression, in the same way as in the <command>EXECUTE</command> command. As usual, this gives flexibility so the query plan can vary from one run to the next (see <xref linkend="plpgsql-plan-caching">), and it also means that variable substitution is not done on the command string. As with <command>EXECUTE</command>, parameter values can be inserted into the dynamic command via - <literal>format()</> and <literal>USING</>. - The <literal>SCROLL</> and - <literal>NO SCROLL</> options have the same meanings as for a bound + <literal>format()</literal> and <literal>USING</literal>. + The <literal>SCROLL</literal> and + <literal>NO SCROLL</literal> options have the same meanings as for a bound cursor. </para> @@ -3047,8 +3047,8 @@ OPEN <replaceable>unbound_cursorvar</replaceable> <optional> <optional> NO </opt OPEN curs1 FOR EXECUTE format('SELECT * FROM %I WHERE col1 = $1',tabname) USING keyvalue; </programlisting> In this example, the table name is inserted into the query via - <function>format()</>. The comparison value for <literal>col1</> - is inserted via a <literal>USING</> parameter, so it needs + <function>format()</function>. The comparison value for <literal>col1</literal> + is inserted via a <literal>USING</literal> parameter, so it needs no quoting. </para> </sect3> @@ -3071,8 +3071,8 @@ OPEN <replaceable>bound_cursorvar</replaceable> <optional> ( <optional> <replace <para> The query plan for a bound cursor is always considered cacheable; there is no equivalent of <command>EXECUTE</command> in this case. - Notice that <literal>SCROLL</> and <literal>NO SCROLL</> cannot be - specified in <command>OPEN</>, as the cursor's scrolling + Notice that <literal>SCROLL</literal> and <literal>NO SCROLL</literal> cannot be + specified in <command>OPEN</command>, as the cursor's scrolling behavior was already determined. </para> @@ -3098,13 +3098,13 @@ OPEN curs3(key := 42); <para> Because variable substitution is done on a bound cursor's query, there are really two ways to pass values into the cursor: either - with an explicit argument to <command>OPEN</>, or implicitly by - referencing a <application>PL/pgSQL</> variable in the query. + with an explicit argument to <command>OPEN</command>, or implicitly by + referencing a <application>PL/pgSQL</application> variable in the query. However, only variables declared before the bound cursor was declared will be substituted into it. In either case the value to - be passed is determined at the time of the <command>OPEN</>. + be passed is determined at the time of the <command>OPEN</command>. For example, another way to get the same effect as the - <literal>curs3</> example above is + <literal>curs3</literal> example above is <programlisting> DECLARE key integer; @@ -3127,22 +3127,22 @@ BEGIN <para> These manipulations need not occur in the same function that - opened the cursor to begin with. You can return a <type>refcursor</> + opened the cursor to begin with. You can return a <type>refcursor</type> value out of a function and let the caller operate on the cursor. - (Internally, a <type>refcursor</> value is simply the string name + (Internally, a <type>refcursor</type> value is simply the string name of a so-called portal containing the active query for the cursor. This name - can be passed around, assigned to other <type>refcursor</> variables, + can be passed around, assigned to other <type>refcursor</type> variables, and so on, without disturbing the portal.) </para> <para> All portals are implicitly closed at transaction end. Therefore - a <type>refcursor</> value is usable to reference an open cursor + a <type>refcursor</type> value is usable to reference an open cursor only until the end of the transaction. </para> <sect3> - <title><literal>FETCH</></title> + <title><literal>FETCH</literal></title> <synopsis> FETCH <optional> <replaceable>direction</replaceable> { FROM | IN } </optional> <replaceable>cursor</replaceable> INTO <replaceable>target</replaceable>; @@ -3163,23 +3163,23 @@ FETCH <optional> <replaceable>direction</replaceable> { FROM | IN } </optional> variants allowed in the SQL <xref linkend="sql-fetch"> command except the ones that can fetch more than one row; namely, it can be - <literal>NEXT</>, - <literal>PRIOR</>, - <literal>FIRST</>, - <literal>LAST</>, - <literal>ABSOLUTE</> <replaceable>count</replaceable>, - <literal>RELATIVE</> <replaceable>count</replaceable>, - <literal>FORWARD</>, or - <literal>BACKWARD</>. + <literal>NEXT</literal>, + <literal>PRIOR</literal>, + <literal>FIRST</literal>, + <literal>LAST</literal>, + <literal>ABSOLUTE</literal> <replaceable>count</replaceable>, + <literal>RELATIVE</literal> <replaceable>count</replaceable>, + <literal>FORWARD</literal>, or + <literal>BACKWARD</literal>. Omitting <replaceable>direction</replaceable> is the same - as specifying <literal>NEXT</>. + as specifying <literal>NEXT</literal>. <replaceable>direction</replaceable> values that require moving backward are likely to fail unless the cursor was declared or opened - with the <literal>SCROLL</> option. + with the <literal>SCROLL</literal> option. </para> <para> - <replaceable>cursor</replaceable> must be the name of a <type>refcursor</> + <replaceable>cursor</replaceable> must be the name of a <type>refcursor</type> variable that references an open cursor portal. </para> @@ -3195,7 +3195,7 @@ FETCH RELATIVE -2 FROM curs4 INTO x; </sect3> <sect3> - <title><literal>MOVE</></title> + <title><literal>MOVE</literal></title> <synopsis> MOVE <optional> <replaceable>direction</replaceable> { FROM | IN } </optional> <replaceable>cursor</replaceable>; @@ -3214,20 +3214,20 @@ MOVE <optional> <replaceable>direction</replaceable> { FROM | IN } </optional> < The <replaceable>direction</replaceable> clause can be any of the variants allowed in the SQL <xref linkend="sql-fetch"> command, namely - <literal>NEXT</>, - <literal>PRIOR</>, - <literal>FIRST</>, - <literal>LAST</>, - <literal>ABSOLUTE</> <replaceable>count</replaceable>, - <literal>RELATIVE</> <replaceable>count</replaceable>, - <literal>ALL</>, - <literal>FORWARD</> <optional> <replaceable>count</replaceable> | <literal>ALL</> </optional>, or - <literal>BACKWARD</> <optional> <replaceable>count</replaceable> | <literal>ALL</> </optional>. + <literal>NEXT</literal>, + <literal>PRIOR</literal>, + <literal>FIRST</literal>, + <literal>LAST</literal>, + <literal>ABSOLUTE</literal> <replaceable>count</replaceable>, + <literal>RELATIVE</literal> <replaceable>count</replaceable>, + <literal>ALL</literal>, + <literal>FORWARD</literal> <optional> <replaceable>count</replaceable> | <literal>ALL</literal> </optional>, or + <literal>BACKWARD</literal> <optional> <replaceable>count</replaceable> | <literal>ALL</literal> </optional>. Omitting <replaceable>direction</replaceable> is the same - as specifying <literal>NEXT</>. + as specifying <literal>NEXT</literal>. <replaceable>direction</replaceable> values that require moving backward are likely to fail unless the cursor was declared or opened - with the <literal>SCROLL</> option. + with the <literal>SCROLL</literal> option. </para> <para> @@ -3242,7 +3242,7 @@ MOVE FORWARD 2 FROM curs4; </sect3> <sect3> - <title><literal>UPDATE/DELETE WHERE CURRENT OF</></title> + <title><literal>UPDATE/DELETE WHERE CURRENT OF</literal></title> <synopsis> UPDATE <replaceable>table</replaceable> SET ... WHERE CURRENT OF <replaceable>cursor</replaceable>; @@ -3253,7 +3253,7 @@ DELETE FROM <replaceable>table</replaceable> WHERE CURRENT OF <replaceable>curso When a cursor is positioned on a table row, that row can be updated or deleted using the cursor to identify the row. There are restrictions on what the cursor's query can be (in particular, - no grouping) and it's best to use <literal>FOR UPDATE</> in the + no grouping) and it's best to use <literal>FOR UPDATE</literal> in the cursor. For more information see the <xref linkend="sql-declare"> reference page. @@ -3268,7 +3268,7 @@ UPDATE foo SET dataval = myval WHERE CURRENT OF curs1; </sect3> <sect3> - <title><literal>CLOSE</></title> + <title><literal>CLOSE</literal></title> <synopsis> CLOSE <replaceable>cursor</replaceable>; @@ -3292,7 +3292,7 @@ CLOSE curs1; <title>Returning Cursors</title> <para> - <application>PL/pgSQL</> functions can return cursors to the + <application>PL/pgSQL</application> functions can return cursors to the caller. This is useful to return multiple rows or columns, especially with very large result sets. To do this, the function opens the cursor and returns the cursor name to the caller (or simply @@ -3305,13 +3305,13 @@ CLOSE curs1; <para> The portal name used for a cursor can be specified by the programmer or automatically generated. To specify a portal name, - simply assign a string to the <type>refcursor</> variable before - opening it. The string value of the <type>refcursor</> variable - will be used by <command>OPEN</> as the name of the underlying portal. - However, if the <type>refcursor</> variable is null, - <command>OPEN</> automatically generates a name that does not + simply assign a string to the <type>refcursor</type> variable before + opening it. The string value of the <type>refcursor</type> variable + will be used by <command>OPEN</command> as the name of the underlying portal. + However, if the <type>refcursor</type> variable is null, + <command>OPEN</command> automatically generates a name that does not conflict with any existing portal, and assigns it to the - <type>refcursor</> variable. + <type>refcursor</type> variable. </para> <note> @@ -3405,7 +3405,7 @@ COMMIT; <title>Looping Through a Cursor's Result</title> <para> - There is a variant of the <command>FOR</> statement that allows + There is a variant of the <command>FOR</command> statement that allows iterating through the rows returned by a cursor. The syntax is: <synopsis> @@ -3416,18 +3416,18 @@ END LOOP <optional> <replaceable>label</replaceable> </optional>; </synopsis> The cursor variable must have been bound to some query when it was - declared, and it <emphasis>cannot</> be open already. The - <command>FOR</> statement automatically opens the cursor, and it closes + declared, and it <emphasis>cannot</emphasis> be open already. The + <command>FOR</command> statement automatically opens the cursor, and it closes the cursor again when the loop exits. A list of actual argument value expressions must appear if and only if the cursor was declared to take arguments. These values will be substituted in the query, in just - the same way as during an <command>OPEN</> (see <xref + the same way as during an <command>OPEN</command> (see <xref linkend="plpgsql-open-bound-cursor">). </para> <para> The variable <replaceable>recordvar</replaceable> is automatically - defined as type <type>record</> and exists only inside the loop (any + defined as type <type>record</type> and exists only inside the loop (any existing definition of the variable name is ignored within the loop). Each row returned by the cursor is successively assigned to this record variable and the loop body is executed. @@ -3458,8 +3458,8 @@ END LOOP <optional> <replaceable>label</replaceable> </optional>; <synopsis> RAISE <optional> <replaceable class="parameter">level</replaceable> </optional> '<replaceable class="parameter">format</replaceable>' <optional>, <replaceable class="parameter">expression</replaceable> <optional>, ... </optional></optional> <optional> USING <replaceable class="parameter">option</replaceable> = <replaceable class="parameter">expression</replaceable> <optional>, ... </optional> </optional>; -RAISE <optional> <replaceable class="parameter">level</replaceable> </optional> <replaceable class="parameter">condition_name</> <optional> USING <replaceable class="parameter">option</replaceable> = <replaceable class="parameter">expression</replaceable> <optional>, ... </optional> </optional>; -RAISE <optional> <replaceable class="parameter">level</replaceable> </optional> SQLSTATE '<replaceable class="parameter">sqlstate</>' <optional> USING <replaceable class="parameter">option</replaceable> = <replaceable class="parameter">expression</replaceable> <optional>, ... </optional> </optional>; +RAISE <optional> <replaceable class="parameter">level</replaceable> </optional> <replaceable class="parameter">condition_name</replaceable> <optional> USING <replaceable class="parameter">option</replaceable> = <replaceable class="parameter">expression</replaceable> <optional>, ... </optional> </optional>; +RAISE <optional> <replaceable class="parameter">level</replaceable> </optional> SQLSTATE '<replaceable class="parameter">sqlstate</replaceable>' <optional> USING <replaceable class="parameter">option</replaceable> = <replaceable class="parameter">expression</replaceable> <optional>, ... </optional> </optional>; RAISE <optional> <replaceable class="parameter">level</replaceable> </optional> USING <replaceable class="parameter">option</replaceable> = <replaceable class="parameter">expression</replaceable> <optional>, ... </optional>; RAISE ; </synopsis> @@ -3491,13 +3491,13 @@ RAISE ; Inside the format string, <literal>%</literal> is replaced by the string representation of the next optional argument's value. Write <literal>%%</literal> to emit a literal <literal>%</literal>. - The number of arguments must match the number of <literal>%</> + The number of arguments must match the number of <literal>%</literal> placeholders in the format string, or an error is raised during the compilation of the function. </para> <para> - In this example, the value of <literal>v_job_id</> will replace the + In this example, the value of <literal>v_job_id</literal> will replace the <literal>%</literal> in the string: <programlisting> RAISE NOTICE 'Calling cs_create_job(%)', v_job_id; @@ -3506,7 +3506,7 @@ RAISE NOTICE 'Calling cs_create_job(%)', v_job_id; <para> You can attach additional information to the error report by writing - <literal>USING</> followed by <replaceable + <literal>USING</literal> followed by <replaceable class="parameter">option</replaceable> = <replaceable class="parameter">expression</replaceable> items. Each <replaceable class="parameter">expression</replaceable> can be any @@ -3518,8 +3518,8 @@ RAISE NOTICE 'Calling cs_create_job(%)', v_job_id; <term><literal>MESSAGE</literal></term> <listitem> <para>Sets the error message text. This option can't be used in the - form of <command>RAISE</> that includes a format string - before <literal>USING</>.</para> + form of <command>RAISE</command> that includes a format string + before <literal>USING</literal>.</para> </listitem> </varlistentry> @@ -3577,13 +3577,13 @@ RAISE 'Duplicate user ID: %', user_id USING ERRCODE = '23505'; </para> <para> - There is a second <command>RAISE</> syntax in which the main argument + There is a second <command>RAISE</command> syntax in which the main argument is the condition name or SQLSTATE to be reported, for example: <programlisting> RAISE division_by_zero; RAISE SQLSTATE '22012'; </programlisting> - In this syntax, <literal>USING</> can be used to supply a custom + In this syntax, <literal>USING</literal> can be used to supply a custom error message, detail, or hint. Another way to do the earlier example is <programlisting> @@ -3592,25 +3592,25 @@ RAISE unique_violation USING MESSAGE = 'Duplicate user ID: ' || user_id; </para> <para> - Still another variant is to write <literal>RAISE USING</> or <literal>RAISE - <replaceable class="parameter">level</replaceable> USING</> and put - everything else into the <literal>USING</> list. + Still another variant is to write <literal>RAISE USING</literal> or <literal>RAISE + <replaceable class="parameter">level</replaceable> USING</literal> and put + everything else into the <literal>USING</literal> list. </para> <para> - The last variant of <command>RAISE</> has no parameters at all. - This form can only be used inside a <literal>BEGIN</> block's - <literal>EXCEPTION</> clause; + The last variant of <command>RAISE</command> has no parameters at all. + This form can only be used inside a <literal>BEGIN</literal> block's + <literal>EXCEPTION</literal> clause; it causes the error currently being handled to be re-thrown. </para> <note> <para> - Before <productname>PostgreSQL</> 9.1, <command>RAISE</> without + Before <productname>PostgreSQL</productname> 9.1, <command>RAISE</command> without parameters was interpreted as re-throwing the error from the block - containing the active exception handler. Thus an <literal>EXCEPTION</> + containing the active exception handler. Thus an <literal>EXCEPTION</literal> clause nested within that handler could not catch it, even if the - <command>RAISE</> was within the nested <literal>EXCEPTION</> clause's + <command>RAISE</command> was within the nested <literal>EXCEPTION</literal> clause's block. This was deemed surprising as well as being incompatible with Oracle's PL/SQL. </para> @@ -3619,7 +3619,7 @@ RAISE unique_violation USING MESSAGE = 'Duplicate user ID: ' || user_id; <para> If no condition name nor SQLSTATE is specified in a <command>RAISE EXCEPTION</command> command, the default is to use - <literal>RAISE_EXCEPTION</> (<literal>P0001</>). If no message + <literal>RAISE_EXCEPTION</literal> (<literal>P0001</literal>). If no message text is specified, the default is to use the condition name or SQLSTATE as message text. </para> @@ -3629,7 +3629,7 @@ RAISE unique_violation USING MESSAGE = 'Duplicate user ID: ' || user_id; When specifying an error code by SQLSTATE code, you are not limited to the predefined error codes, but can select any error code consisting of five digits and/or upper-case ASCII - letters, other than <literal>00000</>. It is recommended that + letters, other than <literal>00000</literal>. It is recommended that you avoid throwing error codes that end in three zeroes, because these are category codes and can only be trapped by trapping the whole category. @@ -3652,7 +3652,7 @@ RAISE unique_violation USING MESSAGE = 'Duplicate user ID: ' || user_id; </indexterm> <indexterm> - <primary><varname>plpgsql.check_asserts</> configuration parameter</primary> + <primary><varname>plpgsql.check_asserts</varname> configuration parameter</primary> </indexterm> <para> @@ -3667,7 +3667,7 @@ ASSERT <replaceable class="parameter">condition</replaceable> <optional> , <repl The <replaceable class="parameter">condition</replaceable> is a Boolean expression that is expected to always evaluate to true; if it does, the <command>ASSERT</command> statement does nothing further. If the - result is false or null, then an <literal>ASSERT_FAILURE</> exception + result is false or null, then an <literal>ASSERT_FAILURE</literal> exception is raised. (If an error occurs while evaluating the <replaceable class="parameter">condition</replaceable>, it is reported as a normal error.) @@ -3676,7 +3676,7 @@ ASSERT <replaceable class="parameter">condition</replaceable> <optional> , <repl <para> If the optional <replaceable class="parameter">message</replaceable> is provided, it is an expression whose result (if not null) replaces the - default error message text <quote>assertion failed</>, should + default error message text <quote>assertion failed</quote>, should the <replaceable class="parameter">condition</replaceable> fail. The <replaceable class="parameter">message</replaceable> expression is not evaluated in the normal case where the assertion succeeds. @@ -3684,15 +3684,15 @@ ASSERT <replaceable class="parameter">condition</replaceable> <optional> , <repl <para> Testing of assertions can be enabled or disabled via the configuration - parameter <literal>plpgsql.check_asserts</>, which takes a Boolean - value; the default is <literal>on</>. If this parameter - is <literal>off</> then <command>ASSERT</> statements do nothing. + parameter <literal>plpgsql.check_asserts</literal>, which takes a Boolean + value; the default is <literal>on</literal>. If this parameter + is <literal>off</literal> then <command>ASSERT</command> statements do nothing. </para> <para> Note that <command>ASSERT</command> is meant for detecting program bugs, not for reporting ordinary error conditions. Use - the <command>RAISE</> statement, described above, for that. + the <command>RAISE</command> statement, described above, for that. </para> </sect2> @@ -3710,11 +3710,11 @@ ASSERT <replaceable class="parameter">condition</replaceable> <optional> , <repl <para> <application>PL/pgSQL</application> can be used to define trigger procedures on data changes or database events. - A trigger procedure is created with the <command>CREATE FUNCTION</> + A trigger procedure is created with the <command>CREATE FUNCTION</command> command, declaring it as a function with no arguments and a return type of - <type>trigger</> (for data change triggers) or - <type>event_trigger</> (for database event triggers). - Special local variables named <varname>PG_<replaceable>something</></> are + <type>trigger</type> (for data change triggers) or + <type>event_trigger</type> (for database event triggers). + Special local variables named <varname>PG_<replaceable>something</replaceable></varname> are automatically defined to describe the condition that triggered the call. </para> @@ -3722,11 +3722,11 @@ ASSERT <replaceable class="parameter">condition</replaceable> <optional> , <repl <title>Triggers on Data Changes</title> <para> - A <link linkend="triggers">data change trigger</> is declared as a - function with no arguments and a return type of <type>trigger</>. + A <link linkend="triggers">data change trigger</link> is declared as a + function with no arguments and a return type of <type>trigger</type>. Note that the function must be declared with no arguments even if it - expects to receive some arguments specified in <command>CREATE TRIGGER</> - — such arguments are passed via <varname>TG_ARGV</>, as described + expects to receive some arguments specified in <command>CREATE TRIGGER</command> + — such arguments are passed via <varname>TG_ARGV</varname>, as described below. </para> @@ -3741,7 +3741,7 @@ ASSERT <replaceable class="parameter">condition</replaceable> <optional> , <repl <listitem> <para> Data type <type>RECORD</type>; variable holding the new - database row for <command>INSERT</>/<command>UPDATE</> operations in row-level + database row for <command>INSERT</command>/<command>UPDATE</command> operations in row-level triggers. This variable is unassigned in statement-level triggers and for <command>DELETE</command> operations. </para> @@ -3753,7 +3753,7 @@ ASSERT <replaceable class="parameter">condition</replaceable> <optional> , <repl <listitem> <para> Data type <type>RECORD</type>; variable holding the old - database row for <command>UPDATE</>/<command>DELETE</> operations in row-level + database row for <command>UPDATE</command>/<command>DELETE</command> operations in row-level triggers. This variable is unassigned in statement-level triggers and for <command>INSERT</command> operations. </para> @@ -3798,7 +3798,7 @@ ASSERT <replaceable class="parameter">condition</replaceable> <optional> , <repl <para> Data type <type>text</type>; a string of <literal>INSERT</literal>, <literal>UPDATE</literal>, - <literal>DELETE</literal>, or <literal>TRUNCATE</> + <literal>DELETE</literal>, or <literal>TRUNCATE</literal> telling for which operation the trigger was fired. </para> </listitem> @@ -3820,7 +3820,7 @@ ASSERT <replaceable class="parameter">condition</replaceable> <optional> , <repl <para> Data type <type>name</type>; the name of the table that caused the trigger invocation. This is now deprecated, and could disappear in a future - release. Use <literal>TG_TABLE_NAME</> instead. + release. Use <literal>TG_TABLE_NAME</literal> instead. </para> </listitem> </varlistentry> @@ -3862,7 +3862,7 @@ ASSERT <replaceable class="parameter">condition</replaceable> <optional> , <repl Data type array of <type>text</type>; the arguments from the <command>CREATE TRIGGER</command> statement. The index counts from 0. Invalid - indexes (less than 0 or greater than or equal to <varname>tg_nargs</>) + indexes (less than 0 or greater than or equal to <varname>tg_nargs</varname>) result in a null value. </para> </listitem> @@ -3877,20 +3877,20 @@ ASSERT <replaceable class="parameter">condition</replaceable> <optional> , <repl </para> <para> - Row-level triggers fired <literal>BEFORE</> can return null to signal the + Row-level triggers fired <literal>BEFORE</literal> can return null to signal the trigger manager to skip the rest of the operation for this row (i.e., subsequent triggers are not fired, and the - <command>INSERT</>/<command>UPDATE</>/<command>DELETE</> does not occur + <command>INSERT</command>/<command>UPDATE</command>/<command>DELETE</command> does not occur for this row). If a nonnull value is returned then the operation proceeds with that row value. Returning a row value different from the original value - of <varname>NEW</> alters the row that will be inserted or + of <varname>NEW</varname> alters the row that will be inserted or updated. Thus, if the trigger function wants the triggering action to succeed normally without altering the row value, <varname>NEW</varname> (or a value equal thereto) has to be returned. To alter the row to be stored, it is possible to - replace single values directly in <varname>NEW</> and return the - modified <varname>NEW</>, or to build a complete new record/row to + replace single values directly in <varname>NEW</varname> and return the + modified <varname>NEW</varname>, or to build a complete new record/row to return. In the case of a before-trigger on <command>DELETE</command>, the returned value has no direct effect, but it has to be nonnull to allow the trigger action to @@ -3901,28 +3901,28 @@ ASSERT <replaceable class="parameter">condition</replaceable> <optional> , <repl </para> <para> - <literal>INSTEAD OF</> triggers (which are always row-level triggers, + <literal>INSTEAD OF</literal> triggers (which are always row-level triggers, and may only be used on views) can return null to signal that they did not perform any updates, and that the rest of the operation for this row should be skipped (i.e., subsequent triggers are not fired, and the row is not counted in the rows-affected status for the surrounding - <command>INSERT</>/<command>UPDATE</>/<command>DELETE</>). + <command>INSERT</command>/<command>UPDATE</command>/<command>DELETE</command>). Otherwise a nonnull value should be returned, to signal that the trigger performed the requested operation. For - <command>INSERT</> and <command>UPDATE</> operations, the return value - should be <varname>NEW</>, which the trigger function may modify to - support <command>INSERT RETURNING</> and <command>UPDATE RETURNING</> + <command>INSERT</command> and <command>UPDATE</command> operations, the return value + should be <varname>NEW</varname>, which the trigger function may modify to + support <command>INSERT RETURNING</command> and <command>UPDATE RETURNING</command> (this will also affect the row value passed to any subsequent triggers, - or passed to a special <varname>EXCLUDED</> alias reference within - an <command>INSERT</> statement with an <literal>ON CONFLICT DO - UPDATE</> clause). For <command>DELETE</> operations, the return - value should be <varname>OLD</>. + or passed to a special <varname>EXCLUDED</varname> alias reference within + an <command>INSERT</command> statement with an <literal>ON CONFLICT DO + UPDATE</literal> clause). For <command>DELETE</command> operations, the return + value should be <varname>OLD</varname>. </para> <para> The return value of a row-level trigger fired <literal>AFTER</literal> or a statement-level trigger - fired <literal>BEFORE</> or <literal>AFTER</> is + fired <literal>BEFORE</literal> or <literal>AFTER</literal> is always ignored; it might as well be null. However, any of these types of triggers might still abort the entire operation by raising an error. </para> @@ -4267,9 +4267,9 @@ SELECT * FROM sales_summary_bytime; </example> <para> - <literal>AFTER</> triggers can also make use of <firstterm>transition - tables</> to inspect the entire set of rows changed by the triggering - statement. The <command>CREATE TRIGGER</> command assigns names to one + <literal>AFTER</literal> triggers can also make use of <firstterm>transition + tables</firstterm> to inspect the entire set of rows changed by the triggering + statement. The <command>CREATE TRIGGER</command> command assigns names to one or both transition tables, and then the function can refer to those names as though they were read-only temporary tables. <xref linkend="plpgsql-trigger-audit-transition-example"> shows an example. @@ -4286,10 +4286,10 @@ SELECT * FROM sales_summary_bytime; table. This can be significantly faster than the row-trigger approach when the invoking statement has modified many rows. Notice that we must make a separate trigger declaration for each kind of event, since the - <literal>REFERENCING</> clauses must be different for each case. But + <literal>REFERENCING</literal> clauses must be different for each case. But this does not stop us from using a single trigger function if we choose. (In practice, it might be better to use three separate functions and - avoid the run-time tests on <varname>TG_OP</>.) + avoid the run-time tests on <varname>TG_OP</varname>.) </para> <programlisting> @@ -4348,10 +4348,10 @@ CREATE TRIGGER emp_audit_del <para> <application>PL/pgSQL</application> can be used to define - <link linkend="event-triggers">event triggers</>. - <productname>PostgreSQL</> requires that a procedure that + <link linkend="event-triggers">event triggers</link>. + <productname>PostgreSQL</productname> requires that a procedure that is to be called as an event trigger must be declared as a function with - no arguments and a return type of <literal>event_trigger</>. + no arguments and a return type of <literal>event_trigger</literal>. </para> <para> @@ -4410,29 +4410,29 @@ CREATE EVENT TRIGGER snitch ON ddl_command_start EXECUTE PROCEDURE snitch(); </sect1> <sect1 id="plpgsql-implementation"> - <title><application>PL/pgSQL</> Under the Hood</title> + <title><application>PL/pgSQL</application> Under the Hood</title> <para> This section discusses some implementation details that are - frequently important for <application>PL/pgSQL</> users to know. + frequently important for <application>PL/pgSQL</application> users to know. </para> <sect2 id="plpgsql-var-subst"> <title>Variable Substitution</title> <para> - SQL statements and expressions within a <application>PL/pgSQL</> function + SQL statements and expressions within a <application>PL/pgSQL</application> function can refer to variables and parameters of the function. Behind the scenes, - <application>PL/pgSQL</> substitutes query parameters for such references. + <application>PL/pgSQL</application> substitutes query parameters for such references. Parameters will only be substituted in places where a parameter or column reference is syntactically allowed. As an extreme case, consider this example of poor programming style: <programlisting> INSERT INTO foo (foo) VALUES (foo); </programlisting> - The first occurrence of <literal>foo</> must syntactically be a table + The first occurrence of <literal>foo</literal> must syntactically be a table name, so it will not be substituted, even if the function has a variable - named <literal>foo</>. The second occurrence must be the name of a + named <literal>foo</literal>. The second occurrence must be the name of a column of the table, so it will not be substituted either. Only the third occurrence is a candidate to be a reference to the function's variable. @@ -4453,18 +4453,18 @@ INSERT INTO foo (foo) VALUES (foo); <programlisting> INSERT INTO dest (col) SELECT foo + bar FROM src; </programlisting> - Here, <literal>dest</> and <literal>src</> must be table names, and - <literal>col</> must be a column of <literal>dest</>, but <literal>foo</> - and <literal>bar</> might reasonably be either variables of the function - or columns of <literal>src</>. + Here, <literal>dest</literal> and <literal>src</literal> must be table names, and + <literal>col</literal> must be a column of <literal>dest</literal>, but <literal>foo</literal> + and <literal>bar</literal> might reasonably be either variables of the function + or columns of <literal>src</literal>. </para> <para> - By default, <application>PL/pgSQL</> will report an error if a name + By default, <application>PL/pgSQL</application> will report an error if a name in a SQL statement could refer to either a variable or a table column. You can fix such a problem by renaming the variable or column, or by qualifying the ambiguous reference, or by telling - <application>PL/pgSQL</> which interpretation to prefer. + <application>PL/pgSQL</application> which interpretation to prefer. </para> <para> @@ -4473,13 +4473,13 @@ INSERT INTO dest (col) SELECT foo + bar FROM src; different naming convention for <application>PL/pgSQL</application> variables than you use for column names. For example, if you consistently name function variables - <literal>v_<replaceable>something</></literal> while none of your - column names start with <literal>v_</>, no conflicts will occur. + <literal>v_<replaceable>something</replaceable></literal> while none of your + column names start with <literal>v_</literal>, no conflicts will occur. </para> <para> Alternatively you can qualify ambiguous references to make them clear. - In the above example, <literal>src.foo</> would be an unambiguous reference + In the above example, <literal>src.foo</literal> would be an unambiguous reference to the table column. To create an unambiguous reference to a variable, declare it in a labeled block and use the block's label (see <xref linkend="plpgsql-structure">). For example, @@ -4491,37 +4491,37 @@ BEGIN foo := ...; INSERT INTO dest (col) SELECT block.foo + bar FROM src; </programlisting> - Here <literal>block.foo</> means the variable even if there is a column - <literal>foo</> in <literal>src</>. Function parameters, as well as - special variables such as <literal>FOUND</>, can be qualified by the + Here <literal>block.foo</literal> means the variable even if there is a column + <literal>foo</literal> in <literal>src</literal>. Function parameters, as well as + special variables such as <literal>FOUND</literal>, can be qualified by the function's name, because they are implicitly declared in an outer block labeled with the function's name. </para> <para> Sometimes it is impractical to fix all the ambiguous references in a - large body of <application>PL/pgSQL</> code. In such cases you can - specify that <application>PL/pgSQL</> should resolve ambiguous references - as the variable (which is compatible with <application>PL/pgSQL</>'s + large body of <application>PL/pgSQL</application> code. In such cases you can + specify that <application>PL/pgSQL</application> should resolve ambiguous references + as the variable (which is compatible with <application>PL/pgSQL</application>'s behavior before <productname>PostgreSQL</productname> 9.0), or as the table column (which is compatible with some other systems such as <productname>Oracle</productname>). </para> <indexterm> - <primary><varname>plpgsql.variable_conflict</> configuration parameter</primary> + <primary><varname>plpgsql.variable_conflict</varname> configuration parameter</primary> </indexterm> <para> To change this behavior on a system-wide basis, set the configuration - parameter <literal>plpgsql.variable_conflict</> to one of - <literal>error</>, <literal>use_variable</>, or - <literal>use_column</> (where <literal>error</> is the factory default). + parameter <literal>plpgsql.variable_conflict</literal> to one of + <literal>error</literal>, <literal>use_variable</literal>, or + <literal>use_column</literal> (where <literal>error</literal> is the factory default). This parameter affects subsequent compilations - of statements in <application>PL/pgSQL</> functions, but not statements + of statements in <application>PL/pgSQL</application> functions, but not statements already compiled in the current session. Because changing this setting - can cause unexpected changes in the behavior of <application>PL/pgSQL</> + can cause unexpected changes in the behavior of <application>PL/pgSQL</application> functions, it can only be changed by a superuser. </para> @@ -4535,7 +4535,7 @@ BEGIN #variable_conflict use_column </programlisting> These commands affect only the function they are written in, and override - the setting of <literal>plpgsql.variable_conflict</>. An example is + the setting of <literal>plpgsql.variable_conflict</literal>. An example is <programlisting> CREATE FUNCTION stamp_user(id int, comment text) RETURNS void AS $$ #variable_conflict use_variable @@ -4547,15 +4547,15 @@ CREATE FUNCTION stamp_user(id int, comment text) RETURNS void AS $$ END; $$ LANGUAGE plpgsql; </programlisting> - In the <literal>UPDATE</> command, <literal>curtime</>, <literal>comment</>, - and <literal>id</> will refer to the function's variable and parameters - whether or not <literal>users</> has columns of those names. Notice - that we had to qualify the reference to <literal>users.id</> in the - <literal>WHERE</> clause to make it refer to the table column. - But we did not have to qualify the reference to <literal>comment</> - as a target in the <literal>UPDATE</> list, because syntactically - that must be a column of <literal>users</>. We could write the same - function without depending on the <literal>variable_conflict</> setting + In the <literal>UPDATE</literal> command, <literal>curtime</literal>, <literal>comment</literal>, + and <literal>id</literal> will refer to the function's variable and parameters + whether or not <literal>users</literal> has columns of those names. Notice + that we had to qualify the reference to <literal>users.id</literal> in the + <literal>WHERE</literal> clause to make it refer to the table column. + But we did not have to qualify the reference to <literal>comment</literal> + as a target in the <literal>UPDATE</literal> list, because syntactically + that must be a column of <literal>users</literal>. We could write the same + function without depending on the <literal>variable_conflict</literal> setting in this way: <programlisting> CREATE FUNCTION stamp_user(id int, comment text) RETURNS void AS $$ @@ -4572,19 +4572,19 @@ $$ LANGUAGE plpgsql; <para> Variable substitution does not happen in the command string given - to <command>EXECUTE</> or one of its variants. If you need to + to <command>EXECUTE</command> or one of its variants. If you need to insert a varying value into such a command, do so as part of - constructing the string value, or use <literal>USING</>, as illustrated in + constructing the string value, or use <literal>USING</literal>, as illustrated in <xref linkend="plpgsql-statements-executing-dyn">. </para> <para> - Variable substitution currently works only in <command>SELECT</>, - <command>INSERT</>, <command>UPDATE</>, and <command>DELETE</> commands, + Variable substitution currently works only in <command>SELECT</command>, + <command>INSERT</command>, <command>UPDATE</command>, and <command>DELETE</command> commands, because the main SQL engine allows query parameters only in these commands. To use a non-constant name or value in other statement types (generically called utility statements), you must construct - the utility statement as a string and <command>EXECUTE</> it. + the utility statement as a string and <command>EXECUTE</command> it. </para> </sect2> @@ -4593,22 +4593,22 @@ $$ LANGUAGE plpgsql; <title>Plan Caching</title> <para> - The <application>PL/pgSQL</> interpreter parses the function's source + The <application>PL/pgSQL</application> interpreter parses the function's source text and produces an internal binary instruction tree the first time the function is called (within each session). The instruction tree fully translates the - <application>PL/pgSQL</> statement structure, but individual + <application>PL/pgSQL</application> statement structure, but individual <acronym>SQL</acronym> expressions and <acronym>SQL</acronym> commands used in the function are not translated immediately. </para> <para> <indexterm> - <primary>preparing a query</> - <secondary>in PL/pgSQL</> + <primary>preparing a query</primary> + <secondary>in PL/pgSQL</secondary> </indexterm> As each expression and <acronym>SQL</acronym> command is first - executed in the function, the <application>PL/pgSQL</> interpreter + executed in the function, the <application>PL/pgSQL</application> interpreter parses and analyzes the command to create a prepared statement, using the <acronym>SPI</acronym> manager's <function>SPI_prepare</function> function. @@ -4624,17 +4624,17 @@ $$ LANGUAGE plpgsql; </para> <para> - <application>PL/pgSQL</> (or more precisely, the SPI manager) can + <application>PL/pgSQL</application> (or more precisely, the SPI manager) can furthermore attempt to cache the execution plan associated with any particular prepared statement. If a cached plan is not used, then a fresh execution plan is generated on each visit to the statement, - and the current parameter values (that is, <application>PL/pgSQL</> + and the current parameter values (that is, <application>PL/pgSQL</application> variable values) can be used to optimize the selected plan. If the statement has no parameters, or is executed many times, the SPI manager - will consider creating a <firstterm>generic</> plan that is not dependent + will consider creating a <firstterm>generic</firstterm> plan that is not dependent on specific parameter values, and caching that for re-use. Typically this will happen only if the execution plan is not very sensitive to - the values of the <application>PL/pgSQL</> variables referenced in it. + the values of the <application>PL/pgSQL</application> variables referenced in it. If it is, generating a plan each time is a net win. See <xref linkend="sql-prepare"> for more information about the behavior of prepared statements. @@ -4670,7 +4670,7 @@ $$ LANGUAGE plpgsql; for each trigger function and table combination, not just for each function. This alleviates some of the problems with varying data types; for instance, a trigger function will be able to work - successfully with a column named <literal>key</> even if it happens + successfully with a column named <literal>key</literal> even if it happens to have different types in different tables. </para> @@ -4720,8 +4720,8 @@ $$ LANGUAGE plpgsql; <command>INSERT</command> is analyzed, and then used in all invocations of <function>logfunc1</function> during the lifetime of the session. Needless to say, this isn't what the programmer - wanted. A better idea is to use the <literal>now()</> or - <literal>current_timestamp</> function. + wanted. A better idea is to use the <literal>now()</literal> or + <literal>current_timestamp</literal> function. </para> <para> @@ -4737,7 +4737,7 @@ $$ LANGUAGE plpgsql; functions for the conversion. So, the computed time stamp is updated on each execution as the programmer expects. Even though this happens to work as expected, it's not terribly efficient, so - use of the <literal>now()</> function would still be a better idea. + use of the <literal>now()</literal> function would still be a better idea. </para> </sect2> @@ -4749,12 +4749,12 @@ $$ LANGUAGE plpgsql; <para> One good way to develop in - <application>PL/pgSQL</> is to use the text editor of your + <application>PL/pgSQL</application> is to use the text editor of your choice to create your functions, and in another window, use <application>psql</application> to load and test those functions. If you are doing it this way, it is a good idea to write the function using <command>CREATE OR - REPLACE FUNCTION</>. That way you can just reload the file to update + REPLACE FUNCTION</command>. That way you can just reload the file to update the function definition. For example: <programlisting> CREATE OR REPLACE FUNCTION testfunc(integer) RETURNS integer AS $$ @@ -4773,10 +4773,10 @@ $$ LANGUAGE plpgsql; </para> <para> - Another good way to develop in <application>PL/pgSQL</> is with a + Another good way to develop in <application>PL/pgSQL</application> is with a GUI database access tool that facilitates development in a procedural language. One example of such a tool is - <application>pgAdmin</>, although others exist. These tools often + <application>pgAdmin</application>, although others exist. These tools often provide convenient features such as escaping single quotes and making it easier to recreate and debug functions. </para> @@ -4785,7 +4785,7 @@ $$ LANGUAGE plpgsql; <title>Handling of Quotation Marks</title> <para> - The code of a <application>PL/pgSQL</> function is specified in + The code of a <application>PL/pgSQL</application> function is specified in <command>CREATE FUNCTION</command> as a string literal. If you write the string literal in the ordinary way with surrounding single quotes, then any single quotes inside the function body @@ -4795,7 +4795,7 @@ $$ LANGUAGE plpgsql; the code can become downright incomprehensible, because you can easily find yourself needing half a dozen or more adjacent quote marks. It's recommended that you instead write the function body as a - <quote>dollar-quoted</> string literal (see <xref + <quote>dollar-quoted</quote> string literal (see <xref linkend="sql-syntax-dollar-quoting">). In the dollar-quoting approach, you never double any quote marks, but instead take care to choose a different dollar-quoting delimiter for each level of @@ -4807,9 +4807,9 @@ CREATE OR REPLACE FUNCTION testfunc(integer) RETURNS integer AS $PROC$ $PROC$ LANGUAGE plpgsql; </programlisting> Within this, you might use quote marks for simple literal strings in - SQL commands and <literal>$$</> to delimit fragments of SQL commands + SQL commands and <literal>$$</literal> to delimit fragments of SQL commands that you are assembling as strings. If you need to quote text that - includes <literal>$$</>, you could use <literal>$Q$</>, and so on. + includes <literal>$$</literal>, you could use <literal>$Q$</literal>, and so on. </para> <para> @@ -4830,7 +4830,7 @@ CREATE FUNCTION foo() RETURNS integer AS ' ' LANGUAGE plpgsql; </programlisting> Anywhere within a single-quoted function body, quote marks - <emphasis>must</> appear in pairs. + <emphasis>must</emphasis> appear in pairs. </para> </listitem> </varlistentry> @@ -4849,7 +4849,7 @@ SELECT * FROM users WHERE f_name=''foobar''; a_output := 'Blah'; SELECT * FROM users WHERE f_name='foobar'; </programlisting> - which is exactly what the <application>PL/pgSQL</> parser would see + which is exactly what the <application>PL/pgSQL</application> parser would see in either case. </para> </listitem> @@ -4873,7 +4873,7 @@ a_output := a_output || '' AND name LIKE ''''foobar'''' AND xyz'' a_output := a_output || $$ AND name LIKE 'foobar' AND xyz$$ </programlisting> being careful that any dollar-quote delimiters around this are not - just <literal>$$</>. + just <literal>$$</literal>. </para> </listitem> </varlistentry> @@ -4942,20 +4942,20 @@ a_output := a_output || $$ if v_$$ || referrer_keys.kind || $$ like '$$ <para> To aid the user in finding instances of simple but common problems before - they cause harm, <application>PL/pgSQL</> provides additional - <replaceable>checks</>. When enabled, depending on the configuration, they - can be used to emit either a <literal>WARNING</> or an <literal>ERROR</> + they cause harm, <application>PL/pgSQL</application> provides additional + <replaceable>checks</replaceable>. When enabled, depending on the configuration, they + can be used to emit either a <literal>WARNING</literal> or an <literal>ERROR</literal> during the compilation of a function. A function which has received - a <literal>WARNING</> can be executed without producing further messages, + a <literal>WARNING</literal> can be executed without producing further messages, so you are advised to test in a separate development environment. </para> <para> These additional checks are enabled through the configuration variables - <varname>plpgsql.extra_warnings</> for warnings and - <varname>plpgsql.extra_errors</> for errors. Both can be set either to - a comma-separated list of checks, <literal>"none"</> or <literal>"all"</>. - The default is <literal>"none"</>. Currently the list of available checks + <varname>plpgsql.extra_warnings</varname> for warnings and + <varname>plpgsql.extra_errors</varname> for errors. Both can be set either to + a comma-separated list of checks, <literal>"none"</literal> or <literal>"all"</literal>. + The default is <literal>"none"</literal>. Currently the list of available checks includes only one: <variablelist> <varlistentry> @@ -4968,8 +4968,8 @@ a_output := a_output || $$ if v_$$ || referrer_keys.kind || $$ like '$$ </varlistentry> </variablelist> - The following example shows the effect of <varname>plpgsql.extra_warnings</> - set to <varname>shadowed_variables</>: + The following example shows the effect of <varname>plpgsql.extra_warnings</varname> + set to <varname>shadowed_variables</varname>: <programlisting> SET plpgsql.extra_warnings TO 'shadowed_variables'; @@ -5006,10 +5006,10 @@ CREATE FUNCTION <para> This section explains differences between - <productname>PostgreSQL</>'s <application>PL/pgSQL</application> + <productname>PostgreSQL</productname>'s <application>PL/pgSQL</application> language and Oracle's <application>PL/SQL</application> language, to help developers who port applications from - <trademark class="registered">Oracle</> to <productname>PostgreSQL</>. + <trademark class="registered">Oracle</trademark> to <productname>PostgreSQL</productname>. </para> <para> @@ -5017,7 +5017,7 @@ CREATE FUNCTION aspects. It is a block-structured, imperative language, and all variables have to be declared. Assignments, loops, conditionals are similar. The main differences you should keep in mind when - porting from <application>PL/SQL</> to + porting from <application>PL/SQL</application> to <application>PL/pgSQL</application> are: <itemizedlist> @@ -5025,21 +5025,21 @@ CREATE FUNCTION <para> If a name used in a SQL command could be either a column name of a table or a reference to a variable of the function, - <application>PL/SQL</> treats it as a column name. This corresponds - to <application>PL/pgSQL</>'s - <literal>plpgsql.variable_conflict</> = <literal>use_column</> + <application>PL/SQL</application> treats it as a column name. This corresponds + to <application>PL/pgSQL</application>'s + <literal>plpgsql.variable_conflict</literal> = <literal>use_column</literal> behavior, which is not the default, as explained in <xref linkend="plpgsql-var-subst">. It's often best to avoid such ambiguities in the first place, but if you have to port a large amount of code that depends on - this behavior, setting <literal>variable_conflict</> may be the + this behavior, setting <literal>variable_conflict</literal> may be the best solution. </para> </listitem> <listitem> <para> - In <productname>PostgreSQL</> the function body must be written as + In <productname>PostgreSQL</productname> the function body must be written as a string literal. Therefore you need to use dollar quoting or escape single quotes in the function body. (See <xref linkend="plpgsql-quote-tips">.) @@ -5049,10 +5049,10 @@ CREATE FUNCTION <listitem> <para> Data type names often need translation. For example, in Oracle string - values are commonly declared as being of type <type>varchar2</>, which + values are commonly declared as being of type <type>varchar2</type>, which is a non-SQL-standard type. In <productname>PostgreSQL</productname>, - use type <type>varchar</> or <type>text</> instead. Similarly, replace - type <type>number</> with <type>numeric</>, or use some other numeric + use type <type>varchar</type> or <type>text</type> instead. Similarly, replace + type <type>number</type> with <type>numeric</type>, or use some other numeric data type if there's a more appropriate one. </para> </listitem> @@ -5074,9 +5074,9 @@ CREATE FUNCTION <listitem> <para> - Integer <command>FOR</> loops with <literal>REVERSE</> work - differently: <application>PL/SQL</> counts down from the second - number to the first, while <application>PL/pgSQL</> counts down + Integer <command>FOR</command> loops with <literal>REVERSE</literal> work + differently: <application>PL/SQL</application> counts down from the second + number to the first, while <application>PL/pgSQL</application> counts down from the first number to the second, requiring the loop bounds to be swapped when porting. This incompatibility is unfortunate but is unlikely to be changed. (See <xref @@ -5086,9 +5086,9 @@ CREATE FUNCTION <listitem> <para> - <command>FOR</> loops over queries (other than cursors) also work + <command>FOR</command> loops over queries (other than cursors) also work differently: the target variable(s) must have been declared, - whereas <application>PL/SQL</> always declares them implicitly. + whereas <application>PL/SQL</application> always declares them implicitly. An advantage of this is that the variable values are still accessible after the loop exits. </para> @@ -5109,14 +5109,14 @@ CREATE FUNCTION <para> <xref linkend="pgsql-porting-ex1"> shows how to port a simple - function from <application>PL/SQL</> to <application>PL/pgSQL</>. + function from <application>PL/SQL</application> to <application>PL/pgSQL</application>. </para> <example id="pgsql-porting-ex1"> - <title>Porting a Simple Function from <application>PL/SQL</> to <application>PL/pgSQL</></title> + <title>Porting a Simple Function from <application>PL/SQL</application> to <application>PL/pgSQL</application></title> <para> - Here is an <productname>Oracle</productname> <application>PL/SQL</> function: + Here is an <productname>Oracle</productname> <application>PL/SQL</application> function: <programlisting> CREATE OR REPLACE FUNCTION cs_fmt_browser_version(v_name varchar2, v_version varchar2) @@ -5134,14 +5134,14 @@ show errors; <para> Let's go through this function and see the differences compared to - <application>PL/pgSQL</>: + <application>PL/pgSQL</application>: <itemizedlist> <listitem> <para> - The type name <type>varchar2</> has to be changed to <type>varchar</> - or <type>text</>. In the examples in this section, we'll - use <type>varchar</>, but <type>text</> is often a better choice if + The type name <type>varchar2</type> has to be changed to <type>varchar</type> + or <type>text</type>. In the examples in this section, we'll + use <type>varchar</type>, but <type>text</type> is often a better choice if you do not need specific string length limits. </para> </listitem> @@ -5152,17 +5152,17 @@ show errors; prototype (not the function body) becomes <literal>RETURNS</literal> in <productname>PostgreSQL</productname>. - Also, <literal>IS</> becomes <literal>AS</>, and you need to - add a <literal>LANGUAGE</> clause because <application>PL/pgSQL</> + Also, <literal>IS</literal> becomes <literal>AS</literal>, and you need to + add a <literal>LANGUAGE</literal> clause because <application>PL/pgSQL</application> is not the only possible function language. </para> </listitem> <listitem> <para> - In <productname>PostgreSQL</>, the function body is considered + In <productname>PostgreSQL</productname>, the function body is considered to be a string literal, so you need to use quote marks or dollar - quotes around it. This substitutes for the terminating <literal>/</> + quotes around it. This substitutes for the terminating <literal>/</literal> in the Oracle approach. </para> </listitem> @@ -5170,7 +5170,7 @@ show errors; <listitem> <para> The <literal>show errors</literal> command does not exist in - <productname>PostgreSQL</>, and is not needed since errors are + <productname>PostgreSQL</productname>, and is not needed since errors are reported automatically. </para> </listitem> @@ -5179,7 +5179,7 @@ show errors; <para> This is how this function would look when ported to - <productname>PostgreSQL</>: + <productname>PostgreSQL</productname>: <programlisting> CREATE OR REPLACE FUNCTION cs_fmt_browser_version(v_name varchar, @@ -5203,7 +5203,7 @@ $$ LANGUAGE plpgsql; </para> <example id="plpgsql-porting-ex2"> - <title>Porting a Function that Creates Another Function from <application>PL/SQL</> to <application>PL/pgSQL</></title> + <title>Porting a Function that Creates Another Function from <application>PL/SQL</application> to <application>PL/pgSQL</application></title> <para> The following procedure grabs rows from a @@ -5242,7 +5242,7 @@ show errors; </para> <para> - Here is how this function would end up in <productname>PostgreSQL</>: + Here is how this function would end up in <productname>PostgreSQL</productname>: <programlisting> CREATE OR REPLACE FUNCTION cs_update_referrer_type_proc() RETURNS void AS $func$ DECLARE @@ -5277,24 +5277,24 @@ END; $func$ LANGUAGE plpgsql; </programlisting> Notice how the body of the function is built separately and passed - through <literal>quote_literal</> to double any quote marks in it. This + through <literal>quote_literal</literal> to double any quote marks in it. This technique is needed because we cannot safely use dollar quoting for defining the new function: we do not know for sure what strings will - be interpolated from the <structfield>referrer_key.key_string</> field. - (We are assuming here that <structfield>referrer_key.kind</> can be - trusted to always be <literal>host</>, <literal>domain</>, or - <literal>url</>, but <structfield>referrer_key.key_string</> might be + be interpolated from the <structfield>referrer_key.key_string</structfield> field. + (We are assuming here that <structfield>referrer_key.kind</structfield> can be + trusted to always be <literal>host</literal>, <literal>domain</literal>, or + <literal>url</literal>, but <structfield>referrer_key.key_string</structfield> might be anything, in particular it might contain dollar signs.) This function is actually an improvement on the Oracle original, because it will - not generate broken code when <structfield>referrer_key.key_string</> or - <structfield>referrer_key.referrer_type</> contain quote marks. + not generate broken code when <structfield>referrer_key.key_string</structfield> or + <structfield>referrer_key.referrer_type</structfield> contain quote marks. </para> </example> <para> <xref linkend="plpgsql-porting-ex3"> shows how to port a function - with <literal>OUT</> parameters and string manipulation. - <productname>PostgreSQL</> does not have a built-in + with <literal>OUT</literal> parameters and string manipulation. + <productname>PostgreSQL</productname> does not have a built-in <function>instr</function> function, but you can create one using a combination of other functions. In <xref linkend="plpgsql-porting-appendix"> there is a @@ -5305,8 +5305,8 @@ $func$ LANGUAGE plpgsql; <example id="plpgsql-porting-ex3"> <title>Porting a Procedure With String Manipulation and - <literal>OUT</> Parameters from <application>PL/SQL</> to - <application>PL/pgSQL</></title> + <literal>OUT</literal> Parameters from <application>PL/SQL</application> to + <application>PL/pgSQL</application></title> <para> The following <productname>Oracle</productname> PL/SQL procedure is used @@ -5357,7 +5357,7 @@ show errors; </para> <para> - Here is a possible translation into <application>PL/pgSQL</>: + Here is a possible translation into <application>PL/pgSQL</application>: <programlisting> CREATE OR REPLACE FUNCTION cs_parse_url( v_url IN VARCHAR, @@ -5411,7 +5411,7 @@ SELECT * FROM cs_parse_url('http://foobar.com/query.cgi?baz'); </para> <example id="plpgsql-porting-ex4"> - <title>Porting a Procedure from <application>PL/SQL</> to <application>PL/pgSQL</></title> + <title>Porting a Procedure from <application>PL/SQL</application> to <application>PL/pgSQL</application></title> <para> The Oracle version: @@ -5447,20 +5447,20 @@ show errors </para> <para> - Procedures like this can easily be converted into <productname>PostgreSQL</> + Procedures like this can easily be converted into <productname>PostgreSQL</productname> functions returning <type>void</type>. This procedure in particular is interesting because it can teach us some things: <calloutlist> <callout arearefs="co.plpgsql-porting-pragma"> <para> - There is no <literal>PRAGMA</literal> statement in <productname>PostgreSQL</>. + There is no <literal>PRAGMA</literal> statement in <productname>PostgreSQL</productname>. </para> </callout> <callout arearefs="co.plpgsql-porting-locktable"> <para> - If you do a <command>LOCK TABLE</command> in <application>PL/pgSQL</>, + If you do a <command>LOCK TABLE</command> in <application>PL/pgSQL</application>, the lock will not be released until the calling transaction is finished. </para> @@ -5468,9 +5468,9 @@ show errors <callout arearefs="co.plpgsql-porting-commit"> <para> - You cannot issue <command>COMMIT</> in a + You cannot issue <command>COMMIT</command> in a <application>PL/pgSQL</application> function. The function is - running within some outer transaction and so <command>COMMIT</> + running within some outer transaction and so <command>COMMIT</command> would imply terminating the function's execution. However, in this particular case it is not necessary anyway, because the lock obtained by the <command>LOCK TABLE</command> will be released when @@ -5481,7 +5481,7 @@ show errors </para> <para> - This is how we could port this procedure to <application>PL/pgSQL</>: + This is how we could port this procedure to <application>PL/pgSQL</application>: <programlisting> CREATE OR REPLACE FUNCTION cs_create_job(v_job_id integer) RETURNS void AS $$ @@ -5512,15 +5512,15 @@ $$ LANGUAGE plpgsql; <calloutlist> <callout arearefs="co.plpgsql-porting-raise"> <para> - The syntax of <literal>RAISE</> is considerably different from - Oracle's statement, although the basic case <literal>RAISE</> + The syntax of <literal>RAISE</literal> is considerably different from + Oracle's statement, although the basic case <literal>RAISE</literal> <replaceable class="parameter">exception_name</replaceable> works similarly. </para> </callout> <callout arearefs="co.plpgsql-porting-exception"> <para> - The exception names supported by <application>PL/pgSQL</> are + The exception names supported by <application>PL/pgSQL</application> are different from Oracle's. The set of built-in exception names is much larger (see <xref linkend="errcodes-appendix">). There is not currently a way to declare user-defined exception names, @@ -5530,7 +5530,7 @@ $$ LANGUAGE plpgsql; </calloutlist> The main functional difference between this procedure and the - Oracle equivalent is that the exclusive lock on the <literal>cs_jobs</> + Oracle equivalent is that the exclusive lock on the <literal>cs_jobs</literal> table will be held until the calling transaction completes. Also, if the caller later aborts (for example due to an error), the effects of this procedure will be rolled back. @@ -5543,7 +5543,7 @@ $$ LANGUAGE plpgsql; <para> This section explains a few other things to watch for when porting - Oracle <application>PL/SQL</> functions to + Oracle <application>PL/SQL</application> functions to <productname>PostgreSQL</productname>. </para> @@ -5551,9 +5551,9 @@ $$ LANGUAGE plpgsql; <title>Implicit Rollback after Exceptions</title> <para> - In <application>PL/pgSQL</>, when an exception is caught by an - <literal>EXCEPTION</> clause, all database changes since the block's - <literal>BEGIN</> are automatically rolled back. That is, the behavior + In <application>PL/pgSQL</application>, when an exception is caught by an + <literal>EXCEPTION</literal> clause, all database changes since the block's + <literal>BEGIN</literal> are automatically rolled back. That is, the behavior is equivalent to what you'd get in Oracle with: <programlisting> @@ -5571,10 +5571,10 @@ END; </programlisting> If you are translating an Oracle procedure that uses - <command>SAVEPOINT</> and <command>ROLLBACK TO</> in this style, - your task is easy: just omit the <command>SAVEPOINT</> and - <command>ROLLBACK TO</>. If you have a procedure that uses - <command>SAVEPOINT</> and <command>ROLLBACK TO</> in a different way + <command>SAVEPOINT</command> and <command>ROLLBACK TO</command> in this style, + your task is easy: just omit the <command>SAVEPOINT</command> and + <command>ROLLBACK TO</command>. If you have a procedure that uses + <command>SAVEPOINT</command> and <command>ROLLBACK TO</command> in a different way then some actual thought will be required. </para> </sect3> @@ -5583,9 +5583,9 @@ END; <title><command>EXECUTE</command></title> <para> - The <application>PL/pgSQL</> version of + The <application>PL/pgSQL</application> version of <command>EXECUTE</command> works similarly to the - <application>PL/SQL</> version, but you have to remember to use + <application>PL/SQL</application> version, but you have to remember to use <function>quote_literal</function> and <function>quote_ident</function> as described in <xref linkend="plpgsql-statements-executing-dyn">. Constructs of the @@ -5598,8 +5598,8 @@ END; <title>Optimizing <application>PL/pgSQL</application> Functions</title> <para> - <productname>PostgreSQL</> gives you two function creation - modifiers to optimize execution: <quote>volatility</> (whether + <productname>PostgreSQL</productname> gives you two function creation + modifiers to optimize execution: <quote>volatility</quote> (whether the function always returns the same result when given the same arguments) and <quote>strictness</quote> (whether the function returns null if any argument is null). Consult the <xref @@ -5631,7 +5631,7 @@ $$ LANGUAGE plpgsql STRICT IMMUTABLE; </para> <indexterm> - <primary><function>instr</> function</primary> + <primary><function>instr</function> function</primary> </indexterm> <programlisting> diff --git a/doc/src/sgml/plpython.sgml b/doc/src/sgml/plpython.sgml index 777a7ef780f..043225fc47c 100644 --- a/doc/src/sgml/plpython.sgml +++ b/doc/src/sgml/plpython.sgml @@ -3,8 +3,8 @@ <chapter id="plpython"> <title>PL/Python - Python Procedural Language</title> - <indexterm zone="plpython"><primary>PL/Python</></> - <indexterm zone="plpython"><primary>Python</></> + <indexterm zone="plpython"><primary>PL/Python</primary></indexterm> + <indexterm zone="plpython"><primary>Python</primary></indexterm> <para> The <application>PL/Python</application> procedural language allows @@ -14,22 +14,22 @@ <para> To install PL/Python in a particular database, use - <literal>CREATE EXTENSION plpythonu</> (but + <literal>CREATE EXTENSION plpythonu</literal> (but see also <xref linkend="plpython-python23">). </para> <tip> <para> - If a language is installed into <literal>template1</>, all subsequently + If a language is installed into <literal>template1</literal>, all subsequently created databases will have the language installed automatically. </para> </tip> <para> - PL/Python is only available as an <quote>untrusted</> language, meaning + PL/Python is only available as an <quote>untrusted</quote> language, meaning it does not offer any way of restricting what users can do in it and - is therefore named <literal>plpythonu</>. A trusted - variant <literal>plpython</> might become available in the future + is therefore named <literal>plpythonu</literal>. A trusted + variant <literal>plpython</literal> might become available in the future if a secure execution mechanism is developed in Python. The writer of a function in untrusted PL/Python must take care that the function cannot be used to do anything unwanted, since it will be @@ -383,8 +383,8 @@ $$ LANGUAGE plpythonu; For all other PostgreSQL return types, the return value is converted to a string using the Python built-in <literal>str</literal>, and the result is passed to the input function of the PostgreSQL data type. - (If the Python value is a <type>float</>, it is converted using - the <literal>repr</> built-in instead of <literal>str</literal>, to + (If the Python value is a <type>float</type>, it is converted using + the <literal>repr</literal> built-in instead of <literal>str</literal>, to avoid loss of precision.) </para> @@ -756,8 +756,8 @@ SELECT * FROM multiout_simple_setof(3); data between function calls. This variable is private static data. The global dictionary <varname>GD</varname> is public data, available to all Python functions within a session. Use with - care.<indexterm><primary>global data</> - <secondary>in PL/Python</></indexterm> + care.<indexterm><primary>global data</primary> + <secondary>in PL/Python</secondary></indexterm> </para> <para> @@ -800,38 +800,38 @@ $$ LANGUAGE plpythonu; <literal>TD</literal> contains trigger-related values: <variablelist> <varlistentry> - <term><literal>TD["event"]</></term> + <term><literal>TD["event"]</literal></term> <listitem> <para> contains the event as a string: - <literal>INSERT</>, <literal>UPDATE</>, - <literal>DELETE</>, or <literal>TRUNCATE</>. + <literal>INSERT</literal>, <literal>UPDATE</literal>, + <literal>DELETE</literal>, or <literal>TRUNCATE</literal>. </para> </listitem> </varlistentry> <varlistentry> - <term><literal>TD["when"]</></term> + <term><literal>TD["when"]</literal></term> <listitem> <para> - contains one of <literal>BEFORE</>, <literal>AFTER</>, or - <literal>INSTEAD OF</>. + contains one of <literal>BEFORE</literal>, <literal>AFTER</literal>, or + <literal>INSTEAD OF</literal>. </para> </listitem> </varlistentry> <varlistentry> - <term><literal>TD["level"]</></term> + <term><literal>TD["level"]</literal></term> <listitem> <para> - contains <literal>ROW</> or <literal>STATEMENT</>. + contains <literal>ROW</literal> or <literal>STATEMENT</literal>. </para> </listitem> </varlistentry> <varlistentry> - <term><literal>TD["new"]</></term> - <term><literal>TD["old"]</></term> + <term><literal>TD["new"]</literal></term> + <term><literal>TD["old"]</literal></term> <listitem> <para> For a row-level trigger, one or both of these fields contain @@ -841,7 +841,7 @@ $$ LANGUAGE plpythonu; </varlistentry> <varlistentry> - <term><literal>TD["name"]</></term> + <term><literal>TD["name"]</literal></term> <listitem> <para> contains the trigger name. @@ -850,7 +850,7 @@ $$ LANGUAGE plpythonu; </varlistentry> <varlistentry> - <term><literal>TD["table_name"]</></term> + <term><literal>TD["table_name"]</literal></term> <listitem> <para> contains the name of the table on which the trigger occurred. @@ -859,7 +859,7 @@ $$ LANGUAGE plpythonu; </varlistentry> <varlistentry> - <term><literal>TD["table_schema"]</></term> + <term><literal>TD["table_schema"]</literal></term> <listitem> <para> contains the schema of the table on which the trigger occurred. @@ -868,7 +868,7 @@ $$ LANGUAGE plpythonu; </varlistentry> <varlistentry> - <term><literal>TD["relid"]</></term> + <term><literal>TD["relid"]</literal></term> <listitem> <para> contains the OID of the table on which the trigger occurred. @@ -877,12 +877,12 @@ $$ LANGUAGE plpythonu; </varlistentry> <varlistentry> - <term><literal>TD["args"]</></term> + <term><literal>TD["args"]</literal></term> <listitem> <para> - If the <command>CREATE TRIGGER</> command - included arguments, they are available in <literal>TD["args"][0]</> to - <literal>TD["args"][<replaceable>n</>-1]</>. + If the <command>CREATE TRIGGER</command> command + included arguments, they are available in <literal>TD["args"][0]</literal> to + <literal>TD["args"][<replaceable>n</replaceable>-1]</literal>. </para> </listitem> </varlistentry> @@ -890,14 +890,14 @@ $$ LANGUAGE plpythonu; </para> <para> - If <literal>TD["when"]</literal> is <literal>BEFORE</> or - <literal>INSTEAD OF</> and - <literal>TD["level"]</literal> is <literal>ROW</>, you can + If <literal>TD["when"]</literal> is <literal>BEFORE</literal> or + <literal>INSTEAD OF</literal> and + <literal>TD["level"]</literal> is <literal>ROW</literal>, you can return <literal>None</literal> or <literal>"OK"</literal> from the Python function to indicate the row is unmodified, - <literal>"SKIP"</> to abort the event, or if <literal>TD["event"]</> - is <command>INSERT</> or <command>UPDATE</> you can return - <literal>"MODIFY"</> to indicate you've modified the new row. + <literal>"SKIP"</literal> to abort the event, or if <literal>TD["event"]</literal> + is <command>INSERT</command> or <command>UPDATE</command> you can return + <literal>"MODIFY"</literal> to indicate you've modified the new row. Otherwise the return value is ignored. </para> </sect1> @@ -1023,7 +1023,7 @@ foo = rv[i]["my_column"] <term><literal>plpy.<function>execute</function>(<replaceable>plan</replaceable> [, <replaceable>arguments</replaceable> [, <replaceable>max-rows</replaceable>]])</literal></term> <listitem> <para> - <indexterm><primary>preparing a query</><secondary>in PL/Python</></indexterm> + <indexterm><primary>preparing a query</primary><secondary>in PL/Python</secondary></indexterm> <function>plpy.prepare</function> prepares the execution plan for a query. It is called with a query string and a list of parameter types, if you have parameter references in the query. For example: @@ -1371,22 +1371,22 @@ $$ LANGUAGE plpythonu; <para> The <literal>plpy</literal> module also provides the functions <simplelist> - <member><literal>plpy.debug(<replaceable>msg, **kwargs</>)</literal></member> - <member><literal>plpy.log(<replaceable>msg, **kwargs</>)</literal></member> - <member><literal>plpy.info(<replaceable>msg, **kwargs</>)</literal></member> - <member><literal>plpy.notice(<replaceable>msg, **kwargs</>)</literal></member> - <member><literal>plpy.warning(<replaceable>msg, **kwargs</>)</literal></member> - <member><literal>plpy.error(<replaceable>msg, **kwargs</>)</literal></member> - <member><literal>plpy.fatal(<replaceable>msg, **kwargs</>)</literal></member> + <member><literal>plpy.debug(<replaceable>msg, **kwargs</replaceable>)</literal></member> + <member><literal>plpy.log(<replaceable>msg, **kwargs</replaceable>)</literal></member> + <member><literal>plpy.info(<replaceable>msg, **kwargs</replaceable>)</literal></member> + <member><literal>plpy.notice(<replaceable>msg, **kwargs</replaceable>)</literal></member> + <member><literal>plpy.warning(<replaceable>msg, **kwargs</replaceable>)</literal></member> + <member><literal>plpy.error(<replaceable>msg, **kwargs</replaceable>)</literal></member> + <member><literal>plpy.fatal(<replaceable>msg, **kwargs</replaceable>)</literal></member> </simplelist> - <indexterm><primary>elog</><secondary>in PL/Python</></indexterm> + <indexterm><primary>elog</primary><secondary>in PL/Python</secondary></indexterm> <function>plpy.error</function> and <function>plpy.fatal</function> actually raise a Python exception which, if uncaught, propagates out to the calling query, causing the current transaction or subtransaction to - be aborted. <literal>raise plpy.Error(<replaceable>msg</>)</literal> and - <literal>raise plpy.Fatal(<replaceable>msg</>)</literal> are - equivalent to calling <literal>plpy.error(<replaceable>msg</>)</literal> and - <literal>plpy.fatal(<replaceable>msg</>)</literal>, respectively but + be aborted. <literal>raise plpy.Error(<replaceable>msg</replaceable>)</literal> and + <literal>raise plpy.Fatal(<replaceable>msg</replaceable>)</literal> are + equivalent to calling <literal>plpy.error(<replaceable>msg</replaceable>)</literal> and + <literal>plpy.fatal(<replaceable>msg</replaceable>)</literal>, respectively but the <literal>raise</literal> form does not allow passing keyword arguments. The other functions only generate messages of different priority levels. Whether messages of a particular priority are reported to the client, @@ -1397,7 +1397,7 @@ $$ LANGUAGE plpythonu; </para> <para> - The <replaceable>msg</> argument is given as a positional argument. For + The <replaceable>msg</replaceable> argument is given as a positional argument. For backward compatibility, more than one positional argument can be given. In that case, the string representation of the tuple of positional arguments becomes the message reported to the client. @@ -1438,9 +1438,9 @@ PL/Python function "raise_custom_exception" <para> Another set of utility functions are - <literal>plpy.quote_literal(<replaceable>string</>)</literal>, - <literal>plpy.quote_nullable(<replaceable>string</>)</literal>, and - <literal>plpy.quote_ident(<replaceable>string</>)</literal>. They + <literal>plpy.quote_literal(<replaceable>string</replaceable>)</literal>, + <literal>plpy.quote_nullable(<replaceable>string</replaceable>)</literal>, and + <literal>plpy.quote_ident(<replaceable>string</replaceable>)</literal>. They are equivalent to the built-in quoting functions described in <xref linkend="functions-string">. They are useful when constructing ad-hoc queries. A PL/Python equivalent of dynamic SQL from <xref diff --git a/doc/src/sgml/pltcl.sgml b/doc/src/sgml/pltcl.sgml index acd4dd69d3e..e74321a06e6 100644 --- a/doc/src/sgml/pltcl.sgml +++ b/doc/src/sgml/pltcl.sgml @@ -35,7 +35,7 @@ everything is executed from within the safety of the context of a Tcl interpreter. In addition to the limited command set of safe Tcl, only a few commands are available to access the database via - SPI and to raise messages via <function>elog()</>. PL/Tcl + SPI and to raise messages via <function>elog()</function>. PL/Tcl provides no way to access internals of the database server or to gain OS-level access under the permissions of the <productname>PostgreSQL</productname> server process, as a C @@ -50,23 +50,23 @@ <para> Sometimes it is desirable to write Tcl functions that are not restricted to safe Tcl. For example, one might want a Tcl function that sends - email. To handle these cases, there is a variant of <application>PL/Tcl</> called <literal>PL/TclU</> + email. To handle these cases, there is a variant of <application>PL/Tcl</application> called <literal>PL/TclU</literal> (for untrusted Tcl). This is exactly the same language except that a full - Tcl interpreter is used. <emphasis>If <application>PL/TclU</> is used, it must be + Tcl interpreter is used. <emphasis>If <application>PL/TclU</application> is used, it must be installed as an untrusted procedural language</emphasis> so that only - database superusers can create functions in it. The writer of a <application>PL/TclU</> + database superusers can create functions in it. The writer of a <application>PL/TclU</application> function must take care that the function cannot be used to do anything unwanted, since it will be able to do anything that could be done by a user logged in as the database administrator. </para> <para> - The shared object code for the <application>PL/Tcl</> and - <application>PL/TclU</> call handlers is automatically built and + The shared object code for the <application>PL/Tcl</application> and + <application>PL/TclU</application> call handlers is automatically built and installed in the <productname>PostgreSQL</productname> library directory if Tcl support is specified in the configuration step of - the installation procedure. To install <application>PL/Tcl</> - and/or <application>PL/TclU</> in a particular database, use the - <command>CREATE EXTENSION</> command, for example + the installation procedure. To install <application>PL/Tcl</application> + and/or <application>PL/TclU</application> in a particular database, use the + <command>CREATE EXTENSION</command> command, for example <literal>CREATE EXTENSION pltcl</literal> or <literal>CREATE EXTENSION pltclu</literal>. </para> @@ -78,7 +78,7 @@ <title>PL/Tcl Functions and Arguments</title> <para> - To create a function in the <application>PL/Tcl</> language, use + To create a function in the <application>PL/Tcl</application> language, use the standard <xref linkend="sql-createfunction"> syntax: <programlisting> @@ -87,8 +87,8 @@ CREATE FUNCTION <replaceable>funcname</replaceable> (<replaceable>argument-types $$ LANGUAGE pltcl; </programlisting> - <application>PL/TclU</> is the same, except that the language has to be specified as - <literal>pltclu</>. + <application>PL/TclU</application> is the same, except that the language has to be specified as + <literal>pltclu</literal>. </para> <para> @@ -111,7 +111,7 @@ CREATE FUNCTION tcl_max(integer, integer) RETURNS integer AS $$ $$ LANGUAGE pltcl STRICT; </programlisting> - Note the clause <literal>STRICT</>, which saves us from + Note the clause <literal>STRICT</literal>, which saves us from having to think about null input values: if a null value is passed, the function will not be called at all, but will just return a null result automatically. @@ -122,7 +122,7 @@ $$ LANGUAGE pltcl STRICT; if the actual value of an argument is null, the corresponding <literal>$<replaceable>n</replaceable></literal> variable will be set to an empty string. To detect whether a particular argument is null, use the function - <literal>argisnull</>. For example, suppose that we wanted <function>tcl_max</function> + <literal>argisnull</literal>. For example, suppose that we wanted <function>tcl_max</function> with one null and one nonnull argument to return the nonnull argument, rather than null: @@ -188,7 +188,7 @@ $$ LANGUAGE pltcl; <tip> <para> The result list can be made from an array representation of the - desired tuple with the <literal>array get</> Tcl command. For example: + desired tuple with the <literal>array get</literal> Tcl command. For example: <programlisting> CREATE FUNCTION raise_pay(employee, delta int) RETURNS employee AS $$ @@ -233,8 +233,8 @@ $$ LANGUAGE pltcl; <para> The argument values supplied to a PL/Tcl function's code are simply the input arguments converted to text form (just as if they had been - displayed by a <command>SELECT</> statement). Conversely, the - <literal>return</> and <literal>return_next</> commands will accept + displayed by a <command>SELECT</command> statement). Conversely, the + <literal>return</literal> and <literal>return_next</literal> commands will accept any string that is acceptable input format for the function's declared result type, or for the specified column of a composite result type. </para> @@ -262,14 +262,14 @@ $$ LANGUAGE pltcl; role in a separate Tcl interpreter for that role. This prevents accidental or malicious interference by one user with the behavior of another user's PL/Tcl functions. Each such interpreter will have its own - values for any <quote>global</> Tcl variables. Thus, two PL/Tcl + values for any <quote>global</quote> Tcl variables. Thus, two PL/Tcl functions will share the same global variables if and only if they are executed by the same SQL role. In an application wherein a single session executes code under multiple SQL roles (via <literal>SECURITY - DEFINER</> functions, use of <command>SET ROLE</>, etc) you may need to + DEFINER</literal> functions, use of <command>SET ROLE</command>, etc) you may need to take explicit steps to ensure that PL/Tcl functions can share data. To do that, make sure that functions that should communicate are owned by - the same user, and mark them <literal>SECURITY DEFINER</>. You must of + the same user, and mark them <literal>SECURITY DEFINER</literal>. You must of course take care that such functions can't be used to do anything unintended. </para> @@ -286,19 +286,19 @@ $$ LANGUAGE pltcl; <para> To help protect PL/Tcl functions from unintentionally interfering with each other, a global - array is made available to each function via the <function>upvar</> + array is made available to each function via the <function>upvar</function> command. The global name of this variable is the function's internal - name, and the local name is <literal>GD</>. It is recommended that - <literal>GD</> be used + name, and the local name is <literal>GD</literal>. It is recommended that + <literal>GD</literal> be used for persistent private data of a function. Use regular Tcl global variables only for values that you specifically intend to be shared among - multiple functions. (Note that the <literal>GD</> arrays are only + multiple functions. (Note that the <literal>GD</literal> arrays are only global within a particular interpreter, so they do not bypass the security restrictions mentioned above.) </para> <para> - An example of using <literal>GD</> appears in the + An example of using <literal>GD</literal> appears in the <function>spi_execp</function> example below. </para> </sect1> @@ -320,28 +320,28 @@ $$ LANGUAGE pltcl; causes an error to be raised. Otherwise, the return value of <function>spi_exec</function> is the number of rows processed (selected, inserted, updated, or deleted) by the command, or zero if the command is a utility - statement. In addition, if the command is a <command>SELECT</> statement, the + statement. In addition, if the command is a <command>SELECT</command> statement, the values of the selected columns are placed in Tcl variables as described below. </para> <para> - The optional <literal>-count</> value tells + The optional <literal>-count</literal> value tells <function>spi_exec</function> the maximum number of rows to process in the command. The effect of this is comparable to - setting up a query as a cursor and then saying <literal>FETCH <replaceable>n</></>. + setting up a query as a cursor and then saying <literal>FETCH <replaceable>n</replaceable></literal>. </para> <para> - If the command is a <command>SELECT</> statement, the values of the + If the command is a <command>SELECT</command> statement, the values of the result columns are placed into Tcl variables named after the columns. - If the <literal>-array</> option is given, the column values are + If the <literal>-array</literal> option is given, the column values are instead stored into elements of the named associative array, with the column names used as array indexes. In addition, the current row number within the result (counting from zero) is stored into the array - element named <quote><literal>.tupno</></quote>, unless that name is + element named <quote><literal>.tupno</literal></quote>, unless that name is in use as a column name in the result. </para> <para> - If the command is a <command>SELECT</> statement and no <replaceable>loop-body</> + If the command is a <command>SELECT</command> statement and no <replaceable>loop-body</replaceable> script is given, then only the first row of results are stored into Tcl variables or array elements; remaining rows, if any, are ignored. No storing occurs if the query returns no rows. (This case can be @@ -350,14 +350,14 @@ $$ LANGUAGE pltcl; <programlisting> spi_exec "SELECT count(*) AS cnt FROM pg_proc" </programlisting> - will set the Tcl variable <literal>$cnt</> to the number of rows in - the <structname>pg_proc</> system catalog. + will set the Tcl variable <literal>$cnt</literal> to the number of rows in + the <structname>pg_proc</structname> system catalog. </para> <para> - If the optional <replaceable>loop-body</> argument is given, it is + If the optional <replaceable>loop-body</replaceable> argument is given, it is a piece of Tcl script that is executed once for each row in the - query result. (<replaceable>loop-body</> is ignored if the given - command is not a <command>SELECT</>.) + query result. (<replaceable>loop-body</replaceable> is ignored if the given + command is not a <command>SELECT</command>.) The values of the current row's columns are stored into Tcl variables or array elements before each iteration. For example: @@ -366,14 +366,14 @@ spi_exec -array C "SELECT * FROM pg_class" { elog DEBUG "have table $C(relname)" } </programlisting> - will print a log message for every row of <literal>pg_class</>. This + will print a log message for every row of <literal>pg_class</literal>. This feature works similarly to other Tcl looping constructs; in - particular <literal>continue</> and <literal>break</> work in the + particular <literal>continue</literal> and <literal>break</literal> work in the usual way inside the loop body. </para> <para> If a column of a query result is null, the target - variable for it is <quote>unset</> rather than being set. + variable for it is <quote>unset</quote> rather than being set. </para> </listitem> </varlistentry> @@ -384,8 +384,8 @@ spi_exec -array C "SELECT * FROM pg_class" { <para> Prepares and saves a query plan for later execution. The saved plan will be retained for the life of the current - session.<indexterm><primary>preparing a query</> - <secondary>in PL/Tcl</></> + session.<indexterm><primary>preparing a query</primary> + <secondary>in PL/Tcl</secondary></indexterm> </para> <para> The query can use parameters, that is, placeholders for @@ -405,29 +405,29 @@ spi_exec -array C "SELECT * FROM pg_class" { </varlistentry> <varlistentry> - <term><literal><function>spi_execp</> <optional role="tcl">-count <replaceable>n</replaceable></optional> <optional role="tcl">-array <replaceable>name</replaceable></optional> <optional role="tcl">-nulls <replaceable>string</replaceable></optional> <replaceable>queryid</replaceable> <optional role="tcl"><replaceable>value-list</replaceable></optional> <optional role="tcl"><replaceable>loop-body</replaceable></optional></literal></term> + <term><literal><function>spi_execp</function> <optional role="tcl">-count <replaceable>n</replaceable></optional> <optional role="tcl">-array <replaceable>name</replaceable></optional> <optional role="tcl">-nulls <replaceable>string</replaceable></optional> <replaceable>queryid</replaceable> <optional role="tcl"><replaceable>value-list</replaceable></optional> <optional role="tcl"><replaceable>loop-body</replaceable></optional></literal></term> <listitem> <para> - Executes a query previously prepared with <function>spi_prepare</>. + Executes a query previously prepared with <function>spi_prepare</function>. <replaceable>queryid</replaceable> is the ID returned by - <function>spi_prepare</>. If the query references parameters, + <function>spi_prepare</function>. If the query references parameters, a <replaceable>value-list</replaceable> must be supplied. This is a Tcl list of actual values for the parameters. The list must be the same length as the parameter type list previously given to - <function>spi_prepare</>. Omit <replaceable>value-list</replaceable> + <function>spi_prepare</function>. Omit <replaceable>value-list</replaceable> if the query has no parameters. </para> <para> - The optional value for <literal>-nulls</> is a string of spaces and - <literal>'n'</> characters telling <function>spi_execp</function> + The optional value for <literal>-nulls</literal> is a string of spaces and + <literal>'n'</literal> characters telling <function>spi_execp</function> which of the parameters are null values. If given, it must have exactly the same length as the <replaceable>value-list</replaceable>. If it is not given, all the parameter values are nonnull. </para> <para> Except for the way in which the query and its parameters are specified, - <function>spi_execp</> works just like <function>spi_exec</>. - The <literal>-count</>, <literal>-array</>, and + <function>spi_execp</function> works just like <function>spi_exec</function>. + The <literal>-count</literal>, <literal>-array</literal>, and <replaceable>loop-body</replaceable> options are the same, and so is the result value. </para> @@ -448,9 +448,9 @@ $$ LANGUAGE pltcl; </programlisting> We need backslashes inside the query string given to - <function>spi_prepare</> to ensure that the - <literal>$<replaceable>n</replaceable></> markers will be passed - through to <function>spi_prepare</> as-is, and not replaced by Tcl + <function>spi_prepare</function> to ensure that the + <literal>$<replaceable>n</replaceable></literal> markers will be passed + through to <function>spi_prepare</function> as-is, and not replaced by Tcl variable substitution. </para> @@ -459,7 +459,7 @@ $$ LANGUAGE pltcl; <varlistentry> <term> - <function>spi_lastoid</> + <function>spi_lastoid</function> <indexterm> <primary>spi_lastoid</primary> <secondary>in PL/Tcl</secondary> @@ -468,8 +468,8 @@ $$ LANGUAGE pltcl; <listitem> <para> Returns the OID of the row inserted by the last - <function>spi_exec</> or <function>spi_execp</>, if the - command was a single-row <command>INSERT</> and the modified + <function>spi_exec</function> or <function>spi_execp</function>, if the + command was a single-row <command>INSERT</command> and the modified table contained OIDs. (If not, you get zero.) </para> </listitem> @@ -490,7 +490,7 @@ $$ LANGUAGE pltcl; </varlistentry> <varlistentry> - <term><function>quote</> <replaceable>string</replaceable></term> + <term><function>quote</function> <replaceable>string</replaceable></term> <listitem> <para> Doubles all occurrences of single quote and backslash characters @@ -504,7 +504,7 @@ $$ LANGUAGE pltcl; "SELECT '$val' AS ret" </programlisting> - where the Tcl variable <literal>val</> actually contains + where the Tcl variable <literal>val</literal> actually contains <literal>doesn't</literal>. This would result in the final command string: @@ -536,7 +536,7 @@ SELECT 'doesn''t' AS ret <varlistentry> <term> - <function>elog</> <replaceable>level</replaceable> <replaceable>msg</replaceable> + <function>elog</function> <replaceable>level</replaceable> <replaceable>msg</replaceable> <indexterm> <primary>elog</primary> <secondary>in PL/Tcl</secondary> @@ -545,14 +545,14 @@ SELECT 'doesn''t' AS ret <listitem> <para> Emits a log or error message. Possible levels are - <literal>DEBUG</>, <literal>LOG</>, <literal>INFO</>, - <literal>NOTICE</>, <literal>WARNING</>, <literal>ERROR</>, and - <literal>FATAL</>. <literal>ERROR</> + <literal>DEBUG</literal>, <literal>LOG</literal>, <literal>INFO</literal>, + <literal>NOTICE</literal>, <literal>WARNING</literal>, <literal>ERROR</literal>, and + <literal>FATAL</literal>. <literal>ERROR</literal> raises an error condition; if this is not trapped by the surrounding Tcl code, the error propagates out to the calling query, causing the current transaction or subtransaction to be aborted. This - is effectively the same as the Tcl <literal>error</> command. - <literal>FATAL</> aborts the transaction and causes the current + is effectively the same as the Tcl <literal>error</literal> command. + <literal>FATAL</literal> aborts the transaction and causes the current session to shut down. (There is probably no good reason to use this error level in PL/Tcl functions, but it's provided for completeness.) The other levels only generate messages of different @@ -585,7 +585,7 @@ SELECT 'doesn''t' AS ret Trigger procedures can be written in PL/Tcl. <productname>PostgreSQL</productname> requires that a procedure that is to be called as a trigger must be declared as a function with no arguments - and a return type of <literal>trigger</>. + and a return type of <literal>trigger</literal>. </para> <para> The information from the trigger manager is passed to the procedure body @@ -637,8 +637,8 @@ SELECT 'doesn''t' AS ret <listitem> <para> A Tcl list of the table column names, prefixed with an empty list - element. So looking up a column name in the list with <application>Tcl</>'s - <function>lsearch</> command returns the element's number starting + element. So looking up a column name in the list with <application>Tcl</application>'s + <function>lsearch</function> command returns the element's number starting with 1 for the first column, the same way the columns are customarily numbered in <productname>PostgreSQL</productname>. (Empty list elements also appear in the positions of columns that have been @@ -652,8 +652,8 @@ SELECT 'doesn''t' AS ret <term><varname>$TG_when</varname></term> <listitem> <para> - The string <literal>BEFORE</>, <literal>AFTER</>, or - <literal>INSTEAD OF</>, depending on the type of trigger event. + The string <literal>BEFORE</literal>, <literal>AFTER</literal>, or + <literal>INSTEAD OF</literal>, depending on the type of trigger event. </para> </listitem> </varlistentry> @@ -662,7 +662,7 @@ SELECT 'doesn''t' AS ret <term><varname>$TG_level</varname></term> <listitem> <para> - The string <literal>ROW</> or <literal>STATEMENT</> depending on the + The string <literal>ROW</literal> or <literal>STATEMENT</literal> depending on the type of trigger event. </para> </listitem> @@ -672,8 +672,8 @@ SELECT 'doesn''t' AS ret <term><varname>$TG_op</varname></term> <listitem> <para> - The string <literal>INSERT</>, <literal>UPDATE</>, - <literal>DELETE</>, or <literal>TRUNCATE</> depending on the type of + The string <literal>INSERT</literal>, <literal>UPDATE</literal>, + <literal>DELETE</literal>, or <literal>TRUNCATE</literal> depending on the type of trigger event. </para> </listitem> @@ -684,8 +684,8 @@ SELECT 'doesn''t' AS ret <listitem> <para> An associative array containing the values of the new table - row for <command>INSERT</> or <command>UPDATE</> actions, or - empty for <command>DELETE</>. The array is indexed by column + row for <command>INSERT</command> or <command>UPDATE</command> actions, or + empty for <command>DELETE</command>. The array is indexed by column name. Columns that are null will not appear in the array. This is not set for statement-level triggers. </para> @@ -697,8 +697,8 @@ SELECT 'doesn''t' AS ret <listitem> <para> An associative array containing the values of the old table - row for <command>UPDATE</> or <command>DELETE</> actions, or - empty for <command>INSERT</>. The array is indexed by column + row for <command>UPDATE</command> or <command>DELETE</command> actions, or + empty for <command>INSERT</command>. The array is indexed by column name. Columns that are null will not appear in the array. This is not set for statement-level triggers. </para> @@ -721,32 +721,32 @@ SELECT 'doesn''t' AS ret <para> The return value from a trigger procedure can be one of the strings - <literal>OK</> or <literal>SKIP</>, or a list of column name/value pairs. - If the return value is <literal>OK</>, - the operation (<command>INSERT</>/<command>UPDATE</>/<command>DELETE</>) + <literal>OK</literal> or <literal>SKIP</literal>, or a list of column name/value pairs. + If the return value is <literal>OK</literal>, + the operation (<command>INSERT</command>/<command>UPDATE</command>/<command>DELETE</command>) that fired the trigger will proceed - normally. <literal>SKIP</> tells the trigger manager to silently suppress + normally. <literal>SKIP</literal> tells the trigger manager to silently suppress the operation for this row. If a list is returned, it tells PL/Tcl to return a modified row to the trigger manager; the contents of the modified row are specified by the column names and values in the list. Any columns not mentioned in the list are set to null. Returning a modified row is only meaningful - for row-level <literal>BEFORE</> <command>INSERT</> or <command>UPDATE</> + for row-level <literal>BEFORE</literal> <command>INSERT</command> or <command>UPDATE</command> triggers, for which the modified row will be inserted instead of the one - given in <varname>$NEW</>; or for row-level <literal>INSTEAD OF</> - <command>INSERT</> or <command>UPDATE</> triggers where the returned row - is used as the source data for <command>INSERT RETURNING</> or - <command>UPDATE RETURNING</> clauses. - In row-level <literal>BEFORE</> <command>DELETE</> or <literal>INSTEAD - OF</> <command>DELETE</> triggers, returning a modified row has the same - effect as returning <literal>OK</>, that is the operation proceeds. + given in <varname>$NEW</varname>; or for row-level <literal>INSTEAD OF</literal> + <command>INSERT</command> or <command>UPDATE</command> triggers where the returned row + is used as the source data for <command>INSERT RETURNING</command> or + <command>UPDATE RETURNING</command> clauses. + In row-level <literal>BEFORE</literal> <command>DELETE</command> or <literal>INSTEAD + OF</literal> <command>DELETE</command> triggers, returning a modified row has the same + effect as returning <literal>OK</literal>, that is the operation proceeds. The trigger return value is ignored for all other types of triggers. </para> <tip> <para> The result list can be made from an array representation of the - modified tuple with the <literal>array get</> Tcl command. + modified tuple with the <literal>array get</literal> Tcl command. </para> </tip> @@ -797,7 +797,7 @@ CREATE TRIGGER trig_mytab_modcount BEFORE INSERT OR UPDATE ON mytab Event trigger procedures can be written in PL/Tcl. <productname>PostgreSQL</productname> requires that a procedure that is to be called as an event trigger must be declared as a function with no - arguments and a return type of <literal>event_trigger</>. + arguments and a return type of <literal>event_trigger</literal>. </para> <para> The information from the trigger manager is passed to the procedure body @@ -885,17 +885,17 @@ CREATE EVENT TRIGGER tcl_a_snitch ON ddl_command_start EXECUTE PROCEDURE tclsnit word is <literal>POSTGRES</literal>, the second word is the PostgreSQL version number, and additional words are field name/value pairs providing detailed information about the error. - Fields <varname>SQLSTATE</>, <varname>condition</>, - and <varname>message</> are always supplied + Fields <varname>SQLSTATE</varname>, <varname>condition</varname>, + and <varname>message</varname> are always supplied (the first two represent the error code and condition name as shown in <xref linkend="errcodes-appendix">). Fields that may be present include - <varname>detail</>, <varname>hint</>, <varname>context</>, - <varname>schema</>, <varname>table</>, <varname>column</>, - <varname>datatype</>, <varname>constraint</>, - <varname>statement</>, <varname>cursor_position</>, - <varname>filename</>, <varname>lineno</>, and - <varname>funcname</>. + <varname>detail</varname>, <varname>hint</varname>, <varname>context</varname>, + <varname>schema</varname>, <varname>table</varname>, <varname>column</varname>, + <varname>datatype</varname>, <varname>constraint</varname>, + <varname>statement</varname>, <varname>cursor_position</varname>, + <varname>filename</varname>, <varname>lineno</varname>, and + <varname>funcname</varname>. </para> <para> @@ -1006,7 +1006,7 @@ $$ LANGUAGE pltcl; <para> This section lists configuration parameters that - affect <application>PL/Tcl</>. + affect <application>PL/Tcl</application>. </para> <variablelist> @@ -1015,7 +1015,7 @@ $$ LANGUAGE pltcl; <term> <varname>pltcl.start_proc</varname> (<type>string</type>) <indexterm> - <primary><varname>pltcl.start_proc</> configuration parameter</primary> + <primary><varname>pltcl.start_proc</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -1031,8 +1031,8 @@ $$ LANGUAGE pltcl; </para> <para> - The referenced function must be written in the <literal>pltcl</> - language, and must not be marked <literal>SECURITY DEFINER</>. + The referenced function must be written in the <literal>pltcl</literal> + language, and must not be marked <literal>SECURITY DEFINER</literal>. (These restrictions ensure that it runs in the interpreter it's supposed to initialize.) The current user must have permission to call it, too. @@ -1060,14 +1060,14 @@ $$ LANGUAGE pltcl; <term> <varname>pltclu.start_proc</varname> (<type>string</type>) <indexterm> - <primary><varname>pltclu.start_proc</> configuration parameter</primary> + <primary><varname>pltclu.start_proc</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> This parameter is exactly like <varname>pltcl.start_proc</varname>, except that it applies to PL/TclU. The referenced function must - be written in the <literal>pltclu</> language. + be written in the <literal>pltclu</literal> language. </para> </listitem> </varlistentry> @@ -1084,7 +1084,7 @@ $$ LANGUAGE pltcl; differ. Tcl, however, requires all procedure names to be distinct. PL/Tcl deals with this by making the internal Tcl procedure names contain the object - ID of the function from the system table <structname>pg_proc</> as part of their name. Thus, + ID of the function from the system table <structname>pg_proc</structname> as part of their name. Thus, <productname>PostgreSQL</productname> functions with the same name and different argument types will be different Tcl procedures, too. This is not normally a concern for a PL/Tcl programmer, but it might be visible diff --git a/doc/src/sgml/postgres-fdw.sgml b/doc/src/sgml/postgres-fdw.sgml index d83fc9e52b1..265effbe48b 100644 --- a/doc/src/sgml/postgres-fdw.sgml +++ b/doc/src/sgml/postgres-fdw.sgml @@ -8,7 +8,7 @@ </indexterm> <para> - The <filename>postgres_fdw</> module provides the foreign-data wrapper + The <filename>postgres_fdw</filename> module provides the foreign-data wrapper <literal>postgres_fdw</literal>, which can be used to access data stored in external <productname>PostgreSQL</productname> servers. </para> @@ -16,17 +16,17 @@ <para> The functionality provided by this module overlaps substantially with the functionality of the older <xref linkend="dblink"> module. - But <filename>postgres_fdw</> provides more transparent and + But <filename>postgres_fdw</filename> provides more transparent and standards-compliant syntax for accessing remote tables, and can give better performance in many cases. </para> <para> - To prepare for remote access using <filename>postgres_fdw</>: + To prepare for remote access using <filename>postgres_fdw</filename>: <orderedlist spacing="compact"> <listitem> <para> - Install the <filename>postgres_fdw</> extension using <xref + Install the <filename>postgres_fdw</filename> extension using <xref linkend="sql-createextension">. </para> </listitem> @@ -61,17 +61,17 @@ </para> <para> - Now you need only <command>SELECT</> from a foreign table to access + Now you need only <command>SELECT</command> from a foreign table to access the data stored in its underlying remote table. You can also modify - the remote table using <command>INSERT</>, <command>UPDATE</>, or - <command>DELETE</>. (Of course, the remote user you have specified + the remote table using <command>INSERT</command>, <command>UPDATE</command>, or + <command>DELETE</command>. (Of course, the remote user you have specified in your user mapping must have privileges to do these things.) </para> <para> - Note that <filename>postgres_fdw</> currently lacks support for + Note that <filename>postgres_fdw</filename> currently lacks support for <command>INSERT</command> statements with an <literal>ON CONFLICT DO - UPDATE</> clause. However, the <literal>ON CONFLICT DO NOTHING</> + UPDATE</literal> clause. However, the <literal>ON CONFLICT DO NOTHING</literal> clause is supported, provided a unique index inference specification is omitted. </para> @@ -79,10 +79,10 @@ <para> It is generally recommended that the columns of a foreign table be declared with exactly the same data types, and collations if applicable, as the - referenced columns of the remote table. Although <filename>postgres_fdw</> + referenced columns of the remote table. Although <filename>postgres_fdw</filename> is currently rather forgiving about performing data type conversions at need, surprising semantic anomalies may arise when types or collations do - not match, due to the remote server interpreting <literal>WHERE</> clauses + not match, due to the remote server interpreting <literal>WHERE</literal> clauses slightly differently from the local server. </para> @@ -99,8 +99,8 @@ <title>Connection Options</title> <para> - A foreign server using the <filename>postgres_fdw</> foreign data wrapper - can have the same options that <application>libpq</> accepts in + A foreign server using the <filename>postgres_fdw</filename> foreign data wrapper + can have the same options that <application>libpq</application> accepts in connection strings, as described in <xref linkend="libpq-paramkeywords">, except that these options are not allowed: @@ -113,14 +113,14 @@ </listitem> <listitem> <para> - <literal>client_encoding</> (this is automatically set from the local + <literal>client_encoding</literal> (this is automatically set from the local server encoding) </para> </listitem> <listitem> <para> - <literal>fallback_application_name</> (always set to - <literal>postgres_fdw</>) + <literal>fallback_application_name</literal> (always set to + <literal>postgres_fdw</literal>) </para> </listitem> </itemizedlist> @@ -186,14 +186,14 @@ <title>Cost Estimation Options</title> <para> - <filename>postgres_fdw</> retrieves remote data by executing queries + <filename>postgres_fdw</filename> retrieves remote data by executing queries against remote servers, so ideally the estimated cost of scanning a foreign table should be whatever it costs to be done on the remote server, plus some overhead for communication. The most reliable way to get such an estimate is to ask the remote server and then add something for overhead — but for simple queries, it may not be worth the cost of an additional remote query to get a cost estimate. - So <filename>postgres_fdw</> provides the following options to control + So <filename>postgres_fdw</filename> provides the following options to control how cost estimation is done: </para> @@ -204,7 +204,7 @@ <listitem> <para> This option, which can be specified for a foreign table or a foreign - server, controls whether <filename>postgres_fdw</> issues remote + server, controls whether <filename>postgres_fdw</filename> issues remote <command>EXPLAIN</command> commands to obtain cost estimates. A setting for a foreign table overrides any setting for its server, but only for that table. @@ -245,11 +245,11 @@ <para> When <literal>use_remote_estimate</literal> is true, - <filename>postgres_fdw</> obtains row count and cost estimates from the + <filename>postgres_fdw</filename> obtains row count and cost estimates from the remote server and then adds <literal>fdw_startup_cost</literal> and <literal>fdw_tuple_cost</literal> to the cost estimates. When <literal>use_remote_estimate</literal> is false, - <filename>postgres_fdw</> performs local row count and cost estimation + <filename>postgres_fdw</filename> performs local row count and cost estimation and then adds <literal>fdw_startup_cost</literal> and <literal>fdw_tuple_cost</literal> to the cost estimates. This local estimation is unlikely to be very accurate unless local copies of the @@ -268,12 +268,12 @@ <title>Remote Execution Options</title> <para> - By default, only <literal>WHERE</> clauses using built-in operators and + By default, only <literal>WHERE</literal> clauses using built-in operators and functions will be considered for execution on the remote server. Clauses involving non-built-in functions are checked locally after rows are fetched. If such functions are available on the remote server and can be relied on to produce the same results as they do locally, performance can - be improved by sending such <literal>WHERE</> clauses for remote + be improved by sending such <literal>WHERE</literal> clauses for remote execution. This behavior can be controlled using the following option: </para> @@ -284,7 +284,7 @@ <listitem> <para> This option is a comma-separated list of names - of <productname>PostgreSQL</> extensions that are installed, in + of <productname>PostgreSQL</productname> extensions that are installed, in compatible versions, on both the local and remote servers. Functions and operators that are immutable and belong to a listed extension will be considered shippable to the remote server. @@ -293,7 +293,7 @@ <para> When using the <literal>extensions</literal> option, <emphasis>it is the - user's responsibility</> that the listed extensions exist and behave + user's responsibility</emphasis> that the listed extensions exist and behave identically on both the local and remote servers. Otherwise, remote queries may fail or behave unexpectedly. </para> @@ -304,11 +304,11 @@ <term><literal>fetch_size</literal></term> <listitem> <para> - This option specifies the number of rows <filename>postgres_fdw</> + This option specifies the number of rows <filename>postgres_fdw</filename> should get in each fetch operation. It can be specified for a foreign table or a foreign server. The option specified on a table overrides an option specified for the server. - The default is <literal>100</>. + The default is <literal>100</literal>. </para> </listitem> </varlistentry> @@ -321,7 +321,7 @@ <title>Updatability Options</title> <para> - By default all foreign tables using <filename>postgres_fdw</> are assumed + By default all foreign tables using <filename>postgres_fdw</filename> are assumed to be updatable. This may be overridden using the following option: </para> @@ -331,20 +331,20 @@ <term><literal>updatable</literal></term> <listitem> <para> - This option controls whether <filename>postgres_fdw</> allows foreign - tables to be modified using <command>INSERT</>, <command>UPDATE</> and - <command>DELETE</> commands. It can be specified for a foreign table + This option controls whether <filename>postgres_fdw</filename> allows foreign + tables to be modified using <command>INSERT</command>, <command>UPDATE</command> and + <command>DELETE</command> commands. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. - The default is <literal>true</>. + The default is <literal>true</literal>. </para> <para> Of course, if the remote table is not in fact updatable, an error would occur anyway. Use of this option primarily allows the error to be thrown locally without querying the remote server. Note however - that the <literal>information_schema</> views will report a - <filename>postgres_fdw</> foreign table to be updatable (or not) + that the <literal>information_schema</literal> views will report a + <filename>postgres_fdw</filename> foreign table to be updatable (or not) according to the setting of this option, without any check of the remote server. </para> @@ -358,7 +358,7 @@ <title>Importing Options</title> <para> - <filename>postgres_fdw</> is able to import foreign table definitions + <filename>postgres_fdw</filename> is able to import foreign table definitions using <xref linkend="sql-importforeignschema">. This command creates foreign table definitions on the local server that match tables or views present on the remote server. If the remote tables to be imported @@ -368,7 +368,7 @@ <para> Importing behavior can be customized with the following options - (given in the <command>IMPORT FOREIGN SCHEMA</> command): + (given in the <command>IMPORT FOREIGN SCHEMA</command> command): </para> <variablelist> @@ -376,9 +376,9 @@ <term><literal>import_collate</literal></term> <listitem> <para> - This option controls whether column <literal>COLLATE</> options + This option controls whether column <literal>COLLATE</literal> options are included in the definitions of foreign tables imported - from a foreign server. The default is <literal>true</>. You might + from a foreign server. The default is <literal>true</literal>. You might need to turn this off if the remote server has a different set of collation names than the local server does, which is likely to be the case if it's running on a different operating system. @@ -389,13 +389,13 @@ <term><literal>import_default</literal></term> <listitem> <para> - This option controls whether column <literal>DEFAULT</> expressions + This option controls whether column <literal>DEFAULT</literal> expressions are included in the definitions of foreign tables imported - from a foreign server. The default is <literal>false</>. If you + from a foreign server. The default is <literal>false</literal>. If you enable this option, be wary of defaults that might get computed differently on the local server than they would be on the remote - server; <function>nextval()</> is a common source of problems. - The <command>IMPORT</> will fail altogether if an imported default + server; <function>nextval()</function> is a common source of problems. + The <command>IMPORT</command> will fail altogether if an imported default expression uses a function or operator that does not exist locally. </para> </listitem> @@ -404,25 +404,25 @@ <term><literal>import_not_null</literal></term> <listitem> <para> - This option controls whether column <literal>NOT NULL</> + This option controls whether column <literal>NOT NULL</literal> constraints are included in the definitions of foreign tables imported - from a foreign server. The default is <literal>true</>. + from a foreign server. The default is <literal>true</literal>. </para> </listitem> </varlistentry> </variablelist> <para> - Note that constraints other than <literal>NOT NULL</> will never be - imported from the remote tables. Although <productname>PostgreSQL</> - does support <literal>CHECK</> constraints on foreign tables, there is no + Note that constraints other than <literal>NOT NULL</literal> will never be + imported from the remote tables. Although <productname>PostgreSQL</productname> + does support <literal>CHECK</literal> constraints on foreign tables, there is no provision for importing them automatically, because of the risk that a constraint expression could evaluate differently on the local and remote - servers. Any such inconsistency in the behavior of a <literal>CHECK</> + servers. Any such inconsistency in the behavior of a <literal>CHECK</literal> constraint could lead to hard-to-detect errors in query optimization. - So if you wish to import <literal>CHECK</> constraints, you must do so + So if you wish to import <literal>CHECK</literal> constraints, you must do so manually, and you should verify the semantics of each one carefully. - For more detail about the treatment of <literal>CHECK</> constraints on + For more detail about the treatment of <literal>CHECK</literal> constraints on foreign tables, see <xref linkend="sql-createforeigntable">. </para> @@ -464,18 +464,18 @@ </para> <para> - The remote transaction uses <literal>SERIALIZABLE</> - isolation level when the local transaction has <literal>SERIALIZABLE</> - isolation level; otherwise it uses <literal>REPEATABLE READ</> + The remote transaction uses <literal>SERIALIZABLE</literal> + isolation level when the local transaction has <literal>SERIALIZABLE</literal> + isolation level; otherwise it uses <literal>REPEATABLE READ</literal> isolation level. This choice ensures that if a query performs multiple table scans on the remote server, it will get snapshot-consistent results for all the scans. A consequence is that successive queries within a single transaction will see the same data from the remote server, even if concurrent updates are occurring on the remote server due to other activities. That behavior would be expected anyway if the local - transaction uses <literal>SERIALIZABLE</> or <literal>REPEATABLE READ</> + transaction uses <literal>SERIALIZABLE</literal> or <literal>REPEATABLE READ</literal> isolation level, but it might be surprising for a <literal>READ - COMMITTED</> local transaction. A future + COMMITTED</literal> local transaction. A future <productname>PostgreSQL</productname> release might modify these rules. </para> </sect2> @@ -484,42 +484,42 @@ <title>Remote Query Optimization</title> <para> - <filename>postgres_fdw</> attempts to optimize remote queries to reduce + <filename>postgres_fdw</filename> attempts to optimize remote queries to reduce the amount of data transferred from foreign servers. This is done by - sending query <literal>WHERE</> clauses to the remote server for + sending query <literal>WHERE</literal> clauses to the remote server for execution, and by not retrieving table columns that are not needed for the current query. To reduce the risk of misexecution of queries, - <literal>WHERE</> clauses are not sent to the remote server unless they use + <literal>WHERE</literal> clauses are not sent to the remote server unless they use only data types, operators, and functions that are built-in or belong to an - extension that's listed in the foreign server's <literal>extensions</> + extension that's listed in the foreign server's <literal>extensions</literal> option. Operators and functions in such clauses must - be <literal>IMMUTABLE</> as well. - For an <command>UPDATE</> or <command>DELETE</> query, - <filename>postgres_fdw</> attempts to optimize the query execution by + be <literal>IMMUTABLE</literal> as well. + For an <command>UPDATE</command> or <command>DELETE</command> query, + <filename>postgres_fdw</filename> attempts to optimize the query execution by sending the whole query to the remote server if there are no query - <literal>WHERE</> clauses that cannot be sent to the remote server, - no local joins for the query, no row-level local <literal>BEFORE</> or - <literal>AFTER</> triggers on the target table, and no - <literal>CHECK OPTION</> constraints from parent views. - In <command>UPDATE</>, + <literal>WHERE</literal> clauses that cannot be sent to the remote server, + no local joins for the query, no row-level local <literal>BEFORE</literal> or + <literal>AFTER</literal> triggers on the target table, and no + <literal>CHECK OPTION</literal> constraints from parent views. + In <command>UPDATE</command>, expressions to assign to target columns must use only built-in data types, - <literal>IMMUTABLE</> operators, or <literal>IMMUTABLE</> functions, + <literal>IMMUTABLE</literal> operators, or <literal>IMMUTABLE</literal> functions, to reduce the risk of misexecution of the query. </para> <para> - When <filename>postgres_fdw</> encounters a join between foreign tables on + When <filename>postgres_fdw</filename> encounters a join between foreign tables on the same foreign server, it sends the entire join to the foreign server, unless for some reason it believes that it will be more efficient to fetch rows from each table individually, or unless the table references involved - are subject to different user mappings. While sending the <literal>JOIN</> + are subject to different user mappings. While sending the <literal>JOIN</literal> clauses, it takes the same precautions as mentioned above for the - <literal>WHERE</> clauses. + <literal>WHERE</literal> clauses. </para> <para> The query that is actually sent to the remote server for execution can - be examined using <command>EXPLAIN VERBOSE</>. + be examined using <command>EXPLAIN VERBOSE</command>. </para> </sect2> @@ -527,55 +527,55 @@ <title>Remote Query Execution Environment</title> <para> - In the remote sessions opened by <filename>postgres_fdw</>, + In the remote sessions opened by <filename>postgres_fdw</filename>, the <xref linkend="guc-search-path"> parameter is set to - just <literal>pg_catalog</>, so that only built-in objects are visible + just <literal>pg_catalog</literal>, so that only built-in objects are visible without schema qualification. This is not an issue for queries - generated by <filename>postgres_fdw</> itself, because it always + generated by <filename>postgres_fdw</filename> itself, because it always supplies such qualification. However, this can pose a hazard for functions that are executed on the remote server via triggers or rules on remote tables. For example, if a remote table is actually a view, any functions used in that view will be executed with the restricted search path. It is recommended to schema-qualify all names in such - functions, or else attach <literal>SET search_path</> options + functions, or else attach <literal>SET search_path</literal> options (see <xref linkend="sql-createfunction">) to such functions to establish their expected search path environment. </para> <para> - <filename>postgres_fdw</> likewise establishes remote session settings + <filename>postgres_fdw</filename> likewise establishes remote session settings for various parameters: <itemizedlist spacing="compact"> <listitem> <para> - <xref linkend="guc-timezone"> is set to <literal>UTC</> + <xref linkend="guc-timezone"> is set to <literal>UTC</literal> </para> </listitem> <listitem> <para> - <xref linkend="guc-datestyle"> is set to <literal>ISO</> + <xref linkend="guc-datestyle"> is set to <literal>ISO</literal> </para> </listitem> <listitem> <para> - <xref linkend="guc-intervalstyle"> is set to <literal>postgres</> + <xref linkend="guc-intervalstyle"> is set to <literal>postgres</literal> </para> </listitem> <listitem> <para> - <xref linkend="guc-extra-float-digits"> is set to <literal>3</> for remote - servers 9.0 and newer and is set to <literal>2</> for older versions + <xref linkend="guc-extra-float-digits"> is set to <literal>3</literal> for remote + servers 9.0 and newer and is set to <literal>2</literal> for older versions </para> </listitem> </itemizedlist> - These are less likely to be problematic than <varname>search_path</>, but - can be handled with function <literal>SET</> options if the need arises. + These are less likely to be problematic than <varname>search_path</varname>, but + can be handled with function <literal>SET</literal> options if the need arises. </para> <para> - It is <emphasis>not</> recommended that you override this behavior by + It is <emphasis>not</emphasis> recommended that you override this behavior by changing the session-level settings of these parameters; that is likely - to cause <filename>postgres_fdw</> to malfunction. + to cause <filename>postgres_fdw</filename> to malfunction. </para> </sect2> @@ -583,19 +583,19 @@ <title>Cross-Version Compatibility</title> <para> - <filename>postgres_fdw</> can be used with remote servers dating back - to <productname>PostgreSQL</> 8.3. Read-only capability is available - back to 8.1. A limitation however is that <filename>postgres_fdw</> + <filename>postgres_fdw</filename> can be used with remote servers dating back + to <productname>PostgreSQL</productname> 8.3. Read-only capability is available + back to 8.1. A limitation however is that <filename>postgres_fdw</filename> generally assumes that immutable built-in functions and operators are safe to send to the remote server for execution, if they appear in a - <literal>WHERE</> clause for a foreign table. Thus, a built-in + <literal>WHERE</literal> clause for a foreign table. Thus, a built-in function that was added since the remote server's release might be sent - to it for execution, resulting in <quote>function does not exist</> or + to it for execution, resulting in <quote>function does not exist</quote> or a similar error. This type of failure can be worked around by rewriting the query, for example by embedding the foreign table - reference in a sub-<literal>SELECT</> with <literal>OFFSET 0</> as an + reference in a sub-<literal>SELECT</literal> with <literal>OFFSET 0</literal> as an optimization fence, and placing the problematic function or operator - outside the sub-<literal>SELECT</>. + outside the sub-<literal>SELECT</literal>. </para> </sect2> @@ -604,7 +604,7 @@ <para> Here is an example of creating a foreign table with - <literal>postgres_fdw</>. First install the extension: + <literal>postgres_fdw</literal>. First install the extension: </para> <programlisting> @@ -613,7 +613,7 @@ CREATE EXTENSION postgres_fdw; <para> Then create a foreign server using <xref linkend="sql-createserver">. - In this example we wish to connect to a <productname>PostgreSQL</> server + In this example we wish to connect to a <productname>PostgreSQL</productname> server on host <literal>192.83.123.89</literal> listening on port <literal>5432</literal>. The database to which the connection is made is named <literal>foreign_db</literal> on the remote server: @@ -640,9 +640,9 @@ CREATE USER MAPPING FOR local_user <para> Now it is possible to create a foreign table with <xref linkend="sql-createforeigntable">. In this example we - wish to access the table named <structname>some_schema.some_table</> + wish to access the table named <structname>some_schema.some_table</structname> on the remote server. The local name for it will - be <structname>foreign_table</>: + be <structname>foreign_table</structname>: <programlisting> CREATE FOREIGN TABLE foreign_table ( @@ -654,8 +654,8 @@ CREATE FOREIGN TABLE foreign_table ( </programlisting> It's essential that the data types and other properties of the columns - declared in <command>CREATE FOREIGN TABLE</> match the actual remote table. - Column names must match as well, unless you attach <literal>column_name</> + declared in <command>CREATE FOREIGN TABLE</command> match the actual remote table. + Column names must match as well, unless you attach <literal>column_name</literal> options to the individual columns to show how they are named in the remote table. In many cases, use of <xref linkend="sql-importforeignschema"> is diff --git a/doc/src/sgml/postgres.sgml b/doc/src/sgml/postgres.sgml index 8a3bfc9b0d3..f8a6c48a57c 100644 --- a/doc/src/sgml/postgres.sgml +++ b/doc/src/sgml/postgres.sgml @@ -85,11 +85,11 @@ <para> Readers of this part should know how to connect to a - <productname>PostgreSQL</> database and issue + <productname>PostgreSQL</productname> database and issue <acronym>SQL</acronym> commands. Readers that are unfamiliar with these issues are encouraged to read <xref linkend="tutorial"> first. <acronym>SQL</acronym> commands are typically entered - using the <productname>PostgreSQL</> interactive terminal + using the <productname>PostgreSQL</productname> interactive terminal <application>psql</application>, but other programs that have similar functionality can be used as well. </para> @@ -116,10 +116,10 @@ <partintro> <para> This part covers topics that are of interest to a - <productname>PostgreSQL</> database administrator. This includes + <productname>PostgreSQL</productname> database administrator. This includes installation of the software, set up and configuration of the server, management of users and databases, and maintenance tasks. - Anyone who runs a <productname>PostgreSQL</> server, even for + Anyone who runs a <productname>PostgreSQL</productname> server, even for personal use, but especially in production, should be familiar with the topics covered in this part. </para> @@ -139,7 +139,7 @@ up their own server can begin their exploration with this part. The rest of this part is about tuning and management; that material assumes that the reader is familiar with the general use of - the <productname>PostgreSQL</> database system. Readers are + the <productname>PostgreSQL</productname> database system. Readers are encouraged to look at <xref linkend="tutorial"> and <xref linkend="sql"> for additional information. </para> @@ -171,7 +171,7 @@ <partintro> <para> This part describes the client programming interfaces distributed - with <productname>PostgreSQL</>. Each of these chapters can be + with <productname>PostgreSQL</productname>. Each of these chapters can be read independently. Note that there are many other programming interfaces for client programs that are distributed separately and contain their own documentation (<xref linkend="external-projects"> @@ -197,7 +197,7 @@ This part is about extending the server functionality with user-defined functions, data types, triggers, etc. These are advanced topics which should probably be approached only after all - the other user documentation about <productname>PostgreSQL</> has + the other user documentation about <productname>PostgreSQL</productname> has been understood. Later chapters in this part describe the server-side programming languages available in the <productname>PostgreSQL</productname> distribution as well as @@ -234,7 +234,7 @@ <partintro> <para> This part contains assorted information that might be of use to - <productname>PostgreSQL</> developers. + <productname>PostgreSQL</productname> developers. </para> </partintro> diff --git a/doc/src/sgml/problems.sgml b/doc/src/sgml/problems.sgml index 6bf74bb3999..edceec33813 100644 --- a/doc/src/sgml/problems.sgml +++ b/doc/src/sgml/problems.sgml @@ -145,7 +145,7 @@ </para> <para> - If your application uses some other client interface, such as <application>PHP</>, then + If your application uses some other client interface, such as <application>PHP</application>, then please try to isolate the offending queries. We will probably not set up a web server to reproduce your problem. In any case remember to provide the exact input files; do not guess that the problem happens for @@ -167,10 +167,10 @@ <note> <para> If you are reporting an error message, please obtain the most verbose - form of the message. In <application>psql</>, say <literal>\set - VERBOSITY verbose</> beforehand. If you are extracting the message + form of the message. In <application>psql</application>, say <literal>\set + VERBOSITY verbose</literal> beforehand. If you are extracting the message from the server log, set the run-time parameter - <xref linkend="guc-log-error-verbosity"> to <literal>verbose</> so that all + <xref linkend="guc-log-error-verbosity"> to <literal>verbose</literal> so that all details are logged. </para> </note> @@ -236,9 +236,9 @@ If your version is older than &version; we will almost certainly tell you to upgrade. There are many bug fixes and improvements in each new release, so it is quite possible that a bug you have - encountered in an older release of <productname>PostgreSQL</> + encountered in an older release of <productname>PostgreSQL</productname> has already been fixed. We can only provide limited support for - sites using older releases of <productname>PostgreSQL</>; if you + sites using older releases of <productname>PostgreSQL</productname>; if you require more than we can provide, consider acquiring a commercial support contract. </para> @@ -283,8 +283,8 @@ are specifically talking about the backend process, mention that, do not just say <quote>PostgreSQL crashes</quote>. A crash of a single backend process is quite different from crash of the parent - <quote>postgres</> process; please don't say <quote>the server - crashed</> when you mean a single backend process went down, nor vice versa. + <quote>postgres</quote> process; please don't say <quote>the server + crashed</quote> when you mean a single backend process went down, nor vice versa. Also, client programs such as the interactive frontend <quote><application>psql</application></quote> are completely separate from the backend. Please try to be specific about whether the problem is on the client or server side. @@ -356,10 +356,10 @@ subscribed to a list to be allowed to post on it. (You need not be subscribed to use the bug-report web form, however.) If you would like to send mail but do not want to receive list traffic, - you can subscribe and set your subscription option to <literal>nomail</>. + you can subscribe and set your subscription option to <literal>nomail</literal>. For more information send mail to <email>majordomo@postgresql.org</email> - with the single word <literal>help</> in the body of the message. + with the single word <literal>help</literal> in the body of the message. </para> </note> </sect2> diff --git a/doc/src/sgml/protocol.sgml b/doc/src/sgml/protocol.sgml index 526e8011dee..15108baf714 100644 --- a/doc/src/sgml/protocol.sgml +++ b/doc/src/sgml/protocol.sgml @@ -30,12 +30,12 @@ <para> In order to serve multiple clients efficiently, the server launches - a new <quote>backend</> process for each client. + a new <quote>backend</quote> process for each client. In the current implementation, a new child process is created immediately after an incoming connection is detected. This is transparent to the protocol, however. For purposes of the - protocol, the terms <quote>backend</> and <quote>server</> are - interchangeable; likewise <quote>frontend</> and <quote>client</> + protocol, the terms <quote>backend</quote> and <quote>server</quote> are + interchangeable; likewise <quote>frontend</quote> and <quote>client</quote> are interchangeable. </para> @@ -56,7 +56,7 @@ <para> During normal operation, the frontend sends queries and other commands to the backend, and the backend sends back query results - and other responses. There are a few cases (such as <command>NOTIFY</>) + and other responses. There are a few cases (such as <command>NOTIFY</command>) wherein the backend will send unsolicited messages, but for the most part this portion of a session is driven by frontend requests. @@ -71,9 +71,9 @@ <para> Within normal operation, SQL commands can be executed through either of - two sub-protocols. In the <quote>simple query</> protocol, the frontend + two sub-protocols. In the <quote>simple query</quote> protocol, the frontend just sends a textual query string, which is parsed and immediately - executed by the backend. In the <quote>extended query</> protocol, + executed by the backend. In the <quote>extended query</quote> protocol, processing of queries is separated into multiple steps: parsing, binding of parameter values, and execution. This offers flexibility and performance benefits, at the cost of extra complexity. @@ -81,7 +81,7 @@ <para> Normal operation has additional sub-protocols for special operations - such as <command>COPY</>. + such as <command>COPY</command>. </para> <sect2 id="protocol-message-concepts"> @@ -123,24 +123,24 @@ <para> In the extended-query protocol, execution of SQL commands is divided into multiple steps. The state retained between steps is represented - by two types of objects: <firstterm>prepared statements</> and - <firstterm>portals</>. A prepared statement represents the result of + by two types of objects: <firstterm>prepared statements</firstterm> and + <firstterm>portals</firstterm>. A prepared statement represents the result of parsing and semantic analysis of a textual query string. A prepared statement is not in itself ready to execute, because it might - lack specific values for <firstterm>parameters</>. A portal represents + lack specific values for <firstterm>parameters</firstterm>. A portal represents a ready-to-execute or already-partially-executed statement, with any - missing parameter values filled in. (For <command>SELECT</> statements, + missing parameter values filled in. (For <command>SELECT</command> statements, a portal is equivalent to an open cursor, but we choose to use a different - term since cursors don't handle non-<command>SELECT</> statements.) + term since cursors don't handle non-<command>SELECT</command> statements.) </para> <para> - The overall execution cycle consists of a <firstterm>parse</> step, + The overall execution cycle consists of a <firstterm>parse</firstterm> step, which creates a prepared statement from a textual query string; a - <firstterm>bind</> step, which creates a portal given a prepared + <firstterm>bind</firstterm> step, which creates a portal given a prepared statement and values for any needed parameters; and an - <firstterm>execute</> step that runs a portal's query. In the case of - a query that returns rows (<command>SELECT</>, <command>SHOW</>, etc), + <firstterm>execute</firstterm> step that runs a portal's query. In the case of + a query that returns rows (<command>SELECT</command>, <command>SHOW</command>, etc), the execute step can be told to fetch only a limited number of rows, so that multiple execute steps might be needed to complete the operation. @@ -151,7 +151,7 @@ (but note that these exist only within a session, and are never shared across sessions). Existing prepared statements and portals are referenced by names assigned when they were created. In addition, - an <quote>unnamed</> prepared statement and portal exist. Although these + an <quote>unnamed</quote> prepared statement and portal exist. Although these behave largely the same as named objects, operations on them are optimized for the case of executing a query only once and then discarding it, whereas operations on named objects are optimized on the expectation @@ -164,10 +164,10 @@ <para> Data of a particular data type might be transmitted in any of several - different <firstterm>formats</>. As of <productname>PostgreSQL</> 7.4 - the only supported formats are <quote>text</> and <quote>binary</>, + different <firstterm>formats</firstterm>. As of <productname>PostgreSQL</productname> 7.4 + the only supported formats are <quote>text</quote> and <quote>binary</quote>, but the protocol makes provision for future extensions. The desired - format for any value is specified by a <firstterm>format code</>. + format for any value is specified by a <firstterm>format code</firstterm>. Clients can specify a format code for each transmitted parameter value and for each column of a query result. Text has format code zero, binary has format code one, and all other format codes are reserved @@ -300,8 +300,8 @@ password, the server responds with an AuthenticationOk, otherwise it responds with an ErrorResponse. The actual PasswordMessage can be computed in SQL as <literal>concat('md5', - md5(concat(md5(concat(password, username)), random-salt)))</>. - (Keep in mind the <function>md5()</> function returns its + md5(concat(md5(concat(password, username)), random-salt)))</literal>. + (Keep in mind the <function>md5()</function> function returns its result as a hex string.) </para> </listitem> @@ -624,11 +624,11 @@ </para> <para> - The response to a <command>SELECT</> query (or other queries that - return row sets, such as <command>EXPLAIN</> or <command>SHOW</>) + The response to a <command>SELECT</command> query (or other queries that + return row sets, such as <command>EXPLAIN</command> or <command>SHOW</command>) normally consists of RowDescription, zero or more DataRow messages, and then CommandComplete. - <command>COPY</> to or from the frontend invokes special protocol + <command>COPY</command> to or from the frontend invokes special protocol as described in <xref linkend="protocol-copy">. All other query types normally produce only a CommandComplete message. @@ -657,8 +657,8 @@ <para> In simple Query mode, the format of retrieved values is always text, - except when the given command is a <command>FETCH</> from a cursor - declared with the <literal>BINARY</> option. In that case, the + except when the given command is a <command>FETCH</command> from a cursor + declared with the <literal>BINARY</literal> option. In that case, the retrieved values are in binary format. The format codes given in the RowDescription message tell which format is being used. </para> @@ -689,10 +689,10 @@ INSERT INTO mytable VALUES(1); SELECT 1/0; INSERT INTO mytable VALUES(2); </programlisting> - then the divide-by-zero failure in the <command>SELECT</> will force - rollback of the first <command>INSERT</>. Furthermore, because + then the divide-by-zero failure in the <command>SELECT</command> will force + rollback of the first <command>INSERT</command>. Furthermore, because execution of the message is abandoned at the first error, the second - <command>INSERT</> is never attempted at all. + <command>INSERT</command> is never attempted at all. </para> <para> @@ -704,17 +704,17 @@ COMMIT; INSERT INTO mytable VALUES(2); SELECT 1/0; </programlisting> - then the first <command>INSERT</> is committed by the - explicit <command>COMMIT</> command. The second <command>INSERT</> - and the <command>SELECT</> are still treated as a single transaction, + then the first <command>INSERT</command> is committed by the + explicit <command>COMMIT</command> command. The second <command>INSERT</command> + and the <command>SELECT</command> are still treated as a single transaction, so that the divide-by-zero failure will roll back the - second <command>INSERT</>, but not the first one. + second <command>INSERT</command>, but not the first one. </para> <para> This behavior is implemented by running the statements in a multi-statement Query message in an <firstterm>implicit transaction - block</> unless there is some explicit transaction block for them to + block</firstterm> unless there is some explicit transaction block for them to run in. The main difference between an implicit transaction block and a regular one is that an implicit block is closed automatically at the end of the Query message, either by an implicit commit if there was no @@ -725,27 +725,27 @@ SELECT 1/0; <para> If the session is already in a transaction block, as a result of - a <command>BEGIN</> in some previous message, then the Query message + a <command>BEGIN</command> in some previous message, then the Query message simply continues that transaction block, whether the message contains one statement or several. However, if the Query message contains - a <command>COMMIT</> or <command>ROLLBACK</> closing the existing + a <command>COMMIT</command> or <command>ROLLBACK</command> closing the existing transaction block, then any following statements are executed in an implicit transaction block. - Conversely, if a <command>BEGIN</> appears in a multi-statement Query + Conversely, if a <command>BEGIN</command> appears in a multi-statement Query message, then it starts a regular transaction block that will only be - terminated by an explicit <command>COMMIT</> or <command>ROLLBACK</>, + terminated by an explicit <command>COMMIT</command> or <command>ROLLBACK</command>, whether that appears in this Query message or a later one. - If the <command>BEGIN</> follows some statements that were executed as + If the <command>BEGIN</command> follows some statements that were executed as an implicit transaction block, those statements are not immediately committed; in effect, they are retroactively included into the new regular transaction block. </para> <para> - A <command>COMMIT</> or <command>ROLLBACK</> appearing in an implicit + A <command>COMMIT</command> or <command>ROLLBACK</command> appearing in an implicit transaction block is executed as normal, closing the implicit block; - however, a warning will be issued since a <command>COMMIT</> - or <command>ROLLBACK</> without a previous <command>BEGIN</> might + however, a warning will be issued since a <command>COMMIT</command> + or <command>ROLLBACK</command> without a previous <command>BEGIN</command> might represent a mistake. If more statements follow, a new implicit transaction block will be started for them. </para> @@ -766,8 +766,8 @@ SELECT 1/0; ROLLBACK; </programlisting> in a single Query message, the session will be left inside a failed - regular transaction block, since the <command>ROLLBACK</> is not - reached after the divide-by-zero error. Another <command>ROLLBACK</> + regular transaction block, since the <command>ROLLBACK</command> is not + reached after the divide-by-zero error. Another <command>ROLLBACK</command> will be needed to restore the session to a usable state. </para> @@ -789,7 +789,7 @@ INSERT INTO mytable VALUES(2); SELCT 1/0; </programlisting> then none of the statements would get run, resulting in the visible - difference that the first <command>INSERT</> is not committed. + difference that the first <command>INSERT</command> is not committed. Errors detected at semantic analysis or later, such as a misspelled table or column name, do not have this effect. </para> @@ -824,17 +824,17 @@ SELCT 1/0; <para> A parameter data type can be left unspecified by setting it to zero, or by making the array of parameter type OIDs shorter than the - number of parameter symbols (<literal>$</><replaceable>n</>) + number of parameter symbols (<literal>$</literal><replaceable>n</replaceable>) used in the query string. Another special case is that a parameter's - type can be specified as <type>void</> (that is, the OID of the - <type>void</> pseudo-type). This is meant to allow parameter symbols + type can be specified as <type>void</type> (that is, the OID of the + <type>void</type> pseudo-type). This is meant to allow parameter symbols to be used for function parameters that are actually OUT parameters. - Ordinarily there is no context in which a <type>void</> parameter + Ordinarily there is no context in which a <type>void</type> parameter could be used, but if such a parameter symbol appears in a function's parameter list, it is effectively ignored. For example, a function - call such as <literal>foo($1,$2,$3,$4)</> could match a function with - two IN and two OUT arguments, if <literal>$3</> and <literal>$4</> - are specified as having type <type>void</>. + call such as <literal>foo($1,$2,$3,$4)</literal> could match a function with + two IN and two OUT arguments, if <literal>$3</literal> and <literal>$4</literal> + are specified as having type <type>void</type>. </para> </note> @@ -858,7 +858,7 @@ SELCT 1/0; statements must be explicitly closed before they can be redefined by another Parse message, but this is not required for the unnamed statement. Named prepared statements can also be created and accessed at the SQL - command level, using <command>PREPARE</> and <command>EXECUTE</>. + command level, using <command>PREPARE</command> and <command>EXECUTE</command>. </para> <para> @@ -869,7 +869,7 @@ SELCT 1/0; the values to use for any parameter placeholders present in the prepared statement. The supplied parameter set must match those needed by the prepared statement. - (If you declared any <type>void</> parameters in the Parse message, + (If you declared any <type>void</type> parameters in the Parse message, pass NULL values for them in the Bind message.) Bind also specifies the format to use for any data returned by the query; the format can be specified overall, or per-column. @@ -880,7 +880,7 @@ SELCT 1/0; <para> The choice between text and binary output is determined by the format codes given in Bind, regardless of the SQL command involved. The - <literal>BINARY</> attribute in cursor declarations is irrelevant when + <literal>BINARY</literal> attribute in cursor declarations is irrelevant when using extended query protocol. </para> </note> @@ -904,14 +904,14 @@ SELCT 1/0; portals must be explicitly closed before they can be redefined by another Bind message, but this is not required for the unnamed portal. Named portals can also be created and accessed at the SQL - command level, using <command>DECLARE CURSOR</> and <command>FETCH</>. + command level, using <command>DECLARE CURSOR</command> and <command>FETCH</command>. </para> <para> Once a portal exists, it can be executed using an Execute message. The Execute message specifies the portal name (empty string denotes the unnamed portal) and - a maximum result-row count (zero meaning <quote>fetch all rows</>). + a maximum result-row count (zero meaning <quote>fetch all rows</quote>). The result-row count is only meaningful for portals containing commands that return row sets; in other cases the command is always executed to completion, and the row count is ignored. @@ -938,7 +938,7 @@ SELCT 1/0; At completion of each series of extended-query messages, the frontend should issue a Sync message. This parameterless message causes the backend to close the current transaction if it's not inside a - <command>BEGIN</>/<command>COMMIT</> transaction block (<quote>close</> + <command>BEGIN</command>/<command>COMMIT</command> transaction block (<quote>close</quote> meaning to commit if no error, or roll back if error). Then a ReadyForQuery response is issued. The purpose of Sync is to provide a resynchronization point for error recovery. When an error is detected @@ -946,13 +946,13 @@ SELCT 1/0; ErrorResponse, then reads and discards messages until a Sync is reached, then issues ReadyForQuery and returns to normal message processing. (But note that no skipping occurs if an error is detected - <emphasis>while</> processing Sync — this ensures that there is one + <emphasis>while</emphasis> processing Sync — this ensures that there is one and only one ReadyForQuery sent for each Sync.) </para> <note> <para> - Sync does not cause a transaction block opened with <command>BEGIN</> + Sync does not cause a transaction block opened with <command>BEGIN</command> to be closed. It is possible to detect this situation since the ReadyForQuery message includes transaction status information. </para> @@ -1039,7 +1039,7 @@ SELCT 1/0; <para> The Function Call sub-protocol is a legacy feature that is probably best avoided in new code. Similar results can be accomplished by setting up - a prepared statement that does <literal>SELECT function($1, ...)</>. + a prepared statement that does <literal>SELECT function($1, ...)</literal>. The Function Call cycle can then be replaced with Bind/Execute. </para> </note> @@ -1107,7 +1107,7 @@ SELCT 1/0; <title>COPY Operations</title> <para> - The <command>COPY</> command allows high-speed bulk data transfer + The <command>COPY</command> command allows high-speed bulk data transfer to or from the server. Copy-in and copy-out operations each switch the connection into a distinct sub-protocol, which lasts until the operation is completed. @@ -1115,16 +1115,16 @@ SELCT 1/0; <para> Copy-in mode (data transfer to the server) is initiated when the - backend executes a <command>COPY FROM STDIN</> SQL statement. The backend + backend executes a <command>COPY FROM STDIN</command> SQL statement. The backend sends a CopyInResponse message to the frontend. The frontend should then send zero or more CopyData messages, forming a stream of input data. (The message boundaries are not required to have anything to do with row boundaries, although that is often a reasonable choice.) The frontend can terminate the copy-in mode by sending either a CopyDone message (allowing successful termination) or a CopyFail message (which - will cause the <command>COPY</> SQL statement to fail with an + will cause the <command>COPY</command> SQL statement to fail with an error). The backend then reverts to the command-processing mode it was - in before the <command>COPY</> started, which will be either simple or + in before the <command>COPY</command> started, which will be either simple or extended query protocol. It will next send either CommandComplete (if successful) or ErrorResponse (if not). </para> @@ -1132,10 +1132,10 @@ SELCT 1/0; <para> In the event of a backend-detected error during copy-in mode (including receipt of a CopyFail message), the backend will issue an ErrorResponse - message. If the <command>COPY</> command was issued via an extended-query + message. If the <command>COPY</command> command was issued via an extended-query message, the backend will now discard frontend messages until a Sync message is received, then it will issue ReadyForQuery and return to normal - processing. If the <command>COPY</> command was issued in a simple + processing. If the <command>COPY</command> command was issued in a simple Query message, the rest of that message is discarded and ReadyForQuery is issued. In either case, any subsequent CopyData, CopyDone, or CopyFail messages issued by the frontend will simply be dropped. @@ -1147,16 +1147,16 @@ SELCT 1/0; that will abort the copy-in state as described above. (The exception for Flush and Sync is for the convenience of client libraries that always send Flush or Sync after an Execute message, without checking whether - the command to be executed is a <command>COPY FROM STDIN</>.) + the command to be executed is a <command>COPY FROM STDIN</command>.) </para> <para> Copy-out mode (data transfer from the server) is initiated when the - backend executes a <command>COPY TO STDOUT</> SQL statement. The backend + backend executes a <command>COPY TO STDOUT</command> SQL statement. The backend sends a CopyOutResponse message to the frontend, followed by zero or more CopyData messages (always one per row), followed by CopyDone. The backend then reverts to the command-processing mode it was - in before the <command>COPY</> started, and sends CommandComplete. + in before the <command>COPY</command> started, and sends CommandComplete. The frontend cannot abort the transfer (except by closing the connection or issuing a Cancel request), but it can discard unwanted CopyData and CopyDone messages. @@ -1179,7 +1179,7 @@ SELCT 1/0; <para> There is another Copy-related mode called copy-both, which allows - high-speed bulk data transfer to <emphasis>and</> from the server. + high-speed bulk data transfer to <emphasis>and</emphasis> from the server. Copy-both mode is initiated when a backend in walsender mode executes a <command>START_REPLICATION</command> statement. The backend sends a CopyBothResponse message to the frontend. Both @@ -1204,7 +1204,7 @@ SELCT 1/0; The CopyInResponse, CopyOutResponse and CopyBothResponse messages include fields that inform the frontend of the number of columns per row and the format codes being used for each column. (As of - the present implementation, all columns in a given <command>COPY</> + the present implementation, all columns in a given <command>COPY</command> operation will use the same format, but the message design does not assume this.) </para> @@ -1226,7 +1226,7 @@ SELCT 1/0; <para> It is possible for NoticeResponse messages to be generated due to outside activity; for example, if the database administrator commands - a <quote>fast</> database shutdown, the backend will send a NoticeResponse + a <quote>fast</quote> database shutdown, the backend will send a NoticeResponse indicating this fact before closing the connection. Accordingly, frontends should always be prepared to accept and display NoticeResponse messages, even when the connection is nominally idle. @@ -1236,7 +1236,7 @@ SELCT 1/0; ParameterStatus messages will be generated whenever the active value changes for any of the parameters the backend believes the frontend should know about. Most commonly this occurs in response - to a <command>SET</> SQL command executed by the frontend, and + to a <command>SET</command> SQL command executed by the frontend, and this case is effectively synchronous — but it is also possible for parameter status changes to occur because the administrator changed a configuration file and then sent the @@ -1249,27 +1249,27 @@ SELCT 1/0; <para> At present there is a hard-wired set of parameters for which ParameterStatus will be generated: they are - <varname>server_version</>, - <varname>server_encoding</>, - <varname>client_encoding</>, - <varname>application_name</>, - <varname>is_superuser</>, - <varname>session_authorization</>, - <varname>DateStyle</>, - <varname>IntervalStyle</>, - <varname>TimeZone</>, - <varname>integer_datetimes</>, and - <varname>standard_conforming_strings</>. - (<varname>server_encoding</>, <varname>TimeZone</>, and - <varname>integer_datetimes</> were not reported by releases before 8.0; - <varname>standard_conforming_strings</> was not reported by releases + <varname>server_version</varname>, + <varname>server_encoding</varname>, + <varname>client_encoding</varname>, + <varname>application_name</varname>, + <varname>is_superuser</varname>, + <varname>session_authorization</varname>, + <varname>DateStyle</varname>, + <varname>IntervalStyle</varname>, + <varname>TimeZone</varname>, + <varname>integer_datetimes</varname>, and + <varname>standard_conforming_strings</varname>. + (<varname>server_encoding</varname>, <varname>TimeZone</varname>, and + <varname>integer_datetimes</varname> were not reported by releases before 8.0; + <varname>standard_conforming_strings</varname> was not reported by releases before 8.1; - <varname>IntervalStyle</> was not reported by releases before 8.4; - <varname>application_name</> was not reported by releases before 9.0.) + <varname>IntervalStyle</varname> was not reported by releases before 8.4; + <varname>application_name</varname> was not reported by releases before 9.0.) Note that - <varname>server_version</>, - <varname>server_encoding</> and - <varname>integer_datetimes</> + <varname>server_version</varname>, + <varname>server_encoding</varname> and + <varname>integer_datetimes</varname> are pseudo-parameters that cannot change after startup. This set might change in the future, or even become configurable. Accordingly, a frontend should simply ignore ParameterStatus for @@ -1394,7 +1394,7 @@ SELCT 1/0; frontend disconnects while a non-<command>SELECT</command> query is being processed, the backend will probably finish the query before noticing the disconnection. If the query is outside any - transaction block (<command>BEGIN</> ... <command>COMMIT</> + transaction block (<command>BEGIN</command> ... <command>COMMIT</command> sequence) then its results might be committed before the disconnection is recognized. </para> @@ -1404,7 +1404,7 @@ SELCT 1/0; <title><acronym>SSL</acronym> Session Encryption</title> <para> - If <productname>PostgreSQL</> was built with + If <productname>PostgreSQL</productname> was built with <acronym>SSL</acronym> support, frontend/backend communications can be encrypted using <acronym>SSL</acronym>. This provides communication security in environments where attackers might be @@ -1417,17 +1417,17 @@ SELCT 1/0; To initiate an <acronym>SSL</acronym>-encrypted connection, the frontend initially sends an SSLRequest message rather than a StartupMessage. The server then responds with a single byte - containing <literal>S</> or <literal>N</>, indicating that it is + containing <literal>S</literal> or <literal>N</literal>, indicating that it is willing or unwilling to perform <acronym>SSL</acronym>, respectively. The frontend might close the connection at this point if it is dissatisfied with the response. To continue after - <literal>S</>, perform an <acronym>SSL</acronym> startup handshake + <literal>S</literal>, perform an <acronym>SSL</acronym> startup handshake (not described here, part of the <acronym>SSL</acronym> specification) with the server. If this is successful, continue with sending the usual StartupMessage. In this case the StartupMessage and all subsequent data will be <acronym>SSL</acronym>-encrypted. To continue after - <literal>N</>, send the usual StartupMessage and proceed without + <literal>N</literal>, send the usual StartupMessage and proceed without encryption. </para> @@ -1435,7 +1435,7 @@ SELCT 1/0; The frontend should also be prepared to handle an ErrorMessage response to SSLRequest from the server. This would only occur if the server predates the addition of <acronym>SSL</acronym> support - to <productname>PostgreSQL</>. (Such servers are now very ancient, + to <productname>PostgreSQL</productname>. (Such servers are now very ancient, and likely do not exist in the wild anymore.) In this case the connection must be closed, but the frontend might choose to open a fresh connection @@ -1460,8 +1460,8 @@ SELCT 1/0; <title>SASL Authentication</title> <para> -<firstterm>SASL</> is a framework for authentication in connection-oriented -protocols. At the moment, <productname>PostgreSQL</> implements only one SASL +<firstterm>SASL</firstterm> is a framework for authentication in connection-oriented +protocols. At the moment, <productname>PostgreSQL</productname> implements only one SASL authentication mechanism, SCRAM-SHA-256, but more might be added in the future. The below steps illustrate how SASL authentication is performed in general, while the next subsection gives more details on SCRAM-SHA-256. @@ -1518,24 +1518,24 @@ ErrorMessage. <title>SCRAM-SHA-256 authentication</title> <para> - <firstterm>SCRAM-SHA-256</> (called just <firstterm>SCRAM</> from now on) is + <firstterm>SCRAM-SHA-256</firstterm> (called just <firstterm>SCRAM</firstterm> from now on) is the only implemented SASL mechanism, at the moment. It is described in detail in RFC 7677 and RFC 5802. </para> <para> When SCRAM-SHA-256 is used in PostgreSQL, the server will ignore the user name -that the client sends in the <structname>client-first-message</>. The user name +that the client sends in the <structname>client-first-message</structname>. The user name that was already sent in the startup message is used instead. -<productname>PostgreSQL</> supports multiple character encodings, while SCRAM +<productname>PostgreSQL</productname> supports multiple character encodings, while SCRAM dictates UTF-8 to be used for the user name, so it might be impossible to represent the PostgreSQL user name in UTF-8. </para> <para> The SCRAM specification dictates that the password is also in UTF-8, and is -processed with the <firstterm>SASLprep</> algorithm. -<productname>PostgreSQL</>, however, does not require UTF-8 to be used for +processed with the <firstterm>SASLprep</firstterm> algorithm. +<productname>PostgreSQL</productname>, however, does not require UTF-8 to be used for the password. When a user's password is set, it is processed with SASLprep as if it was in UTF-8, regardless of the actual encoding used. However, if it is not a legal UTF-8 byte sequence, or it contains UTF-8 byte sequences @@ -1547,7 +1547,7 @@ the password is in. </para> <para> -<firstterm>Channel binding</> has not been implemented yet. +<firstterm>Channel binding</firstterm> has not been implemented yet. </para> <procedure> @@ -1561,27 +1561,27 @@ the password is in. <step id="scram-client-first"> <para> The client responds by sending a SASLInitialResponse message, which - indicates the chosen mechanism, <literal>SCRAM-SHA-256</>. In the Initial + indicates the chosen mechanism, <literal>SCRAM-SHA-256</literal>. In the Initial Client response field, the message contains the SCRAM - <structname>client-first-message</>. + <structname>client-first-message</structname>. </para> </step> <step id="scram-server-first"> <para> Server sends an AuthenticationSASLContinue message, with a SCRAM - <structname>server-first message</> as the content. + <structname>server-first message</structname> as the content. </para> </step> <step id="scram-client-final"> <para> Client sends a SASLResponse message, with SCRAM - <structname>client-final-message</> as the content. + <structname>client-final-message</structname> as the content. </para> </step> <step id="scram-server-final"> <para> Server sends an AuthenticationSASLFinal message, with the SCRAM - <structname>server-final-message</>, followed immediately by + <structname>server-final-message</structname>, followed immediately by an AuthenticationOk message. </para> </step> @@ -1594,14 +1594,14 @@ the password is in. <para> To initiate streaming replication, the frontend sends the -<literal>replication</> parameter in the startup message. A Boolean value -of <literal>true</> tells the backend to go into walsender mode, wherein a +<literal>replication</literal> parameter in the startup message. A Boolean value +of <literal>true</literal> tells the backend to go into walsender mode, wherein a small set of replication commands can be issued instead of SQL statements. Only the simple query protocol can be used in walsender mode. Replication commands are logged in the server log when <xref linkend="guc-log-replication-commands"> is enabled. -Passing <literal>database</> as the value instructs walsender to connect to -the database specified in the <literal>dbname</> parameter, which will allow +Passing <literal>database</literal> as the value instructs walsender to connect to +the database specified in the <literal>dbname</literal> parameter, which will allow the connection to be used for logical replication from that database. </para> <para> @@ -1697,7 +1697,7 @@ The commands accepted in walsender mode are: <variablelist> <varlistentry> - <term><replaceable class="parameter">name</></term> + <term><replaceable class="parameter">name</replaceable></term> <listitem> <para> The name of a run-time parameter. Available parameters are documented @@ -1728,7 +1728,7 @@ The commands accepted in walsender mode are: </term> <listitem> <para> - File name of the timeline history file, e.g., <filename>00000002.history</>. + File name of the timeline history file, e.g., <filename>00000002.history</filename>. </para> </listitem> </varlistentry> @@ -1750,7 +1750,7 @@ The commands accepted in walsender mode are: </varlistentry> <varlistentry id="protocol-replication-create-slot" xreflabel="CREATE_REPLICATION_SLOT"> - <term><literal>CREATE_REPLICATION_SLOT</literal> <replaceable class="parameter">slot_name</> [ <literal>TEMPORARY</> ] { <literal>PHYSICAL</> [ <literal>RESERVE_WAL</> ] | <literal>LOGICAL</> <replaceable class="parameter">output_plugin</> [ <literal>EXPORT_SNAPSHOT</> | <literal>NOEXPORT_SNAPSHOT</> | <literal>USE_SNAPSHOT</> ] } + <term><literal>CREATE_REPLICATION_SLOT</literal> <replaceable class="parameter">slot_name</replaceable> [ <literal>TEMPORARY</literal> ] { <literal>PHYSICAL</literal> [ <literal>RESERVE_WAL</literal> ] | <literal>LOGICAL</literal> <replaceable class="parameter">output_plugin</replaceable> [ <literal>EXPORT_SNAPSHOT</literal> | <literal>NOEXPORT_SNAPSHOT</literal> | <literal>USE_SNAPSHOT</literal> ] } <indexterm><primary>CREATE_REPLICATION_SLOT</primary></indexterm> </term> <listitem> @@ -1761,7 +1761,7 @@ The commands accepted in walsender mode are: </para> <variablelist> <varlistentry> - <term><replaceable class="parameter">slot_name</></term> + <term><replaceable class="parameter">slot_name</replaceable></term> <listitem> <para> The name of the slot to create. Must be a valid replication slot @@ -1771,7 +1771,7 @@ The commands accepted in walsender mode are: </varlistentry> <varlistentry> - <term><replaceable class="parameter">output_plugin</></term> + <term><replaceable class="parameter">output_plugin</replaceable></term> <listitem> <para> The name of the output plugin used for logical decoding @@ -1781,7 +1781,7 @@ The commands accepted in walsender mode are: </varlistentry> <varlistentry> - <term><literal>TEMPORARY</></term> + <term><literal>TEMPORARY</literal></term> <listitem> <para> Specify that this replication slot is a temporary one. Temporary @@ -1792,30 +1792,30 @@ The commands accepted in walsender mode are: </varlistentry> <varlistentry> - <term><literal>RESERVE_WAL</></term> + <term><literal>RESERVE_WAL</literal></term> <listitem> <para> - Specify that this physical replication slot reserves <acronym>WAL</> - immediately. Otherwise, <acronym>WAL</> is only reserved upon + Specify that this physical replication slot reserves <acronym>WAL</acronym> + immediately. Otherwise, <acronym>WAL</acronym> is only reserved upon connection from a streaming replication client. </para> </listitem> </varlistentry> <varlistentry> - <term><literal>EXPORT_SNAPSHOT</></term> - <term><literal>NOEXPORT_SNAPSHOT</></term> - <term><literal>USE_SNAPSHOT</></term> + <term><literal>EXPORT_SNAPSHOT</literal></term> + <term><literal>NOEXPORT_SNAPSHOT</literal></term> + <term><literal>USE_SNAPSHOT</literal></term> <listitem> <para> Decides what to do with the snapshot created during logical slot - initialization. <literal>EXPORT_SNAPSHOT</>, which is the default, + initialization. <literal>EXPORT_SNAPSHOT</literal>, which is the default, will export the snapshot for use in other sessions. This option can't - be used inside a transaction. <literal>USE_SNAPSHOT</> will use the + be used inside a transaction. <literal>USE_SNAPSHOT</literal> will use the snapshot for the current transaction executing the command. This option must be used in a transaction, and <literal>CREATE_REPLICATION_SLOT</literal> must be the first command - run in that transaction. Finally, <literal>NOEXPORT_SNAPSHOT</> will + run in that transaction. Finally, <literal>NOEXPORT_SNAPSHOT</literal> will just use the snapshot for logical decoding as normal but won't do anything else with it. </para> @@ -1875,15 +1875,15 @@ The commands accepted in walsender mode are: </varlistentry> <varlistentry> - <term><literal>START_REPLICATION</literal> [ <literal>SLOT</literal> <replaceable class="parameter">slot_name</> ] [ <literal>PHYSICAL</literal> ] <replaceable class="parameter">XXX/XXX</> [ <literal>TIMELINE</literal> <replaceable class="parameter">tli</> ] + <term><literal>START_REPLICATION</literal> [ <literal>SLOT</literal> <replaceable class="parameter">slot_name</replaceable> ] [ <literal>PHYSICAL</literal> ] <replaceable class="parameter">XXX/XXX</replaceable> [ <literal>TIMELINE</literal> <replaceable class="parameter">tli</replaceable> ] <indexterm><primary>START_REPLICATION</primary></indexterm> </term> <listitem> <para> Instructs server to start streaming WAL, starting at - WAL location <replaceable class="parameter">XXX/XXX</>. + WAL location <replaceable class="parameter">XXX/XXX</replaceable>. If <literal>TIMELINE</literal> option is specified, - streaming starts on timeline <replaceable class="parameter">tli</>; + streaming starts on timeline <replaceable class="parameter">tli</replaceable>; otherwise, the server's current timeline is selected. The server can reply with an error, for example if the requested section of WAL has already been recycled. On success, server responds with a CopyBothResponse @@ -1892,9 +1892,9 @@ The commands accepted in walsender mode are: <para> If a slot's name is provided - via <replaceable class="parameter">slot_name</>, it will be updated + via <replaceable class="parameter">slot_name</replaceable>, it will be updated as replication progresses so that the server knows which WAL segments, - and if <varname>hot_standby_feedback</> is on which transactions, + and if <varname>hot_standby_feedback</varname> is on which transactions, are still needed by the standby. </para> @@ -2228,11 +2228,11 @@ The commands accepted in walsender mode are: </listitem> </varlistentry> <varlistentry> - <term><literal>START_REPLICATION</literal> <literal>SLOT</literal> <replaceable class="parameter">slot_name</> <literal>LOGICAL</literal> <replaceable class="parameter">XXX/XXX</> [ ( <replaceable>option_name</replaceable> [ <replaceable>option_value</replaceable> ] [, ...] ) ]</term> + <term><literal>START_REPLICATION</literal> <literal>SLOT</literal> <replaceable class="parameter">slot_name</replaceable> <literal>LOGICAL</literal> <replaceable class="parameter">XXX/XXX</replaceable> [ ( <replaceable>option_name</replaceable> [ <replaceable>option_value</replaceable> ] [, ...] ) ]</term> <listitem> <para> Instructs server to start streaming WAL for logical replication, starting - at WAL location <replaceable class="parameter">XXX/XXX</>. The server can + at WAL location <replaceable class="parameter">XXX/XXX</replaceable>. The server can reply with an error, for example if the requested section of WAL has already been recycled. On success, server responds with a CopyBothResponse message, and then starts to stream WAL to the frontend. @@ -2250,7 +2250,7 @@ The commands accepted in walsender mode are: <variablelist> <varlistentry> - <term><literal>SLOT</literal> <replaceable class="parameter">slot_name</></term> + <term><literal>SLOT</literal> <replaceable class="parameter">slot_name</replaceable></term> <listitem> <para> The name of the slot to stream changes from. This parameter is required, @@ -2261,7 +2261,7 @@ The commands accepted in walsender mode are: </listitem> </varlistentry> <varlistentry> - <term><replaceable class="parameter">XXX/XXX</></term> + <term><replaceable class="parameter">XXX/XXX</replaceable></term> <listitem> <para> The WAL location to begin streaming at. @@ -2269,7 +2269,7 @@ The commands accepted in walsender mode are: </listitem> </varlistentry> <varlistentry> - <term><replaceable class="parameter">option_name</></term> + <term><replaceable class="parameter">option_name</replaceable></term> <listitem> <para> The name of an option passed to the slot's logical decoding plugin. @@ -2277,7 +2277,7 @@ The commands accepted in walsender mode are: </listitem> </varlistentry> <varlistentry> - <term><replaceable class="parameter">option_value</></term> + <term><replaceable class="parameter">option_value</replaceable></term> <listitem> <para> Optional value, in the form of a string constant, associated with the @@ -2291,7 +2291,7 @@ The commands accepted in walsender mode are: <varlistentry> <term> - <literal>DROP_REPLICATION_SLOT</literal> <replaceable class="parameter">slot_name</> <optional> <literal>WAIT</> </optional> + <literal>DROP_REPLICATION_SLOT</literal> <replaceable class="parameter">slot_name</replaceable> <optional> <literal>WAIT</literal> </optional> <indexterm><primary>DROP_REPLICATION_SLOT</primary></indexterm> </term> <listitem> @@ -2302,7 +2302,7 @@ The commands accepted in walsender mode are: </para> <variablelist> <varlistentry> - <term><replaceable class="parameter">slot_name</></term> + <term><replaceable class="parameter">slot_name</replaceable></term> <listitem> <para> The name of the slot to drop. @@ -2348,7 +2348,7 @@ The commands accepted in walsender mode are: </varlistentry> <varlistentry> - <term><literal>PROGRESS</></term> + <term><literal>PROGRESS</literal></term> <listitem> <para> Request information required to generate a progress report. This will @@ -2365,7 +2365,7 @@ The commands accepted in walsender mode are: </varlistentry> <varlistentry> - <term><literal>FAST</></term> + <term><literal>FAST</literal></term> <listitem> <para> Request a fast checkpoint. @@ -2399,7 +2399,7 @@ The commands accepted in walsender mode are: </varlistentry> <varlistentry> - <term><literal>MAX_RATE</literal> <replaceable>rate</></term> + <term><literal>MAX_RATE</literal> <replaceable>rate</replaceable></term> <listitem> <para> Limit (throttle) the maximum amount of data transferred from server @@ -2420,7 +2420,7 @@ The commands accepted in walsender mode are: <filename>pg_tblspc</filename> in a file named <filename>tablespace_map</filename>. The tablespace map file includes each symbolic link name as it exists in the directory - <filename>pg_tblspc/</> and the full path of that symbolic link. + <filename>pg_tblspc/</filename> and the full path of that symbolic link. </para> </listitem> </varlistentry> @@ -2473,9 +2473,9 @@ The commands accepted in walsender mode are: <para> After the second regular result set, one or more CopyResponse results will be sent, one for the main data directory and one for each additional tablespace other - than <literal>pg_default</> and <literal>pg_global</>. The data in + than <literal>pg_default</literal> and <literal>pg_global</literal>. The data in the CopyResponse results will be a tar format (following the - <quote>ustar interchange format</> specified in the POSIX 1003.1-2008 + <quote>ustar interchange format</quote> specified in the POSIX 1003.1-2008 standard) dump of the tablespace contents, except that the two trailing blocks of zeroes specified in the standard are omitted. After the tar data is complete, a final ordinary result set will be sent, @@ -2486,29 +2486,29 @@ The commands accepted in walsender mode are: <para> The tar archive for the data directory and each tablespace will contain all files in the directories, regardless of whether they are - <productname>PostgreSQL</> files or other files added to the same + <productname>PostgreSQL</productname> files or other files added to the same directory. The only excluded files are: <itemizedlist spacing="compact" mark="bullet"> <listitem> <para> - <filename>postmaster.pid</> + <filename>postmaster.pid</filename> </para> </listitem> <listitem> <para> - <filename>postmaster.opts</> + <filename>postmaster.opts</filename> </para> </listitem> <listitem> <para> Various temporary files and directories created during the operation of the PostgreSQL server, such as any file or directory beginning - with <filename>pgsql_tmp</>. + with <filename>pgsql_tmp</filename>. </para> </listitem> <listitem> <para> - <filename>pg_wal</>, including subdirectories. If the backup is run + <filename>pg_wal</filename>, including subdirectories. If the backup is run with WAL files included, a synthesized version of <filename>pg_wal</filename> will be included, but it will only contain the files necessary for the backup to work, not the rest of the contents. @@ -2516,10 +2516,10 @@ The commands accepted in walsender mode are: </listitem> <listitem> <para> - <filename>pg_dynshmem</>, <filename>pg_notify</>, - <filename>pg_replslot</>, <filename>pg_serial</>, - <filename>pg_snapshots</>, <filename>pg_stat_tmp</>, and - <filename>pg_subtrans</> are copied as empty directories (even if + <filename>pg_dynshmem</filename>, <filename>pg_notify</filename>, + <filename>pg_replslot</filename>, <filename>pg_serial</filename>, + <filename>pg_snapshots</filename>, <filename>pg_stat_tmp</filename>, and + <filename>pg_subtrans</filename> are copied as empty directories (even if they are symbolic links). </para> </listitem> @@ -2549,7 +2549,7 @@ The commands accepted in walsender mode are: <para> This section describes the logical replication protocol, which is the message flow started by the <literal>START_REPLICATION</literal> - <literal>SLOT</literal> <replaceable class="parameter">slot_name</> + <literal>SLOT</literal> <replaceable class="parameter">slot_name</replaceable> <literal>LOGICAL</literal> replication command. </para> @@ -3419,7 +3419,7 @@ Bind (F) <listitem> <para> The number of parameter format codes that follow - (denoted <replaceable>C</> below). + (denoted <replaceable>C</replaceable> below). This can be zero to indicate that there are no parameters or that the parameters all use the default format (text); or one, in which case the specified format code is applied @@ -3430,7 +3430,7 @@ Bind (F) </varlistentry> <varlistentry> <term> - Int16[<replaceable>C</>] + Int16[<replaceable>C</replaceable>] </term> <listitem> <para> @@ -3488,7 +3488,7 @@ Bind (F) <listitem> <para> The number of result-column format codes that follow - (denoted <replaceable>R</> below). + (denoted <replaceable>R</replaceable> below). This can be zero to indicate that there are no result columns or that the result columns should all use the default format (text); @@ -3500,7 +3500,7 @@ Bind (F) </varlistentry> <varlistentry> <term> - Int16[<replaceable>R</>] + Int16[<replaceable>R</replaceable>] </term> <listitem> <para> @@ -3575,7 +3575,7 @@ CancelRequest (F) <listitem> <para> The cancel request code. The value is chosen to contain - <literal>1234</> in the most significant 16 bits, and <literal>5678</> in the + <literal>1234</literal> in the most significant 16 bits, and <literal>5678</literal> in the least significant 16 bits. (To avoid confusion, this code must not be the same as any protocol version number.) </para> @@ -3642,8 +3642,8 @@ Close (F) </term> <listitem> <para> - '<literal>S</>' to close a prepared statement; or - '<literal>P</>' to close a portal. + '<literal>S</literal>' to close a prepared statement; or + '<literal>P</literal>' to close a portal. </para> </listitem> </varlistentry> @@ -3977,13 +3977,13 @@ CopyInResponse (B) <listitem> <para> The number of columns in the data to be copied - (denoted <replaceable>N</> below). + (denoted <replaceable>N</replaceable> below). </para> </listitem> </varlistentry> <varlistentry> <term> - Int16[<replaceable>N</>] + Int16[<replaceable>N</replaceable>] </term> <listitem> <para> @@ -4050,13 +4050,13 @@ CopyOutResponse (B) <listitem> <para> The number of columns in the data to be copied - (denoted <replaceable>N</> below). + (denoted <replaceable>N</replaceable> below). </para> </listitem> </varlistentry> <varlistentry> <term> - Int16[<replaceable>N</>] + Int16[<replaceable>N</replaceable>] </term> <listitem> <para> @@ -4123,13 +4123,13 @@ CopyBothResponse (B) <listitem> <para> The number of columns in the data to be copied - (denoted <replaceable>N</> below). + (denoted <replaceable>N</replaceable> below). </para> </listitem> </varlistentry> <varlistentry> <term> - Int16[<replaceable>N</>] + Int16[<replaceable>N</replaceable>] </term> <listitem> <para> @@ -4252,8 +4252,8 @@ Describe (F) </term> <listitem> <para> - '<literal>S</>' to describe a prepared statement; or - '<literal>P</>' to describe a portal. + '<literal>S</literal>' to describe a prepared statement; or + '<literal>P</literal>' to describe a portal. </para> </listitem> </varlistentry> @@ -4424,7 +4424,7 @@ Execute (F) <para> Maximum number of rows to return, if portal contains a query that returns rows (ignored otherwise). Zero - denotes <quote>no limit</>. + denotes <quote>no limit</quote>. </para> </listitem> </varlistentry> @@ -4514,7 +4514,7 @@ FunctionCall (F) <listitem> <para> The number of argument format codes that follow - (denoted <replaceable>C</> below). + (denoted <replaceable>C</replaceable> below). This can be zero to indicate that there are no arguments or that the arguments all use the default format (text); or one, in which case the specified format code is applied @@ -4525,7 +4525,7 @@ FunctionCall (F) </varlistentry> <varlistentry> <term> - Int16[<replaceable>C</>] + Int16[<replaceable>C</replaceable>] </term> <listitem> <para> @@ -4855,7 +4855,7 @@ NotificationResponse (B) </term> <listitem> <para> - The <quote>payload</> string passed from the notifying process. + The <quote>payload</quote> string passed from the notifying process. </para> </listitem> </varlistentry> @@ -5261,9 +5261,9 @@ ReadyForQuery (B) <listitem> <para> Current backend transaction status indicator. - Possible values are '<literal>I</>' if idle (not in - a transaction block); '<literal>T</>' if in a transaction - block; or '<literal>E</>' if in a failed transaction + Possible values are '<literal>I</literal>' if idle (not in + a transaction block); '<literal>T</literal>' if in a transaction + block; or '<literal>E</literal>' if in a failed transaction block (queries will be rejected until block is ended). </para> </listitem> @@ -5364,7 +5364,7 @@ RowDescription (B) </term> <listitem> <para> - The data type size (see <varname>pg_type.typlen</>). + The data type size (see <varname>pg_type.typlen</varname>). Note that negative values denote variable-width types. </para> </listitem> @@ -5375,7 +5375,7 @@ RowDescription (B) </term> <listitem> <para> - The type modifier (see <varname>pg_attribute.atttypmod</>). + The type modifier (see <varname>pg_attribute.atttypmod</varname>). The meaning of the modifier is type-specific. </para> </listitem> @@ -5539,7 +5539,7 @@ SSLRequest (F) <listitem> <para> The <acronym>SSL</acronym> request code. The value is chosen to contain - <literal>1234</> in the most significant 16 bits, and <literal>5679</> in the + <literal>1234</literal> in the most significant 16 bits, and <literal>5679</literal> in the least significant 16 bits. (To avoid confusion, this code must not be the same as any protocol version number.) </para> @@ -5588,7 +5588,7 @@ StartupMessage (F) parameter name and value strings. A zero byte is required as a terminator after the last name/value pair. Parameters can appear in any - order. <literal>user</> is required, others are optional. + order. <literal>user</literal> is required, others are optional. Each parameter is specified as: <variablelist> <varlistentry> @@ -5602,7 +5602,7 @@ StartupMessage (F) <variablelist> <varlistentry> <term> - <literal>user</> + <literal>user</literal> </term> <listitem> <para> @@ -5613,7 +5613,7 @@ StartupMessage (F) </varlistentry> <varlistentry> <term> - <literal>database</> + <literal>database</literal> </term> <listitem> <para> @@ -5623,7 +5623,7 @@ StartupMessage (F) </varlistentry> <varlistentry> <term> - <literal>options</> + <literal>options</literal> </term> <listitem> <para> @@ -5631,23 +5631,23 @@ StartupMessage (F) deprecated in favor of setting individual run-time parameters.) Spaces within this string are considered to separate arguments, unless escaped with - a backslash (<literal>\</>); write <literal>\\</> to + a backslash (<literal>\</literal>); write <literal>\\</literal> to represent a literal backslash. </para> </listitem> </varlistentry> <varlistentry> <term> - <literal>replication</> + <literal>replication</literal> </term> <listitem> <para> Used to connect in streaming replication mode, where a small set of replication commands can be issued instead of SQL statements. Value can be - <literal>true</>, <literal>false</>, or - <literal>database</>, and the default is - <literal>false</>. See + <literal>true</literal>, <literal>false</literal>, or + <literal>database</literal>, and the default is + <literal>false</literal>. See <xref linkend="protocol-replication"> for details. </para> </listitem> @@ -5768,15 +5768,15 @@ message. <varlistentry> <term> -<literal>S</> +<literal>S</literal> </term> <listitem> <para> Severity: the field contents are - <literal>ERROR</>, <literal>FATAL</>, or - <literal>PANIC</> (in an error message), or - <literal>WARNING</>, <literal>NOTICE</>, <literal>DEBUG</>, - <literal>INFO</>, or <literal>LOG</> (in a notice message), + <literal>ERROR</literal>, <literal>FATAL</literal>, or + <literal>PANIC</literal> (in an error message), or + <literal>WARNING</literal>, <literal>NOTICE</literal>, <literal>DEBUG</literal>, + <literal>INFO</literal>, or <literal>LOG</literal> (in a notice message), or a localized translation of one of these. Always present. </para> </listitem> @@ -5784,18 +5784,18 @@ message. <varlistentry> <term> -<literal>V</> +<literal>V</literal> </term> <listitem> <para> Severity: the field contents are - <literal>ERROR</>, <literal>FATAL</>, or - <literal>PANIC</> (in an error message), or - <literal>WARNING</>, <literal>NOTICE</>, <literal>DEBUG</>, - <literal>INFO</>, or <literal>LOG</> (in a notice message). - This is identical to the <literal>S</> field except + <literal>ERROR</literal>, <literal>FATAL</literal>, or + <literal>PANIC</literal> (in an error message), or + <literal>WARNING</literal>, <literal>NOTICE</literal>, <literal>DEBUG</literal>, + <literal>INFO</literal>, or <literal>LOG</literal> (in a notice message). + This is identical to the <literal>S</literal> field except that the contents are never localized. This is present only in - messages generated by <productname>PostgreSQL</> versions 9.6 + messages generated by <productname>PostgreSQL</productname> versions 9.6 and later. </para> </listitem> @@ -5803,7 +5803,7 @@ message. <varlistentry> <term> -<literal>C</> +<literal>C</literal> </term> <listitem> <para> @@ -5815,7 +5815,7 @@ message. <varlistentry> <term> -<literal>M</> +<literal>M</literal> </term> <listitem> <para> @@ -5828,7 +5828,7 @@ message. <varlistentry> <term> -<literal>D</> +<literal>D</literal> </term> <listitem> <para> @@ -5840,7 +5840,7 @@ message. <varlistentry> <term> -<literal>H</> +<literal>H</literal> </term> <listitem> <para> @@ -5854,7 +5854,7 @@ message. <varlistentry> <term> -<literal>P</> +<literal>P</literal> </term> <listitem> <para> @@ -5868,21 +5868,21 @@ message. <varlistentry> <term> -<literal>p</> +<literal>p</literal> </term> <listitem> <para> - Internal position: this is defined the same as the <literal>P</> + Internal position: this is defined the same as the <literal>P</literal> field, but it is used when the cursor position refers to an internally generated command rather than the one submitted by the client. - The <literal>q</> field will always appear when this field appears. + The <literal>q</literal> field will always appear when this field appears. </para> </listitem> </varlistentry> <varlistentry> <term> -<literal>q</> +<literal>q</literal> </term> <listitem> <para> @@ -5894,7 +5894,7 @@ message. <varlistentry> <term> -<literal>W</> +<literal>W</literal> </term> <listitem> <para> @@ -5908,7 +5908,7 @@ message. <varlistentry> <term> -<literal>s</> +<literal>s</literal> </term> <listitem> <para> @@ -5920,7 +5920,7 @@ message. <varlistentry> <term> -<literal>t</> +<literal>t</literal> </term> <listitem> <para> @@ -5933,7 +5933,7 @@ message. <varlistentry> <term> -<literal>c</> +<literal>c</literal> </term> <listitem> <para> @@ -5946,7 +5946,7 @@ message. <varlistentry> <term> -<literal>d</> +<literal>d</literal> </term> <listitem> <para> @@ -5959,7 +5959,7 @@ message. <varlistentry> <term> -<literal>n</> +<literal>n</literal> </term> <listitem> <para> @@ -5974,7 +5974,7 @@ message. <varlistentry> <term> -<literal>F</> +<literal>F</literal> </term> <listitem> <para> @@ -5986,7 +5986,7 @@ message. <varlistentry> <term> -<literal>L</> +<literal>L</literal> </term> <listitem> <para> @@ -5998,7 +5998,7 @@ message. <varlistentry> <term> -<literal>R</> +<literal>R</literal> </term> <listitem> <para> @@ -6738,8 +6738,8 @@ developers trying to update existing client libraries to protocol 3.0. The initial startup packet uses a flexible list-of-strings format instead of a fixed format. Notice that session default values for run-time parameters can now be specified directly in the startup packet. (Actually, -you could do that before using the <literal>options</> field, but given the -limited width of <literal>options</> and the lack of any way to quote +you could do that before using the <literal>options</literal> field, but given the +limited width of <literal>options</literal> and the lack of any way to quote whitespace in the values, it wasn't a very safe technique.) </para> @@ -6750,7 +6750,7 @@ PasswordMessage now has a type byte. </para> <para> -ErrorResponse and NoticeResponse ('<literal>E</>' and '<literal>N</>') +ErrorResponse and NoticeResponse ('<literal>E</literal>' and '<literal>N</literal>') messages now contain multiple fields, from which the client code can assemble an error message of the desired level of verbosity. Note that individual fields will typically not end with a newline, whereas the single @@ -6758,7 +6758,7 @@ string sent in the older protocol always did. </para> <para> -The ReadyForQuery ('<literal>Z</>') message includes a transaction status +The ReadyForQuery ('<literal>Z</literal>') message includes a transaction status indicator. </para> @@ -6771,7 +6771,7 @@ directly tied to the server's internal representation. </para> <para> -There is a new <quote>extended query</> sub-protocol, which adds the frontend +There is a new <quote>extended query</quote> sub-protocol, which adds the frontend message types Parse, Bind, Execute, Describe, Close, Flush, and Sync, and the backend message types ParseComplete, BindComplete, PortalSuspended, ParameterDescription, NoData, and CloseComplete. Existing clients do not @@ -6782,7 +6782,7 @@ might allow improvements in performance or functionality. <para> <command>COPY</command> data is now encapsulated into CopyData and CopyDone messages. There is a well-defined way to recover from errors during <command>COPY</command>. The special -<quote><literal>\.</></quote> last line is not needed anymore, and is not sent +<quote><literal>\.</literal></quote> last line is not needed anymore, and is not sent during <command>COPY OUT</command>. (It is still recognized as a terminator during <command>COPY IN</command>, but its use is deprecated and will eventually be removed.) Binary <command>COPY</command> is supported. @@ -6800,31 +6800,31 @@ server data representations. </para> <para> -The backend sends ParameterStatus ('<literal>S</>') messages during connection +The backend sends ParameterStatus ('<literal>S</literal>') messages during connection startup for all parameters it considers interesting to the client library. Subsequently, a ParameterStatus message is sent whenever the active value changes for any of these parameters. </para> <para> -The RowDescription ('<literal>T</>') message carries new table OID and column +The RowDescription ('<literal>T</literal>') message carries new table OID and column number fields for each column of the described row. It also shows the format code for each column. </para> <para> -The CursorResponse ('<literal>P</>') message is no longer generated by +The CursorResponse ('<literal>P</literal>') message is no longer generated by the backend. </para> <para> -The NotificationResponse ('<literal>A</>') message has an additional string -field, which can carry a <quote>payload</> string passed +The NotificationResponse ('<literal>A</literal>') message has an additional string +field, which can carry a <quote>payload</quote> string passed from the <command>NOTIFY</command> event sender. </para> <para> -The EmptyQueryResponse ('<literal>I</>') message used to include an empty +The EmptyQueryResponse ('<literal>I</literal>') message used to include an empty string parameter; this has been removed. </para> diff --git a/doc/src/sgml/queries.sgml b/doc/src/sgml/queries.sgml index 11a4bf4e418..c2c1aaa208e 100644 --- a/doc/src/sgml/queries.sgml +++ b/doc/src/sgml/queries.sgml @@ -31,7 +31,7 @@ <optional>WITH <replaceable>with_queries</replaceable></optional> SELECT <replaceable>select_list</replaceable> FROM <replaceable>table_expression</replaceable> <optional><replaceable>sort_specification</replaceable></optional> </synopsis> The following sections describe the details of the select list, the - table expression, and the sort specification. <literal>WITH</> + table expression, and the sort specification. <literal>WITH</literal> queries are treated last since they are an advanced feature. </para> @@ -51,13 +51,13 @@ SELECT * FROM table1; expression happens to provide. A select list can also select a subset of the available columns or make calculations using the columns. For example, if - <literal>table1</literal> has columns named <literal>a</>, - <literal>b</>, and <literal>c</> (and perhaps others) you can make + <literal>table1</literal> has columns named <literal>a</literal>, + <literal>b</literal>, and <literal>c</literal> (and perhaps others) you can make the following query: <programlisting> SELECT a, b + c FROM table1; </programlisting> - (assuming that <literal>b</> and <literal>c</> are of a numerical + (assuming that <literal>b</literal> and <literal>c</literal> are of a numerical data type). See <xref linkend="queries-select-lists"> for more details. </para> @@ -89,19 +89,19 @@ SELECT random(); <para> A <firstterm>table expression</firstterm> computes a table. The - table expression contains a <literal>FROM</> clause that is - optionally followed by <literal>WHERE</>, <literal>GROUP BY</>, and - <literal>HAVING</> clauses. Trivial table expressions simply refer + table expression contains a <literal>FROM</literal> clause that is + optionally followed by <literal>WHERE</literal>, <literal>GROUP BY</literal>, and + <literal>HAVING</literal> clauses. Trivial table expressions simply refer to a table on disk, a so-called base table, but more complex expressions can be used to modify or combine base tables in various ways. </para> <para> - The optional <literal>WHERE</>, <literal>GROUP BY</>, and - <literal>HAVING</> clauses in the table expression specify a + The optional <literal>WHERE</literal>, <literal>GROUP BY</literal>, and + <literal>HAVING</literal> clauses in the table expression specify a pipeline of successive transformations performed on the table - derived in the <literal>FROM</> clause. All these transformations + derived in the <literal>FROM</literal> clause. All these transformations produce a virtual table that provides the rows that are passed to the select list to compute the output rows of the query. </para> @@ -118,14 +118,14 @@ FROM <replaceable>table_reference</replaceable> <optional>, <replaceable>table_r </synopsis> A table reference can be a table name (possibly schema-qualified), - or a derived table such as a subquery, a <literal>JOIN</> construct, or + or a derived table such as a subquery, a <literal>JOIN</literal> construct, or complex combinations of these. If more than one table reference is - listed in the <literal>FROM</> clause, the tables are cross-joined + listed in the <literal>FROM</literal> clause, the tables are cross-joined (that is, the Cartesian product of their rows is formed; see below). - The result of the <literal>FROM</> list is an intermediate virtual + The result of the <literal>FROM</literal> list is an intermediate virtual table that can then be subject to - transformations by the <literal>WHERE</>, <literal>GROUP BY</>, - and <literal>HAVING</> clauses and is finally the result of the + transformations by the <literal>WHERE</literal>, <literal>GROUP BY</literal>, + and <literal>HAVING</literal> clauses and is finally the result of the overall table expression. </para> @@ -137,14 +137,14 @@ FROM <replaceable>table_reference</replaceable> <optional>, <replaceable>table_r When a table reference names a table that is the parent of a table inheritance hierarchy, the table reference produces rows of not only that table but all of its descendant tables, unless the - key word <literal>ONLY</> precedes the table name. However, the + key word <literal>ONLY</literal> precedes the table name. However, the reference produces only the columns that appear in the named table — any columns added in subtables are ignored. </para> <para> - Instead of writing <literal>ONLY</> before the table name, you can write - <literal>*</> after the table name to explicitly specify that descendant + Instead of writing <literal>ONLY</literal> before the table name, you can write + <literal>*</literal> after the table name to explicitly specify that descendant tables are included. There is no real reason to use this syntax any more, because searching descendant tables is now always the default behavior. However, it is supported for compatibility with older releases. @@ -168,8 +168,8 @@ FROM <replaceable>table_reference</replaceable> <optional>, <replaceable>table_r Joins of all types can be chained together, or nested: either or both <replaceable>T1</replaceable> and <replaceable>T2</replaceable> can be joined tables. Parentheses - can be used around <literal>JOIN</> clauses to control the join - order. In the absence of parentheses, <literal>JOIN</> clauses + can be used around <literal>JOIN</literal> clauses to control the join + order. In the absence of parentheses, <literal>JOIN</literal> clauses nest left-to-right. </para> @@ -215,7 +215,7 @@ FROM <replaceable>table_reference</replaceable> <optional>, <replaceable>table_r <note> <para> This latter equivalence does not hold exactly when more than two - tables appear, because <literal>JOIN</> binds more tightly than + tables appear, because <literal>JOIN</literal> binds more tightly than comma. For example <literal>FROM <replaceable>T1</replaceable> CROSS JOIN <replaceable>T2</replaceable> INNER JOIN <replaceable>T3</replaceable> @@ -262,8 +262,8 @@ FROM <replaceable>table_reference</replaceable> <optional>, <replaceable>table_r <para> The <firstterm>join condition</firstterm> is specified in the - <literal>ON</> or <literal>USING</> clause, or implicitly by - the word <literal>NATURAL</>. The join condition determines + <literal>ON</literal> or <literal>USING</literal> clause, or implicitly by + the word <literal>NATURAL</literal>. The join condition determines which rows from the two source tables are considered to <quote>match</quote>, as explained in detail below. </para> @@ -273,7 +273,7 @@ FROM <replaceable>table_reference</replaceable> <optional>, <replaceable>table_r <variablelist> <varlistentry> - <term><literal>INNER JOIN</></term> + <term><literal>INNER JOIN</literal></term> <listitem> <para> @@ -284,7 +284,7 @@ FROM <replaceable>table_reference</replaceable> <optional>, <replaceable>table_r </varlistentry> <varlistentry> - <term><literal>LEFT OUTER JOIN</> + <term><literal>LEFT OUTER JOIN</literal> <indexterm> <primary>join</primary> <secondary>left</secondary> @@ -307,7 +307,7 @@ FROM <replaceable>table_reference</replaceable> <optional>, <replaceable>table_r </varlistentry> <varlistentry> - <term><literal>RIGHT OUTER JOIN</> + <term><literal>RIGHT OUTER JOIN</literal> <indexterm> <primary>join</primary> <secondary>right</secondary> @@ -330,7 +330,7 @@ FROM <replaceable>table_reference</replaceable> <optional>, <replaceable>table_r </varlistentry> <varlistentry> - <term><literal>FULL OUTER JOIN</></term> + <term><literal>FULL OUTER JOIN</literal></term> <listitem> <para> @@ -347,35 +347,35 @@ FROM <replaceable>table_reference</replaceable> <optional>, <replaceable>table_r </para> <para> - The <literal>ON</> clause is the most general kind of join + The <literal>ON</literal> clause is the most general kind of join condition: it takes a Boolean value expression of the same - kind as is used in a <literal>WHERE</> clause. A pair of rows - from <replaceable>T1</> and <replaceable>T2</> match if the - <literal>ON</> expression evaluates to true. + kind as is used in a <literal>WHERE</literal> clause. A pair of rows + from <replaceable>T1</replaceable> and <replaceable>T2</replaceable> match if the + <literal>ON</literal> expression evaluates to true. </para> <para> - The <literal>USING</> clause is a shorthand that allows you to take + The <literal>USING</literal> clause is a shorthand that allows you to take advantage of the specific situation where both sides of the join use the same name for the joining column(s). It takes a comma-separated list of the shared column names and forms a join condition that includes an equality comparison - for each one. For example, joining <replaceable>T1</> - and <replaceable>T2</> with <literal>USING (a, b)</> produces - the join condition <literal>ON <replaceable>T1</>.a - = <replaceable>T2</>.a AND <replaceable>T1</>.b - = <replaceable>T2</>.b</literal>. + for each one. For example, joining <replaceable>T1</replaceable> + and <replaceable>T2</replaceable> with <literal>USING (a, b)</literal> produces + the join condition <literal>ON <replaceable>T1</replaceable>.a + = <replaceable>T2</replaceable>.a AND <replaceable>T1</replaceable>.b + = <replaceable>T2</replaceable>.b</literal>. </para> <para> - Furthermore, the output of <literal>JOIN USING</> suppresses + Furthermore, the output of <literal>JOIN USING</literal> suppresses redundant columns: there is no need to print both of the matched columns, since they must have equal values. While <literal>JOIN - ON</> produces all columns from <replaceable>T1</> followed by all - columns from <replaceable>T2</>, <literal>JOIN USING</> produces one + ON</literal> produces all columns from <replaceable>T1</replaceable> followed by all + columns from <replaceable>T2</replaceable>, <literal>JOIN USING</literal> produces one output column for each of the listed column pairs (in the listed - order), followed by any remaining columns from <replaceable>T1</>, - followed by any remaining columns from <replaceable>T2</>. + order), followed by any remaining columns from <replaceable>T1</replaceable>, + followed by any remaining columns from <replaceable>T2</replaceable>. </para> <para> @@ -386,10 +386,10 @@ FROM <replaceable>table_reference</replaceable> <optional>, <replaceable>table_r <indexterm> <primary>natural join</primary> </indexterm> - Finally, <literal>NATURAL</> is a shorthand form of - <literal>USING</>: it forms a <literal>USING</> list + Finally, <literal>NATURAL</literal> is a shorthand form of + <literal>USING</literal>: it forms a <literal>USING</literal> list consisting of all column names that appear in both - input tables. As with <literal>USING</>, these columns appear + input tables. As with <literal>USING</literal>, these columns appear only once in the output table. If there are no common column names, <literal>NATURAL JOIN</literal> behaves like <literal>JOIN ... ON TRUE</literal>, producing a cross-product join. @@ -399,7 +399,7 @@ FROM <replaceable>table_reference</replaceable> <optional>, <replaceable>table_r <para> <literal>USING</literal> is reasonably safe from column changes in the joined relations since only the listed columns - are combined. <literal>NATURAL</> is considerably more risky since + are combined. <literal>NATURAL</literal> is considerably more risky since any schema changes to either relation that cause a new matching column name to be present will cause the join to combine that new column as well. @@ -428,7 +428,7 @@ FROM <replaceable>table_reference</replaceable> <optional>, <replaceable>table_r </programlisting> then we get the following results for the various joins: <screen> -<prompt>=></> <userinput>SELECT * FROM t1 CROSS JOIN t2;</> +<prompt>=></prompt> <userinput>SELECT * FROM t1 CROSS JOIN t2;</userinput> num | name | num | value -----+------+-----+------- 1 | a | 1 | xxx @@ -442,28 +442,28 @@ FROM <replaceable>table_reference</replaceable> <optional>, <replaceable>table_r 3 | c | 5 | zzz (9 rows) -<prompt>=></> <userinput>SELECT * FROM t1 INNER JOIN t2 ON t1.num = t2.num;</> +<prompt>=></prompt> <userinput>SELECT * FROM t1 INNER JOIN t2 ON t1.num = t2.num;</userinput> num | name | num | value -----+------+-----+------- 1 | a | 1 | xxx 3 | c | 3 | yyy (2 rows) -<prompt>=></> <userinput>SELECT * FROM t1 INNER JOIN t2 USING (num);</> +<prompt>=></prompt> <userinput>SELECT * FROM t1 INNER JOIN t2 USING (num);</userinput> num | name | value -----+------+------- 1 | a | xxx 3 | c | yyy (2 rows) -<prompt>=></> <userinput>SELECT * FROM t1 NATURAL INNER JOIN t2;</> +<prompt>=></prompt> <userinput>SELECT * FROM t1 NATURAL INNER JOIN t2;</userinput> num | name | value -----+------+------- 1 | a | xxx 3 | c | yyy (2 rows) -<prompt>=></> <userinput>SELECT * FROM t1 LEFT JOIN t2 ON t1.num = t2.num;</> +<prompt>=></prompt> <userinput>SELECT * FROM t1 LEFT JOIN t2 ON t1.num = t2.num;</userinput> num | name | num | value -----+------+-----+------- 1 | a | 1 | xxx @@ -471,7 +471,7 @@ FROM <replaceable>table_reference</replaceable> <optional>, <replaceable>table_r 3 | c | 3 | yyy (3 rows) -<prompt>=></> <userinput>SELECT * FROM t1 LEFT JOIN t2 USING (num);</> +<prompt>=></prompt> <userinput>SELECT * FROM t1 LEFT JOIN t2 USING (num);</userinput> num | name | value -----+------+------- 1 | a | xxx @@ -479,7 +479,7 @@ FROM <replaceable>table_reference</replaceable> <optional>, <replaceable>table_r 3 | c | yyy (3 rows) -<prompt>=></> <userinput>SELECT * FROM t1 RIGHT JOIN t2 ON t1.num = t2.num;</> +<prompt>=></prompt> <userinput>SELECT * FROM t1 RIGHT JOIN t2 ON t1.num = t2.num;</userinput> num | name | num | value -----+------+-----+------- 1 | a | 1 | xxx @@ -487,7 +487,7 @@ FROM <replaceable>table_reference</replaceable> <optional>, <replaceable>table_r | | 5 | zzz (3 rows) -<prompt>=></> <userinput>SELECT * FROM t1 FULL JOIN t2 ON t1.num = t2.num;</> +<prompt>=></prompt> <userinput>SELECT * FROM t1 FULL JOIN t2 ON t1.num = t2.num;</userinput> num | name | num | value -----+------+-----+------- 1 | a | 1 | xxx @@ -499,12 +499,12 @@ FROM <replaceable>table_reference</replaceable> <optional>, <replaceable>table_r </para> <para> - The join condition specified with <literal>ON</> can also contain + The join condition specified with <literal>ON</literal> can also contain conditions that do not relate directly to the join. This can prove useful for some queries but needs to be thought out carefully. For example: <screen> -<prompt>=></> <userinput>SELECT * FROM t1 LEFT JOIN t2 ON t1.num = t2.num AND t2.value = 'xxx';</> +<prompt>=></prompt> <userinput>SELECT * FROM t1 LEFT JOIN t2 ON t1.num = t2.num AND t2.value = 'xxx';</userinput> num | name | num | value -----+------+-----+------- 1 | a | 1 | xxx @@ -512,19 +512,19 @@ FROM <replaceable>table_reference</replaceable> <optional>, <replaceable>table_r 3 | c | | (3 rows) </screen> - Notice that placing the restriction in the <literal>WHERE</> clause + Notice that placing the restriction in the <literal>WHERE</literal> clause produces a different result: <screen> -<prompt>=></> <userinput>SELECT * FROM t1 LEFT JOIN t2 ON t1.num = t2.num WHERE t2.value = 'xxx';</> +<prompt>=></prompt> <userinput>SELECT * FROM t1 LEFT JOIN t2 ON t1.num = t2.num WHERE t2.value = 'xxx';</userinput> num | name | num | value -----+------+-----+------- 1 | a | 1 | xxx (1 row) </screen> - This is because a restriction placed in the <literal>ON</> - clause is processed <emphasis>before</> the join, while - a restriction placed in the <literal>WHERE</> clause is processed - <emphasis>after</> the join. + This is because a restriction placed in the <literal>ON</literal> + clause is processed <emphasis>before</emphasis> the join, while + a restriction placed in the <literal>WHERE</literal> clause is processed + <emphasis>after</emphasis> the join. That does not matter with inner joins, but it matters a lot with outer joins. </para> @@ -595,7 +595,7 @@ SELECT * FROM people AS mother JOIN people AS child ON mother.id = child.mother_ <para> Parentheses are used to resolve ambiguities. In the following example, the first statement assigns the alias <literal>b</literal> to the second - instance of <literal>my_table</>, but the second statement assigns the + instance of <literal>my_table</literal>, but the second statement assigns the alias to the result of the join: <programlisting> SELECT * FROM my_table AS a CROSS JOIN my_table AS b ... @@ -615,9 +615,9 @@ FROM <replaceable>table_reference</replaceable> <optional>AS</optional> <replace </para> <para> - When an alias is applied to the output of a <literal>JOIN</> + When an alias is applied to the output of a <literal>JOIN</literal> clause, the alias hides the original - name(s) within the <literal>JOIN</>. For example: + name(s) within the <literal>JOIN</literal>. For example: <programlisting> SELECT a.* FROM my_table AS a JOIN your_table AS b ON ... </programlisting> @@ -625,8 +625,8 @@ SELECT a.* FROM my_table AS a JOIN your_table AS b ON ... <programlisting> SELECT a.* FROM (my_table AS a JOIN your_table AS b ON ...) AS c </programlisting> - is not valid; the table alias <literal>a</> is not visible - outside the alias <literal>c</>. + is not valid; the table alias <literal>a</literal> is not visible + outside the alias <literal>c</literal>. </para> </sect3> @@ -655,13 +655,13 @@ FROM (SELECT * FROM table1) AS alias_name </para> <para> - A subquery can also be a <command>VALUES</> list: + A subquery can also be a <command>VALUES</command> list: <programlisting> FROM (VALUES ('anne', 'smith'), ('bob', 'jones'), ('joe', 'blow')) AS names(first, last) </programlisting> Again, a table alias is required. Assigning alias names to the columns - of the <command>VALUES</> list is optional, but is good practice. + of the <command>VALUES</command> list is optional, but is good practice. For more information see <xref linkend="queries-values">. </para> </sect3> @@ -669,25 +669,25 @@ FROM (VALUES ('anne', 'smith'), ('bob', 'jones'), ('joe', 'blow')) <sect3 id="queries-tablefunctions"> <title>Table Functions</title> - <indexterm zone="queries-tablefunctions"><primary>table function</></> + <indexterm zone="queries-tablefunctions"><primary>table function</primary></indexterm> <indexterm zone="queries-tablefunctions"> - <primary>function</> - <secondary>in the FROM clause</> + <primary>function</primary> + <secondary>in the FROM clause</secondary> </indexterm> <para> Table functions are functions that produce a set of rows, made up of either base data types (scalar types) or composite data types (table rows). They are used like a table, view, or subquery in - the <literal>FROM</> clause of a query. Columns returned by table - functions can be included in <literal>SELECT</>, - <literal>JOIN</>, or <literal>WHERE</> clauses in the same manner + the <literal>FROM</literal> clause of a query. Columns returned by table + functions can be included in <literal>SELECT</literal>, + <literal>JOIN</literal>, or <literal>WHERE</literal> clauses in the same manner as columns of a table, view, or subquery. </para> <para> - Table functions may also be combined using the <literal>ROWS FROM</> + Table functions may also be combined using the <literal>ROWS FROM</literal> syntax, with the results returned in parallel columns; the number of result rows in this case is that of the largest function result, with smaller results padded with null values to match. @@ -704,7 +704,7 @@ ROWS FROM( <replaceable>function_call</replaceable> <optional>, ... </optional> function result columns. This column numbers the rows of the function result set, starting from 1. (This is a generalization of the SQL-standard syntax for <literal>UNNEST ... WITH ORDINALITY</literal>.) - By default, the ordinal column is called <literal>ordinality</>, but + By default, the ordinal column is called <literal>ordinality</literal>, but a different column name can be assigned to it using an <literal>AS</literal> clause. </para> @@ -723,7 +723,7 @@ UNNEST( <replaceable>array_expression</replaceable> <optional>, ... </optional> <para> If no <replaceable>table_alias</replaceable> is specified, the function - name is used as the table name; in the case of a <literal>ROWS FROM()</> + name is used as the table name; in the case of a <literal>ROWS FROM()</literal> construct, the first function's name is used. </para> @@ -762,7 +762,7 @@ SELECT * FROM vw_getfoo; In some cases it is useful to define table functions that can return different column sets depending on how they are invoked. To support this, the table function can be declared as returning - the pseudo-type <type>record</>. When such a function is used in + the pseudo-type <type>record</type>. When such a function is used in a query, the expected row structure must be specified in the query itself, so that the system can know how to parse and plan the query. This syntax looks like: @@ -775,16 +775,16 @@ ROWS FROM( ... <replaceable>function_call</replaceable> AS (<replaceable>column_ </synopsis> <para> - When not using the <literal>ROWS FROM()</> syntax, + When not using the <literal>ROWS FROM()</literal> syntax, the <replaceable>column_definition</replaceable> list replaces the column - alias list that could otherwise be attached to the <literal>FROM</> + alias list that could otherwise be attached to the <literal>FROM</literal> item; the names in the column definitions serve as column aliases. - When using the <literal>ROWS FROM()</> syntax, + When using the <literal>ROWS FROM()</literal> syntax, a <replaceable>column_definition</replaceable> list can be attached to each member function separately; or if there is only one member function - and no <literal>WITH ORDINALITY</> clause, + and no <literal>WITH ORDINALITY</literal> clause, a <replaceable>column_definition</replaceable> list can be written in - place of a column alias list following <literal>ROWS FROM()</>. + place of a column alias list following <literal>ROWS FROM()</literal>. </para> <para> @@ -798,49 +798,49 @@ SELECT * The <xref linkend="CONTRIB-DBLINK-FUNCTION"> function (part of the <xref linkend="dblink"> module) executes a remote query. It is declared to return - <type>record</> since it might be used for any kind of query. + <type>record</type> since it might be used for any kind of query. The actual column set must be specified in the calling query so - that the parser knows, for example, what <literal>*</> should + that the parser knows, for example, what <literal>*</literal> should expand to. </para> </sect3> <sect3 id="queries-lateral"> - <title><literal>LATERAL</> Subqueries</title> + <title><literal>LATERAL</literal> Subqueries</title> <indexterm zone="queries-lateral"> - <primary>LATERAL</> - <secondary>in the FROM clause</> + <primary>LATERAL</primary> + <secondary>in the FROM clause</secondary> </indexterm> <para> - Subqueries appearing in <literal>FROM</> can be - preceded by the key word <literal>LATERAL</>. This allows them to - reference columns provided by preceding <literal>FROM</> items. + Subqueries appearing in <literal>FROM</literal> can be + preceded by the key word <literal>LATERAL</literal>. This allows them to + reference columns provided by preceding <literal>FROM</literal> items. (Without <literal>LATERAL</literal>, each subquery is evaluated independently and so cannot cross-reference any other - <literal>FROM</> item.) + <literal>FROM</literal> item.) </para> <para> - Table functions appearing in <literal>FROM</> can also be - preceded by the key word <literal>LATERAL</>, but for functions the + Table functions appearing in <literal>FROM</literal> can also be + preceded by the key word <literal>LATERAL</literal>, but for functions the key word is optional; the function's arguments can contain references - to columns provided by preceding <literal>FROM</> items in any case. + to columns provided by preceding <literal>FROM</literal> items in any case. </para> <para> A <literal>LATERAL</literal> item can appear at top level in the - <literal>FROM</> list, or within a <literal>JOIN</> tree. In the latter + <literal>FROM</literal> list, or within a <literal>JOIN</literal> tree. In the latter case it can also refer to any items that are on the left-hand side of a - <literal>JOIN</> that it is on the right-hand side of. + <literal>JOIN</literal> that it is on the right-hand side of. </para> <para> - When a <literal>FROM</> item contains <literal>LATERAL</literal> + When a <literal>FROM</literal> item contains <literal>LATERAL</literal> cross-references, evaluation proceeds as follows: for each row of the - <literal>FROM</> item providing the cross-referenced column(s), or - set of rows of multiple <literal>FROM</> items providing the + <literal>FROM</literal> item providing the cross-referenced column(s), or + set of rows of multiple <literal>FROM</literal> items providing the columns, the <literal>LATERAL</literal> item is evaluated using that row or row set's values of the columns. The resulting row(s) are joined as usual with the rows they were computed from. This is @@ -860,7 +860,7 @@ SELECT * FROM foo, bar WHERE bar.id = foo.bar_id; <literal>LATERAL</literal> is primarily useful when the cross-referenced column is necessary for computing the row(s) to be joined. A common application is providing an argument value for a set-returning function. - For example, supposing that <function>vertices(polygon)</> returns the + For example, supposing that <function>vertices(polygon)</function> returns the set of vertices of a polygon, we could identify close-together vertices of polygons stored in a table with: <programlisting> @@ -878,15 +878,15 @@ FROM polygons p1 CROSS JOIN LATERAL vertices(p1.poly) v1, WHERE (v1 <-> v2) < 10 AND p1.id != p2.id; </programlisting> or in several other equivalent formulations. (As already mentioned, - the <literal>LATERAL</> key word is unnecessary in this example, but + the <literal>LATERAL</literal> key word is unnecessary in this example, but we use it for clarity.) </para> <para> - It is often particularly handy to <literal>LEFT JOIN</> to a + It is often particularly handy to <literal>LEFT JOIN</literal> to a <literal>LATERAL</literal> subquery, so that source rows will appear in the result even if the <literal>LATERAL</literal> subquery produces no - rows for them. For example, if <function>get_product_names()</> returns + rows for them. For example, if <function>get_product_names()</function> returns the names of products made by a manufacturer, but some manufacturers in our table currently produce no products, we could find out which ones those are like this: @@ -918,20 +918,20 @@ WHERE <replaceable>search_condition</replaceable> </para> <para> - After the processing of the <literal>FROM</> clause is done, each + After the processing of the <literal>FROM</literal> clause is done, each row of the derived virtual table is checked against the search condition. If the result of the condition is true, the row is kept in the output table, otherwise (i.e., if the result is false or null) it is discarded. The search condition typically references at least one column of the table generated in the - <literal>FROM</> clause; this is not required, but otherwise the - <literal>WHERE</> clause will be fairly useless. + <literal>FROM</literal> clause; this is not required, but otherwise the + <literal>WHERE</literal> clause will be fairly useless. </para> <note> <para> The join condition of an inner join can be written either in - the <literal>WHERE</> clause or in the <literal>JOIN</> clause. + the <literal>WHERE</literal> clause or in the <literal>JOIN</literal> clause. For example, these table expressions are equivalent: <programlisting> FROM a, b WHERE a.id = b.id AND b.val > 5 @@ -945,13 +945,13 @@ FROM a INNER JOIN b ON (a.id = b.id) WHERE b.val > 5 FROM a NATURAL JOIN b WHERE b.val > 5 </programlisting> Which one of these you use is mainly a matter of style. The - <literal>JOIN</> syntax in the <literal>FROM</> clause is + <literal>JOIN</literal> syntax in the <literal>FROM</literal> clause is probably not as portable to other SQL database management systems, even though it is in the SQL standard. For outer joins there is no choice: they must be done in - the <literal>FROM</> clause. The <literal>ON</> or <literal>USING</> - clause of an outer join is <emphasis>not</> equivalent to a - <literal>WHERE</> condition, because it results in the addition + the <literal>FROM</literal> clause. The <literal>ON</literal> or <literal>USING</literal> + clause of an outer join is <emphasis>not</emphasis> equivalent to a + <literal>WHERE</literal> condition, because it results in the addition of rows (for unmatched input rows) as well as the removal of rows in the final result. </para> @@ -973,14 +973,14 @@ SELECT ... FROM fdt WHERE c1 BETWEEN (SELECT c3 FROM t2 WHERE c2 = fdt.c1 + 10) SELECT ... FROM fdt WHERE EXISTS (SELECT c1 FROM t2 WHERE c2 > fdt.c1) </programlisting> <literal>fdt</literal> is the table derived in the - <literal>FROM</> clause. Rows that do not meet the search - condition of the <literal>WHERE</> clause are eliminated from + <literal>FROM</literal> clause. Rows that do not meet the search + condition of the <literal>WHERE</literal> clause are eliminated from <literal>fdt</literal>. Notice the use of scalar subqueries as value expressions. Just like any other query, the subqueries can employ complex table expressions. Notice also how <literal>fdt</literal> is referenced in the subqueries. - Qualifying <literal>c1</> as <literal>fdt.c1</> is only necessary - if <literal>c1</> is also the name of a column in the derived + Qualifying <literal>c1</literal> as <literal>fdt.c1</literal> is only necessary + if <literal>c1</literal> is also the name of a column in the derived input table of the subquery. But qualifying the column name adds clarity even when it is not needed. This example shows how the column naming scope of an outer query extends into its inner queries. @@ -1000,9 +1000,9 @@ SELECT ... FROM fdt WHERE EXISTS (SELECT c1 FROM t2 WHERE c2 > fdt.c1) </indexterm> <para> - After passing the <literal>WHERE</> filter, the derived input - table might be subject to grouping, using the <literal>GROUP BY</> - clause, and elimination of group rows using the <literal>HAVING</> + After passing the <literal>WHERE</literal> filter, the derived input + table might be subject to grouping, using the <literal>GROUP BY</literal> + clause, and elimination of group rows using the <literal>HAVING</literal> clause. </para> @@ -1023,7 +1023,7 @@ SELECT <replaceable>select_list</replaceable> eliminate redundancy in the output and/or compute aggregates that apply to these groups. For instance: <screen> -<prompt>=></> <userinput>SELECT * FROM test1;</> +<prompt>=></prompt> <userinput>SELECT * FROM test1;</userinput> x | y ---+--- a | 3 @@ -1032,7 +1032,7 @@ SELECT <replaceable>select_list</replaceable> a | 1 (4 rows) -<prompt>=></> <userinput>SELECT x FROM test1 GROUP BY x;</> +<prompt>=></prompt> <userinput>SELECT x FROM test1 GROUP BY x;</userinput> x --- a @@ -1045,17 +1045,17 @@ SELECT <replaceable>select_list</replaceable> <para> In the second query, we could not have written <literal>SELECT * FROM test1 GROUP BY x</literal>, because there is no single value - for the column <literal>y</> that could be associated with each + for the column <literal>y</literal> that could be associated with each group. The grouped-by columns can be referenced in the select list since they have a single value in each group. </para> <para> In general, if a table is grouped, columns that are not - listed in <literal>GROUP BY</> cannot be referenced except in aggregate + listed in <literal>GROUP BY</literal> cannot be referenced except in aggregate expressions. An example with aggregate expressions is: <screen> -<prompt>=></> <userinput>SELECT x, sum(y) FROM test1 GROUP BY x;</> +<prompt>=></prompt> <userinput>SELECT x, sum(y) FROM test1 GROUP BY x;</userinput> x | sum ---+----- a | 4 @@ -1073,7 +1073,7 @@ SELECT <replaceable>select_list</replaceable> <para> Grouping without aggregate expressions effectively calculates the set of distinct values in a column. This can also be achieved - using the <literal>DISTINCT</> clause (see <xref + using the <literal>DISTINCT</literal> clause (see <xref linkend="queries-distinct">). </para> </tip> @@ -1088,10 +1088,10 @@ SELECT product_id, p.name, (sum(s.units) * p.price) AS sales </programlisting> In this example, the columns <literal>product_id</literal>, <literal>p.name</literal>, and <literal>p.price</literal> must be - in the <literal>GROUP BY</> clause since they are referenced in + in the <literal>GROUP BY</literal> clause since they are referenced in the query select list (but see below). The column - <literal>s.units</> does not have to be in the <literal>GROUP - BY</> list since it is only used in an aggregate expression + <literal>s.units</literal> does not have to be in the <literal>GROUP + BY</literal> list since it is only used in an aggregate expression (<literal>sum(...)</literal>), which represents the sales of a product. For each product, the query returns a summary row about all sales of the product. @@ -1110,9 +1110,9 @@ SELECT product_id, p.name, (sum(s.units) * p.price) AS sales </para> <para> - In strict SQL, <literal>GROUP BY</> can only group by columns of + In strict SQL, <literal>GROUP BY</literal> can only group by columns of the source table but <productname>PostgreSQL</productname> extends - this to also allow <literal>GROUP BY</> to group by columns in the + this to also allow <literal>GROUP BY</literal> to group by columns in the select list. Grouping by value expressions instead of simple column names is also allowed. </para> @@ -1125,12 +1125,12 @@ SELECT product_id, p.name, (sum(s.units) * p.price) AS sales If a table has been grouped using <literal>GROUP BY</literal>, but only certain groups are of interest, the <literal>HAVING</literal> clause can be used, much like a - <literal>WHERE</> clause, to eliminate groups from the result. + <literal>WHERE</literal> clause, to eliminate groups from the result. The syntax is: <synopsis> SELECT <replaceable>select_list</replaceable> FROM ... <optional>WHERE ...</optional> GROUP BY ... HAVING <replaceable>boolean_expression</replaceable> </synopsis> - Expressions in the <literal>HAVING</> clause can refer both to + Expressions in the <literal>HAVING</literal> clause can refer both to grouped expressions and to ungrouped expressions (which necessarily involve an aggregate function). </para> @@ -1138,14 +1138,14 @@ SELECT <replaceable>select_list</replaceable> FROM ... <optional>WHERE ...</opti <para> Example: <screen> -<prompt>=></> <userinput>SELECT x, sum(y) FROM test1 GROUP BY x HAVING sum(y) > 3;</> +<prompt>=></prompt> <userinput>SELECT x, sum(y) FROM test1 GROUP BY x HAVING sum(y) > 3;</userinput> x | sum ---+----- a | 4 b | 5 (2 rows) -<prompt>=></> <userinput>SELECT x, sum(y) FROM test1 GROUP BY x HAVING x < 'c';</> +<prompt>=></prompt> <userinput>SELECT x, sum(y) FROM test1 GROUP BY x HAVING x < 'c';</userinput> x | sum ---+----- a | 4 @@ -1163,26 +1163,26 @@ SELECT product_id, p.name, (sum(s.units) * (p.price - p.cost)) AS profit GROUP BY product_id, p.name, p.price, p.cost HAVING sum(p.price * s.units) > 5000; </programlisting> - In the example above, the <literal>WHERE</> clause is selecting + In the example above, the <literal>WHERE</literal> clause is selecting rows by a column that is not grouped (the expression is only true for - sales during the last four weeks), while the <literal>HAVING</> + sales during the last four weeks), while the <literal>HAVING</literal> clause restricts the output to groups with total gross sales over 5000. Note that the aggregate expressions do not necessarily need to be the same in all parts of the query. </para> <para> - If a query contains aggregate function calls, but no <literal>GROUP BY</> + If a query contains aggregate function calls, but no <literal>GROUP BY</literal> clause, grouping still occurs: the result is a single group row (or perhaps no rows at all, if the single row is then eliminated by - <literal>HAVING</>). - The same is true if it contains a <literal>HAVING</> clause, even - without any aggregate function calls or <literal>GROUP BY</> clause. + <literal>HAVING</literal>). + The same is true if it contains a <literal>HAVING</literal> clause, even + without any aggregate function calls or <literal>GROUP BY</literal> clause. </para> </sect2> <sect2 id="queries-grouping-sets"> - <title><literal>GROUPING SETS</>, <literal>CUBE</>, and <literal>ROLLUP</></title> + <title><literal>GROUPING SETS</literal>, <literal>CUBE</literal>, and <literal>ROLLUP</literal></title> <indexterm zone="queries-grouping-sets"> <primary>GROUPING SETS</primary> @@ -1196,13 +1196,13 @@ SELECT product_id, p.name, (sum(s.units) * (p.price - p.cost)) AS profit <para> More complex grouping operations than those described above are possible - using the concept of <firstterm>grouping sets</>. The data selected by - the <literal>FROM</> and <literal>WHERE</> clauses is grouped separately + using the concept of <firstterm>grouping sets</firstterm>. The data selected by + the <literal>FROM</literal> and <literal>WHERE</literal> clauses is grouped separately by each specified grouping set, aggregates computed for each group just as - for simple <literal>GROUP BY</> clauses, and then the results returned. + for simple <literal>GROUP BY</literal> clauses, and then the results returned. For example: <screen> -<prompt>=></> <userinput>SELECT * FROM items_sold;</> +<prompt>=></prompt> <userinput>SELECT * FROM items_sold;</userinput> brand | size | sales -------+------+------- Foo | L | 10 @@ -1211,7 +1211,7 @@ SELECT product_id, p.name, (sum(s.units) * (p.price - p.cost)) AS profit Bar | L | 5 (4 rows) -<prompt>=></> <userinput>SELECT brand, size, sum(sales) FROM items_sold GROUP BY GROUPING SETS ((brand), (size), ());</> +<prompt>=></prompt> <userinput>SELECT brand, size, sum(sales) FROM items_sold GROUP BY GROUPING SETS ((brand), (size), ());</userinput> brand | size | sum -------+------+----- Foo | | 30 @@ -1224,12 +1224,12 @@ SELECT product_id, p.name, (sum(s.units) * (p.price - p.cost)) AS profit </para> <para> - Each sublist of <literal>GROUPING SETS</> may specify zero or more columns + Each sublist of <literal>GROUPING SETS</literal> may specify zero or more columns or expressions and is interpreted the same way as though it were directly - in the <literal>GROUP BY</> clause. An empty grouping set means that all + in the <literal>GROUP BY</literal> clause. An empty grouping set means that all rows are aggregated down to a single group (which is output even if no input rows were present), as described above for the case of aggregate - functions with no <literal>GROUP BY</> clause. + functions with no <literal>GROUP BY</literal> clause. </para> <para> @@ -1243,16 +1243,16 @@ SELECT product_id, p.name, (sum(s.units) * (p.price - p.cost)) AS profit A shorthand notation is provided for specifying two common types of grouping set. A clause of the form <programlisting> -ROLLUP ( <replaceable>e1</>, <replaceable>e2</>, <replaceable>e3</>, ... ) +ROLLUP ( <replaceable>e1</replaceable>, <replaceable>e2</replaceable>, <replaceable>e3</replaceable>, ... ) </programlisting> represents the given list of expressions and all prefixes of the list including the empty list; thus it is equivalent to <programlisting> GROUPING SETS ( - ( <replaceable>e1</>, <replaceable>e2</>, <replaceable>e3</>, ... ), + ( <replaceable>e1</replaceable>, <replaceable>e2</replaceable>, <replaceable>e3</replaceable>, ... ), ... - ( <replaceable>e1</>, <replaceable>e2</> ), - ( <replaceable>e1</> ), + ( <replaceable>e1</replaceable>, <replaceable>e2</replaceable> ), + ( <replaceable>e1</replaceable> ), ( ) ) </programlisting> @@ -1263,7 +1263,7 @@ GROUPING SETS ( <para> A clause of the form <programlisting> -CUBE ( <replaceable>e1</>, <replaceable>e2</>, ... ) +CUBE ( <replaceable>e1</replaceable>, <replaceable>e2</replaceable>, ... ) </programlisting> represents the given list and all of its possible subsets (i.e. the power set). Thus @@ -1286,7 +1286,7 @@ GROUPING SETS ( </para> <para> - The individual elements of a <literal>CUBE</> or <literal>ROLLUP</> + The individual elements of a <literal>CUBE</literal> or <literal>ROLLUP</literal> clause may be either individual expressions, or sublists of elements in parentheses. In the latter case, the sublists are treated as single units for the purposes of generating the individual grouping sets. @@ -1319,15 +1319,15 @@ GROUPING SETS ( </para> <para> - The <literal>CUBE</> and <literal>ROLLUP</> constructs can be used either - directly in the <literal>GROUP BY</> clause, or nested inside a - <literal>GROUPING SETS</> clause. If one <literal>GROUPING SETS</> clause + The <literal>CUBE</literal> and <literal>ROLLUP</literal> constructs can be used either + directly in the <literal>GROUP BY</literal> clause, or nested inside a + <literal>GROUPING SETS</literal> clause. If one <literal>GROUPING SETS</literal> clause is nested inside another, the effect is the same as if all the elements of the inner clause had been written directly in the outer clause. </para> <para> - If multiple grouping items are specified in a single <literal>GROUP BY</> + If multiple grouping items are specified in a single <literal>GROUP BY</literal> clause, then the final list of grouping sets is the cross product of the individual items. For example: <programlisting> @@ -1346,12 +1346,12 @@ GROUP BY GROUPING SETS ( <note> <para> - The construct <literal>(a, b)</> is normally recognized in expressions as + The construct <literal>(a, b)</literal> is normally recognized in expressions as a <link linkend="sql-syntax-row-constructors">row constructor</link>. - Within the <literal>GROUP BY</> clause, this does not apply at the top - levels of expressions, and <literal>(a, b)</> is parsed as a list of - expressions as described above. If for some reason you <emphasis>need</> - a row constructor in a grouping expression, use <literal>ROW(a, b)</>. + Within the <literal>GROUP BY</literal> clause, this does not apply at the top + levels of expressions, and <literal>(a, b)</literal> is parsed as a list of + expressions as described above. If for some reason you <emphasis>need</emphasis> + a row constructor in a grouping expression, use <literal>ROW(a, b)</literal>. </para> </note> </sect2> @@ -1361,7 +1361,7 @@ GROUP BY GROUPING SETS ( <indexterm zone="queries-window"> <primary>window function</primary> - <secondary>order of execution</> + <secondary>order of execution</secondary> </indexterm> <para> @@ -1369,32 +1369,32 @@ GROUP BY GROUPING SETS ( <xref linkend="tutorial-window">, <xref linkend="functions-window"> and <xref linkend="syntax-window-functions">), these functions are evaluated - after any grouping, aggregation, and <literal>HAVING</> filtering is + after any grouping, aggregation, and <literal>HAVING</literal> filtering is performed. That is, if the query uses any aggregates, <literal>GROUP - BY</>, or <literal>HAVING</>, then the rows seen by the window functions + BY</literal>, or <literal>HAVING</literal>, then the rows seen by the window functions are the group rows instead of the original table rows from - <literal>FROM</>/<literal>WHERE</>. + <literal>FROM</literal>/<literal>WHERE</literal>. </para> <para> When multiple window functions are used, all the window functions having - syntactically equivalent <literal>PARTITION BY</> and <literal>ORDER BY</> + syntactically equivalent <literal>PARTITION BY</literal> and <literal>ORDER BY</literal> clauses in their window definitions are guaranteed to be evaluated in a single pass over the data. Therefore they will see the same sort ordering, - even if the <literal>ORDER BY</> does not uniquely determine an ordering. + even if the <literal>ORDER BY</literal> does not uniquely determine an ordering. However, no guarantees are made about the evaluation of functions having - different <literal>PARTITION BY</> or <literal>ORDER BY</> specifications. + different <literal>PARTITION BY</literal> or <literal>ORDER BY</literal> specifications. (In such cases a sort step is typically required between the passes of window function evaluations, and the sort is not guaranteed to preserve - ordering of rows that its <literal>ORDER BY</> sees as equivalent.) + ordering of rows that its <literal>ORDER BY</literal> sees as equivalent.) </para> <para> Currently, window functions always require presorted data, and so the query output will be ordered according to one or another of the window - functions' <literal>PARTITION BY</>/<literal>ORDER BY</> clauses. + functions' <literal>PARTITION BY</literal>/<literal>ORDER BY</literal> clauses. It is not recommended to rely on this, however. Use an explicit - top-level <literal>ORDER BY</> clause if you want to be sure the + top-level <literal>ORDER BY</literal> clause if you want to be sure the results are sorted in a particular way. </para> </sect2> @@ -1435,13 +1435,13 @@ GROUP BY GROUPING SETS ( <programlisting> SELECT a, b, c FROM ... </programlisting> - The columns names <literal>a</>, <literal>b</>, and <literal>c</> + The columns names <literal>a</literal>, <literal>b</literal>, and <literal>c</literal> are either the actual names of the columns of tables referenced - in the <literal>FROM</> clause, or the aliases given to them as + in the <literal>FROM</literal> clause, or the aliases given to them as explained in <xref linkend="queries-table-aliases">. The name space available in the select list is the same as in the - <literal>WHERE</> clause, unless grouping is used, in which case - it is the same as in the <literal>HAVING</> clause. + <literal>WHERE</literal> clause, unless grouping is used, in which case + it is the same as in the <literal>HAVING</literal> clause. </para> <para> @@ -1456,7 +1456,7 @@ SELECT tbl1.a, tbl2.a, tbl1.b FROM ... SELECT tbl1.*, tbl2.a FROM ... </programlisting> See <xref linkend="rowtypes-usage"> for more about - the <replaceable>table_name</><literal>.*</> notation. + the <replaceable>table_name</replaceable><literal>.*</literal> notation. </para> <para> @@ -1465,7 +1465,7 @@ SELECT tbl1.*, tbl2.a FROM ... value expression is evaluated once for each result row, with the row's values substituted for any column references. But the expressions in the select list do not have to reference any - columns in the table expression of the <literal>FROM</> clause; + columns in the table expression of the <literal>FROM</literal> clause; they can be constant arithmetic expressions, for instance. </para> </sect2> @@ -1480,7 +1480,7 @@ SELECT tbl1.*, tbl2.a FROM ... <para> The entries in the select list can be assigned names for subsequent - processing, such as for use in an <literal>ORDER BY</> clause + processing, such as for use in an <literal>ORDER BY</literal> clause or for display by the client application. For example: <programlisting> SELECT a AS value, b + c AS sum FROM ... @@ -1488,7 +1488,7 @@ SELECT a AS value, b + c AS sum FROM ... </para> <para> - If no output column name is specified using <literal>AS</>, + If no output column name is specified using <literal>AS</literal>, the system assigns a default column name. For simple column references, this is the name of the referenced column. For function calls, this is the name of the function. For complex expressions, @@ -1496,12 +1496,12 @@ SELECT a AS value, b + c AS sum FROM ... </para> <para> - The <literal>AS</> keyword is optional, but only if the new column + The <literal>AS</literal> keyword is optional, but only if the new column name does not match any <productname>PostgreSQL</productname> keyword (see <xref linkend="sql-keywords-appendix">). To avoid an accidental match to a keyword, you can double-quote the column name. For example, - <literal>VALUE</> is a keyword, so this does not work: + <literal>VALUE</literal> is a keyword, so this does not work: <programlisting> SELECT a value, b + c AS sum FROM ... </programlisting> @@ -1517,7 +1517,7 @@ SELECT a "value", b + c AS sum FROM ... <note> <para> The naming of output columns here is different from that done in - the <literal>FROM</> clause (see <xref + the <literal>FROM</literal> clause (see <xref linkend="queries-table-aliases">). It is possible to rename the same column twice, but the name assigned in the select list is the one that will be passed on. @@ -1544,13 +1544,13 @@ SELECT a "value", b + c AS sum FROM ... <synopsis> SELECT DISTINCT <replaceable>select_list</replaceable> ... </synopsis> - (Instead of <literal>DISTINCT</> the key word <literal>ALL</literal> + (Instead of <literal>DISTINCT</literal> the key word <literal>ALL</literal> can be used to specify the default behavior of retaining all rows.) </para> <indexterm> - <primary>null value</> - <secondary sortas="DISTINCT">in DISTINCT</> + <primary>null value</primary> + <secondary sortas="DISTINCT">in DISTINCT</secondary> </indexterm> <para> @@ -1571,16 +1571,16 @@ SELECT DISTINCT ON (<replaceable>expression</replaceable> <optional>, <replaceab only the first row of the set is kept in the output. Note that the <quote>first row</quote> of a set is unpredictable unless the query is sorted on enough columns to guarantee a unique ordering - of the rows arriving at the <literal>DISTINCT</> filter. - (<literal>DISTINCT ON</> processing occurs after <literal>ORDER - BY</> sorting.) + of the rows arriving at the <literal>DISTINCT</literal> filter. + (<literal>DISTINCT ON</literal> processing occurs after <literal>ORDER + BY</literal> sorting.) </para> <para> - The <literal>DISTINCT ON</> clause is not part of the SQL standard + The <literal>DISTINCT ON</literal> clause is not part of the SQL standard and is sometimes considered bad style because of the potentially indeterminate nature of its results. With judicious use of - <literal>GROUP BY</> and subqueries in <literal>FROM</>, this + <literal>GROUP BY</literal> and subqueries in <literal>FROM</literal>, this construct can be avoided, but it is often the most convenient alternative. </para> @@ -1635,27 +1635,27 @@ SELECT DISTINCT ON (<replaceable>expression</replaceable> <optional>, <replaceab </para> <para> - <literal>UNION</> effectively appends the result of + <literal>UNION</literal> effectively appends the result of <replaceable>query2</replaceable> to the result of <replaceable>query1</replaceable> (although there is no guarantee that this is the order in which the rows are actually returned). Furthermore, it eliminates duplicate rows from its result, in the same - way as <literal>DISTINCT</>, unless <literal>UNION ALL</> is used. + way as <literal>DISTINCT</literal>, unless <literal>UNION ALL</literal> is used. </para> <para> - <literal>INTERSECT</> returns all rows that are both in the result + <literal>INTERSECT</literal> returns all rows that are both in the result of <replaceable>query1</replaceable> and in the result of <replaceable>query2</replaceable>. Duplicate rows are eliminated - unless <literal>INTERSECT ALL</> is used. + unless <literal>INTERSECT ALL</literal> is used. </para> <para> - <literal>EXCEPT</> returns all rows that are in the result of + <literal>EXCEPT</literal> returns all rows that are in the result of <replaceable>query1</replaceable> but not in the result of <replaceable>query2</replaceable>. (This is sometimes called the - <firstterm>difference</> between two queries.) Again, duplicates - are eliminated unless <literal>EXCEPT ALL</> is used. + <firstterm>difference</firstterm> between two queries.) Again, duplicates + are eliminated unless <literal>EXCEPT ALL</literal> is used. </para> <para> @@ -1690,7 +1690,7 @@ SELECT DISTINCT ON (<replaceable>expression</replaceable> <optional>, <replaceab </para> <para> - The <literal>ORDER BY</> clause specifies the sort order: + The <literal>ORDER BY</literal> clause specifies the sort order: <synopsis> SELECT <replaceable>select_list</replaceable> FROM <replaceable>table_expression</replaceable> @@ -1705,17 +1705,17 @@ SELECT a, b FROM table1 ORDER BY a + b, c; When more than one expression is specified, the later values are used to sort rows that are equal according to the earlier values. Each expression can be followed by an optional - <literal>ASC</> or <literal>DESC</> keyword to set the sort direction to - ascending or descending. <literal>ASC</> order is the default. + <literal>ASC</literal> or <literal>DESC</literal> keyword to set the sort direction to + ascending or descending. <literal>ASC</literal> order is the default. Ascending order puts smaller values first, where <quote>smaller</quote> is defined in terms of the <literal><</literal> operator. Similarly, descending order is determined with the <literal>></literal> operator. <footnote> <para> - Actually, <productname>PostgreSQL</> uses the <firstterm>default B-tree - operator class</> for the expression's data type to determine the sort - ordering for <literal>ASC</> and <literal>DESC</>. Conventionally, + Actually, <productname>PostgreSQL</productname> uses the <firstterm>default B-tree + operator class</firstterm> for the expression's data type to determine the sort + ordering for <literal>ASC</literal> and <literal>DESC</literal>. Conventionally, data types will be set up so that the <literal><</literal> and <literal>></literal> operators correspond to this sort ordering, but a user-defined data type's designer could choose to do something @@ -1725,22 +1725,22 @@ SELECT a, b FROM table1 ORDER BY a + b, c; </para> <para> - The <literal>NULLS FIRST</> and <literal>NULLS LAST</> options can be + The <literal>NULLS FIRST</literal> and <literal>NULLS LAST</literal> options can be used to determine whether nulls appear before or after non-null values in the sort ordering. By default, null values sort as if larger than any - non-null value; that is, <literal>NULLS FIRST</> is the default for - <literal>DESC</> order, and <literal>NULLS LAST</> otherwise. + non-null value; that is, <literal>NULLS FIRST</literal> is the default for + <literal>DESC</literal> order, and <literal>NULLS LAST</literal> otherwise. </para> <para> Note that the ordering options are considered independently for each - sort column. For example <literal>ORDER BY x, y DESC</> means - <literal>ORDER BY x ASC, y DESC</>, which is not the same as - <literal>ORDER BY x DESC, y DESC</>. + sort column. For example <literal>ORDER BY x, y DESC</literal> means + <literal>ORDER BY x ASC, y DESC</literal>, which is not the same as + <literal>ORDER BY x DESC, y DESC</literal>. </para> <para> - A <replaceable>sort_expression</> can also be the column label or number + A <replaceable>sort_expression</replaceable> can also be the column label or number of an output column, as in: <programlisting> SELECT a + b AS sum, c FROM table1 ORDER BY sum; @@ -1748,21 +1748,21 @@ SELECT a, max(b) FROM table1 GROUP BY a ORDER BY 1; </programlisting> both of which sort by the first output column. Note that an output column name has to stand alone, that is, it cannot be used in an expression - — for example, this is <emphasis>not</> correct: + — for example, this is <emphasis>not</emphasis> correct: <programlisting> SELECT a + b AS sum, c FROM table1 ORDER BY sum + c; -- wrong </programlisting> This restriction is made to reduce ambiguity. There is still - ambiguity if an <literal>ORDER BY</> item is a simple name that + ambiguity if an <literal>ORDER BY</literal> item is a simple name that could match either an output column name or a column from the table expression. The output column is used in such cases. This would - only cause confusion if you use <literal>AS</> to rename an output + only cause confusion if you use <literal>AS</literal> to rename an output column to match some other table column's name. </para> <para> - <literal>ORDER BY</> can be applied to the result of a - <literal>UNION</>, <literal>INTERSECT</>, or <literal>EXCEPT</> + <literal>ORDER BY</literal> can be applied to the result of a + <literal>UNION</literal>, <literal>INTERSECT</literal>, or <literal>EXCEPT</literal> combination, but in this case it is only permitted to sort by output column names or numbers, not by expressions. </para> @@ -1781,7 +1781,7 @@ SELECT a + b AS sum, c FROM table1 ORDER BY sum + c; -- wrong </indexterm> <para> - <literal>LIMIT</> and <literal>OFFSET</> allow you to retrieve just + <literal>LIMIT</literal> and <literal>OFFSET</literal> allow you to retrieve just a portion of the rows that are generated by the rest of the query: <synopsis> SELECT <replaceable>select_list</replaceable> @@ -1794,49 +1794,49 @@ SELECT <replaceable>select_list</replaceable> <para> If a limit count is given, no more than that many rows will be returned (but possibly fewer, if the query itself yields fewer rows). - <literal>LIMIT ALL</> is the same as omitting the <literal>LIMIT</> - clause, as is <literal>LIMIT</> with a NULL argument. + <literal>LIMIT ALL</literal> is the same as omitting the <literal>LIMIT</literal> + clause, as is <literal>LIMIT</literal> with a NULL argument. </para> <para> - <literal>OFFSET</> says to skip that many rows before beginning to - return rows. <literal>OFFSET 0</> is the same as omitting the - <literal>OFFSET</> clause, as is <literal>OFFSET</> with a NULL argument. + <literal>OFFSET</literal> says to skip that many rows before beginning to + return rows. <literal>OFFSET 0</literal> is the same as omitting the + <literal>OFFSET</literal> clause, as is <literal>OFFSET</literal> with a NULL argument. </para> <para> - If both <literal>OFFSET</> - and <literal>LIMIT</> appear, then <literal>OFFSET</> rows are - skipped before starting to count the <literal>LIMIT</> rows that + If both <literal>OFFSET</literal> + and <literal>LIMIT</literal> appear, then <literal>OFFSET</literal> rows are + skipped before starting to count the <literal>LIMIT</literal> rows that are returned. </para> <para> - When using <literal>LIMIT</>, it is important to use an - <literal>ORDER BY</> clause that constrains the result rows into a + When using <literal>LIMIT</literal>, it is important to use an + <literal>ORDER BY</literal> clause that constrains the result rows into a unique order. Otherwise you will get an unpredictable subset of the query's rows. You might be asking for the tenth through twentieth rows, but tenth through twentieth in what ordering? The - ordering is unknown, unless you specified <literal>ORDER BY</>. + ordering is unknown, unless you specified <literal>ORDER BY</literal>. </para> <para> - The query optimizer takes <literal>LIMIT</> into account when + The query optimizer takes <literal>LIMIT</literal> into account when generating query plans, so you are very likely to get different plans (yielding different row orders) depending on what you give - for <literal>LIMIT</> and <literal>OFFSET</>. Thus, using - different <literal>LIMIT</>/<literal>OFFSET</> values to select + for <literal>LIMIT</literal> and <literal>OFFSET</literal>. Thus, using + different <literal>LIMIT</literal>/<literal>OFFSET</literal> values to select different subsets of a query result <emphasis>will give inconsistent results</emphasis> unless you enforce a predictable - result ordering with <literal>ORDER BY</>. This is not a bug; it + result ordering with <literal>ORDER BY</literal>. This is not a bug; it is an inherent consequence of the fact that SQL does not promise to deliver the results of a query in any particular order unless - <literal>ORDER BY</> is used to constrain the order. + <literal>ORDER BY</literal> is used to constrain the order. </para> <para> - The rows skipped by an <literal>OFFSET</> clause still have to be - computed inside the server; therefore a large <literal>OFFSET</> + The rows skipped by an <literal>OFFSET</literal> clause still have to be + computed inside the server; therefore a large <literal>OFFSET</literal> might be inefficient. </para> </sect1> @@ -1850,7 +1850,7 @@ SELECT <replaceable>select_list</replaceable> </indexterm> <para> - <literal>VALUES</> provides a way to generate a <quote>constant table</> + <literal>VALUES</literal> provides a way to generate a <quote>constant table</quote> that can be used in a query without having to actually create and populate a table on-disk. The syntax is <synopsis> @@ -1860,7 +1860,7 @@ VALUES ( <replaceable class="parameter">expression</replaceable> [, ...] ) [, .. The lists must all have the same number of elements (i.e., the number of columns in the table), and corresponding entries in each list must have compatible data types. The actual data type assigned to each column - of the result is determined using the same rules as for <literal>UNION</> + of the result is determined using the same rules as for <literal>UNION</literal> (see <xref linkend="typeconv-union-case">). </para> @@ -1881,8 +1881,8 @@ SELECT 3, 'three'; </programlisting> By default, <productname>PostgreSQL</productname> assigns the names - <literal>column1</>, <literal>column2</>, etc. to the columns of a - <literal>VALUES</> table. The column names are not specified by the + <literal>column1</literal>, <literal>column2</literal>, etc. to the columns of a + <literal>VALUES</literal> table. The column names are not specified by the SQL standard and different database systems do it differently, so it's usually better to override the default names with a table alias list, like this: @@ -1898,16 +1898,16 @@ SELECT 3, 'three'; </para> <para> - Syntactically, <literal>VALUES</> followed by expression lists is + Syntactically, <literal>VALUES</literal> followed by expression lists is treated as equivalent to: <synopsis> SELECT <replaceable>select_list</replaceable> FROM <replaceable>table_expression</replaceable> </synopsis> - and can appear anywhere a <literal>SELECT</> can. For example, you can - use it as part of a <literal>UNION</>, or attach a - <replaceable>sort_specification</replaceable> (<literal>ORDER BY</>, - <literal>LIMIT</>, and/or <literal>OFFSET</>) to it. <literal>VALUES</> - is most commonly used as the data source in an <command>INSERT</> command, + and can appear anywhere a <literal>SELECT</literal> can. For example, you can + use it as part of a <literal>UNION</literal>, or attach a + <replaceable>sort_specification</replaceable> (<literal>ORDER BY</literal>, + <literal>LIMIT</literal>, and/or <literal>OFFSET</literal>) to it. <literal>VALUES</literal> + is most commonly used as the data source in an <command>INSERT</command> command, and next most commonly as a subquery. </para> @@ -1932,22 +1932,22 @@ SELECT <replaceable>select_list</replaceable> FROM <replaceable>table_expression </indexterm> <para> - <literal>WITH</> provides a way to write auxiliary statements for use in a + <literal>WITH</literal> provides a way to write auxiliary statements for use in a larger query. These statements, which are often referred to as Common Table Expressions or <acronym>CTE</acronym>s, can be thought of as defining temporary tables that exist just for one query. Each auxiliary statement - in a <literal>WITH</> clause can be a <command>SELECT</>, - <command>INSERT</>, <command>UPDATE</>, or <command>DELETE</>; and the - <literal>WITH</> clause itself is attached to a primary statement that can - also be a <command>SELECT</>, <command>INSERT</>, <command>UPDATE</>, or - <command>DELETE</>. + in a <literal>WITH</literal> clause can be a <command>SELECT</command>, + <command>INSERT</command>, <command>UPDATE</command>, or <command>DELETE</command>; and the + <literal>WITH</literal> clause itself is attached to a primary statement that can + also be a <command>SELECT</command>, <command>INSERT</command>, <command>UPDATE</command>, or + <command>DELETE</command>. </para> <sect2 id="queries-with-select"> - <title><command>SELECT</> in <literal>WITH</></title> + <title><command>SELECT</command> in <literal>WITH</literal></title> <para> - The basic value of <command>SELECT</> in <literal>WITH</> is to + The basic value of <command>SELECT</command> in <literal>WITH</literal> is to break down complicated queries into simpler parts. An example is: <programlisting> @@ -1970,21 +1970,21 @@ GROUP BY region, product; </programlisting> which displays per-product sales totals in only the top sales regions. - The <literal>WITH</> clause defines two auxiliary statements named - <structname>regional_sales</> and <structname>top_regions</>, - where the output of <structname>regional_sales</> is used in - <structname>top_regions</> and the output of <structname>top_regions</> - is used in the primary <command>SELECT</> query. - This example could have been written without <literal>WITH</>, + The <literal>WITH</literal> clause defines two auxiliary statements named + <structname>regional_sales</structname> and <structname>top_regions</structname>, + where the output of <structname>regional_sales</structname> is used in + <structname>top_regions</structname> and the output of <structname>top_regions</structname> + is used in the primary <command>SELECT</command> query. + This example could have been written without <literal>WITH</literal>, but we'd have needed two levels of nested sub-<command>SELECT</command>s. It's a bit easier to follow this way. </para> <para> - The optional <literal>RECURSIVE</> modifier changes <literal>WITH</> + The optional <literal>RECURSIVE</literal> modifier changes <literal>WITH</literal> from a mere syntactic convenience into a feature that accomplishes things not otherwise possible in standard SQL. Using - <literal>RECURSIVE</>, a <literal>WITH</> query can refer to its own + <literal>RECURSIVE</literal>, a <literal>WITH</literal> query can refer to its own output. A very simple example is this query to sum the integers from 1 through 100: @@ -1997,10 +1997,10 @@ WITH RECURSIVE t(n) AS ( SELECT sum(n) FROM t; </programlisting> - The general form of a recursive <literal>WITH</> query is always a - <firstterm>non-recursive term</>, then <literal>UNION</> (or - <literal>UNION ALL</>), then a - <firstterm>recursive term</>, where only the recursive term can contain + The general form of a recursive <literal>WITH</literal> query is always a + <firstterm>non-recursive term</firstterm>, then <literal>UNION</literal> (or + <literal>UNION ALL</literal>), then a + <firstterm>recursive term</firstterm>, where only the recursive term can contain a reference to the query's own output. Such a query is executed as follows: </para> @@ -2010,10 +2010,10 @@ SELECT sum(n) FROM t; <step performance="required"> <para> - Evaluate the non-recursive term. For <literal>UNION</> (but not - <literal>UNION ALL</>), discard duplicate rows. Include all remaining + Evaluate the non-recursive term. For <literal>UNION</literal> (but not + <literal>UNION ALL</literal>), discard duplicate rows. Include all remaining rows in the result of the recursive query, and also place them in a - temporary <firstterm>working table</>. + temporary <firstterm>working table</firstterm>. </para> </step> @@ -2026,10 +2026,10 @@ SELECT sum(n) FROM t; <para> Evaluate the recursive term, substituting the current contents of the working table for the recursive self-reference. - For <literal>UNION</> (but not <literal>UNION ALL</>), discard + For <literal>UNION</literal> (but not <literal>UNION ALL</literal>), discard duplicate rows and rows that duplicate any previous result row. Include all remaining rows in the result of the recursive query, and - also place them in a temporary <firstterm>intermediate table</>. + also place them in a temporary <firstterm>intermediate table</firstterm>. </para> </step> @@ -2046,7 +2046,7 @@ SELECT sum(n) FROM t; <note> <para> Strictly speaking, this process is iteration not recursion, but - <literal>RECURSIVE</> is the terminology chosen by the SQL standards + <literal>RECURSIVE</literal> is the terminology chosen by the SQL standards committee. </para> </note> @@ -2054,7 +2054,7 @@ SELECT sum(n) FROM t; <para> In the example above, the working table has just a single row in each step, and it takes on the values from 1 through 100 in successive steps. In - the 100th step, there is no output because of the <literal>WHERE</> + the 100th step, there is no output because of the <literal>WHERE</literal> clause, and so the query terminates. </para> @@ -2082,14 +2082,14 @@ GROUP BY sub_part When working with recursive queries it is important to be sure that the recursive part of the query will eventually return no tuples, or else the query will loop indefinitely. Sometimes, using - <literal>UNION</> instead of <literal>UNION ALL</> can accomplish this + <literal>UNION</literal> instead of <literal>UNION ALL</literal> can accomplish this by discarding rows that duplicate previous output rows. However, often a cycle does not involve output rows that are completely duplicate: it may be necessary to check just one or a few fields to see if the same point has been reached before. The standard method for handling such situations is to compute an array of the already-visited values. For example, consider - the following query that searches a table <structname>graph</> using a - <structfield>link</> field: + the following query that searches a table <structname>graph</structname> using a + <structfield>link</structfield> field: <programlisting> WITH RECURSIVE search_graph(id, link, data, depth) AS ( @@ -2103,12 +2103,12 @@ WITH RECURSIVE search_graph(id, link, data, depth) AS ( SELECT * FROM search_graph; </programlisting> - This query will loop if the <structfield>link</> relationships contain - cycles. Because we require a <quote>depth</> output, just changing - <literal>UNION ALL</> to <literal>UNION</> would not eliminate the looping. + This query will loop if the <structfield>link</structfield> relationships contain + cycles. Because we require a <quote>depth</quote> output, just changing + <literal>UNION ALL</literal> to <literal>UNION</literal> would not eliminate the looping. Instead we need to recognize whether we have reached the same row again while following a particular path of links. We add two columns - <structfield>path</> and <structfield>cycle</> to the loop-prone query: + <structfield>path</structfield> and <structfield>cycle</structfield> to the loop-prone query: <programlisting> WITH RECURSIVE search_graph(id, link, data, depth, path, cycle) AS ( @@ -2127,13 +2127,13 @@ SELECT * FROM search_graph; </programlisting> Aside from preventing cycles, the array value is often useful in its own - right as representing the <quote>path</> taken to reach any particular row. + right as representing the <quote>path</quote> taken to reach any particular row. </para> <para> In the general case where more than one field needs to be checked to recognize a cycle, use an array of rows. For example, if we needed to - compare fields <structfield>f1</> and <structfield>f2</>: + compare fields <structfield>f1</structfield> and <structfield>f2</structfield>: <programlisting> WITH RECURSIVE search_graph(id, link, data, depth, path, cycle) AS ( @@ -2154,7 +2154,7 @@ SELECT * FROM search_graph; <tip> <para> - Omit the <literal>ROW()</> syntax in the common case where only one field + Omit the <literal>ROW()</literal> syntax in the common case where only one field needs to be checked to recognize a cycle. This allows a simple array rather than a composite-type array to be used, gaining efficiency. </para> @@ -2164,16 +2164,16 @@ SELECT * FROM search_graph; <para> The recursive query evaluation algorithm produces its output in breadth-first search order. You can display the results in depth-first - search order by making the outer query <literal>ORDER BY</> a - <quote>path</> column constructed in this way. + search order by making the outer query <literal>ORDER BY</literal> a + <quote>path</quote> column constructed in this way. </para> </tip> <para> A helpful trick for testing queries - when you are not certain if they might loop is to place a <literal>LIMIT</> + when you are not certain if they might loop is to place a <literal>LIMIT</literal> in the parent query. For example, this query would loop forever without - the <literal>LIMIT</>: + the <literal>LIMIT</literal>: <programlisting> WITH RECURSIVE t(n) AS ( @@ -2185,26 +2185,26 @@ SELECT n FROM t LIMIT 100; </programlisting> This works because <productname>PostgreSQL</productname>'s implementation - evaluates only as many rows of a <literal>WITH</> query as are actually + evaluates only as many rows of a <literal>WITH</literal> query as are actually fetched by the parent query. Using this trick in production is not recommended, because other systems might work differently. Also, it usually won't work if you make the outer query sort the recursive query's results or join them to some other table, because in such cases the - outer query will usually try to fetch all of the <literal>WITH</> query's + outer query will usually try to fetch all of the <literal>WITH</literal> query's output anyway. </para> <para> - A useful property of <literal>WITH</> queries is that they are evaluated + A useful property of <literal>WITH</literal> queries is that they are evaluated only once per execution of the parent query, even if they are referred to - more than once by the parent query or sibling <literal>WITH</> queries. + more than once by the parent query or sibling <literal>WITH</literal> queries. Thus, expensive calculations that are needed in multiple places can be - placed within a <literal>WITH</> query to avoid redundant work. Another + placed within a <literal>WITH</literal> query to avoid redundant work. Another possible application is to prevent unwanted multiple evaluations of functions with side-effects. However, the other side of this coin is that the optimizer is less able to - push restrictions from the parent query down into a <literal>WITH</> query - than an ordinary subquery. The <literal>WITH</> query will generally be + push restrictions from the parent query down into a <literal>WITH</literal> query + than an ordinary subquery. The <literal>WITH</literal> query will generally be evaluated as written, without suppression of rows that the parent query might discard afterwards. (But, as mentioned above, evaluation might stop early if the reference(s) to the query demand only a limited number of @@ -2212,20 +2212,20 @@ SELECT n FROM t LIMIT 100; </para> <para> - The examples above only show <literal>WITH</> being used with - <command>SELECT</>, but it can be attached in the same way to - <command>INSERT</>, <command>UPDATE</>, or <command>DELETE</>. + The examples above only show <literal>WITH</literal> being used with + <command>SELECT</command>, but it can be attached in the same way to + <command>INSERT</command>, <command>UPDATE</command>, or <command>DELETE</command>. In each case it effectively provides temporary table(s) that can be referred to in the main command. </para> </sect2> <sect2 id="queries-with-modifying"> - <title>Data-Modifying Statements in <literal>WITH</></title> + <title>Data-Modifying Statements in <literal>WITH</literal></title> <para> - You can use data-modifying statements (<command>INSERT</>, - <command>UPDATE</>, or <command>DELETE</>) in <literal>WITH</>. This + You can use data-modifying statements (<command>INSERT</command>, + <command>UPDATE</command>, or <command>DELETE</command>) in <literal>WITH</literal>. This allows you to perform several different operations in the same query. An example is: @@ -2241,32 +2241,32 @@ INSERT INTO products_log SELECT * FROM moved_rows; </programlisting> - This query effectively moves rows from <structname>products</> to - <structname>products_log</>. The <command>DELETE</> in <literal>WITH</> - deletes the specified rows from <structname>products</>, returning their - contents by means of its <literal>RETURNING</> clause; and then the + This query effectively moves rows from <structname>products</structname> to + <structname>products_log</structname>. The <command>DELETE</command> in <literal>WITH</literal> + deletes the specified rows from <structname>products</structname>, returning their + contents by means of its <literal>RETURNING</literal> clause; and then the primary query reads that output and inserts it into - <structname>products_log</>. + <structname>products_log</structname>. </para> <para> - A fine point of the above example is that the <literal>WITH</> clause is - attached to the <command>INSERT</>, not the sub-<command>SELECT</> within - the <command>INSERT</>. This is necessary because data-modifying - statements are only allowed in <literal>WITH</> clauses that are attached - to the top-level statement. However, normal <literal>WITH</> visibility - rules apply, so it is possible to refer to the <literal>WITH</> - statement's output from the sub-<command>SELECT</>. + A fine point of the above example is that the <literal>WITH</literal> clause is + attached to the <command>INSERT</command>, not the sub-<command>SELECT</command> within + the <command>INSERT</command>. This is necessary because data-modifying + statements are only allowed in <literal>WITH</literal> clauses that are attached + to the top-level statement. However, normal <literal>WITH</literal> visibility + rules apply, so it is possible to refer to the <literal>WITH</literal> + statement's output from the sub-<command>SELECT</command>. </para> <para> - Data-modifying statements in <literal>WITH</> usually have - <literal>RETURNING</> clauses (see <xref linkend="dml-returning">), + Data-modifying statements in <literal>WITH</literal> usually have + <literal>RETURNING</literal> clauses (see <xref linkend="dml-returning">), as shown in the example above. - It is the output of the <literal>RETURNING</> clause, <emphasis>not</> the + It is the output of the <literal>RETURNING</literal> clause, <emphasis>not</emphasis> the target table of the data-modifying statement, that forms the temporary table that can be referred to by the rest of the query. If a - data-modifying statement in <literal>WITH</> lacks a <literal>RETURNING</> + data-modifying statement in <literal>WITH</literal> lacks a <literal>RETURNING</literal> clause, then it forms no temporary table and cannot be referred to in the rest of the query. Such a statement will be executed nonetheless. A not-particularly-useful example is: @@ -2278,15 +2278,15 @@ WITH t AS ( DELETE FROM bar; </programlisting> - This example would remove all rows from tables <structname>foo</> and - <structname>bar</>. The number of affected rows reported to the client - would only include rows removed from <structname>bar</>. + This example would remove all rows from tables <structname>foo</structname> and + <structname>bar</structname>. The number of affected rows reported to the client + would only include rows removed from <structname>bar</structname>. </para> <para> Recursive self-references in data-modifying statements are not allowed. In some cases it is possible to work around this limitation by - referring to the output of a recursive <literal>WITH</>, for example: + referring to the output of a recursive <literal>WITH</literal>, for example: <programlisting> WITH RECURSIVE included_parts(sub_part, part) AS ( @@ -2304,24 +2304,24 @@ DELETE FROM parts </para> <para> - Data-modifying statements in <literal>WITH</> are executed exactly once, + Data-modifying statements in <literal>WITH</literal> are executed exactly once, and always to completion, independently of whether the primary query reads all (or indeed any) of their output. Notice that this is different - from the rule for <command>SELECT</> in <literal>WITH</>: as stated in the - previous section, execution of a <command>SELECT</> is carried only as far + from the rule for <command>SELECT</command> in <literal>WITH</literal>: as stated in the + previous section, execution of a <command>SELECT</command> is carried only as far as the primary query demands its output. </para> <para> - The sub-statements in <literal>WITH</> are executed concurrently with + The sub-statements in <literal>WITH</literal> are executed concurrently with each other and with the main query. Therefore, when using data-modifying - statements in <literal>WITH</>, the order in which the specified updates + statements in <literal>WITH</literal>, the order in which the specified updates actually happen is unpredictable. All the statements are executed with - the same <firstterm>snapshot</> (see <xref linkend="mvcc">), so they - cannot <quote>see</> one another's effects on the target tables. This + the same <firstterm>snapshot</firstterm> (see <xref linkend="mvcc">), so they + cannot <quote>see</quote> one another's effects on the target tables. This alleviates the effects of the unpredictability of the actual order of row - updates, and means that <literal>RETURNING</> data is the only way to - communicate changes between different <literal>WITH</> sub-statements and + updates, and means that <literal>RETURNING</literal> data is the only way to + communicate changes between different <literal>WITH</literal> sub-statements and the main query. An example of this is that in <programlisting> @@ -2332,8 +2332,8 @@ WITH t AS ( SELECT * FROM products; </programlisting> - the outer <command>SELECT</> would return the original prices before the - action of the <command>UPDATE</>, while in + the outer <command>SELECT</command> would return the original prices before the + action of the <command>UPDATE</command>, while in <programlisting> WITH t AS ( @@ -2343,7 +2343,7 @@ WITH t AS ( SELECT * FROM t; </programlisting> - the outer <command>SELECT</> would return the updated data. + the outer <command>SELECT</command> would return the updated data. </para> <para> @@ -2353,15 +2353,15 @@ SELECT * FROM t; applies to deleting a row that was already updated in the same statement: only the update is performed. Therefore you should generally avoid trying to modify a single row twice in a single statement. In particular avoid - writing <literal>WITH</> sub-statements that could affect the same rows + writing <literal>WITH</literal> sub-statements that could affect the same rows changed by the main statement or a sibling sub-statement. The effects of such a statement will not be predictable. </para> <para> At present, any table used as the target of a data-modifying statement in - <literal>WITH</> must not have a conditional rule, nor an <literal>ALSO</> - rule, nor an <literal>INSTEAD</> rule that expands to multiple statements. + <literal>WITH</literal> must not have a conditional rule, nor an <literal>ALSO</literal> + rule, nor an <literal>INSTEAD</literal> rule that expands to multiple statements. </para> </sect2> diff --git a/doc/src/sgml/query.sgml b/doc/src/sgml/query.sgml index 98434925df3..fc60febcbd4 100644 --- a/doc/src/sgml/query.sgml +++ b/doc/src/sgml/query.sgml @@ -29,7 +29,7 @@ in the directory <filename>src/tutorial/</filename>. (Binary distributions of <productname>PostgreSQL</productname> might not compile these files.) To use those - files, first change to that directory and run <application>make</>: + files, first change to that directory and run <application>make</application>: <screen> <prompt>$</prompt> <userinput>cd <replaceable>....</replaceable>/src/tutorial</userinput> @@ -50,7 +50,7 @@ </screen> The <literal>\i</literal> command reads in commands from the - specified file. <command>psql</command>'s <literal>-s</> option puts you in + specified file. <command>psql</command>'s <literal>-s</literal> option puts you in single step mode which pauses before sending each statement to the server. The commands used in this section are in the file <filename>basics.sql</filename>. @@ -155,8 +155,8 @@ CREATE TABLE weather ( <productname>PostgreSQL</productname> supports the standard <acronym>SQL</acronym> types <type>int</type>, <type>smallint</type>, <type>real</type>, <type>double - precision</type>, <type>char(<replaceable>N</>)</type>, - <type>varchar(<replaceable>N</>)</type>, <type>date</type>, + precision</type>, <type>char(<replaceable>N</replaceable>)</type>, + <type>varchar(<replaceable>N</replaceable>)</type>, <type>date</type>, <type>time</type>, <type>timestamp</type>, and <type>interval</type>, as well as other types of general utility and a rich set of geometric types. @@ -211,7 +211,7 @@ INSERT INTO weather VALUES ('San Francisco', 46, 50, 0.25, '1994-11-27'); Note that all data types use rather obvious input formats. Constants that are not simple numeric values usually must be - surrounded by single quotes (<literal>'</>), as in the example. + surrounded by single quotes (<literal>'</literal>), as in the example. The <type>date</type> type is actually quite flexible in what it accepts, but for this tutorial we will stick to the unambiguous @@ -336,8 +336,8 @@ SELECT city, (temp_hi+temp_lo)/2 AS temp_avg, date FROM weather; </para> <para> - A query can be <quote>qualified</> by adding a <literal>WHERE</> - clause that specifies which rows are wanted. The <literal>WHERE</> + A query can be <quote>qualified</quote> by adding a <literal>WHERE</literal> + clause that specifies which rows are wanted. The <literal>WHERE</literal> clause contains a Boolean (truth value) expression, and only rows for which the Boolean expression is true are returned. The usual Boolean operators (<literal>AND</literal>, @@ -446,9 +446,9 @@ SELECT DISTINCT city of the same or different tables at one time is called a <firstterm>join</firstterm> query. As an example, say you wish to list all the weather records together with the location of the - associated city. To do that, we need to compare the <structfield>city</> - column of each row of the <structname>weather</> table with the - <structfield>name</> column of all rows in the <structname>cities</> + associated city. To do that, we need to compare the <structfield>city</structfield> + column of each row of the <structname>weather</structname> table with the + <structfield>name</structfield> column of all rows in the <structname>cities</structname> table, and select the pairs of rows where these values match. <note> <para> @@ -483,7 +483,7 @@ SELECT * There is no result row for the city of Hayward. This is because there is no matching entry in the <structname>cities</structname> table for Hayward, so the join - ignores the unmatched rows in the <structname>weather</> table. We will see + ignores the unmatched rows in the <structname>weather</structname> table. We will see shortly how this can be fixed. </para> </listitem> @@ -520,7 +520,7 @@ SELECT city, temp_lo, temp_hi, prcp, date, location Since the columns all had different names, the parser automatically found which table they belong to. If there were duplicate column names in the two tables you'd need to - <firstterm>qualify</> the column names to show which one you + <firstterm>qualify</firstterm> the column names to show which one you meant, as in: <programlisting> @@ -599,7 +599,7 @@ SELECT * <firstterm>self join</firstterm>. As an example, suppose we wish to find all the weather records that are in the temperature range of other weather records. So we need to compare the - <structfield>temp_lo</> and <structfield>temp_hi</> columns of + <structfield>temp_lo</structfield> and <structfield>temp_hi</structfield> columns of each <structname>weather</structname> row to the <structfield>temp_lo</structfield> and <structfield>temp_hi</structfield> columns of all other @@ -620,8 +620,8 @@ SELECT W1.city, W1.temp_lo AS low, W1.temp_hi AS high, (2 rows) </programlisting> - Here we have relabeled the weather table as <literal>W1</> and - <literal>W2</> to be able to distinguish the left and right side + Here we have relabeled the weather table as <literal>W1</literal> and + <literal>W2</literal> to be able to distinguish the left and right side of the join. You can also use these kinds of aliases in other queries to save some typing, e.g.: <programlisting> @@ -644,7 +644,7 @@ SELECT * <para> Like most other relational database products, <productname>PostgreSQL</productname> supports - <firstterm>aggregate functions</>. + <firstterm>aggregate functions</firstterm>. An aggregate function computes a single result from multiple input rows. For example, there are aggregates to compute the <function>count</function>, <function>sum</function>, @@ -747,7 +747,7 @@ SELECT city, max(temp_lo) </screen> which gives us the same results for only the cities that have all - <structfield>temp_lo</> values below 40. Finally, if we only care about + <structfield>temp_lo</structfield> values below 40. Finally, if we only care about cities whose names begin with <quote><literal>S</literal></quote>, we might do: @@ -871,7 +871,7 @@ DELETE FROM <replaceable>tablename</replaceable>; </synopsis> Without a qualification, <command>DELETE</command> will - remove <emphasis>all</> rows from the given table, leaving it + remove <emphasis>all</emphasis> rows from the given table, leaving it empty. The system will not request confirmation before doing this! </para> diff --git a/doc/src/sgml/rangetypes.sgml b/doc/src/sgml/rangetypes.sgml index 9557c16a4db..b585fd3d2ac 100644 --- a/doc/src/sgml/rangetypes.sgml +++ b/doc/src/sgml/rangetypes.sgml @@ -9,7 +9,7 @@ <para> Range types are data types representing a range of values of some - element type (called the range's <firstterm>subtype</>). + element type (called the range's <firstterm>subtype</firstterm>). For instance, ranges of <type>timestamp</type> might be used to represent the ranges of time that a meeting room is reserved. In this case the data type @@ -148,12 +148,12 @@ SELECT isempty(numrange(1, 5)); </para> <para> - Also, some element types have a notion of <quote>infinity</>, but that + Also, some element types have a notion of <quote>infinity</quote>, but that is just another value so far as the range type mechanisms are concerned. - For example, in timestamp ranges, <literal>[today,]</> means the same - thing as <literal>[today,)</>. But <literal>[today,infinity]</> means - something different from <literal>[today,infinity)</> — the latter - excludes the special <type>timestamp</> value <literal>infinity</>. + For example, in timestamp ranges, <literal>[today,]</literal> means the same + thing as <literal>[today,)</literal>. But <literal>[today,infinity]</literal> means + something different from <literal>[today,infinity)</literal> — the latter + excludes the special <type>timestamp</type> value <literal>infinity</literal>. </para> <para> @@ -284,25 +284,25 @@ SELECT numrange(NULL, 2.2); no valid values between them. This contrasts with continuous ranges, where it's always (or almost always) possible to identify other element values between two given values. For example, a range over the - <type>numeric</> type is continuous, as is a range over <type>timestamp</>. - (Even though <type>timestamp</> has limited precision, and so could + <type>numeric</type> type is continuous, as is a range over <type>timestamp</type>. + (Even though <type>timestamp</type> has limited precision, and so could theoretically be treated as discrete, it's better to consider it continuous since the step size is normally not of interest.) </para> <para> Another way to think about a discrete range type is that there is a clear - idea of a <quote>next</> or <quote>previous</> value for each element value. + idea of a <quote>next</quote> or <quote>previous</quote> value for each element value. Knowing that, it is possible to convert between inclusive and exclusive representations of a range's bounds, by choosing the next or previous element value instead of the one originally given. - For example, in an integer range type <literal>[4,8]</> and - <literal>(3,9)</> denote the same set of values; but this would not be so + For example, in an integer range type <literal>[4,8]</literal> and + <literal>(3,9)</literal> denote the same set of values; but this would not be so for a range over numeric. </para> <para> - A discrete range type should have a <firstterm>canonicalization</> + A discrete range type should have a <firstterm>canonicalization</firstterm> function that is aware of the desired step size for the element type. The canonicalization function is charged with converting equivalent values of the range type to have identical representations, in particular @@ -352,8 +352,8 @@ SELECT '[1.234, 5.678]'::floatrange; <para> If the subtype is considered to have discrete rather than continuous - values, the <command>CREATE TYPE</> command should specify a - <literal>canonical</> function. + values, the <command>CREATE TYPE</command> command should specify a + <literal>canonical</literal> function. The canonicalization function takes an input range value, and must return an equivalent range value that may have different bounds and formatting. The canonical output for two ranges that represent the same set of values, @@ -364,7 +364,7 @@ SELECT '[1.234, 5.678]'::floatrange; formatting. In addition to adjusting the inclusive/exclusive bounds format, a canonicalization function might round off boundary values, in case the desired step size is larger than what the subtype is capable of - storing. For instance, a range type over <type>timestamp</> could be + storing. For instance, a range type over <type>timestamp</type> could be defined to have a step size of an hour, in which case the canonicalization function would need to round off bounds that weren't a multiple of an hour, or perhaps throw an error instead. @@ -372,25 +372,25 @@ SELECT '[1.234, 5.678]'::floatrange; <para> In addition, any range type that is meant to be used with GiST or SP-GiST - indexes should define a subtype difference, or <literal>subtype_diff</>, - function. (The index will still work without <literal>subtype_diff</>, + indexes should define a subtype difference, or <literal>subtype_diff</literal>, + function. (The index will still work without <literal>subtype_diff</literal>, but it is likely to be considerably less efficient than if a difference function is provided.) The subtype difference function takes two input values of the subtype, and returns their difference - (i.e., <replaceable>X</> minus <replaceable>Y</>) represented as - a <type>float8</> value. In our example above, the - function <function>float8mi</> that underlies the regular <type>float8</> + (i.e., <replaceable>X</replaceable> minus <replaceable>Y</replaceable>) represented as + a <type>float8</type> value. In our example above, the + function <function>float8mi</function> that underlies the regular <type>float8</type> minus operator can be used; but for any other subtype, some type conversion would be necessary. Some creative thought about how to represent differences as numbers might be needed, too. To the greatest - extent possible, the <literal>subtype_diff</> function should agree with + extent possible, the <literal>subtype_diff</literal> function should agree with the sort ordering implied by the selected operator class and collation; that is, its result should be positive whenever its first argument is greater than its second according to the sort ordering. </para> <para> - A less-oversimplified example of a <literal>subtype_diff</> function is: + A less-oversimplified example of a <literal>subtype_diff</literal> function is: </para> <programlisting> @@ -426,15 +426,15 @@ SELECT '[11:10, 23:00]'::timerange; CREATE INDEX reservation_idx ON reservation USING GIST (during); </programlisting> A GiST or SP-GiST index can accelerate queries involving these range operators: - <literal>=</>, - <literal>&&</>, - <literal><@</>, - <literal>@></>, - <literal><<</>, - <literal>>></>, - <literal>-|-</>, - <literal>&<</>, and - <literal>&></> + <literal>=</literal>, + <literal>&&</literal>, + <literal><@</literal>, + <literal>@></literal>, + <literal><<</literal>, + <literal>>></literal>, + <literal>-|-</literal>, + <literal>&<</literal>, and + <literal>&></literal> (see <xref linkend="range-operators-table"> for more information). </para> @@ -442,7 +442,7 @@ CREATE INDEX reservation_idx ON reservation USING GIST (during); In addition, B-tree and hash indexes can be created for table columns of range types. For these index types, basically the only useful range operation is equality. There is a B-tree sort ordering defined for range - values, with corresponding <literal><</> and <literal>></> operators, + values, with corresponding <literal><</literal> and <literal>></literal> operators, but the ordering is rather arbitrary and not usually useful in the real world. Range types' B-tree and hash support is primarily meant to allow sorting and hashing internally in queries, rather than creation of @@ -491,7 +491,7 @@ with existing key (during)=(["2010-01-01 11:30:00","2010-01-01 15:00:00")). </para> <para> - You can use the <link linkend="btree-gist"><literal>btree_gist</></link> + You can use the <link linkend="btree-gist"><literal>btree_gist</literal></link> extension to define exclusion constraints on plain scalar data types, which can then be combined with range exclusions for maximum flexibility. For example, after <literal>btree_gist</literal> is installed, the following diff --git a/doc/src/sgml/recovery-config.sgml b/doc/src/sgml/recovery-config.sgml index 0a5d086248c..4e1aa74c1fe 100644 --- a/doc/src/sgml/recovery-config.sgml +++ b/doc/src/sgml/recovery-config.sgml @@ -11,23 +11,23 @@ <para> This chapter describes the settings available in the - <filename>recovery.conf</><indexterm><primary>recovery.conf</></> + <filename>recovery.conf</filename><indexterm><primary>recovery.conf</primary></indexterm> file. They apply only for the duration of the recovery. They must be reset for any subsequent recovery you wish to perform. They cannot be changed once recovery has begun. </para> <para> - Settings in <filename>recovery.conf</> are specified in the format - <literal>name = 'value'</>. One parameter is specified per line. + Settings in <filename>recovery.conf</filename> are specified in the format + <literal>name = 'value'</literal>. One parameter is specified per line. Hash marks (<literal>#</literal>) designate the rest of the line as a comment. To embed a single quote in a parameter - value, write two quotes (<literal>''</>). + value, write two quotes (<literal>''</literal>). </para> <para> - A sample file, <filename>share/recovery.conf.sample</>, - is provided in the installation's <filename>share/</> directory. + A sample file, <filename>share/recovery.conf.sample</filename>, + is provided in the installation's <filename>share/</filename> directory. </para> <sect1 id="archive-recovery-settings"> @@ -38,7 +38,7 @@ <varlistentry id="restore-command" xreflabel="restore_command"> <term><varname>restore_command</varname> (<type>string</type>) <indexterm> - <primary><varname>restore_command</> recovery parameter</primary> + <primary><varname>restore_command</varname> recovery parameter</primary> </indexterm> </term> <listitem> @@ -46,25 +46,25 @@ The local shell command to execute to retrieve an archived segment of the WAL file series. This parameter is required for archive recovery, but optional for streaming replication. - Any <literal>%f</> in the string is + Any <literal>%f</literal> in the string is replaced by the name of the file to retrieve from the archive, - and any <literal>%p</> is replaced by the copy destination path name + and any <literal>%p</literal> is replaced by the copy destination path name on the server. (The path name is relative to the current working directory, i.e., the cluster's data directory.) - Any <literal>%r</> is replaced by the name of the file containing the + Any <literal>%r</literal> is replaced by the name of the file containing the last valid restart point. That is the earliest file that must be kept to allow a restore to be restartable, so this information can be used to truncate the archive to just the minimum required to support - restarting from the current restore. <literal>%r</> is typically only + restarting from the current restore. <literal>%r</literal> is typically only used by warm-standby configurations (see <xref linkend="warm-standby">). - Write <literal>%%</> to embed an actual <literal>%</> character. + Write <literal>%%</literal> to embed an actual <literal>%</literal> character. </para> <para> It is important for the command to return a zero exit status - only if it succeeds. The command <emphasis>will</> be asked for file + only if it succeeds. The command <emphasis>will</emphasis> be asked for file names that are not present in the archive; it must return nonzero when so asked. Examples: <programlisting> @@ -82,33 +82,33 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows <varlistentry id="archive-cleanup-command" xreflabel="archive_cleanup_command"> <term><varname>archive_cleanup_command</varname> (<type>string</type>) <indexterm> - <primary><varname>archive_cleanup_command</> recovery parameter</primary> + <primary><varname>archive_cleanup_command</varname> recovery parameter</primary> </indexterm> </term> <listitem> <para> This optional parameter specifies a shell command that will be executed at every restartpoint. The purpose of - <varname>archive_cleanup_command</> is to provide a mechanism for + <varname>archive_cleanup_command</varname> is to provide a mechanism for cleaning up old archived WAL files that are no longer needed by the standby server. - Any <literal>%r</> is replaced by the name of the file containing the + Any <literal>%r</literal> is replaced by the name of the file containing the last valid restart point. - That is the earliest file that must be <emphasis>kept</> to allow a - restore to be restartable, and so all files earlier than <literal>%r</> + That is the earliest file that must be <emphasis>kept</emphasis> to allow a + restore to be restartable, and so all files earlier than <literal>%r</literal> may be safely removed. This information can be used to truncate the archive to just the minimum required to support restart from the current restore. The <xref linkend="pgarchivecleanup"> module - is often used in <varname>archive_cleanup_command</> for + is often used in <varname>archive_cleanup_command</varname> for single-standby configurations, for example: <programlisting>archive_cleanup_command = 'pg_archivecleanup /mnt/server/archivedir %r'</programlisting> Note however that if multiple standby servers are restoring from the same archive directory, you will need to ensure that you do not delete WAL files until they are no longer needed by any of the servers. - <varname>archive_cleanup_command</> would typically be used in a + <varname>archive_cleanup_command</varname> would typically be used in a warm-standby configuration (see <xref linkend="warm-standby">). - Write <literal>%%</> to embed an actual <literal>%</> character in the + Write <literal>%%</literal> to embed an actual <literal>%</literal> character in the command. </para> <para> @@ -123,16 +123,16 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows <varlistentry id="recovery-end-command" xreflabel="recovery_end_command"> <term><varname>recovery_end_command</varname> (<type>string</type>) <indexterm> - <primary><varname>recovery_end_command</> recovery parameter</primary> + <primary><varname>recovery_end_command</varname> recovery parameter</primary> </indexterm> </term> <listitem> <para> This parameter specifies a shell command that will be executed once only at the end of recovery. This parameter is optional. The purpose of the - <varname>recovery_end_command</> is to provide a mechanism for cleanup + <varname>recovery_end_command</varname> is to provide a mechanism for cleanup following replication or recovery. - Any <literal>%r</> is replaced by the name of the file containing the + Any <literal>%r</literal> is replaced by the name of the file containing the last valid restart point, like in <xref linkend="archive-cleanup-command">. </para> <para> @@ -156,9 +156,9 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows <para> By default, recovery will recover to the end of the WAL log. The following parameters can be used to specify an earlier stopping point. - At most one of <varname>recovery_target</>, - <varname>recovery_target_lsn</>, <varname>recovery_target_name</>, - <varname>recovery_target_time</>, or <varname>recovery_target_xid</> + At most one of <varname>recovery_target</varname>, + <varname>recovery_target_lsn</varname>, <varname>recovery_target_name</varname>, + <varname>recovery_target_time</varname>, or <varname>recovery_target_xid</varname> can be used; if more than one of these is specified in the configuration file, the last entry will be used. </para> @@ -167,7 +167,7 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows <varlistentry id="recovery-target" xreflabel="recovery_target"> <term><varname>recovery_target</varname><literal> = 'immediate'</literal> <indexterm> - <primary><varname>recovery_target</> recovery parameter</primary> + <primary><varname>recovery_target</varname> recovery parameter</primary> </indexterm> </term> <listitem> @@ -178,7 +178,7 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows ended. </para> <para> - Technically, this is a string parameter, but <literal>'immediate'</> + Technically, this is a string parameter, but <literal>'immediate'</literal> is currently the only allowed value. </para> </listitem> @@ -187,13 +187,13 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows <varlistentry id="recovery-target-name" xreflabel="recovery_target_name"> <term><varname>recovery_target_name</varname> (<type>string</type>) <indexterm> - <primary><varname>recovery_target_name</> recovery parameter</primary> + <primary><varname>recovery_target_name</varname> recovery parameter</primary> </indexterm> </term> <listitem> <para> This parameter specifies the named restore point (created with - <function>pg_create_restore_point()</>) to which recovery will proceed. + <function>pg_create_restore_point()</function>) to which recovery will proceed. </para> </listitem> </varlistentry> @@ -201,7 +201,7 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows <varlistentry id="recovery-target-time" xreflabel="recovery_target_time"> <term><varname>recovery_target_time</varname> (<type>timestamp</type>) <indexterm> - <primary><varname>recovery_target_time</> recovery parameter</primary> + <primary><varname>recovery_target_time</varname> recovery parameter</primary> </indexterm> </term> <listitem> @@ -217,7 +217,7 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows <varlistentry id="recovery-target-xid" xreflabel="recovery_target_xid"> <term><varname>recovery_target_xid</varname> (<type>string</type>) <indexterm> - <primary><varname>recovery_target_xid</> recovery parameter</primary> + <primary><varname>recovery_target_xid</varname> recovery parameter</primary> </indexterm> </term> <listitem> @@ -237,7 +237,7 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows <varlistentry id="recovery-target-lsn" xreflabel="recovery_target_lsn"> <term><varname>recovery_target_lsn</varname> (<type>pg_lsn</type>) <indexterm> - <primary><varname>recovery_target_lsn</> recovery parameter</primary> + <primary><varname>recovery_target_lsn</varname> recovery parameter</primary> </indexterm> </term> <listitem> @@ -246,7 +246,7 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows to which recovery will proceed. The precise stopping point is also influenced by <xref linkend="recovery-target-inclusive">. This parameter is parsed using the system data type - <link linkend="datatype-pg-lsn"><type>pg_lsn</></link>. + <link linkend="datatype-pg-lsn"><type>pg_lsn</type></link>. </para> </listitem> </varlistentry> @@ -262,7 +262,7 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows xreflabel="recovery_target_inclusive"> <term><varname>recovery_target_inclusive</varname> (<type>boolean</type>) <indexterm> - <primary><varname>recovery_target_inclusive</> recovery parameter</primary> + <primary><varname>recovery_target_inclusive</varname> recovery parameter</primary> </indexterm> </term> <listitem> @@ -274,7 +274,7 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows or <xref linkend="recovery-target-xid"> is specified. This setting controls whether transactions having exactly the target commit time or ID, respectively, will - be included in the recovery. Default is <literal>true</>. + be included in the recovery. Default is <literal>true</literal>. </para> </listitem> </varlistentry> @@ -283,14 +283,14 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows xreflabel="recovery_target_timeline"> <term><varname>recovery_target_timeline</varname> (<type>string</type>) <indexterm> - <primary><varname>recovery_target_timeline</> recovery parameter</primary> + <primary><varname>recovery_target_timeline</varname> recovery parameter</primary> </indexterm> </term> <listitem> <para> Specifies recovering into a particular timeline. The default is to recover along the same timeline that was current when the - base backup was taken. Setting this to <literal>latest</> recovers + base backup was taken. Setting this to <literal>latest</literal> recovers to the latest timeline found in the archive, which is useful in a standby server. Other than that you only need to set this parameter in complex re-recovery situations, where you need to return to @@ -304,24 +304,24 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows xreflabel="recovery_target_action"> <term><varname>recovery_target_action</varname> (<type>enum</type>) <indexterm> - <primary><varname>recovery_target_action</> recovery parameter</primary> + <primary><varname>recovery_target_action</varname> recovery parameter</primary> </indexterm> </term> <listitem> <para> Specifies what action the server should take once the recovery target is - reached. The default is <literal>pause</>, which means recovery will - be paused. <literal>promote</> means the recovery process will finish + reached. The default is <literal>pause</literal>, which means recovery will + be paused. <literal>promote</literal> means the recovery process will finish and the server will start to accept connections. - Finally <literal>shutdown</> will stop the server after reaching the + Finally <literal>shutdown</literal> will stop the server after reaching the recovery target. </para> <para> - The intended use of the <literal>pause</> setting is to allow queries + The intended use of the <literal>pause</literal> setting is to allow queries to be executed against the database to check if this recovery target is the most desirable point for recovery. The paused state can be resumed by - using <function>pg_wal_replay_resume()</> (see + using <function>pg_wal_replay_resume()</function> (see <xref linkend="functions-recovery-control-table">), which then causes recovery to end. If this recovery target is not the desired stopping point, then shut down the server, change the @@ -329,22 +329,22 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows continue recovery. </para> <para> - The <literal>shutdown</> setting is useful to have the instance ready + The <literal>shutdown</literal> setting is useful to have the instance ready at the exact replay point desired. The instance will still be able to replay more WAL records (and in fact will have to replay WAL records since the last checkpoint next time it is started). </para> <para> - Note that because <filename>recovery.conf</> will not be renamed when - <varname>recovery_target_action</> is set to <literal>shutdown</>, + Note that because <filename>recovery.conf</filename> will not be renamed when + <varname>recovery_target_action</varname> is set to <literal>shutdown</literal>, any subsequent start will end with immediate shutdown unless the - configuration is changed or the <filename>recovery.conf</> file is + configuration is changed or the <filename>recovery.conf</filename> file is removed manually. </para> <para> This setting has no effect if no recovery target is set. If <xref linkend="guc-hot-standby"> is not enabled, a setting of - <literal>pause</> will act the same as <literal>shutdown</>. + <literal>pause</literal> will act the same as <literal>shutdown</literal>. </para> </listitem> </varlistentry> @@ -360,25 +360,25 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows <varlistentry id="standby-mode" xreflabel="standby_mode"> <term><varname>standby_mode</varname> (<type>boolean</type>) <indexterm> - <primary><varname>standby_mode</> recovery parameter</primary> + <primary><varname>standby_mode</varname> recovery parameter</primary> </indexterm> </term> <listitem> <para> - Specifies whether to start the <productname>PostgreSQL</> server as - a standby. If this parameter is <literal>on</>, the server will + Specifies whether to start the <productname>PostgreSQL</productname> server as + a standby. If this parameter is <literal>on</literal>, the server will not stop recovery when the end of archived WAL is reached, but will keep trying to continue recovery by fetching new WAL segments - using <varname>restore_command</> + using <varname>restore_command</varname> and/or by connecting to the primary server as specified by the - <varname>primary_conninfo</> setting. + <varname>primary_conninfo</varname> setting. </para> </listitem> </varlistentry> <varlistentry id="primary-conninfo" xreflabel="primary_conninfo"> <term><varname>primary_conninfo</varname> (<type>string</type>) <indexterm> - <primary><varname>primary_conninfo</> recovery parameter</primary> + <primary><varname>primary_conninfo</varname> recovery parameter</primary> </indexterm> </term> <listitem> @@ -401,20 +401,20 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows A password needs to be provided too, if the primary demands password authentication. It can be provided in the <varname>primary_conninfo</varname> string, or in a separate - <filename>~/.pgpass</> file on the standby server (use - <literal>replication</> as the database name). + <filename>~/.pgpass</filename> file on the standby server (use + <literal>replication</literal> as the database name). Do not specify a database name in the <varname>primary_conninfo</varname> string. </para> <para> - This setting has no effect if <varname>standby_mode</> is <literal>off</>. + This setting has no effect if <varname>standby_mode</varname> is <literal>off</literal>. </para> </listitem> </varlistentry> <varlistentry id="primary-slot-name" xreflabel="primary_slot_name"> <term><varname>primary_slot_name</varname> (<type>string</type>) <indexterm> - <primary><varname>primary_slot_name</> recovery parameter</primary> + <primary><varname>primary_slot_name</varname> recovery parameter</primary> </indexterm> </term> <listitem> @@ -423,7 +423,7 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows connecting to the primary via streaming replication to control resource removal on the upstream node (see <xref linkend="streaming-replication-slots">). - This setting has no effect if <varname>primary_conninfo</> is not + This setting has no effect if <varname>primary_conninfo</varname> is not set. </para> </listitem> @@ -431,15 +431,15 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows <varlistentry id="trigger-file" xreflabel="trigger_file"> <term><varname>trigger_file</varname> (<type>string</type>) <indexterm> - <primary><varname>trigger_file</> recovery parameter</primary> + <primary><varname>trigger_file</varname> recovery parameter</primary> </indexterm> </term> <listitem> <para> Specifies a trigger file whose presence ends recovery in the standby. Even if this value is not set, you can still promote - the standby using <command>pg_ctl promote</>. - This setting has no effect if <varname>standby_mode</> is <literal>off</>. + the standby using <command>pg_ctl promote</command>. + This setting has no effect if <varname>standby_mode</varname> is <literal>off</literal>. </para> </listitem> </varlistentry> @@ -447,7 +447,7 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows <varlistentry id="recovery-min-apply-delay" xreflabel="recovery_min_apply_delay"> <term><varname>recovery_min_apply_delay</varname> (<type>integer</type>) <indexterm> - <primary><varname>recovery_min_apply_delay</> recovery parameter</primary> + <primary><varname>recovery_min_apply_delay</varname> recovery parameter</primary> </indexterm> </term> <listitem> @@ -488,7 +488,7 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows This parameter is intended for use with streaming replication deployments; however, if the parameter is specified it will be honored in all cases. - <varname>hot_standby_feedback</> will be delayed by use of this feature + <varname>hot_standby_feedback</varname> will be delayed by use of this feature which could lead to bloat on the master; use both together with care. <warning> diff --git a/doc/src/sgml/ref/abort.sgml b/doc/src/sgml/ref/abort.sgml index ed9332c395b..285d0d4ac65 100644 --- a/doc/src/sgml/ref/abort.sgml +++ b/doc/src/sgml/ref/abort.sgml @@ -63,7 +63,7 @@ ABORT [ WORK | TRANSACTION ] </para> <para> - Issuing <command>ABORT</> outside of a transaction block + Issuing <command>ABORT</command> outside of a transaction block emits a warning and otherwise has no effect. </para> </refsect1> diff --git a/doc/src/sgml/ref/alter_aggregate.sgml b/doc/src/sgml/ref/alter_aggregate.sgml index 7b7616ca014..43f0a1609b9 100644 --- a/doc/src/sgml/ref/alter_aggregate.sgml +++ b/doc/src/sgml/ref/alter_aggregate.sgml @@ -43,7 +43,7 @@ ALTER AGGREGATE <replaceable>name</replaceable> ( <replaceable>aggregate_signatu </para> <para> - You must own the aggregate function to use <command>ALTER AGGREGATE</>. + You must own the aggregate function to use <command>ALTER AGGREGATE</command>. To change the schema of an aggregate function, you must also have <literal>CREATE</literal> privilege on the new schema. To alter the owner, you must also be a direct or indirect member of the new @@ -73,8 +73,8 @@ ALTER AGGREGATE <replaceable>name</replaceable> ( <replaceable>aggregate_signatu <listitem> <para> - The mode of an argument: <literal>IN</> or <literal>VARIADIC</>. - If omitted, the default is <literal>IN</>. + The mode of an argument: <literal>IN</literal> or <literal>VARIADIC</literal>. + If omitted, the default is <literal>IN</literal>. </para> </listitem> </varlistentry> @@ -97,10 +97,10 @@ ALTER AGGREGATE <replaceable>name</replaceable> ( <replaceable>aggregate_signatu <listitem> <para> An input data type on which the aggregate function operates. - To reference a zero-argument aggregate function, write <literal>*</> + To reference a zero-argument aggregate function, write <literal>*</literal> in place of the list of argument specifications. To reference an ordered-set aggregate function, write - <literal>ORDER BY</> between the direct and aggregated argument + <literal>ORDER BY</literal> between the direct and aggregated argument specifications. </para> </listitem> @@ -140,13 +140,13 @@ ALTER AGGREGATE <replaceable>name</replaceable> ( <replaceable>aggregate_signatu <para> The recommended syntax for referencing an ordered-set aggregate - is to write <literal>ORDER BY</> between the direct and aggregated + is to write <literal>ORDER BY</literal> between the direct and aggregated argument specifications, in the same style as in <xref linkend="sql-createaggregate">. However, it will also work to - omit <literal>ORDER BY</> and just run the direct and aggregated + omit <literal>ORDER BY</literal> and just run the direct and aggregated argument specifications into a single list. In this abbreviated form, - if <literal>VARIADIC "any"</> was used in both the direct and - aggregated argument lists, write <literal>VARIADIC "any"</> only once. + if <literal>VARIADIC "any"</literal> was used in both the direct and + aggregated argument lists, write <literal>VARIADIC "any"</literal> only once. </para> </refsect1> diff --git a/doc/src/sgml/ref/alter_collation.sgml b/doc/src/sgml/ref/alter_collation.sgml index 30e8c756a12..9d77ee5c2c3 100644 --- a/doc/src/sgml/ref/alter_collation.sgml +++ b/doc/src/sgml/ref/alter_collation.sgml @@ -38,7 +38,7 @@ ALTER COLLATION <replaceable>name</replaceable> SET SCHEMA <replaceable>new_sche </para> <para> - You must own the collation to use <command>ALTER COLLATION</>. + You must own the collation to use <command>ALTER COLLATION</command>. To alter the owner, you must also be a direct or indirect member of the new owning role, and that role must have <literal>CREATE</literal> privilege on the collation's schema. (These restrictions enforce that altering the diff --git a/doc/src/sgml/ref/alter_conversion.sgml b/doc/src/sgml/ref/alter_conversion.sgml index 3514720d03e..83fcbbd5a5d 100644 --- a/doc/src/sgml/ref/alter_conversion.sgml +++ b/doc/src/sgml/ref/alter_conversion.sgml @@ -36,7 +36,7 @@ ALTER CONVERSION <replaceable>name</replaceable> SET SCHEMA <replaceable>new_sch </para> <para> - You must own the conversion to use <command>ALTER CONVERSION</>. + You must own the conversion to use <command>ALTER CONVERSION</command>. To alter the owner, you must also be a direct or indirect member of the new owning role, and that role must have <literal>CREATE</literal> privilege on the conversion's schema. (These restrictions enforce that altering the diff --git a/doc/src/sgml/ref/alter_database.sgml b/doc/src/sgml/ref/alter_database.sgml index 59639d37291..35e4123cadd 100644 --- a/doc/src/sgml/ref/alter_database.sgml +++ b/doc/src/sgml/ref/alter_database.sgml @@ -89,7 +89,7 @@ ALTER DATABASE <replaceable class="parameter">name</replaceable> RESET ALL database. Whenever a new session is subsequently started in that database, the specified value becomes the session default value. The database-specific default overrides whatever setting is present - in <filename>postgresql.conf</> or has been received from the + in <filename>postgresql.conf</filename> or has been received from the <command>postgres</command> command line. Only the database owner or a superuser can change the session defaults for a database. Certain variables cannot be set this way, or can only be @@ -183,7 +183,7 @@ ALTER DATABASE <replaceable class="parameter">name</replaceable> RESET ALL database-specific setting is removed, so the system-wide default setting will be inherited in new sessions. Use <literal>RESET ALL</literal> to clear all database-specific settings. - <literal>SET FROM CURRENT</> saves the session's current value of + <literal>SET FROM CURRENT</literal> saves the session's current value of the parameter as the database-specific value. </para> diff --git a/doc/src/sgml/ref/alter_default_privileges.sgml b/doc/src/sgml/ref/alter_default_privileges.sgml index 09eabda68ac..6c34f2446a7 100644 --- a/doc/src/sgml/ref/alter_default_privileges.sgml +++ b/doc/src/sgml/ref/alter_default_privileges.sgml @@ -88,7 +88,7 @@ REVOKE [ GRANT OPTION FOR ] <title>Description</title> <para> - <command>ALTER DEFAULT PRIVILEGES</> allows you to set the privileges + <command>ALTER DEFAULT PRIVILEGES</command> allows you to set the privileges that will be applied to objects created in the future. (It does not affect privileges assigned to already-existing objects.) Currently, only the privileges for schemas, tables (including views and foreign @@ -109,9 +109,9 @@ REVOKE [ GRANT OPTION FOR ] As explained under <xref linkend="sql-grant">, the default privileges for any object type normally grant all grantable permissions to the object owner, and may grant some privileges to - <literal>PUBLIC</> as well. However, this behavior can be changed by + <literal>PUBLIC</literal> as well. However, this behavior can be changed by altering the global default privileges with - <command>ALTER DEFAULT PRIVILEGES</>. + <command>ALTER DEFAULT PRIVILEGES</command>. </para> <refsect2> @@ -123,7 +123,7 @@ REVOKE [ GRANT OPTION FOR ] <listitem> <para> The name of an existing role of which the current role is a member. - If <literal>FOR ROLE</> is omitted, the current role is assumed. + If <literal>FOR ROLE</literal> is omitted, the current role is assumed. </para> </listitem> </varlistentry> @@ -134,9 +134,9 @@ REVOKE [ GRANT OPTION FOR ] <para> The name of an existing schema. If specified, the default privileges are altered for objects later created in that schema. - If <literal>IN SCHEMA</> is omitted, the global default privileges + If <literal>IN SCHEMA</literal> is omitted, the global default privileges are altered. - <literal>IN SCHEMA</> is not allowed when using <literal>ON SCHEMAS</> + <literal>IN SCHEMA</literal> is not allowed when using <literal>ON SCHEMAS</literal> as schemas can't be nested. </para> </listitem> @@ -148,7 +148,7 @@ REVOKE [ GRANT OPTION FOR ] <para> The name of an existing role to grant or revoke privileges for. This parameter, and all the other parameters in - <replaceable class="parameter">abbreviated_grant_or_revoke</>, + <replaceable class="parameter">abbreviated_grant_or_revoke</replaceable>, act as described under <xref linkend="sql-grant"> or <xref linkend="sql-revoke">, @@ -175,7 +175,7 @@ REVOKE [ GRANT OPTION FOR ] <para> If you wish to drop a role for which the default privileges have been altered, it is necessary to reverse the changes in its default privileges - or use <command>DROP OWNED BY</> to get rid of the default privileges entry + or use <command>DROP OWNED BY</command> to get rid of the default privileges entry for the role. </para> </refsect1> @@ -186,7 +186,7 @@ REVOKE [ GRANT OPTION FOR ] <para> Grant SELECT privilege to everyone for all tables (and views) you subsequently create in schema <literal>myschema</literal>, and allow - role <literal>webuser</> to INSERT into them too: + role <literal>webuser</literal> to INSERT into them too: <programlisting> ALTER DEFAULT PRIVILEGES IN SCHEMA myschema GRANT SELECT ON TABLES TO PUBLIC; @@ -206,7 +206,7 @@ ALTER DEFAULT PRIVILEGES IN SCHEMA myschema REVOKE INSERT ON TABLES FROM webuser <para> Remove the public EXECUTE permission that is normally granted on functions, - for all functions subsequently created by role <literal>admin</>: + for all functions subsequently created by role <literal>admin</literal>: <programlisting> ALTER DEFAULT PRIVILEGES FOR ROLE admin REVOKE EXECUTE ON FUNCTIONS FROM PUBLIC; diff --git a/doc/src/sgml/ref/alter_domain.sgml b/doc/src/sgml/ref/alter_domain.sgml index 827a1c7d20e..96a7db95ecf 100644 --- a/doc/src/sgml/ref/alter_domain.sgml +++ b/doc/src/sgml/ref/alter_domain.sgml @@ -69,7 +69,7 @@ ALTER DOMAIN <replaceable class="parameter">name</replaceable> <listitem> <para> These forms change whether a domain is marked to allow NULL - values or to reject NULL values. You can only <literal>SET NOT NULL</> + values or to reject NULL values. You can only <literal>SET NOT NULL</literal> when the columns using the domain contain no null values. </para> </listitem> @@ -88,7 +88,7 @@ ALTER DOMAIN <replaceable class="parameter">name</replaceable> valid using <command>ALTER DOMAIN ... VALIDATE CONSTRAINT</command>. Newly inserted or updated rows are always checked against all constraints, even those marked <literal>NOT VALID</literal>. - <literal>NOT VALID</> is only accepted for <literal>CHECK</> constraints. + <literal>NOT VALID</literal> is only accepted for <literal>CHECK</literal> constraints. </para> </listitem> </varlistentry> @@ -118,7 +118,7 @@ ALTER DOMAIN <replaceable class="parameter">name</replaceable> <listitem> <para> This form validates a constraint previously added as - <literal>NOT VALID</>, that is, verify that all data in columns using the + <literal>NOT VALID</literal>, that is, verify that all data in columns using the domain satisfy the specified constraint. </para> </listitem> @@ -154,7 +154,7 @@ ALTER DOMAIN <replaceable class="parameter">name</replaceable> </variablelist> <para> - You must own the domain to use <command>ALTER DOMAIN</>. + You must own the domain to use <command>ALTER DOMAIN</command>. To change the schema of a domain, you must also have <literal>CREATE</literal> privilege on the new schema. To alter the owner, you must also be a direct or indirect member of the new @@ -273,8 +273,8 @@ ALTER DOMAIN <replaceable class="parameter">name</replaceable> <title>Notes</title> <para> - Currently, <command>ALTER DOMAIN ADD CONSTRAINT</>, <command>ALTER - DOMAIN VALIDATE CONSTRAINT</>, and <command>ALTER DOMAIN SET NOT NULL</> + Currently, <command>ALTER DOMAIN ADD CONSTRAINT</command>, <command>ALTER + DOMAIN VALIDATE CONSTRAINT</command>, and <command>ALTER DOMAIN SET NOT NULL</command> will fail if the validated named domain or any derived domain is used within a composite-type column of any table in the database. They should eventually be improved to be @@ -330,10 +330,10 @@ ALTER DOMAIN zipcode SET SCHEMA customers; <para> <command>ALTER DOMAIN</command> conforms to the <acronym>SQL</acronym> - standard, except for the <literal>OWNER</>, <literal>RENAME</literal>, <literal>SET SCHEMA</>, and - <literal>VALIDATE CONSTRAINT</> variants, which are - <productname>PostgreSQL</productname> extensions. The <literal>NOT VALID</> - clause of the <literal>ADD CONSTRAINT</> variant is also a + standard, except for the <literal>OWNER</literal>, <literal>RENAME</literal>, <literal>SET SCHEMA</literal>, and + <literal>VALIDATE CONSTRAINT</literal> variants, which are + <productname>PostgreSQL</productname> extensions. The <literal>NOT VALID</literal> + clause of the <literal>ADD CONSTRAINT</literal> variant is also a <productname>PostgreSQL</productname> extension. </para> </refsect1> diff --git a/doc/src/sgml/ref/alter_extension.sgml b/doc/src/sgml/ref/alter_extension.sgml index ae84e98e49a..c6c831fa30a 100644 --- a/doc/src/sgml/ref/alter_extension.sgml +++ b/doc/src/sgml/ref/alter_extension.sgml @@ -89,7 +89,7 @@ ALTER EXTENSION <replaceable class="parameter">name</replaceable> DROP <replacea <listitem> <para> This form moves the extension's objects into another schema. The - extension has to be <firstterm>relocatable</> for this command to + extension has to be <firstterm>relocatable</firstterm> for this command to succeed. </para> </listitem> @@ -125,7 +125,7 @@ ALTER EXTENSION <replaceable class="parameter">name</replaceable> DROP <replacea <para> You must own the extension to use <command>ALTER EXTENSION</command>. - The <literal>ADD</>/<literal>DROP</> forms require ownership of the + The <literal>ADD</literal>/<literal>DROP</literal> forms require ownership of the added/dropped object as well. </para> </refsect1> @@ -150,7 +150,7 @@ ALTER EXTENSION <replaceable class="parameter">name</replaceable> DROP <replacea <para> The desired new version of the extension. This can be written as either an identifier or a string literal. If not specified, - <command>ALTER EXTENSION UPDATE</> attempts to update to whatever is + <command>ALTER EXTENSION UPDATE</command> attempts to update to whatever is shown as the default version in the extension's control file. </para> </listitem> @@ -205,14 +205,14 @@ ALTER EXTENSION <replaceable class="parameter">name</replaceable> DROP <replacea <listitem> <para> The mode of a function or aggregate - argument: <literal>IN</>, <literal>OUT</>, - <literal>INOUT</>, or <literal>VARIADIC</>. - If omitted, the default is <literal>IN</>. + argument: <literal>IN</literal>, <literal>OUT</literal>, + <literal>INOUT</literal>, or <literal>VARIADIC</literal>. + If omitted, the default is <literal>IN</literal>. Note that <command>ALTER EXTENSION</command> does not actually pay - any attention to <literal>OUT</> arguments, since only the input + any attention to <literal>OUT</literal> arguments, since only the input arguments are needed to determine the function's identity. - So it is sufficient to list the <literal>IN</>, <literal>INOUT</>, - and <literal>VARIADIC</> arguments. + So it is sufficient to list the <literal>IN</literal>, <literal>INOUT</literal>, + and <literal>VARIADIC</literal> arguments. </para> </listitem> </varlistentry> @@ -246,7 +246,7 @@ ALTER EXTENSION <replaceable class="parameter">name</replaceable> DROP <replacea <listitem> <para> The data type(s) of the operator's arguments (optionally - schema-qualified). Write <literal>NONE</> for the missing argument + schema-qualified). Write <literal>NONE</literal> for the missing argument of a prefix or postfix operator. </para> </listitem> @@ -314,7 +314,7 @@ ALTER EXTENSION hstore ADD FUNCTION populate_record(anyelement, hstore); <title>Compatibility</title> <para> - <command>ALTER EXTENSION</command> is a <productname>PostgreSQL</> + <command>ALTER EXTENSION</command> is a <productname>PostgreSQL</productname> extension. </para> </refsect1> diff --git a/doc/src/sgml/ref/alter_foreign_data_wrapper.sgml b/doc/src/sgml/ref/alter_foreign_data_wrapper.sgml index 9c5b84fe64d..1c0a26de6ba 100644 --- a/doc/src/sgml/ref/alter_foreign_data_wrapper.sgml +++ b/doc/src/sgml/ref/alter_foreign_data_wrapper.sgml @@ -93,11 +93,11 @@ ALTER FOREIGN DATA WRAPPER <replaceable class="parameter">name</replaceable> REN <para> Note that it is possible that pre-existing options of the foreign-data wrapper, or of dependent servers, user mappings, or foreign tables, are - invalid according to the new validator. <productname>PostgreSQL</> does + invalid according to the new validator. <productname>PostgreSQL</productname> does not check for this. It is up to the user to make sure that these options are correct before using the modified foreign-data wrapper. However, any options specified in this <command>ALTER FOREIGN DATA - WRAPPER</> command will be checked using the new validator. + WRAPPER</command> command will be checked using the new validator. </para> </listitem> </varlistentry> @@ -117,8 +117,8 @@ ALTER FOREIGN DATA WRAPPER <replaceable class="parameter">name</replaceable> REN <listitem> <para> Change options for the foreign-data - wrapper. <literal>ADD</>, <literal>SET</>, and <literal>DROP</> - specify the action to be performed. <literal>ADD</> is assumed + wrapper. <literal>ADD</literal>, <literal>SET</literal>, and <literal>DROP</literal> + specify the action to be performed. <literal>ADD</literal> is assumed if no operation is explicitly specified. Option names must be unique; names and values are also validated using the foreign data wrapper's validator function, if any. @@ -150,16 +150,16 @@ ALTER FOREIGN DATA WRAPPER <replaceable class="parameter">name</replaceable> REN <title>Examples</title> <para> - Change a foreign-data wrapper <literal>dbi</>, add - option <literal>foo</>, drop <literal>bar</>: + Change a foreign-data wrapper <literal>dbi</literal>, add + option <literal>foo</literal>, drop <literal>bar</literal>: <programlisting> ALTER FOREIGN DATA WRAPPER dbi OPTIONS (ADD foo '1', DROP 'bar'); </programlisting> </para> <para> - Change the foreign-data wrapper <literal>dbi</> validator - to <literal>bob.myvalidator</>: + Change the foreign-data wrapper <literal>dbi</literal> validator + to <literal>bob.myvalidator</literal>: <programlisting> ALTER FOREIGN DATA WRAPPER dbi VALIDATOR bob.myvalidator; </programlisting></para> @@ -171,7 +171,7 @@ ALTER FOREIGN DATA WRAPPER dbi VALIDATOR bob.myvalidator; <para> <command>ALTER FOREIGN DATA WRAPPER</command> conforms to ISO/IEC 9075-9 (SQL/MED), except that the <literal>HANDLER</literal>, - <literal>VALIDATOR</>, <literal>OWNER TO</>, and <literal>RENAME</literal> + <literal>VALIDATOR</literal>, <literal>OWNER TO</literal>, and <literal>RENAME</literal> clauses are extensions. </para> </refsect1> diff --git a/doc/src/sgml/ref/alter_foreign_table.sgml b/doc/src/sgml/ref/alter_foreign_table.sgml index cb4e7044fbd..44d981a5bda 100644 --- a/doc/src/sgml/ref/alter_foreign_table.sgml +++ b/doc/src/sgml/ref/alter_foreign_table.sgml @@ -85,7 +85,7 @@ ALTER FOREIGN TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceab <listitem> <para> This form drops a column from a foreign table. - You will need to say <literal>CASCADE</> if + You will need to say <literal>CASCADE</literal> if anything outside the table depends on the column; for example, views. If <literal>IF EXISTS</literal> is specified and the column @@ -101,7 +101,7 @@ ALTER FOREIGN TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceab <para> This form changes the type of a column of a foreign table. Again, this has no effect on any underlying storage: this action simply - changes the type that <productname>PostgreSQL</> believes the column to + changes the type that <productname>PostgreSQL</productname> believes the column to have. </para> </listitem> @@ -113,7 +113,7 @@ ALTER FOREIGN TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceab <para> These forms set or remove the default value for a column. Default values only apply in subsequent <command>INSERT</command> - or <command>UPDATE</> commands; they do not cause rows already in the + or <command>UPDATE</command> commands; they do not cause rows already in the table to change. </para> </listitem> @@ -174,7 +174,7 @@ ALTER FOREIGN TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceab <para> This form adds a new constraint to a foreign table, using the same syntax as <xref linkend="SQL-CREATEFOREIGNTABLE">. - Currently only <literal>CHECK</> constraints are supported. + Currently only <literal>CHECK</literal> constraints are supported. </para> <para> @@ -183,7 +183,7 @@ ALTER FOREIGN TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceab declares that some new condition should be assumed to hold for all rows in the foreign table. (See the discussion in <xref linkend="SQL-CREATEFOREIGNTABLE">.) - If the constraint is marked <literal>NOT VALID</>, then it isn't + If the constraint is marked <literal>NOT VALID</literal>, then it isn't assumed to hold, but is only recorded for possible future use. </para> </listitem> @@ -235,9 +235,9 @@ ALTER FOREIGN TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceab </para> <para> - Note that this is not equivalent to <literal>ADD COLUMN oid oid</>; + Note that this is not equivalent to <literal>ADD COLUMN oid oid</literal>; that would add a normal column that happened to be named - <literal>oid</>, not a system column. + <literal>oid</literal>, not a system column. </para> </listitem> </varlistentry> @@ -292,8 +292,8 @@ ALTER FOREIGN TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceab <listitem> <para> Change options for the foreign table or one of its columns. - <literal>ADD</>, <literal>SET</>, and <literal>DROP</> - specify the action to be performed. <literal>ADD</> is assumed + <literal>ADD</literal>, <literal>SET</literal>, and <literal>DROP</literal> + specify the action to be performed. <literal>ADD</literal> is assumed if no operation is explicitly specified. Duplicate option names are not allowed (although it's OK for a table option and a column option to have the same name). Option names and values are also validated using the @@ -325,7 +325,7 @@ ALTER FOREIGN TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceab </para> <para> - All the actions except <literal>RENAME</literal> and <literal>SET SCHEMA</> + All the actions except <literal>RENAME</literal> and <literal>SET SCHEMA</literal> can be combined into a list of multiple alterations to apply in parallel. For example, it is possible to add several columns and/or alter the type of several @@ -333,13 +333,13 @@ ALTER FOREIGN TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceab </para> <para> - If the command is written as <literal>ALTER FOREIGN TABLE IF EXISTS ...</> + If the command is written as <literal>ALTER FOREIGN TABLE IF EXISTS ...</literal> and the foreign table does not exist, no error is thrown. A notice is issued in this case. </para> <para> - You must own the table to use <command>ALTER FOREIGN TABLE</>. + You must own the table to use <command>ALTER FOREIGN TABLE</command>. To change the schema of a foreign table, you must also have <literal>CREATE</literal> privilege on the new schema. To alter the owner, you must also be a direct or indirect member of the new @@ -362,10 +362,10 @@ ALTER FOREIGN TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceab <listitem> <para> The name (possibly schema-qualified) of an existing foreign table to - alter. If <literal>ONLY</> is specified before the table name, only - that table is altered. If <literal>ONLY</> is not specified, the table + alter. If <literal>ONLY</literal> is specified before the table name, only + that table is altered. If <literal>ONLY</literal> is not specified, the table and all its descendant tables (if any) are altered. Optionally, - <literal>*</> can be specified after the table name to explicitly + <literal>*</literal> can be specified after the table name to explicitly indicate that descendant tables are included. </para> </listitem> @@ -518,9 +518,9 @@ ALTER FOREIGN TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceab <para> Consistency with the foreign server is not checked when a column is added or removed with <literal>ADD COLUMN</literal> or - <literal>DROP COLUMN</literal>, a <literal>NOT NULL</> - or <literal>CHECK</> constraint is added, or a column type is changed - with <literal>SET DATA TYPE</>. It is the user's responsibility to ensure + <literal>DROP COLUMN</literal>, a <literal>NOT NULL</literal> + or <literal>CHECK</literal> constraint is added, or a column type is changed + with <literal>SET DATA TYPE</literal>. It is the user's responsibility to ensure that the table definition matches the remote side. </para> @@ -552,16 +552,16 @@ ALTER FOREIGN TABLE myschema.distributors OPTIONS (ADD opt1 'value', SET opt2 'v <title>Compatibility</title> <para> - The forms <literal>ADD</literal>, <literal>DROP</>, + The forms <literal>ADD</literal>, <literal>DROP</literal>, and <literal>SET DATA TYPE</literal> conform with the SQL standard. The other forms are <productname>PostgreSQL</productname> extensions of the SQL standard. Also, the ability to specify more than one manipulation in a single - <command>ALTER FOREIGN TABLE</> command is an extension. + <command>ALTER FOREIGN TABLE</command> command is an extension. </para> <para> - <command>ALTER FOREIGN TABLE DROP COLUMN</> can be used to drop the only + <command>ALTER FOREIGN TABLE DROP COLUMN</command> can be used to drop the only column of a foreign table, leaving a zero-column table. This is an extension of SQL, which disallows zero-column foreign tables. </para> diff --git a/doc/src/sgml/ref/alter_function.sgml b/doc/src/sgml/ref/alter_function.sgml index 8d9fec6005a..cdecf631b1e 100644 --- a/doc/src/sgml/ref/alter_function.sgml +++ b/doc/src/sgml/ref/alter_function.sgml @@ -56,8 +56,8 @@ ALTER FUNCTION <replaceable>name</replaceable> [ ( [ [ <replaceable class="param </para> <para> - You must own the function to use <command>ALTER FUNCTION</>. - To change a function's schema, you must also have <literal>CREATE</> + You must own the function to use <command>ALTER FUNCTION</command>. + To change a function's schema, you must also have <literal>CREATE</literal> privilege on the new schema. To alter the owner, you must also be a direct or indirect member of the new owning role, and that role must have <literal>CREATE</literal> privilege on @@ -86,14 +86,14 @@ ALTER FUNCTION <replaceable>name</replaceable> [ ( [ [ <replaceable class="param <listitem> <para> - The mode of an argument: <literal>IN</>, <literal>OUT</>, - <literal>INOUT</>, or <literal>VARIADIC</>. - If omitted, the default is <literal>IN</>. + The mode of an argument: <literal>IN</literal>, <literal>OUT</literal>, + <literal>INOUT</literal>, or <literal>VARIADIC</literal>. + If omitted, the default is <literal>IN</literal>. Note that <command>ALTER FUNCTION</command> does not actually pay - any attention to <literal>OUT</> arguments, since only the input + any attention to <literal>OUT</literal> arguments, since only the input arguments are needed to determine the function's identity. - So it is sufficient to list the <literal>IN</>, <literal>INOUT</>, - and <literal>VARIADIC</> arguments. + So it is sufficient to list the <literal>IN</literal>, <literal>INOUT</literal>, + and <literal>VARIADIC</literal> arguments. </para> </listitem> </varlistentry> @@ -260,8 +260,8 @@ ALTER FUNCTION <replaceable>name</replaceable> [ ( [ [ <replaceable class="param setting is removed, so that the function executes with the value present in its environment. Use <literal>RESET ALL</literal> to clear all function-local settings. - <literal>SET FROM CURRENT</> saves the value of the parameter that - is current when <command>ALTER FUNCTION</> is executed as the value + <literal>SET FROM CURRENT</literal> saves the value of the parameter that + is current when <command>ALTER FUNCTION</command> is executed as the value to be applied when the function is entered. </para> @@ -329,7 +329,7 @@ ALTER FUNCTION check_password(text) SET search_path = admin, pg_temp; </para> <para> - To disable automatic setting of <varname>search_path</> for a function: + To disable automatic setting of <varname>search_path</varname> for a function: <programlisting> ALTER FUNCTION check_password(text) RESET search_path; </programlisting> @@ -343,13 +343,13 @@ ALTER FUNCTION check_password(text) RESET search_path; <para> This statement is partially compatible with the <command>ALTER - FUNCTION</> statement in the SQL standard. The standard allows more + FUNCTION</command> statement in the SQL standard. The standard allows more properties of a function to be modified, but does not provide the ability to rename a function, make a function a security definer, attach configuration parameter values to a function, or change the owner, schema, or volatility of a function. The standard also - requires the <literal>RESTRICT</> key word, which is optional in - <productname>PostgreSQL</>. + requires the <literal>RESTRICT</literal> key word, which is optional in + <productname>PostgreSQL</productname>. </para> </refsect1> diff --git a/doc/src/sgml/ref/alter_group.sgml b/doc/src/sgml/ref/alter_group.sgml index f7136c773a7..a9001458731 100644 --- a/doc/src/sgml/ref/alter_group.sgml +++ b/doc/src/sgml/ref/alter_group.sgml @@ -46,10 +46,10 @@ ALTER GROUP <replaceable class="parameter">group_name</replaceable> RENAME TO <r <para> The first two variants add users to a group or remove them from a group. - (Any role can play the part of either a <quote>user</> or a - <quote>group</> for this purpose.) These variants are effectively + (Any role can play the part of either a <quote>user</quote> or a + <quote>group</quote> for this purpose.) These variants are effectively equivalent to granting or revoking membership in the role named as the - <quote>group</>; so the preferred way to do this is to use + <quote>group</quote>; so the preferred way to do this is to use <xref linkend="SQL-GRANT"> or <xref linkend="SQL-REVOKE">. </para> @@ -79,7 +79,7 @@ ALTER GROUP <replaceable class="parameter">group_name</replaceable> RENAME TO <r <listitem> <para> Users (roles) that are to be added to or removed from the group. - The users must already exist; <command>ALTER GROUP</> does not + The users must already exist; <command>ALTER GROUP</command> does not create or drop users. </para> </listitem> diff --git a/doc/src/sgml/ref/alter_index.sgml b/doc/src/sgml/ref/alter_index.sgml index 4c777f86752..30e399e62c8 100644 --- a/doc/src/sgml/ref/alter_index.sgml +++ b/doc/src/sgml/ref/alter_index.sgml @@ -106,7 +106,7 @@ ALTER INDEX ALL IN TABLESPACE <replaceable class="parameter">name</replaceable> <listitem> <para> This form resets one or more index-method-specific storage parameters to - their defaults. As with <literal>SET</>, a <literal>REINDEX</literal> + their defaults. As with <literal>SET</literal>, a <literal>REINDEX</literal> might be needed to update the index entirely. </para> </listitem> @@ -226,12 +226,12 @@ ALTER INDEX ALL IN TABLESPACE <replaceable class="parameter">name</replaceable> <para> These operations are also possible using <xref linkend="SQL-ALTERTABLE">. - <command>ALTER INDEX</> is in fact just an alias for the forms - of <command>ALTER TABLE</> that apply to indexes. + <command>ALTER INDEX</command> is in fact just an alias for the forms + of <command>ALTER TABLE</command> that apply to indexes. </para> <para> - There was formerly an <command>ALTER INDEX OWNER</> variant, but + There was formerly an <command>ALTER INDEX OWNER</command> variant, but this is now ignored (with a warning). An index cannot have an owner different from its table's owner. Changing the table's owner automatically changes the index as well. @@ -280,7 +280,7 @@ ALTER INDEX coord_idx ALTER COLUMN 3 SET STATISTICS 1000; <title>Compatibility</title> <para> - <command>ALTER INDEX</> is a <productname>PostgreSQL</productname> + <command>ALTER INDEX</command> is a <productname>PostgreSQL</productname> extension. </para> </refsect1> diff --git a/doc/src/sgml/ref/alter_materialized_view.sgml b/doc/src/sgml/ref/alter_materialized_view.sgml index a1cced1581c..eaea819744a 100644 --- a/doc/src/sgml/ref/alter_materialized_view.sgml +++ b/doc/src/sgml/ref/alter_materialized_view.sgml @@ -58,8 +58,8 @@ ALTER MATERIALIZED VIEW ALL IN TABLESPACE <replaceable class="parameter">name</r <para> You must own the materialized view to use <command>ALTER MATERIALIZED - VIEW</>. To change a materialized view's schema, you must also have - <literal>CREATE</> privilege on the new schema. + VIEW</command>. To change a materialized view's schema, you must also have + <literal>CREATE</literal> privilege on the new schema. To alter the owner, you must also be a direct or indirect member of the new owning role, and that role must have <literal>CREATE</literal> privilege on the materialized view's schema. (These restrictions enforce that altering diff --git a/doc/src/sgml/ref/alter_opclass.sgml b/doc/src/sgml/ref/alter_opclass.sgml index 58de603aa46..834f3e4231d 100644 --- a/doc/src/sgml/ref/alter_opclass.sgml +++ b/doc/src/sgml/ref/alter_opclass.sgml @@ -41,7 +41,7 @@ ALTER OPERATOR CLASS <replaceable>name</replaceable> USING <replaceable class="p </para> <para> - You must own the operator class to use <command>ALTER OPERATOR CLASS</>. + You must own the operator class to use <command>ALTER OPERATOR CLASS</command>. To alter the owner, you must also be a direct or indirect member of the new owning role, and that role must have <literal>CREATE</literal> privilege on the operator class's schema. (These restrictions enforce that altering the diff --git a/doc/src/sgml/ref/alter_operator.sgml b/doc/src/sgml/ref/alter_operator.sgml index 9579d00b786..3cc28d5b18a 100644 --- a/doc/src/sgml/ref/alter_operator.sgml +++ b/doc/src/sgml/ref/alter_operator.sgml @@ -43,7 +43,7 @@ ALTER OPERATOR <replaceable>name</replaceable> ( { <replaceable>left_type</repla </para> <para> - You must own the operator to use <command>ALTER OPERATOR</>. + You must own the operator to use <command>ALTER OPERATOR</command>. To alter the owner, you must also be a direct or indirect member of the new owning role, and that role must have <literal>CREATE</literal> privilege on the operator's schema. (These restrictions enforce that altering the owner diff --git a/doc/src/sgml/ref/alter_opfamily.sgml b/doc/src/sgml/ref/alter_opfamily.sgml index 0bafe5b8f80..d15fbfceea8 100644 --- a/doc/src/sgml/ref/alter_opfamily.sgml +++ b/doc/src/sgml/ref/alter_opfamily.sgml @@ -57,7 +57,7 @@ ALTER OPERATOR FAMILY <replaceable>name</replaceable> USING <replaceable class=" <para> When operators and support functions are added to a family with <command>ALTER OPERATOR FAMILY</command>, they are not part of any - specific operator class within the family, but are just <quote>loose</> + specific operator class within the family, but are just <quote>loose</quote> within the family. This indicates that these operators and functions are compatible with the family's semantics, but are not required for correct functioning of any specific index. (Operators and functions @@ -74,7 +74,7 @@ ALTER OPERATOR FAMILY <replaceable>name</replaceable> USING <replaceable class=" </para> <para> - You must be a superuser to use <command>ALTER OPERATOR FAMILY</>. + You must be a superuser to use <command>ALTER OPERATOR FAMILY</command>. (This restriction is made because an erroneous operator family definition could confuse or even crash the server.) </para> @@ -139,15 +139,15 @@ ALTER OPERATOR FAMILY <replaceable>name</replaceable> USING <replaceable class=" <term><replaceable class="parameter">op_type</replaceable></term> <listitem> <para> - In an <literal>OPERATOR</> clause, - the operand data type(s) of the operator, or <literal>NONE</> to + In an <literal>OPERATOR</literal> clause, + the operand data type(s) of the operator, or <literal>NONE</literal> to signify a left-unary or right-unary operator. Unlike the comparable - syntax in <command>CREATE OPERATOR CLASS</>, the operand data types + syntax in <command>CREATE OPERATOR CLASS</command>, the operand data types must always be specified. </para> <para> - In an <literal>ADD FUNCTION</> clause, the operand data type(s) the + In an <literal>ADD FUNCTION</literal> clause, the operand data type(s) the function is intended to support, if different from the input data type(s) of the function. For B-tree comparison functions and hash functions it is not necessary to specify <replaceable @@ -159,7 +159,7 @@ ALTER OPERATOR FAMILY <replaceable>name</replaceable> USING <replaceable class=" </para> <para> - In a <literal>DROP FUNCTION</> clause, the operand data type(s) the + In a <literal>DROP FUNCTION</literal> clause, the operand data type(s) the function is intended to support must be specified. </para> </listitem> @@ -175,8 +175,8 @@ ALTER OPERATOR FAMILY <replaceable>name</replaceable> USING <replaceable class=" </para> <para> - If neither <literal>FOR SEARCH</> nor <literal>FOR ORDER BY</> is - specified, <literal>FOR SEARCH</> is the default. + If neither <literal>FOR SEARCH</literal> nor <literal>FOR ORDER BY</literal> is + specified, <literal>FOR SEARCH</literal> is the default. </para> </listitem> </varlistentry> @@ -240,7 +240,7 @@ ALTER OPERATOR FAMILY <replaceable>name</replaceable> USING <replaceable class=" </variablelist> <para> - The <literal>OPERATOR</> and <literal>FUNCTION</> + The <literal>OPERATOR</literal> and <literal>FUNCTION</literal> clauses can appear in any order. </para> @@ -250,10 +250,10 @@ ALTER OPERATOR FAMILY <replaceable>name</replaceable> USING <replaceable class=" <title>Notes</title> <para> - Notice that the <literal>DROP</> syntax only specifies the <quote>slot</> + Notice that the <literal>DROP</literal> syntax only specifies the <quote>slot</quote> in the operator family, by strategy or support number and input data type(s). The name of the operator or function occupying the slot is not - mentioned. Also, for <literal>DROP FUNCTION</> the type(s) to specify + mentioned. Also, for <literal>DROP FUNCTION</literal> the type(s) to specify are the input data type(s) the function is intended to support; for GiST, SP-GiST and GIN indexes this might have nothing to do with the actual input argument types of the function. @@ -274,9 +274,9 @@ ALTER OPERATOR FAMILY <replaceable>name</replaceable> USING <replaceable class=" </para> <para> - Before <productname>PostgreSQL</productname> 8.4, the <literal>OPERATOR</> - clause could include a <literal>RECHECK</> option. This is no longer - supported because whether an index operator is <quote>lossy</> is now + Before <productname>PostgreSQL</productname> 8.4, the <literal>OPERATOR</literal> + clause could include a <literal>RECHECK</literal> option. This is no longer + supported because whether an index operator is <quote>lossy</quote> is now determined on-the-fly at run time. This allows efficient handling of cases where an operator might or might not be lossy. </para> @@ -288,7 +288,7 @@ ALTER OPERATOR FAMILY <replaceable>name</replaceable> USING <replaceable class=" <para> The following example command adds cross-data-type operators and support functions to an operator family that already contains B-tree - operator classes for data types <type>int4</> and <type>int2</>. + operator classes for data types <type>int4</type> and <type>int2</type>. </para> <programlisting> diff --git a/doc/src/sgml/ref/alter_publication.sgml b/doc/src/sgml/ref/alter_publication.sgml index 7392e6f3de2..801404e0cf9 100644 --- a/doc/src/sgml/ref/alter_publication.sgml +++ b/doc/src/sgml/ref/alter_publication.sgml @@ -87,10 +87,10 @@ ALTER PUBLICATION <replaceable class="parameter">name</replaceable> RENAME TO <r <term><replaceable class="parameter">table_name</replaceable></term> <listitem> <para> - Name of an existing table. If <literal>ONLY</> is specified before the - table name, only that table is affected. If <literal>ONLY</> is not + Name of an existing table. If <literal>ONLY</literal> is specified before the + table name, only that table is affected. If <literal>ONLY</literal> is not specified, the table and all its descendant tables (if any) are - affected. Optionally, <literal>*</> can be specified after the table + affected. Optionally, <literal>*</literal> can be specified after the table name to explicitly indicate that descendant tables are included. </para> </listitem> @@ -147,7 +147,7 @@ ALTER PUBLICATION mypublication ADD TABLE users, departments; <title>Compatibility</title> <para> - <command>ALTER PUBLICATION</command> is a <productname>PostgreSQL</> + <command>ALTER PUBLICATION</command> is a <productname>PostgreSQL</productname> extension. </para> </refsect1> diff --git a/doc/src/sgml/ref/alter_role.sgml b/doc/src/sgml/ref/alter_role.sgml index 607b25962f0..e30ca104549 100644 --- a/doc/src/sgml/ref/alter_role.sgml +++ b/doc/src/sgml/ref/alter_role.sgml @@ -69,7 +69,7 @@ ALTER ROLE { <replaceable class="parameter">role_specification</replaceable> | A <xref linkend="SQL-REVOKE"> for that.) Attributes not mentioned in the command retain their previous settings. Database superusers can change any of these settings for any role. - Roles having <literal>CREATEROLE</> privilege can change any of these + Roles having <literal>CREATEROLE</literal> privilege can change any of these settings, but only for non-superuser and non-replication roles. Ordinary roles can only change their own password. </para> @@ -77,13 +77,13 @@ ALTER ROLE { <replaceable class="parameter">role_specification</replaceable> | A <para> The second variant changes the name of the role. Database superusers can rename any role. - Roles having <literal>CREATEROLE</> privilege can rename non-superuser + Roles having <literal>CREATEROLE</literal> privilege can rename non-superuser roles. The current session user cannot be renamed. (Connect as a different user if you need to do that.) - Because <literal>MD5</>-encrypted passwords use the role name as + Because <literal>MD5</literal>-encrypted passwords use the role name as cryptographic salt, renaming a role clears its password if the - password is <literal>MD5</>-encrypted. + password is <literal>MD5</literal>-encrypted. </para> <para> @@ -100,7 +100,7 @@ ALTER ROLE { <replaceable class="parameter">role_specification</replaceable> | A Whenever the role subsequently starts a new session, the specified value becomes the session default, overriding whatever setting is present in - <filename>postgresql.conf</> or has been received from the <command>postgres</command> + <filename>postgresql.conf</filename> or has been received from the <command>postgres</command> command line. This only happens at login time; executing <xref linkend="sql-set-role"> or <xref linkend="sql-set-session-authorization"> does not cause new @@ -112,7 +112,7 @@ ALTER ROLE { <replaceable class="parameter">role_specification</replaceable> | A <para> Superusers can change anyone's session defaults. Roles having - <literal>CREATEROLE</> privilege can change defaults for non-superuser + <literal>CREATEROLE</literal> privilege can change defaults for non-superuser roles. Ordinary roles can only set defaults for themselves. Certain configuration variables cannot be set this way, or can only be set if a superuser issues the command. Only superusers can change a setting @@ -155,8 +155,8 @@ ALTER ROLE { <replaceable class="parameter">role_specification</replaceable> | A <varlistentry> <term><literal>SUPERUSER</literal></term> <term><literal>NOSUPERUSER</literal></term> - <term><literal>CREATEDB</></term> - <term><literal>NOCREATEDB</></term> + <term><literal>CREATEDB</literal></term> + <term><literal>NOCREATEDB</literal></term> <term><literal>CREATEROLE</literal></term> <term><literal>NOCREATEROLE</literal></term> <term><literal>INHERIT</literal></term> @@ -168,7 +168,7 @@ ALTER ROLE { <replaceable class="parameter">role_specification</replaceable> | A <term><literal>BYPASSRLS</literal></term> <term><literal>NOBYPASSRLS</literal></term> <term><literal>CONNECTION LIMIT</literal> <replaceable class="parameter">connlimit</replaceable></term> - <term>[ <literal>ENCRYPTED</> ] <literal>PASSWORD</> <replaceable class="parameter">password</replaceable></term> + <term>[ <literal>ENCRYPTED</literal> ] <literal>PASSWORD</literal> <replaceable class="parameter">password</replaceable></term> <term><literal>VALID UNTIL</literal> '<replaceable class="parameter">timestamp</replaceable>'</term> <listitem> <para> @@ -209,7 +209,7 @@ ALTER ROLE { <replaceable class="parameter">role_specification</replaceable> | A role-specific variable setting is removed, so the role will inherit the system-wide default setting in new sessions. Use <literal>RESET ALL</literal> to clear all role-specific settings. - <literal>SET FROM CURRENT</> saves the session's current value of + <literal>SET FROM CURRENT</literal> saves the session's current value of the parameter as the role-specific value. If <literal>IN DATABASE</literal> is specified, the configuration parameter is set or removed for the given role and database only. @@ -288,7 +288,7 @@ ALTER ROLE davide WITH PASSWORD NULL; <para> Change a password expiration date, specifying that the password should expire at midday on 4th May 2015 using - the time zone which is one hour ahead of <acronym>UTC</>: + the time zone which is one hour ahead of <acronym>UTC</acronym>: <programlisting> ALTER ROLE chris VALID UNTIL 'May 4 12:00:00 2015 +1'; </programlisting> diff --git a/doc/src/sgml/ref/alter_schema.sgml b/doc/src/sgml/ref/alter_schema.sgml index dbc5c2d45f5..2ca406b9148 100644 --- a/doc/src/sgml/ref/alter_schema.sgml +++ b/doc/src/sgml/ref/alter_schema.sgml @@ -34,7 +34,7 @@ ALTER SCHEMA <replaceable>name</replaceable> OWNER TO { <replaceable>new_owner</ </para> <para> - You must own the schema to use <command>ALTER SCHEMA</>. + You must own the schema to use <command>ALTER SCHEMA</command>. To rename a schema you must also have the <literal>CREATE</literal> privilege for the database. To alter the owner, you must also be a direct or diff --git a/doc/src/sgml/ref/alter_sequence.sgml b/doc/src/sgml/ref/alter_sequence.sgml index c505935fcc2..9b8ad365227 100644 --- a/doc/src/sgml/ref/alter_sequence.sgml +++ b/doc/src/sgml/ref/alter_sequence.sgml @@ -47,8 +47,8 @@ ALTER SEQUENCE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> S </para> <para> - You must own the sequence to use <command>ALTER SEQUENCE</>. - To change a sequence's schema, you must also have <literal>CREATE</> + You must own the sequence to use <command>ALTER SEQUENCE</command>. + To change a sequence's schema, you must also have <literal>CREATE</literal> privilege on the new schema. To alter the owner, you must also be a direct or indirect member of the new owning role, and that role must have <literal>CREATE</literal> privilege on @@ -159,8 +159,8 @@ ALTER SEQUENCE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> S The optional clause <literal>START WITH <replaceable class="parameter">start</replaceable></literal> changes the recorded start value of the sequence. This has no effect on the - <emphasis>current</> sequence value; it simply sets the value - that future <command>ALTER SEQUENCE RESTART</> commands will use. + <emphasis>current</emphasis> sequence value; it simply sets the value + that future <command>ALTER SEQUENCE RESTART</command> commands will use. </para> </listitem> </varlistentry> @@ -172,13 +172,13 @@ ALTER SEQUENCE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> S The optional clause <literal>RESTART [ WITH <replaceable class="parameter">restart</replaceable> ]</literal> changes the current value of the sequence. This is similar to calling the - <function>setval</> function with <literal>is_called</literal> = - <literal>false</>: the specified value will be returned by the - <emphasis>next</> call of <function>nextval</>. - Writing <literal>RESTART</> with no <replaceable - class="parameter">restart</> value is equivalent to supplying - the start value that was recorded by <command>CREATE SEQUENCE</> - or last set by <command>ALTER SEQUENCE START WITH</>. + <function>setval</function> function with <literal>is_called</literal> = + <literal>false</literal>: the specified value will be returned by the + <emphasis>next</emphasis> call of <function>nextval</function>. + Writing <literal>RESTART</literal> with no <replaceable + class="parameter">restart</replaceable> value is equivalent to supplying + the start value that was recorded by <command>CREATE SEQUENCE</command> + or last set by <command>ALTER SEQUENCE START WITH</command>. </para> <para> @@ -186,7 +186,7 @@ ALTER SEQUENCE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> S a <literal>RESTART</literal> operation on a sequence is transactional and blocks concurrent transactions from obtaining numbers from the same sequence. If that's not the desired mode of - operation, <function>setval</> should be used. + operation, <function>setval</function> should be used. </para> </listitem> </varlistentry> @@ -250,7 +250,7 @@ ALTER SEQUENCE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> S table must have the same owner and be in the same schema as the sequence. Specifying <literal>OWNED BY NONE</literal> removes any existing - association, making the sequence <quote>free-standing</>. + association, making the sequence <quote>free-standing</quote>. </para> </listitem> </varlistentry> @@ -291,7 +291,7 @@ ALTER SEQUENCE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> S <para> <command>ALTER SEQUENCE</command> will not immediately affect - <function>nextval</> results in backends, + <function>nextval</function> results in backends, other than the current one, that have preallocated (cached) sequence values. They will use up all cached values prior to noticing the changed sequence generation parameters. The current backend will be affected @@ -299,7 +299,7 @@ ALTER SEQUENCE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> S </para> <para> - <command>ALTER SEQUENCE</command> does not affect the <function>currval</> + <command>ALTER SEQUENCE</command> does not affect the <function>currval</function> status for the sequence. (Before <productname>PostgreSQL</productname> 8.3, it sometimes did.) </para> @@ -332,8 +332,8 @@ ALTER SEQUENCE serial RESTART WITH 105; <para> <command>ALTER SEQUENCE</command> conforms to the <acronym>SQL</acronym> - standard, except for the <literal>AS</literal>, <literal>START WITH</>, - <literal>OWNED BY</>, <literal>OWNER TO</>, <literal>RENAME TO</>, and + standard, except for the <literal>AS</literal>, <literal>START WITH</literal>, + <literal>OWNED BY</literal>, <literal>OWNER TO</literal>, <literal>RENAME TO</literal>, and <literal>SET SCHEMA</literal> clauses, which are <productname>PostgreSQL</productname> extensions. </para> diff --git a/doc/src/sgml/ref/alter_server.sgml b/doc/src/sgml/ref/alter_server.sgml index 7f5def30a40..05e11f5ef28 100644 --- a/doc/src/sgml/ref/alter_server.sgml +++ b/doc/src/sgml/ref/alter_server.sgml @@ -42,7 +42,7 @@ ALTER SERVER <replaceable class="parameter">name</replaceable> RENAME TO <replac To alter the server you must be the owner of the server. Additionally to alter the owner, you must own the server and also be a direct or indirect member of the new owning role, and you must - have <literal>USAGE</> privilege on the server's foreign-data + have <literal>USAGE</literal> privilege on the server's foreign-data wrapper. (Note that superusers satisfy all these criteria automatically.) </para> @@ -75,8 +75,8 @@ ALTER SERVER <replaceable class="parameter">name</replaceable> RENAME TO <replac <listitem> <para> Change options for the - server. <literal>ADD</>, <literal>SET</>, and <literal>DROP</> - specify the action to be performed. <literal>ADD</> is assumed + server. <literal>ADD</literal>, <literal>SET</literal>, and <literal>DROP</literal> + specify the action to be performed. <literal>ADD</literal> is assumed if no operation is explicitly specified. Option names must be unique; names and values are also validated using the server's foreign-data wrapper library. @@ -108,15 +108,15 @@ ALTER SERVER <replaceable class="parameter">name</replaceable> RENAME TO <replac <title>Examples</title> <para> - Alter server <literal>foo</>, add connection options: + Alter server <literal>foo</literal>, add connection options: <programlisting> ALTER SERVER foo OPTIONS (host 'foo', dbname 'foodb'); </programlisting> </para> <para> - Alter server <literal>foo</>, change version, - change <literal>host</> option: + Alter server <literal>foo</literal>, change version, + change <literal>host</literal> option: <programlisting> ALTER SERVER foo VERSION '8.4' OPTIONS (SET host 'baz'); </programlisting></para> diff --git a/doc/src/sgml/ref/alter_statistics.sgml b/doc/src/sgml/ref/alter_statistics.sgml index db4f2f0d523..87acb879b03 100644 --- a/doc/src/sgml/ref/alter_statistics.sgml +++ b/doc/src/sgml/ref/alter_statistics.sgml @@ -39,9 +39,9 @@ ALTER STATISTICS <replaceable class="parameter">name</replaceable> SET SCHEMA <r </para> <para> - You must own the statistics object to use <command>ALTER STATISTICS</>. + You must own the statistics object to use <command>ALTER STATISTICS</command>. To change a statistics object's schema, you must also - have <literal>CREATE</> privilege on the new schema. + have <literal>CREATE</literal> privilege on the new schema. To alter the owner, you must also be a direct or indirect member of the new owning role, and that role must have <literal>CREATE</literal> privilege on the statistics object's schema. (These restrictions enforce that altering diff --git a/doc/src/sgml/ref/alter_subscription.sgml b/doc/src/sgml/ref/alter_subscription.sgml index 44c0b350692..b76a21f6545 100644 --- a/doc/src/sgml/ref/alter_subscription.sgml +++ b/doc/src/sgml/ref/alter_subscription.sgml @@ -42,7 +42,7 @@ ALTER SUBSCRIPTION <replaceable class="parameter">name</replaceable> RENAME TO < </para> <para> - You must own the subscription to use <command>ALTER SUBSCRIPTION</>. + You must own the subscription to use <command>ALTER SUBSCRIPTION</command>. To alter the owner, you must also be a direct or indirect member of the new owning role. The new owner has to be a superuser. (Currently, all subscription owners must be superusers, so the owner checks @@ -211,7 +211,7 @@ ALTER SUBSCRIPTION mysub DISABLE; <title>Compatibility</title> <para> - <command>ALTER SUBSCRIPTION</command> is a <productname>PostgreSQL</> + <command>ALTER SUBSCRIPTION</command> is a <productname>PostgreSQL</productname> extension. </para> </refsect1> diff --git a/doc/src/sgml/ref/alter_system.sgml b/doc/src/sgml/ref/alter_system.sgml index e3a4af4041f..b8ef117b7d7 100644 --- a/doc/src/sgml/ref/alter_system.sgml +++ b/doc/src/sgml/ref/alter_system.sgml @@ -50,8 +50,8 @@ ALTER SYSTEM RESET ALL the next server configuration reload, or after the next server restart in the case of parameters that can only be changed at server start. A server configuration reload can be commanded by calling the SQL - function <function>pg_reload_conf()</>, running <literal>pg_ctl reload</>, - or sending a <systemitem>SIGHUP</> signal to the main server process. + function <function>pg_reload_conf()</function>, running <literal>pg_ctl reload</literal>, + or sending a <systemitem>SIGHUP</systemitem> signal to the main server process. </para> <para> @@ -95,8 +95,8 @@ ALTER SYSTEM RESET ALL <para> This command can't be used to set <xref linkend="guc-data-directory">, - nor parameters that are not allowed in <filename>postgresql.conf</> - (e.g., <link linkend="runtime-config-preset">preset options</>). + nor parameters that are not allowed in <filename>postgresql.conf</filename> + (e.g., <link linkend="runtime-config-preset">preset options</link>). </para> <para> @@ -108,7 +108,7 @@ ALTER SYSTEM RESET ALL <title>Examples</title> <para> - Set the <literal>wal_level</>: + Set the <literal>wal_level</literal>: <programlisting> ALTER SYSTEM SET wal_level = replica; </programlisting> @@ -116,7 +116,7 @@ ALTER SYSTEM SET wal_level = replica; <para> Undo that, restoring whatever setting was effective - in <filename>postgresql.conf</>: + in <filename>postgresql.conf</filename>: <programlisting> ALTER SYSTEM RESET wal_level; </programlisting></para> diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml index 0559f80549d..68393d70b41 100644 --- a/doc/src/sgml/ref/alter_table.sgml +++ b/doc/src/sgml/ref/alter_table.sgml @@ -126,7 +126,7 @@ ALTER TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> Multivariate statistics referencing the dropped column will also be removed if the removal of the column would cause the statistics to contain data for only a single column. - You will need to say <literal>CASCADE</> if anything outside the table + You will need to say <literal>CASCADE</literal> if anything outside the table depends on the column, for example, foreign key references or views. If <literal>IF EXISTS</literal> is specified and the column does not exist, no error is thrown. In this case a notice @@ -162,7 +162,7 @@ ALTER TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> <para> These forms set or remove the default value for a column. Default values only apply in subsequent <command>INSERT</command> - or <command>UPDATE</> commands; they do not cause rows already in the + or <command>UPDATE</command> commands; they do not cause rows already in the table to change. </para> </listitem> @@ -174,7 +174,7 @@ ALTER TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> <para> These forms change whether a column is marked to allow null values or to reject null values. You can only use <literal>SET - NOT NULL</> when the column contains no null values. + NOT NULL</literal> when the column contains no null values. </para> <para> @@ -182,7 +182,7 @@ ALTER TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> on a column if it is marked <literal>NOT NULL</literal> in the parent table. To drop the <literal>NOT NULL</literal> constraint from all the partitions, perform <literal>DROP NOT NULL</literal> on the parent - table. Even if there is no <literal>NOT NULL</> constraint on the + table. Even if there is no <literal>NOT NULL</literal> constraint on the parent, such a constraint can still be added to individual partitions, if desired; that is, the children can disallow nulls even if the parent allows them, but not the other way around. @@ -249,17 +249,17 @@ ALTER TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> <listitem> <para> This form sets or resets per-attribute options. Currently, the only - defined per-attribute options are <literal>n_distinct</> and - <literal>n_distinct_inherited</>, which override the + defined per-attribute options are <literal>n_distinct</literal> and + <literal>n_distinct_inherited</literal>, which override the number-of-distinct-values estimates made by subsequent <xref linkend="sql-analyze"> - operations. <literal>n_distinct</> affects the statistics for the table - itself, while <literal>n_distinct_inherited</> affects the statistics + operations. <literal>n_distinct</literal> affects the statistics for the table + itself, while <literal>n_distinct_inherited</literal> affects the statistics gathered for the table plus its inheritance children. When set to a - positive value, <command>ANALYZE</> will assume that the column contains + positive value, <command>ANALYZE</command> will assume that the column contains exactly the specified number of distinct nonnull values. When set to a negative value, which must be greater - than or equal to -1, <command>ANALYZE</> will assume that the number of + than or equal to -1, <command>ANALYZE</command> will assume that the number of distinct nonnull values in the column is linear in the size of the table; the exact count is to be computed by multiplying the estimated table size by the absolute value of the given number. For example, @@ -290,7 +290,7 @@ ALTER TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> <listitem> <para> This form sets the storage mode for a column. This controls whether this - column is held inline or in a secondary <acronym>TOAST</> table, and + column is held inline or in a secondary <acronym>TOAST</acronym> table, and whether the data should be compressed or not. <literal>PLAIN</literal> must be used for fixed-length values such as <type>integer</type> and is @@ -302,7 +302,7 @@ ALTER TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> Use of <literal>EXTERNAL</literal> will make substring operations on very large <type>text</type> and <type>bytea</type> values run faster, at the penalty of increased storage space. Note that - <literal>SET STORAGE</> doesn't itself change anything in the table, + <literal>SET STORAGE</literal> doesn't itself change anything in the table, it just sets the strategy to be pursued during future table updates. See <xref linkend="storage-toast"> for more information. </para> @@ -335,7 +335,7 @@ ALTER TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> <term><literal>ADD <replaceable class="parameter">table_constraint_using_index</replaceable></literal></term> <listitem> <para> - This form adds a new <literal>PRIMARY KEY</> or <literal>UNIQUE</> + This form adds a new <literal>PRIMARY KEY</literal> or <literal>UNIQUE</literal> constraint to a table based on an existing unique index. All the columns of the index will be included in the constraint. </para> @@ -344,14 +344,14 @@ ALTER TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> The index cannot have expression columns nor be a partial index. Also, it must be a b-tree index with default sort ordering. These restrictions ensure that the index is equivalent to one that would be - built by a regular <literal>ADD PRIMARY KEY</> or <literal>ADD UNIQUE</> + built by a regular <literal>ADD PRIMARY KEY</literal> or <literal>ADD UNIQUE</literal> command. </para> <para> - If <literal>PRIMARY KEY</> is specified, and the index's columns are not - already marked <literal>NOT NULL</>, then this command will attempt to - do <literal>ALTER COLUMN SET NOT NULL</> against each such column. + If <literal>PRIMARY KEY</literal> is specified, and the index's columns are not + already marked <literal>NOT NULL</literal>, then this command will attempt to + do <literal>ALTER COLUMN SET NOT NULL</literal> against each such column. That requires a full table scan to verify the column(s) contain no nulls. In all other cases, this is a fast operation. </para> @@ -363,9 +363,9 @@ ALTER TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> </para> <para> - After this command is executed, the index is <quote>owned</> by the + After this command is executed, the index is <quote>owned</quote> by the constraint, in the same way as if the index had been built by - a regular <literal>ADD PRIMARY KEY</> or <literal>ADD UNIQUE</> + a regular <literal>ADD PRIMARY KEY</literal> or <literal>ADD UNIQUE</literal> command. In particular, dropping the constraint will make the index disappear too. </para> @@ -375,7 +375,7 @@ ALTER TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> Adding a constraint using an existing index can be helpful in situations where a new constraint needs to be added without blocking table updates for a long time. To do that, create the index using - <command>CREATE INDEX CONCURRENTLY</>, and then install it as an + <command>CREATE INDEX CONCURRENTLY</command>, and then install it as an official constraint using this syntax. See the example below. </para> </note> @@ -447,9 +447,9 @@ ALTER TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> triggers are not executed. The trigger firing mechanism is also affected by the configuration variable <xref linkend="guc-session-replication-role">. Simply enabled - triggers will fire when the replication role is <quote>origin</> - (the default) or <quote>local</>. Triggers configured as <literal>ENABLE - REPLICA</literal> will only fire if the session is in <quote>replica</> + triggers will fire when the replication role is <quote>origin</quote> + (the default) or <quote>local</quote>. Triggers configured as <literal>ENABLE + REPLICA</literal> will only fire if the session is in <quote>replica</quote> mode, and triggers configured as <literal>ENABLE ALWAYS</literal> will fire regardless of the current replication mode. </para> @@ -542,9 +542,9 @@ ALTER TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> </para> <para> - Note that this is not equivalent to <literal>ADD COLUMN oid oid</>; + Note that this is not equivalent to <literal>ADD COLUMN oid oid</literal>; that would add a normal column that happened to be named - <literal>oid</>, not a system column. + <literal>oid</literal>, not a system column. </para> </listitem> </varlistentry> @@ -609,8 +609,8 @@ ALTER TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> will not be modified immediately by this command; depending on the parameter you might need to rewrite the table to get the desired effects. That can be done with <link linkend="SQL-VACUUM">VACUUM - FULL</>, <xref linkend="SQL-CLUSTER"> or one of the forms - of <command>ALTER TABLE</> that forces a table rewrite. + FULL</link>, <xref linkend="SQL-CLUSTER"> or one of the forms + of <command>ALTER TABLE</command> that forces a table rewrite. For planner related parameters, changes will take effect from the next time the table is locked so currently executing queries will not be affected. @@ -620,18 +620,18 @@ ALTER TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> <literal>SHARE UPDATE EXCLUSIVE</literal> lock will be taken for fillfactor and autovacuum storage parameters, as well as the following planner related parameters: - <varname>effective_io_concurrency</>, <varname>parallel_workers</>, <varname>seq_page_cost</>, - <varname>random_page_cost</>, <varname>n_distinct</> and <varname>n_distinct_inherited</>. + <varname>effective_io_concurrency</varname>, <varname>parallel_workers</varname>, <varname>seq_page_cost</varname>, + <varname>random_page_cost</varname>, <varname>n_distinct</varname> and <varname>n_distinct_inherited</varname>. </para> <note> <para> - While <command>CREATE TABLE</> allows <literal>OIDS</> to be specified + While <command>CREATE TABLE</command> allows <literal>OIDS</literal> to be specified in the <literal>WITH (<replaceable - class="parameter">storage_parameter</>)</literal> syntax, - <command>ALTER TABLE</> does not treat <literal>OIDS</> as a - storage parameter. Instead use the <literal>SET WITH OIDS</> - and <literal>SET WITHOUT OIDS</> forms to change OID status. + class="parameter">storage_parameter</replaceable>)</literal> syntax, + <command>ALTER TABLE</command> does not treat <literal>OIDS</literal> as a + storage parameter. Instead use the <literal>SET WITH OIDS</literal> + and <literal>SET WITHOUT OIDS</literal> forms to change OID status. </para> </note> </listitem> @@ -642,7 +642,7 @@ ALTER TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> <listitem> <para> This form resets one or more storage parameters to their - defaults. As with <literal>SET</>, a table rewrite might be + defaults. As with <literal>SET</literal>, a table rewrite might be needed to update the table entirely. </para> </listitem> @@ -693,11 +693,11 @@ ALTER TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> <listitem> <para> This form links the table to a composite type as though <command>CREATE - TABLE OF</> had formed it. The table's list of column names and types + TABLE OF</command> had formed it. The table's list of column names and types must precisely match that of the composite type; the presence of - an <literal>oid</> system column is permitted to differ. The table must + an <literal>oid</literal> system column is permitted to differ. The table must not inherit from any other table. These restrictions ensure - that <command>CREATE TABLE OF</> would permit an equivalent table + that <command>CREATE TABLE OF</command> would permit an equivalent table definition. </para> </listitem> @@ -728,13 +728,13 @@ ALTER TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> <para> This form changes the information which is written to the write-ahead log to identify rows which are updated or deleted. This option has no effect - except when logical replication is in use. <literal>DEFAULT</> + except when logical replication is in use. <literal>DEFAULT</literal> (the default for non-system tables) records the - old values of the columns of the primary key, if any. <literal>USING INDEX</> + old values of the columns of the primary key, if any. <literal>USING INDEX</literal> records the old values of the columns covered by the named index, which must be unique, not partial, not deferrable, and include only columns marked - <literal>NOT NULL</>. <literal>FULL</> records the old values of all columns - in the row. <literal>NOTHING</> records no information about the old row. + <literal>NOT NULL</literal>. <literal>FULL</literal> records the old values of all columns + in the row. <literal>NOTHING</literal> records no information about the old row. (This is the default for system tables.) In all cases, no old values are logged unless at least one of the columns that would be logged differs between the old and new versions of the row. @@ -853,7 +853,7 @@ ALTER TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> </para> <para> - You must own the table to use <command>ALTER TABLE</>. + You must own the table to use <command>ALTER TABLE</command>. To change the schema or tablespace of a table, you must also have <literal>CREATE</literal> privilege on the new schema or tablespace. To add the table as a new child of a parent table, you must own the parent @@ -890,10 +890,10 @@ ALTER TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> <listitem> <para> The name (optionally schema-qualified) of an existing table to - alter. If <literal>ONLY</> is specified before the table name, only - that table is altered. If <literal>ONLY</> is not specified, the table + alter. If <literal>ONLY</literal> is specified before the table name, only + that table is altered. If <literal>ONLY</literal> is not specified, the table and all its descendant tables (if any) are altered. Optionally, - <literal>*</> can be specified after the table name to explicitly + <literal>*</literal> can be specified after the table name to explicitly indicate that descendant tables are included. </para> </listitem> @@ -1106,28 +1106,28 @@ ALTER TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> <para> When a column is added with <literal>ADD COLUMN</literal>, all existing rows in the table are initialized with the column's default value - (NULL if no <literal>DEFAULT</> clause is specified). - If there is no <literal>DEFAULT</> clause, this is merely a metadata + (NULL if no <literal>DEFAULT</literal> clause is specified). + If there is no <literal>DEFAULT</literal> clause, this is merely a metadata change and does not require any immediate update of the table's data; the added NULL values are supplied on readout, instead. </para> <para> - Adding a column with a <literal>DEFAULT</> clause or changing the type of + Adding a column with a <literal>DEFAULT</literal> clause or changing the type of an existing column will require the entire table and its indexes to be rewritten. As an exception when changing the type of an existing column, - if the <literal>USING</> clause does not change the column + if the <literal>USING</literal> clause does not change the column contents and the old type is either binary coercible to the new type or an unconstrained domain over the new type, a table rewrite is not needed; but any indexes on the affected columns must still be rebuilt. Adding or - removing a system <literal>oid</> column also requires rewriting the entire + removing a system <literal>oid</literal> column also requires rewriting the entire table. Table and/or index rebuilds may take a significant amount of time for a large table; and will temporarily require as much as double the disk space. </para> <para> - Adding a <literal>CHECK</> or <literal>NOT NULL</> constraint requires + Adding a <literal>CHECK</literal> or <literal>NOT NULL</literal> constraint requires scanning the table to verify that existing rows meet the constraint, but does not require a table rewrite. </para> @@ -1139,7 +1139,7 @@ ALTER TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> <para> The main reason for providing the option to specify multiple changes - in a single <command>ALTER TABLE</> is that multiple table scans or + in a single <command>ALTER TABLE</command> is that multiple table scans or rewrites can thereby be combined into a single pass over the table. </para> @@ -1151,37 +1151,37 @@ ALTER TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> reduce the on-disk size of your table, as the space occupied by the dropped column is not reclaimed. The space will be reclaimed over time as existing rows are updated. (These statements do - not apply when dropping the system <literal>oid</> column; that is done + not apply when dropping the system <literal>oid</literal> column; that is done with an immediate rewrite.) </para> <para> To force immediate reclamation of space occupied by a dropped column, - you can execute one of the forms of <command>ALTER TABLE</> that + you can execute one of the forms of <command>ALTER TABLE</command> that performs a rewrite of the whole table. This results in reconstructing each row with the dropped column replaced by a null value. </para> <para> - The rewriting forms of <command>ALTER TABLE</> are not MVCC-safe. + The rewriting forms of <command>ALTER TABLE</command> are not MVCC-safe. After a table rewrite, the table will appear empty to concurrent transactions, if they are using a snapshot taken before the rewrite occurred. See <xref linkend="mvcc-caveats"> for more details. </para> <para> - The <literal>USING</literal> option of <literal>SET DATA TYPE</> can actually + The <literal>USING</literal> option of <literal>SET DATA TYPE</literal> can actually specify any expression involving the old values of the row; that is, it can refer to other columns as well as the one being converted. This allows - very general conversions to be done with the <literal>SET DATA TYPE</> + very general conversions to be done with the <literal>SET DATA TYPE</literal> syntax. Because of this flexibility, the <literal>USING</literal> expression is not applied to the column's default value (if any); the result might not be a constant expression as required for a default. This means that when there is no implicit or assignment cast from old to - new type, <literal>SET DATA TYPE</> might fail to convert the default even + new type, <literal>SET DATA TYPE</literal> might fail to convert the default even though a <literal>USING</literal> clause is supplied. In such cases, - drop the default with <literal>DROP DEFAULT</>, perform the <literal>ALTER - TYPE</>, and then use <literal>SET DEFAULT</> to add a suitable new + drop the default with <literal>DROP DEFAULT</literal>, perform the <literal>ALTER + TYPE</literal>, and then use <literal>SET DEFAULT</literal> to add a suitable new default. Similar considerations apply to indexes and constraints involving the column. </para> @@ -1216,11 +1216,11 @@ ALTER TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> The actions for identity columns (<literal>ADD GENERATED</literal>, <literal>SET</literal> etc., <literal>DROP IDENTITY</literal>), as well as the actions - <literal>TRIGGER</>, <literal>CLUSTER</>, <literal>OWNER</>, - and <literal>TABLESPACE</> never recurse to descendant tables; - that is, they always act as though <literal>ONLY</> were specified. - Adding a constraint recurses only for <literal>CHECK</> constraints - that are not marked <literal>NO INHERIT</>. + <literal>TRIGGER</literal>, <literal>CLUSTER</literal>, <literal>OWNER</literal>, + and <literal>TABLESPACE</literal> never recurse to descendant tables; + that is, they always act as though <literal>ONLY</literal> were specified. + Adding a constraint recurses only for <literal>CHECK</literal> constraints + that are not marked <literal>NO INHERIT</literal>. </para> <para> @@ -1434,17 +1434,17 @@ ALTER TABLE measurement <para> The forms <literal>ADD</literal> (without <literal>USING INDEX</literal>), - <literal>DROP [COLUMN]</>, <literal>DROP IDENTITY</literal>, <literal>RESTART</literal>, - <literal>SET DEFAULT</>, <literal>SET DATA TYPE</literal> (without <literal>USING</literal>), + <literal>DROP [COLUMN]</literal>, <literal>DROP IDENTITY</literal>, <literal>RESTART</literal>, + <literal>SET DEFAULT</literal>, <literal>SET DATA TYPE</literal> (without <literal>USING</literal>), <literal>SET GENERATED</literal>, and <literal>SET <replaceable>sequence_option</replaceable></literal> conform with the SQL standard. The other forms are <productname>PostgreSQL</productname> extensions of the SQL standard. Also, the ability to specify more than one manipulation in a single - <command>ALTER TABLE</> command is an extension. + <command>ALTER TABLE</command> command is an extension. </para> <para> - <command>ALTER TABLE DROP COLUMN</> can be used to drop the only + <command>ALTER TABLE DROP COLUMN</command> can be used to drop the only column of a table, leaving a zero-column table. This is an extension of SQL, which disallows zero-column tables. </para> diff --git a/doc/src/sgml/ref/alter_tablespace.sgml b/doc/src/sgml/ref/alter_tablespace.sgml index 4542bd90a21..def554bfb33 100644 --- a/doc/src/sgml/ref/alter_tablespace.sgml +++ b/doc/src/sgml/ref/alter_tablespace.sgml @@ -83,8 +83,8 @@ ALTER TABLESPACE <replaceable>name</replaceable> RESET ( <replaceable class="par <listitem> <para> A tablespace parameter to be set or reset. Currently, the only - available parameters are <varname>seq_page_cost</>, - <varname>random_page_cost</> and <varname>effective_io_concurrency</>. + available parameters are <varname>seq_page_cost</varname>, + <varname>random_page_cost</varname> and <varname>effective_io_concurrency</varname>. Setting either value for a particular tablespace will override the planner's usual estimate of the cost of reading pages from tables in that tablespace, as established by the configuration parameters of the diff --git a/doc/src/sgml/ref/alter_trigger.sgml b/doc/src/sgml/ref/alter_trigger.sgml index 3e48d159e27..2e872cf11f2 100644 --- a/doc/src/sgml/ref/alter_trigger.sgml +++ b/doc/src/sgml/ref/alter_trigger.sgml @@ -91,7 +91,7 @@ ALTER TRIGGER <replaceable class="parameter">name</replaceable> ON <replaceable <para> The ability to temporarily enable or disable a trigger is provided by <xref linkend="SQL-ALTERTABLE">, not by - <command>ALTER TRIGGER</>, because <command>ALTER TRIGGER</> has no + <command>ALTER TRIGGER</command>, because <command>ALTER TRIGGER</command> has no convenient way to express the option of enabling or disabling all of a table's triggers at once. </para> @@ -117,7 +117,7 @@ ALTER TRIGGER emp_stamp ON emp DEPENDS ON EXTENSION emplib; <title>Compatibility</title> <para> - <command>ALTER TRIGGER</command> is a <productname>PostgreSQL</> + <command>ALTER TRIGGER</command> is a <productname>PostgreSQL</productname> extension of the SQL standard. </para> </refsect1> diff --git a/doc/src/sgml/ref/alter_tsconfig.sgml b/doc/src/sgml/ref/alter_tsconfig.sgml index 72a719b8629..b44aac9bf58 100644 --- a/doc/src/sgml/ref/alter_tsconfig.sgml +++ b/doc/src/sgml/ref/alter_tsconfig.sgml @@ -49,7 +49,7 @@ ALTER TEXT SEARCH CONFIGURATION <replaceable>name</replaceable> SET SCHEMA <repl <para> You must be the owner of the configuration to use - <command>ALTER TEXT SEARCH CONFIGURATION</>. + <command>ALTER TEXT SEARCH CONFIGURATION</command>. </para> </refsect1> @@ -136,20 +136,20 @@ ALTER TEXT SEARCH CONFIGURATION <replaceable>name</replaceable> SET SCHEMA <repl </variablelist> <para> - The <literal>ADD MAPPING FOR</> form installs a list of dictionaries to be + The <literal>ADD MAPPING FOR</literal> form installs a list of dictionaries to be consulted for the specified token type(s); it is an error if there is already a mapping for any of the token types. - The <literal>ALTER MAPPING FOR</> form does the same, but first removing + The <literal>ALTER MAPPING FOR</literal> form does the same, but first removing any existing mapping for those token types. - The <literal>ALTER MAPPING REPLACE</> forms substitute <replaceable + The <literal>ALTER MAPPING REPLACE</literal> forms substitute <replaceable class="parameter">new_dictionary</replaceable> for <replaceable class="parameter">old_dictionary</replaceable> anywhere the latter appears. - This is done for only the specified token types when <literal>FOR</> + This is done for only the specified token types when <literal>FOR</literal> appears, or for all mappings of the configuration when it doesn't. - The <literal>DROP MAPPING</> form removes all dictionaries for the + The <literal>DROP MAPPING</literal> form removes all dictionaries for the specified token type(s), causing tokens of those types to be ignored by the text search configuration. It is an error if there is no mapping - for the token types, unless <literal>IF EXISTS</> appears. + for the token types, unless <literal>IF EXISTS</literal> appears. </para> </refsect1> @@ -158,9 +158,9 @@ ALTER TEXT SEARCH CONFIGURATION <replaceable>name</replaceable> SET SCHEMA <repl <title>Examples</title> <para> - The following example replaces the <literal>english</> dictionary - with the <literal>swedish</> dictionary anywhere that <literal>english</> - is used within <literal>my_config</>. + The following example replaces the <literal>english</literal> dictionary + with the <literal>swedish</literal> dictionary anywhere that <literal>english</literal> + is used within <literal>my_config</literal>. </para> <programlisting> diff --git a/doc/src/sgml/ref/alter_tsdictionary.sgml b/doc/src/sgml/ref/alter_tsdictionary.sgml index 7cecabea83b..16d76687ab1 100644 --- a/doc/src/sgml/ref/alter_tsdictionary.sgml +++ b/doc/src/sgml/ref/alter_tsdictionary.sgml @@ -41,7 +41,7 @@ ALTER TEXT SEARCH DICTIONARY <replaceable>name</replaceable> SET SCHEMA <replace <para> You must be the owner of the dictionary to use - <command>ALTER TEXT SEARCH DICTIONARY</>. + <command>ALTER TEXT SEARCH DICTIONARY</command>. </para> </refsect1> @@ -126,7 +126,7 @@ ALTER TEXT SEARCH DICTIONARY my_dict ( StopWords = newrussian ); </programlisting> <para> - The following example command changes the language option to <literal>dutch</>, + The following example command changes the language option to <literal>dutch</literal>, and removes the stopword option entirely. </para> @@ -135,7 +135,7 @@ ALTER TEXT SEARCH DICTIONARY my_dict ( language = dutch, StopWords ); </programlisting> <para> - The following example command <quote>updates</> the dictionary's + The following example command <quote>updates</quote> the dictionary's definition without actually changing anything. <programlisting> @@ -144,7 +144,7 @@ ALTER TEXT SEARCH DICTIONARY my_dict ( dummy ); (The reason this works is that the option removal code doesn't complain if there is no such option.) This trick is useful when changing - configuration files for the dictionary: the <command>ALTER</> will + configuration files for the dictionary: the <command>ALTER</command> will force existing database sessions to re-read the configuration files, which otherwise they would never do if they had read them earlier. </para> diff --git a/doc/src/sgml/ref/alter_tsparser.sgml b/doc/src/sgml/ref/alter_tsparser.sgml index e2b6060a17a..737a5075657 100644 --- a/doc/src/sgml/ref/alter_tsparser.sgml +++ b/doc/src/sgml/ref/alter_tsparser.sgml @@ -36,7 +36,7 @@ ALTER TEXT SEARCH PARSER <replaceable>name</replaceable> SET SCHEMA <replaceable </para> <para> - You must be a superuser to use <command>ALTER TEXT SEARCH PARSER</>. + You must be a superuser to use <command>ALTER TEXT SEARCH PARSER</command>. </para> </refsect1> diff --git a/doc/src/sgml/ref/alter_tstemplate.sgml b/doc/src/sgml/ref/alter_tstemplate.sgml index e7ae91c0a08..d9a753017b5 100644 --- a/doc/src/sgml/ref/alter_tstemplate.sgml +++ b/doc/src/sgml/ref/alter_tstemplate.sgml @@ -36,7 +36,7 @@ ALTER TEXT SEARCH TEMPLATE <replaceable>name</replaceable> SET SCHEMA <replaceab </para> <para> - You must be a superuser to use <command>ALTER TEXT SEARCH TEMPLATE</>. + You must be a superuser to use <command>ALTER TEXT SEARCH TEMPLATE</command>. </para> </refsect1> diff --git a/doc/src/sgml/ref/alter_type.sgml b/doc/src/sgml/ref/alter_type.sgml index 6c5201ccb59..75be3187f14 100644 --- a/doc/src/sgml/ref/alter_type.sgml +++ b/doc/src/sgml/ref/alter_type.sgml @@ -147,7 +147,7 @@ ALTER TYPE <replaceable class="parameter">name</replaceable> RENAME VALUE <repla </para> <para> - You must own the type to use <command>ALTER TYPE</>. + You must own the type to use <command>ALTER TYPE</command>. To change the schema of a type, you must also have <literal>CREATE</literal> privilege on the new schema. To alter the owner, you must also be a direct or indirect member of the new @@ -290,7 +290,7 @@ ALTER TYPE <replaceable class="parameter">name</replaceable> RENAME VALUE <repla <title>Notes</title> <para> - <command>ALTER TYPE ... ADD VALUE</> (the form that adds a new value to an + <command>ALTER TYPE ... ADD VALUE</command> (the form that adds a new value to an enum type) cannot be executed inside a transaction block. </para> @@ -301,7 +301,7 @@ ALTER TYPE <replaceable class="parameter">name</replaceable> RENAME VALUE <repla is used to set the new value's sort position somewhere other than at the end of the list. However, sometimes it will happen even though the new value is added at the end (this occurs if the OID counter <quote>wrapped - around</> since the original creation of the enum type). The slowdown is + around</quote> since the original creation of the enum type). The slowdown is usually insignificant; but if it matters, optimal performance can be regained by dropping and recreating the enum type, or by dumping and reloading the database. diff --git a/doc/src/sgml/ref/alter_user_mapping.sgml b/doc/src/sgml/ref/alter_user_mapping.sgml index 5cc49210edb..18271d51995 100644 --- a/doc/src/sgml/ref/alter_user_mapping.sgml +++ b/doc/src/sgml/ref/alter_user_mapping.sgml @@ -38,7 +38,7 @@ ALTER USER MAPPING FOR { <replaceable class="parameter">user_name</replaceable> <para> The owner of a foreign server can alter user mappings for that server for any user. Also, a user can alter a user mapping for - their own user name if <literal>USAGE</> privilege on the server has + their own user name if <literal>USAGE</literal> privilege on the server has been granted to the user. </para> </refsect1> @@ -51,9 +51,9 @@ ALTER USER MAPPING FOR { <replaceable class="parameter">user_name</replaceable> <term><replaceable class="parameter">user_name</replaceable></term> <listitem> <para> - User name of the mapping. <literal>CURRENT_USER</> - and <literal>USER</> match the name of the current - user. <literal>PUBLIC</> is used to match all present and future + User name of the mapping. <literal>CURRENT_USER</literal> + and <literal>USER</literal> match the name of the current + user. <literal>PUBLIC</literal> is used to match all present and future user names in the system. </para> </listitem> @@ -74,8 +74,8 @@ ALTER USER MAPPING FOR { <replaceable class="parameter">user_name</replaceable> <para> Change options for the user mapping. The new options override any previously specified - options. <literal>ADD</>, <literal>SET</>, and <literal>DROP</> - specify the action to be performed. <literal>ADD</> is assumed + options. <literal>ADD</literal>, <literal>SET</literal>, and <literal>DROP</literal> + specify the action to be performed. <literal>ADD</literal> is assumed if no operation is explicitly specified. Option names must be unique; options are also validated by the server's foreign-data wrapper. @@ -89,7 +89,7 @@ ALTER USER MAPPING FOR { <replaceable class="parameter">user_name</replaceable> <title>Examples</title> <para> - Change the password for user mapping <literal>bob</>, server <literal>foo</>: + Change the password for user mapping <literal>bob</literal>, server <literal>foo</literal>: <programlisting> ALTER USER MAPPING FOR bob SERVER foo OPTIONS (SET password 'public'); </programlisting></para> diff --git a/doc/src/sgml/ref/alter_view.sgml b/doc/src/sgml/ref/alter_view.sgml index 788eda5d58e..e7180b44093 100644 --- a/doc/src/sgml/ref/alter_view.sgml +++ b/doc/src/sgml/ref/alter_view.sgml @@ -37,12 +37,12 @@ ALTER VIEW [ IF EXISTS ] <replaceable class="parameter">name</replaceable> RESET <para> <command>ALTER VIEW</command> changes various auxiliary properties of a view. (If you want to modify the view's defining query, - use <command>CREATE OR REPLACE VIEW</>.) + use <command>CREATE OR REPLACE VIEW</command>.) </para> <para> - You must own the view to use <command>ALTER VIEW</>. - To change a view's schema, you must also have <literal>CREATE</> + You must own the view to use <command>ALTER VIEW</command>. + To change a view's schema, you must also have <literal>CREATE</literal> privilege on the new schema. To alter the owner, you must also be a direct or indirect member of the new owning role, and that role must have <literal>CREATE</literal> privilege on @@ -81,7 +81,7 @@ ALTER VIEW [ IF EXISTS ] <replaceable class="parameter">name</replaceable> RESET <para> These forms set or remove the default value for a column. A view column's default value is substituted into any - <command>INSERT</> or <command>UPDATE</> command whose target is the + <command>INSERT</command> or <command>UPDATE</command> command whose target is the view, before applying any rules or triggers for the view. The view's default will therefore take precedence over any default values from underlying relations. @@ -185,7 +185,7 @@ INSERT INTO a_view(id) VALUES(2); -- ts will receive the current time <title>Compatibility</title> <para> - <command>ALTER VIEW</command> is a <productname>PostgreSQL</> + <command>ALTER VIEW</command> is a <productname>PostgreSQL</productname> extension of the SQL standard. </para> </refsect1> diff --git a/doc/src/sgml/ref/analyze.sgml b/doc/src/sgml/ref/analyze.sgml index eae7fe92e09..12f2f093372 100644 --- a/doc/src/sgml/ref/analyze.sgml +++ b/doc/src/sgml/ref/analyze.sgml @@ -35,7 +35,7 @@ ANALYZE [ VERBOSE ] [ <replaceable class="parameter">table_and_columns</replacea <para> <command>ANALYZE</command> collects statistics about the contents of tables in the database, and stores the results in the <link - linkend="catalog-pg-statistic"><structname>pg_statistic</></> + linkend="catalog-pg-statistic"><structname>pg_statistic</structname></link> system catalog. Subsequently, the query planner uses these statistics to help determine the most efficient execution plans for queries. @@ -93,7 +93,7 @@ ANALYZE [ VERBOSE ] [ <replaceable class="parameter">table_and_columns</replacea <title>Outputs</title> <para> - When <literal>VERBOSE</> is specified, <command>ANALYZE</> emits + When <literal>VERBOSE</literal> is specified, <command>ANALYZE</command> emits progress messages to indicate which table is currently being processed. Various statistics about the tables are printed as well. </para> @@ -104,8 +104,8 @@ ANALYZE [ VERBOSE ] [ <replaceable class="parameter">table_and_columns</replacea <para> Foreign tables are analyzed only when explicitly selected. Not all - foreign data wrappers support <command>ANALYZE</>. If the table's - wrapper does not support <command>ANALYZE</>, the command prints a + foreign data wrappers support <command>ANALYZE</command>. If the table's + wrapper does not support <command>ANALYZE</command>, the command prints a warning and does nothing. </para> @@ -172,8 +172,8 @@ ANALYZE [ VERBOSE ] [ <replaceable class="parameter">table_and_columns</replacea <literal>pg_statistic</literal>. In particular, setting the statistics target to zero disables collection of statistics for that column. It might be useful to do that for columns that are - never used as part of the <literal>WHERE</>, <literal>GROUP BY</>, - or <literal>ORDER BY</> clauses of queries, since the planner will + never used as part of the <literal>WHERE</literal>, <literal>GROUP BY</literal>, + or <literal>ORDER BY</literal> clauses of queries, since the planner will have no use for statistics on such columns. </para> @@ -191,7 +191,7 @@ ANALYZE [ VERBOSE ] [ <replaceable class="parameter">table_and_columns</replacea with the largest possible statistics target. If this inaccuracy leads to bad query plans, a more accurate value can be determined manually and then installed with - <command>ALTER TABLE ... ALTER COLUMN ... SET (n_distinct = ...)</> + <command>ALTER TABLE ... ALTER COLUMN ... SET (n_distinct = ...)</command> (see <xref linkend="sql-altertable">). </para> @@ -210,7 +210,7 @@ ANALYZE [ VERBOSE ] [ <replaceable class="parameter">table_and_columns</replacea <para> If any of the child tables are foreign tables whose foreign data wrappers - do not support <command>ANALYZE</>, those child tables are ignored while + do not support <command>ANALYZE</command>, those child tables are ignored while gathering inheritance statistics. </para> diff --git a/doc/src/sgml/ref/begin.sgml b/doc/src/sgml/ref/begin.sgml index c04f1c8064c..fd6f073d18e 100644 --- a/doc/src/sgml/ref/begin.sgml +++ b/doc/src/sgml/ref/begin.sgml @@ -91,7 +91,7 @@ BEGIN [ WORK | TRANSACTION ] [ <replaceable class="parameter">transaction_mode</ <para> <xref linkend="sql-start-transaction"> has the same functionality - as <command>BEGIN</>. + as <command>BEGIN</command>. </para> <para> @@ -101,7 +101,7 @@ BEGIN [ WORK | TRANSACTION ] [ <replaceable class="parameter">transaction_mode</ </para> <para> - Issuing <command>BEGIN</> when already inside a transaction block will + Issuing <command>BEGIN</command> when already inside a transaction block will provoke a warning message. The state of the transaction is not affected. To nest transactions within a transaction block, use savepoints (see <xref linkend="sql-savepoint">). diff --git a/doc/src/sgml/ref/close.sgml b/doc/src/sgml/ref/close.sgml index aaa2f89a30f..4d71c45797d 100644 --- a/doc/src/sgml/ref/close.sgml +++ b/doc/src/sgml/ref/close.sgml @@ -90,7 +90,7 @@ CLOSE { <replaceable class="parameter">name</replaceable> | ALL } <para> You can see all available cursors by querying the <link - linkend="view-pg-cursors"><structname>pg_cursors</></> system view. + linkend="view-pg-cursors"><structname>pg_cursors</structname></link> system view. </para> <para> @@ -115,7 +115,7 @@ CLOSE liahona; <para> <command>CLOSE</command> is fully conforming with the SQL - standard. <command>CLOSE ALL</> is a <productname>PostgreSQL</> + standard. <command>CLOSE ALL</command> is a <productname>PostgreSQL</productname> extension. </para> </refsect1> diff --git a/doc/src/sgml/ref/cluster.sgml b/doc/src/sgml/ref/cluster.sgml index b55734d35c9..5c5db750771 100644 --- a/doc/src/sgml/ref/cluster.sgml +++ b/doc/src/sgml/ref/cluster.sgml @@ -128,7 +128,7 @@ CLUSTER [VERBOSE] </para> <para> - <command>CLUSTER</> can re-sort the table using either an index scan + <command>CLUSTER</command> can re-sort the table using either an index scan on the specified index, or (if the index is a b-tree) a sequential scan followed by sorting. It will attempt to choose the method that will be faster, based on planner cost parameters and available statistical @@ -148,13 +148,13 @@ CLUSTER [VERBOSE] as double the table size, plus the index sizes. This method is often faster than the index scan method, but if the disk space requirement is intolerable, you can disable this choice by temporarily setting <xref - linkend="guc-enable-sort"> to <literal>off</>. + linkend="guc-enable-sort"> to <literal>off</literal>. </para> <para> It is advisable to set <xref linkend="guc-maintenance-work-mem"> to a reasonably large value (but not more than the amount of RAM you can - dedicate to the <command>CLUSTER</> operation) before clustering. + dedicate to the <command>CLUSTER</command> operation) before clustering. </para> <para> @@ -168,7 +168,7 @@ CLUSTER [VERBOSE] Because <command>CLUSTER</command> remembers which indexes are clustered, one can cluster the tables one wants clustered manually the first time, then set up a periodic maintenance script that executes - <command>CLUSTER</> without any parameters, so that the desired tables + <command>CLUSTER</command> without any parameters, so that the desired tables are periodically reclustered. </para> @@ -212,7 +212,7 @@ CLUSTER; <synopsis> CLUSTER <replaceable class="parameter">index_name</replaceable> ON <replaceable class="parameter">table_name</replaceable> </synopsis> - is also supported for compatibility with pre-8.3 <productname>PostgreSQL</> + is also supported for compatibility with pre-8.3 <productname>PostgreSQL</productname> versions. </para> </refsect1> diff --git a/doc/src/sgml/ref/clusterdb.sgml b/doc/src/sgml/ref/clusterdb.sgml index 67582fd6e69..081bbc5f7a3 100644 --- a/doc/src/sgml/ref/clusterdb.sgml +++ b/doc/src/sgml/ref/clusterdb.sgml @@ -76,8 +76,8 @@ PostgreSQL documentation <variablelist> <varlistentry> - <term><option>-a</></term> - <term><option>--all</></term> + <term><option>-a</option></term> + <term><option>--all</option></term> <listitem> <para> Cluster all databases. @@ -86,8 +86,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option><optional>-d</> <replaceable class="parameter">dbname</replaceable></></term> - <term><option><optional>--dbname=</><replaceable class="parameter">dbname</replaceable></></term> + <term><option><optional>-d</optional> <replaceable class="parameter">dbname</replaceable></option></term> + <term><option><optional>--dbname=</optional><replaceable class="parameter">dbname</replaceable></option></term> <listitem> <para> Specifies the name of the database to be clustered. @@ -101,8 +101,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-e</></term> - <term><option>--echo</></term> + <term><option>-e</option></term> + <term><option>--echo</option></term> <listitem> <para> Echo the commands that <application>clusterdb</application> generates @@ -112,8 +112,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-q</></term> - <term><option>--quiet</></term> + <term><option>-q</option></term> + <term><option>--quiet</option></term> <listitem> <para> Do not display progress messages. @@ -122,20 +122,20 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-t <replaceable class="parameter">table</replaceable></></term> - <term><option>--table=<replaceable class="parameter">table</replaceable></></term> + <term><option>-t <replaceable class="parameter">table</replaceable></option></term> + <term><option>--table=<replaceable class="parameter">table</replaceable></option></term> <listitem> <para> Cluster <replaceable class="parameter">table</replaceable> only. Multiple tables can be clustered by writing multiple - <option>-t</> switches. + <option>-t</option> switches. </para> </listitem> </varlistentry> <varlistentry> - <term><option>-v</></term> - <term><option>--verbose</></term> + <term><option>-v</option></term> + <term><option>--verbose</option></term> <listitem> <para> Print detailed information during processing. @@ -144,8 +144,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-V</></term> - <term><option>--version</></term> + <term><option>-V</option></term> + <term><option>--version</option></term> <listitem> <para> Print the <application>clusterdb</application> version and exit. @@ -154,8 +154,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-?</></term> - <term><option>--help</></term> + <term><option>-?</option></term> + <term><option>--help</option></term> <listitem> <para> Show help about <application>clusterdb</application> command line @@ -173,8 +173,8 @@ PostgreSQL documentation <variablelist> <varlistentry> - <term><option>-h <replaceable class="parameter">host</replaceable></></term> - <term><option>--host=<replaceable class="parameter">host</replaceable></></term> + <term><option>-h <replaceable class="parameter">host</replaceable></option></term> + <term><option>--host=<replaceable class="parameter">host</replaceable></option></term> <listitem> <para> Specifies the host name of the machine on which the server is @@ -185,8 +185,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-p <replaceable class="parameter">port</replaceable></></term> - <term><option>--port=<replaceable class="parameter">port</replaceable></></term> + <term><option>-p <replaceable class="parameter">port</replaceable></option></term> + <term><option>--port=<replaceable class="parameter">port</replaceable></option></term> <listitem> <para> Specifies the TCP port or local Unix domain socket file @@ -197,8 +197,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-U <replaceable class="parameter">username</replaceable></></term> - <term><option>--username=<replaceable class="parameter">username</replaceable></></term> + <term><option>-U <replaceable class="parameter">username</replaceable></option></term> + <term><option>--username=<replaceable class="parameter">username</replaceable></option></term> <listitem> <para> User name to connect as. @@ -207,8 +207,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-w</></term> - <term><option>--no-password</></term> + <term><option>-w</option></term> + <term><option>--no-password</option></term> <listitem> <para> Never issue a password prompt. If the server requires @@ -222,8 +222,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-W</></term> - <term><option>--password</></term> + <term><option>-W</option></term> + <term><option>--password</option></term> <listitem> <para> Force <application>clusterdb</application> to prompt for a @@ -236,14 +236,14 @@ PostgreSQL documentation for a password if the server demands password authentication. However, <application>clusterdb</application> will waste a connection attempt finding out that the server wants a password. - In some cases it is worth typing <option>-W</> to avoid the extra + In some cases it is worth typing <option>-W</option> to avoid the extra connection attempt. </para> </listitem> </varlistentry> <varlistentry> - <term><option>--maintenance-db=<replaceable class="parameter">dbname</replaceable></></term> + <term><option>--maintenance-db=<replaceable class="parameter">dbname</replaceable></option></term> <listitem> <para> Specifies the name of the database to connect to discover what other @@ -277,8 +277,8 @@ PostgreSQL documentation </variablelist> <para> - This utility, like most other <productname>PostgreSQL</> utilities, - also uses the environment variables supported by <application>libpq</> + This utility, like most other <productname>PostgreSQL</productname> utilities, + also uses the environment variables supported by <application>libpq</application> (see <xref linkend="libpq-envars">). </para> diff --git a/doc/src/sgml/ref/comment.sgml b/doc/src/sgml/ref/comment.sgml index 059d6f41d81..ab2e09d5218 100644 --- a/doc/src/sgml/ref/comment.sgml +++ b/doc/src/sgml/ref/comment.sgml @@ -83,16 +83,16 @@ COMMENT ON <para> Only one comment string is stored for each object, so to modify a comment, - issue a new <command>COMMENT</> command for the same object. To remove a + issue a new <command>COMMENT</command> command for the same object. To remove a comment, write <literal>NULL</literal> in place of the text string. Comments are automatically dropped when their object is dropped. </para> <para> For most kinds of object, only the object's owner can set the comment. - Roles don't have owners, so the rule for <literal>COMMENT ON ROLE</> is + Roles don't have owners, so the rule for <literal>COMMENT ON ROLE</literal> is that you must be superuser to comment on a superuser role, or have the - <literal>CREATEROLE</> privilege to comment on non-superuser roles. + <literal>CREATEROLE</literal> privilege to comment on non-superuser roles. Likewise, access methods don't have owners either; you must be superuser to comment on an access method. Of course, a superuser can comment on anything. @@ -103,8 +103,8 @@ COMMENT ON <command>\d</command> family of commands. Other user interfaces to retrieve comments can be built atop the same built-in functions that <application>psql</application> uses, namely - <function>obj_description</>, <function>col_description</>, - and <function>shobj_description</> + <function>obj_description</function>, <function>col_description</function>, + and <function>shobj_description</function> (see <xref linkend="functions-info-comment-table">). </para> </refsect1> @@ -171,14 +171,14 @@ COMMENT ON <listitem> <para> The mode of a function or aggregate - argument: <literal>IN</>, <literal>OUT</>, - <literal>INOUT</>, or <literal>VARIADIC</>. - If omitted, the default is <literal>IN</>. + argument: <literal>IN</literal>, <literal>OUT</literal>, + <literal>INOUT</literal>, or <literal>VARIADIC</literal>. + If omitted, the default is <literal>IN</literal>. Note that <command>COMMENT</command> does not actually pay - any attention to <literal>OUT</> arguments, since only the input + any attention to <literal>OUT</literal> arguments, since only the input arguments are needed to determine the function's identity. - So it is sufficient to list the <literal>IN</>, <literal>INOUT</>, - and <literal>VARIADIC</> arguments. + So it is sufficient to list the <literal>IN</literal>, <literal>INOUT</literal>, + and <literal>VARIADIC</literal> arguments. </para> </listitem> </varlistentry> @@ -219,7 +219,7 @@ COMMENT ON <listitem> <para> The data type(s) of the operator's arguments (optionally - schema-qualified). Write <literal>NONE</> for the missing argument + schema-qualified). Write <literal>NONE</literal> for the missing argument of a prefix or postfix operator. </para> </listitem> @@ -258,7 +258,7 @@ COMMENT ON <term><replaceable class="parameter">text</replaceable></term> <listitem> <para> - The new comment, written as a string literal; or <literal>NULL</> + The new comment, written as a string literal; or <literal>NULL</literal> to drop the comment. </para> </listitem> diff --git a/doc/src/sgml/ref/commit.sgml b/doc/src/sgml/ref/commit.sgml index e93c216849b..8e3f53957ee 100644 --- a/doc/src/sgml/ref/commit.sgml +++ b/doc/src/sgml/ref/commit.sgml @@ -60,7 +60,7 @@ COMMIT [ WORK | TRANSACTION ] </para> <para> - Issuing <command>COMMIT</> when not inside a transaction does + Issuing <command>COMMIT</command> when not inside a transaction does no harm, but it will provoke a warning message. </para> </refsect1> diff --git a/doc/src/sgml/ref/commit_prepared.sgml b/doc/src/sgml/ref/commit_prepared.sgml index 716aed3ac22..35bbf85af7e 100644 --- a/doc/src/sgml/ref/commit_prepared.sgml +++ b/doc/src/sgml/ref/commit_prepared.sgml @@ -75,7 +75,7 @@ COMMIT PREPARED <replaceable class="parameter">transaction_id</replaceable> <title id="sql-commit-prepared-examples-title">Examples</title> <para> Commit the transaction identified by the transaction - identifier <literal>foobar</>: + identifier <literal>foobar</literal>: <programlisting> COMMIT PREPARED 'foobar'; diff --git a/doc/src/sgml/ref/copy.sgml b/doc/src/sgml/ref/copy.sgml index 732efe69e66..8f0974b2569 100644 --- a/doc/src/sgml/ref/copy.sgml +++ b/doc/src/sgml/ref/copy.sgml @@ -54,10 +54,10 @@ COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable <command>COPY</command> moves data between <productname>PostgreSQL</productname> tables and standard file-system files. <command>COPY TO</command> copies the contents of a table - <emphasis>to</> a file, while <command>COPY FROM</command> copies - data <emphasis>from</> a file to a table (appending the data to + <emphasis>to</emphasis> a file, while <command>COPY FROM</command> copies + data <emphasis>from</emphasis> a file to a table (appending the data to whatever is in the table already). <command>COPY TO</command> - can also copy the results of a <command>SELECT</> query. + can also copy the results of a <command>SELECT</command> query. </para> <para> @@ -118,10 +118,10 @@ COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable copied. Note that parentheses are required around the query. </para> <para> - For <command>INSERT</>, <command>UPDATE</> and - <command>DELETE</> queries a RETURNING clause must be provided, + For <command>INSERT</command>, <command>UPDATE</command> and + <command>DELETE</command> queries a RETURNING clause must be provided, and the target relation must not have a conditional rule, nor - an <literal>ALSO</> rule, nor an <literal>INSTEAD</> rule + an <literal>ALSO</literal> rule, nor an <literal>INSTEAD</literal> rule that expands to multiple statements. </para> </listitem> @@ -133,7 +133,7 @@ COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable <para> The path name of the input or output file. An input file name can be an absolute or relative path, but an output file name must be an absolute - path. Windows users might need to use an <literal>E''</> string and + path. Windows users might need to use an <literal>E''</literal> string and double any backslashes used in the path name. </para> </listitem> @@ -144,7 +144,7 @@ COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable <listitem> <para> A command to execute. In <command>COPY FROM</command>, the input is - read from standard output of the command, and in <command>COPY TO</>, + read from standard output of the command, and in <command>COPY TO</command>, the output is written to the standard input of the command. </para> <para> @@ -181,9 +181,9 @@ COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable <listitem> <para> Specifies whether the selected option should be turned on or off. - You can write <literal>TRUE</literal>, <literal>ON</>, or + You can write <literal>TRUE</literal>, <literal>ON</literal>, or <literal>1</literal> to enable the option, and <literal>FALSE</literal>, - <literal>OFF</>, or <literal>0</literal> to disable it. The + <literal>OFF</literal>, or <literal>0</literal> to disable it. The <replaceable class="parameter">boolean</replaceable> value can also be omitted, in which case <literal>TRUE</literal> is assumed. </para> @@ -195,10 +195,10 @@ COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable <listitem> <para> Selects the data format to be read or written: - <literal>text</>, - <literal>csv</> (Comma Separated Values), - or <literal>binary</>. - The default is <literal>text</>. + <literal>text</literal>, + <literal>csv</literal> (Comma Separated Values), + or <literal>binary</literal>. + The default is <literal>text</literal>. </para> </listitem> </varlistentry> @@ -220,7 +220,7 @@ COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable <listitem> <para> Requests copying the data with rows already frozen, just as they - would be after running the <command>VACUUM FREEZE</> command. + would be after running the <command>VACUUM FREEZE</command> command. This is intended as a performance option for initial data loading. Rows will be frozen only if the table being loaded has been created or truncated in the current subtransaction, there are no cursors @@ -241,9 +241,9 @@ COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable <para> Specifies the character that separates columns within each row (line) of the file. The default is a tab character in text format, - a comma in <literal>CSV</> format. + a comma in <literal>CSV</literal> format. This must be a single one-byte character. - This option is not allowed when using <literal>binary</> format. + This option is not allowed when using <literal>binary</literal> format. </para> </listitem> </varlistentry> @@ -254,10 +254,10 @@ COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable <para> Specifies the string that represents a null value. The default is <literal>\N</literal> (backslash-N) in text format, and an unquoted empty - string in <literal>CSV</> format. You might prefer an + string in <literal>CSV</literal> format. You might prefer an empty string even in text format for cases where you don't want to distinguish nulls from empty strings. - This option is not allowed when using <literal>binary</> format. + This option is not allowed when using <literal>binary</literal> format. </para> <note> @@ -279,7 +279,7 @@ COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable Specifies that the file contains a header line with the names of each column in the file. On output, the first line contains the column names from the table, and on input, the first line is ignored. - This option is allowed only when using <literal>CSV</> format. + This option is allowed only when using <literal>CSV</literal> format. </para> </listitem> </varlistentry> @@ -291,7 +291,7 @@ COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable Specifies the quoting character to be used when a data value is quoted. The default is double-quote. This must be a single one-byte character. - This option is allowed only when using <literal>CSV</> format. + This option is allowed only when using <literal>CSV</literal> format. </para> </listitem> </varlistentry> @@ -301,59 +301,59 @@ COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable <listitem> <para> Specifies the character that should appear before a - data character that matches the <literal>QUOTE</> value. - The default is the same as the <literal>QUOTE</> value (so that + data character that matches the <literal>QUOTE</literal> value. + The default is the same as the <literal>QUOTE</literal> value (so that the quoting character is doubled if it appears in the data). This must be a single one-byte character. - This option is allowed only when using <literal>CSV</> format. + This option is allowed only when using <literal>CSV</literal> format. </para> </listitem> </varlistentry> <varlistentry> - <term><literal>FORCE_QUOTE</></term> + <term><literal>FORCE_QUOTE</literal></term> <listitem> <para> Forces quoting to be - used for all non-<literal>NULL</> values in each specified column. - <literal>NULL</> output is never quoted. If <literal>*</> is specified, - non-<literal>NULL</> values will be quoted in all columns. - This option is allowed only in <command>COPY TO</>, and only when - using <literal>CSV</> format. + used for all non-<literal>NULL</literal> values in each specified column. + <literal>NULL</literal> output is never quoted. If <literal>*</literal> is specified, + non-<literal>NULL</literal> values will be quoted in all columns. + This option is allowed only in <command>COPY TO</command>, and only when + using <literal>CSV</literal> format. </para> </listitem> </varlistentry> <varlistentry> - <term><literal>FORCE_NOT_NULL</></term> + <term><literal>FORCE_NOT_NULL</literal></term> <listitem> <para> Do not match the specified columns' values against the null string. In the default case where the null string is empty, this means that empty values will be read as zero-length strings rather than nulls, even when they are not quoted. - This option is allowed only in <command>COPY FROM</>, and only when - using <literal>CSV</> format. + This option is allowed only in <command>COPY FROM</command>, and only when + using <literal>CSV</literal> format. </para> </listitem> </varlistentry> <varlistentry> - <term><literal>FORCE_NULL</></term> + <term><literal>FORCE_NULL</literal></term> <listitem> <para> Match the specified columns' values against the null string, even if it has been quoted, and if a match is found set the value to - <literal>NULL</>. In the default case where the null string is empty, + <literal>NULL</literal>. In the default case where the null string is empty, this converts a quoted empty string into NULL. - This option is allowed only in <command>COPY FROM</>, and only when - using <literal>CSV</> format. + This option is allowed only in <command>COPY FROM</command>, and only when + using <literal>CSV</literal> format. </para> </listitem> </varlistentry> <varlistentry> - <term><literal>ENCODING</></term> + <term><literal>ENCODING</literal></term> <listitem> <para> Specifies that the file is encoded in the <replaceable @@ -371,7 +371,7 @@ COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable <title>Outputs</title> <para> - On successful completion, a <command>COPY</> command returns a command + On successful completion, a <command>COPY</command> command returns a command tag of the form <screen> COPY <replaceable class="parameter">count</replaceable> @@ -382,10 +382,10 @@ COPY <replaceable class="parameter">count</replaceable> <note> <para> - <application>psql</> will print this command tag only if the command - was not <literal>COPY ... TO STDOUT</>, or the - equivalent <application>psql</> meta-command - <literal>\copy ... to stdout</>. This is to prevent confusing the + <application>psql</application> will print this command tag only if the command + was not <literal>COPY ... TO STDOUT</literal>, or the + equivalent <application>psql</application> meta-command + <literal>\copy ... to stdout</literal>. This is to prevent confusing the command tag with the data that was just printed. </para> </note> @@ -403,16 +403,16 @@ COPY <replaceable class="parameter">count</replaceable> <para> <command>COPY FROM</command> can be used with plain tables and with views - that have <literal>INSTEAD OF INSERT</> triggers. + that have <literal>INSTEAD OF INSERT</literal> triggers. </para> <para> <command>COPY</command> only deals with the specific table named; it does not copy data to or from child tables. Thus for example - <literal>COPY <replaceable class="parameter">table</> TO</literal> + <literal>COPY <replaceable class="parameter">table</replaceable> TO</literal> shows the same data as <literal>SELECT * FROM ONLY <replaceable - class="parameter">table</></literal>. But <literal>COPY - (SELECT * FROM <replaceable class="parameter">table</>) TO ...</literal> + class="parameter">table</replaceable></literal>. But <literal>COPY + (SELECT * FROM <replaceable class="parameter">table</replaceable>) TO ...</literal> can be used to dump all of the data in an inheritance hierarchy. </para> @@ -427,7 +427,7 @@ COPY <replaceable class="parameter">count</replaceable> <para> If row-level security is enabled for the table, the relevant <command>SELECT</command> policies will apply to <literal>COPY - <replaceable class="parameter">table</> TO</literal> statements. + <replaceable class="parameter">table</replaceable> TO</literal> statements. Currently, <command>COPY FROM</command> is not supported for tables with row-level security. Use equivalent <command>INSERT</command> statements instead. @@ -491,10 +491,10 @@ COPY <replaceable class="parameter">count</replaceable> <varname>DateStyle</varname>. To ensure portability to other <productname>PostgreSQL</productname> installations that might use non-default <varname>DateStyle</varname> settings, - <varname>DateStyle</varname> should be set to <literal>ISO</> before - using <command>COPY TO</>. It is also a good idea to avoid dumping + <varname>DateStyle</varname> should be set to <literal>ISO</literal> before + using <command>COPY TO</command>. It is also a good idea to avoid dumping data with <varname>IntervalStyle</varname> set to - <literal>sql_standard</>, because negative interval values might be + <literal>sql_standard</literal>, because negative interval values might be misinterpreted by a server that has a different setting for <varname>IntervalStyle</varname>. </para> @@ -519,7 +519,7 @@ COPY <replaceable class="parameter">count</replaceable> </para> <para> - <literal>FORCE_NULL</> and <literal>FORCE_NOT_NULL</> can be used + <literal>FORCE_NULL</literal> and <literal>FORCE_NOT_NULL</literal> can be used simultaneously on the same column. This results in converting quoted null strings to null values and unquoted null strings to empty strings. </para> @@ -533,7 +533,7 @@ COPY <replaceable class="parameter">count</replaceable> <title>Text Format</title> <para> - When the <literal>text</> format is used, + When the <literal>text</literal> format is used, the data read or written is a text file with one line per table row. Columns in a row are separated by the delimiter character. The column values themselves are strings generated by the @@ -548,17 +548,17 @@ COPY <replaceable class="parameter">count</replaceable> <para> End of data can be represented by a single line containing just - backslash-period (<literal>\.</>). An end-of-data marker is + backslash-period (<literal>\.</literal>). An end-of-data marker is not necessary when reading from a file, since the end of file serves perfectly well; it is needed only when copying data to or from client applications using pre-3.0 client protocol. </para> <para> - Backslash characters (<literal>\</>) can be used in the + Backslash characters (<literal>\</literal>) can be used in the <command>COPY</command> data to quote data characters that might otherwise be taken as row or column delimiters. In particular, the - following characters <emphasis>must</> be preceded by a backslash if + following characters <emphasis>must</emphasis> be preceded by a backslash if they appear as part of a column value: backslash itself, newline, carriage return, and the current delimiter character. </para> @@ -587,37 +587,37 @@ COPY <replaceable class="parameter">count</replaceable> <tbody> <row> - <entry><literal>\b</></entry> + <entry><literal>\b</literal></entry> <entry>Backspace (ASCII 8)</entry> </row> <row> - <entry><literal>\f</></entry> + <entry><literal>\f</literal></entry> <entry>Form feed (ASCII 12)</entry> </row> <row> - <entry><literal>\n</></entry> + <entry><literal>\n</literal></entry> <entry>Newline (ASCII 10)</entry> </row> <row> - <entry><literal>\r</></entry> + <entry><literal>\r</literal></entry> <entry>Carriage return (ASCII 13)</entry> </row> <row> - <entry><literal>\t</></entry> + <entry><literal>\t</literal></entry> <entry>Tab (ASCII 9)</entry> </row> <row> - <entry><literal>\v</></entry> + <entry><literal>\v</literal></entry> <entry>Vertical tab (ASCII 11)</entry> </row> <row> - <entry><literal>\</><replaceable>digits</></entry> + <entry><literal>\</literal><replaceable>digits</replaceable></entry> <entry>Backslash followed by one to three octal digits specifies the character with that numeric code</entry> </row> <row> - <entry><literal>\x</><replaceable>digits</></entry> - <entry>Backslash <literal>x</> followed by one or two hex digits specifies + <entry><literal>\x</literal><replaceable>digits</replaceable></entry> + <entry>Backslash <literal>x</literal> followed by one or two hex digits specifies the character with that numeric code</entry> </row> </tbody> @@ -633,15 +633,15 @@ COPY <replaceable class="parameter">count</replaceable> Any other backslashed character that is not mentioned in the above table will be taken to represent itself. However, beware of adding backslashes unnecessarily, since that might accidentally produce a string matching the - end-of-data marker (<literal>\.</>) or the null string (<literal>\N</> by + end-of-data marker (<literal>\.</literal>) or the null string (<literal>\N</literal> by default). These strings will be recognized before any other backslash processing is done. </para> <para> It is strongly recommended that applications generating <command>COPY</command> data convert - data newlines and carriage returns to the <literal>\n</> and - <literal>\r</> sequences respectively. At present it is + data newlines and carriage returns to the <literal>\n</literal> and + <literal>\r</literal> sequences respectively. At present it is possible to represent a data carriage return by a backslash and carriage return, and to represent a data newline by a backslash and newline. However, these representations might not be accepted in future releases. @@ -652,10 +652,10 @@ COPY <replaceable class="parameter">count</replaceable> <para> <command>COPY TO</command> will terminate each row with a Unix-style - newline (<quote><literal>\n</></>). Servers running on Microsoft Windows instead - output carriage return/newline (<quote><literal>\r\n</></>), but only for - <command>COPY</> to a server file; for consistency across platforms, - <command>COPY TO STDOUT</> always sends <quote><literal>\n</></> + newline (<quote><literal>\n</literal></quote>). Servers running on Microsoft Windows instead + output carriage return/newline (<quote><literal>\r\n</literal></quote>), but only for + <command>COPY</command> to a server file; for consistency across platforms, + <command>COPY TO STDOUT</command> always sends <quote><literal>\n</literal></quote> regardless of server platform. <command>COPY FROM</command> can handle lines ending with newlines, carriage returns, or carriage return/newlines. To reduce the risk of @@ -670,62 +670,62 @@ COPY <replaceable class="parameter">count</replaceable> <para> This format option is used for importing and exporting the Comma - Separated Value (<literal>CSV</>) file format used by many other + Separated Value (<literal>CSV</literal>) file format used by many other programs, such as spreadsheets. Instead of the escaping rules used by <productname>PostgreSQL</productname>'s standard text format, it produces and recognizes the common CSV escaping mechanism. </para> <para> - The values in each record are separated by the <literal>DELIMITER</> + The values in each record are separated by the <literal>DELIMITER</literal> character. If the value contains the delimiter character, the - <literal>QUOTE</> character, the <literal>NULL</> string, a carriage + <literal>QUOTE</literal> character, the <literal>NULL</literal> string, a carriage return, or line feed character, then the whole value is prefixed and - suffixed by the <literal>QUOTE</> character, and any occurrence - within the value of a <literal>QUOTE</> character or the - <literal>ESCAPE</> character is preceded by the escape character. - You can also use <literal>FORCE_QUOTE</> to force quotes when outputting - non-<literal>NULL</> values in specific columns. + suffixed by the <literal>QUOTE</literal> character, and any occurrence + within the value of a <literal>QUOTE</literal> character or the + <literal>ESCAPE</literal> character is preceded by the escape character. + You can also use <literal>FORCE_QUOTE</literal> to force quotes when outputting + non-<literal>NULL</literal> values in specific columns. </para> <para> - The <literal>CSV</> format has no standard way to distinguish a - <literal>NULL</> value from an empty string. - <productname>PostgreSQL</>'s <command>COPY</> handles this by quoting. - A <literal>NULL</> is output as the <literal>NULL</> parameter string - and is not quoted, while a non-<literal>NULL</> value matching the - <literal>NULL</> parameter string is quoted. For example, with the - default settings, a <literal>NULL</> is written as an unquoted empty + The <literal>CSV</literal> format has no standard way to distinguish a + <literal>NULL</literal> value from an empty string. + <productname>PostgreSQL</productname>'s <command>COPY</command> handles this by quoting. + A <literal>NULL</literal> is output as the <literal>NULL</literal> parameter string + and is not quoted, while a non-<literal>NULL</literal> value matching the + <literal>NULL</literal> parameter string is quoted. For example, with the + default settings, a <literal>NULL</literal> is written as an unquoted empty string, while an empty string data value is written with double quotes - (<literal>""</>). Reading values follows similar rules. You can - use <literal>FORCE_NOT_NULL</> to prevent <literal>NULL</> input + (<literal>""</literal>). Reading values follows similar rules. You can + use <literal>FORCE_NOT_NULL</literal> to prevent <literal>NULL</literal> input comparisons for specific columns. You can also use - <literal>FORCE_NULL</> to convert quoted null string data values to - <literal>NULL</>. + <literal>FORCE_NULL</literal> to convert quoted null string data values to + <literal>NULL</literal>. </para> <para> - Because backslash is not a special character in the <literal>CSV</> - format, <literal>\.</>, the end-of-data marker, could also appear - as a data value. To avoid any misinterpretation, a <literal>\.</> + Because backslash is not a special character in the <literal>CSV</literal> + format, <literal>\.</literal>, the end-of-data marker, could also appear + as a data value. To avoid any misinterpretation, a <literal>\.</literal> data value appearing as a lone entry on a line is automatically quoted on output, and on input, if quoted, is not interpreted as the end-of-data marker. If you are loading a file created by another application that has a single unquoted column and might have a - value of <literal>\.</>, you might need to quote that value in the + value of <literal>\.</literal>, you might need to quote that value in the input file. </para> <note> <para> - In <literal>CSV</> format, all characters are significant. A quoted value + In <literal>CSV</literal> format, all characters are significant. A quoted value surrounded by white space, or any characters other than - <literal>DELIMITER</>, will include those characters. This can cause - errors if you import data from a system that pads <literal>CSV</> + <literal>DELIMITER</literal>, will include those characters. This can cause + errors if you import data from a system that pads <literal>CSV</literal> lines with white space out to some fixed width. If such a situation - arises you might need to preprocess the <literal>CSV</> file to remove + arises you might need to preprocess the <literal>CSV</literal> file to remove the trailing white space, before importing the data into - <productname>PostgreSQL</>. + <productname>PostgreSQL</productname>. </para> </note> @@ -743,7 +743,7 @@ COPY <replaceable class="parameter">count</replaceable> Many programs produce strange and occasionally perverse CSV files, so the file format is more a convention than a standard. Thus you might encounter some files that cannot be imported using this - mechanism, and <command>COPY</> might produce files that other + mechanism, and <command>COPY</command> might produce files that other programs cannot process. </para> </note> @@ -756,17 +756,17 @@ COPY <replaceable class="parameter">count</replaceable> <para> The <literal>binary</literal> format option causes all data to be stored/read as binary format rather than as text. It is - somewhat faster than the text and <literal>CSV</> formats, + somewhat faster than the text and <literal>CSV</literal> formats, but a binary-format file is less portable across machine architectures and <productname>PostgreSQL</productname> versions. Also, the binary format is very data type specific; for example - it will not work to output binary data from a <type>smallint</> column - and read it into an <type>integer</> column, even though that would work + it will not work to output binary data from a <type>smallint</type> column + and read it into an <type>integer</type> column, even though that would work fine in text format. </para> <para> - The <literal>binary</> file format consists + The <literal>binary</literal> file format consists of a file header, zero or more tuples containing the row data, and a file trailer. Headers and data are in network byte order. </para> @@ -790,7 +790,7 @@ COPY <replaceable class="parameter">count</replaceable> <term>Signature</term> <listitem> <para> -11-byte sequence <literal>PGCOPY\n\377\r\n\0</> — note that the zero byte +11-byte sequence <literal>PGCOPY\n\377\r\n\0</literal> — note that the zero byte is a required part of the signature. (The signature is designed to allow easy identification of files that have been munged by a non-8-bit-clean transfer. This signature will be changed by end-of-line-translation @@ -804,7 +804,7 @@ filters, dropped zero bytes, dropped high bits, or parity changes.) <listitem> <para> 32-bit integer bit mask to denote important aspects of the file format. Bits -are numbered from 0 (<acronym>LSB</>) to 31 (<acronym>MSB</>). Note that +are numbered from 0 (<acronym>LSB</acronym>) to 31 (<acronym>MSB</acronym>). Note that this field is stored in network byte order (most significant byte first), as are all the integer fields used in the file format. Bits 16-31 are reserved to denote critical file format issues; a reader @@ -880,7 +880,7 @@ to be specified. <para> To determine the appropriate binary format for the actual tuple data you should consult the <productname>PostgreSQL</productname> source, in -particular the <function>*send</> and <function>*recv</> functions for +particular the <function>*send</function> and <function>*recv</function> functions for each column's data type (typically these functions are found in the <filename>src/backend/utils/adt/</filename> directory of the source distribution). @@ -924,7 +924,7 @@ COPY country TO STDOUT (DELIMITER '|'); </para> <para> - To copy data from a file into the <literal>country</> table: + To copy data from a file into the <literal>country</literal> table: <programlisting> COPY country FROM '/usr1/proj/bray/sql/country_data'; </programlisting> @@ -986,7 +986,7 @@ ZW ZIMBABWE </para> <para> - The following syntax was used before <productname>PostgreSQL</> + The following syntax was used before <productname>PostgreSQL</productname> version 9.0 and is still supported: <synopsis> @@ -1015,13 +1015,13 @@ COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable [ FORCE QUOTE { <replaceable class="parameter">column_name</replaceable> [, ...] | * } ] ] ] </synopsis> - Note that in this syntax, <literal>BINARY</> and <literal>CSV</> are - treated as independent keywords, not as arguments of a <literal>FORMAT</> + Note that in this syntax, <literal>BINARY</literal> and <literal>CSV</literal> are + treated as independent keywords, not as arguments of a <literal>FORMAT</literal> option. </para> <para> - The following syntax was used before <productname>PostgreSQL</> + The following syntax was used before <productname>PostgreSQL</productname> version 7.3 and is still supported: <synopsis> diff --git a/doc/src/sgml/ref/create_access_method.sgml b/doc/src/sgml/ref/create_access_method.sgml index 891926dba54..1bb1a79bd23 100644 --- a/doc/src/sgml/ref/create_access_method.sgml +++ b/doc/src/sgml/ref/create_access_method.sgml @@ -73,7 +73,7 @@ CREATE ACCESS METHOD <replaceable class="parameter">name</replaceable> <replaceable class="parameter">handler_function</replaceable> is the name (possibly schema-qualified) of a previously registered function that represents the access method. The handler function must be - declared to take a single argument of type <type>internal</>, + declared to take a single argument of type <type>internal</type>, and its return type depends on the type of access method; for <literal>INDEX</literal> access methods, it must be <type>index_am_handler</type>. The C-level API that the handler @@ -89,8 +89,8 @@ CREATE ACCESS METHOD <replaceable class="parameter">name</replaceable> <title>Examples</title> <para> - Create an index access method <literal>heptree</> with - handler function <literal>heptree_handler</>: + Create an index access method <literal>heptree</literal> with + handler function <literal>heptree_handler</literal>: <programlisting> CREATE ACCESS METHOD heptree TYPE INDEX HANDLER heptree_handler; </programlisting></para> @@ -101,7 +101,7 @@ CREATE ACCESS METHOD heptree TYPE INDEX HANDLER heptree_handler; <para> <command>CREATE ACCESS METHOD</command> is a - <productname>PostgreSQL</> extension. + <productname>PostgreSQL</productname> extension. </para> </refsect1> diff --git a/doc/src/sgml/ref/create_aggregate.sgml b/doc/src/sgml/ref/create_aggregate.sgml index ee79c90df2b..3de30fa5808 100644 --- a/doc/src/sgml/ref/create_aggregate.sgml +++ b/doc/src/sgml/ref/create_aggregate.sgml @@ -98,7 +98,7 @@ CREATE AGGREGATE <replaceable class="parameter">name</replaceable> ( <para> If a schema name is given (for example, <literal>CREATE AGGREGATE - myschema.myagg ...</>) then the aggregate function is created in the + myschema.myagg ...</literal>) then the aggregate function is created in the specified schema. Otherwise it is created in the current schema. </para> @@ -191,57 +191,57 @@ CREATE AGGREGATE <replaceable class="parameter">name</replaceable> ( is polymorphic and the state value's data type would be inadequate to pin down the result type. These extra parameters are always passed as NULL (and so the final function must not be strict when - the <literal>FINALFUNC_EXTRA</> option is used), but nonetheless they + the <literal>FINALFUNC_EXTRA</literal> option is used), but nonetheless they are valid parameters. The final function could for example make use - of <function>get_fn_expr_argtype</> to identify the actual argument type + of <function>get_fn_expr_argtype</function> to identify the actual argument type in the current call. </para> <para> - An aggregate can optionally support <firstterm>moving-aggregate mode</>, + An aggregate can optionally support <firstterm>moving-aggregate mode</firstterm>, as described in <xref linkend="xaggr-moving-aggregates">. This requires - specifying the <literal>MSFUNC</>, <literal>MINVFUNC</>, - and <literal>MSTYPE</> parameters, and optionally - the <literal>MSPACE</>, <literal>MFINALFUNC</>, - <literal>MFINALFUNC_EXTRA</>, <literal>MFINALFUNC_MODIFY</>, - and <literal>MINITCOND</> parameters. Except for <literal>MINVFUNC</>, + specifying the <literal>MSFUNC</literal>, <literal>MINVFUNC</literal>, + and <literal>MSTYPE</literal> parameters, and optionally + the <literal>MSPACE</literal>, <literal>MFINALFUNC</literal>, + <literal>MFINALFUNC_EXTRA</literal>, <literal>MFINALFUNC_MODIFY</literal>, + and <literal>MINITCOND</literal> parameters. Except for <literal>MINVFUNC</literal>, these parameters work like the corresponding simple-aggregate parameters - without <literal>M</>; they define a separate implementation of the + without <literal>M</literal>; they define a separate implementation of the aggregate that includes an inverse transition function. </para> <para> The syntax with <literal>ORDER BY</literal> in the parameter list creates a special type of aggregate called an <firstterm>ordered-set - aggregate</firstterm>; or if <literal>HYPOTHETICAL</> is specified, then + aggregate</firstterm>; or if <literal>HYPOTHETICAL</literal> is specified, then a <firstterm>hypothetical-set aggregate</firstterm> is created. These aggregates operate over groups of sorted values in order-dependent ways, so that specification of an input sort order is an essential part of a - call. Also, they can have <firstterm>direct</> arguments, which are + call. Also, they can have <firstterm>direct</firstterm> arguments, which are arguments that are evaluated only once per aggregation rather than once per input row. Hypothetical-set aggregates are a subclass of ordered-set aggregates in which some of the direct arguments are required to match, in number and data types, the aggregated argument columns. This allows the values of those direct arguments to be added to the collection of - aggregate-input rows as an additional <quote>hypothetical</> row. + aggregate-input rows as an additional <quote>hypothetical</quote> row. </para> <para> - An aggregate can optionally support <firstterm>partial aggregation</>, + An aggregate can optionally support <firstterm>partial aggregation</firstterm>, as described in <xref linkend="xaggr-partial-aggregates">. - This requires specifying the <literal>COMBINEFUNC</> parameter. + This requires specifying the <literal>COMBINEFUNC</literal> parameter. If the <replaceable class="parameter">state_data_type</replaceable> - is <type>internal</>, it's usually also appropriate to provide the - <literal>SERIALFUNC</> and <literal>DESERIALFUNC</> parameters so that + is <type>internal</type>, it's usually also appropriate to provide the + <literal>SERIALFUNC</literal> and <literal>DESERIALFUNC</literal> parameters so that parallel aggregation is possible. Note that the aggregate must also be - marked <literal>PARALLEL SAFE</> to enable parallel aggregation. + marked <literal>PARALLEL SAFE</literal> to enable parallel aggregation. </para> <para> - Aggregates that behave like <function>MIN</> or <function>MAX</> can + Aggregates that behave like <function>MIN</function> or <function>MAX</function> can sometimes be optimized by looking into an index instead of scanning every input row. If this aggregate can be so optimized, indicate it by - specifying a <firstterm>sort operator</>. The basic requirement is that + specifying a <firstterm>sort operator</firstterm>. The basic requirement is that the aggregate must yield the first element in the sort ordering induced by the operator; in other words: <programlisting> @@ -253,9 +253,9 @@ SELECT col FROM tab ORDER BY col USING sortop LIMIT 1; </programlisting> Further assumptions are that the aggregate ignores null inputs, and that it delivers a null result if and only if there were no non-null inputs. - Ordinarily, a data type's <literal><</> operator is the proper sort - operator for <function>MIN</>, and <literal>></> is the proper sort - operator for <function>MAX</>. Note that the optimization will never + Ordinarily, a data type's <literal><</literal> operator is the proper sort + operator for <function>MIN</function>, and <literal>></literal> is the proper sort + operator for <function>MAX</function>. Note that the optimization will never actually take effect unless the specified operator is the <quote>less than</quote> or <quote>greater than</quote> strategy member of a B-tree index operator class. @@ -288,10 +288,10 @@ SELECT col FROM tab ORDER BY col USING sortop LIMIT 1; <listitem> <para> - The mode of an argument: <literal>IN</> or <literal>VARIADIC</>. - (Aggregate functions do not support <literal>OUT</> arguments.) - If omitted, the default is <literal>IN</>. Only the last argument - can be marked <literal>VARIADIC</>. + The mode of an argument: <literal>IN</literal> or <literal>VARIADIC</literal>. + (Aggregate functions do not support <literal>OUT</literal> arguments.) + If omitted, the default is <literal>IN</literal>. Only the last argument + can be marked <literal>VARIADIC</literal>. </para> </listitem> </varlistentry> @@ -312,7 +312,7 @@ SELECT col FROM tab ORDER BY col USING sortop LIMIT 1; <listitem> <para> An input data type on which this aggregate function operates. - To create a zero-argument aggregate function, write <literal>*</> + To create a zero-argument aggregate function, write <literal>*</literal> in place of the list of argument specifications. (An example of such an aggregate is <function>count(*)</function>.) </para> @@ -323,12 +323,12 @@ SELECT col FROM tab ORDER BY col USING sortop LIMIT 1; <term><replaceable class="parameter">base_type</replaceable></term> <listitem> <para> - In the old syntax for <command>CREATE AGGREGATE</>, the input data type - is specified by a <literal>basetype</> parameter rather than being + In the old syntax for <command>CREATE AGGREGATE</command>, the input data type + is specified by a <literal>basetype</literal> parameter rather than being written next to the aggregate name. Note that this syntax allows only one input parameter. To define a zero-argument aggregate function - with this syntax, specify the <literal>basetype</> as - <literal>"ANY"</> (not <literal>*</>). + with this syntax, specify the <literal>basetype</literal> as + <literal>"ANY"</literal> (not <literal>*</literal>). Ordered-set aggregates cannot be defined with the old syntax. </para> </listitem> @@ -339,9 +339,9 @@ SELECT col FROM tab ORDER BY col USING sortop LIMIT 1; <listitem> <para> The name of the state transition function to be called for each - input row. For a normal <replaceable class="parameter">N</>-argument - aggregate function, the <replaceable class="parameter">sfunc</> - must take <replaceable class="parameter">N</>+1 arguments, + input row. For a normal <replaceable class="parameter">N</replaceable>-argument + aggregate function, the <replaceable class="parameter">sfunc</replaceable> + must take <replaceable class="parameter">N</replaceable>+1 arguments, the first being of type <replaceable class="parameter">state_data_type</replaceable> and the rest matching the declared input data type(s) of the aggregate. @@ -375,7 +375,7 @@ SELECT col FROM tab ORDER BY col USING sortop LIMIT 1; <para> The approximate average size (in bytes) of the aggregate's state value. If this parameter is omitted or is zero, a default estimate is used - based on the <replaceable>state_data_type</>. + based on the <replaceable>state_data_type</replaceable>. The planner uses this value to estimate the memory required for a grouped aggregate query. The planner will consider using hash aggregation for such a query only if the hash table is estimated to fit @@ -408,7 +408,7 @@ SELECT col FROM tab ORDER BY col USING sortop LIMIT 1; </para> <para> - If <literal>FINALFUNC_EXTRA</> is specified, then in addition to the + If <literal>FINALFUNC_EXTRA</literal> is specified, then in addition to the final state value and any direct arguments, the final function receives extra NULL values corresponding to the aggregate's regular (aggregated) arguments. This is mainly useful to allow correct @@ -419,16 +419,16 @@ SELECT col FROM tab ORDER BY col USING sortop LIMIT 1; </varlistentry> <varlistentry> - <term><literal>FINALFUNC_MODIFY</> = { <literal>READ_ONLY</> | <literal>SHARABLE</> | <literal>READ_WRITE</> }</term> + <term><literal>FINALFUNC_MODIFY</literal> = { <literal>READ_ONLY</literal> | <literal>SHARABLE</literal> | <literal>READ_WRITE</literal> }</term> <listitem> <para> This option specifies whether the final function is a pure function - that does not modify its arguments. <literal>READ_ONLY</> indicates + that does not modify its arguments. <literal>READ_ONLY</literal> indicates it does not; the other two values indicate that it may change the transition state value. See <xref linkend="sql-createaggregate-notes" endterm="sql-createaggregate-notes-title"> below for more detail. The - default is <literal>READ_ONLY</>, except for ordered-set aggregates, - for which the default is <literal>READ_WRITE</>. + default is <literal>READ_ONLY</literal>, except for ordered-set aggregates, + for which the default is <literal>READ_WRITE</literal>. </para> </listitem> </varlistentry> @@ -482,11 +482,11 @@ SELECT col FROM tab ORDER BY col USING sortop LIMIT 1; <para> An aggregate function whose <replaceable class="parameter">state_data_type</replaceable> - is <type>internal</> can participate in parallel aggregation only if it + is <type>internal</type> can participate in parallel aggregation only if it has a <replaceable class="parameter">serialfunc</replaceable> function, - which must serialize the aggregate state into a <type>bytea</> value for + which must serialize the aggregate state into a <type>bytea</type> value for transmission to another process. This function must take a single - argument of type <type>internal</> and return type <type>bytea</>. A + argument of type <type>internal</type> and return type <type>bytea</type>. A corresponding <replaceable class="parameter">deserialfunc</replaceable> is also required. </para> @@ -499,9 +499,9 @@ SELECT col FROM tab ORDER BY col USING sortop LIMIT 1; <para> Deserialize a previously serialized aggregate state back into <replaceable class="parameter">state_data_type</replaceable>. This - function must take two arguments of types <type>bytea</> - and <type>internal</>, and produce a result of type <type>internal</>. - (Note: the second, <type>internal</> argument is unused, but is required + function must take two arguments of types <type>bytea</type> + and <type>internal</type>, and produce a result of type <type>internal</type>. + (Note: the second, <type>internal</type> argument is unused, but is required for type safety reasons.) </para> </listitem> @@ -526,8 +526,8 @@ SELECT col FROM tab ORDER BY col USING sortop LIMIT 1; The name of the forward state transition function to be called for each input row in moving-aggregate mode. This is exactly like the regular transition function, except that its first argument and result are of - type <replaceable>mstate_data_type</>, which might be different - from <replaceable>state_data_type</>. + type <replaceable>mstate_data_type</replaceable>, which might be different + from <replaceable>state_data_type</replaceable>. </para> </listitem> </varlistentry> @@ -538,7 +538,7 @@ SELECT col FROM tab ORDER BY col USING sortop LIMIT 1; <para> The name of the inverse state transition function to be used in moving-aggregate mode. This function has the same argument and - result types as <replaceable>msfunc</>, but it is used to remove + result types as <replaceable>msfunc</replaceable>, but it is used to remove a value from the current aggregate state, rather than add a value to it. The inverse transition function must have the same strictness attribute as the forward state transition function. @@ -562,7 +562,7 @@ SELECT col FROM tab ORDER BY col USING sortop LIMIT 1; <para> The approximate average size (in bytes) of the aggregate's state value, when using moving-aggregate mode. This works the same as - <replaceable>state_data_size</>. + <replaceable>state_data_size</replaceable>. </para> </listitem> </varlistentry> @@ -573,22 +573,22 @@ SELECT col FROM tab ORDER BY col USING sortop LIMIT 1; <para> The name of the final function called to compute the aggregate's result after all input rows have been traversed, when using - moving-aggregate mode. This works the same as <replaceable>ffunc</>, + moving-aggregate mode. This works the same as <replaceable>ffunc</replaceable>, except that its first argument's type - is <replaceable>mstate_data_type</> and extra dummy arguments are - specified by writing <literal>MFINALFUNC_EXTRA</>. - The aggregate result type determined by <replaceable>mffunc</> - or <replaceable>mstate_data_type</> must match that determined by the + is <replaceable>mstate_data_type</replaceable> and extra dummy arguments are + specified by writing <literal>MFINALFUNC_EXTRA</literal>. + The aggregate result type determined by <replaceable>mffunc</replaceable> + or <replaceable>mstate_data_type</replaceable> must match that determined by the aggregate's regular implementation. </para> </listitem> </varlistentry> <varlistentry> - <term><literal>MFINALFUNC_MODIFY</> = { <literal>READ_ONLY</> | <literal>SHARABLE</> | <literal>READ_WRITE</> }</term> + <term><literal>MFINALFUNC_MODIFY</literal> = { <literal>READ_ONLY</literal> | <literal>SHARABLE</literal> | <literal>READ_WRITE</literal> }</term> <listitem> <para> - This option is like <literal>FINALFUNC_MODIFY</>, but it describes + This option is like <literal>FINALFUNC_MODIFY</literal>, but it describes the behavior of the moving-aggregate final function. </para> </listitem> @@ -599,7 +599,7 @@ SELECT col FROM tab ORDER BY col USING sortop LIMIT 1; <listitem> <para> The initial setting for the state value, when using moving-aggregate - mode. This works the same as <replaceable>initial_condition</>. + mode. This works the same as <replaceable>initial_condition</replaceable>. </para> </listitem> </varlistentry> @@ -608,8 +608,8 @@ SELECT col FROM tab ORDER BY col USING sortop LIMIT 1; <term><replaceable class="parameter">sort_operator</replaceable></term> <listitem> <para> - The associated sort operator for a <function>MIN</>- or - <function>MAX</>-like aggregate. + The associated sort operator for a <function>MIN</function>- or + <function>MAX</function>-like aggregate. This is just an operator name (possibly schema-qualified). The operator is assumed to have the same input data types as the aggregate (which must be a single-argument normal aggregate). @@ -618,14 +618,14 @@ SELECT col FROM tab ORDER BY col USING sortop LIMIT 1; </varlistentry> <varlistentry> - <term><literal>PARALLEL =</> { <literal>SAFE</> | <literal>RESTRICTED</> | <literal>UNSAFE</> }</term> + <term><literal>PARALLEL =</literal> { <literal>SAFE</literal> | <literal>RESTRICTED</literal> | <literal>UNSAFE</literal> }</term> <listitem> <para> - The meanings of <literal>PARALLEL SAFE</>, <literal>PARALLEL - RESTRICTED</>, and <literal>PARALLEL UNSAFE</> are the same as + The meanings of <literal>PARALLEL SAFE</literal>, <literal>PARALLEL + RESTRICTED</literal>, and <literal>PARALLEL UNSAFE</literal> are the same as in <xref linkend="sql-createfunction">. An aggregate will not be considered for parallelization if it is marked <literal>PARALLEL - UNSAFE</> (which is the default!) or <literal>PARALLEL RESTRICTED</>. + UNSAFE</literal> (which is the default!) or <literal>PARALLEL RESTRICTED</literal>. Note that the parallel-safety markings of the aggregate's support functions are not consulted by the planner, only the marking of the aggregate itself. @@ -640,7 +640,7 @@ SELECT col FROM tab ORDER BY col USING sortop LIMIT 1; For ordered-set aggregates only, this flag specifies that the aggregate arguments are to be processed according to the requirements for hypothetical-set aggregates: that is, the last few direct arguments must - match the data types of the aggregated (<literal>WITHIN GROUP</>) + match the data types of the aggregated (<literal>WITHIN GROUP</literal>) arguments. The <literal>HYPOTHETICAL</literal> flag has no effect on run-time behavior, only on parse-time resolution of the data types and collations of the aggregate's arguments. @@ -660,7 +660,7 @@ SELECT col FROM tab ORDER BY col USING sortop LIMIT 1; <para> In parameters that specify support function names, you can write - a schema name if needed, for example <literal>SFUNC = public.sum</>. + a schema name if needed, for example <literal>SFUNC = public.sum</literal>. Do not write argument types there, however — the argument types of the support functions are determined from other parameters. </para> @@ -668,7 +668,7 @@ SELECT col FROM tab ORDER BY col USING sortop LIMIT 1; <para> Ordinarily, PostgreSQL functions are expected to be true functions that do not modify their input values. However, an aggregate transition - function, <emphasis>when used in the context of an aggregate</>, + function, <emphasis>when used in the context of an aggregate</emphasis>, is allowed to cheat and modify its transition-state argument in place. This can provide substantial performance benefits compared to making a fresh copy of the transition state each time. @@ -678,26 +678,26 @@ SELECT col FROM tab ORDER BY col USING sortop LIMIT 1; Likewise, while an aggregate final function is normally expected not to modify its input values, sometimes it is impractical to avoid modifying the transition-state argument. Such behavior must be declared using - the <literal>FINALFUNC_MODIFY</> parameter. The <literal>READ_WRITE</> + the <literal>FINALFUNC_MODIFY</literal> parameter. The <literal>READ_WRITE</literal> value indicates that the final function modifies the transition state in unspecified ways. This value prevents use of the aggregate as a window function, and it also prevents merging of transition states for aggregate calls that share the same input values and transition functions. - The <literal>SHARABLE</> value indicates that the transition function + The <literal>SHARABLE</literal> value indicates that the transition function cannot be applied after the final function, but multiple final-function calls can be performed on the ending transition state value. This value prevents use of the aggregate as a window function, but it allows merging of transition states. (That is, the optimization of interest here is not applying the same final function repeatedly, but applying different final functions to the same ending transition state value. This is allowed as - long as none of the final functions are marked <literal>READ_WRITE</>.) + long as none of the final functions are marked <literal>READ_WRITE</literal>.) </para> <para> If an aggregate supports moving-aggregate mode, it will improve calculation efficiency when the aggregate is used as a window function for a window with moving frame start (that is, a frame start mode other - than <literal>UNBOUNDED PRECEDING</>). Conceptually, the forward + than <literal>UNBOUNDED PRECEDING</literal>). Conceptually, the forward transition function adds input values to the aggregate's state when they enter the window frame from the bottom, and the inverse transition function removes them again when they leave the frame at the top. So, @@ -738,20 +738,20 @@ SELECT col FROM tab ORDER BY col USING sortop LIMIT 1; </para> <para> - The syntax for ordered-set aggregates allows <literal>VARIADIC</> + The syntax for ordered-set aggregates allows <literal>VARIADIC</literal> to be specified for both the last direct parameter and the last - aggregated (<literal>WITHIN GROUP</>) parameter. However, the - current implementation restricts use of <literal>VARIADIC</> + aggregated (<literal>WITHIN GROUP</literal>) parameter. However, the + current implementation restricts use of <literal>VARIADIC</literal> in two ways. First, ordered-set aggregates can only use - <literal>VARIADIC "any"</>, not other variadic array types. - Second, if the last direct parameter is <literal>VARIADIC "any"</>, + <literal>VARIADIC "any"</literal>, not other variadic array types. + Second, if the last direct parameter is <literal>VARIADIC "any"</literal>, then there can be only one aggregated parameter and it must also - be <literal>VARIADIC "any"</>. (In the representation used in the + be <literal>VARIADIC "any"</literal>. (In the representation used in the system catalogs, these two parameters are merged into a single - <literal>VARIADIC "any"</> item, since <structname>pg_proc</> cannot - represent functions with more than one <literal>VARIADIC</> parameter.) + <literal>VARIADIC "any"</literal> item, since <structname>pg_proc</structname> cannot + represent functions with more than one <literal>VARIADIC</literal> parameter.) If the aggregate is a hypothetical-set aggregate, the direct arguments - that match the <literal>VARIADIC "any"</> parameter are the hypothetical + that match the <literal>VARIADIC "any"</literal> parameter are the hypothetical ones; any preceding parameters represent additional direct arguments that are not constrained to match the aggregated arguments. </para> @@ -764,7 +764,7 @@ SELECT col FROM tab ORDER BY col USING sortop LIMIT 1; <para> Partial (including parallel) aggregation is currently not supported for ordered-set aggregates. Also, it will never be used for aggregate calls - that include <literal>DISTINCT</> or <literal>ORDER BY</> clauses, since + that include <literal>DISTINCT</literal> or <literal>ORDER BY</literal> clauses, since those semantics cannot be supported during partial aggregation. </para> </refsect1> diff --git a/doc/src/sgml/ref/create_cast.sgml b/doc/src/sgml/ref/create_cast.sgml index a7d13edc22b..89af1e50519 100644 --- a/doc/src/sgml/ref/create_cast.sgml +++ b/doc/src/sgml/ref/create_cast.sgml @@ -44,7 +44,7 @@ SELECT CAST(42 AS float8); </programlisting> converts the integer constant 42 to type <type>float8</type> by invoking a previously specified function, in this case - <literal>float8(int4)</>. (If no suitable cast has been defined, the + <literal>float8(int4)</literal>. (If no suitable cast has been defined, the conversion fails.) </para> @@ -64,7 +64,7 @@ SELECT CAST(42 AS float8); </para> <para> - You can define a cast as an <firstterm>I/O conversion cast</> by using + You can define a cast as an <firstterm>I/O conversion cast</firstterm> by using the <literal>WITH INOUT</literal> syntax. An I/O conversion cast is performed by invoking the output function of the source data type, and passing the resulting string to the input function of the target data type. @@ -75,14 +75,14 @@ SELECT CAST(42 AS float8); <para> By default, a cast can be invoked only by an explicit cast request, - that is an explicit <literal>CAST(<replaceable>x</> AS - <replaceable>typename</>)</literal> or - <replaceable>x</><literal>::</><replaceable>typename</> + that is an explicit <literal>CAST(<replaceable>x</replaceable> AS + <replaceable>typename</replaceable>)</literal> or + <replaceable>x</replaceable><literal>::</literal><replaceable>typename</replaceable> construct. </para> <para> - If the cast is marked <literal>AS ASSIGNMENT</> then it can be invoked + If the cast is marked <literal>AS ASSIGNMENT</literal> then it can be invoked implicitly when assigning a value to a column of the target data type. For example, supposing that <literal>foo.f1</literal> is a column of type <type>text</type>, then: @@ -90,13 +90,13 @@ SELECT CAST(42 AS float8); INSERT INTO foo (f1) VALUES (42); </programlisting> will be allowed if the cast from type <type>integer</type> to type - <type>text</type> is marked <literal>AS ASSIGNMENT</>, otherwise not. + <type>text</type> is marked <literal>AS ASSIGNMENT</literal>, otherwise not. (We generally use the term <firstterm>assignment cast</firstterm> to describe this kind of cast.) </para> <para> - If the cast is marked <literal>AS IMPLICIT</> then it can be invoked + If the cast is marked <literal>AS IMPLICIT</literal> then it can be invoked implicitly in any context, whether assignment or internally in an expression. (We generally use the term <firstterm>implicit cast</firstterm> to describe this kind of cast.) @@ -104,12 +104,12 @@ INSERT INTO foo (f1) VALUES (42); <programlisting> SELECT 2 + 4.0; </programlisting> - The parser initially marks the constants as being of type <type>integer</> - and <type>numeric</> respectively. There is no <type>integer</> - <literal>+</> <type>numeric</> operator in the system catalogs, - but there is a <type>numeric</> <literal>+</> <type>numeric</> operator. - The query will therefore succeed if a cast from <type>integer</> to - <type>numeric</> is available and is marked <literal>AS IMPLICIT</> — + The parser initially marks the constants as being of type <type>integer</type> + and <type>numeric</type> respectively. There is no <type>integer</type> + <literal>+</literal> <type>numeric</type> operator in the system catalogs, + but there is a <type>numeric</type> <literal>+</literal> <type>numeric</type> operator. + The query will therefore succeed if a cast from <type>integer</type> to + <type>numeric</type> is available and is marked <literal>AS IMPLICIT</literal> — which in fact it is. The parser will apply the implicit cast and resolve the query as if it had been written <programlisting> @@ -118,17 +118,17 @@ SELECT CAST ( 2 AS numeric ) + 4.0; </para> <para> - Now, the catalogs also provide a cast from <type>numeric</> to - <type>integer</>. If that cast were marked <literal>AS IMPLICIT</> — + Now, the catalogs also provide a cast from <type>numeric</type> to + <type>integer</type>. If that cast were marked <literal>AS IMPLICIT</literal> — which it is not — then the parser would be faced with choosing between the above interpretation and the alternative of casting the - <type>numeric</> constant to <type>integer</> and applying the - <type>integer</> <literal>+</> <type>integer</> operator. Lacking any + <type>numeric</type> constant to <type>integer</type> and applying the + <type>integer</type> <literal>+</literal> <type>integer</type> operator. Lacking any knowledge of which choice to prefer, it would give up and declare the query ambiguous. The fact that only one of the two casts is implicit is the way in which we teach the parser to prefer resolution - of a mixed <type>numeric</>-and-<type>integer</> expression as - <type>numeric</>; there is no built-in knowledge about that. + of a mixed <type>numeric</type>-and-<type>integer</type> expression as + <type>numeric</type>; there is no built-in knowledge about that. </para> <para> @@ -142,8 +142,8 @@ SELECT CAST ( 2 AS numeric ) + 4.0; general type category. For example, the cast from <type>int2</type> to <type>int4</type> can reasonably be implicit, but the cast from <type>float8</type> to <type>int4</type> should probably be - assignment-only. Cross-type-category casts, such as <type>text</> - to <type>int4</>, are best made explicit-only. + assignment-only. Cross-type-category casts, such as <type>text</type> + to <type>int4</type>, are best made explicit-only. </para> <note> @@ -151,8 +151,8 @@ SELECT CAST ( 2 AS numeric ) + 4.0; Sometimes it is necessary for usability or standards-compliance reasons to provide multiple implicit casts among a set of types, resulting in ambiguity that cannot be avoided as above. The parser has a fallback - heuristic based on <firstterm>type categories</> and <firstterm>preferred - types</> that can help to provide desired behavior in such cases. See + heuristic based on <firstterm>type categories</firstterm> and <firstterm>preferred + types</firstterm> that can help to provide desired behavior in such cases. See <xref linkend="sql-createtype"> for more information. </para> @@ -255,11 +255,11 @@ SELECT CAST ( 2 AS numeric ) + 4.0; Cast implementation functions can have one to three arguments. The first argument type must be identical to or binary-coercible from the cast's source type. The second argument, - if present, must be type <type>integer</>; it receives the type - modifier associated with the destination type, or <literal>-1</> + if present, must be type <type>integer</type>; it receives the type + modifier associated with the destination type, or <literal>-1</literal> if there is none. The third argument, - if present, must be type <type>boolean</>; it receives <literal>true</> - if the cast is an explicit cast, <literal>false</> otherwise. + if present, must be type <type>boolean</type>; it receives <literal>true</literal> + if the cast is an explicit cast, <literal>false</literal> otherwise. (Bizarrely, the SQL standard demands different behaviors for explicit and implicit casts in some cases. This argument is supplied for functions that must implement such casts. It is not recommended that you design @@ -316,9 +316,9 @@ SELECT CAST ( 2 AS numeric ) + 4.0; <para> It is normally not necessary to create casts between user-defined types - and the standard string types (<type>text</>, <type>varchar</>, and - <type>char(<replaceable>n</>)</type>, as well as user-defined types that - are defined to be in the string category). <productname>PostgreSQL</> + and the standard string types (<type>text</type>, <type>varchar</type>, and + <type>char(<replaceable>n</replaceable>)</type>, as well as user-defined types that + are defined to be in the string category). <productname>PostgreSQL</productname> provides automatic I/O conversion casts for that. The automatic casts to string types are treated as assignment casts, while the automatic casts from string types are @@ -338,11 +338,11 @@ SELECT CAST ( 2 AS numeric ) + 4.0; convention of naming cast implementation functions after the target data type. Many users are used to being able to cast data types using a function-style notation, that is - <replaceable>typename</>(<replaceable>x</>). This notation is in fact + <replaceable>typename</replaceable>(<replaceable>x</replaceable>). This notation is in fact nothing more nor less than a call of the cast implementation function; it is not specially treated as a cast. If your conversion functions are not named to support this convention then you will have surprised users. - Since <productname>PostgreSQL</> allows overloading of the same function + Since <productname>PostgreSQL</productname> allows overloading of the same function name with different argument types, there is no difficulty in having multiple conversion functions from different types that all use the target type's name. @@ -353,14 +353,14 @@ SELECT CAST ( 2 AS numeric ) + 4.0; Actually the preceding paragraph is an oversimplification: there are two cases in which a function-call construct will be treated as a cast request without having matched it to an actual function. - If a function call <replaceable>name</>(<replaceable>x</>) does not - exactly match any existing function, but <replaceable>name</> is the name - of a data type and <structname>pg_cast</> provides a binary-coercible cast - to this type from the type of <replaceable>x</>, then the call will be + If a function call <replaceable>name</replaceable>(<replaceable>x</replaceable>) does not + exactly match any existing function, but <replaceable>name</replaceable> is the name + of a data type and <structname>pg_cast</structname> provides a binary-coercible cast + to this type from the type of <replaceable>x</replaceable>, then the call will be construed as a binary-coercible cast. This exception is made so that binary-coercible casts can be invoked using functional syntax, even though they lack any function. Likewise, if there is no - <structname>pg_cast</> entry but the cast would be to or from a string + <structname>pg_cast</structname> entry but the cast would be to or from a string type, the call will be construed as an I/O conversion cast. This exception allows I/O conversion casts to be invoked using functional syntax. @@ -372,7 +372,7 @@ SELECT CAST ( 2 AS numeric ) + 4.0; There is also an exception to the exception: I/O conversion casts from composite types to string types cannot be invoked using functional syntax, but must be written in explicit cast syntax (either - <literal>CAST</> or <literal>::</> notation). This exception was added + <literal>CAST</literal> or <literal>::</literal> notation). This exception was added because after the introduction of automatically-provided I/O conversion casts, it was found too easy to accidentally invoke such a cast when a function or column reference was intended. @@ -402,7 +402,7 @@ CREATE CAST (bigint AS int4) WITH FUNCTION int4(bigint) AS ASSIGNMENT; <acronym>SQL</acronym> standard, except that SQL does not make provisions for binary-coercible types or extra arguments to implementation functions. - <literal>AS IMPLICIT</> is a <productname>PostgreSQL</productname> + <literal>AS IMPLICIT</literal> is a <productname>PostgreSQL</productname> extension, too. </para> </refsect1> diff --git a/doc/src/sgml/ref/create_collation.sgml b/doc/src/sgml/ref/create_collation.sgml index f88758095f2..d4e99e925f0 100644 --- a/doc/src/sgml/ref/create_collation.sgml +++ b/doc/src/sgml/ref/create_collation.sgml @@ -116,7 +116,7 @@ CREATE COLLATION [ IF NOT EXISTS ] <replaceable>name</replaceable> FROM <replace <para> Specifies the provider to use for locale services associated with this collation. Possible values - are: <literal>icu</literal>,<indexterm><primary>ICU</></> + are: <literal>icu</literal>,<indexterm><primary>ICU</primary></indexterm> <literal>libc</literal>. <literal>libc</literal> is the default. The available choices depend on the operating system and build options. diff --git a/doc/src/sgml/ref/create_conversion.sgml b/doc/src/sgml/ref/create_conversion.sgml index d2e2c010ef3..03e0315eef7 100644 --- a/doc/src/sgml/ref/create_conversion.sgml +++ b/doc/src/sgml/ref/create_conversion.sgml @@ -29,7 +29,7 @@ CREATE [ DEFAULT ] CONVERSION <replaceable>name</replaceable> <para> <command>CREATE CONVERSION</command> defines a new conversion between character set encodings. Also, conversions that - are marked <literal>DEFAULT</> can be used for automatic encoding + are marked <literal>DEFAULT</literal> can be used for automatic encoding conversion between client and server. For this purpose, two conversions, from encoding A to B <emphasis>and</emphasis> from encoding B to A, must be defined. @@ -51,7 +51,7 @@ CREATE [ DEFAULT ] CONVERSION <replaceable>name</replaceable> <listitem> <para> - The <literal>DEFAULT</> clause indicates that this conversion + The <literal>DEFAULT</literal> clause indicates that this conversion is the default for this particular source to destination encoding. There should be only one default encoding in a schema for the encoding pair. @@ -137,7 +137,7 @@ conv_proc( <para> To create a conversion from encoding <literal>UTF8</literal> to - <literal>LATIN1</literal> using <function>myfunc</>: + <literal>LATIN1</literal> using <function>myfunc</function>: <programlisting> CREATE CONVERSION myconv FOR 'UTF8' TO 'LATIN1' FROM myfunc; </programlisting></para> diff --git a/doc/src/sgml/ref/create_database.sgml b/doc/src/sgml/ref/create_database.sgml index 8e2a73402f4..8adfa3a37bf 100644 --- a/doc/src/sgml/ref/create_database.sgml +++ b/doc/src/sgml/ref/create_database.sgml @@ -44,21 +44,21 @@ CREATE DATABASE <replaceable class="parameter">name</replaceable> <para> To create a database, you must be a superuser or have the special - <literal>CREATEDB</> privilege. + <literal>CREATEDB</literal> privilege. See <xref linkend="SQL-CREATEUSER">. </para> <para> By default, the new database will be created by cloning the standard - system database <literal>template1</>. A different template can be + system database <literal>template1</literal>. A different template can be specified by writing <literal>TEMPLATE <replaceable class="parameter">name</replaceable></literal>. In particular, - by writing <literal>TEMPLATE template0</>, you can create a virgin + by writing <literal>TEMPLATE template0</literal>, you can create a virgin database containing only the standard objects predefined by your version of <productname>PostgreSQL</productname>. This is useful if you wish to avoid copying any installation-local objects that might have been added to - <literal>template1</>. + <literal>template1</literal>. </para> </refsect1> @@ -115,7 +115,7 @@ CREATE DATABASE <replaceable class="parameter">name</replaceable> <term><replaceable class="parameter">lc_collate</replaceable></term> <listitem> <para> - Collation order (<literal>LC_COLLATE</>) to use in the new database. + Collation order (<literal>LC_COLLATE</literal>) to use in the new database. This affects the sort order applied to strings, e.g. in queries with ORDER BY, as well as the order used in indexes on text columns. The default is to use the collation order of the template database. @@ -127,7 +127,7 @@ CREATE DATABASE <replaceable class="parameter">name</replaceable> <term><replaceable class="parameter">lc_ctype</replaceable></term> <listitem> <para> - Character classification (<literal>LC_CTYPE</>) to use in the new + Character classification (<literal>LC_CTYPE</literal>) to use in the new database. This affects the categorization of characters, e.g. lower, upper and digit. The default is to use the character classification of the template database. See below for additional restrictions. @@ -155,7 +155,7 @@ CREATE DATABASE <replaceable class="parameter">name</replaceable> <para> If false then no one can connect to this database. The default is true, allowing connections (except as restricted by other mechanisms, - such as <literal>GRANT</>/<literal>REVOKE CONNECT</>). + such as <literal>GRANT</literal>/<literal>REVOKE CONNECT</literal>). </para> </listitem> </varlistentry> @@ -192,12 +192,12 @@ CREATE DATABASE <replaceable class="parameter">name</replaceable> <title>Notes</title> <para> - <command>CREATE DATABASE</> cannot be executed inside a transaction + <command>CREATE DATABASE</command> cannot be executed inside a transaction block. </para> <para> - Errors along the line of <quote>could not initialize database directory</> + Errors along the line of <quote>could not initialize database directory</quote> are most likely related to insufficient permissions on the data directory, a full disk, or other file system problems. </para> @@ -218,26 +218,26 @@ CREATE DATABASE <replaceable class="parameter">name</replaceable> </para> <para> - Although it is possible to copy a database other than <literal>template1</> + Although it is possible to copy a database other than <literal>template1</literal> by specifying its name as the template, this is not (yet) intended as a general-purpose <quote><command>COPY DATABASE</command></quote> facility. The principal limitation is that no other sessions can be connected to the template database while it is being copied. <command>CREATE - DATABASE</> will fail if any other connection exists when it starts; + DATABASE</command> will fail if any other connection exists when it starts; otherwise, new connections to the template database are locked out - until <command>CREATE DATABASE</> completes. + until <command>CREATE DATABASE</command> completes. See <xref linkend="manage-ag-templatedbs"> for more information. </para> <para> The character set encoding specified for the new database must be - compatible with the chosen locale settings (<literal>LC_COLLATE</> and - <literal>LC_CTYPE</>). If the locale is <literal>C</> (or equivalently - <literal>POSIX</>), then all encodings are allowed, but for other + compatible with the chosen locale settings (<literal>LC_COLLATE</literal> and + <literal>LC_CTYPE</literal>). If the locale is <literal>C</literal> (or equivalently + <literal>POSIX</literal>), then all encodings are allowed, but for other locale settings there is only one encoding that will work properly. (On Windows, however, UTF-8 encoding can be used with any locale.) - <command>CREATE DATABASE</> will allow superusers to specify - <literal>SQL_ASCII</> encoding regardless of the locale settings, + <command>CREATE DATABASE</command> will allow superusers to specify + <literal>SQL_ASCII</literal> encoding regardless of the locale settings, but this choice is deprecated and may result in misbehavior of character-string functions if data that is not encoding-compatible with the locale is stored in the database. @@ -245,19 +245,19 @@ CREATE DATABASE <replaceable class="parameter">name</replaceable> <para> The encoding and locale settings must match those of the template database, - except when <literal>template0</> is used as template. This is because + except when <literal>template0</literal> is used as template. This is because other databases might contain data that does not match the specified encoding, or might contain indexes whose sort ordering is affected by - <literal>LC_COLLATE</> and <literal>LC_CTYPE</>. Copying such data would + <literal>LC_COLLATE</literal> and <literal>LC_CTYPE</literal>. Copying such data would result in a database that is corrupt according to the new settings. <literal>template0</literal>, however, is known to not contain any data or indexes that would be affected. </para> <para> - The <literal>CONNECTION LIMIT</> option is only enforced approximately; + The <literal>CONNECTION LIMIT</literal> option is only enforced approximately; if two new sessions start at about the same time when just one - connection <quote>slot</> remains for the database, it is possible that + connection <quote>slot</quote> remains for the database, it is possible that both will fail. Also, the limit is not enforced against superusers or background worker processes. </para> @@ -275,8 +275,8 @@ CREATE DATABASE lusiadas; </para> <para> - To create a database <literal>sales</> owned by user <literal>salesapp</> - with a default tablespace of <literal>salesspace</>: + To create a database <literal>sales</literal> owned by user <literal>salesapp</literal> + with a default tablespace of <literal>salesspace</literal>: <programlisting> CREATE DATABASE sales OWNER salesapp TABLESPACE salesspace; @@ -284,19 +284,19 @@ CREATE DATABASE sales OWNER salesapp TABLESPACE salesspace; </para> <para> - To create a database <literal>music</> with a different locale: + To create a database <literal>music</literal> with a different locale: <programlisting> CREATE DATABASE music LC_COLLATE 'sv_SE.utf8' LC_CTYPE 'sv_SE.utf8' TEMPLATE template0; </programlisting> - In this example, the <literal>TEMPLATE template0</> clause is required if - the specified locale is different from the one in <literal>template1</>. + In this example, the <literal>TEMPLATE template0</literal> clause is required if + the specified locale is different from the one in <literal>template1</literal>. (If it is not, then specifying the locale explicitly is redundant.) </para> <para> - To create a database <literal>music2</> with a different locale and a + To create a database <literal>music2</literal> with a different locale and a different character set encoding: <programlisting> CREATE DATABASE music2 diff --git a/doc/src/sgml/ref/create_domain.sgml b/doc/src/sgml/ref/create_domain.sgml index 85ed57dd088..705ff55c49f 100644 --- a/doc/src/sgml/ref/create_domain.sgml +++ b/doc/src/sgml/ref/create_domain.sgml @@ -45,7 +45,7 @@ CREATE DOMAIN <replaceable class="parameter">name</replaceable> [ AS ] <replacea <para> If a schema name is given (for example, <literal>CREATE DOMAIN - myschema.mydomain ...</>) then the domain is created in the + myschema.mydomain ...</literal>) then the domain is created in the specified schema. Otherwise it is created in the current schema. The domain name must be unique among the types and domains existing in its schema. @@ -95,7 +95,7 @@ CREATE DOMAIN <replaceable class="parameter">name</replaceable> [ AS ] <replacea <para> An optional collation for the domain. If no collation is specified, the underlying data type's default collation is used. - The underlying type must be collatable if <literal>COLLATE</> + The underlying type must be collatable if <literal>COLLATE</literal> is specified. </para> </listitem> @@ -106,7 +106,7 @@ CREATE DOMAIN <replaceable class="parameter">name</replaceable> [ AS ] <replacea <listitem> <para> - The <literal>DEFAULT</> clause specifies a default value for + The <literal>DEFAULT</literal> clause specifies a default value for columns of the domain data type. The value is any variable-free expression (but subqueries are not allowed). The data type of the default expression must match the data @@ -136,7 +136,7 @@ CREATE DOMAIN <replaceable class="parameter">name</replaceable> [ AS ] <replacea </varlistentry> <varlistentry> - <term><literal>NOT NULL</></term> + <term><literal>NOT NULL</literal></term> <listitem> <para> Values of this domain are prevented from being null @@ -146,7 +146,7 @@ CREATE DOMAIN <replaceable class="parameter">name</replaceable> [ AS ] <replacea </varlistentry> <varlistentry> - <term><literal>NULL</></term> + <term><literal>NULL</literal></term> <listitem> <para> Values of this domain are allowed to be null. This is the default. @@ -163,10 +163,10 @@ CREATE DOMAIN <replaceable class="parameter">name</replaceable> [ AS ] <replacea <varlistentry> <term><literal>CHECK (<replaceable class="parameter">expression</replaceable>)</literal></term> <listitem> - <para><literal>CHECK</> clauses specify integrity constraints or tests + <para><literal>CHECK</literal> clauses specify integrity constraints or tests which values of the domain must satisfy. Each constraint must be an expression - producing a Boolean result. It should use the key word <literal>VALUE</> + producing a Boolean result. It should use the key word <literal>VALUE</literal> to refer to the value being tested. Expressions evaluating to TRUE or UNKNOWN succeed. If the expression produces a FALSE result, an error is reported and the value is not allowed to be converted @@ -175,13 +175,13 @@ CREATE DOMAIN <replaceable class="parameter">name</replaceable> [ AS ] <replacea <para> Currently, <literal>CHECK</literal> expressions cannot contain - subqueries nor refer to variables other than <literal>VALUE</>. + subqueries nor refer to variables other than <literal>VALUE</literal>. </para> <para> When a domain has multiple <literal>CHECK</literal> constraints, they will be tested in alphabetical order by name. - (<productname>PostgreSQL</> versions before 9.5 did not honor any + (<productname>PostgreSQL</productname> versions before 9.5 did not honor any particular firing order for <literal>CHECK</literal> constraints.) </para> </listitem> @@ -193,7 +193,7 @@ CREATE DOMAIN <replaceable class="parameter">name</replaceable> [ AS ] <replacea <title>Notes</title> <para> - Domain constraints, particularly <literal>NOT NULL</>, are checked when + Domain constraints, particularly <literal>NOT NULL</literal>, are checked when converting a value to the domain type. It is possible for a column that is nominally of the domain type to read as null despite there being such a constraint. For example, this can happen in an outer-join query, if @@ -211,7 +211,7 @@ INSERT INTO tab (domcol) VALUES ((SELECT domcol FROM tab WHERE false)); It is very difficult to avoid such problems, because of SQL's general assumption that a null value is a valid value of every data type. Best practice therefore is to design a domain's constraints so that a null value is allowed, - and then to apply column <literal>NOT NULL</> constraints to columns of + and then to apply column <literal>NOT NULL</literal> constraints to columns of the domain type as needed, rather than directly to the domain type. </para> </refsect1> diff --git a/doc/src/sgml/ref/create_event_trigger.sgml b/doc/src/sgml/ref/create_event_trigger.sgml index 7decfbb983c..9652f024121 100644 --- a/doc/src/sgml/ref/create_event_trigger.sgml +++ b/doc/src/sgml/ref/create_event_trigger.sgml @@ -33,7 +33,7 @@ CREATE EVENT TRIGGER <replaceable class="parameter">name</replaceable> <para> <command>CREATE EVENT TRIGGER</command> creates a new event trigger. - Whenever the designated event occurs and the <literal>WHEN</> condition + Whenever the designated event occurs and the <literal>WHEN</literal> condition associated with the trigger, if any, is satisfied, the trigger function will be executed. For a general introduction to event triggers, see <xref linkend="event-triggers">. The user who creates an event trigger @@ -85,8 +85,8 @@ CREATE EVENT TRIGGER <replaceable class="parameter">name</replaceable> <para> A list of values for the associated <replaceable class="parameter">filter_variable</replaceable> - for which the trigger should fire. For <literal>TAG</>, this means a - list of command tags (e.g. <literal>'DROP FUNCTION'</>). + for which the trigger should fire. For <literal>TAG</literal>, this means a + list of command tags (e.g. <literal>'DROP FUNCTION'</literal>). </para> </listitem> </varlistentry> diff --git a/doc/src/sgml/ref/create_extension.sgml b/doc/src/sgml/ref/create_extension.sgml index 14e910115ab..a3a7892812a 100644 --- a/doc/src/sgml/ref/create_extension.sgml +++ b/doc/src/sgml/ref/create_extension.sgml @@ -39,7 +39,7 @@ CREATE EXTENSION [ IF NOT EXISTS ] <replaceable class="parameter">extension_name <para> Loading an extension essentially amounts to running the extension's script - file. The script will typically create new <acronym>SQL</> objects such as + file. The script will typically create new <acronym>SQL</acronym> objects such as functions, data types, operators and index support methods. <command>CREATE EXTENSION</command> additionally records the identities of all the created objects, so that they can be dropped again if @@ -62,7 +62,7 @@ CREATE EXTENSION [ IF NOT EXISTS ] <replaceable class="parameter">extension_name <variablelist> <varlistentry> - <term><literal>IF NOT EXISTS</></term> + <term><literal>IF NOT EXISTS</literal></term> <listitem> <para> Do not throw an error if an extension with the same name already @@ -97,17 +97,17 @@ CREATE EXTENSION [ IF NOT EXISTS ] <replaceable class="parameter">extension_name </para> <para> - If the extension specifies a <literal>schema</> parameter in its + If the extension specifies a <literal>schema</literal> parameter in its control file, then that schema cannot be overridden with - a <literal>SCHEMA</> clause. Normally, an error will be raised if - a <literal>SCHEMA</> clause is given and it conflicts with the - extension's <literal>schema</> parameter. However, if - the <literal>CASCADE</> clause is also given, + a <literal>SCHEMA</literal> clause. Normally, an error will be raised if + a <literal>SCHEMA</literal> clause is given and it conflicts with the + extension's <literal>schema</literal> parameter. However, if + the <literal>CASCADE</literal> clause is also given, then <replaceable class="parameter">schema_name</replaceable> is ignored when it conflicts. The given <replaceable class="parameter">schema_name</replaceable> will be used for installation of any needed extensions that do not - specify <literal>schema</> in their control files. + specify <literal>schema</literal> in their control files. </para> <para> @@ -134,13 +134,13 @@ CREATE EXTENSION [ IF NOT EXISTS ] <replaceable class="parameter">extension_name <term><replaceable class="parameter">old_version</replaceable></term> <listitem> <para> - <literal>FROM</> <replaceable class="parameter">old_version</> + <literal>FROM</literal> <replaceable class="parameter">old_version</replaceable> must be specified when, and only when, you are attempting to install - an extension that replaces an <quote>old style</> module that is just + an extension that replaces an <quote>old style</quote> module that is just a collection of objects not packaged into an extension. This option - causes <command>CREATE EXTENSION</> to run an alternative installation + causes <command>CREATE EXTENSION</command> to run an alternative installation script that absorbs the existing objects into the extension, instead - of creating new objects. Be careful that <literal>SCHEMA</> specifies + of creating new objects. Be careful that <literal>SCHEMA</literal> specifies the schema containing these pre-existing objects. </para> @@ -150,7 +150,7 @@ CREATE EXTENSION [ IF NOT EXISTS ] <replaceable class="parameter">extension_name extension's author, and might vary if there is more than one version of the old-style module that can be upgraded into an extension. For the standard additional modules supplied with pre-9.1 - <productname>PostgreSQL</productname>, use <literal>unpackaged</> + <productname>PostgreSQL</productname>, use <literal>unpackaged</literal> for <replaceable class="parameter">old_version</replaceable> when updating a module to extension style. </para> @@ -158,12 +158,12 @@ CREATE EXTENSION [ IF NOT EXISTS ] <replaceable class="parameter">extension_name </varlistentry> <varlistentry> - <term><literal>CASCADE</></term> + <term><literal>CASCADE</literal></term> <listitem> <para> Automatically install any extensions that this extension depends on that are not already installed. Their dependencies are likewise - automatically installed, recursively. The <literal>SCHEMA</> clause, + automatically installed, recursively. The <literal>SCHEMA</literal> clause, if given, applies to all extensions that get installed this way. Other options of the statement are not applied to automatically-installed extensions; in particular, their default @@ -178,7 +178,7 @@ CREATE EXTENSION [ IF NOT EXISTS ] <replaceable class="parameter">extension_name <title>Notes</title> <para> - Before you can use <command>CREATE EXTENSION</> to load an extension + Before you can use <command>CREATE EXTENSION</command> to load an extension into a database, the extension's supporting files must be installed. Information about installing the extensions supplied with <productname>PostgreSQL</productname> can be found in @@ -211,13 +211,13 @@ CREATE EXTENSION hstore; </para> <para> - Update a pre-9.1 installation of <literal>hstore</> into + Update a pre-9.1 installation of <literal>hstore</literal> into extension style: <programlisting> CREATE EXTENSION hstore SCHEMA public FROM unpackaged; </programlisting> Be careful to specify the schema in which you installed the existing - <literal>hstore</> objects. + <literal>hstore</literal> objects. </para> </refsect1> @@ -225,7 +225,7 @@ CREATE EXTENSION hstore SCHEMA public FROM unpackaged; <title>Compatibility</title> <para> - <command>CREATE EXTENSION</command> is a <productname>PostgreSQL</> + <command>CREATE EXTENSION</command> is a <productname>PostgreSQL</productname> extension. </para> </refsect1> diff --git a/doc/src/sgml/ref/create_foreign_data_wrapper.sgml b/doc/src/sgml/ref/create_foreign_data_wrapper.sgml index 1161e05d1c6..87403a55e3b 100644 --- a/doc/src/sgml/ref/create_foreign_data_wrapper.sgml +++ b/doc/src/sgml/ref/create_foreign_data_wrapper.sgml @@ -117,7 +117,7 @@ CREATE FOREIGN DATA WRAPPER <replaceable class="parameter">name</replaceable> <title>Notes</title> <para> - <productname>PostgreSQL</>'s foreign-data functionality is still under + <productname>PostgreSQL</productname>'s foreign-data functionality is still under active development. Optimization of queries is primitive (and mostly left to the wrapper, too). Thus, there is considerable room for future performance improvements. @@ -128,22 +128,22 @@ CREATE FOREIGN DATA WRAPPER <replaceable class="parameter">name</replaceable> <title>Examples</title> <para> - Create a useless foreign-data wrapper <literal>dummy</>: + Create a useless foreign-data wrapper <literal>dummy</literal>: <programlisting> CREATE FOREIGN DATA WRAPPER dummy; </programlisting> </para> <para> - Create a foreign-data wrapper <literal>file</> with - handler function <literal>file_fdw_handler</>: + Create a foreign-data wrapper <literal>file</literal> with + handler function <literal>file_fdw_handler</literal>: <programlisting> CREATE FOREIGN DATA WRAPPER file HANDLER file_fdw_handler; </programlisting> </para> <para> - Create a foreign-data wrapper <literal>mywrapper</> with some + Create a foreign-data wrapper <literal>mywrapper</literal> with some options: <programlisting> CREATE FOREIGN DATA WRAPPER mywrapper @@ -159,7 +159,7 @@ CREATE FOREIGN DATA WRAPPER mywrapper 9075-9 (SQL/MED), with the exception that the <literal>HANDLER</literal> and <literal>VALIDATOR</literal> clauses are extensions and the standard clauses <literal>LIBRARY</literal> and <literal>LANGUAGE</literal> - are not implemented in <productname>PostgreSQL</>. + are not implemented in <productname>PostgreSQL</productname>. </para> <para> diff --git a/doc/src/sgml/ref/create_foreign_table.sgml b/doc/src/sgml/ref/create_foreign_table.sgml index f514b2d59f3..47705fd187e 100644 --- a/doc/src/sgml/ref/create_foreign_table.sgml +++ b/doc/src/sgml/ref/create_foreign_table.sgml @@ -62,7 +62,7 @@ CHECK ( <replaceable class="parameter">expression</replaceable> ) [ NO INHERIT ] <para> If a schema name is given (for example, <literal>CREATE FOREIGN TABLE - myschema.mytable ...</>) then the table is created in the specified + myschema.mytable ...</literal>) then the table is created in the specified schema. Otherwise it is created in the current schema. The name of the foreign table must be distinct from the name of any other foreign table, table, sequence, index, @@ -95,7 +95,7 @@ CHECK ( <replaceable class="parameter">expression</replaceable> ) [ NO INHERIT ] <variablelist> <varlistentry> - <term><literal>IF NOT EXISTS</></term> + <term><literal>IF NOT EXISTS</literal></term> <listitem> <para> Do not throw an error if a relation with the same name already exists. @@ -140,7 +140,7 @@ CHECK ( <replaceable class="parameter">expression</replaceable> ) [ NO INHERIT ] <term><literal>COLLATE <replaceable>collation</replaceable></literal></term> <listitem> <para> - The <literal>COLLATE</> clause assigns a collation to + The <literal>COLLATE</literal> clause assigns a collation to the column (which must be of a collatable data type). If not specified, the column data type's default collation is used. </para> @@ -151,7 +151,7 @@ CHECK ( <replaceable class="parameter">expression</replaceable> ) [ NO INHERIT ] <term><literal>INHERITS ( <replaceable>parent_table</replaceable> [, ... ] )</literal></term> <listitem> <para> - The optional <literal>INHERITS</> clause specifies a list of + The optional <literal>INHERITS</literal> clause specifies a list of tables from which the new foreign table automatically inherits all columns. Parent tables can be plain tables or foreign tables. See the similar form of @@ -166,7 +166,7 @@ CHECK ( <replaceable class="parameter">expression</replaceable> ) [ NO INHERIT ] <para> An optional name for a column or table constraint. If the constraint is violated, the constraint name is present in error messages, - so constraint names like <literal>col must be positive</> can be used + so constraint names like <literal>col must be positive</literal> can be used to communicate helpful constraint information to client applications. (Double-quotes are needed to specify constraint names that contain spaces.) If a constraint name is not specified, the system generates a name. @@ -175,7 +175,7 @@ CHECK ( <replaceable class="parameter">expression</replaceable> ) [ NO INHERIT ] </varlistentry> <varlistentry> - <term><literal>NOT NULL</></term> + <term><literal>NOT NULL</literal></term> <listitem> <para> The column is not allowed to contain null values. @@ -184,7 +184,7 @@ CHECK ( <replaceable class="parameter">expression</replaceable> ) [ NO INHERIT ] </varlistentry> <varlistentry> - <term><literal>NULL</></term> + <term><literal>NULL</literal></term> <listitem> <para> The column is allowed to contain null values. This is the default. @@ -202,7 +202,7 @@ CHECK ( <replaceable class="parameter">expression</replaceable> ) [ NO INHERIT ] <term><literal>CHECK ( <replaceable class="parameter">expression</replaceable> ) [ NO INHERIT ] </literal></term> <listitem> <para> - The <literal>CHECK</> clause specifies an expression producing a + The <literal>CHECK</literal> clause specifies an expression producing a Boolean result which each row in the foreign table is expected to satisfy; that is, the expression should produce TRUE or UNKNOWN, never FALSE, for all rows in the foreign table. @@ -219,7 +219,7 @@ CHECK ( <replaceable class="parameter">expression</replaceable> ) [ NO INHERIT ] </para> <para> - A constraint marked with <literal>NO INHERIT</> will not propagate to + A constraint marked with <literal>NO INHERIT</literal> will not propagate to child tables. </para> </listitem> @@ -230,7 +230,7 @@ CHECK ( <replaceable class="parameter">expression</replaceable> ) [ NO INHERIT ] <replaceable>default_expr</replaceable></literal></term> <listitem> <para> - The <literal>DEFAULT</> clause assigns a default data value for + The <literal>DEFAULT</literal> clause assigns a default data value for the column whose column definition it appears within. The value is any variable-free expression (subqueries and cross-references to other columns in the current table are not allowed). The @@ -279,9 +279,9 @@ CHECK ( <replaceable class="parameter">expression</replaceable> ) [ NO INHERIT ] <title>Notes</title> <para> - Constraints on foreign tables (such as <literal>CHECK</> - or <literal>NOT NULL</> clauses) are not enforced by the - core <productname>PostgreSQL</> system, and most foreign data wrappers + Constraints on foreign tables (such as <literal>CHECK</literal> + or <literal>NOT NULL</literal> clauses) are not enforced by the + core <productname>PostgreSQL</productname> system, and most foreign data wrappers do not attempt to enforce them either; that is, the constraint is simply assumed to hold true. There would be little point in such enforcement since it would only apply to rows inserted or updated via @@ -300,7 +300,7 @@ CHECK ( <replaceable class="parameter">expression</replaceable> ) [ NO INHERIT ] </para> <para> - Although <productname>PostgreSQL</> does not attempt to enforce + Although <productname>PostgreSQL</productname> does not attempt to enforce constraints on foreign tables, it does assume that they are correct for purposes of query optimization. If there are rows visible in the foreign table that do not satisfy a declared constraint, queries on @@ -314,8 +314,8 @@ CHECK ( <replaceable class="parameter">expression</replaceable> ) [ NO INHERIT ] <title>Examples</title> <para> - Create foreign table <structname>films</>, which will be accessed through - the server <structname>film_server</>: + Create foreign table <structname>films</structname>, which will be accessed through + the server <structname>film_server</structname>: <programlisting> CREATE FOREIGN TABLE films ( @@ -330,9 +330,9 @@ SERVER film_server; </programlisting></para> <para> - Create foreign table <structname>measurement_y2016m07</>, which will be - accessed through the server <structname>server_07</>, as a partition - of the range partitioned table <structname>measurement</>: + Create foreign table <structname>measurement_y2016m07</structname>, which will be + accessed through the server <structname>server_07</structname>, as a partition + of the range partitioned table <structname>measurement</structname>: <programlisting> CREATE FOREIGN TABLE measurement_y2016m07 @@ -348,10 +348,10 @@ CREATE FOREIGN TABLE measurement_y2016m07 <para> The <command>CREATE FOREIGN TABLE</command> command largely conforms to the <acronym>SQL</acronym> standard; however, much as with - <link linkend="sql-createtable"><command>CREATE TABLE</></link>, - <literal>NULL</> constraints and zero-column foreign tables are permitted. + <link linkend="sql-createtable"><command>CREATE TABLE</command></link>, + <literal>NULL</literal> constraints and zero-column foreign tables are permitted. The ability to specify column default values is also - a <productname>PostgreSQL</> extension. Table inheritance, in the form + a <productname>PostgreSQL</productname> extension. Table inheritance, in the form defined by <productname>PostgreSQL</productname>, is nonstandard. </para> diff --git a/doc/src/sgml/ref/create_function.sgml b/doc/src/sgml/ref/create_function.sgml index 072e033687b..97cb9b7fc8a 100644 --- a/doc/src/sgml/ref/create_function.sgml +++ b/doc/src/sgml/ref/create_function.sgml @@ -58,7 +58,7 @@ CREATE [ OR REPLACE ] FUNCTION The name of the new function must not match any existing function with the same input argument types in the same schema. However, functions of different argument types can share a name (this is - called <firstterm>overloading</>). + called <firstterm>overloading</firstterm>). </para> <para> @@ -68,13 +68,13 @@ CREATE [ OR REPLACE ] FUNCTION tried, you would actually be creating a new, distinct function). Also, <command>CREATE OR REPLACE FUNCTION</command> will not let you change the return type of an existing function. To do that, - you must drop and recreate the function. (When using <literal>OUT</> + you must drop and recreate the function. (When using <literal>OUT</literal> parameters, that means you cannot change the types of any - <literal>OUT</> parameters except by dropping the function.) + <literal>OUT</literal> parameters except by dropping the function.) </para> <para> - When <command>CREATE OR REPLACE FUNCTION</> is used to replace an + When <command>CREATE OR REPLACE FUNCTION</command> is used to replace an existing function, the ownership and permissions of the function do not change. All other function properties are assigned the values specified or implied in the command. You must own the function @@ -87,7 +87,7 @@ CREATE [ OR REPLACE ] FUNCTION triggers, etc. that refer to the old function. Use <command>CREATE OR REPLACE FUNCTION</command> to change a function definition without breaking objects that refer to the function. - Also, <command>ALTER FUNCTION</> can be used to change most of the + Also, <command>ALTER FUNCTION</command> can be used to change most of the auxiliary properties of an existing function. </para> @@ -121,12 +121,12 @@ CREATE [ OR REPLACE ] FUNCTION <listitem> <para> - The mode of an argument: <literal>IN</>, <literal>OUT</>, - <literal>INOUT</>, or <literal>VARIADIC</>. - If omitted, the default is <literal>IN</>. - Only <literal>OUT</> arguments can follow a <literal>VARIADIC</> one. - Also, <literal>OUT</> and <literal>INOUT</> arguments cannot be used - together with the <literal>RETURNS TABLE</> notation. + The mode of an argument: <literal>IN</literal>, <literal>OUT</literal>, + <literal>INOUT</literal>, or <literal>VARIADIC</literal>. + If omitted, the default is <literal>IN</literal>. + Only <literal>OUT</literal> arguments can follow a <literal>VARIADIC</literal> one. + Also, <literal>OUT</literal> and <literal>INOUT</literal> arguments cannot be used + together with the <literal>RETURNS TABLE</literal> notation. </para> </listitem> </varlistentry> @@ -160,7 +160,7 @@ CREATE [ OR REPLACE ] FUNCTION </para> <para> Depending on the implementation language it might also be allowed - to specify <quote>pseudo-types</> such as <type>cstring</>. + to specify <quote>pseudo-types</quote> such as <type>cstring</type>. Pseudo-types indicate that the actual argument type is either incompletely specified, or outside the set of ordinary SQL data types. </para> @@ -183,7 +183,7 @@ CREATE [ OR REPLACE ] FUNCTION An expression to be used as default value if the parameter is not specified. The expression has to be coercible to the argument type of the parameter. - Only input (including <literal>INOUT</>) parameters can have a default + Only input (including <literal>INOUT</literal>) parameters can have a default value. All input parameters following a parameter with a default value must have default values as well. </para> @@ -199,15 +199,15 @@ CREATE [ OR REPLACE ] FUNCTION can be a base, composite, or domain type, or can reference the type of a table column. Depending on the implementation language it might also be allowed - to specify <quote>pseudo-types</> such as <type>cstring</>. + to specify <quote>pseudo-types</quote> such as <type>cstring</type>. If the function is not supposed to return a value, specify - <type>void</> as the return type. + <type>void</type> as the return type. </para> <para> - When there are <literal>OUT</> or <literal>INOUT</> parameters, - the <literal>RETURNS</> clause can be omitted. If present, it + When there are <literal>OUT</literal> or <literal>INOUT</literal> parameters, + the <literal>RETURNS</literal> clause can be omitted. If present, it must agree with the result type implied by the output parameters: - <literal>RECORD</> if there are multiple output parameters, or + <literal>RECORD</literal> if there are multiple output parameters, or the same type as the single output parameter. </para> <para> @@ -229,10 +229,10 @@ CREATE [ OR REPLACE ] FUNCTION <listitem> <para> - The name of an output column in the <literal>RETURNS TABLE</> + The name of an output column in the <literal>RETURNS TABLE</literal> syntax. This is effectively another way of declaring a named - <literal>OUT</> parameter, except that <literal>RETURNS TABLE</> - also implies <literal>RETURNS SETOF</>. + <literal>OUT</literal> parameter, except that <literal>RETURNS TABLE</literal> + also implies <literal>RETURNS SETOF</literal>. </para> </listitem> </varlistentry> @@ -242,7 +242,7 @@ CREATE [ OR REPLACE ] FUNCTION <listitem> <para> - The data type of an output column in the <literal>RETURNS TABLE</> + The data type of an output column in the <literal>RETURNS TABLE</literal> syntax. </para> </listitem> @@ -284,9 +284,9 @@ CREATE [ OR REPLACE ] FUNCTION <listitem> <para><literal>WINDOW</literal> indicates that the function is a - <firstterm>window function</> rather than a plain function. + <firstterm>window function</firstterm> rather than a plain function. This is currently only useful for functions written in C. - The <literal>WINDOW</> attribute cannot be changed when + The <literal>WINDOW</literal> attribute cannot be changed when replacing an existing function definition. </para> </listitem> @@ -321,20 +321,20 @@ CREATE [ OR REPLACE ] FUNCTION result could change across SQL statements. This is the appropriate selection for functions whose results depend on database lookups, parameter variables (such as the current time zone), etc. (It is - inappropriate for <literal>AFTER</> triggers that wish to + inappropriate for <literal>AFTER</literal> triggers that wish to query rows modified by the current command.) Also note - that the <function>current_timestamp</> family of functions qualify + that the <function>current_timestamp</function> family of functions qualify as stable, since their values do not change within a transaction. </para> <para><literal>VOLATILE</literal> indicates that the function value can change even within a single table scan, so no optimizations can be made. Relatively few database functions are volatile in this sense; - some examples are <literal>random()</>, <literal>currval()</>, - <literal>timeofday()</>. But note that any function that has + some examples are <literal>random()</literal>, <literal>currval()</literal>, + <literal>timeofday()</literal>. But note that any function that has side-effects must be classified volatile, even if its result is quite predictable, to prevent calls from being optimized away; an example is - <literal>setval()</>. + <literal>setval()</literal>. </para> <para> @@ -430,11 +430,11 @@ CREATE [ OR REPLACE ] FUNCTION Functions should be labeled parallel unsafe if they modify any database state, or if they make changes to the transaction such as using sub-transactions, or if they access sequences or attempt to make - persistent changes to settings (e.g. <literal>setval</>). They should + persistent changes to settings (e.g. <literal>setval</literal>). They should be labeled as parallel restricted if they access temporary tables, client connection state, cursors, prepared statements, or miscellaneous backend-local state which the system cannot synchronize in parallel mode - (e.g. <literal>setseed</> cannot be executed other than by the group + (e.g. <literal>setseed</literal> cannot be executed other than by the group leader because a change made by another process would not be reflected in the leader). In general, if a function is labeled as being safe when it is restricted or unsafe, or if it is labeled as being restricted when @@ -443,7 +443,7 @@ CREATE [ OR REPLACE ] FUNCTION exhibit totally undefined behavior if mislabeled, since there is no way for the system to protect itself against arbitrary C code, but in most likely cases the result will be no worse than for any other function. - If in doubt, functions should be labeled as <literal>UNSAFE</>, which is + If in doubt, functions should be labeled as <literal>UNSAFE</literal>, which is the default. </para> </listitem> @@ -483,23 +483,23 @@ CREATE [ OR REPLACE ] FUNCTION <term><replaceable>value</replaceable></term> <listitem> <para> - The <literal>SET</> clause causes the specified configuration + The <literal>SET</literal> clause causes the specified configuration parameter to be set to the specified value when the function is entered, and then restored to its prior value when the function exits. - <literal>SET FROM CURRENT</> saves the value of the parameter that - is current when <command>CREATE FUNCTION</> is executed as the value + <literal>SET FROM CURRENT</literal> saves the value of the parameter that + is current when <command>CREATE FUNCTION</command> is executed as the value to be applied when the function is entered. </para> <para> - If a <literal>SET</> clause is attached to a function, then - the effects of a <command>SET LOCAL</> command executed inside the + If a <literal>SET</literal> clause is attached to a function, then + the effects of a <command>SET LOCAL</command> command executed inside the function for the same variable are restricted to the function: the configuration parameter's prior value is still restored at function exit. However, an ordinary - <command>SET</> command (without <literal>LOCAL</>) overrides the - <literal>SET</> clause, much as it would do for a previous <command>SET - LOCAL</> command: the effects of such a command will persist after + <command>SET</command> command (without <literal>LOCAL</literal>) overrides the + <literal>SET</literal> clause, much as it would do for a previous <command>SET + LOCAL</command> command: the effects of such a command will persist after function exit, unless the current transaction is rolled back. </para> @@ -570,7 +570,7 @@ CREATE [ OR REPLACE ] FUNCTION <variablelist> <varlistentry> - <term><literal>isStrict</></term> + <term><literal>isStrict</literal></term> <listitem> <para> Equivalent to <literal>STRICT</literal> or <literal>RETURNS NULL ON NULL INPUT</literal>. @@ -579,7 +579,7 @@ CREATE [ OR REPLACE ] FUNCTION </varlistentry> <varlistentry> - <term><literal>isCachable</></term> + <term><literal>isCachable</literal></term> <listitem> <para><literal>isCachable</literal> is an obsolete equivalent of <literal>IMMUTABLE</literal>; it's still accepted for @@ -619,7 +619,7 @@ CREATE [ OR REPLACE ] FUNCTION <para> Two functions are considered the same if they have the same names and - <emphasis>input</> argument types, ignoring any <literal>OUT</> + <emphasis>input</emphasis> argument types, ignoring any <literal>OUT</literal> parameters. Thus for example these declarations conflict: <programlisting> CREATE FUNCTION foo(int) ... @@ -635,7 +635,7 @@ CREATE FUNCTION foo(int, out text) ... CREATE FUNCTION foo(int) ... CREATE FUNCTION foo(int, int default 42) ... </programlisting> - A call <literal>foo(10)</> will fail due to the ambiguity about which + A call <literal>foo(10)</literal> will fail due to the ambiguity about which function should be called. </para> @@ -648,16 +648,16 @@ CREATE FUNCTION foo(int, int default 42) ... The full <acronym>SQL</acronym> type syntax is allowed for declaring a function's arguments and return value. However, parenthesized type modifiers (e.g., the precision field for - type <type>numeric</type>) are discarded by <command>CREATE FUNCTION</>. + type <type>numeric</type>) are discarded by <command>CREATE FUNCTION</command>. Thus for example - <literal>CREATE FUNCTION foo (varchar(10)) ...</> + <literal>CREATE FUNCTION foo (varchar(10)) ...</literal> is exactly the same as - <literal>CREATE FUNCTION foo (varchar) ...</>. + <literal>CREATE FUNCTION foo (varchar) ...</literal>. </para> <para> When replacing an existing function with <command>CREATE OR REPLACE - FUNCTION</>, there are restrictions on changing parameter names. + FUNCTION</command>, there are restrictions on changing parameter names. You cannot change the name already assigned to any input parameter (although you can add names to parameters that had none before). If there is more than one output parameter, you cannot change the @@ -668,9 +668,9 @@ CREATE FUNCTION foo(int, int default 42) ... </para> <para> - If a function is declared <literal>STRICT</> with a <literal>VARIADIC</> + If a function is declared <literal>STRICT</literal> with a <literal>VARIADIC</literal> argument, the strictness check tests that the variadic array <emphasis>as - a whole</> is non-null. The function will still be called if the + a whole</emphasis> is non-null. The function will still be called if the array has null elements. </para> @@ -723,7 +723,7 @@ CREATE FUNCTION dup(int) RETURNS dup_result SELECT * FROM dup(42); </programlisting> - Another way to return multiple columns is to use a <literal>TABLE</> + Another way to return multiple columns is to use a <literal>TABLE</literal> function: <programlisting> CREATE FUNCTION dup(int) RETURNS TABLE(f1 int, f2 text) @@ -732,8 +732,8 @@ CREATE FUNCTION dup(int) RETURNS TABLE(f1 int, f2 text) SELECT * FROM dup(42); </programlisting> - However, a <literal>TABLE</> function is different from the - preceding examples, because it actually returns a <emphasis>set</> + However, a <literal>TABLE</literal> function is different from the + preceding examples, because it actually returns a <emphasis>set</emphasis> of records, not just one record. </para> </refsect1> @@ -742,8 +742,8 @@ SELECT * FROM dup(42); <title>Writing <literal>SECURITY DEFINER</literal> Functions Safely</title> <indexterm> - <primary><varname>search_path</varname> configuration parameter</> - <secondary>use in securing functions</> + <primary><varname>search_path</varname> configuration parameter</primary> + <secondary>use in securing functions</secondary> </indexterm> <para> @@ -758,7 +758,7 @@ SELECT * FROM dup(42); temporary-table schema, which is searched first by default, and is normally writable by anyone. A secure arrangement can be obtained by forcing the temporary schema to be searched last. To do this, - write <literal>pg_temp</><indexterm><primary>pg_temp</><secondary>securing functions</></> as the last entry in <varname>search_path</>. + write <literal>pg_temp</literal><indexterm><primary>pg_temp</primary><secondary>securing functions</secondary></indexterm> as the last entry in <varname>search_path</varname>. This function illustrates safe usage: <programlisting> @@ -778,27 +778,27 @@ $$ LANGUAGE plpgsql SET search_path = admin, pg_temp; </programlisting> - This function's intention is to access a table <literal>admin.pwds</>. - But without the <literal>SET</> clause, or with a <literal>SET</> clause - mentioning only <literal>admin</>, the function could be subverted by - creating a temporary table named <literal>pwds</>. + This function's intention is to access a table <literal>admin.pwds</literal>. + But without the <literal>SET</literal> clause, or with a <literal>SET</literal> clause + mentioning only <literal>admin</literal>, the function could be subverted by + creating a temporary table named <literal>pwds</literal>. </para> <para> Before <productname>PostgreSQL</productname> version 8.3, the - <literal>SET</> clause was not available, and so older functions may + <literal>SET</literal> clause was not available, and so older functions may contain rather complicated logic to save, set, and restore - <varname>search_path</>. The <literal>SET</> clause is far easier + <varname>search_path</varname>. The <literal>SET</literal> clause is far easier to use for this purpose. </para> <para> Another point to keep in mind is that by default, execute privilege - is granted to <literal>PUBLIC</> for newly created functions + is granted to <literal>PUBLIC</literal> for newly created functions (see <xref linkend="sql-grant"> for more information). Frequently you will wish to restrict use of a security definer function to only some users. To do that, you must revoke - the default <literal>PUBLIC</> privileges and then grant execute + the default <literal>PUBLIC</literal> privileges and then grant execute privilege selectively. To avoid having a window where the new function is accessible to all, create it and set the privileges within a single transaction. For example: diff --git a/doc/src/sgml/ref/create_index.sgml b/doc/src/sgml/ref/create_index.sgml index a462be790f6..bb2601dc8c8 100644 --- a/doc/src/sgml/ref/create_index.sgml +++ b/doc/src/sgml/ref/create_index.sgml @@ -51,8 +51,8 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT EXISTS ] <replaceable class= one or more columns of the table row. This feature can be used to obtain fast access to data based on some transformation of the basic data. For example, an index computed on - <literal>upper(col)</> would allow the clause - <literal>WHERE upper(col) = 'JIM'</> to use an index. + <literal>upper(col)</literal> would allow the clause + <literal>WHERE upper(col) = 'JIM'</literal> to use an index. </para> <para> @@ -85,7 +85,7 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT EXISTS ] <replaceable class= <para> All functions and operators used in an index definition must be - <quote>immutable</>, that is, their results must depend only on + <quote>immutable</quote>, that is, their results must depend only on their arguments and never on any outside influence (such as the contents of another table or the current time). This restriction ensures that the behavior of the index is well-defined. To use a @@ -115,7 +115,7 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT EXISTS ] <replaceable class= <term><literal>CONCURRENTLY</literal></term> <listitem> <para> - When this option is used, <productname>PostgreSQL</> will build the + When this option is used, <productname>PostgreSQL</productname> will build the index without taking any locks that prevent concurrent inserts, updates, or deletes on the table; whereas a standard index build locks out writes (but not reads) on the table until it's done. @@ -144,7 +144,7 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT EXISTS ] <replaceable class= <para> The name of the index to be created. No schema name can be included here; the index is always created in the same schema as its parent - table. If the name is omitted, <productname>PostgreSQL</> chooses a + table. If the name is omitted, <productname>PostgreSQL</productname> chooses a suitable name based on the parent table's name and the indexed column name(s). </para> @@ -166,8 +166,8 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT EXISTS ] <replaceable class= <para> The name of the index method to be used. Choices are <literal>btree</literal>, <literal>hash</literal>, - <literal>gist</literal>, <literal>spgist</>, <literal>gin</>, and - <literal>brin</>. + <literal>gist</literal>, <literal>spgist</literal>, <literal>gin</literal>, and + <literal>brin</literal>. The default method is <literal>btree</literal>. </para> </listitem> @@ -217,7 +217,7 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT EXISTS ] <replaceable class= </varlistentry> <varlistentry> - <term><literal>ASC</></term> + <term><literal>ASC</literal></term> <listitem> <para> Specifies ascending sort order (which is the default). @@ -226,7 +226,7 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT EXISTS ] <replaceable class= </varlistentry> <varlistentry> - <term><literal>DESC</></term> + <term><literal>DESC</literal></term> <listitem> <para> Specifies descending sort order. @@ -235,21 +235,21 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT EXISTS ] <replaceable class= </varlistentry> <varlistentry> - <term><literal>NULLS FIRST</></term> + <term><literal>NULLS FIRST</literal></term> <listitem> <para> Specifies that nulls sort before non-nulls. This is the default - when <literal>DESC</> is specified. + when <literal>DESC</literal> is specified. </para> </listitem> </varlistentry> <varlistentry> - <term><literal>NULLS LAST</></term> + <term><literal>NULLS LAST</literal></term> <listitem> <para> Specifies that nulls sort after non-nulls. This is the default - when <literal>DESC</> is not specified. + when <literal>DESC</literal> is not specified. </para> </listitem> </varlistentry> @@ -292,15 +292,15 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT EXISTS ] <replaceable class= <title id="SQL-CREATEINDEX-storage-parameters-title">Index Storage Parameters</title> <para> - The optional <literal>WITH</> clause specifies <firstterm>storage - parameters</> for the index. Each index method has its own set of allowed + The optional <literal>WITH</literal> clause specifies <firstterm>storage + parameters</firstterm> for the index. Each index method has its own set of allowed storage parameters. The B-tree, hash, GiST and SP-GiST index methods all accept this parameter: </para> <variablelist> <varlistentry> - <term><literal>fillfactor</></term> + <term><literal>fillfactor</literal></term> <listitem> <para> The fillfactor for an index is a percentage that determines how full @@ -327,14 +327,14 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT EXISTS ] <replaceable class= <variablelist> <varlistentry> - <term><literal>buffering</></term> + <term><literal>buffering</literal></term> <listitem> <para> Determines whether the buffering build technique described in <xref linkend="gist-buffering-build"> is used to build the index. With - <literal>OFF</> it is disabled, with <literal>ON</> it is enabled, and - with <literal>AUTO</> it is initially disabled, but turned on - on-the-fly once the index size reaches <xref linkend="guc-effective-cache-size">. The default is <literal>AUTO</>. + <literal>OFF</literal> it is disabled, with <literal>ON</literal> it is enabled, and + with <literal>AUTO</literal> it is initially disabled, but turned on + on-the-fly once the index size reaches <xref linkend="guc-effective-cache-size">. The default is <literal>AUTO</literal>. </para> </listitem> </varlistentry> @@ -346,23 +346,23 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT EXISTS ] <replaceable class= <variablelist> <varlistentry> - <term><literal>fastupdate</></term> + <term><literal>fastupdate</literal></term> <listitem> <para> This setting controls usage of the fast update technique described in <xref linkend="gin-fast-update">. It is a Boolean parameter: - <literal>ON</> enables fast update, <literal>OFF</> disables it. - (Alternative spellings of <literal>ON</> and <literal>OFF</> are + <literal>ON</literal> enables fast update, <literal>OFF</literal> disables it. + (Alternative spellings of <literal>ON</literal> and <literal>OFF</literal> are allowed as described in <xref linkend="config-setting">.) The - default is <literal>ON</>. + default is <literal>ON</literal>. </para> <note> <para> - Turning <literal>fastupdate</> off via <command>ALTER INDEX</> prevents + Turning <literal>fastupdate</literal> off via <command>ALTER INDEX</command> prevents future insertions from going into the list of pending index entries, but does not in itself flush previous entries. You might want to - <command>VACUUM</> the table or call <function>gin_clean_pending_list</> + <command>VACUUM</command> the table or call <function>gin_clean_pending_list</function> function afterward to ensure the pending list is emptied. </para> </note> @@ -371,7 +371,7 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT EXISTS ] <replaceable class= </variablelist> <variablelist> <varlistentry> - <term><literal>gin_pending_list_limit</></term> + <term><literal>gin_pending_list_limit</literal></term> <listitem> <para> Custom <xref linkend="guc-gin-pending-list-limit"> parameter. @@ -382,23 +382,23 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT EXISTS ] <replaceable class= </variablelist> <para> - <acronym>BRIN</> indexes accept different parameters: + <acronym>BRIN</acronym> indexes accept different parameters: </para> <variablelist> <varlistentry> - <term><literal>pages_per_range</></term> + <term><literal>pages_per_range</literal></term> <listitem> <para> Defines the number of table blocks that make up one block range for - each entry of a <acronym>BRIN</> index (see <xref linkend="brin-intro"> - for more details). The default is <literal>128</>. + each entry of a <acronym>BRIN</acronym> index (see <xref linkend="brin-intro"> + for more details). The default is <literal>128</literal>. </para> </listitem> </varlistentry> <varlistentry> - <term><literal>autosummarize</></term> + <term><literal>autosummarize</literal></term> <listitem> <para> Defines whether a summarization run is invoked for the previous page @@ -419,7 +419,7 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT EXISTS ] <replaceable class= <para> Creating an index can interfere with regular operation of a database. - Normally <productname>PostgreSQL</> locks the table to be indexed against + Normally <productname>PostgreSQL</productname> locks the table to be indexed against writes and performs the entire index build with a single scan of the table. Other transactions can still read the table, but if they try to insert, update, or delete rows in the table they will block until the @@ -430,11 +430,11 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT EXISTS ] <replaceable class= </para> <para> - <productname>PostgreSQL</> supports building indexes without locking + <productname>PostgreSQL</productname> supports building indexes without locking out writes. This method is invoked by specifying the - <literal>CONCURRENTLY</> option of <command>CREATE INDEX</>. + <literal>CONCURRENTLY</literal> option of <command>CREATE INDEX</command>. When this option is used, - <productname>PostgreSQL</> must perform two scans of the table, and in + <productname>PostgreSQL</productname> must perform two scans of the table, and in addition it must wait for all existing transactions that could potentially modify or use the index to terminate. Thus this method requires more total work than a standard index build and takes @@ -452,7 +452,7 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT EXISTS ] <replaceable class= After the second scan, the index build must wait for any transactions that have a snapshot (see <xref linkend="mvcc">) predating the second scan to terminate. Then finally the index can be marked ready for use, - and the <command>CREATE INDEX</> command terminates. + and the <command>CREATE INDEX</command> command terminates. Even then, however, the index may not be immediately usable for queries: in the worst case, it cannot be used as long as transactions exist that predate the start of the index build. @@ -460,11 +460,11 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT EXISTS ] <replaceable class= <para> If a problem arises while scanning the table, such as a deadlock or a - uniqueness violation in a unique index, the <command>CREATE INDEX</> - command will fail but leave behind an <quote>invalid</> index. This index + uniqueness violation in a unique index, the <command>CREATE INDEX</command> + command will fail but leave behind an <quote>invalid</quote> index. This index will be ignored for querying purposes because it might be incomplete; - however it will still consume update overhead. The <application>psql</> - <command>\d</> command will report such an index as <literal>INVALID</>: + however it will still consume update overhead. The <application>psql</application> + <command>\d</command> command will report such an index as <literal>INVALID</literal>: <programlisting> postgres=# \d tab @@ -478,8 +478,8 @@ Indexes: The recommended recovery method in such cases is to drop the index and try again to perform - <command>CREATE INDEX CONCURRENTLY</>. (Another possibility is to rebuild - the index with <command>REINDEX</>. However, since <command>REINDEX</> + <command>CREATE INDEX CONCURRENTLY</command>. (Another possibility is to rebuild + the index with <command>REINDEX</command>. However, since <command>REINDEX</command> does not support concurrent builds, this option is unlikely to seem attractive.) </para> @@ -490,7 +490,7 @@ Indexes: when the second table scan begins. This means that constraint violations could be reported in other queries prior to the index becoming available for use, or even in cases where the index build eventually fails. Also, - if a failure does occur in the second scan, the <quote>invalid</> index + if a failure does occur in the second scan, the <quote>invalid</quote> index continues to enforce its uniqueness constraint afterwards. </para> @@ -505,8 +505,8 @@ Indexes: same table to occur in parallel, but only one concurrent index build can occur on a table at a time. In both cases, no other types of schema modification on the table are allowed meanwhile. Another difference - is that a regular <command>CREATE INDEX</> command can be performed within - a transaction block, but <command>CREATE INDEX CONCURRENTLY</> cannot. + is that a regular <command>CREATE INDEX</command> command can be performed within + a transaction block, but <command>CREATE INDEX CONCURRENTLY</command> cannot. </para> </refsect2> </refsect1> @@ -547,17 +547,17 @@ Indexes: <para> For index methods that support ordered scans (currently, only B-tree), - the optional clauses <literal>ASC</>, <literal>DESC</>, <literal>NULLS - FIRST</>, and/or <literal>NULLS LAST</> can be specified to modify + the optional clauses <literal>ASC</literal>, <literal>DESC</literal>, <literal>NULLS + FIRST</literal>, and/or <literal>NULLS LAST</literal> can be specified to modify the sort ordering of the index. Since an ordered index can be scanned either forward or backward, it is not normally useful to create a - single-column <literal>DESC</> index — that sort ordering is already + single-column <literal>DESC</literal> index — that sort ordering is already available with a regular index. The value of these options is that multicolumn indexes can be created that match the sort ordering requested by a mixed-ordering query, such as <literal>SELECT ... ORDER BY x ASC, y - DESC</>. The <literal>NULLS</> options are useful if you need to support - <quote>nulls sort low</> behavior, rather than the default <quote>nulls - sort high</>, in queries that depend on indexes to avoid sorting steps. + DESC</literal>. The <literal>NULLS</literal> options are useful if you need to support + <quote>nulls sort low</quote> behavior, rather than the default <quote>nulls + sort high</quote>, in queries that depend on indexes to avoid sorting steps. </para> <para> @@ -577,8 +577,8 @@ Indexes: Prior releases of <productname>PostgreSQL</productname> also had an R-tree index method. This method has been removed because it had no significant advantages over the GiST method. - If <literal>USING rtree</> is specified, <command>CREATE INDEX</> - will interpret it as <literal>USING gist</>, to simplify conversion + If <literal>USING rtree</literal> is specified, <command>CREATE INDEX</command> + will interpret it as <literal>USING gist</literal>, to simplify conversion of old databases to GiST. </para> </refsect1> @@ -595,13 +595,13 @@ CREATE UNIQUE INDEX title_idx ON films (title); </para> <para> - To create an index on the expression <literal>lower(title)</>, + To create an index on the expression <literal>lower(title)</literal>, allowing efficient case-insensitive searches: <programlisting> CREATE INDEX ON films ((lower(title))); </programlisting> (In this example we have chosen to omit the index name, so the system - will choose a name, typically <literal>films_lower_idx</>.) + will choose a name, typically <literal>films_lower_idx</literal>.) </para> <para> @@ -626,16 +626,16 @@ CREATE UNIQUE INDEX title_idx ON films (title) WITH (fillfactor = 70); </para> <para> - To create a <acronym>GIN</> index with fast updates disabled: + To create a <acronym>GIN</acronym> index with fast updates disabled: <programlisting> CREATE INDEX gin_idx ON documents_table USING GIN (locations) WITH (fastupdate = off); </programlisting> </para> <para> - To create an index on the column <literal>code</> in the table - <literal>films</> and have the index reside in the tablespace - <literal>indexspace</>: + To create an index on the column <literal>code</literal> in the table + <literal>films</literal> and have the index reside in the tablespace + <literal>indexspace</literal>: <programlisting> CREATE INDEX code_idx ON films (code) TABLESPACE indexspace; </programlisting> diff --git a/doc/src/sgml/ref/create_language.sgml b/doc/src/sgml/ref/create_language.sgml index 75165b677f1..20d56a766f3 100644 --- a/doc/src/sgml/ref/create_language.sgml +++ b/doc/src/sgml/ref/create_language.sgml @@ -40,14 +40,14 @@ CREATE [ OR REPLACE ] [ TRUSTED ] [ PROCEDURAL ] LANGUAGE <replaceable class="pa <note> <para> As of <productname>PostgreSQL</productname> 9.1, most procedural - languages have been made into <quote>extensions</>, and should + languages have been made into <quote>extensions</quote>, and should therefore be installed with <xref linkend="sql-createextension"> not <command>CREATE LANGUAGE</command>. Direct use of <command>CREATE LANGUAGE</command> should now be confined to - extension installation scripts. If you have a <quote>bare</> + extension installation scripts. If you have a <quote>bare</quote> language in your database, perhaps as a result of an upgrade, you can convert it to an extension using - <literal>CREATE EXTENSION <replaceable>langname</> FROM + <literal>CREATE EXTENSION <replaceable>langname</replaceable> FROM unpackaged</literal>. </para> </note> @@ -67,11 +67,11 @@ CREATE [ OR REPLACE ] [ TRUSTED ] [ PROCEDURAL ] LANGUAGE <replaceable class="pa system catalog to determine the correct parameters. In the second form, the user supplies the language parameters along with the language name. The second form can be used to create a language that is not defined in - <structname>pg_pltemplate</>, but this approach is considered obsolescent. + <structname>pg_pltemplate</structname>, but this approach is considered obsolescent. </para> <para> - When the server finds an entry in the <structname>pg_pltemplate</> catalog + When the server finds an entry in the <structname>pg_pltemplate</structname> catalog for the given language name, it will use the catalog data even if the command includes language parameters. This behavior simplifies loading of old dump files, which are likely to contain out-of-date information @@ -84,7 +84,7 @@ CREATE [ OR REPLACE ] [ TRUSTED ] [ PROCEDURAL ] LANGUAGE <replaceable class="pa register a new language. However, the owner of a database can register a new language within that database if the language is listed in the <structname>pg_pltemplate</structname> catalog and is marked - as allowed to be created by database owners (<structfield>tmpldbacreate</> + as allowed to be created by database owners (<structfield>tmpldbacreate</structfield> is true). The default is that trusted languages can be created by database owners, but this can be adjusted by superusers by modifying the contents of <structname>pg_pltemplate</structname>. @@ -101,9 +101,9 @@ CREATE [ OR REPLACE ] [ TRUSTED ] [ PROCEDURAL ] LANGUAGE <replaceable class="pa and any existing functions written in the language are assumed to still be valid. In addition to the normal privilege requirements for creating a language, the user must be superuser or owner of the existing language. - The <literal>REPLACE</> case is mainly meant to be used to + The <literal>REPLACE</literal> case is mainly meant to be used to ensure that the language exists. If the language has a - <structname>pg_pltemplate</structname> entry then <literal>REPLACE</> + <structname>pg_pltemplate</structname> entry then <literal>REPLACE</literal> will not actually change anything about an existing definition, except in the unusual case where the <structname>pg_pltemplate</structname> entry has been modified since the language was created. @@ -184,9 +184,9 @@ CREATE [ OR REPLACE ] [ TRUSTED ] [ PROCEDURAL ] LANGUAGE <replaceable class="pa function is specified, the language does not support anonymous code blocks. The handler function must take one argument of - type <type>internal</type>, which will be the <command>DO</> command's + type <type>internal</type>, which will be the <command>DO</command> command's internal representation, and it will typically return - <type>void</>. The return value of the handler is ignored. + <type>void</type>. The return value of the handler is ignored. </para> </listitem> </varlistentry> @@ -204,7 +204,7 @@ CREATE [ OR REPLACE ] [ TRUSTED ] [ PROCEDURAL ] LANGUAGE <replaceable class="pa be checked when it is created. The validator function must take one argument of type <type>oid</type>, which will be the OID of the - to-be-created function, and will typically return <type>void</>. + to-be-created function, and will typically return <type>void</type>. </para> <para> @@ -220,9 +220,9 @@ CREATE [ OR REPLACE ] [ TRUSTED ] [ PROCEDURAL ] LANGUAGE <replaceable class="pa </variablelist> <para> - The <literal>TRUSTED</> option and the support function name(s) are + The <literal>TRUSTED</literal> option and the support function name(s) are ignored if the server has an entry for the specified language - name in <structname>pg_pltemplate</>. + name in <structname>pg_pltemplate</structname>. </para> </refsect1> @@ -243,7 +243,7 @@ CREATE [ OR REPLACE ] [ TRUSTED ] [ PROCEDURAL ] LANGUAGE <replaceable class="pa <para> To create functions in a procedural language, a user must have the <literal>USAGE</literal> privilege for the language. By default, - <literal>USAGE</> is granted to <literal>PUBLIC</> (i.e., everyone) + <literal>USAGE</literal> is granted to <literal>PUBLIC</literal> (i.e., everyone) for trusted languages. This can be revoked if desired. </para> @@ -258,10 +258,10 @@ CREATE [ OR REPLACE ] [ TRUSTED ] [ PROCEDURAL ] LANGUAGE <replaceable class="pa The call handler function, the inline handler function (if any), and the validator function (if any) must already exist if the server does not have an entry for the language - in <structname>pg_pltemplate</>. But when there is an entry, + in <structname>pg_pltemplate</structname>. But when there is an entry, the functions need not already exist; they will be automatically defined if not present in the database. - (This might result in <command>CREATE LANGUAGE</> failing, if the + (This might result in <command>CREATE LANGUAGE</command> failing, if the shared library that implements the language is not available in the installation.) </para> @@ -269,11 +269,11 @@ CREATE [ OR REPLACE ] [ TRUSTED ] [ PROCEDURAL ] LANGUAGE <replaceable class="pa <para> In <productname>PostgreSQL</productname> versions before 7.3, it was necessary to declare handler functions as returning the placeholder - type <type>opaque</>, rather than <type>language_handler</>. + type <type>opaque</type>, rather than <type>language_handler</type>. To support loading - of old dump files, <command>CREATE LANGUAGE</> will accept a function - declared as returning <type>opaque</>, but it will issue a notice and - change the function's declared return type to <type>language_handler</>. + of old dump files, <command>CREATE LANGUAGE</command> will accept a function + declared as returning <type>opaque</type>, but it will issue a notice and + change the function's declared return type to <type>language_handler</type>. </para> </refsect1> @@ -289,7 +289,7 @@ CREATE LANGUAGE plperl; </para> <para> - For a language not known in the <structname>pg_pltemplate</> catalog, a + For a language not known in the <structname>pg_pltemplate</structname> catalog, a sequence such as this is needed: <programlisting> CREATE FUNCTION plsample_call_handler() RETURNS language_handler diff --git a/doc/src/sgml/ref/create_materialized_view.sgml b/doc/src/sgml/ref/create_materialized_view.sgml index 577893fe929..126aa5666f8 100644 --- a/doc/src/sgml/ref/create_materialized_view.sgml +++ b/doc/src/sgml/ref/create_materialized_view.sgml @@ -36,13 +36,13 @@ CREATE MATERIALIZED VIEW [ IF NOT EXISTS ] <replaceable>table_name</replaceable> <para> <command>CREATE MATERIALIZED VIEW</command> defines a materialized view of a query. The query is executed and used to populate the view at the time - the command is issued (unless <command>WITH NO DATA</> is used) and may be + the command is issued (unless <command>WITH NO DATA</command> is used) and may be refreshed later using <command>REFRESH MATERIALIZED VIEW</command>. </para> <para> <command>CREATE MATERIALIZED VIEW</command> is similar to - <command>CREATE TABLE AS</>, except that it also remembers the query used + <command>CREATE TABLE AS</command>, except that it also remembers the query used to initialize the view, so that it can be refreshed later upon demand. A materialized view has many of the same properties as a table, but there is no support for temporary materialized views or automatic generation of @@ -55,7 +55,7 @@ CREATE MATERIALIZED VIEW [ IF NOT EXISTS ] <replaceable>table_name</replaceable> <variablelist> <varlistentry> - <term><literal>IF NOT EXISTS</></term> + <term><literal>IF NOT EXISTS</literal></term> <listitem> <para> Do not throw an error if a materialized view with the same name already @@ -125,13 +125,13 @@ CREATE MATERIALIZED VIEW [ IF NOT EXISTS ] <replaceable>table_name</replaceable> </varlistentry> <varlistentry> - <term><literal>WITH [ NO ] DATA</></term> + <term><literal>WITH [ NO ] DATA</literal></term> <listitem> <para> This clause specifies whether or not the materialized view should be populated at creation time. If not, the materialized view will be flagged as unscannable and cannot be queried until <command>REFRESH - MATERIALIZED VIEW</> is used. + MATERIALIZED VIEW</command> is used. </para> </listitem> </varlistentry> diff --git a/doc/src/sgml/ref/create_opclass.sgml b/doc/src/sgml/ref/create_opclass.sgml index 829d8f2fffb..08eb7f2a083 100644 --- a/doc/src/sgml/ref/create_opclass.sgml +++ b/doc/src/sgml/ref/create_opclass.sgml @@ -37,7 +37,7 @@ CREATE OPERATOR CLASS <replaceable class="parameter">name</replaceable> [ DEFAUL <command>CREATE OPERATOR CLASS</command> creates a new operator class. An operator class defines how a particular data type can be used with an index. The operator class specifies that certain operators will fill - particular roles or <quote>strategies</> for this data type and this + particular roles or <quote>strategies</quote> for this data type and this index method. The operator class also specifies the support procedures to be used by the index method when the operator class is selected for an @@ -69,8 +69,8 @@ CREATE OPERATOR CLASS <replaceable class="parameter">name</replaceable> [ DEFAUL <para> Related operator classes can be grouped into <firstterm>operator - families</>. To add a new operator class to an existing family, - specify the <literal>FAMILY</> option in <command>CREATE OPERATOR + families</firstterm>. To add a new operator class to an existing family, + specify the <literal>FAMILY</literal> option in <command>CREATE OPERATOR CLASS</command>. Without this option, the new class is placed into a family named the same as the new class (creating that family if it doesn't already exist). @@ -96,7 +96,7 @@ CREATE OPERATOR CLASS <replaceable class="parameter">name</replaceable> [ DEFAUL </varlistentry> <varlistentry> - <term><literal>DEFAULT</></term> + <term><literal>DEFAULT</literal></term> <listitem> <para> If present, the operator class will become the default @@ -159,15 +159,15 @@ CREATE OPERATOR CLASS <replaceable class="parameter">name</replaceable> [ DEFAUL <term><replaceable class="parameter">op_type</replaceable></term> <listitem> <para> - In an <literal>OPERATOR</> clause, - the operand data type(s) of the operator, or <literal>NONE</> to + In an <literal>OPERATOR</literal> clause, + the operand data type(s) of the operator, or <literal>NONE</literal> to signify a left-unary or right-unary operator. The operand data types can be omitted in the normal case where they are the same as the operator class's data type. </para> <para> - In a <literal>FUNCTION</> clause, the operand data type(s) the + In a <literal>FUNCTION</literal> clause, the operand data type(s) the function is intended to support, if different from the input data type(s) of the function (for B-tree comparison functions and hash functions) @@ -175,7 +175,7 @@ CREATE OPERATOR CLASS <replaceable class="parameter">name</replaceable> [ DEFAUL functions in GiST, SP-GiST, GIN and BRIN operator classes). These defaults are correct, and so <replaceable class="parameter">op_type</replaceable> need not be specified in - <literal>FUNCTION</> clauses, except for the case of a B-tree sort + <literal>FUNCTION</literal> clauses, except for the case of a B-tree sort support function that is meant to support cross-data-type comparisons. </para> </listitem> @@ -191,8 +191,8 @@ CREATE OPERATOR CLASS <replaceable class="parameter">name</replaceable> [ DEFAUL </para> <para> - If neither <literal>FOR SEARCH</> nor <literal>FOR ORDER BY</> is - specified, <literal>FOR SEARCH</> is the default. + If neither <literal>FOR SEARCH</literal> nor <literal>FOR ORDER BY</literal> is + specified, <literal>FOR SEARCH</literal> is the default. </para> </listitem> </varlistentry> @@ -233,11 +233,11 @@ CREATE OPERATOR CLASS <replaceable class="parameter">name</replaceable> [ DEFAUL The data type actually stored in the index. Normally this is the same as the column data type, but some index methods (currently GiST, GIN and BRIN) allow it to be different. The - <literal>STORAGE</> clause must be omitted unless the index + <literal>STORAGE</literal> clause must be omitted unless the index method allows a different type to be used. - If the column <replaceable class="parameter">data_type</> is specified - as <type>anyarray</>, the <replaceable class="parameter">storage_type</> - can be declared as <type>anyelement</> to indicate that the index + If the column <replaceable class="parameter">data_type</replaceable> is specified + as <type>anyarray</type>, the <replaceable class="parameter">storage_type</replaceable> + can be declared as <type>anyelement</type> to indicate that the index entries are members of the element type belonging to the actual array type that each particular index is created for. </para> @@ -246,7 +246,7 @@ CREATE OPERATOR CLASS <replaceable class="parameter">name</replaceable> [ DEFAUL </variablelist> <para> - The <literal>OPERATOR</>, <literal>FUNCTION</>, and <literal>STORAGE</> + The <literal>OPERATOR</literal>, <literal>FUNCTION</literal>, and <literal>STORAGE</literal> clauses can appear in any order. </para> </refsect1> @@ -269,9 +269,9 @@ CREATE OPERATOR CLASS <replaceable class="parameter">name</replaceable> [ DEFAUL </para> <para> - Before <productname>PostgreSQL</productname> 8.4, the <literal>OPERATOR</> - clause could include a <literal>RECHECK</> option. This is no longer - supported because whether an index operator is <quote>lossy</> is now + Before <productname>PostgreSQL</productname> 8.4, the <literal>OPERATOR</literal> + clause could include a <literal>RECHECK</literal> option. This is no longer + supported because whether an index operator is <quote>lossy</quote> is now determined on-the-fly at run time. This allows efficient handling of cases where an operator might or might not be lossy. </para> @@ -282,7 +282,7 @@ CREATE OPERATOR CLASS <replaceable class="parameter">name</replaceable> [ DEFAUL <para> The following example command defines a GiST index operator class - for the data type <literal>_int4</> (array of <type>int4</type>). See the + for the data type <literal>_int4</literal> (array of <type>int4</type>). See the <xref linkend="intarray"> module for the complete example. </para> diff --git a/doc/src/sgml/ref/create_operator.sgml b/doc/src/sgml/ref/create_operator.sgml index 818e3a2315a..11c38fd38be 100644 --- a/doc/src/sgml/ref/create_operator.sgml +++ b/doc/src/sgml/ref/create_operator.sgml @@ -43,7 +43,7 @@ CREATE OPERATOR <replaceable>name</replaceable> ( </para> <para> - The operator name is a sequence of up to <symbol>NAMEDATALEN</>-1 + The operator name is a sequence of up to <symbol>NAMEDATALEN</symbol>-1 (63 by default) characters from the following list: <literallayout> + - * / < > = ~ ! @ # % ^ & | ` ? @@ -72,7 +72,7 @@ CREATE OPERATOR <replaceable>name</replaceable> ( </listitem> <listitem> <para> - The use of <literal>=></> as an operator name is deprecated. It may + The use of <literal>=></literal> as an operator name is deprecated. It may be disallowed altogether in a future release. </para> </listitem> @@ -86,10 +86,10 @@ CREATE OPERATOR <replaceable>name</replaceable> ( </para> <para> - At least one of <literal>LEFTARG</> and <literal>RIGHTARG</> must be defined. For + At least one of <literal>LEFTARG</literal> and <literal>RIGHTARG</literal> must be defined. For binary operators, both must be defined. For right unary - operators, only <literal>LEFTARG</> should be defined, while for left - unary operators only <literal>RIGHTARG</> should be defined. + operators, only <literal>LEFTARG</literal> should be defined, while for left + unary operators only <literal>RIGHTARG</literal> should be defined. </para> <para> @@ -122,11 +122,11 @@ CREATE OPERATOR <replaceable>name</replaceable> ( <para> The name of the operator to be defined. See above for allowable characters. The name can be schema-qualified, for example - <literal>CREATE OPERATOR myschema.+ (...)</>. If not, then + <literal>CREATE OPERATOR myschema.+ (...)</literal>. If not, then the operator is created in the current schema. Two operators in the same schema can have the same name if they operate on different data types. This is called - <firstterm>overloading</>. + <firstterm>overloading</firstterm>. </para> </listitem> </varlistentry> @@ -218,7 +218,7 @@ CREATE OPERATOR <replaceable>name</replaceable> ( <para> To give a schema-qualified operator name in <replaceable class="parameter">com_op</replaceable> or the other optional - arguments, use the <literal>OPERATOR()</> syntax, for example: + arguments, use the <literal>OPERATOR()</literal> syntax, for example: <programlisting> COMMUTATOR = OPERATOR(myschema.===) , </programlisting></para> @@ -233,18 +233,18 @@ COMMUTATOR = OPERATOR(myschema.===) , <para> It is not possible to specify an operator's lexical precedence in - <command>CREATE OPERATOR</>, because the parser's precedence behavior + <command>CREATE OPERATOR</command>, because the parser's precedence behavior is hard-wired. See <xref linkend="sql-precedence"> for precedence details. </para> <para> - The obsolete options <literal>SORT1</>, <literal>SORT2</>, - <literal>LTCMP</>, and <literal>GTCMP</> were formerly used to + The obsolete options <literal>SORT1</literal>, <literal>SORT2</literal>, + <literal>LTCMP</literal>, and <literal>GTCMP</literal> were formerly used to specify the names of sort operators associated with a merge-joinable operator. This is no longer necessary, since information about associated operators is found by looking at B-tree operator families instead. If one of these options is given, it is ignored except - for implicitly setting <literal>MERGES</> true. + for implicitly setting <literal>MERGES</literal> true. </para> <para> diff --git a/doc/src/sgml/ref/create_opfamily.sgml b/doc/src/sgml/ref/create_opfamily.sgml index c4bcf0863ef..ca5261b7a08 100644 --- a/doc/src/sgml/ref/create_opfamily.sgml +++ b/doc/src/sgml/ref/create_opfamily.sgml @@ -35,7 +35,7 @@ CREATE OPERATOR FAMILY <replaceable class="parameter">name</replaceable> USING < compatible with these operator classes but not essential for the functioning of any individual index. (Operators and functions that are essential to indexes should be grouped within the relevant operator - class, rather than being <quote>loose</> in the operator family. + class, rather than being <quote>loose</quote> in the operator family. Typically, single-data-type operators are bound to operator classes, while cross-data-type operators can be loose in an operator family containing operator classes for both data types.) @@ -45,7 +45,7 @@ CREATE OPERATOR FAMILY <replaceable class="parameter">name</replaceable> USING < The new operator family is initially empty. It should be populated by issuing subsequent <command>CREATE OPERATOR CLASS</command> commands to add contained operator classes, and optionally - <command>ALTER OPERATOR FAMILY</command> commands to add <quote>loose</> + <command>ALTER OPERATOR FAMILY</command> commands to add <quote>loose</quote> operators and their corresponding support functions. </para> diff --git a/doc/src/sgml/ref/create_policy.sgml b/doc/src/sgml/ref/create_policy.sgml index 70df22c0593..1bcf2de4290 100644 --- a/doc/src/sgml/ref/create_policy.sgml +++ b/doc/src/sgml/ref/create_policy.sgml @@ -88,7 +88,7 @@ CREATE POLICY <replaceable class="parameter">name</replaceable> ON <replaceable <para> If row-level security is enabled for a table, but no applicable policies - exist, a <quote>default deny</> policy is assumed, so that no rows will + exist, a <quote>default deny</quote> policy is assumed, so that no rows will be visible or updatable. </para> </refsect1> @@ -188,9 +188,9 @@ CREATE POLICY <replaceable class="parameter">name</replaceable> ON <replaceable to queries that refer to the table if row level security is enabled. Rows for which the expression returns true will be visible. Any rows for which the expression returns false or null will not be - visible to the user (in a <command>SELECT</>), and will not be - available for modification (in an <command>UPDATE</> - or <command>DELETE</>). Such rows are silently suppressed; no error + visible to the user (in a <command>SELECT</command>), and will not be + available for modification (in an <command>UPDATE</command> + or <command>DELETE</command>). Such rows are silently suppressed; no error is reported. </para> </listitem> @@ -223,7 +223,7 @@ CREATE POLICY <replaceable class="parameter">name</replaceable> ON <replaceable <variablelist> <varlistentry id="SQL-CREATEPOLICY-ALL"> - <term><literal>ALL</></term> + <term><literal>ALL</literal></term> <listitem> <para> Using <literal>ALL</literal> for a policy means that it will apply @@ -254,7 +254,7 @@ CREATE POLICY <replaceable class="parameter">name</replaceable> ON <replaceable </varlistentry> <varlistentry id="SQL-CREATEPOLICY-SELECT"> - <term><literal>SELECT</></term> + <term><literal>SELECT</literal></term> <listitem> <para> Using <literal>SELECT</literal> for a policy means that it will apply @@ -274,7 +274,7 @@ CREATE POLICY <replaceable class="parameter">name</replaceable> ON <replaceable </varlistentry> <varlistentry id="SQL-CREATEPOLICY-INSERT"> - <term><literal>INSERT</></term> + <term><literal>INSERT</literal></term> <listitem> <para> Using <literal>INSERT</literal> for a policy means that it will apply @@ -295,7 +295,7 @@ CREATE POLICY <replaceable class="parameter">name</replaceable> ON <replaceable </varlistentry> <varlistentry id="SQL-CREATEPOLICY-UPDATE"> - <term><literal>UPDATE</></term> + <term><literal>UPDATE</literal></term> <listitem> <para> Using <literal>UPDATE</literal> for a policy means that it will apply @@ -347,14 +347,14 @@ CREATE POLICY <replaceable class="parameter">name</replaceable> ON <replaceable Note, however, that unlike a standalone <literal>UPDATE</literal> command, if the existing row does not pass the <literal>USING</literal> expressions, an error will be thrown (the - <literal>UPDATE</literal> path will <emphasis>never</> be silently + <literal>UPDATE</literal> path will <emphasis>never</emphasis> be silently avoided). </para> </listitem> </varlistentry> <varlistentry id="SQL-CREATEPOLICY-DELETE"> - <term><literal>DELETE</></term> + <term><literal>DELETE</literal></term> <listitem> <para> Using <literal>DELETE</literal> for a policy means that it will apply diff --git a/doc/src/sgml/ref/create_publication.sgml b/doc/src/sgml/ref/create_publication.sgml index 62a5fd432e6..b997d387e77 100644 --- a/doc/src/sgml/ref/create_publication.sgml +++ b/doc/src/sgml/ref/create_publication.sgml @@ -64,10 +64,10 @@ CREATE PUBLICATION <replaceable class="parameter">name</replaceable> <listitem> <para> Specifies a list of tables to add to the publication. If - <literal>ONLY</> is specified before the table name, only - that table is added to the publication. If <literal>ONLY</> is not + <literal>ONLY</literal> is specified before the table name, only + that table is added to the publication. If <literal>ONLY</literal> is not specified, the table and all its descendant tables (if any) are added. - Optionally, <literal>*</> can be specified after the table name to + Optionally, <literal>*</literal> can be specified after the table name to explicitly indicate that descendant tables are included. </para> @@ -138,7 +138,7 @@ CREATE PUBLICATION <replaceable class="parameter">name</replaceable> <para> To create a publication, the invoking user must have the - <literal>CREATE</> privilege for the current database. + <literal>CREATE</literal> privilege for the current database. (Of course, superusers bypass this check.) </para> @@ -151,12 +151,12 @@ CREATE PUBLICATION <replaceable class="parameter">name</replaceable> <para> The tables added to a publication that publishes <command>UPDATE</command> and/or <command>DELETE</command> operations must have - <literal>REPLICA IDENTITY</> defined. Otherwise those operations will be + <literal>REPLICA IDENTITY</literal> defined. Otherwise those operations will be disallowed on those tables. </para> <para> - For an <command>INSERT ... ON CONFLICT</> command, the publication will + For an <command>INSERT ... ON CONFLICT</command> command, the publication will publish the operation that actually results from the command. So depending of the outcome, it may be published as either <command>INSERT</command> or <command>UPDATE</command>, or it may not be published at all. @@ -203,7 +203,7 @@ CREATE PUBLICATION insert_only FOR TABLE mydata <title>Compatibility</title> <para> - <command>CREATE PUBLICATION</command> is a <productname>PostgreSQL</> + <command>CREATE PUBLICATION</command> is a <productname>PostgreSQL</productname> extension. </para> </refsect1> diff --git a/doc/src/sgml/ref/create_role.sgml b/doc/src/sgml/ref/create_role.sgml index 41670c4b059..4a4061a2371 100644 --- a/doc/src/sgml/ref/create_role.sgml +++ b/doc/src/sgml/ref/create_role.sgml @@ -51,11 +51,11 @@ CREATE ROLE <replaceable class="parameter">name</replaceable> [ [ WITH ] <replac <command>CREATE ROLE</command> adds a new role to a <productname>PostgreSQL</productname> database cluster. A role is an entity that can own database objects and have database privileges; - a role can be considered a <quote>user</>, a <quote>group</>, or both + a role can be considered a <quote>user</quote>, a <quote>group</quote>, or both depending on how it is used. Refer to <xref linkend="user-manag"> and <xref linkend="client-authentication"> for information about managing - users and authentication. You must have <literal>CREATEROLE</> + users and authentication. You must have <literal>CREATEROLE</literal> privilege or be a database superuser to use this command. </para> @@ -83,7 +83,7 @@ CREATE ROLE <replaceable class="parameter">name</replaceable> [ [ WITH ] <replac <term><literal>NOSUPERUSER</literal></term> <listitem> <para> - These clauses determine whether the new role is a <quote>superuser</>, + These clauses determine whether the new role is a <quote>superuser</quote>, who can override all access restrictions within the database. Superuser status is dangerous and should be used only when really needed. You must yourself be a superuser to create a new superuser. @@ -94,8 +94,8 @@ CREATE ROLE <replaceable class="parameter">name</replaceable> [ [ WITH ] <replac </varlistentry> <varlistentry> - <term><literal>CREATEDB</></term> - <term><literal>NOCREATEDB</></term> + <term><literal>CREATEDB</literal></term> + <term><literal>NOCREATEDB</literal></term> <listitem> <para> These clauses define a role's ability to create databases. If @@ -128,13 +128,13 @@ CREATE ROLE <replaceable class="parameter">name</replaceable> [ [ WITH ] <replac <term><literal>NOINHERIT</literal></term> <listitem> <para> - These clauses determine whether a role <quote>inherits</> the + These clauses determine whether a role <quote>inherits</quote> the privileges of roles it is a member of. A role with the <literal>INHERIT</literal> attribute can automatically use whatever database privileges have been granted to all roles it is directly or indirectly a member of. Without <literal>INHERIT</literal>, membership in another role - only grants the ability to <command>SET ROLE</> to that other role; + only grants the ability to <command>SET ROLE</command> to that other role; the privileges of the other role are only available after having done so. If not specified, @@ -156,7 +156,7 @@ CREATE ROLE <replaceable class="parameter">name</replaceable> [ [ WITH ] <replac privileges, but are not users in the usual sense of the word. If not specified, <literal>NOLOGIN</literal> is the default, except when - <command>CREATE ROLE</> is invoked through its alternative spelling + <command>CREATE ROLE</command> is invoked through its alternative spelling <xref linkend="sql-createuser">. </para> </listitem> @@ -172,7 +172,7 @@ CREATE ROLE <replaceable class="parameter">name</replaceable> [ [ WITH ] <replac connect to the server in replication mode (physical or logical replication) and in order to be able to create or drop replication slots. - A role having the <literal>REPLICATION</> attribute is a very + A role having the <literal>REPLICATION</literal> attribute is a very highly privileged role, and should only be used on roles actually used for replication. If not specified, <literal>NOREPLICATION</literal> is the default. @@ -210,7 +210,7 @@ CREATE ROLE <replaceable class="parameter">name</replaceable> [ [ WITH ] <replac </varlistentry> <varlistentry> - <term>[ <literal>ENCRYPTED</> ] <literal>PASSWORD</> <replaceable class="parameter">password</replaceable></term> + <term>[ <literal>ENCRYPTED</literal> ] <literal>PASSWORD</literal> <replaceable class="parameter">password</replaceable></term> <listitem> <para> Sets the role's password. (A password is only of use for @@ -225,7 +225,7 @@ CREATE ROLE <replaceable class="parameter">name</replaceable> [ [ WITH ] <replac <note> <para> Specifying an empty string will also set the password to null, - but that was not the case before <productname>PostgreSQL</> + but that was not the case before <productname>PostgreSQL</productname> version 10. In earlier versions, an empty string could be used, or not, depending on the authentication method and the exact version, and libpq would refuse to use it in any case. @@ -235,12 +235,12 @@ CREATE ROLE <replaceable class="parameter">name</replaceable> [ [ WITH ] <replac </note> <para> The password is always stored encrypted in the system catalogs. The - <literal>ENCRYPTED</> keyword has no effect, but is accepted for + <literal>ENCRYPTED</literal> keyword has no effect, but is accepted for backwards compatibility. The method of encryption is determined by the configuration parameter <xref linkend="guc-password-encryption">. If the presented password string is already in MD5-encrypted or SCRAM-encrypted format, then it is stored as-is regardless of - <varname>password_encryption</> (since the system cannot decrypt + <varname>password_encryption</varname> (since the system cannot decrypt the specified encrypted password string, to encrypt it in a different format). This allows reloading of encrypted passwords during dump/restore. @@ -260,61 +260,61 @@ CREATE ROLE <replaceable class="parameter">name</replaceable> [ [ WITH ] <replac </varlistentry> <varlistentry> - <term><literal>IN ROLE</> <replaceable class="parameter">role_name</replaceable></term> + <term><literal>IN ROLE</literal> <replaceable class="parameter">role_name</replaceable></term> <listitem> <para> The <literal>IN ROLE</literal> clause lists one or more existing roles to which the new role will be immediately added as a new member. (Note that there is no option to add the new role as an - administrator; use a separate <command>GRANT</> command to do that.) + administrator; use a separate <command>GRANT</command> command to do that.) </para> </listitem> </varlistentry> <varlistentry> - <term><literal>IN GROUP</> <replaceable class="parameter">role_name</replaceable></term> + <term><literal>IN GROUP</literal> <replaceable class="parameter">role_name</replaceable></term> <listitem> <para><literal>IN GROUP</literal> is an obsolete spelling of - <literal>IN ROLE</>. + <literal>IN ROLE</literal>. </para> </listitem> </varlistentry> <varlistentry> - <term><literal>ROLE</> <replaceable class="parameter">role_name</replaceable></term> + <term><literal>ROLE</literal> <replaceable class="parameter">role_name</replaceable></term> <listitem> <para> The <literal>ROLE</literal> clause lists one or more existing roles which are automatically added as members of the new role. - (This in effect makes the new role a <quote>group</>.) + (This in effect makes the new role a <quote>group</quote>.) </para> </listitem> </varlistentry> <varlistentry> - <term><literal>ADMIN</> <replaceable class="parameter">role_name</replaceable></term> + <term><literal>ADMIN</literal> <replaceable class="parameter">role_name</replaceable></term> <listitem> <para> The <literal>ADMIN</literal> clause is like <literal>ROLE</literal>, but the named roles are added to the new role <literal>WITH ADMIN - OPTION</>, giving them the right to grant membership in this role + OPTION</literal>, giving them the right to grant membership in this role to others. </para> </listitem> </varlistentry> <varlistentry> - <term><literal>USER</> <replaceable class="parameter">role_name</replaceable></term> + <term><literal>USER</literal> <replaceable class="parameter">role_name</replaceable></term> <listitem> <para> The <literal>USER</literal> clause is an obsolete spelling of - the <literal>ROLE</> clause. + the <literal>ROLE</literal> clause. </para> </listitem> </varlistentry> <varlistentry> - <term><literal>SYSID</> <replaceable class="parameter">uid</replaceable></term> + <term><literal>SYSID</literal> <replaceable class="parameter">uid</replaceable></term> <listitem> <para> The <literal>SYSID</literal> clause is ignored, but is accepted @@ -332,8 +332,8 @@ CREATE ROLE <replaceable class="parameter">name</replaceable> [ [ WITH ] <replac Use <xref linkend="SQL-ALTERROLE"> to change the attributes of a role, and <xref linkend="SQL-DROPROLE"> to remove a role. All the attributes - specified by <command>CREATE ROLE</> can be modified by later - <command>ALTER ROLE</> commands. + specified by <command>CREATE ROLE</command> can be modified by later + <command>ALTER ROLE</command> commands. </para> <para> @@ -344,42 +344,42 @@ CREATE ROLE <replaceable class="parameter">name</replaceable> [ [ WITH ] <replac </para> <para> - The <literal>VALID UNTIL</> clause defines an expiration time for a - password only, not for the role <foreignphrase>per se</>. In + The <literal>VALID UNTIL</literal> clause defines an expiration time for a + password only, not for the role <foreignphrase>per se</foreignphrase>. In particular, the expiration time is not enforced when logging in using a non-password-based authentication method. </para> <para> - The <literal>INHERIT</> attribute governs inheritance of grantable + The <literal>INHERIT</literal> attribute governs inheritance of grantable privileges (that is, access privileges for database objects and role memberships). It does not apply to the special role attributes set by - <command>CREATE ROLE</> and <command>ALTER ROLE</>. For example, being - a member of a role with <literal>CREATEDB</> privilege does not immediately - grant the ability to create databases, even if <literal>INHERIT</> is set; + <command>CREATE ROLE</command> and <command>ALTER ROLE</command>. For example, being + a member of a role with <literal>CREATEDB</literal> privilege does not immediately + grant the ability to create databases, even if <literal>INHERIT</literal> is set; it would be necessary to become that role via <xref linkend="SQL-SET-ROLE"> before creating a database. </para> <para> - The <literal>INHERIT</> attribute is the default for reasons of backwards + The <literal>INHERIT</literal> attribute is the default for reasons of backwards compatibility: in prior releases of <productname>PostgreSQL</productname>, users always had access to all privileges of groups they were members of. - However, <literal>NOINHERIT</> provides a closer match to the semantics + However, <literal>NOINHERIT</literal> provides a closer match to the semantics specified in the SQL standard. </para> <para> - Be careful with the <literal>CREATEROLE</> privilege. There is no concept of - inheritance for the privileges of a <literal>CREATEROLE</>-role. That + Be careful with the <literal>CREATEROLE</literal> privilege. There is no concept of + inheritance for the privileges of a <literal>CREATEROLE</literal>-role. That means that even if a role does not have a certain privilege but is allowed to create other roles, it can easily create another role with different privileges than its own (except for creating roles with superuser - privileges). For example, if the role <quote>user</> has the - <literal>CREATEROLE</> privilege but not the <literal>CREATEDB</> privilege, - nonetheless it can create a new role with the <literal>CREATEDB</> - privilege. Therefore, regard roles that have the <literal>CREATEROLE</> + privileges). For example, if the role <quote>user</quote> has the + <literal>CREATEROLE</literal> privilege but not the <literal>CREATEDB</literal> privilege, + nonetheless it can create a new role with the <literal>CREATEDB</literal> + privilege. Therefore, regard roles that have the <literal>CREATEROLE</literal> privilege as almost-superuser-roles. </para> @@ -391,9 +391,9 @@ CREATE ROLE <replaceable class="parameter">name</replaceable> [ [ WITH ] <replac </para> <para> - The <literal>CONNECTION LIMIT</> option is only enforced approximately; + The <literal>CONNECTION LIMIT</literal> option is only enforced approximately; if two new sessions start at about the same time when just one - connection <quote>slot</> remains for the role, it is possible that + connection <quote>slot</quote> remains for the role, it is possible that both will fail. Also, the limit is never enforced for superusers. </para> @@ -425,8 +425,8 @@ CREATE ROLE jonathan LOGIN; <programlisting> CREATE USER davide WITH PASSWORD 'jw8s0F4'; </programlisting> - (<command>CREATE USER</> is the same as <command>CREATE ROLE</> except - that it implies <literal>LOGIN</>.) + (<command>CREATE USER</command> is the same as <command>CREATE ROLE</command> except + that it implies <literal>LOGIN</literal>.) </para> <para> @@ -453,7 +453,7 @@ CREATE ROLE admin WITH CREATEDB CREATEROLE; The <command>CREATE ROLE</command> statement is in the SQL standard, but the standard only requires the syntax <synopsis> -CREATE ROLE <replaceable class="parameter">name</> [ WITH ADMIN <replaceable class="parameter">role_name</> ] +CREATE ROLE <replaceable class="parameter">name</replaceable> [ WITH ADMIN <replaceable class="parameter">role_name</replaceable> ] </synopsis> Multiple initial administrators, and all the other options of <command>CREATE ROLE</command>, are @@ -471,8 +471,8 @@ CREATE ROLE <replaceable class="parameter">name</> [ WITH ADMIN <replaceable cla <para> The behavior specified by the SQL standard is most closely approximated - by giving users the <literal>NOINHERIT</> attribute, while roles are - given the <literal>INHERIT</> attribute. + by giving users the <literal>NOINHERIT</literal> attribute, while roles are + given the <literal>INHERIT</literal> attribute. </para> </refsect1> diff --git a/doc/src/sgml/ref/create_rule.sgml b/doc/src/sgml/ref/create_rule.sgml index 53fdf566214..c772c383991 100644 --- a/doc/src/sgml/ref/create_rule.sgml +++ b/doc/src/sgml/ref/create_rule.sgml @@ -76,13 +76,13 @@ CREATE [ OR REPLACE ] RULE <replaceable class="parameter">name</replaceable> AS <literal>ON DELETE</literal> rules (or any subset of those that's sufficient for your purposes) to replace update actions on the view with appropriate updates on other tables. If you want to support - <command>INSERT RETURNING</> and so on, then be sure to put a suitable - <literal>RETURNING</> clause into each of these rules. + <command>INSERT RETURNING</command> and so on, then be sure to put a suitable + <literal>RETURNING</literal> clause into each of these rules. </para> <para> There is a catch if you try to use conditional rules for complex view - updates: there <emphasis>must</> be an unconditional + updates: there <emphasis>must</emphasis> be an unconditional <literal>INSTEAD</literal> rule for each action you wish to allow on the view. If the rule is conditional, or is not <literal>INSTEAD</literal>, then the system will still reject @@ -95,7 +95,7 @@ CREATE [ OR REPLACE ] RULE <replaceable class="parameter">name</replaceable> AS Then make the conditional rules non-<literal>INSTEAD</literal>; in the cases where they are applied, they add to the default <literal>INSTEAD NOTHING</literal> action. (This method does not - currently work to support <literal>RETURNING</> queries, however.) + currently work to support <literal>RETURNING</literal> queries, however.) </para> <note> @@ -108,7 +108,7 @@ CREATE [ OR REPLACE ] RULE <replaceable class="parameter">name</replaceable> AS </para> <para> - Another alternative worth considering is to use <literal>INSTEAD OF</> + Another alternative worth considering is to use <literal>INSTEAD OF</literal> triggers (see <xref linkend="sql-createtrigger">) in place of rules. </para> </note> @@ -161,7 +161,7 @@ CREATE [ OR REPLACE ] RULE <replaceable class="parameter">name</replaceable> AS <para> Any <acronym>SQL</acronym> conditional expression (returning <type>boolean</type>). The condition expression cannot refer - to any tables except <literal>NEW</> and <literal>OLD</>, and + to any tables except <literal>NEW</literal> and <literal>OLD</literal>, and cannot contain aggregate functions. </para> </listitem> @@ -171,7 +171,7 @@ CREATE [ OR REPLACE ] RULE <replaceable class="parameter">name</replaceable> AS <term><option>INSTEAD</option></term> <listitem> <para><literal>INSTEAD</literal> indicates that the commands should be - executed <emphasis>instead of</> the original command. + executed <emphasis>instead of</emphasis> the original command. </para> </listitem> </varlistentry> @@ -227,19 +227,19 @@ CREATE [ OR REPLACE ] RULE <replaceable class="parameter">name</replaceable> AS <para> In a rule for <literal>INSERT</literal>, <literal>UPDATE</literal>, or - <literal>DELETE</literal> on a view, you can add a <literal>RETURNING</> + <literal>DELETE</literal> on a view, you can add a <literal>RETURNING</literal> clause that emits the view's columns. This clause will be used to compute - the outputs if the rule is triggered by an <command>INSERT RETURNING</>, - <command>UPDATE RETURNING</>, or <command>DELETE RETURNING</> command + the outputs if the rule is triggered by an <command>INSERT RETURNING</command>, + <command>UPDATE RETURNING</command>, or <command>DELETE RETURNING</command> command respectively. When the rule is triggered by a command without - <literal>RETURNING</>, the rule's <literal>RETURNING</> clause will be + <literal>RETURNING</literal>, the rule's <literal>RETURNING</literal> clause will be ignored. The current implementation allows only unconditional - <literal>INSTEAD</> rules to contain <literal>RETURNING</>; furthermore - there can be at most one <literal>RETURNING</> clause among all the rules + <literal>INSTEAD</literal> rules to contain <literal>RETURNING</literal>; furthermore + there can be at most one <literal>RETURNING</literal> clause among all the rules for the same event. (This ensures that there is only one candidate - <literal>RETURNING</> clause to be used to compute the results.) - <literal>RETURNING</> queries on the view will be rejected if - there is no <literal>RETURNING</> clause in any available rule. + <literal>RETURNING</literal> clause to be used to compute the results.) + <literal>RETURNING</literal> queries on the view will be rejected if + there is no <literal>RETURNING</literal> clause in any available rule. </para> <para> diff --git a/doc/src/sgml/ref/create_schema.sgml b/doc/src/sgml/ref/create_schema.sgml index ce145f96a0b..ce3530c0489 100644 --- a/doc/src/sgml/ref/create_schema.sgml +++ b/doc/src/sgml/ref/create_schema.sgml @@ -48,9 +48,9 @@ CREATE SCHEMA IF NOT EXISTS AUTHORIZATION <replaceable class="parameter">role_sp A schema is essentially a namespace: it contains named objects (tables, data types, functions, and operators) whose names can duplicate those of other objects existing in other - schemas. Named objects are accessed either by <quote>qualifying</> + schemas. Named objects are accessed either by <quote>qualifying</quote> their names with the schema name as a prefix, or by setting a search - path that includes the desired schema(s). A <literal>CREATE</> command + path that includes the desired schema(s). A <literal>CREATE</literal> command specifying an unqualified object name creates the object in the current schema (the one at the front of the search path, which can be determined with the function <function>current_schema</function>). @@ -60,7 +60,7 @@ CREATE SCHEMA IF NOT EXISTS AUTHORIZATION <replaceable class="parameter">role_sp Optionally, <command>CREATE SCHEMA</command> can include subcommands to create objects within the new schema. The subcommands are treated essentially the same as separate commands issued after creating the - schema, except that if the <literal>AUTHORIZATION</> clause is used, + schema, except that if the <literal>AUTHORIZATION</literal> clause is used, all the created objects will be owned by that user. </para> </refsect1> @@ -100,10 +100,10 @@ CREATE SCHEMA IF NOT EXISTS AUTHORIZATION <replaceable class="parameter">role_sp <para> An SQL statement defining an object to be created within the schema. Currently, only <command>CREATE - TABLE</>, <command>CREATE VIEW</>, <command>CREATE - INDEX</>, <command>CREATE SEQUENCE</>, <command>CREATE - TRIGGER</> and <command>GRANT</> are accepted as clauses - within <command>CREATE SCHEMA</>. Other kinds of objects may + TABLE</command>, <command>CREATE VIEW</command>, <command>CREATE + INDEX</command>, <command>CREATE SEQUENCE</command>, <command>CREATE + TRIGGER</command> and <command>GRANT</command> are accepted as clauses + within <command>CREATE SCHEMA</command>. Other kinds of objects may be created in separate commands after the schema is created. </para> </listitem> @@ -114,7 +114,7 @@ CREATE SCHEMA IF NOT EXISTS AUTHORIZATION <replaceable class="parameter">role_sp <listitem> <para> Do nothing (except issuing a notice) if a schema with the same name - already exists. <replaceable class="parameter">schema_element</> + already exists. <replaceable class="parameter">schema_element</replaceable> subcommands cannot be included when this option is used. </para> </listitem> @@ -127,7 +127,7 @@ CREATE SCHEMA IF NOT EXISTS AUTHORIZATION <replaceable class="parameter">role_sp <para> To create a schema, the invoking user must have the - <literal>CREATE</> privilege for the current database. + <literal>CREATE</literal> privilege for the current database. (Of course, superusers bypass this check.) </para> </refsect1> @@ -143,17 +143,17 @@ CREATE SCHEMA myschema; </para> <para> - Create a schema for user <literal>joe</>; the schema will also be - named <literal>joe</>: + Create a schema for user <literal>joe</literal>; the schema will also be + named <literal>joe</literal>: <programlisting> CREATE SCHEMA AUTHORIZATION joe; </programlisting> </para> <para> - Create a schema named <literal>test</> that will be owned by user - <literal>joe</>, unless there already is a schema named <literal>test</>. - (It does not matter whether <literal>joe</> owns the pre-existing schema.) + Create a schema named <literal>test</literal> that will be owned by user + <literal>joe</literal>, unless there already is a schema named <literal>test</literal>. + (It does not matter whether <literal>joe</literal> owns the pre-existing schema.) <programlisting> CREATE SCHEMA IF NOT EXISTS test AUTHORIZATION joe; </programlisting> @@ -185,7 +185,7 @@ CREATE VIEW hollywood.winners AS <title>Compatibility</title> <para> - The SQL standard allows a <literal>DEFAULT CHARACTER SET</> clause + The SQL standard allows a <literal>DEFAULT CHARACTER SET</literal> clause in <command>CREATE SCHEMA</command>, as well as more subcommand types than are presently accepted by <productname>PostgreSQL</productname>. @@ -205,7 +205,7 @@ CREATE VIEW hollywood.winners AS all objects within it. <productname>PostgreSQL</productname> allows schemas to contain objects owned by users other than the schema owner. This can happen only if the schema owner grants the - <literal>CREATE</> privilege on their schema to someone else, or a + <literal>CREATE</literal> privilege on their schema to someone else, or a superuser chooses to create objects in it. </para> diff --git a/doc/src/sgml/ref/create_sequence.sgml b/doc/src/sgml/ref/create_sequence.sgml index 2af8c8d23e3..9248b1d459a 100644 --- a/doc/src/sgml/ref/create_sequence.sgml +++ b/doc/src/sgml/ref/create_sequence.sgml @@ -67,10 +67,10 @@ SELECT * FROM <replaceable>name</replaceable>; </programlisting> to examine the parameters and current state of a sequence. In particular, - the <literal>last_value</> field of the sequence shows the last value + the <literal>last_value</literal> field of the sequence shows the last value allocated by any session. (Of course, this value might be obsolete by the time it's printed, if other sessions are actively doing - <function>nextval</> calls.) + <function>nextval</function> calls.) </para> </refsect1> @@ -250,14 +250,14 @@ SELECT * FROM <replaceable>name</replaceable>; </para> <para> - Sequences are based on <type>bigint</> arithmetic, so the range + Sequences are based on <type>bigint</type> arithmetic, so the range cannot exceed the range of an eight-byte integer (-9223372036854775808 to 9223372036854775807). </para> <para> - Because <function>nextval</> and <function>setval</> calls are never - rolled back, sequence objects cannot be used if <quote>gapless</> + Because <function>nextval</function> and <function>setval</function> calls are never + rolled back, sequence objects cannot be used if <quote>gapless</quote> assignment of sequence numbers is needed. It is possible to build gapless assignment by using exclusive locking of a table containing a counter; but this solution is much more expensive than sequence @@ -271,9 +271,9 @@ SELECT * FROM <replaceable>name</replaceable>; used for a sequence object that will be used concurrently by multiple sessions. Each session will allocate and cache successive sequence values during one access to the sequence object and - increase the sequence object's <literal>last_value</> accordingly. + increase the sequence object's <literal>last_value</literal> accordingly. Then, the next <replaceable class="parameter">cache</replaceable>-1 - uses of <function>nextval</> within that session simply return the + uses of <function>nextval</function> within that session simply return the preallocated values without touching the sequence object. So, any numbers allocated but not used within a session will be lost when that session ends, resulting in <quote>holes</quote> in the @@ -290,18 +290,18 @@ SELECT * FROM <replaceable>name</replaceable>; 11..20 and return <function>nextval</function>=11 before session A has generated <literal>nextval</literal>=2. Thus, with a <replaceable class="parameter">cache</replaceable> setting of one - it is safe to assume that <function>nextval</> values are generated + it is safe to assume that <function>nextval</function> values are generated sequentially; with a <replaceable class="parameter">cache</replaceable> setting greater than one you - should only assume that the <function>nextval</> values are all + should only assume that the <function>nextval</function> values are all distinct, not that they are generated purely sequentially. Also, - <literal>last_value</> will reflect the latest value reserved by + <literal>last_value</literal> will reflect the latest value reserved by any session, whether or not it has yet been returned by - <function>nextval</>. + <function>nextval</function>. </para> <para> - Another consideration is that a <function>setval</> executed on + Another consideration is that a <function>setval</function> executed on such a sequence will not be noticed by other sessions until they have used up any preallocated values they have cached. </para> @@ -365,14 +365,14 @@ END; <itemizedlist> <listitem> <para> - Obtaining the next value is done using the <function>nextval()</> + Obtaining the next value is done using the <function>nextval()</function> function instead of the standard's <command>NEXT VALUE FOR</command> expression. </para> </listitem> <listitem> <para> - The <literal>OWNED BY</> clause is a <productname>PostgreSQL</> + The <literal>OWNED BY</literal> clause is a <productname>PostgreSQL</productname> extension. </para> </listitem> diff --git a/doc/src/sgml/ref/create_server.sgml b/doc/src/sgml/ref/create_server.sgml index 47b8a6291bb..e14ce43bf9e 100644 --- a/doc/src/sgml/ref/create_server.sgml +++ b/doc/src/sgml/ref/create_server.sgml @@ -47,7 +47,7 @@ CREATE SERVER [IF NOT EXISTS] <replaceable class="parameter">server_name</replac </para> <para> - Creating a server requires <literal>USAGE</> privilege on the + Creating a server requires <literal>USAGE</literal> privilege on the foreign-data wrapper being used. </para> </refsect1> @@ -57,7 +57,7 @@ CREATE SERVER [IF NOT EXISTS] <replaceable class="parameter">server_name</replac <variablelist> <varlistentry> - <term><literal>IF NOT EXISTS</></term> + <term><literal>IF NOT EXISTS</literal></term> <listitem> <para> Do not throw an error if a server with the same name already exists. @@ -135,8 +135,8 @@ CREATE SERVER [IF NOT EXISTS] <replaceable class="parameter">server_name</replac <title>Examples</title> <para> - Create a server <literal>myserver</> that uses the - foreign-data wrapper <literal>postgres_fdw</>: + Create a server <literal>myserver</literal> that uses the + foreign-data wrapper <literal>postgres_fdw</literal>: <programlisting> CREATE SERVER myserver FOREIGN DATA WRAPPER postgres_fdw OPTIONS (host 'foo', dbname 'foodb', port '5432'); </programlisting> diff --git a/doc/src/sgml/ref/create_statistics.sgml b/doc/src/sgml/ref/create_statistics.sgml index 0d68ca06b72..066af8a4b4d 100644 --- a/doc/src/sgml/ref/create_statistics.sgml +++ b/doc/src/sgml/ref/create_statistics.sgml @@ -41,7 +41,7 @@ CREATE STATISTICS [ IF NOT EXISTS ] <replaceable class="parameter">statistics_na <para> If a schema name is given (for example, <literal>CREATE STATISTICS - myschema.mystat ...</>) then the statistics object is created in the + myschema.mystat ...</literal>) then the statistics object is created in the specified schema. Otherwise it is created in the current schema. The name of the statistics object must be distinct from the name of any other statistics object in the same schema. @@ -54,7 +54,7 @@ CREATE STATISTICS [ IF NOT EXISTS ] <replaceable class="parameter">statistics_na <variablelist> <varlistentry> - <term><literal>IF NOT EXISTS</></term> + <term><literal>IF NOT EXISTS</literal></term> <listitem> <para> Do not throw an error if a statistics object with the same name already @@ -129,7 +129,7 @@ CREATE STATISTICS [ IF NOT EXISTS ] <replaceable class="parameter">statistics_na <title>Examples</title> <para> - Create table <structname>t1</> with two functionally dependent columns, i.e. + Create table <structname>t1</structname> with two functionally dependent columns, i.e. knowledge of a value in the first column is sufficient for determining the value in the other column. Then functional dependency statistics are built on those columns: @@ -157,10 +157,10 @@ EXPLAIN ANALYZE SELECT * FROM t1 WHERE (a = 1) AND (b = 0); </programlisting> Without functional-dependency statistics, the planner would assume - that the two <literal>WHERE</> conditions are independent, and would + that the two <literal>WHERE</literal> conditions are independent, and would multiply their selectivities together to arrive at a much-too-small row count estimate. - With such statistics, the planner recognizes that the <literal>WHERE</> + With such statistics, the planner recognizes that the <literal>WHERE</literal> conditions are redundant and does not underestimate the rowcount. </para> diff --git a/doc/src/sgml/ref/create_subscription.sgml b/doc/src/sgml/ref/create_subscription.sgml index bae9f839bd2..cd51b7fcac5 100644 --- a/doc/src/sgml/ref/create_subscription.sgml +++ b/doc/src/sgml/ref/create_subscription.sgml @@ -201,7 +201,7 @@ CREATE SUBSCRIPTION <replaceable class="parameter">subscription_name</replaceabl to <literal>false</literal>, the tables are not subscribed, and so after you enable the subscription nothing will be replicated. It is required to run - <literal>ALTER SUBSCRIPTION ... REFRESH PUBLICATION</> in order + <literal>ALTER SUBSCRIPTION ... REFRESH PUBLICATION</literal> in order for tables to be subscribed. </para> </listitem> @@ -272,7 +272,7 @@ CREATE SUBSCRIPTION mysub <title>Compatibility</title> <para> - <command>CREATE SUBSCRIPTION</command> is a <productname>PostgreSQL</> + <command>CREATE SUBSCRIPTION</command> is a <productname>PostgreSQL</productname> extension. </para> </refsect1> diff --git a/doc/src/sgml/ref/create_table.sgml b/doc/src/sgml/ref/create_table.sgml index d15795857b1..2db2e9fc444 100644 --- a/doc/src/sgml/ref/create_table.sgml +++ b/doc/src/sgml/ref/create_table.sgml @@ -113,7 +113,7 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace <para> If a schema name is given (for example, <literal>CREATE TABLE - myschema.mytable ...</>) then the table is created in the specified + myschema.mytable ...</literal>) then the table is created in the specified schema. Otherwise it is created in the current schema. Temporary tables exist in a special schema, so a schema name cannot be given when creating a temporary table. The name of the table must be @@ -158,7 +158,7 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace <variablelist> <varlistentry id="SQL-CREATETABLE-TEMPORARY"> - <term><literal>TEMPORARY</> or <literal>TEMP</></term> + <term><literal>TEMPORARY</literal> or <literal>TEMP</literal></term> <listitem> <para> If specified, the table is created as a temporary table. @@ -177,13 +177,13 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace For this reason, appropriate vacuum and analyze operations should be performed via session SQL commands. For example, if a temporary table is going to be used in complex queries, it is wise to run - <command>ANALYZE</> on the temporary table after it is populated. + <command>ANALYZE</command> on the temporary table after it is populated. </para> <para> Optionally, <literal>GLOBAL</literal> or <literal>LOCAL</literal> - can be written before <literal>TEMPORARY</> or <literal>TEMP</>. - This presently makes no difference in <productname>PostgreSQL</> + can be written before <literal>TEMPORARY</literal> or <literal>TEMP</literal>. + This presently makes no difference in <productname>PostgreSQL</productname> and is deprecated; see <xref linkend="sql-createtable-compatibility" endterm="sql-createtable-compatibility-title">. @@ -192,7 +192,7 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace </varlistentry> <varlistentry id="SQL-CREATETABLE-UNLOGGED"> - <term><literal>UNLOGGED</></term> + <term><literal>UNLOGGED</literal></term> <listitem> <para> If specified, the table is created as an unlogged table. Data written @@ -208,7 +208,7 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace </varlistentry> <varlistentry> - <term><literal>IF NOT EXISTS</></term> + <term><literal>IF NOT EXISTS</literal></term> <listitem> <para> Do not throw an error if a relation with the same name already exists. @@ -263,14 +263,14 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace The <replaceable class="parameter">partition_bound_spec</replaceable> must correspond to the partitioning method and partition key of the parent table, and must not overlap with any existing partition of that - parent. The form with <literal>IN</> is used for list partitioning, - while the form with <literal>FROM</> and <literal>TO</> is used for + parent. The form with <literal>IN</literal> is used for list partitioning, + while the form with <literal>FROM</literal> and <literal>TO</literal> is used for range partitioning. </para> <para> Each of the values specified in - the <replaceable class="parameter">partition_bound_spec</> is + the <replaceable class="parameter">partition_bound_spec</replaceable> is a literal, <literal>NULL</literal>, <literal>MINVALUE</literal>, or <literal>MAXVALUE</literal>. Each literal value must be either a numeric constant that is coercible to the corresponding partition key @@ -294,52 +294,52 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace partition, whereas those in the <literal>TO</literal> list are not. Note that this statement must be understood according to the rules of row-wise comparison (<xref linkend="row-wise-comparison">). - For example, given <literal>PARTITION BY RANGE (x,y)</>, a partition + For example, given <literal>PARTITION BY RANGE (x,y)</literal>, a partition bound <literal>FROM (1, 2) TO (3, 4)</literal> - allows <literal>x=1</> with any <literal>y>=2</>, - <literal>x=2</> with any non-null <literal>y</>, - and <literal>x=3</> with any <literal>y<4</>. + allows <literal>x=1</literal> with any <literal>y>=2</literal>, + <literal>x=2</literal> with any non-null <literal>y</literal>, + and <literal>x=3</literal> with any <literal>y<4</literal>. </para> <para> - The special values <literal>MINVALUE</> and <literal>MAXVALUE</> + The special values <literal>MINVALUE</literal> and <literal>MAXVALUE</literal> may be used when creating a range partition to indicate that there is no lower or upper bound on the column's value. For example, a - partition defined using <literal>FROM (MINVALUE) TO (10)</> allows + partition defined using <literal>FROM (MINVALUE) TO (10)</literal> allows any values less than 10, and a partition defined using - <literal>FROM (10) TO (MAXVALUE)</> allows any values greater than + <literal>FROM (10) TO (MAXVALUE)</literal> allows any values greater than or equal to 10. </para> <para> When creating a range partition involving more than one column, it - can also make sense to use <literal>MAXVALUE</> as part of the lower - bound, and <literal>MINVALUE</> as part of the upper bound. For + can also make sense to use <literal>MAXVALUE</literal> as part of the lower + bound, and <literal>MINVALUE</literal> as part of the upper bound. For example, a partition defined using - <literal>FROM (0, MAXVALUE) TO (10, MAXVALUE)</> allows any rows + <literal>FROM (0, MAXVALUE) TO (10, MAXVALUE)</literal> allows any rows where the first partition key column is greater than 0 and less than or equal to 10. Similarly, a partition defined using - <literal>FROM ('a', MINVALUE) TO ('b', MINVALUE)</> allows any rows + <literal>FROM ('a', MINVALUE) TO ('b', MINVALUE)</literal> allows any rows where the first partition key column starts with "a". </para> <para> - Note that if <literal>MINVALUE</> or <literal>MAXVALUE</> is used for + Note that if <literal>MINVALUE</literal> or <literal>MAXVALUE</literal> is used for one column of a partitioning bound, the same value must be used for all - subsequent columns. For example, <literal>(10, MINVALUE, 0)</> is not - a valid bound; you should write <literal>(10, MINVALUE, MINVALUE)</>. + subsequent columns. For example, <literal>(10, MINVALUE, 0)</literal> is not + a valid bound; you should write <literal>(10, MINVALUE, MINVALUE)</literal>. </para> <para> - Also note that some element types, such as <literal>timestamp</>, + Also note that some element types, such as <literal>timestamp</literal>, have a notion of "infinity", which is just another value that can - be stored. This is different from <literal>MINVALUE</> and - <literal>MAXVALUE</>, which are not real values that can be stored, + be stored. This is different from <literal>MINVALUE</literal> and + <literal>MAXVALUE</literal>, which are not real values that can be stored, but rather they are ways of saying that the value is unbounded. - <literal>MAXVALUE</> can be thought of as being greater than any - other value, including "infinity" and <literal>MINVALUE</> as being + <literal>MAXVALUE</literal> can be thought of as being greater than any + other value, including "infinity" and <literal>MINVALUE</literal> as being less than any other value, including "minus infinity". Thus the range - <literal>FROM ('infinity') TO (MAXVALUE)</> is not an empty range; it + <literal>FROM ('infinity') TO (MAXVALUE)</literal> is not an empty range; it allows precisely one value to be stored — "infinity". </para> @@ -370,9 +370,9 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace column will be inherited by all partitions just like any other column. Modifications to the column names or types of a partitioned table, or the addition or removal of an OID column, will automatically propagate - to all partitions. <literal>CHECK</> constraints will be inherited + to all partitions. <literal>CHECK</literal> constraints will be inherited automatically by every partition, but an individual partition may specify - additional <literal>CHECK</> constraints; additional constraints with + additional <literal>CHECK</literal> constraints; additional constraints with the same name and condition as in the parent will be merged with the parent constraint. Defaults may be specified separately for each partition. @@ -421,7 +421,7 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace <term><literal>COLLATE <replaceable>collation</replaceable></literal></term> <listitem> <para> - The <literal>COLLATE</> clause assigns a collation to + The <literal>COLLATE</literal> clause assigns a collation to the column (which must be of a collatable data type). If not specified, the column data type's default collation is used. </para> @@ -432,13 +432,13 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace <term><literal>INHERITS ( <replaceable>parent_table</replaceable> [, ... ] )</literal></term> <listitem> <para> - The optional <literal>INHERITS</> clause specifies a list of + The optional <literal>INHERITS</literal> clause specifies a list of tables from which the new table automatically inherits all columns. Parent tables can be plain tables or foreign tables. </para> <para> - Use of <literal>INHERITS</> creates a persistent relationship + Use of <literal>INHERITS</literal> creates a persistent relationship between the new child table and its parent table(s). Schema modifications to the parent(s) normally propagate to children as well, and by default the data of the child table is included in @@ -462,19 +462,19 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace </para> <para> - <literal>CHECK</> constraints are merged in essentially the same way as + <literal>CHECK</literal> constraints are merged in essentially the same way as columns: if multiple parent tables and/or the new table definition - contain identically-named <literal>CHECK</> constraints, these + contain identically-named <literal>CHECK</literal> constraints, these constraints must all have the same check expression, or an error will be reported. Constraints having the same name and expression will - be merged into one copy. A constraint marked <literal>NO INHERIT</> in a - parent will not be considered. Notice that an unnamed <literal>CHECK</> + be merged into one copy. A constraint marked <literal>NO INHERIT</literal> in a + parent will not be considered. Notice that an unnamed <literal>CHECK</literal> constraint in the new table will never be merged, since a unique name will always be chosen for it. </para> <para> - Column <literal>STORAGE</> settings are also copied from parent tables. + Column <literal>STORAGE</literal> settings are also copied from parent tables. </para> <para> @@ -504,7 +504,7 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace <para> A partitioned table is divided into sub-tables (called partitions), - which are created using separate <literal>CREATE TABLE</> commands. + which are created using separate <literal>CREATE TABLE</literal> commands. The partitioned table is itself empty. A data row inserted into the table is routed to a partition based on the value of columns or expressions in the partition key. If no existing partition matches @@ -542,7 +542,7 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace default behavior is to exclude default expressions, resulting in the copied columns in the new table having null defaults. Note that copying defaults that call database-modification functions, - such as <function>nextval</>, may create a functional linkage between + such as <function>nextval</function>, may create a functional linkage between the original and new tables. </para> <para> @@ -559,8 +559,8 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace constraints. </para> <para> - Indexes, <literal>PRIMARY KEY</>, <literal>UNIQUE</>, - and <literal>EXCLUDE</> constraints on the original table will be + Indexes, <literal>PRIMARY KEY</literal>, <literal>UNIQUE</literal>, + and <literal>EXCLUDE</literal> constraints on the original table will be created on the new table only if <literal>INCLUDING INDEXES</literal> is specified. Names for the new indexes and constraints are chosen according to the default rules, regardless of how the originals @@ -568,11 +568,11 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace the new indexes.) </para> <para> - <literal>STORAGE</> settings for the copied column definitions will be + <literal>STORAGE</literal> settings for the copied column definitions will be copied only if <literal>INCLUDING STORAGE</literal> is specified. The - default behavior is to exclude <literal>STORAGE</> settings, resulting + default behavior is to exclude <literal>STORAGE</literal> settings, resulting in the copied columns in the new table having type-specific default - settings. For more on <literal>STORAGE</> settings, see + settings. For more on <literal>STORAGE</literal> settings, see <xref linkend="storage-toast">. </para> <para> @@ -587,7 +587,7 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace </para> <para> Note that unlike <literal>INHERITS</literal>, columns and - constraints copied by <literal>LIKE</> are not merged with similarly + constraints copied by <literal>LIKE</literal> are not merged with similarly named columns and constraints. If the same name is specified explicitly or in another <literal>LIKE</literal> clause, an error is signaled. @@ -607,7 +607,7 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace <para> An optional name for a column or table constraint. If the constraint is violated, the constraint name is present in error messages, - so constraint names like <literal>col must be positive</> can be used + so constraint names like <literal>col must be positive</literal> can be used to communicate helpful constraint information to client applications. (Double-quotes are needed to specify constraint names that contain spaces.) If a constraint name is not specified, the system generates a name. @@ -616,7 +616,7 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace </varlistentry> <varlistentry> - <term><literal>NOT NULL</></term> + <term><literal>NOT NULL</literal></term> <listitem> <para> The column is not allowed to contain null values. @@ -625,7 +625,7 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace </varlistentry> <varlistentry> - <term><literal>NULL</></term> + <term><literal>NULL</literal></term> <listitem> <para> The column is allowed to contain null values. This is the default. @@ -643,7 +643,7 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace <term><literal>CHECK ( <replaceable class="parameter">expression</replaceable> ) [ NO INHERIT ] </literal></term> <listitem> <para> - The <literal>CHECK</> clause specifies an expression producing a + The <literal>CHECK</literal> clause specifies an expression producing a Boolean result which new or updated rows must satisfy for an insert or update operation to succeed. Expressions evaluating to TRUE or UNKNOWN succeed. Should any row of an insert or @@ -662,15 +662,15 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace </para> <para> - A constraint marked with <literal>NO INHERIT</> will not propagate to + A constraint marked with <literal>NO INHERIT</literal> will not propagate to child tables. </para> <para> When a table has multiple <literal>CHECK</literal> constraints, they will be tested for each row in alphabetical order by name, - after checking <literal>NOT NULL</> constraints. - (<productname>PostgreSQL</> versions before 9.5 did not honor any + after checking <literal>NOT NULL</literal> constraints. + (<productname>PostgreSQL</productname> versions before 9.5 did not honor any particular firing order for <literal>CHECK</literal> constraints.) </para> </listitem> @@ -681,7 +681,7 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace <replaceable>default_expr</replaceable></literal></term> <listitem> <para> - The <literal>DEFAULT</> clause assigns a default data value for + The <literal>DEFAULT</literal> clause assigns a default data value for the column whose column definition it appears within. The value is any variable-free expression (subqueries and cross-references to other columns in the current table are not allowed). The @@ -729,8 +729,8 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace </varlistentry> <varlistentry> - <term><literal>UNIQUE</> (column constraint)</term> - <term><literal>UNIQUE ( <replaceable class="parameter">column_name</replaceable> [, ... ] )</> (table constraint)</term> + <term><literal>UNIQUE</literal> (column constraint)</term> + <term><literal>UNIQUE ( <replaceable class="parameter">column_name</replaceable> [, ... ] )</literal> (table constraint)</term> <listitem> <para> @@ -756,11 +756,11 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace </varlistentry> <varlistentry> - <term><literal>PRIMARY KEY</> (column constraint)</term> - <term><literal>PRIMARY KEY ( <replaceable class="parameter">column_name</replaceable> [, ... ] )</> (table constraint)</term> + <term><literal>PRIMARY KEY</literal> (column constraint)</term> + <term><literal>PRIMARY KEY ( <replaceable class="parameter">column_name</replaceable> [, ... ] )</literal> (table constraint)</term> <listitem> <para> - The <literal>PRIMARY KEY</> constraint specifies that a column or + The <literal>PRIMARY KEY</literal> constraint specifies that a column or columns of a table can contain only unique (non-duplicate), nonnull values. Only one primary key can be specified for a table, whether as a column constraint or a table constraint. @@ -775,7 +775,7 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace <para> <literal>PRIMARY KEY</literal> enforces the same data constraints as - a combination of <literal>UNIQUE</> and <literal>NOT NULL</>, but + a combination of <literal>UNIQUE</literal> and <literal>NOT NULL</literal>, but identifying a set of columns as the primary key also provides metadata about the design of the schema, since a primary key implies that other tables can rely on this set of columns as a unique identifier for rows. @@ -787,19 +787,19 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace <term><literal>EXCLUDE [ USING <replaceable class="parameter">index_method</replaceable> ] ( <replaceable class="parameter">exclude_element</replaceable> WITH <replaceable class="parameter">operator</replaceable> [, ... ] ) <replaceable class="parameter">index_parameters</replaceable> [ WHERE ( <replaceable class="parameter">predicate</replaceable> ) ]</literal></term> <listitem> <para> - The <literal>EXCLUDE</> clause defines an exclusion + The <literal>EXCLUDE</literal> clause defines an exclusion constraint, which guarantees that if any two rows are compared on the specified column(s) or expression(s) using the specified operator(s), not all of these - comparisons will return <literal>TRUE</>. If all of the + comparisons will return <literal>TRUE</literal>. If all of the specified operators test for equality, this is equivalent to a - <literal>UNIQUE</> constraint, although an ordinary unique constraint + <literal>UNIQUE</literal> constraint, although an ordinary unique constraint will be faster. However, exclusion constraints can specify constraints that are more general than simple equality. For example, you can specify a constraint that no two rows in the table contain overlapping circles (see <xref linkend="datatype-geometric">) by using the - <literal>&&</> operator. + <literal>&&</literal> operator. </para> <para> @@ -807,7 +807,7 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace an index, so each specified operator must be associated with an appropriate operator class (see <xref linkend="indexes-opclass">) for the index access - method <replaceable>index_method</>. + method <replaceable>index_method</replaceable>. The operators are required to be commutative. Each <replaceable class="parameter">exclude_element</replaceable> can optionally specify an operator class and/or ordering options; @@ -816,17 +816,17 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace </para> <para> - The access method must support <literal>amgettuple</> (see <xref - linkend="indexam">); at present this means <acronym>GIN</> + The access method must support <literal>amgettuple</literal> (see <xref + linkend="indexam">); at present this means <acronym>GIN</acronym> cannot be used. Although it's allowed, there is little point in using B-tree or hash indexes with an exclusion constraint, because this does nothing that an ordinary unique constraint doesn't do better. - So in practice the access method will always be <acronym>GiST</> or - <acronym>SP-GiST</>. + So in practice the access method will always be <acronym>GiST</acronym> or + <acronym>SP-GiST</acronym>. </para> <para> - The <replaceable class="parameter">predicate</> allows you to specify an + The <replaceable class="parameter">predicate</replaceable> allows you to specify an exclusion constraint on a subset of the table; internally this creates a partial index. Note that parentheses are required around the predicate. </para> @@ -853,7 +853,7 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace primary key of the <replaceable class="parameter">reftable</replaceable> is used. The referenced columns must be the columns of a non-deferrable unique or primary key constraint in the referenced table. The user - must have <literal>REFERENCES</> permission on the referenced table + must have <literal>REFERENCES</literal> permission on the referenced table (either the whole table, or the specific referenced columns). Note that foreign key constraints cannot be defined between temporary tables and permanent tables. @@ -863,16 +863,16 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace A value inserted into the referencing column(s) is matched against the values of the referenced table and referenced columns using the given match type. There are three match types: <literal>MATCH - FULL</>, <literal>MATCH PARTIAL</>, and <literal>MATCH + FULL</literal>, <literal>MATCH PARTIAL</literal>, and <literal>MATCH SIMPLE</literal> (which is the default). <literal>MATCH - FULL</> will not allow one column of a multicolumn foreign key + FULL</literal> will not allow one column of a multicolumn foreign key to be null unless all foreign key columns are null; if they are all null, the row is not required to have a match in the referenced table. <literal>MATCH SIMPLE</literal> allows any of the foreign key columns to be null; if any of them are null, the row is not required to have a match in the referenced table. - <literal>MATCH PARTIAL</> is not yet implemented. - (Of course, <literal>NOT NULL</> constraints can be applied to the + <literal>MATCH PARTIAL</literal> is not yet implemented. + (Of course, <literal>NOT NULL</literal> constraints can be applied to the referencing column(s) to prevent these cases from arising.) </para> @@ -969,13 +969,13 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace deferrable can be postponed until the end of the transaction (using the <xref linkend="sql-set-constraints"> command). <literal>NOT DEFERRABLE</literal> is the default. - Currently, only <literal>UNIQUE</>, <literal>PRIMARY KEY</>, - <literal>EXCLUDE</>, and - <literal>REFERENCES</> (foreign key) constraints accept this - clause. <literal>NOT NULL</> and <literal>CHECK</> constraints are not + Currently, only <literal>UNIQUE</literal>, <literal>PRIMARY KEY</literal>, + <literal>EXCLUDE</literal>, and + <literal>REFERENCES</literal> (foreign key) constraints accept this + clause. <literal>NOT NULL</literal> and <literal>CHECK</literal> constraints are not deferrable. Note that deferrable constraints cannot be used as conflict arbitrators in an <command>INSERT</command> statement that - includes an <literal>ON CONFLICT DO UPDATE</> clause. + includes an <literal>ON CONFLICT DO UPDATE</literal> clause. </para> </listitem> </varlistentry> @@ -1003,16 +1003,16 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace This clause specifies optional storage parameters for a table or index; see <xref linkend="sql-createtable-storage-parameters" endterm="sql-createtable-storage-parameters-title"> for more - information. The <literal>WITH</> clause for a - table can also include <literal>OIDS=TRUE</> (or just <literal>OIDS</>) + information. The <literal>WITH</literal> clause for a + table can also include <literal>OIDS=TRUE</literal> (or just <literal>OIDS</literal>) to specify that rows of the new table should have OIDs (object identifiers) assigned to them, or - <literal>OIDS=FALSE</> to specify that the rows should not have OIDs. - If <literal>OIDS</> is not specified, the default setting depends upon + <literal>OIDS=FALSE</literal> to specify that the rows should not have OIDs. + If <literal>OIDS</literal> is not specified, the default setting depends upon the <xref linkend="guc-default-with-oids"> configuration parameter. (If the new table inherits from any tables that have OIDs, then - <literal>OIDS=TRUE</> is forced even if the command says - <literal>OIDS=FALSE</>.) + <literal>OIDS=TRUE</literal> is forced even if the command says + <literal>OIDS=FALSE</literal>.) </para> <para> @@ -1035,14 +1035,14 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace </varlistentry> <varlistentry> - <term><literal>WITH OIDS</></term> - <term><literal>WITHOUT OIDS</></term> + <term><literal>WITH OIDS</literal></term> + <term><literal>WITHOUT OIDS</literal></term> <listitem> <para> - These are obsolescent syntaxes equivalent to <literal>WITH (OIDS)</> - and <literal>WITH (OIDS=FALSE)</>, respectively. If you wish to give - both an <literal>OIDS</> setting and storage parameters, you must use - the <literal>WITH ( ... )</> syntax; see above. + These are obsolescent syntaxes equivalent to <literal>WITH (OIDS)</literal> + and <literal>WITH (OIDS=FALSE)</literal>, respectively. If you wish to give + both an <literal>OIDS</literal> setting and storage parameters, you must use + the <literal>WITH ( ... )</literal> syntax; see above. </para> </listitem> </varlistentry> @@ -1110,7 +1110,7 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace <para> This clause allows selection of the tablespace in which the index associated with a <literal>UNIQUE</literal>, <literal>PRIMARY - KEY</literal>, or <literal>EXCLUDE</> constraint will be created. + KEY</literal>, or <literal>EXCLUDE</literal> constraint will be created. If not specified, <xref linkend="guc-default-tablespace"> is consulted, or <xref linkend="guc-temp-tablespaces"> if the table is temporary. @@ -1128,16 +1128,16 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace </indexterm> <para> - The <literal>WITH</> clause can specify <firstterm>storage parameters</> + The <literal>WITH</literal> clause can specify <firstterm>storage parameters</firstterm> for tables, and for indexes associated with a <literal>UNIQUE</literal>, - <literal>PRIMARY KEY</literal>, or <literal>EXCLUDE</> constraint. + <literal>PRIMARY KEY</literal>, or <literal>EXCLUDE</literal> constraint. Storage parameters for indexes are documented in <xref linkend="SQL-CREATEINDEX">. The storage parameters currently available for tables are listed below. For many of these parameters, as shown, there is an additional parameter with the same name prefixed with <literal>toast.</literal>, which controls the behavior of the - table's secondary <acronym>TOAST</> table, if any + table's secondary <acronym>TOAST</acronym> table, if any (see <xref linkend="storage-toast"> for more information about TOAST). If a table parameter value is set and the equivalent <literal>toast.</literal> parameter is not, the TOAST table @@ -1149,14 +1149,14 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace <variablelist> <varlistentry> - <term><literal>fillfactor</> (<type>integer</>)</term> + <term><literal>fillfactor</literal> (<type>integer</type>)</term> <listitem> <para> The fillfactor for a table is a percentage between 10 and 100. 100 (complete packing) is the default. When a smaller fillfactor - is specified, <command>INSERT</> operations pack table pages only + is specified, <command>INSERT</command> operations pack table pages only to the indicated percentage; the remaining space on each page is - reserved for updating rows on that page. This gives <command>UPDATE</> + reserved for updating rows on that page. This gives <command>UPDATE</command> a chance to place the updated copy of a row on the same page as the original, which is more efficient than placing it on a different page. For a table whose entries are never updated, complete packing is the @@ -1167,7 +1167,7 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace </varlistentry> <varlistentry> - <term><literal>parallel_workers</> (<type>integer</>)</term> + <term><literal>parallel_workers</literal> (<type>integer</type>)</term> <listitem> <para> This sets the number of workers that should be used to assist a parallel @@ -1180,12 +1180,12 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace </varlistentry> <varlistentry> - <term><literal>autovacuum_enabled</>, <literal>toast.autovacuum_enabled</literal> (<type>boolean</>)</term> + <term><literal>autovacuum_enabled</literal>, <literal>toast.autovacuum_enabled</literal> (<type>boolean</type>)</term> <listitem> <para> Enables or disables the autovacuum daemon for a particular table. - If true, the autovacuum daemon will perform automatic <command>VACUUM</> - and/or <command>ANALYZE</> operations on this table following the rules + If true, the autovacuum daemon will perform automatic <command>VACUUM</command> + and/or <command>ANALYZE</command> operations on this table following the rules discussed in <xref linkend="autovacuum">. If false, this table will not be autovacuumed, except to prevent transaction ID wraparound. See <xref linkend="vacuum-for-wraparound"> for @@ -1194,14 +1194,14 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace transaction ID wraparound) if the <xref linkend="guc-autovacuum"> parameter is false; setting individual tables' storage parameters does not override that. Therefore there is seldom much point in explicitly - setting this storage parameter to <literal>true</>, only - to <literal>false</>. + setting this storage parameter to <literal>true</literal>, only + to <literal>false</literal>. </para> </listitem> </varlistentry> <varlistentry> - <term><literal>autovacuum_vacuum_threshold</>, <literal>toast.autovacuum_vacuum_threshold</literal> (<type>integer</>)</term> + <term><literal>autovacuum_vacuum_threshold</literal>, <literal>toast.autovacuum_vacuum_threshold</literal> (<type>integer</type>)</term> <listitem> <para> Per-table value for <xref linkend="guc-autovacuum-vacuum-threshold"> @@ -1211,7 +1211,7 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace </varlistentry> <varlistentry> - <term><literal>autovacuum_vacuum_scale_factor</>, <literal>toast.autovacuum_vacuum_scale_factor</literal> (<type>float4</>)</term> + <term><literal>autovacuum_vacuum_scale_factor</literal>, <literal>toast.autovacuum_vacuum_scale_factor</literal> (<type>float4</type>)</term> <listitem> <para> Per-table value for <xref linkend="guc-autovacuum-vacuum-scale-factor"> @@ -1221,7 +1221,7 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace </varlistentry> <varlistentry> - <term><literal>autovacuum_analyze_threshold</> (<type>integer</>)</term> + <term><literal>autovacuum_analyze_threshold</literal> (<type>integer</type>)</term> <listitem> <para> Per-table value for <xref linkend="guc-autovacuum-analyze-threshold"> @@ -1231,7 +1231,7 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace </varlistentry> <varlistentry> - <term><literal>autovacuum_analyze_scale_factor</> (<type>float4</>)</term> + <term><literal>autovacuum_analyze_scale_factor</literal> (<type>float4</type>)</term> <listitem> <para> Per-table value for <xref linkend="guc-autovacuum-analyze-scale-factor"> @@ -1241,7 +1241,7 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace </varlistentry> <varlistentry> - <term><literal>autovacuum_vacuum_cost_delay</>, <literal>toast.autovacuum_vacuum_cost_delay</literal> (<type>integer</>)</term> + <term><literal>autovacuum_vacuum_cost_delay</literal>, <literal>toast.autovacuum_vacuum_cost_delay</literal> (<type>integer</type>)</term> <listitem> <para> Per-table value for <xref linkend="guc-autovacuum-vacuum-cost-delay"> @@ -1251,7 +1251,7 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace </varlistentry> <varlistentry> - <term><literal>autovacuum_vacuum_cost_limit</>, <literal>toast.autovacuum_vacuum_cost_limit</literal> (<type>integer</>)</term> + <term><literal>autovacuum_vacuum_cost_limit</literal>, <literal>toast.autovacuum_vacuum_cost_limit</literal> (<type>integer</type>)</term> <listitem> <para> Per-table value for <xref linkend="guc-autovacuum-vacuum-cost-limit"> @@ -1261,12 +1261,12 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace </varlistentry> <varlistentry> - <term><literal>autovacuum_freeze_min_age</>, <literal>toast.autovacuum_freeze_min_age</literal> (<type>integer</>)</term> + <term><literal>autovacuum_freeze_min_age</literal>, <literal>toast.autovacuum_freeze_min_age</literal> (<type>integer</type>)</term> <listitem> <para> Per-table value for <xref linkend="guc-vacuum-freeze-min-age"> parameter. Note that autovacuum will ignore - per-table <literal>autovacuum_freeze_min_age</> parameters that are + per-table <literal>autovacuum_freeze_min_age</literal> parameters that are larger than half the system-wide <xref linkend="guc-autovacuum-freeze-max-age"> setting. </para> @@ -1274,12 +1274,12 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace </varlistentry> <varlistentry> - <term><literal>autovacuum_freeze_max_age</>, <literal>toast.autovacuum_freeze_max_age</literal> (<type>integer</>)</term> + <term><literal>autovacuum_freeze_max_age</literal>, <literal>toast.autovacuum_freeze_max_age</literal> (<type>integer</type>)</term> <listitem> <para> Per-table value for <xref linkend="guc-autovacuum-freeze-max-age"> parameter. Note that autovacuum will ignore - per-table <literal>autovacuum_freeze_max_age</> parameters that are + per-table <literal>autovacuum_freeze_max_age</literal> parameters that are larger than the system-wide setting (it can only be set smaller). </para> </listitem> @@ -1301,7 +1301,7 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace <para> Per-table value for <xref linkend="guc-vacuum-multixact-freeze-min-age"> parameter. Note that autovacuum will ignore - per-table <literal>autovacuum_multixact_freeze_min_age</> parameters + per-table <literal>autovacuum_multixact_freeze_min_age</literal> parameters that are larger than half the system-wide <xref linkend="guc-autovacuum-multixact-freeze-max-age"> setting. @@ -1316,7 +1316,7 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace Per-table value for <xref linkend="guc-autovacuum-multixact-freeze-max-age"> parameter. Note that autovacuum will ignore - per-table <literal>autovacuum_multixact_freeze_max_age</> parameters + per-table <literal>autovacuum_multixact_freeze_max_age</literal> parameters that are larger than the system-wide setting (it can only be set smaller). </para> @@ -1369,11 +1369,11 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace generator as the table's primary key is preferred. However, if your application does make use of OIDs to identify specific rows of a table, it is recommended to create a unique constraint - on the <structfield>oid</> column of that table, to ensure that + on the <structfield>oid</structfield> column of that table, to ensure that OIDs in the table will indeed uniquely identify rows even after counter wraparound. Avoid assuming that OIDs are unique across tables; if you need a database-wide unique identifier, use the - combination of <structfield>tableoid</> and row OID for the + combination of <structfield>tableoid</structfield> and row OID for the purpose. </para> @@ -1411,8 +1411,8 @@ FROM ( { <replaceable class="parameter">numeric_literal</replaceable> | <replace <title>Examples</title> <para> - Create table <structname>films</> and table - <structname>distributors</>: + Create table <structname>films</structname> and table + <structname>distributors</structname>: <programlisting> CREATE TABLE films ( @@ -1484,7 +1484,7 @@ CREATE TABLE distributors ( <para> Define a primary key table constraint for the table - <structname>films</>: + <structname>films</structname>: <programlisting> CREATE TABLE films ( @@ -1501,7 +1501,7 @@ CREATE TABLE films ( <para> Define a primary key constraint for table - <structname>distributors</>. The following two examples are + <structname>distributors</structname>. The following two examples are equivalent, the first using the table constraint syntax, the second the column constraint syntax: @@ -1537,7 +1537,7 @@ CREATE TABLE distributors ( </para> <para> - Define two <literal>NOT NULL</> column constraints on the table + Define two <literal>NOT NULL</literal> column constraints on the table <classname>distributors</classname>, one of which is explicitly given a name: @@ -1585,7 +1585,7 @@ WITH (fillfactor=70); </para> <para> - Create table <structname>circles</> with an exclusion + Create table <structname>circles</structname> with an exclusion constraint that prevents any two circles from overlapping: <programlisting> @@ -1597,7 +1597,7 @@ CREATE TABLE circles ( </para> <para> - Create table <structname>cinemas</> in tablespace <structname>diskvol1</>: + Create table <structname>cinemas</structname> in tablespace <structname>diskvol1</structname>: <programlisting> CREATE TABLE cinemas ( @@ -1761,8 +1761,8 @@ CREATE TABLE cities_partdef <para> The <literal>ON COMMIT</literal> clause for temporary tables also resembles the SQL standard, but has some differences. - If the <literal>ON COMMIT</> clause is omitted, SQL specifies that the - default behavior is <literal>ON COMMIT DELETE ROWS</>. However, the + If the <literal>ON COMMIT</literal> clause is omitted, SQL specifies that the + default behavior is <literal>ON COMMIT DELETE ROWS</literal>. However, the default behavior in <productname>PostgreSQL</productname> is <literal>ON COMMIT PRESERVE ROWS</literal>. The <literal>ON COMMIT DROP</literal> option does not exist in SQL. @@ -1773,15 +1773,15 @@ CREATE TABLE cities_partdef <title>Non-deferred Uniqueness Constraints</title> <para> - When a <literal>UNIQUE</> or <literal>PRIMARY KEY</> constraint is + When a <literal>UNIQUE</literal> or <literal>PRIMARY KEY</literal> constraint is not deferrable, <productname>PostgreSQL</productname> checks for uniqueness immediately whenever a row is inserted or modified. The SQL standard says that uniqueness should be enforced only at the end of the statement; this makes a difference when, for example, a single command updates multiple key values. To obtain standard-compliant behavior, declare the constraint as - <literal>DEFERRABLE</> but not deferred (i.e., <literal>INITIALLY - IMMEDIATE</>). Be aware that this can be significantly slower than + <literal>DEFERRABLE</literal> but not deferred (i.e., <literal>INITIALLY + IMMEDIATE</literal>). Be aware that this can be significantly slower than immediate uniqueness checking. </para> </refsect2> @@ -1790,8 +1790,8 @@ CREATE TABLE cities_partdef <title>Column Check Constraints</title> <para> - The SQL standard says that <literal>CHECK</> column constraints - can only refer to the column they apply to; only <literal>CHECK</> + The SQL standard says that <literal>CHECK</literal> column constraints + can only refer to the column they apply to; only <literal>CHECK</literal> table constraints can refer to multiple columns. <productname>PostgreSQL</productname> does not enforce this restriction; it treats column and table check constraints alike. @@ -1802,7 +1802,7 @@ CREATE TABLE cities_partdef <title><literal>EXCLUDE</literal> Constraint</title> <para> - The <literal>EXCLUDE</> constraint type is a + The <literal>EXCLUDE</literal> constraint type is a <productname>PostgreSQL</productname> extension. </para> </refsect2> @@ -1811,7 +1811,7 @@ CREATE TABLE cities_partdef <title><literal>NULL</literal> <quote>Constraint</quote></title> <para> - The <literal>NULL</> <quote>constraint</quote> (actually a + The <literal>NULL</literal> <quote>constraint</quote> (actually a non-constraint) is a <productname>PostgreSQL</productname> extension to the SQL standard that is included for compatibility with some other database systems (and for symmetry with the <literal>NOT @@ -1838,11 +1838,11 @@ CREATE TABLE cities_partdef <para> <productname>PostgreSQL</productname> allows a table of no columns - to be created (for example, <literal>CREATE TABLE foo();</>). This + to be created (for example, <literal>CREATE TABLE foo();</literal>). This is an extension from the SQL standard, which does not allow zero-column tables. Zero-column tables are not in themselves very useful, but disallowing them creates odd special cases for <command>ALTER TABLE - DROP COLUMN</>, so it seems cleaner to ignore this spec restriction. + DROP COLUMN</command>, so it seems cleaner to ignore this spec restriction. </para> </refsect2> @@ -1861,10 +1861,10 @@ CREATE TABLE cities_partdef </refsect2> <refsect2> - <title><literal>LIKE</> Clause</title> + <title><literal>LIKE</literal> Clause</title> <para> - While a <literal>LIKE</> clause exists in the SQL standard, many of the + While a <literal>LIKE</literal> clause exists in the SQL standard, many of the options that <productname>PostgreSQL</productname> accepts for it are not in the standard, and some of the standard's options are not implemented by <productname>PostgreSQL</productname>. @@ -1872,10 +1872,10 @@ CREATE TABLE cities_partdef </refsect2> <refsect2> - <title><literal>WITH</> Clause</title> + <title><literal>WITH</literal> Clause</title> <para> - The <literal>WITH</> clause is a <productname>PostgreSQL</productname> + The <literal>WITH</literal> clause is a <productname>PostgreSQL</productname> extension; neither storage parameters nor OIDs are in the standard. </para> </refsect2> @@ -1904,19 +1904,19 @@ CREATE TABLE cities_partdef </refsect2> <refsect2> - <title><literal>PARTITION BY</> Clause</title> + <title><literal>PARTITION BY</literal> Clause</title> <para> - The <literal>PARTITION BY</> clause is a + The <literal>PARTITION BY</literal> clause is a <productname>PostgreSQL</productname> extension. </para> </refsect2> <refsect2> - <title><literal>PARTITION OF</> Clause</title> + <title><literal>PARTITION OF</literal> Clause</title> <para> - The <literal>PARTITION OF</> clause is a + The <literal>PARTITION OF</literal> clause is a <productname>PostgreSQL</productname> extension. </para> </refsect2> diff --git a/doc/src/sgml/ref/create_table_as.sgml b/doc/src/sgml/ref/create_table_as.sgml index 0fa28a11fa7..8198442a974 100644 --- a/doc/src/sgml/ref/create_table_as.sgml +++ b/doc/src/sgml/ref/create_table_as.sgml @@ -71,7 +71,7 @@ CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } | UNLOGGED ] TABLE [ IF NOT EXI <variablelist> <varlistentry> - <term><literal>TEMPORARY</> or <literal>TEMP</></term> + <term><literal>TEMPORARY</literal> or <literal>TEMP</literal></term> <listitem> <para> If specified, the table is created as a temporary table. @@ -81,7 +81,7 @@ CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } | UNLOGGED ] TABLE [ IF NOT EXI </varlistentry> <varlistentry> - <term><literal>UNLOGGED</></term> + <term><literal>UNLOGGED</literal></term> <listitem> <para> If specified, the table is created as an unlogged table. @@ -91,7 +91,7 @@ CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } | UNLOGGED ] TABLE [ IF NOT EXI </varlistentry> <varlistentry> - <term><literal>IF NOT EXISTS</></term> + <term><literal>IF NOT EXISTS</literal></term> <listitem> <para> Do not throw an error if a relation with the same name already exists. @@ -127,25 +127,25 @@ CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } | UNLOGGED ] TABLE [ IF NOT EXI This clause specifies optional storage parameters for the new table; see <xref linkend="sql-createtable-storage-parameters" endterm="sql-createtable-storage-parameters-title"> for more - information. The <literal>WITH</> clause - can also include <literal>OIDS=TRUE</> (or just <literal>OIDS</>) + information. The <literal>WITH</literal> clause + can also include <literal>OIDS=TRUE</literal> (or just <literal>OIDS</literal>) to specify that rows of the new table should have OIDs (object identifiers) assigned to them, or - <literal>OIDS=FALSE</> to specify that the rows should not have OIDs. + <literal>OIDS=FALSE</literal> to specify that the rows should not have OIDs. See <xref linkend="sql-createtable"> for more information. </para> </listitem> </varlistentry> <varlistentry> - <term><literal>WITH OIDS</></term> - <term><literal>WITHOUT OIDS</></term> + <term><literal>WITH OIDS</literal></term> + <term><literal>WITHOUT OIDS</literal></term> <listitem> <para> - These are obsolescent syntaxes equivalent to <literal>WITH (OIDS)</> - and <literal>WITH (OIDS=FALSE)</>, respectively. If you wish to give - both an <literal>OIDS</> setting and storage parameters, you must use - the <literal>WITH ( ... )</> syntax; see above. + These are obsolescent syntaxes equivalent to <literal>WITH (OIDS)</literal> + and <literal>WITH (OIDS=FALSE)</literal>, respectively. If you wish to give + both an <literal>OIDS</literal> setting and storage parameters, you must use + the <literal>WITH ( ... )</literal> syntax; see above. </para> </listitem> </varlistentry> @@ -214,14 +214,14 @@ CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } | UNLOGGED ] TABLE [ IF NOT EXI A <xref linkend="sql-select">, <link linkend="sql-table">TABLE</link>, or <xref linkend="sql-values"> command, or an <xref linkend="sql-execute"> command that runs a - prepared <command>SELECT</>, <command>TABLE</>, or - <command>VALUES</> query. + prepared <command>SELECT</command>, <command>TABLE</command>, or + <command>VALUES</command> query. </para> </listitem> </varlistentry> <varlistentry> - <term><literal>WITH [ NO ] DATA</></term> + <term><literal>WITH [ NO ] DATA</literal></term> <listitem> <para> This clause specifies whether or not the data produced by the query @@ -241,7 +241,7 @@ CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } | UNLOGGED ] TABLE [ IF NOT EXI This command is functionally similar to <xref linkend="sql-selectinto">, but it is preferred since it is less likely to be confused with other uses of - the <command>SELECT INTO</> syntax. Furthermore, <command>CREATE + the <command>SELECT INTO</command> syntax. Furthermore, <command>CREATE TABLE AS</command> offers a superset of the functionality offered by <command>SELECT INTO</command>. </para> @@ -315,7 +315,7 @@ CREATE TEMP TABLE films_recent WITH (OIDS) ON COMMIT DROP AS </listitem> <listitem> - <para><productname>PostgreSQL</> handles temporary tables in a way + <para><productname>PostgreSQL</productname> handles temporary tables in a way rather different from the standard; see <xref linkend="sql-createtable"> for details. @@ -324,7 +324,7 @@ CREATE TEMP TABLE films_recent WITH (OIDS) ON COMMIT DROP AS <listitem> <para> - The <literal>WITH</> clause is a <productname>PostgreSQL</productname> + The <literal>WITH</literal> clause is a <productname>PostgreSQL</productname> extension; neither storage parameters nor OIDs are in the standard. </para> </listitem> diff --git a/doc/src/sgml/ref/create_tablespace.sgml b/doc/src/sgml/ref/create_tablespace.sgml index 2fed29ffaf3..4d95cac9e59 100644 --- a/doc/src/sgml/ref/create_tablespace.sgml +++ b/doc/src/sgml/ref/create_tablespace.sgml @@ -45,9 +45,9 @@ CREATE TABLESPACE <replaceable class="parameter">tablespace_name</replaceable> <para> A user with appropriate privileges can pass - <replaceable class="parameter">tablespace_name</> to - <command>CREATE DATABASE</>, <command>CREATE TABLE</>, - <command>CREATE INDEX</> or <command>ADD CONSTRAINT</> to have the data + <replaceable class="parameter">tablespace_name</replaceable> to + <command>CREATE DATABASE</command>, <command>CREATE TABLE</command>, + <command>CREATE INDEX</command> or <command>ADD CONSTRAINT</command> to have the data files for these objects stored within the specified tablespace. </para> @@ -93,7 +93,7 @@ CREATE TABLESPACE <replaceable class="parameter">tablespace_name</replaceable> <para> The directory that will be used for the tablespace. The directory should be empty and must be owned by the - <productname>PostgreSQL</> system user. The directory must be + <productname>PostgreSQL</productname> system user. The directory must be specified by an absolute path name. </para> </listitem> @@ -104,8 +104,8 @@ CREATE TABLESPACE <replaceable class="parameter">tablespace_name</replaceable> <listitem> <para> A tablespace parameter to be set or reset. Currently, the only - available parameters are <varname>seq_page_cost</>, - <varname>random_page_cost</> and <varname>effective_io_concurrency</>. + available parameters are <varname>seq_page_cost</varname>, + <varname>random_page_cost</varname> and <varname>effective_io_concurrency</varname>. Setting either value for a particular tablespace will override the planner's usual estimate of the cost of reading pages from tables in that tablespace, as established by the configuration parameters of the @@ -128,7 +128,7 @@ CREATE TABLESPACE <replaceable class="parameter">tablespace_name</replaceable> </para> <para> - <command>CREATE TABLESPACE</> cannot be executed inside a transaction + <command>CREATE TABLESPACE</command> cannot be executed inside a transaction block. </para> </refsect1> @@ -137,15 +137,15 @@ CREATE TABLESPACE <replaceable class="parameter">tablespace_name</replaceable> <title>Examples</title> <para> - Create a tablespace <literal>dbspace</> at <literal>/data/dbs</>: + Create a tablespace <literal>dbspace</literal> at <literal>/data/dbs</literal>: <programlisting> CREATE TABLESPACE dbspace LOCATION '/data/dbs'; </programlisting> </para> <para> - Create a tablespace <literal>indexspace</> at <literal>/data/indexes</> - owned by user <literal>genevieve</>: + Create a tablespace <literal>indexspace</literal> at <literal>/data/indexes</literal> + owned by user <literal>genevieve</literal>: <programlisting> CREATE TABLESPACE indexspace OWNER genevieve LOCATION '/data/indexes'; </programlisting></para> @@ -155,7 +155,7 @@ CREATE TABLESPACE indexspace OWNER genevieve LOCATION '/data/indexes'; <title>Compatibility</title> <para> - <command>CREATE TABLESPACE</command> is a <productname>PostgreSQL</> + <command>CREATE TABLESPACE</command> is a <productname>PostgreSQL</productname> extension. </para> </refsect1> diff --git a/doc/src/sgml/ref/create_trigger.sgml b/doc/src/sgml/ref/create_trigger.sgml index 7fc481d9fcc..6726e3c7663 100644 --- a/doc/src/sgml/ref/create_trigger.sgml +++ b/doc/src/sgml/ref/create_trigger.sgml @@ -86,10 +86,10 @@ CREATE [ CONSTRAINT ] TRIGGER <replaceable class="parameter">name</replaceable> </para> <para> - Triggers that are specified to fire <literal>INSTEAD OF</> the trigger - event must be marked <literal>FOR EACH ROW</>, and can only be defined - on views. <literal>BEFORE</> and <literal>AFTER</> triggers on a view - must be marked as <literal>FOR EACH STATEMENT</>. + Triggers that are specified to fire <literal>INSTEAD OF</literal> the trigger + event must be marked <literal>FOR EACH ROW</literal>, and can only be defined + on views. <literal>BEFORE</literal> and <literal>AFTER</literal> triggers on a view + must be marked as <literal>FOR EACH STATEMENT</literal>. </para> <para> @@ -115,35 +115,35 @@ CREATE [ CONSTRAINT ] TRIGGER <replaceable class="parameter">name</replaceable> </thead> <tbody> <row> - <entry align="center" morerows="1"><literal>BEFORE</></entry> - <entry align="center"><command>INSERT</>/<command>UPDATE</>/<command>DELETE</></entry> + <entry align="center" morerows="1"><literal>BEFORE</literal></entry> + <entry align="center"><command>INSERT</command>/<command>UPDATE</command>/<command>DELETE</command></entry> <entry align="center">Tables and foreign tables</entry> <entry align="center">Tables, views, and foreign tables</entry> </row> <row> - <entry align="center"><command>TRUNCATE</></entry> + <entry align="center"><command>TRUNCATE</command></entry> <entry align="center">—</entry> <entry align="center">Tables</entry> </row> <row> - <entry align="center" morerows="1"><literal>AFTER</></entry> - <entry align="center"><command>INSERT</>/<command>UPDATE</>/<command>DELETE</></entry> + <entry align="center" morerows="1"><literal>AFTER</literal></entry> + <entry align="center"><command>INSERT</command>/<command>UPDATE</command>/<command>DELETE</command></entry> <entry align="center">Tables and foreign tables</entry> <entry align="center">Tables, views, and foreign tables</entry> </row> <row> - <entry align="center"><command>TRUNCATE</></entry> + <entry align="center"><command>TRUNCATE</command></entry> <entry align="center">—</entry> <entry align="center">Tables</entry> </row> <row> - <entry align="center" morerows="1"><literal>INSTEAD OF</></entry> - <entry align="center"><command>INSERT</>/<command>UPDATE</>/<command>DELETE</></entry> + <entry align="center" morerows="1"><literal>INSTEAD OF</literal></entry> + <entry align="center"><command>INSERT</command>/<command>UPDATE</command>/<command>DELETE</command></entry> <entry align="center">Views</entry> <entry align="center">—</entry> </row> <row> - <entry align="center"><command>TRUNCATE</></entry> + <entry align="center"><command>TRUNCATE</command></entry> <entry align="center">—</entry> <entry align="center">—</entry> </row> @@ -152,11 +152,11 @@ CREATE [ CONSTRAINT ] TRIGGER <replaceable class="parameter">name</replaceable> </informaltable> <para> - Also, a trigger definition can specify a Boolean <literal>WHEN</> + Also, a trigger definition can specify a Boolean <literal>WHEN</literal> condition, which will be tested to see whether the trigger should - be fired. In row-level triggers the <literal>WHEN</> condition can + be fired. In row-level triggers the <literal>WHEN</literal> condition can examine the old and/or new values of columns of the row. Statement-level - triggers can also have <literal>WHEN</> conditions, although the feature + triggers can also have <literal>WHEN</literal> conditions, although the feature is not so useful for them since the condition cannot refer to any values in the table. </para> @@ -167,36 +167,36 @@ CREATE [ CONSTRAINT ] TRIGGER <replaceable class="parameter">name</replaceable> </para> <para> - When the <literal>CONSTRAINT</> option is specified, this command creates a - <firstterm>constraint trigger</>. This is the same as a regular trigger + When the <literal>CONSTRAINT</literal> option is specified, this command creates a + <firstterm>constraint trigger</firstterm>. This is the same as a regular trigger except that the timing of the trigger firing can be adjusted using <xref linkend="SQL-SET-CONSTRAINTS">. - Constraint triggers must be <literal>AFTER ROW</> triggers on plain + Constraint triggers must be <literal>AFTER ROW</literal> triggers on plain tables (not foreign tables). They can be fired either at the end of the statement causing the triggering event, or at the end of the containing transaction; in the latter case they - are said to be <firstterm>deferred</>. A pending deferred-trigger firing + are said to be <firstterm>deferred</firstterm>. A pending deferred-trigger firing can also be forced to happen immediately by using <command>SET - CONSTRAINTS</>. Constraint triggers are expected to raise an exception + CONSTRAINTS</command>. Constraint triggers are expected to raise an exception when the constraints they implement are violated. </para> <para> - The <literal>REFERENCING</> option enables collection - of <firstterm>transition relations</>, which are row sets that include all + The <literal>REFERENCING</literal> option enables collection + of <firstterm>transition relations</firstterm>, which are row sets that include all of the rows inserted, deleted, or modified by the current SQL statement. This feature lets the trigger see a global view of what the statement did, not just one row at a time. This option is only allowed for - an <literal>AFTER</> trigger that is not a constraint trigger; also, if - the trigger is an <literal>UPDATE</> trigger, it must not specify + an <literal>AFTER</literal> trigger that is not a constraint trigger; also, if + the trigger is an <literal>UPDATE</literal> trigger, it must not specify a <replaceable class="parameter">column_name</replaceable> list. - <literal>OLD TABLE</> may only be specified once, and only for a trigger - that can fire on <literal>UPDATE</> or <literal>DELETE</>; it creates a - transition relation containing the <firstterm>before-images</> of all rows + <literal>OLD TABLE</literal> may only be specified once, and only for a trigger + that can fire on <literal>UPDATE</literal> or <literal>DELETE</literal>; it creates a + transition relation containing the <firstterm>before-images</firstterm> of all rows updated or deleted by the statement. - Similarly, <literal>NEW TABLE</> may only be specified once, and only for - a trigger that can fire on <literal>UPDATE</> or <literal>INSERT</>; - it creates a transition relation containing the <firstterm>after-images</> + Similarly, <literal>NEW TABLE</literal> may only be specified once, and only for + a trigger that can fire on <literal>UPDATE</literal> or <literal>INSERT</literal>; + it creates a transition relation containing the <firstterm>after-images</firstterm> of all rows updated or inserted by the statement. </para> @@ -225,7 +225,7 @@ CREATE [ CONSTRAINT ] TRIGGER <replaceable class="parameter">name</replaceable> The name cannot be schema-qualified — the trigger inherits the schema of its table. For a constraint trigger, this is also the name to use when modifying the trigger's behavior using - <command>SET CONSTRAINTS</>. + <command>SET CONSTRAINTS</command>. </para> </listitem> </varlistentry> @@ -238,7 +238,7 @@ CREATE [ CONSTRAINT ] TRIGGER <replaceable class="parameter">name</replaceable> <para> Determines whether the function is called before, after, or instead of the event. A constraint trigger can only be specified as - <literal>AFTER</>. + <literal>AFTER</literal>. </para> </listitem> </varlistentry> @@ -261,11 +261,11 @@ CREATE [ CONSTRAINT ] TRIGGER <replaceable class="parameter">name</replaceable> UPDATE OF <replaceable>column_name1</replaceable> [, <replaceable>column_name2</replaceable> ... ] </synopsis> The trigger will only fire if at least one of the listed columns - is mentioned as a target of the <command>UPDATE</> command. + is mentioned as a target of the <command>UPDATE</command> command. </para> <para> - <literal>INSTEAD OF UPDATE</> events do not allow a list of columns. + <literal>INSTEAD OF UPDATE</literal> events do not allow a list of columns. A column list cannot be specified when requesting transition relations, either. </para> @@ -352,7 +352,7 @@ UPDATE OF <replaceable>column_name1</replaceable> [, <replaceable>column_name2</ once for every row affected by the trigger event, or just once per SQL statement. If neither is specified, <literal>FOR EACH STATEMENT</literal> is the default. Constraint triggers can only - be specified <literal>FOR EACH ROW</>. + be specified <literal>FOR EACH ROW</literal>. </para> </listitem> </varlistentry> @@ -362,20 +362,20 @@ UPDATE OF <replaceable>column_name1</replaceable> [, <replaceable>column_name2</ <listitem> <para> A Boolean expression that determines whether the trigger function - will actually be executed. If <literal>WHEN</> is specified, the + will actually be executed. If <literal>WHEN</literal> is specified, the function will only be called if the <replaceable - class="parameter">condition</replaceable> returns <literal>true</>. - In <literal>FOR EACH ROW</literal> triggers, the <literal>WHEN</> + class="parameter">condition</replaceable> returns <literal>true</literal>. + In <literal>FOR EACH ROW</literal> triggers, the <literal>WHEN</literal> condition can refer to columns of the old and/or new row values by writing <literal>OLD.<replaceable class="parameter">column_name</replaceable></literal> or <literal>NEW.<replaceable class="parameter">column_name</replaceable></literal> respectively. - Of course, <literal>INSERT</> triggers cannot refer to <literal>OLD</> - and <literal>DELETE</> triggers cannot refer to <literal>NEW</>. + Of course, <literal>INSERT</literal> triggers cannot refer to <literal>OLD</literal> + and <literal>DELETE</literal> triggers cannot refer to <literal>NEW</literal>. </para> - <para><literal>INSTEAD OF</> triggers do not support <literal>WHEN</> + <para><literal>INSTEAD OF</literal> triggers do not support <literal>WHEN</literal> conditions. </para> @@ -385,7 +385,7 @@ UPDATE OF <replaceable>column_name1</replaceable> [, <replaceable>column_name2</ </para> <para> - Note that for constraint triggers, evaluation of the <literal>WHEN</> + Note that for constraint triggers, evaluation of the <literal>WHEN</literal> condition is not deferred, but occurs immediately after the row update operation is performed. If the condition does not evaluate to true then the trigger is not queued for deferred execution. @@ -398,7 +398,7 @@ UPDATE OF <replaceable>column_name1</replaceable> [, <replaceable>column_name2</ <listitem> <para> A user-supplied function that is declared as taking no arguments - and returning type <literal>trigger</>, which is executed when + and returning type <literal>trigger</literal>, which is executed when the trigger fires. </para> </listitem> @@ -438,32 +438,32 @@ UPDATE OF <replaceable>column_name1</replaceable> [, <replaceable>column_name2</ <para> A column-specific trigger (one defined using the <literal>UPDATE OF <replaceable>column_name</replaceable></literal> syntax) will fire when any - of its columns are listed as targets in the <command>UPDATE</> - command's <literal>SET</> list. It is possible for a column's value + of its columns are listed as targets in the <command>UPDATE</command> + command's <literal>SET</literal> list. It is possible for a column's value to change even when the trigger is not fired, because changes made to the - row's contents by <literal>BEFORE UPDATE</> triggers are not considered. - Conversely, a command such as <literal>UPDATE ... SET x = x ...</> - will fire a trigger on column <literal>x</>, even though the column's + row's contents by <literal>BEFORE UPDATE</literal> triggers are not considered. + Conversely, a command such as <literal>UPDATE ... SET x = x ...</literal> + will fire a trigger on column <literal>x</literal>, even though the column's value did not change. </para> <para> - In a <literal>BEFORE</> trigger, the <literal>WHEN</> condition is + In a <literal>BEFORE</literal> trigger, the <literal>WHEN</literal> condition is evaluated just before the function is or would be executed, so using - <literal>WHEN</> is not materially different from testing the same + <literal>WHEN</literal> is not materially different from testing the same condition at the beginning of the trigger function. Note in particular - that the <literal>NEW</> row seen by the condition is the current value, - as possibly modified by earlier triggers. Also, a <literal>BEFORE</> - trigger's <literal>WHEN</> condition is not allowed to examine the - system columns of the <literal>NEW</> row (such as <literal>oid</>), + that the <literal>NEW</literal> row seen by the condition is the current value, + as possibly modified by earlier triggers. Also, a <literal>BEFORE</literal> + trigger's <literal>WHEN</literal> condition is not allowed to examine the + system columns of the <literal>NEW</literal> row (such as <literal>oid</literal>), because those won't have been set yet. </para> <para> - In an <literal>AFTER</> trigger, the <literal>WHEN</> condition is + In an <literal>AFTER</literal> trigger, the <literal>WHEN</literal> condition is evaluated just after the row update occurs, and it determines whether an event is queued to fire the trigger at the end of statement. So when an - <literal>AFTER</> trigger's <literal>WHEN</> condition does not return + <literal>AFTER</literal> trigger's <literal>WHEN</literal> condition does not return true, it is not necessary to queue an event nor to re-fetch the row at end of statement. This can result in significant speedups in statements that modify many rows, if the trigger only needs to be fired for a few of the @@ -473,7 +473,7 @@ UPDATE OF <replaceable>column_name1</replaceable> [, <replaceable>column_name2</ <para> In some cases it is possible for a single SQL command to fire more than one kind of trigger. For instance an <command>INSERT</command> with - an <literal>ON CONFLICT DO UPDATE</> clause may cause both insert and + an <literal>ON CONFLICT DO UPDATE</literal> clause may cause both insert and update operations, so it will fire both kinds of triggers as needed. The transition relations supplied to triggers are specific to their event type; thus an <command>INSERT</command> trigger @@ -483,14 +483,14 @@ UPDATE OF <replaceable>column_name1</replaceable> [, <replaceable>column_name2</ <para> Row updates or deletions caused by foreign-key enforcement actions, such - as <literal>ON UPDATE CASCADE</> or <literal>ON DELETE SET NULL</>, are + as <literal>ON UPDATE CASCADE</literal> or <literal>ON DELETE SET NULL</literal>, are treated as part of the SQL command that caused them (note that such actions are never deferred). Relevant triggers on the affected table will be fired, so that this provides another way in which a SQL command might fire triggers not directly matching its type. In simple cases, triggers that request transition relations will see all changes caused in their table by a single original SQL command as a single transition relation. - However, there are cases in which the presence of an <literal>AFTER ROW</> + However, there are cases in which the presence of an <literal>AFTER ROW</literal> trigger that requests transition relations will cause the foreign-key enforcement actions triggered by a single SQL command to be split into multiple steps, each with its own transition relation(s). In such cases, @@ -516,10 +516,10 @@ UPDATE OF <replaceable>column_name1</replaceable> [, <replaceable>column_name2</ <para> In <productname>PostgreSQL</productname> versions before 7.3, it was necessary to declare trigger functions as returning the placeholder - type <type>opaque</>, rather than <type>trigger</>. To support loading - of old dump files, <command>CREATE TRIGGER</> will accept a function - declared as returning <type>opaque</>, but it will issue a notice and - change the function's declared return type to <type>trigger</>. + type <type>opaque</type>, rather than <type>trigger</type>. To support loading + of old dump files, <command>CREATE TRIGGER</command> will accept a function + declared as returning <type>opaque</type>, but it will issue a notice and + change the function's declared return type to <type>trigger</type>. </para> </refsect1> @@ -527,8 +527,8 @@ UPDATE OF <replaceable>column_name1</replaceable> [, <replaceable>column_name2</ <title>Examples</title> <para> - Execute the function <function>check_account_update</> whenever - a row of the table <literal>accounts</> is about to be updated: + Execute the function <function>check_account_update</function> whenever + a row of the table <literal>accounts</literal> is about to be updated: <programlisting> CREATE TRIGGER check_update @@ -537,8 +537,8 @@ CREATE TRIGGER check_update EXECUTE PROCEDURE check_account_update(); </programlisting> - The same, but only execute the function if column <literal>balance</> - is specified as a target in the <command>UPDATE</> command: + The same, but only execute the function if column <literal>balance</literal> + is specified as a target in the <command>UPDATE</command> command: <programlisting> CREATE TRIGGER check_update @@ -547,7 +547,7 @@ CREATE TRIGGER check_update EXECUTE PROCEDURE check_account_update(); </programlisting> - This form only executes the function if column <literal>balance</> + This form only executes the function if column <literal>balance</literal> has in fact changed value: <programlisting> @@ -558,7 +558,7 @@ CREATE TRIGGER check_update EXECUTE PROCEDURE check_account_update(); </programlisting> - Call a function to log updates of <literal>accounts</>, but only if + Call a function to log updates of <literal>accounts</literal>, but only if something changed: <programlisting> @@ -569,7 +569,7 @@ CREATE TRIGGER log_update EXECUTE PROCEDURE log_account_update(); </programlisting> - Execute the function <function>view_insert_row</> for each row to insert + Execute the function <function>view_insert_row</function> for each row to insert rows into the tables underlying a view: <programlisting> @@ -579,8 +579,8 @@ CREATE TRIGGER view_insert EXECUTE PROCEDURE view_insert_row(); </programlisting> - Execute the function <function>check_transfer_balances_to_zero</> for each - statement to confirm that the <literal>transfer</> rows offset to a net of + Execute the function <function>check_transfer_balances_to_zero</function> for each + statement to confirm that the <literal>transfer</literal> rows offset to a net of zero: <programlisting> @@ -591,7 +591,7 @@ CREATE TRIGGER transfer_insert EXECUTE PROCEDURE check_transfer_balances_to_zero(); </programlisting> - Execute the function <function>check_matching_pairs</> for each row to + Execute the function <function>check_matching_pairs</function> for each row to confirm that changes are made to matching pairs at the same time (by the same statement): @@ -624,27 +624,27 @@ CREATE TRIGGER paired_items_update <para> The <command>CREATE TRIGGER</command> statement in <productname>PostgreSQL</productname> implements a subset of the - <acronym>SQL</> standard. The following functionalities are currently + <acronym>SQL</acronym> standard. The following functionalities are currently missing: <itemizedlist> <listitem> <para> - While transition table names for <literal>AFTER</> triggers are - specified using the <literal>REFERENCING</> clause in the standard way, - the row variables used in <literal>FOR EACH ROW</> triggers may not be - specified in a <literal>REFERENCING</> clause. They are available in a + While transition table names for <literal>AFTER</literal> triggers are + specified using the <literal>REFERENCING</literal> clause in the standard way, + the row variables used in <literal>FOR EACH ROW</literal> triggers may not be + specified in a <literal>REFERENCING</literal> clause. They are available in a manner that is dependent on the language in which the trigger function is written, but is fixed for any one language. Some languages - effectively behave as though there is a <literal>REFERENCING</> clause - containing <literal>OLD ROW AS OLD NEW ROW AS NEW</>. + effectively behave as though there is a <literal>REFERENCING</literal> clause + containing <literal>OLD ROW AS OLD NEW ROW AS NEW</literal>. </para> </listitem> <listitem> <para> The standard allows transition tables to be used with - column-specific <literal>UPDATE</> triggers, but then the set of rows + column-specific <literal>UPDATE</literal> triggers, but then the set of rows that should be visible in the transition tables depends on the trigger's column list. This is not currently implemented by <productname>PostgreSQL</productname>. @@ -673,7 +673,7 @@ CREATE TRIGGER paired_items_update <para> SQL specifies that <literal>BEFORE DELETE</literal> triggers on cascaded - deletes fire <emphasis>after</> the cascaded <literal>DELETE</> completes. + deletes fire <emphasis>after</emphasis> the cascaded <literal>DELETE</literal> completes. The <productname>PostgreSQL</productname> behavior is for <literal>BEFORE DELETE</literal> to always fire before the delete action, even a cascading one. This is considered more consistent. There is also nonstandard @@ -685,19 +685,19 @@ CREATE TRIGGER paired_items_update <para> The ability to specify multiple actions for a single trigger using - <literal>OR</literal> is a <productname>PostgreSQL</> extension of + <literal>OR</literal> is a <productname>PostgreSQL</productname> extension of the SQL standard. </para> <para> The ability to fire triggers for <command>TRUNCATE</command> is a - <productname>PostgreSQL</> extension of the SQL standard, as is the + <productname>PostgreSQL</productname> extension of the SQL standard, as is the ability to define statement-level triggers on views. </para> <para> <command>CREATE CONSTRAINT TRIGGER</command> is a - <productname>PostgreSQL</productname> extension of the <acronym>SQL</> + <productname>PostgreSQL</productname> extension of the <acronym>SQL</acronym> standard. </para> diff --git a/doc/src/sgml/ref/create_tsconfig.sgml b/doc/src/sgml/ref/create_tsconfig.sgml index 63321520df2..d1792e5d29d 100644 --- a/doc/src/sgml/ref/create_tsconfig.sgml +++ b/doc/src/sgml/ref/create_tsconfig.sgml @@ -99,7 +99,7 @@ CREATE TEXT SEARCH CONFIGURATION <replaceable class="parameter">name</replaceabl <title>Notes</title> <para> - The <literal>PARSER</> and <literal>COPY</> options are mutually + The <literal>PARSER</literal> and <literal>COPY</literal> options are mutually exclusive, because when an existing configuration is copied, its parser selection is copied too. </para> diff --git a/doc/src/sgml/ref/create_tstemplate.sgml b/doc/src/sgml/ref/create_tstemplate.sgml index 360ad41f354..e10f18b28b8 100644 --- a/doc/src/sgml/ref/create_tstemplate.sgml +++ b/doc/src/sgml/ref/create_tstemplate.sgml @@ -49,7 +49,7 @@ CREATE TEXT SEARCH TEMPLATE <replaceable class="parameter">name</replaceable> ( TEMPLATE</command>. This restriction is made because an erroneous text search template definition could confuse or even crash the server. The reason for separating templates from dictionaries is that a template - encapsulates the <quote>unsafe</> aspects of defining a dictionary. + encapsulates the <quote>unsafe</quote> aspects of defining a dictionary. The parameters that can be set when defining a dictionary are safe for unprivileged users to set, and so creating a dictionary need not be a privileged operation. diff --git a/doc/src/sgml/ref/create_type.sgml b/doc/src/sgml/ref/create_type.sgml index 312bd050bc3..02ca27b281e 100644 --- a/doc/src/sgml/ref/create_type.sgml +++ b/doc/src/sgml/ref/create_type.sgml @@ -81,8 +81,8 @@ CREATE TYPE <replaceable class="parameter">name</replaceable> <para> There are five forms of <command>CREATE TYPE</command>, as shown in the syntax synopsis above. They respectively create a <firstterm>composite - type</>, an <firstterm>enum type</>, a <firstterm>range type</>, a - <firstterm>base type</>, or a <firstterm>shell type</>. The first four + type</firstterm>, an <firstterm>enum type</firstterm>, a <firstterm>range type</firstterm>, a + <firstterm>base type</firstterm>, or a <firstterm>shell type</firstterm>. The first four of these are discussed in turn below. A shell type is simply a placeholder for a type to be defined later; it is created by issuing <command>CREATE TYPE</command> with no parameters except for the type name. Shell types @@ -154,7 +154,7 @@ CREATE TYPE <replaceable class="parameter">name</replaceable> declared. To do this, you must first create a shell type, which is a placeholder type that has no properties except a name and an owner. This is done by issuing the command <literal>CREATE TYPE - <replaceable>name</></literal>, with no additional parameters. Then + <replaceable>name</replaceable></literal>, with no additional parameters. Then the function can be declared using the shell type as argument and result, and finally the range type can be declared using the same name. This automatically replaces the shell type entry with a valid range type. @@ -211,7 +211,7 @@ CREATE TYPE <replaceable class="parameter">name</replaceable> The first argument is the input text as a C string, the second argument is the type's own OID (except for array types, which instead receive their element type's OID), - and the third is the <literal>typmod</> of the destination column, if known + and the third is the <literal>typmod</literal> of the destination column, if known (-1 will be passed if not). The input function must return a value of the data type itself. Usually, an input function should be declared STRICT; if it is not, @@ -264,12 +264,12 @@ CREATE TYPE <replaceable class="parameter">name</replaceable> You should at this point be wondering how the input and output functions can be declared to have results or arguments of the new type, when they have to be created before the new type can be created. The answer is that - the type should first be defined as a <firstterm>shell type</>, which is a + the type should first be defined as a <firstterm>shell type</firstterm>, which is a placeholder type that has no properties except a name and an owner. This is done by issuing the command <literal>CREATE TYPE - <replaceable>name</></literal>, with no additional parameters. Then the + <replaceable>name</replaceable></literal>, with no additional parameters. Then the C I/O functions can be defined referencing the shell type. Finally, - <command>CREATE TYPE</> with a full definition replaces the shell entry + <command>CREATE TYPE</command> with a full definition replaces the shell entry with a complete, valid type definition, after which the new type can be used normally. </para> @@ -279,23 +279,23 @@ CREATE TYPE <replaceable class="parameter">name</replaceable> <replaceable class="parameter">type_modifier_input_function</replaceable> and <replaceable class="parameter">type_modifier_output_function</replaceable> are needed if the type supports modifiers, that is optional constraints - attached to a type declaration, such as <literal>char(5)</> or - <literal>numeric(30,2)</>. <productname>PostgreSQL</productname> allows + attached to a type declaration, such as <literal>char(5)</literal> or + <literal>numeric(30,2)</literal>. <productname>PostgreSQL</productname> allows user-defined types to take one or more simple constants or identifiers as modifiers. However, this information must be capable of being packed into a single non-negative integer value for storage in the system catalogs. The <replaceable class="parameter">type_modifier_input_function</replaceable> - is passed the declared modifier(s) in the form of a <type>cstring</> + is passed the declared modifier(s) in the form of a <type>cstring</type> array. It must check the values for validity (throwing an error if they are wrong), and if they are correct, return a single non-negative - <type>integer</> value that will be stored as the column <quote>typmod</>. + <type>integer</type> value that will be stored as the column <quote>typmod</quote>. Type modifiers will be rejected if the type does not have a <replaceable class="parameter">type_modifier_input_function</replaceable>. The <replaceable class="parameter">type_modifier_output_function</replaceable> converts the internal integer typmod value back to the correct form for - user display. It must return a <type>cstring</> value that is the exact - string to append to the type name; for example <type>numeric</>'s - function might return <literal>(30,2)</>. + user display. It must return a <type>cstring</type> value that is the exact + string to append to the type name; for example <type>numeric</type>'s + function might return <literal>(30,2)</literal>. It is allowed to omit the <replaceable class="parameter">type_modifier_output_function</replaceable>, in which case the default display format is just the stored typmod integer @@ -305,14 +305,14 @@ CREATE TYPE <replaceable class="parameter">name</replaceable> <para> The optional <replaceable class="parameter">analyze_function</replaceable> performs type-specific statistics collection for columns of the data type. - By default, <command>ANALYZE</> will attempt to gather statistics using - the type's <quote>equals</> and <quote>less-than</> operators, if there + By default, <command>ANALYZE</command> will attempt to gather statistics using + the type's <quote>equals</quote> and <quote>less-than</quote> operators, if there is a default b-tree operator class for the type. For non-scalar types this behavior is likely to be unsuitable, so it can be overridden by specifying a custom analysis function. The analysis function must be - declared to take a single argument of type <type>internal</>, and return - a <type>boolean</> result. The detailed API for analysis functions appears - in <filename>src/include/commands/vacuum.h</>. + declared to take a single argument of type <type>internal</type>, and return + a <type>boolean</type> result. The detailed API for analysis functions appears + in <filename>src/include/commands/vacuum.h</filename>. </para> <para> @@ -327,7 +327,7 @@ CREATE TYPE <replaceable class="parameter">name</replaceable> positive integer, or variable-length, indicated by setting <replaceable class="parameter">internallength</replaceable> to <literal>VARIABLE</literal>. (Internally, this is represented - by setting <literal>typlen</> to -1.) The internal representation of all + by setting <literal>typlen</literal> to -1.) The internal representation of all variable-length types must start with a 4-byte integer giving the total length of this value of the type. (Note that the length field is often encoded, as described in <xref linkend="storage-toast">; it's unwise @@ -338,7 +338,7 @@ CREATE TYPE <replaceable class="parameter">name</replaceable> The optional flag <literal>PASSEDBYVALUE</literal> indicates that values of this data type are passed by value, rather than by reference. Types passed by value must be fixed-length, and their internal - representation cannot be larger than the size of the <type>Datum</> type + representation cannot be larger than the size of the <type>Datum</type> type (4 bytes on some machines, 8 bytes on others). </para> @@ -347,7 +347,7 @@ CREATE TYPE <replaceable class="parameter">name</replaceable> specifies the storage alignment required for the data type. The allowed values equate to alignment on 1, 2, 4, or 8 byte boundaries. Note that variable-length types must have an alignment of at least - 4, since they necessarily contain an <type>int4</> as their first component. + 4, since they necessarily contain an <type>int4</type> as their first component. </para> <para> @@ -372,12 +372,12 @@ CREATE TYPE <replaceable class="parameter">name</replaceable> <para> All <replaceable class="parameter">storage</replaceable> values other than <literal>plain</literal> imply that the functions of the data type - can handle values that have been <firstterm>toasted</>, as described + can handle values that have been <firstterm>toasted</firstterm>, as described in <xref linkend="storage-toast"> and <xref linkend="xtypes-toast">. The specific other value given merely determines the default TOAST storage strategy for columns of a toastable data type; users can pick other strategies for individual columns using <literal>ALTER TABLE - SET STORAGE</>. + SET STORAGE</literal>. </para> <para> @@ -389,9 +389,9 @@ CREATE TYPE <replaceable class="parameter">name</replaceable> <replaceable class="parameter">alignment</replaceable>, and <replaceable class="parameter">storage</replaceable> are copied from the named type. (It is possible, though usually undesirable, to override - some of these values by specifying them along with the <literal>LIKE</> + some of these values by specifying them along with the <literal>LIKE</literal> clause.) Specifying representation this way is especially useful when - the low-level implementation of the new type <quote>piggybacks</> on an + the low-level implementation of the new type <quote>piggybacks</quote> on an existing type in some fashion. </para> @@ -400,7 +400,7 @@ CREATE TYPE <replaceable class="parameter">name</replaceable> <replaceable class="parameter">preferred</replaceable> parameters can be used to help control which implicit cast will be applied in ambiguous situations. Each data type belongs to a category named by a single ASCII - character, and each type is either <quote>preferred</> or not within its + character, and each type is either <quote>preferred</quote> or not within its category. The parser will prefer casting to preferred types (but only from other types within the same category) when this rule is helpful in resolving overloaded functions or operators. For more details see <xref @@ -408,7 +408,7 @@ CREATE TYPE <replaceable class="parameter">name</replaceable> other types, it is sufficient to leave these settings at the defaults. However, for a group of related types that have implicit casts, it is often helpful to mark them all as belonging to a category and select one or two - of the <quote>most general</> types as being preferred within the category. + of the <quote>most general</quote> types as being preferred within the category. The <replaceable class="parameter">category</replaceable> parameter is especially useful when adding a user-defined type to an existing built-in category, such as the numeric or string types. However, it is also @@ -426,7 +426,7 @@ CREATE TYPE <replaceable class="parameter">name</replaceable> <para> To indicate that a type is an array, specify the type of the array - elements using the <literal>ELEMENT</> key word. For example, to + elements using the <literal>ELEMENT</literal> key word. For example, to define an array of 4-byte integers (<type>int4</type>), specify <literal>ELEMENT = int4</literal>. More details about array types appear below. @@ -465,26 +465,26 @@ CREATE TYPE <replaceable class="parameter">name</replaceable> so generated collides with an existing type name, the process is repeated until a non-colliding name is found.) This implicitly-created array type is variable length and uses the - built-in input and output functions <literal>array_in</> and - <literal>array_out</>. The array type tracks any changes in its + built-in input and output functions <literal>array_in</literal> and + <literal>array_out</literal>. The array type tracks any changes in its element type's owner or schema, and is dropped if the element type is. </para> <para> - You might reasonably ask why there is an <option>ELEMENT</> + You might reasonably ask why there is an <option>ELEMENT</option> option, if the system makes the correct array type automatically. - The only case where it's useful to use <option>ELEMENT</> is when you are + The only case where it's useful to use <option>ELEMENT</option> is when you are making a fixed-length type that happens to be internally an array of a number of identical things, and you want to allow these things to be accessed directly by subscripting, in addition to whatever operations you plan - to provide for the type as a whole. For example, type <type>point</> + to provide for the type as a whole. For example, type <type>point</type> is represented as just two floating-point numbers, which can be accessed - using <literal>point[0]</> and <literal>point[1]</>. + using <literal>point[0]</literal> and <literal>point[1]</literal>. Note that this facility only works for fixed-length types whose internal form is exactly a sequence of identical fixed-length fields. A subscriptable variable-length type must have the generalized internal representation - used by <literal>array_in</> and <literal>array_out</>. + used by <literal>array_in</literal> and <literal>array_out</literal>. For historical reasons (i.e., this is clearly wrong but it's far too late to change it), subscripting of fixed-length array types starts from zero, rather than from one as for variable-length arrays. @@ -697,7 +697,7 @@ CREATE TYPE <replaceable class="parameter">name</replaceable> <replaceable class="parameter">alignment</replaceable>, and <replaceable class="parameter">storage</replaceable> are copied from that type, unless overridden by explicit - specification elsewhere in this <command>CREATE TYPE</> command. + specification elsewhere in this <command>CREATE TYPE</command> command. </para> </listitem> </varlistentry> @@ -707,7 +707,7 @@ CREATE TYPE <replaceable class="parameter">name</replaceable> <listitem> <para> The category code (a single ASCII character) for this type. - The default is <literal>'U'</> for <quote>user-defined type</>. + The default is <literal>'U'</literal> for <quote>user-defined type</quote>. Other standard category codes can be found in <xref linkend="catalog-typcategory-table">. You may also choose other ASCII characters in order to create custom categories. @@ -779,7 +779,7 @@ CREATE TYPE <replaceable class="parameter">name</replaceable> This is usually not an issue for the sorts of functions that are useful in a type definition. But you might want to think twice before designing a type - in a way that would require <quote>secret</> information to be used + in a way that would require <quote>secret</quote> information to be used while converting it to or from external form. </para> @@ -792,7 +792,7 @@ CREATE TYPE <replaceable class="parameter">name</replaceable> this in case of maximum-length names or collisions with user type names that begin with underscore. Writing code that depends on this convention is therefore deprecated. Instead, use - <structname>pg_type</>.<structfield>typarray</> to locate the array type + <structname>pg_type</structname>.<structfield>typarray</structfield> to locate the array type associated with a given type. </para> @@ -807,7 +807,7 @@ CREATE TYPE <replaceable class="parameter">name</replaceable> <para> Before <productname>PostgreSQL</productname> version 8.2, the shell-type creation syntax - <literal>CREATE TYPE <replaceable>name</></literal> did not exist. + <literal>CREATE TYPE <replaceable>name</replaceable></literal> did not exist. The way to create a new base type was to create its input function first. In this approach, <productname>PostgreSQL</productname> will first see the name of the new data type as the return type of the input function. @@ -824,10 +824,10 @@ CREATE TYPE <replaceable class="parameter">name</replaceable> In <productname>PostgreSQL</productname> versions before 7.3, it was customary to avoid creating a shell type at all, by replacing the functions' forward references to the type name with the placeholder - pseudo-type <type>opaque</>. The <type>cstring</> arguments and - results also had to be declared as <type>opaque</> before 7.3. To - support loading of old dump files, <command>CREATE TYPE</> will - accept I/O functions declared using <type>opaque</>, but it will issue + pseudo-type <type>opaque</type>. The <type>cstring</type> arguments and + results also had to be declared as <type>opaque</type> before 7.3. To + support loading of old dump files, <command>CREATE TYPE</command> will + accept I/O functions declared using <type>opaque</type>, but it will issue a notice and change the function declarations to use the correct types. </para> @@ -894,7 +894,7 @@ CREATE TABLE myboxes ( <para> If the internal structure of <type>box</type> were an array of four - <type>float4</> elements, we might instead use: + <type>float4</type> elements, we might instead use: <programlisting> CREATE TYPE box ( INTERNALLENGTH = 16, @@ -933,11 +933,11 @@ CREATE TABLE big_objs ( <para> The first form of the <command>CREATE TYPE</command> command, which - creates a composite type, conforms to the <acronym>SQL</> standard. + creates a composite type, conforms to the <acronym>SQL</acronym> standard. The other forms are <productname>PostgreSQL</productname> extensions. The <command>CREATE TYPE</command> statement in - the <acronym>SQL</> standard also defines other forms that are not - implemented in <productname>PostgreSQL</>. + the <acronym>SQL</acronym> standard also defines other forms that are not + implemented in <productname>PostgreSQL</productname>. </para> <para> diff --git a/doc/src/sgml/ref/create_user.sgml b/doc/src/sgml/ref/create_user.sgml index 480b6405e6b..500169da986 100644 --- a/doc/src/sgml/ref/create_user.sgml +++ b/doc/src/sgml/ref/create_user.sgml @@ -51,8 +51,8 @@ CREATE USER <replaceable class="parameter">name</replaceable> [ [ WITH ] <replac <command>CREATE USER</command> is now an alias for <xref linkend="sql-createrole">. The only difference is that when the command is spelled - <command>CREATE USER</command>, <literal>LOGIN</> is assumed - by default, whereas <literal>NOLOGIN</> is assumed when + <command>CREATE USER</command>, <literal>LOGIN</literal> is assumed + by default, whereas <literal>NOLOGIN</literal> is assumed when the command is spelled <command>CREATE ROLE</command>. </para> diff --git a/doc/src/sgml/ref/create_user_mapping.sgml b/doc/src/sgml/ref/create_user_mapping.sgml index d6f29c94893..10182e14266 100644 --- a/doc/src/sgml/ref/create_user_mapping.sgml +++ b/doc/src/sgml/ref/create_user_mapping.sgml @@ -41,7 +41,7 @@ CREATE USER MAPPING [IF NOT EXISTS] FOR { <replaceable class="parameter">user_na <para> The owner of a foreign server can create user mappings for that server for any user. Also, a user can create a user mapping for - their own user name if <literal>USAGE</> privilege on the server has + their own user name if <literal>USAGE</literal> privilege on the server has been granted to the user. </para> </refsect1> @@ -51,7 +51,7 @@ CREATE USER MAPPING [IF NOT EXISTS] FOR { <replaceable class="parameter">user_na <variablelist> <varlistentry> - <term><literal>IF NOT EXISTS</></term> + <term><literal>IF NOT EXISTS</literal></term> <listitem> <para> Do not throw an error if a mapping of the given user to the given foreign @@ -67,8 +67,8 @@ CREATE USER MAPPING [IF NOT EXISTS] FOR { <replaceable class="parameter">user_na <listitem> <para> The name of an existing user that is mapped to foreign server. - <literal>CURRENT_USER</> and <literal>USER</> match the name of - the current user. When <literal>PUBLIC</> is specified, a + <literal>CURRENT_USER</literal> and <literal>USER</literal> match the name of + the current user. When <literal>PUBLIC</literal> is specified, a so-called public mapping is created that is used when no user-specific mapping is applicable. </para> @@ -103,7 +103,7 @@ CREATE USER MAPPING [IF NOT EXISTS] FOR { <replaceable class="parameter">user_na <title>Examples</title> <para> - Create a user mapping for user <literal>bob</>, server <literal>foo</>: + Create a user mapping for user <literal>bob</literal>, server <literal>foo</literal>: <programlisting> CREATE USER MAPPING FOR bob SERVER foo OPTIONS (user 'bob', password 'secret'); </programlisting></para> diff --git a/doc/src/sgml/ref/create_view.sgml b/doc/src/sgml/ref/create_view.sgml index 695c7593120..c0dd0224955 100644 --- a/doc/src/sgml/ref/create_view.sgml +++ b/doc/src/sgml/ref/create_view.sgml @@ -48,7 +48,7 @@ CREATE [ OR REPLACE ] [ TEMP | TEMPORARY ] [ RECURSIVE ] VIEW <replaceable class <para> If a schema name is given (for example, <literal>CREATE VIEW - myschema.myview ...</>) then the view is created in the specified + myschema.myview ...</literal>) then the view is created in the specified schema. Otherwise it is created in the current schema. Temporary views exist in a special schema, so a schema name cannot be given when creating a temporary view. The name of the view must be @@ -62,7 +62,7 @@ CREATE [ OR REPLACE ] [ TEMP | TEMPORARY ] [ RECURSIVE ] VIEW <replaceable class <variablelist> <varlistentry> - <term><literal>TEMPORARY</> or <literal>TEMP</></term> + <term><literal>TEMPORARY</literal> or <literal>TEMP</literal></term> <listitem> <para> If specified, the view is created as a temporary view. @@ -82,16 +82,16 @@ CREATE [ OR REPLACE ] [ TEMP | TEMPORARY ] [ RECURSIVE ] VIEW <replaceable class </varlistentry> <varlistentry> - <term><literal>RECURSIVE</></term> + <term><literal>RECURSIVE</literal></term> <listitem> <para> Creates a recursive view. The syntax <synopsis> -CREATE RECURSIVE VIEW [ <replaceable>schema</> . ] <replaceable>view_name</> (<replaceable>column_names</>) AS SELECT <replaceable>...</>; +CREATE RECURSIVE VIEW [ <replaceable>schema</replaceable> . ] <replaceable>view_name</replaceable> (<replaceable>column_names</replaceable>) AS SELECT <replaceable>...</replaceable>; </synopsis> is equivalent to <synopsis> -CREATE VIEW [ <replaceable>schema</> . ] <replaceable>view_name</> AS WITH RECURSIVE <replaceable>view_name</> (<replaceable>column_names</>) AS (SELECT <replaceable>...</>) SELECT <replaceable>column_names</> FROM <replaceable>view_name</>; +CREATE VIEW [ <replaceable>schema</replaceable> . ] <replaceable>view_name</replaceable> AS WITH RECURSIVE <replaceable>view_name</replaceable> (<replaceable>column_names</replaceable>) AS (SELECT <replaceable>...</replaceable>) SELECT <replaceable>column_names</replaceable> FROM <replaceable>view_name</replaceable>; </synopsis> A view column name list must be specified for a recursive view. </para> @@ -129,9 +129,9 @@ CREATE VIEW [ <replaceable>schema</> . ] <replaceable>view_name</> AS WITH RECUR <term><literal>check_option</literal> (<type>string</type>)</term> <listitem> <para> - This parameter may be either <literal>local</> or - <literal>cascaded</>, and is equivalent to specifying - <literal>WITH [ CASCADED | LOCAL ] CHECK OPTION</> (see below). + This parameter may be either <literal>local</literal> or + <literal>cascaded</literal>, and is equivalent to specifying + <literal>WITH [ CASCADED | LOCAL ] CHECK OPTION</literal> (see below). This option can be changed on existing views using <xref linkend="sql-alterview">. </para> @@ -175,12 +175,12 @@ CREATE VIEW [ <replaceable>schema</> . ] <replaceable>view_name</> AS WITH RECUR <listitem> <para> This option controls the behavior of automatically updatable views. When - this option is specified, <command>INSERT</> and <command>UPDATE</> + this option is specified, <command>INSERT</command> and <command>UPDATE</command> commands on the view will be checked to ensure that new rows satisfy the view-defining condition (that is, the new rows are checked to ensure that they are visible through the view). If they are not, the update will be - rejected. If the <literal>CHECK OPTION</> is not specified, - <command>INSERT</> and <command>UPDATE</> commands on the view are + rejected. If the <literal>CHECK OPTION</literal> is not specified, + <command>INSERT</command> and <command>UPDATE</command> commands on the view are allowed to create rows that are not visible through the view. The following check options are supported: @@ -191,7 +191,7 @@ CREATE VIEW [ <replaceable>schema</> . ] <replaceable>view_name</> AS WITH RECUR <para> New rows are only checked against the conditions defined directly in the view itself. Any conditions defined on underlying base views are - not checked (unless they also specify the <literal>CHECK OPTION</>). + not checked (unless they also specify the <literal>CHECK OPTION</literal>). </para> </listitem> </varlistentry> @@ -201,9 +201,9 @@ CREATE VIEW [ <replaceable>schema</> . ] <replaceable>view_name</> AS WITH RECUR <listitem> <para> New rows are checked against the conditions of the view and all - underlying base views. If the <literal>CHECK OPTION</> is specified, - and neither <literal>LOCAL</> nor <literal>CASCADED</> is specified, - then <literal>CASCADED</> is assumed. + underlying base views. If the <literal>CHECK OPTION</literal> is specified, + and neither <literal>LOCAL</literal> nor <literal>CASCADED</literal> is specified, + then <literal>CASCADED</literal> is assumed. </para> </listitem> </varlistentry> @@ -211,26 +211,26 @@ CREATE VIEW [ <replaceable>schema</> . ] <replaceable>view_name</> AS WITH RECUR </para> <para> - The <literal>CHECK OPTION</> may not be used with <literal>RECURSIVE</> + The <literal>CHECK OPTION</literal> may not be used with <literal>RECURSIVE</literal> views. </para> <para> - Note that the <literal>CHECK OPTION</> is only supported on views that - are automatically updatable, and do not have <literal>INSTEAD OF</> - triggers or <literal>INSTEAD</> rules. If an automatically updatable - view is defined on top of a base view that has <literal>INSTEAD OF</> - triggers, then the <literal>LOCAL CHECK OPTION</> may be used to check + Note that the <literal>CHECK OPTION</literal> is only supported on views that + are automatically updatable, and do not have <literal>INSTEAD OF</literal> + triggers or <literal>INSTEAD</literal> rules. If an automatically updatable + view is defined on top of a base view that has <literal>INSTEAD OF</literal> + triggers, then the <literal>LOCAL CHECK OPTION</literal> may be used to check the conditions on the automatically updatable view, but the conditions - on the base view with <literal>INSTEAD OF</> triggers will not be + on the base view with <literal>INSTEAD OF</literal> triggers will not be checked (a cascaded check option will not cascade down to a trigger-updatable view, and any check options defined directly on a trigger-updatable view will be ignored). If the view or any of its base - relations has an <literal>INSTEAD</> rule that causes the - <command>INSERT</> or <command>UPDATE</> command to be rewritten, then + relations has an <literal>INSTEAD</literal> rule that causes the + <command>INSERT</command> or <command>UPDATE</command> command to be rewritten, then all check options will be ignored in the rewritten query, including any checks from automatically updatable views defined on top of the relation - with the <literal>INSTEAD</> rule. + with the <literal>INSTEAD</literal> rule. </para> </listitem> </varlistentry> @@ -251,8 +251,8 @@ CREATE VIEW [ <replaceable>schema</> . ] <replaceable>view_name</> AS WITH RECUR <programlisting> CREATE VIEW vista AS SELECT 'Hello World'; </programlisting> - is bad form because the column name defaults to <literal>?column?</>; - also, the column data type defaults to <type>text</>, which might not + is bad form because the column name defaults to <literal>?column?</literal>; + also, the column data type defaults to <type>text</type>, which might not be what you wanted. Better style for a string literal in a view's result is something like: <programlisting> @@ -271,7 +271,7 @@ CREATE VIEW vista AS SELECT text 'Hello World' AS hello; </para> <para> - When <command>CREATE OR REPLACE VIEW</> is used on an + When <command>CREATE OR REPLACE VIEW</command> is used on an existing view, only the view's defining SELECT rule is changed. Other view properties, including ownership, permissions, and non-SELECT rules, remain unchanged. You must own the view @@ -287,30 +287,30 @@ CREATE VIEW vista AS SELECT text 'Hello World' AS hello; <para> Simple views are automatically updatable: the system will allow - <command>INSERT</>, <command>UPDATE</> and <command>DELETE</> statements + <command>INSERT</command>, <command>UPDATE</command> and <command>DELETE</command> statements to be used on the view in the same way as on a regular table. A view is automatically updatable if it satisfies all of the following conditions: <itemizedlist> <listitem> <para> - The view must have exactly one entry in its <literal>FROM</> list, + The view must have exactly one entry in its <literal>FROM</literal> list, which must be a table or another updatable view. </para> </listitem> <listitem> <para> - The view definition must not contain <literal>WITH</>, - <literal>DISTINCT</>, <literal>GROUP BY</>, <literal>HAVING</>, - <literal>LIMIT</>, or <literal>OFFSET</> clauses at the top level. + The view definition must not contain <literal>WITH</literal>, + <literal>DISTINCT</literal>, <literal>GROUP BY</literal>, <literal>HAVING</literal>, + <literal>LIMIT</literal>, or <literal>OFFSET</literal> clauses at the top level. </para> </listitem> <listitem> <para> - The view definition must not contain set operations (<literal>UNION</>, - <literal>INTERSECT</> or <literal>EXCEPT</>) at the top level. + The view definition must not contain set operations (<literal>UNION</literal>, + <literal>INTERSECT</literal> or <literal>EXCEPT</literal>) at the top level. </para> </listitem> @@ -327,42 +327,42 @@ CREATE VIEW vista AS SELECT text 'Hello World' AS hello; An automatically updatable view may contain a mix of updatable and non-updatable columns. A column is updatable if it is a simple reference to an updatable column of the underlying base relation; otherwise the - column is read-only, and an error will be raised if an <command>INSERT</> - or <command>UPDATE</> statement attempts to assign a value to it. + column is read-only, and an error will be raised if an <command>INSERT</command> + or <command>UPDATE</command> statement attempts to assign a value to it. </para> <para> If the view is automatically updatable the system will convert any - <command>INSERT</>, <command>UPDATE</> or <command>DELETE</> statement + <command>INSERT</command>, <command>UPDATE</command> or <command>DELETE</command> statement on the view into the corresponding statement on the underlying base - relation. <command>INSERT</> statements that have an <literal>ON - CONFLICT UPDATE</> clause are fully supported. + relation. <command>INSERT</command> statements that have an <literal>ON + CONFLICT UPDATE</literal> clause are fully supported. </para> <para> - If an automatically updatable view contains a <literal>WHERE</> + If an automatically updatable view contains a <literal>WHERE</literal> condition, the condition restricts which rows of the base relation are - available to be modified by <command>UPDATE</> and <command>DELETE</> - statements on the view. However, an <command>UPDATE</> is allowed to - change a row so that it no longer satisfies the <literal>WHERE</> + available to be modified by <command>UPDATE</command> and <command>DELETE</command> + statements on the view. However, an <command>UPDATE</command> is allowed to + change a row so that it no longer satisfies the <literal>WHERE</literal> condition, and thus is no longer visible through the view. Similarly, - an <command>INSERT</> command can potentially insert base-relation rows - that do not satisfy the <literal>WHERE</> condition and thus are not - visible through the view (<literal>ON CONFLICT UPDATE</> may + an <command>INSERT</command> command can potentially insert base-relation rows + that do not satisfy the <literal>WHERE</literal> condition and thus are not + visible through the view (<literal>ON CONFLICT UPDATE</literal> may similarly affect an existing row not visible through the view). - The <literal>CHECK OPTION</> may be used to prevent - <command>INSERT</> and <command>UPDATE</> commands from creating + The <literal>CHECK OPTION</literal> may be used to prevent + <command>INSERT</command> and <command>UPDATE</command> commands from creating such rows that are not visible through the view. </para> <para> If an automatically updatable view is marked with the - <literal>security_barrier</> property then all the view's <literal>WHERE</> + <literal>security_barrier</literal> property then all the view's <literal>WHERE</literal> conditions (and any conditions using operators which are marked as <literal>LEAKPROOF</literal>) will always be evaluated before any conditions that a user of the view has added. See <xref linkend="rules-privileges"> for full details. Note that, due to this, rows which are not ultimately returned (because they do not - pass the user's <literal>WHERE</> conditions) may still end up being locked. + pass the user's <literal>WHERE</literal> conditions) may still end up being locked. <command>EXPLAIN</command> can be used to see which conditions are applied at the relation level (and therefore do not lock rows) and which are not. @@ -372,7 +372,7 @@ CREATE VIEW vista AS SELECT text 'Hello World' AS hello; A more complex view that does not satisfy all these conditions is read-only by default: the system will not allow an insert, update, or delete on the view. You can get the effect of an updatable view by - creating <literal>INSTEAD OF</> triggers on the view, which must + creating <literal>INSTEAD OF</literal> triggers on the view, which must convert attempted inserts, etc. on the view into appropriate actions on other tables. For more information see <xref linkend="sql-createtrigger">. Another possibility is to create rules @@ -404,13 +404,13 @@ CREATE VIEW comedies AS WHERE kind = 'Comedy'; </programlisting> This will create a view containing the columns that are in the - <literal>film</> table at the time of view creation. Though - <literal>*</> was used to create the view, columns added later to + <literal>film</literal> table at the time of view creation. Though + <literal>*</literal> was used to create the view, columns added later to the table will not be part of the view. </para> <para> - Create a view with <literal>LOCAL CHECK OPTION</>: + Create a view with <literal>LOCAL CHECK OPTION</literal>: <programlisting> CREATE VIEW universal_comedies AS @@ -419,16 +419,16 @@ CREATE VIEW universal_comedies AS WHERE classification = 'U' WITH LOCAL CHECK OPTION; </programlisting> - This will create a view based on the <literal>comedies</> view, showing - only films with <literal>kind = 'Comedy'</> and - <literal>classification = 'U'</>. Any attempt to <command>INSERT</> or - <command>UPDATE</> a row in the view will be rejected if the new row - doesn't have <literal>classification = 'U'</>, but the film - <literal>kind</> will not be checked. + This will create a view based on the <literal>comedies</literal> view, showing + only films with <literal>kind = 'Comedy'</literal> and + <literal>classification = 'U'</literal>. Any attempt to <command>INSERT</command> or + <command>UPDATE</command> a row in the view will be rejected if the new row + doesn't have <literal>classification = 'U'</literal>, but the film + <literal>kind</literal> will not be checked. </para> <para> - Create a view with <literal>CASCADED CHECK OPTION</>: + Create a view with <literal>CASCADED CHECK OPTION</literal>: <programlisting> CREATE VIEW pg_comedies AS @@ -437,8 +437,8 @@ CREATE VIEW pg_comedies AS WHERE classification = 'PG' WITH CASCADED CHECK OPTION; </programlisting> - This will create a view that checks both the <literal>kind</> and - <literal>classification</> of new rows. + This will create a view that checks both the <literal>kind</literal> and + <literal>classification</literal> of new rows. </para> <para> @@ -454,10 +454,10 @@ CREATE VIEW comedies AS FROM films f WHERE f.kind = 'Comedy'; </programlisting> - This view will support <command>INSERT</>, <command>UPDATE</> and - <command>DELETE</>. All the columns from the <literal>films</> table will - be updatable, whereas the computed columns <literal>country</> and - <literal>avg_rating</> will be read-only. + This view will support <command>INSERT</command>, <command>UPDATE</command> and + <command>DELETE</command>. All the columns from the <literal>films</literal> table will + be updatable, whereas the computed columns <literal>country</literal> and + <literal>avg_rating</literal> will be read-only. </para> <para> @@ -469,7 +469,7 @@ UNION ALL SELECT n+1 FROM nums_1_100 WHERE n < 100; </programlisting> Notice that although the recursive view's name is schema-qualified in this - <command>CREATE</>, its internal self-reference is not schema-qualified. + <command>CREATE</command>, its internal self-reference is not schema-qualified. This is because the implicitly-created CTE's name cannot be schema-qualified. </para> @@ -482,7 +482,7 @@ UNION ALL <command>CREATE OR REPLACE VIEW</command> is a <productname>PostgreSQL</productname> language extension. So is the concept of a temporary view. - The <literal>WITH ( ... )</> clause is an extension as well. + The <literal>WITH ( ... )</literal> clause is an extension as well. </para> </refsect1> diff --git a/doc/src/sgml/ref/createdb.sgml b/doc/src/sgml/ref/createdb.sgml index 9fc4c16a810..0112d3a848f 100644 --- a/doc/src/sgml/ref/createdb.sgml +++ b/doc/src/sgml/ref/createdb.sgml @@ -86,8 +86,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-D <replaceable class="parameter">tablespace</replaceable></></term> - <term><option>--tablespace=<replaceable class="parameter">tablespace</replaceable></></term> + <term><option>-D <replaceable class="parameter">tablespace</replaceable></option></term> + <term><option>--tablespace=<replaceable class="parameter">tablespace</replaceable></option></term> <listitem> <para> Specifies the default tablespace for the database. (This name @@ -97,8 +97,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-e</></term> - <term><option>--echo</></term> + <term><option>-e</option></term> + <term><option>--echo</option></term> <listitem> <para> Echo the commands that <application>createdb</application> generates @@ -108,8 +108,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-E <replaceable class="parameter">encoding</replaceable></></term> - <term><option>--encoding=<replaceable class="parameter">encoding</replaceable></></term> + <term><option>-E <replaceable class="parameter">encoding</replaceable></option></term> + <term><option>--encoding=<replaceable class="parameter">encoding</replaceable></option></term> <listitem> <para> Specifies the character encoding scheme to be used in this @@ -121,8 +121,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-l <replaceable class="parameter">locale</replaceable></></term> - <term><option>--locale=<replaceable class="parameter">locale</replaceable></></term> + <term><option>-l <replaceable class="parameter">locale</replaceable></option></term> + <term><option>--locale=<replaceable class="parameter">locale</replaceable></option></term> <listitem> <para> Specifies the locale to be used in this database. This is equivalent @@ -132,7 +132,7 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>--lc-collate=<replaceable class="parameter">locale</replaceable></></term> + <term><option>--lc-collate=<replaceable class="parameter">locale</replaceable></option></term> <listitem> <para> Specifies the LC_COLLATE setting to be used in this database. @@ -141,7 +141,7 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>--lc-ctype=<replaceable class="parameter">locale</replaceable></></term> + <term><option>--lc-ctype=<replaceable class="parameter">locale</replaceable></option></term> <listitem> <para> Specifies the LC_CTYPE setting to be used in this database. @@ -150,8 +150,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-O <replaceable class="parameter">owner</replaceable></></term> - <term><option>--owner=<replaceable class="parameter">owner</replaceable></></term> + <term><option>-O <replaceable class="parameter">owner</replaceable></option></term> + <term><option>--owner=<replaceable class="parameter">owner</replaceable></option></term> <listitem> <para> Specifies the database user who will own the new database. @@ -161,8 +161,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-T <replaceable class="parameter">template</replaceable></></term> - <term><option>--template=<replaceable class="parameter">template</replaceable></></term> + <term><option>-T <replaceable class="parameter">template</replaceable></option></term> + <term><option>--template=<replaceable class="parameter">template</replaceable></option></term> <listitem> <para> Specifies the template database from which to build this @@ -172,8 +172,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-V</></term> - <term><option>--version</></term> + <term><option>-V</option></term> + <term><option>--version</option></term> <listitem> <para> Print the <application>createdb</application> version and exit. @@ -182,8 +182,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-?</></term> - <term><option>--help</></term> + <term><option>-?</option></term> + <term><option>--help</option></term> <listitem> <para> Show help about <application>createdb</application> command line @@ -209,8 +209,8 @@ PostgreSQL documentation <variablelist> <varlistentry> - <term><option>-h <replaceable class="parameter">host</replaceable></></term> - <term><option>--host=<replaceable class="parameter">host</replaceable></></term> + <term><option>-h <replaceable class="parameter">host</replaceable></option></term> + <term><option>--host=<replaceable class="parameter">host</replaceable></option></term> <listitem> <para> Specifies the host name of the machine on which the @@ -221,8 +221,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-p <replaceable class="parameter">port</replaceable></></term> - <term><option>--port=<replaceable class="parameter">port</replaceable></></term> + <term><option>-p <replaceable class="parameter">port</replaceable></option></term> + <term><option>--port=<replaceable class="parameter">port</replaceable></option></term> <listitem> <para> Specifies the TCP port or the local Unix domain socket file @@ -232,8 +232,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-U <replaceable class="parameter">username</replaceable></></term> - <term><option>--username=<replaceable class="parameter">username</replaceable></></term> + <term><option>-U <replaceable class="parameter">username</replaceable></option></term> + <term><option>--username=<replaceable class="parameter">username</replaceable></option></term> <listitem> <para> User name to connect as. @@ -242,8 +242,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-w</></term> - <term><option>--no-password</></term> + <term><option>-w</option></term> + <term><option>--no-password</option></term> <listitem> <para> Never issue a password prompt. If the server requires @@ -257,8 +257,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-W</></term> - <term><option>--password</></term> + <term><option>-W</option></term> + <term><option>--password</option></term> <listitem> <para> Force <application>createdb</application> to prompt for a @@ -271,14 +271,14 @@ PostgreSQL documentation for a password if the server demands password authentication. However, <application>createdb</application> will waste a connection attempt finding out that the server wants a password. - In some cases it is worth typing <option>-W</> to avoid the extra + In some cases it is worth typing <option>-W</option> to avoid the extra connection attempt. </para> </listitem> </varlistentry> <varlistentry> - <term><option>--maintenance-db=<replaceable class="parameter">dbname</replaceable></></term> + <term><option>--maintenance-db=<replaceable class="parameter">dbname</replaceable></option></term> <listitem> <para> Specifies the name of the database to connect to when creating the @@ -325,8 +325,8 @@ PostgreSQL documentation </variablelist> <para> - This utility, like most other <productname>PostgreSQL</> utilities, - also uses the environment variables supported by <application>libpq</> + This utility, like most other <productname>PostgreSQL</productname> utilities, + also uses the environment variables supported by <application>libpq</application> (see <xref linkend="libpq-envars">). </para> @@ -362,7 +362,7 @@ PostgreSQL documentation <para> To create the database <literal>demo</literal> using the - server on host <literal>eden</>, port 5000, using the + server on host <literal>eden</literal>, port 5000, using the <literal>template0</literal> template database, here is the command-line command and the underlying SQL command: <screen> diff --git a/doc/src/sgml/ref/createuser.sgml b/doc/src/sgml/ref/createuser.sgml index fda77976ff2..788ee81dafb 100644 --- a/doc/src/sgml/ref/createuser.sgml +++ b/doc/src/sgml/ref/createuser.sgml @@ -34,15 +34,15 @@ PostgreSQL documentation <para> <application>createuser</application> creates a new <productname>PostgreSQL</productname> user (or more precisely, a role). - Only superusers and users with <literal>CREATEROLE</> privilege can create + Only superusers and users with <literal>CREATEROLE</literal> privilege can create new users, so <application>createuser</application> must be invoked by someone who can connect as a superuser or a user with - <literal>CREATEROLE</> privilege. + <literal>CREATEROLE</literal> privilege. </para> <para> If you wish to create a new superuser, you must connect as a - superuser, not merely with <literal>CREATEROLE</> privilege. + superuser, not merely with <literal>CREATEROLE</literal> privilege. Being a superuser implies the ability to bypass all access permission checks within the database, so superuserdom should not be granted lightly. </para> @@ -61,7 +61,7 @@ PostgreSQL documentation <title>Options</title> <para> - <application>createuser</> accepts the following command-line arguments: + <application>createuser</application> accepts the following command-line arguments: <variablelist> <varlistentry> @@ -77,8 +77,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-c <replaceable class="parameter">number</replaceable></></term> - <term><option>--connection-limit=<replaceable class="parameter">number</replaceable></></term> + <term><option>-c <replaceable class="parameter">number</replaceable></option></term> + <term><option>--connection-limit=<replaceable class="parameter">number</replaceable></option></term> <listitem> <para> Set a maximum number of connections for the new user. @@ -88,8 +88,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-d</></term> - <term><option>--createdb</></term> + <term><option>-d</option></term> + <term><option>--createdb</option></term> <listitem> <para> The new user will be allowed to create databases. @@ -98,8 +98,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-D</></term> - <term><option>--no-createdb</></term> + <term><option>-D</option></term> + <term><option>--no-createdb</option></term> <listitem> <para> The new user will not be allowed to create databases. This is the @@ -109,8 +109,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-e</></term> - <term><option>--echo</></term> + <term><option>-e</option></term> + <term><option>--echo</option></term> <listitem> <para> Echo the commands that <application>createuser</application> generates @@ -120,8 +120,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-E</></term> - <term><option>--encrypted</></term> + <term><option>-E</option></term> + <term><option>--encrypted</option></term> <listitem> <para> This option is obsolete but still accepted for backward @@ -131,21 +131,21 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-g <replaceable class="parameter">role</replaceable></></term> - <term><option>--role=<replaceable class="parameter">role</replaceable></></term> + <term><option>-g <replaceable class="parameter">role</replaceable></option></term> + <term><option>--role=<replaceable class="parameter">role</replaceable></option></term> <listitem> <para> Indicates role to which this role will be added immediately as a new member. Multiple roles to which this role will be added as a member can be specified by writing multiple - <option>-g</> switches. + <option>-g</option> switches. </para> </listitem> </varlistentry> <varlistentry> - <term><option>-i</></term> - <term><option>--inherit</></term> + <term><option>-i</option></term> + <term><option>--inherit</option></term> <listitem> <para> The new role will automatically inherit privileges of roles @@ -156,8 +156,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-I</></term> - <term><option>--no-inherit</></term> + <term><option>-I</option></term> + <term><option>--no-inherit</option></term> <listitem> <para> The new role will not automatically inherit privileges of roles @@ -167,7 +167,7 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>--interactive</></term> + <term><option>--interactive</option></term> <listitem> <para> Prompt for the user name if none is specified on the command line, and @@ -181,8 +181,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-l</></term> - <term><option>--login</></term> + <term><option>-l</option></term> + <term><option>--login</option></term> <listitem> <para> The new user will be allowed to log in (that is, the user name @@ -193,8 +193,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-L</></term> - <term><option>--no-login</></term> + <term><option>-L</option></term> + <term><option>--no-login</option></term> <listitem> <para> The new user will not be allowed to log in. @@ -205,8 +205,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-P</></term> - <term><option>--pwprompt</></term> + <term><option>-P</option></term> + <term><option>--pwprompt</option></term> <listitem> <para> If given, <application>createuser</application> will issue a prompt for @@ -217,19 +217,19 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-r</></term> - <term><option>--createrole</></term> + <term><option>-r</option></term> + <term><option>--createrole</option></term> <listitem> <para> The new user will be allowed to create new roles (that is, - this user will have <literal>CREATEROLE</> privilege). + this user will have <literal>CREATEROLE</literal> privilege). </para> </listitem> </varlistentry> <varlistentry> - <term><option>-R</></term> - <term><option>--no-createrole</></term> + <term><option>-R</option></term> + <term><option>--no-createrole</option></term> <listitem> <para> The new user will not be allowed to create new roles. This is the @@ -239,8 +239,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-s</></term> - <term><option>--superuser</></term> + <term><option>-s</option></term> + <term><option>--superuser</option></term> <listitem> <para> The new user will be a superuser. @@ -249,8 +249,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-S</></term> - <term><option>--no-superuser</></term> + <term><option>-S</option></term> + <term><option>--no-superuser</option></term> <listitem> <para> The new user will not be a superuser. This is the default. @@ -259,8 +259,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-V</></term> - <term><option>--version</></term> + <term><option>-V</option></term> + <term><option>--version</option></term> <listitem> <para> Print the <application>createuser</application> version and exit. @@ -269,7 +269,7 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>--replication</></term> + <term><option>--replication</option></term> <listitem> <para> The new user will have the <literal>REPLICATION</literal> privilege, @@ -280,7 +280,7 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>--no-replication</></term> + <term><option>--no-replication</option></term> <listitem> <para> The new user will not have the <literal>REPLICATION</literal> @@ -291,8 +291,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-?</></term> - <term><option>--help</></term> + <term><option>-?</option></term> + <term><option>--help</option></term> <listitem> <para> Show help about <application>createuser</application> command line @@ -310,8 +310,8 @@ PostgreSQL documentation <variablelist> <varlistentry> - <term><option>-h <replaceable class="parameter">host</replaceable></></term> - <term><option>--host=<replaceable class="parameter">host</replaceable></></term> + <term><option>-h <replaceable class="parameter">host</replaceable></option></term> + <term><option>--host=<replaceable class="parameter">host</replaceable></option></term> <listitem> <para> Specifies the host name of the machine on which the @@ -323,8 +323,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-p <replaceable class="parameter">port</replaceable></></term> - <term><option>--port=<replaceable class="parameter">port</replaceable></></term> + <term><option>-p <replaceable class="parameter">port</replaceable></option></term> + <term><option>--port=<replaceable class="parameter">port</replaceable></option></term> <listitem> <para> Specifies the TCP port or local Unix domain socket file @@ -335,8 +335,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-U <replaceable class="parameter">username</replaceable></></term> - <term><option>--username=<replaceable class="parameter">username</replaceable></></term> + <term><option>-U <replaceable class="parameter">username</replaceable></option></term> + <term><option>--username=<replaceable class="parameter">username</replaceable></option></term> <listitem> <para> User name to connect as (not the user name to create). @@ -345,8 +345,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-w</></term> - <term><option>--no-password</></term> + <term><option>-w</option></term> + <term><option>--no-password</option></term> <listitem> <para> Never issue a password prompt. If the server requires @@ -360,8 +360,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-W</></term> - <term><option>--password</></term> + <term><option>-W</option></term> + <term><option>--password</option></term> <listitem> <para> Force <application>createuser</application> to prompt for a @@ -375,7 +375,7 @@ PostgreSQL documentation for a password if the server demands password authentication. However, <application>createuser</application> will waste a connection attempt finding out that the server wants a password. - In some cases it is worth typing <option>-W</> to avoid the extra + In some cases it is worth typing <option>-W</option> to avoid the extra connection attempt. </para> </listitem> @@ -403,8 +403,8 @@ PostgreSQL documentation </variablelist> <para> - This utility, like most other <productname>PostgreSQL</> utilities, - also uses the environment variables supported by <application>libpq</> + This utility, like most other <productname>PostgreSQL</productname> utilities, + also uses the environment variables supported by <application>libpq</application> (see <xref linkend="libpq-envars">). </para> @@ -451,7 +451,7 @@ PostgreSQL documentation <para> To create the same user <literal>joe</literal> using the - server on host <literal>eden</>, port 5000, with attributes explicitly specified, + server on host <literal>eden</literal>, port 5000, with attributes explicitly specified, taking a look at the underlying command: <screen> <prompt>$ </prompt><userinput>createuser -h eden -p 5000 -S -D -R -e joe</userinput> diff --git a/doc/src/sgml/ref/declare.sgml b/doc/src/sgml/ref/declare.sgml index 5cb85cc568f..8eae0354af8 100644 --- a/doc/src/sgml/ref/declare.sgml +++ b/doc/src/sgml/ref/declare.sgml @@ -45,7 +45,7 @@ DECLARE <replaceable class="parameter">name</replaceable> [ BINARY ] [ INSENSITI <note> <para> This page describes usage of cursors at the SQL command level. - If you are trying to use cursors inside a <application>PL/pgSQL</> + If you are trying to use cursors inside a <application>PL/pgSQL</application> function, the rules are different — see <xref linkend="plpgsql-cursors">. </para> @@ -144,13 +144,13 @@ DECLARE <replaceable class="parameter">name</replaceable> [ BINARY ] [ INSENSITI <para> Normal cursors return data in text format, the same as a - <command>SELECT</> would produce. The <literal>BINARY</> option + <command>SELECT</command> would produce. The <literal>BINARY</literal> option specifies that the cursor should return data in binary format. This reduces conversion effort for both the server and client, at the cost of more programmer effort to deal with platform-dependent binary data formats. As an example, if a query returns a value of one from an integer column, - you would get a string of <literal>1</> with a default cursor, + you would get a string of <literal>1</literal> with a default cursor, whereas with a binary cursor you would get a 4-byte field containing the internal representation of the value (in big-endian byte order). @@ -165,8 +165,8 @@ DECLARE <replaceable class="parameter">name</replaceable> [ BINARY ] [ INSENSITI <note> <para> - When the client application uses the <quote>extended query</> protocol - to issue a <command>FETCH</> command, the Bind protocol message + When the client application uses the <quote>extended query</quote> protocol + to issue a <command>FETCH</command> command, the Bind protocol message specifies whether data is to be retrieved in text or binary format. This choice overrides the way that the cursor is defined. The concept of a binary cursor as such is thus obsolete when using extended query @@ -177,7 +177,7 @@ DECLARE <replaceable class="parameter">name</replaceable> [ BINARY ] [ INSENSITI <para> Unless <literal>WITH HOLD</literal> is specified, the cursor created by this command can only be used within the current - transaction. Thus, <command>DECLARE</> without <literal>WITH + transaction. Thus, <command>DECLARE</command> without <literal>WITH HOLD</literal> is useless outside a transaction block: the cursor would survive only to the completion of the statement. Therefore <productname>PostgreSQL</productname> reports an error if such a @@ -204,25 +204,25 @@ DECLARE <replaceable class="parameter">name</replaceable> [ BINARY ] [ INSENSITI <para> <literal>WITH HOLD</literal> may not be specified when the query - includes <literal>FOR UPDATE</> or <literal>FOR SHARE</>. + includes <literal>FOR UPDATE</literal> or <literal>FOR SHARE</literal>. </para> <para> - The <literal>SCROLL</> option should be specified when defining a + The <literal>SCROLL</literal> option should be specified when defining a cursor that will be used to fetch backwards. This is required by the SQL standard. However, for compatibility with earlier versions, <productname>PostgreSQL</productname> will allow - backward fetches without <literal>SCROLL</>, if the cursor's query + backward fetches without <literal>SCROLL</literal>, if the cursor's query plan is simple enough that no extra overhead is needed to support it. However, application developers are advised not to rely on using backward fetches from a cursor that has not been created - with <literal>SCROLL</literal>. If <literal>NO SCROLL</> is + with <literal>SCROLL</literal>. If <literal>NO SCROLL</literal> is specified, then backward fetches are disallowed in any case. </para> <para> Backward fetches are also disallowed when the query - includes <literal>FOR UPDATE</> or <literal>FOR SHARE</>; therefore + includes <literal>FOR UPDATE</literal> or <literal>FOR SHARE</literal>; therefore <literal>SCROLL</literal> may not be specified in this case. </para> @@ -241,42 +241,42 @@ DECLARE <replaceable class="parameter">name</replaceable> [ BINARY ] [ INSENSITI </caution> <para> - If the cursor's query includes <literal>FOR UPDATE</> or <literal>FOR - SHARE</>, then returned rows are locked at the time they are first + If the cursor's query includes <literal>FOR UPDATE</literal> or <literal>FOR + SHARE</literal>, then returned rows are locked at the time they are first fetched, in the same way as for a regular <xref linkend="sql-select"> command with these options. In addition, the returned rows will be the most up-to-date versions; therefore these options provide the equivalent of what the SQL standard - calls a <quote>sensitive cursor</>. (Specifying <literal>INSENSITIVE</> - together with <literal>FOR UPDATE</> or <literal>FOR SHARE</> is an error.) + calls a <quote>sensitive cursor</quote>. (Specifying <literal>INSENSITIVE</literal> + together with <literal>FOR UPDATE</literal> or <literal>FOR SHARE</literal> is an error.) </para> <caution> <para> - It is generally recommended to use <literal>FOR UPDATE</> if the cursor - is intended to be used with <command>UPDATE ... WHERE CURRENT OF</> or - <command>DELETE ... WHERE CURRENT OF</>. Using <literal>FOR UPDATE</> + It is generally recommended to use <literal>FOR UPDATE</literal> if the cursor + is intended to be used with <command>UPDATE ... WHERE CURRENT OF</command> or + <command>DELETE ... WHERE CURRENT OF</command>. Using <literal>FOR UPDATE</literal> prevents other sessions from changing the rows between the time they are - fetched and the time they are updated. Without <literal>FOR UPDATE</>, - a subsequent <literal>WHERE CURRENT OF</> command will have no effect if + fetched and the time they are updated. Without <literal>FOR UPDATE</literal>, + a subsequent <literal>WHERE CURRENT OF</literal> command will have no effect if the row was changed since the cursor was created. </para> <para> - Another reason to use <literal>FOR UPDATE</> is that without it, a - subsequent <literal>WHERE CURRENT OF</> might fail if the cursor query + Another reason to use <literal>FOR UPDATE</literal> is that without it, a + subsequent <literal>WHERE CURRENT OF</literal> might fail if the cursor query does not meet the SQL standard's rules for being <quote>simply - updatable</> (in particular, the cursor must reference just one table - and not use grouping or <literal>ORDER BY</>). Cursors + updatable</quote> (in particular, the cursor must reference just one table + and not use grouping or <literal>ORDER BY</literal>). Cursors that are not simply updatable might work, or might not, depending on plan choice details; so in the worst case, an application might work in testing and then fail in production. </para> <para> - The main reason not to use <literal>FOR UPDATE</> with <literal>WHERE - CURRENT OF</> is if you need the cursor to be scrollable, or to be + The main reason not to use <literal>FOR UPDATE</literal> with <literal>WHERE + CURRENT OF</literal> is if you need the cursor to be scrollable, or to be insensitive to the subsequent updates (that is, continue to show the old data). If this is a requirement, pay close heed to the caveats shown above. @@ -321,13 +321,13 @@ DECLARE liahona CURSOR FOR SELECT * FROM films; The SQL standard says that it is implementation-dependent whether cursors are sensitive to concurrent updates of the underlying data by default. In <productname>PostgreSQL</productname>, cursors are insensitive by default, - and can be made sensitive by specifying <literal>FOR UPDATE</>. Other + and can be made sensitive by specifying <literal>FOR UPDATE</literal>. Other products may work differently. </para> <para> The SQL standard allows cursors only in embedded - <acronym>SQL</acronym> and in modules. <productname>PostgreSQL</> + <acronym>SQL</acronym> and in modules. <productname>PostgreSQL</productname> permits cursors to be used interactively. </para> diff --git a/doc/src/sgml/ref/delete.sgml b/doc/src/sgml/ref/delete.sgml index 8ced7de7be6..570e9aa7108 100644 --- a/doc/src/sgml/ref/delete.sgml +++ b/doc/src/sgml/ref/delete.sgml @@ -55,12 +55,12 @@ DELETE FROM [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * </para> <para> - The optional <literal>RETURNING</> clause causes <command>DELETE</> + The optional <literal>RETURNING</literal> clause causes <command>DELETE</command> to compute and return value(s) based on each row actually deleted. Any expression using the table's columns, and/or columns of other tables mentioned in <literal>USING</literal>, can be computed. - The syntax of the <literal>RETURNING</> list is identical to that of the - output list of <command>SELECT</>. + The syntax of the <literal>RETURNING</literal> list is identical to that of the + output list of <command>SELECT</command>. </para> <para> @@ -81,7 +81,7 @@ DELETE FROM [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * <listitem> <para> The <literal>WITH</literal> clause allows you to specify one or more - subqueries that can be referenced by name in the <command>DELETE</> + subqueries that can be referenced by name in the <command>DELETE</command> query. See <xref linkend="queries-with"> and <xref linkend="sql-select"> for details. </para> @@ -93,11 +93,11 @@ DELETE FROM [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * <listitem> <para> The name (optionally schema-qualified) of the table to delete rows - from. If <literal>ONLY</> is specified before the table name, + from. If <literal>ONLY</literal> is specified before the table name, matching rows are deleted from the named table only. If - <literal>ONLY</> is not specified, matching rows are also deleted + <literal>ONLY</literal> is not specified, matching rows are also deleted from any tables inheriting from the named table. Optionally, - <literal>*</> can be specified after the table name to explicitly + <literal>*</literal> can be specified after the table name to explicitly indicate that descendant tables are included. </para> </listitem> @@ -109,9 +109,9 @@ DELETE FROM [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * <para> A substitute name for the target table. When an alias is provided, it completely hides the actual name of the table. For - example, given <literal>DELETE FROM foo AS f</>, the remainder + example, given <literal>DELETE FROM foo AS f</literal>, the remainder of the <command>DELETE</command> statement must refer to this - table as <literal>f</> not <literal>foo</>. + table as <literal>f</literal> not <literal>foo</literal>. </para> </listitem> </varlistentry> @@ -121,7 +121,7 @@ DELETE FROM [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * <listitem> <para> A list of table expressions, allowing columns from other tables - to appear in the <literal>WHERE</> condition. This is similar + to appear in the <literal>WHERE</literal> condition. This is similar to the list of tables that can be specified in the <xref linkend="sql-from" endterm="sql-from-title"> of a <command>SELECT</command> statement; for example, an alias for @@ -137,7 +137,7 @@ DELETE FROM [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * <listitem> <para> An expression that returns a value of type <type>boolean</type>. - Only rows for which this expression returns <literal>true</> + Only rows for which this expression returns <literal>true</literal> will be deleted. </para> </listitem> @@ -147,15 +147,15 @@ DELETE FROM [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * <term><replaceable class="parameter">cursor_name</replaceable></term> <listitem> <para> - The name of the cursor to use in a <literal>WHERE CURRENT OF</> + The name of the cursor to use in a <literal>WHERE CURRENT OF</literal> condition. The row to be deleted is the one most recently fetched from this cursor. The cursor must be a non-grouping - query on the <command>DELETE</>'s target table. - Note that <literal>WHERE CURRENT OF</> cannot be + query on the <command>DELETE</command>'s target table. + Note that <literal>WHERE CURRENT OF</literal> cannot be specified together with a Boolean condition. See <xref linkend="sql-declare"> for more information about using cursors with - <literal>WHERE CURRENT OF</>. + <literal>WHERE CURRENT OF</literal>. </para> </listitem> </varlistentry> @@ -164,11 +164,11 @@ DELETE FROM [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * <term><replaceable class="parameter">output_expression</replaceable></term> <listitem> <para> - An expression to be computed and returned by the <command>DELETE</> + An expression to be computed and returned by the <command>DELETE</command> command after each row is deleted. The expression can use any column names of the table named by <replaceable class="parameter">table_name</replaceable> - or table(s) listed in <literal>USING</>. - Write <literal>*</> to return all columns. + or table(s) listed in <literal>USING</literal>. + Write <literal>*</literal> to return all columns. </para> </listitem> </varlistentry> @@ -188,7 +188,7 @@ DELETE FROM [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * <title>Outputs</title> <para> - On successful completion, a <command>DELETE</> command returns a command + On successful completion, a <command>DELETE</command> command returns a command tag of the form <screen> DELETE <replaceable class="parameter">count</replaceable> @@ -197,16 +197,16 @@ DELETE <replaceable class="parameter">count</replaceable> of rows deleted. Note that the number may be less than the number of rows that matched the <replaceable class="parameter">condition</replaceable> when deletes were - suppressed by a <literal>BEFORE DELETE</> trigger. If <replaceable + suppressed by a <literal>BEFORE DELETE</literal> trigger. If <replaceable class="parameter">count</replaceable> is 0, no rows were deleted by the query (this is not considered an error). </para> <para> - If the <command>DELETE</> command contains a <literal>RETURNING</> - clause, the result will be similar to that of a <command>SELECT</> + If the <command>DELETE</command> command contains a <literal>RETURNING</literal> + clause, the result will be similar to that of a <command>SELECT</command> statement containing the columns and values defined in the - <literal>RETURNING</> list, computed over the row(s) deleted by the + <literal>RETURNING</literal> list, computed over the row(s) deleted by the command. </para> </refsect1> @@ -216,16 +216,16 @@ DELETE <replaceable class="parameter">count</replaceable> <para> <productname>PostgreSQL</productname> lets you reference columns of - other tables in the <literal>WHERE</> condition by specifying the + other tables in the <literal>WHERE</literal> condition by specifying the other tables in the <literal>USING</literal> clause. For example, to delete all films produced by a given producer, one can do: <programlisting> DELETE FROM films USING producers WHERE producer_id = producers.id AND producers.name = 'foo'; </programlisting> - What is essentially happening here is a join between <structname>films</> - and <structname>producers</>, with all successfully joined - <structname>films</> rows being marked for deletion. + What is essentially happening here is a join between <structname>films</structname> + and <structname>producers</structname>, with all successfully joined + <structname>films</structname> rows being marked for deletion. This syntax is not standard. A more standard way to do it is: <programlisting> DELETE FROM films @@ -261,8 +261,8 @@ DELETE FROM tasks WHERE status = 'DONE' RETURNING *; </para> <para> - Delete the row of <structname>tasks</> on which the cursor - <literal>c_tasks</> is currently positioned: + Delete the row of <structname>tasks</structname> on which the cursor + <literal>c_tasks</literal> is currently positioned: <programlisting> DELETE FROM tasks WHERE CURRENT OF c_tasks; </programlisting></para> @@ -273,9 +273,9 @@ DELETE FROM tasks WHERE CURRENT OF c_tasks; <para> This command conforms to the <acronym>SQL</acronym> standard, except - that the <literal>USING</literal> and <literal>RETURNING</> clauses + that the <literal>USING</literal> and <literal>RETURNING</literal> clauses are <productname>PostgreSQL</productname> extensions, as is the ability - to use <literal>WITH</> with <command>DELETE</>. + to use <literal>WITH</literal> with <command>DELETE</command>. </para> </refsect1> diff --git a/doc/src/sgml/ref/discard.sgml b/doc/src/sgml/ref/discard.sgml index e859bf7bab7..f432e70430d 100644 --- a/doc/src/sgml/ref/discard.sgml +++ b/doc/src/sgml/ref/discard.sgml @@ -29,10 +29,10 @@ DISCARD { ALL | PLANS | SEQUENCES | TEMPORARY | TEMP } <title>Description</title> <para> - <command>DISCARD</> releases internal resources associated with a + <command>DISCARD</command> releases internal resources associated with a database session. This command is useful for partially or fully resetting the session's state. There are several subcommands to - release different types of resources; the <command>DISCARD ALL</> + release different types of resources; the <command>DISCARD ALL</command> variant subsumes all the others, and also resets additional state. </para> </refsect1> @@ -57,9 +57,9 @@ DISCARD { ALL | PLANS | SEQUENCES | TEMPORARY | TEMP } <listitem> <para> Discards all cached sequence-related state, - including <function>currval()</>/<function>lastval()</> + including <function>currval()</function>/<function>lastval()</function> information and any preallocated sequence values that have not - yet been returned by <function>nextval()</>. + yet been returned by <function>nextval()</function>. (See <xref linkend="sql-createsequence"> for a description of preallocated sequence values.) </para> @@ -104,7 +104,7 @@ DISCARD TEMP; <title>Notes</title> <para> - <command>DISCARD ALL</> cannot be executed inside a transaction block. + <command>DISCARD ALL</command> cannot be executed inside a transaction block. </para> </refsect1> diff --git a/doc/src/sgml/ref/do.sgml b/doc/src/sgml/ref/do.sgml index d4da32c34dc..5d2e9b1b8ce 100644 --- a/doc/src/sgml/ref/do.sgml +++ b/doc/src/sgml/ref/do.sgml @@ -39,12 +39,12 @@ DO [ LANGUAGE <replaceable class="parameter">lang_name</replaceable> ] <replacea <para> The code block is treated as though it were the body of a function - with no parameters, returning <type>void</>. It is parsed and + with no parameters, returning <type>void</type>. It is parsed and executed a single time. </para> <para> - The optional <literal>LANGUAGE</> clause can be written either + The optional <literal>LANGUAGE</literal> clause can be written either before or after the code block. </para> </refsect1> @@ -58,7 +58,7 @@ DO [ LANGUAGE <replaceable class="parameter">lang_name</replaceable> ] <replacea <listitem> <para> The procedural language code to be executed. This must be specified - as a string literal, just as in <command>CREATE FUNCTION</>. + as a string literal, just as in <command>CREATE FUNCTION</command>. Use of a dollar-quoted literal is recommended. </para> </listitem> @@ -69,7 +69,7 @@ DO [ LANGUAGE <replaceable class="parameter">lang_name</replaceable> ] <replacea <listitem> <para> The name of the procedural language the code is written in. - If omitted, the default is <literal>plpgsql</>. + If omitted, the default is <literal>plpgsql</literal>. </para> </listitem> </varlistentry> @@ -81,12 +81,12 @@ DO [ LANGUAGE <replaceable class="parameter">lang_name</replaceable> ] <replacea <para> The procedural language to be used must already have been installed - into the current database by means of <command>CREATE LANGUAGE</>. - <literal>plpgsql</> is installed by default, but other languages are not. + into the current database by means of <command>CREATE LANGUAGE</command>. + <literal>plpgsql</literal> is installed by default, but other languages are not. </para> <para> - The user must have <literal>USAGE</> privilege for the procedural + The user must have <literal>USAGE</literal> privilege for the procedural language, or must be a superuser if the language is untrusted. This is the same privilege requirement as for creating a function in the language. @@ -96,8 +96,8 @@ DO [ LANGUAGE <replaceable class="parameter">lang_name</replaceable> ] <replacea <refsect1 id="sql-do-examples"> <title id="sql-do-examples-title">Examples</title> <para> - Grant all privileges on all views in schema <literal>public</> to - role <literal>webuser</>: + Grant all privileges on all views in schema <literal>public</literal> to + role <literal>webuser</literal>: <programlisting> DO $$DECLARE r record; BEGIN diff --git a/doc/src/sgml/ref/drop_access_method.sgml b/doc/src/sgml/ref/drop_access_method.sgml index 8aa9197fe4a..aa5d2505c7d 100644 --- a/doc/src/sgml/ref/drop_access_method.sgml +++ b/doc/src/sgml/ref/drop_access_method.sgml @@ -85,7 +85,7 @@ DROP ACCESS METHOD [ IF EXISTS ] <replaceable class="parameter">name</replaceabl <title>Examples</title> <para> - Drop the access method <literal>heptree</>: + Drop the access method <literal>heptree</literal>: <programlisting> DROP ACCESS METHOD heptree; </programlisting></para> @@ -96,7 +96,7 @@ DROP ACCESS METHOD heptree; <para> <command>DROP ACCESS METHOD</command> is a - <productname>PostgreSQL</> extension. + <productname>PostgreSQL</productname> extension. </para> </refsect1> diff --git a/doc/src/sgml/ref/drop_aggregate.sgml b/doc/src/sgml/ref/drop_aggregate.sgml index dde1ea24449..ac29e7a4193 100644 --- a/doc/src/sgml/ref/drop_aggregate.sgml +++ b/doc/src/sgml/ref/drop_aggregate.sgml @@ -70,8 +70,8 @@ DROP AGGREGATE [ IF EXISTS ] <replaceable>name</replaceable> ( <replaceable>aggr <listitem> <para> - The mode of an argument: <literal>IN</> or <literal>VARIADIC</>. - If omitted, the default is <literal>IN</>. + The mode of an argument: <literal>IN</literal> or <literal>VARIADIC</literal>. + If omitted, the default is <literal>IN</literal>. </para> </listitem> </varlistentry> @@ -94,10 +94,10 @@ DROP AGGREGATE [ IF EXISTS ] <replaceable>name</replaceable> ( <replaceable>aggr <listitem> <para> An input data type on which the aggregate function operates. - To reference a zero-argument aggregate function, write <literal>*</> + To reference a zero-argument aggregate function, write <literal>*</literal> in place of the list of argument specifications. To reference an ordered-set aggregate function, write - <literal>ORDER BY</> between the direct and aggregated argument + <literal>ORDER BY</literal> between the direct and aggregated argument specifications. </para> </listitem> @@ -148,7 +148,7 @@ DROP AGGREGATE myavg(integer); </para> <para> - To remove the hypothetical-set aggregate function <literal>myrank</>, + To remove the hypothetical-set aggregate function <literal>myrank</literal>, which takes an arbitrary list of ordering columns and a matching list of direct arguments: <programlisting> diff --git a/doc/src/sgml/ref/drop_collation.sgml b/doc/src/sgml/ref/drop_collation.sgml index 2177d8e5d65..23f8e88fc95 100644 --- a/doc/src/sgml/ref/drop_collation.sgml +++ b/doc/src/sgml/ref/drop_collation.sgml @@ -83,7 +83,7 @@ DROP COLLATION [ IF EXISTS ] <replaceable>name</replaceable> [ CASCADE | RESTRIC <title>Examples</title> <para> - To drop the collation named <literal>german</>: + To drop the collation named <literal>german</literal>: <programlisting> DROP COLLATION german; </programlisting></para> @@ -95,7 +95,7 @@ DROP COLLATION german; <para> The <command>DROP COLLATION</command> command conforms to the <acronym>SQL</acronym> standard, apart from the <literal>IF - EXISTS</> option, which is a <productname>PostgreSQL</> extension. + EXISTS</literal> option, which is a <productname>PostgreSQL</productname> extension. </para> </refsect1> diff --git a/doc/src/sgml/ref/drop_conversion.sgml b/doc/src/sgml/ref/drop_conversion.sgml index 1a33b3dcc52..9d56ec51a59 100644 --- a/doc/src/sgml/ref/drop_conversion.sgml +++ b/doc/src/sgml/ref/drop_conversion.sgml @@ -74,7 +74,7 @@ DROP CONVERSION [ IF EXISTS ] <replaceable>name</replaceable> [ CASCADE | RESTRI <title>Examples</title> <para> - To drop the conversion named <literal>myname</>: + To drop the conversion named <literal>myname</literal>: <programlisting> DROP CONVERSION myname; </programlisting></para> diff --git a/doc/src/sgml/ref/drop_database.sgml b/doc/src/sgml/ref/drop_database.sgml index 44436ad48db..7e5fbe7396c 100644 --- a/doc/src/sgml/ref/drop_database.sgml +++ b/doc/src/sgml/ref/drop_database.sgml @@ -71,7 +71,7 @@ DROP DATABASE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> <title>Notes</title> <para> - <command>DROP DATABASE</> cannot be executed inside a transaction + <command>DROP DATABASE</command> cannot be executed inside a transaction block. </para> diff --git a/doc/src/sgml/ref/drop_domain.sgml b/doc/src/sgml/ref/drop_domain.sgml index ba546165c20..b1dac01e652 100644 --- a/doc/src/sgml/ref/drop_domain.sgml +++ b/doc/src/sgml/ref/drop_domain.sgml @@ -58,7 +58,7 @@ DROP DOMAIN [ IF EXISTS ] <replaceable class="parameter">name</replaceable> [, . </varlistentry> <varlistentry> - <term><literal>CASCADE</></term> + <term><literal>CASCADE</literal></term> <listitem> <para> Automatically drop objects that depend on the domain (such as @@ -70,7 +70,7 @@ DROP DOMAIN [ IF EXISTS ] <replaceable class="parameter">name</replaceable> [, . </varlistentry> <varlistentry> - <term><literal>RESTRICT</></term> + <term><literal>RESTRICT</literal></term> <listitem> <para> Refuse to drop the domain if any objects depend on it. This is @@ -97,7 +97,7 @@ DROP DOMAIN box; <para> This command conforms to the SQL standard, except for the - <literal>IF EXISTS</> option, which is a <productname>PostgreSQL</> + <literal>IF EXISTS</literal> option, which is a <productname>PostgreSQL</productname> extension. </para> </refsect1> diff --git a/doc/src/sgml/ref/drop_extension.sgml b/doc/src/sgml/ref/drop_extension.sgml index ba529220135..f75308a20d3 100644 --- a/doc/src/sgml/ref/drop_extension.sgml +++ b/doc/src/sgml/ref/drop_extension.sgml @@ -79,7 +79,7 @@ DROP EXTENSION [ IF EXISTS ] <replaceable class="parameter">name</replaceable> [ <para> Refuse to drop the extension if any objects depend on it (other than its own member objects and other extensions listed in the same - <command>DROP</> command). This is the default. + <command>DROP</command> command). This is the default. </para> </listitem> </varlistentry> @@ -97,7 +97,7 @@ DROP EXTENSION hstore; </programlisting> This command will fail if any of <literal>hstore</literal>'s objects are in use in the database, for example if any tables have columns - of the <type>hstore</> type. Add the <literal>CASCADE</> option to + of the <type>hstore</type> type. Add the <literal>CASCADE</literal> option to forcibly remove those dependent objects as well. </para> </refsect1> @@ -106,7 +106,7 @@ DROP EXTENSION hstore; <title>Compatibility</title> <para> - <command>DROP EXTENSION</command> is a <productname>PostgreSQL</> + <command>DROP EXTENSION</command> is a <productname>PostgreSQL</productname> extension. </para> </refsect1> diff --git a/doc/src/sgml/ref/drop_foreign_data_wrapper.sgml b/doc/src/sgml/ref/drop_foreign_data_wrapper.sgml index 702cc021dbc..a3c73a0d46b 100644 --- a/doc/src/sgml/ref/drop_foreign_data_wrapper.sgml +++ b/doc/src/sgml/ref/drop_foreign_data_wrapper.sgml @@ -86,7 +86,7 @@ DROP FOREIGN DATA WRAPPER [ IF EXISTS ] <replaceable class="parameter">name</rep <title>Examples</title> <para> - Drop the foreign-data wrapper <literal>dbi</>: + Drop the foreign-data wrapper <literal>dbi</literal>: <programlisting> DROP FOREIGN DATA WRAPPER dbi; </programlisting></para> @@ -97,8 +97,8 @@ DROP FOREIGN DATA WRAPPER dbi; <para> <command>DROP FOREIGN DATA WRAPPER</command> conforms to ISO/IEC - 9075-9 (SQL/MED). The <literal>IF EXISTS</> clause is - a <productname>PostgreSQL</> extension. + 9075-9 (SQL/MED). The <literal>IF EXISTS</literal> clause is + a <productname>PostgreSQL</productname> extension. </para> </refsect1> diff --git a/doc/src/sgml/ref/drop_foreign_table.sgml b/doc/src/sgml/ref/drop_foreign_table.sgml index 173eadadd36..456d55d1122 100644 --- a/doc/src/sgml/ref/drop_foreign_table.sgml +++ b/doc/src/sgml/ref/drop_foreign_table.sgml @@ -95,7 +95,7 @@ DROP FOREIGN TABLE films, distributors; <para> This command conforms to the ISO/IEC 9075-9 (SQL/MED), except that the standard only allows one foreign table to be dropped per command, and apart - from the <literal>IF EXISTS</> option, which is a <productname>PostgreSQL</> + from the <literal>IF EXISTS</literal> option, which is a <productname>PostgreSQL</productname> extension. </para> </refsect1> diff --git a/doc/src/sgml/ref/drop_function.sgml b/doc/src/sgml/ref/drop_function.sgml index 0aa984528d3..9c9adb9a46d 100644 --- a/doc/src/sgml/ref/drop_function.sgml +++ b/doc/src/sgml/ref/drop_function.sgml @@ -67,14 +67,14 @@ DROP FUNCTION [ IF EXISTS ] <replaceable class="parameter">name</replaceable> [ <listitem> <para> - The mode of an argument: <literal>IN</>, <literal>OUT</>, - <literal>INOUT</>, or <literal>VARIADIC</>. - If omitted, the default is <literal>IN</>. + The mode of an argument: <literal>IN</literal>, <literal>OUT</literal>, + <literal>INOUT</literal>, or <literal>VARIADIC</literal>. + If omitted, the default is <literal>IN</literal>. Note that <command>DROP FUNCTION</command> does not actually pay - any attention to <literal>OUT</> arguments, since only the input + any attention to <literal>OUT</literal> arguments, since only the input arguments are needed to determine the function's identity. - So it is sufficient to list the <literal>IN</>, <literal>INOUT</>, - and <literal>VARIADIC</> arguments. + So it is sufficient to list the <literal>IN</literal>, <literal>INOUT</literal>, + and <literal>VARIADIC</literal> arguments. </para> </listitem> </varlistentry> diff --git a/doc/src/sgml/ref/drop_index.sgml b/doc/src/sgml/ref/drop_index.sgml index 4c838fffffb..de36c135d16 100644 --- a/doc/src/sgml/ref/drop_index.sgml +++ b/doc/src/sgml/ref/drop_index.sgml @@ -44,19 +44,19 @@ DROP INDEX [ CONCURRENTLY ] [ IF EXISTS ] <replaceable class="parameter">name</r <listitem> <para> Drop the index without locking out concurrent selects, inserts, updates, - and deletes on the index's table. A normal <command>DROP INDEX</> + and deletes on the index's table. A normal <command>DROP INDEX</command> acquires exclusive lock on the table, blocking other accesses until the index drop can be completed. With this option, the command instead waits until conflicting transactions have completed. </para> <para> There are several caveats to be aware of when using this option. - Only one index name can be specified, and the <literal>CASCADE</> option - is not supported. (Thus, an index that supports a <literal>UNIQUE</> or - <literal>PRIMARY KEY</> constraint cannot be dropped this way.) - Also, regular <command>DROP INDEX</> commands can be + Only one index name can be specified, and the <literal>CASCADE</literal> option + is not supported. (Thus, an index that supports a <literal>UNIQUE</literal> or + <literal>PRIMARY KEY</literal> constraint cannot be dropped this way.) + Also, regular <command>DROP INDEX</command> commands can be performed within a transaction block, but - <command>DROP INDEX CONCURRENTLY</> cannot. + <command>DROP INDEX CONCURRENTLY</command> cannot. </para> </listitem> </varlistentry> diff --git a/doc/src/sgml/ref/drop_language.sgml b/doc/src/sgml/ref/drop_language.sgml index 081bd5fe3ec..524d7583703 100644 --- a/doc/src/sgml/ref/drop_language.sgml +++ b/doc/src/sgml/ref/drop_language.sgml @@ -31,13 +31,13 @@ DROP [ PROCEDURAL ] LANGUAGE [ IF EXISTS ] <replaceable class="parameter">name</ <para> <command>DROP LANGUAGE</command> removes the definition of a previously registered procedural language. You must be a superuser - or the owner of the language to use <command>DROP LANGUAGE</>. + or the owner of the language to use <command>DROP LANGUAGE</command>. </para> <note> <para> As of <productname>PostgreSQL</productname> 9.1, most procedural - languages have been made into <quote>extensions</>, and should + languages have been made into <quote>extensions</quote>, and should therefore be removed with <xref linkend="sql-dropextension"> not <command>DROP LANGUAGE</command>. </para> diff --git a/doc/src/sgml/ref/drop_opclass.sgml b/doc/src/sgml/ref/drop_opclass.sgml index 423a211bcab..83af6d7e485 100644 --- a/doc/src/sgml/ref/drop_opclass.sgml +++ b/doc/src/sgml/ref/drop_opclass.sgml @@ -37,7 +37,7 @@ DROP OPERATOR CLASS [ IF EXISTS ] <replaceable class="parameter">name</replaceab <command>DROP OPERATOR CLASS</command> does not drop any of the operators or functions referenced by the class. If there are any indexes depending on the operator class, you will need to specify - <literal>CASCADE</> for the drop to complete. + <literal>CASCADE</literal> for the drop to complete. </para> </refsect1> @@ -101,13 +101,13 @@ DROP OPERATOR CLASS [ IF EXISTS ] <replaceable class="parameter">name</replaceab <title>Notes</title> <para> - <command>DROP OPERATOR CLASS</> will not drop the operator family + <command>DROP OPERATOR CLASS</command> will not drop the operator family containing the class, even if there is nothing else left in the family (in particular, in the case where the family was implicitly - created by <command>CREATE OPERATOR CLASS</>). An empty operator + created by <command>CREATE OPERATOR CLASS</command>). An empty operator family is harmless, but for the sake of tidiness you might wish to - remove the family with <command>DROP OPERATOR FAMILY</>; or perhaps - better, use <command>DROP OPERATOR FAMILY</> in the first place. + remove the family with <command>DROP OPERATOR FAMILY</command>; or perhaps + better, use <command>DROP OPERATOR FAMILY</command> in the first place. </para> </refsect1> @@ -122,7 +122,7 @@ DROP OPERATOR CLASS widget_ops USING btree; </programlisting> This command will not succeed if there are any existing indexes - that use the operator class. Add <literal>CASCADE</> to drop + that use the operator class. Add <literal>CASCADE</literal> to drop such indexes along with the operator class. </para> </refsect1> diff --git a/doc/src/sgml/ref/drop_opfamily.sgml b/doc/src/sgml/ref/drop_opfamily.sgml index a7b90f306c7..b825978aee9 100644 --- a/doc/src/sgml/ref/drop_opfamily.sgml +++ b/doc/src/sgml/ref/drop_opfamily.sgml @@ -38,7 +38,7 @@ DROP OPERATOR FAMILY [ IF EXISTS ] <replaceable class="parameter">name</replacea classes contained in the family, but it does not drop any of the operators or functions referenced by the family. If there are any indexes depending on operator classes within the family, you will need to specify - <literal>CASCADE</> for the drop to complete. + <literal>CASCADE</literal> for the drop to complete. </para> </refsect1> @@ -109,7 +109,7 @@ DROP OPERATOR FAMILY float_ops USING btree; </programlisting> This command will not succeed if there are any existing indexes - that use operator classes within the family. Add <literal>CASCADE</> to + that use operator classes within the family. Add <literal>CASCADE</literal> to drop such indexes along with the operator family. </para> </refsect1> diff --git a/doc/src/sgml/ref/drop_owned.sgml b/doc/src/sgml/ref/drop_owned.sgml index 0426373d2de..8b4b3644e66 100644 --- a/doc/src/sgml/ref/drop_owned.sgml +++ b/doc/src/sgml/ref/drop_owned.sgml @@ -92,7 +92,7 @@ DROP OWNED BY { <replaceable class="parameter">name</replaceable> | CURRENT_USER <para> The <xref linkend="sql-reassign-owned"> command is an alternative that reassigns the ownership of all the database objects owned by one or - more roles. However, <command>REASSIGN OWNED</> does not deal with + more roles. However, <command>REASSIGN OWNED</command> does not deal with privileges for other objects. </para> diff --git a/doc/src/sgml/ref/drop_publication.sgml b/doc/src/sgml/ref/drop_publication.sgml index bf43db3dac3..1c129c04443 100644 --- a/doc/src/sgml/ref/drop_publication.sgml +++ b/doc/src/sgml/ref/drop_publication.sgml @@ -89,7 +89,7 @@ DROP PUBLICATION mypublication; <title>Compatibility</title> <para> - <command>DROP PUBLICATION</command> is a <productname>PostgreSQL</> + <command>DROP PUBLICATION</command> is a <productname>PostgreSQL</productname> extension. </para> </refsect1> diff --git a/doc/src/sgml/ref/drop_role.sgml b/doc/src/sgml/ref/drop_role.sgml index fcddfeb172c..3c1bbaba6fd 100644 --- a/doc/src/sgml/ref/drop_role.sgml +++ b/doc/src/sgml/ref/drop_role.sgml @@ -31,7 +31,7 @@ DROP ROLE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> [, ... <para> <command>DROP ROLE</command> removes the specified role(s). To drop a superuser role, you must be a superuser yourself; - to drop non-superuser roles, you must have <literal>CREATEROLE</> + to drop non-superuser roles, you must have <literal>CREATEROLE</literal> privilege. </para> @@ -47,7 +47,7 @@ DROP ROLE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> [, ... <para> However, it is not necessary to remove role memberships involving - the role; <command>DROP ROLE</> automatically revokes any memberships + the role; <command>DROP ROLE</command> automatically revokes any memberships of the target role in other roles, and of other roles in the target role. The other roles are not dropped nor otherwise affected. </para> diff --git a/doc/src/sgml/ref/drop_schema.sgml b/doc/src/sgml/ref/drop_schema.sgml index fd1fcd7e037..bb3af1e1863 100644 --- a/doc/src/sgml/ref/drop_schema.sgml +++ b/doc/src/sgml/ref/drop_schema.sgml @@ -114,7 +114,7 @@ DROP SCHEMA mystuff CASCADE; <command>DROP SCHEMA</command> is fully conforming with the SQL standard, except that the standard only allows one schema to be dropped per command, and apart from the - <literal>IF EXISTS</> option, which is a <productname>PostgreSQL</> + <literal>IF EXISTS</literal> option, which is a <productname>PostgreSQL</productname> extension. </para> </refsect1> diff --git a/doc/src/sgml/ref/drop_sequence.sgml b/doc/src/sgml/ref/drop_sequence.sgml index 9d827f0cb17..5027129b38b 100644 --- a/doc/src/sgml/ref/drop_sequence.sgml +++ b/doc/src/sgml/ref/drop_sequence.sgml @@ -98,7 +98,7 @@ DROP SEQUENCE serial; <command>DROP SEQUENCE</command> conforms to the <acronym>SQL</acronym> standard, except that the standard only allows one sequence to be dropped per command, and apart from the - <literal>IF EXISTS</> option, which is a <productname>PostgreSQL</> + <literal>IF EXISTS</literal> option, which is a <productname>PostgreSQL</productname> extension. </para> </refsect1> diff --git a/doc/src/sgml/ref/drop_server.sgml b/doc/src/sgml/ref/drop_server.sgml index 42acdd41dc1..8ef0e014e4f 100644 --- a/doc/src/sgml/ref/drop_server.sgml +++ b/doc/src/sgml/ref/drop_server.sgml @@ -86,7 +86,7 @@ DROP SERVER [ IF EXISTS ] <replaceable class="parameter">name</replaceable> [, . <title>Examples</title> <para> - Drop a server <literal>foo</> if it exists: + Drop a server <literal>foo</literal> if it exists: <programlisting> DROP SERVER IF EXISTS foo; </programlisting></para> @@ -97,8 +97,8 @@ DROP SERVER IF EXISTS foo; <para> <command>DROP SERVER</command> conforms to ISO/IEC 9075-9 - (SQL/MED). The <literal>IF EXISTS</> clause is - a <productname>PostgreSQL</> extension. + (SQL/MED). The <literal>IF EXISTS</literal> clause is + a <productname>PostgreSQL</productname> extension. </para> </refsect1> diff --git a/doc/src/sgml/ref/drop_subscription.sgml b/doc/src/sgml/ref/drop_subscription.sgml index f5734e6f300..58b14894757 100644 --- a/doc/src/sgml/ref/drop_subscription.sgml +++ b/doc/src/sgml/ref/drop_subscription.sgml @@ -114,7 +114,7 @@ DROP SUBSCRIPTION mysub; <title>Compatibility</title> <para> - <command>DROP SUBSCRIPTION</command> is a <productname>PostgreSQL</> + <command>DROP SUBSCRIPTION</command> is a <productname>PostgreSQL</productname> extension. </para> </refsect1> diff --git a/doc/src/sgml/ref/drop_table.sgml b/doc/src/sgml/ref/drop_table.sgml index ae96cf06575..cea7e003511 100644 --- a/doc/src/sgml/ref/drop_table.sgml +++ b/doc/src/sgml/ref/drop_table.sgml @@ -40,8 +40,8 @@ DROP TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> [, .. <command>DROP TABLE</command> always removes any indexes, rules, triggers, and constraints that exist for the target table. However, to drop a table that is referenced by a view or a foreign-key - constraint of another table, <literal>CASCADE</> must be - specified. (<literal>CASCADE</> will remove a dependent view entirely, + constraint of another table, <literal>CASCADE</literal> must be + specified. (<literal>CASCADE</literal> will remove a dependent view entirely, but in the foreign-key case it will only remove the foreign-key constraint, not the other table entirely.) </para> @@ -112,7 +112,7 @@ DROP TABLE films, distributors; <para> This command conforms to the SQL standard, except that the standard only allows one table to be dropped per command, and apart from the - <literal>IF EXISTS</> option, which is a <productname>PostgreSQL</> + <literal>IF EXISTS</literal> option, which is a <productname>PostgreSQL</productname> extension. </para> </refsect1> diff --git a/doc/src/sgml/ref/drop_tablespace.sgml b/doc/src/sgml/ref/drop_tablespace.sgml index ee40cc6b0c3..4343035ebb2 100644 --- a/doc/src/sgml/ref/drop_tablespace.sgml +++ b/doc/src/sgml/ref/drop_tablespace.sgml @@ -39,7 +39,7 @@ DROP TABLESPACE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> in the tablespace even if no objects in the current database are using the tablespace. Also, if the tablespace is listed in the <xref linkend="guc-temp-tablespaces"> setting of any active session, the - <command>DROP</> might fail due to temporary files residing in the + <command>DROP</command> might fail due to temporary files residing in the tablespace. </para> </refsect1> @@ -74,7 +74,7 @@ DROP TABLESPACE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> <title>Notes</title> <para> - <command>DROP TABLESPACE</> cannot be executed inside a transaction block. + <command>DROP TABLESPACE</command> cannot be executed inside a transaction block. </para> </refsect1> @@ -93,7 +93,7 @@ DROP TABLESPACE mystuff; <title>Compatibility</title> <para> - <command>DROP TABLESPACE</command> is a <productname>PostgreSQL</> + <command>DROP TABLESPACE</command> is a <productname>PostgreSQL</productname> extension. </para> </refsect1> diff --git a/doc/src/sgml/ref/drop_tsconfig.sgml b/doc/src/sgml/ref/drop_tsconfig.sgml index e4a1738baeb..cc053beceb7 100644 --- a/doc/src/sgml/ref/drop_tsconfig.sgml +++ b/doc/src/sgml/ref/drop_tsconfig.sgml @@ -94,8 +94,8 @@ DROP TEXT SEARCH CONFIGURATION my_english; </programlisting> This command will not succeed if there are any existing indexes - that reference the configuration in <function>to_tsvector</> calls. - Add <literal>CASCADE</> to + that reference the configuration in <function>to_tsvector</function> calls. + Add <literal>CASCADE</literal> to drop such indexes along with the text search configuration. </para> </refsect1> diff --git a/doc/src/sgml/ref/drop_tsdictionary.sgml b/doc/src/sgml/ref/drop_tsdictionary.sgml index faa4b3a1e5d..66af10fb0f4 100644 --- a/doc/src/sgml/ref/drop_tsdictionary.sgml +++ b/doc/src/sgml/ref/drop_tsdictionary.sgml @@ -94,7 +94,7 @@ DROP TEXT SEARCH DICTIONARY english; </programlisting> This command will not succeed if there are any existing text search - configurations that use the dictionary. Add <literal>CASCADE</> to + configurations that use the dictionary. Add <literal>CASCADE</literal> to drop such configurations along with the dictionary. </para> </refsect1> diff --git a/doc/src/sgml/ref/drop_tsparser.sgml b/doc/src/sgml/ref/drop_tsparser.sgml index bc9dae17a5e..3fa9467ebdd 100644 --- a/doc/src/sgml/ref/drop_tsparser.sgml +++ b/doc/src/sgml/ref/drop_tsparser.sgml @@ -92,7 +92,7 @@ DROP TEXT SEARCH PARSER my_parser; </programlisting> This command will not succeed if there are any existing text search - configurations that use the parser. Add <literal>CASCADE</> to + configurations that use the parser. Add <literal>CASCADE</literal> to drop such configurations along with the parser. </para> </refsect1> diff --git a/doc/src/sgml/ref/drop_tstemplate.sgml b/doc/src/sgml/ref/drop_tstemplate.sgml index 98f5523e513..ad832754573 100644 --- a/doc/src/sgml/ref/drop_tstemplate.sgml +++ b/doc/src/sgml/ref/drop_tstemplate.sgml @@ -93,7 +93,7 @@ DROP TEXT SEARCH TEMPLATE thesaurus; </programlisting> This command will not succeed if there are any existing text search - dictionaries that use the template. Add <literal>CASCADE</> to + dictionaries that use the template. Add <literal>CASCADE</literal> to drop such dictionaries along with the template. </para> </refsect1> diff --git a/doc/src/sgml/ref/drop_type.sgml b/doc/src/sgml/ref/drop_type.sgml index 4ec1b92f329..92ac2729caf 100644 --- a/doc/src/sgml/ref/drop_type.sgml +++ b/doc/src/sgml/ref/drop_type.sgml @@ -96,8 +96,8 @@ DROP TYPE box; <para> This command is similar to the corresponding command in the SQL - standard, apart from the <literal>IF EXISTS</> - option, which is a <productname>PostgreSQL</> extension. + standard, apart from the <literal>IF EXISTS</literal> + option, which is a <productname>PostgreSQL</productname> extension. But note that much of the <command>CREATE TYPE</command> command and the data type extension mechanisms in <productname>PostgreSQL</productname> differ from the SQL standard. diff --git a/doc/src/sgml/ref/drop_user_mapping.sgml b/doc/src/sgml/ref/drop_user_mapping.sgml index eb4c3202939..27284acae4c 100644 --- a/doc/src/sgml/ref/drop_user_mapping.sgml +++ b/doc/src/sgml/ref/drop_user_mapping.sgml @@ -36,7 +36,7 @@ DROP USER MAPPING [ IF EXISTS ] FOR { <replaceable class="parameter">user_name</ <para> The owner of a foreign server can drop user mappings for that server for any user. Also, a user can drop a user mapping for their own - user name if <literal>USAGE</> privilege on the server has been + user name if <literal>USAGE</literal> privilege on the server has been granted to the user. </para> </refsect1> @@ -59,9 +59,9 @@ DROP USER MAPPING [ IF EXISTS ] FOR { <replaceable class="parameter">user_name</ <term><replaceable class="parameter">user_name</replaceable></term> <listitem> <para> - User name of the mapping. <literal>CURRENT_USER</> - and <literal>USER</> match the name of the current - user. <literal>PUBLIC</> is used to match all present and + User name of the mapping. <literal>CURRENT_USER</literal> + and <literal>USER</literal> match the name of the current + user. <literal>PUBLIC</literal> is used to match all present and future user names in the system. </para> </listitem> @@ -82,7 +82,7 @@ DROP USER MAPPING [ IF EXISTS ] FOR { <replaceable class="parameter">user_name</ <title>Examples</title> <para> - Drop a user mapping <literal>bob</>, server <literal>foo</> if it exists: + Drop a user mapping <literal>bob</literal>, server <literal>foo</literal> if it exists: <programlisting> DROP USER MAPPING IF EXISTS FOR bob SERVER foo; </programlisting></para> @@ -93,8 +93,8 @@ DROP USER MAPPING IF EXISTS FOR bob SERVER foo; <para> <command>DROP USER MAPPING</command> conforms to ISO/IEC 9075-9 - (SQL/MED). The <literal>IF EXISTS</> clause is - a <productname>PostgreSQL</> extension. + (SQL/MED). The <literal>IF EXISTS</literal> clause is + a <productname>PostgreSQL</productname> extension. </para> </refsect1> diff --git a/doc/src/sgml/ref/drop_view.sgml b/doc/src/sgml/ref/drop_view.sgml index 002d2c6dd65..a33b33335b0 100644 --- a/doc/src/sgml/ref/drop_view.sgml +++ b/doc/src/sgml/ref/drop_view.sgml @@ -97,7 +97,7 @@ DROP VIEW kinds; <para> This command conforms to the SQL standard, except that the standard only allows one view to be dropped per command, and apart from the - <literal>IF EXISTS</> option, which is a <productname>PostgreSQL</> + <literal>IF EXISTS</literal> option, which is a <productname>PostgreSQL</productname> extension. </para> </refsect1> diff --git a/doc/src/sgml/ref/dropdb.sgml b/doc/src/sgml/ref/dropdb.sgml index 16c49e7928b..9dd44be8828 100644 --- a/doc/src/sgml/ref/dropdb.sgml +++ b/doc/src/sgml/ref/dropdb.sgml @@ -53,7 +53,7 @@ PostgreSQL documentation <title>Options</title> <para> - <application>dropdb</> accepts the following command-line arguments: + <application>dropdb</application> accepts the following command-line arguments: <variablelist> <varlistentry> @@ -66,8 +66,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-e</></term> - <term><option>--echo</></term> + <term><option>-e</option></term> + <term><option>--echo</option></term> <listitem> <para> Echo the commands that <application>dropdb</application> generates @@ -77,8 +77,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-i</></term> - <term><option>--interactive</></term> + <term><option>-i</option></term> + <term><option>--interactive</option></term> <listitem> <para> Issues a verification prompt before doing anything destructive. @@ -87,8 +87,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-V</></term> - <term><option>--version</></term> + <term><option>-V</option></term> + <term><option>--version</option></term> <listitem> <para> Print the <application>dropdb</application> version and exit. @@ -97,7 +97,7 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>--if-exists</></term> + <term><option>--if-exists</option></term> <listitem> <para> Do not throw an error if the database does not exist. A notice is issued @@ -107,8 +107,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-?</></term> - <term><option>--help</></term> + <term><option>-?</option></term> + <term><option>--help</option></term> <listitem> <para> Show help about <application>dropdb</application> command line @@ -127,8 +127,8 @@ PostgreSQL documentation <variablelist> <varlistentry> - <term><option>-h <replaceable class="parameter">host</replaceable></></term> - <term><option>--host=<replaceable class="parameter">host</replaceable></></term> + <term><option>-h <replaceable class="parameter">host</replaceable></option></term> + <term><option>--host=<replaceable class="parameter">host</replaceable></option></term> <listitem> <para> Specifies the host name of the machine on which the @@ -140,8 +140,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-p <replaceable class="parameter">port</replaceable></></term> - <term><option>--port=<replaceable class="parameter">port</replaceable></></term> + <term><option>-p <replaceable class="parameter">port</replaceable></option></term> + <term><option>--port=<replaceable class="parameter">port</replaceable></option></term> <listitem> <para> Specifies the TCP port or local Unix domain socket file @@ -152,8 +152,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-U <replaceable class="parameter">username</replaceable></></term> - <term><option>--username=<replaceable class="parameter">username</replaceable></></term> + <term><option>-U <replaceable class="parameter">username</replaceable></option></term> + <term><option>--username=<replaceable class="parameter">username</replaceable></option></term> <listitem> <para> User name to connect as. @@ -162,8 +162,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-w</></term> - <term><option>--no-password</></term> + <term><option>-w</option></term> + <term><option>--no-password</option></term> <listitem> <para> Never issue a password prompt. If the server requires @@ -177,8 +177,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-W</></term> - <term><option>--password</></term> + <term><option>-W</option></term> + <term><option>--password</option></term> <listitem> <para> Force <application>dropdb</application> to prompt for a @@ -191,14 +191,14 @@ PostgreSQL documentation for a password if the server demands password authentication. However, <application>dropdb</application> will waste a connection attempt finding out that the server wants a password. - In some cases it is worth typing <option>-W</> to avoid the extra + In some cases it is worth typing <option>-W</option> to avoid the extra connection attempt. </para> </listitem> </varlistentry> <varlistentry> - <term><option>--maintenance-db=<replaceable class="parameter">dbname</replaceable></></term> + <term><option>--maintenance-db=<replaceable class="parameter">dbname</replaceable></option></term> <listitem> <para> Specifies the name of the database to connect to in order to drop the @@ -231,8 +231,8 @@ PostgreSQL documentation </variablelist> <para> - This utility, like most other <productname>PostgreSQL</> utilities, - also uses the environment variables supported by <application>libpq</> + This utility, like most other <productname>PostgreSQL</productname> utilities, + also uses the environment variables supported by <application>libpq</application> (see <xref linkend="libpq-envars">). </para> diff --git a/doc/src/sgml/ref/dropuser.sgml b/doc/src/sgml/ref/dropuser.sgml index d7ad61b3d63..1387b7dc2da 100644 --- a/doc/src/sgml/ref/dropuser.sgml +++ b/doc/src/sgml/ref/dropuser.sgml @@ -35,7 +35,7 @@ PostgreSQL documentation <para> <application>dropuser</application> removes an existing <productname>PostgreSQL</productname> user. - Only superusers and users with the <literal>CREATEROLE</> privilege can + Only superusers and users with the <literal>CREATEROLE</literal> privilege can remove <productname>PostgreSQL</productname> users. (To remove a superuser, you must yourself be a superuser.) </para> @@ -70,8 +70,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-e</></term> - <term><option>--echo</></term> + <term><option>-e</option></term> + <term><option>--echo</option></term> <listitem> <para> Echo the commands that <application>dropuser</application> generates @@ -81,8 +81,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-i</></term> - <term><option>--interactive</></term> + <term><option>-i</option></term> + <term><option>--interactive</option></term> <listitem> <para> Prompt for confirmation before actually removing the user, and prompt @@ -92,8 +92,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-V</></term> - <term><option>--version</></term> + <term><option>-V</option></term> + <term><option>--version</option></term> <listitem> <para> Print the <application>dropuser</application> version and exit. @@ -102,7 +102,7 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>--if-exists</></term> + <term><option>--if-exists</option></term> <listitem> <para> Do not throw an error if the user does not exist. A notice is @@ -112,8 +112,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-?</></term> - <term><option>--help</></term> + <term><option>-?</option></term> + <term><option>--help</option></term> <listitem> <para> Show help about <application>dropuser</application> command line @@ -131,8 +131,8 @@ PostgreSQL documentation <variablelist> <varlistentry> - <term><option>-h <replaceable class="parameter">host</replaceable></></term> - <term><option>--host=<replaceable class="parameter">host</replaceable></></term> + <term><option>-h <replaceable class="parameter">host</replaceable></option></term> + <term><option>--host=<replaceable class="parameter">host</replaceable></option></term> <listitem> <para> Specifies the host name of the machine on which the @@ -144,8 +144,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-p <replaceable class="parameter">port</replaceable></></term> - <term><option>--port=<replaceable class="parameter">port</replaceable></></term> + <term><option>-p <replaceable class="parameter">port</replaceable></option></term> + <term><option>--port=<replaceable class="parameter">port</replaceable></option></term> <listitem> <para> Specifies the TCP port or local Unix domain socket file @@ -156,8 +156,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-U <replaceable class="parameter">username</replaceable></></term> - <term><option>--username=<replaceable class="parameter">username</replaceable></></term> + <term><option>-U <replaceable class="parameter">username</replaceable></option></term> + <term><option>--username=<replaceable class="parameter">username</replaceable></option></term> <listitem> <para> User name to connect as (not the user name to drop). @@ -166,8 +166,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-w</></term> - <term><option>--no-password</></term> + <term><option>-w</option></term> + <term><option>--no-password</option></term> <listitem> <para> Never issue a password prompt. If the server requires @@ -181,8 +181,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-W</></term> - <term><option>--password</></term> + <term><option>-W</option></term> + <term><option>--password</option></term> <listitem> <para> Force <application>dropuser</application> to prompt for a @@ -195,7 +195,7 @@ PostgreSQL documentation for a password if the server demands password authentication. However, <application>dropuser</application> will waste a connection attempt finding out that the server wants a password. - In some cases it is worth typing <option>-W</> to avoid the extra + In some cases it is worth typing <option>-W</option> to avoid the extra connection attempt. </para> </listitem> @@ -223,8 +223,8 @@ PostgreSQL documentation </variablelist> <para> - This utility, like most other <productname>PostgreSQL</> utilities, - also uses the environment variables supported by <application>libpq</> + This utility, like most other <productname>PostgreSQL</productname> utilities, + also uses the environment variables supported by <application>libpq</application> (see <xref linkend="libpq-envars">). </para> diff --git a/doc/src/sgml/ref/ecpg-ref.sgml b/doc/src/sgml/ref/ecpg-ref.sgml index 8bfb47c4d79..a9eaff815dc 100644 --- a/doc/src/sgml/ref/ecpg-ref.sgml +++ b/doc/src/sgml/ref/ecpg-ref.sgml @@ -220,9 +220,9 @@ PostgreSQL documentation <para> When compiling the preprocessed C code files, the compiler needs to - be able to find the <application>ECPG</> header files in the - <productname>PostgreSQL</> include directory. Therefore, you might - have to use the <option>-I</> option when invoking the compiler + be able to find the <application>ECPG</application> header files in the + <productname>PostgreSQL</productname> include directory. Therefore, you might + have to use the <option>-I</option> option when invoking the compiler (e.g., <literal>-I/usr/local/pgsql/include</literal>). </para> diff --git a/doc/src/sgml/ref/end.sgml b/doc/src/sgml/ref/end.sgml index 10e414515bf..1f74118efd9 100644 --- a/doc/src/sgml/ref/end.sgml +++ b/doc/src/sgml/ref/end.sgml @@ -62,7 +62,7 @@ END [ WORK | TRANSACTION ] </para> <para> - Issuing <command>END</> when not inside a transaction does + Issuing <command>END</command> when not inside a transaction does no harm, but it will provoke a warning message. </para> </refsect1> diff --git a/doc/src/sgml/ref/execute.sgml b/doc/src/sgml/ref/execute.sgml index 6ab5e54fa7e..6ac413d8086 100644 --- a/doc/src/sgml/ref/execute.sgml +++ b/doc/src/sgml/ref/execute.sgml @@ -87,12 +87,12 @@ EXECUTE <replaceable class="parameter">name</replaceable> [ ( <replaceable class <title>Outputs</title> <para> The command tag returned by <command>EXECUTE</command> - is that of the prepared statement, and not <literal>EXECUTE</>. + is that of the prepared statement, and not <literal>EXECUTE</literal>. </para> </refsect1> <refsect1> - <title>Examples</> + <title>Examples</title> <para> Examples are given in the <xref linkend="sql-prepare-examples" endterm="sql-prepare-examples-title"> section of the <xref diff --git a/doc/src/sgml/ref/explain.sgml b/doc/src/sgml/ref/explain.sgml index 42191809436..bbf2e11cbb9 100644 --- a/doc/src/sgml/ref/explain.sgml +++ b/doc/src/sgml/ref/explain.sgml @@ -160,15 +160,15 @@ ROLLBACK; shared blocks hit, read, dirtied, and written, the number of local blocks hit, read, dirtied, and written, and the number of temp blocks read and written. - A <emphasis>hit</> means that a read was avoided because the block was + A <emphasis>hit</emphasis> means that a read was avoided because the block was found already in cache when needed. Shared blocks contain data from regular tables and indexes; local blocks contain data from temporary tables and indexes; while temp blocks contain short-term working data used in sorts, hashes, Materialize plan nodes, and similar cases. - The number of blocks <emphasis>dirtied</> indicates the number of + The number of blocks <emphasis>dirtied</emphasis> indicates the number of previously unmodified blocks that were changed by this query; while the - number of blocks <emphasis>written</> indicates the number of + number of blocks <emphasis>written</emphasis> indicates the number of previously-dirtied blocks evicted from cache by this backend during query processing. The number of blocks shown for an @@ -229,9 +229,9 @@ ROLLBACK; <listitem> <para> Specifies whether the selected option should be turned on or off. - You can write <literal>TRUE</literal>, <literal>ON</>, or + You can write <literal>TRUE</literal>, <literal>ON</literal>, or <literal>1</literal> to enable the option, and <literal>FALSE</literal>, - <literal>OFF</>, or <literal>0</literal> to disable it. The + <literal>OFF</literal>, or <literal>0</literal> to disable it. The <replaceable class="parameter">boolean</replaceable> value can also be omitted, in which case <literal>TRUE</literal> is assumed. </para> @@ -242,10 +242,10 @@ ROLLBACK; <term><replaceable class="parameter">statement</replaceable></term> <listitem> <para> - Any <command>SELECT</>, <command>INSERT</>, <command>UPDATE</>, - <command>DELETE</>, <command>VALUES</>, <command>EXECUTE</>, - <command>DECLARE</>, <command>CREATE TABLE AS</>, or - <command>CREATE MATERIALIZED VIEW AS</> statement, whose execution + Any <command>SELECT</command>, <command>INSERT</command>, <command>UPDATE</command>, + <command>DELETE</command>, <command>VALUES</command>, <command>EXECUTE</command>, + <command>DECLARE</command>, <command>CREATE TABLE AS</command>, or + <command>CREATE MATERIALIZED VIEW AS</command> statement, whose execution plan you wish to see. </para> </listitem> diff --git a/doc/src/sgml/ref/fetch.sgml b/doc/src/sgml/ref/fetch.sgml index 7651dcd0f82..fb79a1ac61a 100644 --- a/doc/src/sgml/ref/fetch.sgml +++ b/doc/src/sgml/ref/fetch.sgml @@ -57,20 +57,20 @@ FETCH [ <replaceable class="parameter">direction</replaceable> [ FROM | IN ] ] < <para> A cursor has an associated position, which is used by - <command>FETCH</>. The cursor position can be before the first row of the + <command>FETCH</command>. The cursor position can be before the first row of the query result, on any particular row of the result, or after the last row of the result. When created, a cursor is positioned before the first row. After fetching some rows, the cursor is positioned on the row most recently - retrieved. If <command>FETCH</> runs off the end of the available rows + retrieved. If <command>FETCH</command> runs off the end of the available rows then the cursor is left positioned after the last row, or before the first - row if fetching backward. <command>FETCH ALL</> or <command>FETCH BACKWARD - ALL</> will always leave the cursor positioned after the last row or before + row if fetching backward. <command>FETCH ALL</command> or <command>FETCH BACKWARD + ALL</command> will always leave the cursor positioned after the last row or before the first row. </para> <para> - The forms <literal>NEXT</>, <literal>PRIOR</>, <literal>FIRST</>, - <literal>LAST</>, <literal>ABSOLUTE</>, <literal>RELATIVE</> fetch + The forms <literal>NEXT</literal>, <literal>PRIOR</literal>, <literal>FIRST</literal>, + <literal>LAST</literal>, <literal>ABSOLUTE</literal>, <literal>RELATIVE</literal> fetch a single row after moving the cursor appropriately. If there is no such row, an empty result is returned, and the cursor is left positioned before the first row or after the last row as @@ -78,7 +78,7 @@ FETCH [ <replaceable class="parameter">direction</replaceable> [ FROM | IN ] ] < </para> <para> - The forms using <literal>FORWARD</> and <literal>BACKWARD</> + The forms using <literal>FORWARD</literal> and <literal>BACKWARD</literal> retrieve the indicated number of rows moving in the forward or backward direction, leaving the cursor positioned on the last-returned row (or after/before all rows, if the <replaceable @@ -87,8 +87,8 @@ FETCH [ <replaceable class="parameter">direction</replaceable> [ FROM | IN ] ] < </para> <para> - <literal>RELATIVE 0</>, <literal>FORWARD 0</>, and - <literal>BACKWARD 0</> all request fetching the current row without + <literal>RELATIVE 0</literal>, <literal>FORWARD 0</literal>, and + <literal>BACKWARD 0</literal> all request fetching the current row without moving the cursor, that is, re-fetching the most recently fetched row. This will succeed unless the cursor is positioned before the first row or after the last row; in which case, no row is returned. @@ -97,7 +97,7 @@ FETCH [ <replaceable class="parameter">direction</replaceable> [ FROM | IN ] ] < <note> <para> This page describes usage of cursors at the SQL command level. - If you are trying to use cursors inside a <application>PL/pgSQL</> + If you are trying to use cursors inside a <application>PL/pgSQL</application> function, the rules are different — see <xref linkend="plpgsql-cursors">. </para> @@ -274,10 +274,10 @@ FETCH [ <replaceable class="parameter">direction</replaceable> [ FROM | IN ] ] < <listitem> <para><replaceable class="parameter">count</replaceable> is a possibly-signed integer constant, determining the location or - number of rows to fetch. For <literal>FORWARD</> and - <literal>BACKWARD</> cases, specifying a negative <replaceable + number of rows to fetch. For <literal>FORWARD</literal> and + <literal>BACKWARD</literal> cases, specifying a negative <replaceable class="parameter">count</replaceable> is equivalent to changing - the sense of <literal>FORWARD</> and <literal>BACKWARD</>. + the sense of <literal>FORWARD</literal> and <literal>BACKWARD</literal>. </para> </listitem> </varlistentry> @@ -297,7 +297,7 @@ FETCH [ <replaceable class="parameter">direction</replaceable> [ FROM | IN ] ] < <title>Outputs</title> <para> - On successful completion, a <command>FETCH</> command returns a command + On successful completion, a <command>FETCH</command> command returns a command tag of the form <screen> FETCH <replaceable class="parameter">count</replaceable> @@ -315,8 +315,8 @@ FETCH <replaceable class="parameter">count</replaceable> <para> The cursor should be declared with the <literal>SCROLL</literal> - option if one intends to use any variants of <command>FETCH</> - other than <command>FETCH NEXT</> or <command>FETCH FORWARD</> with + option if one intends to use any variants of <command>FETCH</command> + other than <command>FETCH NEXT</command> or <command>FETCH FORWARD</command> with a positive count. For simple queries <productname>PostgreSQL</productname> will allow backwards fetch from cursors not declared with <literal>SCROLL</literal>, but this @@ -400,8 +400,8 @@ COMMIT WORK; </para> <para> - The SQL standard allows only <literal>FROM</> preceding the cursor - name; the option to use <literal>IN</>, or to leave them out altogether, is + The SQL standard allows only <literal>FROM</literal> preceding the cursor + name; the option to use <literal>IN</literal>, or to leave them out altogether, is an extension. </para> </refsect1> diff --git a/doc/src/sgml/ref/grant.sgml b/doc/src/sgml/ref/grant.sgml index 385cfe6a9ca..fd9fe03a6ad 100644 --- a/doc/src/sgml/ref/grant.sgml +++ b/doc/src/sgml/ref/grant.sgml @@ -116,7 +116,7 @@ GRANT <replaceable class="parameter">role_name</replaceable> [, ...] TO <replace There is also an option to grant privileges on all objects of the same type within one or more schemas. This functionality is currently supported only for tables, sequences, and functions (but note that <literal>ALL - TABLES</> is considered to include views and foreign tables). + TABLES</literal> is considered to include views and foreign tables). </para> <para> @@ -174,7 +174,7 @@ GRANT <replaceable class="parameter">role_name</replaceable> [, ...] TO <replace (including domains). The object owner can, of course, <command>REVOKE</command> both default and expressly granted privileges. (For maximum - security, issue the <command>REVOKE</> in the same transaction that + security, issue the <command>REVOKE</command> in the same transaction that creates the object; then there is no window in which another user can use the object.) Also, these initial default privilege settings can be changed using the @@ -211,7 +211,7 @@ GRANT <replaceable class="parameter">role_name</replaceable> [, ...] TO <replace <para> Allows <xref linkend="sql-insert"> of a new row into the specified table. If specific columns are listed, - only those columns may be assigned to in the <command>INSERT</> + only those columns may be assigned to in the <command>INSERT</command> command (other columns will therefore receive default values). Also allows <xref linkend="sql-copy"> FROM. </para> @@ -224,8 +224,8 @@ GRANT <replaceable class="parameter">role_name</replaceable> [, ...] TO <replace <para> Allows <xref linkend="sql-update"> of any column, or the specific columns listed, of the specified table. - (In practice, any nontrivial <command>UPDATE</> command will require - <literal>SELECT</> privilege as well, since it must reference table + (In practice, any nontrivial <command>UPDATE</command> command will require + <literal>SELECT</literal> privilege as well, since it must reference table columns to determine which rows to update, and/or to compute new values for columns.) <literal>SELECT ... FOR UPDATE</literal> @@ -246,8 +246,8 @@ GRANT <replaceable class="parameter">role_name</replaceable> [, ...] TO <replace <para> Allows <xref linkend="sql-delete"> of a row from the specified table. - (In practice, any nontrivial <command>DELETE</> command will require - <literal>SELECT</> privilege as well, since it must reference table + (In practice, any nontrivial <command>DELETE</command> command will require + <literal>SELECT</literal> privilege as well, since it must reference table columns to determine which rows to delete.) </para> </listitem> @@ -292,7 +292,7 @@ GRANT <replaceable class="parameter">role_name</replaceable> [, ...] TO <replace </para> <para> For schemas, allows new objects to be created within the schema. - To rename an existing object, you must own the object <emphasis>and</> + To rename an existing object, you must own the object <emphasis>and</emphasis> have this privilege for the containing schema. </para> <para> @@ -310,7 +310,7 @@ GRANT <replaceable class="parameter">role_name</replaceable> [, ...] TO <replace <para> Allows the user to connect to the specified database. This privilege is checked at connection startup (in addition to checking - any restrictions imposed by <filename>pg_hba.conf</>). + any restrictions imposed by <filename>pg_hba.conf</filename>). </para> </listitem> </varlistentry> @@ -348,7 +348,7 @@ GRANT <replaceable class="parameter">role_name</replaceable> [, ...] TO <replace <para> For schemas, allows access to objects contained in the specified schema (assuming that the objects' own privilege requirements are - also met). Essentially this allows the grantee to <quote>look up</> + also met). Essentially this allows the grantee to <quote>look up</quote> objects within the schema. Without this permission, it is still possible to see the object names, e.g. by querying the system tables. Also, after revoking this permission, existing backends might have @@ -416,14 +416,14 @@ GRANT <replaceable class="parameter">role_name</replaceable> [, ...] TO <replace OPTION</literal> on itself, but it may grant or revoke membership in itself from a database session where the session user matches the role. Database superusers can grant or revoke membership in any role - to anyone. Roles having <literal>CREATEROLE</> privilege can grant + to anyone. Roles having <literal>CREATEROLE</literal> privilege can grant or revoke membership in any role that is not a superuser. </para> <para> Unlike the case with privileges, membership in a role cannot be granted - to <literal>PUBLIC</>. Note also that this form of the command does not - allow the noise word <literal>GROUP</>. + to <literal>PUBLIC</literal>. Note also that this form of the command does not + allow the noise word <literal>GROUP</literal>. </para> </refsect2> </refsect1> @@ -440,13 +440,13 @@ GRANT <replaceable class="parameter">role_name</replaceable> [, ...] TO <replace <para> Since <productname>PostgreSQL</productname> 8.1, the concepts of users and groups have been unified into a single kind of entity called a role. - It is therefore no longer necessary to use the keyword <literal>GROUP</> - to identify whether a grantee is a user or a group. <literal>GROUP</> + It is therefore no longer necessary to use the keyword <literal>GROUP</literal> + to identify whether a grantee is a user or a group. <literal>GROUP</literal> is still allowed in the command, but it is a noise word. </para> <para> - A user may perform <command>SELECT</>, <command>INSERT</>, etc. on a + A user may perform <command>SELECT</command>, <command>INSERT</command>, etc. on a column if they hold that privilege for either the specific column or its whole table. Granting the privilege at the table level and then revoking it for one column will not do what one might wish: the @@ -454,12 +454,12 @@ GRANT <replaceable class="parameter">role_name</replaceable> [, ...] TO <replace </para> <para> - When a non-owner of an object attempts to <command>GRANT</> privileges + When a non-owner of an object attempts to <command>GRANT</command> privileges on the object, the command will fail outright if the user has no privileges whatsoever on the object. As long as some privilege is available, the command will proceed, but it will grant only those privileges for which the user has grant options. The <command>GRANT ALL - PRIVILEGES</> forms will issue a warning message if no grant options are + PRIVILEGES</command> forms will issue a warning message if no grant options are held, while the other forms will issue a warning if grant options for any of the privileges specifically named in the command are not held. (In principle these statements apply to the object owner as well, but @@ -470,13 +470,13 @@ GRANT <replaceable class="parameter">role_name</replaceable> [, ...] TO <replace <para> It should be noted that database superusers can access all objects regardless of object privilege settings. This - is comparable to the rights of <literal>root</> in a Unix system. - As with <literal>root</>, it's unwise to operate as a superuser + is comparable to the rights of <literal>root</literal> in a Unix system. + As with <literal>root</literal>, it's unwise to operate as a superuser except when absolutely necessary. </para> <para> - If a superuser chooses to issue a <command>GRANT</> or <command>REVOKE</> + If a superuser chooses to issue a <command>GRANT</command> or <command>REVOKE</command> command, the command is performed as though it were issued by the owner of the affected object. In particular, privileges granted via such a command will appear to have been granted by the object owner. @@ -485,32 +485,32 @@ GRANT <replaceable class="parameter">role_name</replaceable> [, ...] TO <replace </para> <para> - <command>GRANT</> and <command>REVOKE</> can also be done by a role + <command>GRANT</command> and <command>REVOKE</command> can also be done by a role that is not the owner of the affected object, but is a member of the role that owns the object, or is a member of a role that holds privileges <literal>WITH GRANT OPTION</literal> on the object. In this case the privileges will be recorded as having been granted by the role that actually owns the object or holds the privileges <literal>WITH GRANT OPTION</literal>. For example, if table - <literal>t1</> is owned by role <literal>g1</>, of which role - <literal>u1</> is a member, then <literal>u1</> can grant privileges - on <literal>t1</> to <literal>u2</>, but those privileges will appear - to have been granted directly by <literal>g1</>. Any other member - of role <literal>g1</> could revoke them later. + <literal>t1</literal> is owned by role <literal>g1</literal>, of which role + <literal>u1</literal> is a member, then <literal>u1</literal> can grant privileges + on <literal>t1</literal> to <literal>u2</literal>, but those privileges will appear + to have been granted directly by <literal>g1</literal>. Any other member + of role <literal>g1</literal> could revoke them later. </para> <para> - If the role executing <command>GRANT</> holds the required privileges + If the role executing <command>GRANT</command> holds the required privileges indirectly via more than one role membership path, it is unspecified which containing role will be recorded as having done the grant. In such - cases it is best practice to use <command>SET ROLE</> to become the - specific role you want to do the <command>GRANT</> as. + cases it is best practice to use <command>SET ROLE</command> to become the + specific role you want to do the <command>GRANT</command> as. </para> <para> Granting permission on a table does not automatically extend permissions to any sequences used by the table, including - sequences tied to <type>SERIAL</> columns. Permissions on + sequences tied to <type>SERIAL</type> columns. Permissions on sequences must be set separately. </para> @@ -551,8 +551,8 @@ rolename=xxxx -- privileges granted to a role /yyyy -- role that granted this privilege </literallayout> - The above example display would be seen by user <literal>miriam</> after - creating table <literal>mytable</> and doing: + The above example display would be seen by user <literal>miriam</literal> after + creating table <literal>mytable</literal> and doing: <programlisting> GRANT SELECT ON mytable TO PUBLIC; @@ -562,31 +562,31 @@ GRANT SELECT (col1), UPDATE (col1) ON mytable TO miriam_rw; </para> <para> - For non-table objects there are other <command>\d</> commands + For non-table objects there are other <command>\d</command> commands that can display their privileges. </para> <para> - If the <quote>Access privileges</> column is empty for a given object, + If the <quote>Access privileges</quote> column is empty for a given object, it means the object has default privileges (that is, its privileges column is null). Default privileges always include all privileges for the owner, - and can include some privileges for <literal>PUBLIC</> depending on the - object type, as explained above. The first <command>GRANT</> or - <command>REVOKE</> on an object + and can include some privileges for <literal>PUBLIC</literal> depending on the + object type, as explained above. The first <command>GRANT</command> or + <command>REVOKE</command> on an object will instantiate the default privileges (producing, for example, - <literal>{miriam=arwdDxt/miriam}</>) and then modify them per the + <literal>{miriam=arwdDxt/miriam}</literal>) and then modify them per the specified request. Similarly, entries are shown in <quote>Column access - privileges</> only for columns with nondefault privileges. - (Note: for this purpose, <quote>default privileges</> always means the + privileges</quote> only for columns with nondefault privileges. + (Note: for this purpose, <quote>default privileges</quote> always means the built-in default privileges for the object's type. An object whose - privileges have been affected by an <command>ALTER DEFAULT PRIVILEGES</> + privileges have been affected by an <command>ALTER DEFAULT PRIVILEGES</command> command will always be shown with an explicit privilege entry that - includes the effects of the <command>ALTER</>.) + includes the effects of the <command>ALTER</command>.) </para> <para> Notice that the owner's implicit grant options are not marked in the - access privileges display. A <literal>*</> will appear only when + access privileges display. A <literal>*</literal> will appear only when grant options have been explicitly granted to someone. </para> </refsect1> @@ -617,7 +617,7 @@ GRANT ALL PRIVILEGES ON kinds TO manuel; </para> <para> - Grant membership in role <literal>admins</> to user <literal>joe</>: + Grant membership in role <literal>admins</literal> to user <literal>joe</literal>: <programlisting> GRANT admins TO joe; @@ -637,14 +637,14 @@ GRANT admins TO joe; <para> <productname>PostgreSQL</productname> allows an object owner to revoke their own ordinary privileges: for example, a table owner can make the table - read-only to themselves by revoking their own <literal>INSERT</>, - <literal>UPDATE</>, <literal>DELETE</>, and <literal>TRUNCATE</> + read-only to themselves by revoking their own <literal>INSERT</literal>, + <literal>UPDATE</literal>, <literal>DELETE</literal>, and <literal>TRUNCATE</literal> privileges. This is not possible according to the SQL standard. The reason is that <productname>PostgreSQL</productname> treats the owner's privileges as having been granted by the owner to themselves; therefore they can revoke them too. In the SQL standard, the owner's privileges are - granted by an assumed entity <quote>_SYSTEM</>. Not being - <quote>_SYSTEM</>, the owner cannot revoke these rights. + granted by an assumed entity <quote>_SYSTEM</quote>. Not being + <quote>_SYSTEM</quote>, the owner cannot revoke these rights. </para> <para> diff --git a/doc/src/sgml/ref/import_foreign_schema.sgml b/doc/src/sgml/ref/import_foreign_schema.sgml index f22893f1373..9bc83f1c6a6 100644 --- a/doc/src/sgml/ref/import_foreign_schema.sgml +++ b/doc/src/sgml/ref/import_foreign_schema.sgml @@ -124,9 +124,9 @@ IMPORT FOREIGN SCHEMA <replaceable class="parameter">remote_schema</replaceable> <title>Examples</title> <para> - Import table definitions from a remote schema <structname>foreign_films</> - on server <structname>film_server</>, creating the foreign tables in - local schema <structname>films</>: + Import table definitions from a remote schema <structname>foreign_films</structname> + on server <structname>film_server</structname>, creating the foreign tables in + local schema <structname>films</structname>: <programlisting> IMPORT FOREIGN SCHEMA foreign_films @@ -135,8 +135,8 @@ IMPORT FOREIGN SCHEMA foreign_films </para> <para> - As above, but import only the two tables <structname>actors</> and - <literal>directors</> (if they exist): + As above, but import only the two tables <structname>actors</structname> and + <literal>directors</literal> (if they exist): <programlisting> IMPORT FOREIGN SCHEMA foreign_films LIMIT TO (actors, directors) @@ -149,8 +149,8 @@ IMPORT FOREIGN SCHEMA foreign_films LIMIT TO (actors, directors) <para> The <command>IMPORT FOREIGN SCHEMA</command> command conforms to the - <acronym>SQL</acronym> standard, except that the <literal>OPTIONS</> - clause is a <productname>PostgreSQL</> extension. + <acronym>SQL</acronym> standard, except that the <literal>OPTIONS</literal> + clause is a <productname>PostgreSQL</productname> extension. </para> </refsect1> diff --git a/doc/src/sgml/ref/initdb.sgml b/doc/src/sgml/ref/initdb.sgml index 732fecab8ec..6696d4d05ab 100644 --- a/doc/src/sgml/ref/initdb.sgml +++ b/doc/src/sgml/ref/initdb.sgml @@ -79,8 +79,8 @@ PostgreSQL documentation <para> <command>initdb</command> initializes the database cluster's default locale and character set encoding. The character set encoding, - collation order (<literal>LC_COLLATE</>) and character set classes - (<literal>LC_CTYPE</>, e.g. upper, lower, digit) can be set separately + collation order (<literal>LC_COLLATE</literal>) and character set classes + (<literal>LC_CTYPE</literal>, e.g. upper, lower, digit) can be set separately for a database when it is created. <command>initdb</command> determines those settings for the <literal>template1</literal> database, which will serve as the default for all other databases. @@ -89,7 +89,7 @@ PostgreSQL documentation <para> To alter the default collation order or character set classes, use the <option>--lc-collate</option> and <option>--lc-ctype</option> options. - Collation orders other than <literal>C</> or <literal>POSIX</> also have + Collation orders other than <literal>C</literal> or <literal>POSIX</literal> also have a performance penalty. For these reasons it is important to choose the right locale when running <command>initdb</command>. </para> @@ -98,8 +98,8 @@ PostgreSQL documentation The remaining locale categories can be changed later when the server is started. You can also use <option>--locale</option> to set the default for all locale categories, including collation order and - character set classes. All server locale values (<literal>lc_*</>) can - be displayed via <command>SHOW ALL</>. + character set classes. All server locale values (<literal>lc_*</literal>) can + be displayed via <command>SHOW ALL</command>. More details can be found in <xref linkend="locale">. </para> @@ -121,7 +121,7 @@ PostgreSQL documentation <listitem> <para> This option specifies the default authentication method for local - users used in <filename>pg_hba.conf</> (<literal>host</literal> + users used in <filename>pg_hba.conf</filename> (<literal>host</literal> and <literal>local</literal> lines). <command>initdb</command> will prepopulate <filename>pg_hba.conf</filename> entries using the specified authentication method for non-replication as well as @@ -129,8 +129,8 @@ PostgreSQL documentation </para> <para> - Do not use <literal>trust</> unless you trust all local users on your - system. <literal>trust</> is the default for ease of installation. + Do not use <literal>trust</literal> unless you trust all local users on your + system. <literal>trust</literal> is the default for ease of installation. </para> </listitem> </varlistentry> @@ -140,7 +140,7 @@ PostgreSQL documentation <listitem> <para> This option specifies the authentication method for local users via - TCP/IP connections used in <filename>pg_hba.conf</> + TCP/IP connections used in <filename>pg_hba.conf</filename> (<literal>host</literal> lines). </para> </listitem> @@ -151,7 +151,7 @@ PostgreSQL documentation <listitem> <para> This option specifies the authentication method for local users via - Unix-domain socket connections used in <filename>pg_hba.conf</> + Unix-domain socket connections used in <filename>pg_hba.conf</filename> (<literal>local</literal> lines). </para> </listitem> @@ -255,7 +255,7 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>--pwfile=<replaceable>filename</></option></term> + <term><option>--pwfile=<replaceable>filename</replaceable></option></term> <listitem> <para> Makes <command>initdb</command> read the database superuser's password @@ -270,14 +270,14 @@ PostgreSQL documentation <listitem> <para> Safely write all database files to disk and exit. This does not - perform any of the normal <application>initdb</> operations. + perform any of the normal <application>initdb</application> operations. </para> </listitem> </varlistentry> <varlistentry> - <term><option>-T <replaceable>config</></option></term> - <term><option>--text-search-config=<replaceable>config</></option></term> + <term><option>-T <replaceable>config</replaceable></option></term> + <term><option>--text-search-config=<replaceable>config</replaceable></option></term> <listitem> <para> Sets the default text search configuration. @@ -319,7 +319,7 @@ PostgreSQL documentation <term><option>--wal-segsize=<replaceable>SEGSIZE</replaceable></option></term> <listitem> <para> - Set the <firstterm>WAL segment size</>, in megabytes. This is + Set the <firstterm>WAL segment size</firstterm>, in megabytes. This is the size of each individual file in the WAL log. It may be useful to adjust this size to control the granularity of WAL log shipping. This option can only be set during initialization, and cannot be @@ -395,8 +395,8 @@ PostgreSQL documentation <variablelist> <varlistentry> - <term><option>-V</></term> - <term><option>--version</></term> + <term><option>-V</option></term> + <term><option>--version</option></term> <listitem> <para> Print the <application>initdb</application> version and exit. @@ -405,8 +405,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-?</></term> - <term><option>--help</></term> + <term><option>-?</option></term> + <term><option>--help</option></term> <listitem> <para> Show help about <application>initdb</application> command line @@ -449,8 +449,8 @@ PostgreSQL documentation </variablelist> <para> - This utility, like most other <productname>PostgreSQL</> utilities, - also uses the environment variables supported by <application>libpq</> + This utility, like most other <productname>PostgreSQL</productname> utilities, + also uses the environment variables supported by <application>libpq</application> (see <xref linkend="libpq-envars">). </para> diff --git a/doc/src/sgml/ref/insert.sgml b/doc/src/sgml/ref/insert.sgml index ce037e59027..7f44ec31d15 100644 --- a/doc/src/sgml/ref/insert.sgml +++ b/doc/src/sgml/ref/insert.sgml @@ -56,10 +56,10 @@ INSERT INTO <replaceable class="parameter">table_name</replaceable> [ AS <replac <para> The target column names can be listed in any order. If no list of column names is given at all, the default is all the columns of the - table in their declared order; or the first <replaceable>N</> column - names, if there are only <replaceable>N</> columns supplied by the - <literal>VALUES</> clause or <replaceable>query</>. The values - supplied by the <literal>VALUES</> clause or <replaceable>query</> are + table in their declared order; or the first <replaceable>N</replaceable> column + names, if there are only <replaceable>N</replaceable> columns supplied by the + <literal>VALUES</literal> clause or <replaceable>query</replaceable>. The values + supplied by the <literal>VALUES</literal> clause or <replaceable>query</replaceable> are associated with the explicit or implicit column list left-to-right. </para> @@ -75,21 +75,21 @@ INSERT INTO <replaceable class="parameter">table_name</replaceable> [ AS <replac </para> <para> - <literal>ON CONFLICT</> can be used to specify an alternative + <literal>ON CONFLICT</literal> can be used to specify an alternative action to raising a unique constraint or exclusion constraint violation error. (See <xref linkend="sql-on-conflict" endterm="sql-on-conflict-title"> below.) </para> <para> - The optional <literal>RETURNING</> clause causes <command>INSERT</> + The optional <literal>RETURNING</literal> clause causes <command>INSERT</command> to compute and return value(s) based on each row actually inserted - (or updated, if an <literal>ON CONFLICT DO UPDATE</> clause was + (or updated, if an <literal>ON CONFLICT DO UPDATE</literal> clause was used). This is primarily useful for obtaining values that were supplied by defaults, such as a serial sequence number. However, any expression using the table's columns is allowed. The syntax of - the <literal>RETURNING</> list is identical to that of the output - list of <command>SELECT</>. Only rows that were successfully + the <literal>RETURNING</literal> list is identical to that of the output + list of <command>SELECT</command>. Only rows that were successfully inserted or updated will be returned. For example, if a row was locked but not updated because an <literal>ON CONFLICT DO UPDATE ... WHERE</literal> clause <replaceable @@ -99,7 +99,7 @@ INSERT INTO <replaceable class="parameter">table_name</replaceable> [ AS <replac <para> You must have <literal>INSERT</literal> privilege on a table in - order to insert into it. If <literal>ON CONFLICT DO UPDATE</> is + order to insert into it. If <literal>ON CONFLICT DO UPDATE</literal> is present, <literal>UPDATE</literal> privilege on the table is also required. </para> @@ -107,17 +107,17 @@ INSERT INTO <replaceable class="parameter">table_name</replaceable> [ AS <replac <para> If a column list is specified, you only need <literal>INSERT</literal> privilege on the listed columns. - Similarly, when <literal>ON CONFLICT DO UPDATE</> is specified, you - only need <literal>UPDATE</> privilege on the column(s) that are - listed to be updated. However, <literal>ON CONFLICT DO UPDATE</> - also requires <literal>SELECT</> privilege on any column whose - values are read in the <literal>ON CONFLICT DO UPDATE</> - expressions or <replaceable>condition</>. + Similarly, when <literal>ON CONFLICT DO UPDATE</literal> is specified, you + only need <literal>UPDATE</literal> privilege on the column(s) that are + listed to be updated. However, <literal>ON CONFLICT DO UPDATE</literal> + also requires <literal>SELECT</literal> privilege on any column whose + values are read in the <literal>ON CONFLICT DO UPDATE</literal> + expressions or <replaceable>condition</replaceable>. </para> <para> - Use of the <literal>RETURNING</> clause requires <literal>SELECT</> - privilege on all columns mentioned in <literal>RETURNING</>. + Use of the <literal>RETURNING</literal> clause requires <literal>SELECT</literal> + privilege on all columns mentioned in <literal>RETURNING</literal>. If you use the <replaceable class="parameter">query</replaceable> clause to insert rows from a query, you of course need to have <literal>SELECT</literal> privilege on @@ -144,7 +144,7 @@ INSERT INTO <replaceable class="parameter">table_name</replaceable> [ AS <replac <listitem> <para> The <literal>WITH</literal> clause allows you to specify one or more - subqueries that can be referenced by name in the <command>INSERT</> + subqueries that can be referenced by name in the <command>INSERT</command> query. See <xref linkend="queries-with"> and <xref linkend="sql-select"> for details. </para> @@ -175,8 +175,8 @@ INSERT INTO <replaceable class="parameter">table_name</replaceable> [ AS <replac A substitute name for <replaceable class="parameter">table_name</replaceable>. When an alias is provided, it completely hides the actual name of the table. - This is particularly useful when <literal>ON CONFLICT DO UPDATE</> - targets a table named <varname>excluded</>, since that will otherwise + This is particularly useful when <literal>ON CONFLICT DO UPDATE</literal> + targets a table named <varname>excluded</varname>, since that will otherwise be taken as the name of the special table representing rows proposed for insertion. </para> @@ -193,11 +193,11 @@ INSERT INTO <replaceable class="parameter">table_name</replaceable> [ AS <replac can be qualified with a subfield name or array subscript, if needed. (Inserting into only some fields of a composite column leaves the other fields null.) When referencing a - column with <literal>ON CONFLICT DO UPDATE</>, do not include + column with <literal>ON CONFLICT DO UPDATE</literal>, do not include the table's name in the specification of a target column. For example, <literal>INSERT INTO table_name ... ON CONFLICT DO UPDATE - SET table_name.col = 1</> is invalid (this follows the general - behavior for <command>UPDATE</>). + SET table_name.col = 1</literal> is invalid (this follows the general + behavior for <command>UPDATE</command>). </para> </listitem> </varlistentry> @@ -281,11 +281,11 @@ INSERT INTO <replaceable class="parameter">table_name</replaceable> [ AS <replac <listitem> <para> An expression to be computed and returned by the - <command>INSERT</> command after each row is inserted or + <command>INSERT</command> command after each row is inserted or updated. The expression can use any column names of the table named by <replaceable class="parameter">table_name</replaceable>. Write - <literal>*</> to return all columns of the inserted or updated + <literal>*</literal> to return all columns of the inserted or updated row(s). </para> </listitem> @@ -386,7 +386,7 @@ INSERT INTO <replaceable class="parameter">table_name</replaceable> [ AS <replac UPDATE</literal> have access to the existing row using the table's name (or an alias), and to rows proposed for insertion using the special <varname>excluded</varname> table. - <literal>SELECT</> privilege is required on any column in the + <literal>SELECT</literal> privilege is required on any column in the target table where corresponding <varname>excluded</varname> columns are read. </para> @@ -406,7 +406,7 @@ INSERT INTO <replaceable class="parameter">table_name</replaceable> [ AS <replac The name of a <replaceable class="parameter">table_name</replaceable> column. Used to infer arbiter indexes. Follows <command>CREATE - INDEX</command> format. <literal>SELECT</> privilege on + INDEX</command> format. <literal>SELECT</literal> privilege on <replaceable class="parameter">index_column_name</replaceable> is required. </para> @@ -422,7 +422,7 @@ INSERT INTO <replaceable class="parameter">table_name</replaceable> [ AS <replac infer expressions on <replaceable class="parameter">table_name</replaceable> columns appearing within index definitions (not simple columns). Follows - <command>CREATE INDEX</command> format. <literal>SELECT</> + <command>CREATE INDEX</command> format. <literal>SELECT</literal> privilege on any column appearing within <replaceable class="parameter">index_expression</replaceable> is required. </para> @@ -469,7 +469,7 @@ INSERT INTO <replaceable class="parameter">table_name</replaceable> [ AS <replac Used to allow inference of partial unique indexes. Any indexes that satisfy the predicate (which need not actually be partial indexes) can be inferred. Follows <command>CREATE - INDEX</command> format. <literal>SELECT</> privilege on any + INDEX</command> format. <literal>SELECT</literal> privilege on any column appearing within <replaceable class="parameter">index_predicate</replaceable> is required. </para> @@ -494,7 +494,7 @@ INSERT INTO <replaceable class="parameter">table_name</replaceable> [ AS <replac An expression that returns a value of type <type>boolean</type>. Only rows for which this expression returns <literal>true</literal> will be updated, although all - rows will be locked when the <literal>ON CONFLICT DO UPDATE</> + rows will be locked when the <literal>ON CONFLICT DO UPDATE</literal> action is taken. Note that <replaceable>condition</replaceable> is evaluated last, after a conflict has been identified as a candidate to update. @@ -510,7 +510,7 @@ INSERT INTO <replaceable class="parameter">table_name</replaceable> [ AS <replac </para> <para> - <command>INSERT</command> with an <literal>ON CONFLICT DO UPDATE</> + <command>INSERT</command> with an <literal>ON CONFLICT DO UPDATE</literal> clause is a <quote>deterministic</quote> statement. This means that the command will not be allowed to affect any single existing row more than once; a cardinality violation error will be raised @@ -538,7 +538,7 @@ INSERT INTO <replaceable class="parameter">table_name</replaceable> [ AS <replac <title>Outputs</title> <para> - On successful completion, an <command>INSERT</> command returns a command + On successful completion, an <command>INSERT</command> command returns a command tag of the form <screen> INSERT <replaceable>oid</replaceable> <replaceable class="parameter">count</replaceable> @@ -554,10 +554,10 @@ INSERT <replaceable>oid</replaceable> <replaceable class="parameter">count</repl </para> <para> - If the <command>INSERT</> command contains a <literal>RETURNING</> - clause, the result will be similar to that of a <command>SELECT</> + If the <command>INSERT</command> command contains a <literal>RETURNING</literal> + clause, the result will be similar to that of a <command>SELECT</command> statement containing the columns and values defined in the - <literal>RETURNING</> list, computed over the row(s) inserted or + <literal>RETURNING</literal> list, computed over the row(s) inserted or updated by the command. </para> </refsect1> @@ -616,7 +616,7 @@ INSERT INTO films DEFAULT VALUES; </para> <para> - To insert multiple rows using the multirow <command>VALUES</> syntax: + To insert multiple rows using the multirow <command>VALUES</command> syntax: <programlisting> INSERT INTO films (code, title, did, date_prod, kind) VALUES @@ -675,7 +675,7 @@ INSERT INTO employees_log SELECT *, current_timestamp FROM upd; Insert or update new distributors as appropriate. Assumes a unique index has been defined that constrains values appearing in the <literal>did</literal> column. Note that the special - <varname>excluded</> table is used to reference values originally + <varname>excluded</varname> table is used to reference values originally proposed for insertion: <programlisting> INSERT INTO distributors (did, dname) @@ -697,7 +697,7 @@ INSERT INTO distributors (did, dname) VALUES (7, 'Redline GmbH') <para> Insert or update new distributors as appropriate. Example assumes a unique index has been defined that constrains values appearing in - the <literal>did</literal> column. <literal>WHERE</> clause is + the <literal>did</literal> column. <literal>WHERE</literal> clause is used to limit the rows actually updated (any existing row not updated will still be locked, though): <programlisting> @@ -734,13 +734,13 @@ INSERT INTO distributors (did, dname) VALUES (10, 'Conrad International') <para> <command>INSERT</command> conforms to the SQL standard, except that - the <literal>RETURNING</> clause is a + the <literal>RETURNING</literal> clause is a <productname>PostgreSQL</productname> extension, as is the ability - to use <literal>WITH</> with <command>INSERT</>, and the ability to - specify an alternative action with <literal>ON CONFLICT</>. + to use <literal>WITH</literal> with <command>INSERT</command>, and the ability to + specify an alternative action with <literal>ON CONFLICT</literal>. Also, the case in which a column name list is omitted, but not all the columns are - filled from the <literal>VALUES</> clause or <replaceable>query</>, + filled from the <literal>VALUES</literal> clause or <replaceable>query</replaceable>, is disallowed by the standard. </para> diff --git a/doc/src/sgml/ref/listen.sgml b/doc/src/sgml/ref/listen.sgml index 76215716d61..65275627174 100644 --- a/doc/src/sgml/ref/listen.sgml +++ b/doc/src/sgml/ref/listen.sgml @@ -54,12 +54,12 @@ LISTEN <replaceable class="parameter">channel</replaceable> <para> The method a client application must use to detect notification events depends on which <productname>PostgreSQL</productname> application programming interface it - uses. With the <application>libpq</> library, the application issues + uses. With the <application>libpq</application> library, the application issues <command>LISTEN</command> as an ordinary SQL command, and then must periodically call the function <function>PQnotifies</function> to find out whether any notification events have been received. Other interfaces such as - <application>libpgtcl</> provide higher-level methods for handling notify events; indeed, - with <application>libpgtcl</> the application programmer should not even issue + <application>libpgtcl</application> provide higher-level methods for handling notify events; indeed, + with <application>libpgtcl</application> the application programmer should not even issue <command>LISTEN</command> or <command>UNLISTEN</command> directly. See the documentation for the interface you are using for more details. </para> diff --git a/doc/src/sgml/ref/load.sgml b/doc/src/sgml/ref/load.sgml index 2be28e6d15a..b9e3fe8b255 100644 --- a/doc/src/sgml/ref/load.sgml +++ b/doc/src/sgml/ref/load.sgml @@ -28,12 +28,12 @@ LOAD '<replaceable class="parameter">filename</replaceable>' <title>Description</title> <para> - This command loads a shared library file into the <productname>PostgreSQL</> + This command loads a shared library file into the <productname>PostgreSQL</productname> server's address space. If the file has been loaded already, the command does nothing. Shared library files that contain C functions are automatically loaded whenever one of their functions is called. - Therefore, an explicit <command>LOAD</> is usually only needed to - load a library that modifies the server's behavior through <quote>hooks</> + Therefore, an explicit <command>LOAD</command> is usually only needed to + load a library that modifies the server's behavior through <quote>hooks</quote> rather than providing a set of functions. </para> @@ -47,15 +47,15 @@ LOAD '<replaceable class="parameter">filename</replaceable>' </para> <indexterm> - <primary><filename>$libdir/plugins</></primary> + <primary><filename>$libdir/plugins</filename></primary> </indexterm> <para> - Non-superusers can only apply <command>LOAD</> to library files - located in <filename>$libdir/plugins/</> — the specified + Non-superusers can only apply <command>LOAD</command> to library files + located in <filename>$libdir/plugins/</filename> — the specified <replaceable class="parameter">filename</replaceable> must begin with exactly that string. (It is the database administrator's - responsibility to ensure that only <quote>safe</> libraries + responsibility to ensure that only <quote>safe</quote> libraries are installed there.) </para> </refsect1> diff --git a/doc/src/sgml/ref/lock.sgml b/doc/src/sgml/ref/lock.sgml index f1dbb8e65a8..6d68ec6c53b 100644 --- a/doc/src/sgml/ref/lock.sgml +++ b/doc/src/sgml/ref/lock.sgml @@ -51,13 +51,13 @@ LOCK [ TABLE ] [ ONLY ] <replaceable class="parameter">name</replaceable> [ * ] restrictive lock mode possible. <command>LOCK TABLE</command> provides for cases when you might need more restrictive locking. For example, suppose an application runs a transaction at the - <literal>READ COMMITTED</> isolation level and needs to ensure that + <literal>READ COMMITTED</literal> isolation level and needs to ensure that data in a table remains stable for the duration of the transaction. - To achieve this you could obtain <literal>SHARE</> lock mode over the + To achieve this you could obtain <literal>SHARE</literal> lock mode over the table before querying. This will prevent concurrent data changes and ensure subsequent reads of the table see a stable view of - committed data, because <literal>SHARE</> lock mode conflicts with - the <literal>ROW EXCLUSIVE</> lock acquired by writers, and your + committed data, because <literal>SHARE</literal> lock mode conflicts with + the <literal>ROW EXCLUSIVE</literal> lock acquired by writers, and your <command>LOCK TABLE <replaceable class="parameter">name</replaceable> IN SHARE MODE</command> statement will wait until any concurrent holders of <literal>ROW @@ -68,28 +68,28 @@ LOCK [ TABLE ] [ ONLY ] <replaceable class="parameter">name</replaceable> [ * ] <para> To achieve a similar effect when running a transaction at the - <literal>REPEATABLE READ</> or <literal>SERIALIZABLE</> - isolation level, you have to execute the <command>LOCK TABLE</> statement - before executing any <command>SELECT</> or data modification statement. - A <literal>REPEATABLE READ</> or <literal>SERIALIZABLE</> transaction's + <literal>REPEATABLE READ</literal> or <literal>SERIALIZABLE</literal> + isolation level, you have to execute the <command>LOCK TABLE</command> statement + before executing any <command>SELECT</command> or data modification statement. + A <literal>REPEATABLE READ</literal> or <literal>SERIALIZABLE</literal> transaction's view of data will be frozen when its first - <command>SELECT</> or data modification statement begins. A <command>LOCK - TABLE</> later in the transaction will still prevent concurrent writes + <command>SELECT</command> or data modification statement begins. A <command>LOCK + TABLE</command> later in the transaction will still prevent concurrent writes — but it won't ensure that what the transaction reads corresponds to the latest committed values. </para> <para> If a transaction of this sort is going to change the data in the - table, then it should use <literal>SHARE ROW EXCLUSIVE</> lock mode - instead of <literal>SHARE</> mode. This ensures that only one + table, then it should use <literal>SHARE ROW EXCLUSIVE</literal> lock mode + instead of <literal>SHARE</literal> mode. This ensures that only one transaction of this type runs at a time. Without this, a deadlock - is possible: two transactions might both acquire <literal>SHARE</> - mode, and then be unable to also acquire <literal>ROW EXCLUSIVE</> + is possible: two transactions might both acquire <literal>SHARE</literal> + mode, and then be unable to also acquire <literal>ROW EXCLUSIVE</literal> mode to actually perform their updates. (Note that a transaction's own locks never conflict, so a transaction can acquire <literal>ROW - EXCLUSIVE</> mode when it holds <literal>SHARE</> mode — but not - if anyone else holds <literal>SHARE</> mode.) To avoid deadlocks, + EXCLUSIVE</literal> mode when it holds <literal>SHARE</literal> mode — but not + if anyone else holds <literal>SHARE</literal> mode.) To avoid deadlocks, make sure all transactions acquire locks on the same objects in the same order, and if multiple lock modes are involved for a single object, then transactions should always acquire the most @@ -111,16 +111,16 @@ LOCK [ TABLE ] [ ONLY ] <replaceable class="parameter">name</replaceable> [ * ] <listitem> <para> The name (optionally schema-qualified) of an existing table to - lock. If <literal>ONLY</> is specified before the table name, only that - table is locked. If <literal>ONLY</> is not specified, the table and all - its descendant tables (if any) are locked. Optionally, <literal>*</> + lock. If <literal>ONLY</literal> is specified before the table name, only that + table is locked. If <literal>ONLY</literal> is not specified, the table and all + its descendant tables (if any) are locked. Optionally, <literal>*</literal> can be specified after the table name to explicitly indicate that descendant tables are included. </para> <para> - The command <literal>LOCK TABLE a, b;</> is equivalent to - <literal>LOCK TABLE a; LOCK TABLE b;</>. The tables are locked + The command <literal>LOCK TABLE a, b;</literal> is equivalent to + <literal>LOCK TABLE a; LOCK TABLE b;</literal>. The tables are locked one-by-one in the order specified in the <command>LOCK TABLE</command> command. </para> @@ -160,18 +160,18 @@ LOCK [ TABLE ] [ ONLY ] <replaceable class="parameter">name</replaceable> [ * ] <title>Notes</title> <para> - <literal>LOCK TABLE ... IN ACCESS SHARE MODE</> requires <literal>SELECT</> + <literal>LOCK TABLE ... IN ACCESS SHARE MODE</literal> requires <literal>SELECT</literal> privileges on the target table. <literal>LOCK TABLE ... IN ROW EXCLUSIVE - MODE</> requires <literal>INSERT</>, <literal>UPDATE</>, <literal>DELETE</>, - or <literal>TRUNCATE</> privileges on the target table. All other forms of - <command>LOCK</> require table-level <literal>UPDATE</>, <literal>DELETE</>, - or <literal>TRUNCATE</> privileges. + MODE</literal> requires <literal>INSERT</literal>, <literal>UPDATE</literal>, <literal>DELETE</literal>, + or <literal>TRUNCATE</literal> privileges on the target table. All other forms of + <command>LOCK</command> require table-level <literal>UPDATE</literal>, <literal>DELETE</literal>, + or <literal>TRUNCATE</literal> privileges. </para> <para> - <command>LOCK TABLE</> is useless outside a transaction block: the lock + <command>LOCK TABLE</command> is useless outside a transaction block: the lock would remain held only to the completion of the statement. Therefore - <productname>PostgreSQL</productname> reports an error if <command>LOCK</> + <productname>PostgreSQL</productname> reports an error if <command>LOCK</command> is used outside a transaction block. Use <xref linkend="sql-begin"> and @@ -181,13 +181,13 @@ LOCK [ TABLE ] [ ONLY ] <replaceable class="parameter">name</replaceable> [ * ] </para> <para> - <command>LOCK TABLE</> only deals with table-level locks, and so - the mode names involving <literal>ROW</> are all misnomers. These + <command>LOCK TABLE</command> only deals with table-level locks, and so + the mode names involving <literal>ROW</literal> are all misnomers. These mode names should generally be read as indicating the intention of the user to acquire row-level locks within the locked table. Also, - <literal>ROW EXCLUSIVE</> mode is a shareable table lock. Keep in + <literal>ROW EXCLUSIVE</literal> mode is a shareable table lock. Keep in mind that all the lock modes have identical semantics so far as - <command>LOCK TABLE</> is concerned, differing only in the rules + <command>LOCK TABLE</command> is concerned, differing only in the rules about which modes conflict with which. For information on how to acquire an actual row-level lock, see <xref linkend="locking-rows"> and the <xref linkend="sql-for-update-share" @@ -200,7 +200,7 @@ LOCK [ TABLE ] [ ONLY ] <replaceable class="parameter">name</replaceable> [ * ] <title>Examples</title> <para> - Obtain a <literal>SHARE</> lock on a primary key table when going to perform + Obtain a <literal>SHARE</literal> lock on a primary key table when going to perform inserts into a foreign key table: <programlisting> @@ -216,7 +216,7 @@ COMMIT WORK; </para> <para> - Take a <literal>SHARE ROW EXCLUSIVE</> lock on a primary key table when going to perform + Take a <literal>SHARE ROW EXCLUSIVE</literal> lock on a primary key table when going to perform a delete operation: <programlisting> @@ -240,8 +240,8 @@ COMMIT WORK; </para> <para> - Except for <literal>ACCESS SHARE</>, <literal>ACCESS EXCLUSIVE</>, - and <literal>SHARE UPDATE EXCLUSIVE</> lock modes, the + Except for <literal>ACCESS SHARE</literal>, <literal>ACCESS EXCLUSIVE</literal>, + and <literal>SHARE UPDATE EXCLUSIVE</literal> lock modes, the <productname>PostgreSQL</productname> lock modes and the <command>LOCK TABLE</command> syntax are compatible with those present in <productname>Oracle</productname>. diff --git a/doc/src/sgml/ref/move.sgml b/doc/src/sgml/ref/move.sgml index 6b809b961d6..4bf78968588 100644 --- a/doc/src/sgml/ref/move.sgml +++ b/doc/src/sgml/ref/move.sgml @@ -69,7 +69,7 @@ MOVE [ <replaceable class="parameter">direction</replaceable> [ FROM | IN ] ] <r <title>Outputs</title> <para> - On successful completion, a <command>MOVE</> command returns a command + On successful completion, a <command>MOVE</command> command returns a command tag of the form <screen> MOVE <replaceable class="parameter">count</replaceable> diff --git a/doc/src/sgml/ref/notify.sgml b/doc/src/sgml/ref/notify.sgml index 09debd6685f..4376b9fdd73 100644 --- a/doc/src/sgml/ref/notify.sgml +++ b/doc/src/sgml/ref/notify.sgml @@ -30,9 +30,9 @@ NOTIFY <replaceable class="parameter">channel</replaceable> [ , <replaceable cla <para> The <command>NOTIFY</command> command sends a notification event together - with an optional <quote>payload</> string to each client application that + with an optional <quote>payload</quote> string to each client application that has previously executed - <command>LISTEN <replaceable class="parameter">channel</></command> + <command>LISTEN <replaceable class="parameter">channel</replaceable></command> for the specified channel name in the current database. Notifications are visible to all users. </para> @@ -49,7 +49,7 @@ NOTIFY <replaceable class="parameter">channel</replaceable> [ , <replaceable cla <para> The information passed to the client for a notification event includes the notification channel - name, the notifying session's server process <acronym>PID</>, and the + name, the notifying session's server process <acronym>PID</acronym>, and the payload string, which is an empty string if it has not been specified. </para> @@ -115,9 +115,9 @@ NOTIFY <replaceable class="parameter">channel</replaceable> [ , <replaceable cla result in useless work, for example, reading a database table to find the same updates that that session just wrote out. It is possible to avoid such extra work by noticing whether the notifying - session's server process <acronym>PID</> (supplied in the + session's server process <acronym>PID</acronym> (supplied in the notification event message) is the same as one's own session's - <acronym>PID</> (available from <application>libpq</>). When they + <acronym>PID</acronym> (available from <application>libpq</application>). When they are the same, the notification event is one's own work bouncing back, and can be ignored. </para> @@ -139,7 +139,7 @@ NOTIFY <replaceable class="parameter">channel</replaceable> [ , <replaceable cla <term><replaceable class="parameter">payload</replaceable></term> <listitem> <para> - The <quote>payload</> string to be communicated along with the + The <quote>payload</quote> string to be communicated along with the notification. This must be specified as a simple string literal. In the default configuration it must be shorter than 8000 bytes. (If binary data or large amounts of information need to be communicated, diff --git a/doc/src/sgml/ref/pg_basebackup.sgml b/doc/src/sgml/ref/pg_basebackup.sgml index f790c560034..1944c185cb9 100644 --- a/doc/src/sgml/ref/pg_basebackup.sgml +++ b/doc/src/sgml/ref/pg_basebackup.sgml @@ -22,7 +22,7 @@ PostgreSQL documentation <refsynopsisdiv> <cmdsynopsis> <command>pg_basebackup</command> - <arg rep="repeat"><replaceable>option</></arg> + <arg rep="repeat"><replaceable>option</replaceable></arg> </cmdsynopsis> </refsynopsisdiv> @@ -69,7 +69,7 @@ PostgreSQL documentation <application>pg_basebackup</application> can make a base backup from not only the master but also the standby. To take a backup from the standby, set up the standby so that it can accept replication connections (that is, set - <varname>max_wal_senders</> and <xref linkend="guc-hot-standby">, + <varname>max_wal_senders</varname> and <xref linkend="guc-hot-standby">, and configure <link linkend="auth-pg-hba-conf">host-based authentication</link>). You will also need to enable <xref linkend="guc-full-page-writes"> on the master. </para> @@ -85,7 +85,7 @@ PostgreSQL documentation </listitem> <listitem> <para> - If you are using <literal>-X none</>, there is no guarantee that all + If you are using <literal>-X none</literal>, there is no guarantee that all WAL files required for the backup are archived at the end of backup. </para> </listitem> @@ -97,9 +97,9 @@ PostgreSQL documentation <listitem> <para> All WAL records required for the backup must contain sufficient full-page writes, - which requires you to enable <varname>full_page_writes</> on the master and - not to use a tool like <application>pg_compresslog</> as - <varname>archive_command</> to remove full-page writes from WAL files. + which requires you to enable <varname>full_page_writes</varname> on the master and + not to use a tool like <application>pg_compresslog</application> as + <varname>archive_command</varname> to remove full-page writes from WAL files. </para> </listitem> </itemizedlist> @@ -193,8 +193,8 @@ PostgreSQL documentation <listitem> <para> The maximum transfer rate of data transferred from the server. Values are - in kilobytes per second. Use a suffix of <literal>M</> to indicate megabytes - per second. A suffix of <literal>k</> is also accepted, and has no effect. + in kilobytes per second. Use a suffix of <literal>M</literal> to indicate megabytes + per second. A suffix of <literal>k</literal> is also accepted, and has no effect. Valid values are between 32 kilobytes per second and 1024 megabytes per second. </para> <para> @@ -534,7 +534,7 @@ PostgreSQL documentation string. See <xref linkend="libpq-connstring"> for more information. </para> <para> - The option is called <literal>--dbname</> for consistency with other + The option is called <literal>--dbname</literal> for consistency with other client applications, but because <application>pg_basebackup</application> doesn't connect to any particular database in the cluster, database name in the connection string will be ignored. @@ -594,8 +594,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-w</></term> - <term><option>--no-password</></term> + <term><option>-w</option></term> + <term><option>--no-password</option></term> <listitem> <para> Never issue a password prompt. If the server requires @@ -623,7 +623,7 @@ PostgreSQL documentation for a password if the server demands password authentication. However, <application>pg_basebackup</application> will waste a connection attempt finding out that the server wants a password. - In some cases it is worth typing <option>-W</> to avoid the extra + In some cases it is worth typing <option>-W</option> to avoid the extra connection attempt. </para> </listitem> @@ -636,8 +636,8 @@ PostgreSQL documentation <variablelist> <varlistentry> - <term><option>-V</></term> - <term><option>--version</></term> + <term><option>-V</option></term> + <term><option>--version</option></term> <listitem> <para> Print the <application>pg_basebackup</application> version and exit. @@ -646,8 +646,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-?</></term> - <term><option>--help</></term> + <term><option>-?</option></term> + <term><option>--help</option></term> <listitem> <para> Show help about <application>pg_basebackup</application> command line @@ -665,8 +665,8 @@ PostgreSQL documentation <title>Environment</title> <para> - This utility, like most other <productname>PostgreSQL</> utilities, - uses the environment variables supported by <application>libpq</> + This utility, like most other <productname>PostgreSQL</productname> utilities, + uses the environment variables supported by <application>libpq</application> (see <xref linkend="libpq-envars">). </para> @@ -709,8 +709,8 @@ PostgreSQL documentation tar file before starting the PostgreSQL server. If there are additional tablespaces, the tar files for them need to be unpacked in the correct locations. In this case the symbolic links for those tablespaces will be created by the server - according to the contents of the <filename>tablespace_map</> file that is - included in the <filename>base.tar</> file. + according to the contents of the <filename>tablespace_map</filename> file that is + included in the <filename>base.tar</filename> file. </para> <para> diff --git a/doc/src/sgml/ref/pg_config-ref.sgml b/doc/src/sgml/ref/pg_config-ref.sgml index 0210f6389dc..b819f3f3457 100644 --- a/doc/src/sgml/ref/pg_config-ref.sgml +++ b/doc/src/sgml/ref/pg_config-ref.sgml @@ -13,7 +13,7 @@ <refnamediv> <refname>pg_config</refname> - <refpurpose>retrieve information about the installed version of <productname>PostgreSQL</></refpurpose> + <refpurpose>retrieve information about the installed version of <productname>PostgreSQL</productname></refpurpose> </refnamediv> <refsynopsisdiv> @@ -24,12 +24,12 @@ </refsynopsisdiv> <refsect1> - <title>Description</> + <title>Description</title> <para> - The <application>pg_config</> utility prints configuration parameters - of the currently installed version of <productname>PostgreSQL</>. It is + The <application>pg_config</application> utility prints configuration parameters + of the currently installed version of <productname>PostgreSQL</productname>. It is intended, for example, to be used by software packages that want to interface - to <productname>PostgreSQL</> to facilitate finding the required header files + to <productname>PostgreSQL</productname> to facilitate finding the required header files and libraries. </para> </refsect1> @@ -39,22 +39,22 @@ <title>Options</title> <para> - To use <application>pg_config</>, supply one or more of the following + To use <application>pg_config</application>, supply one or more of the following options: <variablelist> <varlistentry> - <term><option>--bindir</option></> + <term><option>--bindir</option></term> <listitem> <para> Print the location of user executables. Use this, for example, to find - the <command>psql</> program. This is normally also the location - where the <filename>pg_config</> program resides. + the <command>psql</command> program. This is normally also the location + where the <filename>pg_config</filename> program resides. </para> </listitem> </varlistentry> <varlistentry> - <term><option>--docdir</option></> + <term><option>--docdir</option></term> <listitem> <para> Print the location of documentation files. @@ -63,7 +63,7 @@ </varlistentry> <varlistentry> - <term><option>--htmldir</option></> + <term><option>--htmldir</option></term> <listitem> <para> Print the location of HTML documentation files. @@ -72,7 +72,7 @@ </varlistentry> <varlistentry> - <term><option>--includedir</option></> + <term><option>--includedir</option></term> <listitem> <para> Print the location of C header files of the client interfaces. @@ -81,7 +81,7 @@ </varlistentry> <varlistentry> - <term><option>--pkgincludedir</option></> + <term><option>--pkgincludedir</option></term> <listitem> <para> Print the location of other C header files. @@ -90,7 +90,7 @@ </varlistentry> <varlistentry> - <term><option>--includedir-server</option></> + <term><option>--includedir-server</option></term> <listitem> <para> Print the location of C header files for server programming. @@ -99,7 +99,7 @@ </varlistentry> <varlistentry> - <term><option>--libdir</option></> + <term><option>--libdir</option></term> <listitem> <para> Print the location of object code libraries. @@ -108,7 +108,7 @@ </varlistentry> <varlistentry> - <term><option>--pkglibdir</option></> + <term><option>--pkglibdir</option></term> <listitem> <para> Print the location of dynamically loadable modules, or where @@ -120,18 +120,18 @@ </varlistentry> <varlistentry> - <term><option>--localedir</option></> + <term><option>--localedir</option></term> <listitem> <para> Print the location of locale support files. (This will be an empty string if locale support was not configured when - <productname>PostgreSQL</> was built.) + <productname>PostgreSQL</productname> was built.) </para> </listitem> </varlistentry> <varlistentry> - <term><option>--mandir</option></> + <term><option>--mandir</option></term> <listitem> <para> Print the location of manual pages. @@ -140,7 +140,7 @@ </varlistentry> <varlistentry> - <term><option>--sharedir</option></> + <term><option>--sharedir</option></term> <listitem> <para> Print the location of architecture-independent support files. @@ -149,7 +149,7 @@ </varlistentry> <varlistentry> - <term><option>--sysconfdir</option></> + <term><option>--sysconfdir</option></term> <listitem> <para> Print the location of system-wide configuration files. @@ -158,7 +158,7 @@ </varlistentry> <varlistentry> - <term><option>--pgxs</option></> + <term><option>--pgxs</option></term> <listitem> <para> Print the location of extension makefiles. @@ -167,11 +167,11 @@ </varlistentry> <varlistentry> - <term><option>--configure</option></> + <term><option>--configure</option></term> <listitem> <para> - Print the options that were given to the <filename>configure</> - script when <productname>PostgreSQL</> was configured for building. + Print the options that were given to the <filename>configure</filename> + script when <productname>PostgreSQL</productname> was configured for building. This can be used to reproduce the identical configuration, or to find out with what options a binary package was built. (Note however that binary packages often contain vendor-specific custom @@ -181,102 +181,102 @@ </varlistentry> <varlistentry> - <term><option>--cc</option></> + <term><option>--cc</option></term> <listitem> <para> Print the value of the <varname>CC</varname> variable that was used for building - <productname>PostgreSQL</>. This shows the C compiler used. + <productname>PostgreSQL</productname>. This shows the C compiler used. </para> </listitem> </varlistentry> <varlistentry> - <term><option>--cppflags</option></> + <term><option>--cppflags</option></term> <listitem> <para> Print the value of the <varname>CPPFLAGS</varname> variable that was used for building - <productname>PostgreSQL</>. This shows C compiler switches needed - at preprocessing time (typically, <literal>-I</> switches). + <productname>PostgreSQL</productname>. This shows C compiler switches needed + at preprocessing time (typically, <literal>-I</literal> switches). </para> </listitem> </varlistentry> <varlistentry> - <term><option>--cflags</option></> + <term><option>--cflags</option></term> <listitem> <para> Print the value of the <varname>CFLAGS</varname> variable that was used for building - <productname>PostgreSQL</>. This shows C compiler switches. + <productname>PostgreSQL</productname>. This shows C compiler switches. </para> </listitem> </varlistentry> <varlistentry> - <term><option>--cflags_sl</option></> + <term><option>--cflags_sl</option></term> <listitem> <para> Print the value of the <varname>CFLAGS_SL</varname> variable that was used for building - <productname>PostgreSQL</>. This shows extra C compiler switches + <productname>PostgreSQL</productname>. This shows extra C compiler switches used for building shared libraries. </para> </listitem> </varlistentry> <varlistentry> - <term><option>--ldflags</option></> + <term><option>--ldflags</option></term> <listitem> <para> Print the value of the <varname>LDFLAGS</varname> variable that was used for building - <productname>PostgreSQL</>. This shows linker switches. + <productname>PostgreSQL</productname>. This shows linker switches. </para> </listitem> </varlistentry> <varlistentry> - <term><option>--ldflags_ex</option></> + <term><option>--ldflags_ex</option></term> <listitem> <para> Print the value of the <varname>LDFLAGS_EX</varname> variable that was used for building - <productname>PostgreSQL</>. This shows linker switches + <productname>PostgreSQL</productname>. This shows linker switches used for building executables only. </para> </listitem> </varlistentry> <varlistentry> - <term><option>--ldflags_sl</option></> + <term><option>--ldflags_sl</option></term> <listitem> <para> Print the value of the <varname>LDFLAGS_SL</varname> variable that was used for building - <productname>PostgreSQL</>. This shows linker switches + <productname>PostgreSQL</productname>. This shows linker switches used for building shared libraries only. </para> </listitem> </varlistentry> <varlistentry> - <term><option>--libs</option></> + <term><option>--libs</option></term> <listitem> <para> Print the value of the <varname>LIBS</varname> variable that was used for building - <productname>PostgreSQL</>. This normally contains <literal>-l</> - switches for external libraries linked into <productname>PostgreSQL</>. + <productname>PostgreSQL</productname>. This normally contains <literal>-l</literal> + switches for external libraries linked into <productname>PostgreSQL</productname>. </para> </listitem> </varlistentry> <varlistentry> - <term><option>--version</option></> + <term><option>--version</option></term> <listitem> <para> - Print the version of <productname>PostgreSQL</>. + Print the version of <productname>PostgreSQL</productname>. </para> </listitem> </varlistentry> <varlistentry> - <term><option>-?</></term> - <term><option>--help</></term> + <term><option>-?</option></term> + <term><option>--help</option></term> <listitem> <para> Show help about <application>pg_config</application> command line @@ -303,9 +303,9 @@ <option>--cc</option>, <option>--cppflags</option>, <option>--cflags</option>, <option>--cflags_sl</option>, <option>--ldflags</option>, <option>--ldflags_sl</option>, - and <option>--libs</option> were added in <productname>PostgreSQL</> 8.1. - The option <option>--htmldir</option> was added in <productname>PostgreSQL</> 8.4. - The option <option>--ldflags_ex</option> was added in <productname>PostgreSQL</> 9.0. + and <option>--libs</option> were added in <productname>PostgreSQL</productname> 8.1. + The option <option>--htmldir</option> was added in <productname>PostgreSQL</productname> 8.4. + The option <option>--ldflags_ex</option> was added in <productname>PostgreSQL</productname> 9.0. </para> </refsect1> diff --git a/doc/src/sgml/ref/pg_controldata.sgml b/doc/src/sgml/ref/pg_controldata.sgml index 4a360d61fd3..4d4feacb931 100644 --- a/doc/src/sgml/ref/pg_controldata.sgml +++ b/doc/src/sgml/ref/pg_controldata.sgml @@ -31,7 +31,7 @@ PostgreSQL documentation <title>Description</title> <para> <command>pg_controldata</command> prints information initialized during - <command>initdb</>, such as the catalog version. + <command>initdb</command>, such as the catalog version. It also shows information about write-ahead logging and checkpoint processing. This information is cluster-wide, and not specific to any one database. @@ -41,10 +41,10 @@ PostgreSQL documentation This utility can only be run by the user who initialized the cluster because it requires read access to the data directory. You can specify the data directory on the command line, or use - the environment variable <envar>PGDATA</>. This utility supports the options - <option>-V</> and <option>--version</>, which print the + the environment variable <envar>PGDATA</envar>. This utility supports the options + <option>-V</option> and <option>--version</option>, which print the <application>pg_controldata</application> version and exit. It also - supports options <option>-?</> and <option>--help</>, which output the + supports options <option>-?</option> and <option>--help</option>, which output the supported arguments. </para> </refsect1> diff --git a/doc/src/sgml/ref/pg_ctl-ref.sgml b/doc/src/sgml/ref/pg_ctl-ref.sgml index 12fa011c4e5..3bcf0a2e9f0 100644 --- a/doc/src/sgml/ref/pg_ctl-ref.sgml +++ b/doc/src/sgml/ref/pg_ctl-ref.sgml @@ -159,13 +159,13 @@ PostgreSQL documentation <para> <option>start</option> mode launches a new server. The server is started in the background, and its standard input is attached - to <filename>/dev/null</filename> (or <literal>nul</> on Windows). + to <filename>/dev/null</filename> (or <literal>nul</literal> on Windows). On Unix-like systems, by default, the server's standard output and standard error are sent to <application>pg_ctl</application>'s standard output (not standard error). The standard output of <application>pg_ctl</application> should then be redirected to a file or piped to another process such as a log rotating program - like <application>rotatelogs</>; otherwise <command>postgres</command> + like <application>rotatelogs</application>; otherwise <command>postgres</command> will write its output to the controlling terminal (from the background) and will not leave the shell's process group. On Windows, by default the server's standard output and standard error @@ -203,7 +203,7 @@ PostgreSQL documentation <para> <option>reload</option> mode simply sends the - <command>postgres</command> server process a <systemitem>SIGHUP</> + <command>postgres</command> server process a <systemitem>SIGHUP</systemitem> signal, causing it to reread its configuration files (<filename>postgresql.conf</filename>, <filename>pg_hba.conf</filename>, etc.). This allows changing @@ -228,14 +228,14 @@ PostgreSQL documentation <para> <option>kill</option> mode sends a signal to a specified process. - This is primarily valuable on <productname>Microsoft Windows</> - which does not have a built-in <application>kill</> command. Use - <literal>--help</> to see a list of supported signal names. + This is primarily valuable on <productname>Microsoft Windows</productname> + which does not have a built-in <application>kill</application> command. Use + <literal>--help</literal> to see a list of supported signal names. </para> <para> - <option>register</option> mode registers the <productname>PostgreSQL</> - server as a system service on <productname>Microsoft Windows</>. + <option>register</option> mode registers the <productname>PostgreSQL</productname> + server as a system service on <productname>Microsoft Windows</productname>. The <option>-S</option> option allows selection of service start type, either <quote>auto</quote> (start service automatically on system startup) or <quote>demand</quote> (start service on demand). @@ -243,7 +243,7 @@ PostgreSQL documentation <para> <option>unregister</option> mode unregisters a system service - on <productname>Microsoft Windows</>. This undoes the effects of the + on <productname>Microsoft Windows</productname>. This undoes the effects of the <option>register</option> command. </para> </refsect1> @@ -286,7 +286,7 @@ PostgreSQL documentation <para> Append the server log output to <replaceable>filename</replaceable>. If the file does not - exist, it is created. The <systemitem>umask</> is set to 077, + exist, it is created. The <systemitem>umask</systemitem> is set to 077, so access to the log file is disallowed to other users by default. </para> </listitem> @@ -313,11 +313,11 @@ PostgreSQL documentation <para> Specifies options to be passed directly to the <command>postgres</command> command. - <option>-o</> can be specified multiple times, with all the given + <option>-o</option> can be specified multiple times, with all the given options being passed through. </para> <para> - The <replaceable>options</> should usually be surrounded by single or + The <replaceable>options</replaceable> should usually be surrounded by single or double quotes to ensure that they are passed through as a group. </para> </listitem> @@ -330,11 +330,11 @@ PostgreSQL documentation <para> Specifies options to be passed directly to the <command>initdb</command> command. - <option>-o</> can be specified multiple times, with all the given + <option>-o</option> can be specified multiple times, with all the given options being passed through. </para> <para> - The <replaceable>options</> should usually be surrounded by single or + The <replaceable>options</replaceable> should usually be surrounded by single or double quotes to ensure that they are passed through as a group. </para> </listitem> @@ -377,15 +377,15 @@ PostgreSQL documentation <para> Specifies the maximum number of seconds to wait when waiting for an operation to complete (see option <option>-w</option>). Defaults to - the value of the <envar>PGCTLTIMEOUT</> environment variable or, if + the value of the <envar>PGCTLTIMEOUT</envar> environment variable or, if not set, to 60 seconds. </para> </listitem> </varlistentry> <varlistentry> - <term><option>-V</></term> - <term><option>--version</></term> + <term><option>-V</option></term> + <term><option>--version</option></term> <listitem> <para> Print the <application>pg_ctl</application> version and exit. @@ -446,8 +446,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-?</></term> - <term><option>--help</></term> + <term><option>-?</option></term> + <term><option>--help</option></term> <listitem> <para> Show help about <application>pg_ctl</application> command line @@ -507,7 +507,7 @@ PostgreSQL documentation <term><option>-S <replaceable class="parameter">start-type</replaceable></option></term> <listitem> <para> - Start type of the system service. <replaceable>start-type</> can + Start type of the system service. <replaceable>start-type</replaceable> can be <literal>auto</literal>, or <literal>demand</literal>, or the first letter of one of these two. If this option is omitted, <literal>auto</literal> is the default. @@ -559,14 +559,14 @@ PostgreSQL documentation <para> Most <command>pg_ctl</command> modes require knowing the data directory - location; therefore, the <option>-D</> option is required + location; therefore, the <option>-D</option> option is required unless <envar>PGDATA</envar> is set. </para> <para> - <command>pg_ctl</command>, like most other <productname>PostgreSQL</> + <command>pg_ctl</command>, like most other <productname>PostgreSQL</productname> utilities, - also uses the environment variables supported by <application>libpq</> + also uses the environment variables supported by <application>libpq</application> (see <xref linkend="libpq-envars">). </para> @@ -661,8 +661,8 @@ PostgreSQL documentation </para> <para> - But if <option>-o</> is specified, that replaces any previous options. - To restart using port 5433, disabling <function>fsync</> upon restart: + But if <option>-o</option> is specified, that replaces any previous options. + To restart using port 5433, disabling <function>fsync</function> upon restart: <screen> <prompt>$</prompt> <userinput>pg_ctl -o "-F -p 5433" restart</userinput> </screen></para> diff --git a/doc/src/sgml/ref/pg_dump.sgml b/doc/src/sgml/ref/pg_dump.sgml index 7ccbee4855c..79a9ee09830 100644 --- a/doc/src/sgml/ref/pg_dump.sgml +++ b/doc/src/sgml/ref/pg_dump.sgml @@ -116,8 +116,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-a</></term> - <term><option>--data-only</></term> + <term><option>-a</option></term> + <term><option>--data-only</option></term> <listitem> <para> Dump only the data, not the schema (data definitions). @@ -126,19 +126,19 @@ PostgreSQL documentation <para> This option is similar to, but for historical reasons not identical - to, specifying <option>--section=data</>. + to, specifying <option>--section=data</option>. </para> </listitem> </varlistentry> <varlistentry> - <term><option>-b</></term> - <term><option>--blobs</></term> + <term><option>-b</option></term> + <term><option>--blobs</option></term> <listitem> <para> Include large objects in the dump. This is the default behavior - except when <option>--schema</>, <option>--table</>, or - <option>--schema-only</> is specified. The <option>-b</> + except when <option>--schema</option>, <option>--table</option>, or + <option>--schema-only</option> is specified. The <option>-b</option> switch is therefore only useful to add large objects to dumps where a specific schema or table has been requested. Note that blobs are considered data and therefore will be included when @@ -148,17 +148,17 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-B</></term> - <term><option>--no-blobs</></term> + <term><option>-B</option></term> + <term><option>--no-blobs</option></term> <listitem> <para> Exclude large objects in the dump. </para> <para> - When both <option>-b</> and <option>-B</> are given, the behavior + When both <option>-b</option> and <option>-B</option> are given, the behavior is to output large objects, when data is being dumped, see the - <option>-b</> documentation. + <option>-b</option> documentation. </para> </listitem> </varlistentry> @@ -170,7 +170,7 @@ PostgreSQL documentation <para> Output commands to clean (drop) database objects prior to outputting the commands for creating them. - (Unless <option>--if-exists</> is also specified, + (Unless <option>--if-exists</option> is also specified, restore might generate some harmless error messages, if any objects were not present in the destination database.) </para> @@ -184,8 +184,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-C</></term> - <term><option>--create</></term> + <term><option>-C</option></term> + <term><option>--create</option></term> <listitem> <para> Begin the output with a command to create the @@ -242,8 +242,8 @@ PostgreSQL documentation <variablelist> <varlistentry> - <term><literal>p</></term> - <term><literal>plain</></term> + <term><literal>p</literal></term> + <term><literal>plain</literal></term> <listitem> <para> Output a plain-text <acronym>SQL</acronym> script file (the default). @@ -252,8 +252,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><literal>c</></term> - <term><literal>custom</></term> + <term><literal>c</literal></term> + <term><literal>custom</literal></term> <listitem> <para> Output a custom-format archive suitable for input into @@ -267,8 +267,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><literal>d</></term> - <term><literal>directory</></term> + <term><literal>d</literal></term> + <term><literal>directory</literal></term> <listitem> <para> Output a directory-format archive suitable for input into @@ -286,8 +286,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><literal>t</></term> - <term><literal>tar</></term> + <term><literal>t</literal></term> + <term><literal>tar</literal></term> <listitem> <para> Output a <command>tar</command>-format archive suitable for input @@ -305,8 +305,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-j <replaceable class="parameter">njobs</replaceable></></term> - <term><option>--jobs=<replaceable class="parameter">njobs</replaceable></></term> + <term><option>-j <replaceable class="parameter">njobs</replaceable></option></term> + <term><option>--jobs=<replaceable class="parameter">njobs</replaceable></option></term> <listitem> <para> Run the dump in parallel by dumping <replaceable class="parameter">njobs</replaceable> @@ -315,13 +315,13 @@ PostgreSQL documentation directory output format because this is the only output format where multiple processes can write their data at the same time. </para> - <para><application>pg_dump</> will open <replaceable class="parameter">njobs</replaceable> + <para><application>pg_dump</application> will open <replaceable class="parameter">njobs</replaceable> + 1 connections to the database, so make sure your <xref linkend="guc-max-connections"> setting is high enough to accommodate all connections. </para> <para> Requesting exclusive locks on database objects while running a parallel dump could - cause the dump to fail. The reason is that the <application>pg_dump</> master process + cause the dump to fail. The reason is that the <application>pg_dump</application> master process requests shared locks on the objects that the worker processes are going to dump later in order to make sure that nobody deletes them and makes them go away while the dump is running. @@ -330,10 +330,10 @@ PostgreSQL documentation released. Consequently any other access to the table will not be granted either and will queue after the exclusive lock request. This includes the worker process trying to dump the table. Without any precautions this would be a classic deadlock situation. - To detect this conflict, the <application>pg_dump</> worker process requests another - shared lock using the <literal>NOWAIT</> option. If the worker process is not granted + To detect this conflict, the <application>pg_dump</application> worker process requests another + shared lock using the <literal>NOWAIT</literal> option. If the worker process is not granted this shared lock, somebody else must have requested an exclusive lock in the meantime - and there is no way to continue with the dump, so <application>pg_dump</> has no choice + and there is no way to continue with the dump, so <application>pg_dump</application> has no choice but to abort the dump. </para> <para> @@ -371,10 +371,10 @@ PostgreSQL documentation schema itself, and all its contained objects. When this option is not specified, all non-system schemas in the target database will be dumped. Multiple schemas can be - selected by writing multiple <option>-n</> switches. Also, the + selected by writing multiple <option>-n</option> switches. Also, the <replaceable class="parameter">schema</replaceable> parameter is interpreted as a pattern according to the same rules used by - <application>psql</>'s <literal>\d</> commands (see <xref + <application>psql</application>'s <literal>\d</literal> commands (see <xref linkend="APP-PSQL-patterns" endterm="APP-PSQL-patterns-title">), so multiple schemas can also be selected by writing wildcard characters in the pattern. When using wildcards, be careful to quote the pattern @@ -384,7 +384,7 @@ PostgreSQL documentation <note> <para> - When <option>-n</> is specified, <application>pg_dump</application> + When <option>-n</option> is specified, <application>pg_dump</application> makes no attempt to dump any other database objects that the selected schema(s) might depend upon. Therefore, there is no guarantee that the results of a specific-schema dump can be successfully @@ -394,9 +394,9 @@ PostgreSQL documentation <note> <para> - Non-schema objects such as blobs are not dumped when <option>-n</> is + Non-schema objects such as blobs are not dumped when <option>-n</option> is specified. You can add blobs back to the dump with the - <option>--blobs</> switch. + <option>--blobs</option> switch. </para> </note> @@ -410,29 +410,29 @@ PostgreSQL documentation <para> Do not dump any schemas matching the <replaceable class="parameter">schema</replaceable> pattern. The pattern is - interpreted according to the same rules as for <option>-n</>. - <option>-N</> can be given more than once to exclude schemas + interpreted according to the same rules as for <option>-n</option>. + <option>-N</option> can be given more than once to exclude schemas matching any of several patterns. </para> <para> - When both <option>-n</> and <option>-N</> are given, the behavior - is to dump just the schemas that match at least one <option>-n</> - switch but no <option>-N</> switches. If <option>-N</> appears - without <option>-n</>, then schemas matching <option>-N</> are + When both <option>-n</option> and <option>-N</option> are given, the behavior + is to dump just the schemas that match at least one <option>-n</option> + switch but no <option>-N</option> switches. If <option>-N</option> appears + without <option>-n</option>, then schemas matching <option>-N</option> are excluded from what is otherwise a normal dump. </para> </listitem> </varlistentry> <varlistentry> - <term><option>-o</></term> - <term><option>--oids</></term> + <term><option>-o</option></term> + <term><option>--oids</option></term> <listitem> <para> Dump object identifiers (<acronym>OID</acronym>s) as part of the data for every table. Use this option if your application references - the <acronym>OID</> + the <acronym>OID</acronym> columns in some way (e.g., in a foreign key constraint). Otherwise, this option should not be used. </para> @@ -440,21 +440,21 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-O</></term> + <term><option>-O</option></term> <term><option>--no-owner</option></term> <listitem> <para> Do not output commands to set ownership of objects to match the original database. By default, <application>pg_dump</application> issues - <command>ALTER OWNER</> or + <command>ALTER OWNER</command> or <command>SET SESSION AUTHORIZATION</command> statements to set ownership of created database objects. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give - that user ownership of all the objects, specify <option>-O</>. + that user ownership of all the objects, specify <option>-O</option>. </para> <para> @@ -484,18 +484,18 @@ PostgreSQL documentation Dump only the object definitions (schema), not data. </para> <para> - This option is the inverse of <option>--data-only</>. + This option is the inverse of <option>--data-only</option>. It is similar to, but for historical reasons not identical to, specifying - <option>--section=pre-data --section=post-data</>. + <option>--section=pre-data --section=post-data</option>. </para> <para> - (Do not confuse this with the <option>--schema</> option, which - uses the word <quote>schema</> in a different meaning.) + (Do not confuse this with the <option>--schema</option> option, which + uses the word <quote>schema</quote> in a different meaning.) </para> <para> To exclude table data for only a subset of tables in the database, - see <option>--exclude-table-data</>. + see <option>--exclude-table-data</option>. </para> </listitem> </varlistentry> @@ -506,7 +506,7 @@ PostgreSQL documentation <listitem> <para> Specify the superuser user name to use when disabling triggers. - This is relevant only if <option>--disable-triggers</> is used. + This is relevant only if <option>--disable-triggers</option> is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.) </para> @@ -520,12 +520,12 @@ PostgreSQL documentation <para> Dump only tables with names matching <replaceable class="parameter">table</replaceable>. - For this purpose, <quote>table</> includes views, materialized views, + For this purpose, <quote>table</quote> includes views, materialized views, sequences, and foreign tables. Multiple tables - can be selected by writing multiple <option>-t</> switches. Also, the + can be selected by writing multiple <option>-t</option> switches. Also, the <replaceable class="parameter">table</replaceable> parameter is interpreted as a pattern according to the same rules used by - <application>psql</>'s <literal>\d</> commands (see <xref + <application>psql</application>'s <literal>\d</literal> commands (see <xref linkend="APP-PSQL-patterns" endterm="APP-PSQL-patterns-title">), so multiple tables can also be selected by writing wildcard characters in the pattern. When using wildcards, be careful to quote the pattern @@ -534,15 +534,15 @@ PostgreSQL documentation </para> <para> - The <option>-n</> and <option>-N</> switches have no effect when - <option>-t</> is used, because tables selected by <option>-t</> will + The <option>-n</option> and <option>-N</option> switches have no effect when + <option>-t</option> is used, because tables selected by <option>-t</option> will be dumped regardless of those switches, and non-table objects will not be dumped. </para> <note> <para> - When <option>-t</> is specified, <application>pg_dump</application> + When <option>-t</option> is specified, <application>pg_dump</application> makes no attempt to dump any other database objects that the selected table(s) might depend upon. Therefore, there is no guarantee that the results of a specific-table dump can be successfully @@ -552,14 +552,14 @@ PostgreSQL documentation <note> <para> - The behavior of the <option>-t</> switch is not entirely upward + The behavior of the <option>-t</option> switch is not entirely upward compatible with pre-8.2 <productname>PostgreSQL</productname> - versions. Formerly, writing <literal>-t tab</> would dump all - tables named <literal>tab</>, but now it just dumps whichever one + versions. Formerly, writing <literal>-t tab</literal> would dump all + tables named <literal>tab</literal>, but now it just dumps whichever one is visible in your default search path. To get the old behavior - you can write <literal>-t '*.tab'</>. Also, you must write something - like <literal>-t sch.tab</> to select a table in a particular schema, - rather than the old locution of <literal>-n sch -t tab</>. + you can write <literal>-t '*.tab'</literal>. Also, you must write something + like <literal>-t sch.tab</literal> to select a table in a particular schema, + rather than the old locution of <literal>-n sch -t tab</literal>. </para> </note> </listitem> @@ -572,24 +572,24 @@ PostgreSQL documentation <para> Do not dump any tables matching the <replaceable class="parameter">table</replaceable> pattern. The pattern is - interpreted according to the same rules as for <option>-t</>. - <option>-T</> can be given more than once to exclude tables + interpreted according to the same rules as for <option>-t</option>. + <option>-T</option> can be given more than once to exclude tables matching any of several patterns. </para> <para> - When both <option>-t</> and <option>-T</> are given, the behavior - is to dump just the tables that match at least one <option>-t</> - switch but no <option>-T</> switches. If <option>-T</> appears - without <option>-t</>, then tables matching <option>-T</> are + When both <option>-t</option> and <option>-T</option> are given, the behavior + is to dump just the tables that match at least one <option>-t</option> + switch but no <option>-T</option> switches. If <option>-T</option> appears + without <option>-t</option>, then tables matching <option>-T</option> are excluded from what is otherwise a normal dump. </para> </listitem> </varlistentry> <varlistentry> - <term><option>-v</></term> - <term><option>--verbose</></term> + <term><option>-v</option></term> + <term><option>--verbose</option></term> <listitem> <para> Specifies verbose mode. This will cause @@ -601,8 +601,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-V</></term> - <term><option>--version</></term> + <term><option>-V</option></term> + <term><option>--version</option></term> <listitem> <para> Print the <application>pg_dump</application> version and exit. @@ -611,9 +611,9 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-x</></term> - <term><option>--no-privileges</></term> - <term><option>--no-acl</></term> + <term><option>-x</option></term> + <term><option>--no-privileges</option></term> + <term><option>--no-acl</option></term> <listitem> <para> Prevent dumping of access privileges (grant/revoke commands). @@ -632,7 +632,7 @@ PostgreSQL documentation at a moderate level. For plain text output, setting a nonzero compression level causes the entire output file to be compressed, as though it had been - fed through <application>gzip</>; but the default is not to compress. + fed through <application>gzip</application>; but the default is not to compress. The tar archive format currently does not support compression at all. </para> </listitem> @@ -670,7 +670,7 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>--disable-dollar-quoting</></term> + <term><option>--disable-dollar-quoting</option></term> <listitem> <para> This option disables the use of dollar quoting for function bodies, @@ -680,7 +680,7 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>--disable-triggers</></term> + <term><option>--disable-triggers</option></term> <listitem> <para> This option is relevant only when creating a data-only dump. @@ -692,9 +692,9 @@ PostgreSQL documentation </para> <para> - Presently, the commands emitted for <option>--disable-triggers</> + Presently, the commands emitted for <option>--disable-triggers</option> must be done as superuser. So, you should also specify - a superuser name with <option>-S</>, or preferably be careful to + a superuser name with <option>-S</option>, or preferably be careful to start the resulting script as a superuser. </para> @@ -707,7 +707,7 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>--enable-row-security</></term> + <term><option>--enable-row-security</option></term> <listitem> <para> This option is relevant only when dumping the contents of a table @@ -734,14 +734,14 @@ PostgreSQL documentation <para> Do not dump data for any tables matching the <replaceable class="parameter">table</replaceable> pattern. The pattern is - interpreted according to the same rules as for <option>-t</>. - <option>--exclude-table-data</> can be given more than once to + interpreted according to the same rules as for <option>-t</option>. + <option>--exclude-table-data</option> can be given more than once to exclude tables matching any of several patterns. This option is useful when you need the definition of a particular table even though you do not need the data in it. </para> <para> - To exclude data for all tables in the database, see <option>--schema-only</>. + To exclude data for all tables in the database, see <option>--schema-only</option>. </para> </listitem> </varlistentry> @@ -752,7 +752,7 @@ PostgreSQL documentation <para> Use conditional commands (i.e. add an <literal>IF EXISTS</literal> clause) when cleaning database objects. This option is not valid - unless <option>--clean</> is also specified. + unless <option>--clean</option> is also specified. </para> </listitem> </varlistentry> @@ -782,9 +782,9 @@ PostgreSQL documentation <para> Do not wait forever to acquire shared table locks at the beginning of the dump. Instead fail if unable to lock a table within the specified - <replaceable class="parameter">timeout</>. The timeout may be + <replaceable class="parameter">timeout</replaceable>. The timeout may be specified in any of the formats accepted by <command>SET - statement_timeout</>. (Allowed formats vary depending on the server + statement_timeout</command>. (Allowed formats vary depending on the server version you are dumping from, but an integer number of milliseconds is accepted by all versions.) </para> @@ -833,10 +833,10 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>--no-synchronized-snapshots</></term> + <term><option>--no-synchronized-snapshots</option></term> <listitem> <para> - This option allows running <command>pg_dump -j</> against a pre-9.2 + This option allows running <command>pg_dump -j</command> against a pre-9.2 server, see the documentation of the <option>-j</option> parameter for more details. </para> @@ -873,25 +873,25 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>--quote-all-identifiers</></term> + <term><option>--quote-all-identifiers</option></term> <listitem> <para> Force quoting of all identifiers. This option is recommended when - dumping a database from a server whose <productname>PostgreSQL</> - major version is different from <application>pg_dump</>'s, or when + dumping a database from a server whose <productname>PostgreSQL</productname> + major version is different from <application>pg_dump</application>'s, or when the output is intended to be loaded into a server of a different - major version. By default, <application>pg_dump</> quotes only + major version. By default, <application>pg_dump</application> quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets - of reserved words. Using <option>--quote-all-identifiers</> prevents + of reserved words. Using <option>--quote-all-identifiers</option> prevents such issues, at the price of a harder-to-read dump script. </para> </listitem> </varlistentry> <varlistentry> - <term><option>--load-via-partition-root</></term> + <term><option>--load-via-partition-root</option></term> <listitem> <para> When dumping a COPY or INSERT statement for a partitioned table, @@ -910,7 +910,7 @@ PostgreSQL documentation <listitem> <para> Only dump the named section. The section name can be - <option>pre-data</>, <option>data</>, or <option>post-data</>. + <option>pre-data</option>, <option>data</option>, or <option>post-data</option>. This option can be specified more than once to select multiple sections. The default is to dump all sections. </para> @@ -981,7 +981,7 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>--strict-names</></term> + <term><option>--strict-names</option></term> <listitem> <para> Require that each schema @@ -1003,23 +1003,23 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>--use-set-session-authorization</></term> + <term><option>--use-set-session-authorization</option></term> <listitem> <para> - Output SQL-standard <command>SET SESSION AUTHORIZATION</> commands - instead of <command>ALTER OWNER</> commands to determine object + Output SQL-standard <command>SET SESSION AUTHORIZATION</command> commands + instead of <command>ALTER OWNER</command> commands to determine object ownership. This makes the dump more standards-compatible, but depending on the history of the objects in the dump, might not restore - properly. Also, a dump using <command>SET SESSION AUTHORIZATION</> + properly. Also, a dump using <command>SET SESSION AUTHORIZATION</command> will certainly require superuser privileges to restore correctly, - whereas <command>ALTER OWNER</> requires lesser privileges. + whereas <command>ALTER OWNER</command> requires lesser privileges. </para> </listitem> </varlistentry> <varlistentry> - <term><option>-?</></term> - <term><option>--help</></term> + <term><option>-?</option></term> + <term><option>--help</option></term> <listitem> <para> Show help about <application>pg_dump</application> command line @@ -1036,8 +1036,8 @@ PostgreSQL documentation <variablelist> <varlistentry> - <term><option>-d <replaceable class="parameter">dbname</replaceable></></term> - <term><option>--dbname=<replaceable class="parameter">dbname</replaceable></></term> + <term><option>-d <replaceable class="parameter">dbname</replaceable></option></term> + <term><option>--dbname=<replaceable class="parameter">dbname</replaceable></option></term> <listitem> <para> Specifies the name of the database to connect to. This is @@ -1093,8 +1093,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-w</></term> - <term><option>--no-password</></term> + <term><option>-w</option></term> + <term><option>--no-password</option></term> <listitem> <para> Never issue a password prompt. If the server requires @@ -1122,7 +1122,7 @@ PostgreSQL documentation for a password if the server demands password authentication. However, <application>pg_dump</application> will waste a connection attempt finding out that the server wants a password. - In some cases it is worth typing <option>-W</> to avoid the extra + In some cases it is worth typing <option>-W</option> to avoid the extra connection attempt. </para> </listitem> @@ -1133,11 +1133,11 @@ PostgreSQL documentation <listitem> <para> Specifies a role name to be used to create the dump. - This option causes <application>pg_dump</> to issue a - <command>SET ROLE</> <replaceable class="parameter">rolename</> + This option causes <application>pg_dump</application> to issue a + <command>SET ROLE</command> <replaceable class="parameter">rolename</replaceable> command after connecting to the database. It is useful when the - authenticated user (specified by <option>-U</>) lacks privileges - needed by <application>pg_dump</>, but can switch to a role with + authenticated user (specified by <option>-U</option>) lacks privileges + needed by <application>pg_dump</application>, but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy. @@ -1169,8 +1169,8 @@ PostgreSQL documentation </variablelist> <para> - This utility, like most other <productname>PostgreSQL</> utilities, - also uses the environment variables supported by <application>libpq</> + This utility, like most other <productname>PostgreSQL</productname> utilities, + also uses the environment variables supported by <application>libpq</application> (see <xref linkend="libpq-envars">). </para> @@ -1192,7 +1192,7 @@ PostgreSQL documentation <para> The database activity of <application>pg_dump</application> is normally collected by the statistics collector. If this is - undesirable, you can set parameter <varname>track_counts</> + undesirable, you can set parameter <varname>track_counts</varname> to false via <envar>PGOPTIONS</envar> or the <literal>ALTER USER</literal> command. </para> @@ -1204,11 +1204,11 @@ PostgreSQL documentation <title>Notes</title> <para> - If your database cluster has any local additions to the <literal>template1</> database, + If your database cluster has any local additions to the <literal>template1</literal> database, be careful to restore the output of <application>pg_dump</application> into a truly empty database; otherwise you are likely to get errors due to duplicate definitions of the added objects. To make an empty database - without any local additions, copy from <literal>template0</> not <literal>template1</>, + without any local additions, copy from <literal>template0</literal> not <literal>template1</literal>, for example: <programlisting> CREATE DATABASE foo WITH TEMPLATE template0; @@ -1216,7 +1216,7 @@ CREATE DATABASE foo WITH TEMPLATE template0; </para> <para> - When a data-only dump is chosen and the option <option>--disable-triggers</> + When a data-only dump is chosen and the option <option>--disable-triggers</option> is used, <application>pg_dump</application> emits commands to disable triggers on user tables before inserting the data, and then commands to re-enable them after the data has been @@ -1232,30 +1232,30 @@ CREATE DATABASE foo WITH TEMPLATE template0; to ensure optimal performance; see <xref linkend="vacuum-for-statistics"> and <xref linkend="autovacuum"> for more information. The dump file also does not - contain any <command>ALTER DATABASE ... SET</> commands; + contain any <command>ALTER DATABASE ... SET</command> commands; these settings are dumped by <xref linkend="app-pg-dumpall">, along with database users and other installation-wide settings. </para> <para> Because <application>pg_dump</application> is used to transfer data - to newer versions of <productname>PostgreSQL</>, the output of + to newer versions of <productname>PostgreSQL</productname>, the output of <application>pg_dump</application> can be expected to load into - <productname>PostgreSQL</> server versions newer than - <application>pg_dump</>'s version. <application>pg_dump</> can also - dump from <productname>PostgreSQL</> servers older than its own version. + <productname>PostgreSQL</productname> server versions newer than + <application>pg_dump</application>'s version. <application>pg_dump</application> can also + dump from <productname>PostgreSQL</productname> servers older than its own version. (Currently, servers back to version 8.0 are supported.) - However, <application>pg_dump</> cannot dump from - <productname>PostgreSQL</> servers newer than its own major version; + However, <application>pg_dump</application> cannot dump from + <productname>PostgreSQL</productname> servers newer than its own major version; it will refuse to even try, rather than risk making an invalid dump. - Also, it is not guaranteed that <application>pg_dump</>'s output can + Also, it is not guaranteed that <application>pg_dump</application>'s output can be loaded into a server of an older major version — not even if the dump was taken from a server of that version. Loading a dump file into an older server may require manual editing of the dump file to remove syntax not understood by the older server. Use of the <option>--quote-all-identifiers</option> option is recommended in cross-version cases, as it can prevent problems arising from varying - reserved-word lists in different <productname>PostgreSQL</> versions. + reserved-word lists in different <productname>PostgreSQL</productname> versions. </para> <para> @@ -1276,7 +1276,7 @@ CREATE DATABASE foo WITH TEMPLATE template0; <title id="pg-dump-examples-title">Examples</title> <para> - To dump a database called <literal>mydb</> into a SQL-script file: + To dump a database called <literal>mydb</literal> into a SQL-script file: <screen> <prompt>$</prompt> <userinput>pg_dump mydb > db.sql</userinput> </screen> @@ -1284,7 +1284,7 @@ CREATE DATABASE foo WITH TEMPLATE template0; <para> To reload such a script into a (freshly created) database named - <literal>newdb</>: + <literal>newdb</literal>: <screen> <prompt>$</prompt> <userinput>psql -d newdb -f db.sql</userinput> @@ -1318,7 +1318,7 @@ CREATE DATABASE foo WITH TEMPLATE template0; <para> To reload an archive file into a (freshly created) database named - <literal>newdb</>: + <literal>newdb</literal>: <screen> <prompt>$</prompt> <userinput>pg_restore -d newdb db.dump</userinput> @@ -1326,7 +1326,7 @@ CREATE DATABASE foo WITH TEMPLATE template0; </para> <para> - To dump a single table named <literal>mytab</>: + To dump a single table named <literal>mytab</literal>: <screen> <prompt>$</prompt> <userinput>pg_dump -t mytab mydb > db.sql</userinput> @@ -1334,8 +1334,8 @@ CREATE DATABASE foo WITH TEMPLATE template0; </para> <para> - To dump all tables whose names start with <literal>emp</> in the - <literal>detroit</> schema, except for the table named + To dump all tables whose names start with <literal>emp</literal> in the + <literal>detroit</literal> schema, except for the table named <literal>employee_log</literal>: <screen> @@ -1344,9 +1344,9 @@ CREATE DATABASE foo WITH TEMPLATE template0; </para> <para> - To dump all schemas whose names start with <literal>east</> or - <literal>west</> and end in <literal>gsm</>, excluding any schemas whose - names contain the word <literal>test</>: + To dump all schemas whose names start with <literal>east</literal> or + <literal>west</literal> and end in <literal>gsm</literal>, excluding any schemas whose + names contain the word <literal>test</literal>: <screen> <prompt>$</prompt> <userinput>pg_dump -n 'east*gsm' -n 'west*gsm' -N '*test*' mydb > db.sql</userinput> @@ -1371,7 +1371,7 @@ CREATE DATABASE foo WITH TEMPLATE template0; </para> <para> - To specify an upper-case or mixed-case name in <option>-t</> and related + To specify an upper-case or mixed-case name in <option>-t</option> and related switches, you need to double-quote the name; else it will be folded to lower case (see <xref linkend="APP-PSQL-patterns" endterm="APP-PSQL-patterns-title">). But diff --git a/doc/src/sgml/ref/pg_dumpall.sgml b/doc/src/sgml/ref/pg_dumpall.sgml index 1dba702ad95..0a64c3548ef 100644 --- a/doc/src/sgml/ref/pg_dumpall.sgml +++ b/doc/src/sgml/ref/pg_dumpall.sgml @@ -32,7 +32,7 @@ PostgreSQL documentation <para> <application>pg_dumpall</application> is a utility for writing out - (<quote>dumping</quote>) all <productname>PostgreSQL</> databases + (<quote>dumping</quote>) all <productname>PostgreSQL</productname> databases of a cluster into one script file. The script file contains <acronym>SQL</acronym> commands that can be used as input to <xref linkend="app-psql"> to restore the databases. It does this by @@ -63,7 +63,7 @@ PostgreSQL documentation times to the <productname>PostgreSQL</productname> server (once per database). If you use password authentication it will ask for a password each time. It is convenient to have a - <filename>~/.pgpass</> file in such cases. See <xref + <filename>~/.pgpass</filename> file in such cases. See <xref linkend="libpq-pgpass"> for more information. </para> @@ -78,8 +78,8 @@ PostgreSQL documentation <variablelist> <varlistentry> - <term><option>-a</></term> - <term><option>--data-only</></term> + <term><option>-a</option></term> + <term><option>--data-only</option></term> <listitem> <para> Dump only the data, not the schema (data definitions). @@ -93,7 +93,7 @@ PostgreSQL documentation <listitem> <para> Include SQL commands to clean (drop) databases before - recreating them. <command>DROP</> commands for roles and + recreating them. <command>DROP</command> commands for roles and tablespaces are added as well. </para> </listitem> @@ -134,13 +134,13 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-o</></term> - <term><option>--oids</></term> + <term><option>-o</option></term> + <term><option>--oids</option></term> <listitem> <para> Dump object identifiers (<acronym>OID</acronym>s) as part of the data for every table. Use this option if your application references - the <acronym>OID</> + the <acronym>OID</acronym> columns in some way (e.g., in a foreign key constraint). Otherwise, this option should not be used. </para> @@ -148,21 +148,21 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-O</></term> + <term><option>-O</option></term> <term><option>--no-owner</option></term> <listitem> <para> Do not output commands to set ownership of objects to match the original database. By default, <application>pg_dumpall</application> issues - <command>ALTER OWNER</> or + <command>ALTER OWNER</command> or <command>SET SESSION AUTHORIZATION</command> statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give - that user ownership of all the objects, specify <option>-O</>. + that user ownership of all the objects, specify <option>-O</option>. </para> </listitem> </varlistentry> @@ -193,7 +193,7 @@ PostgreSQL documentation <listitem> <para> Specify the superuser user name to use when disabling triggers. - This is relevant only if <option>--disable-triggers</> is used. + This is relevant only if <option>--disable-triggers</option> is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.) </para> @@ -211,21 +211,21 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-v</></term> - <term><option>--verbose</></term> + <term><option>-v</option></term> + <term><option>--verbose</option></term> <listitem> <para> Specifies verbose mode. This will cause <application>pg_dumpall</application> to output start/stop times to the dump file, and progress messages to standard error. - It will also enable verbose output in <application>pg_dump</>. + It will also enable verbose output in <application>pg_dump</application>. </para> </listitem> </varlistentry> <varlistentry> - <term><option>-V</></term> - <term><option>--version</></term> + <term><option>-V</option></term> + <term><option>--version</option></term> <listitem> <para> Print the <application>pg_dumpall</application> version and exit. @@ -234,9 +234,9 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-x</></term> - <term><option>--no-privileges</></term> - <term><option>--no-acl</></term> + <term><option>-x</option></term> + <term><option>--no-privileges</option></term> + <term><option>--no-acl</option></term> <listitem> <para> Prevent dumping of access privileges (grant/revoke commands). @@ -273,7 +273,7 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>--disable-dollar-quoting</></term> + <term><option>--disable-dollar-quoting</option></term> <listitem> <para> This option disables the use of dollar quoting for function bodies, @@ -283,7 +283,7 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>--disable-triggers</></term> + <term><option>--disable-triggers</option></term> <listitem> <para> This option is relevant only when creating a data-only dump. @@ -295,9 +295,9 @@ PostgreSQL documentation </para> <para> - Presently, the commands emitted for <option>--disable-triggers</> + Presently, the commands emitted for <option>--disable-triggers</option> must be done as superuser. So, you should also specify - a superuser name with <option>-S</>, or preferably be careful to + a superuser name with <option>-S</option>, or preferably be careful to start the resulting script as a superuser. </para> </listitem> @@ -309,7 +309,7 @@ PostgreSQL documentation <para> Use conditional commands (i.e. add an <literal>IF EXISTS</literal> clause) to clean databases and other objects. This option is not valid - unless <option>--clean</> is also specified. + unless <option>--clean</option> is also specified. </para> </listitem> </varlistentry> @@ -335,9 +335,9 @@ PostgreSQL documentation <para> Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified - <replaceable class="parameter">timeout</>. The timeout may be + <replaceable class="parameter">timeout</replaceable>. The timeout may be specified in any of the formats accepted by <command>SET - statement_timeout</>. Allowed values vary depending on the server + statement_timeout</command>. Allowed values vary depending on the server version you are dumping from, but an integer number of milliseconds is accepted by all versions since 7.3. This option is ignored when dumping from a pre-7.3 server. @@ -426,25 +426,25 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>--quote-all-identifiers</></term> + <term><option>--quote-all-identifiers</option></term> <listitem> <para> Force quoting of all identifiers. This option is recommended when - dumping a database from a server whose <productname>PostgreSQL</> - major version is different from <application>pg_dumpall</>'s, or when + dumping a database from a server whose <productname>PostgreSQL</productname> + major version is different from <application>pg_dumpall</application>'s, or when the output is intended to be loaded into a server of a different - major version. By default, <application>pg_dumpall</> quotes only + major version. By default, <application>pg_dumpall</application> quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets - of reserved words. Using <option>--quote-all-identifiers</> prevents + of reserved words. Using <option>--quote-all-identifiers</option> prevents such issues, at the price of a harder-to-read dump script. </para> </listitem> </varlistentry> <varlistentry> - <term><option>--load-via-partition-root</></term> + <term><option>--load-via-partition-root</option></term> <listitem> <para> When dumping a COPY or INSERT statement for a partitioned table, @@ -459,11 +459,11 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>--use-set-session-authorization</></term> + <term><option>--use-set-session-authorization</option></term> <listitem> <para> - Output SQL-standard <command>SET SESSION AUTHORIZATION</> commands - instead of <command>ALTER OWNER</> commands to determine object + Output SQL-standard <command>SET SESSION AUTHORIZATION</command> commands + instead of <command>ALTER OWNER</command> commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly. @@ -472,8 +472,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-?</></term> - <term><option>--help</></term> + <term><option>-?</option></term> + <term><option>--help</option></term> <listitem> <para> Show help about <application>pg_dumpall</application> command line @@ -498,7 +498,7 @@ PostgreSQL documentation string. See <xref linkend="libpq-connstring"> for more information. </para> <para> - The option is called <literal>--dbname</> for consistency with other + The option is called <literal>--dbname</literal> for consistency with other client applications, but because <application>pg_dumpall</application> needs to connect to many databases, database name in the connection string will be ignored. Use <literal>-l</literal> option to specify @@ -559,8 +559,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-w</></term> - <term><option>--no-password</></term> + <term><option>-w</option></term> + <term><option>--no-password</option></term> <listitem> <para> Never issue a password prompt. If the server requires @@ -588,14 +588,14 @@ PostgreSQL documentation for a password if the server demands password authentication. However, <application>pg_dumpall</application> will waste a connection attempt finding out that the server wants a password. - In some cases it is worth typing <option>-W</> to avoid the extra + In some cases it is worth typing <option>-W</option> to avoid the extra connection attempt. </para> <para> Note that the password prompt will occur again for each database to be dumped. Usually, it's better to set up a - <filename>~/.pgpass</> file than to rely on manual password entry. + <filename>~/.pgpass</filename> file than to rely on manual password entry. </para> </listitem> </varlistentry> @@ -605,11 +605,11 @@ PostgreSQL documentation <listitem> <para> Specifies a role name to be used to create the dump. - This option causes <application>pg_dumpall</> to issue a - <command>SET ROLE</> <replaceable class="parameter">rolename</> + This option causes <application>pg_dumpall</application> to issue a + <command>SET ROLE</command> <replaceable class="parameter">rolename</replaceable> command after connecting to the database. It is useful when the - authenticated user (specified by <option>-U</>) lacks privileges - needed by <application>pg_dumpall</>, but can switch to a role with + authenticated user (specified by <option>-U</option>) lacks privileges + needed by <application>pg_dumpall</application>, but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy. @@ -640,8 +640,8 @@ PostgreSQL documentation </variablelist> <para> - This utility, like most other <productname>PostgreSQL</> utilities, - also uses the environment variables supported by <application>libpq</> + This utility, like most other <productname>PostgreSQL</productname> utilities, + also uses the environment variables supported by <application>libpq</application> (see <xref linkend="libpq-envars">). </para> @@ -658,9 +658,9 @@ PostgreSQL documentation </para> <para> - Once restored, it is wise to run <command>ANALYZE</> on each + Once restored, it is wise to run <command>ANALYZE</command> on each database so the optimizer has useful statistics. You - can also run <command>vacuumdb -a -z</> to analyze all + can also run <command>vacuumdb -a -z</command> to analyze all databases. </para> diff --git a/doc/src/sgml/ref/pg_isready.sgml b/doc/src/sgml/ref/pg_isready.sgml index 2ee79a0bbeb..f140c820792 100644 --- a/doc/src/sgml/ref/pg_isready.sgml +++ b/doc/src/sgml/ref/pg_isready.sgml @@ -43,8 +43,8 @@ PostgreSQL documentation <variablelist> <varlistentry> - <term><option>-d <replaceable class="parameter">dbname</replaceable></></term> - <term><option>--dbname=<replaceable class="parameter">dbname</replaceable></></term> + <term><option>-d <replaceable class="parameter">dbname</replaceable></option></term> + <term><option>--dbname=<replaceable class="parameter">dbname</replaceable></option></term> <listitem> <para> Specifies the name of the database to connect to. @@ -61,8 +61,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-h <replaceable class="parameter">hostname</replaceable></></term> - <term><option>--host=<replaceable class="parameter">hostname</replaceable></></term> + <term><option>-h <replaceable class="parameter">hostname</replaceable></option></term> + <term><option>--host=<replaceable class="parameter">hostname</replaceable></option></term> <listitem> <para> Specifies the host name of the machine on which the @@ -74,8 +74,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-p <replaceable class="parameter">port</replaceable></></term> - <term><option>--port=<replaceable class="parameter">port</replaceable></></term> + <term><option>-p <replaceable class="parameter">port</replaceable></option></term> + <term><option>--port=<replaceable class="parameter">port</replaceable></option></term> <listitem> <para> Specifies the TCP port or the local Unix-domain @@ -98,8 +98,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-t <replaceable class="parameter">seconds</replaceable></></term> - <term><option>--timeout=<replaceable class="parameter">seconds</replaceable></></term> + <term><option>-t <replaceable class="parameter">seconds</replaceable></option></term> + <term><option>--timeout=<replaceable class="parameter">seconds</replaceable></option></term> <listitem> <para> The maximum number of seconds to wait when attempting connection before @@ -110,8 +110,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-U <replaceable class="parameter">username</replaceable></></term> - <term><option>--username=<replaceable class="parameter">username</replaceable></></term> + <term><option>-U <replaceable class="parameter">username</replaceable></option></term> + <term><option>--username=<replaceable class="parameter">username</replaceable></option></term> <listitem> <para> Connect to the database as the user <replaceable @@ -121,8 +121,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-V</></term> - <term><option>--version</></term> + <term><option>-V</option></term> + <term><option>--version</option></term> <listitem> <para> Print the <application>pg_isready</application> version and exit. @@ -131,8 +131,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-?</></term> - <term><option>--help</></term> + <term><option>-?</option></term> + <term><option>--help</option></term> <listitem> <para> Show help about <application>pg_isready</application> command line @@ -159,9 +159,9 @@ PostgreSQL documentation <title>Environment</title> <para> - <command>pg_isready</command>, like most other <productname>PostgreSQL</> + <command>pg_isready</command>, like most other <productname>PostgreSQL</productname> utilities, - also uses the environment variables supported by <application>libpq</> + also uses the environment variables supported by <application>libpq</application> (see <xref linkend="libpq-envars">). </para> </refsect1> diff --git a/doc/src/sgml/ref/pg_receivewal.sgml b/doc/src/sgml/ref/pg_receivewal.sgml index f0513dad2ae..5395fde6d6a 100644 --- a/doc/src/sgml/ref/pg_receivewal.sgml +++ b/doc/src/sgml/ref/pg_receivewal.sgml @@ -22,7 +22,7 @@ PostgreSQL documentation <refsynopsisdiv> <cmdsynopsis> <command>pg_receivewal</command> - <arg rep="repeat"><replaceable>option</></arg> + <arg rep="repeat"><replaceable>option</replaceable></arg> </cmdsynopsis> </refsynopsisdiv> @@ -49,9 +49,9 @@ PostgreSQL documentation </para> <para> - Unlike the WAL receiver of a PostgreSQL standby server, <application>pg_receivewal</> + Unlike the WAL receiver of a PostgreSQL standby server, <application>pg_receivewal</application> by default flushes WAL data only when a WAL file is closed. - The option <option>--synchronous</> must be specified to flush WAL data + The option <option>--synchronous</option> must be specified to flush WAL data in real time. </para> @@ -77,7 +77,7 @@ PostgreSQL documentation <para> In the absence of fatal errors, <application>pg_receivewal</application> will run until terminated by the <systemitem>SIGINT</systemitem> signal - (<keycombo action="simul"><keycap>Control</><keycap>C</></>). + (<keycombo action="simul"><keycap>Control</keycap><keycap>C</keycap></keycombo>). </para> </refsect1> @@ -108,7 +108,7 @@ PostgreSQL documentation </para> <para> - If there is a record with LSN exactly equal to <replaceable>lsn</>, + If there is a record with LSN exactly equal to <replaceable>lsn</replaceable>, the record will be processed. </para> </listitem> @@ -156,7 +156,7 @@ PostgreSQL documentation <para> Require <application>pg_receivewal</application> to use an existing replication slot (see <xref linkend="streaming-replication-slots">). - When this option is used, <application>pg_receivewal</> will report + When this option is used, <application>pg_receivewal</application> will report a flush position to the server, indicating when each segment has been synchronized to disk so that the server can remove that segment if it is not otherwise needed. @@ -181,7 +181,7 @@ PostgreSQL documentation <para> Flush the WAL data to disk immediately after it has been received. Also send a status packet back to the server immediately after flushing, - regardless of <literal>--status-interval</>. + regardless of <literal>--status-interval</literal>. </para> <para> @@ -230,7 +230,7 @@ PostgreSQL documentation string. See <xref linkend="libpq-connstring"> for more information. </para> <para> - The option is called <literal>--dbname</> for consistency with other + The option is called <literal>--dbname</literal> for consistency with other client applications, but because <application>pg_receivewal</application> doesn't connect to any particular database in the cluster, database name in the connection string will be ignored. @@ -276,8 +276,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-w</></term> - <term><option>--no-password</></term> + <term><option>-w</option></term> + <term><option>--no-password</option></term> <listitem> <para> Never issue a password prompt. If the server requires @@ -305,7 +305,7 @@ PostgreSQL documentation for a password if the server demands password authentication. However, <application>pg_receivewal</application> will waste a connection attempt finding out that the server wants a password. - In some cases it is worth typing <option>-W</> to avoid the extra + In some cases it is worth typing <option>-W</option> to avoid the extra connection attempt. </para> </listitem> @@ -345,8 +345,8 @@ PostgreSQL documentation <variablelist> <varlistentry> - <term><option>-V</></term> - <term><option>--version</></term> + <term><option>-V</option></term> + <term><option>--version</option></term> <listitem> <para> Print the <application>pg_receivewal</application> version and exit. @@ -355,8 +355,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-?</></term> - <term><option>--help</></term> + <term><option>-?</option></term> + <term><option>--help</option></term> <listitem> <para> Show help about <application>pg_receivewal</application> command line @@ -386,8 +386,8 @@ PostgreSQL documentation <title>Environment</title> <para> - This utility, like most other <productname>PostgreSQL</> utilities, - uses the environment variables supported by <application>libpq</> + This utility, like most other <productname>PostgreSQL</productname> utilities, + uses the environment variables supported by <application>libpq</application> (see <xref linkend="libpq-envars">). </para> diff --git a/doc/src/sgml/ref/pg_recvlogical.sgml b/doc/src/sgml/ref/pg_recvlogical.sgml index 9c7bb1907be..5add6113f3b 100644 --- a/doc/src/sgml/ref/pg_recvlogical.sgml +++ b/doc/src/sgml/ref/pg_recvlogical.sgml @@ -40,11 +40,11 @@ PostgreSQL documentation </para> <para> - <command>pg_recvlogical</> has no equivalent to the logical decoding + <command>pg_recvlogical</command> has no equivalent to the logical decoding SQL interface's peek and get modes. It sends replay confirmations for data lazily as it receives it and on clean exit. To examine pending data on a slot without consuming it, use - <link linkend="functions-replication"><function>pg_logical_slot_peek_changes</></>. + <link linkend="functions-replication"><function>pg_logical_slot_peek_changes</function></link>. </para> </refsect1> @@ -125,7 +125,7 @@ PostgreSQL documentation </para> <para> - If there's a record with LSN exactly equal to <replaceable>lsn</>, + If there's a record with LSN exactly equal to <replaceable>lsn</replaceable>, the record will be output. </para> @@ -145,7 +145,7 @@ PostgreSQL documentation <listitem> <para> Write received and decoded transaction data into this - file. Use <literal>-</> for <systemitem>stdout</systemitem>. + file. Use <literal>-</literal> for <systemitem>stdout</systemitem>. </para> </listitem> </varlistentry> @@ -257,8 +257,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-v</></term> - <term><option>--verbose</></term> + <term><option>-v</option></term> + <term><option>--verbose</option></term> <listitem> <para> Enables verbose mode. @@ -353,7 +353,7 @@ PostgreSQL documentation for a password if the server demands password authentication. However, <application>pg_recvlogical</application> will waste a connection attempt finding out that the server wants a password. - In some cases it is worth typing <option>-W</> to avoid the extra + In some cases it is worth typing <option>-W</option> to avoid the extra connection attempt. </para> </listitem> @@ -366,8 +366,8 @@ PostgreSQL documentation <variablelist> <varlistentry> - <term><option>-V</></term> - <term><option>--version</></term> + <term><option>-V</option></term> + <term><option>--version</option></term> <listitem> <para> Print the <application>pg_recvlogical</application> version and exit. @@ -376,8 +376,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-?</></term> - <term><option>--help</></term> + <term><option>-?</option></term> + <term><option>--help</option></term> <listitem> <para> Show help about <application>pg_recvlogical</application> command line @@ -393,8 +393,8 @@ PostgreSQL documentation <title>Environment</title> <para> - This utility, like most other <productname>PostgreSQL</> utilities, - uses the environment variables supported by <application>libpq</> + This utility, like most other <productname>PostgreSQL</productname> utilities, + uses the environment variables supported by <application>libpq</application> (see <xref linkend="libpq-envars">). </para> </refsect1> diff --git a/doc/src/sgml/ref/pg_resetwal.sgml b/doc/src/sgml/ref/pg_resetwal.sgml index defaf170dc6..c8e5790a8e7 100644 --- a/doc/src/sgml/ref/pg_resetwal.sgml +++ b/doc/src/sgml/ref/pg_resetwal.sgml @@ -34,7 +34,7 @@ PostgreSQL documentation <para> <command>pg_resetwal</command> clears the write-ahead log (WAL) and optionally resets some other control information stored in the - <filename>pg_control</> file. This function is sometimes needed + <filename>pg_control</filename> file. This function is sometimes needed if these files have become corrupted. It should be used only as a last resort, when the server will not start due to such corruption. </para> @@ -43,7 +43,7 @@ PostgreSQL documentation After running this command, it should be possible to start the server, but bear in mind that the database might contain inconsistent data due to partially-committed transactions. You should immediately dump your data, - run <command>initdb</>, and reload. After reload, check for + run <command>initdb</command>, and reload. After reload, check for inconsistencies and repair as needed. </para> @@ -52,21 +52,21 @@ PostgreSQL documentation it requires read/write access to the data directory. For safety reasons, you must specify the data directory on the command line. <command>pg_resetwal</command> does not use the environment variable - <envar>PGDATA</>. + <envar>PGDATA</envar>. </para> <para> If <command>pg_resetwal</command> complains that it cannot determine - valid data for <filename>pg_control</>, you can force it to proceed anyway - by specifying the <option>-f</> (force) option. In this case plausible + valid data for <filename>pg_control</filename>, you can force it to proceed anyway + by specifying the <option>-f</option> (force) option. In this case plausible values will be substituted for the missing data. Most of the fields can be expected to match, but manual assistance might be needed for the next OID, next transaction ID and epoch, next multitransaction ID and offset, and WAL starting address fields. These fields can be set using the options discussed below. If you are not able to determine correct values for all - these fields, <option>-f</> can still be used, but + these fields, <option>-f</option> can still be used, but the recovered database must be treated with even more suspicion than - usual: an immediate dump and reload is imperative. <emphasis>Do not</> + usual: an immediate dump and reload is imperative. <emphasis>Do not</emphasis> execute any data-modifying operations in the database before you dump, as any such action is likely to make the corruption worse. </para> @@ -81,7 +81,7 @@ PostgreSQL documentation <listitem> <para> Force <command>pg_resetwal</command> to proceed even if it cannot determine - valid data for <filename>pg_control</>, as explained above. + valid data for <filename>pg_control</filename>, as explained above. </para> </listitem> </varlistentry> @@ -90,9 +90,9 @@ PostgreSQL documentation <term><option>-n</option></term> <listitem> <para> - The <option>-n</> (no operation) option instructs + The <option>-n</option> (no operation) option instructs <command>pg_resetwal</command> to print the values reconstructed from - <filename>pg_control</> and values about to be changed, and then exit + <filename>pg_control</filename> and values about to be changed, and then exit without modifying anything. This is mainly a debugging tool, but can be useful as a sanity check before allowing <command>pg_resetwal</command> to proceed for real. @@ -116,7 +116,7 @@ PostgreSQL documentation <para> The following options are only needed when <command>pg_resetwal</command> is unable to determine appropriate values - by reading <filename>pg_control</>. Safe values can be determined as + by reading <filename>pg_control</filename>. Safe values can be determined as described below. For values that take numeric arguments, hexadecimal values can be specified by using the prefix <literal>0x</literal>. </para> @@ -134,7 +134,7 @@ PostgreSQL documentation A safe value for the oldest transaction ID for which the commit time can be retrieved (first part) can be determined by looking for the numerically smallest file name in the directory - <filename>pg_commit_ts</> under the data directory. Conversely, a safe + <filename>pg_commit_ts</filename> under the data directory. Conversely, a safe value for the newest transaction ID for which the commit time can be retrieved (second part) can be determined by looking for the numerically greatest file name in the same directory. The file names are in @@ -155,8 +155,8 @@ PostgreSQL documentation except in the field that is set by <command>pg_resetwal</command>, so any value will work so far as the database itself is concerned. You might need to adjust this value to ensure that replication - systems such as <application>Slony-I</> and - <application>Skytools</> work correctly — + systems such as <application>Slony-I</application> and + <application>Skytools</application> work correctly — if so, an appropriate value should be obtainable from the state of the downstream replicated database. </para> @@ -173,22 +173,22 @@ PostgreSQL documentation <para> The WAL starting address should be larger than any WAL segment file name currently existing in - the directory <filename>pg_wal</> under the data directory. + the directory <filename>pg_wal</filename> under the data directory. These names are also in hexadecimal and have three parts. The first - part is the <quote>timeline ID</> and should usually be kept the same. - For example, if <filename>00000001000000320000004A</> is the - largest entry in <filename>pg_wal</>, use <literal>-l 00000001000000320000004B</> or higher. + part is the <quote>timeline ID</quote> and should usually be kept the same. + For example, if <filename>00000001000000320000004A</filename> is the + largest entry in <filename>pg_wal</filename>, use <literal>-l 00000001000000320000004B</literal> or higher. </para> <note> <para> <command>pg_resetwal</command> itself looks at the files in - <filename>pg_wal</> and chooses a default <option>-l</> setting + <filename>pg_wal</filename> and chooses a default <option>-l</option> setting beyond the last existing file name. Therefore, manual adjustment of - <option>-l</> should only be needed if you are aware of WAL segment - files that are not currently present in <filename>pg_wal</>, such as + <option>-l</option> should only be needed if you are aware of WAL segment + files that are not currently present in <filename>pg_wal</filename>, such as entries in an offline archive; or if the contents of - <filename>pg_wal</> have been lost entirely. + <filename>pg_wal</filename> have been lost entirely. </para> </note> </listitem> @@ -204,10 +204,10 @@ PostgreSQL documentation <para> A safe value for the next multitransaction ID (first part) can be determined by looking for the numerically largest file name in the - directory <filename>pg_multixact/offsets</> under the data directory, + directory <filename>pg_multixact/offsets</filename> under the data directory, adding one, and then multiplying by 65536 (0x10000). Conversely, a safe value for the oldest multitransaction ID (second part of - <option>-m</>) can be determined by looking for the numerically smallest + <option>-m</option>) can be determined by looking for the numerically smallest file name in the same directory and multiplying by 65536. The file names are in hexadecimal, so the easiest way to do this is to specify the option value in hexadecimal and append four zeroes. @@ -239,7 +239,7 @@ PostgreSQL documentation <para> A safe value can be determined by looking for the numerically largest - file name in the directory <filename>pg_multixact/members</> under the + file name in the directory <filename>pg_multixact/members</filename> under the data directory, adding one, and then multiplying by 52352 (0xCC80). The file names are in hexadecimal. There is no simple recipe such as the ones for other options of appending zeroes. @@ -256,12 +256,12 @@ PostgreSQL documentation <para> A safe value can be determined by looking for the numerically largest - file name in the directory <filename>pg_xact</> under the data directory, + file name in the directory <filename>pg_xact</filename> under the data directory, adding one, and then multiplying by 1048576 (0x100000). Note that the file names are in hexadecimal. It is usually easiest to specify the option value in - hexadecimal too. For example, if <filename>0011</> is the largest entry - in <filename>pg_xact</>, <literal>-x 0x1200000</> will work (five + hexadecimal too. For example, if <filename>0011</filename> is the largest entry + in <filename>pg_xact</filename>, <literal>-x 0x1200000</literal> will work (five trailing zeroes provide the proper multiplier). </para> </listitem> diff --git a/doc/src/sgml/ref/pg_restore.sgml b/doc/src/sgml/ref/pg_restore.sgml index a628e793109..ed535f6f89a 100644 --- a/doc/src/sgml/ref/pg_restore.sgml +++ b/doc/src/sgml/ref/pg_restore.sgml @@ -98,7 +98,7 @@ <para> This option is similar to, but for historical reasons not identical - to, specifying <option>--section=data</>. + to, specifying <option>--section=data</option>. </para> </listitem> </varlistentry> @@ -109,7 +109,7 @@ <listitem> <para> Clean (drop) database objects before recreating them. - (Unless <option>--if-exists</> is used, + (Unless <option>--if-exists</option> is used, this might generate some harmless error messages, if any objects were not present in the destination database.) </para> @@ -128,8 +128,8 @@ <para> When this option is used, the database named with <option>-d</option> - is used only to issue the initial <command>DROP DATABASE</> and - <command>CREATE DATABASE</> commands. All data is restored into the + is used only to issue the initial <command>DROP DATABASE</command> and + <command>CREATE DATABASE</command> commands. All data is restored into the database name that appears in the archive. </para> </listitem> @@ -183,8 +183,8 @@ <variablelist> <varlistentry> - <term><literal>c</></term> - <term><literal>custom</></term> + <term><literal>c</literal></term> + <term><literal>custom</literal></term> <listitem> <para> The archive is in the custom format of @@ -194,8 +194,8 @@ </varlistentry> <varlistentry> - <term><literal>d</></term> - <term><literal>directory</></term> + <term><literal>d</literal></term> + <term><literal>directory</literal></term> <listitem> <para> The archive is a directory archive. @@ -204,8 +204,8 @@ </varlistentry> <varlistentry> - <term><literal>t</></term> - <term><literal>tar</></term> + <term><literal>t</literal></term> + <term><literal>tar</literal></term> <listitem> <para> The archive is a <command>tar</command> archive. @@ -222,7 +222,7 @@ <listitem> <para> Restore definition of named index only. Multiple indexes - may be specified with multiple <option>-I</> switches. + may be specified with multiple <option>-I</option> switches. </para> </listitem> </varlistentry> @@ -233,7 +233,7 @@ <listitem> <para> Run the most time-consuming parts - of <application>pg_restore</> — those which load data, + of <application>pg_restore</application> — those which load data, create indexes, or create constraints — using multiple concurrent jobs. This option can dramatically reduce the time to restore a large database to a server running on a @@ -275,8 +275,8 @@ <para> List the table of contents of the archive. The output of this operation can be used as input to the <option>-L</option> option. Note that - if filtering switches such as <option>-n</> or <option>-t</> are - used with <option>-l</>, they will restrict the items listed. + if filtering switches such as <option>-n</option> or <option>-t</option> are + used with <option>-l</option>, they will restrict the items listed. </para> </listitem> </varlistentry> @@ -289,11 +289,11 @@ Restore only those archive elements that are listed in <replaceable class="parameter">list-file</replaceable>, and restore them in the order they appear in the file. Note that - if filtering switches such as <option>-n</> or <option>-t</> are - used with <option>-L</>, they will further restrict the items restored. + if filtering switches such as <option>-n</option> or <option>-t</option> are + used with <option>-L</option>, they will further restrict the items restored. </para> - <para><replaceable class="parameter">list-file</> is normally created by - editing the output of a previous <option>-l</> operation. + <para><replaceable class="parameter">list-file</replaceable> is normally created by + editing the output of a previous <option>-l</option> operation. Lines can be moved or removed, and can also be commented out by placing a semicolon (<literal>;</literal>) at the start of the line. See below for examples. @@ -307,7 +307,7 @@ <listitem> <para> Restore only objects that are in the named schema. Multiple schemas - may be specified with multiple <option>-n</> switches. This can be + may be specified with multiple <option>-n</option> switches. This can be combined with the <option>-t</option> option to restore just a specific table. </para> @@ -320,12 +320,12 @@ <listitem> <para> Do not restore objects that are in the named schema. Multiple schemas - to be excluded may be specified with multiple <option>-N</> switches. + to be excluded may be specified with multiple <option>-N</option> switches. </para> <para> - When both <option>-n</> and <option>-N</> are given for the same - schema name, the <option>-N</> switch wins and the schema is excluded. + When both <option>-n</option> and <option>-N</option> are given for the same + schema name, the <option>-N</option> switch wins and the schema is excluded. </para> </listitem> </varlistentry> @@ -338,7 +338,7 @@ Do not output commands to set ownership of objects to match the original database. By default, <application>pg_restore</application> issues - <command>ALTER OWNER</> or + <command>ALTER OWNER</command> or <command>SET SESSION AUTHORIZATION</command> statements to set ownership of created schema elements. These statements will fail unless the initial connection to the @@ -358,7 +358,7 @@ Restore the named function only. Be careful to spell the function name and arguments exactly as they appear in the dump file's table of contents. Multiple functions may be specified with multiple - <option>-P</> switches. + <option>-P</option> switches. </para> </listitem> </varlistentry> @@ -383,14 +383,14 @@ to the extent that schema entries are present in the archive. </para> <para> - This option is the inverse of <option>--data-only</>. + This option is the inverse of <option>--data-only</option>. It is similar to, but for historical reasons not identical to, specifying - <option>--section=pre-data --section=post-data</>. + <option>--section=pre-data --section=post-data</option>. </para> <para> - (Do not confuse this with the <option>--schema</> option, which - uses the word <quote>schema</> in a different meaning.) + (Do not confuse this with the <option>--schema</option> option, which + uses the word <quote>schema</quote> in a different meaning.) </para> </listitem> </varlistentry> @@ -401,7 +401,7 @@ <listitem> <para> Specify the superuser user name to use when disabling triggers. - This is relevant only if <option>--disable-triggers</> is used. + This is relevant only if <option>--disable-triggers</option> is used. </para> </listitem> </varlistentry> @@ -412,16 +412,16 @@ <listitem> <para> Restore definition and/or data of only the named table. - For this purpose, <quote>table</> includes views, materialized views, + For this purpose, <quote>table</quote> includes views, materialized views, sequences, and foreign tables. Multiple tables - can be selected by writing multiple <option>-t</> switches. + can be selected by writing multiple <option>-t</option> switches. This option can be combined with the <option>-n</option> option to specify table(s) in a particular schema. </para> <note> <para> - When <option>-t</option> is specified, <application>pg_restore</> + When <option>-t</option> is specified, <application>pg_restore</application> makes no attempt to restore any other database objects that the selected table(s) might depend upon. Therefore, there is no guarantee that a specific-table restore into a clean database will @@ -433,14 +433,14 @@ <para> This flag does not behave identically to the <option>-t</option> flag of <application>pg_dump</application>. There is not currently - any provision for wild-card matching in <application>pg_restore</>, - nor can you include a schema name within its <option>-t</>. + any provision for wild-card matching in <application>pg_restore</application>, + nor can you include a schema name within its <option>-t</option>. </para> </note> <note> <para> - In versions prior to <productname>PostgreSQL</> 9.6, this flag + In versions prior to <productname>PostgreSQL</productname> 9.6, this flag matched only tables, not any other type of relation. </para> </note> @@ -453,7 +453,7 @@ <listitem> <para> Restore named trigger only. Multiple triggers may be specified with - multiple <option>-T</> switches. + multiple <option>-T</option> switches. </para> </listitem> </varlistentry> @@ -469,8 +469,8 @@ </varlistentry> <varlistentry> - <term><option>-V</></term> - <term><option>--version</></term> + <term><option>-V</option></term> + <term><option>--version</option></term> <listitem> <para> Print the <application>pg_restore</application> version and exit. @@ -495,16 +495,16 @@ <listitem> <para> Execute the restore as a single transaction (that is, wrap the - emitted commands in <command>BEGIN</>/<command>COMMIT</>). This + emitted commands in <command>BEGIN</command>/<command>COMMIT</command>). This ensures that either all the commands complete successfully, or no changes are applied. This option implies - <option>--exit-on-error</>. + <option>--exit-on-error</option>. </para> </listitem> </varlistentry> <varlistentry> - <term><option>--disable-triggers</></term> + <term><option>--disable-triggers</option></term> <listitem> <para> This option is relevant only when performing a data-only restore. @@ -517,16 +517,16 @@ <para> Presently, the commands emitted for - <option>--disable-triggers</> must be done as superuser. So you - should also specify a superuser name with <option>-S</> or, + <option>--disable-triggers</option> must be done as superuser. So you + should also specify a superuser name with <option>-S</option> or, preferably, run <application>pg_restore</application> as a - <productname>PostgreSQL</> superuser. + <productname>PostgreSQL</productname> superuser. </para> </listitem> </varlistentry> <varlistentry> - <term><option>--enable-row-security</></term> + <term><option>--enable-row-security</option></term> <listitem> <para> This option is relevant only when restoring the contents of a table @@ -554,7 +554,7 @@ <para> Use conditional commands (i.e. add an <literal>IF EXISTS</literal> clause) when cleaning database objects. This option is not valid - unless <option>--clean</> is also specified. + unless <option>--clean</option> is also specified. </para> </listitem> </varlistentry> @@ -568,8 +568,8 @@ With this option, data for such a table is skipped. This behavior is useful if the target database already contains the desired table contents. For example, - auxiliary tables for <productname>PostgreSQL</> extensions - such as <productname>PostGIS</> might already be loaded in + auxiliary tables for <productname>PostgreSQL</productname> extensions + such as <productname>PostGIS</productname> might already be loaded in the target database; specifying this option prevents duplicate or obsolete data from being loaded into them. </para> @@ -627,7 +627,7 @@ <listitem> <para> Only restore the named section. The section name can be - <option>pre-data</>, <option>data</>, or <option>post-data</>. + <option>pre-data</option>, <option>data</option>, or <option>post-data</option>. This option can be specified more than once to select multiple sections. The default is to restore all sections. </para> @@ -642,7 +642,7 @@ </varlistentry> <varlistentry> - <term><option>--strict-names</></term> + <term><option>--strict-names</option></term> <listitem> <para> Require that each schema @@ -657,8 +657,8 @@ <term><option>--use-set-session-authorization</option></term> <listitem> <para> - Output SQL-standard <command>SET SESSION AUTHORIZATION</> commands - instead of <command>ALTER OWNER</> commands to determine object + Output SQL-standard <command>SET SESSION AUTHORIZATION</command> commands + instead of <command>ALTER OWNER</command> commands to determine object ownership. This makes the dump more standards-compatible, but depending on the history of the objects in the dump, might not restore properly. @@ -667,8 +667,8 @@ </varlistentry> <varlistentry> - <term><option>-?</></term> - <term><option>--help</></term> + <term><option>-?</option></term> + <term><option>--help</option></term> <listitem> <para> Show help about <application>pg_restore</application> command line @@ -723,8 +723,8 @@ </varlistentry> <varlistentry> - <term><option>-w</></term> - <term><option>--no-password</></term> + <term><option>-w</option></term> + <term><option>--no-password</option></term> <listitem> <para> Never issue a password prompt. If the server requires @@ -752,7 +752,7 @@ for a password if the server demands password authentication. However, <application>pg_restore</application> will waste a connection attempt finding out that the server wants a password. - In some cases it is worth typing <option>-W</> to avoid the extra + In some cases it is worth typing <option>-W</option> to avoid the extra connection attempt. </para> </listitem> @@ -763,11 +763,11 @@ <listitem> <para> Specifies a role name to be used to perform the restore. - This option causes <application>pg_restore</> to issue a - <command>SET ROLE</> <replaceable class="parameter">rolename</> + This option causes <application>pg_restore</application> to issue a + <command>SET ROLE</command> <replaceable class="parameter">rolename</replaceable> command after connecting to the database. It is useful when the - authenticated user (specified by <option>-U</>) lacks privileges - needed by <application>pg_restore</>, but can switch to a role with + authenticated user (specified by <option>-U</option>) lacks privileges + needed by <application>pg_restore</application>, but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows restores to be performed without violating the policy. @@ -799,8 +799,8 @@ </variablelist> <para> - This utility, like most other <productname>PostgreSQL</> utilities, - also uses the environment variables supported by <application>libpq</> + This utility, like most other <productname>PostgreSQL</productname> utilities, + also uses the environment variables supported by <application>libpq</application> (see <xref linkend="libpq-envars">). However, it does not read <envar>PGDATABASE</envar> when a database name is not supplied. </para> @@ -829,11 +829,11 @@ <para> If your installation has any local additions to the - <literal>template1</> database, be careful to load the output of + <literal>template1</literal> database, be careful to load the output of <application>pg_restore</application> into a truly empty database; otherwise you are likely to get errors due to duplicate definitions of the added objects. To make an empty database without any local - additions, copy from <literal>template0</> not <literal>template1</>, for example: + additions, copy from <literal>template0</literal> not <literal>template1</literal>, for example: <programlisting> CREATE DATABASE foo WITH TEMPLATE template0; </programlisting> @@ -846,7 +846,7 @@ CREATE DATABASE foo WITH TEMPLATE template0; <listitem> <para> When restoring data to a pre-existing table and the option - <option>--disable-triggers</> is used, + <option>--disable-triggers</option> is used, <application>pg_restore</application> emits commands to disable triggers on user tables before inserting the data, then emits commands to re-enable them after the data has been inserted. If the restore is stopped in the @@ -872,7 +872,7 @@ CREATE DATABASE foo WITH TEMPLATE template0; </para> <para> - Once restored, it is wise to run <command>ANALYZE</> on each + Once restored, it is wise to run <command>ANALYZE</command> on each restored table so the optimizer has useful statistics; see <xref linkend="vacuum-for-statistics"> and <xref linkend="autovacuum"> for more information. @@ -885,7 +885,7 @@ CREATE DATABASE foo WITH TEMPLATE template0; <title>Examples</title> <para> - Assume we have dumped a database called <literal>mydb</> into a + Assume we have dumped a database called <literal>mydb</literal> into a custom-format dump file: <screen> @@ -901,24 +901,24 @@ CREATE DATABASE foo WITH TEMPLATE template0; <prompt>$</prompt> <userinput>pg_restore -C -d postgres db.dump</userinput> </screen> - The database named in the <option>-d</> switch can be any database existing - in the cluster; <application>pg_restore</> only uses it to issue the - <command>CREATE DATABASE</> command for <literal>mydb</>. With - <option>-C</>, data is always restored into the database name that appears + The database named in the <option>-d</option> switch can be any database existing + in the cluster; <application>pg_restore</application> only uses it to issue the + <command>CREATE DATABASE</command> command for <literal>mydb</literal>. With + <option>-C</option>, data is always restored into the database name that appears in the dump file. </para> <para> - To reload the dump into a new database called <literal>newdb</>: + To reload the dump into a new database called <literal>newdb</literal>: <screen> <prompt>$</prompt> <userinput>createdb -T template0 newdb</userinput> <prompt>$</prompt> <userinput>pg_restore -d newdb db.dump</userinput> </screen> - Notice we don't use <option>-C</>, and instead connect directly to the + Notice we don't use <option>-C</option>, and instead connect directly to the database to be restored into. Also note that we clone the new database - from <literal>template0</> not <literal>template1</>, to ensure it is + from <literal>template0</literal> not <literal>template1</literal>, to ensure it is initially empty. </para> diff --git a/doc/src/sgml/ref/pg_rewind.sgml b/doc/src/sgml/ref/pg_rewind.sgml index d5430d43245..4bafdfe581c 100644 --- a/doc/src/sgml/ref/pg_rewind.sgml +++ b/doc/src/sgml/ref/pg_rewind.sgml @@ -41,7 +41,7 @@ PostgreSQL documentation <title>Description</title> <para> - <application>pg_rewind</> is a tool for synchronizing a PostgreSQL cluster + <application>pg_rewind</application> is a tool for synchronizing a PostgreSQL cluster with another copy of the same cluster, after the clusters' timelines have diverged. A typical scenario is to bring an old master server back online after failover as a standby that follows the new master. @@ -51,49 +51,49 @@ PostgreSQL documentation The result is equivalent to replacing the target data directory with the source one. Only changed blocks from relation files are copied; all other files are copied in full, including configuration files. The - advantage of <application>pg_rewind</> over taking a new base backup, or - tools like <application>rsync</>, is that <application>pg_rewind</> does + advantage of <application>pg_rewind</application> over taking a new base backup, or + tools like <application>rsync</application>, is that <application>pg_rewind</application> does not require reading through unchanged blocks in the cluster. This makes it a lot faster when the database is large and only a small fraction of blocks differ between the clusters. </para> <para> - <application>pg_rewind</> examines the timeline histories of the source + <application>pg_rewind</application> examines the timeline histories of the source and target clusters to determine the point where they diverged, and - expects to find WAL in the target cluster's <filename>pg_wal</> directory + expects to find WAL in the target cluster's <filename>pg_wal</filename> directory reaching all the way back to the point of divergence. The point of divergence can be found either on the target timeline, the source timeline, or their common ancestor. In the typical failover scenario where the target cluster was shut down soon after the divergence, this is not a problem, but if the target cluster ran for a long time after the divergence, the old WAL files might no longer be present. In that case, they can be manually - copied from the WAL archive to the <filename>pg_wal</> directory, or - fetched on startup by configuring <filename>recovery.conf</>. The use of - <application>pg_rewind</> is not limited to failover, e.g. a standby + copied from the WAL archive to the <filename>pg_wal</filename> directory, or + fetched on startup by configuring <filename>recovery.conf</filename>. The use of + <application>pg_rewind</application> is not limited to failover, e.g. a standby server can be promoted, run some write transactions, and then rewinded to become a standby again. </para> <para> When the target server is started for the first time after running - <application>pg_rewind</>, it will go into recovery mode and replay all + <application>pg_rewind</application>, it will go into recovery mode and replay all WAL generated in the source server after the point of divergence. If some of the WAL was no longer available in the source server when - <application>pg_rewind</> was run, and therefore could not be copied by the - <application>pg_rewind</> session, it must be made available when the + <application>pg_rewind</application> was run, and therefore could not be copied by the + <application>pg_rewind</application> session, it must be made available when the target server is started. This can be done by creating a - <filename>recovery.conf</> file in the target data directory with a - suitable <varname>restore_command</>. + <filename>recovery.conf</filename> file in the target data directory with a + suitable <varname>restore_command</varname>. </para> <para> - <application>pg_rewind</> requires that the target server either has + <application>pg_rewind</application> requires that the target server either has the <xref linkend="guc-wal-log-hints"> option enabled - in <filename>postgresql.conf</> or data checksums enabled when - the cluster was initialized with <application>initdb</>. Neither of these + in <filename>postgresql.conf</filename> or data checksums enabled when + the cluster was initialized with <application>initdb</application>. Neither of these are currently on by default. <xref linkend="guc-full-page-writes"> - must also be set to <literal>on</>, but is enabled by default. + must also be set to <literal>on</literal>, but is enabled by default. </para> </refsect1> @@ -133,7 +133,7 @@ PostgreSQL documentation <listitem> <para> Specifies a libpq connection string to connect to the source - <productname>PostgreSQL</> server to synchronize the target with. + <productname>PostgreSQL</productname> server to synchronize the target with. The connection must be a normal (non-replication) connection with superuser access. This option requires the source server to be running and not in recovery mode. @@ -167,7 +167,7 @@ PostgreSQL documentation <listitem> <para> Print verbose debugging output that is mostly useful for developers - debugging <application>pg_rewind</>. + debugging <application>pg_rewind</application>. </para> </listitem> </varlistentry> @@ -192,9 +192,9 @@ PostgreSQL documentation <title>Environment</title> <para> - When <option>--source-server</> option is used, + When <option>--source-server</option> option is used, <application>pg_rewind</application> also uses the environment variables - supported by <application>libpq</> (see <xref linkend="libpq-envars">). + supported by <application>libpq</application> (see <xref linkend="libpq-envars">). </para> </refsect1> @@ -224,7 +224,7 @@ PostgreSQL documentation <para> Copy all those changed blocks from the source cluster to the target cluster, either using direct file system access - (<option>--source-pgdata</>) or SQL (<option>--source-server</>). + (<option>--source-pgdata</option>) or SQL (<option>--source-server</option>). </para> </step> <step> @@ -237,9 +237,9 @@ PostgreSQL documentation <step> <para> Apply the WAL from the source cluster, starting from the checkpoint - created at failover. (Strictly speaking, <application>pg_rewind</> + created at failover. (Strictly speaking, <application>pg_rewind</application> doesn't apply the WAL, it just creates a backup label file that - makes <productname>PostgreSQL</> start by replaying all WAL from + makes <productname>PostgreSQL</productname> start by replaying all WAL from that checkpoint forward.) </para> </step> diff --git a/doc/src/sgml/ref/pg_waldump.sgml b/doc/src/sgml/ref/pg_waldump.sgml index cff88a4c1e8..0b39726e30c 100644 --- a/doc/src/sgml/ref/pg_waldump.sgml +++ b/doc/src/sgml/ref/pg_waldump.sgml @@ -133,7 +133,7 @@ PostgreSQL documentation <listitem> <para> Only display records generated by the specified resource manager. - If <literal>list</> is passed as name, print a list of valid resource manager + If <literal>list</literal> is passed as name, print a list of valid resource manager names, and exit. </para> </listitem> @@ -156,15 +156,15 @@ PostgreSQL documentation <listitem> <para> Timeline from which to read log records. The default is to use the - value in <replaceable>startseg</>, if that is specified; otherwise, the + value in <replaceable>startseg</replaceable>, if that is specified; otherwise, the default is 1. </para> </listitem> </varlistentry> <varlistentry> - <term><option>-V</></term> - <term><option>--version</></term> + <term><option>-V</option></term> + <term><option>--version</option></term> <listitem> <para> Print the <application>pg_waldump</application> version and exit. @@ -195,8 +195,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-?</></term> - <term><option>--help</></term> + <term><option>-?</option></term> + <term><option>--help</option></term> <listitem> <para> Show help about <application>pg_waldump</application> command line @@ -220,8 +220,8 @@ PostgreSQL documentation </para> <para> - <application>pg_waldump</> cannot read WAL files with suffix - <literal>.partial</>. If those files need to be read, <literal>.partial</> + <application>pg_waldump</application> cannot read WAL files with suffix + <literal>.partial</literal>. If those files need to be read, <literal>.partial</literal> suffix needs to be removed from the file name. </para> </refsect1> diff --git a/doc/src/sgml/ref/pgarchivecleanup.sgml b/doc/src/sgml/ref/pgarchivecleanup.sgml index abe01bef4ff..65ba3df9282 100644 --- a/doc/src/sgml/ref/pgarchivecleanup.sgml +++ b/doc/src/sgml/ref/pgarchivecleanup.sgml @@ -29,44 +29,44 @@ <title>Description</title> <para> - <application>pg_archivecleanup</> is designed to be used as an + <application>pg_archivecleanup</application> is designed to be used as an <literal>archive_cleanup_command</literal> to clean up WAL file archives when running as a standby server (see <xref linkend="warm-standby">). - <application>pg_archivecleanup</> can also be used as a standalone program to + <application>pg_archivecleanup</application> can also be used as a standalone program to clean WAL file archives. </para> <para> To configure a standby - server to use <application>pg_archivecleanup</>, put this into its + server to use <application>pg_archivecleanup</application>, put this into its <filename>recovery.conf</filename> configuration file: <programlisting> -archive_cleanup_command = 'pg_archivecleanup <replaceable>archivelocation</> %r' +archive_cleanup_command = 'pg_archivecleanup <replaceable>archivelocation</replaceable> %r' </programlisting> - where <replaceable>archivelocation</> is the directory from which WAL segment + where <replaceable>archivelocation</replaceable> is the directory from which WAL segment files should be removed. </para> <para> When used within <xref linkend="archive-cleanup-command">, all WAL files - logically preceding the value of the <literal>%r</> argument will be removed - from <replaceable>archivelocation</>. This minimizes the number of files + logically preceding the value of the <literal>%r</literal> argument will be removed + from <replaceable>archivelocation</replaceable>. This minimizes the number of files that need to be retained, while preserving crash-restart capability. Use of - this parameter is appropriate if the <replaceable>archivelocation</> is a + this parameter is appropriate if the <replaceable>archivelocation</replaceable> is a transient staging area for this particular standby server, but - <emphasis>not</> when the <replaceable>archivelocation</> is intended as a + <emphasis>not</emphasis> when the <replaceable>archivelocation</replaceable> is intended as a long-term WAL archive area, or when multiple standby servers are recovering from the same archive location. </para> <para> When used as a standalone program all WAL files logically preceding the - <replaceable>oldestkeptwalfile</> will be removed from <replaceable>archivelocation</>. - In this mode, if you specify a <filename>.partial</> or <filename>.backup</> + <replaceable>oldestkeptwalfile</replaceable> will be removed from <replaceable>archivelocation</replaceable>. + In this mode, if you specify a <filename>.partial</filename> or <filename>.backup</filename> file name, then only the file prefix will be used as the - <replaceable>oldestkeptwalfile</>. This treatment of <filename>.backup</> + <replaceable>oldestkeptwalfile</replaceable>. This treatment of <filename>.backup</filename> file name allows you to remove all WAL files archived prior to a specific base backup without error. For example, the following example will remove all files older than - WAL file name <filename>000000010000003700000010</>: + WAL file name <filename>000000010000003700000010</filename>: <programlisting> pg_archivecleanup -d archive 000000010000003700000010.00000020.backup @@ -77,7 +77,7 @@ pg_archivecleanup: removing file "archive/00000001000000370000000E" </para> <para> <application>pg_archivecleanup</application> assumes that - <replaceable>archivelocation</> is a directory readable and writable by the + <replaceable>archivelocation</replaceable> is a directory readable and writable by the server-owning user. </para> </refsect1> @@ -94,7 +94,7 @@ pg_archivecleanup: removing file "archive/00000001000000370000000E" <term><option>-d</option></term> <listitem> <para> - Print lots of debug logging output on <filename>stderr</>. + Print lots of debug logging output on <filename>stderr</filename>. </para> </listitem> </varlistentry> @@ -103,14 +103,14 @@ pg_archivecleanup: removing file "archive/00000001000000370000000E" <term><option>-n</option></term> <listitem> <para> - Print the names of the files that would have been removed on <filename>stdout</> (performs a dry run). + Print the names of the files that would have been removed on <filename>stdout</filename> (performs a dry run). </para> </listitem> </varlistentry> <varlistentry> - <term><option>-V</></term> - <term><option>--version</></term> + <term><option>-V</option></term> + <term><option>--version</option></term> <listitem> <para> Print the <application>pg_archivecleanup</application> version and exit. @@ -119,7 +119,7 @@ pg_archivecleanup: removing file "archive/00000001000000370000000E" </varlistentry> <varlistentry> - <term><option>-x</option> <replaceable>extension</></term> + <term><option>-x</option> <replaceable>extension</replaceable></term> <listitem> <para> Provide an extension @@ -134,8 +134,8 @@ pg_archivecleanup: removing file "archive/00000001000000370000000E" </varlistentry> <varlistentry> - <term><option>-?</></term> - <term><option>--help</></term> + <term><option>-?</option></term> + <term><option>--help</option></term> <listitem> <para> Show help about <application>pg_archivecleanup</application> command line @@ -152,8 +152,8 @@ pg_archivecleanup: removing file "archive/00000001000000370000000E" <para> <application>pg_archivecleanup</application> is designed to work with - <productname>PostgreSQL</> 8.0 and later when used as a standalone utility, - or with <productname>PostgreSQL</> 9.0 and later when used as an + <productname>PostgreSQL</productname> 8.0 and later when used as a standalone utility, + or with <productname>PostgreSQL</productname> 9.0 and later when used as an archive cleanup command. </para> @@ -172,14 +172,14 @@ pg_archivecleanup: removing file "archive/00000001000000370000000E" archive_cleanup_command = 'pg_archivecleanup -d /mnt/standby/archive %r 2>>cleanup.log' </programlisting> where the archive directory is physically located on the standby server, - so that the <varname>archive_command</> is accessing it across NFS, + so that the <varname>archive_command</varname> is accessing it across NFS, but the files are local to the standby. This will: </para> <itemizedlist> <listitem> <para> - produce debugging output in <filename>cleanup.log</> + produce debugging output in <filename>cleanup.log</filename> </para> </listitem> <listitem> diff --git a/doc/src/sgml/ref/pgbench.sgml b/doc/src/sgml/ref/pgbench.sgml index f5db8d18d32..e509e6c7f62 100644 --- a/doc/src/sgml/ref/pgbench.sgml +++ b/doc/src/sgml/ref/pgbench.sgml @@ -34,12 +34,12 @@ <title>Description</title> <para> <application>pgbench</application> is a simple program for running benchmark - tests on <productname>PostgreSQL</>. It runs the same sequence of SQL + tests on <productname>PostgreSQL</productname>. It runs the same sequence of SQL commands over and over, possibly in multiple concurrent database sessions, and then calculates the average transaction rate (transactions per second). By default, <application>pgbench</application> tests a scenario that is - loosely based on TPC-B, involving five <command>SELECT</>, - <command>UPDATE</>, and <command>INSERT</> commands per transaction. + loosely based on TPC-B, involving five <command>SELECT</command>, + <command>UPDATE</command>, and <command>INSERT</command> commands per transaction. However, it is easy to test other cases by writing your own transaction script files. </para> @@ -63,7 +63,7 @@ tps = 85.296346 (excluding connections establishing) settings. The next line reports the number of transactions completed and intended (the latter being just the product of number of clients and number of transactions per client); these will be equal unless the run - failed before completion. (In <option>-T</> mode, only the actual + failed before completion. (In <option>-T</option> mode, only the actual number of transactions is printed.) The last two lines report the number of transactions per second, figured with and without counting the time to start database sessions. @@ -71,27 +71,27 @@ tps = 85.296346 (excluding connections establishing) <para> The default TPC-B-like transaction test requires specific tables to be - set up beforehand. <application>pgbench</> should be invoked with - the <option>-i</> (initialize) option to create and populate these + set up beforehand. <application>pgbench</application> should be invoked with + the <option>-i</option> (initialize) option to create and populate these tables. (When you are testing a custom script, you don't need this step, but will instead need to do whatever setup your test needs.) Initialization looks like: <programlisting> -pgbench -i <optional> <replaceable>other-options</> </optional> <replaceable>dbname</> +pgbench -i <optional> <replaceable>other-options</replaceable> </optional> <replaceable>dbname</replaceable> </programlisting> - where <replaceable>dbname</> is the name of the already-created - database to test in. (You may also need <option>-h</>, - <option>-p</>, and/or <option>-U</> options to specify how to + where <replaceable>dbname</replaceable> is the name of the already-created + database to test in. (You may also need <option>-h</option>, + <option>-p</option>, and/or <option>-U</option> options to specify how to connect to the database server.) </para> <caution> <para> - <literal>pgbench -i</> creates four tables <structname>pgbench_accounts</>, - <structname>pgbench_branches</>, <structname>pgbench_history</>, and - <structname>pgbench_tellers</>, + <literal>pgbench -i</literal> creates four tables <structname>pgbench_accounts</structname>, + <structname>pgbench_branches</structname>, <structname>pgbench_history</structname>, and + <structname>pgbench_tellers</structname>, destroying any existing tables of these names. Be very careful to use another database if you have tables having these names! @@ -99,7 +99,7 @@ pgbench -i <optional> <replaceable>other-options</> </optional> <replaceable>dbn </caution> <para> - At the default <quote>scale factor</> of 1, the tables initially + At the default <quote>scale factor</quote> of 1, the tables initially contain this many rows: <screen> table # of rows @@ -110,22 +110,22 @@ pgbench_accounts 100000 pgbench_history 0 </screen> You can (and, for most purposes, probably should) increase the number - of rows by using the <option>-s</> (scale factor) option. The - <option>-F</> (fillfactor) option might also be used at this point. + of rows by using the <option>-s</option> (scale factor) option. The + <option>-F</option> (fillfactor) option might also be used at this point. </para> <para> Once you have done the necessary setup, you can run your benchmark - with a command that doesn't include <option>-i</>, that is + with a command that doesn't include <option>-i</option>, that is <programlisting> -pgbench <optional> <replaceable>options</> </optional> <replaceable>dbname</> +pgbench <optional> <replaceable>options</replaceable> </optional> <replaceable>dbname</replaceable> </programlisting> In nearly all cases, you'll need some options to make a useful test. - The most important options are <option>-c</> (number of clients), - <option>-t</> (number of transactions), <option>-T</> (time limit), - and <option>-f</> (specify a custom script file). + The most important options are <option>-c</option> (number of clients), + <option>-t</option> (number of transactions), <option>-T</option> (time limit), + and <option>-f</option> (specify a custom script file). See below for a full list. </para> </refsect1> @@ -159,13 +159,13 @@ pgbench <optional> <replaceable>options</> </optional> <replaceable>dbname</> </varlistentry> <varlistentry> - <term><option>-F</option> <replaceable>fillfactor</></term> - <term><option>--fillfactor=</option><replaceable>fillfactor</></term> + <term><option>-F</option> <replaceable>fillfactor</replaceable></term> + <term><option>--fillfactor=</option><replaceable>fillfactor</replaceable></term> <listitem> <para> - Create the <structname>pgbench_accounts</>, - <structname>pgbench_tellers</> and - <structname>pgbench_branches</> tables with the given fillfactor. + Create the <structname>pgbench_accounts</structname>, + <structname>pgbench_tellers</structname> and + <structname>pgbench_branches</structname> tables with the given fillfactor. Default is 100. </para> </listitem> @@ -194,13 +194,13 @@ pgbench <optional> <replaceable>options</> </optional> <replaceable>dbname</> </varlistentry> <varlistentry> - <term><option>-s</option> <replaceable>scale_factor</></term> - <term><option>--scale=</option><replaceable>scale_factor</></term> + <term><option>-s</option> <replaceable>scale_factor</replaceable></term> + <term><option>--scale=</option><replaceable>scale_factor</replaceable></term> <listitem> <para> Multiply the number of rows generated by the scale factor. - For example, <literal>-s 100</> will create 10,000,000 rows - in the <structname>pgbench_accounts</> table. Default is 1. + For example, <literal>-s 100</literal> will create 10,000,000 rows + in the <structname>pgbench_accounts</structname> table. Default is 1. When the scale is 20,000 or larger, the columns used to hold account identifiers (<structfield>aid</structfield> columns) will switch to using larger integers (<type>bigint</type>), @@ -262,17 +262,17 @@ pgbench <optional> <replaceable>options</> </optional> <replaceable>dbname</> <variablelist> <varlistentry> - <term><option>-b</> <replaceable>scriptname[@weight]</></term> - <term><option>--builtin</>=<replaceable>scriptname[@weight]</></term> + <term><option>-b</option> <replaceable>scriptname[@weight]</replaceable></term> + <term><option>--builtin</option>=<replaceable>scriptname[@weight]</replaceable></term> <listitem> <para> Add the specified built-in script to the list of executed scripts. - An optional integer weight after <literal>@</> allows to adjust the + An optional integer weight after <literal>@</literal> allows to adjust the probability of drawing the script. If not specified, it is set to 1. - Available built-in scripts are: <literal>tpcb-like</>, - <literal>simple-update</> and <literal>select-only</>. + Available built-in scripts are: <literal>tpcb-like</literal>, + <literal>simple-update</literal> and <literal>select-only</literal>. Unambiguous prefixes of built-in names are accepted. - With special name <literal>list</>, show the list of built-in scripts + With special name <literal>list</literal>, show the list of built-in scripts and exit immediately. </para> </listitem> @@ -280,8 +280,8 @@ pgbench <optional> <replaceable>options</> </optional> <replaceable>dbname</> <varlistentry> - <term><option>-c</option> <replaceable>clients</></term> - <term><option>--client=</option><replaceable>clients</></term> + <term><option>-c</option> <replaceable>clients</replaceable></term> + <term><option>--client=</option><replaceable>clients</replaceable></term> <listitem> <para> Number of clients simulated, that is, number of concurrent database @@ -313,24 +313,24 @@ pgbench <optional> <replaceable>options</> </optional> <replaceable>dbname</> </varlistentry> <varlistentry> - <term><option>-D</option> <replaceable>varname</><literal>=</><replaceable>value</></term> - <term><option>--define=</option><replaceable>varname</><literal>=</><replaceable>value</></term> + <term><option>-D</option> <replaceable>varname</replaceable><literal>=</literal><replaceable>value</replaceable></term> + <term><option>--define=</option><replaceable>varname</replaceable><literal>=</literal><replaceable>value</replaceable></term> <listitem> <para> Define a variable for use by a custom script (see below). - Multiple <option>-D</> options are allowed. + Multiple <option>-D</option> options are allowed. </para> </listitem> </varlistentry> <varlistentry> - <term><option>-f</> <replaceable>filename[@weight]</></term> - <term><option>--file=</><replaceable>filename[@weight]</></term> + <term><option>-f</option> <replaceable>filename[@weight]</replaceable></term> + <term><option>--file=</option><replaceable>filename[@weight]</replaceable></term> <listitem> <para> - Add a transaction script read from <replaceable>filename</> to + Add a transaction script read from <replaceable>filename</replaceable> to the list of executed scripts. - An optional integer weight after <literal>@</> allows to adjust the + An optional integer weight after <literal>@</literal> allows to adjust the probability of drawing the test. See below for details. </para> @@ -338,8 +338,8 @@ pgbench <optional> <replaceable>options</> </optional> <replaceable>dbname</> </varlistentry> <varlistentry> - <term><option>-j</option> <replaceable>threads</></term> - <term><option>--jobs=</option><replaceable>threads</></term> + <term><option>-j</option> <replaceable>threads</replaceable></term> + <term><option>--jobs=</option><replaceable>threads</replaceable></term> <listitem> <para> Number of worker threads within <application>pgbench</application>. @@ -362,38 +362,38 @@ pgbench <optional> <replaceable>options</> </optional> <replaceable>dbname</> </varlistentry> <varlistentry> - <term><option>-L</option> <replaceable>limit</></term> - <term><option>--latency-limit=</option><replaceable>limit</></term> + <term><option>-L</option> <replaceable>limit</replaceable></term> + <term><option>--latency-limit=</option><replaceable>limit</replaceable></term> <listitem> <para> - Transaction which last more than <replaceable>limit</> milliseconds - are counted and reported separately, as <firstterm>late</>. + Transaction which last more than <replaceable>limit</replaceable> milliseconds + are counted and reported separately, as <firstterm>late</firstterm>. </para> <para> - When throttling is used (<option>--rate=...</>), transactions that - lag behind schedule by more than <replaceable>limit</> ms, and thus + When throttling is used (<option>--rate=...</option>), transactions that + lag behind schedule by more than <replaceable>limit</replaceable> ms, and thus have no hope of meeting the latency limit, are not sent to the server at all. They are counted and reported separately as - <firstterm>skipped</>. + <firstterm>skipped</firstterm>. </para> </listitem> </varlistentry> <varlistentry> - <term><option>-M</option> <replaceable>querymode</></term> - <term><option>--protocol=</option><replaceable>querymode</></term> + <term><option>-M</option> <replaceable>querymode</replaceable></term> + <term><option>--protocol=</option><replaceable>querymode</replaceable></term> <listitem> <para> Protocol to use for submitting queries to the server: <itemizedlist> <listitem> - <para><literal>simple</>: use simple query protocol.</para> + <para><literal>simple</literal>: use simple query protocol.</para> </listitem> <listitem> - <para><literal>extended</>: use extended query protocol.</para> + <para><literal>extended</literal>: use extended query protocol.</para> </listitem> <listitem> - <para><literal>prepared</>: use extended query protocol with prepared statements.</para> + <para><literal>prepared</literal>: use extended query protocol with prepared statements.</para> </listitem> </itemizedlist> The default is simple query protocol. (See <xref linkend="protocol"> @@ -408,11 +408,11 @@ pgbench <optional> <replaceable>options</> </optional> <replaceable>dbname</> <listitem> <para> Perform no vacuuming before running the test. - This option is <emphasis>necessary</> + This option is <emphasis>necessary</emphasis> if you are running a custom test scenario that does not include - the standard tables <structname>pgbench_accounts</>, - <structname>pgbench_branches</>, <structname>pgbench_history</>, and - <structname>pgbench_tellers</>. + the standard tables <structname>pgbench_accounts</structname>, + <structname>pgbench_branches</structname>, <structname>pgbench_history</structname>, and + <structname>pgbench_tellers</structname>. </para> </listitem> </varlistentry> @@ -423,20 +423,20 @@ pgbench <optional> <replaceable>options</> </optional> <replaceable>dbname</> <listitem> <para> Run built-in simple-update script. - Shorthand for <option>-b simple-update</>. + Shorthand for <option>-b simple-update</option>. </para> </listitem> </varlistentry> <varlistentry> - <term><option>-P</option> <replaceable>sec</></term> - <term><option>--progress=</option><replaceable>sec</></term> + <term><option>-P</option> <replaceable>sec</replaceable></term> + <term><option>--progress=</option><replaceable>sec</replaceable></term> <listitem> <para> - Show progress report every <replaceable>sec</> seconds. The report + Show progress report every <replaceable>sec</replaceable> seconds. The report includes the time since the beginning of the run, the tps since the last report, and the transaction latency average and standard - deviation since the last report. Under throttling (<option>-R</>), + deviation since the last report. Under throttling (<option>-R</option>), the latency is computed with respect to the transaction scheduled start time, not the actual transaction beginning time, thus it also includes the average schedule lag time. @@ -457,8 +457,8 @@ pgbench <optional> <replaceable>options</> </optional> <replaceable>dbname</> </varlistentry> <varlistentry> - <term><option>-R</option> <replaceable>rate</></term> - <term><option>--rate=</option><replaceable>rate</></term> + <term><option>-R</option> <replaceable>rate</replaceable></term> + <term><option>--rate=</option><replaceable>rate</replaceable></term> <listitem> <para> Execute transactions targeting the specified rate instead of running @@ -487,7 +487,7 @@ pgbench <optional> <replaceable>options</> </optional> <replaceable>dbname</> </para> <para> - If <option>--latency-limit</> is used together with <option>--rate</>, + If <option>--latency-limit</option> is used together with <option>--rate</option>, a transaction can lag behind so much that it is already over the latency limit when the previous transaction ends, because the latency is calculated from the scheduled start time. Such transactions are @@ -508,15 +508,15 @@ pgbench <optional> <replaceable>options</> </optional> <replaceable>dbname</> </varlistentry> <varlistentry> - <term><option>-s</option> <replaceable>scale_factor</></term> - <term><option>--scale=</option><replaceable>scale_factor</></term> + <term><option>-s</option> <replaceable>scale_factor</replaceable></term> + <term><option>--scale=</option><replaceable>scale_factor</replaceable></term> <listitem> <para> - Report the specified scale factor in <application>pgbench</>'s + Report the specified scale factor in <application>pgbench</application>'s output. With the built-in tests, this is not necessary; the correct scale factor will be detected by counting the number of - rows in the <structname>pgbench_branches</> table. - However, when testing only custom benchmarks (<option>-f</> option), + rows in the <structname>pgbench_branches</structname> table. + However, when testing only custom benchmarks (<option>-f</option> option), the scale factor will be reported as 1 unless this option is used. </para> </listitem> @@ -528,14 +528,14 @@ pgbench <optional> <replaceable>options</> </optional> <replaceable>dbname</> <listitem> <para> Run built-in select-only script. - Shorthand for <option>-b select-only</>. + Shorthand for <option>-b select-only</option>. </para> </listitem> </varlistentry> <varlistentry> - <term><option>-t</option> <replaceable>transactions</></term> - <term><option>--transactions=</option><replaceable>transactions</></term> + <term><option>-t</option> <replaceable>transactions</replaceable></term> + <term><option>--transactions=</option><replaceable>transactions</replaceable></term> <listitem> <para> Number of transactions each client runs. Default is 10. @@ -544,8 +544,8 @@ pgbench <optional> <replaceable>options</> </optional> <replaceable>dbname</> </varlistentry> <varlistentry> - <term><option>-T</option> <replaceable>seconds</></term> - <term><option>--time=</option><replaceable>seconds</></term> + <term><option>-T</option> <replaceable>seconds</replaceable></term> + <term><option>--time=</option><replaceable>seconds</replaceable></term> <listitem> <para> Run the test for this many seconds, rather than a fixed number of @@ -561,15 +561,15 @@ pgbench <optional> <replaceable>options</> </optional> <replaceable>dbname</> <listitem> <para> Vacuum all four standard tables before running the test. - With neither <option>-n</> nor <option>-v</>, <application>pgbench</application> will vacuum the - <structname>pgbench_tellers</> and <structname>pgbench_branches</> - tables, and will truncate <structname>pgbench_history</>. + With neither <option>-n</option> nor <option>-v</option>, <application>pgbench</application> will vacuum the + <structname>pgbench_tellers</structname> and <structname>pgbench_branches</structname> + tables, and will truncate <structname>pgbench_history</structname>. </para> </listitem> </varlistentry> <varlistentry> - <term><option>--aggregate-interval=<replaceable>seconds</></option></term> + <term><option>--aggregate-interval=<replaceable>seconds</replaceable></option></term> <listitem> <para> Length of aggregation interval (in seconds). May be used only @@ -580,11 +580,11 @@ pgbench <optional> <replaceable>options</> </optional> <replaceable>dbname</> </varlistentry> <varlistentry> - <term><option>--log-prefix=<replaceable>prefix</></option></term> + <term><option>--log-prefix=<replaceable>prefix</replaceable></option></term> <listitem> <para> Set the filename prefix for the log files created by - <option>--log</>. The default is <literal>pgbench_log</>. + <option>--log</option>. The default is <literal>pgbench_log</literal>. </para> </listitem> </varlistentry> @@ -593,7 +593,7 @@ pgbench <optional> <replaceable>options</> </optional> <replaceable>dbname</> <term><option>--progress-timestamp</option></term> <listitem> <para> - When showing progress (option <option>-P</>), use a timestamp + When showing progress (option <option>-P</option>), use a timestamp (Unix epoch) instead of the number of seconds since the beginning of the run. The unit is in seconds, with millisecond precision after the dot. @@ -603,7 +603,7 @@ pgbench <optional> <replaceable>options</> </optional> <replaceable>dbname</> </varlistentry> <varlistentry> - <term><option>--sampling-rate=<replaceable>rate</></option></term> + <term><option>--sampling-rate=<replaceable>rate</replaceable></option></term> <listitem> <para> Sampling rate, used when writing data into the log, to reduce the @@ -635,8 +635,8 @@ pgbench <optional> <replaceable>options</> </optional> <replaceable>dbname</> <variablelist> <varlistentry> - <term><option>-h</option> <replaceable>hostname</></term> - <term><option>--host=</option><replaceable>hostname</></term> + <term><option>-h</option> <replaceable>hostname</replaceable></term> + <term><option>--host=</option><replaceable>hostname</replaceable></term> <listitem> <para> The database server's host name @@ -645,8 +645,8 @@ pgbench <optional> <replaceable>options</> </optional> <replaceable>dbname</> </varlistentry> <varlistentry> - <term><option>-p</option> <replaceable>port</></term> - <term><option>--port=</option><replaceable>port</></term> + <term><option>-p</option> <replaceable>port</replaceable></term> + <term><option>--port=</option><replaceable>port</replaceable></term> <listitem> <para> The database server's port number @@ -655,8 +655,8 @@ pgbench <optional> <replaceable>options</> </optional> <replaceable>dbname</> </varlistentry> <varlistentry> - <term><option>-U</option> <replaceable>login</></term> - <term><option>--username=</option><replaceable>login</></term> + <term><option>-U</option> <replaceable>login</replaceable></term> + <term><option>--username=</option><replaceable>login</replaceable></term> <listitem> <para> The user name to connect as @@ -665,8 +665,8 @@ pgbench <optional> <replaceable>options</> </optional> <replaceable>dbname</> </varlistentry> <varlistentry> - <term><option>-V</></term> - <term><option>--version</></term> + <term><option>-V</option></term> + <term><option>--version</option></term> <listitem> <para> Print the <application>pgbench</application> version and exit. @@ -675,8 +675,8 @@ pgbench <optional> <replaceable>options</> </optional> <replaceable>dbname</> </varlistentry> <varlistentry> - <term><option>-?</></term> - <term><option>--help</></term> + <term><option>-?</option></term> + <term><option>--help</option></term> <listitem> <para> Show help about <application>pgbench</application> command line @@ -694,23 +694,23 @@ pgbench <optional> <replaceable>options</> </optional> <replaceable>dbname</> <title>Notes</title> <refsect2> - <title>What is the <quote>Transaction</> Actually Performed in <application>pgbench</application>?</title> + <title>What is the <quote>Transaction</quote> Actually Performed in <application>pgbench</application>?</title> <para> - <application>pgbench</> executes test scripts chosen randomly + <application>pgbench</application> executes test scripts chosen randomly from a specified list. - They include built-in scripts with <option>-b</> and - user-provided custom scripts with <option>-f</>. + They include built-in scripts with <option>-b</option> and + user-provided custom scripts with <option>-f</option>. Each script may be given a relative weight specified after a - <literal>@</> so as to change its drawing probability. - The default weight is <literal>1</>. - Scripts with a weight of <literal>0</> are ignored. + <literal>@</literal> so as to change its drawing probability. + The default weight is <literal>1</literal>. + Scripts with a weight of <literal>0</literal> are ignored. </para> <para> - The default built-in transaction script (also invoked with <option>-b tpcb-like</>) - issues seven commands per transaction over randomly chosen <literal>aid</>, - <literal>tid</>, <literal>bid</> and <literal>balance</>. + The default built-in transaction script (also invoked with <option>-b tpcb-like</option>) + issues seven commands per transaction over randomly chosen <literal>aid</literal>, + <literal>tid</literal>, <literal>bid</literal> and <literal>balance</literal>. The scenario is inspired by the TPC-B benchmark, but is not actually TPC-B, hence the name. </para> @@ -726,15 +726,15 @@ pgbench <optional> <replaceable>options</> </optional> <replaceable>dbname</> </orderedlist> <para> - If you select the <literal>simple-update</> built-in (also <option>-N</>), + If you select the <literal>simple-update</literal> built-in (also <option>-N</option>), steps 4 and 5 aren't included in the transaction. This will avoid update contention on these tables, but it makes the test case even less like TPC-B. </para> <para> - If you select the <literal>select-only</> built-in (also <option>-S</>), - only the <command>SELECT</> is issued. + If you select the <literal>select-only</literal> built-in (also <option>-S</option>), + only the <command>SELECT</command> is issued. </para> </refsect2> @@ -745,26 +745,26 @@ pgbench <optional> <replaceable>options</> </optional> <replaceable>dbname</> <application>pgbench</application> has support for running custom benchmark scenarios by replacing the default transaction script (described above) with a transaction script read from a file - (<option>-f</option> option). In this case a <quote>transaction</> + (<option>-f</option> option). In this case a <quote>transaction</quote> counts as one execution of a script file. </para> <para> A script file contains one or more SQL commands terminated by semicolons. Empty lines and lines beginning with - <literal>--</> are ignored. Script files can also contain - <quote>meta commands</>, which are interpreted by <application>pgbench</> + <literal>--</literal> are ignored. Script files can also contain + <quote>meta commands</quote>, which are interpreted by <application>pgbench</application> itself, as described below. </para> <note> <para> - Before <productname>PostgreSQL</> 9.6, SQL commands in script files + Before <productname>PostgreSQL</productname> 9.6, SQL commands in script files were terminated by newlines, and so they could not be continued across - lines. Now a semicolon is <emphasis>required</> to separate consecutive + lines. Now a semicolon is <emphasis>required</emphasis> to separate consecutive SQL commands (though a SQL command does not need one if it is followed by a meta command). If you need to create a script file that works with - both old and new versions of <application>pgbench</>, be sure to write + both old and new versions of <application>pgbench</application>, be sure to write each SQL command on a single line ending with a semicolon. </para> </note> @@ -773,15 +773,15 @@ pgbench <optional> <replaceable>options</> </optional> <replaceable>dbname</> There is a simple variable-substitution facility for script files. Variable names must consist of letters (including non-Latin letters), digits, and underscores. - Variables can be set by the command-line <option>-D</> option, + Variables can be set by the command-line <option>-D</option> option, explained above, or by the meta commands explained below. - In addition to any variables preset by <option>-D</> command-line options, + In addition to any variables preset by <option>-D</option> command-line options, there are a few variables that are preset automatically, listed in <xref linkend="pgbench-automatic-variables">. A value specified for these - variables using <option>-D</> takes precedence over the automatic presets. + variables using <option>-D</option> takes precedence over the automatic presets. Once set, a variable's value can be inserted into a SQL command by writing - <literal>:</><replaceable>variablename</>. When running more than + <literal>:</literal><replaceable>variablename</replaceable>. When running more than one client session, each session has its own set of variables. </para> @@ -810,7 +810,7 @@ pgbench <optional> <replaceable>options</> </optional> <replaceable>dbname</> </table> <para> - Script file meta commands begin with a backslash (<literal>\</>) and + Script file meta commands begin with a backslash (<literal>\</literal>) and normally extend to the end of the line, although they can be continued to additional lines by writing backslash-return. Arguments to a meta command are separated by white space. @@ -820,20 +820,20 @@ pgbench <optional> <replaceable>options</> </optional> <replaceable>dbname</> <variablelist> <varlistentry id='pgbench-metacommand-set'> <term> - <literal>\set <replaceable>varname</> <replaceable>expression</></literal> + <literal>\set <replaceable>varname</replaceable> <replaceable>expression</replaceable></literal> </term> <listitem> <para> - Sets variable <replaceable>varname</> to a value calculated - from <replaceable>expression</>. - The expression may contain integer constants such as <literal>5432</>, - double constants such as <literal>3.14159</>, - references to variables <literal>:</><replaceable>variablename</>, - unary operators (<literal>+</>, <literal>-</>) and binary operators - (<literal>+</>, <literal>-</>, <literal>*</>, <literal>/</>, - <literal>%</>) with their usual precedence and associativity, - <link linkend="pgbench-builtin-functions">function calls</>, and + Sets variable <replaceable>varname</replaceable> to a value calculated + from <replaceable>expression</replaceable>. + The expression may contain integer constants such as <literal>5432</literal>, + double constants such as <literal>3.14159</literal>, + references to variables <literal>:</literal><replaceable>variablename</replaceable>, + unary operators (<literal>+</literal>, <literal>-</literal>) and binary operators + (<literal>+</literal>, <literal>-</literal>, <literal>*</literal>, <literal>/</literal>, + <literal>%</literal>) with their usual precedence and associativity, + <link linkend="pgbench-builtin-functions">function calls</link>, and parentheses. </para> @@ -849,16 +849,16 @@ pgbench <optional> <replaceable>options</> </optional> <replaceable>dbname</> <varlistentry> <term> - <literal>\sleep <replaceable>number</> [ us | ms | s ]</literal> + <literal>\sleep <replaceable>number</replaceable> [ us | ms | s ]</literal> </term> <listitem> <para> Causes script execution to sleep for the specified duration in - microseconds (<literal>us</>), milliseconds (<literal>ms</>) or seconds - (<literal>s</>). If the unit is omitted then seconds are the default. - <replaceable>number</> can be either an integer constant or a - <literal>:</><replaceable>variablename</> reference to a variable + microseconds (<literal>us</literal>), milliseconds (<literal>ms</literal>) or seconds + (<literal>s</literal>). If the unit is omitted then seconds are the default. + <replaceable>number</replaceable> can be either an integer constant or a + <literal>:</literal><replaceable>variablename</replaceable> reference to a variable having an integer value. </para> @@ -872,22 +872,22 @@ pgbench <optional> <replaceable>options</> </optional> <replaceable>dbname</> <varlistentry> <term> - <literal>\setshell <replaceable>varname</> <replaceable>command</> [ <replaceable>argument</> ... ]</literal> + <literal>\setshell <replaceable>varname</replaceable> <replaceable>command</replaceable> [ <replaceable>argument</replaceable> ... ]</literal> </term> <listitem> <para> - Sets variable <replaceable>varname</> to the result of the shell command - <replaceable>command</> with the given <replaceable>argument</>(s). + Sets variable <replaceable>varname</replaceable> to the result of the shell command + <replaceable>command</replaceable> with the given <replaceable>argument</replaceable>(s). The command must return an integer value through its standard output. </para> <para> - <replaceable>command</> and each <replaceable>argument</> can be either - a text constant or a <literal>:</><replaceable>variablename</> reference - to a variable. If you want to use an <replaceable>argument</> starting + <replaceable>command</replaceable> and each <replaceable>argument</replaceable> can be either + a text constant or a <literal>:</literal><replaceable>variablename</replaceable> reference + to a variable. If you want to use an <replaceable>argument</replaceable> starting with a colon, write an additional colon at the beginning of - <replaceable>argument</>. + <replaceable>argument</replaceable>. </para> <para> @@ -900,7 +900,7 @@ pgbench <optional> <replaceable>options</> </optional> <replaceable>dbname</> <varlistentry> <term> - <literal>\shell <replaceable>command</> [ <replaceable>argument</> ... ]</literal> + <literal>\shell <replaceable>command</replaceable> [ <replaceable>argument</replaceable> ... ]</literal> </term> <listitem> @@ -924,7 +924,7 @@ pgbench <optional> <replaceable>options</> </optional> <replaceable>dbname</> <para> The functions listed in <xref linkend="pgbench-functions"> are built - into <application>pgbench</> and may be used in expressions appearing in + into <application>pgbench</application> and may be used in expressions appearing in <link linkend="pgbench-metacommand-set"><literal>\set</literal></link>. </para> @@ -943,123 +943,123 @@ pgbench <optional> <replaceable>options</> </optional> <replaceable>dbname</> </thead> <tbody> <row> - <entry><literal><function>abs(<replaceable>a</>)</></></> - <entry>same as <replaceable>a</></> - <entry>absolute value</> - <entry><literal>abs(-17)</></> - <entry><literal>17</></> + <entry><literal><function>abs(<replaceable>a</replaceable>)</function></literal></entry> + <entry>same as <replaceable>a</replaceable></entry> + <entry>absolute value</entry> + <entry><literal>abs(-17)</literal></entry> + <entry><literal>17</literal></entry> </row> <row> - <entry><literal><function>debug(<replaceable>a</>)</></></> - <entry>same as <replaceable>a</> </> - <entry>print <replaceable>a</> to <systemitem>stderr</systemitem>, - and return <replaceable>a</></> - <entry><literal>debug(5432.1)</></> - <entry><literal>5432.1</></> + <entry><literal><function>debug(<replaceable>a</replaceable>)</function></literal></entry> + <entry>same as <replaceable>a</replaceable> </entry> + <entry>print <replaceable>a</replaceable> to <systemitem>stderr</systemitem>, + and return <replaceable>a</replaceable></entry> + <entry><literal>debug(5432.1)</literal></entry> + <entry><literal>5432.1</literal></entry> </row> <row> - <entry><literal><function>double(<replaceable>i</>)</></></> - <entry>double</> - <entry>cast to double</> - <entry><literal>double(5432)</></> - <entry><literal>5432.0</></> + <entry><literal><function>double(<replaceable>i</replaceable>)</function></literal></entry> + <entry>double</entry> + <entry>cast to double</entry> + <entry><literal>double(5432)</literal></entry> + <entry><literal>5432.0</literal></entry> </row> <row> - <entry><literal><function>greatest(<replaceable>a</> [, <replaceable>...</> ] )</></></> - <entry>double if any <replaceable>a</> is double, else integer</> - <entry>largest value among arguments</> - <entry><literal>greatest(5, 4, 3, 2)</></> - <entry><literal>5</></> + <entry><literal><function>greatest(<replaceable>a</replaceable> [, <replaceable>...</replaceable> ] )</function></literal></entry> + <entry>double if any <replaceable>a</replaceable> is double, else integer</entry> + <entry>largest value among arguments</entry> + <entry><literal>greatest(5, 4, 3, 2)</literal></entry> + <entry><literal>5</literal></entry> </row> <row> - <entry><literal><function>int(<replaceable>x</>)</></></> - <entry>integer</> - <entry>cast to int</> - <entry><literal>int(5.4 + 3.8)</></> - <entry><literal>9</></> + <entry><literal><function>int(<replaceable>x</replaceable>)</function></literal></entry> + <entry>integer</entry> + <entry>cast to int</entry> + <entry><literal>int(5.4 + 3.8)</literal></entry> + <entry><literal>9</literal></entry> </row> <row> - <entry><literal><function>least(<replaceable>a</> [, <replaceable>...</> ] )</></></> - <entry>double if any <replaceable>a</> is double, else integer</> - <entry>smallest value among arguments</> - <entry><literal>least(5, 4, 3, 2.1)</></> - <entry><literal>2.1</></> + <entry><literal><function>least(<replaceable>a</replaceable> [, <replaceable>...</replaceable> ] )</function></literal></entry> + <entry>double if any <replaceable>a</replaceable> is double, else integer</entry> + <entry>smallest value among arguments</entry> + <entry><literal>least(5, 4, 3, 2.1)</literal></entry> + <entry><literal>2.1</literal></entry> </row> <row> - <entry><literal><function>pi()</></></> - <entry>double</> - <entry>value of the constant PI</> - <entry><literal>pi()</></> - <entry><literal>3.14159265358979323846</></> + <entry><literal><function>pi()</function></literal></entry> + <entry>double</entry> + <entry>value of the constant PI</entry> + <entry><literal>pi()</literal></entry> + <entry><literal>3.14159265358979323846</literal></entry> </row> <row> - <entry><literal><function>random(<replaceable>lb</>, <replaceable>ub</>)</></></> - <entry>integer</> - <entry>uniformly-distributed random integer in <literal>[lb, ub]</></> - <entry><literal>random(1, 10)</></> - <entry>an integer between <literal>1</> and <literal>10</></> + <entry><literal><function>random(<replaceable>lb</replaceable>, <replaceable>ub</replaceable>)</function></literal></entry> + <entry>integer</entry> + <entry>uniformly-distributed random integer in <literal>[lb, ub]</literal></entry> + <entry><literal>random(1, 10)</literal></entry> + <entry>an integer between <literal>1</literal> and <literal>10</literal></entry> </row> <row> - <entry><literal><function>random_exponential(<replaceable>lb</>, <replaceable>ub</>, <replaceable>parameter</>)</></></> - <entry>integer</> - <entry>exponentially-distributed random integer in <literal>[lb, ub]</>, - see below</> - <entry><literal>random_exponential(1, 10, 3.0)</></> - <entry>an integer between <literal>1</> and <literal>10</></> + <entry><literal><function>random_exponential(<replaceable>lb</replaceable>, <replaceable>ub</replaceable>, <replaceable>parameter</replaceable>)</function></literal></entry> + <entry>integer</entry> + <entry>exponentially-distributed random integer in <literal>[lb, ub]</literal>, + see below</entry> + <entry><literal>random_exponential(1, 10, 3.0)</literal></entry> + <entry>an integer between <literal>1</literal> and <literal>10</literal></entry> </row> <row> - <entry><literal><function>random_gaussian(<replaceable>lb</>, <replaceable>ub</>, <replaceable>parameter</>)</></></> - <entry>integer</> - <entry>Gaussian-distributed random integer in <literal>[lb, ub]</>, - see below</> - <entry><literal>random_gaussian(1, 10, 2.5)</></> - <entry>an integer between <literal>1</> and <literal>10</></> + <entry><literal><function>random_gaussian(<replaceable>lb</replaceable>, <replaceable>ub</replaceable>, <replaceable>parameter</replaceable>)</function></literal></entry> + <entry>integer</entry> + <entry>Gaussian-distributed random integer in <literal>[lb, ub]</literal>, + see below</entry> + <entry><literal>random_gaussian(1, 10, 2.5)</literal></entry> + <entry>an integer between <literal>1</literal> and <literal>10</literal></entry> </row> <row> - <entry><literal><function>sqrt(<replaceable>x</>)</></></> - <entry>double</> - <entry>square root</> - <entry><literal>sqrt(2.0)</></> - <entry><literal>1.414213562</></> + <entry><literal><function>sqrt(<replaceable>x</replaceable>)</function></literal></entry> + <entry>double</entry> + <entry>square root</entry> + <entry><literal>sqrt(2.0)</literal></entry> + <entry><literal>1.414213562</literal></entry> </row> </tbody> </tgroup> </table> <para> - The <literal>random</> function generates values using a uniform + The <literal>random</literal> function generates values using a uniform distribution, that is all the values are drawn within the specified - range with equal probability. The <literal>random_exponential</> and - <literal>random_gaussian</> functions require an additional double + range with equal probability. The <literal>random_exponential</literal> and + <literal>random_gaussian</literal> functions require an additional double parameter which determines the precise shape of the distribution. </para> <itemizedlist> <listitem> <para> - For an exponential distribution, <replaceable>parameter</> + For an exponential distribution, <replaceable>parameter</replaceable> controls the distribution by truncating a quickly-decreasing - exponential distribution at <replaceable>parameter</>, and then + exponential distribution at <replaceable>parameter</replaceable>, and then projecting onto integers between the bounds. To be precise, with <literallayout> f(x) = exp(-parameter * (x - min) / (max - min + 1)) / (1 - exp(-parameter)) </literallayout> - Then value <replaceable>i</> between <replaceable>min</> and - <replaceable>max</> inclusive is drawn with probability: - <literal>f(i) - f(i + 1)</>. + Then value <replaceable>i</replaceable> between <replaceable>min</replaceable> and + <replaceable>max</replaceable> inclusive is drawn with probability: + <literal>f(i) - f(i + 1)</literal>. </para> <para> - Intuitively, the larger the <replaceable>parameter</>, the more - frequently values close to <replaceable>min</> are accessed, and the - less frequently values close to <replaceable>max</> are accessed. - The closer to 0 <replaceable>parameter</> is, the flatter (more + Intuitively, the larger the <replaceable>parameter</replaceable>, the more + frequently values close to <replaceable>min</replaceable> are accessed, and the + less frequently values close to <replaceable>max</replaceable> are accessed. + The closer to 0 <replaceable>parameter</replaceable> is, the flatter (more uniform) the access distribution. A crude approximation of the distribution is that the most frequent 1% - values in the range, close to <replaceable>min</>, are drawn - <replaceable>parameter</>% of the time. - The <replaceable>parameter</> value must be strictly positive. + values in the range, close to <replaceable>min</replaceable>, are drawn + <replaceable>parameter</replaceable>% of the time. + The <replaceable>parameter</replaceable> value must be strictly positive. </para> </listitem> @@ -1067,32 +1067,32 @@ f(x) = exp(-parameter * (x - min) / (max - min + 1)) / (1 - exp(-parameter)) <para> For a Gaussian distribution, the interval is mapped onto a standard normal distribution (the classical bell-shaped Gaussian curve) truncated - at <literal>-parameter</> on the left and <literal>+parameter</> + at <literal>-parameter</literal> on the left and <literal>+parameter</literal> on the right. Values in the middle of the interval are more likely to be drawn. - To be precise, if <literal>PHI(x)</> is the cumulative distribution - function of the standard normal distribution, with mean <literal>mu</> - defined as <literal>(max + min) / 2.0</>, with + To be precise, if <literal>PHI(x)</literal> is the cumulative distribution + function of the standard normal distribution, with mean <literal>mu</literal> + defined as <literal>(max + min) / 2.0</literal>, with <literallayout> f(x) = PHI(2.0 * parameter * (x - mu) / (max - min + 1)) / (2.0 * PHI(parameter) - 1) </literallayout> - then value <replaceable>i</> between <replaceable>min</> and - <replaceable>max</> inclusive is drawn with probability: - <literal>f(i + 0.5) - f(i - 0.5)</>. - Intuitively, the larger the <replaceable>parameter</>, the more + then value <replaceable>i</replaceable> between <replaceable>min</replaceable> and + <replaceable>max</replaceable> inclusive is drawn with probability: + <literal>f(i + 0.5) - f(i - 0.5)</literal>. + Intuitively, the larger the <replaceable>parameter</replaceable>, the more frequently values close to the middle of the interval are drawn, and the - less frequently values close to the <replaceable>min</> and - <replaceable>max</> bounds. About 67% of values are drawn from the - middle <literal>1.0 / parameter</>, that is a relative - <literal>0.5 / parameter</> around the mean, and 95% in the middle - <literal>2.0 / parameter</>, that is a relative - <literal>1.0 / parameter</> around the mean; for instance, if - <replaceable>parameter</> is 4.0, 67% of values are drawn from the + less frequently values close to the <replaceable>min</replaceable> and + <replaceable>max</replaceable> bounds. About 67% of values are drawn from the + middle <literal>1.0 / parameter</literal>, that is a relative + <literal>0.5 / parameter</literal> around the mean, and 95% in the middle + <literal>2.0 / parameter</literal>, that is a relative + <literal>1.0 / parameter</literal> around the mean; for instance, if + <replaceable>parameter</replaceable> is 4.0, 67% of values are drawn from the middle quarter (1.0 / 4.0) of the interval (i.e. from - <literal>3.0 / 8.0</> to <literal>5.0 / 8.0</>) and 95% from - the middle half (<literal>2.0 / 4.0</>) of the interval (second and third - quartiles). The minimum <replaceable>parameter</> is 2.0 for performance + <literal>3.0 / 8.0</literal> to <literal>5.0 / 8.0</literal>) and 95% from + the middle half (<literal>2.0 / 4.0</literal>) of the interval (second and third + quartiles). The minimum <replaceable>parameter</replaceable> is 2.0 for performance of the Box-Muller transform. </para> </listitem> @@ -1128,21 +1128,21 @@ END; <title>Per-Transaction Logging</title> <para> - With the <option>-l</> option (but without + With the <option>-l</option> option (but without the <option>--aggregate-interval</option> option), - <application>pgbench</> writes information about each transaction + <application>pgbench</application> writes information about each transaction to a log file. The log file will be named - <filename><replaceable>prefix</>.<replaceable>nnn</></filename>, - where <replaceable>prefix</> defaults to <literal>pgbench_log</>, and - <replaceable>nnn</> is the PID of the + <filename><replaceable>prefix</replaceable>.<replaceable>nnn</replaceable></filename>, + where <replaceable>prefix</replaceable> defaults to <literal>pgbench_log</literal>, and + <replaceable>nnn</replaceable> is the PID of the <application>pgbench</application> process. - The prefix can be changed by using the <option>--log-prefix</> option. - If the <option>-j</> option is 2 or higher, so that there are multiple + The prefix can be changed by using the <option>--log-prefix</option> option. + If the <option>-j</option> option is 2 or higher, so that there are multiple worker threads, each will have its own log file. The first worker will use the same name for its log file as in the standard single worker case. The additional log files for the other workers will be named - <filename><replaceable>prefix</>.<replaceable>nnn</>.<replaceable>mmm</></filename>, - where <replaceable>mmm</> is a sequential number for each worker starting + <filename><replaceable>prefix</replaceable>.<replaceable>nnn</replaceable>.<replaceable>mmm</replaceable></filename>, + where <replaceable>mmm</replaceable> is a sequential number for each worker starting with 1. </para> @@ -1150,27 +1150,27 @@ END; The format of the log is: <synopsis> -<replaceable>client_id</> <replaceable>transaction_no</> <replaceable>time</> <replaceable>script_no</> <replaceable>time_epoch</> <replaceable>time_us</> <optional> <replaceable>schedule_lag</replaceable> </optional> +<replaceable>client_id</replaceable> <replaceable>transaction_no</replaceable> <replaceable>time</replaceable> <replaceable>script_no</replaceable> <replaceable>time_epoch</replaceable> <replaceable>time_us</replaceable> <optional> <replaceable>schedule_lag</replaceable> </optional> </synopsis> where - <replaceable>client_id</> indicates which client session ran the transaction, - <replaceable>transaction_no</> counts how many transactions have been + <replaceable>client_id</replaceable> indicates which client session ran the transaction, + <replaceable>transaction_no</replaceable> counts how many transactions have been run by that session, - <replaceable>time</> is the total elapsed transaction time in microseconds, - <replaceable>script_no</> identifies which script file was used (useful when - multiple scripts were specified with <option>-f</> or <option>-b</>), - and <replaceable>time_epoch</>/<replaceable>time_us</> are a + <replaceable>time</replaceable> is the total elapsed transaction time in microseconds, + <replaceable>script_no</replaceable> identifies which script file was used (useful when + multiple scripts were specified with <option>-f</option> or <option>-b</option>), + and <replaceable>time_epoch</replaceable>/<replaceable>time_us</replaceable> are a Unix-epoch time stamp and an offset in microseconds (suitable for creating an ISO 8601 time stamp with fractional seconds) showing when the transaction completed. - The <replaceable>schedule_lag</> field is the difference between the + The <replaceable>schedule_lag</replaceable> field is the difference between the transaction's scheduled start time, and the time it actually started, in - microseconds. It is only present when the <option>--rate</> option is used. - When both <option>--rate</> and <option>--latency-limit</> are used, - the <replaceable>time</> for a skipped transaction will be reported as - <literal>skipped</>. + microseconds. It is only present when the <option>--rate</option> option is used. + When both <option>--rate</option> and <option>--latency-limit</option> are used, + the <replaceable>time</replaceable> for a skipped transaction will be reported as + <literal>skipped</literal>. </para> <para> @@ -1182,9 +1182,9 @@ END; 0 202 2038 0 1175850569 2663 </screen> - Another example with <literal>--rate=100</> - and <literal>--latency-limit=5</> (note the additional - <replaceable>schedule_lag</> column): + Another example with <literal>--rate=100</literal> + and <literal>--latency-limit=5</literal> (note the additional + <replaceable>schedule_lag</replaceable> column): <screen> 0 81 4621 0 1412881037 912698 3005 0 82 6173 0 1412881037 914578 4304 @@ -1201,7 +1201,7 @@ END; <para> When running a long test on hardware that can handle a lot of transactions, - the log files can become very large. The <option>--sampling-rate</> option + the log files can become very large. The <option>--sampling-rate</option> option can be used to log only a random sample of transactions. </para> </refsect2> @@ -1214,30 +1214,30 @@ END; format is used for the log files: <synopsis> -<replaceable>interval_start</> <replaceable>num_transactions</> <replaceable>sum_latency</> <replaceable>sum_latency_2</> <replaceable>min_latency</> <replaceable>max_latency</> <optional> <replaceable>sum_lag</> <replaceable>sum_lag_2</> <replaceable>min_lag</> <replaceable>max_lag</> <optional> <replaceable>skipped</> </optional> </optional> +<replaceable>interval_start</replaceable> <replaceable>num_transactions</replaceable> <replaceable>sum_latency</replaceable> <replaceable>sum_latency_2</replaceable> <replaceable>min_latency</replaceable> <replaceable>max_latency</replaceable> <optional> <replaceable>sum_lag</replaceable> <replaceable>sum_lag_2</replaceable> <replaceable>min_lag</replaceable> <replaceable>max_lag</replaceable> <optional> <replaceable>skipped</replaceable> </optional> </optional> </synopsis> where - <replaceable>interval_start</> is the start of the interval (as a Unix + <replaceable>interval_start</replaceable> is the start of the interval (as a Unix epoch time stamp), - <replaceable>num_transactions</> is the number of transactions + <replaceable>num_transactions</replaceable> is the number of transactions within the interval, <replaceable>sum_latency</replaceable> is the sum of the transaction latencies within the interval, <replaceable>sum_latency_2</replaceable> is the sum of squares of the transaction latencies within the interval, - <replaceable>min_latency</> is the minimum latency within the interval, + <replaceable>min_latency</replaceable> is the minimum latency within the interval, and - <replaceable>max_latency</> is the maximum latency within the interval. + <replaceable>max_latency</replaceable> is the maximum latency within the interval. The next fields, - <replaceable>sum_lag</>, <replaceable>sum_lag_2</>, <replaceable>min_lag</>, - and <replaceable>max_lag</>, are only present if the <option>--rate</> + <replaceable>sum_lag</replaceable>, <replaceable>sum_lag_2</replaceable>, <replaceable>min_lag</replaceable>, + and <replaceable>max_lag</replaceable>, are only present if the <option>--rate</option> option is used. They provide statistics about the time each transaction had to wait for the previous one to finish, i.e. the difference between each transaction's scheduled start time and the time it actually started. - The very last field, <replaceable>skipped</>, - is only present if the <option>--latency-limit</> option is used, too. + The very last field, <replaceable>skipped</replaceable>, + is only present if the <option>--latency-limit</option> option is used, too. It counts the number of transactions skipped because they would have started too late. Each transaction is counted in the interval when it was committed. @@ -1265,7 +1265,7 @@ END; <title>Per-Statement Latencies</title> <para> - With the <option>-r</> option, <application>pgbench</> collects + With the <option>-r</option> option, <application>pgbench</application> collects the elapsed transaction time of each statement executed by every client. It then reports an average of those values, referred to as the latency for each statement, after the benchmark has finished. @@ -1321,14 +1321,14 @@ script statistics: <title>Good Practices</title> <para> - It is very easy to use <application>pgbench</> to produce completely + It is very easy to use <application>pgbench</application> to produce completely meaningless numbers. Here are some guidelines to help you get useful results. </para> <para> - In the first place, <emphasis>never</> believe any test that runs - for only a few seconds. Use the <option>-t</> or <option>-T</> option + In the first place, <emphasis>never</emphasis> believe any test that runs + for only a few seconds. Use the <option>-t</option> or <option>-T</option> option to make the run last at least a few minutes, so as to average out noise. In some cases you could need hours to get numbers that are reproducible. It's a good idea to try the test run a few times, to find out if your @@ -1337,11 +1337,11 @@ script statistics: <para> For the default TPC-B-like test scenario, the initialization scale factor - (<option>-s</>) should be at least as large as the largest number of - clients you intend to test (<option>-c</>); else you'll mostly be - measuring update contention. There are only <option>-s</> rows in - the <structname>pgbench_branches</> table, and every transaction wants to - update one of them, so <option>-c</> values in excess of <option>-s</> + (<option>-s</option>) should be at least as large as the largest number of + clients you intend to test (<option>-c</option>); else you'll mostly be + measuring update contention. There are only <option>-s</option> rows in + the <structname>pgbench_branches</structname> table, and every transaction wants to + update one of them, so <option>-c</option> values in excess of <option>-s</option> will undoubtedly result in lots of transactions blocked waiting for other transactions. </para> @@ -1356,11 +1356,11 @@ script statistics: </para> <para> - A limitation of <application>pgbench</> is that it can itself become + A limitation of <application>pgbench</application> is that it can itself become the bottleneck when trying to test a large number of client sessions. - This can be alleviated by running <application>pgbench</> on a different + This can be alleviated by running <application>pgbench</application> on a different machine from the database server, although low network latency will be - essential. It might even be useful to run several <application>pgbench</> + essential. It might even be useful to run several <application>pgbench</application> instances concurrently, on several client machines, against the same database server. </para> diff --git a/doc/src/sgml/ref/pgtestfsync.sgml b/doc/src/sgml/ref/pgtestfsync.sgml index 467d6e647a2..811438ceaf3 100644 --- a/doc/src/sgml/ref/pgtestfsync.sgml +++ b/doc/src/sgml/ref/pgtestfsync.sgml @@ -27,7 +27,7 @@ <title>Description</title> <para> - <application>pg_test_fsync</> is intended to give you a reasonable + <application>pg_test_fsync</application> is intended to give you a reasonable idea of what the fastest <xref linkend="guc-wal-sync-method"> is on your specific system, as well as supplying diagnostic information in the event of an identified I/O @@ -57,9 +57,9 @@ <para> Specifies the file name to write test data in. This file should be in the same file system that the - <filename>pg_wal</> directory is or will be placed in. - (<filename>pg_wal</> contains the <acronym>WAL</> files.) - The default is <filename>pg_test_fsync.out</> in the current + <filename>pg_wal</filename> directory is or will be placed in. + (<filename>pg_wal</filename> contains the <acronym>WAL</acronym> files.) + The default is <filename>pg_test_fsync.out</filename> in the current directory. </para> </listitem> @@ -79,8 +79,8 @@ </varlistentry> <varlistentry> - <term><option>-V</></term> - <term><option>--version</></term> + <term><option>-V</option></term> + <term><option>--version</option></term> <listitem> <para> Print the <application>pg_test_fsync</application> version and exit. @@ -89,8 +89,8 @@ </varlistentry> <varlistentry> - <term><option>-?</></term> - <term><option>--help</></term> + <term><option>-?</option></term> + <term><option>--help</option></term> <listitem> <para> Show help about <application>pg_test_fsync</application> command line diff --git a/doc/src/sgml/ref/pgtesttiming.sgml b/doc/src/sgml/ref/pgtesttiming.sgml index c659101361a..966546747e0 100644 --- a/doc/src/sgml/ref/pgtesttiming.sgml +++ b/doc/src/sgml/ref/pgtesttiming.sgml @@ -27,7 +27,7 @@ <title>Description</title> <para> - <application>pg_test_timing</> is a tool to measure the timing overhead + <application>pg_test_timing</application> is a tool to measure the timing overhead on your system and confirm that the system time never moves backwards. Systems that are slow to collect timing data can give less accurate <command>EXPLAIN ANALYZE</command> results. @@ -57,8 +57,8 @@ </varlistentry> <varlistentry> - <term><option>-V</></term> - <term><option>--version</></term> + <term><option>-V</option></term> + <term><option>--version</option></term> <listitem> <para> Print the <application>pg_test_timing</application> version and exit. @@ -67,8 +67,8 @@ </varlistentry> <varlistentry> - <term><option>-?</></term> - <term><option>--help</></term> + <term><option>-?</option></term> + <term><option>--help</option></term> <listitem> <para> Show help about <application>pg_test_timing</application> command line diff --git a/doc/src/sgml/ref/pgupgrade.sgml b/doc/src/sgml/ref/pgupgrade.sgml index c3df343571f..8785a3ded2f 100644 --- a/doc/src/sgml/ref/pgupgrade.sgml +++ b/doc/src/sgml/ref/pgupgrade.sgml @@ -35,38 +35,38 @@ <title>Description</title> <para> - <application>pg_upgrade</> (formerly called <application>pg_migrator</>) allows data - stored in <productname>PostgreSQL</> data files to be upgraded to a later <productname>PostgreSQL</> + <application>pg_upgrade</application> (formerly called <application>pg_migrator</application>) allows data + stored in <productname>PostgreSQL</productname> data files to be upgraded to a later <productname>PostgreSQL</productname> major version without the data dump/reload typically required for major version upgrades, e.g. from 9.6.3 to the current major release - of <productname>PostgreSQL</>. It is not required for minor version upgrades, e.g. from + of <productname>PostgreSQL</productname>. It is not required for minor version upgrades, e.g. from 9.6.2 to 9.6.3. </para> <para> Major PostgreSQL releases regularly add new features that often change the layout of the system tables, but the internal data storage - format rarely changes. <application>pg_upgrade</> uses this fact + format rarely changes. <application>pg_upgrade</application> uses this fact to perform rapid upgrades by creating new system tables and simply reusing the old user data files. If a future major release ever changes the data storage format in a way that makes the old data - format unreadable, <application>pg_upgrade</> will not be usable + format unreadable, <application>pg_upgrade</application> will not be usable for such upgrades. (The community will attempt to avoid such situations.) </para> <para> - <application>pg_upgrade</> does its best to + <application>pg_upgrade</application> does its best to make sure the old and new clusters are binary-compatible, e.g. by checking for compatible compile-time settings, including 32/64-bit binaries. It is important that any external modules are also binary compatible, though this cannot - be checked by <application>pg_upgrade</>. + be checked by <application>pg_upgrade</application>. </para> <para> pg_upgrade supports upgrades from 8.4.X and later to the current - major release of <productname>PostgreSQL</>, including snapshot and beta releases. + major release of <productname>PostgreSQL</productname>, including snapshot and beta releases. </para> </refsect1> @@ -79,17 +79,17 @@ <variablelist> <varlistentry> - <term><option>-b</option> <replaceable>bindir</></term> - <term><option>--old-bindir=</option><replaceable>bindir</></term> + <term><option>-b</option> <replaceable>bindir</replaceable></term> + <term><option>--old-bindir=</option><replaceable>bindir</replaceable></term> <listitem><para>the old PostgreSQL executable directory; - environment variable <envar>PGBINOLD</></para></listitem> + environment variable <envar>PGBINOLD</envar></para></listitem> </varlistentry> <varlistentry> - <term><option>-B</option> <replaceable>bindir</></term> - <term><option>--new-bindir=</option><replaceable>bindir</></term> + <term><option>-B</option> <replaceable>bindir</replaceable></term> + <term><option>--new-bindir=</option><replaceable>bindir</replaceable></term> <listitem><para>the new PostgreSQL executable directory; - environment variable <envar>PGBINNEW</></para></listitem> + environment variable <envar>PGBINNEW</envar></para></listitem> </varlistentry> <varlistentry> @@ -99,17 +99,17 @@ </varlistentry> <varlistentry> - <term><option>-d</option> <replaceable>datadir</></term> - <term><option>--old-datadir=</option><replaceable>datadir</></term> + <term><option>-d</option> <replaceable>datadir</replaceable></term> + <term><option>--old-datadir=</option><replaceable>datadir</replaceable></term> <listitem><para>the old cluster data directory; environment - variable <envar>PGDATAOLD</></para></listitem> + variable <envar>PGDATAOLD</envar></para></listitem> </varlistentry> <varlistentry> - <term><option>-D</option> <replaceable>datadir</></term> - <term><option>--new-datadir=</option><replaceable>datadir</></term> + <term><option>-D</option> <replaceable>datadir</replaceable></term> + <term><option>--new-datadir=</option><replaceable>datadir</replaceable></term> <listitem><para>the new cluster data directory; environment - variable <envar>PGDATANEW</></para></listitem> + variable <envar>PGDATANEW</envar></para></listitem> </varlistentry> <varlistentry> @@ -143,17 +143,17 @@ </varlistentry> <varlistentry> - <term><option>-p</option> <replaceable>port</></term> - <term><option>--old-port=</option><replaceable>port</></term> + <term><option>-p</option> <replaceable>port</replaceable></term> + <term><option>--old-port=</option><replaceable>port</replaceable></term> <listitem><para>the old cluster port number; environment - variable <envar>PGPORTOLD</></para></listitem> + variable <envar>PGPORTOLD</envar></para></listitem> </varlistentry> <varlistentry> - <term><option>-P</option> <replaceable>port</></term> - <term><option>--new-port=</option><replaceable>port</></term> + <term><option>-P</option> <replaceable>port</replaceable></term> + <term><option>--new-port=</option><replaceable>port</replaceable></term> <listitem><para>the new cluster port number; environment - variable <envar>PGPORTNEW</></para></listitem> + variable <envar>PGPORTNEW</envar></para></listitem> </varlistentry> <varlistentry> @@ -164,10 +164,10 @@ </varlistentry> <varlistentry> - <term><option>-U</option> <replaceable>username</></term> - <term><option>--username=</option><replaceable>username</></term> + <term><option>-U</option> <replaceable>username</replaceable></term> + <term><option>--username=</option><replaceable>username</replaceable></term> <listitem><para>cluster's install user name; environment - variable <envar>PGUSER</></para></listitem> + variable <envar>PGUSER</envar></para></listitem> </varlistentry> <varlistentry> @@ -207,17 +207,17 @@ <para> If you are using a version-specific installation directory, e.g. - <filename>/opt/PostgreSQL/&majorversion;</>, you do not need to move the old cluster. The + <filename>/opt/PostgreSQL/&majorversion;</filename>, you do not need to move the old cluster. The graphical installers all use version-specific installation directories. </para> <para> If your installation directory is not version-specific, e.g. - <filename>/usr/local/pgsql</>, it is necessary to move the current PostgreSQL install - directory so it does not interfere with the new <productname>PostgreSQL</> installation. - Once the current <productname>PostgreSQL</> server is shut down, it is safe to rename the + <filename>/usr/local/pgsql</filename>, it is necessary to move the current PostgreSQL install + directory so it does not interfere with the new <productname>PostgreSQL</productname> installation. + Once the current <productname>PostgreSQL</productname> server is shut down, it is safe to rename the PostgreSQL installation directory; assuming the old directory is - <filename>/usr/local/pgsql</>, you can do: + <filename>/usr/local/pgsql</filename>, you can do: <programlisting> mv /usr/local/pgsql /usr/local/pgsql.old @@ -230,8 +230,8 @@ mv /usr/local/pgsql /usr/local/pgsql.old <title>For source installs, build the new version</title> <para> - Build the new PostgreSQL source with <command>configure</> flags that are compatible - with the old cluster. <application>pg_upgrade</> will check <command>pg_controldata</> to make + Build the new PostgreSQL source with <command>configure</command> flags that are compatible + with the old cluster. <application>pg_upgrade</application> will check <command>pg_controldata</command> to make sure all settings are compatible before starting the upgrade. </para> </step> @@ -241,7 +241,7 @@ mv /usr/local/pgsql /usr/local/pgsql.old <para> Install the new server's binaries and support - files. <application>pg_upgrade</> is included in a default installation. + files. <application>pg_upgrade</application> is included in a default installation. </para> <para> @@ -273,7 +273,7 @@ make prefix=/usr/local/pgsql.new install into the new cluster, e.g. <filename>pgcrypto.so</filename>, whether they are from <filename>contrib</filename> or some other source. Do not install the schema definitions, e.g. - <command>CREATE EXTENSION pgcrypto</>, because these will be upgraded + <command>CREATE EXTENSION pgcrypto</command>, because these will be upgraded from the old cluster. Also, any custom full text search files (dictionary, synonym, thesaurus, stop words) must also be copied to the new cluster. @@ -284,9 +284,9 @@ make prefix=/usr/local/pgsql.new install <title>Adjust authentication</title> <para> - <command>pg_upgrade</> will connect to the old and new servers several - times, so you might want to set authentication to <literal>peer</> - in <filename>pg_hba.conf</> or use a <filename>~/.pgpass</> file + <command>pg_upgrade</command> will connect to the old and new servers several + times, so you might want to set authentication to <literal>peer</literal> + in <filename>pg_hba.conf</filename> or use a <filename>~/.pgpass</filename> file (see <xref linkend="libpq-pgpass">). </para> </step> @@ -322,23 +322,23 @@ NET STOP postgresql-&majorversion; <para> If you are upgrading standby servers using methods outlined in section <xref linkend="pgupgrade-step-replicas">, verify that the old standby - servers are caught up by running <application>pg_controldata</> + servers are caught up by running <application>pg_controldata</application> against the old primary and standby clusters. Verify that the - <quote>Latest checkpoint location</> values match in all clusters. + <quote>Latest checkpoint location</quote> values match in all clusters. (There will be a mismatch if old standby servers were shut down - before the old primary.) Also, change <varname>wal_level</> to - <literal>replica</> in the <filename>postgresql.conf</> file on the + before the old primary.) Also, change <varname>wal_level</varname> to + <literal>replica</literal> in the <filename>postgresql.conf</filename> file on the new primary cluster. </para> </step> <step> - <title>Run <application>pg_upgrade</></title> + <title>Run <application>pg_upgrade</application></title> <para> - Always run the <application>pg_upgrade</> binary of the new server, not the old one. - <application>pg_upgrade</> requires the specification of the old and new cluster's - data and executable (<filename>bin</>) directories. You can also specify + Always run the <application>pg_upgrade</application> binary of the new server, not the old one. + <application>pg_upgrade</application> requires the specification of the old and new cluster's + data and executable (<filename>bin</filename>) directories. You can also specify user and port values, and whether you want the data files linked instead of the default copy behavior. </para> @@ -349,13 +349,13 @@ NET STOP postgresql-&majorversion; your old cluster once you start the new cluster after the upgrade. Link mode also requires that the old and new cluster data directories be in the - same file system. (Tablespaces and <filename>pg_wal</> can be on - different file systems.) See <literal>pg_upgrade --help</> for a full + same file system. (Tablespaces and <filename>pg_wal</filename> can be on + different file systems.) See <literal>pg_upgrade --help</literal> for a full list of options. </para> <para> - The <option>--jobs</> option allows multiple CPU cores to be used + The <option>--jobs</option> option allows multiple CPU cores to be used for copying/linking of files and to dump and reload database schemas in parallel; a good place to start is the maximum of the number of CPU cores and tablespaces. This option can dramatically reduce the @@ -365,14 +365,14 @@ NET STOP postgresql-&majorversion; <para> For Windows users, you must be logged into an administrative account, and - then start a shell as the <literal>postgres</> user and set the proper path: + then start a shell as the <literal>postgres</literal> user and set the proper path: <programlisting> RUNAS /USER:postgres "CMD.EXE" SET PATH=%PATH%;C:\Program Files\PostgreSQL\&majorversion;\bin; </programlisting> - and then run <application>pg_upgrade</> with quoted directories, e.g.: + and then run <application>pg_upgrade</application> with quoted directories, e.g.: <programlisting> pg_upgrade.exe @@ -382,19 +382,19 @@ pg_upgrade.exe --new-bindir "C:/Program Files/PostgreSQL/&majorversion;/bin" </programlisting> - Once started, <command>pg_upgrade</> will verify the two clusters are compatible - and then do the upgrade. You can use <command>pg_upgrade --check</> + Once started, <command>pg_upgrade</command> will verify the two clusters are compatible + and then do the upgrade. You can use <command>pg_upgrade --check</command> to perform only the checks, even if the old server is still - running. <command>pg_upgrade --check</> will also outline any + running. <command>pg_upgrade --check</command> will also outline any manual adjustments you will need to make after the upgrade. If you - are going to be using link mode, you should use the <option>--link</> + are going to be using link mode, you should use the <option>--link</option> option with <option>--check</option> to enable link-mode-specific checks. - <command>pg_upgrade</> requires write permission in the current directory. + <command>pg_upgrade</command> requires write permission in the current directory. </para> <para> Obviously, no one should be accessing the clusters during the - upgrade. <application>pg_upgrade</> defaults to running servers + upgrade. <application>pg_upgrade</application> defaults to running servers on port 50432 to avoid unintended client connections. You can use the same port number for both clusters when doing an upgrade because the old and new clusters will not be running at the @@ -403,7 +403,7 @@ pg_upgrade.exe </para> <para> - If an error occurs while restoring the database schema, <command>pg_upgrade</> will + If an error occurs while restoring the database schema, <command>pg_upgrade</command> will exit and you will have to revert to the old cluster as outlined in <xref linkend="pgupgrade-step-revert"> below. To try <command>pg_upgrade</command> again, you will need to modify the old cluster so the pg_upgrade schema restore succeeds. If the problem is a @@ -420,16 +420,16 @@ pg_upgrade.exe If you used link mode and have Streaming Replication (see <xref linkend="streaming-replication">) or Log-Shipping (see <xref linkend="warm-standby">) standby servers, you can follow these steps to - quickly upgrade them. You will not be running <application>pg_upgrade</> on - the standby servers, but rather <application>rsync</> on the primary. + quickly upgrade them. You will not be running <application>pg_upgrade</application> on + the standby servers, but rather <application>rsync</application> on the primary. Do not start any servers yet. </para> <para> - If you did <emphasis>not</> use link mode, do not have or do not - want to use <application>rsync</>, or want an easier solution, skip + If you did <emphasis>not</emphasis> use link mode, do not have or do not + want to use <application>rsync</application>, or want an easier solution, skip the instructions in this section and simply recreate the standby - servers once <application>pg_upgrade</> completes and the new primary + servers once <application>pg_upgrade</application> completes and the new primary is running. </para> @@ -445,11 +445,11 @@ pg_upgrade.exe </step> <step> - <title>Make sure the new standby data directories do <emphasis>not</> exist</title> + <title>Make sure the new standby data directories do <emphasis>not</emphasis> exist</title> <para> - Make sure the new standby data directories do <emphasis>not</> - exist or are empty. If <application>initdb</> was run, delete + Make sure the new standby data directories do <emphasis>not</emphasis> + exist or are empty. If <application>initdb</application> was run, delete the standby servers' new data directories. </para> </step> @@ -477,32 +477,32 @@ pg_upgrade.exe <para> Save any configuration files from the old standbys' data - directories you need to keep, e.g. <filename>postgresql.conf</>, - <literal>recovery.conf</>, because these will be overwritten or + directories you need to keep, e.g. <filename>postgresql.conf</filename>, + <literal>recovery.conf</literal>, because these will be overwritten or removed in the next step. </para> </step> <step> - <title>Run <application>rsync</></title> + <title>Run <application>rsync</application></title> <para> When using link mode, standby servers can be quickly upgraded using - <application>rsync</>. To accomplish this, from a directory on + <application>rsync</application>. To accomplish this, from a directory on the primary server that is above the old and new database cluster - directories, run this on the <emphasis>primary</> for each standby + directories, run this on the <emphasis>primary</emphasis> for each standby server: <programlisting> rsync --archive --delete --hard-links --size-only --no-inc-recursive old_pgdata new_pgdata remote_dir </programlisting> - where <option>old_pgdata</> and <option>new_pgdata</> are relative - to the current directory on the primary, and <option>remote_dir</> - is <emphasis>above</> the old and new cluster directories + where <option>old_pgdata</option> and <option>new_pgdata</option> are relative + to the current directory on the primary, and <option>remote_dir</option> + is <emphasis>above</emphasis> the old and new cluster directories on the standby. The directory structure under the specified directories on the primary and standbys must match. Consult the - <application>rsync</> manual page for details on specifying the + <application>rsync</application> manual page for details on specifying the remote directory, e.g. <programlisting> @@ -511,37 +511,37 @@ rsync --archive --delete --hard-links --size-only --no-inc-recursive /opt/Postgr </programlisting> You can verify what the command will do using - <application>rsync</>'s <option>--dry-run</> option. While - <application>rsync</> must be run on the primary for at least one - standby, it is possible to run <application>rsync</> on an upgraded + <application>rsync</application>'s <option>--dry-run</option> option. While + <application>rsync</application> must be run on the primary for at least one + standby, it is possible to run <application>rsync</application> on an upgraded standby to upgrade other standbys, as long as the upgraded standby has not been started. </para> <para> What this does is to record the links created by - <application>pg_upgrade</>'s link mode that connect files in the + <application>pg_upgrade</application>'s link mode that connect files in the old and new clusters on the primary server. It then finds matching files in the standby's old cluster and creates links for them in the standby's new cluster. Files that were not linked on the primary are copied from the primary to the standby. (They are usually small.) This provides rapid standby upgrades. Unfortunately, - <application>rsync</> needlessly copies files associated with + <application>rsync</application> needlessly copies files associated with temporary and unlogged tables because these files don't normally exist on standby servers. </para> <para> If you have tablespaces, you will need to run a similar - <application>rsync</> command for each tablespace directory, e.g.: + <application>rsync</application> command for each tablespace directory, e.g.: <programlisting> rsync --archive --delete --hard-links --size-only --no-inc-recursive /vol1/pg_tblsp/PG_9.5_201510051 \ /vol1/pg_tblsp/PG_9.6_201608131 standby.example.com:/vol1/pg_tblsp </programlisting> - If you have relocated <filename>pg_wal</> outside the data - directories, <application>rsync</> must be run on those directories + If you have relocated <filename>pg_wal</filename> outside the data + directories, <application>rsync</application> must be run on those directories too. </para> </step> @@ -551,7 +551,7 @@ rsync --archive --delete --hard-links --size-only --no-inc-recursive /vol1/pg_tb <para> Configure the servers for log shipping. (You do not need to run - <function>pg_start_backup()</> and <function>pg_stop_backup()</> + <function>pg_start_backup()</function> and <function>pg_stop_backup()</function> or take a file system backup as the standbys are still synchronized with the primary.) </para> @@ -562,12 +562,12 @@ rsync --archive --delete --hard-links --size-only --no-inc-recursive /vol1/pg_tb </step> <step> - <title>Restore <filename>pg_hba.conf</></title> + <title>Restore <filename>pg_hba.conf</filename></title> <para> - If you modified <filename>pg_hba.conf</>, restore its original settings. + If you modified <filename>pg_hba.conf</filename>, restore its original settings. It might also be necessary to adjust other configuration files in the new - cluster to match the old cluster, e.g. <filename>postgresql.conf</>. + cluster to match the old cluster, e.g. <filename>postgresql.conf</filename>. </para> </step> @@ -576,7 +576,7 @@ rsync --archive --delete --hard-links --size-only --no-inc-recursive /vol1/pg_tb <para> The new server can now be safely started, and then any - <application>rsync</>'ed standby servers. + <application>rsync</application>'ed standby servers. </para> </step> @@ -612,7 +612,7 @@ psql --username=postgres --file=script.sql postgres <title>Statistics</title> <para> - Because optimizer statistics are not transferred by <command>pg_upgrade</>, you will + Because optimizer statistics are not transferred by <command>pg_upgrade</command>, you will be instructed to run a command to regenerate that information at the end of the upgrade. You might need to set connection parameters to match your new cluster. @@ -628,7 +628,7 @@ psql --username=postgres --file=script.sql postgres <command>pg_upgrade</command> completes. (Automatic deletion is not possible if you have user-defined tablespaces inside the old data directory.) You can also delete the old installation directories - (e.g. <filename>bin</>, <filename>share</>). + (e.g. <filename>bin</filename>, <filename>share</filename>). </para> </step> @@ -643,7 +643,7 @@ psql --username=postgres --file=script.sql postgres <listitem> <para> If you ran <command>pg_upgrade</command> - with <option>--check</>, no modifications were made to the old + with <option>--check</option>, no modifications were made to the old cluster and you can re-use it anytime. </para> </listitem> @@ -651,7 +651,7 @@ psql --username=postgres --file=script.sql postgres <listitem> <para> If you ran <command>pg_upgrade</command> - with <option>--link</>, the data files are shared between the + with <option>--link</option>, the data files are shared between the old and new cluster. If you started the new cluster, the new server has written to those shared files and it is unsafe to use the old cluster. @@ -660,13 +660,13 @@ psql --username=postgres --file=script.sql postgres <listitem> <para> - If you ran <command>pg_upgrade</command> <emphasis>without</> - <option>--link</> or did not start the new server, the + If you ran <command>pg_upgrade</command> <emphasis>without</emphasis> + <option>--link</option> or did not start the new server, the old cluster was not modified except that, if linking - started, a <literal>.old</> suffix was appended to - <filename>$PGDATA/global/pg_control</>. To reuse the old - cluster, possibly remove the <filename>.old</> suffix from - <filename>$PGDATA/global/pg_control</>; you can then restart the + started, a <literal>.old</literal> suffix was appended to + <filename>$PGDATA/global/pg_control</filename>. To reuse the old + cluster, possibly remove the <filename>.old</filename> suffix from + <filename>$PGDATA/global/pg_control</filename>; you can then restart the old cluster. </para> </listitem> @@ -681,16 +681,16 @@ psql --username=postgres --file=script.sql postgres <title>Notes</title> <para> - <application>pg_upgrade</> does not support upgrading of databases - containing these <type>reg*</> OID-referencing system data types: - <type>regproc</>, <type>regprocedure</>, <type>regoper</>, - <type>regoperator</>, <type>regconfig</>, and - <type>regdictionary</>. (<type>regtype</> can be upgraded.) + <application>pg_upgrade</application> does not support upgrading of databases + containing these <type>reg*</type> OID-referencing system data types: + <type>regproc</type>, <type>regprocedure</type>, <type>regoper</type>, + <type>regoperator</type>, <type>regconfig</type>, and + <type>regdictionary</type>. (<type>regtype</type> can be upgraded.) </para> <para> All failure, rebuild, and reindex cases will be reported by - <application>pg_upgrade</> if they affect your installation; + <application>pg_upgrade</application> if they affect your installation; post-upgrade scripts to rebuild tables and indexes will be generated automatically. If you are trying to automate the upgrade of many clusters, you should find that clusters with identical database @@ -705,17 +705,17 @@ psql --username=postgres --file=script.sql postgres </para> <para> - If you are upgrading a pre-<productname>PostgreSQL</> 9.2 cluster + If you are upgrading a pre-<productname>PostgreSQL</productname> 9.2 cluster that uses a configuration-file-only directory, you must pass the - real data directory location to <application>pg_upgrade</>, and + real data directory location to <application>pg_upgrade</application>, and pass the configuration directory location to the server, e.g. - <literal>-d /real-data-directory -o '-D /configuration-directory'</>. + <literal>-d /real-data-directory -o '-D /configuration-directory'</literal>. </para> <para> If using a pre-9.1 old server that is using a non-default Unix-domain socket directory or a default that differs from the default of the - new cluster, set <envar>PGHOST</> to point to the old server's socket + new cluster, set <envar>PGHOST</envar> to point to the old server's socket location. (This is not relevant on Windows.) </para> @@ -723,13 +723,13 @@ psql --username=postgres --file=script.sql postgres If you want to use link mode and you do not want your old cluster to be modified when the new cluster is started, make a copy of the old cluster and upgrade that in link mode. To make a valid copy - of the old cluster, use <command>rsync</> to create a dirty + of the old cluster, use <command>rsync</command> to create a dirty copy of the old cluster while the server is running, then shut down - the old server and run <command>rsync --checksum</> again to update the - copy with any changes to make it consistent. (<option>--checksum</> - is necessary because <command>rsync</> only has file modification-time + the old server and run <command>rsync --checksum</command> again to update the + copy with any changes to make it consistent. (<option>--checksum</option> + is necessary because <command>rsync</command> only has file modification-time granularity of one second.) You might want to exclude some - files, e.g. <filename>postmaster.pid</>, as documented in <xref + files, e.g. <filename>postmaster.pid</filename>, as documented in <xref linkend="backup-lowlevel-base-backup">. If your file system supports file system snapshots or copy-on-write file copies, you can use that to make a backup of the old cluster and tablespaces, though the snapshot diff --git a/doc/src/sgml/ref/postgres-ref.sgml b/doc/src/sgml/ref/postgres-ref.sgml index fc11aa14a60..b62e626e7af 100644 --- a/doc/src/sgml/ref/postgres-ref.sgml +++ b/doc/src/sgml/ref/postgres-ref.sgml @@ -22,7 +22,7 @@ PostgreSQL documentation <refsynopsisdiv> <cmdsynopsis> <command>postgres</command> - <arg rep="repeat"><replaceable>option</></arg> + <arg rep="repeat"><replaceable>option</replaceable></arg> </cmdsynopsis> </refsynopsisdiv> @@ -92,7 +92,7 @@ PostgreSQL documentation can also be set from the connecting client in an application-dependent way to apply only for that session. For example, if the environment variable <envar>PGOPTIONS</envar> is - set, then <application>libpq</>-based clients will pass that + set, then <application>libpq</application>-based clients will pass that string to the server, which will interpret it as <command>postgres</command> command-line options. </para> @@ -122,7 +122,7 @@ PostgreSQL documentation supported by <productname>PostgreSQL</productname> are described in <xref linkend="runtime-config">. Most of the other command line options are in fact short forms of such a - parameter assignment. <option>-c</> can appear multiple times + parameter assignment. <option>-c</option> can appear multiple times to set multiple parameters. </para> </listitem> @@ -133,9 +133,9 @@ PostgreSQL documentation <listitem> <para> Prints the value of the named run-time parameter, and exits. - (See the <option>-c</> option above for details.) This can + (See the <option>-c</option> option above for details.) This can be used on a running server, and returns values from - <filename>postgresql.conf</>, modified by any parameters + <filename>postgresql.conf</filename>, modified by any parameters supplied in this invocation. It does not reflect parameters supplied when the cluster was started. </para> @@ -157,7 +157,7 @@ PostgreSQL documentation debugging output is written to the server log. Values are from 1 to 5. It is also possible to pass <literal>-d 0</literal> for a specific session, which will prevent the - server log level of the parent <command>postgres</> process from being + server log level of the parent <command>postgres</command> process from being propagated to this session. </para> </listitem> @@ -179,7 +179,7 @@ PostgreSQL documentation <listitem> <para> Sets the default date style to <quote>European</quote>, that is - <literal>DMY</> ordering of input date fields. This also causes + <literal>DMY</literal> ordering of input date fields. This also causes the day to be printed before the month in certain date output formats. See <xref linkend="datatype-datetime"> for more information. </para> @@ -206,7 +206,7 @@ PostgreSQL documentation Specifies the IP host name or address on which <command>postgres</command> is to listen for TCP/IP connections from client applications. The value can also be a - comma-separated list of addresses, or <literal>*</> to specify + comma-separated list of addresses, or <literal>*</literal> to specify listening on all available interfaces. An empty value specifies not listening on any IP addresses, in which case only Unix-domain sockets can be used to connect to the @@ -225,13 +225,13 @@ PostgreSQL documentation Allows remote clients to connect via TCP/IP (Internet domain) connections. Without this option, only local connections are accepted. This option is equivalent to setting - <varname>listen_addresses</> to <literal>*</> in - <filename>postgresql.conf</> or via <option>-h</>. + <varname>listen_addresses</varname> to <literal>*</literal> in + <filename>postgresql.conf</filename> or via <option>-h</option>. </para> <para> This option is deprecated since it does not allow access to the full functionality of <xref linkend="guc-listen-addresses">. - It's usually better to set <varname>listen_addresses</> directly. + It's usually better to set <varname>listen_addresses</varname> directly. </para> </listitem> </varlistentry> @@ -291,11 +291,11 @@ PostgreSQL documentation </para> <para> - Spaces within <replaceable class="parameter">extra-options</> are + Spaces within <replaceable class="parameter">extra-options</replaceable> are considered to separate arguments, unless escaped with a backslash - (<literal>\</>); write <literal>\\</> to represent a literal + (<literal>\</literal>); write <literal>\\</literal> to represent a literal backslash. Multiple arguments can also be specified via multiple - uses of <option>-o</>. + uses of <option>-o</option>. </para> <para> @@ -340,15 +340,15 @@ PostgreSQL documentation <para> Specifies the amount of memory to be used by internal sorts and hashes before resorting to temporary disk files. See the description of the - <varname>work_mem</> configuration parameter in <xref + <varname>work_mem</varname> configuration parameter in <xref linkend="runtime-config-resource-memory">. </para> </listitem> </varlistentry> <varlistentry> - <term><option>-V</></term> - <term><option>--version</></term> + <term><option>-V</option></term> + <term><option>--version</option></term> <listitem> <para> Print the <application>postgres</application> version and exit. @@ -361,7 +361,7 @@ PostgreSQL documentation <listitem> <para> Sets a named run-time parameter; a shorter form of - <option>-c</>. + <option>-c</option>. </para> </listitem> </varlistentry> @@ -371,15 +371,15 @@ PostgreSQL documentation <listitem> <para> This option dumps out the server's internal configuration variables, - descriptions, and defaults in tab-delimited <command>COPY</> format. + descriptions, and defaults in tab-delimited <command>COPY</command> format. It is designed primarily for use by administration tools. </para> </listitem> </varlistentry> <varlistentry> - <term><option>-?</></term> - <term><option>--help</></term> + <term><option>-?</option></term> + <term><option>--help</option></term> <listitem> <para> Show help about <application>postgres</application> command line @@ -643,13 +643,13 @@ PostgreSQL documentation <title>Diagnostics</title> <para> - A failure message mentioning <literal>semget</> or - <literal>shmget</> probably indicates you need to configure your + A failure message mentioning <literal>semget</literal> or + <literal>shmget</literal> probably indicates you need to configure your kernel to provide adequate shared memory and semaphores. For more discussion see <xref linkend="kernel-resources">. You might be able to postpone reconfiguring your kernel by decreasing <xref linkend="guc-shared-buffers"> to reduce the shared memory - consumption of <productname>PostgreSQL</>, and/or by reducing + consumption of <productname>PostgreSQL</productname>, and/or by reducing <xref linkend="guc-max-connections"> to reduce the semaphore consumption. </para> @@ -725,7 +725,7 @@ PostgreSQL documentation To cancel a running query, send the <literal>SIGINT</literal> signal to the process running that command. To terminate a backend process cleanly, send <literal>SIGTERM</literal> to that process. See - also <function>pg_cancel_backend</> and <function>pg_terminate_backend</> + also <function>pg_cancel_backend</function> and <function>pg_terminate_backend</function> in <xref linkend="functions-admin-signal"> for the SQL-callable equivalents of these two actions. </para> @@ -745,9 +745,9 @@ PostgreSQL documentation <refsect1 id="app-postgres-bugs"> <title>Bugs</title> <para> - The <option>--</> options will not work on <systemitem - class="osname">FreeBSD</> or <systemitem class="osname">OpenBSD</>. - Use <option>-c</> instead. This is a bug in the affected operating + The <option>--</option> options will not work on <systemitem + class="osname">FreeBSD</systemitem> or <systemitem class="osname">OpenBSD</systemitem>. + Use <option>-c</option> instead. This is a bug in the affected operating systems; a future release of <productname>PostgreSQL</productname> will provide a workaround if this is not fixed. </para> @@ -759,17 +759,17 @@ PostgreSQL documentation <para> To start a single-user mode server, use a command like <screen> -<userinput>postgres --single -D /usr/local/pgsql/data <replaceable>other-options</> my_database</userinput> +<userinput>postgres --single -D /usr/local/pgsql/data <replaceable>other-options</replaceable> my_database</userinput> </screen> - Provide the correct path to the database directory with <option>-D</>, or - make sure that the environment variable <envar>PGDATA</> is set. + Provide the correct path to the database directory with <option>-D</option>, or + make sure that the environment variable <envar>PGDATA</envar> is set. Also specify the name of the particular database you want to work in. </para> <para> Normally, the single-user mode server treats newline as the command entry terminator; there is no intelligence about semicolons, - as there is in <application>psql</>. To continue a command + as there is in <application>psql</application>. To continue a command across multiple lines, you must type backslash just before each newline except the last one. The backslash and adjacent newline are both dropped from the input command. Note that this will happen even @@ -777,7 +777,7 @@ PostgreSQL documentation </para> <para> - But if you use the <option>-j</> command line switch, a single newline + But if you use the <option>-j</option> command line switch, a single newline does not terminate command entry; instead, the sequence semicolon-newline-newline does. That is, type a semicolon immediately followed by a completely empty line. Backslash-newline is not @@ -794,10 +794,10 @@ PostgreSQL documentation <para> To quit the session, type <acronym>EOF</acronym> - (<keycombo action="simul"><keycap>Control</><keycap>D</></>, usually). + (<keycombo action="simul"><keycap>Control</keycap><keycap>D</keycap></keycombo>, usually). If you've entered any text since the last command entry terminator, then <acronym>EOF</acronym> will be taken as a command entry terminator, - and another <acronym>EOF</> will be needed to exit. + and another <acronym>EOF</acronym> will be needed to exit. </para> <para> @@ -826,7 +826,7 @@ PostgreSQL documentation <screen> <prompt>$</prompt> <userinput>postgres -p 1234</userinput> </screen> - To connect to this server using <application>psql</>, specify this port with the -p option: + To connect to this server using <application>psql</application>, specify this port with the -p option: <screen> <prompt>$</prompt> <userinput>psql -p 1234</userinput> </screen> @@ -844,11 +844,11 @@ PostgreSQL documentation <prompt>$</prompt> <userinput>postgres --work-mem=1234</userinput> </screen> Either form overrides whatever setting might exist for - <varname>work_mem</> in <filename>postgresql.conf</>. Notice that + <varname>work_mem</varname> in <filename>postgresql.conf</filename>. Notice that underscores in parameter names can be written as either underscore or dash on the command line. Except for short-term experiments, it's probably better practice to edit the setting in - <filename>postgresql.conf</> than to rely on a command-line switch + <filename>postgresql.conf</filename> than to rely on a command-line switch to set a parameter. </para> </refsect1> diff --git a/doc/src/sgml/ref/postmaster.sgml b/doc/src/sgml/ref/postmaster.sgml index 0a58a633312..ec11ec65f55 100644 --- a/doc/src/sgml/ref/postmaster.sgml +++ b/doc/src/sgml/ref/postmaster.sgml @@ -22,7 +22,7 @@ PostgreSQL documentation <refsynopsisdiv> <cmdsynopsis> <command>postmaster</command> - <arg rep="repeat"><replaceable>option</></arg> + <arg rep="repeat"><replaceable>option</replaceable></arg> </cmdsynopsis> </refsynopsisdiv> diff --git a/doc/src/sgml/ref/prepare.sgml b/doc/src/sgml/ref/prepare.sgml index f4e1d543492..bcf188f4b94 100644 --- a/doc/src/sgml/ref/prepare.sgml +++ b/doc/src/sgml/ref/prepare.sgml @@ -48,7 +48,7 @@ PREPARE <replaceable class="parameter">name</replaceable> [ ( <replaceable class Prepared statements can take parameters: values that are substituted into the statement when it is executed. When creating the prepared statement, refer to parameters by position, using - <literal>$1</>, <literal>$2</>, etc. A corresponding list of + <literal>$1</literal>, <literal>$2</literal>, etc. A corresponding list of parameter data types can optionally be specified. When a parameter's data type is not specified or is declared as <literal>unknown</literal>, the type is inferred from the context @@ -115,8 +115,8 @@ PREPARE <replaceable class="parameter">name</replaceable> [ ( <replaceable class <term><replaceable class="parameter">statement</replaceable></term> <listitem> <para> - Any <command>SELECT</>, <command>INSERT</>, <command>UPDATE</>, - <command>DELETE</>, or <command>VALUES</> statement. + Any <command>SELECT</command>, <command>INSERT</command>, <command>UPDATE</command>, + <command>DELETE</command>, or <command>VALUES</command> statement. </para> </listitem> </varlistentry> @@ -155,9 +155,9 @@ PREPARE <replaceable class="parameter">name</replaceable> [ ( <replaceable class <para> To examine the query plan <productname>PostgreSQL</productname> is using for a prepared statement, use <xref linkend="sql-explain">, e.g. - <command>EXPLAIN EXECUTE</>. + <command>EXPLAIN EXECUTE</command>. If a generic plan is in use, it will contain parameter symbols - <literal>$<replaceable>n</></literal>, while a custom plan will have the + <literal>$<replaceable>n</replaceable></literal>, while a custom plan will have the supplied parameter values substituted into it. The row estimates in the generic plan reflect the selectivity computed for the parameters. @@ -172,13 +172,13 @@ PREPARE <replaceable class="parameter">name</replaceable> [ ( <replaceable class <para> Although the main point of a prepared statement is to avoid repeated parse - analysis and planning of the statement, <productname>PostgreSQL</> will + analysis and planning of the statement, <productname>PostgreSQL</productname> will force re-analysis and re-planning of the statement before using it whenever database objects used in the statement have undergone definitional (DDL) changes since the previous use of the prepared statement. Also, if the value of <xref linkend="guc-search-path"> changes from one use to the next, the statement will be re-parsed using the new - <varname>search_path</>. (This latter behavior is new as of + <varname>search_path</varname>. (This latter behavior is new as of <productname>PostgreSQL</productname> 9.3.) These rules make use of a prepared statement semantically almost equivalent to re-submitting the same query text over and over, but with a performance benefit if no object @@ -186,7 +186,7 @@ PREPARE <replaceable class="parameter">name</replaceable> [ ( <replaceable class across uses. An example of a case where the semantic equivalence is not perfect is that if the statement refers to a table by an unqualified name, and then a new table of the same name is created in a schema appearing - earlier in the <varname>search_path</>, no automatic re-parse will occur + earlier in the <varname>search_path</varname>, no automatic re-parse will occur since no object used in the statement changed. However, if some other change forces a re-parse, the new table will be referenced in subsequent uses. @@ -222,7 +222,7 @@ EXECUTE usrrptplan(1, current_date); </programlisting> Note that the data type of the second parameter is not specified, - so it is inferred from the context in which <literal>$2</> is used. + so it is inferred from the context in which <literal>$2</literal> is used. </para> </refsect1> <refsect1> diff --git a/doc/src/sgml/ref/prepare_transaction.sgml b/doc/src/sgml/ref/prepare_transaction.sgml index 9a2e38e98c7..4f78e6b1313 100644 --- a/doc/src/sgml/ref/prepare_transaction.sgml +++ b/doc/src/sgml/ref/prepare_transaction.sgml @@ -47,7 +47,7 @@ PREPARE TRANSACTION <replaceable class="parameter">transaction_id</replaceable> <para> From the point of view of the issuing session, <command>PREPARE - TRANSACTION</command> is not unlike a <command>ROLLBACK</> command: + TRANSACTION</command> is not unlike a <command>ROLLBACK</command> command: after executing it, there is no active current transaction, and the effects of the prepared transaction are no longer visible. (The effects will become visible again if the transaction is committed.) @@ -55,7 +55,7 @@ PREPARE TRANSACTION <replaceable class="parameter">transaction_id</replaceable> <para> If the <command>PREPARE TRANSACTION</command> command fails for any - reason, it becomes a <command>ROLLBACK</>: the current transaction + reason, it becomes a <command>ROLLBACK</command>: the current transaction is canceled. </para> </refsect1> @@ -69,7 +69,7 @@ PREPARE TRANSACTION <replaceable class="parameter">transaction_id</replaceable> <listitem> <para> An arbitrary identifier that later identifies this transaction for - <command>COMMIT PREPARED</> or <command>ROLLBACK PREPARED</>. + <command>COMMIT PREPARED</command> or <command>ROLLBACK PREPARED</command>. The identifier must be written as a string literal, and must be less than 200 bytes long. It must not be the same as the identifier used for any currently prepared transaction. @@ -83,12 +83,12 @@ PREPARE TRANSACTION <replaceable class="parameter">transaction_id</replaceable> <title>Notes</title> <para> - <command>PREPARE TRANSACTION</> is not intended for use in applications + <command>PREPARE TRANSACTION</command> is not intended for use in applications or interactive sessions. Its purpose is to allow an external transaction manager to perform atomic global transactions across multiple databases or other transactional resources. Unless you're writing a transaction manager, you probably shouldn't be using <command>PREPARE - TRANSACTION</>. + TRANSACTION</command>. </para> <para> @@ -97,22 +97,22 @@ PREPARE TRANSACTION <replaceable class="parameter">transaction_id</replaceable> </para> <para> - It is not currently allowed to <command>PREPARE</> a transaction that + It is not currently allowed to <command>PREPARE</command> a transaction that has executed any operations involving temporary tables, - created any cursors <literal>WITH HOLD</>, or executed - <command>LISTEN</> or <command>UNLISTEN</>. + created any cursors <literal>WITH HOLD</literal>, or executed + <command>LISTEN</command> or <command>UNLISTEN</command>. Those features are too tightly tied to the current session to be useful in a transaction to be prepared. </para> <para> - If the transaction modified any run-time parameters with <command>SET</> - (without the <literal>LOCAL</> option), - those effects persist after <command>PREPARE TRANSACTION</>, and will not + If the transaction modified any run-time parameters with <command>SET</command> + (without the <literal>LOCAL</literal> option), + those effects persist after <command>PREPARE TRANSACTION</command>, and will not be affected by any later <command>COMMIT PREPARED</command> or <command>ROLLBACK PREPARED</command>. Thus, in this one respect - <command>PREPARE TRANSACTION</> acts more like <command>COMMIT</> than - <command>ROLLBACK</>. + <command>PREPARE TRANSACTION</command> acts more like <command>COMMIT</command> than + <command>ROLLBACK</command>. </para> <para> @@ -124,7 +124,7 @@ PREPARE TRANSACTION <replaceable class="parameter">transaction_id</replaceable> <caution> <para> It is unwise to leave transactions in the prepared state for a long time. - This will interfere with the ability of <command>VACUUM</> to reclaim + This will interfere with the ability of <command>VACUUM</command> to reclaim storage, and in extreme cases could cause the database to shut down to prevent transaction ID wraparound (see <xref linkend="vacuum-for-wraparound">). Keep in mind also that the transaction @@ -149,7 +149,7 @@ PREPARE TRANSACTION <replaceable class="parameter">transaction_id</replaceable> <title id="sql-prepare-transaction-examples-title">Examples</title> <para> Prepare the current transaction for two-phase commit, using - <literal>foobar</> as the transaction identifier: + <literal>foobar</literal> as the transaction identifier: <programlisting> PREPARE TRANSACTION 'foobar'; diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index e7a3e17c67b..8cbe0569cf4 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -50,8 +50,8 @@ PostgreSQL documentation <variablelist> <varlistentry> - <term><option>-a</></term> - <term><option>--echo-all</></term> + <term><option>-a</option></term> + <term><option>--echo-all</option></term> <listitem> <para> Print all nonempty input lines to standard output as they are read. @@ -63,8 +63,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-A</></term> - <term><option>--no-align</></term> + <term><option>-A</option></term> + <term><option>--no-align</option></term> <listitem> <para> Switches to unaligned output mode. (The default output mode is @@ -75,8 +75,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-b</></term> - <term><option>--echo-errors</></term> + <term><option>-b</option></term> + <term><option>--echo-errors</option></term> <listitem> <para> Print failed SQL commands to standard error output. This is @@ -87,8 +87,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-c <replaceable class="parameter">command</replaceable></></term> - <term><option>--command=<replaceable class="parameter">command</replaceable></></term> + <term><option>-c <replaceable class="parameter">command</replaceable></option></term> + <term><option>--command=<replaceable class="parameter">command</replaceable></option></term> <listitem> <para> Specifies that <application>psql</application> is to execute the given @@ -116,14 +116,14 @@ psql -c '\x' -c 'SELECT * FROM foo;' <programlisting> echo '\x \\ SELECT * FROM foo;' | psql </programlisting> - (<literal>\\</> is the separator meta-command.) + (<literal>\\</literal> is the separator meta-command.) </para> <para> Each <acronym>SQL</acronym> command string passed to <option>-c</option> is sent to the server as a single request. Because of this, the server executes it as a single transaction even if the string contains multiple <acronym>SQL</acronym> commands, - unless there are explicit <command>BEGIN</>/<command>COMMIT</> + unless there are explicit <command>BEGIN</command>/<command>COMMIT</command> commands included in the string to divide it into multiple transactions. (See <xref linkend="protocol-flow-multi-statement"> for more details about how the server handles multi-query strings.) @@ -152,8 +152,8 @@ EOF </varlistentry> <varlistentry> - <term><option>-d <replaceable class="parameter">dbname</replaceable></></term> - <term><option>--dbname=<replaceable class="parameter">dbname</replaceable></></term> + <term><option>-d <replaceable class="parameter">dbname</replaceable></option></term> + <term><option>--dbname=<replaceable class="parameter">dbname</replaceable></option></term> <listitem> <para> Specifies the name of the database to connect to. This is @@ -173,8 +173,8 @@ EOF </varlistentry> <varlistentry> - <term><option>-e</></term> - <term><option>--echo-queries</></term> + <term><option>-e</option></term> + <term><option>--echo-queries</option></term> <listitem> <para> Copy all SQL commands sent to the server to standard output as well. @@ -186,21 +186,21 @@ EOF </varlistentry> <varlistentry> - <term><option>-E</></term> - <term><option>--echo-hidden</></term> + <term><option>-E</option></term> + <term><option>--echo-hidden</option></term> <listitem> <para> Echo the actual queries generated by <command>\d</command> and other backslash commands. You can use this to study <application>psql</application>'s internal operations. This is equivalent to - setting the variable <varname>ECHO_HIDDEN</varname> to <literal>on</>. + setting the variable <varname>ECHO_HIDDEN</varname> to <literal>on</literal>. </para> </listitem> </varlistentry> <varlistentry> - <term><option>-f <replaceable class="parameter">filename</replaceable></></term> - <term><option>--file=<replaceable class="parameter">filename</replaceable></></term> + <term><option>-f <replaceable class="parameter">filename</replaceable></option></term> + <term><option>--file=<replaceable class="parameter">filename</replaceable></option></term> <listitem> <para> Read commands from the @@ -219,7 +219,7 @@ EOF <para> If <replaceable>filename</replaceable> is <literal>-</literal> (hyphen), then standard input is read until an EOF indication - or <command>\q</> meta-command. This can be used to intersperse + or <command>\q</command> meta-command. This can be used to intersperse interactive input with input from files. Note however that Readline is not used in this case (much as if <option>-n</option> had been specified). @@ -241,8 +241,8 @@ EOF </varlistentry> <varlistentry> - <term><option>-F <replaceable class="parameter">separator</replaceable></></term> - <term><option>--field-separator=<replaceable class="parameter">separator</replaceable></></term> + <term><option>-F <replaceable class="parameter">separator</replaceable></option></term> + <term><option>--field-separator=<replaceable class="parameter">separator</replaceable></option></term> <listitem> <para> Use <replaceable class="parameter">separator</replaceable> as the @@ -253,8 +253,8 @@ EOF </varlistentry> <varlistentry> - <term><option>-h <replaceable class="parameter">hostname</replaceable></></term> - <term><option>--host=<replaceable class="parameter">hostname</replaceable></></term> + <term><option>-h <replaceable class="parameter">hostname</replaceable></option></term> + <term><option>--host=<replaceable class="parameter">hostname</replaceable></option></term> <listitem> <para> Specifies the host name of the machine on which the @@ -266,8 +266,8 @@ EOF </varlistentry> <varlistentry> - <term><option>-H</></term> - <term><option>--html</></term> + <term><option>-H</option></term> + <term><option>--html</option></term> <listitem> <para> Turn on <acronym>HTML</acronym> tabular output. This is @@ -278,8 +278,8 @@ EOF </varlistentry> <varlistentry> - <term><option>-l</></term> - <term><option>--list</></term> + <term><option>-l</option></term> + <term><option>--list</option></term> <listitem> <para> List all available databases, then exit. Other non-connection @@ -290,8 +290,8 @@ EOF </varlistentry> <varlistentry> - <term><option>-L <replaceable class="parameter">filename</replaceable></></term> - <term><option>--log-file=<replaceable class="parameter">filename</replaceable></></term> + <term><option>-L <replaceable class="parameter">filename</replaceable></option></term> + <term><option>--log-file=<replaceable class="parameter">filename</replaceable></option></term> <listitem> <para> Write all query output into file <replaceable @@ -302,8 +302,8 @@ EOF </varlistentry> <varlistentry> - <term><option>-n</></term> - <term><option>--no-readline</></term> + <term><option>-n</option></term> + <term><option>--no-readline</option></term> <listitem> <para> Do not use <application>Readline</application> for line editing and do @@ -314,8 +314,8 @@ EOF </varlistentry> <varlistentry> - <term><option>-o <replaceable class="parameter">filename</replaceable></></term> - <term><option>--output=<replaceable class="parameter">filename</replaceable></></term> + <term><option>-o <replaceable class="parameter">filename</replaceable></option></term> + <term><option>--output=<replaceable class="parameter">filename</replaceable></option></term> <listitem> <para> Put all query output into file <replaceable @@ -326,8 +326,8 @@ EOF </varlistentry> <varlistentry> - <term><option>-p <replaceable class="parameter">port</replaceable></></term> - <term><option>--port=<replaceable class="parameter">port</replaceable></></term> + <term><option>-p <replaceable class="parameter">port</replaceable></option></term> + <term><option>--port=<replaceable class="parameter">port</replaceable></option></term> <listitem> <para> Specifies the TCP port or the local Unix-domain @@ -340,8 +340,8 @@ EOF </varlistentry> <varlistentry> - <term><option>-P <replaceable class="parameter">assignment</replaceable></></term> - <term><option>--pset=<replaceable class="parameter">assignment</replaceable></></term> + <term><option>-P <replaceable class="parameter">assignment</replaceable></option></term> + <term><option>--pset=<replaceable class="parameter">assignment</replaceable></option></term> <listitem> <para> Specifies printing options, in the style of @@ -354,8 +354,8 @@ EOF </varlistentry> <varlistentry> - <term><option>-q</></term> - <term><option>--quiet</></term> + <term><option>-q</option></term> + <term><option>--quiet</option></term> <listitem> <para> Specifies that <application>psql</application> should do its work @@ -363,14 +363,14 @@ EOF informational output. If this option is used, none of this happens. This is useful with the <option>-c</option> option. This is equivalent to setting the variable <varname>QUIET</varname> - to <literal>on</>. + to <literal>on</literal>. </para> </listitem> </varlistentry> <varlistentry> - <term><option>-R <replaceable class="parameter">separator</replaceable></></term> - <term><option>--record-separator=<replaceable class="parameter">separator</replaceable></></term> + <term><option>-R <replaceable class="parameter">separator</replaceable></option></term> + <term><option>--record-separator=<replaceable class="parameter">separator</replaceable></option></term> <listitem> <para> Use <replaceable class="parameter">separator</replaceable> as the @@ -381,8 +381,8 @@ EOF </varlistentry> <varlistentry> - <term><option>-s</></term> - <term><option>--single-step</></term> + <term><option>-s</option></term> + <term><option>--single-step</option></term> <listitem> <para> Run in single-step mode. That means the user is prompted before @@ -393,8 +393,8 @@ EOF </varlistentry> <varlistentry> - <term><option>-S</></term> - <term><option>--single-line</></term> + <term><option>-S</option></term> + <term><option>--single-line</option></term> <listitem> <para> Runs in single-line mode where a newline terminates an SQL command, as a @@ -413,8 +413,8 @@ EOF </varlistentry> <varlistentry> - <term><option>-t</></term> - <term><option>--tuples-only</></term> + <term><option>-t</option></term> + <term><option>--tuples-only</option></term> <listitem> <para> Turn off printing of column names and result row count footers, @@ -425,8 +425,8 @@ EOF </varlistentry> <varlistentry> - <term><option>-T <replaceable class="parameter">table_options</replaceable></></term> - <term><option>--table-attr=<replaceable class="parameter">table_options</replaceable></></term> + <term><option>-T <replaceable class="parameter">table_options</replaceable></option></term> + <term><option>--table-attr=<replaceable class="parameter">table_options</replaceable></option></term> <listitem> <para> Specifies options to be placed within the @@ -437,8 +437,8 @@ EOF </varlistentry> <varlistentry> - <term><option>-U <replaceable class="parameter">username</replaceable></></term> - <term><option>--username=<replaceable class="parameter">username</replaceable></></term> + <term><option>-U <replaceable class="parameter">username</replaceable></option></term> + <term><option>--username=<replaceable class="parameter">username</replaceable></option></term> <listitem> <para> Connect to the database as the user <replaceable @@ -449,9 +449,9 @@ EOF </varlistentry> <varlistentry> - <term><option>-v <replaceable class="parameter">assignment</replaceable></></term> - <term><option>--set=<replaceable class="parameter">assignment</replaceable></></term> - <term><option>--variable=<replaceable class="parameter">assignment</replaceable></></term> + <term><option>-v <replaceable class="parameter">assignment</replaceable></option></term> + <term><option>--set=<replaceable class="parameter">assignment</replaceable></option></term> + <term><option>--variable=<replaceable class="parameter">assignment</replaceable></option></term> <listitem> <para> Perform a variable assignment, like the <command>\set</command> @@ -466,8 +466,8 @@ EOF </varlistentry> <varlistentry> - <term><option>-V</></term> - <term><option>--version</></term> + <term><option>-V</option></term> + <term><option>--version</option></term> <listitem> <para> Print the <application>psql</application> version and exit. @@ -476,8 +476,8 @@ EOF </varlistentry> <varlistentry> - <term><option>-w</></term> - <term><option>--no-password</></term> + <term><option>-w</option></term> + <term><option>--no-password</option></term> <listitem> <para> Never issue a password prompt. If the server requires password @@ -496,8 +496,8 @@ EOF </varlistentry> <varlistentry> - <term><option>-W</></term> - <term><option>--password</></term> + <term><option>-W</option></term> + <term><option>--password</option></term> <listitem> <para> Force <application>psql</application> to prompt for a @@ -509,7 +509,7 @@ EOF will automatically prompt for a password if the server demands password authentication. However, <application>psql</application> will waste a connection attempt finding out that the server wants a - password. In some cases it is worth typing <option>-W</> to avoid + password. In some cases it is worth typing <option>-W</option> to avoid the extra connection attempt. </para> @@ -522,8 +522,8 @@ EOF </varlistentry> <varlistentry> - <term><option>-x</></term> - <term><option>--expanded</></term> + <term><option>-x</option></term> + <term><option>--expanded</option></term> <listitem> <para> Turn on the expanded table formatting mode. This is equivalent to @@ -533,8 +533,8 @@ EOF </varlistentry> <varlistentry> - <term><option>-X,</></term> - <term><option>--no-psqlrc</></term> + <term><option>-X,</option></term> + <term><option>--no-psqlrc</option></term> <listitem> <para> Do not read the start-up file (neither the system-wide @@ -574,8 +574,8 @@ EOF <para> This option can only be used in combination with one or more <option>-c</option> and/or <option>-f</option> options. It causes - <application>psql</application> to issue a <command>BEGIN</> command - before the first such option and a <command>COMMIT</> command after + <application>psql</application> to issue a <command>BEGIN</command> command + before the first such option and a <command>COMMIT</command> command after the last one, thereby wrapping all the commands into a single transaction. This ensures that either all the commands complete successfully, or no changes are applied. @@ -583,8 +583,8 @@ EOF <para> If the commands themselves - contain <command>BEGIN</>, <command>COMMIT</>, - or <command>ROLLBACK</>, this option will not have the desired + contain <command>BEGIN</command>, <command>COMMIT</command>, + or <command>ROLLBACK</command>, this option will not have the desired effects. Also, if an individual command cannot be executed inside a transaction block, specifying this option will cause the whole transaction to fail. @@ -593,17 +593,17 @@ EOF </varlistentry> <varlistentry> - <term><option>-?</></term> - <term><option>--help[=<replaceable class="parameter">topic</>]</option></term> + <term><option>-?</option></term> + <term><option>--help[=<replaceable class="parameter">topic</replaceable>]</option></term> <listitem> <para> Show help about <application>psql</application> and exit. The optional - <replaceable class="parameter">topic</> parameter (defaulting + <replaceable class="parameter">topic</replaceable> parameter (defaulting to <literal>options</literal>) selects which part of <application>psql</application> is - explained: <literal>commands</> describes <application>psql</>'s - backslash commands; <literal>options</> describes the command-line - options that can be passed to <application>psql</>; - and <literal>variables</> shows help about <application>psql</application> configuration + explained: <literal>commands</literal> describes <application>psql</application>'s + backslash commands; <literal>options</literal> describes the command-line + options that can be passed to <application>psql</application>; + and <literal>variables</literal> shows help about <application>psql</application> configuration variables. </para> </listitem> @@ -644,8 +644,8 @@ EOF not belong to any option it will be interpreted as the database name (or the user name, if the database name is already given). Not all of these options are required; there are useful defaults. If you omit the host - name, <application>psql</> will connect via a Unix-domain socket - to a server on the local host, or via TCP/IP to <literal>localhost</> on + name, <application>psql</application> will connect via a Unix-domain socket + to a server on the local host, or via TCP/IP to <literal>localhost</literal> on machines that don't have Unix-domain sockets. The default port number is determined at compile time. Since the database server uses the same default, you will not have @@ -663,7 +663,7 @@ EOF <envar>PGPORT</envar> and/or <envar>PGUSER</envar> to appropriate values. (For additional environment variables, see <xref linkend="libpq-envars">.) It is also convenient to have a - <filename>~/.pgpass</> file to avoid regularly having to type in + <filename>~/.pgpass</filename> file to avoid regularly having to type in passwords. See <xref linkend="libpq-pgpass"> for more information. </para> @@ -777,13 +777,13 @@ testdb=> <para> If an unquoted colon (<literal>:</literal>) followed by a - <application>psql</> variable name appears within an argument, it is + <application>psql</application> variable name appears within an argument, it is replaced by the variable's value, as described in <xref linkend="APP-PSQL-interpolation" endterm="APP-PSQL-interpolation-title">. - The forms <literal>:'<replaceable>variable_name</>'</literal> and - <literal>:"<replaceable>variable_name</>"</literal> described there + The forms <literal>:'<replaceable>variable_name</replaceable>'</literal> and + <literal>:"<replaceable>variable_name</replaceable>"</literal> described there work as well. - The <literal>:{?<replaceable>variable_name</>}</> syntax allows + The <literal>:{?<replaceable>variable_name</replaceable>}</literal> syntax allows testing whether a variable is defined. It is substituted by TRUE or FALSE. Escaping the colon with a backslash protects it from substitution. @@ -795,15 +795,15 @@ testdb=> shell. The output of the command (with any trailing newline removed) replaces the backquoted text. Within the text enclosed in backquotes, no special quoting or other processing occurs, except that appearances - of <literal>:<replaceable>variable_name</></literal> where - <replaceable>variable_name</> is a <application>psql</> variable name + of <literal>:<replaceable>variable_name</replaceable></literal> where + <replaceable>variable_name</replaceable> is a <application>psql</application> variable name are replaced by the variable's value. Also, appearances of - <literal>:'<replaceable>variable_name</>'</literal> are replaced by the + <literal>:'<replaceable>variable_name</replaceable>'</literal> are replaced by the variable's value suitably quoted to become a single shell command argument. (The latter form is almost always preferable, unless you are very sure of what is in the variable.) Because carriage return and line feed characters cannot be safely quoted on all platforms, the - <literal>:'<replaceable>variable_name</>'</literal> form prints an + <literal>:'<replaceable>variable_name</replaceable>'</literal> form prints an error message and does not substitute the variable value when such characters appear in the value. </para> @@ -812,13 +812,13 @@ testdb=> Some commands take an <acronym>SQL</acronym> identifier (such as a table name) as argument. These arguments follow the syntax rules of <acronym>SQL</acronym>: Unquoted letters are forced to - lowercase, while double quotes (<literal>"</>) protect letters + lowercase, while double quotes (<literal>"</literal>) protect letters from case conversion and allow incorporation of whitespace into the identifier. Within double quotes, paired double quotes reduce to a single double quote in the resulting name. For example, - <literal>FOO"BAR"BAZ</> is interpreted as <literal>fooBARbaz</>, - and <literal>"A weird"" name"</> becomes <literal>A weird" - name</>. + <literal>FOO"BAR"BAZ</literal> is interpreted as <literal>fooBARbaz</literal>, + and <literal>"A weird"" name"</literal> becomes <literal>A weird" + name</literal>. </para> <para> @@ -834,7 +834,7 @@ testdb=> </para> <para> - Many of the meta-commands act on the <firstterm>current query buffer</>. + Many of the meta-commands act on the <firstterm>current query buffer</firstterm>. This is simply a buffer holding whatever SQL command text has been typed but not yet sent to the server for execution. This will include previous input lines as well as any text appearing before the meta-command on the @@ -861,9 +861,9 @@ testdb=> <term><literal>\c</literal> or <literal>\connect [ -reuse-previous=<replaceable class="parameter">on|off</replaceable> ] [ <replaceable class="parameter">dbname</replaceable> [ <replaceable class="parameter">username</replaceable> ] [ <replaceable class="parameter">host</replaceable> ] [ <replaceable class="parameter">port</replaceable> ] | <replaceable class="parameter">conninfo</replaceable> ]</literal></term> <listitem> <para> - Establishes a new connection to a <productname>PostgreSQL</> + Establishes a new connection to a <productname>PostgreSQL</productname> server. The connection parameters to use can be specified either - using a positional syntax, or using <replaceable>conninfo</> connection + using a positional syntax, or using <replaceable>conninfo</replaceable> connection strings as detailed in <xref linkend="libpq-connstring">. </para> @@ -871,8 +871,8 @@ testdb=> Where the command omits database name, user, host, or port, the new connection can reuse values from the previous connection. By default, values from the previous connection are reused except when processing - a <replaceable>conninfo</> string. Passing a first argument - of <literal>-reuse-previous=on</> + a <replaceable>conninfo</replaceable> string. Passing a first argument + of <literal>-reuse-previous=on</literal> or <literal>-reuse-previous=off</literal> overrides that default. When the command neither specifies nor reuses a particular parameter, the <application>libpq</application> default is used. Specifying any @@ -969,7 +969,7 @@ testdb=> </para> <para> - When <literal>program</> is specified, + When <literal>program</literal> is specified, <replaceable class="parameter">command</replaceable> is executed by <application>psql</application> and the data passed from or to <replaceable class="parameter">command</replaceable> is @@ -980,17 +980,17 @@ testdb=> </para> <para> - For <literal>\copy ... from stdin</>, data rows are read from the same + For <literal>\copy ... from stdin</literal>, data rows are read from the same source that issued the command, continuing until <literal>\.</literal> - is read or the stream reaches <acronym>EOF</>. This option is useful + is read or the stream reaches <acronym>EOF</acronym>. This option is useful for populating tables in-line within a SQL script file. - For <literal>\copy ... to stdout</>, output is sent to the same place - as <application>psql</> command output, and - the <literal>COPY <replaceable>count</></literal> command status is + For <literal>\copy ... to stdout</literal>, output is sent to the same place + as <application>psql</application> command output, and + the <literal>COPY <replaceable>count</replaceable></literal> command status is not printed (since it might be confused with a data row). To read/write <application>psql</application>'s standard input or - output regardless of the current command source or <literal>\o</> - option, write <literal>from pstdin</> or <literal>to pstdout</>. + output regardless of the current command source or <literal>\o</literal> + option, write <literal>from pstdin</literal> or <literal>to pstdout</literal>. </para> <para> @@ -998,9 +998,9 @@ testdb=> <acronym>SQL</acronym> <xref linkend="sql-copy"> command. All options other than the data source/destination are as specified for <xref linkend="sql-copy">. - Because of this, special parsing rules apply to the <command>\copy</> + Because of this, special parsing rules apply to the <command>\copy</command> meta-command. Unlike most other meta-commands, the entire remainder - of the line is always taken to be the arguments of <command>\copy</>, + of the line is always taken to be the arguments of <command>\copy</command>, and neither variable interpolation nor backquote expansion are performed in the arguments. </para> @@ -1040,7 +1040,7 @@ testdb=> Executes the current query buffer (like <literal>\g</literal>) and shows the results in a crosstab grid. The query must return at least three columns. - The output column identified by <replaceable class="parameter">colV</> + The output column identified by <replaceable class="parameter">colV</replaceable> becomes a vertical header and the output column identified by <replaceable class="parameter">colH</replaceable> becomes a horizontal header. @@ -1068,7 +1068,7 @@ testdb=> <para> The vertical header, displayed as the leftmost column, contains the - values found in column <replaceable class="parameter">colV</>, in the + values found in column <replaceable class="parameter">colV</replaceable>, in the same order as in the query results, but with duplicates removed. </para> @@ -1077,11 +1077,11 @@ testdb=> found in column <replaceable class="parameter">colH</replaceable>, with duplicates removed. By default, these appear in the same order as in the query results. But if the - optional <replaceable class="parameter">sortcolH</> argument is given, + optional <replaceable class="parameter">sortcolH</replaceable> argument is given, it identifies a column whose values must be integer numbers, and the values from <replaceable class="parameter">colH</replaceable> will appear in the horizontal header sorted according to the - corresponding <replaceable class="parameter">sortcolH</> values. + corresponding <replaceable class="parameter">sortcolH</replaceable> values. </para> <para> @@ -1094,7 +1094,7 @@ testdb=> the value of <replaceable class="parameter">colH</replaceable> is <literal>x</literal> and the value of <replaceable class="parameter">colV</replaceable> - is <literal>y</>. If there is no such row, the cell is empty. If + is <literal>y</literal>. If there is no such row, the cell is empty. If there are multiple such rows, an error is reported. </para> </listitem> @@ -1115,13 +1115,13 @@ testdb=> Associated indexes, constraints, rules, and triggers are also shown. For foreign tables, the associated foreign server is shown as well. - (<quote>Matching the pattern</> is defined in + (<quote>Matching the pattern</quote> is defined in <xref linkend="APP-PSQL-patterns" endterm="APP-PSQL-patterns-title"> below.) </para> <para> - For some types of relation, <literal>\d</> shows additional information + For some types of relation, <literal>\d</literal> shows additional information for each column: column values for sequences, indexed expressions for indexes, and foreign data wrapper options for foreign tables. </para> @@ -1237,9 +1237,9 @@ testdb=> <term><literal>\dd[S] [ <link linkend="APP-PSQL-patterns"><replaceable class="parameter">pattern</replaceable></link> ]</literal></term> <listitem> <para> - Shows the descriptions of objects of type <literal>constraint</>, - <literal>operator class</>, <literal>operator family</>, - <literal>rule</>, and <literal>trigger</>. All + Shows the descriptions of objects of type <literal>constraint</literal>, + <literal>operator class</literal>, <literal>operator family</literal>, + <literal>rule</literal>, and <literal>trigger</literal>. All other comments may be viewed by the respective backslash commands for those object types. </para> @@ -1318,7 +1318,7 @@ testdb=> respectively. You can specify any or all of these letters, in any order, to obtain a listing of objects - of these types. For example, <literal>\dit</> lists indexes + of these types. For example, <literal>\dit</literal> lists indexes and tables. If <literal>+</literal> is appended to the command name, each object is listed with its physical size on disk and its associated description, if any. @@ -1408,11 +1408,11 @@ testdb=> <listitem> <para> Lists functions, together with their result data types, argument data - types, and function types, which are classified as <quote>agg</> - (aggregate), <quote>normal</>, <quote>trigger</>, or <quote>window</>. + types, and function types, which are classified as <quote>agg</quote> + (aggregate), <quote>normal</quote>, <quote>trigger</quote>, or <quote>window</quote>. To display only functions - of specific type(s), add the corresponding letters <literal>a</>, - <literal>n</>, <literal>t</>, or <literal>w</> to the command. + of specific type(s), add the corresponding letters <literal>a</literal>, + <literal>n</literal>, <literal>t</literal>, or <literal>w</literal> to the command. If <replaceable class="parameter">pattern</replaceable> is specified, only functions whose names match the pattern are shown. @@ -1429,7 +1429,7 @@ testdb=> <para> To look up functions taking arguments or returning values of a specific data type, use your pager's search capability to scroll through the - <literal>\df</> output. + <literal>\df</literal> output. </para> </tip> @@ -1497,8 +1497,8 @@ testdb=> <listitem> <para> Lists database roles. - (Since the concepts of <quote>users</> and <quote>groups</> have been - unified into <quote>roles</>, this command is now equivalent to + (Since the concepts of <quote>users</quote> and <quote>groups</quote> have been + unified into <quote>roles</quote>, this command is now equivalent to <literal>\du</literal>.) By default, only user-created roles are shown; supply the <literal>S</literal> modifier to include system roles. @@ -1624,7 +1624,7 @@ testdb=> <replaceable>role-pattern</replaceable> and <replaceable>database-pattern</replaceable> are used to select specific roles and databases to list, respectively. If omitted, or if - <literal>*</> is specified, all settings are listed, including those + <literal>*</literal> is specified, all settings are listed, including those not role-specific or database-specific, respectively. </para> @@ -1674,7 +1674,7 @@ testdb=> specified, only types whose names match the pattern are listed. If <literal>+</literal> is appended to the command name, each type is listed with its internal name and size, its allowed values - if it is an <type>enum</> type, and its associated permissions. + if it is an <type>enum</type> type, and its associated permissions. By default, only user-created objects are shown; supply a pattern or the <literal>S</literal> modifier to include system objects. @@ -1687,8 +1687,8 @@ testdb=> <listitem> <para> Lists database roles. - (Since the concepts of <quote>users</> and <quote>groups</> have been - unified into <quote>roles</>, this command is now equivalent to + (Since the concepts of <quote>users</quote> and <quote>groups</quote> have been + unified into <quote>roles</quote>, this command is now equivalent to <literal>\dg</literal>.) By default, only user-created roles are shown; supply the <literal>S</literal> modifier to include system roles. @@ -1730,7 +1730,7 @@ testdb=> </varlistentry> <varlistentry> - <term><literal>\e</literal> or <literal>\edit</> <literal> <optional> <replaceable class="parameter">filename</> </optional> <optional> <replaceable class="parameter">line_number</> </optional> </literal></term> + <term><literal>\e</literal> or <literal>\edit</literal> <literal> <optional> <replaceable class="parameter">filename</replaceable> </optional> <optional> <replaceable class="parameter">line_number</replaceable> </optional> </literal></term> <listitem> <para> @@ -1750,8 +1750,8 @@ testdb=> whole buffer as a single line. Any complete queries are immediately executed; that is, if the query buffer contains or ends with a semicolon, everything up to that point is executed. Whatever remains - will wait in the query buffer; type semicolon or <literal>\g</> to - send it, or <literal>\r</> to cancel it by clearing the query buffer. + will wait in the query buffer; type semicolon or <literal>\g</literal> to + send it, or <literal>\r</literal> to cancel it by clearing the query buffer. Treating the buffer as a single line primarily affects meta-commands: whatever is in the buffer after a meta-command will be taken as argument(s) to the meta-command, even if it spans multiple lines. @@ -1803,27 +1803,27 @@ Tue Oct 26 21:40:57 CEST 1999 </varlistentry> <varlistentry> - <term><literal>\ef <optional> <replaceable class="parameter">function_description</> <optional> <replaceable class="parameter">line_number</> </optional> </optional> </literal></term> + <term><literal>\ef <optional> <replaceable class="parameter">function_description</replaceable> <optional> <replaceable class="parameter">line_number</replaceable> </optional> </optional> </literal></term> <listitem> <para> This command fetches and edits the definition of the named function, - in the form of a <command>CREATE OR REPLACE FUNCTION</> command. - Editing is done in the same way as for <literal>\edit</>. + in the form of a <command>CREATE OR REPLACE FUNCTION</command> command. + Editing is done in the same way as for <literal>\edit</literal>. After the editor exits, the updated command waits in the query buffer; - type semicolon or <literal>\g</> to send it, or <literal>\r</> + type semicolon or <literal>\g</literal> to send it, or <literal>\r</literal> to cancel. </para> <para> The target function can be specified by name alone, or by name - and arguments, for example <literal>foo(integer, text)</>. + and arguments, for example <literal>foo(integer, text)</literal>. The argument types must be given if there is more than one function of the same name. </para> <para> - If no function is specified, a blank <command>CREATE FUNCTION</> + If no function is specified, a blank <command>CREATE FUNCTION</command> template is presented for editing. </para> @@ -1836,7 +1836,7 @@ Tue Oct 26 21:40:57 CEST 1999 <para> Unlike most other meta-commands, the entire remainder of the line is - always taken to be the argument(s) of <command>\ef</>, and neither + always taken to be the argument(s) of <command>\ef</command>, and neither variable interpolation nor backquote expansion are performed in the arguments. </para> @@ -1871,28 +1871,28 @@ Tue Oct 26 21:40:57 CEST 1999 <para> Repeats the most recent server error message at maximum verbosity, as though <varname>VERBOSITY</varname> were set - to <literal>verbose</> and <varname>SHOW_CONTEXT</varname> were - set to <literal>always</>. + to <literal>verbose</literal> and <varname>SHOW_CONTEXT</varname> were + set to <literal>always</literal>. </para> </listitem> </varlistentry> <varlistentry> - <term><literal>\ev <optional> <replaceable class="parameter">view_name</> <optional> <replaceable class="parameter">line_number</> </optional> </optional> </literal></term> + <term><literal>\ev <optional> <replaceable class="parameter">view_name</replaceable> <optional> <replaceable class="parameter">line_number</replaceable> </optional> </optional> </literal></term> <listitem> <para> This command fetches and edits the definition of the named view, - in the form of a <command>CREATE OR REPLACE VIEW</> command. - Editing is done in the same way as for <literal>\edit</>. + in the form of a <command>CREATE OR REPLACE VIEW</command> command. + Editing is done in the same way as for <literal>\edit</literal>. After the editor exits, the updated command waits in the query buffer; - type semicolon or <literal>\g</> to send it, or <literal>\r</> + type semicolon or <literal>\g</literal> to send it, or <literal>\r</literal> to cancel. </para> <para> - If no view is specified, a blank <command>CREATE VIEW</> + If no view is specified, a blank <command>CREATE VIEW</command> template is presented for editing. </para> @@ -1903,7 +1903,7 @@ Tue Oct 26 21:40:57 CEST 1999 <para> Unlike most other meta-commands, the entire remainder of the line is - always taken to be the argument(s) of <command>\ev</>, and neither + always taken to be the argument(s) of <command>\ev</command>, and neither variable interpolation nor backquote expansion are performed in the arguments. </para> @@ -1944,7 +1944,7 @@ Tue Oct 26 21:40:57 CEST 1999 alternative to the <command>\o</command> command. </para> <para> - If the argument begins with <literal>|</>, then the entire remainder + If the argument begins with <literal>|</literal>, then the entire remainder of the line is taken to be the <replaceable class="parameter">command</replaceable> to execute, and neither variable interpolation nor backquote expansion are @@ -1982,13 +1982,13 @@ Tue Oct 26 21:40:57 CEST 1999 Sends the current query buffer to the server, then treats each column of each row of the query's output (if any) as a SQL statement to be executed. For example, to create an index on each - column of <structname>my_table</>: + column of <structname>my_table</structname>: <programlisting> -=> <userinput>SELECT format('create index on my_table(%I)', attname)</> --> <userinput>FROM pg_attribute</> --> <userinput>WHERE attrelid = 'my_table'::regclass AND attnum > 0</> --> <userinput>ORDER BY attnum</> --> <userinput>\gexec</> +=> <userinput>SELECT format('create index on my_table(%I)', attname)</userinput> +-> <userinput>FROM pg_attribute</userinput> +-> <userinput>WHERE attrelid = 'my_table'::regclass AND attnum > 0</userinput> +-> <userinput>ORDER BY attnum</userinput> +-> <userinput>\gexec</userinput> CREATE INDEX CREATE INDEX CREATE INDEX @@ -2001,14 +2001,14 @@ CREATE INDEX are returned, and left-to-right within each row if there is more than one column. NULL fields are ignored. The generated queries are sent literally to the server for processing, so they cannot be - <application>psql</> meta-commands nor contain <application>psql</> + <application>psql</application> meta-commands nor contain <application>psql</application> variable references. If any individual query fails, execution of the remaining queries continues unless <varname>ON_ERROR_STOP</varname> is set. Execution of each query is subject to <varname>ECHO</varname> processing. (Setting <varname>ECHO</varname> to <literal>all</literal> or <literal>queries</literal> is often advisable when - using <command>\gexec</>.) Query logging, single-step mode, + using <command>\gexec</command>.) Query logging, single-step mode, timing, and other query execution features apply to each generated query as well. </para> @@ -2026,7 +2026,7 @@ CREATE INDEX <listitem> <para> Sends the current query buffer to the server and stores the - query's output into <application>psql</> variables (see <xref + query's output into <application>psql</application> variables (see <xref linkend="APP-PSQL-variables" endterm="APP-PSQL-variables-title">). The query to be executed must return exactly one row. Each column of the row is stored into a separate variable, named the same as the @@ -2092,7 +2092,7 @@ hello 10 <para> Unlike most other meta-commands, the entire remainder of the line is - always taken to be the argument(s) of <command>\help</>, and neither + always taken to be the argument(s) of <command>\help</command>, and neither variable interpolation nor backquote expansion are performed in the arguments. </para> @@ -2133,7 +2133,7 @@ hello 10 <para> If <replaceable>filename</replaceable> is <literal>-</literal> (hyphen), then standard input is read until an EOF indication - or <command>\q</> meta-command. This can be used to intersperse + or <command>\q</command> meta-command. This can be used to intersperse interactive input with input from files. Note that Readline behavior will be used only if it is active at the outermost level. </para> @@ -2208,7 +2208,7 @@ hello 10 the same source file. If EOF is reached on the main input file or an <command>\include</command>-ed file before all local <command>\if</command>-blocks have been closed, - then <application>psql</> will raise an error. + then <application>psql</application> will raise an error. </para> <para> Here is an example: @@ -2241,7 +2241,7 @@ SELECT <term><literal>\ir</literal> or <literal>\include_relative</literal> <replaceable class="parameter">filename</replaceable></term> <listitem> <para> - The <literal>\ir</> command is similar to <literal>\i</>, but resolves + The <literal>\ir</literal> command is similar to <literal>\i</literal>, but resolves relative file names differently. When executing in interactive mode, the two commands behave identically. However, when invoked from a script, <literal>\ir</literal> interprets file names relative to the @@ -2366,7 +2366,7 @@ lo_import 152801 </para> <para> - If the argument begins with <literal>|</>, then the entire remainder + If the argument begins with <literal>|</literal>, then the entire remainder of the line is taken to be the <replaceable class="parameter">command</replaceable> to execute, and neither variable interpolation nor backquote expansion are @@ -2409,7 +2409,7 @@ lo_import 152801 <para> Changes the password of the specified user (by default, the current user). This command prompts for the new password, encrypts it, and - sends it to the server as an <command>ALTER ROLE</> command. This + sends it to the server as an <command>ALTER ROLE</command> command. This makes sure that the new password does not appear in cleartext in the command history, the server log, or elsewhere. </para> @@ -2421,16 +2421,16 @@ lo_import 152801 <listitem> <para> Prompts the user to supply text, which is assigned to the variable - <replaceable class="parameter">name</>. + <replaceable class="parameter">name</replaceable>. An optional prompt string, <replaceable - class="parameter">text</>, can be specified. (For multiword + class="parameter">text</replaceable>, can be specified. (For multiword prompts, surround the text with single quotes.) </para> <para> - By default, <literal>\prompt</> uses the terminal for input and - output. However, if the <option>-f</> command line switch was - used, <literal>\prompt</> uses standard input and standard output. + By default, <literal>\prompt</literal> uses the terminal for input and + output. However, if the <option>-f</option> command line switch was + used, <literal>\prompt</literal> uses standard input and standard output. </para> </listitem> </varlistentry> @@ -2484,16 +2484,16 @@ lo_import 152801 <term><literal>columns</literal></term> <listitem> <para> - Sets the target width for the <literal>wrapped</> format, and also + Sets the target width for the <literal>wrapped</literal> format, and also the width limit for determining whether output is wide enough to require the pager or switch to the vertical display in expanded auto mode. Zero (the default) causes the target width to be controlled by the - environment variable <envar>COLUMNS</>, or the detected screen width - if <envar>COLUMNS</> is not set. - In addition, if <literal>columns</> is zero then the - <literal>wrapped</> format only affects screen output. - If <literal>columns</> is nonzero then file and pipe output is + environment variable <envar>COLUMNS</envar>, or the detected screen width + if <envar>COLUMNS</envar> is not set. + In addition, if <literal>columns</literal> is zero then the + <literal>wrapped</literal> format only affects screen output. + If <literal>columns</literal> is nonzero then file and pipe output is wrapped to that width as well. </para> </listitem> @@ -2552,7 +2552,7 @@ lo_import 152801 If <replaceable class="parameter">value</replaceable> is specified it must be either <literal>on</literal> or <literal>off</literal> which will enable or disable display of the table footer - (the <literal>(<replaceable>n</> rows)</literal> count). + (the <literal>(<replaceable>n</replaceable> rows)</literal> count). If <replaceable class="parameter">value</replaceable> is omitted the command toggles footer display on or off. </para> @@ -2573,7 +2573,7 @@ lo_import 152801 is enough.) </para> - <para><literal>unaligned</> format writes all columns of a row on one + <para><literal>unaligned</literal> format writes all columns of a row on one line, separated by the currently active field separator. This is useful for creating output that might be intended to be read in by other programs (for example, tab-separated or comma-separated @@ -2584,18 +2584,18 @@ lo_import 152801 nicely formatted text output; this is the default. </para> - <para><literal>wrapped</> format is like <literal>aligned</> but wraps + <para><literal>wrapped</literal> format is like <literal>aligned</literal> but wraps wide data values across lines to make the output fit in the target column width. The target width is determined as described under - the <literal>columns</> option. Note that <application>psql</> will + the <literal>columns</literal> option. Note that <application>psql</application> will not attempt to wrap column header titles; therefore, - <literal>wrapped</> format behaves the same as <literal>aligned</> + <literal>wrapped</literal> format behaves the same as <literal>aligned</literal> if the total width needed for column headers exceeds the target. </para> <para> - The <literal>html</>, <literal>asciidoc</>, <literal>latex</>, - <literal>latex-longtable</literal>, and <literal>troff-ms</> + The <literal>html</literal>, <literal>asciidoc</literal>, <literal>latex</literal>, + <literal>latex-longtable</literal>, and <literal>troff-ms</literal> formats put out tables that are intended to be included in documents using the respective mark-up language. They are not complete documents! This might not be @@ -2603,7 +2603,7 @@ lo_import 152801 <application>LaTeX</application> you must have a complete document wrapper. <literal>latex-longtable</literal> also requires the <application>LaTeX</application> - <literal>longtable</literal> and <literal>booktabs</> packages. + <literal>longtable</literal> and <literal>booktabs</literal> packages. </para> </listitem> </varlistentry> @@ -2617,9 +2617,9 @@ lo_import 152801 or <literal>unicode</literal>. Unique abbreviations are allowed. (That would mean one letter is enough.) - The default setting is <literal>ascii</>. - This option only affects the <literal>aligned</> and - <literal>wrapped</> output formats. + The default setting is <literal>ascii</literal>. + This option only affects the <literal>aligned</literal> and + <literal>wrapped</literal> output formats. </para> <para><literal>ascii</literal> style uses plain <acronym>ASCII</acronym> @@ -2627,17 +2627,17 @@ lo_import 152801 a <literal>+</literal> symbol in the right-hand margin. When the <literal>wrapped</literal> format wraps data from one line to the next without a newline character, a dot - (<literal>.</>) is shown in the right-hand margin of the first line, + (<literal>.</literal>) is shown in the right-hand margin of the first line, and again in the left-hand margin of the following line. </para> - <para><literal>old-ascii</literal> style uses plain <acronym>ASCII</> + <para><literal>old-ascii</literal> style uses plain <acronym>ASCII</acronym> characters, using the formatting style used in <productname>PostgreSQL</productname> 8.4 and earlier. Newlines in data are shown using a <literal>:</literal> symbol in place of the left-hand column separator. When the data is wrapped from one line - to the next without a newline character, a <literal>;</> + to the next without a newline character, a <literal>;</literal> symbol is used in place of the left-hand column separator. </para> @@ -2650,7 +2650,7 @@ lo_import 152801 </para> <para> - When the <literal>border</> setting is greater than zero, + When the <literal>border</literal> setting is greater than zero, the <literal>linestyle</literal> option also determines the characters with which the border lines are drawn. Plain <acronym>ASCII</acronym> characters work everywhere, but @@ -2689,7 +2689,7 @@ lo_import 152801 <term><literal>pager</literal></term> <listitem> <para> - Controls use of a pager program for query and <application>psql</> + Controls use of a pager program for query and <application>psql</application> help output. If the environment variable <envar>PSQL_PAGER</envar> or <envar>PAGER</envar> is set, the output is piped to the specified program. Otherwise a platform-dependent default program @@ -2697,13 +2697,13 @@ lo_import 152801 </para> <para> - When the <literal>pager</> option is <literal>off</>, the pager - program is not used. When the <literal>pager</> option is - <literal>on</>, the pager is used when appropriate, i.e., when the + When the <literal>pager</literal> option is <literal>off</literal>, the pager + program is not used. When the <literal>pager</literal> option is + <literal>on</literal>, the pager is used when appropriate, i.e., when the output is to a terminal and will not fit on the screen. - The <literal>pager</> option can also be set to <literal>always</>, + The <literal>pager</literal> option can also be set to <literal>always</literal>, which causes the pager to be used for all terminal output regardless - of whether it fits on the screen. <literal>\pset pager</> + of whether it fits on the screen. <literal>\pset pager</literal> without a <replaceable class="parameter">value</replaceable> toggles pager use on and off. </para> @@ -2714,7 +2714,7 @@ lo_import 152801 <term><literal>pager_min_lines</literal></term> <listitem> <para> - If <literal>pager_min_lines</> is set to a number greater than the + If <literal>pager_min_lines</literal> is set to a number greater than the page height, the pager program will not be called unless there are at least this many lines of output to show. The default setting is 0. @@ -2760,7 +2760,7 @@ lo_import 152801 In <literal>latex-longtable</literal> format, this controls the proportional width of each column containing a left-aligned data type. It is specified as a whitespace-separated list of values, - e.g. <literal>'0.2 0.2 0.6'</>. Unspecified output columns + e.g. <literal>'0.2 0.2 0.6'</literal>. Unspecified output columns use the last specified value. </para> </listitem> @@ -2902,7 +2902,7 @@ lo_import 152801 <listitem> <para> - Sets the <application>psql</> variable <replaceable + Sets the <application>psql</application> variable <replaceable class="parameter">name</replaceable> to <replaceable class="parameter">value</replaceable>, or if more than one value is given, to the concatenation of all of them. If only one @@ -2910,8 +2910,8 @@ lo_import 152801 unset a variable, use the <command>\unset</command> command. </para> - <para><command>\set</> without any arguments displays the names and values - of all currently-set <application>psql</> variables. + <para><command>\set</command> without any arguments displays the names and values + of all currently-set <application>psql</application> variables. </para> <para> @@ -2958,19 +2958,19 @@ testdb=> <userinput>\setenv LESS -imx4F</userinput> </varlistentry> <varlistentry> - <term><literal>\sf[+] <replaceable class="parameter">function_description</> </literal></term> + <term><literal>\sf[+] <replaceable class="parameter">function_description</replaceable> </literal></term> <listitem> <para> This command fetches and shows the definition of the named function, - in the form of a <command>CREATE OR REPLACE FUNCTION</> command. + in the form of a <command>CREATE OR REPLACE FUNCTION</command> command. The definition is printed to the current query output channel, as set by <command>\o</command>. </para> <para> The target function can be specified by name alone, or by name - and arguments, for example <literal>foo(integer, text)</>. + and arguments, for example <literal>foo(integer, text)</literal>. The argument types must be given if there is more than one function of the same name. </para> @@ -2983,7 +2983,7 @@ testdb=> <userinput>\setenv LESS -imx4F</userinput> <para> Unlike most other meta-commands, the entire remainder of the line is - always taken to be the argument(s) of <command>\sf</>, and neither + always taken to be the argument(s) of <command>\sf</command>, and neither variable interpolation nor backquote expansion are performed in the arguments. </para> @@ -2992,12 +2992,12 @@ testdb=> <userinput>\setenv LESS -imx4F</userinput> <varlistentry> - <term><literal>\sv[+] <replaceable class="parameter">view_name</> </literal></term> + <term><literal>\sv[+] <replaceable class="parameter">view_name</replaceable> </literal></term> <listitem> <para> This command fetches and shows the definition of the named view, - in the form of a <command>CREATE OR REPLACE VIEW</> command. + in the form of a <command>CREATE OR REPLACE VIEW</command> command. The definition is printed to the current query output channel, as set by <command>\o</command>. </para> @@ -3009,7 +3009,7 @@ testdb=> <userinput>\setenv LESS -imx4F</userinput> <para> Unlike most other meta-commands, the entire remainder of the line is - always taken to be the argument(s) of <command>\sv</>, and neither + always taken to be the argument(s) of <command>\sv</command>, and neither variable interpolation nor backquote expansion are performed in the arguments. </para> @@ -3062,13 +3062,13 @@ testdb=> <userinput>\setenv LESS -imx4F</userinput> <listitem> <para> - Unsets (deletes) the <application>psql</> variable <replaceable + Unsets (deletes) the <application>psql</application> variable <replaceable class="parameter">name</replaceable>. </para> <para> Most variables that control <application>psql</application>'s behavior - cannot be unset; instead, an <literal>\unset</> command is interpreted + cannot be unset; instead, an <literal>\unset</literal> command is interpreted as setting them to their default values. See <xref linkend="APP-PSQL-variables" endterm="APP-PSQL-variables-title">, below. @@ -3079,7 +3079,7 @@ testdb=> <userinput>\setenv LESS -imx4F</userinput> <varlistentry> <term><literal>\w</literal> or <literal>\write</literal> <replaceable class="parameter">filename</replaceable></term> - <term><literal>\w</literal> or <literal>\write</literal> <literal>|</><replaceable class="parameter">command</replaceable></term> + <term><literal>\w</literal> or <literal>\write</literal> <literal>|</literal><replaceable class="parameter">command</replaceable></term> <listitem> <para> Writes the current query buffer to the file <replaceable @@ -3090,7 +3090,7 @@ testdb=> <userinput>\setenv LESS -imx4F</userinput> </para> <para> - If the argument begins with <literal>|</>, then the entire remainder + If the argument begins with <literal>|</literal>, then the entire remainder of the line is taken to be the <replaceable class="parameter">command</replaceable> to execute, and neither variable interpolation nor backquote expansion are @@ -3105,10 +3105,10 @@ testdb=> <userinput>\setenv LESS -imx4F</userinput> <term><literal>\watch [ <replaceable class="parameter">seconds</replaceable> ]</literal></term> <listitem> <para> - Repeatedly execute the current query buffer (as <literal>\g</> does) + Repeatedly execute the current query buffer (as <literal>\g</literal> does) until interrupted or the query fails. Wait the specified number of seconds (default 2) between executions. Each query result is - displayed with a header that includes the <literal>\pset title</> + displayed with a header that includes the <literal>\pset title</literal> string (if any), the time as of query start, and the delay interval. </para> <para> @@ -3153,14 +3153,14 @@ testdb=> <userinput>\setenv LESS -imx4F</userinput> <term><literal>\! [ <replaceable class="parameter">command</replaceable> ]</literal></term> <listitem> <para> - With no argument, escapes to a sub-shell; <application>psql</> + With no argument, escapes to a sub-shell; <application>psql</application> resumes when the sub-shell exits. With an argument, executes the shell command <replaceable class="parameter">command</replaceable>. </para> <para> Unlike most other meta-commands, the entire remainder of the line is - always taken to be the argument(s) of <command>\!</>, and neither + always taken to be the argument(s) of <command>\!</command>, and neither variable interpolation nor backquote expansion are performed in the arguments. The rest of the line is simply passed literally to the shell. @@ -3170,16 +3170,16 @@ testdb=> <userinput>\setenv LESS -imx4F</userinput> <varlistentry> - <term><literal>\? [ <replaceable class="parameter">topic</> ]</literal></term> + <term><literal>\? [ <replaceable class="parameter">topic</replaceable> ]</literal></term> <listitem> <para> Shows help information. The optional - <replaceable class="parameter">topic</> parameter - (defaulting to <literal>commands</>) selects which part of <application>psql</application> is - explained: <literal>commands</> describes <application>psql</>'s - backslash commands; <literal>options</> describes the command-line - options that can be passed to <application>psql</>; - and <literal>variables</> shows help about <application>psql</application> configuration + <replaceable class="parameter">topic</replaceable> parameter + (defaulting to <literal>commands</literal>) selects which part of <application>psql</application> is + explained: <literal>commands</literal> describes <application>psql</application>'s + backslash commands; <literal>options</literal> describes the command-line + options that can be passed to <application>psql</application>; + and <literal>variables</literal> shows help about <application>psql</application> configuration variables. </para> </listitem> @@ -3196,7 +3196,7 @@ testdb=> <userinput>\setenv LESS -imx4F</userinput> </para> <para> - Normally, <application>psql</> will dispatch a SQL command to the + Normally, <application>psql</application> will dispatch a SQL command to the server as soon as it reaches the command-ending semicolon, even if more input remains on the current line. Thus for example entering <programlisting> @@ -3205,7 +3205,7 @@ select 1; select 2; select 3; will result in the three SQL commands being individually sent to the server, with each one's results being displayed before continuing to the next command. However, a semicolon entered - as <literal>\;</> will not trigger command processing, so that the + as <literal>\;</literal> will not trigger command processing, so that the command before it and the one after are effectively combined and sent to the server in one request. So for example <programlisting> @@ -3214,14 +3214,14 @@ select 1\; select 2\; select 3; results in sending the three SQL commands to the server in a single request, when the non-backslashed semicolon is reached. The server executes such a request as a single transaction, - unless there are explicit <command>BEGIN</>/<command>COMMIT</> + unless there are explicit <command>BEGIN</command>/<command>COMMIT</command> commands included in the string to divide it into multiple transactions. (See <xref linkend="protocol-flow-multi-statement"> for more details about how the server handles multi-query strings.) <application>psql</application> prints only the last query result it receives for each request; in this example, although all - three <command>SELECT</>s are indeed executed, <application>psql</> - only prints the <literal>3</>. + three <command>SELECT</command>s are indeed executed, <application>psql</application> + only prints the <literal>3</literal>. </para> </listitem> </varlistentry> @@ -3238,54 +3238,54 @@ select 1\; select 2\; select 3; </indexterm> <para> - The various <literal>\d</> commands accept a <replaceable + The various <literal>\d</literal> commands accept a <replaceable class="parameter">pattern</replaceable> parameter to specify the object name(s) to be displayed. In the simplest case, a pattern is just the exact name of the object. The characters within a pattern are normally folded to lower case, just as in SQL names; - for example, <literal>\dt FOO</> will display the table named - <literal>foo</>. As in SQL names, placing double quotes around + for example, <literal>\dt FOO</literal> will display the table named + <literal>foo</literal>. As in SQL names, placing double quotes around a pattern stops folding to lower case. Should you need to include an actual double quote character in a pattern, write it as a pair of double quotes within a double-quote sequence; again this is in accord with the rules for SQL quoted identifiers. For example, - <literal>\dt "FOO""BAR"</> will display the table named - <literal>FOO"BAR</> (not <literal>foo"bar</>). Unlike the normal + <literal>\dt "FOO""BAR"</literal> will display the table named + <literal>FOO"BAR</literal> (not <literal>foo"bar</literal>). Unlike the normal rules for SQL names, you can put double quotes around just part - of a pattern, for instance <literal>\dt FOO"FOO"BAR</> will display - the table named <literal>fooFOObar</>. + of a pattern, for instance <literal>\dt FOO"FOO"BAR</literal> will display + the table named <literal>fooFOObar</literal>. </para> <para> Whenever the <replaceable class="parameter">pattern</replaceable> parameter - is omitted completely, the <literal>\d</> commands display all objects + is omitted completely, the <literal>\d</literal> commands display all objects that are visible in the current schema search path — this is - equivalent to using <literal>*</> as the pattern. - (An object is said to be <firstterm>visible</> if its + equivalent to using <literal>*</literal> as the pattern. + (An object is said to be <firstterm>visible</firstterm> if its containing schema is in the search path and no object of the same kind and name appears earlier in the search path. This is equivalent to the statement that the object can be referenced by name without explicit schema qualification.) To see all objects in the database regardless of visibility, - use <literal>*.*</> as the pattern. + use <literal>*.*</literal> as the pattern. </para> <para> - Within a pattern, <literal>*</> matches any sequence of characters - (including no characters) and <literal>?</> matches any single character. + Within a pattern, <literal>*</literal> matches any sequence of characters + (including no characters) and <literal>?</literal> matches any single character. (This notation is comparable to Unix shell file name patterns.) - For example, <literal>\dt int*</> displays tables whose names - begin with <literal>int</>. But within double quotes, <literal>*</> - and <literal>?</> lose these special meanings and are just matched + For example, <literal>\dt int*</literal> displays tables whose names + begin with <literal>int</literal>. But within double quotes, <literal>*</literal> + and <literal>?</literal> lose these special meanings and are just matched literally. </para> <para> - A pattern that contains a dot (<literal>.</>) is interpreted as a schema + A pattern that contains a dot (<literal>.</literal>) is interpreted as a schema name pattern followed by an object name pattern. For example, - <literal>\dt foo*.*bar*</> displays all tables whose table name - includes <literal>bar</> that are in schemas whose schema name - starts with <literal>foo</>. When no dot appears, then the pattern + <literal>\dt foo*.*bar*</literal> displays all tables whose table name + includes <literal>bar</literal> that are in schemas whose schema name + starts with <literal>foo</literal>. When no dot appears, then the pattern matches only objects that are visible in the current schema search path. Again, a dot within double quotes loses its special meaning and is matched literally. @@ -3293,28 +3293,28 @@ select 1\; select 2\; select 3; <para> Advanced users can use regular-expression notations such as character - classes, for example <literal>[0-9]</> to match any digit. All regular + classes, for example <literal>[0-9]</literal> to match any digit. All regular expression special characters work as specified in - <xref linkend="functions-posix-regexp">, except for <literal>.</> which - is taken as a separator as mentioned above, <literal>*</> which is - translated to the regular-expression notation <literal>.*</>, - <literal>?</> which is translated to <literal>.</>, and - <literal>$</> which is matched literally. You can emulate + <xref linkend="functions-posix-regexp">, except for <literal>.</literal> which + is taken as a separator as mentioned above, <literal>*</literal> which is + translated to the regular-expression notation <literal>.*</literal>, + <literal>?</literal> which is translated to <literal>.</literal>, and + <literal>$</literal> which is matched literally. You can emulate these pattern characters at need by writing - <literal>?</> for <literal>.</>, + <literal>?</literal> for <literal>.</literal>, <literal>(<replaceable class="parameter">R</replaceable>+|)</literal> for <literal><replaceable class="parameter">R</replaceable>*</literal>, or <literal>(<replaceable class="parameter">R</replaceable>|)</literal> for <literal><replaceable class="parameter">R</replaceable>?</literal>. - <literal>$</> is not needed as a regular-expression character since + <literal>$</literal> is not needed as a regular-expression character since the pattern must match the whole name, unlike the usual - interpretation of regular expressions (in other words, <literal>$</> - is automatically appended to your pattern). Write <literal>*</> at the + interpretation of regular expressions (in other words, <literal>$</literal> + is automatically appended to your pattern). Write <literal>*</literal> at the beginning and/or end if you don't wish the pattern to be anchored. Note that within double quotes, all regular expression special characters lose their special meanings and are matched literally. Also, the regular expression special characters are matched literally in operator name - patterns (i.e., the argument of <literal>\do</>). + patterns (i.e., the argument of <literal>\do</literal>). </para> </refsect3> </refsect2> @@ -3387,14 +3387,14 @@ bar <para> Variables that control <application>psql</application>'s behavior - generally cannot be unset or set to invalid values. An <literal>\unset</> + generally cannot be unset or set to invalid values. An <literal>\unset</literal> command is allowed but is interpreted as setting the variable to its - default value. A <literal>\set</> command without a second argument is - interpreted as setting the variable to <literal>on</>, for control + default value. A <literal>\set</literal> command without a second argument is + interpreted as setting the variable to <literal>on</literal>, for control variables that accept that value, and is rejected for others. Also, - control variables that accept the values <literal>on</> - and <literal>off</> will also accept other common spellings of Boolean - values, such as <literal>true</> and <literal>false</>. + control variables that accept the values <literal>on</literal> + and <literal>off</literal> will also accept other common spellings of Boolean + values, such as <literal>true</literal> and <literal>false</literal>. </para> <para> @@ -3412,23 +3412,23 @@ bar </term> <listitem> <para> - When <literal>on</> (the default), each SQL command is automatically + When <literal>on</literal> (the default), each SQL command is automatically committed upon successful completion. To postpone commit in this - mode, you must enter a <command>BEGIN</> or <command>START - TRANSACTION</> SQL command. When <literal>off</> or unset, SQL + mode, you must enter a <command>BEGIN</command> or <command>START + TRANSACTION</command> SQL command. When <literal>off</literal> or unset, SQL commands are not committed until you explicitly issue - <command>COMMIT</> or <command>END</>. The autocommit-off - mode works by issuing an implicit <command>BEGIN</> for you, just + <command>COMMIT</command> or <command>END</command>. The autocommit-off + mode works by issuing an implicit <command>BEGIN</command> for you, just before any command that is not already in a transaction block and - is not itself a <command>BEGIN</> or other transaction-control + is not itself a <command>BEGIN</command> or other transaction-control command, nor a command that cannot be executed inside a transaction - block (such as <command>VACUUM</>). + block (such as <command>VACUUM</command>). </para> <note> <para> In autocommit-off mode, you must explicitly abandon any failed - transaction by entering <command>ABORT</> or <command>ROLLBACK</>. + transaction by entering <command>ABORT</command> or <command>ROLLBACK</command>. Also keep in mind that if you exit the session without committing, your work will be lost. </para> @@ -3436,7 +3436,7 @@ bar <note> <para> - The autocommit-on mode is <productname>PostgreSQL</>'s traditional + The autocommit-on mode is <productname>PostgreSQL</productname>'s traditional behavior, but autocommit-off is closer to the SQL spec. If you prefer autocommit-off, you might wish to set it in the system-wide <filename>psqlrc</filename> file or your @@ -3496,7 +3496,7 @@ bar <term><varname>ECHO_HIDDEN</varname></term> <listitem> <para> - When this variable is set to <literal>on</> and a backslash command + When this variable is set to <literal>on</literal> and a backslash command queries the database, the query is first shown. This feature helps you to study <productname>PostgreSQL</productname> internals and provide @@ -3504,7 +3504,7 @@ bar on program start-up, use the switch <option>-E</option>.) If you set this variable to the value <literal>noexec</literal>, the queries are just shown but are not actually sent to the server and executed. - The default value is <literal>off</>. + The default value is <literal>off</literal>. </para> </listitem> </varlistentry> @@ -3516,7 +3516,7 @@ bar The current client character set encoding. This is set every time you connect to a database (including program start-up), and when you change the encoding - with <literal>\encoding</>, but it can be changed or unset. + with <literal>\encoding</literal>, but it can be changed or unset. </para> </listitem> </varlistentry> @@ -3525,8 +3525,8 @@ bar <term><varname>ERROR</varname></term> <listitem> <para> - <literal>true</> if the last SQL query failed, <literal>false</> if - it succeeded. See also <varname>SQLSTATE</>. + <literal>true</literal> if the last SQL query failed, <literal>false</literal> if + it succeeded. See also <varname>SQLSTATE</varname>. </para> </listitem> </varlistentry> @@ -3550,7 +3550,7 @@ bar <tip> <para> Although you can use any output format with this feature, - the default <literal>aligned</> format tends to look bad + the default <literal>aligned</literal> format tends to look bad because each group of <varname>FETCH_COUNT</varname> rows will be formatted separately, leading to varying column widths across the row groups. The other output formats work better. @@ -3637,11 +3637,11 @@ bar <term><varname>IGNOREEOF</varname></term> <listitem> <para> - If set to 1 or less, sending an <acronym>EOF</> character (usually - <keycombo action="simul"><keycap>Control</><keycap>D</></>) + If set to 1 or less, sending an <acronym>EOF</acronym> character (usually + <keycombo action="simul"><keycap>Control</keycap><keycap>D</keycap></keycombo>) to an interactive session of <application>psql</application> will terminate the application. If set to a larger numeric value, - that many consecutive <acronym>EOF</> characters must be typed to + that many consecutive <acronym>EOF</acronym> characters must be typed to make an interactive session terminate. If the variable is set to a non-numeric value, it is interpreted as 10. The default is 0. </para> @@ -3673,8 +3673,8 @@ bar <listitem> <para> The primary error message and associated SQLSTATE code for the most - recent failed query in the current <application>psql</> session, or - an empty string and <literal>00000</> if no error has occurred in + recent failed query in the current <application>psql</application> session, or + an empty string and <literal>00000</literal> if no error has occurred in the current session. </para> </listitem> @@ -3690,14 +3690,14 @@ bar </term> <listitem> <para> - When set to <literal>on</>, if a statement in a transaction block + When set to <literal>on</literal>, if a statement in a transaction block generates an error, the error is ignored and the transaction - continues. When set to <literal>interactive</>, such errors are only + continues. When set to <literal>interactive</literal>, such errors are only ignored in interactive sessions, and not when reading script - files. When set to <literal>off</> (the default), a statement in a + files. When set to <literal>off</literal> (the default), a statement in a transaction block that generates an error aborts the entire transaction. The error rollback mode works by issuing an - implicit <command>SAVEPOINT</> for you, just before each command + implicit <command>SAVEPOINT</command> for you, just before each command that is in a transaction block, and then rolling back to the savepoint if the command fails. </para> @@ -3709,7 +3709,7 @@ bar <listitem> <para> By default, command processing continues after an error. When this - variable is set to <literal>on</>, processing will instead stop + variable is set to <literal>on</literal>, processing will instead stop immediately. In interactive mode, <application>psql</application> will return to the command prompt; otherwise, <application>psql</application> will exit, returning @@ -3752,7 +3752,7 @@ bar <term><varname>QUIET</varname></term> <listitem> <para> - Setting this variable to <literal>on</> is equivalent to the command + Setting this variable to <literal>on</literal> is equivalent to the command line option <option>-q</option>. It is probably not too useful in interactive mode. </para> @@ -3775,9 +3775,9 @@ bar <listitem> <para> The server's version number as a string, for - example <literal>9.6.2</>, <literal>10.1</> or <literal>11beta1</>, + example <literal>9.6.2</literal>, <literal>10.1</literal> or <literal>11beta1</literal>, and in numeric form, for - example <literal>90602</> or <literal>100001</>. + example <literal>90602</literal> or <literal>100001</literal>. These are set every time you connect to a database (including program start-up), but can be changed or unset. </para> @@ -3789,13 +3789,13 @@ bar <listitem> <para> This variable can be set to the - values <literal>never</>, <literal>errors</>, or <literal>always</> - to control whether <literal>CONTEXT</> fields are displayed in - messages from the server. The default is <literal>errors</> (meaning + values <literal>never</literal>, <literal>errors</literal>, or <literal>always</literal> + to control whether <literal>CONTEXT</literal> fields are displayed in + messages from the server. The default is <literal>errors</literal> (meaning that context will be shown in error messages, but not in notice or warning messages). This setting has no effect - when <varname>VERBOSITY</> is set to <literal>terse</>. - (See also <command>\errverbose</>, for use when you want a verbose + when <varname>VERBOSITY</varname> is set to <literal>terse</literal>. + (See also <command>\errverbose</command>, for use when you want a verbose version of the error you just got.) </para> </listitem> @@ -3805,7 +3805,7 @@ bar <term><varname>SINGLELINE</varname></term> <listitem> <para> - Setting this variable to <literal>on</> is equivalent to the command + Setting this variable to <literal>on</literal> is equivalent to the command line option <option>-S</option>. </para> </listitem> @@ -3815,7 +3815,7 @@ bar <term><varname>SINGLESTEP</varname></term> <listitem> <para> - Setting this variable to <literal>on</> is equivalent to the command + Setting this variable to <literal>on</literal> is equivalent to the command line option <option>-s</option>. </para> </listitem> @@ -3826,7 +3826,7 @@ bar <listitem> <para> The error code (see <xref linkend="errcodes-appendix">) associated - with the last SQL query's failure, or <literal>00000</> if it + with the last SQL query's failure, or <literal>00000</literal> if it succeeded. </para> </listitem> @@ -3847,10 +3847,10 @@ bar <term><varname>VERBOSITY</varname></term> <listitem> <para> - This variable can be set to the values <literal>default</>, - <literal>verbose</>, or <literal>terse</> to control the verbosity + This variable can be set to the values <literal>default</literal>, + <literal>verbose</literal>, or <literal>terse</literal> to control the verbosity of error reports. - (See also <command>\errverbose</>, for use when you want a verbose + (See also <command>\errverbose</command>, for use when you want a verbose version of the error you just got.) </para> </listitem> @@ -3863,10 +3863,10 @@ bar <listitem> <para> These variables are set at program start-up to reflect - <application>psql</>'s version, respectively as a verbose string, - a short string (e.g., <literal>9.6.2</>, <literal>10.1</>, - or <literal>11beta1</>), and a number (e.g., <literal>90602</> - or <literal>100001</>). They can be changed or unset. + <application>psql</application>'s version, respectively as a verbose string, + a short string (e.g., <literal>9.6.2</literal>, <literal>10.1</literal>, + or <literal>11beta1</literal>), and a number (e.g., <literal>90602</literal> + or <literal>100001</literal>). They can be changed or unset. </para> </listitem> </varlistentry> @@ -3916,7 +3916,7 @@ testdb=> <userinput>SELECT * FROM :"foo";</userinput> <para> Variable interpolation will not be performed within quoted <acronym>SQL</acronym> literals and identifiers. Therefore, a - construction such as <literal>':foo'</> doesn't work to produce a quoted + construction such as <literal>':foo'</literal> doesn't work to produce a quoted literal from a variable's value (and it would be unsafe if it did work, since it wouldn't correctly handle quotes embedded in the value). </para> @@ -3943,7 +3943,7 @@ testdb=> <userinput>INSERT INTO my_table VALUES (:'content');</userinput> </para> <para> - The <literal>:{?<replaceable>name</>}</> special syntax returns TRUE + The <literal>:{?<replaceable>name</replaceable>}</literal> special syntax returns TRUE or FALSE depending on whether the variable exists or not, and is thus always substituted, unless the colon is backslash-escaped. </para> @@ -4086,8 +4086,8 @@ testdb=> <userinput>INSERT INTO my_table VALUES (:'content');</userinput> <listitem> <para> Transaction status: an empty string when not in a transaction - block, or <literal>*</> when in a transaction block, or - <literal>!</> when in a failed transaction block, or <literal>?</> + block, or <literal>*</literal> when in a transaction block, or + <literal>!</literal> when in a failed transaction block, or <literal>?</literal> when the transaction state is indeterminate (for example, because there is no connection). </para> @@ -4098,7 +4098,7 @@ testdb=> <userinput>INSERT INTO my_table VALUES (:'content');</userinput> <term><literal>%l</literal></term> <listitem> <para> - The line number inside the current statement, starting from <literal>1</>. + The line number inside the current statement, starting from <literal>1</literal>. </para> </listitem> </varlistentry> @@ -4186,7 +4186,7 @@ testdb=> \set PROMPT1 '%[%033[1;33;40m%]%n@%/%R%[%033[0m%]%# ' supported, although the completion logic makes no claim to be an <acronym>SQL</acronym> parser. The queries generated by tab-completion can also interfere with other SQL commands, e.g. <literal>SET - TRANSACTION ISOLATION LEVEL</>. + TRANSACTION ISOLATION LEVEL</literal>. If for some reason you do not like the tab completion, you can turn it off by putting this in a file named <filename>.inputrc</filename> in your home directory: @@ -4214,8 +4214,8 @@ $endif <listitem> <para> - If <literal>\pset columns</> is zero, controls the - width for the <literal>wrapped</> format and width for determining + If <literal>\pset columns</literal> is zero, controls the + width for the <literal>wrapped</literal> format and width for determining if wide output requires the pager or should be switched to the vertical format in expanded auto mode. </para> @@ -4261,8 +4261,8 @@ $endif <command>\ev</command> is used with a line number argument, this variable specifies the command-line argument used to pass the starting line number to - the user's editor. For editors such as <productname>Emacs</> or - <productname>vi</>, this is a plus sign. Include a trailing + the user's editor. For editors such as <productname>Emacs</productname> or + <productname>vi</productname>, this is a plus sign. Include a trailing space in the value of the variable if there needs to be space between the option name and the line number. Examples: <programlisting> @@ -4304,8 +4304,8 @@ PSQL_EDITOR_LINENUMBER_ARG='--line ' pager-related options of the <command>\pset</command> command. These variables are examined in the order listed; the first that is set is used. - If none of them is set, the default is to use <literal>more</> on most - platforms, but <literal>less</> on Cygwin. + If none of them is set, the default is to use <literal>more</literal> on most + platforms, but <literal>less</literal> on Cygwin. </para> </listitem> @@ -4344,8 +4344,8 @@ PSQL_EDITOR_LINENUMBER_ARG='--line ' </variablelist> <para> - This utility, like most other <productname>PostgreSQL</> utilities, - also uses the environment variables supported by <application>libpq</> + This utility, like most other <productname>PostgreSQL</productname> utilities, + also uses the environment variables supported by <application>libpq</application> (see <xref linkend="libpq-envars">). </para> @@ -4371,9 +4371,9 @@ PSQL_EDITOR_LINENUMBER_ARG='--line ' </para> <para> The system-wide startup file is named <filename>psqlrc</filename> and is - sought in the installation's <quote>system configuration</> directory, + sought in the installation's <quote>system configuration</quote> directory, which is most reliably identified by running <literal>pg_config - --sysconfdir</>. By default this directory will be <filename>../etc/</> + --sysconfdir</literal>. By default this directory will be <filename>../etc/</filename> relative to the directory containing the <productname>PostgreSQL</productname> executables. The name of this directory can be set explicitly via the <envar>PGSYSCONFDIR</envar> @@ -4410,7 +4410,7 @@ PSQL_EDITOR_LINENUMBER_ARG='--line ' </para> <para> The location of the history file can be set explicitly via - the <varname>HISTFILE</varname> <application>psql</> variable or + the <varname>HISTFILE</varname> <application>psql</application> variable or the <envar>PSQL_HISTORY</envar> environment variable. </para> </listitem> @@ -4426,10 +4426,10 @@ PSQL_EDITOR_LINENUMBER_ARG='--line ' <listitem> <para><application>psql</application> works best with servers of the same or an older major version. Backslash commands are particularly likely - to fail if the server is of a newer version than <application>psql</> - itself. However, backslash commands of the <literal>\d</> family should + to fail if the server is of a newer version than <application>psql</application> + itself. However, backslash commands of the <literal>\d</literal> family should work with servers of versions back to 7.4, though not necessarily with - servers newer than <application>psql</> itself. The general + servers newer than <application>psql</application> itself. The general functionality of running SQL commands and displaying query results should also work with servers of a newer major version, but this cannot be guaranteed in all cases. @@ -4449,7 +4449,7 @@ PSQL_EDITOR_LINENUMBER_ARG='--line ' <para> Before <productname>PostgreSQL</productname> 9.6, the <option>-c</option> option implied <option>-X</option> - (<option>--no-psqlrc</>); this is no longer the case. + (<option>--no-psqlrc</option>); this is no longer the case. </para> </listitem> @@ -4471,7 +4471,7 @@ PSQL_EDITOR_LINENUMBER_ARG='--line ' <para> <application>psql</application> is built as a <quote>console - application</>. Since the Windows console windows use a different + application</quote>. Since the Windows console windows use a different encoding than the rest of the system, you must take special care when using 8-bit characters within <application>psql</application>. If <application>psql</application> detects a problematic @@ -4490,7 +4490,7 @@ PSQL_EDITOR_LINENUMBER_ARG='--line ' <listitem> <para> - Set the console font to <literal>Lucida Console</>, because the + Set the console font to <literal>Lucida Console</literal>, because the raster font does not work with the ANSI code page. </para> </listitem> diff --git a/doc/src/sgml/ref/reassign_owned.sgml b/doc/src/sgml/ref/reassign_owned.sgml index c1751e7f472..2bbd6b8f07a 100644 --- a/doc/src/sgml/ref/reassign_owned.sgml +++ b/doc/src/sgml/ref/reassign_owned.sgml @@ -88,7 +88,7 @@ REASSIGN OWNED BY { <replaceable class="parameter">old_role</replaceable> | CURR <para> The <command>REASSIGN OWNED</command> command does not affect any - privileges granted to the <replaceable class="parameter">old_roles</> for + privileges granted to the <replaceable class="parameter">old_roles</replaceable> for objects that are not owned by them. Use <command>DROP OWNED</command> to revoke such privileges. </para> diff --git a/doc/src/sgml/ref/refresh_materialized_view.sgml b/doc/src/sgml/ref/refresh_materialized_view.sgml index e56e542eb58..0135d15cece 100644 --- a/doc/src/sgml/ref/refresh_materialized_view.sgml +++ b/doc/src/sgml/ref/refresh_materialized_view.sgml @@ -94,9 +94,9 @@ REFRESH MATERIALIZED VIEW [ CONCURRENTLY ] <replaceable class="parameter">name</ <para> While the default index for future <xref linkend="SQL-CLUSTER"> - operations is retained, <command>REFRESH MATERIALIZED VIEW</> does not + operations is retained, <command>REFRESH MATERIALIZED VIEW</command> does not order the generated rows based on this property. If you want the data - to be ordered upon generation, you must use an <literal>ORDER BY</> + to be ordered upon generation, you must use an <literal>ORDER BY</literal> clause in the backing query. </para> </refsect1> diff --git a/doc/src/sgml/ref/reindex.sgml b/doc/src/sgml/ref/reindex.sgml index 09fc61d15b8..3dc2608f76e 100644 --- a/doc/src/sgml/ref/reindex.sgml +++ b/doc/src/sgml/ref/reindex.sgml @@ -46,7 +46,7 @@ REINDEX [ ( VERBOSE ) ] { INDEX | TABLE | SCHEMA | DATABASE | SYSTEM } <replacea <listitem> <para> - An index has become <quote>bloated</>, that is it contains many + An index has become <quote>bloated</quote>, that is it contains many empty or nearly-empty pages. This can occur with B-tree indexes in <productname>PostgreSQL</productname> under certain uncommon access patterns. <command>REINDEX</command> provides a way to reduce @@ -65,12 +65,12 @@ REINDEX [ ( VERBOSE ) ] { INDEX | TABLE | SCHEMA | DATABASE | SYSTEM } <replacea <listitem> <para> - An index build with the <literal>CONCURRENTLY</> option failed, leaving - an <quote>invalid</> index. Such indexes are useless but it can be - convenient to use <command>REINDEX</> to rebuild them. Note that - <command>REINDEX</> will not perform a concurrent build. To build the + An index build with the <literal>CONCURRENTLY</literal> option failed, leaving + an <quote>invalid</quote> index. Such indexes are useless but it can be + convenient to use <command>REINDEX</command> to rebuild them. Note that + <command>REINDEX</command> will not perform a concurrent build. To build the index without interfering with production you should drop the index and - reissue the <command>CREATE INDEX CONCURRENTLY</> command. + reissue the <command>CREATE INDEX CONCURRENTLY</command> command. </para> </listitem> @@ -95,7 +95,7 @@ REINDEX [ ( VERBOSE ) ] { INDEX | TABLE | SCHEMA | DATABASE | SYSTEM } <replacea <listitem> <para> Recreate all indexes of the specified table. If the table has a - secondary <quote>TOAST</> table, that is reindexed as well. + secondary <quote>TOAST</quote> table, that is reindexed as well. </para> </listitem> </varlistentry> @@ -105,7 +105,7 @@ REINDEX [ ( VERBOSE ) ] { INDEX | TABLE | SCHEMA | DATABASE | SYSTEM } <replacea <listitem> <para> Recreate all indexes of the specified schema. If a table of this - schema has a secondary <quote>TOAST</> table, that is reindexed as + schema has a secondary <quote>TOAST</quote> table, that is reindexed as well. Indexes on shared system catalogs are also processed. This form of <command>REINDEX</command> cannot be executed inside a transaction block. @@ -144,7 +144,7 @@ REINDEX [ ( VERBOSE ) ] { INDEX | TABLE | SCHEMA | DATABASE | SYSTEM } <replacea <para> The name of the specific index, table, or database to be reindexed. Index and table names can be schema-qualified. - Presently, <command>REINDEX DATABASE</> and <command>REINDEX SYSTEM</> + Presently, <command>REINDEX DATABASE</command> and <command>REINDEX SYSTEM</command> can only reindex the current database, so their parameter must match the current database's name. </para> @@ -186,10 +186,10 @@ REINDEX [ ( VERBOSE ) ] { INDEX | TABLE | SCHEMA | DATABASE | SYSTEM } <replacea One way to do this is to shut down the server and start a single-user <productname>PostgreSQL</productname> server with the <option>-P</option> option included on its command line. - Then, <command>REINDEX DATABASE</>, <command>REINDEX SYSTEM</>, - <command>REINDEX TABLE</>, or <command>REINDEX INDEX</> can be + Then, <command>REINDEX DATABASE</command>, <command>REINDEX SYSTEM</command>, + <command>REINDEX TABLE</command>, or <command>REINDEX INDEX</command> can be issued, depending on how much you want to reconstruct. If in - doubt, use <command>REINDEX SYSTEM</> to select + doubt, use <command>REINDEX SYSTEM</command> to select reconstruction of all system indexes in the database. Then quit the single-user server session and restart the regular server. See the <xref linkend="app-postgres"> reference page for more @@ -201,8 +201,8 @@ REINDEX [ ( VERBOSE ) ] { INDEX | TABLE | SCHEMA | DATABASE | SYSTEM } <replacea Alternatively, a regular server session can be started with <option>-P</option> included in its command line options. The method for doing this varies across clients, but in all - <application>libpq</>-based clients, it is possible to set - the <envar>PGOPTIONS</envar> environment variable to <literal>-P</> + <application>libpq</application>-based clients, it is possible to set + the <envar>PGOPTIONS</envar> environment variable to <literal>-P</literal> before starting the client. Note that while this method does not require locking out other clients, it might still be wise to prevent other users from connecting to the damaged database until repairs @@ -212,12 +212,12 @@ REINDEX [ ( VERBOSE ) ] { INDEX | TABLE | SCHEMA | DATABASE | SYSTEM } <replacea <para> <command>REINDEX</command> is similar to a drop and recreate of the index in that the index contents are rebuilt from scratch. However, the locking - considerations are rather different. <command>REINDEX</> locks out writes + considerations are rather different. <command>REINDEX</command> locks out writes but not reads of the index's parent table. It also takes an exclusive lock on the specific index being processed, which will block reads that attempt - to use that index. In contrast, <command>DROP INDEX</> momentarily takes + to use that index. In contrast, <command>DROP INDEX</command> momentarily takes an exclusive lock on the parent table, blocking both writes and reads. The - subsequent <command>CREATE INDEX</> locks out writes but not reads; since + subsequent <command>CREATE INDEX</command> locks out writes but not reads; since the index is not there, no read will attempt to use it, meaning that there will be no blocking but reads might be forced into expensive sequential scans. diff --git a/doc/src/sgml/ref/reindexdb.sgml b/doc/src/sgml/ref/reindexdb.sgml index e4721d81130..627be6a0add 100644 --- a/doc/src/sgml/ref/reindexdb.sgml +++ b/doc/src/sgml/ref/reindexdb.sgml @@ -109,8 +109,8 @@ PostgreSQL documentation <variablelist> <varlistentry> - <term><option>-a</></term> - <term><option>--all</></term> + <term><option>-a</option></term> + <term><option>--all</option></term> <listitem> <para> Reindex all databases. @@ -119,8 +119,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option><optional>-d</> <replaceable class="parameter">dbname</replaceable></></term> - <term><option><optional>--dbname=</><replaceable class="parameter">dbname</replaceable></></term> + <term><option><optional>-d</optional> <replaceable class="parameter">dbname</replaceable></option></term> + <term><option><optional>--dbname=</optional><replaceable class="parameter">dbname</replaceable></option></term> <listitem> <para> Specifies the name of the database to be reindexed. @@ -134,8 +134,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-e</></term> - <term><option>--echo</></term> + <term><option>-e</option></term> + <term><option>--echo</option></term> <listitem> <para> Echo the commands that <application>reindexdb</application> generates @@ -145,20 +145,20 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-i <replaceable class="parameter">index</replaceable></></term> - <term><option>--index=<replaceable class="parameter">index</replaceable></></term> + <term><option>-i <replaceable class="parameter">index</replaceable></option></term> + <term><option>--index=<replaceable class="parameter">index</replaceable></option></term> <listitem> <para> Recreate <replaceable class="parameter">index</replaceable> only. Multiple indexes can be recreated by writing multiple - <option>-i</> switches. + <option>-i</option> switches. </para> </listitem> </varlistentry> <varlistentry> - <term><option>-q</></term> - <term><option>--quiet</></term> + <term><option>-q</option></term> + <term><option>--quiet</option></term> <listitem> <para> Do not display progress messages. @@ -167,8 +167,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-s</></term> - <term><option>--system</></term> + <term><option>-s</option></term> + <term><option>--system</option></term> <listitem> <para> Reindex database's system catalogs. @@ -177,32 +177,32 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-S <replaceable class="parameter">schema</replaceable></></term> - <term><option>--schema=<replaceable class="parameter">schema</replaceable></></term> + <term><option>-S <replaceable class="parameter">schema</replaceable></option></term> + <term><option>--schema=<replaceable class="parameter">schema</replaceable></option></term> <listitem> <para> Reindex <replaceable class="parameter">schema</replaceable> only. Multiple schemas can be reindexed by writing multiple - <option>-S</> switches. + <option>-S</option> switches. </para> </listitem> </varlistentry> <varlistentry> - <term><option>-t <replaceable class="parameter">table</replaceable></></term> - <term><option>--table=<replaceable class="parameter">table</replaceable></></term> + <term><option>-t <replaceable class="parameter">table</replaceable></option></term> + <term><option>--table=<replaceable class="parameter">table</replaceable></option></term> <listitem> <para> Reindex <replaceable class="parameter">table</replaceable> only. Multiple tables can be reindexed by writing multiple - <option>-t</> switches. + <option>-t</option> switches. </para> </listitem> </varlistentry> <varlistentry> - <term><option>-v</></term> - <term><option>--verbose</></term> + <term><option>-v</option></term> + <term><option>--verbose</option></term> <listitem> <para> Print detailed information during processing. @@ -211,8 +211,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-V</></term> - <term><option>--version</></term> + <term><option>-V</option></term> + <term><option>--version</option></term> <listitem> <para> Print the <application>reindexdb</application> version and exit. @@ -221,8 +221,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-?</></term> - <term><option>--help</></term> + <term><option>-?</option></term> + <term><option>--help</option></term> <listitem> <para> Show help about <application>reindexdb</application> command line @@ -241,8 +241,8 @@ PostgreSQL documentation <variablelist> <varlistentry> - <term><option>-h <replaceable class="parameter">host</replaceable></></term> - <term><option>--host=<replaceable class="parameter">host</replaceable></></term> + <term><option>-h <replaceable class="parameter">host</replaceable></option></term> + <term><option>--host=<replaceable class="parameter">host</replaceable></option></term> <listitem> <para> Specifies the host name of the machine on which the server is @@ -253,8 +253,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-p <replaceable class="parameter">port</replaceable></></term> - <term><option>--port=<replaceable class="parameter">port</replaceable></></term> + <term><option>-p <replaceable class="parameter">port</replaceable></option></term> + <term><option>--port=<replaceable class="parameter">port</replaceable></option></term> <listitem> <para> Specifies the TCP port or local Unix domain socket file @@ -265,8 +265,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-U <replaceable class="parameter">username</replaceable></></term> - <term><option>--username=<replaceable class="parameter">username</replaceable></></term> + <term><option>-U <replaceable class="parameter">username</replaceable></option></term> + <term><option>--username=<replaceable class="parameter">username</replaceable></option></term> <listitem> <para> User name to connect as. @@ -275,8 +275,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-w</></term> - <term><option>--no-password</></term> + <term><option>-w</option></term> + <term><option>--no-password</option></term> <listitem> <para> Never issue a password prompt. If the server requires @@ -290,8 +290,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-W</></term> - <term><option>--password</></term> + <term><option>-W</option></term> + <term><option>--password</option></term> <listitem> <para> Force <application>reindexdb</application> to prompt for a @@ -304,14 +304,14 @@ PostgreSQL documentation for a password if the server demands password authentication. However, <application>reindexdb</application> will waste a connection attempt finding out that the server wants a password. - In some cases it is worth typing <option>-W</> to avoid the extra + In some cases it is worth typing <option>-W</option> to avoid the extra connection attempt. </para> </listitem> </varlistentry> <varlistentry> - <term><option>--maintenance-db=<replaceable class="parameter">dbname</replaceable></></term> + <term><option>--maintenance-db=<replaceable class="parameter">dbname</replaceable></option></term> <listitem> <para> Specifies the name of the database to connect to discover what other @@ -345,8 +345,8 @@ PostgreSQL documentation </variablelist> <para> - This utility, like most other <productname>PostgreSQL</> utilities, - also uses the environment variables supported by <application>libpq</> + This utility, like most other <productname>PostgreSQL</productname> utilities, + also uses the environment variables supported by <application>libpq</application> (see <xref linkend="libpq-envars">). </para> @@ -376,7 +376,7 @@ PostgreSQL documentation <application>reindexdb</application> might need to connect several times to the <productname>PostgreSQL</productname> server, asking for a password each time. It is convenient to have a - <filename>~/.pgpass</> file in such cases. See <xref + <filename>~/.pgpass</filename> file in such cases. See <xref linkend="libpq-pgpass"> for more information. </para> </refsect1> diff --git a/doc/src/sgml/ref/release_savepoint.sgml b/doc/src/sgml/ref/release_savepoint.sgml index b331b7226b0..2e8dcc0746e 100644 --- a/doc/src/sgml/ref/release_savepoint.sgml +++ b/doc/src/sgml/ref/release_savepoint.sgml @@ -109,7 +109,7 @@ COMMIT; <title>Compatibility</title> <para> - This command conforms to the <acronym>SQL</> standard. The standard + This command conforms to the <acronym>SQL</acronym> standard. The standard specifies that the key word <literal>SAVEPOINT</literal> is mandatory, but <productname>PostgreSQL</productname> allows it to be omitted. diff --git a/doc/src/sgml/ref/reset.sgml b/doc/src/sgml/ref/reset.sgml index 98c32078316..b434ad10c28 100644 --- a/doc/src/sgml/ref/reset.sgml +++ b/doc/src/sgml/ref/reset.sgml @@ -42,19 +42,19 @@ SET <replaceable class="parameter">configuration_parameter</replaceable> TO DEFA <para> The default value is defined as the value that the parameter would - have had, if no <command>SET</> had ever been issued for it in the + have had, if no <command>SET</command> had ever been issued for it in the current session. The actual source of this value might be a compiled-in default, the configuration file, command-line options, or per-database or per-user default settings. This is subtly different from defining it as <quote>the value that the parameter had at session - start</>, because if the value came from the configuration file, it + start</quote>, because if the value came from the configuration file, it will be reset to whatever is specified by the configuration file now. See <xref linkend="runtime-config"> for details. </para> <para> - The transactional behavior of <command>RESET</> is the same as - <command>SET</>: its effects will be undone by transaction rollback. + The transactional behavior of <command>RESET</command> is the same as + <command>SET</command>: its effects will be undone by transaction rollback. </para> </refsect1> @@ -88,7 +88,7 @@ SET <replaceable class="parameter">configuration_parameter</replaceable> TO DEFA <title>Examples</title> <para> - Set the <varname>timezone</> configuration variable to its default value: + Set the <varname>timezone</varname> configuration variable to its default value: <screen> RESET timezone; </screen></para> diff --git a/doc/src/sgml/ref/revoke.sgml b/doc/src/sgml/ref/revoke.sgml index 91f69af9eed..c893666e83a 100644 --- a/doc/src/sgml/ref/revoke.sgml +++ b/doc/src/sgml/ref/revoke.sgml @@ -130,13 +130,13 @@ REVOKE [ ADMIN OPTION FOR ] Note that any particular role will have the sum of privileges granted directly to it, privileges granted to any role it is presently a member of, and privileges granted to - <literal>PUBLIC</literal>. Thus, for example, revoking <literal>SELECT</> privilege + <literal>PUBLIC</literal>. Thus, for example, revoking <literal>SELECT</literal> privilege from <literal>PUBLIC</literal> does not necessarily mean that all roles - have lost <literal>SELECT</> privilege on the object: those who have it granted + have lost <literal>SELECT</literal> privilege on the object: those who have it granted directly or via another role will still have it. Similarly, revoking - <literal>SELECT</> from a user might not prevent that user from using - <literal>SELECT</> if <literal>PUBLIC</literal> or another membership - role still has <literal>SELECT</> rights. + <literal>SELECT</literal> from a user might not prevent that user from using + <literal>SELECT</literal> if <literal>PUBLIC</literal> or another membership + role still has <literal>SELECT</literal> rights. </para> <para> @@ -167,10 +167,10 @@ REVOKE [ ADMIN OPTION FOR ] </para> <para> - When revoking membership in a role, <literal>GRANT OPTION</> is instead - called <literal>ADMIN OPTION</>, but the behavior is similar. + When revoking membership in a role, <literal>GRANT OPTION</literal> is instead + called <literal>ADMIN OPTION</literal>, but the behavior is similar. Note also that this form of the command does not - allow the noise word <literal>GROUP</>. + allow the noise word <literal>GROUP</literal>. </para> </refsect1> @@ -181,7 +181,7 @@ REVOKE [ ADMIN OPTION FOR ] Use <xref linkend="app-psql">'s <command>\dp</command> command to display the privileges granted on existing tables and columns. See <xref linkend="sql-grant"> for information about the - format. For non-table objects there are other <command>\d</> commands + format. For non-table objects there are other <command>\d</command> commands that can display their privileges. </para> @@ -198,12 +198,12 @@ REVOKE [ ADMIN OPTION FOR ] </para> <para> - When a non-owner of an object attempts to <command>REVOKE</> privileges + When a non-owner of an object attempts to <command>REVOKE</command> privileges on the object, the command will fail outright if the user has no privileges whatsoever on the object. As long as some privilege is available, the command will proceed, but it will revoke only those privileges for which the user has grant options. The <command>REVOKE ALL - PRIVILEGES</> forms will issue a warning message if no grant options are + PRIVILEGES</command> forms will issue a warning message if no grant options are held, while the other forms will issue a warning if grant options for any of the privileges specifically named in the command are not held. (In principle these statements apply to the object owner as well, but @@ -212,7 +212,7 @@ REVOKE [ ADMIN OPTION FOR ] </para> <para> - If a superuser chooses to issue a <command>GRANT</> or <command>REVOKE</> + If a superuser chooses to issue a <command>GRANT</command> or <command>REVOKE</command> command, the command is performed as though it were issued by the owner of the affected object. Since all privileges ultimately come from the object owner (possibly indirectly via chains of grant options), @@ -221,26 +221,26 @@ REVOKE [ ADMIN OPTION FOR ] </para> <para> - <command>REVOKE</> can also be done by a role + <command>REVOKE</command> can also be done by a role that is not the owner of the affected object, but is a member of the role that owns the object, or is a member of a role that holds privileges <literal>WITH GRANT OPTION</literal> on the object. In this case the command is performed as though it were issued by the containing role that actually owns the object or holds the privileges <literal>WITH GRANT OPTION</literal>. For example, if table - <literal>t1</> is owned by role <literal>g1</>, of which role - <literal>u1</> is a member, then <literal>u1</> can revoke privileges - on <literal>t1</> that are recorded as being granted by <literal>g1</>. - This would include grants made by <literal>u1</> as well as by other - members of role <literal>g1</>. + <literal>t1</literal> is owned by role <literal>g1</literal>, of which role + <literal>u1</literal> is a member, then <literal>u1</literal> can revoke privileges + on <literal>t1</literal> that are recorded as being granted by <literal>g1</literal>. + This would include grants made by <literal>u1</literal> as well as by other + members of role <literal>g1</literal>. </para> <para> - If the role executing <command>REVOKE</> holds privileges + If the role executing <command>REVOKE</command> holds privileges indirectly via more than one role membership path, it is unspecified which containing role will be used to perform the command. In such cases - it is best practice to use <command>SET ROLE</> to become the specific - role you want to do the <command>REVOKE</> as. Failure to do so might + it is best practice to use <command>SET ROLE</command> to become the specific + role you want to do the <command>REVOKE</command> as. Failure to do so might lead to revoking privileges other than the ones you intended, or not revoking anything at all. </para> @@ -267,11 +267,11 @@ REVOKE ALL PRIVILEGES ON kinds FROM manuel; </programlisting> Note that this actually means <quote>revoke all privileges that I - granted</>. + granted</quote>. </para> <para> - Revoke membership in role <literal>admins</> from user <literal>joe</>: + Revoke membership in role <literal>admins</literal> from user <literal>joe</literal>: <programlisting> REVOKE admins FROM joe; @@ -285,7 +285,7 @@ REVOKE admins FROM joe; The compatibility notes of the <xref linkend="sql-grant"> command apply analogously to <command>REVOKE</command>. The keyword <literal>RESTRICT</literal> or <literal>CASCADE</literal> - is required according to the standard, but <productname>PostgreSQL</> + is required according to the standard, but <productname>PostgreSQL</productname> assumes <literal>RESTRICT</literal> by default. </para> </refsect1> diff --git a/doc/src/sgml/ref/rollback.sgml b/doc/src/sgml/ref/rollback.sgml index b0b1e8d0e3f..1a0e5a0ebcf 100644 --- a/doc/src/sgml/ref/rollback.sgml +++ b/doc/src/sgml/ref/rollback.sgml @@ -59,7 +59,7 @@ ROLLBACK [ WORK | TRANSACTION ] </para> <para> - Issuing <command>ROLLBACK</> outside of a transaction + Issuing <command>ROLLBACK</command> outside of a transaction block emits a warning and otherwise has no effect. </para> </refsect1> diff --git a/doc/src/sgml/ref/rollback_prepared.sgml b/doc/src/sgml/ref/rollback_prepared.sgml index a0ffc650830..6c44049a898 100644 --- a/doc/src/sgml/ref/rollback_prepared.sgml +++ b/doc/src/sgml/ref/rollback_prepared.sgml @@ -75,7 +75,7 @@ ROLLBACK PREPARED <replaceable class="parameter">transaction_id</replaceable> <title id="sql-rollback-prepared-examples-title">Examples</title> <para> Roll back the transaction identified by the transaction - identifier <literal>foobar</>: + identifier <literal>foobar</literal>: <programlisting> ROLLBACK PREPARED 'foobar'; diff --git a/doc/src/sgml/ref/rollback_to.sgml b/doc/src/sgml/ref/rollback_to.sgml index e8072d8974d..f1da804f67f 100644 --- a/doc/src/sgml/ref/rollback_to.sgml +++ b/doc/src/sgml/ref/rollback_to.sgml @@ -40,7 +40,7 @@ ROLLBACK [ WORK | TRANSACTION ] TO [ SAVEPOINT ] <replaceable>savepoint_name</re </para> <para> - <command>ROLLBACK TO SAVEPOINT</> implicitly destroys all savepoints that + <command>ROLLBACK TO SAVEPOINT</command> implicitly destroys all savepoints that were established after the named savepoint. </para> </refsect1> @@ -50,7 +50,7 @@ ROLLBACK [ WORK | TRANSACTION ] TO [ SAVEPOINT ] <replaceable>savepoint_name</re <variablelist> <varlistentry> - <term><replaceable class="parameter">savepoint_name</></term> + <term><replaceable class="parameter">savepoint_name</replaceable></term> <listitem> <para> The savepoint to roll back to. @@ -77,17 +77,17 @@ ROLLBACK [ WORK | TRANSACTION ] TO [ SAVEPOINT ] <replaceable>savepoint_name</re Cursors have somewhat non-transactional behavior with respect to savepoints. Any cursor that is opened inside a savepoint will be closed when the savepoint is rolled back. If a previously opened cursor is - affected by a <command>FETCH</> or <command>MOVE</> command inside a + affected by a <command>FETCH</command> or <command>MOVE</command> command inside a savepoint that is later rolled back, the cursor remains at the - position that <command>FETCH</> left it pointing to (that is, the cursor - motion caused by <command>FETCH</> is not rolled back). + position that <command>FETCH</command> left it pointing to (that is, the cursor + motion caused by <command>FETCH</command> is not rolled back). Closing a cursor is not undone by rolling back, either. However, other side-effects caused by the cursor's query (such as - side-effects of volatile functions called by the query) <emphasis>are</> + side-effects of volatile functions called by the query) <emphasis>are</emphasis> rolled back if they occur during a savepoint that is later rolled back. A cursor whose execution causes a transaction to abort is put in a cannot-execute state, so while the transaction can be restored using - <command>ROLLBACK TO SAVEPOINT</>, the cursor can no longer be used. + <command>ROLLBACK TO SAVEPOINT</command>, the cursor can no longer be used. </para> </refsect1> @@ -133,13 +133,13 @@ COMMIT; <title>Compatibility</title> <para> - The <acronym>SQL</> standard specifies that the key word - <literal>SAVEPOINT</> is mandatory, but <productname>PostgreSQL</> - and <productname>Oracle</> allow it to be omitted. SQL allows - only <literal>WORK</>, not <literal>TRANSACTION</>, as a noise word - after <literal>ROLLBACK</>. Also, SQL has an optional clause - <literal>AND [ NO ] CHAIN</> which is not currently supported by - <productname>PostgreSQL</>. Otherwise, this command conforms to + The <acronym>SQL</acronym> standard specifies that the key word + <literal>SAVEPOINT</literal> is mandatory, but <productname>PostgreSQL</productname> + and <productname>Oracle</productname> allow it to be omitted. SQL allows + only <literal>WORK</literal>, not <literal>TRANSACTION</literal>, as a noise word + after <literal>ROLLBACK</literal>. Also, SQL has an optional clause + <literal>AND [ NO ] CHAIN</literal> which is not currently supported by + <productname>PostgreSQL</productname>. Otherwise, this command conforms to the SQL standard. </para> </refsect1> diff --git a/doc/src/sgml/ref/savepoint.sgml b/doc/src/sgml/ref/savepoint.sgml index 5b944a25615..6d40f4da420 100644 --- a/doc/src/sgml/ref/savepoint.sgml +++ b/doc/src/sgml/ref/savepoint.sgml @@ -114,11 +114,11 @@ COMMIT; <para> SQL requires a savepoint to be destroyed automatically when another savepoint with the same name is established. In - <productname>PostgreSQL</>, the old savepoint is kept, though only the more + <productname>PostgreSQL</productname>, the old savepoint is kept, though only the more recent one will be used when rolling back or releasing. (Releasing the - newer savepoint with <command>RELEASE SAVEPOINT</> will cause the older one - to again become accessible to <command>ROLLBACK TO SAVEPOINT</> and - <command>RELEASE SAVEPOINT</>.) Otherwise, <command>SAVEPOINT</command> is + newer savepoint with <command>RELEASE SAVEPOINT</command> will cause the older one + to again become accessible to <command>ROLLBACK TO SAVEPOINT</command> and + <command>RELEASE SAVEPOINT</command>.) Otherwise, <command>SAVEPOINT</command> is fully SQL conforming. </para> </refsect1> diff --git a/doc/src/sgml/ref/security_label.sgml b/doc/src/sgml/ref/security_label.sgml index 971b928a02e..999f9c80cd5 100644 --- a/doc/src/sgml/ref/security_label.sgml +++ b/doc/src/sgml/ref/security_label.sgml @@ -60,12 +60,12 @@ SECURITY LABEL [ FOR <replaceable class="parameter">provider</replaceable> ] ON object. An arbitrary number of security labels, one per label provider, can be associated with a given database object. Label providers are loadable modules which register themselves by using the function - <function>register_label_provider</>. + <function>register_label_provider</function>. </para> <note> <para> - <function>register_label_provider</> is not an SQL function; it can + <function>register_label_provider</function> is not an SQL function; it can only be called from C code loaded into the backend. </para> </note> @@ -74,11 +74,11 @@ SECURITY LABEL [ FOR <replaceable class="parameter">provider</replaceable> ] ON The label provider determines whether a given label is valid and whether it is permissible to assign that label to a given object. The meaning of a given label is likewise at the discretion of the label provider. - <productname>PostgreSQL</> places no restrictions on whether or how a + <productname>PostgreSQL</productname> places no restrictions on whether or how a label provider must interpret security labels; it merely provides a mechanism for storing them. In practice, this facility is intended to allow integration with label-based mandatory access control (MAC) systems such as - <productname>SE-Linux</>. Such systems make all access control decisions + <productname>SE-Linux</productname>. Such systems make all access control decisions based on object labels, rather than traditional discretionary access control (DAC) concepts such as users and groups. </para> @@ -120,14 +120,14 @@ SECURITY LABEL [ FOR <replaceable class="parameter">provider</replaceable> ] ON <listitem> <para> The mode of a function or aggregate - argument: <literal>IN</>, <literal>OUT</>, - <literal>INOUT</>, or <literal>VARIADIC</>. - If omitted, the default is <literal>IN</>. + argument: <literal>IN</literal>, <literal>OUT</literal>, + <literal>INOUT</literal>, or <literal>VARIADIC</literal>. + If omitted, the default is <literal>IN</literal>. Note that <command>SECURITY LABEL</command> does not actually - pay any attention to <literal>OUT</> arguments, since only the input + pay any attention to <literal>OUT</literal> arguments, since only the input arguments are needed to determine the function's identity. - So it is sufficient to list the <literal>IN</>, <literal>INOUT</>, - and <literal>VARIADIC</> arguments. + So it is sufficient to list the <literal>IN</literal>, <literal>INOUT</literal>, + and <literal>VARIADIC</literal> arguments. </para> </listitem> </varlistentry> @@ -178,7 +178,7 @@ SECURITY LABEL [ FOR <replaceable class="parameter">provider</replaceable> ] ON <term><replaceable class="parameter">label</replaceable></term> <listitem> <para> - The new security label, written as a string literal; or <literal>NULL</> + The new security label, written as a string literal; or <literal>NULL</literal> to drop the security label. </para> </listitem> diff --git a/doc/src/sgml/ref/select.sgml b/doc/src/sgml/ref/select.sgml index 57f11e66fb6..7355e790f69 100644 --- a/doc/src/sgml/ref/select.sgml +++ b/doc/src/sgml/ref/select.sgml @@ -163,10 +163,10 @@ TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] operator returns the rows that are in the first result set but not in the second. In all three cases, duplicate rows are eliminated unless <literal>ALL</literal> is specified. The noise - word <literal>DISTINCT</> can be added to explicitly specify - eliminating duplicate rows. Notice that <literal>DISTINCT</> is + word <literal>DISTINCT</literal> can be added to explicitly specify + eliminating duplicate rows. Notice that <literal>DISTINCT</literal> is the default behavior here, even though <literal>ALL</literal> is - the default for <command>SELECT</> itself. (See + the default for <command>SELECT</command> itself. (See <xref linkend="sql-union" endterm="sql-union-title">, <xref linkend="sql-intersect" endterm="sql-intersect-title">, and <xref linkend="sql-except" endterm="sql-except-title"> below.) @@ -194,7 +194,7 @@ TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] <listitem> <para> - If <literal>FOR UPDATE</>, <literal>FOR NO KEY UPDATE</literal>, <literal>FOR SHARE</literal> + If <literal>FOR UPDATE</literal>, <literal>FOR NO KEY UPDATE</literal>, <literal>FOR SHARE</literal> or <literal>FOR KEY SHARE</literal> is specified, the <command>SELECT</command> statement locks the selected rows @@ -207,7 +207,7 @@ TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] <para> You must have <literal>SELECT</literal> privilege on each column used - in a <command>SELECT</> command. The use of <literal>FOR NO KEY UPDATE</>, + in a <command>SELECT</command> command. The use of <literal>FOR NO KEY UPDATE</literal>, <literal>FOR UPDATE</literal>, <literal>FOR SHARE</literal> or <literal>FOR KEY SHARE</literal> requires <literal>UPDATE</literal> privilege as well (for at least one column @@ -226,15 +226,15 @@ TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] subqueries that can be referenced by name in the primary query. The subqueries effectively act as temporary tables or views for the duration of the primary query. - Each subquery can be a <command>SELECT</command>, <command>TABLE</>, <command>VALUES</command>, + Each subquery can be a <command>SELECT</command>, <command>TABLE</command>, <command>VALUES</command>, <command>INSERT</command>, <command>UPDATE</command> or <command>DELETE</command> statement. When writing a data-modifying statement (<command>INSERT</command>, <command>UPDATE</command> or <command>DELETE</command>) in - <literal>WITH</>, it is usual to include a <literal>RETURNING</> clause. - It is the output of <literal>RETURNING</>, <emphasis>not</> the underlying + <literal>WITH</literal>, it is usual to include a <literal>RETURNING</literal> clause. + It is the output of <literal>RETURNING</literal>, <emphasis>not</emphasis> the underlying table that the statement modifies, that forms the temporary table that is - read by the primary query. If <literal>RETURNING</> is omitted, the + read by the primary query. If <literal>RETURNING</literal> is omitted, the statement is still executed, but it produces no output so it cannot be referenced as a table by the primary query. </para> @@ -254,7 +254,7 @@ TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] <replaceable class="parameter">non_recursive_term</replaceable> UNION [ ALL | DISTINCT ] <replaceable class="parameter">recursive_term</replaceable> </synopsis> where the recursive self-reference must appear on the right-hand - side of the <literal>UNION</>. Only one recursive self-reference + side of the <literal>UNION</literal>. Only one recursive self-reference is permitted per query. Recursive data-modifying statements are not supported, but you can use the results of a recursive <command>SELECT</command> query in @@ -285,7 +285,7 @@ TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] The primary query and the <literal>WITH</literal> queries are all (notionally) executed at the same time. This implies that the effects of a data-modifying statement in <literal>WITH</literal> cannot be seen from - other parts of the query, other than by reading its <literal>RETURNING</> + other parts of the query, other than by reading its <literal>RETURNING</literal> output. If two such data-modifying statements attempt to modify the same row, the results are unspecified. </para> @@ -303,7 +303,7 @@ TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] tables for the <command>SELECT</command>. If multiple sources are specified, the result is the Cartesian product (cross join) of all the sources. But usually qualification conditions are added (via - <literal>WHERE</>) to restrict the returned rows to a small subset of the + <literal>WHERE</literal>) to restrict the returned rows to a small subset of the Cartesian product. </para> @@ -317,10 +317,10 @@ TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] <listitem> <para> The name (optionally schema-qualified) of an existing table or view. - If <literal>ONLY</> is specified before the table name, only that - table is scanned. If <literal>ONLY</> is not specified, the table + If <literal>ONLY</literal> is specified before the table name, only that + table is scanned. If <literal>ONLY</literal> is not specified, the table and all its descendant tables (if any) are scanned. Optionally, - <literal>*</> can be specified after the table name to explicitly + <literal>*</literal> can be specified after the table name to explicitly indicate that descendant tables are included. </para> </listitem> @@ -330,14 +330,14 @@ TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] <term><replaceable class="parameter">alias</replaceable></term> <listitem> <para> - A substitute name for the <literal>FROM</> item containing the + A substitute name for the <literal>FROM</literal> item containing the alias. An alias is used for brevity or to eliminate ambiguity for self-joins (where the same table is scanned multiple times). When an alias is provided, it completely hides the actual name of the table or function; for example given - <literal>FROM foo AS f</>, the remainder of the - <command>SELECT</command> must refer to this <literal>FROM</> - item as <literal>f</> not <literal>foo</>. If an alias is + <literal>FROM foo AS f</literal>, the remainder of the + <command>SELECT</command> must refer to this <literal>FROM</literal> + item as <literal>f</literal> not <literal>foo</literal>. If an alias is written, a column alias list can also be written to provide substitute names for one or more columns of the table. </para> @@ -348,12 +348,12 @@ TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] <term><literal>TABLESAMPLE <replaceable class="parameter">sampling_method</replaceable> ( <replaceable class="parameter">argument</replaceable> [, ...] ) [ REPEATABLE ( <replaceable class="parameter">seed</replaceable> ) ]</literal></term> <listitem> <para> - A <literal>TABLESAMPLE</> clause after - a <replaceable class="parameter">table_name</> indicates that the + A <literal>TABLESAMPLE</literal> clause after + a <replaceable class="parameter">table_name</replaceable> indicates that the specified <replaceable class="parameter">sampling_method</replaceable> should be used to retrieve a subset of the rows in that table. This sampling precedes the application of any other filters such - as <literal>WHERE</> clauses. + as <literal>WHERE</literal> clauses. The standard <productname>PostgreSQL</productname> distribution includes two sampling methods, <literal>BERNOULLI</literal> and <literal>SYSTEM</literal>, and other sampling methods can be @@ -361,11 +361,11 @@ TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] </para> <para> - The <literal>BERNOULLI</> and <literal>SYSTEM</> sampling methods - each accept a single <replaceable class="parameter">argument</> + The <literal>BERNOULLI</literal> and <literal>SYSTEM</literal> sampling methods + each accept a single <replaceable class="parameter">argument</replaceable> which is the fraction of the table to sample, expressed as a percentage between 0 and 100. This argument can be - any <type>real</>-valued expression. (Other sampling methods might + any <type>real</type>-valued expression. (Other sampling methods might accept more or different arguments.) These two methods each return a randomly-chosen sample of the table that will contain approximately the specified percentage of the table's rows. @@ -383,10 +383,10 @@ TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] <para> The optional <literal>REPEATABLE</literal> clause specifies - a <replaceable class="parameter">seed</> number or expression to use + a <replaceable class="parameter">seed</replaceable> number or expression to use for generating random numbers within the sampling method. The seed value can be any non-null floating-point value. Two queries that - specify the same seed and <replaceable class="parameter">argument</> + specify the same seed and <replaceable class="parameter">argument</replaceable> values will select the same sample of the table, if the table has not been changed meanwhile. But different seed values will usually produce different samples. @@ -420,9 +420,9 @@ TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] <term><replaceable class="parameter">with_query_name</replaceable></term> <listitem> <para> - A <literal>WITH</> query is referenced by writing its name, + A <literal>WITH</literal> query is referenced by writing its name, just as though the query's name were a table name. (In fact, - the <literal>WITH</> query hides any real table of the same name + the <literal>WITH</literal> query hides any real table of the same name for the purposes of the primary query. If necessary, you can refer to a real table of the same name by schema-qualifying the table's name.) @@ -456,8 +456,8 @@ TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] <para> Multiple function calls can be combined into a - single <literal>FROM</>-clause item by surrounding them - with <literal>ROWS FROM( ... )</>. The output of such an item is the + single <literal>FROM</literal>-clause item by surrounding them + with <literal>ROWS FROM( ... )</literal>. The output of such an item is the concatenation of the first row from each function, then the second row from each function, etc. If some of the functions produce fewer rows than others, null values are substituted for the missing data, so @@ -467,28 +467,28 @@ TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] <para> If the function has been defined as returning the - <type>record</> data type, then an alias or the key word - <literal>AS</> must be present, followed by a column + <type>record</type> data type, then an alias or the key word + <literal>AS</literal> must be present, followed by a column definition list in the form <literal>( <replaceable class="parameter">column_name</replaceable> <replaceable class="parameter">data_type</replaceable> <optional>, ... - </>)</literal>. The column definition list must match the + </optional>)</literal>. The column definition list must match the actual number and types of columns returned by the function. </para> <para> - When using the <literal>ROWS FROM( ... )</> syntax, if one of the + When using the <literal>ROWS FROM( ... )</literal> syntax, if one of the functions requires a column definition list, it's preferred to put the column definition list after the function call inside - <literal>ROWS FROM( ... )</>. A column definition list can be placed - after the <literal>ROWS FROM( ... )</> construct only if there's just - a single function and no <literal>WITH ORDINALITY</> clause. + <literal>ROWS FROM( ... )</literal>. A column definition list can be placed + after the <literal>ROWS FROM( ... )</literal> construct only if there's just + a single function and no <literal>WITH ORDINALITY</literal> clause. </para> <para> To use <literal>ORDINALITY</literal> together with a column definition - list, you must use the <literal>ROWS FROM( ... )</> syntax and put the - column definition list inside <literal>ROWS FROM( ... )</>. + list, you must use the <literal>ROWS FROM( ... )</literal> syntax and put the + column definition list inside <literal>ROWS FROM( ... )</literal>. </para> </listitem> </varlistentry> @@ -516,9 +516,9 @@ TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] </listitem> </itemizedlist> - For the <literal>INNER</> and <literal>OUTER</> join types, a + For the <literal>INNER</literal> and <literal>OUTER</literal> join types, a join condition must be specified, namely exactly one of - <literal>NATURAL</>, <literal>ON <replaceable + <literal>NATURAL</literal>, <literal>ON <replaceable class="parameter">join_condition</replaceable></literal>, or <literal>USING (<replaceable class="parameter">join_column</replaceable> [, ...])</literal>. @@ -527,46 +527,46 @@ TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] </para> <para> - A <literal>JOIN</literal> clause combines two <literal>FROM</> - items, which for convenience we will refer to as <quote>tables</>, - though in reality they can be any type of <literal>FROM</> item. + A <literal>JOIN</literal> clause combines two <literal>FROM</literal> + items, which for convenience we will refer to as <quote>tables</quote>, + though in reality they can be any type of <literal>FROM</literal> item. Use parentheses if necessary to determine the order of nesting. In the absence of parentheses, <literal>JOIN</literal>s nest left-to-right. In any case <literal>JOIN</literal> binds more - tightly than the commas separating <literal>FROM</>-list items. + tightly than the commas separating <literal>FROM</literal>-list items. </para> - <para><literal>CROSS JOIN</> and <literal>INNER JOIN</literal> + <para><literal>CROSS JOIN</literal> and <literal>INNER JOIN</literal> produce a simple Cartesian product, the same result as you get from - listing the two tables at the top level of <literal>FROM</>, + listing the two tables at the top level of <literal>FROM</literal>, but restricted by the join condition (if any). - <literal>CROSS JOIN</> is equivalent to <literal>INNER JOIN ON - (TRUE)</>, that is, no rows are removed by qualification. + <literal>CROSS JOIN</literal> is equivalent to <literal>INNER JOIN ON + (TRUE)</literal>, that is, no rows are removed by qualification. These join types are just a notational convenience, since they - do nothing you couldn't do with plain <literal>FROM</> and - <literal>WHERE</>. + do nothing you couldn't do with plain <literal>FROM</literal> and + <literal>WHERE</literal>. </para> - <para><literal>LEFT OUTER JOIN</> returns all rows in the qualified + <para><literal>LEFT OUTER JOIN</literal> returns all rows in the qualified Cartesian product (i.e., all combined rows that pass its join condition), plus one copy of each row in the left-hand table for which there was no right-hand row that passed the join condition. This left-hand row is extended to the full width of the joined table by inserting null values for the - right-hand columns. Note that only the <literal>JOIN</> + right-hand columns. Note that only the <literal>JOIN</literal> clause's own condition is considered while deciding which rows have matches. Outer conditions are applied afterwards. </para> <para> - Conversely, <literal>RIGHT OUTER JOIN</> returns all the + Conversely, <literal>RIGHT OUTER JOIN</literal> returns all the joined rows, plus one row for each unmatched right-hand row (extended with nulls on the left). This is just a notational convenience, since you could convert it to a <literal>LEFT - OUTER JOIN</> by switching the left and right tables. + OUTER JOIN</literal> by switching the left and right tables. </para> - <para><literal>FULL OUTER JOIN</> returns all the joined rows, plus + <para><literal>FULL OUTER JOIN</literal> returns all the joined rows, plus one row for each unmatched left-hand row (extended with nulls on the right), plus one row for each unmatched right-hand row (extended with nulls on the left). @@ -593,7 +593,7 @@ TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] A clause of the form <literal>USING ( a, b, ... )</literal> is shorthand for <literal>ON left_table.a = right_table.a AND left_table.b = right_table.b ...</literal>. Also, - <literal>USING</> implies that only one of each pair of + <literal>USING</literal> implies that only one of each pair of equivalent columns will be included in the join output, not both. </para> @@ -605,10 +605,10 @@ TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] <listitem> <para> <literal>NATURAL</literal> is shorthand for a - <literal>USING</> list that mentions all columns in the two + <literal>USING</literal> list that mentions all columns in the two tables that have matching names. If there are no common column names, <literal>NATURAL</literal> is equivalent - to <literal>ON TRUE</>. + to <literal>ON TRUE</literal>. </para> </listitem> </varlistentry> @@ -618,32 +618,32 @@ TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] <listitem> <para> The <literal>LATERAL</literal> key word can precede a - sub-<command>SELECT</command> <literal>FROM</> item. This allows the - sub-<command>SELECT</command> to refer to columns of <literal>FROM</> - items that appear before it in the <literal>FROM</> list. (Without + sub-<command>SELECT</command> <literal>FROM</literal> item. This allows the + sub-<command>SELECT</command> to refer to columns of <literal>FROM</literal> + items that appear before it in the <literal>FROM</literal> list. (Without <literal>LATERAL</literal>, each sub-<command>SELECT</command> is evaluated independently and so cannot cross-reference any other - <literal>FROM</> item.) + <literal>FROM</literal> item.) </para> <para><literal>LATERAL</literal> can also precede a function-call - <literal>FROM</> item, but in this case it is a noise word, because - the function expression can refer to earlier <literal>FROM</> items + <literal>FROM</literal> item, but in this case it is a noise word, because + the function expression can refer to earlier <literal>FROM</literal> items in any case. </para> <para> A <literal>LATERAL</literal> item can appear at top level in the - <literal>FROM</> list, or within a <literal>JOIN</> tree. In the + <literal>FROM</literal> list, or within a <literal>JOIN</literal> tree. In the latter case it can also refer to any items that are on the left-hand - side of a <literal>JOIN</> that it is on the right-hand side of. + side of a <literal>JOIN</literal> that it is on the right-hand side of. </para> <para> - When a <literal>FROM</> item contains <literal>LATERAL</literal> + When a <literal>FROM</literal> item contains <literal>LATERAL</literal> cross-references, evaluation proceeds as follows: for each row of the - <literal>FROM</> item providing the cross-referenced column(s), or - set of rows of multiple <literal>FROM</> items providing the + <literal>FROM</literal> item providing the cross-referenced column(s), or + set of rows of multiple <literal>FROM</literal> items providing the columns, the <literal>LATERAL</literal> item is evaluated using that row or row set's values of the columns. The resulting row(s) are joined as usual with the rows they were computed from. This is @@ -651,14 +651,14 @@ TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] </para> <para> - The column source table(s) must be <literal>INNER</> or - <literal>LEFT</> joined to the <literal>LATERAL</literal> item, else + The column source table(s) must be <literal>INNER</literal> or + <literal>LEFT</literal> joined to the <literal>LATERAL</literal> item, else there would not be a well-defined set of rows from which to compute each set of rows for the <literal>LATERAL</literal> item. Thus, - although a construct such as <literal><replaceable>X</> RIGHT JOIN - LATERAL <replaceable>Y</></literal> is syntactically valid, it is - not actually allowed for <replaceable>Y</> to reference - <replaceable>X</>. + although a construct such as <literal><replaceable>X</replaceable> RIGHT JOIN + LATERAL <replaceable>Y</replaceable></literal> is syntactically valid, it is + not actually allowed for <replaceable>Y</replaceable> to reference + <replaceable>X</replaceable>. </para> </listitem> </varlistentry> @@ -707,13 +707,13 @@ GROUP BY <replaceable class="parameter">grouping_element</replaceable> [, ...] </para> <para> - If any of <literal>GROUPING SETS</>, <literal>ROLLUP</> or - <literal>CUBE</> are present as grouping elements, then the - <literal>GROUP BY</> clause as a whole defines some number of - independent <replaceable>grouping sets</>. The effect of this is - equivalent to constructing a <literal>UNION ALL</> between + If any of <literal>GROUPING SETS</literal>, <literal>ROLLUP</literal> or + <literal>CUBE</literal> are present as grouping elements, then the + <literal>GROUP BY</literal> clause as a whole defines some number of + independent <replaceable>grouping sets</replaceable>. The effect of this is + equivalent to constructing a <literal>UNION ALL</literal> between subqueries with the individual grouping sets as their - <literal>GROUP BY</> clauses. For further details on the handling + <literal>GROUP BY</literal> clauses. For further details on the handling of grouping sets see <xref linkend="queries-grouping-sets">. </para> @@ -744,15 +744,15 @@ GROUP BY <replaceable class="parameter">grouping_element</replaceable> [, ...] <para> Keep in mind that all aggregate functions are evaluated before - evaluating any <quote>scalar</> expressions in the <literal>HAVING</> - clause or <literal>SELECT</> list. This means that, for example, - a <literal>CASE</> expression cannot be used to skip evaluation of + evaluating any <quote>scalar</quote> expressions in the <literal>HAVING</literal> + clause or <literal>SELECT</literal> list. This means that, for example, + a <literal>CASE</literal> expression cannot be used to skip evaluation of an aggregate function; see <xref linkend="syntax-express-eval">. </para> <para> - Currently, <literal>FOR NO KEY UPDATE</>, <literal>FOR UPDATE</>, - <literal>FOR SHARE</> and <literal>FOR KEY SHARE</> cannot be + Currently, <literal>FOR NO KEY UPDATE</literal>, <literal>FOR UPDATE</literal>, + <literal>FOR SHARE</literal> and <literal>FOR KEY SHARE</literal> cannot be specified with <literal>GROUP BY</literal>. </para> </refsect2> @@ -784,9 +784,9 @@ HAVING <replaceable class="parameter">condition</replaceable> <para> The presence of <literal>HAVING</literal> turns a query into a grouped - query even if there is no <literal>GROUP BY</> clause. This is the + query even if there is no <literal>GROUP BY</literal> clause. This is the same as what happens when the query contains aggregate functions but - no <literal>GROUP BY</> clause. All the selected rows are considered to + no <literal>GROUP BY</literal> clause. All the selected rows are considered to form a single group, and the <command>SELECT</command> list and <literal>HAVING</literal> clause can only reference table columns from within aggregate functions. Such a query will emit a single row if the @@ -794,8 +794,8 @@ HAVING <replaceable class="parameter">condition</replaceable> </para> <para> - Currently, <literal>FOR NO KEY UPDATE</>, <literal>FOR UPDATE</>, - <literal>FOR SHARE</> and <literal>FOR KEY SHARE</> cannot be + Currently, <literal>FOR NO KEY UPDATE</literal>, <literal>FOR UPDATE</literal>, + <literal>FOR SHARE</literal> and <literal>FOR KEY SHARE</literal> cannot be specified with <literal>HAVING</literal>. </para> </refsect2> @@ -809,7 +809,7 @@ HAVING <replaceable class="parameter">condition</replaceable> WINDOW <replaceable class="parameter">window_name</replaceable> AS ( <replaceable class="parameter">window_definition</replaceable> ) [, ...] </synopsis> where <replaceable class="parameter">window_name</replaceable> is - a name that can be referenced from <literal>OVER</> clauses or + a name that can be referenced from <literal>OVER</literal> clauses or subsequent window definitions, and <replaceable class="parameter">window_definition</replaceable> is <synopsis> @@ -822,29 +822,29 @@ WINDOW <replaceable class="parameter">window_name</replaceable> AS ( <replaceabl <para> If an <replaceable class="parameter">existing_window_name</replaceable> - is specified it must refer to an earlier entry in the <literal>WINDOW</> + is specified it must refer to an earlier entry in the <literal>WINDOW</literal> list; the new window copies its partitioning clause from that entry, as well as its ordering clause if any. In this case the new window cannot - specify its own <literal>PARTITION BY</> clause, and it can specify - <literal>ORDER BY</> only if the copied window does not have one. + specify its own <literal>PARTITION BY</literal> clause, and it can specify + <literal>ORDER BY</literal> only if the copied window does not have one. The new window always uses its own frame clause; the copied window must not specify a frame clause. </para> <para> - The elements of the <literal>PARTITION BY</> list are interpreted in + The elements of the <literal>PARTITION BY</literal> list are interpreted in much the same fashion as elements of a <xref linkend="sql-groupby" endterm="sql-groupby-title">, except that they are always simple expressions and never the name or number of an output column. Another difference is that these expressions can contain aggregate - function calls, which are not allowed in a regular <literal>GROUP BY</> + function calls, which are not allowed in a regular <literal>GROUP BY</literal> clause. They are allowed here because windowing occurs after grouping and aggregation. </para> <para> - Similarly, the elements of the <literal>ORDER BY</> list are interpreted + Similarly, the elements of the <literal>ORDER BY</literal> list are interpreted in much the same fashion as elements of an <xref linkend="sql-orderby" endterm="sql-orderby-title">, except that the expressions are always taken as simple expressions and never the name @@ -852,18 +852,18 @@ WINDOW <replaceable class="parameter">window_name</replaceable> AS ( <replaceabl </para> <para> - The optional <replaceable class="parameter">frame_clause</> defines - the <firstterm>window frame</> for window functions that depend on the + The optional <replaceable class="parameter">frame_clause</replaceable> defines + the <firstterm>window frame</firstterm> for window functions that depend on the frame (not all do). The window frame is a set of related rows for - each row of the query (called the <firstterm>current row</>). - The <replaceable class="parameter">frame_clause</> can be one of + each row of the query (called the <firstterm>current row</firstterm>). + The <replaceable class="parameter">frame_clause</replaceable> can be one of <synopsis> -{ RANGE | ROWS } <replaceable>frame_start</> -{ RANGE | ROWS } BETWEEN <replaceable>frame_start</> AND <replaceable>frame_end</> +{ RANGE | ROWS } <replaceable>frame_start</replaceable> +{ RANGE | ROWS } BETWEEN <replaceable>frame_start</replaceable> AND <replaceable>frame_end</replaceable> </synopsis> - where <replaceable>frame_start</> and <replaceable>frame_end</> can be + where <replaceable>frame_start</replaceable> and <replaceable>frame_end</replaceable> can be one of <synopsis> @@ -874,34 +874,34 @@ CURRENT ROW UNBOUNDED FOLLOWING </synopsis> - If <replaceable>frame_end</> is omitted it defaults to <literal>CURRENT - ROW</>. Restrictions are that - <replaceable>frame_start</> cannot be <literal>UNBOUNDED FOLLOWING</>, - <replaceable>frame_end</> cannot be <literal>UNBOUNDED PRECEDING</>, - and the <replaceable>frame_end</> choice cannot appear earlier in the - above list than the <replaceable>frame_start</> choice — for example - <literal>RANGE BETWEEN CURRENT ROW AND <replaceable>value</> + If <replaceable>frame_end</replaceable> is omitted it defaults to <literal>CURRENT + ROW</literal>. Restrictions are that + <replaceable>frame_start</replaceable> cannot be <literal>UNBOUNDED FOLLOWING</literal>, + <replaceable>frame_end</replaceable> cannot be <literal>UNBOUNDED PRECEDING</literal>, + and the <replaceable>frame_end</replaceable> choice cannot appear earlier in the + above list than the <replaceable>frame_start</replaceable> choice — for example + <literal>RANGE BETWEEN CURRENT ROW AND <replaceable>value</replaceable> PRECEDING</literal> is not allowed. </para> <para> - The default framing option is <literal>RANGE UNBOUNDED PRECEDING</>, + The default framing option is <literal>RANGE UNBOUNDED PRECEDING</literal>, which is the same as <literal>RANGE BETWEEN UNBOUNDED PRECEDING AND - CURRENT ROW</>; it sets the frame to be all rows from the partition start + CURRENT ROW</literal>; it sets the frame to be all rows from the partition start up through the current row's last peer (a row that <literal>ORDER - BY</> considers equivalent to the current row, or all rows if there - is no <literal>ORDER BY</>). - In general, <literal>UNBOUNDED PRECEDING</> means that the frame + BY</literal> considers equivalent to the current row, or all rows if there + is no <literal>ORDER BY</literal>). + In general, <literal>UNBOUNDED PRECEDING</literal> means that the frame starts with the first row of the partition, and similarly - <literal>UNBOUNDED FOLLOWING</> means that the frame ends with the last - row of the partition (regardless of <literal>RANGE</> or <literal>ROWS</> - mode). In <literal>ROWS</> mode, <literal>CURRENT ROW</> + <literal>UNBOUNDED FOLLOWING</literal> means that the frame ends with the last + row of the partition (regardless of <literal>RANGE</literal> or <literal>ROWS</literal> + mode). In <literal>ROWS</literal> mode, <literal>CURRENT ROW</literal> means that the frame starts or ends with the current row; but in - <literal>RANGE</> mode it means that the frame starts or ends with - the current row's first or last peer in the <literal>ORDER BY</> ordering. - The <replaceable>value</> <literal>PRECEDING</> and - <replaceable>value</> <literal>FOLLOWING</> cases are currently only - allowed in <literal>ROWS</> mode. They indicate that the frame starts + <literal>RANGE</literal> mode it means that the frame starts or ends with + the current row's first or last peer in the <literal>ORDER BY</literal> ordering. + The <replaceable>value</replaceable> <literal>PRECEDING</literal> and + <replaceable>value</replaceable> <literal>FOLLOWING</literal> cases are currently only + allowed in <literal>ROWS</literal> mode. They indicate that the frame starts or ends with the row that many rows before or after the current row. <replaceable>value</replaceable> must be an integer expression not containing any variables, aggregate functions, or window functions. @@ -910,32 +910,32 @@ UNBOUNDED FOLLOWING </para> <para> - Beware that the <literal>ROWS</> options can produce unpredictable - results if the <literal>ORDER BY</> ordering does not order the rows - uniquely. The <literal>RANGE</> options are designed to ensure that - rows that are peers in the <literal>ORDER BY</> ordering are treated + Beware that the <literal>ROWS</literal> options can produce unpredictable + results if the <literal>ORDER BY</literal> ordering does not order the rows + uniquely. The <literal>RANGE</literal> options are designed to ensure that + rows that are peers in the <literal>ORDER BY</literal> ordering are treated alike; all peer rows will be in the same frame. </para> <para> The purpose of a <literal>WINDOW</literal> clause is to specify the - behavior of <firstterm>window functions</> appearing in the query's + behavior of <firstterm>window functions</firstterm> appearing in the query's <xref linkend="sql-select-list" endterm="sql-select-list-title"> or <xref linkend="sql-orderby" endterm="sql-orderby-title">. These functions can reference the <literal>WINDOW</literal> clause entries by name - in their <literal>OVER</> clauses. A <literal>WINDOW</literal> clause + in their <literal>OVER</literal> clauses. A <literal>WINDOW</literal> clause entry does not have to be referenced anywhere, however; if it is not used in the query it is simply ignored. It is possible to use window functions without any <literal>WINDOW</literal> clause at all, since a window function call can specify its window definition directly in - its <literal>OVER</> clause. However, the <literal>WINDOW</literal> + its <literal>OVER</literal> clause. However, the <literal>WINDOW</literal> clause saves typing when the same window definition is needed for more than one window function. </para> <para> - Currently, <literal>FOR NO KEY UPDATE</>, <literal>FOR UPDATE</>, - <literal>FOR SHARE</> and <literal>FOR KEY SHARE</> cannot be + Currently, <literal>FOR NO KEY UPDATE</literal>, <literal>FOR UPDATE</literal>, + <literal>FOR SHARE</literal> and <literal>FOR KEY SHARE</literal> cannot be specified with <literal>WINDOW</literal>. </para> @@ -952,20 +952,20 @@ UNBOUNDED FOLLOWING <para> The <command>SELECT</command> list (between the key words - <literal>SELECT</> and <literal>FROM</>) specifies expressions + <literal>SELECT</literal> and <literal>FROM</literal>) specifies expressions that form the output rows of the <command>SELECT</command> statement. The expressions can (and usually do) refer to columns - computed in the <literal>FROM</> clause. + computed in the <literal>FROM</literal> clause. </para> <para> Just as in a table, every output column of a <command>SELECT</command> has a name. In a simple <command>SELECT</command> this name is just - used to label the column for display, but when the <command>SELECT</> + used to label the column for display, but when the <command>SELECT</command> is a sub-query of a larger query, the name is seen by the larger query as the column name of the virtual table produced by the sub-query. To specify the name to use for an output column, write - <literal>AS</> <replaceable class="parameter">output_name</replaceable> + <literal>AS</literal> <replaceable class="parameter">output_name</replaceable> after the column's expression. (You can omit <literal>AS</literal>, but only if the desired output name does not match any <productname>PostgreSQL</productname> keyword (see <xref @@ -982,8 +982,8 @@ UNBOUNDED FOLLOWING <para> An output column's name can be used to refer to the column's value in - <literal>ORDER BY</> and <literal>GROUP BY</> clauses, but not in the - <literal>WHERE</> or <literal>HAVING</> clauses; there you must write + <literal>ORDER BY</literal> and <literal>GROUP BY</literal> clauses, but not in the + <literal>WHERE</literal> or <literal>HAVING</literal> clauses; there you must write out the expression instead. </para> @@ -993,7 +993,7 @@ UNBOUNDED FOLLOWING rows. Also, you can write <literal><replaceable class="parameter">table_name</replaceable>.*</literal> as a shorthand for the columns coming from just that table. In these - cases it is not possible to specify new names with <literal>AS</>; + cases it is not possible to specify new names with <literal>AS</literal>; the output column names will be the same as the table columns' names. </para> @@ -1008,11 +1008,11 @@ UNBOUNDED FOLLOWING contains any volatile or expensive functions. With that behavior, the order of function evaluations is more intuitive and there will not be evaluations corresponding to rows that never appear in the output. - <productname>PostgreSQL</> will effectively evaluate output expressions + <productname>PostgreSQL</productname> will effectively evaluate output expressions after sorting and limiting, so long as those expressions are not referenced in <literal>DISTINCT</literal>, <literal>ORDER BY</literal> or <literal>GROUP BY</literal>. (As a counterexample, <literal>SELECT - f(x) FROM tab ORDER BY 1</> clearly must evaluate <function>f(x)</> + f(x) FROM tab ORDER BY 1</literal> clearly must evaluate <function>f(x)</function> before sorting.) Output expressions that contain set-returning functions are effectively evaluated after sorting and before limiting, so that <literal>LIMIT</literal> will act to cut off the output from a @@ -1021,7 +1021,7 @@ UNBOUNDED FOLLOWING <note> <para> - <productname>PostgreSQL</> versions before 9.6 did not provide any + <productname>PostgreSQL</productname> versions before 9.6 did not provide any guarantees about the timing of evaluation of output expressions versus sorting and limiting; it depended on the form of the chosen query plan. </para> @@ -1032,9 +1032,9 @@ UNBOUNDED FOLLOWING <title id="sql-distinct-title"><literal>DISTINCT</literal> Clause</title> <para> - If <literal>SELECT DISTINCT</> is specified, all duplicate rows are + If <literal>SELECT DISTINCT</literal> is specified, all duplicate rows are removed from the result set (one row is kept from each group of - duplicates). <literal>SELECT ALL</> specifies the opposite: all rows are + duplicates). <literal>SELECT ALL</literal> specifies the opposite: all rows are kept; that is the default. </para> @@ -1044,9 +1044,9 @@ UNBOUNDED FOLLOWING keeps only the first row of each set of rows where the given expressions evaluate to equal. The <literal>DISTINCT ON</literal> expressions are interpreted using the same rules as for - <literal>ORDER BY</> (see above). Note that the <quote>first + <literal>ORDER BY</literal> (see above). Note that the <quote>first row</quote> of each set is unpredictable unless <literal>ORDER - BY</> is used to ensure that the desired row appears first. For + BY</literal> is used to ensure that the desired row appears first. For example: <programlisting> SELECT DISTINCT ON (location) location, time, report @@ -1054,21 +1054,21 @@ SELECT DISTINCT ON (location) location, time, report ORDER BY location, time DESC; </programlisting> retrieves the most recent weather report for each location. But - if we had not used <literal>ORDER BY</> to force descending order + if we had not used <literal>ORDER BY</literal> to force descending order of time values for each location, we'd have gotten a report from an unpredictable time for each location. </para> <para> - The <literal>DISTINCT ON</> expression(s) must match the leftmost - <literal>ORDER BY</> expression(s). The <literal>ORDER BY</> clause + The <literal>DISTINCT ON</literal> expression(s) must match the leftmost + <literal>ORDER BY</literal> expression(s). The <literal>ORDER BY</literal> clause will normally contain additional expression(s) that determine the - desired precedence of rows within each <literal>DISTINCT ON</> group. + desired precedence of rows within each <literal>DISTINCT ON</literal> group. </para> <para> - Currently, <literal>FOR NO KEY UPDATE</>, <literal>FOR UPDATE</>, - <literal>FOR SHARE</> and <literal>FOR KEY SHARE</> cannot be + Currently, <literal>FOR NO KEY UPDATE</literal>, <literal>FOR UPDATE</literal>, + <literal>FOR SHARE</literal> and <literal>FOR KEY SHARE</literal> cannot be specified with <literal>DISTINCT</literal>. </para> </refsect2> @@ -1082,9 +1082,9 @@ SELECT DISTINCT ON (location) location, time, report <replaceable class="parameter">select_statement</replaceable> UNION [ ALL | DISTINCT ] <replaceable class="parameter">select_statement</replaceable> </synopsis><replaceable class="parameter">select_statement</replaceable> is any <command>SELECT</command> statement without an <literal>ORDER - BY</>, <literal>LIMIT</>, <literal>FOR NO KEY UPDATE</>, <literal>FOR UPDATE</literal>, + BY</literal>, <literal>LIMIT</literal>, <literal>FOR NO KEY UPDATE</literal>, <literal>FOR UPDATE</literal>, <literal>FOR SHARE</literal>, or <literal>FOR KEY SHARE</literal> clause. - (<literal>ORDER BY</> and <literal>LIMIT</> can be attached to a + (<literal>ORDER BY</literal> and <literal>LIMIT</literal> can be attached to a subexpression if it is enclosed in parentheses. Without parentheses, these clauses will be taken to apply to the result of the <literal>UNION</literal>, not to its right-hand input @@ -1103,26 +1103,26 @@ SELECT DISTINCT ON (location) location, time, report </para> <para> - The result of <literal>UNION</> does not contain any duplicate - rows unless the <literal>ALL</> option is specified. - <literal>ALL</> prevents elimination of duplicates. (Therefore, - <literal>UNION ALL</> is usually significantly quicker than - <literal>UNION</>; use <literal>ALL</> when you can.) - <literal>DISTINCT</> can be written to explicitly specify the + The result of <literal>UNION</literal> does not contain any duplicate + rows unless the <literal>ALL</literal> option is specified. + <literal>ALL</literal> prevents elimination of duplicates. (Therefore, + <literal>UNION ALL</literal> is usually significantly quicker than + <literal>UNION</literal>; use <literal>ALL</literal> when you can.) + <literal>DISTINCT</literal> can be written to explicitly specify the default behavior of eliminating duplicate rows. </para> <para> - Multiple <literal>UNION</> operators in the same + Multiple <literal>UNION</literal> operators in the same <command>SELECT</command> statement are evaluated left to right, unless otherwise indicated by parentheses. </para> <para> - Currently, <literal>FOR NO KEY UPDATE</>, <literal>FOR UPDATE</>, <literal>FOR SHARE</> and - <literal>FOR KEY SHARE</> cannot be - specified either for a <literal>UNION</> result or for any input of a - <literal>UNION</>. + Currently, <literal>FOR NO KEY UPDATE</literal>, <literal>FOR UPDATE</literal>, <literal>FOR SHARE</literal> and + <literal>FOR KEY SHARE</literal> cannot be + specified either for a <literal>UNION</literal> result or for any input of a + <literal>UNION</literal>. </para> </refsect2> @@ -1135,8 +1135,8 @@ SELECT DISTINCT ON (location) location, time, report <replaceable class="parameter">select_statement</replaceable> INTERSECT [ ALL | DISTINCT ] <replaceable class="parameter">select_statement</replaceable> </synopsis><replaceable class="parameter">select_statement</replaceable> is any <command>SELECT</command> statement without an <literal>ORDER - BY</>, <literal>LIMIT</>, <literal>FOR NO KEY UPDATE</>, <literal>FOR UPDATE</literal>, - <literal>FOR SHARE</literal>, or <literal>FOR KEY SHARE</> clause. + BY</literal>, <literal>LIMIT</literal>, <literal>FOR NO KEY UPDATE</literal>, <literal>FOR UPDATE</literal>, + <literal>FOR SHARE</literal>, or <literal>FOR KEY SHARE</literal> clause. </para> <para> @@ -1148,11 +1148,11 @@ SELECT DISTINCT ON (location) location, time, report <para> The result of <literal>INTERSECT</literal> does not contain any - duplicate rows unless the <literal>ALL</> option is specified. - With <literal>ALL</>, a row that has <replaceable>m</> duplicates in the - left table and <replaceable>n</> duplicates in the right table will appear - min(<replaceable>m</>,<replaceable>n</>) times in the result set. - <literal>DISTINCT</> can be written to explicitly specify the + duplicate rows unless the <literal>ALL</literal> option is specified. + With <literal>ALL</literal>, a row that has <replaceable>m</replaceable> duplicates in the + left table and <replaceable>n</replaceable> duplicates in the right table will appear + min(<replaceable>m</replaceable>,<replaceable>n</replaceable>) times in the result set. + <literal>DISTINCT</literal> can be written to explicitly specify the default behavior of eliminating duplicate rows. </para> @@ -1167,10 +1167,10 @@ SELECT DISTINCT ON (location) location, time, report </para> <para> - Currently, <literal>FOR NO KEY UPDATE</>, <literal>FOR UPDATE</>, <literal>FOR SHARE</> and - <literal>FOR KEY SHARE</> cannot be - specified either for an <literal>INTERSECT</> result or for any input of - an <literal>INTERSECT</>. + Currently, <literal>FOR NO KEY UPDATE</literal>, <literal>FOR UPDATE</literal>, <literal>FOR SHARE</literal> and + <literal>FOR KEY SHARE</literal> cannot be + specified either for an <literal>INTERSECT</literal> result or for any input of + an <literal>INTERSECT</literal>. </para> </refsect2> @@ -1183,8 +1183,8 @@ SELECT DISTINCT ON (location) location, time, report <replaceable class="parameter">select_statement</replaceable> EXCEPT [ ALL | DISTINCT ] <replaceable class="parameter">select_statement</replaceable> </synopsis><replaceable class="parameter">select_statement</replaceable> is any <command>SELECT</command> statement without an <literal>ORDER - BY</>, <literal>LIMIT</>, <literal>FOR NO KEY UPDATE</>, <literal>FOR UPDATE</literal>, - <literal>FOR SHARE</literal>, or <literal>FOR KEY SHARE</> clause. + BY</literal>, <literal>LIMIT</literal>, <literal>FOR NO KEY UPDATE</literal>, <literal>FOR UPDATE</literal>, + <literal>FOR SHARE</literal>, or <literal>FOR KEY SHARE</literal> clause. </para> <para> @@ -1195,26 +1195,26 @@ SELECT DISTINCT ON (location) location, time, report <para> The result of <literal>EXCEPT</literal> does not contain any - duplicate rows unless the <literal>ALL</> option is specified. - With <literal>ALL</>, a row that has <replaceable>m</> duplicates in the - left table and <replaceable>n</> duplicates in the right table will appear - max(<replaceable>m</>-<replaceable>n</>,0) times in the result set. - <literal>DISTINCT</> can be written to explicitly specify the + duplicate rows unless the <literal>ALL</literal> option is specified. + With <literal>ALL</literal>, a row that has <replaceable>m</replaceable> duplicates in the + left table and <replaceable>n</replaceable> duplicates in the right table will appear + max(<replaceable>m</replaceable>-<replaceable>n</replaceable>,0) times in the result set. + <literal>DISTINCT</literal> can be written to explicitly specify the default behavior of eliminating duplicate rows. </para> <para> Multiple <literal>EXCEPT</literal> operators in the same <command>SELECT</command> statement are evaluated left to right, - unless parentheses dictate otherwise. <literal>EXCEPT</> binds at - the same level as <literal>UNION</>. + unless parentheses dictate otherwise. <literal>EXCEPT</literal> binds at + the same level as <literal>UNION</literal>. </para> <para> - Currently, <literal>FOR NO KEY UPDATE</>, <literal>FOR UPDATE</>, <literal>FOR SHARE</> and - <literal>FOR KEY SHARE</> cannot be - specified either for an <literal>EXCEPT</> result or for any input of - an <literal>EXCEPT</>. + Currently, <literal>FOR NO KEY UPDATE</literal>, <literal>FOR UPDATE</literal>, <literal>FOR SHARE</literal> and + <literal>FOR KEY SHARE</literal> cannot be + specified either for an <literal>EXCEPT</literal> result or for any input of + an <literal>EXCEPT</literal>. </para> </refsect2> @@ -1247,7 +1247,7 @@ ORDER BY <replaceable class="parameter">expression</replaceable> [ ASC | DESC | ordering on the basis of a column that does not have a unique name. This is never absolutely necessary because it is always possible to assign a name to an output column using the - <literal>AS</> clause. + <literal>AS</literal> clause. </para> <para> @@ -1258,59 +1258,59 @@ ORDER BY <replaceable class="parameter">expression</replaceable> [ ASC | DESC | <programlisting> SELECT name FROM distributors ORDER BY code; </programlisting> - A limitation of this feature is that an <literal>ORDER BY</> - clause applying to the result of a <literal>UNION</>, - <literal>INTERSECT</>, or <literal>EXCEPT</> clause can only + A limitation of this feature is that an <literal>ORDER BY</literal> + clause applying to the result of a <literal>UNION</literal>, + <literal>INTERSECT</literal>, or <literal>EXCEPT</literal> clause can only specify an output column name or number, not an expression. </para> <para> - If an <literal>ORDER BY</> expression is a simple name that + If an <literal>ORDER BY</literal> expression is a simple name that matches both an output column name and an input column name, - <literal>ORDER BY</> will interpret it as the output column name. - This is the opposite of the choice that <literal>GROUP BY</> will + <literal>ORDER BY</literal> will interpret it as the output column name. + This is the opposite of the choice that <literal>GROUP BY</literal> will make in the same situation. This inconsistency is made to be compatible with the SQL standard. </para> <para> - Optionally one can add the key word <literal>ASC</> (ascending) or - <literal>DESC</> (descending) after any expression in the - <literal>ORDER BY</> clause. If not specified, <literal>ASC</> is + Optionally one can add the key word <literal>ASC</literal> (ascending) or + <literal>DESC</literal> (descending) after any expression in the + <literal>ORDER BY</literal> clause. If not specified, <literal>ASC</literal> is assumed by default. Alternatively, a specific ordering operator - name can be specified in the <literal>USING</> clause. + name can be specified in the <literal>USING</literal> clause. An ordering operator must be a less-than or greater-than member of some B-tree operator family. - <literal>ASC</> is usually equivalent to <literal>USING <</> and - <literal>DESC</> is usually equivalent to <literal>USING ></>. + <literal>ASC</literal> is usually equivalent to <literal>USING <</literal> and + <literal>DESC</literal> is usually equivalent to <literal>USING ></literal>. (But the creator of a user-defined data type can define exactly what the default sort ordering is, and it might correspond to operators with other names.) </para> <para> - If <literal>NULLS LAST</> is specified, null values sort after all - non-null values; if <literal>NULLS FIRST</> is specified, null values + If <literal>NULLS LAST</literal> is specified, null values sort after all + non-null values; if <literal>NULLS FIRST</literal> is specified, null values sort before all non-null values. If neither is specified, the default - behavior is <literal>NULLS LAST</> when <literal>ASC</> is specified - or implied, and <literal>NULLS FIRST</> when <literal>DESC</> is specified + behavior is <literal>NULLS LAST</literal> when <literal>ASC</literal> is specified + or implied, and <literal>NULLS FIRST</literal> when <literal>DESC</literal> is specified (thus, the default is to act as though nulls are larger than non-nulls). - When <literal>USING</> is specified, the default nulls ordering depends + When <literal>USING</literal> is specified, the default nulls ordering depends on whether the operator is a less-than or greater-than operator. </para> <para> Note that ordering options apply only to the expression they follow; - for example <literal>ORDER BY x, y DESC</> does not mean - the same thing as <literal>ORDER BY x DESC, y DESC</>. + for example <literal>ORDER BY x, y DESC</literal> does not mean + the same thing as <literal>ORDER BY x DESC, y DESC</literal>. </para> <para> Character-string data is sorted according to the collation that applies to the column being sorted. That can be overridden at need by including - a <literal>COLLATE</> clause in the + a <literal>COLLATE</literal> clause in the <replaceable class="parameter">expression</replaceable>, for example - <literal>ORDER BY mycolumn COLLATE "en_US"</>. + <literal>ORDER BY mycolumn COLLATE "en_US"</literal>. For more information see <xref linkend="sql-syntax-collate-exprs"> and <xref linkend="collation">. </para> @@ -1337,60 +1337,60 @@ OFFSET <replaceable class="parameter">start</replaceable> <para> If the <replaceable class="parameter">count</replaceable> expression - evaluates to NULL, it is treated as <literal>LIMIT ALL</>, i.e., no + evaluates to NULL, it is treated as <literal>LIMIT ALL</literal>, i.e., no limit. If <replaceable class="parameter">start</replaceable> evaluates - to NULL, it is treated the same as <literal>OFFSET 0</>. + to NULL, it is treated the same as <literal>OFFSET 0</literal>. </para> <para> SQL:2008 introduced a different syntax to achieve the same result, - which <productname>PostgreSQL</> also supports. It is: + which <productname>PostgreSQL</productname> also supports. It is: <synopsis> OFFSET <replaceable class="parameter">start</replaceable> { ROW | ROWS } FETCH { FIRST | NEXT } [ <replaceable class="parameter">count</replaceable> ] { ROW | ROWS } ONLY </synopsis> In this syntax, to write anything except a simple integer constant for - <replaceable class="parameter">start</> or <replaceable + <replaceable class="parameter">start</replaceable> or <replaceable class="parameter">count</replaceable>, you must write parentheses around it. - If <replaceable class="parameter">count</> is - omitted in a <literal>FETCH</> clause, it defaults to 1. + If <replaceable class="parameter">count</replaceable> is + omitted in a <literal>FETCH</literal> clause, it defaults to 1. <literal>ROW</literal> and <literal>ROWS</literal> as well as <literal>FIRST</literal> and <literal>NEXT</literal> are noise words that don't influence the effects of these clauses. According to the standard, the <literal>OFFSET</literal> clause must come before the <literal>FETCH</literal> clause if both are present; but - <productname>PostgreSQL</> is laxer and allows either order. + <productname>PostgreSQL</productname> is laxer and allows either order. </para> <para> - When using <literal>LIMIT</>, it is a good idea to use an - <literal>ORDER BY</> clause that constrains the result rows into a + When using <literal>LIMIT</literal>, it is a good idea to use an + <literal>ORDER BY</literal> clause that constrains the result rows into a unique order. Otherwise you will get an unpredictable subset of the query's rows — you might be asking for the tenth through twentieth rows, but tenth through twentieth in what ordering? You - don't know what ordering unless you specify <literal>ORDER BY</>. + don't know what ordering unless you specify <literal>ORDER BY</literal>. </para> <para> - The query planner takes <literal>LIMIT</> into account when + The query planner takes <literal>LIMIT</literal> into account when generating a query plan, so you are very likely to get different plans (yielding different row orders) depending on what you use - for <literal>LIMIT</> and <literal>OFFSET</>. Thus, using - different <literal>LIMIT</>/<literal>OFFSET</> values to select + for <literal>LIMIT</literal> and <literal>OFFSET</literal>. Thus, using + different <literal>LIMIT</literal>/<literal>OFFSET</literal> values to select different subsets of a query result <emphasis>will give inconsistent results</emphasis> unless you enforce a predictable - result ordering with <literal>ORDER BY</>. This is not a bug; it + result ordering with <literal>ORDER BY</literal>. This is not a bug; it is an inherent consequence of the fact that SQL does not promise to deliver the results of a query in any particular order unless - <literal>ORDER BY</> is used to constrain the order. + <literal>ORDER BY</literal> is used to constrain the order. </para> <para> - It is even possible for repeated executions of the same <literal>LIMIT</> + It is even possible for repeated executions of the same <literal>LIMIT</literal> query to return different subsets of the rows of a table, if there - is not an <literal>ORDER BY</> to enforce selection of a deterministic + is not an <literal>ORDER BY</literal> to enforce selection of a deterministic subset. Again, this is not a bug; determinism of the results is simply not guaranteed in such a case. </para> @@ -1400,9 +1400,9 @@ FETCH { FIRST | NEXT } [ <replaceable class="parameter">count</replaceable> ] { <title id="sql-for-update-share-title">The Locking Clause</title> <para> - <literal>FOR UPDATE</>, <literal>FOR NO KEY UPDATE</>, <literal>FOR SHARE</> - and <literal>FOR KEY SHARE</> - are <firstterm>locking clauses</>; they affect how <literal>SELECT</> + <literal>FOR UPDATE</literal>, <literal>FOR NO KEY UPDATE</literal>, <literal>FOR SHARE</literal> + and <literal>FOR KEY SHARE</literal> + are <firstterm>locking clauses</firstterm>; they affect how <literal>SELECT</literal> locks rows as they are obtained from the table. </para> @@ -1410,10 +1410,10 @@ FETCH { FIRST | NEXT } [ <replaceable class="parameter">count</replaceable> ] { The locking clause has the general form <synopsis> -FOR <replaceable>lock_strength</> [ OF <replaceable class="parameter">table_name</replaceable> [, ...] ] [ NOWAIT | SKIP LOCKED ] +FOR <replaceable>lock_strength</replaceable> [ OF <replaceable class="parameter">table_name</replaceable> [, ...] ] [ NOWAIT | SKIP LOCKED ] </synopsis> - where <replaceable>lock_strength</> can be one of + where <replaceable>lock_strength</replaceable> can be one of <synopsis> UPDATE @@ -1430,20 +1430,20 @@ KEY SHARE <para> To prevent the operation from waiting for other transactions to commit, - use either the <literal>NOWAIT</> or <literal>SKIP LOCKED</literal> - option. With <literal>NOWAIT</>, the statement reports an error, rather + use either the <literal>NOWAIT</literal> or <literal>SKIP LOCKED</literal> + option. With <literal>NOWAIT</literal>, the statement reports an error, rather than waiting, if a selected row cannot be locked immediately. With <literal>SKIP LOCKED</literal>, any selected rows that cannot be immediately locked are skipped. Skipping locked rows provides an inconsistent view of the data, so this is not suitable for general purpose work, but can be used to avoid lock contention with multiple consumers accessing a queue-like table. - Note that <literal>NOWAIT</> and <literal>SKIP LOCKED</literal> apply only + Note that <literal>NOWAIT</literal> and <literal>SKIP LOCKED</literal> apply only to the row-level lock(s) — the required <literal>ROW SHARE</literal> table-level lock is still taken in the ordinary way (see <xref linkend="mvcc">). You can use <xref linkend="sql-lock"> - with the <literal>NOWAIT</> option first, + with the <literal>NOWAIT</literal> option first, if you need to acquire the table-level lock without waiting. </para> @@ -1457,9 +1457,9 @@ KEY SHARE applied to a view or sub-query, it affects all tables used in the view or sub-query. However, these clauses - do not apply to <literal>WITH</> queries referenced by the primary query. - If you want row locking to occur within a <literal>WITH</> query, specify - a locking clause within the <literal>WITH</> query. + do not apply to <literal>WITH</literal> queries referenced by the primary query. + If you want row locking to occur within a <literal>WITH</literal> query, specify + a locking clause within the <literal>WITH</literal> query. </para> <para> @@ -1469,7 +1469,7 @@ KEY SHARE implicitly affected) by more than one locking clause, then it is processed as if it was only specified by the strongest one. Similarly, a table is processed - as <literal>NOWAIT</> if that is specified in any of the clauses + as <literal>NOWAIT</literal> if that is specified in any of the clauses affecting it. Otherwise, it is processed as <literal>SKIP LOCKED</literal> if that is specified in any of the clauses affecting it. @@ -1483,16 +1483,16 @@ KEY SHARE <para> When a locking clause - appears at the top level of a <command>SELECT</> query, the rows that + appears at the top level of a <command>SELECT</command> query, the rows that are locked are exactly those that are returned by the query; in the case of a join query, the rows locked are those that contribute to returned join rows. In addition, rows that satisfied the query conditions as of the query snapshot will be locked, although they will not be returned if they were updated after the snapshot and no longer satisfy the query conditions. If a - <literal>LIMIT</> is used, locking stops + <literal>LIMIT</literal> is used, locking stops once enough rows have been returned to satisfy the limit (but note that - rows skipped over by <literal>OFFSET</> will get locked). Similarly, + rows skipped over by <literal>OFFSET</literal> will get locked). Similarly, if a locking clause is used in a cursor's query, only rows actually fetched or stepped past by the cursor will be locked. @@ -1500,7 +1500,7 @@ KEY SHARE <para> When a locking clause - appears in a sub-<command>SELECT</>, the rows locked are those + appears in a sub-<command>SELECT</command>, the rows locked are those returned to the outer query by the sub-query. This might involve fewer rows than inspection of the sub-query alone would suggest, since conditions from the outer query might be used to optimize @@ -1508,7 +1508,7 @@ KEY SHARE <programlisting> SELECT * FROM (SELECT * FROM mytable FOR UPDATE) ss WHERE col1 = 5; </programlisting> - will lock only rows having <literal>col1 = 5</>, even though that + will lock only rows having <literal>col1 = 5</literal>, even though that condition is not textually within the sub-query. </para> @@ -1522,18 +1522,18 @@ SAVEPOINT s; UPDATE mytable SET ... WHERE key = 1; ROLLBACK TO s; </programlisting> - would fail to preserve the <literal>FOR UPDATE</> lock after the - <command>ROLLBACK TO</>. This has been fixed in release 9.3. + would fail to preserve the <literal>FOR UPDATE</literal> lock after the + <command>ROLLBACK TO</command>. This has been fixed in release 9.3. </para> <caution> <para> - It is possible for a <command>SELECT</> command running at the <literal>READ + It is possible for a <command>SELECT</command> command running at the <literal>READ COMMITTED</literal> transaction isolation level and using <literal>ORDER BY</literal> and a locking clause to return rows out of - order. This is because <literal>ORDER BY</> is applied first. + order. This is because <literal>ORDER BY</literal> is applied first. The command sorts the result, but might then block trying to obtain a lock - on one or more of the rows. Once the <literal>SELECT</> unblocks, some + on one or more of the rows. Once the <literal>SELECT</literal> unblocks, some of the ordering column values might have been modified, leading to those rows appearing to be out of order (though they are in order in terms of the original column values). This can be worked around at need by @@ -1542,11 +1542,11 @@ ROLLBACK TO s; <programlisting> SELECT * FROM (SELECT * FROM mytable FOR UPDATE) ss ORDER BY column1; </programlisting> - Note that this will result in locking all rows of <structname>mytable</>, - whereas <literal>FOR UPDATE</> at the top level would lock only the + Note that this will result in locking all rows of <structname>mytable</structname>, + whereas <literal>FOR UPDATE</literal> at the top level would lock only the actually returned rows. This can make for a significant performance - difference, particularly if the <literal>ORDER BY</> is combined with - <literal>LIMIT</> or other restrictions. So this technique is recommended + difference, particularly if the <literal>ORDER BY</literal> is combined with + <literal>LIMIT</literal> or other restrictions. So this technique is recommended only if concurrent updates of the ordering columns are expected and a strictly sorted result is required. </para> @@ -1573,11 +1573,11 @@ TABLE <replaceable class="parameter">name</replaceable> SELECT * FROM <replaceable class="parameter">name</replaceable> </programlisting> It can be used as a top-level command or as a space-saving syntax - variant in parts of complex queries. Only the <literal>WITH</>, - <literal>UNION</>, <literal>INTERSECT</>, <literal>EXCEPT</>, - <literal>ORDER BY</>, <literal>LIMIT</>, <literal>OFFSET</>, - <literal>FETCH</> and <literal>FOR</> locking clauses can be used - with <command>TABLE</>; the <literal>WHERE</> clause and any form of + variant in parts of complex queries. Only the <literal>WITH</literal>, + <literal>UNION</literal>, <literal>INTERSECT</literal>, <literal>EXCEPT</literal>, + <literal>ORDER BY</literal>, <literal>LIMIT</literal>, <literal>OFFSET</literal>, + <literal>FETCH</literal> and <literal>FOR</literal> locking clauses can be used + with <command>TABLE</command>; the <literal>WHERE</literal> clause and any form of aggregation cannot be used. </para> @@ -1702,7 +1702,7 @@ SELECT actors.name </para> <para> - This example shows how to use a function in the <literal>FROM</> + This example shows how to use a function in the <literal>FROM</literal> clause, both with and without a column definition list: <programlisting> @@ -1744,7 +1744,7 @@ SELECT * FROM unnest(ARRAY['a','b','c','d','e','f']) WITH ORDINALITY; </para> <para> - This example shows how to use a simple <literal>WITH</> clause: + This example shows how to use a simple <literal>WITH</literal> clause: <programlisting> WITH t AS ( @@ -1764,7 +1764,7 @@ SELECT * FROM t 0.0735620250925422 </programlisting> - Notice that the <literal>WITH</> query was evaluated only once, + Notice that the <literal>WITH</literal> query was evaluated only once, so that we got two sets of the same three random values. </para> @@ -1796,9 +1796,9 @@ SELECT distance, employee_name FROM employee_recursive; </para> <para> - This example uses <literal>LATERAL</> to apply a set-returning function - <function>get_product_names()</> for each row of the - <structname>manufacturers</> table: + This example uses <literal>LATERAL</literal> to apply a set-returning function + <function>get_product_names()</function> for each row of the + <structname>manufacturers</structname> table: <programlisting> SELECT m.name AS mname, pname @@ -1866,7 +1866,7 @@ SELECT distributors.* WHERE distributors.name = 'Westward'; This is not valid syntax according to the SQL standard. <productname>PostgreSQL</productname> allows it to be consistent with allowing zero-column tables. - However, an empty list is not allowed when <literal>DISTINCT</> is used. + However, an empty list is not allowed when <literal>DISTINCT</literal> is used. </para> </refsect2> @@ -1874,19 +1874,19 @@ SELECT distributors.* WHERE distributors.name = 'Westward'; <title>Omitting the <literal>AS</literal> Key Word</title> <para> - In the SQL standard, the optional key word <literal>AS</> can be + In the SQL standard, the optional key word <literal>AS</literal> can be omitted before an output column name whenever the new column name is a valid column name (that is, not the same as any reserved keyword). <productname>PostgreSQL</productname> is slightly more - restrictive: <literal>AS</> is required if the new column name + restrictive: <literal>AS</literal> is required if the new column name matches any keyword at all, reserved or not. Recommended practice is - to use <literal>AS</> or double-quote output column names, to prevent + to use <literal>AS</literal> or double-quote output column names, to prevent any possible conflict against future keyword additions. </para> <para> In <literal>FROM</literal> items, both the standard and - <productname>PostgreSQL</productname> allow <literal>AS</> to + <productname>PostgreSQL</productname> allow <literal>AS</literal> to be omitted before an alias that is an unreserved keyword. But this is impractical for output column names, because of syntactic ambiguities. @@ -1899,12 +1899,12 @@ SELECT distributors.* WHERE distributors.name = 'Westward'; <para> The SQL standard requires parentheses around the table name when writing <literal>ONLY</literal>, for example <literal>SELECT * FROM ONLY - (tab1), ONLY (tab2) WHERE ...</literal>. <productname>PostgreSQL</> + (tab1), ONLY (tab2) WHERE ...</literal>. <productname>PostgreSQL</productname> considers these parentheses to be optional. </para> <para> - <productname>PostgreSQL</> allows a trailing <literal>*</> to be written to + <productname>PostgreSQL</productname> allows a trailing <literal>*</literal> to be written to explicitly specify the non-<literal>ONLY</literal> behavior of including child tables. The standard does not allow this. </para> @@ -1919,9 +1919,9 @@ SELECT distributors.* WHERE distributors.name = 'Westward'; <title><literal>TABLESAMPLE</literal> Clause Restrictions</title> <para> - The <literal>TABLESAMPLE</> clause is currently accepted only on + The <literal>TABLESAMPLE</literal> clause is currently accepted only on regular tables and materialized views. According to the SQL standard - it should be possible to apply it to any <literal>FROM</> item. + it should be possible to apply it to any <literal>FROM</literal> item. </para> </refsect2> @@ -1930,16 +1930,16 @@ SELECT distributors.* WHERE distributors.name = 'Westward'; <para> <productname>PostgreSQL</productname> allows a function call to be - written directly as a member of the <literal>FROM</> list. In the SQL + written directly as a member of the <literal>FROM</literal> list. In the SQL standard it would be necessary to wrap such a function call in a sub-<command>SELECT</command>; that is, the syntax - <literal>FROM <replaceable>func</>(...) <replaceable>alias</></literal> + <literal>FROM <replaceable>func</replaceable>(...) <replaceable>alias</replaceable></literal> is approximately equivalent to - <literal>FROM LATERAL (SELECT <replaceable>func</>(...)) <replaceable>alias</></literal>. - Note that <literal>LATERAL</> is considered to be implicit; this is - because the standard requires <literal>LATERAL</> semantics for an - <literal>UNNEST()</> item in <literal>FROM</>. - <productname>PostgreSQL</productname> treats <literal>UNNEST()</> the + <literal>FROM LATERAL (SELECT <replaceable>func</replaceable>(...)) <replaceable>alias</replaceable></literal>. + Note that <literal>LATERAL</literal> is considered to be implicit; this is + because the standard requires <literal>LATERAL</literal> semantics for an + <literal>UNNEST()</literal> item in <literal>FROM</literal>. + <productname>PostgreSQL</productname> treats <literal>UNNEST()</literal> the same as other set-returning functions. </para> </refsect2> @@ -1974,8 +1974,8 @@ SELECT distributors.* WHERE distributors.name = 'Westward'; <para> <productname>PostgreSQL</productname> recognizes functional dependency - (allowing columns to be omitted from <literal>GROUP BY</>) only when - a table's primary key is included in the <literal>GROUP BY</> list. + (allowing columns to be omitted from <literal>GROUP BY</literal>) only when + a table's primary key is included in the <literal>GROUP BY</literal> list. The SQL standard specifies additional conditions that should be recognized. </para> @@ -1986,7 +1986,7 @@ SELECT distributors.* WHERE distributors.name = 'Westward'; <para> The SQL standard provides additional options for the window - <replaceable class="parameter">frame_clause</>. + <replaceable class="parameter">frame_clause</replaceable>. <productname>PostgreSQL</productname> currently supports only the options listed above. </para> @@ -2011,26 +2011,26 @@ SELECT distributors.* WHERE distributors.name = 'Westward'; </refsect2> <refsect2> - <title><literal>FOR NO KEY UPDATE</>, <literal>FOR UPDATE</>, <literal>FOR SHARE</>, <literal>FOR KEY SHARE</></title> + <title><literal>FOR NO KEY UPDATE</literal>, <literal>FOR UPDATE</literal>, <literal>FOR SHARE</literal>, <literal>FOR KEY SHARE</literal></title> <para> - Although <literal>FOR UPDATE</> appears in the SQL standard, the - standard allows it only as an option of <command>DECLARE CURSOR</>. - <productname>PostgreSQL</productname> allows it in any <command>SELECT</> - query as well as in sub-<command>SELECT</>s, but this is an extension. - The <literal>FOR NO KEY UPDATE</>, <literal>FOR SHARE</> and - <literal>FOR KEY SHARE</> variants, as well as the <literal>NOWAIT</> + Although <literal>FOR UPDATE</literal> appears in the SQL standard, the + standard allows it only as an option of <command>DECLARE CURSOR</command>. + <productname>PostgreSQL</productname> allows it in any <command>SELECT</command> + query as well as in sub-<command>SELECT</command>s, but this is an extension. + The <literal>FOR NO KEY UPDATE</literal>, <literal>FOR SHARE</literal> and + <literal>FOR KEY SHARE</literal> variants, as well as the <literal>NOWAIT</literal> and <literal>SKIP LOCKED</literal> options, do not appear in the standard. </para> </refsect2> <refsect2> - <title>Data-Modifying Statements in <literal>WITH</></title> + <title>Data-Modifying Statements in <literal>WITH</literal></title> <para> - <productname>PostgreSQL</productname> allows <command>INSERT</>, - <command>UPDATE</>, and <command>DELETE</> to be used as <literal>WITH</> + <productname>PostgreSQL</productname> allows <command>INSERT</command>, + <command>UPDATE</command>, and <command>DELETE</command> to be used as <literal>WITH</literal> queries. This is not found in the SQL standard. </para> </refsect2> @@ -2044,7 +2044,7 @@ SELECT distributors.* WHERE distributors.name = 'Westward'; </para> <para> - <literal>ROWS FROM( ... )</> is an extension of the SQL standard. + <literal>ROWS FROM( ... )</literal> is an extension of the SQL standard. </para> </refsect2> diff --git a/doc/src/sgml/ref/set.sgml b/doc/src/sgml/ref/set.sgml index 89c0fad1950..8c44d0e156d 100644 --- a/doc/src/sgml/ref/set.sgml +++ b/doc/src/sgml/ref/set.sgml @@ -66,15 +66,15 @@ SET [ SESSION | LOCAL ] TIME ZONE { <replaceable class="parameter">timezone</rep <para> If <command>SET LOCAL</command> is used within a function that has a - <literal>SET</> option for the same variable (see + <literal>SET</literal> option for the same variable (see <xref linkend="sql-createfunction">), the effects of the <command>SET LOCAL</command> command disappear at function exit; that is, the value in effect when the function was called is restored anyway. This allows <command>SET LOCAL</command> to be used for dynamic or repeated changes of a parameter within a function, while still - having the convenience of using the <literal>SET</> option to save and - restore the caller's value. However, a regular <command>SET</> command - overrides any surrounding function's <literal>SET</> option; its effects + having the convenience of using the <literal>SET</literal> option to save and + restore the caller's value. However, a regular <command>SET</command> command + overrides any surrounding function's <literal>SET</literal> option; its effects will persist unless rolled back. </para> @@ -94,22 +94,22 @@ SET [ SESSION | LOCAL ] TIME ZONE { <replaceable class="parameter">timezone</rep <variablelist> <varlistentry> - <term><literal>SESSION</></term> + <term><literal>SESSION</literal></term> <listitem> <para> Specifies that the command takes effect for the current session. - (This is the default if neither <literal>SESSION</> nor - <literal>LOCAL</> appears.) + (This is the default if neither <literal>SESSION</literal> nor + <literal>LOCAL</literal> appears.) </para> </listitem> </varlistentry> <varlistentry> - <term><literal>LOCAL</></term> + <term><literal>LOCAL</literal></term> <listitem> <para> Specifies that the command takes effect for only the current - transaction. After <command>COMMIT</> or <command>ROLLBACK</>, + transaction. After <command>COMMIT</command> or <command>ROLLBACK</command>, the session-level setting takes effect again. Issuing this outside of a transaction block emits a warning and otherwise has no effect. @@ -136,7 +136,7 @@ SET [ SESSION | LOCAL ] TIME ZONE { <replaceable class="parameter">timezone</rep these, as appropriate for the particular parameter. <literal>DEFAULT</literal> can be written to specify resetting the parameter to its default value (that is, whatever - value it would have had if no <command>SET</> had been executed + value it would have had if no <command>SET</command> had been executed in the current session). </para> </listitem> @@ -153,8 +153,8 @@ SET [ SESSION | LOCAL ] TIME ZONE { <replaceable class="parameter">timezone</rep <varlistentry> <term><literal>SCHEMA</literal></term> <listitem> - <para><literal>SET SCHEMA '<replaceable>value</>'</> is an alias for - <literal>SET search_path TO <replaceable>value</></>. Only one + <para><literal>SET SCHEMA '<replaceable>value</replaceable>'</literal> is an alias for + <literal>SET search_path TO <replaceable>value</replaceable></literal>. Only one schema can be specified using this syntax. </para> </listitem> @@ -163,8 +163,8 @@ SET [ SESSION | LOCAL ] TIME ZONE { <replaceable class="parameter">timezone</rep <varlistentry> <term><literal>NAMES</literal></term> <listitem> - <para><literal>SET NAMES <replaceable>value</></> is an alias for - <literal>SET client_encoding TO <replaceable>value</></>. + <para><literal>SET NAMES <replaceable>value</replaceable></literal> is an alias for + <literal>SET client_encoding TO <replaceable>value</replaceable></literal>. </para> </listitem> </varlistentry> @@ -176,7 +176,7 @@ SET [ SESSION | LOCAL ] TIME ZONE { <replaceable class="parameter">timezone</rep Sets the internal seed for the random number generator (the function <function>random</function>). Allowed values are floating-point numbers between -1 and 1, which are then - multiplied by 2<superscript>31</>-1. + multiplied by 2<superscript>31</superscript>-1. </para> <para> @@ -191,8 +191,8 @@ SELECT setseed(<replaceable>value</replaceable>); <varlistentry> <term><literal>TIME ZONE</literal></term> <listitem> - <para><literal>SET TIME ZONE <replaceable>value</></> is an alias - for <literal>SET timezone TO <replaceable>value</></>. The + <para><literal>SET TIME ZONE <replaceable>value</replaceable></literal> is an alias + for <literal>SET timezone TO <replaceable>value</replaceable></literal>. The syntax <literal>SET TIME ZONE</literal> allows special syntax for the time zone specification. Here are examples of valid values: @@ -238,7 +238,7 @@ SELECT setseed(<replaceable>value</replaceable>); <listitem> <para> Set the time zone to your local time zone (that is, the - server's default value of <varname>timezone</>). + server's default value of <varname>timezone</varname>). </para> </listitem> </varlistentry> @@ -248,8 +248,8 @@ SELECT setseed(<replaceable>value</replaceable>); <para> Timezone settings given as numbers or intervals are internally translated to POSIX timezone syntax. For example, after - <literal>SET TIME ZONE -7</>, <command>SHOW TIME ZONE</> would - report <literal><-07>+07</>. + <literal>SET TIME ZONE -7</literal>, <command>SHOW TIME ZONE</command> would + report <literal><-07>+07</literal>. </para> <para> @@ -270,7 +270,7 @@ SELECT setseed(<replaceable>value</replaceable>); functionality; see <xref linkend="functions-admin">. Also, it is possible to UPDATE the <link linkend="view-pg-settings"><structname>pg_settings</structname></link> - system view to perform the equivalent of <command>SET</>. + system view to perform the equivalent of <command>SET</command>. </para> </refsect1> @@ -286,7 +286,7 @@ SET search_path TO my_schema, public; <para> Set the style of date to traditional - <productname>POSTGRES</productname> with <quote>day before month</> + <productname>POSTGRES</productname> with <quote>day before month</quote> input convention: <screen> SET datestyle TO postgres, dmy; diff --git a/doc/src/sgml/ref/set_constraints.sgml b/doc/src/sgml/ref/set_constraints.sgml index 7c31871b0bd..237a0a3988f 100644 --- a/doc/src/sgml/ref/set_constraints.sgml +++ b/doc/src/sgml/ref/set_constraints.sgml @@ -67,18 +67,18 @@ SET CONSTRAINTS { ALL | <replaceable class="parameter">name</replaceable> [, ... </para> <para> - Currently, only <literal>UNIQUE</>, <literal>PRIMARY KEY</>, - <literal>REFERENCES</> (foreign key), and <literal>EXCLUDE</> + Currently, only <literal>UNIQUE</literal>, <literal>PRIMARY KEY</literal>, + <literal>REFERENCES</literal> (foreign key), and <literal>EXCLUDE</literal> constraints are affected by this setting. - <literal>NOT NULL</> and <literal>CHECK</> constraints are + <literal>NOT NULL</literal> and <literal>CHECK</literal> constraints are always checked immediately when a row is inserted or modified - (<emphasis>not</> at the end of the statement). + (<emphasis>not</emphasis> at the end of the statement). Uniqueness and exclusion constraints that have not been declared - <literal>DEFERRABLE</> are also checked immediately. + <literal>DEFERRABLE</literal> are also checked immediately. </para> <para> - The firing of triggers that are declared as <quote>constraint triggers</> + The firing of triggers that are declared as <quote>constraint triggers</quote> is also controlled by this setting — they fire at the same time that the associated constraint should be checked. </para> @@ -111,7 +111,7 @@ SET CONSTRAINTS { ALL | <replaceable class="parameter">name</replaceable> [, ... This command complies with the behavior defined in the SQL standard, except for the limitation that, in <productname>PostgreSQL</productname>, it does not apply to - <literal>NOT NULL</> and <literal>CHECK</> constraints. + <literal>NOT NULL</literal> and <literal>CHECK</literal> constraints. Also, <productname>PostgreSQL</productname> checks non-deferrable uniqueness constraints immediately, not at end of statement as the standard would suggest. diff --git a/doc/src/sgml/ref/set_role.sgml b/doc/src/sgml/ref/set_role.sgml index a97ceabcff8..eac4b3405ae 100644 --- a/doc/src/sgml/ref/set_role.sgml +++ b/doc/src/sgml/ref/set_role.sgml @@ -35,7 +35,7 @@ RESET ROLE identifier of the current SQL session to be <replaceable class="parameter">role_name</replaceable>. The role name can be written as either an identifier or a string literal. - After <command>SET ROLE</>, permissions checking for SQL commands + After <command>SET ROLE</command>, permissions checking for SQL commands is carried out as though the named role were the one that had logged in originally. </para> @@ -47,13 +47,13 @@ RESET ROLE </para> <para> - The <literal>SESSION</> and <literal>LOCAL</> modifiers act the same + The <literal>SESSION</literal> and <literal>LOCAL</literal> modifiers act the same as for the regular <xref linkend="SQL-SET"> command. </para> <para> - The <literal>NONE</> and <literal>RESET</> forms reset the current + The <literal>NONE</literal> and <literal>RESET</literal> forms reset the current user identifier to be the current session user identifier. These forms can be executed by any user. </para> @@ -64,41 +64,41 @@ RESET ROLE <para> Using this command, it is possible to either add privileges or restrict - one's privileges. If the session user role has the <literal>INHERITS</> + one's privileges. If the session user role has the <literal>INHERITS</literal> attribute, then it automatically has all the privileges of every role that - it could <command>SET ROLE</> to; in this case <command>SET ROLE</> + it could <command>SET ROLE</command> to; in this case <command>SET ROLE</command> effectively drops all the privileges assigned directly to the session user and to the other roles it is a member of, leaving only the privileges available to the named role. On the other hand, if the session user role - has the <literal>NOINHERITS</> attribute, <command>SET ROLE</> drops the + has the <literal>NOINHERITS</literal> attribute, <command>SET ROLE</command> drops the privileges assigned directly to the session user and instead acquires the privileges available to the named role. </para> <para> - In particular, when a superuser chooses to <command>SET ROLE</> to a + In particular, when a superuser chooses to <command>SET ROLE</command> to a non-superuser role, they lose their superuser privileges. </para> <para> - <command>SET ROLE</> has effects comparable to + <command>SET ROLE</command> has effects comparable to <xref linkend="sql-set-session-authorization">, but the privilege checks involved are quite different. Also, - <command>SET SESSION AUTHORIZATION</> determines which roles are - allowable for later <command>SET ROLE</> commands, whereas changing - roles with <command>SET ROLE</> does not change the set of roles - allowed to a later <command>SET ROLE</>. + <command>SET SESSION AUTHORIZATION</command> determines which roles are + allowable for later <command>SET ROLE</command> commands, whereas changing + roles with <command>SET ROLE</command> does not change the set of roles + allowed to a later <command>SET ROLE</command>. </para> <para> - <command>SET ROLE</> does not process session variables as specified by + <command>SET ROLE</command> does not process session variables as specified by the role's <xref linkend="sql-alterrole"> settings; this only happens during login. </para> <para> - <command>SET ROLE</> cannot be used within a - <literal>SECURITY DEFINER</> function. + <command>SET ROLE</command> cannot be used within a + <literal>SECURITY DEFINER</literal> function. </para> </refsect1> @@ -127,14 +127,14 @@ SELECT SESSION_USER, CURRENT_USER; <para> <productname>PostgreSQL</productname> - allows identifier syntax (<literal>"<replaceable>rolename</>"</literal>), while + allows identifier syntax (<literal>"<replaceable>rolename</replaceable>"</literal>), while the SQL standard requires the role name to be written as a string literal. SQL does not allow this command during a transaction; <productname>PostgreSQL</productname> does not make this restriction because there is no reason to. - The <literal>SESSION</> and <literal>LOCAL</> modifiers are a + The <literal>SESSION</literal> and <literal>LOCAL</literal> modifiers are a <productname>PostgreSQL</productname> extension, as is the - <literal>RESET</> syntax. + <literal>RESET</literal> syntax. </para> </refsect1> diff --git a/doc/src/sgml/ref/set_session_auth.sgml b/doc/src/sgml/ref/set_session_auth.sgml index 96d279aaf94..a8aee6f6323 100644 --- a/doc/src/sgml/ref/set_session_auth.sgml +++ b/doc/src/sgml/ref/set_session_auth.sgml @@ -39,7 +39,7 @@ RESET SESSION AUTHORIZATION The session user identifier is initially set to be the (possibly authenticated) user name provided by the client. The current user identifier is normally equal to the session user identifier, but - might change temporarily in the context of <literal>SECURITY DEFINER</> + might change temporarily in the context of <literal>SECURITY DEFINER</literal> functions and similar mechanisms; it can also be changed by <xref linkend="sql-set-role">. The current user identifier is relevant for permission checking. @@ -53,13 +53,13 @@ RESET SESSION AUTHORIZATION </para> <para> - The <literal>SESSION</> and <literal>LOCAL</> modifiers act the same + The <literal>SESSION</literal> and <literal>LOCAL</literal> modifiers act the same as for the regular <xref linkend="SQL-SET"> command. </para> <para> - The <literal>DEFAULT</> and <literal>RESET</> forms reset the session + The <literal>DEFAULT</literal> and <literal>RESET</literal> forms reset the session and current user identifiers to be the originally authenticated user name. These forms can be executed by any user. </para> @@ -69,8 +69,8 @@ RESET SESSION AUTHORIZATION <title>Notes</title> <para> - <command>SET SESSION AUTHORIZATION</> cannot be used within a - <literal>SECURITY DEFINER</> function. + <command>SET SESSION AUTHORIZATION</command> cannot be used within a + <literal>SECURITY DEFINER</literal> function. </para> </refsect1> @@ -101,13 +101,13 @@ SELECT SESSION_USER, CURRENT_USER; The SQL standard allows some other expressions to appear in place of the literal <replaceable>user_name</replaceable>, but these options are not important in practice. <productname>PostgreSQL</productname> - allows identifier syntax (<literal>"<replaceable>username</>"</literal>), which SQL + allows identifier syntax (<literal>"<replaceable>username</replaceable>"</literal>), which SQL does not. SQL does not allow this command during a transaction; <productname>PostgreSQL</productname> does not make this restriction because there is no reason to. - The <literal>SESSION</> and <literal>LOCAL</> modifiers are a + The <literal>SESSION</literal> and <literal>LOCAL</literal> modifiers are a <productname>PostgreSQL</productname> extension, as is the - <literal>RESET</> syntax. + <literal>RESET</literal> syntax. </para> <para> diff --git a/doc/src/sgml/ref/set_transaction.sgml b/doc/src/sgml/ref/set_transaction.sgml index 188d2ed92ea..f5631372f56 100644 --- a/doc/src/sgml/ref/set_transaction.sgml +++ b/doc/src/sgml/ref/set_transaction.sgml @@ -153,14 +153,14 @@ SET SESSION CHARACTERISTICS AS TRANSACTION <replaceable class="parameter">transa <para> The <literal>SET TRANSACTION SNAPSHOT</literal> command allows a new - transaction to run with the same <firstterm>snapshot</> as an existing + transaction to run with the same <firstterm>snapshot</firstterm> as an existing transaction. The pre-existing transaction must have exported its snapshot with the <literal>pg_export_snapshot</literal> function (see <xref linkend="functions-snapshot-synchronization">). That function returns a snapshot identifier, which must be given to <literal>SET TRANSACTION SNAPSHOT</literal> to specify which snapshot is to be imported. The identifier must be written as a string literal in this command, for example - <literal>'000003A1-1'</>. + <literal>'000003A1-1'</literal>. <literal>SET TRANSACTION SNAPSHOT</literal> can only be executed at the start of a transaction, before the first query or data-modification statement (<command>SELECT</command>, @@ -169,7 +169,7 @@ SET SESSION CHARACTERISTICS AS TRANSACTION <replaceable class="parameter">transa <command>COPY</command>) of the transaction. Furthermore, the transaction must already be set to <literal>SERIALIZABLE</literal> or <literal>REPEATABLE READ</literal> isolation level (otherwise, the snapshot - would be discarded immediately, since <literal>READ COMMITTED</> mode takes + would be discarded immediately, since <literal>READ COMMITTED</literal> mode takes a new snapshot for each command). If the importing transaction uses <literal>SERIALIZABLE</literal> isolation level, then the transaction that exported the snapshot must also use that isolation level. Also, a @@ -203,9 +203,9 @@ SET SESSION CHARACTERISTICS AS TRANSACTION <replaceable class="parameter">transa <xref linkend="guc-default-transaction-read-only">, and <xref linkend="guc-default-transaction-deferrable">. (In fact <command>SET SESSION CHARACTERISTICS</command> is just a - verbose equivalent for setting these variables with <command>SET</>.) + verbose equivalent for setting these variables with <command>SET</command>.) This means the defaults can be set in the configuration file, via - <command>ALTER DATABASE</>, etc. Consult <xref linkend="runtime-config"> + <command>ALTER DATABASE</command>, etc. Consult <xref linkend="runtime-config"> for more information. </para> </refsect1> @@ -243,7 +243,7 @@ SET TRANSACTION SNAPSHOT '00000003-0000001B-1'; <para> These commands are defined in the <acronym>SQL</acronym> standard, except for the <literal>DEFERRABLE</literal> transaction mode - and the <command>SET TRANSACTION SNAPSHOT</> form, which are + and the <command>SET TRANSACTION SNAPSHOT</command> form, which are <productname>PostgreSQL</productname> extensions. </para> diff --git a/doc/src/sgml/ref/show.sgml b/doc/src/sgml/ref/show.sgml index 7e198e6df8c..2a2b2fbb9f3 100644 --- a/doc/src/sgml/ref/show.sgml +++ b/doc/src/sgml/ref/show.sgml @@ -35,7 +35,7 @@ SHOW ALL <command>SET</command> statement, by editing the <filename>postgresql.conf</filename> configuration file, through the <envar>PGOPTIONS</envar> environmental variable (when using - <application>libpq</> or a <application>libpq</>-based + <application>libpq</application> or a <application>libpq</application>-based application), or through command-line flags when starting the <command>postgres</command> server. See <xref linkend="runtime-config"> for details. diff --git a/doc/src/sgml/ref/start_transaction.sgml b/doc/src/sgml/ref/start_transaction.sgml index 60926f5dfef..8dcf6318d23 100644 --- a/doc/src/sgml/ref/start_transaction.sgml +++ b/doc/src/sgml/ref/start_transaction.sgml @@ -55,12 +55,12 @@ START TRANSACTION [ <replaceable class="parameter">transaction_mode</replaceable <title>Compatibility</title> <para> - In the standard, it is not necessary to issue <command>START TRANSACTION</> + In the standard, it is not necessary to issue <command>START TRANSACTION</command> to start a transaction block: any SQL command implicitly begins a block. <productname>PostgreSQL</productname>'s behavior can be seen as implicitly issuing a <command>COMMIT</command> after each command that does not - follow <command>START TRANSACTION</> (or <command>BEGIN</command>), - and it is therefore often called <quote>autocommit</>. + follow <command>START TRANSACTION</command> (or <command>BEGIN</command>), + and it is therefore often called <quote>autocommit</quote>. Other relational database systems might offer an autocommit feature as a convenience. </para> diff --git a/doc/src/sgml/ref/truncate.sgml b/doc/src/sgml/ref/truncate.sgml index fef33155998..80abe675253 100644 --- a/doc/src/sgml/ref/truncate.sgml +++ b/doc/src/sgml/ref/truncate.sgml @@ -48,9 +48,9 @@ TRUNCATE [ TABLE ] [ ONLY ] <replaceable class="parameter">name</replaceable> [ <listitem> <para> The name (optionally schema-qualified) of a table to truncate. - If <literal>ONLY</> is specified before the table name, only that table - is truncated. If <literal>ONLY</> is not specified, the table and all - its descendant tables (if any) are truncated. Optionally, <literal>*</> + If <literal>ONLY</literal> is specified before the table name, only that table + is truncated. If <literal>ONLY</literal> is not specified, the table and all + its descendant tables (if any) are truncated. Optionally, <literal>*</literal> can be specified after the table name to explicitly indicate that descendant tables are included. </para> @@ -108,29 +108,29 @@ TRUNCATE [ TABLE ] [ ONLY ] <replaceable class="parameter">name</replaceable> [ </para> <para> - <command>TRUNCATE</> acquires an <literal>ACCESS EXCLUSIVE</> lock on each + <command>TRUNCATE</command> acquires an <literal>ACCESS EXCLUSIVE</literal> lock on each table it operates on, which blocks all other concurrent operations - on the table. When <literal>RESTART IDENTITY</> is specified, any + on the table. When <literal>RESTART IDENTITY</literal> is specified, any sequences that are to be restarted are likewise locked exclusively. If concurrent access to a table is required, then - the <command>DELETE</> command should be used instead. + the <command>DELETE</command> command should be used instead. </para> <para> - <command>TRUNCATE</> cannot be used on a table that has foreign-key + <command>TRUNCATE</command> cannot be used on a table that has foreign-key references from other tables, unless all such tables are also truncated in the same command. Checking validity in such cases would require table - scans, and the whole point is not to do one. The <literal>CASCADE</> + scans, and the whole point is not to do one. The <literal>CASCADE</literal> option can be used to automatically include all dependent tables — but be very careful when using this option, or else you might lose data you did not intend to! </para> <para> - <command>TRUNCATE</> will not fire any <literal>ON DELETE</literal> + <command>TRUNCATE</command> will not fire any <literal>ON DELETE</literal> triggers that might exist for the tables. But it will fire <literal>ON TRUNCATE</literal> triggers. - If <literal>ON TRUNCATE</> triggers are defined for any of + If <literal>ON TRUNCATE</literal> triggers are defined for any of the tables, then all <literal>BEFORE TRUNCATE</literal> triggers are fired before any truncation happens, and all <literal>AFTER TRUNCATE</literal> triggers are fired after the last truncation is @@ -141,36 +141,36 @@ TRUNCATE [ TABLE ] [ ONLY ] <replaceable class="parameter">name</replaceable> [ </para> <para> - <command>TRUNCATE</> is not MVCC-safe. After truncation, the table will + <command>TRUNCATE</command> is not MVCC-safe. After truncation, the table will appear empty to concurrent transactions, if they are using a snapshot taken before the truncation occurred. See <xref linkend="mvcc-caveats"> for more details. </para> <para> - <command>TRUNCATE</> is transaction-safe with respect to the data + <command>TRUNCATE</command> is transaction-safe with respect to the data in the tables: the truncation will be safely rolled back if the surrounding transaction does not commit. </para> <para> - When <literal>RESTART IDENTITY</> is specified, the implied - <command>ALTER SEQUENCE RESTART</> operations are also done + When <literal>RESTART IDENTITY</literal> is specified, the implied + <command>ALTER SEQUENCE RESTART</command> operations are also done transactionally; that is, they will be rolled back if the surrounding transaction does not commit. This is unlike the normal behavior of - <command>ALTER SEQUENCE RESTART</>. Be aware that if any additional + <command>ALTER SEQUENCE RESTART</command>. Be aware that if any additional sequence operations are done on the restarted sequences before the transaction rolls back, the effects of these operations on the sequences - will be rolled back, but not their effects on <function>currval()</>; - that is, after the transaction <function>currval()</> will continue to + will be rolled back, but not their effects on <function>currval()</function>; + that is, after the transaction <function>currval()</function> will continue to reflect the last sequence value obtained inside the failed transaction, even though the sequence itself may no longer be consistent with that. - This is similar to the usual behavior of <function>currval()</> after + This is similar to the usual behavior of <function>currval()</function> after a failed transaction. </para> <para> - <command>TRUNCATE</> is not currently supported for foreign tables. + <command>TRUNCATE</command> is not currently supported for foreign tables. This implies that if a specified table has any descendant tables that are foreign, the command will fail. </para> diff --git a/doc/src/sgml/ref/unlisten.sgml b/doc/src/sgml/ref/unlisten.sgml index 622e1cf1548..1ea9aa3a0bd 100644 --- a/doc/src/sgml/ref/unlisten.sgml +++ b/doc/src/sgml/ref/unlisten.sgml @@ -104,7 +104,7 @@ Asynchronous notification "virtual" received from server process with PID 8448. </para> <para> - Once <command>UNLISTEN</> has been executed, further <command>NOTIFY</> + Once <command>UNLISTEN</command> has been executed, further <command>NOTIFY</command> messages will be ignored: <programlisting> diff --git a/doc/src/sgml/ref/update.sgml b/doc/src/sgml/ref/update.sgml index 9dcbbd0e287..1ede52384f3 100644 --- a/doc/src/sgml/ref/update.sgml +++ b/doc/src/sgml/ref/update.sgml @@ -52,13 +52,13 @@ UPDATE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] [ </para> <para> - The optional <literal>RETURNING</> clause causes <command>UPDATE</> + The optional <literal>RETURNING</literal> clause causes <command>UPDATE</command> to compute and return value(s) based on each row actually updated. Any expression using the table's columns, and/or columns of other tables mentioned in <literal>FROM</literal>, can be computed. The new (post-update) values of the table's columns are used. - The syntax of the <literal>RETURNING</> list is identical to that of the - output list of <command>SELECT</>. + The syntax of the <literal>RETURNING</literal> list is identical to that of the + output list of <command>SELECT</command>. </para> <para> @@ -80,7 +80,7 @@ UPDATE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] [ <listitem> <para> The <literal>WITH</literal> clause allows you to specify one or more - subqueries that can be referenced by name in the <command>UPDATE</> + subqueries that can be referenced by name in the <command>UPDATE</command> query. See <xref linkend="queries-with"> and <xref linkend="sql-select"> for details. </para> @@ -92,10 +92,10 @@ UPDATE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] [ <listitem> <para> The name (optionally schema-qualified) of the table to update. - If <literal>ONLY</> is specified before the table name, matching rows - are updated in the named table only. If <literal>ONLY</> is not + If <literal>ONLY</literal> is specified before the table name, matching rows + are updated in the named table only. If <literal>ONLY</literal> is not specified, matching rows are also updated in any tables inheriting from - the named table. Optionally, <literal>*</> can be specified after the + the named table. Optionally, <literal>*</literal> can be specified after the table name to explicitly indicate that descendant tables are included. </para> </listitem> @@ -107,9 +107,9 @@ UPDATE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] [ <para> A substitute name for the target table. When an alias is provided, it completely hides the actual name of the table. For - example, given <literal>UPDATE foo AS f</>, the remainder of the + example, given <literal>UPDATE foo AS f</literal>, the remainder of the <command>UPDATE</command> statement must refer to this table as - <literal>f</> not <literal>foo</>. + <literal>f</literal> not <literal>foo</literal>. </para> </listitem> </varlistentry> @@ -123,7 +123,7 @@ UPDATE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] [ The column name can be qualified with a subfield name or array subscript, if needed. Do not include the table's name in the specification of a target column — for example, - <literal>UPDATE table_name SET table_name.col = 1</> is invalid. + <literal>UPDATE table_name SET table_name.col = 1</literal> is invalid. </para> </listitem> </varlistentry> @@ -152,7 +152,7 @@ UPDATE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] [ <term><replaceable class="parameter">sub-SELECT</replaceable></term> <listitem> <para> - A <literal>SELECT</> sub-query that produces as many output columns + A <literal>SELECT</literal> sub-query that produces as many output columns as are listed in the parenthesized column list preceding it. The sub-query must yield no more than one row when executed. If it yields one row, its column values are assigned to the target columns; @@ -168,13 +168,13 @@ UPDATE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] [ <listitem> <para> A list of table expressions, allowing columns from other tables - to appear in the <literal>WHERE</> condition and the update + to appear in the <literal>WHERE</literal> condition and the update expressions. This is similar to the list of tables that can be specified in the <xref linkend="sql-from" endterm="sql-from-title"> of a <command>SELECT</command> statement. Note that the target table must not appear in the - <replaceable>from_list</>, unless you intend a self-join (in which - case it must appear with an alias in the <replaceable>from_list</>). + <replaceable>from_list</replaceable>, unless you intend a self-join (in which + case it must appear with an alias in the <replaceable>from_list</replaceable>). </para> </listitem> </varlistentry> @@ -184,7 +184,7 @@ UPDATE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] [ <listitem> <para> An expression that returns a value of type <type>boolean</type>. - Only rows for which this expression returns <literal>true</> + Only rows for which this expression returns <literal>true</literal> will be updated. </para> </listitem> @@ -194,15 +194,15 @@ UPDATE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] [ <term><replaceable class="parameter">cursor_name</replaceable></term> <listitem> <para> - The name of the cursor to use in a <literal>WHERE CURRENT OF</> + The name of the cursor to use in a <literal>WHERE CURRENT OF</literal> condition. The row to be updated is the one most recently fetched from this cursor. The cursor must be a non-grouping - query on the <command>UPDATE</>'s target table. - Note that <literal>WHERE CURRENT OF</> cannot be + query on the <command>UPDATE</command>'s target table. + Note that <literal>WHERE CURRENT OF</literal> cannot be specified together with a Boolean condition. See <xref linkend="sql-declare"> for more information about using cursors with - <literal>WHERE CURRENT OF</>. + <literal>WHERE CURRENT OF</literal>. </para> </listitem> </varlistentry> @@ -211,11 +211,11 @@ UPDATE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] [ <term><replaceable class="parameter">output_expression</replaceable></term> <listitem> <para> - An expression to be computed and returned by the <command>UPDATE</> + An expression to be computed and returned by the <command>UPDATE</command> command after each row is updated. The expression can use any column names of the table named by <replaceable class="parameter">table_name</replaceable> - or table(s) listed in <literal>FROM</>. - Write <literal>*</> to return all columns. + or table(s) listed in <literal>FROM</literal>. + Write <literal>*</literal> to return all columns. </para> </listitem> </varlistentry> @@ -235,7 +235,7 @@ UPDATE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] [ <title>Outputs</title> <para> - On successful completion, an <command>UPDATE</> command returns a command + On successful completion, an <command>UPDATE</command> command returns a command tag of the form <screen> UPDATE <replaceable class="parameter">count</replaceable> @@ -244,16 +244,16 @@ UPDATE <replaceable class="parameter">count</replaceable> of rows updated, including matched rows whose values did not change. Note that the number may be less than the number of rows that matched the <replaceable class="parameter">condition</replaceable> when - updates were suppressed by a <literal>BEFORE UPDATE</> trigger. If + updates were suppressed by a <literal>BEFORE UPDATE</literal> trigger. If <replaceable class="parameter">count</replaceable> is 0, no rows were updated by the query (this is not considered an error). </para> <para> - If the <command>UPDATE</> command contains a <literal>RETURNING</> - clause, the result will be similar to that of a <command>SELECT</> + If the <command>UPDATE</command> command contains a <literal>RETURNING</literal> + clause, the result will be similar to that of a <command>SELECT</command> statement containing the columns and values defined in the - <literal>RETURNING</> list, computed over the row(s) updated by the + <literal>RETURNING</literal> list, computed over the row(s) updated by the command. </para> </refsect1> @@ -262,11 +262,11 @@ UPDATE <replaceable class="parameter">count</replaceable> <title>Notes</title> <para> - When a <literal>FROM</> clause is present, what essentially happens + When a <literal>FROM</literal> clause is present, what essentially happens is that the target table is joined to the tables mentioned in the <replaceable>from_list</replaceable>, and each output row of the join represents an update operation for the target table. When using - <literal>FROM</> you should ensure that the join + <literal>FROM</literal> you should ensure that the join produces at most one output row for each row to be modified. In other words, a target row shouldn't join to more than one row from the other table(s). If it does, then only one of the join rows @@ -293,8 +293,8 @@ UPDATE <replaceable class="parameter">count</replaceable> <title>Examples</title> <para> - Change the word <literal>Drama</> to <literal>Dramatic</> in the - column <structfield>kind</> of the table <structname>films</structname>: + Change the word <literal>Drama</literal> to <literal>Dramatic</literal> in the + column <structfield>kind</structfield> of the table <structname>films</structname>: <programlisting> UPDATE films SET kind = 'Dramatic' WHERE kind = 'Drama'; @@ -364,10 +364,10 @@ UPDATE accounts SET contact_first_name = first_name, FROM salesmen WHERE salesmen.id = accounts.sales_id; </programlisting> However, the second query may give unexpected results - if <structname>salesmen</>.<structfield>id</> is not a unique key, whereas + if <structname>salesmen</structname>.<structfield>id</structfield> is not a unique key, whereas the first query is guaranteed to raise an error if there are multiple - <structfield>id</> matches. Also, if there is no match for a particular - <structname>accounts</>.<structfield>sales_id</> entry, the first query + <structfield>id</structfield> matches. Also, if there is no match for a particular + <structname>accounts</structname>.<structfield>sales_id</structfield> entry, the first query will set the corresponding name fields to NULL, whereas the second query will not update that row at all. </para> @@ -400,9 +400,9 @@ COMMIT; </para> <para> - Change the <structfield>kind</> column of the table + Change the <structfield>kind</structfield> column of the table <structname>films</structname> in the row on which the cursor - <literal>c_films</> is currently positioned: + <literal>c_films</literal> is currently positioned: <programlisting> UPDATE films SET kind = 'Dramatic' WHERE CURRENT OF c_films; </programlisting></para> @@ -413,16 +413,16 @@ UPDATE films SET kind = 'Dramatic' WHERE CURRENT OF c_films; <para> This command conforms to the <acronym>SQL</acronym> standard, except - that the <literal>FROM</literal> and <literal>RETURNING</> clauses + that the <literal>FROM</literal> and <literal>RETURNING</literal> clauses are <productname>PostgreSQL</productname> extensions, as is the ability - to use <literal>WITH</> with <command>UPDATE</>. + to use <literal>WITH</literal> with <command>UPDATE</command>. </para> <para> - Some other database systems offer a <literal>FROM</> option in which - the target table is supposed to be listed again within <literal>FROM</>. + Some other database systems offer a <literal>FROM</literal> option in which + the target table is supposed to be listed again within <literal>FROM</literal>. That is not how <productname>PostgreSQL</productname> interprets - <literal>FROM</>. Be careful when porting applications that use this + <literal>FROM</literal>. Be careful when porting applications that use this extension. </para> @@ -431,9 +431,9 @@ UPDATE films SET kind = 'Dramatic' WHERE CURRENT OF c_films; target column names can be any row-valued expression yielding the correct number of columns. <productname>PostgreSQL</productname> only allows the source value to be a <link linkend="sql-syntax-row-constructors">row - constructor</link> or a sub-<literal>SELECT</>. An individual column's - updated value can be specified as <literal>DEFAULT</> in the - row-constructor case, but not inside a sub-<literal>SELECT</>. + constructor</link> or a sub-<literal>SELECT</literal>. An individual column's + updated value can be specified as <literal>DEFAULT</literal> in the + row-constructor case, but not inside a sub-<literal>SELECT</literal>. </para> </refsect1> </refentry> diff --git a/doc/src/sgml/ref/vacuum.sgml b/doc/src/sgml/ref/vacuum.sgml index f5bc87e2903..2e205668c1c 100644 --- a/doc/src/sgml/ref/vacuum.sgml +++ b/doc/src/sgml/ref/vacuum.sgml @@ -66,7 +66,7 @@ VACUUM [ FULL ] [ FREEZE ] [ VERBOSE ] [ ANALYZE ] [ <replaceable class="paramet </para> <para> - Plain <command>VACUUM</command> (without <literal>FULL</>) simply reclaims + Plain <command>VACUUM</command> (without <literal>FULL</literal>) simply reclaims space and makes it available for re-use. This form of the command can operate in parallel with normal reading and writing of the table, as an exclusive lock @@ -116,7 +116,7 @@ VACUUM [ FULL ] [ FREEZE ] [ VERBOSE ] [ ANALYZE ] [ <replaceable class="paramet <xref linkend="guc-vacuum-freeze-min-age"> and <xref linkend="guc-vacuum-freeze-table-age"> parameters set to zero. Aggressive freezing is always performed when the - table is rewritten, so this option is redundant when <literal>FULL</> + table is rewritten, so this option is redundant when <literal>FULL</literal> is specified. </para> </listitem> @@ -145,8 +145,8 @@ VACUUM [ FULL ] [ FREEZE ] [ VERBOSE ] [ ANALYZE ] [ <replaceable class="paramet <term><literal>DISABLE_PAGE_SKIPPING</literal></term> <listitem> <para> - Normally, <command>VACUUM</> will skip pages based on the <link - linkend="vacuum-for-visibility-map">visibility map</>. Pages where + Normally, <command>VACUUM</command> will skip pages based on the <link + linkend="vacuum-for-visibility-map">visibility map</link>. Pages where all tuples are known to be frozen can always be skipped, and those where all tuples are known to be visible to all transactions may be skipped except when performing an aggressive vacuum. Furthermore, @@ -176,7 +176,7 @@ VACUUM [ FULL ] [ FREEZE ] [ VERBOSE ] [ ANALYZE ] [ <replaceable class="paramet <listitem> <para> The name of a specific column to analyze. Defaults to all columns. - If a column list is specified, <literal>ANALYZE</> must also be + If a column list is specified, <literal>ANALYZE</literal> must also be specified. </para> </listitem> @@ -188,7 +188,7 @@ VACUUM [ FULL ] [ FREEZE ] [ VERBOSE ] [ ANALYZE ] [ <replaceable class="paramet <title>Outputs</title> <para> - When <literal>VERBOSE</> is specified, <command>VACUUM</> emits + When <literal>VERBOSE</literal> is specified, <command>VACUUM</command> emits progress messages to indicate which table is currently being processed. Various statistics about the tables are printed as well. </para> @@ -202,19 +202,19 @@ VACUUM [ FULL ] [ FREEZE ] [ VERBOSE ] [ ANALYZE ] [ <replaceable class="paramet superuser. However, database owners are allowed to vacuum all tables in their databases, except shared catalogs. (The restriction for shared catalogs means that a true database-wide - <command>VACUUM</> can only be performed by a superuser.) - <command>VACUUM</> will skip over any tables that the calling user + <command>VACUUM</command> can only be performed by a superuser.) + <command>VACUUM</command> will skip over any tables that the calling user does not have permission to vacuum. </para> <para> - <command>VACUUM</> cannot be executed inside a transaction block. + <command>VACUUM</command> cannot be executed inside a transaction block. </para> <para> - For tables with <acronym>GIN</> indexes, <command>VACUUM</command> (in + For tables with <acronym>GIN</acronym> indexes, <command>VACUUM</command> (in any form) also completes any pending index insertions, by moving pending - index entries to the appropriate places in the main <acronym>GIN</> index + index entries to the appropriate places in the main <acronym>GIN</acronym> index structure. See <xref linkend="gin-fast-update"> for details. </para> @@ -247,7 +247,7 @@ VACUUM [ FULL ] [ FREEZE ] [ VERBOSE ] [ ANALYZE ] [ <replaceable class="paramet </para> <para> - <productname>PostgreSQL</productname> includes an <quote>autovacuum</> + <productname>PostgreSQL</productname> includes an <quote>autovacuum</quote> facility which can automate routine vacuum maintenance. For more information about automatic and manual vacuuming, see <xref linkend="routine-vacuuming">. diff --git a/doc/src/sgml/ref/vacuumdb.sgml b/doc/src/sgml/ref/vacuumdb.sgml index 4f6fa0d7085..277c231687b 100644 --- a/doc/src/sgml/ref/vacuumdb.sgml +++ b/doc/src/sgml/ref/vacuumdb.sgml @@ -88,8 +88,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option><optional>-d</> <replaceable class="parameter">dbname</replaceable></option></term> - <term><option><optional>--dbname=</><replaceable class="parameter">dbname</replaceable></option></term> + <term><option><optional>-d</optional> <replaceable class="parameter">dbname</replaceable></option></term> + <term><option><optional>--dbname=</optional><replaceable class="parameter">dbname</replaceable></option></term> <listitem> <para> Specifies the name of the database to be cleaned or analyzed. @@ -103,8 +103,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-e</></term> - <term><option>--echo</></term> + <term><option>-e</option></term> + <term><option>--echo</option></term> <listitem> <para> Echo the commands that <application>vacuumdb</application> generates @@ -158,8 +158,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-q</></term> - <term><option>--quiet</></term> + <term><option>-q</option></term> + <term><option>--quiet</option></term> <listitem> <para> Do not display progress messages. @@ -176,7 +176,7 @@ PostgreSQL documentation Column names can be specified only in conjunction with the <option>--analyze</option> or <option>--analyze-only</option> options. Multiple tables can be vacuumed by writing multiple - <option>-t</> switches. + <option>-t</option> switches. </para> <tip> <para> @@ -198,8 +198,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-V</></term> - <term><option>--version</></term> + <term><option>-V</option></term> + <term><option>--version</option></term> <listitem> <para> Print the <application>vacuumdb</application> version and exit. @@ -248,8 +248,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-?</></term> - <term><option>--help</></term> + <term><option>-?</option></term> + <term><option>--help</option></term> <listitem> <para> Show help about <application>vacuumdb</application> command line @@ -266,8 +266,8 @@ PostgreSQL documentation the following command-line arguments for connection parameters: <variablelist> <varlistentry> - <term><option>-h <replaceable class="parameter">host</replaceable></></term> - <term><option>--host=<replaceable class="parameter">host</replaceable></></term> + <term><option>-h <replaceable class="parameter">host</replaceable></option></term> + <term><option>--host=<replaceable class="parameter">host</replaceable></option></term> <listitem> <para> Specifies the host name of the machine on which the server @@ -278,8 +278,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-p <replaceable class="parameter">port</replaceable></></term> - <term><option>--port=<replaceable class="parameter">port</replaceable></></term> + <term><option>-p <replaceable class="parameter">port</replaceable></option></term> + <term><option>--port=<replaceable class="parameter">port</replaceable></option></term> <listitem> <para> Specifies the TCP port or local Unix domain socket file @@ -290,8 +290,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-U <replaceable class="parameter">username</replaceable></></term> - <term><option>--username=<replaceable class="parameter">username</replaceable></></term> + <term><option>-U <replaceable class="parameter">username</replaceable></option></term> + <term><option>--username=<replaceable class="parameter">username</replaceable></option></term> <listitem> <para> User name to connect as. @@ -300,8 +300,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-w</></term> - <term><option>--no-password</></term> + <term><option>-w</option></term> + <term><option>--no-password</option></term> <listitem> <para> Never issue a password prompt. If the server requires @@ -315,8 +315,8 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-W</></term> - <term><option>--password</></term> + <term><option>-W</option></term> + <term><option>--password</option></term> <listitem> <para> Force <application>vacuumdb</application> to prompt for a @@ -329,14 +329,14 @@ PostgreSQL documentation for a password if the server demands password authentication. However, <application>vacuumdb</application> will waste a connection attempt finding out that the server wants a password. - In some cases it is worth typing <option>-W</> to avoid the extra + In some cases it is worth typing <option>-W</option> to avoid the extra connection attempt. </para> </listitem> </varlistentry> <varlistentry> - <term><option>--maintenance-db=<replaceable class="parameter">dbname</replaceable></></term> + <term><option>--maintenance-db=<replaceable class="parameter">dbname</replaceable></option></term> <listitem> <para> Specifies the name of the database to connect to discover what other @@ -370,8 +370,8 @@ PostgreSQL documentation </variablelist> <para> - This utility, like most other <productname>PostgreSQL</> utilities, - also uses the environment variables supported by <application>libpq</> + This utility, like most other <productname>PostgreSQL</productname> utilities, + also uses the environment variables supported by <application>libpq</application> (see <xref linkend="libpq-envars">). </para> @@ -401,7 +401,7 @@ PostgreSQL documentation <application>vacuumdb</application> might need to connect several times to the <productname>PostgreSQL</productname> server, asking for a password each time. It is convenient to have a - <filename>~/.pgpass</> file in such cases. See <xref + <filename>~/.pgpass</filename> file in such cases. See <xref linkend="libpq-pgpass"> for more information. </para> </refsect1> diff --git a/doc/src/sgml/ref/values.sgml b/doc/src/sgml/ref/values.sgml index 9baeade5519..75a594725b8 100644 --- a/doc/src/sgml/ref/values.sgml +++ b/doc/src/sgml/ref/values.sgml @@ -35,7 +35,7 @@ VALUES ( <replaceable class="parameter">expression</replaceable> [, ...] ) [, .. <para> <command>VALUES</command> computes a row value or set of row values specified by value expressions. It is most commonly used to generate - a <quote>constant table</> within a larger command, but it can be + a <quote>constant table</quote> within a larger command, but it can be used on its own. </para> @@ -43,18 +43,18 @@ VALUES ( <replaceable class="parameter">expression</replaceable> [, ...] ) [, .. When more than one row is specified, all the rows must have the same number of elements. The data types of the resulting table's columns are determined by combining the explicit or inferred types of the expressions - appearing in that column, using the same rules as for <literal>UNION</> + appearing in that column, using the same rules as for <literal>UNION</literal> (see <xref linkend="typeconv-union-case">). </para> <para> - Within larger commands, <command>VALUES</> is syntactically allowed - anywhere that <command>SELECT</> is. Because it is treated like a - <command>SELECT</> by the grammar, it is possible to use - the <literal>ORDER BY</>, <literal>LIMIT</> (or + Within larger commands, <command>VALUES</command> is syntactically allowed + anywhere that <command>SELECT</command> is. Because it is treated like a + <command>SELECT</command> by the grammar, it is possible to use + the <literal>ORDER BY</literal>, <literal>LIMIT</literal> (or equivalently <literal>FETCH FIRST</literal>), - and <literal>OFFSET</> clauses with a - <command>VALUES</> command. + and <literal>OFFSET</literal> clauses with a + <command>VALUES</command> command. </para> </refsect1> @@ -67,12 +67,12 @@ VALUES ( <replaceable class="parameter">expression</replaceable> [, ...] ) [, .. <listitem> <para> A constant or expression to compute and insert at the indicated place - in the resulting table (set of rows). In a <command>VALUES</> list - appearing at the top level of an <command>INSERT</>, an + in the resulting table (set of rows). In a <command>VALUES</command> list + appearing at the top level of an <command>INSERT</command>, an <replaceable class="parameter">expression</replaceable> can be replaced by <literal>DEFAULT</literal> to indicate that the destination column's default value should be inserted. <literal>DEFAULT</literal> cannot - be used when <command>VALUES</> appears in other contexts. + be used when <command>VALUES</command> appears in other contexts. </para> </listitem> </varlistentry> @@ -83,7 +83,7 @@ VALUES ( <replaceable class="parameter">expression</replaceable> [, ...] ) [, .. <para> An expression or integer constant indicating how to sort the result rows. This expression can refer to the columns of the - <command>VALUES</> result as <literal>column1</>, <literal>column2</>, + <command>VALUES</command> result as <literal>column1</literal>, <literal>column2</literal>, etc. For more details see <xref linkend="sql-orderby" endterm="sql-orderby-title">. </para> @@ -127,11 +127,11 @@ VALUES ( <replaceable class="parameter">expression</replaceable> [, ...] ) [, .. <title>Notes</title> <para> - <command>VALUES</> lists with very large numbers of rows should be avoided, + <command>VALUES</command> lists with very large numbers of rows should be avoided, as you might encounter out-of-memory failures or poor performance. - <command>VALUES</> appearing within <command>INSERT</> is a special case - (because the desired column types are known from the <command>INSERT</>'s - target table, and need not be inferred by scanning the <command>VALUES</> + <command>VALUES</command> appearing within <command>INSERT</command> is a special case + (because the desired column types are known from the <command>INSERT</command>'s + target table, and need not be inferred by scanning the <command>VALUES</command> list), so it can handle larger lists than are practical in other contexts. </para> </refsect1> @@ -140,7 +140,7 @@ VALUES ( <replaceable class="parameter">expression</replaceable> [, ...] ) [, .. <title>Examples</title> <para> - A bare <command>VALUES</> command: + A bare <command>VALUES</command> command: <programlisting> VALUES (1, 'one'), (2, 'two'), (3, 'three'); @@ -160,8 +160,8 @@ SELECT 3, 'three'; </para> <para> - More usually, <command>VALUES</> is used within a larger SQL command. - The most common use is in <command>INSERT</>: + More usually, <command>VALUES</command> is used within a larger SQL command. + The most common use is in <command>INSERT</command>: <programlisting> INSERT INTO films (code, title, did, date_prod, kind) @@ -170,7 +170,7 @@ INSERT INTO films (code, title, did, date_prod, kind) </para> <para> - In the context of <command>INSERT</>, entries of a <command>VALUES</> list + In the context of <command>INSERT</command>, entries of a <command>VALUES</command> list can be <literal>DEFAULT</literal> to indicate that the column default should be used here instead of specifying a value: @@ -182,8 +182,8 @@ INSERT INTO films VALUES </para> <para> - <command>VALUES</> can also be used where a sub-<command>SELECT</> might - be written, for example in a <literal>FROM</> clause: + <command>VALUES</command> can also be used where a sub-<command>SELECT</command> might + be written, for example in a <literal>FROM</literal> clause: <programlisting> SELECT f.* @@ -195,17 +195,17 @@ UPDATE employees SET salary = salary * v.increase WHERE employees.depno = v.depno AND employees.sales >= v.target; </programlisting> - Note that an <literal>AS</> clause is required when <command>VALUES</> - is used in a <literal>FROM</> clause, just as is true for - <command>SELECT</>. It is not required that the <literal>AS</> clause + Note that an <literal>AS</literal> clause is required when <command>VALUES</command> + is used in a <literal>FROM</literal> clause, just as is true for + <command>SELECT</command>. It is not required that the <literal>AS</literal> clause specify names for all the columns, but it's good practice to do so. - (The default column names for <command>VALUES</> are <literal>column1</>, - <literal>column2</>, etc in <productname>PostgreSQL</productname>, but + (The default column names for <command>VALUES</command> are <literal>column1</literal>, + <literal>column2</literal>, etc in <productname>PostgreSQL</productname>, but these names might be different in other database systems.) </para> <para> - When <command>VALUES</> is used in <command>INSERT</>, the values are all + When <command>VALUES</command> is used in <command>INSERT</command>, the values are all automatically coerced to the data type of the corresponding destination column. When it's used in other contexts, it might be necessary to specify the correct data type. If the entries are all quoted literal constants, @@ -218,9 +218,9 @@ WHERE ip_address IN (VALUES('192.168.0.1'::inet), ('192.168.0.10'), ('192.168.1. <tip> <para> - For simple <literal>IN</> tests, it's better to rely on the + For simple <literal>IN</literal> tests, it's better to rely on the <link linkend="functions-comparisons-in-scalar">list-of-scalars</link> - form of <literal>IN</> than to write a <command>VALUES</> + form of <literal>IN</literal> than to write a <command>VALUES</command> query as shown above. The list of scalars method requires less writing and is often more efficient. </para> diff --git a/doc/src/sgml/regress.sgml b/doc/src/sgml/regress.sgml index 14747e5f3b5..e83edf96ece 100644 --- a/doc/src/sgml/regress.sgml +++ b/doc/src/sgml/regress.sgml @@ -53,7 +53,7 @@ make check </screen> or otherwise a note about which tests failed. See <xref linkend="regress-evaluation"> below before assuming that a - <quote>failure</> represents a serious problem. + <quote>failure</quote> represents a serious problem. </para> <para> @@ -66,12 +66,12 @@ make check <para> If you have configured <productname>PostgreSQL</productname> to install into a location where an older <productname>PostgreSQL</productname> - installation already exists, and you perform <literal>make check</> + installation already exists, and you perform <literal>make check</literal> before installing the new version, you might find that the tests fail because the new programs try to use the already-installed shared libraries. (Typical symptoms are complaints about undefined symbols.) If you wish to run the tests before overwriting the old installation, - you'll need to build with <literal>configure --disable-rpath</>. + you'll need to build with <literal>configure --disable-rpath</literal>. It is not recommended that you use this option for the final installation, however. </para> @@ -80,12 +80,12 @@ make check The parallel regression test starts quite a few processes under your user ID. Presently, the maximum concurrency is twenty parallel test scripts, which means forty processes: there's a server process and a - <application>psql</> process for each test script. + <application>psql</application> process for each test script. So if your system enforces a per-user limit on the number of processes, make sure this limit is at least fifty or so, else you might get random-seeming failures in the parallel test. If you are not in a position to raise the limit, you can cut down the degree of parallelism - by setting the <literal>MAX_CONNECTIONS</> parameter. For example: + by setting the <literal>MAX_CONNECTIONS</literal> parameter. For example: <screen> make MAX_CONNECTIONS=10 check </screen> @@ -110,14 +110,14 @@ make installcheck-parallel The tests will expect to contact the server at the local host and the default port number, unless directed otherwise by <envar>PGHOST</envar> and <envar>PGPORT</envar> environment variables. The tests will be run in a - database named <literal>regression</>; any existing database by this name + database named <literal>regression</literal>; any existing database by this name will be dropped. </para> <para> The tests will also transiently create some cluster-wide objects, such as roles and tablespaces. These objects will have names beginning with - <literal>regress_</literal>. Beware of using <literal>installcheck</> + <literal>regress_</literal>. Beware of using <literal>installcheck</literal> mode in installations that have any actual users or tablespaces named that way. </para> @@ -127,9 +127,9 @@ make installcheck-parallel <title>Additional Test Suites</title> <para> - The <literal>make check</> and <literal>make installcheck</> commands - run only the <quote>core</> regression tests, which test built-in - functionality of the <productname>PostgreSQL</> server. The source + The <literal>make check</literal> and <literal>make installcheck</literal> commands + run only the <quote>core</quote> regression tests, which test built-in + functionality of the <productname>PostgreSQL</productname> server. The source distribution also contains additional test suites, most of them having to do with add-on functionality such as optional procedural languages. </para> @@ -144,18 +144,18 @@ make installcheck-world </screen> These commands run the tests using temporary servers or an already-installed server, respectively, just as previously explained - for <literal>make check</> and <literal>make installcheck</>. Other + for <literal>make check</literal> and <literal>make installcheck</literal>. Other considerations are the same as previously explained for each method. - Note that <literal>make check-world</> builds a separate temporary + Note that <literal>make check-world</literal> builds a separate temporary installation tree for each tested module, so it requires a great deal - more time and disk space than <literal>make installcheck-world</>. + more time and disk space than <literal>make installcheck-world</literal>. </para> <para> Alternatively, you can run individual test suites by typing - <literal>make check</> or <literal>make installcheck</> in the appropriate + <literal>make check</literal> or <literal>make installcheck</literal> in the appropriate subdirectory of the build tree. Keep in mind that <literal>make - installcheck</> assumes you've installed the relevant module(s), not + installcheck</literal> assumes you've installed the relevant module(s), not only the core server. </para> @@ -167,27 +167,27 @@ make installcheck-world <listitem> <para> Regression tests for optional procedural languages (other than - <application>PL/pgSQL</>, which is tested by the core tests). - These are located under <filename>src/pl</>. + <application>PL/pgSQL</application>, which is tested by the core tests). + These are located under <filename>src/pl</filename>. </para> </listitem> <listitem> <para> - Regression tests for <filename>contrib</> modules, - located under <filename>contrib</>. - Not all <filename>contrib</> modules have tests. + Regression tests for <filename>contrib</filename> modules, + located under <filename>contrib</filename>. + Not all <filename>contrib</filename> modules have tests. </para> </listitem> <listitem> <para> Regression tests for the ECPG interface library, - located in <filename>src/interfaces/ecpg/test</>. + located in <filename>src/interfaces/ecpg/test</filename>. </para> </listitem> <listitem> <para> Tests stressing behavior of concurrent sessions, - located in <filename>src/test/isolation</>. + located in <filename>src/test/isolation</filename>. </para> </listitem> <listitem> @@ -199,11 +199,11 @@ make installcheck-world </itemizedlist> <para> - When using <literal>installcheck</> mode, these tests will destroy any - existing databases named <literal>pl_regression</>, - <literal>contrib_regression</>, <literal>isolation_regression</>, - <literal>ecpg1_regression</>, or <literal>ecpg2_regression</>, as well as - <literal>regression</>. + When using <literal>installcheck</literal> mode, these tests will destroy any + existing databases named <literal>pl_regression</literal>, + <literal>contrib_regression</literal>, <literal>isolation_regression</literal>, + <literal>ecpg1_regression</literal>, or <literal>ecpg2_regression</literal>, as well as + <literal>regression</literal>. </para> <para> @@ -272,7 +272,7 @@ make check EXTRA_TESTS=numeric_big <screen> make check EXTRA_TESTS='collate.icu.utf8 collate.linux.utf8' LANG=en_US.utf8 </screen> - The <literal>collate.linux.utf8</> test works only on Linux/glibc + The <literal>collate.linux.utf8</literal> test works only on Linux/glibc platforms. The <literal>collate.icu.utf8</literal> test only works when support for ICU was built. Both tests will only succeed when run in a database that uses UTF-8 encoding. @@ -294,7 +294,7 @@ make check EXTRA_TESTS='collate.icu.utf8 collate.linux.utf8' LANG=en_US.utf8 <para> To run the Hot Standby tests, first create a database - called <literal>regression</> on the primary: + called <literal>regression</literal> on the primary: <screen> psql -h primary -c "CREATE DATABASE regression" </screen> @@ -311,7 +311,7 @@ psql -h primary -f src/test/regress/sql/hs_primary_setup.sql regression Now arrange for the default database connection to be to the standby server under test (for example, by setting the <envar>PGHOST</envar> and <envar>PGPORT</envar> environment variables). - Finally, run <literal>make standbycheck</> in the regression directory: + Finally, run <literal>make standbycheck</literal> in the regression directory: <screen> cd src/test/regress make standbycheck @@ -355,7 +355,7 @@ make standbycheck <filename>src/test/regress/regression.diffs</filename>. (When running a test suite other than the core tests, these files of course appear in the relevant subdirectory, - not <filename>src/test/regress</>.) + not <filename>src/test/regress</filename>.) </para> <para> @@ -367,7 +367,7 @@ make standbycheck </para> <para> - If for some reason a particular platform generates a <quote>failure</> + If for some reason a particular platform generates a <quote>failure</quote> for a given test, but inspection of the output convinces you that the result is valid, you can add a new comparison file to silence the failure report in future test runs. See @@ -457,8 +457,8 @@ make check NO_LOCALE=1 Some of the tests involve computing 64-bit floating-point numbers (<type>double precision</type>) from table columns. Differences in results involving mathematical functions of <type>double - precision</type> columns have been observed. The <literal>float8</> and - <literal>geometry</> tests are particularly prone to small differences + precision</type> columns have been observed. The <literal>float8</literal> and + <literal>geometry</literal> tests are particularly prone to small differences across platforms, or even with different compiler optimization settings. Human eyeball comparison is needed to determine the real significance of these differences which are usually 10 places to @@ -466,8 +466,8 @@ make check NO_LOCALE=1 </para> <para> - Some systems display minus zero as <literal>-0</>, while others - just show <literal>0</>. + Some systems display minus zero as <literal>-0</literal>, while others + just show <literal>0</literal>. </para> <para> @@ -485,23 +485,23 @@ make check NO_LOCALE=1 You might see differences in which the same rows are output in a different order than what appears in the expected file. In most cases this is not, strictly speaking, a bug. Most of the regression test -scripts are not so pedantic as to use an <literal>ORDER BY</> for every single -<literal>SELECT</>, and so their result row orderings are not well-defined +scripts are not so pedantic as to use an <literal>ORDER BY</literal> for every single +<literal>SELECT</literal>, and so their result row orderings are not well-defined according to the SQL specification. In practice, since we are looking at the same queries being executed on the same data by the same software, we usually get the same result ordering on all platforms, -so the lack of <literal>ORDER BY</> is not a problem. Some queries do exhibit +so the lack of <literal>ORDER BY</literal> is not a problem. Some queries do exhibit cross-platform ordering differences, however. When testing against an already-installed server, ordering differences can also be caused by non-C locale settings or non-default parameter settings, such as custom values -of <varname>work_mem</> or the planner cost parameters. +of <varname>work_mem</varname> or the planner cost parameters. </para> <para> Therefore, if you see an ordering difference, it's not something to -worry about, unless the query does have an <literal>ORDER BY</> that your +worry about, unless the query does have an <literal>ORDER BY</literal> that your result is violating. However, please report it anyway, so that we can add an -<literal>ORDER BY</> to that particular query to eliminate the bogus +<literal>ORDER BY</literal> to that particular query to eliminate the bogus <quote>failure</quote> in future releases. </para> @@ -519,18 +519,18 @@ exclusion of those that don't. <para> If the <literal>errors</literal> test results in a server crash - at the <literal>select infinite_recurse()</> command, it means that + at the <literal>select infinite_recurse()</literal> command, it means that the platform's limit on process stack size is smaller than the <xref linkend="guc-max-stack-depth"> parameter indicates. This can be fixed by running the server under a higher stack size limit (4MB is recommended with the default value of - <varname>max_stack_depth</>). If you are unable to do that, an - alternative is to reduce the value of <varname>max_stack_depth</>. + <varname>max_stack_depth</varname>). If you are unable to do that, an + alternative is to reduce the value of <varname>max_stack_depth</varname>. </para> <para> - On platforms supporting <function>getrlimit()</>, the server should - automatically choose a safe value of <varname>max_stack_depth</>; + On platforms supporting <function>getrlimit()</function>, the server should + automatically choose a safe value of <varname>max_stack_depth</varname>; so unless you've manually overridden this setting, a failure of this kind is a reportable bug. </para> @@ -559,7 +559,7 @@ diff results/random.out expected/random.out parameter settings could cause the tests to fail. For example, changing parameters such as <varname>enable_seqscan</varname> or <varname>enable_indexscan</varname> could cause plan changes that would - affect the results of tests that use <command>EXPLAIN</>. + affect the results of tests that use <command>EXPLAIN</command>. </para> </sect2> </sect1> @@ -570,7 +570,7 @@ diff results/random.out expected/random.out <para> Since some of the tests inherently produce environment-dependent - results, we have provided ways to specify alternate <quote>expected</> + results, we have provided ways to specify alternate <quote>expected</quote> result files. Each regression test can have several comparison files showing possible results on different platforms. There are two independent mechanisms for determining which comparison file is used @@ -597,7 +597,7 @@ testname:output:platformpattern=comparisonfilename standard regression tests, this is always <literal>out</literal>. The value corresponds to the file extension of the output file. The platform pattern is a pattern in the style of the Unix - tool <command>expr</> (that is, a regular expression with an implicit + tool <command>expr</command> (that is, a regular expression with an implicit <literal>^</literal> anchor at the start). It is matched against the platform name as printed by <command>config.guess</command>. The comparison file name is the base name of the substitute result @@ -607,7 +607,7 @@ testname:output:platformpattern=comparisonfilename <para> For example: some systems interpret very small floating-point values as zero, rather than reporting an underflow error. This causes a - few differences in the <filename>float8</> regression test. + few differences in the <filename>float8</filename> regression test. Therefore, we provide a variant comparison file, <filename>float8-small-is-zero.out</filename>, which includes the results to be expected on these systems. To silence the bogus @@ -619,30 +619,30 @@ float8:out:i.86-.*-openbsd=float8-small-is-zero.out which will trigger on any machine where the output of <command>config.guess</command> matches <literal>i.86-.*-openbsd</literal>. Other lines - in <filename>resultmap</> select the variant comparison file for other + in <filename>resultmap</filename> select the variant comparison file for other platforms where it's appropriate. </para> <para> The second selection mechanism for variant comparison files is - much more automatic: it simply uses the <quote>best match</> among + much more automatic: it simply uses the <quote>best match</quote> among several supplied comparison files. The regression test driver script considers both the standard comparison file for a test, - <literal><replaceable>testname</>.out</>, and variant files named - <literal><replaceable>testname</>_<replaceable>digit</>.out</> - (where the <replaceable>digit</> is any single digit - <literal>0</>-<literal>9</>). If any such file is an exact match, + <literal><replaceable>testname</replaceable>.out</literal>, and variant files named + <literal><replaceable>testname</replaceable>_<replaceable>digit</replaceable>.out</literal> + (where the <replaceable>digit</replaceable> is any single digit + <literal>0</literal>-<literal>9</literal>). If any such file is an exact match, the test is considered to pass; otherwise, the one that generates the shortest diff is used to create the failure report. (If <filename>resultmap</filename> includes an entry for the particular - test, then the base <replaceable>testname</> is the substitute + test, then the base <replaceable>testname</replaceable> is the substitute name given in <filename>resultmap</filename>.) </para> <para> For example, for the <literal>char</literal> test, the comparison file <filename>char.out</filename> contains results that are expected - in the <literal>C</> and <literal>POSIX</> locales, while + in the <literal>C</literal> and <literal>POSIX</literal> locales, while the file <filename>char_1.out</filename> contains results sorted as they appear in many other locales. </para> @@ -652,7 +652,7 @@ float8:out:i.86-.*-openbsd=float8-small-is-zero.out results, but it can be used in any situation where the test results cannot be predicted easily from the platform name alone. A limitation of this mechanism is that the test driver cannot tell which variant is - actually <quote>correct</> for the current environment; it will just pick + actually <quote>correct</quote> for the current environment; it will just pick the variant that seems to work best. Therefore it is safest to use this mechanism only for variant results that you are willing to consider equally valid in all contexts. @@ -668,7 +668,7 @@ float8:out:i.86-.*-openbsd=float8-small-is-zero.out under <filename>src/bin</filename>, use the Perl TAP tools and are run using the Perl testing program <command>prove</command>. You can pass command-line options to <command>prove</command> by setting - the <command>make</command> variable <varname>PROVE_FLAGS</>, for example: + the <command>make</command> variable <varname>PROVE_FLAGS</varname>, for example: <programlisting> make -C src/bin check PROVE_FLAGS='--timer' </programlisting> diff --git a/doc/src/sgml/release-10.sgml b/doc/src/sgml/release-10.sgml index 9ef798183da..116f7224daa 100644 --- a/doc/src/sgml/release-10.sgml +++ b/doc/src/sgml/release-10.sgml @@ -13,7 +13,7 @@ <title>Overview</title> <para> - Major enhancements in <productname>PostgreSQL</> 10 include: + Major enhancements in <productname>PostgreSQL</productname> 10 include: </para> <!-- Items in this list summarize one or more items below --> @@ -58,14 +58,14 @@ 2017-08-04 [620b49a16] hash: Increase the number of possible overflow bitmaps b --> <para> - Hash indexes must be rebuilt after <application>pg_upgrade</>-ing - from any previous major <productname>PostgreSQL</> version (Mithun + Hash indexes must be rebuilt after <application>pg_upgrade</application>-ing + from any previous major <productname>PostgreSQL</productname> version (Mithun Cy, Robert Haas, Amit Kapila) </para> <para> Major hash index improvements necessitated this requirement. - <application>pg_upgrade</> will create a script to assist with this. + <application>pg_upgrade</application> will create a script to assist with this. </para> </listitem> @@ -75,9 +75,9 @@ 2017-03-17 [88e66d193] Rename "pg_clog" directory to "pg_xact". --> <para> - Rename write-ahead log directory <filename>pg_xlog</> - to <link linkend="wal"><filename>pg_wal</></>, and rename transaction - status directory <filename>pg_clog</> to <filename>pg_xact</> + Rename write-ahead log directory <filename>pg_xlog</filename> + to <link linkend="wal"><filename>pg_wal</filename></link>, and rename transaction + status directory <filename>pg_clog</filename> to <filename>pg_xact</filename> (Michael Paquier) </para> @@ -98,17 +98,17 @@ 2017-02-15 [0dfa89ba2] Replace reference to "xlog-method" with "wal-method" in --> <para> - Rename <acronym>SQL</> functions, tools, and options that reference - <quote>xlog</> to <quote>wal</> (Robert Haas) + Rename <acronym>SQL</acronym> functions, tools, and options that reference + <quote>xlog</quote> to <quote>wal</quote> (Robert Haas) </para> <para> - For example, <function>pg_switch_xlog()</> becomes - <function>pg_switch_wal()</>, <application>pg_receivexlog</> - becomes <application>pg_receivewal</>, and <option>--xlogdir</> - becomes <option>--waldir</>. This is for consistency with the - change of the <filename>pg_xlog</> directory name; in general, - the <quote>xlog</> terminology is no longer used in any user-facing + For example, <function>pg_switch_xlog()</function> becomes + <function>pg_switch_wal()</function>, <application>pg_receivexlog</application> + becomes <application>pg_receivewal</application>, and <option>--xlogdir</option> + becomes <option>--waldir</option>. This is for consistency with the + change of the <filename>pg_xlog</filename> directory name; in general, + the <quote>xlog</quote> terminology is no longer used in any user-facing places. </para> </listitem> @@ -118,8 +118,8 @@ 2017-05-11 [d10c626de] Rename WAL-related functions and views to use "lsn" not --> <para> - Rename <acronym>WAL</>-related functions and views to use <literal>lsn</> - instead of <literal>location</> (David Rowley) + Rename <acronym>WAL</acronym>-related functions and views to use <literal>lsn</literal> + instead of <literal>location</literal> (David Rowley) </para> <para> @@ -136,20 +136,20 @@ --> <para> Change the implementation of set-returning functions appearing in - a query's <literal>SELECT</> list (Andres Freund) + a query's <literal>SELECT</literal> list (Andres Freund) </para> <para> Set-returning functions are now evaluated before evaluation of scalar - expressions in the <literal>SELECT</> list, much as though they had - been placed in a <literal>LATERAL FROM</>-clause item. This allows + expressions in the <literal>SELECT</literal> list, much as though they had + been placed in a <literal>LATERAL FROM</literal>-clause item. This allows saner semantics for cases where multiple set-returning functions are present. If they return different numbers of rows, the shorter results are extended to match the longest result by adding nulls. Previously the results were cycled until they all terminated at the same time, producing a number of rows equal to the least common multiple of the functions' periods. In addition, set-returning functions are now - disallowed within <literal>CASE</> and <literal>COALESCE</> constructs. + disallowed within <literal>CASE</literal> and <literal>COALESCE</literal> constructs. For more information see <xref linkend="xfunc-sql-functions-returning-set">. </para> @@ -160,8 +160,8 @@ 2017-08-04 [c30f1770a] Apply ALTER ... SET NOT NULL recursively in ALTER ... AD --> <para> - When <command>ALTER TABLE ... ADD PRIMARY KEY</> marks - columns <literal>NOT NULL</>, that change now propagates to + When <command>ALTER TABLE ... ADD PRIMARY KEY</command> marks + columns <literal>NOT NULL</literal>, that change now propagates to inheritance child tables as well (Michael Paquier) </para> </listitem> @@ -179,9 +179,9 @@ <para> Cases involving writable CTEs updating the same table updated by the containing statement, or by another writable CTE, fired <literal>BEFORE - STATEMENT</> or <literal>AFTER STATEMENT</> triggers more than once. + STATEMENT</literal> or <literal>AFTER STATEMENT</literal> triggers more than once. Also, if there were statement-level triggers on a table affected by a - foreign key enforcement action (such as <literal>ON DELETE CASCADE</>), + foreign key enforcement action (such as <literal>ON DELETE CASCADE</literal>), they could fire more than once per outer SQL statement. This is contrary to the SQL standard, so change it. </para> @@ -197,20 +197,20 @@ --> <para> Move sequences' metadata fields into a new <link - linkend="catalog-pg-sequence"><structname>pg_sequence</></> + linkend="catalog-pg-sequence"><structname>pg_sequence</structname></link> system catalog (Peter Eisentraut) </para> <para> A sequence relation now stores only the fields that can be modified - by <function>nextval()</>, that - is <structfield>last_value</>, <structfield>log_cnt</>, - and <structfield>is_called</>. Other sequence properties, such as + by <function>nextval()</function>, that + is <structfield>last_value</structfield>, <structfield>log_cnt</structfield>, + and <structfield>is_called</structfield>. Other sequence properties, such as the starting value and increment, are kept in a corresponding row of - the <structname>pg_sequence</> catalog. - <command>ALTER SEQUENCE</> updates are now fully transactional, + the <structname>pg_sequence</structname> catalog. + <command>ALTER SEQUENCE</command> updates are now fully transactional, implying that the sequence is locked until commit. - The <function>nextval()</> and <function>setval()</> functions + The <function>nextval()</function> and <function>setval()</function> functions remain nontransactional. </para> @@ -218,14 +218,14 @@ The main incompatibility introduced by this change is that selecting from a sequence relation now returns only the three fields named above. To obtain the sequence's other properties, applications must - look into <structname>pg_sequence</>. The new system - view <link linkend="view-pg-sequences"><structname>pg_sequences</></> + look into <structname>pg_sequence</structname>. The new system + view <link linkend="view-pg-sequences"><structname>pg_sequences</structname></link> can also be used for this purpose; it provides column names that are more compatible with existing code. </para> <para> - The output of <application>psql</>'s <command>\d</> command for a + The output of <application>psql</application>'s <command>\d</command> command for a sequence has been redesigned, too. </para> </listitem> @@ -235,17 +235,17 @@ 2017-01-04 [9a4d51077] Make wal streaming the default mode for pg_basebackup --> <para> - Make <application><xref linkend="app-pgbasebackup"></> stream the - <acronym>WAL</> needed to restore the backup by default (Magnus + Make <application><xref linkend="app-pgbasebackup"></application> stream the + <acronym>WAL</acronym> needed to restore the backup by default (Magnus Hagander) </para> <para> - This changes <application>pg_basebackup</>'s - <option>-X</>/<option>--xlog-method</> default to <literal>stream</>. - An option value <literal>none</> has been added to reproduce the old - behavior. The <application>pg_basebackup</> option <option>-x</> - has been removed (instead, use <literal>-X fetch</>). + This changes <application>pg_basebackup</application>'s + <option>-X</option>/<option>--xlog-method</option> default to <literal>stream</literal>. + An option value <literal>none</literal> has been added to reproduce the old + behavior. The <application>pg_basebackup</application> option <option>-x</option> + has been removed (instead, use <literal>-X fetch</literal>). </para> </listitem> @@ -275,13 +275,13 @@ 2017-01-14 [05cd12ed5] pg_ctl: Change default to wait for all actions --> <para> - Make all <application><xref linkend="app-pg-ctl"></> actions wait + Make all <application><xref linkend="app-pg-ctl"></application> actions wait for completion by default (Peter Eisentraut) </para> <para> - Previously some <application>pg_ctl</> actions didn't wait for - completion, and required the use of <option>-w</> to do so. + Previously some <application>pg_ctl</application> actions didn't wait for + completion, and required the use of <option>-w</option> to do so. </para> </listitem> @@ -291,7 +291,7 @@ --> <para> Change the default value of the <xref linkend="guc-log-directory"> - server parameter from <filename>pg_log</> to <filename>log</> + server parameter from <filename>pg_log</filename> to <filename>log</filename> (Andreas Karlsson) </para> </listitem> @@ -307,7 +307,7 @@ <para> This replaces the hardcoded, undocumented file - name <filename>dh1024.pem</>. Note that <filename>dh1024.pem</> is + name <filename>dh1024.pem</filename>. Note that <filename>dh1024.pem</filename> is no longer examined by default; you must set this option if you want to use custom DH parameters. </para> @@ -345,14 +345,14 @@ <para> The <xref linkend="guc-password-encryption"> server parameter - no longer supports <literal>off</> or <literal>plain</>. - The <literal>UNENCRYPTED</> option is no longer supported in - <command>CREATE/ALTER USER ... PASSSWORD</>. Similarly, the - <option>--unencrypted</> option has been removed - from <application>createuser</>. Unencrypted passwords migrated from + no longer supports <literal>off</literal> or <literal>plain</literal>. + The <literal>UNENCRYPTED</literal> option is no longer supported in + <command>CREATE/ALTER USER ... PASSSWORD</command>. Similarly, the + <option>--unencrypted</option> option has been removed + from <application>createuser</application>. Unencrypted passwords migrated from older versions will be stored encrypted in this release. The default - setting for <varname>password_encryption</> is still - <literal>md5</>. + setting for <varname>password_encryption</varname> is still + <literal>md5</literal>. </para> </listitem> @@ -367,7 +367,7 @@ </para> <para> - These replace <varname>min_parallel_relation_size</>, which was + These replace <varname>min_parallel_relation_size</varname>, which was found to be too generic. </para> </listitem> @@ -394,14 +394,14 @@ 2016-12-23 [e13486eba] Remove sql_inheritance GUC. --> <para> - Remove <varname>sql_inheritance</> server parameter (Robert Haas) + Remove <varname>sql_inheritance</varname> server parameter (Robert Haas) </para> <para> Changing this setting from the default value caused queries referencing - parent tables to not include child tables. The <acronym>SQL</> + parent tables to not include child tables. The <acronym>SQL</acronym> standard requires them to be included, however, and this has been the - default since <productname>PostgreSQL</> 7.1. + default since <productname>PostgreSQL</productname> 7.1. </para> </listitem> @@ -420,10 +420,10 @@ This feature requires a backwards-incompatible change to the handling of arrays of composite types in PL/Python. Previously, you could return an array of composite values by writing, e.g., <literal>[[col1, - col2], [col1, col2]]</>; but now that is interpreted as a + col2], [col1, col2]]</literal>; but now that is interpreted as a two-dimensional array. Composite types in arrays must now be written as Python tuples, not lists, to resolve the ambiguity; that is, - write <literal>[(col1, col2), (col1, col2)]</> instead. + write <literal>[(col1, col2), (col1, col2)]</literal> instead. </para> </listitem> @@ -432,7 +432,7 @@ 2017-02-27 [817f2a586] Remove PL/Tcl's "module" facility. --> <para> - Remove PL/Tcl's <quote>module</> auto-loading facility (Tom Lane) + Remove PL/Tcl's <quote>module</quote> auto-loading facility (Tom Lane) </para> <para> @@ -448,13 +448,13 @@ 2016-10-12 [64f3524e2] Remove pg_dump/pg_dumpall support for dumping from pre-8 --> <para> - Remove <application>pg_dump</>/<application>pg_dumpall</> support + Remove <application>pg_dump</application>/<application>pg_dumpall</application> support for dumping from pre-8.0 servers (Tom Lane) </para> <para> Users needing to dump from pre-8.0 servers will need to use dump - programs from <productname>PostgreSQL</> 9.6 or earlier. The + programs from <productname>PostgreSQL</productname> 9.6 or earlier. The resulting output should still load successfully into newer servers. </para> </listitem> @@ -468,9 +468,9 @@ </para> <para> - This removes configure's <option>--disable-integer-datetimes</> + This removes configure's <option>--disable-integer-datetimes</option> option. Floating-point timestamps have few advantages and have not - been the default since <productname>PostgreSQL</> 8.3. + been the default since <productname>PostgreSQL</productname> 8.3. </para> </listitem> @@ -484,7 +484,7 @@ <para> This protocol hasn't had client support - since <productname>PostgreSQL</> 6.3. + since <productname>PostgreSQL</productname> 6.3. </para> </listitem> @@ -493,12 +493,12 @@ 2017-02-13 [7ada2d31f] Remove contrib/tsearch2. --> <para> - Remove <filename>contrib/tsearch2</> module (Robert Haas) + Remove <filename>contrib/tsearch2</filename> module (Robert Haas) </para> <para> This module provided compatibility with the version of full text - search that shipped in pre-8.3 <productname>PostgreSQL</> releases. + search that shipped in pre-8.3 <productname>PostgreSQL</productname> releases. </para> </listitem> @@ -507,14 +507,14 @@ 2017-03-23 [50c956add] Remove createlang and droplang --> <para> - Remove <application>createlang</> and <application>droplang</> + Remove <application>createlang</application> and <application>droplang</application> command-line applications (Peter Eisentraut) </para> <para> - These had been deprecated since <productname>PostgreSQL</> 9.1. - Instead, use <command>CREATE EXTENSION</> and <command>DROP - EXTENSION</> directly. + These had been deprecated since <productname>PostgreSQL</productname> 9.1. + Instead, use <command>CREATE EXTENSION</command> and <command>DROP + EXTENSION</command> directly. </para> </listitem> @@ -686,8 +686,8 @@ 2016-08-23 [77e290682] Create an SP-GiST opclass for inet/cidr. --> <para> - Add <acronym>SP-GiST</> index support for <type>INET</> and - <type>CIDR</> data types (Emre Hasegeli) + Add <acronym>SP-GiST</acronym> index support for <type>INET</type> and + <type>CIDR</type> data types (Emre Hasegeli) </para> </listitem> @@ -696,14 +696,14 @@ 2017-04-01 [7526e1022] BRIN auto-summarization --> <para> - Add option to allow <acronym>BRIN</> index summarization to happen + Add option to allow <acronym>BRIN</acronym> index summarization to happen more aggressively (Álvaro Herrera) </para> <para> A new <link linkend="SQL-CREATEINDEX"><command>CREATE - INDEX</></> option enables auto-summarization of the - previous <acronym>BRIN</> page range when a new page + INDEX</command></link> option enables auto-summarization of the + previous <acronym>BRIN</acronym> page range when a new page range is created. </para> </listitem> @@ -713,18 +713,18 @@ 2017-04-01 [c655899ba] BRIN de-summarization --> <para> - Add functions to remove and re-add <acronym>BRIN</> - summarization for <acronym>BRIN</> index ranges (Álvaro + Add functions to remove and re-add <acronym>BRIN</acronym> + summarization for <acronym>BRIN</acronym> index ranges (Álvaro Herrera) </para> <para> - The new <acronym>SQL</> function <link - linkend="functions-admin-index-table"><function>brin_summarize_range()</></> - updates <acronym>BRIN</> index summarization for a specified - range and <function>brin_desummarize_range()</> removes it. + The new <acronym>SQL</acronym> function <link + linkend="functions-admin-index-table"><function>brin_summarize_range()</function></link> + updates <acronym>BRIN</acronym> index summarization for a specified + range and <function>brin_desummarize_range()</function> removes it. This is helpful to update summarization of a range that is now - smaller due to <command>UPDATE</>s and <command>DELETE</>s. + smaller due to <command>UPDATE</command>s and <command>DELETE</command>s. </para> </listitem> @@ -733,7 +733,7 @@ 2017-04-06 [7e534adcd] Fix BRIN cost estimation --> <para> - Improve accuracy in determining if a <acronym>BRIN</> index scan + Improve accuracy in determining if a <acronym>BRIN</acronym> index scan is beneficial (David Rowley, Emre Hasegeli) </para> </listitem> @@ -743,7 +743,7 @@ 2016-09-09 [b1328d78f] Invent PageIndexTupleOverwrite, and teach BRIN and GiST --> <para> - Allow faster <acronym>GiST</> inserts and updates by reusing + Allow faster <acronym>GiST</acronym> inserts and updates by reusing index space more efficiently (Andrey Borodin) </para> </listitem> @@ -753,7 +753,7 @@ 2017-03-23 [218f51584] Reduce page locking in GIN vacuum --> <para> - Reduce page locking during vacuuming of <acronym>GIN</> indexes + Reduce page locking during vacuuming of <acronym>GIN</acronym> indexes (Andrey Borodin) </para> </listitem> @@ -825,9 +825,9 @@ <para> New commands are <link - linkend="SQL-CREATESTATISTICS"><command>CREATE STATISTICS</></>, - <link linkend="SQL-ALTERSTATISTICS"><command>ALTER STATISTICS</></>, and - <link linkend="SQL-DROPSTATISTICS"><command>DROP STATISTICS</></>. + linkend="SQL-CREATESTATISTICS"><command>CREATE STATISTICS</command></link>, + <link linkend="SQL-ALTERSTATISTICS"><command>ALTER STATISTICS</command></link>, and + <link linkend="SQL-DROPSTATISTICS"><command>DROP STATISTICS</command></link>. This feature is helpful in estimating query memory usage and when combining the statistics from individual columns. </para> @@ -864,9 +864,9 @@ --> <para> Speed up aggregate functions that calculate a running sum - using <type>numeric</>-type arithmetic, including some variants - of <function>SUM()</>, <function>AVG()</>, - and <function>STDDEV()</> (Heikki Linnakangas) + using <type>numeric</type>-type arithmetic, including some variants + of <function>SUM()</function>, <function>AVG()</function>, + and <function>STDDEV()</function> (Heikki Linnakangas) </para> </listitem> @@ -950,14 +950,14 @@ --> <para> Allow explicit control - over <link linkend="SQL-EXPLAIN"><command>EXPLAIN</></>'s display + over <link linkend="SQL-EXPLAIN"><command>EXPLAIN</command></link>'s display of planning and execution time (Ashutosh Bapat) </para> <para> By default planning and execution time are displayed by - <command>EXPLAIN ANALYZE</> and are not displayed in other cases. - The new <command>EXPLAIN</> option <literal>SUMMARY</> allows + <command>EXPLAIN ANALYZE</command> and are not displayed in other cases. + The new <command>EXPLAIN</command> option <literal>SUMMARY</literal> allows explicit control of this. </para> </listitem> @@ -971,8 +971,8 @@ </para> <para> - New roles <literal>pg_monitor</>, <literal>pg_read_all_settings</>, - <literal>pg_read_all_stats</>, and <literal>pg_stat_scan_tables</> + New roles <literal>pg_monitor</literal>, <literal>pg_read_all_settings</literal>, + <literal>pg_read_all_stats</literal>, and <literal>pg_stat_scan_tables</literal> allow simplified permission configuration. </para> </listitem> @@ -984,7 +984,7 @@ <para> Properly update the statistics collector during <link linkend="SQL-REFRESHMATERIALIZEDVIEW"><command>REFRESH MATERIALIZED - VIEW</></> (Jim Mlodgenski) + VIEW</command></link> (Jim Mlodgenski) </para> </listitem> @@ -1015,14 +1015,14 @@ 2017-03-16 [befd73c50] Add pg_ls_logdir() and pg_ls_waldir() functions. --> <para> - Add functions to return the log and <acronym>WAL</> directory + Add functions to return the log and <acronym>WAL</acronym> directory contents (Dave Page) </para> <para> The new functions - are <link linkend="functions-admin-genfile-table"><function>pg_ls_logdir()</></> - and <link linkend="functions-admin-genfile-table"><function>pg_ls_waldir()</></> + are <link linkend="functions-admin-genfile-table"><function>pg_ls_logdir()</function></link> + and <link linkend="functions-admin-genfile-table"><function>pg_ls_waldir()</function></link> and can be executed by non-superusers with the proper permissions. </para> @@ -1034,7 +1034,7 @@ --> <para> Add function <link - linkend="functions-info-session-table"><function>pg_current_logfile()</></> + linkend="functions-info-session-table"><function>pg_current_logfile()</function></link> to read logging collector's current stderr and csvlog output file names (Gilles Darold) </para> @@ -1066,7 +1066,7 @@ </para> <para> - These are now <literal>DEBUG1</>-level messages. + These are now <literal>DEBUG1</literal>-level messages. </para> </listitem> @@ -1091,7 +1091,7 @@ </sect5> <sect5> - <title><link linkend="pg-stat-activity-view"><structname>pg_stat_activity</></link></title> + <title><link linkend="pg-stat-activity-view"><structname>pg_stat_activity</structname></link></title> <itemizedlist> @@ -1101,7 +1101,7 @@ 2017-03-18 [249cf070e] Create and use wait events for read, write, and fsync op --> <para> - Add <structname>pg_stat_activity</> reporting of low-level wait + Add <structname>pg_stat_activity</structname> reporting of low-level wait states (Michael Paquier, Robert Haas, Rushabh Lathia) </para> @@ -1119,13 +1119,13 @@ --> <para> Show auxiliary processes, background workers, and walsender - processes in <structname>pg_stat_activity</> (Kuntal Ghosh, + processes in <structname>pg_stat_activity</structname> (Kuntal Ghosh, Michael Paquier) </para> <para> This simplifies monitoring. A new - column <structfield>backend_type</> identifies the process type. + column <structfield>backend_type</structfield> identifies the process type. </para> </listitem> @@ -1134,7 +1134,7 @@ 2017-02-22 [4c728f382] Pass the source text for a parallel query to the workers --> <para> - Allow <structname>pg_stat_activity</> to show the SQL query + Allow <structname>pg_stat_activity</structname> to show the SQL query being executed by parallel workers (Rafia Sabih) </para> </listitem> @@ -1145,9 +1145,9 @@ --> <para> Rename - <structname>pg_stat_activity</>.<structfield>wait_event_type</> - values <literal>LWLockTranche</> and - <literal>LWLockNamed</> to <literal>LWLock</> (Robert Haas) + <structname>pg_stat_activity</structname>.<structfield>wait_event_type</structfield> + values <literal>LWLockTranche</literal> and + <literal>LWLockNamed</literal> to <literal>LWLock</literal> (Robert Haas) </para> <para> @@ -1161,7 +1161,7 @@ </sect4> <sect4> - <title><acronym>Authentication</></title> + <title><acronym>Authentication</acronym></title> <itemizedlist> @@ -1173,13 +1173,13 @@ 2017-04-18 [c727f120f] Rename "scram" to "scram-sha-256" in pg_hba.conf and pas --> <para> - Add <link linkend="auth-password">SCRAM-SHA-256</> + Add <link linkend="auth-password">SCRAM-SHA-256</link> support for password negotiation and storage (Michael Paquier, Heikki Linnakangas) </para> <para> - This provides better security than the existing <literal>md5</> + This provides better security than the existing <literal>md5</literal> negotiation and storage method. </para> </listitem> @@ -1190,7 +1190,7 @@ --> <para> Change the <xref linkend="guc-password-encryption"> server parameter - from <type>boolean</> to <type>enum</> (Michael Paquier) + from <type>boolean</type> to <type>enum</type> (Michael Paquier) </para> <para> @@ -1204,8 +1204,8 @@ --> <para> Add view <link - linkend="view-pg-hba-file-rules"><structname>pg_hba_file_rules</></> - to display the contents of <filename>pg_hba.conf</> (Haribabu + linkend="view-pg-hba-file-rules"><structname>pg_hba_file_rules</structname></link> + to display the contents of <filename>pg_hba.conf</filename> (Haribabu Kommi) </para> @@ -1219,11 +1219,11 @@ 2017-03-22 [6b76f1bb5] Support multiple RADIUS servers --> <para> - Support multiple <acronym>RADIUS</> servers (Magnus Hagander) + Support multiple <acronym>RADIUS</acronym> servers (Magnus Hagander) </para> <para> - All the <acronym>RADIUS</> related parameters are now plural and + All the <acronym>RADIUS</acronym> related parameters are now plural and support a comma-separated list of servers. </para> </listitem> @@ -1244,16 +1244,16 @@ 2017-01-04 [6667d9a6d] Re-allow SSL passphrase prompt at server start, but not --> <para> - Allow <acronym>SSL</> configuration to be updated during + Allow <acronym>SSL</acronym> configuration to be updated during configuration reload (Andreas Karlsson, Tom Lane) </para> <para> - This allows <acronym>SSL</> to be reconfigured without a server - restart, by using <command>pg_ctl reload</>, <command>SELECT - pg_reload_conf()</>, or sending a <literal>SIGHUP</> signal. - However, reloading the <acronym>SSL</> configuration does not work - if the server's <acronym>SSL</> key requires a passphrase, as there + This allows <acronym>SSL</acronym> to be reconfigured without a server + restart, by using <command>pg_ctl reload</command>, <command>SELECT + pg_reload_conf()</command>, or sending a <literal>SIGHUP</literal> signal. + However, reloading the <acronym>SSL</acronym> configuration does not work + if the server's <acronym>SSL</acronym> key requires a passphrase, as there is no way to re-prompt for the passphrase. The original configuration will apply for the life of the postmaster in that case. @@ -1297,7 +1297,7 @@ </itemizedlist> <sect5> - <title><link linkend="wal">Write-Ahead Log</> (<acronym>WAL</>)</title> + <title><link linkend="wal">Write-Ahead Log</link> (<acronym>WAL</acronym>)</title> <itemizedlist> @@ -1306,7 +1306,7 @@ 2016-12-22 [6ef2eba3f] Skip checkpoints, archiving on idle systems. --> <para> - Prevent unnecessary checkpoints and <acronym>WAL</> archiving on + Prevent unnecessary checkpoints and <acronym>WAL</acronym> archiving on otherwise-idle systems (Michael Paquier) </para> </listitem> @@ -1318,7 +1318,7 @@ --> <para> Add <xref linkend="guc-wal-consistency-checking"> server parameter - to add details to <acronym>WAL</> that can be sanity-checked on + to add details to <acronym>WAL</acronym> that can be sanity-checked on the standby (Kuntal Ghosh, Robert Haas) </para> @@ -1332,14 +1332,14 @@ 2017-04-05 [00b6b6feb] Allow -\-with-wal-segsize=n up to n=1024MB --> <para> - Increase the maximum configurable <acronym>WAL</> segment size + Increase the maximum configurable <acronym>WAL</acronym> segment size to one gigabyte (Beena Emerson) </para> <para> - A larger <acronym>WAL</> segment size allows for fewer + A larger <acronym>WAL</acronym> segment size allows for fewer <xref linkend="guc-archive-command"> invocations and fewer - <acronym>WAL</> files to manage. + <acronym>WAL</acronym> files to manage. </para> </listitem> @@ -1364,13 +1364,13 @@ --> <para> Add the ability to <link linkend="logical-replication">logically - replicate</> tables to standby servers (Petr Jelinek) + replicate</link> tables to standby servers (Petr Jelinek) </para> <para> Logical replication allows more flexibility than physical replication does, including replication between different major - versions of <productname>PostgreSQL</> and selective + versions of <productname>PostgreSQL</productname> and selective replication. </para> </listitem> @@ -1387,8 +1387,8 @@ <para> Previously the server always waited for the active standbys that - appeared first in <varname>synchronous_standby_names</>. The new - <varname>synchronous_standby_names</> keyword <literal>ANY</> allows + appeared first in <varname>synchronous_standby_names</varname>. The new + <varname>synchronous_standby_names</varname> keyword <literal>ANY</literal> allows waiting for any number of standbys irrespective of their ordering. This is known as quorum commit. </para> @@ -1419,14 +1419,14 @@ --> <para> Enable replication from localhost connections by default in - <link linkend="auth-pg-hba-conf"><filename>pg_hba.conf</></> + <link linkend="auth-pg-hba-conf"><filename>pg_hba.conf</filename></link> (Michael Paquier) </para> <para> - Previously <filename>pg_hba.conf</>'s replication connection + Previously <filename>pg_hba.conf</filename>'s replication connection lines were commented out by default. This is particularly useful for - <application><xref linkend="app-pgbasebackup"></>. + <application><xref linkend="app-pgbasebackup"></application>. </para> </listitem> @@ -1436,13 +1436,13 @@ --> <para> Add columns to <link - linkend="monitoring-stats-views-table"><structname>pg_stat_replication</></> + linkend="monitoring-stats-views-table"><structname>pg_stat_replication</structname></link> to report replication delay times (Thomas Munro) </para> <para> - The new columns are <structfield>write_lag</>, - <structfield>flush_lag</>, and <structfield>replay_lag</>. + The new columns are <structfield>write_lag</structfield>, + <structfield>flush_lag</structfield>, and <structfield>replay_lag</structfield>. </para> </listitem> @@ -1452,8 +1452,8 @@ --> <para> Allow specification of the recovery stopping point by Log Sequence - Number (<acronym>LSN</>) in - <link linkend="recovery-config"><filename>recovery.conf</></> + Number (<acronym>LSN</acronym>) in + <link linkend="recovery-config"><filename>recovery.conf</filename></link> (Michael Paquier) </para> @@ -1470,12 +1470,12 @@ --> <para> Allow users to disable <link - linkend="functions-admin"><function>pg_stop_backup()</></>'s - waiting for all <acronym>WAL</> to be archived (David Steele) + linkend="functions-admin"><function>pg_stop_backup()</function></link>'s + waiting for all <acronym>WAL</acronym> to be archived (David Steele) </para> <para> - An optional second argument to <function>pg_stop_backup()</> + An optional second argument to <function>pg_stop_backup()</function> controls that behavior. </para> </listitem> @@ -1486,7 +1486,7 @@ --> <para> Allow creation of <link - linkend="functions-replication-table">temporary replication slots</> + linkend="functions-replication-table">temporary replication slots</link> (Petr Jelinek) </para> @@ -1530,8 +1530,8 @@ --> <para> Add <link - linkend="functions-xml-processing-xmltable"><function>XMLTABLE</></> - function that converts <type>XML</>-formatted data into a row set + linkend="functions-xml-processing-xmltable"><function>XMLTABLE</function></link> + function that converts <type>XML</type>-formatted data into a row set (Pavel Stehule, Álvaro Herrera) </para> </listitem> @@ -1542,17 +1542,17 @@ --> <para> Allow standard row constructor syntax in <literal>UPDATE ... SET - (<replaceable>column_list</>) = <replaceable>row_constructor</></literal> + (<replaceable>column_list</replaceable>) = <replaceable>row_constructor</replaceable></literal> (Tom Lane) </para> <para> - The <replaceable>row_constructor</> can now begin with the - keyword <literal>ROW</>; previously that had to be omitted. Also, - an occurrence of <literal><replaceable>table_name</>.*</literal> - within the <replaceable>row_constructor</> is now expanded into + The <replaceable>row_constructor</replaceable> can now begin with the + keyword <literal>ROW</literal>; previously that had to be omitted. Also, + an occurrence of <literal><replaceable>table_name</replaceable>.*</literal> + within the <replaceable>row_constructor</replaceable> is now expanded into multiple columns, as in other uses - of <replaceable>row_constructor</>s. + of <replaceable>row_constructor</replaceable>s. </para> </listitem> @@ -1562,13 +1562,13 @@ --> <para> Fix regular expressions' character class handling for large character - codes, particularly Unicode characters above <literal>U+7FF</> + codes, particularly Unicode characters above <literal>U+7FF</literal> (Tom Lane) </para> <para> Previously, such characters were never recognized as belonging to - locale-dependent character classes such as <literal>[[:alpha:]]</>. + locale-dependent character classes such as <literal>[[:alpha:]]</literal>. </para> </listitem> @@ -1587,7 +1587,7 @@ --> <para> Add table <link linkend="SQL-CREATETABLE-PARTITION">partitioning - syntax</> that automatically creates partition constraints and + syntax</link> that automatically creates partition constraints and handles routing of tuple insertions and updates (Amit Langote) </para> @@ -1603,7 +1603,7 @@ 2017-03-31 [597027163] Add transition table support to plpgsql. --> <para> - Add <link linkend="SQL-CREATETRIGGER"><literal>AFTER</> trigger</> + Add <link linkend="SQL-CREATETRIGGER"><literal>AFTER</literal> trigger</link> transition tables to record changed rows (Kevin Grittner, Thomas Munro) </para> @@ -1620,7 +1620,7 @@ --> <para> Allow <link linkend="SQL-CREATEPOLICY">restrictive row-level - security policies</> (Stephen Frost) + security policies</link> (Stephen Frost) </para> <para> @@ -1636,16 +1636,16 @@ --> <para> When creating a foreign-key constraint, check - for <literal>REFERENCES</> permission on only the referenced table + for <literal>REFERENCES</literal> permission on only the referenced table (Tom Lane) </para> <para> - Previously <literal>REFERENCES</> permission on the referencing + Previously <literal>REFERENCES</literal> permission on the referencing table was also required. This appears to have stemmed from a misreading of the SQL standard. Since creating a foreign key (or any other type of) constraint requires ownership privilege on the - constrained table, additionally requiring <literal>REFERENCES</> + constrained table, additionally requiring <literal>REFERENCES</literal> permission seems rather pointless. </para> </listitem> @@ -1656,11 +1656,11 @@ --> <para> Allow <link linkend="SQL-ALTERDEFAULTPRIVILEGES">default - permissions</> on schemas (Matheus Oliveira) + permissions</link> on schemas (Matheus Oliveira) </para> <para> - This is done using the <literal>ALTER DEFAULT PRIVILEGES</> command. + This is done using the <literal>ALTER DEFAULT PRIVILEGES</literal> command. </para> </listitem> @@ -1670,7 +1670,7 @@ --> <para> Add <link linkend="SQL-CREATESEQUENCE"><command>CREATE SEQUENCE - AS</></> command to create a sequence matching an integer data type + AS</command></link> command to create a sequence matching an integer data type (Peter Eisentraut) </para> @@ -1685,13 +1685,13 @@ 2016-11-10 [279c439c7] Support "COPY view FROM" for views with INSTEAD OF INSER --> <para> - Allow <literal>COPY <replaceable>view</> - FROM <replaceable>source</></> on views with <literal>INSTEAD - INSERT</> triggers (Haribabu Kommi) + Allow <literal>COPY <replaceable>view</replaceable> + FROM <replaceable>source</replaceable></literal> on views with <literal>INSTEAD + INSERT</literal> triggers (Haribabu Kommi) </para> <para> - The triggers are fed the data rows read by <command>COPY</>. + The triggers are fed the data rows read by <command>COPY</command>. </para> </listitem> @@ -1701,14 +1701,14 @@ --> <para> Allow the specification of a function name without arguments in - <acronym>DDL</> commands, if it is unique (Peter Eisentraut) + <acronym>DDL</acronym> commands, if it is unique (Peter Eisentraut) </para> <para> For example, allow <link linkend="SQL-DROPFUNCTION"><command>DROP - FUNCTION</></> on a function name without arguments if there + FUNCTION</command></link> on a function name without arguments if there is only one function with that name. This behavior is required by the - <acronym>SQL</> standard. + <acronym>SQL</acronym> standard. </para> </listitem> @@ -1718,7 +1718,7 @@ --> <para> Allow multiple functions, operators, and aggregates to be dropped - with a single <command>DROP</> command (Peter Eisentraut) + with a single <command>DROP</command> command (Peter Eisentraut) </para> </listitem> @@ -1728,10 +1728,10 @@ 2017-03-20 [b6fb534f1] Add IF NOT EXISTS for CREATE SERVER and CREATE USER MAPP --> <para> - Support <literal>IF NOT EXISTS</> - in <link linkend="SQL-CREATESERVER"><command>CREATE SERVER</></>, - <link linkend="SQL-CREATEUSERMAPPING"><command>CREATE USER MAPPING</></>, - and <link linkend="SQL-CREATECOLLATION"><command>CREATE COLLATION</></> + Support <literal>IF NOT EXISTS</literal> + in <link linkend="SQL-CREATESERVER"><command>CREATE SERVER</command></link>, + <link linkend="SQL-CREATEUSERMAPPING"><command>CREATE USER MAPPING</command></link>, + and <link linkend="SQL-CREATECOLLATION"><command>CREATE COLLATION</command></link> (Anastasia Lubennikova, Peter Eisentraut) </para> </listitem> @@ -1742,7 +1742,7 @@ 2017-03-03 [9eb344faf] Allow vacuums to report oldestxmin --> <para> - Make <link linkend="SQL-VACUUM"><command>VACUUM VERBOSE</></> report + Make <link linkend="SQL-VACUUM"><command>VACUUM VERBOSE</command></link> report the number of skipped frozen pages and oldest xmin (Masahiko Sawada, Simon Riggs) </para> @@ -1758,7 +1758,7 @@ 2017-01-23 [7e26e02ee] Prefetch blocks during lazy vacuum's truncation scan --> <para> - Improve speed of <command>VACUUM</>'s removal of trailing empty + Improve speed of <command>VACUUM</command>'s removal of trailing empty heap pages (Claudio Freire, Álvaro Herrera) </para> </listitem> @@ -1777,13 +1777,13 @@ 2017-03-31 [e306df7f9] Full Text Search support for JSON and JSONB --> <para> - Add full text search support for <type>JSON</> and <type>JSONB</> + Add full text search support for <type>JSON</type> and <type>JSONB</type> (Dmitry Dolgov) </para> <para> - The functions <function>ts_headline()</> and - <function>to_tsvector()</> can now be used on these data types. + The functions <function>ts_headline()</function> and + <function>to_tsvector()</function> can now be used on these data types. </para> </listitem> @@ -1792,15 +1792,15 @@ 2017-03-15 [c7a9fa399] Add support for EUI-64 MAC addresses as macaddr8 --> <para> - Add support for <acronym>EUI-64</> <acronym>MAC</> addresses, as a - new data type <link linkend="datatype-macaddr8"><type>macaddr8</></> + Add support for <acronym>EUI-64</acronym> <acronym>MAC</acronym> addresses, as a + new data type <link linkend="datatype-macaddr8"><type>macaddr8</type></link> (Haribabu Kommi) </para> <para> This complements the existing support - for <acronym>EUI-48</> <acronym>MAC</> addresses - (type <type>macaddr</>). + for <acronym>EUI-48</acronym> <acronym>MAC</acronym> addresses + (type <type>macaddr</type>). </para> </listitem> @@ -1809,13 +1809,13 @@ 2017-04-06 [321732705] Identity columns --> <para> - Add <link linkend="SQL-CREATETABLE">identity columns</> for + Add <link linkend="SQL-CREATETABLE">identity columns</link> for assigning a numeric value to columns on insert (Peter Eisentraut) </para> <para> - These are similar to <type>SERIAL</> columns, but are - <acronym>SQL</> standard compliant. + These are similar to <type>SERIAL</type> columns, but are + <acronym>SQL</acronym> standard compliant. </para> </listitem> @@ -1824,13 +1824,13 @@ 2016-09-07 [0ab9c56d0] Support renaming an existing value of an enum type. --> <para> - Allow <link linkend="datatype-enum"><type>ENUM</></> values to be + Allow <link linkend="datatype-enum"><type>ENUM</type></link> values to be renamed (Dagfinn Ilmari Mannsåker) </para> <para> This uses the syntax <link linkend="SQL-ALTERTYPE"><command>ALTER - TYPE ... RENAME VALUE</></>. + TYPE ... RENAME VALUE</command></link>. </para> </listitem> @@ -1840,14 +1840,14 @@ --> <para> Properly treat array pseudotypes - (<type>anyarray</>) as arrays in <link - linkend="functions-json-creation-table"><function>to_json()</></> - and <function>to_jsonb()</> (Andrew Dunstan) + (<type>anyarray</type>) as arrays in <link + linkend="functions-json-creation-table"><function>to_json()</function></link> + and <function>to_jsonb()</function> (Andrew Dunstan) </para> <para> - Previously columns declared as <type>anyarray</> (particularly those - in the <structname>pg_stats</> view) were converted to <type>JSON</> + Previously columns declared as <type>anyarray</type> (particularly those + in the <structname>pg_stats</structname> view) were converted to <type>JSON</type> strings rather than arrays. </para> </listitem> @@ -1858,16 +1858,16 @@ --> <para> Add operators for multiplication and division - of <link linkend="datatype-money"><type>money</></link> values - with <type>int8</> values (Peter Eisentraut) + of <link linkend="datatype-money"><type>money</type></link> values + with <type>int8</type> values (Peter Eisentraut) </para> <para> - Previously such cases would result in converting the <type>int8</> - values to <type>float8</> and then using - the <type>money</>-and-<type>float8</> operators. The new behavior + Previously such cases would result in converting the <type>int8</type> + values to <type>float8</type> and then using + the <type>money</type>-and-<type>float8</type> operators. The new behavior avoids possible precision loss. But note that division - of <type>money</> by <type>int8</> now truncates the quotient, like + of <type>money</type> by <type>int8</type> now truncates the quotient, like other integer-division cases, while the previous behavior would have rounded. </para> @@ -1878,7 +1878,7 @@ 2016-09-14 [656df624c] Add overflow checks to money type input function --> <para> - Check for overflow in the <type>money</> type's input function + Check for overflow in the <type>money</type> type's input function (Peter Eisentraut) </para> </listitem> @@ -1898,12 +1898,12 @@ --> <para> Add simplified <link - linkend="functions-posix-regexp"><function>regexp_match()</></> + linkend="functions-posix-regexp"><function>regexp_match()</function></link> function (Emre Hasegeli) </para> <para> - This is similar to <function>regexp_matches()</>, but it only + This is similar to <function>regexp_matches()</function>, but it only returns results from the first match so it does not need to return a set, making it easier to use for simple cases. </para> @@ -1914,8 +1914,8 @@ 2017-01-18 [d00ca333c] Implement array version of jsonb_delete and operator --> <para> - Add a version of <type>jsonb</>'s <link - linkend="functions-jsonb-op-table">delete operator</> that takes + Add a version of <type>jsonb</type>'s <link + linkend="functions-jsonb-op-table">delete operator</link> that takes an array of keys to delete (Magnus Hagander) </para> </listitem> @@ -1925,7 +1925,7 @@ 2017-04-06 [cf35346e8] Make json_populate_record and friends operate recursivel --> <para> - Make <link linkend="functions-json-processing-table"><function>json_populate_record()</></> + Make <link linkend="functions-json-processing-table"><function>json_populate_record()</function></link> and related functions process JSON arrays and objects recursively (Nikita Glukhov) </para> @@ -1935,7 +1935,7 @@ properly converted from JSON arrays, and composite-type fields are properly converted from JSON objects. Previously, such cases would fail because the text representation of the JSON value would be fed - to <function>array_in()</> or <function>record_in()</>, and its + to <function>array_in()</function> or <function>record_in()</function>, and its syntax would not match what those input functions expect. </para> </listitem> @@ -1946,14 +1946,14 @@ --> <para> Add function <link - linkend="functions-txid-snapshot"><function>txid_current_if_assigned()</></> - to return the current transaction ID or <literal>NULL</> if no + linkend="functions-txid-snapshot"><function>txid_current_if_assigned()</function></link> + to return the current transaction ID or <literal>NULL</literal> if no transaction ID has been assigned (Craig Ringer) </para> <para> This is different from <link - linkend="functions-txid-snapshot"><function>txid_current()</></>, + linkend="functions-txid-snapshot"><function>txid_current()</function></link>, which always returns a transaction ID, assigning one if necessary. Unlike that function, this function can be run on standby servers. </para> @@ -1965,7 +1965,7 @@ --> <para> Add function <link - linkend="functions-txid-snapshot"><function>txid_status()</></> + linkend="functions-txid-snapshot"><function>txid_status()</function></link> to check if a transaction was committed (Craig Ringer) </para> @@ -1982,8 +1982,8 @@ --> <para> Allow <link - linkend="functions-formatting-table"><function>make_date()</></> - to interpret negative years as <acronym>BC</> years (Álvaro + linkend="functions-formatting-table"><function>make_date()</function></link> + to interpret negative years as <acronym>BC</acronym> years (Álvaro Herrera) </para> </listitem> @@ -1993,14 +1993,14 @@ 2016-09-28 [d3cd36a13] Make to_timestamp() and to_date() range-check fields of --> <para> - Make <function>to_timestamp()</> and <function>to_date()</> reject + Make <function>to_timestamp()</function> and <function>to_date()</function> reject out-of-range input fields (Artur Zakirov) </para> <para> For example, - previously <literal>to_date('2009-06-40','YYYY-MM-DD')</> was - accepted and returned <literal>2009-07-10</>. It will now generate + previously <literal>to_date('2009-06-40','YYYY-MM-DD')</literal> was + accepted and returned <literal>2009-07-10</literal>. It will now generate an error. </para> </listitem> @@ -2019,7 +2019,7 @@ 2017-03-27 [70ec3f1f8] PL/Python: Add cursor and execute methods to plan object --> <para> - Allow PL/Python's <function>cursor()</> and <function>execute()</> + Allow PL/Python's <function>cursor()</function> and <function>execute()</function> functions to be called as methods of their plan-object arguments (Peter Eisentraut) </para> @@ -2034,7 +2034,7 @@ 2016-12-13 [55caaaeba] Improve handling of array elements as getdiag_targets an --> <para> - Allow PL/pgSQL's <command>GET DIAGNOSTICS</> statement to retrieve + Allow PL/pgSQL's <command>GET DIAGNOSTICS</command> statement to retrieve values into array elements (Tom Lane) </para> @@ -2047,7 +2047,7 @@ </itemizedlist> <sect4> - <title><link linkend="pltcl">PL/Tcl</></title> + <title><link linkend="pltcl">PL/Tcl</link></title> <itemizedlist> @@ -2104,7 +2104,7 @@ --> <para> Allow specification of <link linkend="libpq-connect-host">multiple - host names or addresses</> in libpq connection strings and URIs + host names or addresses</link> in libpq connection strings and URIs (Robert Haas, Heikki Linnakangas) </para> @@ -2119,7 +2119,7 @@ --> <para> Allow libpq connection strings and URIs to request a <link - linkend="libpq-connect-target-session-attrs">read/write host</>, + linkend="libpq-connect-target-session-attrs">read/write host</link>, that is a master server rather than a standby server (Victor Wagner, Mithun Cy) </para> @@ -2127,7 +2127,7 @@ <para> This is useful when multiple host names are specified. It is controlled by libpq connection parameter - <option>target_session_attrs</>. + <option>target_session_attrs</option>. </para> </listitem> @@ -2136,7 +2136,7 @@ 2017-01-24 [ba005f193] Allow password file name to be specified as a libpq conn --> <para> - Allow the <link linkend="libpq-connect-passfile">password file name</> + Allow the <link linkend="libpq-connect-passfile">password file name</link> to be specified as a libpq connection parameter (Julian Markwort) </para> @@ -2151,17 +2151,17 @@ --> <para> Add function <link - linkend="libpq-pqencryptpasswordconn"><function>PQencryptPasswordConn()</></> + linkend="libpq-pqencryptpasswordconn"><function>PQencryptPasswordConn()</function></link> to allow creation of more types of encrypted passwords on the client side (Michael Paquier, Heikki Linnakangas) </para> <para> - Previously only <literal>MD5</>-encrypted passwords could be created + Previously only <literal>MD5</literal>-encrypted passwords could be created using <link - linkend="libpq-pqencryptpassword"><function>PQencryptPassword()</></>. + linkend="libpq-pqencryptpassword"><function>PQencryptPassword()</function></link>. This new function can also create <link - linkend="auth-pg-hba-conf"><literal>SCRAM-SHA-256</></>-encrypted + linkend="auth-pg-hba-conf"><literal>SCRAM-SHA-256</literal></link>-encrypted passwords. </para> </listitem> @@ -2171,13 +2171,13 @@ 2016-08-16 [a7b5573d6] Remove separate version numbering for ecpg preprocessor. --> <para> - Change <application>ecpg</> preprocessor version from 4.12 to 10 + Change <application>ecpg</application> preprocessor version from 4.12 to 10 (Tom Lane) </para> <para> - Henceforth the <application>ecpg</> version will match - the <productname>PostgreSQL</> distribution version number. + Henceforth the <application>ecpg</application> version will match + the <productname>PostgreSQL</productname> distribution version number. </para> </listitem> @@ -2200,14 +2200,14 @@ 2017-04-02 [68dba97a4] Document psql's behavior of recalling the previously exe --> <para> - Add conditional branch support to <application>psql</> (Corey + Add conditional branch support to <application>psql</application> (Corey Huinker) </para> <para> - This feature adds <application>psql</> - meta-commands <command>\if</>, <command>\elif</>, <command>\else</>, - and <command>\endif</>. This is primarily helpful for scripting. + This feature adds <application>psql</application> + meta-commands <command>\if</command>, <command>\elif</command>, <command>\else</command>, + and <command>\endif</command>. This is primarily helpful for scripting. </para> </listitem> @@ -2216,8 +2216,8 @@ 2017-03-07 [b2678efd4] psql: Add \gx command --> <para> - Add <application>psql</> <command>\gx</> meta-command to execute - (<command>\g</>) a query in expanded mode (<command>\x</>) + Add <application>psql</application> <command>\gx</command> meta-command to execute + (<command>\g</command>) a query in expanded mode (<command>\x</command>) (Christoph Berg) </para> </listitem> @@ -2227,12 +2227,12 @@ 2017-04-01 [f833c847b] Allow psql variable substitution to occur in backtick co --> <para> - Expand <application>psql</> variable references in + Expand <application>psql</application> variable references in backtick-executed strings (Tom Lane) </para> <para> - This is particularly useful in the new <application>psql</> + This is particularly useful in the new <application>psql</application> conditional branch commands. </para> </listitem> @@ -2244,23 +2244,23 @@ 2017-02-02 [fd6cd6980] Clean up psql's behavior for a few more control variable --> <para> - Prevent <application>psql</>'s special variables from being set to + Prevent <application>psql</application>'s special variables from being set to invalid values (Daniel Vérité, Tom Lane) </para> <para> - Previously, setting one of <application>psql</>'s special variables + Previously, setting one of <application>psql</application>'s special variables to an invalid value silently resulted in the default behavior. - <command>\set</> on a special variable now fails if the proposed - new value is invalid. As a special exception, <command>\set</> + <command>\set</command> on a special variable now fails if the proposed + new value is invalid. As a special exception, <command>\set</command> with an empty or omitted new value, on a boolean-valued special variable, still has the effect of setting the variable - to <literal>on</>; but now it actually acquires that value rather - than an empty string. <command>\unset</> on a special variable now + to <literal>on</literal>; but now it actually acquires that value rather + than an empty string. <command>\unset</command> on a special variable now explicitly sets the variable to its default value, which is also the value it acquires at startup. In sum, a control variable now always has a displayable value that reflects - what <application>psql</> is actually doing. + what <application>psql</application> is actually doing. </para> </listitem> @@ -2269,7 +2269,7 @@ 2017-09-06 [a6c678f01] Add psql variables showing server version and psql versi --> <para> - Add variables showing server version and <application>psql</> version + Add variables showing server version and <application>psql</application> version (Fabien Coelho) </para> </listitem> @@ -2279,14 +2279,14 @@ 2016-11-03 [a0f357e57] psql: Split up "Modifiers" column in \d and \dD --> <para> - Improve <application>psql</>'s <command>\d</> (display relation) - and <command>\dD</> (display domain) commands to show collation, + Improve <application>psql</application>'s <command>\d</command> (display relation) + and <command>\dD</command> (display domain) commands to show collation, nullable, and default properties in separate columns (Peter Eisentraut) </para> <para> - Previously they were shown in a single <quote>Modifiers</> column. + Previously they were shown in a single <quote>Modifiers</quote> column. </para> </listitem> @@ -2295,7 +2295,7 @@ 2017-07-27 [77cb4a1d6] Standardize describe.c's behavior for no-matching-object --> <para> - Make the various <command>\d</> commands handle no-matching-object + Make the various <command>\d</command> commands handle no-matching-object cases more consistently (Daniel Gustafsson) </para> @@ -2319,7 +2319,7 @@ 2017-03-16 [d7d77f382] psql: Add completion for \help DROP|ALTER --> <para> - Improve <application>psql</>'s tab completion (Jeff Janes, + Improve <application>psql</application>'s tab completion (Jeff Janes, Ian Barwick, Andreas Karlsson, Sehrope Sarkuni, Thomas Munro, Kevin Grittner, Dagfinn Ilmari Mannsåker) </para> @@ -2339,7 +2339,7 @@ 2016-11-09 [41124a91e] pgbench: Allow the transaction log file prefix to be cha --> <para> - Add <application>pgbench</> option <option>--log-prefix</> to + Add <application>pgbench</application> option <option>--log-prefix</option> to control the log file prefix (Masahiko Sawada) </para> </listitem> @@ -2349,7 +2349,7 @@ 2017-01-20 [cdc2a7047] Allow backslash line continuations in pgbench's meta com --> <para> - Allow <application>pgbench</>'s meta-commands to span multiple + Allow <application>pgbench</application>'s meta-commands to span multiple lines (Fabien Coelho) </para> @@ -2364,7 +2364,7 @@ 2017-08-11 [796818442] Remove pgbench's restriction on placement of -M switch. --> <para> - Remove restriction on placement of <option>-M</> option relative to + Remove restriction on placement of <option>-M</option> option relative to other command line options (Tom Lane) </para> </listitem> @@ -2386,8 +2386,8 @@ --> <para> Add <link - linkend="app-pgreceivewal"><application>pg_receivewal</></> - option <option>-Z</>/<option>--compress</> to specify compression + linkend="app-pgreceivewal"><application>pg_receivewal</application></link> + option <option>-Z</option>/<option>--compress</option> to specify compression (Michael Paquier) </para> </listitem> @@ -2398,12 +2398,12 @@ --> <para> Add <link - linkend="app-pgrecvlogical"><application>pg_recvlogical</></> option - <option>--endpos</> to specify the ending position (Craig Ringer) + linkend="app-pgrecvlogical"><application>pg_recvlogical</application></link> option + <option>--endpos</option> to specify the ending position (Craig Ringer) </para> <para> - This complements the existing <option>--startpos</> option. + This complements the existing <option>--startpos</option> option. </para> </listitem> @@ -2412,9 +2412,9 @@ 2016-10-19 [5d58c07a4] initdb pg_basebackup: Rename -\-noxxx options to -\-no-x --> <para> - Rename <link linkend="APP-INITDB"><application>initdb</></> - options <option>--noclean</> and <option>--nosync</> to be spelled - <option>--no-clean</> and <option>--no-sync</> (Vik Fearing, + Rename <link linkend="APP-INITDB"><application>initdb</application></link> + options <option>--noclean</option> and <option>--nosync</option> to be spelled + <option>--no-clean</option> and <option>--no-sync</option> (Vik Fearing, Peter Eisentraut) </para> @@ -2426,9 +2426,9 @@ </itemizedlist> <sect4> - <title><link linkend="APP-PGDUMP"><application>pg_dump</></>, - <link linkend="APP-PG-DUMPALL"><application>pg_dumpall</></>, - <link linkend="APP-PGRESTORE"><application>pg_restore</></></title> + <title><link linkend="APP-PGDUMP"><application>pg_dump</application></link>, + <link linkend="APP-PG-DUMPALL"><application>pg_dumpall</application></link>, + <link linkend="APP-PGRESTORE"><application>pg_restore</application></link></title> <itemizedlist> @@ -2437,11 +2437,11 @@ 2016-09-20 [46b55e7f8] pg_restore: Add -N option to exclude schemas --> <para> - Allow <application>pg_restore</> to exclude schemas (Michael Banck) + Allow <application>pg_restore</application> to exclude schemas (Michael Banck) </para> <para> - This adds a new <option>-N</>/<option>--exclude-schema</> option. + This adds a new <option>-N</option>/<option>--exclude-schema</option> option. </para> </listitem> @@ -2450,8 +2450,8 @@ 2016-11-29 [4fafa579b] Add -\-no-blobs option to pg_dump --> <para> - Add <option>--no-blobs</> option to - <application>pg_dump</> (Guillaume Lelarge) + Add <option>--no-blobs</option> option to + <application>pg_dump</application> (Guillaume Lelarge) </para> <para> @@ -2464,13 +2464,13 @@ 2017-03-07 [9a83d56b3] Allow pg_dumpall to dump roles w/o user passwords --> <para> - Add <application>pg_dumpall</> option - <option>--no-role-passwords</> to omit role passwords + Add <application>pg_dumpall</application> option + <option>--no-role-passwords</option> to omit role passwords (Robins Tharakan, Simon Riggs) </para> <para> - This allows use of <application>pg_dumpall</> by non-superusers; + This allows use of <application>pg_dumpall</application> by non-superusers; without this option, it fails due to inability to read passwords. </para> </listitem> @@ -2490,15 +2490,15 @@ 2017-03-22 [96a7128b7] Sync pg_dump and pg_dumpall output --> <para> - Issue <function>fsync()</> on the output files generated by - <application>pg_dump</> and - <application>pg_dumpall</> (Michael Paquier) + Issue <function>fsync()</function> on the output files generated by + <application>pg_dump</application> and + <application>pg_dumpall</application> (Michael Paquier) </para> <para> This provides more security that the output is safely stored on disk before the program exits. This can be disabled with - the new <option>--no-sync</> option. + the new <option>--no-sync</option> option. </para> </listitem> @@ -2518,12 +2518,12 @@ 2016-12-21 [ecbdc4c55] Forbid invalid combination of options in pg_basebackup. --> <para> - Allow <application>pg_basebackup</> to stream write-ahead log in + Allow <application>pg_basebackup</application> to stream write-ahead log in tar mode (Magnus Hagander) </para> <para> - The <acronym>WAL</> will be stored in a separate tar file from + The <acronym>WAL</acronym> will be stored in a separate tar file from the base backup. </para> </listitem> @@ -2533,13 +2533,13 @@ 2017-01-16 [e7b020f78] Make pg_basebackup use temporary replication slots --> <para> - Make <application>pg_basebackup</> use temporary replication slots + Make <application>pg_basebackup</application> use temporary replication slots (Magnus Hagander) </para> <para> Temporary replication slots will be used by default when - <application>pg_basebackup</> uses WAL streaming with default + <application>pg_basebackup</application> uses WAL streaming with default options. </para> </listitem> @@ -2550,8 +2550,8 @@ --> <para> Be more careful about fsync'ing in all required places - in <application>pg_basebackup</> and - <application>pg_receivewal</> (Michael Paquier) + in <application>pg_basebackup</application> and + <application>pg_receivewal</application> (Michael Paquier) </para> </listitem> @@ -2561,7 +2561,7 @@ 2016-10-19 [5d58c07a4] initdb pg_basebackup: Rename -\-noxxx options to -\-no-x --> <para> - Add <application>pg_basebackup</> option <option>--no-sync</> to + Add <application>pg_basebackup</application> option <option>--no-sync</option> to disable fsync (Michael Paquier) </para> </listitem> @@ -2571,7 +2571,7 @@ 2016-09-28 [6ad8ac602] Exclude additional directories in pg_basebackup --> <para> - Improve <application>pg_basebackup</>'s handling of which + Improve <application>pg_basebackup</application>'s handling of which directories to skip (David Steele) </para> </listitem> @@ -2581,7 +2581,7 @@ </sect4> <sect4> - <title><application><xref linkend="app-pg-ctl"></></title> + <title><application><xref linkend="app-pg-ctl"></application></title> <itemizedlist> @@ -2590,7 +2590,7 @@ 2016-09-21 [e7010ce47] pg_ctl: Add wait option to promote action --> <para> - Add wait option for <application><xref linkend="app-pg-ctl"></>'s + Add wait option for <application><xref linkend="app-pg-ctl"></application>'s promote operation (Peter Eisentraut) </para> </listitem> @@ -2600,8 +2600,8 @@ 2016-10-19 [0be22457d] pg_ctl: Add long options for -w and -W --> <para> - Add long options for <application>pg_ctl</> wait (<option>--wait</>) - and no-wait (<option>--no-wait</>) (Vik Fearing) + Add long options for <application>pg_ctl</application> wait (<option>--wait</option>) + and no-wait (<option>--no-wait</option>) (Vik Fearing) </para> </listitem> @@ -2610,8 +2610,8 @@ 2016-10-19 [caf936b09] pg_ctl: Add long option for -o --> <para> - Add long option for <application>pg_ctl</> server options - (<option>--options</>) (Peter Eisentraut) + Add long option for <application>pg_ctl</application> server options + (<option>--options</option>) (Peter Eisentraut) </para> </listitem> @@ -2620,14 +2620,14 @@ 2017-06-28 [f13ea95f9] Change pg_ctl to detect server-ready by watching status --> <para> - Make <literal>pg_ctl start --wait</> detect server-ready by - watching <filename>postmaster.pid</>, not by attempting connections + Make <literal>pg_ctl start --wait</literal> detect server-ready by + watching <filename>postmaster.pid</filename>, not by attempting connections (Tom Lane) </para> <para> The postmaster has been changed to report its ready-for-connections - status in <filename>postmaster.pid</>, and <application>pg_ctl</> + status in <filename>postmaster.pid</filename>, and <application>pg_ctl</application> now examines that file to detect whether startup is complete. This is more efficient and reliable than the old method, and it eliminates postmaster log entries about rejected connection @@ -2640,12 +2640,12 @@ 2017-06-26 [c61559ec3] Reduce pg_ctl's reaction time when waiting for postmaste --> <para> - Reduce <application>pg_ctl</>'s reaction time when waiting for + Reduce <application>pg_ctl</application>'s reaction time when waiting for postmaster start/stop (Tom Lane) </para> <para> - <application>pg_ctl</> now probes ten times per second when waiting + <application>pg_ctl</application> now probes ten times per second when waiting for a postmaster state change, rather than once per second. </para> </listitem> @@ -2655,14 +2655,14 @@ 2017-07-05 [1bac5f552] pg_ctl: Make failure to complete operation a nonzero exi --> <para> - Ensure that <application>pg_ctl</> exits with nonzero status if an + Ensure that <application>pg_ctl</application> exits with nonzero status if an operation being waited for does not complete within the timeout (Peter Eisentraut) </para> <para> - The <literal>start</> and <literal>promote</> operations now return - exit status 1, not 0, in such cases. The <literal>stop</> operation + The <literal>start</literal> and <literal>promote</literal> operations now return + exit status 1, not 0, in such cases. The <literal>stop</literal> operation has always done that. </para> </listitem> @@ -2687,14 +2687,14 @@ </para> <para> - Release numbers will now have two parts (e.g., <literal>10.1</>) - rather than three (e.g., <literal>9.6.3</>). + Release numbers will now have two parts (e.g., <literal>10.1</literal>) + rather than three (e.g., <literal>9.6.3</literal>). Major versions will now increase just the first number, and minor releases will increase just the second number. Release branches will be referred to by single numbers - (e.g., <literal>10</> rather than <literal>9.6</>). + (e.g., <literal>10</literal> rather than <literal>9.6</literal>). This change is intended to reduce user confusion about what is a - major or minor release of <productname>PostgreSQL</>. + major or minor release of <productname>PostgreSQL</productname>. </para> </listitem> @@ -2708,12 +2708,12 @@ 2017-06-21 [81f056c72] Remove entab and associated detritus. --> <para> - Improve behavior of <application>pgindent</> + Improve behavior of <application>pgindent</application> (Piotr Stefaniak, Tom Lane) </para> <para> - We have switched to a new version of <application>pg_bsd_indent</> + We have switched to a new version of <application>pg_bsd_indent</application> based on recent improvements made by the FreeBSD project. This fixes numerous small bugs that led to odd C code formatting decisions. Most notably, lines within parentheses (such as in a @@ -2728,14 +2728,14 @@ 2017-03-23 [eccfef81e] ICU support --> <para> - Allow the <link linkend="configure"><acronym>ICU</></> library to + Allow the <link linkend="configure"><acronym>ICU</acronym></link> library to optionally be used for collation support (Peter Eisentraut) </para> <para> - The <acronym>ICU</> library has versioning that allows detection + The <acronym>ICU</acronym> library has versioning that allows detection of collation changes between versions. It is enabled via configure - option <option>--with-icu</>. The default still uses the operating + option <option>--with-icu</option>. The default still uses the operating system's native collation library. </para> </listitem> @@ -2746,14 +2746,14 @@ --> <para> Automatically mark all <link - linkend="xfunc-c"><function>PG_FUNCTION_INFO_V1</></> functions - as <literal>DLLEXPORT</>-ed on - <systemitem class="osname">Windows</> (Laurenz Albe) + linkend="xfunc-c"><function>PG_FUNCTION_INFO_V1</function></link> functions + as <literal>DLLEXPORT</literal>-ed on + <systemitem class="osname">Windows</systemitem> (Laurenz Albe) </para> <para> - If third-party code is using <literal>extern</> function - declarations, they should also add <literal>DLLEXPORT</> markers + If third-party code is using <literal>extern</literal> function + declarations, they should also add <literal>DLLEXPORT</literal> markers to those declarations. </para> </listitem> @@ -2763,10 +2763,10 @@ 2016-11-08 [1833f1a1c] Simplify code by getting rid of SPI_push, SPI_pop, SPI_r --> <para> - Remove <acronym>SPI</> functions <function>SPI_push()</>, - <function>SPI_pop()</>, <function>SPI_push_conditional()</>, - <function>SPI_pop_conditional()</>, - and <function>SPI_restore_connection()</> as unnecessary (Tom Lane) + Remove <acronym>SPI</acronym> functions <function>SPI_push()</function>, + <function>SPI_pop()</function>, <function>SPI_push_conditional()</function>, + <function>SPI_pop_conditional()</function>, + and <function>SPI_restore_connection()</function> as unnecessary (Tom Lane) </para> <para> @@ -2776,9 +2776,9 @@ </para> <para> - A side effect of this change is that <function>SPI_palloc()</> and + A side effect of this change is that <function>SPI_palloc()</function> and allied functions now require an active SPI connection; they do not - degenerate to simple <function>palloc()</> if there is none. That + degenerate to simple <function>palloc()</function> if there is none. That previous behavior was not very useful and posed risks of unexpected memory leaks. </para> @@ -2811,9 +2811,9 @@ 2016-10-09 [ecb0d20a9] Use unnamed POSIX semaphores, if available, on Linux and --> <para> - Use <acronym>POSIX</> semaphores rather than SysV semaphores - on <systemitem class="osname">Linux</> and <systemitem - class="osname">FreeBSD</> (Tom Lane) + Use <acronym>POSIX</acronym> semaphores rather than SysV semaphores + on <systemitem class="osname">Linux</systemitem> and <systemitem + class="osname">FreeBSD</systemitem> (Tom Lane) </para> <para> @@ -2835,7 +2835,7 @@ 2017-03-10 [f8f1430ae] Enable 64 bit atomics on ARM64. --> <para> - Enable 64-bit atomic operations on <acronym>ARM64</> (Roman + Enable 64-bit atomic operations on <acronym>ARM64</acronym> (Roman Shaposhnik) </para> </listitem> @@ -2845,13 +2845,13 @@ 2017-01-02 [1d63f7d2d] Use clock_gettime(), if available, in instr_time measure --> <para> - Switch to using <function>clock_gettime()</>, if available, for + Switch to using <function>clock_gettime()</function>, if available, for duration measurements (Tom Lane) </para> <para> - <function>gettimeofday()</> is still used - if <function>clock_gettime()</> is not available. + <function>gettimeofday()</function> is still used + if <function>clock_gettime()</function> is not available. </para> </listitem> @@ -2868,9 +2868,9 @@ <para> If no strong random number generator can be - found, <link linkend="configure">configure</> will fail unless - the <option>--disable-strong-random</> option is used. However, with - this option, <link linkend="pgcrypto"><application>pgcrypto</></> + found, <link linkend="configure">configure</link> will fail unless + the <option>--disable-strong-random</option> option is used. However, with + this option, <link linkend="pgcrypto"><application>pgcrypto</application></link> functions requiring a strong random number generator will be disabled. </para> </listitem> @@ -2880,7 +2880,7 @@ 2017-08-15 [d7ab908fb] Distinguish wait-for-connection from wait-for-write-read --> <para> - Allow <function>WaitLatchOrSocket()</> to wait for socket + Allow <function>WaitLatchOrSocket()</function> to wait for socket connection on Windows (Andres Freund) </para> </listitem> @@ -2890,7 +2890,7 @@ 2017-04-06 [3f902354b] Clean up after insufficiently-researched optimization of --> <para> - <filename>tupconvert.c</> functions no longer convert tuples just to + <filename>tupconvert.c</filename> functions no longer convert tuples just to embed a different composite-type OID in them (Ashutosh Bapat, Tom Lane) </para> @@ -2906,8 +2906,8 @@ 2016-10-11 [2b860f52e] Remove "sco" and "unixware" ports. --> <para> - Remove <systemitem class="osname">SCO</> and <systemitem - class="osname">Unixware</> ports (Tom Lane) + Remove <systemitem class="osname">SCO</systemitem> and <systemitem + class="osname">Unixware</systemitem> ports (Tom Lane) </para> </listitem> @@ -2918,7 +2918,7 @@ --> <para> Overhaul documentation <link linkend="docguide-toolsets">build - process</> (Alexander Lakhin) + process</link> (Alexander Lakhin) </para> </listitem> @@ -2927,13 +2927,13 @@ 2017-04-06 [510074f9f] Remove use of Jade and DSSSL --> <para> - Use <acronym>XSLT</> to build the <productname>PostgreSQL</> + Use <acronym>XSLT</acronym> to build the <productname>PostgreSQL</productname> documentation (Peter Eisentraut) </para> <para> - Previously <application>Jade</>, <acronym>DSSSL</>, and - <application>JadeTex</> were used. + Previously <application>Jade</application>, <acronym>DSSSL</acronym>, and + <application>JadeTex</application> were used. </para> </listitem> @@ -2942,7 +2942,7 @@ 2016-11-15 [e36ddab11] Build HTML documentation using XSLT stylesheets by defau --> <para> - Build <acronym>HTML</> documentation using <acronym>XSLT</> + Build <acronym>HTML</acronym> documentation using <acronym>XSLT</acronym> stylesheets by default (Peter Eisentraut) </para> </listitem> @@ -2961,7 +2961,7 @@ 2016-09-29 [8e91e12bc] Allow contrib/file_fdw to read from a program, like COPY --> <para> - Allow <link linkend="file-fdw"><application>file_fdw</></> to read + Allow <link linkend="file-fdw"><application>file_fdw</application></link> to read from program output as well as files (Corey Huinker, Adam Gomaa) </para> </listitem> @@ -2971,7 +2971,7 @@ 2016-10-21 [7012b132d] postgres_fdw: Push down aggregates to remote servers. --> <para> - In <link linkend="postgres-fdw"><application>postgres_fdw</></>, + In <link linkend="postgres-fdw"><application>postgres_fdw</application></link>, push aggregate functions to the remote server, when possible (Jeevan Chalke, Ashutosh Bapat) </para> @@ -2988,7 +2988,7 @@ 2017-04-24 [332bec1e6] postgres_fdw: Fix join push down with extensions --> <para> - In <application>postgres_fdw</>, push joins to the remote server in + In <application>postgres_fdw</application>, push joins to the remote server in more cases (David Rowley, Ashutosh Bapat, Etsuro Fujita) </para> </listitem> @@ -2998,12 +2998,12 @@ 2016-08-26 [ae025a159] Support OID system column in postgres_fdw. --> <para> - Properly support <type>OID</> columns in - <application>postgres_fdw</> tables (Etsuro Fujita) + Properly support <type>OID</type> columns in + <application>postgres_fdw</application> tables (Etsuro Fujita) </para> <para> - Previously <type>OID</> columns always returned zeros. + Previously <type>OID</type> columns always returned zeros. </para> </listitem> @@ -3012,8 +3012,8 @@ 2017-03-21 [f7946a92b] Add btree_gist support for enum types. --> <para> - Allow <link linkend="btree-gist"><application>btree_gist</></> - and <link linkend="btree-gin"><application>btree_gin</></> to + Allow <link linkend="btree-gist"><application>btree_gist</application></link> + and <link linkend="btree-gin"><application>btree_gin</application></link> to index enum types (Andrew Dunstan) </para> @@ -3027,8 +3027,8 @@ 2016-11-29 [11da83a0e] Add uuid to the set of types supported by contrib/btree_ --> <para> - Add indexing support to <application>btree_gist</> for the - <type>UUID</> data type (Paul Jungwirth) + Add indexing support to <application>btree_gist</application> for the + <type>UUID</type> data type (Paul Jungwirth) </para> </listitem> @@ -3037,7 +3037,7 @@ 2017-03-09 [3717dc149] Add amcheck extension to contrib. --> <para> - Add <link linkend="amcheck"><application>amcheck</></> which can + Add <link linkend="amcheck"><application>amcheck</application></link> which can check the validity of B-tree indexes (Peter Geoghegan) </para> </listitem> @@ -3047,10 +3047,10 @@ 2017-03-27 [a6f22e835] Show ignored constants as "$N" rather than "?" in pg_sta --> <para> - Show ignored constants as <literal>$N</> rather than <literal>?</> + Show ignored constants as <literal>$N</literal> rather than <literal>?</literal> in <link - linkend="pgstatstatements"><application>pg_stat_statements</></> + linkend="pgstatstatements"><application>pg_stat_statements</application></link> (Lukas Fittl) </para> </listitem> @@ -3060,13 +3060,13 @@ 2016-09-27 [f31a931fa] Improve contrib/cube's handling of zero-D cubes, infinit --> <para> - Improve <link linkend="cube"><application>cube</></>'s handling + Improve <link linkend="cube"><application>cube</application></link>'s handling of zero-dimensional cubes (Tom Lane) </para> <para> - This also improves handling of <literal>infinite</> and - <literal>NaN</> values. + This also improves handling of <literal>infinite</literal> and + <literal>NaN</literal> values. </para> </listitem> @@ -3076,7 +3076,7 @@ --> <para> Allow <link - linkend="pgbuffercache"><application>pg_buffercache</></> to run + linkend="pgbuffercache"><application>pg_buffercache</application></link> to run with fewer locks (Ivan Kartyshov) </para> @@ -3090,8 +3090,8 @@ 2017-02-03 [e759854a0] pgstattuple: Add pgstathashindex. --> <para> - Add <link linkend="pgstattuple"><application>pgstattuple</></> - function <function>pgstathashindex()</> to view hash index + Add <link linkend="pgstattuple"><application>pgstattuple</application></link> + function <function>pgstathashindex()</function> to view hash index statistics (Ashutosh Sharma) </para> </listitem> @@ -3101,8 +3101,8 @@ 2016-09-29 [fd321a1df] Remove superuser checks in pgstattuple --> <para> - Use <command>GRANT</> permissions to - control <application>pgstattuple</> function usage (Stephen Frost) + Use <command>GRANT</command> permissions to + control <application>pgstattuple</application> function usage (Stephen Frost) </para> <para> @@ -3115,7 +3115,7 @@ 2016-10-28 [d4b5d4cad] pgstattuple: Don't take heavyweight locks when examining --> <para> - Reduce locking when <application>pgstattuple</> examines hash + Reduce locking when <application>pgstattuple</application> examines hash indexes (Amit Kapila) </para> </listitem> @@ -3125,8 +3125,8 @@ 2017-03-17 [fef2bcdcb] pageinspect: Add page_checksum function --> <para> - Add <link linkend="pageinspect"><application>pageinspect</></> - function <function>page_checksum()</> to show a page's checksum + Add <link linkend="pageinspect"><application>pageinspect</application></link> + function <function>page_checksum()</function> to show a page's checksum (Tomas Vondra) </para> </listitem> @@ -3136,8 +3136,8 @@ 2017-04-04 [193f5f9e9] pageinspect: Add bt_page_items function with bytea argum --> <para> - Add <application>pageinspect</> - function <function>bt_page_items()</> to print page items from a + Add <application>pageinspect</application> + function <function>bt_page_items()</function> to print page items from a page image (Tomas Vondra) </para> </listitem> @@ -3147,7 +3147,7 @@ 2017-02-02 [08bf6e529] pageinspect: Support hash indexes. --> <para> - Add hash index support to <application>pageinspect</> (Jesper + Add hash index support to <application>pageinspect</application> (Jesper Pedersen, Ashutosh Sharma) </para> </listitem> diff --git a/doc/src/sgml/release-7.4.sgml b/doc/src/sgml/release-7.4.sgml index bc4f4e18d01..bdbfe8e0063 100644 --- a/doc/src/sgml/release-7.4.sgml +++ b/doc/src/sgml/release-7.4.sgml @@ -16,7 +16,7 @@ </para> <para> - This is expected to be the last <productname>PostgreSQL</> release + This is expected to be the last <productname>PostgreSQL</productname> release in the 7.4.X series. Users are encouraged to update to a newer release branch soon. </para> @@ -47,7 +47,7 @@ This change prevents security problems that can be caused by subverting Perl or Tcl code that will be executed later in the same session under another SQL user identity (for example, within a <literal>SECURITY - DEFINER</> function). Most scripting languages offer numerous ways that + DEFINER</literal> function). Most scripting languages offer numerous ways that that might be done, such as redefining standard functions or operators called by the target function. Without this change, any SQL user with Perl or Tcl language usage rights can do essentially anything with the @@ -76,7 +76,7 @@ <listitem> <para> - Prevent possible crashes in <function>pg_get_expr()</> by disallowing + Prevent possible crashes in <function>pg_get_expr()</function> by disallowing it from being called with an argument that is not one of the system catalog columns it's intended to be used with (Heikki Linnakangas, Tom Lane) @@ -97,7 +97,7 @@ <listitem> <para> Take care to fsync the contents of lockfiles (both - <filename>postmaster.pid</> and the socket lockfile) while writing them + <filename>postmaster.pid</filename> and the socket lockfile) while writing them (Tom Lane) </para> @@ -111,7 +111,7 @@ <listitem> <para> - Improve <filename>contrib/dblink</>'s handling of tables containing + Improve <filename>contrib/dblink</filename>'s handling of tables containing dropped columns (Tom Lane) </para> </listitem> @@ -119,7 +119,7 @@ <listitem> <para> Fix connection leak after <quote>duplicate connection name</quote> - errors in <filename>contrib/dblink</> (Itagaki Takahiro) + errors in <filename>contrib/dblink</filename> (Itagaki Takahiro) </para> </listitem> @@ -150,7 +150,7 @@ </para> <para> - The <productname>PostgreSQL</> community will stop releasing updates + The <productname>PostgreSQL</productname> community will stop releasing updates for the 7.4.X release series in July 2010. Users are encouraged to update to a newer release branch soon. </para> @@ -173,19 +173,19 @@ <listitem> <para> - Enforce restrictions in <literal>plperl</> using an opmask applied to - the whole interpreter, instead of using <filename>Safe.pm</> + Enforce restrictions in <literal>plperl</literal> using an opmask applied to + the whole interpreter, instead of using <filename>Safe.pm</filename> (Tim Bunce, Andrew Dunstan) </para> <para> - Recent developments have convinced us that <filename>Safe.pm</> is too - insecure to rely on for making <literal>plperl</> trustable. This - change removes use of <filename>Safe.pm</> altogether, in favor of using + Recent developments have convinced us that <filename>Safe.pm</filename> is too + insecure to rely on for making <literal>plperl</literal> trustable. This + change removes use of <filename>Safe.pm</filename> altogether, in favor of using a separate interpreter with an opcode mask that is always applied. Pleasant side effects of the change include that it is now possible to - use Perl's <literal>strict</> pragma in a natural way in - <literal>plperl</>, and that Perl's <literal>$a</> and <literal>$b</> + use Perl's <literal>strict</literal> pragma in a natural way in + <literal>plperl</literal>, and that Perl's <literal>$a</literal> and <literal>$b</literal> variables work as expected in sort routines, and that function compilation is significantly faster. (CVE-2010-1169) </para> @@ -194,19 +194,19 @@ <listitem> <para> Prevent PL/Tcl from executing untrustworthy code from - <structname>pltcl_modules</> (Tom) + <structname>pltcl_modules</structname> (Tom) </para> <para> PL/Tcl's feature for autoloading Tcl code from a database table could be exploited for trojan-horse attacks, because there was no restriction on who could create or insert into that table. This change - disables the feature unless <structname>pltcl_modules</> is owned by a + disables the feature unless <structname>pltcl_modules</structname> is owned by a superuser. (However, the permissions on the table are not checked, so installations that really need a less-than-secure modules table can still grant suitable privileges to trusted non-superusers.) Also, - prevent loading code into the unrestricted <quote>normal</> Tcl - interpreter unless we are really going to execute a <literal>pltclu</> + prevent loading code into the unrestricted <quote>normal</quote> Tcl + interpreter unless we are really going to execute a <literal>pltclu</literal> function. (CVE-2010-1170) </para> </listitem> @@ -219,10 +219,10 @@ <para> Previously, if an unprivileged user ran <literal>ALTER USER ... RESET - ALL</> for himself, or <literal>ALTER DATABASE ... RESET ALL</> for + ALL</literal> for himself, or <literal>ALTER DATABASE ... RESET ALL</literal> for a database he owns, this would remove all special parameter settings for the user or database, even ones that are only supposed to be - changeable by a superuser. Now, the <command>ALTER</> will only + changeable by a superuser. Now, the <command>ALTER</command> will only remove the parameters that the user has permission to change. </para> </listitem> @@ -230,7 +230,7 @@ <listitem> <para> Avoid possible crash during backend shutdown if shutdown occurs - when a <literal>CONTEXT</> addition would be made to log entries (Tom) + when a <literal>CONTEXT</literal> addition would be made to log entries (Tom) </para> <para> @@ -242,7 +242,7 @@ <listitem> <para> - Update PL/Perl's <filename>ppport.h</> for modern Perl versions + Update PL/Perl's <filename>ppport.h</filename> for modern Perl versions (Andrew) </para> </listitem> @@ -255,7 +255,7 @@ <listitem> <para> - Ensure that <filename>contrib/pgstattuple</> functions respond to cancel + Ensure that <filename>contrib/pgstattuple</filename> functions respond to cancel interrupts promptly (Tatsuhito Kasahara) </para> </listitem> @@ -263,7 +263,7 @@ <listitem> <para> Make server startup deal properly with the case that - <function>shmget()</> returns <literal>EINVAL</> for an existing + <function>shmget()</function> returns <literal>EINVAL</literal> for an existing shared memory segment (Tom) </para> @@ -294,7 +294,7 @@ </para> <para> - The <productname>PostgreSQL</> community will stop releasing updates + The <productname>PostgreSQL</productname> community will stop releasing updates for the 7.4.X release series in July 2010. Users are encouraged to update to a newer release branch soon. </para> @@ -317,7 +317,7 @@ <listitem> <para> - Add new configuration parameter <varname>ssl_renegotiation_limit</> to + Add new configuration parameter <varname>ssl_renegotiation_limit</varname> to control how often we do session key renegotiation for an SSL connection (Magnus) </para> @@ -332,8 +332,8 @@ <listitem> <para> - Make <function>substring()</> for <type>bit</> types treat any negative - length as meaning <quote>all the rest of the string</> (Tom) + Make <function>substring()</function> for <type>bit</type> types treat any negative + length as meaning <quote>all the rest of the string</quote> (Tom) </para> <para> @@ -351,17 +351,17 @@ <listitem> <para> - When reading <filename>pg_hba.conf</> and related files, do not treat - <literal>@something</> as a file inclusion request if the <literal>@</> - appears inside quote marks; also, never treat <literal>@</> by itself + When reading <filename>pg_hba.conf</filename> and related files, do not treat + <literal>@something</literal> as a file inclusion request if the <literal>@</literal> + appears inside quote marks; also, never treat <literal>@</literal> by itself as a file inclusion request (Tom) </para> <para> This prevents erratic behavior if a role or database name starts with - <literal>@</>. If you need to include a file whose path name + <literal>@</literal>. If you need to include a file whose path name contains spaces, you can still do so, but you must write - <literal>@"/path to/file"</> rather than putting the quotes around + <literal>@"/path to/file"</literal> rather than putting the quotes around the whole construct. </para> </listitem> @@ -369,7 +369,7 @@ <listitem> <para> Prevent infinite loop on some platforms if a directory is named as - an inclusion target in <filename>pg_hba.conf</> and related files + an inclusion target in <filename>pg_hba.conf</filename> and related files (Tom) </para> </listitem> @@ -381,14 +381,14 @@ <para> The only known symptom of this oversight is that the Tcl - <literal>clock</> command misbehaves if using Tcl 8.5 or later. + <literal>clock</literal> command misbehaves if using Tcl 8.5 or later. </para> </listitem> <listitem> <para> - Prevent crash in <filename>contrib/dblink</> when too many key - columns are specified to a <function>dblink_build_sql_*</> function + Prevent crash in <filename>contrib/dblink</filename> when too many key + columns are specified to a <function>dblink_build_sql_*</function> function (Rushabh Lathia, Joe Conway) </para> </listitem> @@ -460,14 +460,14 @@ <listitem> <para> - Prevent signals from interrupting <literal>VACUUM</> at unsafe times + Prevent signals from interrupting <literal>VACUUM</literal> at unsafe times (Alvaro) </para> <para> - This fix prevents a PANIC if a <literal>VACUUM FULL</> is canceled + This fix prevents a PANIC if a <literal>VACUUM FULL</literal> is canceled after it's already committed its tuple movements, as well as transient - errors if a plain <literal>VACUUM</> is interrupted after having + errors if a plain <literal>VACUUM</literal> is interrupted after having truncated the table. </para> </listitem> @@ -486,7 +486,7 @@ <listitem> <para> - Fix very rare crash in <type>inet</>/<type>cidr</> comparisons (Chris + Fix very rare crash in <type>inet</type>/<type>cidr</type> comparisons (Chris Mikkelson) </para> </listitem> @@ -498,7 +498,7 @@ <para> The previous code is known to fail with the combination of the Linux - <literal>pam_krb5</> PAM module with Microsoft Active Directory as the + <literal>pam_krb5</literal> PAM module with Microsoft Active Directory as the domain controller. It might have problems elsewhere too, since it was making unjustified assumptions about what arguments the PAM stack would pass to it. @@ -507,7 +507,7 @@ <listitem> <para> - Make the postmaster ignore any <literal>application_name</> parameter in + Make the postmaster ignore any <literal>application_name</literal> parameter in connection request packets, to improve compatibility with future libpq versions (Tom) </para> @@ -537,8 +537,8 @@ <para> A dump/restore is not required for those running 7.4.X. - However, if you have any hash indexes on <type>interval</> columns, - you must <command>REINDEX</> them after updating to 7.4.26. + However, if you have any hash indexes on <type>interval</type> columns, + you must <command>REINDEX</command> them after updating to 7.4.26. Also, if you are upgrading from a version earlier than 7.4.11, see <xref linkend="release-7-4-11">. </para> @@ -552,14 +552,14 @@ <listitem> <para> - Disallow <command>RESET ROLE</> and <command>RESET SESSION - AUTHORIZATION</> inside security-definer functions (Tom, Heikki) + Disallow <command>RESET ROLE</command> and <command>RESET SESSION + AUTHORIZATION</command> inside security-definer functions (Tom, Heikki) </para> <para> This covers a case that was missed in the previous patch that - disallowed <command>SET ROLE</> and <command>SET SESSION - AUTHORIZATION</> inside security-definer functions. + disallowed <command>SET ROLE</command> and <command>SET SESSION + AUTHORIZATION</command> inside security-definer functions. (See CVE-2007-6600) </para> </listitem> @@ -573,21 +573,21 @@ <listitem> <para> - Fix hash calculation for data type <type>interval</> (Tom) + Fix hash calculation for data type <type>interval</type> (Tom) </para> <para> This corrects wrong results for hash joins on interval values. It also changes the contents of hash indexes on interval columns. - If you have any such indexes, you must <command>REINDEX</> them + If you have any such indexes, you must <command>REINDEX</command> them after updating. </para> </listitem> <listitem> <para> - Fix overflow for <literal>INTERVAL '<replaceable>x</> ms'</literal> - when <replaceable>x</> is more than 2 million and integer + Fix overflow for <literal>INTERVAL '<replaceable>x</replaceable> ms'</literal> + when <replaceable>x</replaceable> is more than 2 million and integer datetimes are in use (Alex Hunsaker) </para> </listitem> @@ -604,7 +604,7 @@ <listitem> <para> - Fix <type>money</> data type to work in locales where currency + Fix <type>money</type> data type to work in locales where currency amounts have no fractional digits, e.g. Japan (Itagaki Takahiro) </para> </listitem> @@ -612,7 +612,7 @@ <listitem> <para> Properly round datetime input like - <literal>00:12:57.9999999999999999999999999999</> (Tom) + <literal>00:12:57.9999999999999999999999999999</literal> (Tom) </para> </listitem> @@ -631,8 +631,8 @@ <listitem> <para> - Improve robustness of <application>libpq</>'s code to recover - from errors during <command>COPY FROM STDIN</> (Tom) + Improve robustness of <application>libpq</application>'s code to recover + from errors during <command>COPY FROM STDIN</command> (Tom) </para> </listitem> @@ -687,7 +687,7 @@ This change extends fixes made in the last two minor releases for related failure scenarios. The previous fixes were narrowly tailored for the original problem reports, but we have now recognized that - <emphasis>any</> error thrown by an encoding conversion function could + <emphasis>any</emphasis> error thrown by an encoding conversion function could potentially lead to infinite recursion while trying to report the error. The solution therefore is to disable translation and encoding conversion and report the plain-ASCII form of any error message, @@ -698,7 +698,7 @@ <listitem> <para> - Disallow <command>CREATE CONVERSION</> with the wrong encodings + Disallow <command>CREATE CONVERSION</command> with the wrong encodings for the specified conversion function (Heikki) </para> @@ -711,14 +711,14 @@ <listitem> <para> - Fix core dump when <function>to_char()</> is given format codes that + Fix core dump when <function>to_char()</function> is given format codes that are inappropriate for the type of the data argument (Tom) </para> </listitem> <listitem> <para> - Add <literal>MUST</> (Mauritius Island Summer Time) to the default list + Add <literal>MUST</literal> (Mauritius Island Summer Time) to the default list of known timezone abbreviations (Xavier Bugaud) </para> </listitem> @@ -760,13 +760,13 @@ <listitem> <para> - Improve handling of URLs in <function>headline()</> function (Teodor) + Improve handling of URLs in <function>headline()</function> function (Teodor) </para> </listitem> <listitem> <para> - Improve handling of overlength headlines in <function>headline()</> + Improve handling of overlength headlines in <function>headline()</function> function (Teodor) </para> </listitem> @@ -781,30 +781,30 @@ <listitem> <para> - Avoid unnecessary locking of small tables in <command>VACUUM</> + Avoid unnecessary locking of small tables in <command>VACUUM</command> (Heikki) </para> </listitem> <listitem> <para> - Fix uninitialized variables in <filename>contrib/tsearch2</>'s - <function>get_covers()</> function (Teodor) + Fix uninitialized variables in <filename>contrib/tsearch2</filename>'s + <function>get_covers()</function> function (Teodor) </para> </listitem> <listitem> <para> - Fix bug in <function>to_char()</>'s handling of <literal>TH</> + Fix bug in <function>to_char()</function>'s handling of <literal>TH</literal> format codes (Andreas Scherbaum) </para> </listitem> <listitem> <para> - Make all documentation reference <literal>pgsql-bugs</> and/or - <literal>pgsql-hackers</> as appropriate, instead of the - now-decommissioned <literal>pgsql-ports</> and <literal>pgsql-patches</> + Make all documentation reference <literal>pgsql-bugs</literal> and/or + <literal>pgsql-hackers</literal> as appropriate, instead of the + now-decommissioned <literal>pgsql-ports</literal> and <literal>pgsql-patches</literal> mailing lists (Tom) </para> </listitem> @@ -852,7 +852,7 @@ <para> We have addressed similar issues before, but it would still fail if - the <quote>character has no equivalent</> message itself couldn't + the <quote>character has no equivalent</quote> message itself couldn't be converted. The fix is to disable localization and send the plain ASCII error message when we detect such a situation. </para> @@ -868,14 +868,14 @@ <listitem> <para> Fix improper display of fractional seconds in interval values when - using a non-ISO datestyle in an <option>--enable-integer-datetimes</> + using a non-ISO datestyle in an <option>--enable-integer-datetimes</option> build (Ron Mayer) </para> </listitem> <listitem> <para> - Ensure <function>SPI_getvalue</> and <function>SPI_getbinval</> + Ensure <function>SPI_getvalue</function> and <function>SPI_getbinval</function> behave correctly when the passed tuple and tuple descriptor have different numbers of columns (Tom) </para> @@ -889,7 +889,7 @@ <listitem> <para> - Fix <application>ecpg</>'s parsing of <command>CREATE USER</> (Michael) + Fix <application>ecpg</application>'s parsing of <command>CREATE USER</command> (Michael) </para> </listitem> @@ -944,27 +944,27 @@ <listitem> <para> Fix bug in backwards scanning of a cursor on a <literal>SELECT DISTINCT - ON</> query (Tom) + ON</literal> query (Tom) </para> </listitem> <listitem> <para> - Fix planner to estimate that <literal>GROUP BY</> expressions yielding + Fix planner to estimate that <literal>GROUP BY</literal> expressions yielding boolean results always result in two groups, regardless of the expressions' contents (Tom) </para> <para> This is very substantially more accurate than the regular <literal>GROUP - BY</> estimate for certain boolean tests like <replaceable>col</> - <literal>IS NULL</>. + BY</literal> estimate for certain boolean tests like <replaceable>col</replaceable> + <literal>IS NULL</literal>. </para> </listitem> <listitem> <para> - Improve <application>pg_dump</> and <application>pg_restore</>'s + Improve <application>pg_dump</application> and <application>pg_restore</application>'s error reporting after failure to send a SQL command (Tom) </para> </listitem> @@ -1006,18 +1006,18 @@ <listitem> <para> - Make <function>pg_get_ruledef()</> parenthesize negative constants (Tom) + Make <function>pg_get_ruledef()</function> parenthesize negative constants (Tom) </para> <para> Before this fix, a negative constant in a view or rule might be dumped - as, say, <literal>-42::integer</>, which is subtly incorrect: it should - be <literal>(-42)::integer</> due to operator precedence rules. + as, say, <literal>-42::integer</literal>, which is subtly incorrect: it should + be <literal>(-42)::integer</literal> due to operator precedence rules. Usually this would make little difference, but it could interact with another recent patch to cause - <productname>PostgreSQL</> to reject what had been a valid - <command>SELECT DISTINCT</> view query. Since this could result in - <application>pg_dump</> output failing to reload, it is being treated + <productname>PostgreSQL</productname> to reject what had been a valid + <command>SELECT DISTINCT</command> view query. Since this could result in + <application>pg_dump</application> output failing to reload, it is being treated as a high-priority fix. The only released versions in which dump output is actually incorrect are 8.3.1 and 8.2.7. </para> @@ -1061,7 +1061,7 @@ <listitem> <para> Fix conversions between ISO-8859-5 and other encodings to handle - Cyrillic <quote>Yo</> characters (<literal>e</> and <literal>E</> with + Cyrillic <quote>Yo</quote> characters (<literal>e</literal> and <literal>E</literal> with two dots) (Sergey Burladyan) </para> </listitem> @@ -1076,7 +1076,7 @@ <para> This could lead to failures in which two apparently identical literal values were not seen as equal, resulting in the parser complaining - about unmatched <literal>ORDER BY</> and <literal>DISTINCT</> + about unmatched <literal>ORDER BY</literal> and <literal>DISTINCT</literal> expressions. </para> </listitem> @@ -1084,36 +1084,36 @@ <listitem> <para> Fix a corner case in regular-expression substring matching - (<literal>substring(<replaceable>string</> from - <replaceable>pattern</>)</literal>) (Tom) + (<literal>substring(<replaceable>string</replaceable> from + <replaceable>pattern</replaceable>)</literal>) (Tom) </para> <para> The problem occurs when there is a match to the pattern overall but the user has specified a parenthesized subexpression and that subexpression hasn't got a match. An example is - <literal>substring('foo' from 'foo(bar)?')</>. - This should return NULL, since <literal>(bar)</> isn't matched, but + <literal>substring('foo' from 'foo(bar)?')</literal>. + This should return NULL, since <literal>(bar)</literal> isn't matched, but it was mistakenly returning the whole-pattern match instead (ie, - <literal>foo</>). + <literal>foo</literal>). </para> </listitem> <listitem> <para> - Fix incorrect result from <application>ecpg</>'s - <function>PGTYPEStimestamp_sub()</> function (Michael) + Fix incorrect result from <application>ecpg</application>'s + <function>PGTYPEStimestamp_sub()</function> function (Michael) </para> </listitem> <listitem> <para> - Fix <literal>DatumGetBool</> macro to not fail with <application>gcc</> + Fix <literal>DatumGetBool</literal> macro to not fail with <application>gcc</application> 4.3 (Tom) </para> <para> - This problem affects <quote>old style</> (V0) C functions that + This problem affects <quote>old style</quote> (V0) C functions that return boolean. The fix is already in 8.3, but the need to back-patch it was not realized at the time. </para> @@ -1121,21 +1121,21 @@ <listitem> <para> - Fix longstanding <command>LISTEN</>/<command>NOTIFY</> + Fix longstanding <command>LISTEN</command>/<command>NOTIFY</command> race condition (Tom) </para> <para> In rare cases a session that had just executed a - <command>LISTEN</> might not get a notification, even though + <command>LISTEN</command> might not get a notification, even though one would be expected because the concurrent transaction executing - <command>NOTIFY</> was observed to commit later. + <command>NOTIFY</command> was observed to commit later. </para> <para> A side effect of the fix is that a transaction that has executed - a not-yet-committed <command>LISTEN</> command will not see any - row in <structname>pg_listener</> for the <command>LISTEN</>, + a not-yet-committed <command>LISTEN</command> command will not see any + row in <structname>pg_listener</structname> for the <command>LISTEN</command>, should it choose to look; formerly it would have. This behavior was never documented one way or the other, but it is possible that some applications depend on the old behavior. @@ -1144,8 +1144,8 @@ <listitem> <para> - Fix display of constant expressions in <literal>ORDER BY</> - and <literal>GROUP BY</> (Tom) + Fix display of constant expressions in <literal>ORDER BY</literal> + and <literal>GROUP BY</literal> (Tom) </para> <para> @@ -1157,7 +1157,7 @@ <listitem> <para> - Fix <application>libpq</> to handle NOTICE messages correctly + Fix <application>libpq</application> to handle NOTICE messages correctly during COPY OUT (Tom) </para> @@ -1207,7 +1207,7 @@ <listitem> <para> Prevent functions in indexes from executing with the privileges of - the user running <command>VACUUM</>, <command>ANALYZE</>, etc (Tom) + the user running <command>VACUUM</command>, <command>ANALYZE</command>, etc (Tom) </para> <para> @@ -1218,18 +1218,18 @@ (Note that triggers, defaults, check constraints, etc. pose the same type of risk.) But functions in indexes pose extra danger because they will be executed by routine maintenance operations - such as <command>VACUUM FULL</>, which are commonly performed + such as <command>VACUUM FULL</command>, which are commonly performed automatically under a superuser account. For example, a nefarious user can execute code with superuser privileges by setting up a trojan-horse index definition and waiting for the next routine vacuum. The fix arranges for standard maintenance operations - (including <command>VACUUM</>, <command>ANALYZE</>, <command>REINDEX</>, - and <command>CLUSTER</>) to execute as the table owner rather than + (including <command>VACUUM</command>, <command>ANALYZE</command>, <command>REINDEX</command>, + and <command>CLUSTER</command>) to execute as the table owner rather than the calling user, using the same privilege-switching mechanism already - used for <literal>SECURITY DEFINER</> functions. To prevent bypassing + used for <literal>SECURITY DEFINER</literal> functions. To prevent bypassing this security measure, execution of <command>SET SESSION - AUTHORIZATION</> and <command>SET ROLE</> is now forbidden within a - <literal>SECURITY DEFINER</> context. (CVE-2007-6600) + AUTHORIZATION</command> and <command>SET ROLE</command> is now forbidden within a + <literal>SECURITY DEFINER</literal> context. (CVE-2007-6600) </para> </listitem> @@ -1249,13 +1249,13 @@ <listitem> <para> - Require non-superusers who use <filename>/contrib/dblink</> to use only + Require non-superusers who use <filename>/contrib/dblink</filename> to use only password authentication, as a security measure (Joe) </para> <para> The fix that appeared for this in 7.4.18 was incomplete, as it plugged - the hole for only some <filename>dblink</> functions. (CVE-2007-6601, + the hole for only some <filename>dblink</filename> functions. (CVE-2007-6601, CVE-2007-3278) </para> </listitem> @@ -1263,13 +1263,13 @@ <listitem> <para> Fix planner failure in some cases of <literal>WHERE false AND var IN - (SELECT ...)</> (Tom) + (SELECT ...)</literal> (Tom) </para> </listitem> <listitem> <para> - Fix potential crash in <function>translate()</> when using a multibyte + Fix potential crash in <function>translate()</function> when using a multibyte database encoding (Tom) </para> </listitem> @@ -1282,42 +1282,42 @@ <listitem> <para> - <application>ecpg</> parser fixes (Michael) + <application>ecpg</application> parser fixes (Michael) </para> </listitem> <listitem> <para> - Make <filename>contrib/tablefunc</>'s <function>crosstab()</> handle + Make <filename>contrib/tablefunc</filename>'s <function>crosstab()</function> handle NULL rowid as a category in its own right, rather than crashing (Joe) </para> </listitem> <listitem> <para> - Fix <type>tsvector</> and <type>tsquery</> output routines to + Fix <type>tsvector</type> and <type>tsquery</type> output routines to escape backslashes correctly (Teodor, Bruce) </para> </listitem> <listitem> <para> - Fix crash of <function>to_tsvector()</> on huge input strings (Teodor) + Fix crash of <function>to_tsvector()</function> on huge input strings (Teodor) </para> </listitem> <listitem> <para> - Require a specific version of <productname>Autoconf</> to be used - when re-generating the <command>configure</> script (Peter) + Require a specific version of <productname>Autoconf</productname> to be used + when re-generating the <command>configure</command> script (Peter) </para> <para> This affects developers and packagers only. The change was made to prevent accidental use of untested combinations of - <productname>Autoconf</> and <productname>PostgreSQL</> versions. + <productname>Autoconf</productname> and <productname>PostgreSQL</productname> versions. You can remove the version check if you really want to use a - different <productname>Autoconf</> version, but it's + different <productname>Autoconf</productname> version, but it's your responsibility whether the result works or not. </para> </listitem> @@ -1360,40 +1360,40 @@ <listitem> <para> Prevent index corruption when a transaction inserts rows and - then aborts close to the end of a concurrent <command>VACUUM</> + then aborts close to the end of a concurrent <command>VACUUM</command> on the same table (Tom) </para> </listitem> <listitem> <para> - Make <command>CREATE DOMAIN ... DEFAULT NULL</> work properly (Tom) + Make <command>CREATE DOMAIN ... DEFAULT NULL</command> work properly (Tom) </para> </listitem> <listitem> <para> - Fix excessive logging of <acronym>SSL</> error messages (Tom) + Fix excessive logging of <acronym>SSL</acronym> error messages (Tom) </para> </listitem> <listitem> <para> - Fix crash when <varname>log_min_error_statement</> logging runs out + Fix crash when <varname>log_min_error_statement</varname> logging runs out of memory (Tom) </para> </listitem> <listitem> <para> - Prevent <command>CLUSTER</> from failing + Prevent <command>CLUSTER</command> from failing due to attempting to process temporary tables of other sessions (Alvaro) </para> </listitem> <listitem> <para> - Require non-superusers who use <filename>/contrib/dblink</> to use only + Require non-superusers who use <filename>/contrib/dblink</filename> to use only password authentication, as a security measure (Joe) </para> </listitem> @@ -1437,28 +1437,28 @@ <listitem> <para> Support explicit placement of the temporary-table schema within - <varname>search_path</>, and disable searching it for functions + <varname>search_path</varname>, and disable searching it for functions and operators (Tom) </para> <para> This is needed to allow a security-definer function to set a - truly secure value of <varname>search_path</>. Without it, + truly secure value of <varname>search_path</varname>. Without it, an unprivileged SQL user can use temporary objects to execute code with the privileges of the security-definer function (CVE-2007-2138). - See <command>CREATE FUNCTION</> for more information. + See <command>CREATE FUNCTION</command> for more information. </para> </listitem> <listitem> <para> - <filename>/contrib/tsearch2</> crash fixes (Teodor) + <filename>/contrib/tsearch2</filename> crash fixes (Teodor) </para> </listitem> <listitem> <para> - Fix potential-data-corruption bug in how <command>VACUUM FULL</> handles - <command>UPDATE</> chains (Tom, Pavan Deolasee) + Fix potential-data-corruption bug in how <command>VACUUM FULL</command> handles + <command>UPDATE</command> chains (Tom, Pavan Deolasee) </para> </listitem> @@ -1529,7 +1529,7 @@ <listitem> <para> - Fix for rare Assert() crash triggered by <literal>UNION</> (Tom) + Fix for rare Assert() crash triggered by <literal>UNION</literal> (Tom) </para> </listitem> @@ -1577,7 +1577,7 @@ <listitem> <para> - Improve handling of <function>getaddrinfo()</> on AIX (Tom) + Improve handling of <function>getaddrinfo()</function> on AIX (Tom) </para> <para> @@ -1588,8 +1588,8 @@ <listitem> <para> - Fix <quote>failed to re-find parent key</> errors in - <command>VACUUM</> (Tom) + Fix <quote>failed to re-find parent key</quote> errors in + <command>VACUUM</command> (Tom) </para> </listitem> @@ -1601,20 +1601,20 @@ <listitem> <para> - Fix error when constructing an <literal>ARRAY[]</> made up of multiple + Fix error when constructing an <literal>ARRAY[]</literal> made up of multiple empty elements (Tom) </para> </listitem> <listitem> <para> - <function>to_number()</> and <function>to_char(numeric)</> - are now <literal>STABLE</>, not <literal>IMMUTABLE</>, for - new <application>initdb</> installs (Tom) + <function>to_number()</function> and <function>to_char(numeric)</function> + are now <literal>STABLE</literal>, not <literal>IMMUTABLE</literal>, for + new <application>initdb</application> installs (Tom) </para> <para> - This is because <varname>lc_numeric</> can potentially + This is because <varname>lc_numeric</varname> can potentially change the output of these functions. </para> </listitem> @@ -1625,7 +1625,7 @@ </para> <para> - This improves <application>psql</> <literal>\d</> performance also. + This improves <application>psql</application> <literal>\d</literal> performance also. </para> </listitem> @@ -1665,12 +1665,12 @@ <itemizedlist> <listitem><para>Fix core dump when an untyped literal is taken as ANYARRAY</para></listitem> -<listitem><para>Fix <function>string_to_array()</> to handle overlapping +<listitem><para>Fix <function>string_to_array()</function> to handle overlapping matches for the separator string</para> -<para>For example, <literal>string_to_array('123xx456xxx789', 'xx')</>. +<para>For example, <literal>string_to_array('123xx456xxx789', 'xx')</literal>. </para></listitem> <listitem><para>Fix corner cases in pattern matching for - <application>psql</>'s <literal>\d</> commands</para></listitem> + <application>psql</application>'s <literal>\d</literal> commands</para></listitem> <listitem><para>Fix index-corrupting bugs in /contrib/ltree (Teodor)</para></listitem> <listitem><para>Fix backslash escaping in /contrib/dbmirror</para></listitem> @@ -1712,9 +1712,9 @@ ANYARRAY</para></listitem> into SQL commands, you should examine them as soon as possible to ensure that they are using recommended escaping techniques. In most cases, applications should be using subroutines provided by - libraries or drivers (such as <application>libpq</>'s - <function>PQescapeStringConn()</>) to perform string escaping, - rather than relying on <foreignphrase>ad hoc</> code to do it. + libraries or drivers (such as <application>libpq</application>'s + <function>PQescapeStringConn()</function>) to perform string escaping, + rather than relying on <foreignphrase>ad hoc</foreignphrase> code to do it. </para> </sect2> @@ -1724,48 +1724,48 @@ ANYARRAY</para></listitem> <itemizedlist> <listitem><para>Change the server to reject invalidly-encoded multibyte characters in all cases (Tatsuo, Tom)</para> -<para>While <productname>PostgreSQL</> has been moving in this direction for +<para>While <productname>PostgreSQL</productname> has been moving in this direction for some time, the checks are now applied uniformly to all encodings and all textual input, and are now always errors not merely warnings. This change defends against SQL-injection attacks of the type described in CVE-2006-2313. </para></listitem> -<listitem><para>Reject unsafe uses of <literal>\'</> in string literals</para> +<listitem><para>Reject unsafe uses of <literal>\'</literal> in string literals</para> <para>As a server-side defense against SQL-injection attacks of the type -described in CVE-2006-2314, the server now only accepts <literal>''</> and not -<literal>\'</> as a representation of ASCII single quote in SQL string -literals. By default, <literal>\'</> is rejected only when -<varname>client_encoding</> is set to a client-only encoding (SJIS, BIG5, GBK, +described in CVE-2006-2314, the server now only accepts <literal>''</literal> and not +<literal>\'</literal> as a representation of ASCII single quote in SQL string +literals. By default, <literal>\'</literal> is rejected only when +<varname>client_encoding</varname> is set to a client-only encoding (SJIS, BIG5, GBK, GB18030, or UHC), which is the scenario in which SQL injection is possible. -A new configuration parameter <varname>backslash_quote</> is available to +A new configuration parameter <varname>backslash_quote</varname> is available to adjust this behavior when needed. Note that full security against CVE-2006-2314 might require client-side changes; the purpose of -<varname>backslash_quote</> is in part to make it obvious that insecure +<varname>backslash_quote</varname> is in part to make it obvious that insecure clients are insecure. </para></listitem> -<listitem><para>Modify <application>libpq</>'s string-escaping routines to be +<listitem><para>Modify <application>libpq</application>'s string-escaping routines to be aware of encoding considerations and -<varname>standard_conforming_strings</></para> -<para>This fixes <application>libpq</>-using applications for the security +<varname>standard_conforming_strings</varname></para> +<para>This fixes <application>libpq</application>-using applications for the security issues described in CVE-2006-2313 and CVE-2006-2314, and also future-proofs them against the planned changeover to SQL-standard string literal syntax. -Applications that use multiple <productname>PostgreSQL</> connections -concurrently should migrate to <function>PQescapeStringConn()</> and -<function>PQescapeByteaConn()</> to ensure that escaping is done correctly +Applications that use multiple <productname>PostgreSQL</productname> connections +concurrently should migrate to <function>PQescapeStringConn()</function> and +<function>PQescapeByteaConn()</function> to ensure that escaping is done correctly for the settings in use in each database connection. Applications that -do string escaping <quote>by hand</> should be modified to rely on library +do string escaping <quote>by hand</quote> should be modified to rely on library routines instead. </para></listitem> <listitem><para>Fix some incorrect encoding conversion functions</para> -<para><function>win1251_to_iso</>, <function>alt_to_iso</>, -<function>euc_tw_to_big5</>, <function>euc_tw_to_mic</>, -<function>mic_to_euc_tw</> were all broken to varying +<para><function>win1251_to_iso</function>, <function>alt_to_iso</function>, +<function>euc_tw_to_big5</function>, <function>euc_tw_to_mic</function>, +<function>mic_to_euc_tw</function> were all broken to varying extents. </para></listitem> -<listitem><para>Clean up stray remaining uses of <literal>\'</> in strings +<listitem><para>Clean up stray remaining uses of <literal>\'</literal> in strings (Bruce, Jan)</para></listitem> <listitem><para>Fix bug that sometimes caused OR'd index scans to @@ -1774,8 +1774,8 @@ miss rows they should have returned</para></listitem> <listitem><para>Fix WAL replay for case where a btree index has been truncated</para></listitem> -<listitem><para>Fix <literal>SIMILAR TO</> for patterns involving -<literal>|</> (Tom)</para></listitem> +<listitem><para>Fix <literal>SIMILAR TO</literal> for patterns involving +<literal>|</literal> (Tom)</para></listitem> <listitem><para>Fix server to use custom DH SSL parameters correctly (Michael Fuhr)</para></listitem> @@ -1818,7 +1818,7 @@ Fuhr)</para></listitem> <itemizedlist> <listitem><para>Fix potential crash in <command>SET -SESSION AUTHORIZATION</> (CVE-2006-0553)</para> +SESSION AUTHORIZATION</command> (CVE-2006-0553)</para> <para>An unprivileged user could crash the server process, resulting in momentary denial of service to other users, if the server has been compiled with Asserts enabled (which is not the default). @@ -1833,18 +1833,18 @@ created in 7.4.9 and 7.3.11 releases. </para></listitem> <listitem><para>Fix race condition that could lead to <quote>file already -exists</> errors during pg_clog file creation +exists</quote> errors during pg_clog file creation (Tom)</para></listitem> -<listitem><para>Properly check <literal>DOMAIN</> constraints for -<literal>UNKNOWN</> parameters in prepared statements +<listitem><para>Properly check <literal>DOMAIN</literal> constraints for +<literal>UNKNOWN</literal> parameters in prepared statements (Neil)</para></listitem> <listitem><para>Fix to allow restoring dumps that have cross-schema references to custom operators (Tom)</para></listitem> -<listitem><para>Portability fix for testing presence of <function>finite</> -and <function>isinf</> during configure (Tom)</para></listitem> +<listitem><para>Portability fix for testing presence of <function>finite</function> +and <function>isinf</function> during configure (Tom)</para></listitem> </itemizedlist> @@ -1872,9 +1872,9 @@ and <function>isinf</> during configure (Tom)</para></listitem> A dump/restore is not required for those running 7.4.X. However, if you are upgrading from a version earlier than 7.4.8, see <xref linkend="release-7-4-8">. - Also, you might need to <command>REINDEX</> indexes on textual + Also, you might need to <command>REINDEX</command> indexes on textual columns after updating, if you are affected by the locale or - <application>plperl</> issues described below. + <application>plperl</application> issues described below. </para> </sect2> @@ -1888,28 +1888,28 @@ outside a transaction or in a failed transaction (Tom)</para></listitem> <listitem><para>Fix character string comparison for locales that consider different character combinations as equal, such as Hungarian (Tom)</para> -<para>This might require <command>REINDEX</> to fix existing indexes on +<para>This might require <command>REINDEX</command> to fix existing indexes on textual columns.</para></listitem> <listitem><para>Set locale environment variables during postmaster startup -to ensure that <application>plperl</> won't change the locale later</para> -<para>This fixes a problem that occurred if the <application>postmaster</> was +to ensure that <application>plperl</application> won't change the locale later</para> +<para>This fixes a problem that occurred if the <application>postmaster</application> was started with environment variables specifying a different locale than what -<application>initdb</> had been told. Under these conditions, any use of -<application>plperl</> was likely to lead to corrupt indexes. You might need -<command>REINDEX</> to fix existing indexes on +<application>initdb</application> had been told. Under these conditions, any use of +<application>plperl</application> was likely to lead to corrupt indexes. You might need +<command>REINDEX</command> to fix existing indexes on textual columns if this has happened to you.</para></listitem> <listitem><para>Fix longstanding bug in strpos() and regular expression handling in certain rarely used Asian multi-byte character sets (Tatsuo) </para></listitem> -<listitem><para>Fix bug in <filename>/contrib/pgcrypto</> gen_salt, +<listitem><para>Fix bug in <filename>/contrib/pgcrypto</filename> gen_salt, which caused it not to use all available salt space for MD5 and XDES algorithms (Marko Kreen, Solar Designer)</para> <para>Salts for Blowfish and standard DES are unaffected.</para></listitem> -<listitem><para>Fix <filename>/contrib/dblink</> to throw an error, +<listitem><para>Fix <filename>/contrib/dblink</filename> to throw an error, rather than crashing, when the number of columns specified is different from what's actually returned by the query (Joe)</para></listitem> @@ -1956,15 +1956,15 @@ corruption.</para> <listitem><para>Prevent failure if client sends Bind protocol message when current transaction is already aborted</para></listitem> -<listitem><para><filename>/contrib/ltree</> fixes (Teodor)</para></listitem> +<listitem><para><filename>/contrib/ltree</filename> fixes (Teodor)</para></listitem> <listitem><para>AIX and HPUX compile fixes (Tom)</para></listitem> <listitem><para>Fix longstanding planning error for outer joins</para> <para>This bug sometimes caused a bogus error <quote>RIGHT JOIN is -only supported with merge-joinable join conditions</>.</para></listitem> +only supported with merge-joinable join conditions</quote>.</para></listitem> -<listitem><para>Prevent core dump in <application>pg_autovacuum</> when a +<listitem><para>Prevent core dump in <application>pg_autovacuum</application> when a table has been dropped</para></listitem> </itemizedlist> @@ -1999,41 +1999,41 @@ table has been dropped</para></listitem> <title>Changes</title> <itemizedlist> -<listitem><para>Fix error that allowed <command>VACUUM</> to remove -<literal>ctid</> chains too soon, and add more checking in code that follows -<literal>ctid</> links</para> +<listitem><para>Fix error that allowed <command>VACUUM</command> to remove +<literal>ctid</literal> chains too soon, and add more checking in code that follows +<literal>ctid</literal> links</para> <para>This fixes a long-standing problem that could cause crashes in very rare circumstances.</para></listitem> -<listitem><para>Fix <type>CHAR()</> to properly pad spaces to the specified +<listitem><para>Fix <type>CHAR()</type> to properly pad spaces to the specified length when using a multiple-byte character set (Yoshiyuki Asaba)</para> -<para>In prior releases, the padding of <type>CHAR()</> was incorrect +<para>In prior releases, the padding of <type>CHAR()</type> was incorrect because it only padded to the specified number of bytes without considering how many characters were stored.</para></listitem> <listitem><para>Fix the sense of the test for read-only transaction -in <command>COPY</></para> -<para>The code formerly prohibited <command>COPY TO</>, where it should -prohibit <command>COPY FROM</>. +in <command>COPY</command></para> +<para>The code formerly prohibited <command>COPY TO</command>, where it should +prohibit <command>COPY FROM</command>. </para></listitem> <listitem><para>Fix planning problem with outer-join ON clauses that reference only the inner-side relation</para></listitem> -<listitem><para>Further fixes for <literal>x FULL JOIN y ON true</> corner +<listitem><para>Further fixes for <literal>x FULL JOIN y ON true</literal> corner cases</para></listitem> -<listitem><para>Make <function>array_in</> and <function>array_recv</> more +<listitem><para>Make <function>array_in</function> and <function>array_recv</function> more paranoid about validating their OID parameter</para></listitem> <listitem><para>Fix missing rows in queries like <literal>UPDATE a=... WHERE -a...</> with GiST index on column <literal>a</></para></listitem> +a...</literal> with GiST index on column <literal>a</literal></para></listitem> <listitem><para>Improve robustness of datetime parsing</para></listitem> <listitem><para>Improve checking for partially-written WAL pages</para></listitem> <listitem><para>Improve robustness of signal handling when SSL is enabled</para></listitem> -<listitem><para>Don't try to open more than <literal>max_files_per_process</> +<listitem><para>Don't try to open more than <literal>max_files_per_process</literal> files during postmaster startup</para></listitem> <listitem><para>Various memory leakage fixes</para></listitem> <listitem><para>Various portability improvements</para></listitem> -<listitem><para>Fix PL/pgSQL to handle <literal>var := var</> correctly when +<listitem><para>Fix PL/pgSQL to handle <literal>var := var</literal> correctly when the variable is of pass-by-reference type</para></listitem> -<listitem><para>Update <filename>contrib/tsearch2</> to use current Snowball +<listitem><para>Update <filename>contrib/tsearch2</filename> to use current Snowball code</para></listitem> </itemizedlist> @@ -2077,10 +2077,10 @@ code</para></listitem> </para> <para> - The lesser problem is that the <filename>contrib/tsearch2</> module + The lesser problem is that the <filename>contrib/tsearch2</filename> module creates several functions that are misdeclared to return - <type>internal</> when they do not accept <type>internal</> arguments. - This breaks type safety for all functions using <type>internal</> + <type>internal</type> when they do not accept <type>internal</type> arguments. + This breaks type safety for all functions using <type>internal</type> arguments. </para> @@ -2106,7 +2106,7 @@ WHERE pronamespace = 11 AND pronargs = 5 COMMIT; </programlisting> - Next, if you have installed <filename>contrib/tsearch2</>, do: + Next, if you have installed <filename>contrib/tsearch2</filename>, do: <programlisting> BEGIN; @@ -2124,22 +2124,22 @@ COMMIT; </programlisting> If this command fails with a message like <quote>function - "dex_init(text)" does not exist</>, then either <filename>tsearch2</> + "dex_init(text)" does not exist</quote>, then either <filename>tsearch2</filename> is not installed in this database, or you already did the update. </para> <para> - The above procedures must be carried out in <emphasis>each</> database - of an installation, including <literal>template1</>, and ideally - including <literal>template0</> as well. If you do not fix the + The above procedures must be carried out in <emphasis>each</emphasis> database + of an installation, including <literal>template1</literal>, and ideally + including <literal>template0</literal> as well. If you do not fix the template databases then any subsequently created databases will contain - the same errors. <literal>template1</> can be fixed in the same way - as any other database, but fixing <literal>template0</> requires + the same errors. <literal>template1</literal> can be fixed in the same way + as any other database, but fixing <literal>template0</literal> requires additional steps. First, from any database issue: <programlisting> UPDATE pg_database SET datallowconn = true WHERE datname = 'template0'; </programlisting> - Next connect to <literal>template0</> and perform the above repair + Next connect to <literal>template0</literal> and perform the above repair procedures. Finally, do: <programlisting> -- re-freeze template0: @@ -2156,8 +2156,8 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <itemizedlist> <listitem><para>Change encoding function signature to prevent misuse</para></listitem> -<listitem><para>Change <filename>contrib/tsearch2</> to avoid unsafe use of -<type>INTERNAL</> function results</para></listitem> +<listitem><para>Change <filename>contrib/tsearch2</filename> to avoid unsafe use of +<type>INTERNAL</type> function results</para></listitem> <listitem><para>Repair ancient race condition that allowed a transaction to be seen as committed for some purposes (eg SELECT FOR UPDATE) slightly sooner than for other purposes</para> @@ -2169,56 +2169,56 @@ VACUUM</para> freshly-inserted data, although the scenario seems of very low probability. There are no known cases of it having caused more than an Assert failure. </para></listitem> -<listitem><para>Fix comparisons of <type>TIME WITH TIME ZONE</> values</para> +<listitem><para>Fix comparisons of <type>TIME WITH TIME ZONE</type> values</para> <para> The comparison code was wrong in the case where the -<literal>--enable-integer-datetimes</> configuration switch had been used. -NOTE: if you have an index on a <type>TIME WITH TIME ZONE</> column, -it will need to be <command>REINDEX</>ed after installing this update, because +<literal>--enable-integer-datetimes</literal> configuration switch had been used. +NOTE: if you have an index on a <type>TIME WITH TIME ZONE</type> column, +it will need to be <command>REINDEX</command>ed after installing this update, because the fix corrects the sort order of column values. </para></listitem> -<listitem><para>Fix <function>EXTRACT(EPOCH)</> for -<type>TIME WITH TIME ZONE</> values</para></listitem> +<listitem><para>Fix <function>EXTRACT(EPOCH)</function> for +<type>TIME WITH TIME ZONE</type> values</para></listitem> <listitem><para>Fix mis-display of negative fractional seconds in -<type>INTERVAL</> values</para> +<type>INTERVAL</type> values</para> <para> This error only occurred when the -<literal>--enable-integer-datetimes</> configuration switch had been used. +<literal>--enable-integer-datetimes</literal> configuration switch had been used. </para></listitem> <listitem><para>Ensure operations done during backend shutdown are counted by statistics collector</para> <para> -This is expected to resolve reports of <application>pg_autovacuum</> +This is expected to resolve reports of <application>pg_autovacuum</application> not vacuuming the system catalogs often enough — it was not being told about catalog deletions caused by temporary table removal during backend exit. </para></listitem> <listitem><para>Additional buffer overrun checks in plpgsql (Neil)</para></listitem> -<listitem><para>Fix pg_dump to dump trigger names containing <literal>%</> +<listitem><para>Fix pg_dump to dump trigger names containing <literal>%</literal> correctly (Neil)</para></listitem> -<listitem><para>Fix <filename>contrib/pgcrypto</> for newer OpenSSL builds +<listitem><para>Fix <filename>contrib/pgcrypto</filename> for newer OpenSSL builds (Marko Kreen)</para></listitem> <listitem><para>Still more 64-bit fixes for -<filename>contrib/intagg</></para></listitem> +<filename>contrib/intagg</filename></para></listitem> <listitem><para>Prevent incorrect optimization of functions returning -<type>RECORD</></para></listitem> -<listitem><para>Prevent <function>to_char(interval)</> from dumping core for +<type>RECORD</type></para></listitem> +<listitem><para>Prevent <function>to_char(interval)</function> from dumping core for month-related formats</para></listitem> -<listitem><para>Prevent crash on <literal>COALESCE(NULL,NULL)</></para></listitem> -<listitem><para>Fix <function>array_map</> to call PL functions correctly</para></listitem> -<listitem><para>Fix permission checking in <command>ALTER DATABASE RENAME</></para></listitem> -<listitem><para>Fix <command>ALTER LANGUAGE RENAME</></para></listitem> -<listitem><para>Make <function>RemoveFromWaitQueue</> clean up after itself</para> +<listitem><para>Prevent crash on <literal>COALESCE(NULL,NULL)</literal></para></listitem> +<listitem><para>Fix <function>array_map</function> to call PL functions correctly</para></listitem> +<listitem><para>Fix permission checking in <command>ALTER DATABASE RENAME</command></para></listitem> +<listitem><para>Fix <command>ALTER LANGUAGE RENAME</command></para></listitem> +<listitem><para>Make <function>RemoveFromWaitQueue</function> clean up after itself</para> <para> This fixes a lock management error that would only be visible if a transaction was kicked out of a wait for a lock (typically by query cancel) and then the holder of the lock released it within a very narrow window. </para></listitem> <listitem><para>Fix problem with untyped parameter appearing in -<command>INSERT ... SELECT</></para></listitem> -<listitem><para>Fix <command>CLUSTER</> failure after -<command>ALTER TABLE SET WITHOUT OIDS</></para></listitem> +<command>INSERT ... SELECT</command></para></listitem> +<listitem><para>Fix <command>CLUSTER</command> failure after +<command>ALTER TABLE SET WITHOUT OIDS</command></para></listitem> </itemizedlist> </sect2> @@ -2251,11 +2251,11 @@ holder of the lock released it within a very narrow window. <title>Changes</title> <itemizedlist> -<listitem><para>Disallow <command>LOAD</> to non-superusers</para> +<listitem><para>Disallow <command>LOAD</command> to non-superusers</para> <para> On platforms that will automatically execute initialization functions of a shared library (this includes at least Windows and ELF-based Unixen), -<command>LOAD</> can be used to make the server execute arbitrary code. +<command>LOAD</command> can be used to make the server execute arbitrary code. Thanks to NGS Software for reporting this.</para></listitem> <listitem><para>Check that creator of an aggregate function has the right to execute the specified transition functions</para> @@ -2314,7 +2314,7 @@ GMT</para></listitem> <listitem><para>Repair possible failure to update hint bits on disk</para> <para> Under rare circumstances this oversight could lead to -<quote>could not access transaction status</> failures, which qualifies +<quote>could not access transaction status</quote> failures, which qualifies it as a potential-data-loss bug. </para></listitem> <listitem><para>Ensure that hashed outer join does not miss tuples</para> @@ -2322,11 +2322,11 @@ it as a potential-data-loss bug. Very large left joins using a hash join plan could fail to output unmatched left-side rows given just the right data distribution. </para></listitem> -<listitem><para>Disallow running <application>pg_ctl</> as root</para> +<listitem><para>Disallow running <application>pg_ctl</application> as root</para> <para> This is to guard against any possible security issues. </para></listitem> -<listitem><para>Avoid using temp files in <filename>/tmp</> in <command>make_oidjoins_check</command></para> +<listitem><para>Avoid using temp files in <filename>/tmp</filename> in <command>make_oidjoins_check</command></para> <para> This has been reported as a security issue, though it's hardly worthy of concern since there is no reason for non-developers to use this script anyway. @@ -2343,13 +2343,13 @@ This could lead to misbehavior in some of the system-statistics views. </para></listitem> <listitem><para>Fix small memory leak in postmaster</para></listitem> <listitem><para>Fix <quote>expected both swapped tables to have TOAST -tables</> bug</para> +tables</quote> bug</para> <para> This could arise in cases such as CLUSTER after ALTER TABLE DROP COLUMN. </para></listitem> -<listitem><para>Prevent <literal>pg_ctl restart</> from adding <literal>-D</> multiple times</para></listitem> +<listitem><para>Prevent <literal>pg_ctl restart</literal> from adding <literal>-D</literal> multiple times</para></listitem> <listitem><para>Fix problem with NULL values in GiST indexes</para></listitem> -<listitem><para><literal>::</> is no longer interpreted as a variable in an +<listitem><para><literal>::</literal> is no longer interpreted as a variable in an ECPG prepare statement</para></listitem> </itemizedlist> @@ -2435,8 +2435,8 @@ aggregate plan</para></listitem> <listitem><para>Fix hashed crosstab for zero-rows case (Joe)</para></listitem> <listitem><para>Force cache update after renaming a column in a foreign key</para></listitem> <listitem><para>Pretty-print UNION queries correctly</para></listitem> -<listitem><para>Make psql handle <literal>\r\n</> newlines properly in COPY IN</para></listitem> -<listitem><para><application>pg_dump</> handled ACLs with grant options incorrectly</para></listitem> +<listitem><para>Make psql handle <literal>\r\n</literal> newlines properly in COPY IN</para></listitem> +<listitem><para><application>pg_dump</application> handled ACLs with grant options incorrectly</para></listitem> <listitem><para>Fix thread support for macOS and Solaris</para></listitem> <listitem><para>Updated JDBC driver (build 215) with various fixes</para></listitem> <listitem><para>ECPG fixes</para></listitem> @@ -2492,7 +2492,7 @@ large tables, unsigned oids, stability, temp tables, and debug mode Select-list aliases within the sub-select will now take precedence over names from outer query levels. </para></listitem> -<listitem><para>Do not generate <quote>NATURAL CROSS JOIN</> when decompiling rules (Tom)</para></listitem> +<listitem><para>Do not generate <quote>NATURAL CROSS JOIN</quote> when decompiling rules (Tom)</para></listitem> <listitem><para>Add checks for invalid field length in binary COPY (Tom)</para> <para> This fixes a difficult-to-exploit security hole. @@ -2531,29 +2531,29 @@ names from outer query levels. </para> <para> - The more severe of the two errors is that data type <type>anyarray</> + The more severe of the two errors is that data type <type>anyarray</type> has the wrong alignment label; this is a problem because the - <structname>pg_statistic</> system catalog uses <type>anyarray</> + <structname>pg_statistic</structname> system catalog uses <type>anyarray</type> columns. The mislabeling can cause planner misestimations and even - crashes when planning queries that involve <literal>WHERE</> clauses on - double-aligned columns (such as <type>float8</> and <type>timestamp</>). + crashes when planning queries that involve <literal>WHERE</literal> clauses on + double-aligned columns (such as <type>float8</type> and <type>timestamp</type>). It is strongly recommended that all installations repair this error, either by initdb or by following the manual repair procedure given below. </para> <para> - The lesser error is that the system view <structname>pg_settings</> + The lesser error is that the system view <structname>pg_settings</structname> ought to be marked as having public update access, to allow - <literal>UPDATE pg_settings</> to be used as a substitute for - <command>SET</>. This can also be fixed either by initdb or manually, + <literal>UPDATE pg_settings</literal> to be used as a substitute for + <command>SET</command>. This can also be fixed either by initdb or manually, but it is not necessary to fix unless you want to use <literal>UPDATE - pg_settings</>. + pg_settings</literal>. </para> <para> If you wish not to do an initdb, the following procedure will work - for fixing <structname>pg_statistic</>. As the database superuser, + for fixing <structname>pg_statistic</structname>. As the database superuser, do: <programlisting> @@ -2573,28 +2573,28 @@ ANALYZE; This can be done in a live database, but beware that all backends running in the altered database must be restarted before it is safe to - repopulate <structname>pg_statistic</>. + repopulate <structname>pg_statistic</structname>. </para> <para> - To repair the <structname>pg_settings</> error, simply do: + To repair the <structname>pg_settings</structname> error, simply do: <programlisting> GRANT SELECT, UPDATE ON pg_settings TO PUBLIC; </programlisting> </para> <para> - The above procedures must be carried out in <emphasis>each</> database - of an installation, including <literal>template1</>, and ideally - including <literal>template0</> as well. If you do not fix the + The above procedures must be carried out in <emphasis>each</emphasis> database + of an installation, including <literal>template1</literal>, and ideally + including <literal>template0</literal> as well. If you do not fix the template databases then any subsequently created databases will contain - the same errors. <literal>template1</> can be fixed in the same way - as any other database, but fixing <literal>template0</> requires + the same errors. <literal>template1</literal> can be fixed in the same way + as any other database, but fixing <literal>template0</literal> requires additional steps. First, from any database issue: <programlisting> UPDATE pg_database SET datallowconn = true WHERE datname = 'template0'; </programlisting> - Next connect to <literal>template0</> and perform the above repair + Next connect to <literal>template0</literal> and perform the above repair procedures. Finally, do: <programlisting> -- re-freeze template0: @@ -2614,28 +2614,28 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; </para> <itemizedlist> -<listitem><para>Fix <structname>pg_statistic</> alignment bug that could crash optimizer</para> +<listitem><para>Fix <structname>pg_statistic</structname> alignment bug that could crash optimizer</para> <para>See above for details about this problem.</para></listitem> -<listitem><para>Allow non-super users to update <structname>pg_settings</></para></listitem> +<listitem><para>Allow non-super users to update <structname>pg_settings</structname></para></listitem> <listitem><para>Fix several optimizer bugs, most of which led to -<quote>variable not found in subplan target lists</> errors</para></listitem> +<quote>variable not found in subplan target lists</quote> errors</para></listitem> <listitem><para>Avoid out-of-memory failure during startup of large multiple index scan</para></listitem> <listitem><para>Fix multibyte problem that could lead to <quote>out of -memory</> error during <command>COPY IN</></para></listitem> -<listitem><para>Fix problems with <command>SELECT INTO</> / <command>CREATE -TABLE AS</> from tables without OIDs</para></listitem> -<listitem><para>Fix problems with <filename>alter_table</> regression test +memory</quote> error during <command>COPY IN</command></para></listitem> +<listitem><para>Fix problems with <command>SELECT INTO</command> / <command>CREATE +TABLE AS</command> from tables without OIDs</para></listitem> +<listitem><para>Fix problems with <filename>alter_table</filename> regression test during parallel testing</para></listitem> <listitem><para>Fix problems with hitting open file limit, especially on macOS (Tom)</para></listitem> <listitem><para>Partial fix for Turkish-locale issues</para> <para>initdb will succeed now in Turkish locale, but there are still some -inconveniences associated with the <literal>i/I</> problem.</para></listitem> +inconveniences associated with the <literal>i/I</literal> problem.</para></listitem> <listitem><para>Make pg_dump set client encoding on restore</para></listitem> <listitem><para>Other minor pg_dump fixes</para></listitem> <listitem><para>Allow ecpg to again use C keywords as column names (Michael)</para></listitem> -<listitem><para>Added ecpg <literal>WHENEVER NOT_FOUND</> to -<literal>SELECT/INSERT/UPDATE/DELETE</> (Michael)</para></listitem> +<listitem><para>Added ecpg <literal>WHENEVER NOT_FOUND</literal> to +<literal>SELECT/INSERT/UPDATE/DELETE</literal> (Michael)</para></listitem> <listitem><para>Fix ecpg crash for queries calling set-returning functions (Michael)</para></listitem> <listitem><para>Various other ecpg fixes (Michael)</para></listitem> <listitem><para>Fixes for Borland compiler</para></listitem> @@ -2810,7 +2810,7 @@ DROP SCHEMA information_schema CASCADE; without sorting, by accumulating results into a hash table with one entry per group. It will still use the sort technique, however, if the hash table is estimated to be too - large to fit in <varname>sort_mem</>. + large to fit in <varname>sort_mem</varname>. </para> </listitem> </varlistentry> @@ -3125,16 +3125,16 @@ DROP SCHEMA information_schema CASCADE; <listitem> <para> Trailing spaces are now trimmed when converting from type - <type>char(<replaceable>n</>)</type> to - <type>varchar(<replaceable>n</>)</type> or <type>text</type>. + <type>char(<replaceable>n</replaceable>)</type> to + <type>varchar(<replaceable>n</replaceable>)</type> or <type>text</type>. This is what most people always expected to happen anyway. </para> </listitem> <listitem> <para> - The data type <type>float(<replaceable>p</>)</type> now - measures <replaceable>p</> in binary digits, not decimal + The data type <type>float(<replaceable>p</replaceable>)</type> now + measures <replaceable>p</replaceable> in binary digits, not decimal digits. The new behavior follows the SQL standard. </para> </listitem> @@ -3143,11 +3143,11 @@ DROP SCHEMA information_schema CASCADE; <para> Ambiguous date values now must match the ordering specified by the <varname>datestyle</varname> setting. In prior releases, a - date specification of <literal>10/20/03</> was interpreted as a - date in October even if <varname>datestyle</> specified that + date specification of <literal>10/20/03</literal> was interpreted as a + date in October even if <varname>datestyle</varname> specified that the day should be first. 7.4 will throw an error if a date specification is invalid for the current setting of - <varname>datestyle</>. + <varname>datestyle</varname>. </para> </listitem> @@ -3167,28 +3167,28 @@ DROP SCHEMA information_schema CASCADE; no longer work as expected in column default expressions; they now cause the time of the table creation to be the default, not the time of the insertion. Functions such as - <function>now()</>, <function>current_timestamp</>, or + <function>now()</function>, <function>current_timestamp</function>, or <function>current_date</function> should be used instead. </para> <para> In previous releases, there was special code so that strings such as <literal>'now'</literal> were interpreted at - <command>INSERT</> time and not at table creation time, but + <command>INSERT</command> time and not at table creation time, but this work around didn't cover all cases. Release 7.4 now requires that defaults be defined properly using functions such - as <function>now()</> or <function>current_timestamp</>. These + as <function>now()</function> or <function>current_timestamp</function>. These will work in all situations. </para> </listitem> <listitem> <para> - The dollar sign (<literal>$</>) is no longer allowed in + The dollar sign (<literal>$</literal>) is no longer allowed in operator names. It can instead be a non-first character in identifiers. This was done to improve compatibility with other database systems, and to avoid syntax problems when parameter - placeholders (<literal>$<replaceable>n</></>) are written + placeholders (<literal>$<replaceable>n</replaceable></literal>) are written adjacent to operators. </para> </listitem> @@ -3333,14 +3333,14 @@ DROP SCHEMA information_schema CASCADE; <listitem> <para> - Allow <literal>IN</>/<literal>NOT IN</> to be handled via hash + Allow <literal>IN</literal>/<literal>NOT IN</literal> to be handled via hash tables (Tom) </para> </listitem> <listitem> <para> - Improve <literal>NOT IN (<replaceable>subquery</>)</literal> + Improve <literal>NOT IN (<replaceable>subquery</replaceable>)</literal> performance (Tom) </para> </listitem> @@ -3490,19 +3490,19 @@ DROP SCHEMA information_schema CASCADE; <itemizedlist> <listitem> - <para>Rename server parameter <varname>server_min_messages</> to <varname>log_min_messages</> (Bruce)</para> + <para>Rename server parameter <varname>server_min_messages</varname> to <varname>log_min_messages</varname> (Bruce)</para> <para> This was done so most parameters that control the server logs - begin with <literal>log_</>. + begin with <literal>log_</literal>. </para> </listitem> - <listitem><para>Rename <varname>show_*_stats</> to <varname>log_*_stats</> (Bruce)</para></listitem> - <listitem><para>Rename <varname>show_source_port</> to <varname>log_source_port</> (Bruce)</para></listitem> - <listitem><para>Rename <varname>hostname_lookup</> to <varname>log_hostname</> (Bruce)</para></listitem> + <listitem><para>Rename <varname>show_*_stats</varname> to <varname>log_*_stats</varname> (Bruce)</para></listitem> + <listitem><para>Rename <varname>show_source_port</varname> to <varname>log_source_port</varname> (Bruce)</para></listitem> + <listitem><para>Rename <varname>hostname_lookup</varname> to <varname>log_hostname</varname> (Bruce)</para></listitem> <listitem> - <para>Add <varname>checkpoint_warning</> to warn of excessive checkpointing (Bruce)</para> + <para>Add <varname>checkpoint_warning</varname> to warn of excessive checkpointing (Bruce)</para> <para> In prior releases, it was difficult to determine if checkpoint was happening too frequently. This feature adds a warning to the @@ -3514,8 +3514,8 @@ DROP SCHEMA information_schema CASCADE; <listitem> <para> - Change debug server log messages to output as <literal>DEBUG</> - rather than <literal>LOG</> (Bruce) + Change debug server log messages to output as <literal>DEBUG</literal> + rather than <literal>LOG</literal> (Bruce) </para> </listitem> @@ -3529,8 +3529,8 @@ DROP SCHEMA information_schema CASCADE; <listitem> <para> - <varname>log_min_messages</>/<varname>client_min_messages</> now - controls <varname>debug_*</> output (Bruce) + <varname>log_min_messages</varname>/<varname>client_min_messages</varname> now + controls <varname>debug_*</varname> output (Bruce) </para> <para> This centralizes client debug information so all debug output @@ -3589,15 +3589,15 @@ DROP SCHEMA information_schema CASCADE; <listitem> <para> Add new columns in <literal>pg_settings</literal>: - <literal>context</>, <literal>type</>, <literal>source</>, - <literal>min_val</>, <literal>max_val</> (Joe) + <literal>context</literal>, <literal>type</literal>, <literal>source</literal>, + <literal>min_val</literal>, <literal>max_val</literal> (Joe) </para> </listitem> <listitem> <para> - Make default <varname>shared_buffers</> 1000 and - <varname>max_connections</> 100, if possible (Tom) + Make default <varname>shared_buffers</varname> 1000 and + <varname>max_connections</varname> 100, if possible (Tom) </para> <para> Prior versions defaulted to 64 shared buffers so <productname>PostgreSQL</productname> @@ -3612,7 +3612,7 @@ DROP SCHEMA information_schema CASCADE; <listitem> <para> New <filename>pg_hba.conf</filename> record type - <literal>hostnossl</> to prevent SSL connections (Jon + <literal>hostnossl</literal> to prevent SSL connections (Jon Jensen) </para> <para> @@ -3675,7 +3675,7 @@ DROP SCHEMA information_schema CASCADE; <para>Add option to prevent auto-addition of tables referenced in query (Nigel J. Andrews)</para> <para> By default, tables mentioned in the query are automatically - added to the <literal>FROM</> clause if they are not already + added to the <literal>FROM</literal> clause if they are not already there. This is compatible with historic <productname>POSTGRES</productname> behavior but is contrary to the SQL standard. This option allows selecting @@ -3692,9 +3692,9 @@ DROP SCHEMA information_schema CASCADE; </listitem> <listitem> - <para>Allow expressions to be used in <literal>LIMIT</>/<literal>OFFSET</> (Tom)</para> + <para>Allow expressions to be used in <literal>LIMIT</literal>/<literal>OFFSET</literal> (Tom)</para> <para> - In prior releases, <literal>LIMIT</>/<literal>OFFSET</> could + In prior releases, <literal>LIMIT</literal>/<literal>OFFSET</literal> could only use constants, not expressions. </para> </listitem> @@ -3780,7 +3780,7 @@ DROP SCHEMA information_schema CASCADE; <listitem><para>Improve automatic type casting for domains (Rod, Tom)</para></listitem> <listitem><para>Allow dollar signs in identifiers, except as first character (Tom)</para></listitem> - <listitem><para>Disallow dollar signs in operator names, so <literal>x=$1</> works (Tom)</para></listitem> + <listitem><para>Disallow dollar signs in operator names, so <literal>x=$1</literal> works (Tom)</para></listitem> <listitem> <para> @@ -3863,9 +3863,9 @@ DROP SCHEMA information_schema CASCADE; <listitem> <para> - Implement SQL-compatible options <literal>FIRST</>, - <literal>LAST</>, <literal>ABSOLUTE <replaceable>n</></>, - <literal>RELATIVE <replaceable>n</></> for + Implement SQL-compatible options <literal>FIRST</literal>, + <literal>LAST</literal>, <literal>ABSOLUTE <replaceable>n</replaceable></literal>, + <literal>RELATIVE <replaceable>n</replaceable></literal> for <command>FETCH</command> and <command>MOVE</command> (Tom) </para> </listitem> @@ -3888,18 +3888,18 @@ DROP SCHEMA information_schema CASCADE; <listitem><para>Prevent <command>CLUSTER</command> on partial indexes (Tom)</para></listitem> - <listitem><para>Allow DOS and Mac line-endings in <command>COPY</> files (Bruce)</para></listitem> + <listitem><para>Allow DOS and Mac line-endings in <command>COPY</command> files (Bruce)</para></listitem> <listitem> <para> Disallow literal carriage return as a data value, - backslash-carriage-return and <literal>\r</> are still allowed + backslash-carriage-return and <literal>\r</literal> are still allowed (Bruce) </para> </listitem> <listitem> - <para><command>COPY</> changes (binary, <literal>\.</>) (Tom)</para> + <para><command>COPY</command> changes (binary, <literal>\.</literal>) (Tom)</para> </listitem> <listitem> @@ -3965,7 +3965,7 @@ DROP SCHEMA information_schema CASCADE; <listitem> <para> - Improve reliability of <command>LISTEN</>/<command>NOTIFY</> (Tom) + Improve reliability of <command>LISTEN</command>/<command>NOTIFY</command> (Tom) </para> </listitem> @@ -3976,8 +3976,8 @@ DROP SCHEMA information_schema CASCADE; requirement of a standalone session, which was necessary in previous releases. The only tables that now require a standalone session for reindexing are the global system tables - <literal>pg_database</>, <literal>pg_shadow</>, and - <literal>pg_group</>. + <literal>pg_database</literal>, <literal>pg_shadow</literal>, and + <literal>pg_group</literal>. </para> </listitem> </itemizedlist> @@ -4003,14 +4003,14 @@ DROP SCHEMA information_schema CASCADE; <listitem> <para> - Remove rarely used functions <function>oidrand</>, - <function>oidsrand</>, and <function>userfntest</> functions + Remove rarely used functions <function>oidrand</function>, + <function>oidsrand</function>, and <function>userfntest</function> functions (Neil) </para> </listitem> <listitem> - <para>Add <function>md5()</> function to main server, already in <filename>contrib/pgcrypto</filename> (Joe)</para> + <para>Add <function>md5()</function> function to main server, already in <filename>contrib/pgcrypto</filename> (Joe)</para> <para> An MD5 function was frequently requested. For more complex encryption capabilities, use @@ -4067,8 +4067,8 @@ DROP SCHEMA information_schema CASCADE; <listitem> <para> Allow <literal>WHERE</literal> qualification - <literal><replaceable>expr</> <replaceable>op</> ANY/SOME/ALL - (<replaceable>array_expr</>)</literal> (Joe) + <literal><replaceable>expr</replaceable> <replaceable>op</replaceable> ANY/SOME/ALL + (<replaceable>array_expr</replaceable>)</literal> (Joe) </para> <para> This allows arrays to behave like a list of values, for purposes @@ -4079,10 +4079,10 @@ DROP SCHEMA information_schema CASCADE; <listitem> <para> - New array functions <function>array_append</>, - <function>array_cat</>, <function>array_lower</>, - <function>array_prepend</>, <function>array_to_string</>, - <function>array_upper</>, <function>string_to_array</> (Joe) + New array functions <function>array_append</function>, + <function>array_cat</function>, <function>array_lower</function>, + <function>array_prepend</function>, <function>array_to_string</function>, + <function>array_upper</function>, <function>string_to_array</function> (Joe) </para> </listitem> @@ -4107,14 +4107,14 @@ DROP SCHEMA information_schema CASCADE; <listitem> <para> Trim trailing spaces when <type>char</type> is cast to - <type>varchar</> or <type>text</> (Tom) + <type>varchar</type> or <type>text</type> (Tom) </para> </listitem> <listitem> <para> - Make <type>float(<replaceable>p</>)</> measure the precision - <replaceable>p</> in binary digits, not decimal digits + Make <type>float(<replaceable>p</replaceable>)</type> measure the precision + <replaceable>p</replaceable> in binary digits, not decimal digits (Tom) </para> </listitem> @@ -4164,9 +4164,9 @@ DROP SCHEMA information_schema CASCADE; <listitem> <para> - Add new <varname>datestyle</varname> values <literal>MDY</>, - <literal>DMY</>, and <literal>YMD</> to set input field order; - honor <literal>US</> and <literal>European</> for backward + Add new <varname>datestyle</varname> values <literal>MDY</literal>, + <literal>DMY</literal>, and <literal>YMD</literal> to set input field order; + honor <literal>US</literal> and <literal>European</literal> for backward compatibility (Tom) </para> </listitem> @@ -4182,10 +4182,10 @@ DROP SCHEMA information_schema CASCADE; </listitem> <listitem> - <para>Treat NaN as larger than any other value in <function>min()</>/<function>max()</> (Tom)</para> + <para>Treat NaN as larger than any other value in <function>min()</function>/<function>max()</function> (Tom)</para> <para> NaN was already sorted after ordinary numeric values for most - purposes, but <function>min()</> and <function>max()</> didn't + purposes, but <function>min()</function> and <function>max()</function> didn't get this right. </para> </listitem> @@ -4203,7 +4203,7 @@ DROP SCHEMA information_schema CASCADE; </listitem> <listitem> - <para>Allow time to be specified as <literal>040506</> or <literal>0405</> (Tom)</para> + <para>Allow time to be specified as <literal>040506</literal> or <literal>0405</literal> (Tom)</para> </listitem> <listitem> @@ -4275,7 +4275,7 @@ DROP SCHEMA information_schema CASCADE; <listitem> <para> - Add new parameter <literal>$0</> in PL/pgSQL representing the + Add new parameter <literal>$0</literal> in PL/pgSQL representing the function's actual return type (Joe) </para> </listitem> @@ -4310,12 +4310,12 @@ DROP SCHEMA information_schema CASCADE; </listitem> <listitem><para>Improve tab completion (Rod, Ross Reedstrom, Ian Barwick)</para></listitem> - <listitem><para>Reorder <literal>\?</> help into groupings (Harald Armin Massa, Bruce)</para></listitem> + <listitem><para>Reorder <literal>\?</literal> help into groupings (Harald Armin Massa, Bruce)</para></listitem> <listitem><para>Add backslash commands for listing schemas, casts, and conversions (Christopher)</para></listitem> <listitem> <para> - <command>\encoding</> now changes based on the server parameter + <command>\encoding</command> now changes based on the server parameter <varname>client_encoding</varname> (Tom) </para> <para> @@ -4328,7 +4328,7 @@ DROP SCHEMA information_schema CASCADE; <listitem> <para>Save editor buffer into readline history (Ross)</para> <para> - When <command>\e</> is used to edit a query, the result is saved + When <command>\e</command> is used to edit a query, the result is saved in the readline history for retrieval using the up arrow. </para> </listitem> @@ -4373,14 +4373,14 @@ DROP SCHEMA information_schema CASCADE; <listitem> <para> - Have pg_dumpall use <command>GRANT</>/<command>REVOKE</> to dump database-level privileges (Tom) + Have pg_dumpall use <command>GRANT</command>/<command>REVOKE</command> to dump database-level privileges (Tom) </para> </listitem> <listitem> <para> - Allow pg_dumpall to support the options <option>-a</>, - <option>-s</>, <option>-x</> of pg_dump (Tom) + Allow pg_dumpall to support the options <option>-a</option>, + <option>-s</option>, <option>-x</option> of pg_dump (Tom) </para> </listitem> @@ -4565,7 +4565,7 @@ DROP SCHEMA information_schema CASCADE; <listitem><para>Allow libpq to compile with Borland C++ compiler (Lester Godwin, Karl Waclawek)</para></listitem> <listitem><para>Use our own version of <function>getopt_long()</function> if needed (Peter)</para></listitem> <listitem><para>Convert administration scripts to C (Peter)</para></listitem> - <listitem><para> Bison >= 1.85 is now required to build the <productname>PostgreSQL</> grammar, if building from CVS</para></listitem> + <listitem><para> Bison >= 1.85 is now required to build the <productname>PostgreSQL</productname> grammar, if building from CVS</para></listitem> <listitem><para>Merge documentation into one book (Peter)</para></listitem> <listitem><para>Add Windows compatibility functions (Bruce)</para></listitem> <listitem><para>Allow client interfaces to compile under MinGW (Bruce)</para></listitem> @@ -4605,16 +4605,16 @@ DROP SCHEMA information_schema CASCADE; <listitem><para>Update btree_gist (Oleg)</para></listitem> <listitem><para>New tsearch2 full-text search module (Oleg, Teodor)</para></listitem> <listitem><para>Add hash-based crosstab function to tablefuncs (Joe)</para></listitem> - <listitem><para>Add serial column to order <function>connectby()</> siblings in tablefuncs (Nabil Sayegh,Joe)</para></listitem> + <listitem><para>Add serial column to order <function>connectby()</function> siblings in tablefuncs (Nabil Sayegh,Joe)</para></listitem> <listitem><para>Add named persistent connections to dblink (Shridhar Daithanka)</para></listitem> <listitem><para>New pg_autovacuum allows automatic <command>VACUUM</command> (Matthew T. O'Connor)</para></listitem> - <listitem><para>Make pgbench honor environment variables <envar>PGHOST</>, <envar>PGPORT</>, <envar>PGUSER</> (Tatsuo)</para></listitem> + <listitem><para>Make pgbench honor environment variables <envar>PGHOST</envar>, <envar>PGPORT</envar>, <envar>PGUSER</envar> (Tatsuo)</para></listitem> <listitem><para>Improve intarray (Teodor Sigaev)</para></listitem> <listitem><para>Improve pgstattuple (Rod)</para></listitem> <listitem><para>Fix bug in <function>metaphone()</function> in fuzzystrmatch</para></listitem> <listitem><para>Improve adddepend (Rod)</para></listitem> <listitem><para>Update spi/timetravel (Böjthe Zoltán)</para></listitem> - <listitem><para>Fix dbase <option>-s</> option and improve non-ASCII handling (Thomas Behr, Márcio Smiderle)</para></listitem> + <listitem><para>Fix dbase <option>-s</option> option and improve non-ASCII handling (Thomas Behr, Márcio Smiderle)</para></listitem> <listitem><para>Remove array module because features now included by default (Joe)</para></listitem> </itemizedlist> </sect3> diff --git a/doc/src/sgml/release-8.0.sgml b/doc/src/sgml/release-8.0.sgml index 0f43e24b1dd..46ca87e93aa 100644 --- a/doc/src/sgml/release-8.0.sgml +++ b/doc/src/sgml/release-8.0.sgml @@ -16,7 +16,7 @@ </para> <para> - This is expected to be the last <productname>PostgreSQL</> release + This is expected to be the last <productname>PostgreSQL</productname> release in the 8.0.X series. Users are encouraged to update to a newer release branch soon. </para> @@ -47,7 +47,7 @@ This change prevents security problems that can be caused by subverting Perl or Tcl code that will be executed later in the same session under another SQL user identity (for example, within a <literal>SECURITY - DEFINER</> function). Most scripting languages offer numerous ways that + DEFINER</literal> function). Most scripting languages offer numerous ways that that might be done, such as redefining standard functions or operators called by the target function. Without this change, any SQL user with Perl or Tcl language usage rights can do essentially anything with the @@ -76,7 +76,7 @@ <listitem> <para> - Prevent possible crashes in <function>pg_get_expr()</> by disallowing + Prevent possible crashes in <function>pg_get_expr()</function> by disallowing it from being called with an argument that is not one of the system catalog columns it's intended to be used with (Heikki Linnakangas, Tom Lane) @@ -104,7 +104,7 @@ <listitem> <para> Take care to fsync the contents of lockfiles (both - <filename>postmaster.pid</> and the socket lockfile) while writing them + <filename>postmaster.pid</filename> and the socket lockfile) while writing them (Tom Lane) </para> @@ -130,7 +130,7 @@ <listitem> <para> - Fix <varname>log_line_prefix</>'s <literal>%i</> escape, + Fix <varname>log_line_prefix</varname>'s <literal>%i</literal> escape, which could produce junk early in backend startup (Tom Lane) </para> </listitem> @@ -138,28 +138,28 @@ <listitem> <para> Fix possible data corruption in <command>ALTER TABLE ... SET - TABLESPACE</> when archiving is enabled (Jeff Davis) + TABLESPACE</command> when archiving is enabled (Jeff Davis) </para> </listitem> <listitem> <para> - Allow <command>CREATE DATABASE</> and <command>ALTER DATABASE ... SET - TABLESPACE</> to be interrupted by query-cancel (Guillaume Lelarge) + Allow <command>CREATE DATABASE</command> and <command>ALTER DATABASE ... SET + TABLESPACE</command> to be interrupted by query-cancel (Guillaume Lelarge) </para> </listitem> <listitem> <para> In PL/Python, defend against null pointer results from - <function>PyCObject_AsVoidPtr</> and <function>PyCObject_FromVoidPtr</> + <function>PyCObject_AsVoidPtr</function> and <function>PyCObject_FromVoidPtr</function> (Peter Eisentraut) </para> </listitem> <listitem> <para> - Improve <filename>contrib/dblink</>'s handling of tables containing + Improve <filename>contrib/dblink</filename>'s handling of tables containing dropped columns (Tom Lane) </para> </listitem> @@ -167,13 +167,13 @@ <listitem> <para> Fix connection leak after <quote>duplicate connection name</quote> - errors in <filename>contrib/dblink</> (Itagaki Takahiro) + errors in <filename>contrib/dblink</filename> (Itagaki Takahiro) </para> </listitem> <listitem> <para> - Fix <filename>contrib/dblink</> to handle connection names longer than + Fix <filename>contrib/dblink</filename> to handle connection names longer than 62 bytes correctly (Itagaki Takahiro) </para> </listitem> @@ -187,7 +187,7 @@ <listitem> <para> - Update time zone data files to <application>tzdata</> release 2010l + Update time zone data files to <application>tzdata</application> release 2010l for DST law changes in Egypt and Palestine; also historical corrections for Finland. </para> @@ -220,7 +220,7 @@ </para> <para> - The <productname>PostgreSQL</> community will stop releasing updates + The <productname>PostgreSQL</productname> community will stop releasing updates for the 8.0.X release series in July 2010. Users are encouraged to update to a newer release branch soon. </para> @@ -243,19 +243,19 @@ <listitem> <para> - Enforce restrictions in <literal>plperl</> using an opmask applied to - the whole interpreter, instead of using <filename>Safe.pm</> + Enforce restrictions in <literal>plperl</literal> using an opmask applied to + the whole interpreter, instead of using <filename>Safe.pm</filename> (Tim Bunce, Andrew Dunstan) </para> <para> - Recent developments have convinced us that <filename>Safe.pm</> is too - insecure to rely on for making <literal>plperl</> trustable. This - change removes use of <filename>Safe.pm</> altogether, in favor of using + Recent developments have convinced us that <filename>Safe.pm</filename> is too + insecure to rely on for making <literal>plperl</literal> trustable. This + change removes use of <filename>Safe.pm</filename> altogether, in favor of using a separate interpreter with an opcode mask that is always applied. Pleasant side effects of the change include that it is now possible to - use Perl's <literal>strict</> pragma in a natural way in - <literal>plperl</>, and that Perl's <literal>$a</> and <literal>$b</> + use Perl's <literal>strict</literal> pragma in a natural way in + <literal>plperl</literal>, and that Perl's <literal>$a</literal> and <literal>$b</literal> variables work as expected in sort routines, and that function compilation is significantly faster. (CVE-2010-1169) </para> @@ -264,19 +264,19 @@ <listitem> <para> Prevent PL/Tcl from executing untrustworthy code from - <structname>pltcl_modules</> (Tom) + <structname>pltcl_modules</structname> (Tom) </para> <para> PL/Tcl's feature for autoloading Tcl code from a database table could be exploited for trojan-horse attacks, because there was no restriction on who could create or insert into that table. This change - disables the feature unless <structname>pltcl_modules</> is owned by a + disables the feature unless <structname>pltcl_modules</structname> is owned by a superuser. (However, the permissions on the table are not checked, so installations that really need a less-than-secure modules table can still grant suitable privileges to trusted non-superusers.) Also, - prevent loading code into the unrestricted <quote>normal</> Tcl - interpreter unless we are really going to execute a <literal>pltclu</> + prevent loading code into the unrestricted <quote>normal</quote> Tcl + interpreter unless we are really going to execute a <literal>pltclu</literal> function. (CVE-2010-1170) </para> </listitem> @@ -289,10 +289,10 @@ <para> Previously, if an unprivileged user ran <literal>ALTER USER ... RESET - ALL</> for himself, or <literal>ALTER DATABASE ... RESET ALL</> for + ALL</literal> for himself, or <literal>ALTER DATABASE ... RESET ALL</literal> for a database he owns, this would remove all special parameter settings for the user or database, even ones that are only supposed to be - changeable by a superuser. Now, the <command>ALTER</> will only + changeable by a superuser. Now, the <command>ALTER</command> will only remove the parameters that the user has permission to change. </para> </listitem> @@ -300,7 +300,7 @@ <listitem> <para> Avoid possible crash during backend shutdown if shutdown occurs - when a <literal>CONTEXT</> addition would be made to log entries (Tom) + when a <literal>CONTEXT</literal> addition would be made to log entries (Tom) </para> <para> @@ -312,7 +312,7 @@ <listitem> <para> - Update PL/Perl's <filename>ppport.h</> for modern Perl versions + Update PL/Perl's <filename>ppport.h</filename> for modern Perl versions (Andrew) </para> </listitem> @@ -325,14 +325,14 @@ <listitem> <para> - Prevent infinite recursion in <application>psql</> when expanding + Prevent infinite recursion in <application>psql</application> when expanding a variable that refers to itself (Tom) </para> </listitem> <listitem> <para> - Ensure that <filename>contrib/pgstattuple</> functions respond to cancel + Ensure that <filename>contrib/pgstattuple</filename> functions respond to cancel interrupts promptly (Tatsuhito Kasahara) </para> </listitem> @@ -340,7 +340,7 @@ <listitem> <para> Make server startup deal properly with the case that - <function>shmget()</> returns <literal>EINVAL</> for an existing + <function>shmget()</function> returns <literal>EINVAL</literal> for an existing shared memory segment (Tom) </para> @@ -353,7 +353,7 @@ <listitem> <para> - Update time zone data files to <application>tzdata</> release 2010j + Update time zone data files to <application>tzdata</application> release 2010j for DST law changes in Argentina, Australian Antarctic, Bangladesh, Mexico, Morocco, Pakistan, Palestine, Russia, Syria, Tunisia; also historical corrections for Taiwan. @@ -380,7 +380,7 @@ </para> <para> - The <productname>PostgreSQL</> community will stop releasing updates + The <productname>PostgreSQL</productname> community will stop releasing updates for the 8.0.X release series in July 2010. Users are encouraged to update to a newer release branch soon. </para> @@ -403,7 +403,7 @@ <listitem> <para> - Add new configuration parameter <varname>ssl_renegotiation_limit</> to + Add new configuration parameter <varname>ssl_renegotiation_limit</varname> to control how often we do session key renegotiation for an SSL connection (Magnus) </para> @@ -432,8 +432,8 @@ <listitem> <para> - Make <function>substring()</> for <type>bit</> types treat any negative - length as meaning <quote>all the rest of the string</> (Tom) + Make <function>substring()</function> for <type>bit</type> types treat any negative + length as meaning <quote>all the rest of the string</quote> (Tom) </para> <para> @@ -459,7 +459,7 @@ <listitem> <para> - Fix the <literal>STOP WAL LOCATION</> entry in backup history files to + Fix the <literal>STOP WAL LOCATION</literal> entry in backup history files to report the next WAL segment's name when the end location is exactly at a segment boundary (Itagaki Takahiro) </para> @@ -467,17 +467,17 @@ <listitem> <para> - When reading <filename>pg_hba.conf</> and related files, do not treat - <literal>@something</> as a file inclusion request if the <literal>@</> - appears inside quote marks; also, never treat <literal>@</> by itself + When reading <filename>pg_hba.conf</filename> and related files, do not treat + <literal>@something</literal> as a file inclusion request if the <literal>@</literal> + appears inside quote marks; also, never treat <literal>@</literal> by itself as a file inclusion request (Tom) </para> <para> This prevents erratic behavior if a role or database name starts with - <literal>@</>. If you need to include a file whose path name + <literal>@</literal>. If you need to include a file whose path name contains spaces, you can still do so, but you must write - <literal>@"/path to/file"</> rather than putting the quotes around + <literal>@"/path to/file"</literal> rather than putting the quotes around the whole construct. </para> </listitem> @@ -485,7 +485,7 @@ <listitem> <para> Prevent infinite loop on some platforms if a directory is named as - an inclusion target in <filename>pg_hba.conf</> and related files + an inclusion target in <filename>pg_hba.conf</filename> and related files (Tom) </para> </listitem> @@ -499,7 +499,7 @@ <listitem> <para> - Add <literal>volatile</> markings in PL/Python to avoid possible + Add <literal>volatile</literal> markings in PL/Python to avoid possible compiler-specific misbehavior (Zdenek Kotala) </para> </listitem> @@ -511,28 +511,28 @@ <para> The only known symptom of this oversight is that the Tcl - <literal>clock</> command misbehaves if using Tcl 8.5 or later. + <literal>clock</literal> command misbehaves if using Tcl 8.5 or later. </para> </listitem> <listitem> <para> - Prevent crash in <filename>contrib/dblink</> when too many key - columns are specified to a <function>dblink_build_sql_*</> function + Prevent crash in <filename>contrib/dblink</filename> when too many key + columns are specified to a <function>dblink_build_sql_*</function> function (Rushabh Lathia, Joe Conway) </para> </listitem> <listitem> <para> - Fix assorted crashes in <filename>contrib/xml2</> caused by sloppy + Fix assorted crashes in <filename>contrib/xml2</filename> caused by sloppy memory management (Tom) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2010e + Update time zone data files to <application>tzdata</application> release 2010e for DST law changes in Bangladesh, Chile, Fiji, Mexico, Paraguay, Samoa. </para> </listitem> @@ -604,14 +604,14 @@ <listitem> <para> - Prevent signals from interrupting <literal>VACUUM</> at unsafe times + Prevent signals from interrupting <literal>VACUUM</literal> at unsafe times (Alvaro) </para> <para> - This fix prevents a PANIC if a <literal>VACUUM FULL</> is canceled + This fix prevents a PANIC if a <literal>VACUUM FULL</literal> is canceled after it's already committed its tuple movements, as well as transient - errors if a plain <literal>VACUUM</> is interrupted after having + errors if a plain <literal>VACUUM</literal> is interrupted after having truncated the table. </para> </listitem> @@ -630,7 +630,7 @@ <listitem> <para> - Fix very rare crash in <type>inet</>/<type>cidr</> comparisons (Chris + Fix very rare crash in <type>inet</type>/<type>cidr</type> comparisons (Chris Mikkelson) </para> </listitem> @@ -649,7 +649,7 @@ <para> The previous code is known to fail with the combination of the Linux - <literal>pam_krb5</> PAM module with Microsoft Active Directory as the + <literal>pam_krb5</literal> PAM module with Microsoft Active Directory as the domain controller. It might have problems elsewhere too, since it was making unjustified assumptions about what arguments the PAM stack would pass to it. @@ -664,20 +664,20 @@ <listitem> <para> - Ensure <application>psql</>'s flex module is compiled with the correct + Ensure <application>psql</application>'s flex module is compiled with the correct system header definitions (Tom) </para> <para> This fixes build failures on platforms where - <literal>--enable-largefile</> causes incompatible changes in the + <literal>--enable-largefile</literal> causes incompatible changes in the generated code. </para> </listitem> <listitem> <para> - Make the postmaster ignore any <literal>application_name</> parameter in + Make the postmaster ignore any <literal>application_name</literal> parameter in connection request packets, to improve compatibility with future libpq versions (Tom) </para> @@ -685,7 +685,7 @@ <listitem> <para> - Update time zone data files to <application>tzdata</> release 2009s + Update time zone data files to <application>tzdata</application> release 2009s for DST law changes in Antarctica, Argentina, Bangladesh, Fiji, Novokuznetsk, Pakistan, Palestine, Samoa, Syria; also historical corrections for Hong Kong. @@ -716,8 +716,8 @@ <para> A dump/restore is not required for those running 8.0.X. - However, if you have any hash indexes on <type>interval</> columns, - you must <command>REINDEX</> them after updating to 8.0.22. + However, if you have any hash indexes on <type>interval</type> columns, + you must <command>REINDEX</command> them after updating to 8.0.22. Also, if you are upgrading from a version earlier than 8.0.6, see <xref linkend="release-8-0-6">. </para> @@ -731,14 +731,14 @@ <listitem> <para> - Disallow <command>RESET ROLE</> and <command>RESET SESSION - AUTHORIZATION</> inside security-definer functions (Tom, Heikki) + Disallow <command>RESET ROLE</command> and <command>RESET SESSION + AUTHORIZATION</command> inside security-definer functions (Tom, Heikki) </para> <para> This covers a case that was missed in the previous patch that - disallowed <command>SET ROLE</> and <command>SET SESSION - AUTHORIZATION</> inside security-definer functions. + disallowed <command>SET ROLE</command> and <command>SET SESSION + AUTHORIZATION</command> inside security-definer functions. (See CVE-2007-6600) </para> </listitem> @@ -752,32 +752,32 @@ <listitem> <para> - Fix hash calculation for data type <type>interval</> (Tom) + Fix hash calculation for data type <type>interval</type> (Tom) </para> <para> This corrects wrong results for hash joins on interval values. It also changes the contents of hash indexes on interval columns. - If you have any such indexes, you must <command>REINDEX</> them + If you have any such indexes, you must <command>REINDEX</command> them after updating. </para> </listitem> <listitem> <para> - Treat <function>to_char(..., 'TH')</> as an uppercase ordinal - suffix with <literal>'HH'</>/<literal>'HH12'</> (Heikki) + Treat <function>to_char(..., 'TH')</function> as an uppercase ordinal + suffix with <literal>'HH'</literal>/<literal>'HH12'</literal> (Heikki) </para> <para> - It was previously handled as <literal>'th'</> (lowercase). + It was previously handled as <literal>'th'</literal> (lowercase). </para> </listitem> <listitem> <para> - Fix overflow for <literal>INTERVAL '<replaceable>x</> ms'</literal> - when <replaceable>x</> is more than 2 million and integer + Fix overflow for <literal>INTERVAL '<replaceable>x</replaceable> ms'</literal> + when <replaceable>x</replaceable> is more than 2 million and integer datetimes are in use (Alex Hunsaker) </para> </listitem> @@ -794,7 +794,7 @@ <listitem> <para> - Fix <type>money</> data type to work in locales where currency + Fix <type>money</type> data type to work in locales where currency amounts have no fractional digits, e.g. Japan (Itagaki Takahiro) </para> </listitem> @@ -802,7 +802,7 @@ <listitem> <para> Properly round datetime input like - <literal>00:12:57.9999999999999999999999999999</> (Tom) + <literal>00:12:57.9999999999999999999999999999</literal> (Tom) </para> </listitem> @@ -821,22 +821,22 @@ <listitem> <para> - Fix <application>pg_ctl</> to not go into an infinite loop if - <filename>postgresql.conf</> is empty (Jeff Davis) + Fix <application>pg_ctl</application> to not go into an infinite loop if + <filename>postgresql.conf</filename> is empty (Jeff Davis) </para> </listitem> <listitem> <para> - Fix <filename>contrib/xml2</>'s <function>xslt_process()</> to + Fix <filename>contrib/xml2</filename>'s <function>xslt_process()</function> to properly handle the maximum number of parameters (twenty) (Tom) </para> </listitem> <listitem> <para> - Improve robustness of <application>libpq</>'s code to recover - from errors during <command>COPY FROM STDIN</> (Tom) + Improve robustness of <application>libpq</application>'s code to recover + from errors during <command>COPY FROM STDIN</command> (Tom) </para> </listitem> @@ -849,7 +849,7 @@ <listitem> <para> - Update time zone data files to <application>tzdata</> release 2009l + Update time zone data files to <application>tzdata</application> release 2009l for DST law changes in Bangladesh, Egypt, Jordan, Pakistan, Argentina/San_Luis, Cuba, Jordan (historical correction only), Mauritius, Morocco, Palestine, Syria, Tunisia. @@ -900,7 +900,7 @@ This change extends fixes made in the last two minor releases for related failure scenarios. The previous fixes were narrowly tailored for the original problem reports, but we have now recognized that - <emphasis>any</> error thrown by an encoding conversion function could + <emphasis>any</emphasis> error thrown by an encoding conversion function could potentially lead to infinite recursion while trying to report the error. The solution therefore is to disable translation and encoding conversion and report the plain-ASCII form of any error message, @@ -911,7 +911,7 @@ <listitem> <para> - Disallow <command>CREATE CONVERSION</> with the wrong encodings + Disallow <command>CREATE CONVERSION</command> with the wrong encodings for the specified conversion function (Heikki) </para> @@ -924,14 +924,14 @@ <listitem> <para> - Fix core dump when <function>to_char()</> is given format codes that + Fix core dump when <function>to_char()</function> is given format codes that are inappropriate for the type of the data argument (Tom) </para> </listitem> <listitem> <para> - Add <literal>MUST</> (Mauritius Island Summer Time) to the default list + Add <literal>MUST</literal> (Mauritius Island Summer Time) to the default list of known timezone abbreviations (Xavier Bugaud) </para> </listitem> @@ -973,13 +973,13 @@ <listitem> <para> - Improve handling of URLs in <function>headline()</> function (Teodor) + Improve handling of URLs in <function>headline()</function> function (Teodor) </para> </listitem> <listitem> <para> - Improve handling of overlength headlines in <function>headline()</> + Improve handling of overlength headlines in <function>headline()</function> function (Teodor) </para> </listitem> @@ -994,30 +994,30 @@ <listitem> <para> - Avoid unnecessary locking of small tables in <command>VACUUM</> + Avoid unnecessary locking of small tables in <command>VACUUM</command> (Heikki) </para> </listitem> <listitem> <para> - Fix uninitialized variables in <filename>contrib/tsearch2</>'s - <function>get_covers()</> function (Teodor) + Fix uninitialized variables in <filename>contrib/tsearch2</filename>'s + <function>get_covers()</function> function (Teodor) </para> </listitem> <listitem> <para> - Make all documentation reference <literal>pgsql-bugs</> and/or - <literal>pgsql-hackers</> as appropriate, instead of the - now-decommissioned <literal>pgsql-ports</> and <literal>pgsql-patches</> + Make all documentation reference <literal>pgsql-bugs</literal> and/or + <literal>pgsql-hackers</literal> as appropriate, instead of the + now-decommissioned <literal>pgsql-ports</literal> and <literal>pgsql-patches</literal> mailing lists (Tom) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2009a (for + Update time zone data files to <application>tzdata</application> release 2009a (for Kathmandu and historical DST corrections in Switzerland, Cuba) </para> </listitem> @@ -1065,7 +1065,7 @@ <para> We have addressed similar issues before, but it would still fail if - the <quote>character has no equivalent</> message itself couldn't + the <quote>character has no equivalent</quote> message itself couldn't be converted. The fix is to disable localization and send the plain ASCII error message when we detect such a situation. </para> @@ -1095,14 +1095,14 @@ <listitem> <para> Fix improper display of fractional seconds in interval values when - using a non-ISO datestyle in an <option>--enable-integer-datetimes</> + using a non-ISO datestyle in an <option>--enable-integer-datetimes</option> build (Ron Mayer) </para> </listitem> <listitem> <para> - Ensure <function>SPI_getvalue</> and <function>SPI_getbinval</> + Ensure <function>SPI_getvalue</function> and <function>SPI_getbinval</function> behave correctly when the passed tuple and tuple descriptor have different numbers of columns (Tom) </para> @@ -1116,19 +1116,19 @@ <listitem> <para> - Fix <application>ecpg</>'s parsing of <command>CREATE USER</> (Michael) + Fix <application>ecpg</application>'s parsing of <command>CREATE USER</command> (Michael) </para> </listitem> <listitem> <para> - Fix recent breakage of <literal>pg_ctl restart</> (Tom) + Fix recent breakage of <literal>pg_ctl restart</literal> (Tom) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2008i (for + Update time zone data files to <application>tzdata</application> release 2008i (for DST law changes in Argentina, Brazil, Mauritius, Syria) </para> </listitem> @@ -1176,19 +1176,19 @@ <para> This responds to reports that the counters could overflow in sufficiently long transactions, leading to unexpected <quote>lock is - already held</> errors. + already held</quote> errors. </para> </listitem> <listitem> <para> Add checks in executor startup to ensure that the tuples produced by an - <command>INSERT</> or <command>UPDATE</> will match the target table's + <command>INSERT</command> or <command>UPDATE</command> will match the target table's current rowtype (Tom) </para> <para> - <command>ALTER COLUMN TYPE</>, followed by re-use of a previously + <command>ALTER COLUMN TYPE</command>, followed by re-use of a previously cached plan, could produce this type of situation. The check protects against data corruption and/or crashes that could ensue. </para> @@ -1210,21 +1210,21 @@ <listitem> <para> Fix bug in backwards scanning of a cursor on a <literal>SELECT DISTINCT - ON</> query (Tom) + ON</literal> query (Tom) </para> </listitem> <listitem> <para> - Fix planner to estimate that <literal>GROUP BY</> expressions yielding + Fix planner to estimate that <literal>GROUP BY</literal> expressions yielding boolean results always result in two groups, regardless of the expressions' contents (Tom) </para> <para> This is very substantially more accurate than the regular <literal>GROUP - BY</> estimate for certain boolean tests like <replaceable>col</> - <literal>IS NULL</>. + BY</literal> estimate for certain boolean tests like <replaceable>col</replaceable> + <literal>IS NULL</literal>. </para> </listitem> @@ -1247,21 +1247,21 @@ <listitem> <para> - Improve <application>pg_dump</> and <application>pg_restore</>'s + Improve <application>pg_dump</application> and <application>pg_restore</application>'s error reporting after failure to send a SQL command (Tom) </para> </listitem> <listitem> <para> - Fix <application>pg_ctl</> to properly preserve postmaster - command-line arguments across a <literal>restart</> (Bruce) + Fix <application>pg_ctl</application> to properly preserve postmaster + command-line arguments across a <literal>restart</literal> (Bruce) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2008f (for + Update time zone data files to <application>tzdata</application> release 2008f (for DST law changes in Argentina, Bahamas, Brazil, Mauritius, Morocco, Pakistan, Palestine, and Paraguay) </para> @@ -1304,18 +1304,18 @@ <listitem> <para> - Make <function>pg_get_ruledef()</> parenthesize negative constants (Tom) + Make <function>pg_get_ruledef()</function> parenthesize negative constants (Tom) </para> <para> Before this fix, a negative constant in a view or rule might be dumped - as, say, <literal>-42::integer</>, which is subtly incorrect: it should - be <literal>(-42)::integer</> due to operator precedence rules. + as, say, <literal>-42::integer</literal>, which is subtly incorrect: it should + be <literal>(-42)::integer</literal> due to operator precedence rules. Usually this would make little difference, but it could interact with another recent patch to cause - <productname>PostgreSQL</> to reject what had been a valid - <command>SELECT DISTINCT</> view query. Since this could result in - <application>pg_dump</> output failing to reload, it is being treated + <productname>PostgreSQL</productname> to reject what had been a valid + <command>SELECT DISTINCT</command> view query. Since this could result in + <application>pg_dump</application> output failing to reload, it is being treated as a high-priority fix. The only released versions in which dump output is actually incorrect are 8.3.1 and 8.2.7. </para> @@ -1358,7 +1358,7 @@ <listitem> <para> - Fix <command>ALTER TABLE ADD COLUMN ... PRIMARY KEY</> so that the new + Fix <command>ALTER TABLE ADD COLUMN ... PRIMARY KEY</command> so that the new column is correctly checked to see if it's been initialized to all non-nulls (Brendan Jurd) </para> @@ -1370,8 +1370,8 @@ <listitem> <para> - Fix possible <command>CREATE TABLE</> failure when inheriting the - <quote>same</> constraint from multiple parent relations that + Fix possible <command>CREATE TABLE</command> failure when inheriting the + <quote>same</quote> constraint from multiple parent relations that inherited that constraint from a common ancestor (Tom) </para> </listitem> @@ -1379,7 +1379,7 @@ <listitem> <para> Fix conversions between ISO-8859-5 and other encodings to handle - Cyrillic <quote>Yo</> characters (<literal>e</> and <literal>E</> with + Cyrillic <quote>Yo</quote> characters (<literal>e</literal> and <literal>E</literal> with two dots) (Sergey Burladyan) </para> </listitem> @@ -1394,7 +1394,7 @@ <para> This could lead to failures in which two apparently identical literal values were not seen as equal, resulting in the parser complaining - about unmatched <literal>ORDER BY</> and <literal>DISTINCT</> + about unmatched <literal>ORDER BY</literal> and <literal>DISTINCT</literal> expressions. </para> </listitem> @@ -1402,24 +1402,24 @@ <listitem> <para> Fix a corner case in regular-expression substring matching - (<literal>substring(<replaceable>string</> from - <replaceable>pattern</>)</literal>) (Tom) + (<literal>substring(<replaceable>string</replaceable> from + <replaceable>pattern</replaceable>)</literal>) (Tom) </para> <para> The problem occurs when there is a match to the pattern overall but the user has specified a parenthesized subexpression and that subexpression hasn't got a match. An example is - <literal>substring('foo' from 'foo(bar)?')</>. - This should return NULL, since <literal>(bar)</> isn't matched, but + <literal>substring('foo' from 'foo(bar)?')</literal>. + This should return NULL, since <literal>(bar)</literal> isn't matched, but it was mistakenly returning the whole-pattern match instead (ie, - <literal>foo</>). + <literal>foo</literal>). </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2008c (for + Update time zone data files to <application>tzdata</application> release 2008c (for DST law changes in Morocco, Iraq, Choibalsan, Pakistan, Syria, Cuba, Argentina/San_Luis, and Chile) </para> @@ -1427,34 +1427,34 @@ <listitem> <para> - Fix incorrect result from <application>ecpg</>'s - <function>PGTYPEStimestamp_sub()</> function (Michael) + Fix incorrect result from <application>ecpg</application>'s + <function>PGTYPEStimestamp_sub()</function> function (Michael) </para> </listitem> <listitem> <para> - Fix core dump in <filename>contrib/xml2</>'s - <function>xpath_table()</> function when the input query returns a + Fix core dump in <filename>contrib/xml2</filename>'s + <function>xpath_table()</function> function when the input query returns a NULL value (Tom) </para> </listitem> <listitem> <para> - Fix <filename>contrib/xml2</>'s makefile to not override - <literal>CFLAGS</> (Tom) + Fix <filename>contrib/xml2</filename>'s makefile to not override + <literal>CFLAGS</literal> (Tom) </para> </listitem> <listitem> <para> - Fix <literal>DatumGetBool</> macro to not fail with <application>gcc</> + Fix <literal>DatumGetBool</literal> macro to not fail with <application>gcc</application> 4.3 (Tom) </para> <para> - This problem affects <quote>old style</> (V0) C functions that + This problem affects <quote>old style</quote> (V0) C functions that return boolean. The fix is already in 8.3, but the need to back-patch it was not realized at the time. </para> @@ -1462,21 +1462,21 @@ <listitem> <para> - Fix longstanding <command>LISTEN</>/<command>NOTIFY</> + Fix longstanding <command>LISTEN</command>/<command>NOTIFY</command> race condition (Tom) </para> <para> In rare cases a session that had just executed a - <command>LISTEN</> might not get a notification, even though + <command>LISTEN</command> might not get a notification, even though one would be expected because the concurrent transaction executing - <command>NOTIFY</> was observed to commit later. + <command>NOTIFY</command> was observed to commit later. </para> <para> A side effect of the fix is that a transaction that has executed - a not-yet-committed <command>LISTEN</> command will not see any - row in <structname>pg_listener</> for the <command>LISTEN</>, + a not-yet-committed <command>LISTEN</command> command will not see any + row in <structname>pg_listener</structname> for the <command>LISTEN</command>, should it choose to look; formerly it would have. This behavior was never documented one way or the other, but it is possible that some applications depend on the old behavior. @@ -1502,19 +1502,19 @@ <listitem> <para> - Fix <quote>unrecognized node type</> error in some variants of - <command>ALTER OWNER</> (Tom) + Fix <quote>unrecognized node type</quote> error in some variants of + <command>ALTER OWNER</command> (Tom) </para> </listitem> <listitem> <para> - Fix <application>pg_ctl</> to correctly extract the postmaster's port + Fix <application>pg_ctl</application> to correctly extract the postmaster's port number from command-line options (Itagaki Takahiro, Tom) </para> <para> - Previously, <literal>pg_ctl start -w</> could try to contact the + Previously, <literal>pg_ctl start -w</literal> could try to contact the postmaster on the wrong port, leading to bogus reports of startup failure. </para> @@ -1522,20 +1522,20 @@ <listitem> <para> - Use <option>-fwrapv</> to defend against possible misoptimization - in recent <application>gcc</> versions (Tom) + Use <option>-fwrapv</option> to defend against possible misoptimization + in recent <application>gcc</application> versions (Tom) </para> <para> - This is known to be necessary when building <productname>PostgreSQL</> - with <application>gcc</> 4.3 or later. + This is known to be necessary when building <productname>PostgreSQL</productname> + with <application>gcc</application> 4.3 or later. </para> </listitem> <listitem> <para> - Fix display of constant expressions in <literal>ORDER BY</> - and <literal>GROUP BY</> (Tom) + Fix display of constant expressions in <literal>ORDER BY</literal> + and <literal>GROUP BY</literal> (Tom) </para> <para> @@ -1547,7 +1547,7 @@ <listitem> <para> - Fix <application>libpq</> to handle NOTICE messages correctly + Fix <application>libpq</application> to handle NOTICE messages correctly during COPY OUT (Tom) </para> @@ -1579,8 +1579,8 @@ </para> <para> - This is the last 8.0.X release for which the <productname>PostgreSQL</> - community will produce binary packages for <productname>Windows</>. + This is the last 8.0.X release for which the <productname>PostgreSQL</productname> + community will produce binary packages for <productname>Windows</productname>. Windows users are encouraged to move to 8.2.X or later, since there are Windows-specific fixes in 8.2.X that are impractical to back-port. 8.0.X will continue to @@ -1606,7 +1606,7 @@ <listitem> <para> Prevent functions in indexes from executing with the privileges of - the user running <command>VACUUM</>, <command>ANALYZE</>, etc (Tom) + the user running <command>VACUUM</command>, <command>ANALYZE</command>, etc (Tom) </para> <para> @@ -1617,18 +1617,18 @@ (Note that triggers, defaults, check constraints, etc. pose the same type of risk.) But functions in indexes pose extra danger because they will be executed by routine maintenance operations - such as <command>VACUUM FULL</>, which are commonly performed + such as <command>VACUUM FULL</command>, which are commonly performed automatically under a superuser account. For example, a nefarious user can execute code with superuser privileges by setting up a trojan-horse index definition and waiting for the next routine vacuum. The fix arranges for standard maintenance operations - (including <command>VACUUM</>, <command>ANALYZE</>, <command>REINDEX</>, - and <command>CLUSTER</>) to execute as the table owner rather than + (including <command>VACUUM</command>, <command>ANALYZE</command>, <command>REINDEX</command>, + and <command>CLUSTER</command>) to execute as the table owner rather than the calling user, using the same privilege-switching mechanism already - used for <literal>SECURITY DEFINER</> functions. To prevent bypassing + used for <literal>SECURITY DEFINER</literal> functions. To prevent bypassing this security measure, execution of <command>SET SESSION - AUTHORIZATION</> and <command>SET ROLE</> is now forbidden within a - <literal>SECURITY DEFINER</> context. (CVE-2007-6600) + AUTHORIZATION</command> and <command>SET ROLE</command> is now forbidden within a + <literal>SECURITY DEFINER</literal> context. (CVE-2007-6600) </para> </listitem> @@ -1648,20 +1648,20 @@ <listitem> <para> - Require non-superusers who use <filename>/contrib/dblink</> to use only + Require non-superusers who use <filename>/contrib/dblink</filename> to use only password authentication, as a security measure (Joe) </para> <para> The fix that appeared for this in 8.0.14 was incomplete, as it plugged - the hole for only some <filename>dblink</> functions. (CVE-2007-6601, + the hole for only some <filename>dblink</filename> functions. (CVE-2007-6601, CVE-2007-3278) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2007k + Update time zone data files to <application>tzdata</application> release 2007k (in particular, recent Argentina changes) (Tom) </para> </listitem> @@ -1669,14 +1669,14 @@ <listitem> <para> Fix planner failure in some cases of <literal>WHERE false AND var IN - (SELECT ...)</> (Tom) + (SELECT ...)</literal> (Tom) </para> </listitem> <listitem> <para> Preserve the tablespace of indexes that are - rebuilt by <command>ALTER TABLE ... ALTER COLUMN TYPE</> (Tom) + rebuilt by <command>ALTER TABLE ... ALTER COLUMN TYPE</command> (Tom) </para> </listitem> @@ -1695,27 +1695,27 @@ <listitem> <para> - Make <command>VACUUM</> not use all of <varname>maintenance_work_mem</> + Make <command>VACUUM</command> not use all of <varname>maintenance_work_mem</varname> when the table is too small for it to be useful (Alvaro) </para> </listitem> <listitem> <para> - Fix potential crash in <function>translate()</> when using a multibyte + Fix potential crash in <function>translate()</function> when using a multibyte database encoding (Tom) </para> </listitem> <listitem> <para> - Fix PL/Perl to cope when platform's Perl defines type <literal>bool</> - as <literal>int</> rather than <literal>char</> (Tom) + Fix PL/Perl to cope when platform's Perl defines type <literal>bool</literal> + as <literal>int</literal> rather than <literal>char</literal> (Tom) </para> <para> While this could theoretically happen anywhere, no standard build of - Perl did things this way ... until <productname>macOS</> 10.5. + Perl did things this way ... until <productname>macOS</productname> 10.5. </para> </listitem> @@ -1727,49 +1727,49 @@ <listitem> <para> - Fix <application>pg_dump</> to correctly handle inheritance child tables + Fix <application>pg_dump</application> to correctly handle inheritance child tables that have default expressions different from their parent's (Tom) </para> </listitem> <listitem> <para> - <application>ecpg</> parser fixes (Michael) + <application>ecpg</application> parser fixes (Michael) </para> </listitem> <listitem> <para> - Make <filename>contrib/tablefunc</>'s <function>crosstab()</> handle + Make <filename>contrib/tablefunc</filename>'s <function>crosstab()</function> handle NULL rowid as a category in its own right, rather than crashing (Joe) </para> </listitem> <listitem> <para> - Fix <type>tsvector</> and <type>tsquery</> output routines to + Fix <type>tsvector</type> and <type>tsquery</type> output routines to escape backslashes correctly (Teodor, Bruce) </para> </listitem> <listitem> <para> - Fix crash of <function>to_tsvector()</> on huge input strings (Teodor) + Fix crash of <function>to_tsvector()</function> on huge input strings (Teodor) </para> </listitem> <listitem> <para> - Require a specific version of <productname>Autoconf</> to be used - when re-generating the <command>configure</> script (Peter) + Require a specific version of <productname>Autoconf</productname> to be used + when re-generating the <command>configure</command> script (Peter) </para> <para> This affects developers and packagers only. The change was made to prevent accidental use of untested combinations of - <productname>Autoconf</> and <productname>PostgreSQL</> versions. + <productname>Autoconf</productname> and <productname>PostgreSQL</productname> versions. You can remove the version check if you really want to use a - different <productname>Autoconf</> version, but it's + different <productname>Autoconf</productname> version, but it's your responsibility whether the result works or not. </para> </listitem> @@ -1812,20 +1812,20 @@ <listitem> <para> Prevent index corruption when a transaction inserts rows and - then aborts close to the end of a concurrent <command>VACUUM</> + then aborts close to the end of a concurrent <command>VACUUM</command> on the same table (Tom) </para> </listitem> <listitem> <para> - Make <command>CREATE DOMAIN ... DEFAULT NULL</> work properly (Tom) + Make <command>CREATE DOMAIN ... DEFAULT NULL</command> work properly (Tom) </para> </listitem> <listitem> <para> - Fix excessive logging of <acronym>SSL</> error messages (Tom) + Fix excessive logging of <acronym>SSL</acronym> error messages (Tom) </para> </listitem> @@ -1838,7 +1838,7 @@ <listitem> <para> - Fix crash when <varname>log_min_error_statement</> logging runs out + Fix crash when <varname>log_min_error_statement</varname> logging runs out of memory (Tom) </para> </listitem> @@ -1851,7 +1851,7 @@ <listitem> <para> - Prevent <command>CLUSTER</> from failing + Prevent <command>CLUSTER</command> from failing due to attempting to process temporary tables of other sessions (Alvaro) </para> </listitem> @@ -1870,14 +1870,14 @@ <listitem> <para> - Suppress timezone name (<literal>%Z</>) in log timestamps on Windows + Suppress timezone name (<literal>%Z</literal>) in log timestamps on Windows because of possible encoding mismatches (Tom) </para> </listitem> <listitem> <para> - Require non-superusers who use <filename>/contrib/dblink</> to use only + Require non-superusers who use <filename>/contrib/dblink</filename> to use only password authentication, as a security measure (Joe) </para> </listitem> @@ -1921,28 +1921,28 @@ <listitem> <para> Support explicit placement of the temporary-table schema within - <varname>search_path</>, and disable searching it for functions + <varname>search_path</varname>, and disable searching it for functions and operators (Tom) </para> <para> This is needed to allow a security-definer function to set a - truly secure value of <varname>search_path</>. Without it, + truly secure value of <varname>search_path</varname>. Without it, an unprivileged SQL user can use temporary objects to execute code with the privileges of the security-definer function (CVE-2007-2138). - See <command>CREATE FUNCTION</> for more information. + See <command>CREATE FUNCTION</command> for more information. </para> </listitem> <listitem> <para> - <filename>/contrib/tsearch2</> crash fixes (Teodor) + <filename>/contrib/tsearch2</filename> crash fixes (Teodor) </para> </listitem> <listitem> <para> - Fix potential-data-corruption bug in how <command>VACUUM FULL</> handles - <command>UPDATE</> chains (Tom, Pavan Deolasee) + Fix potential-data-corruption bug in how <command>VACUUM FULL</command> handles + <command>UPDATE</command> chains (Tom, Pavan Deolasee) </para> </listitem> @@ -2061,7 +2061,7 @@ <listitem> <para> - Fix for rare Assert() crash triggered by <literal>UNION</> (Tom) + Fix for rare Assert() crash triggered by <literal>UNION</literal> (Tom) </para> </listitem> @@ -2109,7 +2109,7 @@ <listitem> <para> - Improve handling of <function>getaddrinfo()</> on AIX (Tom) + Improve handling of <function>getaddrinfo()</function> on AIX (Tom) </para> <para> @@ -2120,15 +2120,15 @@ <listitem> <para> - Fix <quote>failed to re-find parent key</> errors in - <command>VACUUM</> (Tom) + Fix <quote>failed to re-find parent key</quote> errors in + <command>VACUUM</command> (Tom) </para> </listitem> <listitem> <para> Fix race condition for truncation of a large relation across a - gigabyte boundary by <command>VACUUM</> (Tom) + gigabyte boundary by <command>VACUUM</command> (Tom) </para> </listitem> @@ -2146,7 +2146,7 @@ <listitem> <para> - Fix error when constructing an <literal>ARRAY[]</> made up of multiple + Fix error when constructing an <literal>ARRAY[]</literal> made up of multiple empty elements (Tom) </para> </listitem> @@ -2159,13 +2159,13 @@ <listitem> <para> - <function>to_number()</> and <function>to_char(numeric)</> - are now <literal>STABLE</>, not <literal>IMMUTABLE</>, for - new <application>initdb</> installs (Tom) + <function>to_number()</function> and <function>to_char(numeric)</function> + are now <literal>STABLE</literal>, not <literal>IMMUTABLE</literal>, for + new <application>initdb</application> installs (Tom) </para> <para> - This is because <varname>lc_numeric</> can potentially + This is because <varname>lc_numeric</varname> can potentially change the output of these functions. </para> </listitem> @@ -2176,7 +2176,7 @@ </para> <para> - This improves <application>psql</> <literal>\d</> performance also. + This improves <application>psql</application> <literal>\d</literal> performance also. </para> </listitem> @@ -2225,28 +2225,28 @@ <title>Changes</title> <itemizedlist> -<listitem><para>Fix crash when referencing <literal>NEW</> row +<listitem><para>Fix crash when referencing <literal>NEW</literal> row values in rule WHERE expressions (Tom)</para></listitem> <listitem><para>Fix core dump when an untyped literal is taken as ANYARRAY</para></listitem> <listitem><para>Fix mishandling of AFTER triggers when query contains a SQL function returning multiple rows (Tom)</para></listitem> -<listitem><para>Fix <command>ALTER TABLE ... TYPE</> to recheck -<literal>NOT NULL</> for <literal>USING</> clause (Tom)</para></listitem> -<listitem><para>Fix <function>string_to_array()</> to handle overlapping +<listitem><para>Fix <command>ALTER TABLE ... TYPE</command> to recheck +<literal>NOT NULL</literal> for <literal>USING</literal> clause (Tom)</para></listitem> +<listitem><para>Fix <function>string_to_array()</function> to handle overlapping matches for the separator string</para> -<para>For example, <literal>string_to_array('123xx456xxx789', 'xx')</>. +<para>For example, <literal>string_to_array('123xx456xxx789', 'xx')</literal>. </para></listitem> <listitem><para>Fix corner cases in pattern matching for - <application>psql</>'s <literal>\d</> commands</para></listitem> + <application>psql</application>'s <literal>\d</literal> commands</para></listitem> <listitem><para>Fix index-corrupting bugs in /contrib/ltree (Teodor)</para></listitem> -<listitem><para>Numerous robustness fixes in <application>ecpg</> (Joachim +<listitem><para>Numerous robustness fixes in <application>ecpg</application> (Joachim Wieland)</para></listitem> <listitem><para>Fix backslash escaping in /contrib/dbmirror</para></listitem> <listitem><para>Fix instability of statistics collection on Win32 (Tom, Andrew)</para></listitem> -<listitem><para>Fixes for <systemitem class="osname">AIX</> and -<productname>Intel</> compilers (Tom)</para></listitem> +<listitem><para>Fixes for <systemitem class="osname">AIX</systemitem> and +<productname>Intel</productname> compilers (Tom)</para></listitem> </itemizedlist> </sect2> @@ -2283,9 +2283,9 @@ Wieland)</para></listitem> into SQL commands, you should examine them as soon as possible to ensure that they are using recommended escaping techniques. In most cases, applications should be using subroutines provided by - libraries or drivers (such as <application>libpq</>'s - <function>PQescapeStringConn()</>) to perform string escaping, - rather than relying on <foreignphrase>ad hoc</> code to do it. + libraries or drivers (such as <application>libpq</application>'s + <function>PQescapeStringConn()</function>) to perform string escaping, + rather than relying on <foreignphrase>ad hoc</foreignphrase> code to do it. </para> </sect2> @@ -2295,48 +2295,48 @@ Wieland)</para></listitem> <itemizedlist> <listitem><para>Change the server to reject invalidly-encoded multibyte characters in all cases (Tatsuo, Tom)</para> -<para>While <productname>PostgreSQL</> has been moving in this direction for +<para>While <productname>PostgreSQL</productname> has been moving in this direction for some time, the checks are now applied uniformly to all encodings and all textual input, and are now always errors not merely warnings. This change defends against SQL-injection attacks of the type described in CVE-2006-2313. </para></listitem> -<listitem><para>Reject unsafe uses of <literal>\'</> in string literals</para> +<listitem><para>Reject unsafe uses of <literal>\'</literal> in string literals</para> <para>As a server-side defense against SQL-injection attacks of the type -described in CVE-2006-2314, the server now only accepts <literal>''</> and not -<literal>\'</> as a representation of ASCII single quote in SQL string -literals. By default, <literal>\'</> is rejected only when -<varname>client_encoding</> is set to a client-only encoding (SJIS, BIG5, GBK, +described in CVE-2006-2314, the server now only accepts <literal>''</literal> and not +<literal>\'</literal> as a representation of ASCII single quote in SQL string +literals. By default, <literal>\'</literal> is rejected only when +<varname>client_encoding</varname> is set to a client-only encoding (SJIS, BIG5, GBK, GB18030, or UHC), which is the scenario in which SQL injection is possible. -A new configuration parameter <varname>backslash_quote</> is available to +A new configuration parameter <varname>backslash_quote</varname> is available to adjust this behavior when needed. Note that full security against CVE-2006-2314 might require client-side changes; the purpose of -<varname>backslash_quote</> is in part to make it obvious that insecure +<varname>backslash_quote</varname> is in part to make it obvious that insecure clients are insecure. </para></listitem> -<listitem><para>Modify <application>libpq</>'s string-escaping routines to be +<listitem><para>Modify <application>libpq</application>'s string-escaping routines to be aware of encoding considerations and -<varname>standard_conforming_strings</></para> -<para>This fixes <application>libpq</>-using applications for the security +<varname>standard_conforming_strings</varname></para> +<para>This fixes <application>libpq</application>-using applications for the security issues described in CVE-2006-2313 and CVE-2006-2314, and also future-proofs them against the planned changeover to SQL-standard string literal syntax. -Applications that use multiple <productname>PostgreSQL</> connections -concurrently should migrate to <function>PQescapeStringConn()</> and -<function>PQescapeByteaConn()</> to ensure that escaping is done correctly +Applications that use multiple <productname>PostgreSQL</productname> connections +concurrently should migrate to <function>PQescapeStringConn()</function> and +<function>PQescapeByteaConn()</function> to ensure that escaping is done correctly for the settings in use in each database connection. Applications that -do string escaping <quote>by hand</> should be modified to rely on library +do string escaping <quote>by hand</quote> should be modified to rely on library routines instead. </para></listitem> <listitem><para>Fix some incorrect encoding conversion functions</para> -<para><function>win1251_to_iso</>, <function>alt_to_iso</>, -<function>euc_tw_to_big5</>, <function>euc_tw_to_mic</>, -<function>mic_to_euc_tw</> were all broken to varying +<para><function>win1251_to_iso</function>, <function>alt_to_iso</function>, +<function>euc_tw_to_big5</function>, <function>euc_tw_to_mic</function>, +<function>mic_to_euc_tw</function> were all broken to varying extents. </para></listitem> -<listitem><para>Clean up stray remaining uses of <literal>\'</> in strings +<listitem><para>Clean up stray remaining uses of <literal>\'</literal> in strings (Bruce, Jan)</para></listitem> <listitem><para>Fix bug that sometimes caused OR'd index scans to @@ -2345,10 +2345,10 @@ miss rows they should have returned</para></listitem> <listitem><para>Fix WAL replay for case where a btree index has been truncated</para></listitem> -<listitem><para>Fix <literal>SIMILAR TO</> for patterns involving -<literal>|</> (Tom)</para></listitem> +<listitem><para>Fix <literal>SIMILAR TO</literal> for patterns involving +<literal>|</literal> (Tom)</para></listitem> -<listitem><para>Fix <command>SELECT INTO</> and <command>CREATE TABLE AS</> to +<listitem><para>Fix <command>SELECT INTO</command> and <command>CREATE TABLE AS</command> to create tables in the default tablespace, not the base directory (Kris Jurka)</para></listitem> @@ -2396,7 +2396,7 @@ Fuhr)</para></listitem> <itemizedlist> <listitem><para>Fix potential crash in <command>SET -SESSION AUTHORIZATION</> (CVE-2006-0553)</para> +SESSION AUTHORIZATION</command> (CVE-2006-0553)</para> <para>An unprivileged user could crash the server process, resulting in momentary denial of service to other users, if the server has been compiled with Asserts enabled (which is not the default). @@ -2411,44 +2411,44 @@ created in 8.0.4, 7.4.9, and 7.3.11 releases. </para></listitem> <listitem><para>Fix race condition that could lead to <quote>file already -exists</> errors during pg_clog and pg_subtrans file creation +exists</quote> errors during pg_clog and pg_subtrans file creation (Tom)</para></listitem> <listitem><para>Fix cases that could lead to crashes if a cache-invalidation message arrives at just the wrong time (Tom)</para></listitem> -<listitem><para>Properly check <literal>DOMAIN</> constraints for -<literal>UNKNOWN</> parameters in prepared statements +<listitem><para>Properly check <literal>DOMAIN</literal> constraints for +<literal>UNKNOWN</literal> parameters in prepared statements (Neil)</para></listitem> -<listitem><para>Ensure <command>ALTER COLUMN TYPE</> will process -<literal>FOREIGN KEY</>, <literal>UNIQUE</>, and <literal>PRIMARY KEY</> +<listitem><para>Ensure <command>ALTER COLUMN TYPE</command> will process +<literal>FOREIGN KEY</literal>, <literal>UNIQUE</literal>, and <literal>PRIMARY KEY</literal> constraints in the proper order (Nakano Yoshihisa)</para></listitem> <listitem><para>Fixes to allow restoring dumps that have cross-schema references to custom operators or operator classes (Tom)</para></listitem> -<listitem><para>Allow <application>pg_restore</> to continue properly after a -<command>COPY</> failure; formerly it tried to treat the remaining -<command>COPY</> data as SQL commands (Stephen Frost)</para></listitem> +<listitem><para>Allow <application>pg_restore</application> to continue properly after a +<command>COPY</command> failure; formerly it tried to treat the remaining +<command>COPY</command> data as SQL commands (Stephen Frost)</para></listitem> -<listitem><para>Fix <application>pg_ctl</> <literal>unregister</> crash +<listitem><para>Fix <application>pg_ctl</application> <literal>unregister</literal> crash when the data directory is not specified (Magnus)</para></listitem> -<listitem><para>Fix <application>ecpg</> crash on AMD64 and PPC +<listitem><para>Fix <application>ecpg</application> crash on AMD64 and PPC (Neil)</para></listitem> <listitem><para>Recover properly if error occurs during argument passing -in <application>PL/Python</> (Neil)</para></listitem> +in <application>PL/Python</application> (Neil)</para></listitem> -<listitem><para>Fix <application>PL/Perl</>'s handling of locales on +<listitem><para>Fix <application>PL/Perl</application>'s handling of locales on Win32 to match the backend (Andrew)</para></listitem> -<listitem><para>Fix crash when <literal>log_min_messages</> is set to -<literal>DEBUG3</> or above in <filename>postgresql.conf</> on Win32 +<listitem><para>Fix crash when <literal>log_min_messages</literal> is set to +<literal>DEBUG3</literal> or above in <filename>postgresql.conf</filename> on Win32 (Bruce)</para></listitem> -<listitem><para>Fix <application>pgxs</> <literal>-L</> library path +<listitem><para>Fix <application>pgxs</application> <literal>-L</literal> library path specification for Win32, Cygwin, macOS, AIX (Bruce)</para></listitem> <listitem><para>Check that SID is enabled while checking for Win32 admin @@ -2457,8 +2457,8 @@ privileges (Magnus)</para></listitem> <listitem><para>Properly reject out-of-range date inputs (Kris Jurka)</para></listitem> -<listitem><para>Portability fix for testing presence of <function>finite</> -and <function>isinf</> during configure (Tom)</para></listitem> +<listitem><para>Portability fix for testing presence of <function>finite</function> +and <function>isinf</function> during configure (Tom)</para></listitem> </itemizedlist> @@ -2486,9 +2486,9 @@ and <function>isinf</> during configure (Tom)</para></listitem> A dump/restore is not required for those running 8.0.X. However, if you are upgrading from a version earlier than 8.0.3, see <xref linkend="release-8-0-3">. - Also, you might need to <command>REINDEX</> indexes on textual + Also, you might need to <command>REINDEX</command> indexes on textual columns after updating, if you are affected by the locale or - <application>plperl</> issues described below. + <application>plperl</application> issues described below. </para> </sect2> @@ -2501,7 +2501,7 @@ and <function>isinf</> during configure (Tom)</para></listitem> than exit if there is no more room in ShmemBackendArray (Magnus)</para> <para>The previous behavior could lead to a denial-of-service situation if too many connection requests arrive close together. This applies -<emphasis>only</> to the Windows port.</para></listitem> +<emphasis>only</emphasis> to the Windows port.</para></listitem> <listitem><para>Fix bug introduced in 8.0 that could allow ReadBuffer to return an already-used page as new, potentially causing loss of @@ -2512,16 +2512,16 @@ outside a transaction or in a failed transaction (Tom)</para></listitem> <listitem><para>Fix character string comparison for locales that consider different character combinations as equal, such as Hungarian (Tom)</para> -<para>This might require <command>REINDEX</> to fix existing indexes on +<para>This might require <command>REINDEX</command> to fix existing indexes on textual columns.</para></listitem> <listitem><para>Set locale environment variables during postmaster startup -to ensure that <application>plperl</> won't change the locale later</para> -<para>This fixes a problem that occurred if the <application>postmaster</> was +to ensure that <application>plperl</application> won't change the locale later</para> +<para>This fixes a problem that occurred if the <application>postmaster</application> was started with environment variables specifying a different locale than what -<application>initdb</> had been told. Under these conditions, any use of -<application>plperl</> was likely to lead to corrupt indexes. You might need -<command>REINDEX</> to fix existing indexes on +<application>initdb</application> had been told. Under these conditions, any use of +<application>plperl</application> was likely to lead to corrupt indexes. You might need +<command>REINDEX</command> to fix existing indexes on textual columns if this has happened to you.</para></listitem> <listitem><para>Allow more flexible relocation of installation @@ -2533,15 +2533,15 @@ directory paths were the same except for the last component.</para></listitem> handling in certain rarely used Asian multi-byte character sets (Tatsuo) </para></listitem> -<listitem><para>Various fixes for functions returning <literal>RECORD</>s +<listitem><para>Various fixes for functions returning <literal>RECORD</literal>s (Tom) </para></listitem> -<listitem><para>Fix bug in <filename>/contrib/pgcrypto</> gen_salt, +<listitem><para>Fix bug in <filename>/contrib/pgcrypto</filename> gen_salt, which caused it not to use all available salt space for MD5 and XDES algorithms (Marko Kreen, Solar Designer)</para> <para>Salts for Blowfish and standard DES are unaffected.</para></listitem> -<listitem><para>Fix <filename>/contrib/dblink</> to throw an error, +<listitem><para>Fix <filename>/contrib/dblink</filename> to throw an error, rather than crashing, when the number of columns specified is different from what's actually returned by the query (Joe)</para></listitem> @@ -2597,35 +2597,35 @@ later VACUUM commands. <listitem><para>Prevent failure if client sends Bind protocol message when current transaction is already aborted</para></listitem> -<listitem><para><filename>/contrib/ltree</> fixes (Teodor)</para></listitem> +<listitem><para><filename>/contrib/ltree</filename> fixes (Teodor)</para></listitem> <listitem><para>AIX and HPUX compile fixes (Tom)</para></listitem> <listitem><para>Retry file reads and writes after Windows NO_SYSTEM_RESOURCES error (Qingqing Zhou)</para></listitem> -<listitem><para>Fix intermittent failure when <varname>log_line_prefix</> -includes <literal>%i</></para></listitem> +<listitem><para>Fix intermittent failure when <varname>log_line_prefix</varname> +includes <literal>%i</literal></para></listitem> -<listitem><para>Fix <application>psql</> performance issue with long scripts +<listitem><para>Fix <application>psql</application> performance issue with long scripts on Windows (Merlin Moncure)</para></listitem> -<listitem><para>Fix missing updates of <filename>pg_group</> flat +<listitem><para>Fix missing updates of <filename>pg_group</filename> flat file</para></listitem> <listitem><para>Fix longstanding planning error for outer joins</para> <para>This bug sometimes caused a bogus error <quote>RIGHT JOIN is -only supported with merge-joinable join conditions</>.</para></listitem> +only supported with merge-joinable join conditions</quote>.</para></listitem> <listitem><para>Postpone timezone initialization until after -<filename>postmaster.pid</> is created</para> +<filename>postmaster.pid</filename> is created</para> <para>This avoids confusing startup scripts that expect the pid file to appear quickly.</para></listitem> -<listitem><para>Prevent core dump in <application>pg_autovacuum</> when a +<listitem><para>Prevent core dump in <application>pg_autovacuum</application> when a table has been dropped</para></listitem> -<listitem><para>Fix problems with whole-row references (<literal>foo.*</>) +<listitem><para>Fix problems with whole-row references (<literal>foo.*</literal>) to subquery results</para></listitem> </itemizedlist> @@ -2660,69 +2660,69 @@ to subquery results</para></listitem> <title>Changes</title> <itemizedlist> -<listitem><para>Fix error that allowed <command>VACUUM</> to remove -<literal>ctid</> chains too soon, and add more checking in code that follows -<literal>ctid</> links</para> +<listitem><para>Fix error that allowed <command>VACUUM</command> to remove +<literal>ctid</literal> chains too soon, and add more checking in code that follows +<literal>ctid</literal> links</para> <para>This fixes a long-standing problem that could cause crashes in very rare circumstances.</para></listitem> -<listitem><para>Fix <type>CHAR()</> to properly pad spaces to the specified +<listitem><para>Fix <type>CHAR()</type> to properly pad spaces to the specified length when using a multiple-byte character set (Yoshiyuki Asaba)</para> -<para>In prior releases, the padding of <type>CHAR()</> was incorrect +<para>In prior releases, the padding of <type>CHAR()</type> was incorrect because it only padded to the specified number of bytes without considering how many characters were stored.</para></listitem> <listitem><para>Force a checkpoint before committing <command>CREATE -DATABASE</></para> -<para>This should fix recent reports of <quote>index is not a btree</> +DATABASE</command></para> +<para>This should fix recent reports of <quote>index is not a btree</quote> failures when a crash occurs shortly after <command>CREATE -DATABASE</>.</para></listitem> +DATABASE</command>.</para></listitem> <listitem><para>Fix the sense of the test for read-only transaction -in <command>COPY</></para> -<para>The code formerly prohibited <command>COPY TO</>, where it should -prohibit <command>COPY FROM</>. +in <command>COPY</command></para> +<para>The code formerly prohibited <command>COPY TO</command>, where it should +prohibit <command>COPY FROM</command>. </para></listitem> -<listitem><para>Handle consecutive embedded newlines in <command>COPY</> +<listitem><para>Handle consecutive embedded newlines in <command>COPY</command> CSV-mode input</para></listitem> -<listitem><para>Fix <function>date_trunc(week)</> for dates near year +<listitem><para>Fix <function>date_trunc(week)</function> for dates near year end</para></listitem> <listitem><para>Fix planning problem with outer-join ON clauses that reference only the inner-side relation</para></listitem> -<listitem><para>Further fixes for <literal>x FULL JOIN y ON true</> corner +<listitem><para>Further fixes for <literal>x FULL JOIN y ON true</literal> corner cases</para></listitem> <listitem><para>Fix overenthusiastic optimization of <literal>x IN (SELECT -DISTINCT ...)</> and related cases</para></listitem> -<listitem><para>Fix mis-planning of queries with small <literal>LIMIT</> -values due to poorly thought out <quote>fuzzy</> cost +DISTINCT ...)</literal> and related cases</para></listitem> +<listitem><para>Fix mis-planning of queries with small <literal>LIMIT</literal> +values due to poorly thought out <quote>fuzzy</quote> cost comparison</para></listitem> -<listitem><para>Make <function>array_in</> and <function>array_recv</> more +<listitem><para>Make <function>array_in</function> and <function>array_recv</function> more paranoid about validating their OID parameter</para></listitem> <listitem><para>Fix missing rows in queries like <literal>UPDATE a=... WHERE -a...</> with GiST index on column <literal>a</></para></listitem> +a...</literal> with GiST index on column <literal>a</literal></para></listitem> <listitem><para>Improve robustness of datetime parsing</para></listitem> <listitem><para>Improve checking for partially-written WAL pages</para></listitem> <listitem><para>Improve robustness of signal handling when SSL is enabled</para></listitem> <listitem><para>Improve MIPS and M68K spinlock code</para></listitem> -<listitem><para>Don't try to open more than <literal>max_files_per_process</> +<listitem><para>Don't try to open more than <literal>max_files_per_process</literal> files during postmaster startup</para></listitem> <listitem><para>Various memory leakage fixes</para></listitem> <listitem><para>Various portability improvements</para></listitem> <listitem><para>Update timezone data files</para></listitem> <listitem><para>Improve handling of DLL load failures on Windows</para></listitem> <listitem><para>Improve random-number generation on Windows</para></listitem> -<listitem><para>Make <literal>psql -f filename</> return a nonzero exit code +<listitem><para>Make <literal>psql -f filename</literal> return a nonzero exit code when opening the file fails</para></listitem> -<listitem><para>Change <application>pg_dump</> to handle inherited check +<listitem><para>Change <application>pg_dump</application> to handle inherited check constraints more reliably</para></listitem> -<listitem><para>Fix password prompting in <application>pg_restore</> on +<listitem><para>Fix password prompting in <application>pg_restore</application> on Windows</para></listitem> -<listitem><para>Fix PL/pgSQL to handle <literal>var := var</> correctly when +<listitem><para>Fix PL/pgSQL to handle <literal>var := var</literal> correctly when the variable is of pass-by-reference type</para></listitem> -<listitem><para>Fix PL/Perl <literal>%_SHARED</> so it's actually +<listitem><para>Fix PL/Perl <literal>%_SHARED</literal> so it's actually shared</para></listitem> -<listitem><para>Fix <filename>contrib/pg_autovacuum</> to allow sleep +<listitem><para>Fix <filename>contrib/pg_autovacuum</filename> to allow sleep intervals over 2000 sec</para></listitem> -<listitem><para>Update <filename>contrib/tsearch2</> to use current Snowball +<listitem><para>Update <filename>contrib/tsearch2</filename> to use current Snowball code</para></listitem> </itemizedlist> @@ -2766,10 +2766,10 @@ code</para></listitem> </para> <para> - The lesser problem is that the <filename>contrib/tsearch2</> module + The lesser problem is that the <filename>contrib/tsearch2</filename> module creates several functions that are improperly declared to return - <type>internal</> when they do not accept <type>internal</> arguments. - This breaks type safety for all functions using <type>internal</> + <type>internal</type> when they do not accept <type>internal</type> arguments. + This breaks type safety for all functions using <type>internal</type> arguments. </para> @@ -2794,10 +2794,10 @@ code</para></listitem> <itemizedlist> <listitem><para>Change encoding function signature to prevent misuse</para></listitem> -<listitem><para>Change <filename>contrib/tsearch2</> to avoid unsafe use of -<type>INTERNAL</> function results</para></listitem> +<listitem><para>Change <filename>contrib/tsearch2</filename> to avoid unsafe use of +<type>INTERNAL</type> function results</para></listitem> <listitem><para>Guard against incorrect second parameter to -<function>record_out</></para></listitem> +<function>record_out</function></para></listitem> <listitem><para>Repair ancient race condition that allowed a transaction to be seen as committed for some purposes (eg SELECT FOR UPDATE) slightly sooner than for other purposes</para> @@ -2809,36 +2809,36 @@ VACUUM</para> freshly-inserted data, although the scenario seems of very low probability. There are no known cases of it having caused more than an Assert failure. </para></listitem> -<listitem><para>Fix comparisons of <type>TIME WITH TIME ZONE</> values</para> +<listitem><para>Fix comparisons of <type>TIME WITH TIME ZONE</type> values</para> <para> The comparison code was wrong in the case where the -<literal>--enable-integer-datetimes</> configuration switch had been used. -NOTE: if you have an index on a <type>TIME WITH TIME ZONE</> column, -it will need to be <command>REINDEX</>ed after installing this update, because +<literal>--enable-integer-datetimes</literal> configuration switch had been used. +NOTE: if you have an index on a <type>TIME WITH TIME ZONE</type> column, +it will need to be <command>REINDEX</command>ed after installing this update, because the fix corrects the sort order of column values. </para></listitem> -<listitem><para>Fix <function>EXTRACT(EPOCH)</> for -<type>TIME WITH TIME ZONE</> values</para></listitem> +<listitem><para>Fix <function>EXTRACT(EPOCH)</function> for +<type>TIME WITH TIME ZONE</type> values</para></listitem> <listitem><para>Fix mis-display of negative fractional seconds in -<type>INTERVAL</> values</para> +<type>INTERVAL</type> values</para> <para> This error only occurred when the -<literal>--enable-integer-datetimes</> configuration switch had been used. +<literal>--enable-integer-datetimes</literal> configuration switch had been used. </para></listitem> -<listitem><para>Fix pg_dump to dump trigger names containing <literal>%</> +<listitem><para>Fix pg_dump to dump trigger names containing <literal>%</literal> correctly (Neil)</para></listitem> <listitem><para>Still more 64-bit fixes for -<filename>contrib/intagg</></para></listitem> +<filename>contrib/intagg</filename></para></listitem> <listitem><para>Prevent incorrect optimization of functions returning -<type>RECORD</></para></listitem> -<listitem><para>Prevent crash on <literal>COALESCE(NULL,NULL)</></para></listitem> +<type>RECORD</type></para></listitem> +<listitem><para>Prevent crash on <literal>COALESCE(NULL,NULL)</literal></para></listitem> <listitem><para>Fix Borland makefile for libpq</para></listitem> -<listitem><para>Fix <filename>contrib/btree_gist</> for <type>timetz</> type +<listitem><para>Fix <filename>contrib/btree_gist</filename> for <type>timetz</type> type (Teodor)</para></listitem> -<listitem><para>Make <command>pg_ctl</> check the PID found in -<filename>postmaster.pid</> to see if it is still a live +<listitem><para>Make <command>pg_ctl</command> check the PID found in +<filename>postmaster.pid</filename> to see if it is still a live process</para></listitem> -<listitem><para>Fix <command>pg_dump</>/<command>pg_restore</> problems caused +<listitem><para>Fix <command>pg_dump</command>/<command>pg_restore</command> problems caused by addition of dump timestamps</para></listitem> <listitem><para>Fix interaction between materializing holdable cursors and firing deferred triggers during transaction commit</para></listitem> @@ -2883,51 +2883,51 @@ data types</para></listitem> libraries (Bruce)</para> <para> This should have been done in 8.0.0. It is required so 7.4.X versions -of PostgreSQL client applications, like <application>psql</>, +of PostgreSQL client applications, like <application>psql</application>, can be used on the same machine as 8.0.X applications. This might require re-linking user applications that use these libraries. </para></listitem> -<listitem><para>Add Windows-only <varname>wal_sync_method</> setting of -<option>fsync_writethrough</> (Magnus, Bruce)</para> +<listitem><para>Add Windows-only <varname>wal_sync_method</varname> setting of +<option>fsync_writethrough</option> (Magnus, Bruce)</para> <para> This setting causes <productname>PostgreSQL</productname> to write through any disk-drive write cache when writing to WAL. -This behavior was formerly called <option>fsync</>, but was -renamed because it acts quite differently from <option>fsync</> on other +This behavior was formerly called <option>fsync</option>, but was +renamed because it acts quite differently from <option>fsync</option> on other platforms. </para> </listitem> -<listitem><para>Enable the <varname>wal_sync_method</> setting of -<option>open_datasync</> on Windows, and make it the default for that +<listitem><para>Enable the <varname>wal_sync_method</varname> setting of +<option>open_datasync</option> on Windows, and make it the default for that platform (Magnus, Bruce)</para> <para> -Because the default is no longer <option>fsync_writethrough</>, +Because the default is no longer <option>fsync_writethrough</option>, data loss is possible during a power failure if the disk drive has write caching enabled. To turn off the write cache on Windows, -from the <application>Device Manager</>, choose the drive properties, -then <literal>Policies</>. +from the <application>Device Manager</application>, choose the drive properties, +then <literal>Policies</literal>. </para> </listitem> -<listitem><para>New cache management algorithm <acronym>2Q</> replaces -<acronym>ARC</> (Tom)</para> +<listitem><para>New cache management algorithm <acronym>2Q</acronym> replaces +<acronym>ARC</acronym> (Tom)</para> <para> -This was done to avoid a pending US patent on <acronym>ARC</>. The -<acronym>2Q</> code might be a few percentage points slower than -<acronym>ARC</> for some work loads. A better cache management algorithm +This was done to avoid a pending US patent on <acronym>ARC</acronym>. The +<acronym>2Q</acronym> code might be a few percentage points slower than +<acronym>ARC</acronym> for some work loads. A better cache management algorithm will appear in 8.1. </para></listitem> <listitem><para>Planner adjustments to improve behavior on freshly-created tables (Tom)</para></listitem> <listitem><para>Allow plpgsql to assign to an element of an array that is -initially <literal>NULL</> (Tom)</para> +initially <literal>NULL</literal> (Tom)</para> <para> -Formerly the array would remain <literal>NULL</>, but now it becomes a +Formerly the array would remain <literal>NULL</literal>, but now it becomes a single-element array. The main SQL engine was changed to handle -<command>UPDATE</> of a null array value this way in 8.0, but the similar +<command>UPDATE</command> of a null array value this way in 8.0, but the similar case in plpgsql was overlooked. </para> </listitem> -<listitem><para>Convert <literal>\r\n</> and <literal>\r</> to <literal>\n</> +<listitem><para>Convert <literal>\r\n</literal> and <literal>\r</literal> to <literal>\n</literal> in plpython function bodies (Michael Fuhr)</para> <para> This prevents syntax errors when plpython code is written on a Windows or @@ -2935,72 +2935,72 @@ in plpython function bodies (Michael Fuhr)</para> </para> </listitem> <listitem><para>Allow SPI cursors to handle utility commands that return rows, -such as <command>EXPLAIN</> (Tom)</para></listitem> -<listitem><para>Fix <command>CLUSTER</> failure after <command>ALTER TABLE -SET WITHOUT OIDS</> (Tom)</para></listitem> -<listitem><para>Reduce memory usage of <command>ALTER TABLE ADD COLUMN</> +such as <command>EXPLAIN</command> (Tom)</para></listitem> +<listitem><para>Fix <command>CLUSTER</command> failure after <command>ALTER TABLE +SET WITHOUT OIDS</command> (Tom)</para></listitem> +<listitem><para>Reduce memory usage of <command>ALTER TABLE ADD COLUMN</command> (Neil)</para></listitem> -<listitem><para>Fix <command>ALTER LANGUAGE RENAME</> (Tom)</para></listitem> -<listitem><para>Document the Windows-only <literal>register</> and -<literal>unregister</> options of <application>pg_ctl</> (Magnus)</para></listitem> +<listitem><para>Fix <command>ALTER LANGUAGE RENAME</command> (Tom)</para></listitem> +<listitem><para>Document the Windows-only <literal>register</literal> and +<literal>unregister</literal> options of <application>pg_ctl</application> (Magnus)</para></listitem> <listitem><para>Ensure operations done during backend shutdown are counted by statistics collector</para> <para> -This is expected to resolve reports of <application>pg_autovacuum</> +This is expected to resolve reports of <application>pg_autovacuum</application> not vacuuming the system catalogs often enough — it was not being told about catalog deletions caused by temporary table removal during backend exit. </para></listitem> <listitem><para>Change the Windows default for configuration parameter -<varname>log_destination</> to <option>eventlog</> (Magnus)</para> +<varname>log_destination</varname> to <option>eventlog</option> (Magnus)</para> <para> By default, a server running on Windows will now send log output to the Windows event logger rather than standard error. </para></listitem> <listitem><para>Make Kerberos authentication work on Windows (Magnus)</para></listitem> -<listitem><para>Allow <command>ALTER DATABASE RENAME</> by superusers +<listitem><para>Allow <command>ALTER DATABASE RENAME</command> by superusers who aren't flagged as having CREATEDB privilege (Tom)</para></listitem> -<listitem><para>Modify WAL log entries for <command>CREATE</> and -<command>DROP DATABASE</> to not specify absolute paths (Tom)</para> +<listitem><para>Modify WAL log entries for <command>CREATE</command> and +<command>DROP DATABASE</command> to not specify absolute paths (Tom)</para> <para>This allows point-in-time recovery on a different machine with possibly -different database location. Note that <command>CREATE TABLESPACE</> still +different database location. Note that <command>CREATE TABLESPACE</command> still poses a hazard in such situations. </para></listitem> <listitem><para>Fix crash from a backend exiting with an open transaction that created a table and opened a cursor on it (Tom)</para></listitem> -<listitem><para>Fix <function>array_map()</> so it can call PL functions +<listitem><para>Fix <function>array_map()</function> so it can call PL functions (Tom)</para></listitem> -<listitem><para>Several <filename>contrib/tsearch2</> and -<filename>contrib/btree_gist</> fixes (Teodor) +<listitem><para>Several <filename>contrib/tsearch2</filename> and +<filename>contrib/btree_gist</filename> fixes (Teodor) </para></listitem> -<listitem><para>Fix crash of some <filename>contrib/pgcrypto</> +<listitem><para>Fix crash of some <filename>contrib/pgcrypto</filename> functions on some platforms (Marko Kreen)</para></listitem> -<listitem><para>Fix <filename>contrib/intagg</> for 64-bit platforms +<listitem><para>Fix <filename>contrib/intagg</filename> for 64-bit platforms (Tom)</para></listitem> -<listitem><para>Fix ecpg bugs in parsing of <command>CREATE</> statement +<listitem><para>Fix ecpg bugs in parsing of <command>CREATE</command> statement (Michael)</para></listitem> <listitem><para>Work around gcc bug on powerpc and amd64 causing problems in ecpg (Christof Petig)</para></listitem> -<listitem><para>Do not use locale-aware versions of <function>upper()</>, -<function>lower()</>, and <function>initcap()</> when the locale is -<literal>C</> (Bruce)</para> +<listitem><para>Do not use locale-aware versions of <function>upper()</function>, +<function>lower()</function>, and <function>initcap()</function> when the locale is +<literal>C</literal> (Bruce)</para> <para> This allows these functions to work on platforms that generate errors - for non-7-bit data when the locale is <literal>C</>. + for non-7-bit data when the locale is <literal>C</literal>. </para></listitem> -<listitem><para>Fix <function>quote_ident()</> to quote names that match keywords (Tom)</para></listitem> -<listitem><para>Fix <function>to_date()</> to behave reasonably when -<literal>CC</> and <literal>YY</> fields are both used (Karel)</para></listitem> -<listitem><para>Prevent <function>to_char(interval)</> from failing +<listitem><para>Fix <function>quote_ident()</function> to quote names that match keywords (Tom)</para></listitem> +<listitem><para>Fix <function>to_date()</function> to behave reasonably when +<literal>CC</literal> and <literal>YY</literal> fields are both used (Karel)</para></listitem> +<listitem><para>Prevent <function>to_char(interval)</function> from failing when given a zero-month interval (Tom)</para></listitem> -<listitem><para>Fix wrong week returned by <function>date_trunc('week')</> +<listitem><para>Fix wrong week returned by <function>date_trunc('week')</function> (Bruce)</para> <para> -<function>date_trunc('week')</> +<function>date_trunc('week')</function> returned the wrong year for the first few days of January in some years. </para></listitem> -<listitem><para>Use the correct default mask length for class <literal>D</> -addresses in <type>INET</> data types (Tom)</para></listitem> +<listitem><para>Use the correct default mask length for class <literal>D</literal> +addresses in <type>INET</type> data types (Tom)</para></listitem> </itemizedlist> </sect2> @@ -3033,11 +3033,11 @@ addresses in <type>INET</> data types (Tom)</para></listitem> <title>Changes</title> <itemizedlist> -<listitem><para>Disallow <command>LOAD</> to non-superusers</para> +<listitem><para>Disallow <command>LOAD</command> to non-superusers</para> <para> On platforms that will automatically execute initialization functions of a shared library (this includes at least Windows and ELF-based Unixen), -<command>LOAD</> can be used to make the server execute arbitrary code. +<command>LOAD</command> can be used to make the server execute arbitrary code. Thanks to NGS Software for reporting this.</para></listitem> <listitem><para>Check that creator of an aggregate function has the right to execute the specified transition functions</para> @@ -3050,7 +3050,7 @@ contrib/intagg</para></listitem> Jurka)</para></listitem> <listitem><para>Avoid buffer overrun when plpgsql cursor declaration has too many parameters (Neil)</para></listitem> -<listitem><para>Make <command>ALTER TABLE ADD COLUMN</> enforce domain +<listitem><para>Make <command>ALTER TABLE ADD COLUMN</command> enforce domain constraints in all cases</para></listitem> <listitem><para>Fix planning error for FULL and RIGHT outer joins</para> <para> @@ -3059,7 +3059,7 @@ left input. This could not only deliver mis-sorted output to the user, but in case of nested merge joins could give outright wrong answers. </para></listitem> <listitem><para>Improve planning of grouped aggregate queries</para></listitem> -<listitem><para><command>ROLLBACK TO <replaceable>savepoint</></command> +<listitem><para><command>ROLLBACK TO <replaceable>savepoint</replaceable></command> closes cursors created since the savepoint</para></listitem> <listitem><para>Fix inadequate backend stack size on Windows</para></listitem> <listitem><para>Avoid SHGetSpecialFolderPath() on Windows @@ -3099,17 +3099,17 @@ typedefs (Michael)</para></listitem> <listitem> <para> This is the first <productname>PostgreSQL</productname> release - to run natively on <trademark class="registered">Microsoft Windows</> as - a server. It can run as a <productname>Windows</> service. This + to run natively on <trademark class="registered">Microsoft Windows</trademark> as + a server. It can run as a <productname>Windows</productname> service. This release supports NT-based Windows releases like - <productname>Windows 2000 SP4</>, <productname>Windows XP</>, and - <productname>Windows 2003</>. Older releases like - <productname>Windows 95</>, <productname>Windows 98</>, and - <productname>Windows ME</> are not supported because these operating + <productname>Windows 2000 SP4</productname>, <productname>Windows XP</productname>, and + <productname>Windows 2003</productname>. Older releases like + <productname>Windows 95</productname>, <productname>Windows 98</productname>, and + <productname>Windows ME</productname> are not supported because these operating systems do not have the infrastructure to support <productname>PostgreSQL</productname>. A separate installer project has been created to ease installation on - <productname>Windows</> — see <ulink + <productname>Windows</productname> — see <ulink url="http://www.postgresql.org/ftp/win32/"></ulink>. </para> @@ -3123,7 +3123,7 @@ typedefs (Michael)</para></listitem> <para> Previous releases required the Unix emulation toolkit - <productname>Cygwin</> in order to run the server on Windows + <productname>Cygwin</productname> in order to run the server on Windows operating systems. <productname>PostgreSQL</productname> has supported native clients on Windows for many years. </para> @@ -3174,7 +3174,7 @@ typedefs (Michael)</para></listitem> Tablespaces allow administrators to select different file systems for storage of individual tables, indexes, and databases. This improves performance and control over disk space - usage. Prior releases used <application>initlocation</> and + usage. Prior releases used <application>initlocation</application> and manual symlink management for such tasks. </para> </listitem> @@ -3216,7 +3216,7 @@ typedefs (Michael)</para></listitem> <listitem> <para> - A new version of the <application>plperl</> server-side language now + A new version of the <application>plperl</application> server-side language now supports a persistent shared storage area, triggers, returning records and arrays of records, and SPI calls to access the database. </para> @@ -3257,7 +3257,7 @@ typedefs (Michael)</para></listitem> <listitem> <para> - In <option>READ COMMITTED</> serialization mode, volatile functions + In <option>READ COMMITTED</option> serialization mode, volatile functions now see the results of concurrent transactions committed up to the beginning of each statement within the function, rather than up to the beginning of the interactive command that called the function. @@ -3266,18 +3266,18 @@ typedefs (Michael)</para></listitem> <listitem> <para> - Functions declared <option>STABLE</> or <option>IMMUTABLE</> always + Functions declared <option>STABLE</option> or <option>IMMUTABLE</option> always use the snapshot of the calling query, and therefore do not see the effects of actions taken after the calling query starts, whether in their own transaction or other transactions. Such a function must be read-only, too, meaning that it cannot use any SQL commands other than - <command>SELECT</>. + <command>SELECT</command>. </para> </listitem> <listitem> <para> - Nondeferred <option>AFTER</> triggers are now fired immediately + Nondeferred <option>AFTER</option> triggers are now fired immediately after completion of the triggering query, rather than upon finishing the current interactive command. This makes a difference when the triggering query occurred within a function: @@ -3288,19 +3288,19 @@ typedefs (Michael)</para></listitem> <listitem> <para> - Server configuration parameters <varname>virtual_host</> and - <varname>tcpip_socket</> have been replaced with a more general - parameter <varname>listen_addresses</>. Also, the server now listens on - <literal>localhost</> by default, which eliminates the need for the - <literal>-i</> postmaster switch in many scenarios. + Server configuration parameters <varname>virtual_host</varname> and + <varname>tcpip_socket</varname> have been replaced with a more general + parameter <varname>listen_addresses</varname>. Also, the server now listens on + <literal>localhost</literal> by default, which eliminates the need for the + <literal>-i</literal> postmaster switch in many scenarios. </para> </listitem> <listitem> <para> - Server configuration parameters <varname>SortMem</> and - <varname>VacuumMem</> have been renamed to <varname>work_mem</> - and <varname>maintenance_work_mem</> to better reflect their + Server configuration parameters <varname>SortMem</varname> and + <varname>VacuumMem</varname> have been renamed to <varname>work_mem</varname> + and <varname>maintenance_work_mem</varname> to better reflect their use. The original names are still supported in <command>SET</command> and <command>SHOW</command>. </para> @@ -3308,34 +3308,34 @@ typedefs (Michael)</para></listitem> <listitem> <para> - Server configuration parameters <varname>log_pid</>, - <varname>log_timestamp</>, and <varname>log_source_port</> have been - replaced with a more general parameter <varname>log_line_prefix</>. + Server configuration parameters <varname>log_pid</varname>, + <varname>log_timestamp</varname>, and <varname>log_source_port</varname> have been + replaced with a more general parameter <varname>log_line_prefix</varname>. </para> </listitem> <listitem> <para> - Server configuration parameter <varname>syslog</> has been - replaced with a more logical <varname>log_destination</> variable to + Server configuration parameter <varname>syslog</varname> has been + replaced with a more logical <varname>log_destination</varname> variable to control the log output destination. </para> </listitem> <listitem> <para> - Server configuration parameter <varname>log_statement</> has been + Server configuration parameter <varname>log_statement</varname> has been changed so it can selectively log just database modification or data definition statements. Server configuration parameter - <varname>log_duration</> now prints only when <varname>log_statement</> + <varname>log_duration</varname> now prints only when <varname>log_statement</varname> prints the query. </para> </listitem> <listitem> <para> - Server configuration parameter <varname>max_expr_depth</> parameter has - been replaced with <varname>max_stack_depth</> which measures the + Server configuration parameter <varname>max_expr_depth</varname> parameter has + been replaced with <varname>max_stack_depth</varname> which measures the physical stack size rather than the expression nesting depth. This helps prevent session termination due to stack overflow caused by recursive functions. @@ -3344,14 +3344,14 @@ typedefs (Michael)</para></listitem> <listitem> <para> - The <function>length()</> function no longer counts trailing spaces in - <type>CHAR(n)</> values. + The <function>length()</function> function no longer counts trailing spaces in + <type>CHAR(n)</type> values. </para> </listitem> <listitem> <para> - Casting an integer to <type>BIT(N)</> selects the rightmost N bits of the + Casting an integer to <type>BIT(N)</type> selects the rightmost N bits of the integer, not the leftmost N bits as before. </para> </listitem> @@ -3369,7 +3369,7 @@ typedefs (Michael)</para></listitem> Syntax checking of array input values has been tightened up considerably. Junk that was previously allowed in odd places with odd results now causes an error. Empty-string element values - must now be written as <literal>""</>, rather than writing nothing. + must now be written as <literal>""</literal>, rather than writing nothing. Also changed behavior with respect to whitespace surrounding array elements: trailing whitespace is now ignored, for symmetry with leading whitespace (which has always been ignored). @@ -3386,14 +3386,14 @@ typedefs (Michael)</para></listitem> <listitem> <para> The arithmetic operators associated with the single-byte - <type>"char"</> data type have been removed. + <type>"char"</type> data type have been removed. </para> </listitem> <listitem> <para> - The <function>extract()</> function (also called - <function>date_part</>) now returns the proper year for BC dates. + The <function>extract()</function> function (also called + <function>date_part</function>) now returns the proper year for BC dates. It previously returned one less than the correct year. The function now also returns the proper values for millennium and century. @@ -3402,9 +3402,9 @@ typedefs (Michael)</para></listitem> <listitem> <para> - <type>CIDR</> values now must have their nonmasked bits be zero. + <type>CIDR</type> values now must have their nonmasked bits be zero. For example, we no longer allow - <literal>204.248.199.1/31</literal> as a <type>CIDR</> value. Such + <literal>204.248.199.1/31</literal> as a <type>CIDR</type> value. Such values should never have been accepted by <productname>PostgreSQL</productname> and will now be rejected. </para> @@ -3419,11 +3419,11 @@ typedefs (Michael)</para></listitem> <listitem> <para> - <application>psql</>'s <command>\copy</> command now reads or - writes to the query's <literal>stdin/stdout</>, rather than - <application>psql</>'s <literal>stdin/stdout</>. The previous + <application>psql</application>'s <command>\copy</command> command now reads or + writes to the query's <literal>stdin/stdout</literal>, rather than + <application>psql</application>'s <literal>stdin/stdout</literal>. The previous behavior can be accessed via new - <option>pstdin</>/<option>pstdout</> parameters. + <option>pstdin</option>/<option>pstdout</option> parameters. </para> </listitem> @@ -3449,14 +3449,14 @@ typedefs (Michael)</para></listitem> one supplied by the operating system. This will provide consistent behavior across all platforms. In most cases, there should be little noticeable difference in time zone behavior, except that - the time zone names used by <command>SET</>/<command>SHOW</> - <varname>TimeZone</> might be different from what your platform provides. + the time zone names used by <command>SET</command>/<command>SHOW</command> + <varname>TimeZone</varname> might be different from what your platform provides. </para> </listitem> <listitem> <para> - <application>Configure</>'s threading option no longer requires + <application>Configure</application>'s threading option no longer requires users to run tests or edit configuration files; threading options are now detected automatically. </para> @@ -3465,7 +3465,7 @@ typedefs (Michael)</para></listitem> <listitem> <para> Now that tablespaces have been implemented, - <application>initlocation</> has been removed. + <application>initlocation</application> has been removed. </para> </listitem> @@ -3495,7 +3495,7 @@ typedefs (Michael)</para></listitem> <itemizedlist> <listitem> <para> - The 8.1 release will remove the <function>to_char()</> function + The 8.1 release will remove the <function>to_char()</function> function for intervals. </para> </listitem> @@ -3513,12 +3513,12 @@ typedefs (Michael)</para></listitem> <listitem> <para> By default, tables in <productname>PostgreSQL</productname> 8.0 - and earlier are created with <type>OID</>s. In the next release, + and earlier are created with <type>OID</type>s. In the next release, this will <emphasis>not</emphasis> be the case: to create a table - that contains <type>OID</>s, the <option>WITH OIDS</> clause must + that contains <type>OID</type>s, the <option>WITH OIDS</option> clause must be specified or the <varname>default_with_oids</varname> configuration parameter must be set. Users are encouraged to - explicitly specify <option>WITH OIDS</> if their tables + explicitly specify <option>WITH OIDS</option> if their tables require OIDs for compatibility with future releases of <productname>PostgreSQL</productname>. </para> @@ -3581,7 +3581,7 @@ typedefs (Michael)</para></listitem> hurt performance. The new code uses a background writer to trickle disk writes at a steady pace so checkpoints have far fewer dirty pages to write to disk. Also, the new code does not issue a global - <function>sync()</> call, but instead <function>fsync()</>s just + <function>sync()</function> call, but instead <function>fsync()</function>s just the files written since the last checkpoint. This should improve performance and minimize degradation during checkpoints. </para> @@ -3629,13 +3629,13 @@ typedefs (Michael)</para></listitem> <listitem> <para> - Improved index usage with <literal>OR</> clauses (Tom) + Improved index usage with <literal>OR</literal> clauses (Tom) </para> <para> This allows the optimizer to use indexes in statements with many OR clauses that would not have been indexed in the past. It can also use multi-column indexes where the first column is specified and the second - column is part of an <literal>OR</> clause. + column is part of an <literal>OR</literal> clause. </para> </listitem> @@ -3645,7 +3645,7 @@ typedefs (Michael)</para></listitem> </para> <para> The server is now smarter about using partial indexes in queries - involving complex <option>WHERE</> clauses. + involving complex <option>WHERE</option> clauses. </para> </listitem> @@ -3754,7 +3754,7 @@ typedefs (Michael)</para></listitem> </para> <para> It is now possible to log server messages conveniently without - relying on either <application>syslog</> or an external log + relying on either <application>syslog</application> or an external log rotation program. </para> </listitem> @@ -3762,56 +3762,56 @@ typedefs (Michael)</para></listitem> <listitem> <para> Add new read-only server configuration parameters to show server - compile-time settings: <varname>block_size</>, - <varname>integer_datetimes</>, <varname>max_function_args</>, - <varname>max_identifier_length</>, <varname>max_index_keys</> (Joe) + compile-time settings: <varname>block_size</varname>, + <varname>integer_datetimes</varname>, <varname>max_function_args</varname>, + <varname>max_identifier_length</varname>, <varname>max_index_keys</varname> (Joe) </para> </listitem> <listitem> <para> - Make quoting of <literal>sameuser</>, <literal>samegroup</>, and - <literal>all</> remove special meaning of these terms in - <filename>pg_hba.conf</> (Andrew) + Make quoting of <literal>sameuser</literal>, <literal>samegroup</literal>, and + <literal>all</literal> remove special meaning of these terms in + <filename>pg_hba.conf</filename> (Andrew) </para> </listitem> <listitem> <para> - Use clearer IPv6 name <literal>::1/128</> for - <literal>localhost</> in default <filename>pg_hba.conf</> (Andrew) + Use clearer IPv6 name <literal>::1/128</literal> for + <literal>localhost</literal> in default <filename>pg_hba.conf</filename> (Andrew) </para> </listitem> <listitem> <para> - Use CIDR format in <filename>pg_hba.conf</> examples (Andrew) + Use CIDR format in <filename>pg_hba.conf</filename> examples (Andrew) </para> </listitem> <listitem> <para> - Rename server configuration parameters <varname>SortMem</> and - <varname>VacuumMem</> to <varname>work_mem</> and - <varname>maintenance_work_mem</> (Old names still supported) (Tom) + Rename server configuration parameters <varname>SortMem</varname> and + <varname>VacuumMem</varname> to <varname>work_mem</varname> and + <varname>maintenance_work_mem</varname> (Old names still supported) (Tom) </para> <para> This change was made to clarify that bulk operations such as index and - foreign key creation use <varname>maintenance_work_mem</>, while - <varname>work_mem</> is for workspaces used during query execution. + foreign key creation use <varname>maintenance_work_mem</varname>, while + <varname>work_mem</varname> is for workspaces used during query execution. </para> </listitem> <listitem> <para> Allow logging of session disconnections using server configuration - <varname>log_disconnections</> (Andrew) + <varname>log_disconnections</varname> (Andrew) </para> </listitem> <listitem> <para> - Add new server configuration parameter <varname>log_line_prefix</> to + Add new server configuration parameter <varname>log_line_prefix</varname> to allow control of information emitted in each log line (Andrew) </para> <para> @@ -3822,21 +3822,21 @@ typedefs (Michael)</para></listitem> <listitem> <para> - Remove server configuration parameters <varname>log_pid</>, - <varname>log_timestamp</>, <varname>log_source_port</>; functionality - superseded by <varname>log_line_prefix</> (Andrew) + Remove server configuration parameters <varname>log_pid</varname>, + <varname>log_timestamp</varname>, <varname>log_source_port</varname>; functionality + superseded by <varname>log_line_prefix</varname> (Andrew) </para> </listitem> <listitem> <para> - Replace the <varname>virtual_host</> and <varname>tcpip_socket</> - parameters with a unified <varname>listen_addresses</> parameter + Replace the <varname>virtual_host</varname> and <varname>tcpip_socket</varname> + parameters with a unified <varname>listen_addresses</varname> parameter (Andrew, Tom) </para> <para> - <varname>virtual_host</> could only specify a single IP address to - listen on. <varname>listen_addresses</> allows multiple addresses + <varname>virtual_host</varname> could only specify a single IP address to + listen on. <varname>listen_addresses</varname> allows multiple addresses to be specified. </para> </listitem> @@ -3844,10 +3844,10 @@ typedefs (Michael)</para></listitem> <listitem> <para> Listen on localhost by default, which eliminates the need for the - <option>-i</> postmaster switch in many scenarios (Andrew) + <option>-i</option> postmaster switch in many scenarios (Andrew) </para> <para> - Listening on localhost (<literal>127.0.0.1</>) opens no new + Listening on localhost (<literal>127.0.0.1</literal>) opens no new security holes but allows configurations like Windows and JDBC, which do not support local sockets, to work without special adjustments. @@ -3856,17 +3856,17 @@ typedefs (Michael)</para></listitem> <listitem> <para> - Remove <varname>syslog</> server configuration parameter, and add more - logical <varname>log_destination</> variable to control log output + Remove <varname>syslog</varname> server configuration parameter, and add more + logical <varname>log_destination</varname> variable to control log output location (Magnus) </para> </listitem> <listitem> <para> - Change server configuration parameter <varname>log_statement</> to take - values <varname>all</>, <varname>mod</>, <varname>ddl</>, or - <varname>none</> to select which queries are logged (Bruce) + Change server configuration parameter <varname>log_statement</varname> to take + values <varname>all</varname>, <varname>mod</varname>, <varname>ddl</varname>, or + <varname>none</varname> to select which queries are logged (Bruce) </para> <para> This allows administrators to log only data definition changes or @@ -3877,12 +3877,12 @@ typedefs (Michael)</para></listitem> <listitem> <para> Some logging-related configuration parameters could formerly be adjusted - by ordinary users, but only in the <quote>more verbose</> direction. + by ordinary users, but only in the <quote>more verbose</quote> direction. They are now treated more strictly: only superusers can set them. - However, a superuser can use <command>ALTER USER</> to provide per-user + However, a superuser can use <command>ALTER USER</command> to provide per-user settings of these values for non-superusers. Also, it is now possible for superusers to set values of superuser-only configuration parameters - via <literal>PGOPTIONS</>. + via <literal>PGOPTIONS</literal>. </para> </listitem> @@ -3921,8 +3921,8 @@ typedefs (Michael)</para></listitem> </para> <para> It is now useful to issue <command>DECLARE CURSOR</command> in a - <function>Parse</> message with parameters. The parameter values - sent at <function>Bind</> time will be substituted into the + <function>Parse</function> message with parameters. The parameter values + sent at <function>Bind</function> time will be substituted into the execution of the cursor's query. </para> </listitem> @@ -3942,7 +3942,7 @@ typedefs (Michael)</para></listitem> <listitem> <para> - Make <varname>log_duration</> print only when <varname>log_statement</> + Make <varname>log_duration</varname> print only when <varname>log_statement</varname> prints the query (Ed L.) </para> </listitem> @@ -4007,10 +4007,10 @@ typedefs (Michael)</para></listitem> <listitem> <para> - Make <literal>CASE val WHEN compval1 THEN ...</> evaluate <literal>val</> only once (Tom) + Make <literal>CASE val WHEN compval1 THEN ...</literal> evaluate <literal>val</literal> only once (Tom) </para> <para> - <option>CASE</> no longer evaluates the tested expression multiple + <option>CASE</option> no longer evaluates the tested expression multiple times. This has benefits when the expression is complex or is volatile. </para> @@ -4018,20 +4018,20 @@ typedefs (Michael)</para></listitem> <listitem> <para> - Test <option>HAVING</> before computing target list of an + Test <option>HAVING</option> before computing target list of an aggregate query (Tom) </para> <para> Fixes improper failure of cases such as <literal>SELECT SUM(win)/SUM(lose) - ... GROUP BY ... HAVING SUM(lose) > 0</>. This should work but formerly + ... GROUP BY ... HAVING SUM(lose) > 0</literal>. This should work but formerly could fail with divide-by-zero. </para> </listitem> <listitem> <para> - Replace <varname>max_expr_depth</> parameter with - <varname>max_stack_depth</> parameter, measured in kilobytes of stack + Replace <varname>max_expr_depth</varname> parameter with + <varname>max_stack_depth</varname> parameter, measured in kilobytes of stack size (Tom) </para> <para> @@ -4054,7 +4054,7 @@ typedefs (Michael)</para></listitem> <listitem> <para> - Allow <option>LIKE</>/<option>ILIKE</> to be used as the operator + Allow <option>LIKE</option>/<option>ILIKE</option> to be used as the operator in row and subselect comparisons (Fabien Coelho) </para> </listitem> @@ -4065,8 +4065,8 @@ typedefs (Michael)</para></listitem> identifiers and keywords (Tom) </para> <para> - This solves the <quote>Turkish problem</> with mangling of words - containing <literal>I</> and <literal>i</>. Folding of characters + This solves the <quote>Turkish problem</quote> with mangling of words + containing <literal>I</literal> and <literal>i</literal>. Folding of characters outside the 7-bit-ASCII set is still locale-aware. </para> </listitem> @@ -4094,7 +4094,7 @@ typedefs (Michael)</para></listitem> <listitem> <para> - Avoid emitting <option>NATURAL CROSS JOIN</> in rule listings (Tom) + Avoid emitting <option>NATURAL CROSS JOIN</option> in rule listings (Tom) </para> <para> Such a clause makes no logical sense, but in some cases the rule @@ -4112,36 +4112,36 @@ typedefs (Michael)</para></listitem> <listitem> <para> - Add <command>COMMENT ON</> for casts, conversions, languages, + Add <command>COMMENT ON</command> for casts, conversions, languages, operator classes, and large objects (Christopher) </para> </listitem> <listitem> <para> - Add new server configuration parameter <varname>default_with_oids</> to - control whether tables are created with <type>OID</>s by default (Neil) + Add new server configuration parameter <varname>default_with_oids</varname> to + control whether tables are created with <type>OID</type>s by default (Neil) </para> <para> This allows administrators to control whether <command>CREATE - TABLE</command> commands create tables with or without <type>OID</> + TABLE</command> commands create tables with or without <type>OID</type> columns by default. (Note: the current factory default setting for - <varname>default_with_oids</> is <literal>TRUE</>, but the default - will become <literal>FALSE</> in future releases.) + <varname>default_with_oids</varname> is <literal>TRUE</literal>, but the default + will become <literal>FALSE</literal> in future releases.) </para> </listitem> <listitem> <para> - Add <option>WITH</> / <option>WITHOUT OIDS</> clause to + Add <option>WITH</option> / <option>WITHOUT OIDS</option> clause to <command>CREATE TABLE AS</command> (Neil) </para> </listitem> <listitem> <para> - Allow <command>ALTER TABLE DROP COLUMN</> to drop an <type>OID</> - column (<command>ALTER TABLE SET WITHOUT OIDS</> still works) + Allow <command>ALTER TABLE DROP COLUMN</command> to drop an <type>OID</type> + column (<command>ALTER TABLE SET WITHOUT OIDS</command> still works) (Tom) </para> </listitem> @@ -4154,11 +4154,11 @@ typedefs (Michael)</para></listitem> <listitem> <para> - Allow <command>ALTER ... ADD COLUMN</> with defaults and - <option>NOT NULL</> constraints; works per SQL spec (Rod) + Allow <command>ALTER ... ADD COLUMN</command> with defaults and + <option>NOT NULL</option> constraints; works per SQL spec (Rod) </para> <para> - It is now possible for <option>ADD COLUMN</> to create a column + It is now possible for <option>ADD COLUMN</option> to create a column that is not initially filled with NULLs, but with a specified default value. </para> @@ -4166,7 +4166,7 @@ typedefs (Michael)</para></listitem> <listitem> <para> - Add <command>ALTER COLUMN TYPE</> to change column's type (Rod) + Add <command>ALTER COLUMN TYPE</command> to change column's type (Rod) </para> <para> It is now possible to alter a column's data type without dropping @@ -4176,14 +4176,14 @@ typedefs (Michael)</para></listitem> <listitem> <para> - Allow multiple <command>ALTER</> actions in a single <command>ALTER + Allow multiple <command>ALTER</command> actions in a single <command>ALTER TABLE</command> command (Rod) </para> <para> - This is particularly useful for <command>ALTER</> commands that - rewrite the table (which include <option>ALTER COLUMN TYPE</> and - <option>ADD COLUMN</> with a default). By grouping - <command>ALTER</> commands together, the table need be rewritten + This is particularly useful for <command>ALTER</command> commands that + rewrite the table (which include <option>ALTER COLUMN TYPE</option> and + <option>ADD COLUMN</option> with a default). By grouping + <command>ALTER</command> commands together, the table need be rewritten only once. </para> </listitem> @@ -4213,13 +4213,13 @@ typedefs (Michael)</para></listitem> <listitem> <para> Allow temporary object creation to be limited to <option>SECURITY - DEFINER</> functions (Sean Chittenden) + DEFINER</option> functions (Sean Chittenden) </para> </listitem> <listitem> <para> - Add <option>ALTER TABLE ... SET WITHOUT CLUSTER</> (Christopher) + Add <option>ALTER TABLE ... SET WITHOUT CLUSTER</option> (Christopher) </para> <para> Prior to this release, there was no way to clear an auto-cluster @@ -4229,8 +4229,8 @@ typedefs (Michael)</para></listitem> <listitem> <para> - Constraint/Index/<type>SERIAL</> names are now - <replaceable>table_column_type</> + Constraint/Index/<type>SERIAL</type> names are now + <replaceable>table_column_type</replaceable> with numbers appended to guarantee uniqueness within the schema (Tom) </para> @@ -4242,11 +4242,11 @@ typedefs (Michael)</para></listitem> <listitem> <para> - Add <function>pg_get_serial_sequence()</> to return a - <type>SERIAL</> column's sequence name (Christopher) + Add <function>pg_get_serial_sequence()</function> to return a + <type>SERIAL</type> column's sequence name (Christopher) </para> <para> - This allows automated scripts to reliably find the <type>SERIAL</> + This allows automated scripts to reliably find the <type>SERIAL</type> sequence name. </para> </listitem> @@ -4259,14 +4259,14 @@ typedefs (Michael)</para></listitem> <listitem> <para> - New <command>ALTER INDEX</> command to allow moving of indexes + New <command>ALTER INDEX</command> command to allow moving of indexes between tablespaces (Gavin) </para> </listitem> <listitem> <para> - Make <command>ALTER TABLE OWNER</> change dependent sequence + Make <command>ALTER TABLE OWNER</command> change dependent sequence ownership too (Alvaro) </para> </listitem> @@ -4289,18 +4289,18 @@ typedefs (Michael)</para></listitem> <listitem> <para> - Add <option>ALSO</> keyword to <command>CREATE RULE</command> (Fabien + Add <option>ALSO</option> keyword to <command>CREATE RULE</command> (Fabien Coelho) </para> <para> - This allows <option>ALSO</> to be added to rule creation to contrast it with - <option>INSTEAD</> rules. + This allows <option>ALSO</option> to be added to rule creation to contrast it with + <option>INSTEAD</option> rules. </para> </listitem> <listitem> <para> - Add <option>NOWAIT</> option to <command>LOCK</command> (Tatsuo) + Add <option>NOWAIT</option> option to <command>LOCK</command> (Tatsuo) </para> <para> This allows the <command>LOCK</command> command to fail if it @@ -4336,7 +4336,7 @@ typedefs (Michael)</para></listitem> </para> <para> In 7.3 and 7.4, a long-running B-tree index build could block concurrent - <command>CHECKPOINT</>s from completing, thereby causing WAL bloat because the + <command>CHECKPOINT</command>s from completing, thereby causing WAL bloat because the WAL log could not be recycled. </para> </listitem> @@ -4384,11 +4384,11 @@ typedefs (Michael)</para></listitem> <listitem> <para> - New <application>pg_ctl</> <option>kill</> option for Windows (Andrew) + New <application>pg_ctl</application> <option>kill</option> option for Windows (Andrew) </para> <para> - Windows does not have a <literal>kill</> command to send signals to - backends so this capability was added to <application>pg_ctl</>. + Windows does not have a <literal>kill</literal> command to send signals to + backends so this capability was added to <application>pg_ctl</application>. </para> </listitem> @@ -4400,7 +4400,7 @@ typedefs (Michael)</para></listitem> <listitem> <para> - Add <option>--pwfile</> option to + Add <option>--pwfile</option> option to <application>initdb</application> so the initial password can be set by GUI tools (Magnus) </para> @@ -4415,7 +4415,7 @@ typedefs (Michael)</para></listitem> <listitem> <para> - Add <option>register</> command to <application>pg_ctl</> to + Add <option>register</option> command to <application>pg_ctl</application> to register Windows operating system service (Dave Page) </para> </listitem> @@ -4443,7 +4443,7 @@ typedefs (Michael)</para></listitem> Reject nonrectangular array values as erroneous (Joe) </para> <para> - Formerly, <function>array_in</> would silently build a + Formerly, <function>array_in</function> would silently build a surprising result. </para> </listitem> @@ -4457,13 +4457,13 @@ typedefs (Michael)</para></listitem> <listitem> <para> The arithmetic operators associated with the single-byte - <type>"char"</> data type have been removed. + <type>"char"</type> data type have been removed. </para> <para> Formerly, the parser would select these operators in many situations - where an <quote>unable to select an operator</> error would be more - appropriate, such as <literal>null * null</>. If you actually want - to do arithmetic on a <type>"char"</> column, you can cast it to + where an <quote>unable to select an operator</quote> error would be more + appropriate, such as <literal>null * null</literal>. If you actually want + to do arithmetic on a <type>"char"</type> column, you can cast it to integer explicitly. </para> </listitem> @@ -4474,7 +4474,7 @@ typedefs (Michael)</para></listitem> </para> <para> Junk that was previously allowed in odd places with odd results - now causes an <literal>ERROR</>, for example, non-whitespace + now causes an <literal>ERROR</literal>, for example, non-whitespace after the closing right brace. </para> </listitem> @@ -4482,7 +4482,7 @@ typedefs (Michael)</para></listitem> <listitem> <para> Empty-string array element values must now be written as - <literal>""</>, rather than writing nothing (Joe) + <literal>""</literal>, rather than writing nothing (Joe) </para> <para> Formerly, both ways of writing an empty-string element value were @@ -4512,13 +4512,13 @@ typedefs (Michael)</para></listitem> <listitem> <para> - Accept <literal>YYYY-monthname-DD</> as a date string (Tom) + Accept <literal>YYYY-monthname-DD</literal> as a date string (Tom) </para> </listitem> <listitem> <para> - Make <function>netmask</> and <function>hostmask</> functions + Make <function>netmask</function> and <function>hostmask</function> functions return maximum-length mask length (Tom) </para> </listitem> @@ -4535,27 +4535,27 @@ typedefs (Michael)</para></listitem> <listitem> <para> - <function>to_char</>/<function>to_date()</> date conversion + <function>to_char</function>/<function>to_date()</function> date conversion improvements (Kurt Roeckx, Fabien Coelho) </para> </listitem> <listitem> <para> - Make <function>length()</> disregard trailing spaces in - <type>CHAR(n)</> (Gavin) + Make <function>length()</function> disregard trailing spaces in + <type>CHAR(n)</type> (Gavin) </para> <para> This change was made to improve consistency: trailing spaces are - semantically insignificant in <type>CHAR(n)</> data, so they - should not be counted by <function>length()</>. + semantically insignificant in <type>CHAR(n)</type> data, so they + should not be counted by <function>length()</function>. </para> </listitem> <listitem> <para> Warn about empty string being passed to - <type>OID</>/<type>float4</>/<type>float8</> data types (Neil) + <type>OID</type>/<type>float4</type>/<type>float8</type> data types (Neil) </para> <para> 8.1 will throw an error instead. @@ -4565,7 +4565,7 @@ typedefs (Michael)</para></listitem> <listitem> <para> Allow leading or trailing whitespace in - <type>int2</>/<type>int4</>/<type>int8</>/<type>float4</>/<type>float8</> + <type>int2</type>/<type>int4</type>/<type>int8</type>/<type>float4</type>/<type>float8</type> input routines (Neil) </para> @@ -4573,7 +4573,7 @@ typedefs (Michael)</para></listitem> <listitem> <para> - Better support for IEEE <literal>Infinity</> and <literal>NaN</> + Better support for IEEE <literal>Infinity</literal> and <literal>NaN</literal> values in <type>float4</type>/<type>float8</type> (Neil) </para> <para> @@ -4584,27 +4584,27 @@ typedefs (Michael)</para></listitem> <listitem> <para> - Add <option>week</> option to <function>date_trunc()</> (Robert Creager) + Add <option>week</option> option to <function>date_trunc()</function> (Robert Creager) </para> </listitem> <listitem> <para> - Fix <function>to_char</function> for <literal>1 BC</> - (previously it returned <literal>1 AD</>) (Bruce) + Fix <function>to_char</function> for <literal>1 BC</literal> + (previously it returned <literal>1 AD</literal>) (Bruce) </para> </listitem> <listitem> <para> - Fix <function>date_part(year)</> for BC dates (previously it + Fix <function>date_part(year)</function> for BC dates (previously it returned one less than the correct year) (Bruce) </para> </listitem> <listitem> <para> - Fix <function>date_part()</> to return the proper millennium and + Fix <function>date_part()</function> to return the proper millennium and century (Fabien Coelho) </para> <para> @@ -4616,44 +4616,44 @@ typedefs (Michael)</para></listitem> <listitem> <para> - Add <function>ceiling()</> as an alias for <function>ceil()</>, - and <function>power()</> as an alias for <function>pow()</> for + Add <function>ceiling()</function> as an alias for <function>ceil()</function>, + and <function>power()</function> as an alias for <function>pow()</function> for standards compliance (Neil) </para> </listitem> <listitem> <para> - Change <function>ln()</>, <function>log()</>, - <function>power()</>, and <function>sqrt()</> to emit the correct - <literal>SQLSTATE</> error codes for certain error conditions, as + Change <function>ln()</function>, <function>log()</function>, + <function>power()</function>, and <function>sqrt()</function> to emit the correct + <literal>SQLSTATE</literal> error codes for certain error conditions, as specified by SQL:2003 (Neil) </para> </listitem> <listitem> <para> - Add <function>width_bucket()</> function as defined by SQL:2003 (Neil) + Add <function>width_bucket()</function> function as defined by SQL:2003 (Neil) </para> </listitem> <listitem> <para> - Add <function>generate_series()</> functions to simplify working + Add <function>generate_series()</function> functions to simplify working with numeric sets (Joe) </para> </listitem> <listitem> <para> - Fix <function>upper/lower/initcap()</> functions to work with + Fix <function>upper/lower/initcap()</function> functions to work with multibyte encodings (Tom) </para> </listitem> <listitem> <para> - Add boolean and bitwise integer <option>AND</>/<option>OR</> + Add boolean and bitwise integer <option>AND</option>/<option>OR</option> aggregates (Fabien Coelho) </para> </listitem> @@ -4679,17 +4679,17 @@ typedefs (Michael)</para></listitem> <listitem> <para> - Add <type>interval</> plus <type>datetime</> operators (Tom) + Add <type>interval</type> plus <type>datetime</type> operators (Tom) </para> <para> - The reverse ordering, <type>datetime</> plus <type>interval</>, + The reverse ordering, <type>datetime</type> plus <type>interval</type>, was already supported, but both are required by the SQL standard. </para> </listitem> <listitem> <para> - Casting an integer to <type>BIT(N)</> selects the rightmost N bits + Casting an integer to <type>BIT(N)</type> selects the rightmost N bits of the integer (Tom) </para> @@ -4702,7 +4702,7 @@ typedefs (Michael)</para></listitem> <listitem> <para> - Require <type>CIDR</> values to have all nonmasked bits be zero + Require <type>CIDR</type> values to have all nonmasked bits be zero (Kevin Brintnall) </para> </listitem> @@ -4717,7 +4717,7 @@ typedefs (Michael)</para></listitem> <listitem> <para> - In <literal>READ COMMITTED</> serialization mode, volatile functions + In <literal>READ COMMITTED</literal> serialization mode, volatile functions now see the results of concurrent transactions committed up to the beginning of each statement within the function, rather than up to the beginning of the interactive command that called the function. @@ -4726,20 +4726,20 @@ typedefs (Michael)</para></listitem> <listitem> <para> - Functions declared <literal>STABLE</> or <literal>IMMUTABLE</> always + Functions declared <literal>STABLE</literal> or <literal>IMMUTABLE</literal> always use the snapshot of the calling query, and therefore do not see the effects of actions taken after the calling query starts, whether in their own transaction or other transactions. Such a function must be read-only, too, meaning that it cannot use any SQL commands other than - <command>SELECT</>. There is a considerable performance gain from - declaring a function <literal>STABLE</> or <literal>IMMUTABLE</> - rather than <literal>VOLATILE</>. + <command>SELECT</command>. There is a considerable performance gain from + declaring a function <literal>STABLE</literal> or <literal>IMMUTABLE</literal> + rather than <literal>VOLATILE</literal>. </para> </listitem> <listitem> <para> - Nondeferred <option>AFTER</> triggers are now fired immediately + Nondeferred <option>AFTER</option> triggers are now fired immediately after completion of the triggering query, rather than upon finishing the current interactive command. This makes a difference when the triggering query occurred within a function: the trigger @@ -4801,8 +4801,8 @@ typedefs (Michael)</para></listitem> Improve parsing of PL/pgSQL FOR loops (Tom) </para> <para> - Parsing is now driven by presence of <literal>".."</> rather than - data type of <option>FOR</> variable. This makes no difference for + Parsing is now driven by presence of <literal>".."</literal> rather than + data type of <option>FOR</option> variable. This makes no difference for correct functions, but should result in more understandable error messages when a mistake is made. </para> @@ -4818,18 +4818,18 @@ typedefs (Michael)</para></listitem> <para> In PL/Tcl, SPI commands are now run in subtransactions. If an error occurs, the subtransaction is cleaned up and the error is reported - as an ordinary Tcl error, which can be trapped with <literal>catch</>. + as an ordinary Tcl error, which can be trapped with <literal>catch</literal>. Formerly, it was not possible to catch such errors. </para> </listitem> <listitem> <para> - Accept <command>ELSEIF</> in PL/pgSQL (Neil) + Accept <command>ELSEIF</command> in PL/pgSQL (Neil) </para> <para> - Previously PL/pgSQL only allowed <command>ELSIF</>, but many people - are accustomed to spelling this keyword <command>ELSEIF</>. + Previously PL/pgSQL only allowed <command>ELSIF</command>, but many people + are accustomed to spelling this keyword <command>ELSEIF</command>. </para> </listitem> @@ -4838,47 +4838,47 @@ typedefs (Michael)</para></listitem> <sect3> - <title><application>psql</> Changes</title> + <title><application>psql</application> Changes</title> <itemizedlist> <listitem> <para> - Improve <application>psql</> information display about database + Improve <application>psql</application> information display about database objects (Christopher) </para> </listitem> <listitem> <para> - Allow <application>psql</> to display group membership in - <command>\du</> and <command>\dg</> (Markus Bertheau) + Allow <application>psql</application> to display group membership in + <command>\du</command> and <command>\dg</command> (Markus Bertheau) </para> </listitem> <listitem> <para> - Prevent <application>psql</> <command>\dn</command> from showing + Prevent <application>psql</application> <command>\dn</command> from showing temporary schemas (Bruce) </para> </listitem> <listitem> <para> - Allow <application>psql</> to handle tilde user expansion for file + Allow <application>psql</application> to handle tilde user expansion for file names (Zach Irmen) </para> </listitem> <listitem> <para> - Allow <application>psql</> to display fancy prompts, including - color, via <application>readline</> (Reece Hart, Chet Ramey) + Allow <application>psql</application> to display fancy prompts, including + color, via <application>readline</application> (Reece Hart, Chet Ramey) </para> </listitem> <listitem> <para> - Make <application>psql</> <command>\copy</> match <command>COPY</command> command syntax + Make <application>psql</application> <command>\copy</command> match <command>COPY</command> command syntax fully (Tom) </para> </listitem> @@ -4891,55 +4891,55 @@ typedefs (Michael)</para></listitem> <listitem> <para> - Add <command>CLUSTER</command> information to <application>psql</> - <command>\d</> display + Add <command>CLUSTER</command> information to <application>psql</application> + <command>\d</command> display (Bruce) </para> </listitem> <listitem> <para> - Change <application>psql</> <command>\copy stdin/stdout</> to read + Change <application>psql</application> <command>\copy stdin/stdout</command> to read from command input/output (Bruce) </para> </listitem> <listitem> <para> - Add <option>pstdin</>/<option>pstdout</> to read from - <application>psql</>'s <literal>stdin</>/<literal>stdout</> (Mark + Add <option>pstdin</option>/<option>pstdout</option> to read from + <application>psql</application>'s <literal>stdin</literal>/<literal>stdout</literal> (Mark Feit) </para> </listitem> <listitem> <para> - Add global <application>psql</> configuration file, <filename>psqlrc.sample</filename> + Add global <application>psql</application> configuration file, <filename>psqlrc.sample</filename> (Bruce) </para> <para> - This allows a central file where global <application>psql</> startup commands can + This allows a central file where global <application>psql</application> startup commands can be stored. </para> </listitem> <listitem> <para> - Have <application>psql</> <command>\d+</> indicate if the table - has an <type>OID</> column (Neil) + Have <application>psql</application> <command>\d+</command> indicate if the table + has an <type>OID</type> column (Neil) </para> </listitem> <listitem> <para> - On Windows, use binary mode in <application>psql</> when reading files so control-Z + On Windows, use binary mode in <application>psql</application> when reading files so control-Z is not seen as end-of-file </para> </listitem> <listitem> <para> - Have <command>\dn+</> show permissions and description for schemas (Dennis + Have <command>\dn+</command> show permissions and description for schemas (Dennis Björklund) </para> </listitem> @@ -4961,13 +4961,13 @@ typedefs (Michael)</para></listitem> <sect3> - <title><application>pg_dump</> Changes</title> + <title><application>pg_dump</application> Changes</title> <itemizedlist> <listitem> <para> Use dependency information to improve the reliability of - <application>pg_dump</> (Tom) + <application>pg_dump</application> (Tom) </para> <para> This should solve the longstanding problems with related objects @@ -4977,7 +4977,7 @@ typedefs (Michael)</para></listitem> <listitem> <para> - Have <application>pg_dump</> output objects in alphabetical order if possible (Tom) + Have <application>pg_dump</application> output objects in alphabetical order if possible (Tom) </para> <para> This should make it easier to identify changes between @@ -4987,12 +4987,12 @@ typedefs (Michael)</para></listitem> <listitem> <para> - Allow <application>pg_restore</> to ignore some SQL errors (Fabien Coelho) + Allow <application>pg_restore</application> to ignore some SQL errors (Fabien Coelho) </para> <para> - This makes <application>pg_restore</>'s behavior similar to the - results of feeding a <application>pg_dump</> output script to - <application>psql</>. In most cases, ignoring errors and plowing + This makes <application>pg_restore</application>'s behavior similar to the + results of feeding a <application>pg_dump</application> output script to + <application>psql</application>. In most cases, ignoring errors and plowing ahead is the most useful thing to do. Also added was a pg_restore option to give the old behavior of exiting on an error. </para> @@ -5000,36 +5000,36 @@ typedefs (Michael)</para></listitem> <listitem> <para> - <application>pg_restore</> <option>-l</> display now includes + <application>pg_restore</application> <option>-l</option> display now includes objects' schema names </para> </listitem> <listitem> <para> - New begin/end markers in <application>pg_dump</> text output (Bruce) + New begin/end markers in <application>pg_dump</application> text output (Bruce) </para> </listitem> <listitem> <para> Add start/stop times for - <application>pg_dump</>/<application>pg_dumpall</> in verbose mode + <application>pg_dump</application>/<application>pg_dumpall</application> in verbose mode (Bruce) </para> </listitem> <listitem> <para> - Allow most <application>pg_dump</> options in - <application>pg_dumpall</> (Christopher) + Allow most <application>pg_dump</application> options in + <application>pg_dumpall</application> (Christopher) </para> </listitem> <listitem> <para> - Have <application>pg_dump</> use <command>ALTER OWNER</> rather - than <command>SET SESSION AUTHORIZATION</> by default + Have <application>pg_dump</application> use <command>ALTER OWNER</command> rather + than <command>SET SESSION AUTHORIZATION</command> by default (Christopher) </para> </listitem> @@ -5044,42 +5044,42 @@ typedefs (Michael)</para></listitem> <listitem> <para> - Make libpq's <option>SIGPIPE</> handling thread-safe (Bruce) + Make libpq's <option>SIGPIPE</option> handling thread-safe (Bruce) </para> </listitem> <listitem> <para> - Add <function>PQmbdsplen()</> which returns the display length + Add <function>PQmbdsplen()</function> which returns the display length of a character (Tatsuo) </para> </listitem> <listitem> <para> - Add thread locking to <application>SSL</> and - <application>Kerberos</> connections (Manfred Spraul) + Add thread locking to <application>SSL</application> and + <application>Kerberos</application> connections (Manfred Spraul) </para> </listitem> <listitem> <para> - Allow <function>PQoidValue()</>, <function>PQcmdTuples()</>, and - <function>PQoidStatus()</> to work on <command>EXECUTE</command> + Allow <function>PQoidValue()</function>, <function>PQcmdTuples()</function>, and + <function>PQoidStatus()</function> to work on <command>EXECUTE</command> commands (Neil) </para> </listitem> <listitem> <para> - Add <function>PQserverVersion()</> to provide more convenient + Add <function>PQserverVersion()</function> to provide more convenient access to the server version number (Greg Sabino Mullane) </para> </listitem> <listitem> <para> - Add <function>PQprepare/PQsendPrepared()</> functions to support + Add <function>PQprepare/PQsendPrepared()</function> functions to support preparing statements without necessarily specifying the data types of their parameters (Abhijit Menon-Sen) </para> @@ -5087,7 +5087,7 @@ typedefs (Michael)</para></listitem> <listitem> <para> - Many ECPG improvements, including <command>SET DESCRIPTOR</> (Michael) + Many ECPG improvements, including <command>SET DESCRIPTOR</command> (Michael) </para> </listitem> @@ -5127,7 +5127,7 @@ typedefs (Michael)</para></listitem> </para> <para> Directory paths for installed files (such as the - <filename>/share</> directory) are now computed relative to the + <filename>/share</filename> directory) are now computed relative to the actual location of the executables, so that an installation tree can be moved to another place without reconfiguring and rebuilding. @@ -5136,31 +5136,31 @@ typedefs (Michael)</para></listitem> <listitem> <para> - Use <option>--with-docdir</> to choose installation location of documentation; also - allow <option>--infodir</> (Peter) + Use <option>--with-docdir</option> to choose installation location of documentation; also + allow <option>--infodir</option> (Peter) </para> </listitem> <listitem> <para> - Add <option>--without-docdir</> to prevent installation of documentation (Peter) + Add <option>--without-docdir</option> to prevent installation of documentation (Peter) </para> </listitem> <listitem> <para> - Upgrade to <application>DocBook</> V4.2 SGML (Peter) + Upgrade to <application>DocBook</application> V4.2 SGML (Peter) </para> </listitem> <listitem> <para> - New <literal>PostgreSQL</> <application>CVS</> tag (Marc) + New <literal>PostgreSQL</literal> <application>CVS</application> tag (Marc) </para> <para> This was done to make it easier for organizations to manage their own copies of the <productname>PostgreSQL</productname> - <application>CVS</> repository. File version stamps from the master + <application>CVS</application> repository. File version stamps from the master repository will not get munged by checking into or out of a copied repository. </para> @@ -5186,7 +5186,7 @@ typedefs (Michael)</para></listitem> <listitem> <para> - Add inlined test-and-set code on PA-RISC for <application>gcc</> + Add inlined test-and-set code on PA-RISC for <application>gcc</application> (ViSolve, Tom) </para> </listitem> @@ -5200,7 +5200,7 @@ typedefs (Michael)</para></listitem> <listitem> <para> Clean up spinlock assembly code to avoid warnings from newer - <application>gcc</> releases (Tom) + <application>gcc</application> releases (Tom) </para> </listitem> @@ -5230,7 +5230,7 @@ typedefs (Michael)</para></listitem> <listitem> <para> - New <function>fsync()</> test program (Bruce) + New <function>fsync()</function> test program (Bruce) </para> </listitem> @@ -5268,7 +5268,7 @@ typedefs (Michael)</para></listitem> <listitem> <para> - Use Olson's public domain <application>timezone</> library (Magnus) + Use Olson's public domain <application>timezone</application> library (Magnus) </para> </listitem> @@ -5285,7 +5285,7 @@ typedefs (Michael)</para></listitem> <listitem> <para> - <application>psql</> now uses a <application>flex</>-generated + <application>psql</application> now uses a <application>flex</application>-generated lexical analyzer to process command strings </para> </listitem> @@ -5322,7 +5322,7 @@ typedefs (Michael)</para></listitem> <listitem> <para> - New <application>pgevent</> for Windows logging + New <application>pgevent</application> for Windows logging </para> </listitem> @@ -5342,19 +5342,19 @@ typedefs (Michael)</para></listitem> <listitem> <para> - Overhaul of <filename>contrib/dblink</> (Joe) + Overhaul of <filename>contrib/dblink</filename> (Joe) </para> </listitem> <listitem> <para> - <filename>contrib/dbmirror</> improvements (Steven Singer) + <filename>contrib/dbmirror</filename> improvements (Steven Singer) </para> </listitem> <listitem> <para> - New <filename>contrib/xml2</> (John Gray, Torchbox) + New <filename>contrib/xml2</filename> (John Gray, Torchbox) </para> </listitem> @@ -5366,51 +5366,51 @@ typedefs (Michael)</para></listitem> <listitem> <para> - New version of <filename>contrib/btree_gist</> (Teodor) + New version of <filename>contrib/btree_gist</filename> (Teodor) </para> </listitem> <listitem> <para> - New <filename>contrib/trgm</>, trigram matching for + New <filename>contrib/trgm</filename>, trigram matching for <productname>PostgreSQL</productname> (Teodor) </para> </listitem> <listitem> <para> - Many <filename>contrib/tsearch2</> improvements (Teodor) + Many <filename>contrib/tsearch2</filename> improvements (Teodor) </para> </listitem> <listitem> <para> - Add double metaphone to <filename>contrib/fuzzystrmatch</> (Andrew) + Add double metaphone to <filename>contrib/fuzzystrmatch</filename> (Andrew) </para> </listitem> <listitem> <para> - Allow <filename>contrib/pg_autovacuum</> to run as a Windows service (Dave Page) + Allow <filename>contrib/pg_autovacuum</filename> to run as a Windows service (Dave Page) </para> </listitem> <listitem> <para> - Add functions to <filename>contrib/dbsize</> (Andreas Pflug) + Add functions to <filename>contrib/dbsize</filename> (Andreas Pflug) </para> </listitem> <listitem> <para> - Removed <filename>contrib/pg_logger</>: obsoleted by integrated logging + Removed <filename>contrib/pg_logger</filename>: obsoleted by integrated logging subprocess </para> </listitem> <listitem> <para> - Removed <filename>contrib/rserv</>: obsoleted by various separate projects + Removed <filename>contrib/rserv</filename>: obsoleted by various separate projects </para> </listitem> diff --git a/doc/src/sgml/release-8.1.sgml b/doc/src/sgml/release-8.1.sgml index d48bccd17df..6827afd7e00 100644 --- a/doc/src/sgml/release-8.1.sgml +++ b/doc/src/sgml/release-8.1.sgml @@ -16,7 +16,7 @@ </para> <para> - This is expected to be the last <productname>PostgreSQL</> release + This is expected to be the last <productname>PostgreSQL</productname> release in the 8.1.X series. Users are encouraged to update to a newer release branch soon. </para> @@ -40,17 +40,17 @@ <listitem> <para> Force the default - <link linkend="guc-wal-sync-method"><varname>wal_sync_method</></link> - to be <literal>fdatasync</> on Linux (Tom Lane, Marti Raudsepp) + <link linkend="guc-wal-sync-method"><varname>wal_sync_method</varname></link> + to be <literal>fdatasync</literal> on Linux (Tom Lane, Marti Raudsepp) </para> <para> - The default on Linux has actually been <literal>fdatasync</> for many - years, but recent kernel changes caused <productname>PostgreSQL</> to - choose <literal>open_datasync</> instead. This choice did not result + The default on Linux has actually been <literal>fdatasync</literal> for many + years, but recent kernel changes caused <productname>PostgreSQL</productname> to + choose <literal>open_datasync</literal> instead. This choice did not result in any performance improvement, and caused outright failures on - certain filesystems, notably <literal>ext4</> with the - <literal>data=journal</> mount option. + certain filesystems, notably <literal>ext4</literal> with the + <literal>data=journal</literal> mount option. </para> </listitem> @@ -63,19 +63,19 @@ <listitem> <para> - Add support for detecting register-stack overrun on <literal>IA64</> + Add support for detecting register-stack overrun on <literal>IA64</literal> (Tom Lane) </para> <para> - The <literal>IA64</> architecture has two hardware stacks. Full + The <literal>IA64</literal> architecture has two hardware stacks. Full prevention of stack-overrun failures requires checking both. </para> </listitem> <listitem> <para> - Add a check for stack overflow in <function>copyObject()</> (Tom Lane) + Add a check for stack overflow in <function>copyObject()</function> (Tom Lane) </para> <para> @@ -91,7 +91,7 @@ </para> <para> - It is possible to have a <quote>concurrent</> page split in a + It is possible to have a <quote>concurrent</quote> page split in a temporary index, if for example there is an open cursor scanning the index when an insertion is done. GiST failed to detect this case and hence could deliver wrong results when execution of the cursor @@ -101,7 +101,7 @@ <listitem> <para> - Avoid memory leakage while <command>ANALYZE</>'ing complex index + Avoid memory leakage while <command>ANALYZE</command>'ing complex index expressions (Tom Lane) </para> </listitem> @@ -113,14 +113,14 @@ </para> <para> - An index declared like <literal>create index i on t (foo(t.*))</> + An index declared like <literal>create index i on t (foo(t.*))</literal> would not automatically get dropped when its table was dropped. </para> </listitem> <listitem> <para> - Do not <quote>inline</> a SQL function with multiple <literal>OUT</> + Do not <quote>inline</quote> a SQL function with multiple <literal>OUT</literal> parameters (Tom Lane) </para> @@ -132,7 +132,7 @@ <listitem> <para> - Fix constant-folding of <literal>COALESCE()</> expressions (Tom Lane) + Fix constant-folding of <literal>COALESCE()</literal> expressions (Tom Lane) </para> <para> @@ -143,11 +143,11 @@ <listitem> <para> - Add print functionality for <structname>InhRelation</> nodes (Tom Lane) + Add print functionality for <structname>InhRelation</structname> nodes (Tom Lane) </para> <para> - This avoids a failure when <varname>debug_print_parse</> is enabled + This avoids a failure when <varname>debug_print_parse</varname> is enabled and certain types of query are executed. </para> </listitem> @@ -166,29 +166,29 @@ <listitem> <para> - Fix <application>PL/pgSQL</>'s handling of <quote>simple</> + Fix <application>PL/pgSQL</application>'s handling of <quote>simple</quote> expressions to not fail in recursion or error-recovery cases (Tom Lane) </para> </listitem> <listitem> <para> - Fix bug in <filename>contrib/cube</>'s GiST picksplit algorithm + Fix bug in <filename>contrib/cube</filename>'s GiST picksplit algorithm (Alexander Korotkov) </para> <para> This could result in considerable inefficiency, though not actually - incorrect answers, in a GiST index on a <type>cube</> column. - If you have such an index, consider <command>REINDEX</>ing it after + incorrect answers, in a GiST index on a <type>cube</type> column. + If you have such an index, consider <command>REINDEX</command>ing it after installing this update. </para> </listitem> <listitem> <para> - Don't emit <quote>identifier will be truncated</> notices in - <filename>contrib/dblink</> except when creating new connections + Don't emit <quote>identifier will be truncated</quote> notices in + <filename>contrib/dblink</filename> except when creating new connections (Itagaki Takahiro) </para> </listitem> @@ -196,20 +196,20 @@ <listitem> <para> Fix potential coredump on missing public key in - <filename>contrib/pgcrypto</> (Marti Raudsepp) + <filename>contrib/pgcrypto</filename> (Marti Raudsepp) </para> </listitem> <listitem> <para> - Fix memory leak in <filename>contrib/xml2</>'s XPath query functions + Fix memory leak in <filename>contrib/xml2</filename>'s XPath query functions (Tom Lane) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2010o + Update time zone data files to <application>tzdata</application> release 2010o for DST law changes in Fiji and Samoa; also historical corrections for Hong Kong. </para> @@ -235,7 +235,7 @@ </para> <para> - The <productname>PostgreSQL</> community will stop releasing updates + The <productname>PostgreSQL</productname> community will stop releasing updates for the 8.1.X release series in November 2010. Users are encouraged to update to a newer release branch soon. </para> @@ -266,7 +266,7 @@ This change prevents security problems that can be caused by subverting Perl or Tcl code that will be executed later in the same session under another SQL user identity (for example, within a <literal>SECURITY - DEFINER</> function). Most scripting languages offer numerous ways that + DEFINER</literal> function). Most scripting languages offer numerous ways that that might be done, such as redefining standard functions or operators called by the target function. Without this change, any SQL user with Perl or Tcl language usage rights can do essentially anything with the @@ -295,7 +295,7 @@ <listitem> <para> - Prevent possible crashes in <function>pg_get_expr()</> by disallowing + Prevent possible crashes in <function>pg_get_expr()</function> by disallowing it from being called with an argument that is not one of the system catalog columns it's intended to be used with (Heikki Linnakangas, Tom Lane) @@ -337,7 +337,7 @@ <listitem> <para> Take care to fsync the contents of lockfiles (both - <filename>postmaster.pid</> and the socket lockfile) while writing them + <filename>postmaster.pid</filename> and the socket lockfile) while writing them (Tom Lane) </para> @@ -363,7 +363,7 @@ <listitem> <para> - Fix <varname>log_line_prefix</>'s <literal>%i</> escape, + Fix <varname>log_line_prefix</varname>'s <literal>%i</literal> escape, which could produce junk early in backend startup (Tom Lane) </para> </listitem> @@ -371,28 +371,28 @@ <listitem> <para> Fix possible data corruption in <command>ALTER TABLE ... SET - TABLESPACE</> when archiving is enabled (Jeff Davis) + TABLESPACE</command> when archiving is enabled (Jeff Davis) </para> </listitem> <listitem> <para> - Allow <command>CREATE DATABASE</> and <command>ALTER DATABASE ... SET - TABLESPACE</> to be interrupted by query-cancel (Guillaume Lelarge) + Allow <command>CREATE DATABASE</command> and <command>ALTER DATABASE ... SET + TABLESPACE</command> to be interrupted by query-cancel (Guillaume Lelarge) </para> </listitem> <listitem> <para> In PL/Python, defend against null pointer results from - <function>PyCObject_AsVoidPtr</> and <function>PyCObject_FromVoidPtr</> + <function>PyCObject_AsVoidPtr</function> and <function>PyCObject_FromVoidPtr</function> (Peter Eisentraut) </para> </listitem> <listitem> <para> - Improve <filename>contrib/dblink</>'s handling of tables containing + Improve <filename>contrib/dblink</filename>'s handling of tables containing dropped columns (Tom Lane) </para> </listitem> @@ -400,13 +400,13 @@ <listitem> <para> Fix connection leak after <quote>duplicate connection name</quote> - errors in <filename>contrib/dblink</> (Itagaki Takahiro) + errors in <filename>contrib/dblink</filename> (Itagaki Takahiro) </para> </listitem> <listitem> <para> - Fix <filename>contrib/dblink</> to handle connection names longer than + Fix <filename>contrib/dblink</filename> to handle connection names longer than 62 bytes correctly (Itagaki Takahiro) </para> </listitem> @@ -420,7 +420,7 @@ <listitem> <para> - Update time zone data files to <application>tzdata</> release 2010l + Update time zone data files to <application>tzdata</application> release 2010l for DST law changes in Egypt and Palestine; also historical corrections for Finland. </para> @@ -470,19 +470,19 @@ <listitem> <para> - Enforce restrictions in <literal>plperl</> using an opmask applied to - the whole interpreter, instead of using <filename>Safe.pm</> + Enforce restrictions in <literal>plperl</literal> using an opmask applied to + the whole interpreter, instead of using <filename>Safe.pm</filename> (Tim Bunce, Andrew Dunstan) </para> <para> - Recent developments have convinced us that <filename>Safe.pm</> is too - insecure to rely on for making <literal>plperl</> trustable. This - change removes use of <filename>Safe.pm</> altogether, in favor of using + Recent developments have convinced us that <filename>Safe.pm</filename> is too + insecure to rely on for making <literal>plperl</literal> trustable. This + change removes use of <filename>Safe.pm</filename> altogether, in favor of using a separate interpreter with an opcode mask that is always applied. Pleasant side effects of the change include that it is now possible to - use Perl's <literal>strict</> pragma in a natural way in - <literal>plperl</>, and that Perl's <literal>$a</> and <literal>$b</> + use Perl's <literal>strict</literal> pragma in a natural way in + <literal>plperl</literal>, and that Perl's <literal>$a</literal> and <literal>$b</literal> variables work as expected in sort routines, and that function compilation is significantly faster. (CVE-2010-1169) </para> @@ -491,19 +491,19 @@ <listitem> <para> Prevent PL/Tcl from executing untrustworthy code from - <structname>pltcl_modules</> (Tom) + <structname>pltcl_modules</structname> (Tom) </para> <para> PL/Tcl's feature for autoloading Tcl code from a database table could be exploited for trojan-horse attacks, because there was no restriction on who could create or insert into that table. This change - disables the feature unless <structname>pltcl_modules</> is owned by a + disables the feature unless <structname>pltcl_modules</structname> is owned by a superuser. (However, the permissions on the table are not checked, so installations that really need a less-than-secure modules table can still grant suitable privileges to trusted non-superusers.) Also, - prevent loading code into the unrestricted <quote>normal</> Tcl - interpreter unless we are really going to execute a <literal>pltclu</> + prevent loading code into the unrestricted <quote>normal</quote> Tcl + interpreter unless we are really going to execute a <literal>pltclu</literal> function. (CVE-2010-1170) </para> </listitem> @@ -516,10 +516,10 @@ <para> Previously, if an unprivileged user ran <literal>ALTER USER ... RESET - ALL</> for himself, or <literal>ALTER DATABASE ... RESET ALL</> for + ALL</literal> for himself, or <literal>ALTER DATABASE ... RESET ALL</literal> for a database he owns, this would remove all special parameter settings for the user or database, even ones that are only supposed to be - changeable by a superuser. Now, the <command>ALTER</> will only + changeable by a superuser. Now, the <command>ALTER</command> will only remove the parameters that the user has permission to change. </para> </listitem> @@ -527,7 +527,7 @@ <listitem> <para> Avoid possible crash during backend shutdown if shutdown occurs - when a <literal>CONTEXT</> addition would be made to log entries (Tom) + when a <literal>CONTEXT</literal> addition would be made to log entries (Tom) </para> <para> @@ -539,7 +539,7 @@ <listitem> <para> - Update PL/Perl's <filename>ppport.h</> for modern Perl versions + Update PL/Perl's <filename>ppport.h</filename> for modern Perl versions (Andrew) </para> </listitem> @@ -552,14 +552,14 @@ <listitem> <para> - Prevent infinite recursion in <application>psql</> when expanding + Prevent infinite recursion in <application>psql</application> when expanding a variable that refers to itself (Tom) </para> </listitem> <listitem> <para> - Ensure that <filename>contrib/pgstattuple</> functions respond to cancel + Ensure that <filename>contrib/pgstattuple</filename> functions respond to cancel interrupts promptly (Tatsuhito Kasahara) </para> </listitem> @@ -567,7 +567,7 @@ <listitem> <para> Make server startup deal properly with the case that - <function>shmget()</> returns <literal>EINVAL</> for an existing + <function>shmget()</function> returns <literal>EINVAL</literal> for an existing shared memory segment (Tom) </para> @@ -580,7 +580,7 @@ <listitem> <para> - Update time zone data files to <application>tzdata</> release 2010j + Update time zone data files to <application>tzdata</application> release 2010j for DST law changes in Argentina, Australian Antarctic, Bangladesh, Mexico, Morocco, Pakistan, Palestine, Russia, Syria, Tunisia; also historical corrections for Taiwan. @@ -624,7 +624,7 @@ <listitem> <para> - Add new configuration parameter <varname>ssl_renegotiation_limit</> to + Add new configuration parameter <varname>ssl_renegotiation_limit</varname> to control how often we do session key renegotiation for an SSL connection (Magnus) </para> @@ -653,8 +653,8 @@ <listitem> <para> - Make <function>substring()</> for <type>bit</> types treat any negative - length as meaning <quote>all the rest of the string</> (Tom) + Make <function>substring()</function> for <type>bit</type> types treat any negative + length as meaning <quote>all the rest of the string</quote> (Tom) </para> <para> @@ -680,7 +680,7 @@ <listitem> <para> - Fix the <literal>STOP WAL LOCATION</> entry in backup history files to + Fix the <literal>STOP WAL LOCATION</literal> entry in backup history files to report the next WAL segment's name when the end location is exactly at a segment boundary (Itagaki Takahiro) </para> @@ -700,17 +700,17 @@ <listitem> <para> - When reading <filename>pg_hba.conf</> and related files, do not treat - <literal>@something</> as a file inclusion request if the <literal>@</> - appears inside quote marks; also, never treat <literal>@</> by itself + When reading <filename>pg_hba.conf</filename> and related files, do not treat + <literal>@something</literal> as a file inclusion request if the <literal>@</literal> + appears inside quote marks; also, never treat <literal>@</literal> by itself as a file inclusion request (Tom) </para> <para> This prevents erratic behavior if a role or database name starts with - <literal>@</>. If you need to include a file whose path name + <literal>@</literal>. If you need to include a file whose path name contains spaces, you can still do so, but you must write - <literal>@"/path to/file"</> rather than putting the quotes around + <literal>@"/path to/file"</literal> rather than putting the quotes around the whole construct. </para> </listitem> @@ -718,14 +718,14 @@ <listitem> <para> Prevent infinite loop on some platforms if a directory is named as - an inclusion target in <filename>pg_hba.conf</> and related files + an inclusion target in <filename>pg_hba.conf</filename> and related files (Tom) </para> </listitem> <listitem> <para> - Fix <application>psql</>'s <literal>numericlocale</> option to not + Fix <application>psql</application>'s <literal>numericlocale</literal> option to not format strings it shouldn't in latex and troff output formats (Heikki) </para> </listitem> @@ -739,7 +739,7 @@ <listitem> <para> - Add <literal>volatile</> markings in PL/Python to avoid possible + Add <literal>volatile</literal> markings in PL/Python to avoid possible compiler-specific misbehavior (Zdenek Kotala) </para> </listitem> @@ -751,28 +751,28 @@ <para> The only known symptom of this oversight is that the Tcl - <literal>clock</> command misbehaves if using Tcl 8.5 or later. + <literal>clock</literal> command misbehaves if using Tcl 8.5 or later. </para> </listitem> <listitem> <para> - Prevent crash in <filename>contrib/dblink</> when too many key - columns are specified to a <function>dblink_build_sql_*</> function + Prevent crash in <filename>contrib/dblink</filename> when too many key + columns are specified to a <function>dblink_build_sql_*</function> function (Rushabh Lathia, Joe Conway) </para> </listitem> <listitem> <para> - Fix assorted crashes in <filename>contrib/xml2</> caused by sloppy + Fix assorted crashes in <filename>contrib/xml2</filename> caused by sloppy memory management (Tom) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2010e + Update time zone data files to <application>tzdata</application> release 2010e for DST law changes in Bangladesh, Chile, Fiji, Mexico, Paraguay, Samoa. </para> </listitem> @@ -844,14 +844,14 @@ <listitem> <para> - Prevent signals from interrupting <literal>VACUUM</> at unsafe times + Prevent signals from interrupting <literal>VACUUM</literal> at unsafe times (Alvaro) </para> <para> - This fix prevents a PANIC if a <literal>VACUUM FULL</> is canceled + This fix prevents a PANIC if a <literal>VACUUM FULL</literal> is canceled after it's already committed its tuple movements, as well as transient - errors if a plain <literal>VACUUM</> is interrupted after having + errors if a plain <literal>VACUUM</literal> is interrupted after having truncated the table. </para> </listitem> @@ -870,7 +870,7 @@ <listitem> <para> - Fix very rare crash in <type>inet</>/<type>cidr</> comparisons (Chris + Fix very rare crash in <type>inet</type>/<type>cidr</type> comparisons (Chris Mikkelson) </para> </listitem> @@ -896,7 +896,7 @@ <para> The previous code is known to fail with the combination of the Linux - <literal>pam_krb5</> PAM module with Microsoft Active Directory as the + <literal>pam_krb5</literal> PAM module with Microsoft Active Directory as the domain controller. It might have problems elsewhere too, since it was making unjustified assumptions about what arguments the PAM stack would pass to it. @@ -906,14 +906,14 @@ <listitem> <para> Fix processing of ownership dependencies during <literal>CREATE OR - REPLACE FUNCTION</> (Tom) + REPLACE FUNCTION</literal> (Tom) </para> </listitem> <listitem> <para> Ensure that Perl arrays are properly converted to - <productname>PostgreSQL</> arrays when returned by a set-returning + <productname>PostgreSQL</productname> arrays when returned by a set-returning PL/Perl function (Andrew Dunstan, Abhijit Menon-Sen) </para> @@ -930,20 +930,20 @@ <listitem> <para> - Ensure <application>psql</>'s flex module is compiled with the correct + Ensure <application>psql</application>'s flex module is compiled with the correct system header definitions (Tom) </para> <para> This fixes build failures on platforms where - <literal>--enable-largefile</> causes incompatible changes in the + <literal>--enable-largefile</literal> causes incompatible changes in the generated code. </para> </listitem> <listitem> <para> - Make the postmaster ignore any <literal>application_name</> parameter in + Make the postmaster ignore any <literal>application_name</literal> parameter in connection request packets, to improve compatibility with future libpq versions (Tom) </para> @@ -951,7 +951,7 @@ <listitem> <para> - Update time zone data files to <application>tzdata</> release 2009s + Update time zone data files to <application>tzdata</application> release 2009s for DST law changes in Antarctica, Argentina, Bangladesh, Fiji, Novokuznetsk, Pakistan, Palestine, Samoa, Syria; also historical corrections for Hong Kong. @@ -982,8 +982,8 @@ <para> A dump/restore is not required for those running 8.1.X. - However, if you have any hash indexes on <type>interval</> columns, - you must <command>REINDEX</> them after updating to 8.1.18. + However, if you have any hash indexes on <type>interval</type> columns, + you must <command>REINDEX</command> them after updating to 8.1.18. Also, if you are upgrading from a version earlier than 8.1.15, see <xref linkend="release-8-1-15">. </para> @@ -997,14 +997,14 @@ <listitem> <para> - Disallow <command>RESET ROLE</> and <command>RESET SESSION - AUTHORIZATION</> inside security-definer functions (Tom, Heikki) + Disallow <command>RESET ROLE</command> and <command>RESET SESSION + AUTHORIZATION</command> inside security-definer functions (Tom, Heikki) </para> <para> This covers a case that was missed in the previous patch that - disallowed <command>SET ROLE</> and <command>SET SESSION - AUTHORIZATION</> inside security-definer functions. + disallowed <command>SET ROLE</command> and <command>SET SESSION + AUTHORIZATION</command> inside security-definer functions. (See CVE-2007-6600) </para> </listitem> @@ -1018,32 +1018,32 @@ <listitem> <para> - Fix hash calculation for data type <type>interval</> (Tom) + Fix hash calculation for data type <type>interval</type> (Tom) </para> <para> This corrects wrong results for hash joins on interval values. It also changes the contents of hash indexes on interval columns. - If you have any such indexes, you must <command>REINDEX</> them + If you have any such indexes, you must <command>REINDEX</command> them after updating. </para> </listitem> <listitem> <para> - Treat <function>to_char(..., 'TH')</> as an uppercase ordinal - suffix with <literal>'HH'</>/<literal>'HH12'</> (Heikki) + Treat <function>to_char(..., 'TH')</function> as an uppercase ordinal + suffix with <literal>'HH'</literal>/<literal>'HH12'</literal> (Heikki) </para> <para> - It was previously handled as <literal>'th'</> (lowercase). + It was previously handled as <literal>'th'</literal> (lowercase). </para> </listitem> <listitem> <para> - Fix overflow for <literal>INTERVAL '<replaceable>x</> ms'</literal> - when <replaceable>x</> is more than 2 million and integer + Fix overflow for <literal>INTERVAL '<replaceable>x</replaceable> ms'</literal> + when <replaceable>x</replaceable> is more than 2 million and integer datetimes are in use (Alex Hunsaker) </para> </listitem> @@ -1060,7 +1060,7 @@ <listitem> <para> - Fix <type>money</> data type to work in locales where currency + Fix <type>money</type> data type to work in locales where currency amounts have no fractional digits, e.g. Japan (Itagaki Takahiro) </para> </listitem> @@ -1068,7 +1068,7 @@ <listitem> <para> Properly round datetime input like - <literal>00:12:57.9999999999999999999999999999</> (Tom) + <literal>00:12:57.9999999999999999999999999999</literal> (Tom) </para> </listitem> @@ -1087,22 +1087,22 @@ <listitem> <para> - Fix <application>pg_ctl</> to not go into an infinite loop if - <filename>postgresql.conf</> is empty (Jeff Davis) + Fix <application>pg_ctl</application> to not go into an infinite loop if + <filename>postgresql.conf</filename> is empty (Jeff Davis) </para> </listitem> <listitem> <para> - Fix <filename>contrib/xml2</>'s <function>xslt_process()</> to + Fix <filename>contrib/xml2</filename>'s <function>xslt_process()</function> to properly handle the maximum number of parameters (twenty) (Tom) </para> </listitem> <listitem> <para> - Improve robustness of <application>libpq</>'s code to recover - from errors during <command>COPY FROM STDIN</> (Tom) + Improve robustness of <application>libpq</application>'s code to recover + from errors during <command>COPY FROM STDIN</command> (Tom) </para> </listitem> @@ -1115,7 +1115,7 @@ <listitem> <para> - Update time zone data files to <application>tzdata</> release 2009l + Update time zone data files to <application>tzdata</application> release 2009l for DST law changes in Bangladesh, Egypt, Jordan, Pakistan, Argentina/San_Luis, Cuba, Jordan (historical correction only), Mauritius, Morocco, Palestine, Syria, Tunisia. @@ -1166,7 +1166,7 @@ This change extends fixes made in the last two minor releases for related failure scenarios. The previous fixes were narrowly tailored for the original problem reports, but we have now recognized that - <emphasis>any</> error thrown by an encoding conversion function could + <emphasis>any</emphasis> error thrown by an encoding conversion function could potentially lead to infinite recursion while trying to report the error. The solution therefore is to disable translation and encoding conversion and report the plain-ASCII form of any error message, @@ -1177,7 +1177,7 @@ <listitem> <para> - Disallow <command>CREATE CONVERSION</> with the wrong encodings + Disallow <command>CREATE CONVERSION</command> with the wrong encodings for the specified conversion function (Heikki) </para> @@ -1190,20 +1190,20 @@ <listitem> <para> - Fix core dump when <function>to_char()</> is given format codes that + Fix core dump when <function>to_char()</function> is given format codes that are inappropriate for the type of the data argument (Tom) </para> </listitem> <listitem> <para> - Fix decompilation of <literal>CASE WHEN</> with an implicit coercion + Fix decompilation of <literal>CASE WHEN</literal> with an implicit coercion (Tom) </para> <para> This mistake could lead to Assert failures in an Assert-enabled build, - or an <quote>unexpected CASE WHEN clause</> error message in other + or an <quote>unexpected CASE WHEN clause</quote> error message in other cases, when trying to examine or dump a view. </para> </listitem> @@ -1214,15 +1214,15 @@ </para> <para> - If <command>CLUSTER</> or a rewriting variant of <command>ALTER TABLE</> + If <command>CLUSTER</command> or a rewriting variant of <command>ALTER TABLE</command> were executed by someone other than the table owner, the - <structname>pg_type</> entry for the table's TOAST table would end up + <structname>pg_type</structname> entry for the table's TOAST table would end up marked as owned by that someone. This caused no immediate problems, since the permissions on the TOAST rowtype aren't examined by any ordinary database operation. However, it could lead to unexpected failures if one later tried to drop the role that issued the command - (in 8.1 or 8.2), or <quote>owner of data type appears to be invalid</> - warnings from <application>pg_dump</> after having done so (in 8.3). + (in 8.1 or 8.2), or <quote>owner of data type appears to be invalid</quote> + warnings from <application>pg_dump</application> after having done so (in 8.3). </para> </listitem> @@ -1240,7 +1240,7 @@ <listitem> <para> - Add <literal>MUST</> (Mauritius Island Summer Time) to the default list + Add <literal>MUST</literal> (Mauritius Island Summer Time) to the default list of known timezone abbreviations (Xavier Bugaud) </para> </listitem> @@ -1294,13 +1294,13 @@ <listitem> <para> - Improve handling of URLs in <function>headline()</> function (Teodor) + Improve handling of URLs in <function>headline()</function> function (Teodor) </para> </listitem> <listitem> <para> - Improve handling of overlength headlines in <function>headline()</> + Improve handling of overlength headlines in <function>headline()</function> function (Teodor) </para> </listitem> @@ -1315,7 +1315,7 @@ <listitem> <para> - Avoid unnecessary locking of small tables in <command>VACUUM</> + Avoid unnecessary locking of small tables in <command>VACUUM</command> (Heikki) </para> </listitem> @@ -1337,30 +1337,30 @@ <listitem> <para> - Fix uninitialized variables in <filename>contrib/tsearch2</>'s - <function>get_covers()</> function (Teodor) + Fix uninitialized variables in <filename>contrib/tsearch2</filename>'s + <function>get_covers()</function> function (Teodor) </para> </listitem> <listitem> <para> - Fix <application>configure</> script to properly report failure when + Fix <application>configure</application> script to properly report failure when unable to obtain linkage information for PL/Perl (Andrew) </para> </listitem> <listitem> <para> - Make all documentation reference <literal>pgsql-bugs</> and/or - <literal>pgsql-hackers</> as appropriate, instead of the - now-decommissioned <literal>pgsql-ports</> and <literal>pgsql-patches</> + Make all documentation reference <literal>pgsql-bugs</literal> and/or + <literal>pgsql-hackers</literal> as appropriate, instead of the + now-decommissioned <literal>pgsql-ports</literal> and <literal>pgsql-patches</literal> mailing lists (Tom) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2009a (for + Update time zone data files to <application>tzdata</application> release 2009a (for Kathmandu and historical DST corrections in Switzerland, Cuba) </para> </listitem> @@ -1391,7 +1391,7 @@ A dump/restore is not required for those running 8.1.X. However, if you are upgrading from a version earlier than 8.1.2, see <xref linkend="release-8-1-2">. Also, if you were running a previous - 8.1.X release, it is recommended to <command>REINDEX</> all GiST + 8.1.X release, it is recommended to <command>REINDEX</command> all GiST indexes after the upgrade. </para> @@ -1405,13 +1405,13 @@ <listitem> <para> Fix GiST index corruption due to marking the wrong index entry - <quote>dead</> after a deletion (Teodor) + <quote>dead</quote> after a deletion (Teodor) </para> <para> This would result in index searches failing to find rows they should have found. Corrupted indexes can be fixed with - <command>REINDEX</>. + <command>REINDEX</command>. </para> </listitem> @@ -1423,7 +1423,7 @@ <para> We have addressed similar issues before, but it would still fail if - the <quote>character has no equivalent</> message itself couldn't + the <quote>character has no equivalent</quote> message itself couldn't be converted. The fix is to disable localization and send the plain ASCII error message when we detect such a situation. </para> @@ -1438,13 +1438,13 @@ <listitem> <para> - Fix mis-expansion of rule queries when a sub-<literal>SELECT</> appears - in a function call in <literal>FROM</>, a multi-row <literal>VALUES</> - list, or a <literal>RETURNING</> list (Tom) + Fix mis-expansion of rule queries when a sub-<literal>SELECT</literal> appears + in a function call in <literal>FROM</literal>, a multi-row <literal>VALUES</literal> + list, or a <literal>RETURNING</literal> list (Tom) </para> <para> - The usual symptom of this problem is an <quote>unrecognized node type</> + The usual symptom of this problem is an <quote>unrecognized node type</quote> error. </para> </listitem> @@ -1458,9 +1458,9 @@ <listitem> <para> - Prevent possible collision of <structfield>relfilenode</> numbers + Prevent possible collision of <structfield>relfilenode</structfield> numbers when moving a table to another tablespace with <command>ALTER SET - TABLESPACE</> (Heikki) + TABLESPACE</command> (Heikki) </para> <para> @@ -1479,14 +1479,14 @@ <listitem> <para> Fix improper display of fractional seconds in interval values when - using a non-ISO datestyle in an <option>--enable-integer-datetimes</> + using a non-ISO datestyle in an <option>--enable-integer-datetimes</option> build (Ron Mayer) </para> </listitem> <listitem> <para> - Ensure <function>SPI_getvalue</> and <function>SPI_getbinval</> + Ensure <function>SPI_getvalue</function> and <function>SPI_getbinval</function> behave correctly when the passed tuple and tuple descriptor have different numbers of columns (Tom) </para> @@ -1500,19 +1500,19 @@ <listitem> <para> - Fix <application>ecpg</>'s parsing of <command>CREATE ROLE</> (Michael) + Fix <application>ecpg</application>'s parsing of <command>CREATE ROLE</command> (Michael) </para> </listitem> <listitem> <para> - Fix recent breakage of <literal>pg_ctl restart</> (Tom) + Fix recent breakage of <literal>pg_ctl restart</literal> (Tom) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2008i (for + Update time zone data files to <application>tzdata</application> release 2008i (for DST law changes in Argentina, Brazil, Mauritius, Syria) </para> </listitem> @@ -1560,7 +1560,7 @@ <para> This responds to reports that the counters could overflow in sufficiently long transactions, leading to unexpected <quote>lock is - already held</> errors. + already held</quote> errors. </para> </listitem> @@ -1573,12 +1573,12 @@ <listitem> <para> Add checks in executor startup to ensure that the tuples produced by an - <command>INSERT</> or <command>UPDATE</> will match the target table's + <command>INSERT</command> or <command>UPDATE</command> will match the target table's current rowtype (Tom) </para> <para> - <command>ALTER COLUMN TYPE</>, followed by re-use of a previously + <command>ALTER COLUMN TYPE</command>, followed by re-use of a previously cached plan, could produce this type of situation. The check protects against data corruption and/or crashes that could ensue. </para> @@ -1586,18 +1586,18 @@ <listitem> <para> - Fix <literal>AT TIME ZONE</> to first try to interpret its timezone + Fix <literal>AT TIME ZONE</literal> to first try to interpret its timezone argument as a timezone abbreviation, and only try it as a full timezone name if that fails, rather than the other way around as formerly (Tom) </para> <para> The timestamp input functions have always resolved ambiguous zone names - in this order. Making <literal>AT TIME ZONE</> do so as well improves + in this order. Making <literal>AT TIME ZONE</literal> do so as well improves consistency, and fixes a compatibility bug introduced in 8.1: in ambiguous cases we now behave the same as 8.0 and before did, - since in the older versions <literal>AT TIME ZONE</> accepted - <emphasis>only</> abbreviations. + since in the older versions <literal>AT TIME ZONE</literal> accepted + <emphasis>only</emphasis> abbreviations. </para> </listitem> @@ -1617,7 +1617,7 @@ <listitem> <para> Fix bug in backwards scanning of a cursor on a <literal>SELECT DISTINCT - ON</> query (Tom) + ON</literal> query (Tom) </para> </listitem> @@ -1635,21 +1635,21 @@ <listitem> <para> - Fix planner to estimate that <literal>GROUP BY</> expressions yielding + Fix planner to estimate that <literal>GROUP BY</literal> expressions yielding boolean results always result in two groups, regardless of the expressions' contents (Tom) </para> <para> This is very substantially more accurate than the regular <literal>GROUP - BY</> estimate for certain boolean tests like <replaceable>col</> - <literal>IS NULL</>. + BY</literal> estimate for certain boolean tests like <replaceable>col</replaceable> + <literal>IS NULL</literal>. </para> </listitem> <listitem> <para> - Fix PL/pgSQL to not fail when a <literal>FOR</> loop's target variable + Fix PL/pgSQL to not fail when a <literal>FOR</literal> loop's target variable is a record containing composite-type fields (Tom) </para> </listitem> @@ -1673,21 +1673,21 @@ <listitem> <para> - Improve <application>pg_dump</> and <application>pg_restore</>'s + Improve <application>pg_dump</application> and <application>pg_restore</application>'s error reporting after failure to send a SQL command (Tom) </para> </listitem> <listitem> <para> - Fix <application>pg_ctl</> to properly preserve postmaster - command-line arguments across a <literal>restart</> (Bruce) + Fix <application>pg_ctl</application> to properly preserve postmaster + command-line arguments across a <literal>restart</literal> (Bruce) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2008f (for + Update time zone data files to <application>tzdata</application> release 2008f (for DST law changes in Argentina, Bahamas, Brazil, Mauritius, Morocco, Pakistan, Palestine, and Paraguay) </para> @@ -1730,18 +1730,18 @@ <listitem> <para> - Make <function>pg_get_ruledef()</> parenthesize negative constants (Tom) + Make <function>pg_get_ruledef()</function> parenthesize negative constants (Tom) </para> <para> Before this fix, a negative constant in a view or rule might be dumped - as, say, <literal>-42::integer</>, which is subtly incorrect: it should - be <literal>(-42)::integer</> due to operator precedence rules. + as, say, <literal>-42::integer</literal>, which is subtly incorrect: it should + be <literal>(-42)::integer</literal> due to operator precedence rules. Usually this would make little difference, but it could interact with another recent patch to cause - <productname>PostgreSQL</> to reject what had been a valid - <command>SELECT DISTINCT</> view query. Since this could result in - <application>pg_dump</> output failing to reload, it is being treated + <productname>PostgreSQL</productname> to reject what had been a valid + <command>SELECT DISTINCT</command> view query. Since this could result in + <application>pg_dump</application> output failing to reload, it is being treated as a high-priority fix. The only released versions in which dump output is actually incorrect are 8.3.1 and 8.2.7. </para> @@ -1749,13 +1749,13 @@ <listitem> <para> - Make <command>ALTER AGGREGATE ... OWNER TO</> update - <structname>pg_shdepend</> (Tom) + Make <command>ALTER AGGREGATE ... OWNER TO</command> update + <structname>pg_shdepend</structname> (Tom) </para> <para> This oversight could lead to problems if the aggregate was later - involved in a <command>DROP OWNED</> or <command>REASSIGN OWNED</> + involved in a <command>DROP OWNED</command> or <command>REASSIGN OWNED</command> operation. </para> </listitem> @@ -1797,7 +1797,7 @@ <listitem> <para> - Fix <command>ALTER TABLE ADD COLUMN ... PRIMARY KEY</> so that the new + Fix <command>ALTER TABLE ADD COLUMN ... PRIMARY KEY</command> so that the new column is correctly checked to see if it's been initialized to all non-nulls (Brendan Jurd) </para> @@ -1809,8 +1809,8 @@ <listitem> <para> - Fix possible <command>CREATE TABLE</> failure when inheriting the - <quote>same</> constraint from multiple parent relations that + Fix possible <command>CREATE TABLE</command> failure when inheriting the + <quote>same</quote> constraint from multiple parent relations that inherited that constraint from a common ancestor (Tom) </para> </listitem> @@ -1818,7 +1818,7 @@ <listitem> <para> Fix conversions between ISO-8859-5 and other encodings to handle - Cyrillic <quote>Yo</> characters (<literal>e</> and <literal>E</> with + Cyrillic <quote>Yo</quote> characters (<literal>e</literal> and <literal>E</literal> with two dots) (Sergey Burladyan) </para> </listitem> @@ -1833,7 +1833,7 @@ <para> This could lead to failures in which two apparently identical literal values were not seen as equal, resulting in the parser complaining - about unmatched <literal>ORDER BY</> and <literal>DISTINCT</> + about unmatched <literal>ORDER BY</literal> and <literal>DISTINCT</literal> expressions. </para> </listitem> @@ -1841,24 +1841,24 @@ <listitem> <para> Fix a corner case in regular-expression substring matching - (<literal>substring(<replaceable>string</> from - <replaceable>pattern</>)</literal>) (Tom) + (<literal>substring(<replaceable>string</replaceable> from + <replaceable>pattern</replaceable>)</literal>) (Tom) </para> <para> The problem occurs when there is a match to the pattern overall but the user has specified a parenthesized subexpression and that subexpression hasn't got a match. An example is - <literal>substring('foo' from 'foo(bar)?')</>. - This should return NULL, since <literal>(bar)</> isn't matched, but + <literal>substring('foo' from 'foo(bar)?')</literal>. + This should return NULL, since <literal>(bar)</literal> isn't matched, but it was mistakenly returning the whole-pattern match instead (ie, - <literal>foo</>). + <literal>foo</literal>). </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2008c (for + Update time zone data files to <application>tzdata</application> release 2008c (for DST law changes in Morocco, Iraq, Choibalsan, Pakistan, Syria, Cuba, Argentina/San_Luis, and Chile) </para> @@ -1866,34 +1866,34 @@ <listitem> <para> - Fix incorrect result from <application>ecpg</>'s - <function>PGTYPEStimestamp_sub()</> function (Michael) + Fix incorrect result from <application>ecpg</application>'s + <function>PGTYPEStimestamp_sub()</function> function (Michael) </para> </listitem> <listitem> <para> - Fix core dump in <filename>contrib/xml2</>'s - <function>xpath_table()</> function when the input query returns a + Fix core dump in <filename>contrib/xml2</filename>'s + <function>xpath_table()</function> function when the input query returns a NULL value (Tom) </para> </listitem> <listitem> <para> - Fix <filename>contrib/xml2</>'s makefile to not override - <literal>CFLAGS</> (Tom) + Fix <filename>contrib/xml2</filename>'s makefile to not override + <literal>CFLAGS</literal> (Tom) </para> </listitem> <listitem> <para> - Fix <literal>DatumGetBool</> macro to not fail with <application>gcc</> + Fix <literal>DatumGetBool</literal> macro to not fail with <application>gcc</application> 4.3 (Tom) </para> <para> - This problem affects <quote>old style</> (V0) C functions that + This problem affects <quote>old style</quote> (V0) C functions that return boolean. The fix is already in 8.3, but the need to back-patch it was not realized at the time. </para> @@ -1901,21 +1901,21 @@ <listitem> <para> - Fix longstanding <command>LISTEN</>/<command>NOTIFY</> + Fix longstanding <command>LISTEN</command>/<command>NOTIFY</command> race condition (Tom) </para> <para> In rare cases a session that had just executed a - <command>LISTEN</> might not get a notification, even though + <command>LISTEN</command> might not get a notification, even though one would be expected because the concurrent transaction executing - <command>NOTIFY</> was observed to commit later. + <command>NOTIFY</command> was observed to commit later. </para> <para> A side effect of the fix is that a transaction that has executed - a not-yet-committed <command>LISTEN</> command will not see any - row in <structname>pg_listener</> for the <command>LISTEN</>, + a not-yet-committed <command>LISTEN</command> command will not see any + row in <structname>pg_listener</structname> for the <command>LISTEN</command>, should it choose to look; formerly it would have. This behavior was never documented one way or the other, but it is possible that some applications depend on the old behavior. @@ -1924,14 +1924,14 @@ <listitem> <para> - Disallow <command>LISTEN</> and <command>UNLISTEN</> within a + Disallow <command>LISTEN</command> and <command>UNLISTEN</command> within a prepared transaction (Tom) </para> <para> This was formerly allowed but trying to do it had various unpleasant consequences, notably that the originating backend could not exit - as long as an <command>UNLISTEN</> remained uncommitted. + as long as an <command>UNLISTEN</command> remained uncommitted. </para> </listitem> @@ -1954,19 +1954,19 @@ <listitem> <para> - Fix <quote>unrecognized node type</> error in some variants of - <command>ALTER OWNER</> (Tom) + Fix <quote>unrecognized node type</quote> error in some variants of + <command>ALTER OWNER</command> (Tom) </para> </listitem> <listitem> <para> - Fix <application>pg_ctl</> to correctly extract the postmaster's port + Fix <application>pg_ctl</application> to correctly extract the postmaster's port number from command-line options (Itagaki Takahiro, Tom) </para> <para> - Previously, <literal>pg_ctl start -w</> could try to contact the + Previously, <literal>pg_ctl start -w</literal> could try to contact the postmaster on the wrong port, leading to bogus reports of startup failure. </para> @@ -1974,20 +1974,20 @@ <listitem> <para> - Use <option>-fwrapv</> to defend against possible misoptimization - in recent <application>gcc</> versions (Tom) + Use <option>-fwrapv</option> to defend against possible misoptimization + in recent <application>gcc</application> versions (Tom) </para> <para> - This is known to be necessary when building <productname>PostgreSQL</> - with <application>gcc</> 4.3 or later. + This is known to be necessary when building <productname>PostgreSQL</productname> + with <application>gcc</application> 4.3 or later. </para> </listitem> <listitem> <para> - Fix display of constant expressions in <literal>ORDER BY</> - and <literal>GROUP BY</> (Tom) + Fix display of constant expressions in <literal>ORDER BY</literal> + and <literal>GROUP BY</literal> (Tom) </para> <para> @@ -1999,7 +1999,7 @@ <listitem> <para> - Fix <application>libpq</> to handle NOTICE messages correctly + Fix <application>libpq</application> to handle NOTICE messages correctly during COPY OUT (Tom) </para> @@ -2031,8 +2031,8 @@ </para> <para> - This is the last 8.1.X release for which the <productname>PostgreSQL</> - community will produce binary packages for <productname>Windows</>. + This is the last 8.1.X release for which the <productname>PostgreSQL</productname> + community will produce binary packages for <productname>Windows</productname>. Windows users are encouraged to move to 8.2.X or later, since there are Windows-specific fixes in 8.2.X that are impractical to back-port. 8.1.X will continue to @@ -2058,7 +2058,7 @@ <listitem> <para> Prevent functions in indexes from executing with the privileges of - the user running <command>VACUUM</>, <command>ANALYZE</>, etc (Tom) + the user running <command>VACUUM</command>, <command>ANALYZE</command>, etc (Tom) </para> <para> @@ -2069,18 +2069,18 @@ (Note that triggers, defaults, check constraints, etc. pose the same type of risk.) But functions in indexes pose extra danger because they will be executed by routine maintenance operations - such as <command>VACUUM FULL</>, which are commonly performed + such as <command>VACUUM FULL</command>, which are commonly performed automatically under a superuser account. For example, a nefarious user can execute code with superuser privileges by setting up a trojan-horse index definition and waiting for the next routine vacuum. The fix arranges for standard maintenance operations - (including <command>VACUUM</>, <command>ANALYZE</>, <command>REINDEX</>, - and <command>CLUSTER</>) to execute as the table owner rather than + (including <command>VACUUM</command>, <command>ANALYZE</command>, <command>REINDEX</command>, + and <command>CLUSTER</command>) to execute as the table owner rather than the calling user, using the same privilege-switching mechanism already - used for <literal>SECURITY DEFINER</> functions. To prevent bypassing + used for <literal>SECURITY DEFINER</literal> functions. To prevent bypassing this security measure, execution of <command>SET SESSION - AUTHORIZATION</> and <command>SET ROLE</> is now forbidden within a - <literal>SECURITY DEFINER</> context. (CVE-2007-6600) + AUTHORIZATION</command> and <command>SET ROLE</command> is now forbidden within a + <literal>SECURITY DEFINER</literal> context. (CVE-2007-6600) </para> </listitem> @@ -2100,20 +2100,20 @@ <listitem> <para> - Require non-superusers who use <filename>/contrib/dblink</> to use only + Require non-superusers who use <filename>/contrib/dblink</filename> to use only password authentication, as a security measure (Joe) </para> <para> The fix that appeared for this in 8.1.10 was incomplete, as it plugged - the hole for only some <filename>dblink</> functions. (CVE-2007-6601, + the hole for only some <filename>dblink</filename> functions. (CVE-2007-6601, CVE-2007-3278) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2007k + Update time zone data files to <application>tzdata</application> release 2007k (in particular, recent Argentina changes) (Tom) </para> </listitem> @@ -2128,14 +2128,14 @@ <listitem> <para> Fix planner failure in some cases of <literal>WHERE false AND var IN - (SELECT ...)</> (Tom) + (SELECT ...)</literal> (Tom) </para> </listitem> <listitem> <para> Preserve the tablespace of indexes that are - rebuilt by <command>ALTER TABLE ... ALTER COLUMN TYPE</> (Tom) + rebuilt by <command>ALTER TABLE ... ALTER COLUMN TYPE</command> (Tom) </para> </listitem> @@ -2154,21 +2154,21 @@ <listitem> <para> - Make <command>VACUUM</> not use all of <varname>maintenance_work_mem</> + Make <command>VACUUM</command> not use all of <varname>maintenance_work_mem</varname> when the table is too small for it to be useful (Alvaro) </para> </listitem> <listitem> <para> - Fix potential crash in <function>translate()</> when using a multibyte + Fix potential crash in <function>translate()</function> when using a multibyte database encoding (Tom) </para> </listitem> <listitem> <para> - Fix overflow in <literal>extract(epoch from interval)</> for intervals + Fix overflow in <literal>extract(epoch from interval)</literal> for intervals exceeding 68 years (Tom) </para> </listitem> @@ -2182,13 +2182,13 @@ <listitem> <para> - Fix PL/Perl to cope when platform's Perl defines type <literal>bool</> - as <literal>int</> rather than <literal>char</> (Tom) + Fix PL/Perl to cope when platform's Perl defines type <literal>bool</literal> + as <literal>int</literal> rather than <literal>char</literal> (Tom) </para> <para> While this could theoretically happen anywhere, no standard build of - Perl did things this way ... until <productname>macOS</> 10.5. + Perl did things this way ... until <productname>macOS</productname> 10.5. </para> </listitem> @@ -2200,64 +2200,64 @@ <listitem> <para> - Fix <application>pg_dump</> to correctly handle inheritance child tables + Fix <application>pg_dump</application> to correctly handle inheritance child tables that have default expressions different from their parent's (Tom) </para> </listitem> <listitem> <para> - Fix <application>libpq</> crash when <varname>PGPASSFILE</> refers + Fix <application>libpq</application> crash when <varname>PGPASSFILE</varname> refers to a file that is not a plain file (Martin Pitt) </para> </listitem> <listitem> <para> - <application>ecpg</> parser fixes (Michael) + <application>ecpg</application> parser fixes (Michael) </para> </listitem> <listitem> <para> - Make <filename>contrib/pgcrypto</> defend against - <application>OpenSSL</> libraries that fail on keys longer than 128 + Make <filename>contrib/pgcrypto</filename> defend against + <application>OpenSSL</application> libraries that fail on keys longer than 128 bits; which is the case at least on some Solaris versions (Marko Kreen) </para> </listitem> <listitem> <para> - Make <filename>contrib/tablefunc</>'s <function>crosstab()</> handle + Make <filename>contrib/tablefunc</filename>'s <function>crosstab()</function> handle NULL rowid as a category in its own right, rather than crashing (Joe) </para> </listitem> <listitem> <para> - Fix <type>tsvector</> and <type>tsquery</> output routines to + Fix <type>tsvector</type> and <type>tsquery</type> output routines to escape backslashes correctly (Teodor, Bruce) </para> </listitem> <listitem> <para> - Fix crash of <function>to_tsvector()</> on huge input strings (Teodor) + Fix crash of <function>to_tsvector()</function> on huge input strings (Teodor) </para> </listitem> <listitem> <para> - Require a specific version of <productname>Autoconf</> to be used - when re-generating the <command>configure</> script (Peter) + Require a specific version of <productname>Autoconf</productname> to be used + when re-generating the <command>configure</command> script (Peter) </para> <para> This affects developers and packagers only. The change was made to prevent accidental use of untested combinations of - <productname>Autoconf</> and <productname>PostgreSQL</> versions. + <productname>Autoconf</productname> and <productname>PostgreSQL</productname> versions. You can remove the version check if you really want to use a - different <productname>Autoconf</> version, but it's + different <productname>Autoconf</productname> version, but it's your responsibility whether the result works or not. </para> </listitem> @@ -2300,20 +2300,20 @@ <listitem> <para> Prevent index corruption when a transaction inserts rows and - then aborts close to the end of a concurrent <command>VACUUM</> + then aborts close to the end of a concurrent <command>VACUUM</command> on the same table (Tom) </para> </listitem> <listitem> <para> - Make <command>CREATE DOMAIN ... DEFAULT NULL</> work properly (Tom) + Make <command>CREATE DOMAIN ... DEFAULT NULL</command> work properly (Tom) </para> </listitem> <listitem> <para> - Allow the <type>interval</> data type to accept input consisting only of + Allow the <type>interval</type> data type to accept input consisting only of milliseconds or microseconds (Neil) </para> </listitem> @@ -2326,7 +2326,7 @@ <listitem> <para> - Fix excessive logging of <acronym>SSL</> error messages (Tom) + Fix excessive logging of <acronym>SSL</acronym> error messages (Tom) </para> </listitem> @@ -2339,7 +2339,7 @@ <listitem> <para> - Fix crash when <varname>log_min_error_statement</> logging runs out + Fix crash when <varname>log_min_error_statement</varname> logging runs out of memory (Tom) </para> </listitem> @@ -2352,7 +2352,7 @@ <listitem> <para> - Prevent <command>REINDEX</> and <command>CLUSTER</> from failing + Prevent <command>REINDEX</command> and <command>CLUSTER</command> from failing due to attempting to process temporary tables of other sessions (Alvaro) </para> </listitem> @@ -2371,14 +2371,14 @@ <listitem> <para> - Suppress timezone name (<literal>%Z</>) in log timestamps on Windows + Suppress timezone name (<literal>%Z</literal>) in log timestamps on Windows because of possible encoding mismatches (Tom) </para> </listitem> <listitem> <para> - Require non-superusers who use <filename>/contrib/dblink</> to use only + Require non-superusers who use <filename>/contrib/dblink</filename> to use only password authentication, as a security measure (Joe) </para> </listitem> @@ -2422,35 +2422,35 @@ <listitem> <para> Support explicit placement of the temporary-table schema within - <varname>search_path</>, and disable searching it for functions + <varname>search_path</varname>, and disable searching it for functions and operators (Tom) </para> <para> This is needed to allow a security-definer function to set a - truly secure value of <varname>search_path</>. Without it, + truly secure value of <varname>search_path</varname>. Without it, an unprivileged SQL user can use temporary objects to execute code with the privileges of the security-definer function (CVE-2007-2138). - See <command>CREATE FUNCTION</> for more information. + See <command>CREATE FUNCTION</command> for more information. </para> </listitem> <listitem> <para> - <filename>/contrib/tsearch2</> crash fixes (Teodor) + <filename>/contrib/tsearch2</filename> crash fixes (Teodor) </para> </listitem> <listitem> <para> - Require <command>COMMIT PREPARED</> to be executed in the same + Require <command>COMMIT PREPARED</command> to be executed in the same database as the transaction was prepared in (Heikki) </para> </listitem> <listitem> <para> - Fix potential-data-corruption bug in how <command>VACUUM FULL</> handles - <command>UPDATE</> chains (Tom, Pavan Deolasee) + Fix potential-data-corruption bug in how <command>VACUUM FULL</command> handles + <command>UPDATE</command> chains (Tom, Pavan Deolasee) </para> </listitem> @@ -2576,7 +2576,7 @@ <listitem> <para> - Improve <command>VACUUM</> performance for databases with many tables (Tom) + Improve <command>VACUUM</command> performance for databases with many tables (Tom) </para> </listitem> @@ -2593,7 +2593,7 @@ <listitem> <para> - Fix for rare Assert() crash triggered by <literal>UNION</> (Tom) + Fix for rare Assert() crash triggered by <literal>UNION</literal> (Tom) </para> </listitem> @@ -2606,7 +2606,7 @@ <listitem> <para> - Fix bogus <quote>permission denied</> failures occurring on Windows + Fix bogus <quote>permission denied</quote> failures occurring on Windows due to attempts to fsync already-deleted files (Magnus, Tom) </para> </listitem> @@ -2655,7 +2655,7 @@ <listitem> <para> - Improve handling of <function>getaddrinfo()</> on AIX (Tom) + Improve handling of <function>getaddrinfo()</function> on AIX (Tom) </para> <para> @@ -2666,21 +2666,21 @@ <listitem> <para> - Fix <application>pg_restore</> to handle a tar-format backup + Fix <application>pg_restore</application> to handle a tar-format backup that contains large objects (blobs) with comments (Tom) </para> </listitem> <listitem> <para> - Fix <quote>failed to re-find parent key</> errors in - <command>VACUUM</> (Tom) + Fix <quote>failed to re-find parent key</quote> errors in + <command>VACUUM</command> (Tom) </para> </listitem> <listitem> <para> - Clean out <filename>pg_internal.init</> cache files during server + Clean out <filename>pg_internal.init</filename> cache files during server restart (Simon) </para> @@ -2693,7 +2693,7 @@ <listitem> <para> Fix race condition for truncation of a large relation across a - gigabyte boundary by <command>VACUUM</> (Tom) + gigabyte boundary by <command>VACUUM</command> (Tom) </para> </listitem> @@ -2717,7 +2717,7 @@ <listitem> <para> - Fix error when constructing an <literal>ARRAY[]</> made up of multiple + Fix error when constructing an <literal>ARRAY[]</literal> made up of multiple empty elements (Tom) </para> </listitem> @@ -2736,13 +2736,13 @@ <listitem> <para> - <function>to_number()</> and <function>to_char(numeric)</> - are now <literal>STABLE</>, not <literal>IMMUTABLE</>, for - new <application>initdb</> installs (Tom) + <function>to_number()</function> and <function>to_char(numeric)</function> + are now <literal>STABLE</literal>, not <literal>IMMUTABLE</literal>, for + new <application>initdb</application> installs (Tom) </para> <para> - This is because <varname>lc_numeric</> can potentially + This is because <varname>lc_numeric</varname> can potentially change the output of these functions. </para> </listitem> @@ -2753,7 +2753,7 @@ </para> <para> - This improves <application>psql</> <literal>\d</> performance also. + This improves <application>psql</application> <literal>\d</literal> performance also. </para> </listitem> @@ -2802,7 +2802,7 @@ <title>Changes</title> <itemizedlist> -<listitem><para>Disallow aggregate functions in <command>UPDATE</> +<listitem><para>Disallow aggregate functions in <command>UPDATE</command> commands, except within sub-SELECTs (Tom)</para> <para>The behavior of such an aggregate was unpredictable, and in 8.1.X could cause a crash, so it has been disabled. The SQL standard does not allow @@ -2810,25 +2810,25 @@ this either.</para></listitem> <listitem><para>Fix core dump when an untyped literal is taken as ANYARRAY</para></listitem> <listitem><para>Fix core dump in duration logging for extended query protocol -when a <command>COMMIT</> or <command>ROLLBACK</> is +when a <command>COMMIT</command> or <command>ROLLBACK</command> is executed</para></listitem> <listitem><para>Fix mishandling of AFTER triggers when query contains a SQL function returning multiple rows (Tom)</para></listitem> -<listitem><para>Fix <command>ALTER TABLE ... TYPE</> to recheck -<literal>NOT NULL</> for <literal>USING</> clause (Tom)</para></listitem> -<listitem><para>Fix <function>string_to_array()</> to handle overlapping +<listitem><para>Fix <command>ALTER TABLE ... TYPE</command> to recheck +<literal>NOT NULL</literal> for <literal>USING</literal> clause (Tom)</para></listitem> +<listitem><para>Fix <function>string_to_array()</function> to handle overlapping matches for the separator string</para> -<para>For example, <literal>string_to_array('123xx456xxx789', 'xx')</>. +<para>For example, <literal>string_to_array('123xx456xxx789', 'xx')</literal>. </para></listitem> -<listitem><para>Fix <function>to_timestamp()</> for -<literal>AM</>/<literal>PM</> formats (Bruce)</para></listitem> +<listitem><para>Fix <function>to_timestamp()</function> for +<literal>AM</literal>/<literal>PM</literal> formats (Bruce)</para></listitem> <listitem><para>Fix autovacuum's calculation that decides whether - <command>ANALYZE</> is needed (Alvaro)</para></listitem> + <command>ANALYZE</command> is needed (Alvaro)</para></listitem> <listitem><para>Fix corner cases in pattern matching for - <application>psql</>'s <literal>\d</> commands</para></listitem> + <application>psql</application>'s <literal>\d</literal> commands</para></listitem> <listitem><para>Fix index-corrupting bugs in /contrib/ltree (Teodor)</para></listitem> -<listitem><para>Numerous robustness fixes in <application>ecpg</> (Joachim +<listitem><para>Numerous robustness fixes in <application>ecpg</application> (Joachim Wieland)</para></listitem> <listitem><para>Fix backslash escaping in /contrib/dbmirror</para></listitem> <listitem><para>Minor fixes in /contrib/dblink and /contrib/tsearch2</para> @@ -2836,14 +2836,14 @@ Wieland)</para></listitem> <listitem><para>Efficiency improvements in hash tables and bitmap index scans (Tom)</para></listitem> <listitem><para>Fix instability of statistics collection on Windows (Tom, Andrew)</para></listitem> -<listitem><para>Fix <varname>statement_timeout</> to use the proper +<listitem><para>Fix <varname>statement_timeout</varname> to use the proper units on Win32 (Bruce)</para> <para>In previous Win32 8.1.X versions, the delay was off by a factor of 100.</para></listitem> -<listitem><para>Fixes for <acronym>MSVC</> and <productname>Borland C++</> +<listitem><para>Fixes for <acronym>MSVC</acronym> and <productname>Borland C++</productname> compilers (Hiroshi Saito)</para></listitem> -<listitem><para>Fixes for <systemitem class="osname">AIX</> and -<productname>Intel</> compilers (Tom)</para></listitem> +<listitem><para>Fixes for <systemitem class="osname">AIX</systemitem> and +<productname>Intel</productname> compilers (Tom)</para></listitem> <listitem><para>Fix rare bug in continuous archiving (Tom)</para></listitem> </itemizedlist> @@ -2881,9 +2881,9 @@ compilers (Hiroshi Saito)</para></listitem> into SQL commands, you should examine them as soon as possible to ensure that they are using recommended escaping techniques. In most cases, applications should be using subroutines provided by - libraries or drivers (such as <application>libpq</>'s - <function>PQescapeStringConn()</>) to perform string escaping, - rather than relying on <foreignphrase>ad hoc</> code to do it. + libraries or drivers (such as <application>libpq</application>'s + <function>PQescapeStringConn()</function>) to perform string escaping, + rather than relying on <foreignphrase>ad hoc</foreignphrase> code to do it. </para> </sect2> @@ -2893,61 +2893,61 @@ compilers (Hiroshi Saito)</para></listitem> <itemizedlist> <listitem><para>Change the server to reject invalidly-encoded multibyte characters in all cases (Tatsuo, Tom)</para> -<para>While <productname>PostgreSQL</> has been moving in this direction for +<para>While <productname>PostgreSQL</productname> has been moving in this direction for some time, the checks are now applied uniformly to all encodings and all textual input, and are now always errors not merely warnings. This change defends against SQL-injection attacks of the type described in CVE-2006-2313. </para></listitem> -<listitem><para>Reject unsafe uses of <literal>\'</> in string literals</para> +<listitem><para>Reject unsafe uses of <literal>\'</literal> in string literals</para> <para>As a server-side defense against SQL-injection attacks of the type -described in CVE-2006-2314, the server now only accepts <literal>''</> and not -<literal>\'</> as a representation of ASCII single quote in SQL string -literals. By default, <literal>\'</> is rejected only when -<varname>client_encoding</> is set to a client-only encoding (SJIS, BIG5, GBK, +described in CVE-2006-2314, the server now only accepts <literal>''</literal> and not +<literal>\'</literal> as a representation of ASCII single quote in SQL string +literals. By default, <literal>\'</literal> is rejected only when +<varname>client_encoding</varname> is set to a client-only encoding (SJIS, BIG5, GBK, GB18030, or UHC), which is the scenario in which SQL injection is possible. -A new configuration parameter <varname>backslash_quote</> is available to +A new configuration parameter <varname>backslash_quote</varname> is available to adjust this behavior when needed. Note that full security against CVE-2006-2314 might require client-side changes; the purpose of -<varname>backslash_quote</> is in part to make it obvious that insecure +<varname>backslash_quote</varname> is in part to make it obvious that insecure clients are insecure. </para></listitem> -<listitem><para>Modify <application>libpq</>'s string-escaping routines to be +<listitem><para>Modify <application>libpq</application>'s string-escaping routines to be aware of encoding considerations and -<varname>standard_conforming_strings</></para> -<para>This fixes <application>libpq</>-using applications for the security +<varname>standard_conforming_strings</varname></para> +<para>This fixes <application>libpq</application>-using applications for the security issues described in CVE-2006-2313 and CVE-2006-2314, and also future-proofs them against the planned changeover to SQL-standard string literal syntax. -Applications that use multiple <productname>PostgreSQL</> connections -concurrently should migrate to <function>PQescapeStringConn()</> and -<function>PQescapeByteaConn()</> to ensure that escaping is done correctly +Applications that use multiple <productname>PostgreSQL</productname> connections +concurrently should migrate to <function>PQescapeStringConn()</function> and +<function>PQescapeByteaConn()</function> to ensure that escaping is done correctly for the settings in use in each database connection. Applications that -do string escaping <quote>by hand</> should be modified to rely on library +do string escaping <quote>by hand</quote> should be modified to rely on library routines instead. </para></listitem> <listitem><para>Fix weak key selection in pgcrypto (Marko Kreen)</para> <para>Errors in fortuna PRNG reseeding logic could cause a predictable -session key to be selected by <function>pgp_sym_encrypt()</> in some cases. +session key to be selected by <function>pgp_sym_encrypt()</function> in some cases. This only affects non-OpenSSL-using builds. </para></listitem> <listitem><para>Fix some incorrect encoding conversion functions</para> -<para><function>win1251_to_iso</>, <function>win866_to_iso</>, -<function>euc_tw_to_big5</>, <function>euc_tw_to_mic</>, -<function>mic_to_euc_tw</> were all broken to varying +<para><function>win1251_to_iso</function>, <function>win866_to_iso</function>, +<function>euc_tw_to_big5</function>, <function>euc_tw_to_mic</function>, +<function>mic_to_euc_tw</function> were all broken to varying extents. </para></listitem> -<listitem><para>Clean up stray remaining uses of <literal>\'</> in strings +<listitem><para>Clean up stray remaining uses of <literal>\'</literal> in strings (Bruce, Jan)</para></listitem> -<listitem><para>Make autovacuum visible in <structname>pg_stat_activity</> +<listitem><para>Make autovacuum visible in <structname>pg_stat_activity</structname> (Alvaro)</para></listitem> -<listitem><para>Disable <literal>full_page_writes</> (Tom)</para> -<para>In certain cases, having <literal>full_page_writes</> off would cause +<listitem><para>Disable <literal>full_page_writes</literal> (Tom)</para> +<para>In certain cases, having <literal>full_page_writes</literal> off would cause crash recovery to fail. A proper fix will appear in 8.2; for now it's just disabled. </para></listitem> @@ -2965,10 +2965,10 @@ same transaction</para></listitem> <listitem><para>Fix WAL replay for case where a B-Tree index has been truncated</para></listitem> -<listitem><para>Fix <literal>SIMILAR TO</> for patterns involving -<literal>|</> (Tom)</para></listitem> +<listitem><para>Fix <literal>SIMILAR TO</literal> for patterns involving +<literal>|</literal> (Tom)</para></listitem> -<listitem><para>Fix <command>SELECT INTO</> and <command>CREATE TABLE AS</> to +<listitem><para>Fix <command>SELECT INTO</command> and <command>CREATE TABLE AS</command> to create tables in the default tablespace, not the base directory (Kris Jurka)</para></listitem> @@ -2986,18 +2986,18 @@ Fuhr)</para></listitem> <listitem><para>Fix problem with password prompting on some Win32 systems (Robert Kinberg)</para></listitem> -<listitem><para>Improve <application>pg_dump</>'s handling of default values +<listitem><para>Improve <application>pg_dump</application>'s handling of default values for domains</para></listitem> -<listitem><para>Fix <application>pg_dumpall</> to handle identically-named +<listitem><para>Fix <application>pg_dumpall</application> to handle identically-named users and groups reasonably (only possible when dumping from a pre-8.1 server) (Tom)</para> <para>The user and group will be merged into a single role with -<literal>LOGIN</> permission. Formerly the merged role wouldn't have -<literal>LOGIN</> permission, making it unusable as a user. +<literal>LOGIN</literal> permission. Formerly the merged role wouldn't have +<literal>LOGIN</literal> permission, making it unusable as a user. </para></listitem> -<listitem><para>Fix <application>pg_restore</> <literal>-n</> to work as +<listitem><para>Fix <application>pg_restore</application> <literal>-n</literal> to work as documented (Tom)</para></listitem> </itemizedlist> @@ -3035,14 +3035,14 @@ documented (Tom)</para></listitem> <itemizedlist> <listitem><para>Fix bug that allowed any logged-in user to <command>SET -ROLE</> to any other database user id (CVE-2006-0553)</para> +ROLE</command> to any other database user id (CVE-2006-0553)</para> <para>Due to inadequate validity checking, a user could exploit the special -case that <command>SET ROLE</> normally uses to restore the previous role +case that <command>SET ROLE</command> normally uses to restore the previous role setting after an error. This allowed ordinary users to acquire superuser status, for example. The escalation-of-privilege risk exists only in 8.1.0-8.1.2. However, in all releases back to 7.3 there is a related bug in <command>SET -SESSION AUTHORIZATION</> that allows unprivileged users to crash the server, +SESSION AUTHORIZATION</command> that allows unprivileged users to crash the server, if it has been compiled with Asserts enabled (which is not the default). Thanks to Akio Ishida for reporting this problem. </para></listitem> @@ -3055,55 +3055,55 @@ created in 8.0.4, 7.4.9, and 7.3.11 releases. </para></listitem> <listitem><para>Fix race condition that could lead to <quote>file already -exists</> errors during pg_clog and pg_subtrans file creation +exists</quote> errors during pg_clog and pg_subtrans file creation (Tom)</para></listitem> <listitem><para>Fix cases that could lead to crashes if a cache-invalidation message arrives at just the wrong time (Tom)</para></listitem> -<listitem><para>Properly check <literal>DOMAIN</> constraints for -<literal>UNKNOWN</> parameters in prepared statements +<listitem><para>Properly check <literal>DOMAIN</literal> constraints for +<literal>UNKNOWN</literal> parameters in prepared statements (Neil)</para></listitem> -<listitem><para>Ensure <command>ALTER COLUMN TYPE</> will process -<literal>FOREIGN KEY</>, <literal>UNIQUE</>, and <literal>PRIMARY KEY</> +<listitem><para>Ensure <command>ALTER COLUMN TYPE</command> will process +<literal>FOREIGN KEY</literal>, <literal>UNIQUE</literal>, and <literal>PRIMARY KEY</literal> constraints in the proper order (Nakano Yoshihisa)</para></listitem> <listitem><para>Fixes to allow restoring dumps that have cross-schema references to custom operators or operator classes (Tom)</para></listitem> -<listitem><para>Allow <application>pg_restore</> to continue properly after a -<command>COPY</> failure; formerly it tried to treat the remaining -<command>COPY</> data as SQL commands (Stephen Frost)</para></listitem> +<listitem><para>Allow <application>pg_restore</application> to continue properly after a +<command>COPY</command> failure; formerly it tried to treat the remaining +<command>COPY</command> data as SQL commands (Stephen Frost)</para></listitem> -<listitem><para>Fix <application>pg_ctl</> <literal>unregister</> crash +<listitem><para>Fix <application>pg_ctl</application> <literal>unregister</literal> crash when the data directory is not specified (Magnus)</para></listitem> -<listitem><para>Fix <application>libpq</> <function>PQprint</> HTML tags +<listitem><para>Fix <application>libpq</application> <function>PQprint</function> HTML tags (Christoph Zwerschke)</para></listitem> -<listitem><para>Fix <application>ecpg</> crash on AMD64 and PPC +<listitem><para>Fix <application>ecpg</application> crash on AMD64 and PPC (Neil)</para></listitem> -<listitem><para>Allow <literal>SETOF</> and <literal>%TYPE</> to be used +<listitem><para>Allow <literal>SETOF</literal> and <literal>%TYPE</literal> to be used together in function result type declarations</para></listitem> <listitem><para>Recover properly if error occurs during argument passing -in <application>PL/Python</> (Neil)</para></listitem> +in <application>PL/Python</application> (Neil)</para></listitem> -<listitem><para>Fix memory leak in <function>plperl_return_next</> +<listitem><para>Fix memory leak in <function>plperl_return_next</function> (Neil)</para></listitem> -<listitem><para>Fix <application>PL/Perl</>'s handling of locales on +<listitem><para>Fix <application>PL/Perl</application>'s handling of locales on Win32 to match the backend (Andrew)</para></listitem> <listitem><para>Various optimizer fixes (Tom)</para></listitem> -<listitem><para>Fix crash when <literal>log_min_messages</> is set to -<literal>DEBUG3</> or above in <filename>postgresql.conf</> on Win32 +<listitem><para>Fix crash when <literal>log_min_messages</literal> is set to +<literal>DEBUG3</literal> or above in <filename>postgresql.conf</filename> on Win32 (Bruce)</para></listitem> -<listitem><para>Fix <application>pgxs</> <literal>-L</> library path +<listitem><para>Fix <application>pgxs</application> <literal>-L</literal> library path specification for Win32, Cygwin, macOS, AIX (Bruce)</para></listitem> <listitem><para>Check that SID is enabled while checking for Win32 admin @@ -3112,13 +3112,13 @@ privileges (Magnus)</para></listitem> <listitem><para>Properly reject out-of-range date inputs (Kris Jurka)</para></listitem> -<listitem><para>Portability fix for testing presence of <function>finite</> -and <function>isinf</> during configure (Tom)</para></listitem> +<listitem><para>Portability fix for testing presence of <function>finite</function> +and <function>isinf</function> during configure (Tom)</para></listitem> -<listitem><para>Improve speed of <command>COPY IN</> via libpq, by +<listitem><para>Improve speed of <command>COPY IN</command> via libpq, by avoiding a kernel call per data line (Alon Goldshuv)</para></listitem> -<listitem><para>Improve speed of <filename>/contrib/tsearch2</> index +<listitem><para>Improve speed of <filename>/contrib/tsearch2</filename> index creation (Tom)</para></listitem> </itemizedlist> @@ -3145,9 +3145,9 @@ creation (Tom)</para></listitem> <para> A dump/restore is not required for those running 8.1.X. - However, you might need to <command>REINDEX</> indexes on textual + However, you might need to <command>REINDEX</command> indexes on textual columns after updating, if you are affected by the locale or - <application>plperl</> issues described below. + <application>plperl</application> issues described below. </para> </sect2> @@ -3160,7 +3160,7 @@ creation (Tom)</para></listitem> than exit if there is no more room in ShmemBackendArray (Magnus)</para> <para>The previous behavior could lead to a denial-of-service situation if too many connection requests arrive close together. This applies -<emphasis>only</> to the Windows port.</para></listitem> +<emphasis>only</emphasis> to the Windows port.</para></listitem> <listitem><para>Fix bug introduced in 8.0 that could allow ReadBuffer to return an already-used page as new, potentially causing loss of @@ -3171,16 +3171,16 @@ outside a transaction or in a failed transaction (Tom)</para></listitem> <listitem><para>Fix character string comparison for locales that consider different character combinations as equal, such as Hungarian (Tom)</para> -<para>This might require <command>REINDEX</> to fix existing indexes on +<para>This might require <command>REINDEX</command> to fix existing indexes on textual columns.</para></listitem> <listitem><para>Set locale environment variables during postmaster startup -to ensure that <application>plperl</> won't change the locale later</para> -<para>This fixes a problem that occurred if the <application>postmaster</> was +to ensure that <application>plperl</application> won't change the locale later</para> +<para>This fixes a problem that occurred if the <application>postmaster</application> was started with environment variables specifying a different locale than what -<application>initdb</> had been told. Under these conditions, any use of -<application>plperl</> was likely to lead to corrupt indexes. You might need -<command>REINDEX</> to fix existing indexes on +<application>initdb</application> had been told. Under these conditions, any use of +<application>plperl</application> was likely to lead to corrupt indexes. You might need +<command>REINDEX</command> to fix existing indexes on textual columns if this has happened to you.</para></listitem> <listitem><para>Allow more flexible relocation of installation @@ -3189,7 +3189,7 @@ directories (Tom)</para> directory paths were the same except for the last component.</para></listitem> <listitem><para>Prevent crashes caused by the use of -<literal>ISO-8859-5</> and <literal>ISO-8859-9</> encodings +<literal>ISO-8859-5</literal> and <literal>ISO-8859-9</literal> encodings (Tatsuo)</para></listitem> <listitem><para>Fix longstanding bug in strpos() and regular expression @@ -3197,22 +3197,22 @@ handling in certain rarely used Asian multi-byte character sets (Tatsuo) </para></listitem> <listitem><para>Fix bug where COPY CSV mode considered any -<literal>\.</> to terminate the copy data</para> <para>The new code -requires <literal>\.</> to appear alone on a line, as per +<literal>\.</literal> to terminate the copy data</para> <para>The new code +requires <literal>\.</literal> to appear alone on a line, as per documentation.</para></listitem> <listitem><para>Make COPY CSV mode quote a literal data value of -<literal>\.</> to ensure it cannot be interpreted as the +<literal>\.</literal> to ensure it cannot be interpreted as the end-of-data marker (Bruce)</para></listitem> -<listitem><para>Various fixes for functions returning <literal>RECORD</>s +<listitem><para>Various fixes for functions returning <literal>RECORD</literal>s (Tom) </para></listitem> -<listitem><para>Fix processing of <filename>postgresql.conf</> so a +<listitem><para>Fix processing of <filename>postgresql.conf</filename> so a final line with no newline is processed properly (Tom) </para></listitem> -<listitem><para>Fix bug in <filename>/contrib/pgcrypto</> gen_salt, +<listitem><para>Fix bug in <filename>/contrib/pgcrypto</filename> gen_salt, which caused it not to use all available salt space for MD5 and XDES algorithms (Marko Kreen, Solar Designer)</para> <para>Salts for Blowfish and standard DES are unaffected.</para></listitem> @@ -3220,7 +3220,7 @@ XDES algorithms (Marko Kreen, Solar Designer)</para> <listitem><para>Fix autovacuum crash when processing expression indexes </para></listitem> -<listitem><para>Fix <filename>/contrib/dblink</> to throw an error, +<listitem><para>Fix <filename>/contrib/dblink</filename> to throw an error, rather than crashing, when the number of columns specified is different from what's actually returned by the query (Joe)</para></listitem> @@ -3262,7 +3262,7 @@ what's actually returned by the query (Joe)</para></listitem> involving sub-selects flattened by the optimizer (Tom)</para></listitem> <listitem><para>Fix update failures in scenarios involving CHECK constraints, -toasted columns, <emphasis>and</> indexes (Tom)</para></listitem> +toasted columns, <emphasis>and</emphasis> indexes (Tom)</para></listitem> <listitem><para>Fix bgwriter problems after recovering from errors (Tom)</para> @@ -3276,7 +3276,7 @@ later VACUUM commands. <listitem><para>Prevent failure if client sends Bind protocol message when current transaction is already aborted</para></listitem> -<listitem><para><filename>/contrib/tsearch2</> and <filename>/contrib/ltree</> +<listitem><para><filename>/contrib/tsearch2</filename> and <filename>/contrib/ltree</filename> fixes (Teodor)</para></listitem> <listitem><para>Fix problems with translated error messages in @@ -3285,17 +3285,17 @@ unexpected truncation of output strings and wrong display of the smallest possible bigint value (Andrew, Tom)</para> <para> These problems only appeared on platforms that were using our -<filename>port/snprintf.c</> code, which includes BSD variants if -<literal>--enable-nls</> was given, and perhaps others. In addition, +<filename>port/snprintf.c</filename> code, which includes BSD variants if +<literal>--enable-nls</literal> was given, and perhaps others. In addition, a different form of the translated-error-message problem could appear -on Windows depending on which version of <filename>libintl</> was used. +on Windows depending on which version of <filename>libintl</filename> was used. </para></listitem> -<listitem><para>Re-allow <literal>AM</>/<literal>PM</>, <literal>HH</>, -<literal>HH12</>, and <literal>D</> format specifiers for -<function>to_char(time)</> and <function>to_char(interval)</>. -(<function>to_char(interval)</> should probably use -<literal>HH24</>.) (Bruce)</para></listitem> +<listitem><para>Re-allow <literal>AM</literal>/<literal>PM</literal>, <literal>HH</literal>, +<literal>HH12</literal>, and <literal>D</literal> format specifiers for +<function>to_char(time)</function> and <function>to_char(interval)</function>. +(<function>to_char(interval)</function> should probably use +<literal>HH24</literal>.) (Bruce)</para></listitem> <listitem><para>AIX, HPUX, and MSVC compile fixes (Tom, Hiroshi Saito)</para></listitem> @@ -3305,7 +3305,7 @@ Saito)</para></listitem> <listitem><para>Retry file reads and writes after Windows NO_SYSTEM_RESOURCES error (Qingqing Zhou)</para></listitem> -<listitem><para>Prevent <application>autovacuum</> from crashing during +<listitem><para>Prevent <application>autovacuum</application> from crashing during ANALYZE of expression index (Alvaro)</para></listitem> <listitem><para>Fix problems with ON COMMIT DELETE ROWS temp @@ -3315,7 +3315,7 @@ tables</para></listitem> DISTINCT query</para></listitem> <listitem><para>Add 8.1.0 release note item on how to migrate invalid -<literal>UTF-8</> byte sequences (Paul Lindner)</para></listitem> +<literal>UTF-8</literal> byte sequences (Paul Lindner)</para></listitem> </itemizedlist> </sect2> @@ -3365,13 +3365,13 @@ DISTINCT query</para></listitem> <para> In previous releases, only a single index could be used to do lookups on a table. With this feature, if a query has - <command>WHERE tab.col1 = 4 and tab.col2 = 9</>, and there is - no multicolumn index on <literal>col1</> and <literal>col2</>, - but there is an index on <literal>col1</> and another on - <literal>col2</>, it is possible to search both indexes and + <command>WHERE tab.col1 = 4 and tab.col2 = 9</command>, and there is + no multicolumn index on <literal>col1</literal> and <literal>col2</literal>, + but there is an index on <literal>col1</literal> and another on + <literal>col2</literal>, it is possible to search both indexes and combine the results in memory, then do heap fetches for only - the rows matching both the <literal>col1</> and - <literal>col2</> restrictions. This is very useful in + the rows matching both the <literal>col1</literal> and + <literal>col2</literal> restrictions. This is very useful in environments that have a lot of unstructured queries where it is impossible to create indexes that match all possible access conditions. Bitmap scans are useful even with a single index, @@ -3394,9 +3394,9 @@ DISTINCT query</para></listitem> their transactions (none failed), all transactions can be committed. Even if a machine crashes after a prepare, the prepared transaction can be committed after the machine is - restarted. New syntax includes <command>PREPARE TRANSACTION</> and - <command>COMMIT/ROLLBACK PREPARED</>. A new system view - <literal>pg_prepared_xacts</> has also been added. + restarted. New syntax includes <command>PREPARE TRANSACTION</command> and + <command>COMMIT/ROLLBACK PREPARED</command>. A new system view + <literal>pg_prepared_xacts</literal> has also been added. </para> </listitem> </varlistentry> @@ -3445,12 +3445,12 @@ DISTINCT query</para></listitem> <para> Once a user logs into a role, she obtains capabilities of the login role plus any inherited roles, and can use - <command>SET ROLE</> to switch to other roles she is a member of. + <command>SET ROLE</command> to switch to other roles she is a member of. This feature is a generalization of the SQL standard's concept of roles. - This change also replaces <structname>pg_shadow</> and - <structname>pg_group</> by new role-capable catalogs - <structname>pg_authid</> and <structname>pg_auth_members</>. The old + This change also replaces <structname>pg_shadow</structname> and + <structname>pg_group</structname> by new role-capable catalogs + <structname>pg_authid</structname> and <structname>pg_auth_members</structname>. The old tables are redefined as read-only views on the new role tables. </para> </listitem> @@ -3458,15 +3458,15 @@ DISTINCT query</para></listitem> <varlistentry> <term> - Automatically use indexes for <function>MIN()</> and - <function>MAX()</> (Tom) + Automatically use indexes for <function>MIN()</function> and + <function>MAX()</function> (Tom) </term> <listitem> <para> In previous releases, the only way to use an index for - <function>MIN()</> or <function>MAX()</> was to rewrite the - query as <command>SELECT col FROM tab ORDER BY col LIMIT 1</>. + <function>MIN()</function> or <function>MAX()</function> was to rewrite the + query as <command>SELECT col FROM tab ORDER BY col LIMIT 1</command>. Index usage now happens automatically. </para> </listitem> @@ -3474,7 +3474,7 @@ DISTINCT query</para></listitem> <varlistentry> <term> - Move <filename>/contrib/pg_autovacuum</> into the main server + Move <filename>/contrib/pg_autovacuum</filename> into the main server (Alvaro) </term> @@ -3483,21 +3483,21 @@ DISTINCT query</para></listitem> Integrating autovacuum into the server allows it to be automatically started and stopped in sync with the database server, and allows autovacuum to be configured from - <filename>postgresql.conf</>. + <filename>postgresql.conf</filename>. </para> </listitem> </varlistentry> <varlistentry> <term> - Add shared row level locks using <command>SELECT ... FOR SHARE</> + Add shared row level locks using <command>SELECT ... FOR SHARE</command> (Alvaro) </term> <listitem> <para> While <productname>PostgreSQL</productname>'s MVCC locking - allows <command>SELECT</> to never be blocked by writers and + allows <command>SELECT</command> to never be blocked by writers and therefore does not need shared row locks for typical operations, shared locks are useful for applications that require shared row locking. In particular this reduces the locking requirements @@ -3516,7 +3516,7 @@ DISTINCT query</para></listitem> <para> This extension of the dependency mechanism prevents roles from being dropped while there are still database objects they own. - Formerly it was possible to accidentally <quote>orphan</> objects by + Formerly it was possible to accidentally <quote>orphan</quote> objects by deleting their owner. While this could be recovered from, it was messy and unpleasant. </para> @@ -3537,7 +3537,7 @@ DISTINCT query</para></listitem> <para> This allows for a basic type of table partitioning. If child tables store separate key ranges and this is enforced using appropriate - <command>CHECK</> constraints, the optimizer will skip child + <command>CHECK</command> constraints, the optimizer will skip child table accesses when the constraint guarantees no matching rows exist in the child table. </para> @@ -3556,9 +3556,9 @@ DISTINCT query</para></listitem> </para> <para> - The 8.0 release announced that the <function>to_char()</> function + The 8.0 release announced that the <function>to_char()</function> function for intervals would be removed in 8.1. However, since no better API - has been suggested, <function>to_char(interval)</> has been enhanced in + has been suggested, <function>to_char(interval)</function> has been enhanced in 8.1 and will remain in the server. </para> @@ -3570,21 +3570,21 @@ DISTINCT query</para></listitem> <listitem> <para> - <varname>add_missing_from</> is now false by default (Neil) + <varname>add_missing_from</varname> is now false by default (Neil) </para> <para> By default, we now generate an error if a table is used in a query - without a <literal>FROM</> reference. The old behavior is still + without a <literal>FROM</literal> reference. The old behavior is still available, but the parameter must be set to 'true' to obtain it. </para> <para> - It might be necessary to set <varname>add_missing_from</> to true + It might be necessary to set <varname>add_missing_from</varname> to true in order to load an existing dump file, if the dump contains any - views or rules created using the implicit-<literal>FROM</> syntax. + views or rules created using the implicit-<literal>FROM</literal> syntax. This should be a one-time annoyance, because <productname>PostgreSQL</productname> 8.1 will convert - such views and rules to standard explicit-<literal>FROM</> syntax. + such views and rules to standard explicit-<literal>FROM</literal> syntax. Subsequent dumps will therefore not have the problem. </para> </listitem> @@ -3604,29 +3604,29 @@ DISTINCT query</para></listitem> <listitem> <para> - <varname>default_with_oids</> is now false by default (Neil) + <varname>default_with_oids</varname> is now false by default (Neil) </para> <para> With this option set to false, user-created tables no longer - have an OID column unless <command>WITH OIDS</> is specified in - <command>CREATE TABLE</>. Though OIDs have existed in all - releases of <productname>PostgreSQL</>, their use is limited + have an OID column unless <command>WITH OIDS</command> is specified in + <command>CREATE TABLE</command>. Though OIDs have existed in all + releases of <productname>PostgreSQL</productname>, their use is limited because they are only four bytes long and the counter is shared across all installed databases. The preferred way of uniquely - identifying rows is via sequences and the <type>SERIAL</> type, - which have been supported since <productname>PostgreSQL</> 6.4. + identifying rows is via sequences and the <type>SERIAL</type> type, + which have been supported since <productname>PostgreSQL</productname> 6.4. </para> </listitem> <listitem> <para> - Add <literal>E''</> syntax so eventually ordinary strings can + Add <literal>E''</literal> syntax so eventually ordinary strings can treat backslashes literally (Bruce) </para> <para> Currently <productname>PostgreSQL</productname> processes a backslash in a string literal as introducing a special escape sequence, - e.g. <literal>\n</> or <literal>\010</>. + e.g. <literal>\n</literal> or <literal>\010</literal>. While this allows easy entry of special values, it is nonstandard and makes porting of applications from other databases more difficult. For this reason, the @@ -3634,8 +3634,8 @@ DISTINCT query</para></listitem> remove the special meaning of backslashes in strings. For backward compatibility and for users who want special backslash processing, a new string syntax has been created. This new string - syntax is formed by writing an <literal>E</> immediately preceding the - single quote that starts the string, e.g. <literal>E'hi\n'</>. While + syntax is formed by writing an <literal>E</literal> immediately preceding the + single quote that starts the string, e.g. <literal>E'hi\n'</literal>. While this release does not change the handling of backslashes in strings, it does add new configuration parameters to help users migrate applications for future releases: @@ -3644,14 +3644,14 @@ DISTINCT query</para></listitem> <listitem> <para> - <varname>standard_conforming_strings</> — does this release + <varname>standard_conforming_strings</varname> — does this release treat backslashes literally in ordinary strings? </para> </listitem> <listitem> <para> - <varname>escape_string_warning</> — warn about backslashes in + <varname>escape_string_warning</varname> — warn about backslashes in ordinary (non-E) strings </para> </listitem> @@ -3659,36 +3659,36 @@ DISTINCT query</para></listitem> </itemizedlist> <para> - The <varname>standard_conforming_strings</> value is read-only. + The <varname>standard_conforming_strings</varname> value is read-only. Applications can retrieve the value to know how backslashes are processed. (Presence of the parameter can also be taken as an - indication that <literal>E''</> string syntax is supported.) - In a future release, <varname>standard_conforming_strings</> + indication that <literal>E''</literal> string syntax is supported.) + In a future release, <varname>standard_conforming_strings</varname> will be true, meaning backslashes will be treated literally in - non-E strings. To prepare for this change, use <literal>E''</> + non-E strings. To prepare for this change, use <literal>E''</literal> strings in places that need special backslash processing, and - turn on <varname>escape_string_warning</> to find additional - strings that need to be converted to use <literal>E''</>. - Also, use two single-quotes (<literal>''</>) to embed a literal + turn on <varname>escape_string_warning</varname> to find additional + strings that need to be converted to use <literal>E''</literal>. + Also, use two single-quotes (<literal>''</literal>) to embed a literal single-quote in a string, rather than the <productname>PostgreSQL</productname>-supported syntax of - backslash single-quote (<literal>\'</>). The former is + backslash single-quote (<literal>\'</literal>). The former is standards-conforming and does not require the use of the - <literal>E''</> string syntax. You can also use the - <literal>$$</> string syntax, which does not treat backslashes + <literal>E''</literal> string syntax. You can also use the + <literal>$$</literal> string syntax, which does not treat backslashes specially. </para> </listitem> <listitem> <para> - Make <command>REINDEX DATABASE</> reindex all indexes in the + Make <command>REINDEX DATABASE</command> reindex all indexes in the database (Tom) </para> <para> - Formerly, <command>REINDEX DATABASE</> reindexed only + Formerly, <command>REINDEX DATABASE</command> reindexed only system tables. This new behavior seems more intuitive. A new - command <command>REINDEX SYSTEM</> provides the old functionality + command <command>REINDEX SYSTEM</command> provides the old functionality of reindexing just the system tables. </para> </listitem> @@ -3698,13 +3698,13 @@ DISTINCT query</para></listitem> Read-only large object descriptors now obey MVCC snapshot semantics </para> <para> - When a large object is opened with <literal>INV_READ</> (and not - <literal>INV_WRITE</>), the data read from the descriptor will now - reflect a <quote>snapshot</> of the large object's state at the + When a large object is opened with <literal>INV_READ</literal> (and not + <literal>INV_WRITE</literal>), the data read from the descriptor will now + reflect a <quote>snapshot</quote> of the large object's state at the time of the transaction snapshot in use by the query that called - <function>lo_open()</>. To obtain the old behavior of always - returning the latest committed data, include <literal>INV_WRITE</> - in the mode flags for <function>lo_open()</>. + <function>lo_open()</function>. To obtain the old behavior of always + returning the latest committed data, include <literal>INV_WRITE</literal> + in the mode flags for <function>lo_open()</function>. </para> </listitem> @@ -3713,28 +3713,28 @@ DISTINCT query</para></listitem> Add proper dependencies for arguments of sequence functions (Tom) </para> <para> - In previous releases, sequence names passed to <function>nextval()</>, - <function>currval()</>, and <function>setval()</> were stored as + In previous releases, sequence names passed to <function>nextval()</function>, + <function>currval()</function>, and <function>setval()</function> were stored as simple text strings, meaning that renaming or dropping a - sequence used in a <literal>DEFAULT</> clause made the clause + sequence used in a <literal>DEFAULT</literal> clause made the clause invalid. This release stores all newly-created sequence function arguments as internal OIDs, allowing them to track sequence renaming, and adding dependency information that prevents - improper sequence removal. It also makes such <literal>DEFAULT</> + improper sequence removal. It also makes such <literal>DEFAULT</literal> clauses immune to schema renaming and search path changes. </para> <para> Some applications might rely on the old behavior of run-time lookup for sequence names. This can still be done by - explicitly casting the argument to <type>text</>, for example - <literal>nextval('myseq'::text)</>. + explicitly casting the argument to <type>text</type>, for example + <literal>nextval('myseq'::text)</literal>. </para> <para> Pre-8.1 database dumps loaded into 8.1 will use the old text-based representation and therefore will not have the features of OID-stored arguments. However, it is possible to update a - database containing text-based <literal>DEFAULT</> clauses. - First, save this query into a file, such as <filename>fixseq.sql</>: + database containing text-based <literal>DEFAULT</literal> clauses. + First, save this query into a file, such as <filename>fixseq.sql</filename>: <programlisting> SELECT 'ALTER TABLE ' || pg_catalog.quote_ident(n.nspname) || '.' || @@ -3754,11 +3754,11 @@ WHERE n.oid = c.relnamespace AND d.adsrc ~ $$val\(\('[^']*'::text\)::regclass$$; </programlisting> Next, run the query against a database to find what - adjustments are required, like this for database <literal>db1</>: + adjustments are required, like this for database <literal>db1</literal>: <programlisting> psql -t -f fixseq.sql db1 </programlisting> - This will show the <command>ALTER TABLE</> commands needed to + This will show the <command>ALTER TABLE</command> commands needed to convert the database to the newer OID-based representation. If the commands look reasonable, run this to update the database: <programlisting> @@ -3771,51 +3771,51 @@ psql -t -f fixseq.sql db1 | psql -e db1 <listitem> <para> In <application>psql</application>, treat unquoted - <literal>\{digit}+</> sequences as octal (Bruce) + <literal>\{digit}+</literal> sequences as octal (Bruce) </para> <para> - In previous releases, <literal>\{digit}+</> sequences were - treated as decimal, and only <literal>\0{digit}+</> were treated + In previous releases, <literal>\{digit}+</literal> sequences were + treated as decimal, and only <literal>\0{digit}+</literal> were treated as octal. This change was made for consistency. </para> </listitem> <listitem> <para> - Remove grammar productions for prefix and postfix <literal>%</> - and <literal>^</> operators + Remove grammar productions for prefix and postfix <literal>%</literal> + and <literal>^</literal> operators (Tom) </para> <para> These have never been documented and complicated the use of the - modulus operator (<literal>%</>) with negative numbers. + modulus operator (<literal>%</literal>) with negative numbers. </para> </listitem> <listitem> <para> - Make <literal>&<</> and <literal>&></> for polygons + Make <literal>&<</literal> and <literal>&></literal> for polygons consistent with the box "over" operators (Tom) </para> </listitem> <listitem> <para> - <command>CREATE LANGUAGE</> can ignore the provided arguments - in favor of information from <structname>pg_pltemplate</> + <command>CREATE LANGUAGE</command> can ignore the provided arguments + in favor of information from <structname>pg_pltemplate</structname> (Tom) </para> <para> - A new system catalog <structname>pg_pltemplate</> has been defined + A new system catalog <structname>pg_pltemplate</structname> has been defined to carry information about the preferred definitions of procedural languages (such as whether they have validator functions). When an entry exists in this catalog for the language being created, - <command>CREATE LANGUAGE</> will ignore all its parameters except the + <command>CREATE LANGUAGE</command> will ignore all its parameters except the language name and instead use the catalog information. This measure was taken because of increasing problems with obsolete language definitions being loaded by old dump files. As of 8.1, - <application>pg_dump</> will dump procedural language definitions as - just <command>CREATE LANGUAGE <replaceable>name</></command>, relying + <application>pg_dump</application> will dump procedural language definitions as + just <command>CREATE LANGUAGE <replaceable>name</replaceable></command>, relying on a template entry to exist at load time. We expect this will be a more future-proof representation. </para> @@ -3835,11 +3835,11 @@ psql -t -f fixseq.sql db1 | psql -e db1 sequences to be entered into the database, and this release properly accepts only valid UTF-8 sequences. One way to correct a dumpfile is to run the command <command>iconv -c -f UTF-8 -t - UTF-8 -o cleanfile.sql dumpfile.sql</>. The <literal>-c</> option + UTF-8 -o cleanfile.sql dumpfile.sql</command>. The <literal>-c</literal> option removes invalid character sequences. A diff of the two files will - show the sequences that are invalid. <command>iconv</> reads the + show the sequences that are invalid. <command>iconv</command> reads the entire input file into memory so it might be necessary to use - <application>split</> to break up the dump into multiple smaller + <application>split</application> to break up the dump into multiple smaller files for processing. </para> </listitem> @@ -3908,17 +3908,17 @@ psql -t -f fixseq.sql db1 | psql -e db1 </para> <para> For example, this allows an index on columns a,b,c to be used in - a query with <command>WHERE a = 4 and c = 10</>. + a query with <command>WHERE a = 4 and c = 10</command>. </para> </listitem> <listitem> <para> - Skip WAL logging for <command>CREATE TABLE AS</> / - <command>SELECT INTO</> (Simon) + Skip WAL logging for <command>CREATE TABLE AS</command> / + <command>SELECT INTO</command> (Simon) </para> <para> - Since a crash during <command>CREATE TABLE AS</> would cause the + Since a crash during <command>CREATE TABLE AS</command> would cause the table to be dropped during recovery, there is no reason to WAL log as the table is loaded. (Logging still happens if WAL archiving is enabled, however.) @@ -3933,7 +3933,7 @@ psql -t -f fixseq.sql db1 | psql -e db1 <listitem> <para> - Add configuration parameter <varname>full_page_writes</> to + Add configuration parameter <varname>full_page_writes</varname> to control writing full pages to WAL (Bruce) </para> <para> @@ -3948,22 +3948,22 @@ psql -t -f fixseq.sql db1 | psql -e db1 <listitem> <para> - Use <literal>O_DIRECT</> if available when using - <literal>O_SYNC</> for <varname>wal_sync_method</varname> + Use <literal>O_DIRECT</literal> if available when using + <literal>O_SYNC</literal> for <varname>wal_sync_method</varname> (Itagaki Takahiro) </para> <para> - <literal>O_DIRECT</> causes disk writes to bypass the kernel + <literal>O_DIRECT</literal> causes disk writes to bypass the kernel cache, and for WAL writes, this improves performance. </para> </listitem> <listitem> <para> - Improve <command>COPY FROM</> performance (Alon Goldshuv) + Improve <command>COPY FROM</command> performance (Alon Goldshuv) </para> <para> - This was accomplished by reading <command>COPY</> input in + This was accomplished by reading <command>COPY</command> input in larger chunks, rather than character by character. </para> </listitem> @@ -4005,14 +4005,14 @@ psql -t -f fixseq.sql db1 | psql -e db1 <listitem> <para> Add warning about the need to increase - <varname>max_fsm_relations</> and <varname>max_fsm_pages</> - during <command>VACUUM</> (Ron Mayer) + <varname>max_fsm_relations</varname> and <varname>max_fsm_pages</varname> + during <command>VACUUM</command> (Ron Mayer) </para> </listitem> <listitem> <para> - Add <varname>temp_buffers</> configuration parameter to allow + Add <varname>temp_buffers</varname> configuration parameter to allow users to determine the size of the local buffer area for temporary table access (Tom) </para> @@ -4021,13 +4021,13 @@ psql -t -f fixseq.sql db1 | psql -e db1 <listitem> <para> Add session start time and client IP address to - <literal>pg_stat_activity</> (Magnus) + <literal>pg_stat_activity</literal> (Magnus) </para> </listitem> <listitem> <para> - Adjust <literal>pg_stat</> views for bitmap scans (Tom) + Adjust <literal>pg_stat</literal> views for bitmap scans (Tom) </para> <para> The meanings of some of the fields have changed slightly. @@ -4036,27 +4036,27 @@ psql -t -f fixseq.sql db1 | psql -e db1 <listitem> <para> - Enhance <literal>pg_locks</> view (Tom) + Enhance <literal>pg_locks</literal> view (Tom) </para> </listitem> <listitem> <para> - Log queries for client-side <command>PREPARE</> and - <command>EXECUTE</> (Simon) + Log queries for client-side <command>PREPARE</command> and + <command>EXECUTE</command> (Simon) </para> </listitem> <listitem> <para> Allow Kerberos name and user name case sensitivity to be - specified in <filename>postgresql.conf</> (Magnus) + specified in <filename>postgresql.conf</filename> (Magnus) </para> </listitem> <listitem> <para> - Add configuration parameter <varname>krb_server_hostname</> so + Add configuration parameter <varname>krb_server_hostname</varname> so that the server host name can be specified as part of service principal (Todd Kover) </para> @@ -4069,8 +4069,8 @@ psql -t -f fixseq.sql db1 | psql -e db1 <listitem> <para> - Add <varname>log_line_prefix</> options for millisecond - timestamps (<literal>%m</>) and remote host (<literal>%h</>) (Ed + Add <varname>log_line_prefix</varname> options for millisecond + timestamps (<literal>%m</literal>) and remote host (<literal>%h</literal>) (Ed L.) </para> </listitem> @@ -4086,12 +4086,12 @@ psql -t -f fixseq.sql db1 | psql -e db1 <listitem> <para> - Remove old <filename>*.backup</> files when we do - <function>pg_stop_backup()</> (Bruce) + Remove old <filename>*.backup</filename> files when we do + <function>pg_stop_backup()</function> (Bruce) </para> <para> - This prevents a large number of <filename>*.backup</> files from - existing in <filename>pg_xlog/</>. + This prevents a large number of <filename>*.backup</filename> files from + existing in <filename>pg_xlog/</filename>. </para> </listitem> @@ -4112,7 +4112,7 @@ psql -t -f fixseq.sql db1 | psql -e db1 Add per-user and per-database connection limits (Petr Jelinek) </para> <para> - Using <command>ALTER USER</> and <command>ALTER DATABASE</>, + Using <command>ALTER USER</command> and <command>ALTER DATABASE</command>, limits can now be enforced on the maximum number of sessions that can concurrently connect as a specific user or to a specific database. Setting the limit to zero disables user or database connections. @@ -4128,7 +4128,7 @@ psql -t -f fixseq.sql db1 | psql -e db1 <listitem> <para> - New system catalog <structname>pg_pltemplate</> allows overriding + New system catalog <structname>pg_pltemplate</structname> allows overriding obsolete procedural-language definitions in dump files (Tom) </para> </listitem> @@ -4149,63 +4149,63 @@ psql -t -f fixseq.sql db1 | psql -e db1 <listitem> <para> - Fix <command>HAVING</> without any aggregate functions or - <command>GROUP BY</> so that the query returns a single group (Tom) + Fix <command>HAVING</command> without any aggregate functions or + <command>GROUP BY</command> so that the query returns a single group (Tom) </para> <para> - Previously, such a case would treat the <command>HAVING</> - clause the same as a <command>WHERE</> clause. This was not per spec. + Previously, such a case would treat the <command>HAVING</command> + clause the same as a <command>WHERE</command> clause. This was not per spec. </para> </listitem> <listitem> <para> - Add <command>USING</> clause to allow additional tables to be - specified to <command>DELETE</> (Euler Taveira de Oliveira, Neil) + Add <command>USING</command> clause to allow additional tables to be + specified to <command>DELETE</command> (Euler Taveira de Oliveira, Neil) </para> <para> In prior releases, there was no clear method for specifying - additional tables to be used for joins in a <command>DELETE</> - statement. <command>UPDATE</> already has a <literal>FROM</> + additional tables to be used for joins in a <command>DELETE</command> + statement. <command>UPDATE</command> already has a <literal>FROM</literal> clause for this purpose. </para> </listitem> <listitem> <para> - Add support for <literal>\x</> hex escapes in backend and ecpg + Add support for <literal>\x</literal> hex escapes in backend and ecpg strings (Bruce) </para> <para> - This is just like the standard C <literal>\x</> escape syntax. + This is just like the standard C <literal>\x</literal> escape syntax. Octal escapes were already supported. </para> </listitem> <listitem> <para> - Add <command>BETWEEN SYMMETRIC</> query syntax (Pavel Stehule) + Add <command>BETWEEN SYMMETRIC</command> query syntax (Pavel Stehule) </para> <para> - This feature allows <command>BETWEEN</> comparisons without + This feature allows <command>BETWEEN</command> comparisons without requiring the first value to be less than the second. For - example, <command>2 BETWEEN [ASYMMETRIC] 3 AND 1</> returns - false, while <command>2 BETWEEN SYMMETRIC 3 AND 1</> returns - true. <command>BETWEEN ASYMMETRIC</> was already supported. + example, <command>2 BETWEEN [ASYMMETRIC] 3 AND 1</command> returns + false, while <command>2 BETWEEN SYMMETRIC 3 AND 1</command> returns + true. <command>BETWEEN ASYMMETRIC</command> was already supported. </para> </listitem> <listitem> <para> - Add <command>NOWAIT</> option to <command>SELECT ... FOR - UPDATE/SHARE</> (Hans-Juergen Schoenig) + Add <command>NOWAIT</command> option to <command>SELECT ... FOR + UPDATE/SHARE</command> (Hans-Juergen Schoenig) </para> <para> - While the <varname>statement_timeout</> configuration + While the <varname>statement_timeout</varname> configuration parameter allows a query taking more than a certain amount of - time to be canceled, the <command>NOWAIT</> option allows a + time to be canceled, the <command>NOWAIT</command> option allows a query to be canceled as soon as a <command>SELECT ... FOR - UPDATE/SHARE</> command cannot immediately acquire a row lock. + UPDATE/SHARE</command> command cannot immediately acquire a row lock. </para> </listitem> </itemizedlist> @@ -4233,7 +4233,7 @@ psql -t -f fixseq.sql db1 | psql -e db1 <listitem> <para> - Allow limited <command>ALTER OWNER</> commands to be performed + Allow limited <command>ALTER OWNER</command> commands to be performed by the object owner (Stephen Frost) </para> <para> @@ -4248,7 +4248,7 @@ psql -t -f fixseq.sql db1 | psql -e db1 <listitem> <para> - Add <command>ALTER</> object <command>SET SCHEMA</> capability + Add <command>ALTER</command> object <command>SET SCHEMA</command> capability for some object types (tables, functions, types) (Bernd Helmle) </para> <para> @@ -4273,54 +4273,54 @@ psql -t -f fixseq.sql db1 | psql -e db1 <listitem> <para> - Allow <command>TRUNCATE</> to truncate multiple tables in a + Allow <command>TRUNCATE</command> to truncate multiple tables in a single command (Alvaro) </para> <para> Because of referential integrity checks, it is not allowed to truncate a table that is part of a referential integrity - constraint. Using this new functionality, <command>TRUNCATE</> + constraint. Using this new functionality, <command>TRUNCATE</command> can be used to truncate such tables, if both tables involved in a referential integrity constraint are truncated in a single - <command>TRUNCATE</> command. + <command>TRUNCATE</command> command. </para> </listitem> <listitem> <para> Properly process carriage returns and line feeds in - <command>COPY CSV</> mode (Andrew) + <command>COPY CSV</command> mode (Andrew) </para> <para> In release 8.0, carriage returns and line feeds in <command>CSV - COPY TO</> were processed in an inconsistent manner. (This was + COPY TO</command> were processed in an inconsistent manner. (This was documented on the TODO list.) </para> </listitem> <listitem> <para> - Add <command>COPY WITH CSV HEADER</> to allow a header line as - the first line in <command>COPY</> (Andrew) + Add <command>COPY WITH CSV HEADER</command> to allow a header line as + the first line in <command>COPY</command> (Andrew) </para> <para> - This allows handling of the common <command>CSV</> usage of + This allows handling of the common <command>CSV</command> usage of placing the column names on the first line of the data file. For - <command>COPY TO</>, the first line contains the column names, - and for <command>COPY FROM</>, the first line is ignored. + <command>COPY TO</command>, the first line contains the column names, + and for <command>COPY FROM</command>, the first line is ignored. </para> </listitem> <listitem> <para> On Windows, display better sub-second precision in - <command>EXPLAIN ANALYZE</> (Magnus) + <command>EXPLAIN ANALYZE</command> (Magnus) </para> </listitem> <listitem> <para> - Add trigger duration display to <command>EXPLAIN ANALYZE</> + Add trigger duration display to <command>EXPLAIN ANALYZE</command> (Tom) </para> <para> @@ -4332,7 +4332,7 @@ psql -t -f fixseq.sql db1 | psql -e db1 <listitem> <para> - Add support for <literal>\x</> hex escapes in <command>COPY</> + Add support for <literal>\x</literal> hex escapes in <command>COPY</command> (Sergey Ten) </para> <para> @@ -4342,11 +4342,11 @@ psql -t -f fixseq.sql db1 | psql -e db1 <listitem> <para> - Make <command>SHOW ALL</> include variable descriptions + Make <command>SHOW ALL</command> include variable descriptions (Matthias Schmidt) </para> <para> - <command>SHOW</> varname still only displays the variable's + <command>SHOW</command> varname still only displays the variable's value and does not include the description. </para> </listitem> @@ -4354,27 +4354,27 @@ psql -t -f fixseq.sql db1 | psql -e db1 <listitem> <para> Make <application>initdb</application> create a new standard - database called <literal>postgres</>, and convert utilities to - use <literal>postgres</> rather than <literal>template1</> for + database called <literal>postgres</literal>, and convert utilities to + use <literal>postgres</literal> rather than <literal>template1</literal> for standard lookups (Dave) </para> <para> - In prior releases, <literal>template1</> was used both as a + In prior releases, <literal>template1</literal> was used both as a default connection for utilities like <application>createuser</application>, and as a template for - new databases. This caused <command>CREATE DATABASE</> to + new databases. This caused <command>CREATE DATABASE</command> to sometimes fail, because a new database cannot be created if anyone else is in the template database. With this change, the - default connection database is now <literal>postgres</>, + default connection database is now <literal>postgres</literal>, meaning it is much less likely someone will be using - <literal>template1</> during <command>CREATE DATABASE</>. + <literal>template1</literal> during <command>CREATE DATABASE</command>. </para> </listitem> <listitem> <para> Create new <application>reindexdb</application> command-line - utility by moving <filename>/contrib/reindexdb</> into the + utility by moving <filename>/contrib/reindexdb</filename> into the server (Euler Taveira de Oliveira) </para> </listitem> @@ -4389,38 +4389,38 @@ psql -t -f fixseq.sql db1 | psql -e db1 <listitem> <para> - Add <function>MAX()</> and <function>MIN()</> aggregates for + Add <function>MAX()</function> and <function>MIN()</function> aggregates for array types (Koju Iijima) </para> </listitem> <listitem> <para> - Fix <function>to_date()</> and <function>to_timestamp()</> to - behave reasonably when <literal>CC</> and <literal>YY</> fields + Fix <function>to_date()</function> and <function>to_timestamp()</function> to + behave reasonably when <literal>CC</literal> and <literal>YY</literal> fields are both used (Karel Zak) </para> <para> - If the format specification contains <literal>CC</> and a year - specification is <literal>YYY</> or longer, ignore the - <literal>CC</>. If the year specification is <literal>YY</> or - shorter, interpret <literal>CC</> as the previous century. + If the format specification contains <literal>CC</literal> and a year + specification is <literal>YYY</literal> or longer, ignore the + <literal>CC</literal>. If the year specification is <literal>YY</literal> or + shorter, interpret <literal>CC</literal> as the previous century. </para> </listitem> <listitem> <para> - Add <function>md5(bytea)</> (Abhijit Menon-Sen) + Add <function>md5(bytea)</function> (Abhijit Menon-Sen) </para> <para> - <function>md5(text)</> already existed. + <function>md5(text)</function> already existed. </para> </listitem> <listitem> <para> - Add support for <command>numeric ^ numeric</> based on - <function>power(numeric, numeric)</> + Add support for <command>numeric ^ numeric</command> based on + <function>power(numeric, numeric)</function> </para> <para> The function already existed, but there was no operator assigned @@ -4430,7 +4430,7 @@ psql -t -f fixseq.sql db1 | psql -e db1 <listitem> <para> - Fix <type>NUMERIC</> modulus by properly truncating the quotient + Fix <type>NUMERIC</type> modulus by properly truncating the quotient during computation (Bruce) </para> <para> @@ -4441,29 +4441,29 @@ psql -t -f fixseq.sql db1 | psql -e db1 <listitem> <para> - Add a function <function>lastval()</> (Dennis Björklund) + Add a function <function>lastval()</function> (Dennis Björklund) </para> <para> - <function>lastval()</> is a simplified version of - <function>currval()</>. It automatically determines the proper - sequence name based on the most recent <function>nextval()</> or - <function>setval()</> call performed by the current session. + <function>lastval()</function> is a simplified version of + <function>currval()</function>. It automatically determines the proper + sequence name based on the most recent <function>nextval()</function> or + <function>setval()</function> call performed by the current session. </para> </listitem> <listitem> <para> - Add <function>to_timestamp(DOUBLE PRECISION) (Michael Glaesemann)</> + Add <function>to_timestamp(DOUBLE PRECISION) (Michael Glaesemann)</function> </para> <para> Converts Unix seconds since 1970 to a <type>TIMESTAMP WITH - TIMEZONE</>. + TIMEZONE</type>. </para> </listitem> <listitem> <para> - Add <function>pg_postmaster_start_time()</> function (Euler + Add <function>pg_postmaster_start_time()</function> function (Euler Taveira de Oliveira, Matthias Schmidt) </para> </listitem> @@ -4471,11 +4471,11 @@ psql -t -f fixseq.sql db1 | psql -e db1 <listitem> <para> Allow the full use of time zone names in <command>AT TIME - ZONE</>, not just the short list previously available (Magnus) + ZONE</command>, not just the short list previously available (Magnus) </para> <para> Previously, only a predefined list of time zone names were - supported by <command>AT TIME ZONE</>. Now any supported time + supported by <command>AT TIME ZONE</command>. Now any supported time zone name can be used, e.g.: <programlisting> SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London'; @@ -4488,7 +4488,7 @@ SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London'; <listitem> <para> - Add <function>GREATEST()</> and <function>LEAST()</> variadic + Add <function>GREATEST()</function> and <function>LEAST()</function> variadic functions (Pavel Stehule) </para> <para> @@ -4499,7 +4499,7 @@ SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London'; <listitem> <para> - Add <function>pg_column_size()</> (Mark Kirkwood) + Add <function>pg_column_size()</function> (Mark Kirkwood) </para> <para> This returns storage size of a column, which might be compressed. @@ -4508,7 +4508,7 @@ SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London'; <listitem> <para> - Add <function>regexp_replace()</> (Atsushi Ogawa) + Add <function>regexp_replace()</function> (Atsushi Ogawa) </para> <para> This allows regular expression replacement, like sed. An optional @@ -4523,8 +4523,8 @@ SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London'; </para> <para> Previous versions sometimes returned unjustified results, like - <command>'4 months'::interval / 5</> returning <command>'1 mon - -6 days'</>. + <command>'4 months'::interval / 5</command> returning <command>'1 mon + -6 days'</command>. </para> </listitem> @@ -4534,24 +4534,24 @@ SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London'; </para> <para> This fixes some cases in which the seconds field would be shown as - <literal>60</> instead of incrementing the higher-order fields. + <literal>60</literal> instead of incrementing the higher-order fields. </para> </listitem> <listitem> <para> - Add a separate day field to type <type>interval</> so a one day + Add a separate day field to type <type>interval</type> so a one day interval can be distinguished from a 24 hour interval (Michael Glaesemann) </para> <para> Days that contain a daylight saving time adjustment are not 24 hours long, but typically 23 or 25 hours. This change creates a - conceptual distinction between intervals of <quote>so many days</> - and intervals of <quote>so many hours</>. Adding - <literal>1 day</> to a timestamp now gives the same local time on + conceptual distinction between intervals of <quote>so many days</quote> + and intervals of <quote>so many hours</quote>. Adding + <literal>1 day</literal> to a timestamp now gives the same local time on the next day even if a daylight saving time adjustment occurs - between, whereas adding <literal>24 hours</> will give a different + between, whereas adding <literal>24 hours</literal> will give a different local time when this happens. For example, under US DST rules: <programlisting> '2005-04-03 00:00:00-05' + '1 day' = '2005-04-04 00:00:00-04' @@ -4562,7 +4562,7 @@ SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London'; <listitem> <para> - Add <function>justify_days()</> and <function>justify_hours()</> + Add <function>justify_days()</function> and <function>justify_hours()</function> (Michael Glaesemann) </para> <para> @@ -4574,7 +4574,7 @@ SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London'; <listitem> <para> - Move <filename>/contrib/dbsize</> into the backend, and rename + Move <filename>/contrib/dbsize</filename> into the backend, and rename some of the functions (Dave Page, Andreas Pflug) </para> <para> @@ -4582,38 +4582,38 @@ SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London'; <listitem> <para> - <function>pg_tablespace_size()</> + <function>pg_tablespace_size()</function> </para> </listitem> <listitem> <para> - <function>pg_database_size()</> + <function>pg_database_size()</function> </para> </listitem> <listitem> <para> - <function>pg_relation_size()</> + <function>pg_relation_size()</function> </para> </listitem> <listitem> <para> - <function>pg_total_relation_size()</> + <function>pg_total_relation_size()</function> </para> </listitem> <listitem> <para> - <function>pg_size_pretty()</> + <function>pg_size_pretty()</function> </para> </listitem> </itemizedlist> </para> <para> - <function>pg_total_relation_size()</> includes indexes and TOAST + <function>pg_total_relation_size()</function> includes indexes and TOAST tables. </para> </listitem> @@ -4628,19 +4628,19 @@ SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London'; <listitem> <para> - <function>pg_stat_file()</> + <function>pg_stat_file()</function> </para> </listitem> <listitem> <para> - <function>pg_read_file()</> + <function>pg_read_file()</function> </para> </listitem> <listitem> <para> - <function>pg_ls_dir()</> + <function>pg_ls_dir()</function> </para> </listitem> @@ -4650,21 +4650,21 @@ SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London'; <listitem> <para> - Add <function>pg_reload_conf()</> to force reloading of the + Add <function>pg_reload_conf()</function> to force reloading of the configuration files (Dave Page, Andreas Pflug) </para> </listitem> <listitem> <para> - Add <function>pg_rotate_logfile()</> to force rotation of the + Add <function>pg_rotate_logfile()</function> to force rotation of the server log file (Dave Page, Andreas Pflug) </para> </listitem> <listitem> <para> - Change <literal>pg_stat_*</> views to include TOAST tables (Tom) + Change <literal>pg_stat_*</literal> views to include TOAST tables (Tom) </para> </listitem> @@ -4686,25 +4686,25 @@ SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London'; <listitem> <para> - <literal>UNICODE</> is now <literal>UTF8</> + <literal>UNICODE</literal> is now <literal>UTF8</literal> </para> </listitem> <listitem> <para> - <literal>ALT</> is now <literal>WIN866</> + <literal>ALT</literal> is now <literal>WIN866</literal> </para> </listitem> <listitem> <para> - <literal>WIN</> is now <literal>WIN1251</> + <literal>WIN</literal> is now <literal>WIN1251</literal> </para> </listitem> <listitem> <para> - <literal>TCVN</> is now <literal>WIN1258</> + <literal>TCVN</literal> is now <literal>WIN1258</literal> </para> </listitem> @@ -4718,17 +4718,17 @@ SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London'; <listitem> <para> - Add support for <literal>WIN1252</> encoding (Roland Volkmann) + Add support for <literal>WIN1252</literal> encoding (Roland Volkmann) </para> </listitem> <listitem> <para> - Add support for four-byte <literal>UTF8</> characters (John + Add support for four-byte <literal>UTF8</literal> characters (John Hansen) </para> <para> - Previously only one, two, and three-byte <literal>UTF8</> characters + Previously only one, two, and three-byte <literal>UTF8</literal> characters were supported. This is particularly important for support for some Chinese character sets. </para> @@ -4736,8 +4736,8 @@ SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London'; <listitem> <para> - Allow direct conversion between <literal>EUC_JP</> and - <literal>SJIS</> to improve performance (Atsushi Ogawa) + Allow direct conversion between <literal>EUC_JP</literal> and + <literal>SJIS</literal> to improve performance (Atsushi Ogawa) </para> </listitem> @@ -4761,14 +4761,14 @@ SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London'; <listitem> <para> - Fix <command>ALTER LANGUAGE RENAME</> (Sergey Yatskevich) + Fix <command>ALTER LANGUAGE RENAME</command> (Sergey Yatskevich) </para> </listitem> <listitem> <para> Allow function characteristics, like strictness and volatility, - to be modified via <command>ALTER FUNCTION</> (Neil) + to be modified via <command>ALTER FUNCTION</command> (Neil) </para> </listitem> @@ -4780,14 +4780,14 @@ SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London'; <listitem> <para> - Allow SQL and PL/pgSQL functions to use <command>OUT</> and - <command>INOUT</> parameters (Tom) + Allow SQL and PL/pgSQL functions to use <command>OUT</command> and + <command>INOUT</command> parameters (Tom) </para> <para> - <command>OUT</> is an alternate way for a function to return - values. Instead of using <command>RETURN</>, values can be - returned by assigning to parameters declared as <command>OUT</> or - <command>INOUT</>. This is notationally simpler in some cases, + <command>OUT</command> is an alternate way for a function to return + values. Instead of using <command>RETURN</command>, values can be + returned by assigning to parameters declared as <command>OUT</command> or + <command>INOUT</command>. This is notationally simpler in some cases, particularly so when multiple values need to be returned. While returning multiple values from a function was possible in previous releases, this greatly simplifies the @@ -4798,7 +4798,7 @@ SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London'; <listitem> <para> - Move language handler functions into the <literal>pg_catalog</> schema + Move language handler functions into the <literal>pg_catalog</literal> schema </para> <para> This makes it easier to drop the public schema if desired. @@ -4831,7 +4831,7 @@ SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London'; <listitem> <para> - Check function syntax at <command>CREATE FUNCTION</> time, + Check function syntax at <command>CREATE FUNCTION</command> time, rather than at runtime (Neil) </para> <para> @@ -4842,19 +4842,19 @@ SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London'; <listitem> <para> - Allow <command>OPEN</> to open non-<command>SELECT</> queries - like <command>EXPLAIN</> and <command>SHOW</> (Tom) + Allow <command>OPEN</command> to open non-<command>SELECT</command> queries + like <command>EXPLAIN</command> and <command>SHOW</command> (Tom) </para> </listitem> <listitem> <para> - No longer require functions to issue a <command>RETURN</> + No longer require functions to issue a <command>RETURN</command> statement (Tom) </para> <para> - This is a byproduct of the newly added <command>OUT</> and - <command>INOUT</> functionality. <command>RETURN</> can + This is a byproduct of the newly added <command>OUT</command> and + <command>INOUT</command> functionality. <command>RETURN</command> can be omitted when it is not needed to provide the function's return value. </para> @@ -4862,21 +4862,21 @@ SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London'; <listitem> <para> - Add support for an optional <command>INTO</> clause to - PL/pgSQL's <command>EXECUTE</> statement (Pavel Stehule, Neil) + Add support for an optional <command>INTO</command> clause to + PL/pgSQL's <command>EXECUTE</command> statement (Pavel Stehule, Neil) </para> </listitem> <listitem> <para> - Make <command>CREATE TABLE AS</> set <command>ROW_COUNT</> (Tom) + Make <command>CREATE TABLE AS</command> set <command>ROW_COUNT</command> (Tom) </para> </listitem> <listitem> <para> - Define <literal>SQLSTATE</> and <literal>SQLERRM</> to return - the <literal>SQLSTATE</> and error message of the current + Define <literal>SQLSTATE</literal> and <literal>SQLERRM</literal> to return + the <literal>SQLSTATE</literal> and error message of the current exception (Pavel Stehule, Neil) </para> <para> @@ -4886,14 +4886,14 @@ SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London'; <listitem> <para> - Allow the parameters to the <command>RAISE</> statement to be + Allow the parameters to the <command>RAISE</command> statement to be expressions (Pavel Stehule, Neil) </para> </listitem> <listitem> <para> - Add a loop <command>CONTINUE</> statement (Pavel Stehule, Neil) + Add a loop <command>CONTINUE</command> statement (Pavel Stehule, Neil) </para> </listitem> @@ -4917,7 +4917,7 @@ SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London'; Menon-Sen) </para> <para> - This allows functions to use <function>return_next()</> to avoid + This allows functions to use <function>return_next()</function> to avoid building the entire result set in memory. </para> </listitem> @@ -4927,16 +4927,16 @@ SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London'; Allow one-row-at-a-time retrieval of query results (Abhijit Menon-Sen) </para> <para> - This allows functions to use <function>spi_query()</> and - <function>spi_fetchrow()</> to avoid accumulating the entire + This allows functions to use <function>spi_query()</function> and + <function>spi_fetchrow()</function> to avoid accumulating the entire result set in memory. </para> </listitem> <listitem> <para> - Force PL/Perl to handle strings as <literal>UTF8</> if the - server encoding is <literal>UTF8</> (David Kamholz) + Force PL/Perl to handle strings as <literal>UTF8</literal> if the + server encoding is <literal>UTF8</literal> (David Kamholz) </para> </listitem> @@ -4963,14 +4963,14 @@ SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London'; <listitem> <para> - Allow Perl nonfatal warnings to generate <command>NOTICE</> + Allow Perl nonfatal warnings to generate <command>NOTICE</command> messages (Andrew) </para> </listitem> <listitem> <para> - Allow Perl's <literal>strict</> mode to be enabled (Andrew) + Allow Perl's <literal>strict</literal> mode to be enabled (Andrew) </para> </listitem> @@ -4979,12 +4979,12 @@ SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London'; <sect3> - <title><application>psql</> Changes</title> + <title><application>psql</application> Changes</title> <itemizedlist> <listitem> <para> - Add <command>\set ON_ERROR_ROLLBACK</> to allow statements in + Add <command>\set ON_ERROR_ROLLBACK</command> to allow statements in a transaction to error without affecting the rest of the transaction (Greg Sabino Mullane) </para> @@ -4996,8 +4996,8 @@ SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London'; <listitem> <para> - Add support for <literal>\x</> hex strings in - <application>psql</> variables (Bruce) + Add support for <literal>\x</literal> hex strings in + <application>psql</application> variables (Bruce) </para> <para> Octal escapes were already supported. @@ -5006,7 +5006,7 @@ SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London'; <listitem> <para> - Add support for <command>troff -ms</> output format (Roger + Add support for <command>troff -ms</command> output format (Roger Leigh) </para> </listitem> @@ -5014,7 +5014,7 @@ SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London'; <listitem> <para> Allow the history file location to be controlled by - <envar>HISTFILE</> (Andreas Seltenreich) + <envar>HISTFILE</envar> (Andreas Seltenreich) </para> <para> This allows configuration of per-database history storage. @@ -5023,14 +5023,14 @@ SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London'; <listitem> <para> - Prevent <command>\x</> (expanded mode) from affecting - the output of <command>\d tablename</> (Neil) + Prevent <command>\x</command> (expanded mode) from affecting + the output of <command>\d tablename</command> (Neil) </para> </listitem> <listitem> <para> - Add <option>-L</> option to <application>psql</application> to + Add <option>-L</option> option to <application>psql</application> to log sessions (Lorne Sunley) </para> <para> @@ -5041,44 +5041,44 @@ SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London'; <listitem> <para> - Make <command>\d</> show the tablespaces of indexes (Qingqing + Make <command>\d</command> show the tablespaces of indexes (Qingqing Zhou) </para> </listitem> <listitem> <para> - Allow <application>psql</application> help (<command>\h</>) to + Allow <application>psql</application> help (<command>\h</command>) to make a best guess on the proper help information (Greg Sabino Mullane) </para> <para> - This allows the user to just add <command>\h</> to the front of + This allows the user to just add <command>\h</command> to the front of the syntax error query and get help on the supported syntax. Previously any additional query text beyond the command name - had to be removed to use <command>\h</>. + had to be removed to use <command>\h</command>. </para> </listitem> <listitem> <para> - Add <command>\pset numericlocale</> to allow numbers to be + Add <command>\pset numericlocale</command> to allow numbers to be output in a locale-aware format (Eugen Nedelcu) </para> <para> - For example, using <literal>C</> locale <literal>100000</> would - be output as <literal>100,000.0</> while a European locale might - output this value as <literal>100.000,0</>. + For example, using <literal>C</literal> locale <literal>100000</literal> would + be output as <literal>100,000.0</literal> while a European locale might + output this value as <literal>100.000,0</literal>. </para> </listitem> <listitem> <para> Make startup banner show both server version number and - <application>psql</>'s version number, when they are different (Bruce) + <application>psql</application>'s version number, when they are different (Bruce) </para> <para> - Also, a warning will be shown if the server and <application>psql</> + Also, a warning will be shown if the server and <application>psql</application> are from different major releases. </para> </listitem> @@ -5088,13 +5088,13 @@ SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London'; <sect3> - <title><application>pg_dump</> Changes</title> + <title><application>pg_dump</application> Changes</title> <itemizedlist> <listitem> <para> - Add <option>-n</> / <option>--schema</> switch to - <application>pg_restore</> (Richard van den Berg) + Add <option>-n</option> / <option>--schema</option> switch to + <application>pg_restore</application> (Richard van den Berg) </para> <para> This allows just the objects in a specified schema to be restored. @@ -5103,18 +5103,18 @@ SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London'; <listitem> <para> - Allow <application>pg_dump</> to dump large objects even in + Allow <application>pg_dump</application> to dump large objects even in text mode (Tom) </para> <para> With this change, large objects are now always dumped; the former - <option>-b</> switch is a no-op. + <option>-b</option> switch is a no-op. </para> </listitem> <listitem> <para> - Allow <application>pg_dump</> to dump a consistent snapshot of + Allow <application>pg_dump</application> to dump a consistent snapshot of large objects (Tom) </para> </listitem> @@ -5127,7 +5127,7 @@ SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London'; <listitem> <para> - Add <option>--encoding</> to <application>pg_dump</> + Add <option>--encoding</option> to <application>pg_dump</application> (Magnus Hagander) </para> <para> @@ -5139,14 +5139,14 @@ SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London'; <listitem> <para> - Rely on <structname>pg_pltemplate</> for procedural languages (Tom) + Rely on <structname>pg_pltemplate</structname> for procedural languages (Tom) </para> <para> If the call handler for a procedural language is in the - <literal>pg_catalog</> schema, <application>pg_dump</> does not + <literal>pg_catalog</literal> schema, <application>pg_dump</application> does not dump the handler. Instead, it dumps the language using just - <command>CREATE LANGUAGE <replaceable>name</></command>, - relying on the <structname>pg_pltemplate</> catalog to provide + <command>CREATE LANGUAGE <replaceable>name</replaceable></command>, + relying on the <structname>pg_pltemplate</structname> catalog to provide the language's creation parameters at load time. </para> </listitem> @@ -5161,15 +5161,15 @@ SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London'; <listitem> <para> - Add a <envar>PGPASSFILE</> environment variable to specify the + Add a <envar>PGPASSFILE</envar> environment variable to specify the password file's filename (Andrew) </para> </listitem> <listitem> <para> - Add <function>lo_create()</>, that is similar to - <function>lo_creat()</> but allows the OID of the large object + Add <function>lo_create()</function>, that is similar to + <function>lo_creat()</function> but allows the OID of the large object to be specified (Tom) </para> </listitem> @@ -5191,7 +5191,7 @@ SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London'; <listitem> <para> - Fix <application>pgxs</> to support building against a relocated + Fix <application>pgxs</application> to support building against a relocated installation </para> </listitem> @@ -5238,10 +5238,10 @@ SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London'; <listitem> <para> - Allow <application>pg_config</> to be compiled using MSVC (Andrew) + Allow <application>pg_config</application> to be compiled using MSVC (Andrew) </para> <para> - This is required to build DBD::Pg using <application>MSVC</>. + This is required to build DBD::Pg using <application>MSVC</application>. </para> </listitem> @@ -5264,15 +5264,15 @@ SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London'; <listitem> <para> - Modify <filename>postgresql.conf</> to use documentation defaults - <literal>on</>/<literal>off</> rather than - <literal>true</>/<literal>false</> (Bruce) + Modify <filename>postgresql.conf</filename> to use documentation defaults + <literal>on</literal>/<literal>off</literal> rather than + <literal>true</literal>/<literal>false</literal> (Bruce) </para> </listitem> <listitem> <para> - Enhance <application>pg_config</> to be able to report more + Enhance <application>pg_config</application> to be able to report more build-time values (Tom) </para> </listitem> @@ -5304,11 +5304,11 @@ SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London'; </para> <para> - In previous releases, <filename>gist.h</> contained both the + In previous releases, <filename>gist.h</filename> contained both the public GiST API (intended for use by authors of GiST index implementations) as well as some private declarations used by the implementation of GiST itself. The latter have been moved - to a separate file, <filename>gist_private.h</>. Most GiST + to a separate file, <filename>gist_private.h</filename>. Most GiST index implementations should be unaffected. </para> </listitem> @@ -5320,10 +5320,10 @@ SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London'; <para> GiST methods are now always invoked in a short-lived memory - context. Therefore, memory allocated via <function>palloc()</> + context. Therefore, memory allocated via <function>palloc()</function> will be reclaimed automatically, so GiST index implementations do not need to manually release allocated memory via - <function>pfree()</>. + <function>pfree()</function>. </para> </listitem> </itemizedlist> @@ -5336,7 +5336,7 @@ SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London'; <listitem> <para> - Add <filename>/contrib/pg_buffercache</> contrib module (Mark + Add <filename>/contrib/pg_buffercache</filename> contrib module (Mark Kirkwood) </para> <para> @@ -5347,28 +5347,28 @@ SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London'; <listitem> <para> - Remove <filename>/contrib/array</> because it is obsolete (Tom) + Remove <filename>/contrib/array</filename> because it is obsolete (Tom) </para> </listitem> <listitem> <para> - Clean up the <filename>/contrib/lo</> module (Tom) + Clean up the <filename>/contrib/lo</filename> module (Tom) </para> </listitem> <listitem> <para> - Move <filename>/contrib/findoidjoins</> to - <filename>/src/tools</> (Tom) + Move <filename>/contrib/findoidjoins</filename> to + <filename>/src/tools</filename> (Tom) </para> </listitem> <listitem> <para> - Remove the <literal><<</>, <literal>>></>, - <literal>&<</>, and <literal>&></> operators from - <filename>/contrib/cube</> + Remove the <literal><<</literal>, <literal>>></literal>, + <literal>&<</literal>, and <literal>&></literal> operators from + <filename>/contrib/cube</filename> </para> <para> These operators were not useful. @@ -5377,13 +5377,13 @@ SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London'; <listitem> <para> - Improve <filename>/contrib/btree_gist</> (Janko Richter) + Improve <filename>/contrib/btree_gist</filename> (Janko Richter) </para> </listitem> <listitem> <para> - Improve <filename>/contrib/pgbench</> (Tomoaki Sato, Tatsuo) + Improve <filename>/contrib/pgbench</filename> (Tomoaki Sato, Tatsuo) </para> <para> There is now a facility for testing with SQL command scripts given @@ -5393,7 +5393,7 @@ SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London'; <listitem> <para> - Improve <filename>/contrib/pgcrypto</> (Marko Kreen) + Improve <filename>/contrib/pgcrypto</filename> (Marko Kreen) </para> <itemizedlist> @@ -5421,16 +5421,16 @@ SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London'; <listitem> <para> - Take build parameters (OpenSSL, zlib) from <filename>configure</> result + Take build parameters (OpenSSL, zlib) from <filename>configure</filename> result </para> <para> - There is no need to edit the <filename>Makefile</> anymore. + There is no need to edit the <filename>Makefile</filename> anymore. </para> </listitem> <listitem> <para> - Remove support for <filename>libmhash</> and <filename>libmcrypt</> + Remove support for <filename>libmhash</filename> and <filename>libmcrypt</filename> </para> </listitem> diff --git a/doc/src/sgml/release-8.2.sgml b/doc/src/sgml/release-8.2.sgml index c00cbd34675..71b50cfb01d 100644 --- a/doc/src/sgml/release-8.2.sgml +++ b/doc/src/sgml/release-8.2.sgml @@ -16,7 +16,7 @@ </para> <para> - This is expected to be the last <productname>PostgreSQL</> release + This is expected to be the last <productname>PostgreSQL</productname> release in the 8.2.X series. Users are encouraged to update to a newer release branch soon. </para> @@ -30,7 +30,7 @@ <para> However, a longstanding error was discovered in the definition of the - <literal>information_schema.referential_constraints</> view. If you + <literal>information_schema.referential_constraints</literal> view. If you rely on correct results from that view, you should replace its definition as explained in the first changelog item below. </para> @@ -49,7 +49,7 @@ <listitem> <para> - Fix bugs in <literal>information_schema.referential_constraints</> view + Fix bugs in <literal>information_schema.referential_constraints</literal> view (Tom Lane) </para> @@ -62,13 +62,13 @@ </para> <para> - Since the view definition is installed by <application>initdb</>, + Since the view definition is installed by <application>initdb</application>, merely upgrading will not fix the problem. If you need to fix this in an existing installation, you can (as a superuser) drop the - <literal>information_schema</> schema then re-create it by sourcing - <filename><replaceable>SHAREDIR</>/information_schema.sql</filename>. - (Run <literal>pg_config --sharedir</> if you're uncertain where - <replaceable>SHAREDIR</> is.) This must be repeated in each database + <literal>information_schema</literal> schema then re-create it by sourcing + <filename><replaceable>SHAREDIR</replaceable>/information_schema.sql</filename>. + (Run <literal>pg_config --sharedir</literal> if you're uncertain where + <replaceable>SHAREDIR</replaceable> is.) This must be repeated in each database to be fixed. </para> </listitem> @@ -76,12 +76,12 @@ <listitem> <para> Fix TOAST-related data corruption during <literal>CREATE TABLE dest AS - SELECT * FROM src</> or <literal>INSERT INTO dest SELECT * FROM src</> + SELECT * FROM src</literal> or <literal>INSERT INTO dest SELECT * FROM src</literal> (Tom Lane) </para> <para> - If a table has been modified by <command>ALTER TABLE ADD COLUMN</>, + If a table has been modified by <command>ALTER TABLE ADD COLUMN</command>, attempts to copy its data verbatim to another table could produce corrupt results in certain corner cases. The problem can only manifest in this precise form in 8.4 and later, @@ -98,22 +98,22 @@ <para> The typical symptom was transient errors like <quote>missing chunk - number 0 for toast value NNNNN in pg_toast_2619</>, where the cited + number 0 for toast value NNNNN in pg_toast_2619</quote>, where the cited toast table would always belong to a system catalog. </para> </listitem> <listitem> <para> - Improve locale support in <type>money</> type's input and output + Improve locale support in <type>money</type> type's input and output (Tom Lane) </para> <para> Aside from not supporting all standard - <link linkend="guc-lc-monetary"><varname>lc_monetary</></link> + <link linkend="guc-lc-monetary"><varname>lc_monetary</varname></link> formatting options, the input and output functions were inconsistent, - meaning there were locales in which dumped <type>money</> values could + meaning there were locales in which dumped <type>money</type> values could not be re-read. </para> </listitem> @@ -121,15 +121,15 @@ <listitem> <para> Don't let <link - linkend="guc-transform-null-equals"><varname>transform_null_equals</></link> - affect <literal>CASE foo WHEN NULL ...</> constructs + linkend="guc-transform-null-equals"><varname>transform_null_equals</varname></link> + affect <literal>CASE foo WHEN NULL ...</literal> constructs (Heikki Linnakangas) </para> <para> - <varname>transform_null_equals</> is only supposed to affect - <literal>foo = NULL</> expressions written directly by the user, not - equality checks generated internally by this form of <literal>CASE</>. + <varname>transform_null_equals</varname> is only supposed to affect + <literal>foo = NULL</literal> expressions written directly by the user, not + equality checks generated internally by this form of <literal>CASE</literal>. </para> </listitem> @@ -141,14 +141,14 @@ <para> For a cascading foreign key that references its own table, a row update - will fire both the <literal>ON UPDATE</> trigger and the - <literal>CHECK</> trigger as one event. The <literal>ON UPDATE</> - trigger must execute first, else the <literal>CHECK</> will check a + will fire both the <literal>ON UPDATE</literal> trigger and the + <literal>CHECK</literal> trigger as one event. The <literal>ON UPDATE</literal> + trigger must execute first, else the <literal>CHECK</literal> will check a non-final state of the row and possibly throw an inappropriate error. However, the firing order of these triggers is determined by their names, which generally sort in creation order since the triggers have auto-generated names following the convention - <quote>RI_ConstraintTrigger_NNNN</>. A proper fix would require + <quote>RI_ConstraintTrigger_NNNN</quote>. A proper fix would require modifying that convention, which we will do in 9.2, but it seems risky to change it in existing releases. So this patch just changes the creation order of the triggers. Users encountering this type of error @@ -159,7 +159,7 @@ <listitem> <para> - Preserve blank lines within commands in <application>psql</>'s command + Preserve blank lines within commands in <application>psql</application>'s command history (Robert Haas) </para> @@ -171,7 +171,7 @@ <listitem> <para> - Use the preferred version of <application>xsubpp</> to build PL/Perl, + Use the preferred version of <application>xsubpp</application> to build PL/Perl, not necessarily the operating system's main copy (David Wheeler and Alex Hunsaker) </para> @@ -179,7 +179,7 @@ <listitem> <para> - Honor query cancel interrupts promptly in <function>pgstatindex()</> + Honor query cancel interrupts promptly in <function>pgstatindex()</function> (Robert Haas) </para> </listitem> @@ -210,15 +210,15 @@ </para> <para> - Map <quote>Central America Standard Time</> to <literal>CST6</>, not - <literal>CST6CDT</>, because DST is generally not observed anywhere in + Map <quote>Central America Standard Time</quote> to <literal>CST6</literal>, not + <literal>CST6CDT</literal>, because DST is generally not observed anywhere in Central America. </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2011n + Update time zone data files to <application>tzdata</application> release 2011n for DST law changes in Brazil, Cuba, Fiji, Palestine, Russia, and Samoa; also historical corrections for Alaska and British East Africa. </para> @@ -244,7 +244,7 @@ </para> <para> - The <productname>PostgreSQL</> community will stop releasing updates + The <productname>PostgreSQL</productname> community will stop releasing updates for the 8.2.X release series in December 2011. Users are encouraged to update to a newer release branch soon. </para> @@ -279,7 +279,7 @@ <listitem> <para> - Avoid possibly accessing off the end of memory in <command>ANALYZE</> + Avoid possibly accessing off the end of memory in <command>ANALYZE</command> (Noah Misch) </para> @@ -297,7 +297,7 @@ There was a window wherein a new backend process could read a stale init file but miss the inval messages that would tell it the data is stale. The result would be bizarre failures in catalog accesses, typically - <quote>could not read block 0 in file ...</> later during startup. + <quote>could not read block 0 in file ...</quote> later during startup. </para> </listitem> @@ -346,13 +346,13 @@ <listitem> <para> - Fix dump bug for <literal>VALUES</> in a view (Tom Lane) + Fix dump bug for <literal>VALUES</literal> in a view (Tom Lane) </para> </listitem> <listitem> <para> - Disallow <literal>SELECT FOR UPDATE/SHARE</> on sequences (Tom Lane) + Disallow <literal>SELECT FOR UPDATE/SHARE</literal> on sequences (Tom Lane) </para> <para> @@ -370,18 +370,18 @@ <listitem> <para> Fix portability bugs in use of credentials control messages for - <quote>peer</> authentication (Tom Lane) + <quote>peer</quote> authentication (Tom Lane) </para> </listitem> <listitem> <para> - Fix typo in <function>pg_srand48</> seed initialization (Andres Freund) + Fix typo in <function>pg_srand48</function> seed initialization (Andres Freund) </para> <para> This led to failure to use all bits of the provided seed. This function - is not used on most platforms (only those without <function>srandom</>), + is not used on most platforms (only those without <function>srandom</function>), and the potential security exposure from a less-random-than-expected seed seems minimal in any case. </para> @@ -389,25 +389,25 @@ <listitem> <para> - Avoid integer overflow when the sum of <literal>LIMIT</> and - <literal>OFFSET</> values exceeds 2^63 (Heikki Linnakangas) + Avoid integer overflow when the sum of <literal>LIMIT</literal> and + <literal>OFFSET</literal> values exceeds 2^63 (Heikki Linnakangas) </para> </listitem> <listitem> <para> - Add overflow checks to <type>int4</> and <type>int8</> versions of - <function>generate_series()</> (Robert Haas) + Add overflow checks to <type>int4</type> and <type>int8</type> versions of + <function>generate_series()</function> (Robert Haas) </para> </listitem> <listitem> <para> - Fix trailing-zero removal in <function>to_char()</> (Marti Raudsepp) + Fix trailing-zero removal in <function>to_char()</function> (Marti Raudsepp) </para> <para> - In a format with <literal>FM</> and no digit positions + In a format with <literal>FM</literal> and no digit positions after the decimal point, zeroes to the left of the decimal point could be removed incorrectly. </para> @@ -415,41 +415,41 @@ <listitem> <para> - Fix <function>pg_size_pretty()</> to avoid overflow for inputs close to + Fix <function>pg_size_pretty()</function> to avoid overflow for inputs close to 2^63 (Tom Lane) </para> </listitem> <listitem> <para> - Fix <application>psql</>'s counting of script file line numbers during - <literal>COPY</> from a different file (Tom Lane) + Fix <application>psql</application>'s counting of script file line numbers during + <literal>COPY</literal> from a different file (Tom Lane) </para> </listitem> <listitem> <para> - Fix <application>pg_restore</>'s direct-to-database mode for - <varname>standard_conforming_strings</> (Tom Lane) + Fix <application>pg_restore</application>'s direct-to-database mode for + <varname>standard_conforming_strings</varname> (Tom Lane) </para> <para> - <application>pg_restore</> could emit incorrect commands when restoring + <application>pg_restore</application> could emit incorrect commands when restoring directly to a database server from an archive file that had been made - with <varname>standard_conforming_strings</> set to <literal>on</>. + with <varname>standard_conforming_strings</varname> set to <literal>on</literal>. </para> </listitem> <listitem> <para> - Fix write-past-buffer-end and memory leak in <application>libpq</>'s + Fix write-past-buffer-end and memory leak in <application>libpq</application>'s LDAP service lookup code (Albe Laurenz) </para> </listitem> <listitem> <para> - In <application>libpq</>, avoid failures when using nonblocking I/O + In <application>libpq</application>, avoid failures when using nonblocking I/O and an SSL connection (Martin Pihlak, Tom Lane) </para> </listitem> @@ -461,14 +461,14 @@ </para> <para> - In particular, the response to a server report of <function>fork()</> + In particular, the response to a server report of <function>fork()</function> failure during SSL connection startup is now saner. </para> </listitem> <listitem> <para> - Make <application>ecpglib</> write <type>double</> values with 15 digits + Make <application>ecpglib</application> write <type>double</type> values with 15 digits precision (Akira Kurosawa) </para> </listitem> @@ -480,7 +480,7 @@ </para> <para> - <filename>contrib/pg_crypto</>'s blowfish encryption code could give + <filename>contrib/pg_crypto</filename>'s blowfish encryption code could give wrong results on platforms where char is signed (which is most), leading to encrypted passwords being weaker than they should be. </para> @@ -488,13 +488,13 @@ <listitem> <para> - Fix memory leak in <filename>contrib/seg</> (Heikki Linnakangas) + Fix memory leak in <filename>contrib/seg</filename> (Heikki Linnakangas) </para> </listitem> <listitem> <para> - Fix <function>pgstatindex()</> to give consistent results for empty + Fix <function>pgstatindex()</function> to give consistent results for empty indexes (Tom Lane) </para> </listitem> @@ -526,7 +526,7 @@ <listitem> <para> - Update time zone data files to <application>tzdata</> release 2011i + Update time zone data files to <application>tzdata</application> release 2011i for DST law changes in Canada, Egypt, Russia, Samoa, and South Sudan. </para> </listitem> @@ -582,15 +582,15 @@ <listitem> <para> - Fix dangling-pointer problem in <literal>BEFORE ROW UPDATE</> trigger + Fix dangling-pointer problem in <literal>BEFORE ROW UPDATE</literal> trigger handling when there was a concurrent update to the target tuple (Tom Lane) </para> <para> This bug has been observed to result in intermittent <quote>cannot - extract system attribute from virtual tuple</> failures while trying to - do <literal>UPDATE RETURNING ctid</>. There is a very small probability + extract system attribute from virtual tuple</quote> failures while trying to + do <literal>UPDATE RETURNING ctid</literal>. There is a very small probability of more serious errors, such as generating incorrect index entries for the updated tuple. </para> @@ -598,13 +598,13 @@ <listitem> <para> - Disallow <command>DROP TABLE</> when there are pending deferred trigger + Disallow <command>DROP TABLE</command> when there are pending deferred trigger events for the table (Tom Lane) </para> <para> - Formerly the <command>DROP</> would go through, leading to - <quote>could not open relation with OID nnn</> errors when the + Formerly the <command>DROP</command> would go through, leading to + <quote>could not open relation with OID nnn</quote> errors when the triggers were eventually fired. </para> </listitem> @@ -617,7 +617,7 @@ <listitem> <para> - Fix <application>pg_restore</> to cope with long lines (over 1KB) in + Fix <application>pg_restore</application> to cope with long lines (over 1KB) in TOC files (Tom Lane) </para> </listitem> @@ -649,14 +649,14 @@ <listitem> <para> - Fix path separator used by <application>pg_regress</> on Cygwin + Fix path separator used by <application>pg_regress</application> on Cygwin (Andrew Dunstan) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2011f + Update time zone data files to <application>tzdata</application> release 2011f for DST law changes in Chile, Cuba, Falkland Islands, Morocco, Samoa, and Turkey; also historical corrections for South Australia, Alaska, and Hawaii. @@ -700,15 +700,15 @@ <listitem> <para> - Avoid failures when <command>EXPLAIN</> tries to display a simple-form - <literal>CASE</> expression (Tom Lane) + Avoid failures when <command>EXPLAIN</command> tries to display a simple-form + <literal>CASE</literal> expression (Tom Lane) </para> <para> - If the <literal>CASE</>'s test expression was a constant, the planner - could simplify the <literal>CASE</> into a form that confused the + If the <literal>CASE</literal>'s test expression was a constant, the planner + could simplify the <literal>CASE</literal> into a form that confused the expression-display code, resulting in <quote>unexpected CASE WHEN - clause</> errors. + clause</quote> errors. </para> </listitem> @@ -733,44 +733,44 @@ </para> <para> - The <type>date</> type supports a wider range of dates than can be - represented by the <type>timestamp</> types, but the planner assumed it + The <type>date</type> type supports a wider range of dates than can be + represented by the <type>timestamp</type> types, but the planner assumed it could always convert a date to timestamp with impunity. </para> </listitem> <listitem> <para> - Fix <application>pg_restore</>'s text output for large objects (BLOBs) - when <varname>standard_conforming_strings</> is on (Tom Lane) + Fix <application>pg_restore</application>'s text output for large objects (BLOBs) + when <varname>standard_conforming_strings</varname> is on (Tom Lane) </para> <para> Although restoring directly to a database worked correctly, string - escaping was incorrect if <application>pg_restore</> was asked for - SQL text output and <varname>standard_conforming_strings</> had been + escaping was incorrect if <application>pg_restore</application> was asked for + SQL text output and <varname>standard_conforming_strings</varname> had been enabled in the source database. </para> </listitem> <listitem> <para> - Fix erroneous parsing of <type>tsquery</> values containing + Fix erroneous parsing of <type>tsquery</type> values containing <literal>... & !(subexpression) | ...</literal> (Tom Lane) </para> <para> Queries containing this combination of operators were not executed - correctly. The same error existed in <filename>contrib/intarray</>'s - <type>query_int</> type and <filename>contrib/ltree</>'s - <type>ltxtquery</> type. + correctly. The same error existed in <filename>contrib/intarray</filename>'s + <type>query_int</type> type and <filename>contrib/ltree</filename>'s + <type>ltxtquery</type> type. </para> </listitem> <listitem> <para> - Fix buffer overrun in <filename>contrib/intarray</>'s input function - for the <type>query_int</> type (Apple) + Fix buffer overrun in <filename>contrib/intarray</filename>'s input function + for the <type>query_int</type> type (Apple) </para> <para> @@ -782,16 +782,16 @@ <listitem> <para> - Fix bug in <filename>contrib/seg</>'s GiST picksplit algorithm + Fix bug in <filename>contrib/seg</filename>'s GiST picksplit algorithm (Alexander Korotkov) </para> <para> This could result in considerable inefficiency, though not actually - incorrect answers, in a GiST index on a <type>seg</> column. - If you have such an index, consider <command>REINDEX</>ing it after + incorrect answers, in a GiST index on a <type>seg</type> column. + If you have such an index, consider <command>REINDEX</command>ing it after installing this update. (This is identical to the bug that was fixed in - <filename>contrib/cube</> in the previous update.) + <filename>contrib/cube</filename> in the previous update.) </para> </listitem> @@ -833,17 +833,17 @@ <listitem> <para> Force the default - <link linkend="guc-wal-sync-method"><varname>wal_sync_method</></link> - to be <literal>fdatasync</> on Linux (Tom Lane, Marti Raudsepp) + <link linkend="guc-wal-sync-method"><varname>wal_sync_method</varname></link> + to be <literal>fdatasync</literal> on Linux (Tom Lane, Marti Raudsepp) </para> <para> - The default on Linux has actually been <literal>fdatasync</> for many - years, but recent kernel changes caused <productname>PostgreSQL</> to - choose <literal>open_datasync</> instead. This choice did not result + The default on Linux has actually been <literal>fdatasync</literal> for many + years, but recent kernel changes caused <productname>PostgreSQL</productname> to + choose <literal>open_datasync</literal> instead. This choice did not result in any performance improvement, and caused outright failures on - certain filesystems, notably <literal>ext4</> with the - <literal>data=journal</> mount option. + certain filesystems, notably <literal>ext4</literal> with the + <literal>data=journal</literal> mount option. </para> </listitem> @@ -853,7 +853,7 @@ </para> <para> - This could result in <quote>bad buffer id: 0</> failures or + This could result in <quote>bad buffer id: 0</quote> failures or corruption of index contents during replication. </para> </listitem> @@ -867,19 +867,19 @@ <listitem> <para> - Add support for detecting register-stack overrun on <literal>IA64</> + Add support for detecting register-stack overrun on <literal>IA64</literal> (Tom Lane) </para> <para> - The <literal>IA64</> architecture has two hardware stacks. Full + The <literal>IA64</literal> architecture has two hardware stacks. Full prevention of stack-overrun failures requires checking both. </para> </listitem> <listitem> <para> - Add a check for stack overflow in <function>copyObject()</> (Tom Lane) + Add a check for stack overflow in <function>copyObject()</function> (Tom Lane) </para> <para> @@ -895,7 +895,7 @@ </para> <para> - It is possible to have a <quote>concurrent</> page split in a + It is possible to have a <quote>concurrent</quote> page split in a temporary index, if for example there is an open cursor scanning the index when an insertion is done. GiST failed to detect this case and hence could deliver wrong results when execution of the cursor @@ -905,7 +905,7 @@ <listitem> <para> - Avoid memory leakage while <command>ANALYZE</>'ing complex index + Avoid memory leakage while <command>ANALYZE</command>'ing complex index expressions (Tom Lane) </para> </listitem> @@ -917,14 +917,14 @@ </para> <para> - An index declared like <literal>create index i on t (foo(t.*))</> + An index declared like <literal>create index i on t (foo(t.*))</literal> would not automatically get dropped when its table was dropped. </para> </listitem> <listitem> <para> - Do not <quote>inline</> a SQL function with multiple <literal>OUT</> + Do not <quote>inline</quote> a SQL function with multiple <literal>OUT</literal> parameters (Tom Lane) </para> @@ -936,15 +936,15 @@ <listitem> <para> - Behave correctly if <literal>ORDER BY</>, <literal>LIMIT</>, - <literal>FOR UPDATE</>, or <literal>WITH</> is attached to the - <literal>VALUES</> part of <literal>INSERT ... VALUES</> (Tom Lane) + Behave correctly if <literal>ORDER BY</literal>, <literal>LIMIT</literal>, + <literal>FOR UPDATE</literal>, or <literal>WITH</literal> is attached to the + <literal>VALUES</literal> part of <literal>INSERT ... VALUES</literal> (Tom Lane) </para> </listitem> <listitem> <para> - Fix constant-folding of <literal>COALESCE()</> expressions (Tom Lane) + Fix constant-folding of <literal>COALESCE()</literal> expressions (Tom Lane) </para> <para> @@ -955,11 +955,11 @@ <listitem> <para> - Add print functionality for <structname>InhRelation</> nodes (Tom Lane) + Add print functionality for <structname>InhRelation</structname> nodes (Tom Lane) </para> <para> - This avoids a failure when <varname>debug_print_parse</> is enabled + This avoids a failure when <varname>debug_print_parse</varname> is enabled and certain types of query are executed. </para> </listitem> @@ -978,14 +978,14 @@ <listitem> <para> - Fix <application>PL/pgSQL</>'s handling of <quote>simple</> + Fix <application>PL/pgSQL</application>'s handling of <quote>simple</quote> expressions to not fail in recursion or error-recovery cases (Tom Lane) </para> </listitem> <listitem> <para> - Fix <application>PL/Python</>'s handling of set-returning functions + Fix <application>PL/Python</application>'s handling of set-returning functions (Jan Urbanski) </para> @@ -997,22 +997,22 @@ <listitem> <para> - Fix bug in <filename>contrib/cube</>'s GiST picksplit algorithm + Fix bug in <filename>contrib/cube</filename>'s GiST picksplit algorithm (Alexander Korotkov) </para> <para> This could result in considerable inefficiency, though not actually - incorrect answers, in a GiST index on a <type>cube</> column. - If you have such an index, consider <command>REINDEX</>ing it after + incorrect answers, in a GiST index on a <type>cube</type> column. + If you have such an index, consider <command>REINDEX</command>ing it after installing this update. </para> </listitem> <listitem> <para> - Don't emit <quote>identifier will be truncated</> notices in - <filename>contrib/dblink</> except when creating new connections + Don't emit <quote>identifier will be truncated</quote> notices in + <filename>contrib/dblink</filename> except when creating new connections (Itagaki Takahiro) </para> </listitem> @@ -1020,20 +1020,20 @@ <listitem> <para> Fix potential coredump on missing public key in - <filename>contrib/pgcrypto</> (Marti Raudsepp) + <filename>contrib/pgcrypto</filename> (Marti Raudsepp) </para> </listitem> <listitem> <para> - Fix memory leak in <filename>contrib/xml2</>'s XPath query functions + Fix memory leak in <filename>contrib/xml2</filename>'s XPath query functions (Tom Lane) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2010o + Update time zone data files to <application>tzdata</application> release 2010o for DST law changes in Fiji and Samoa; also historical corrections for Hong Kong. </para> @@ -1084,7 +1084,7 @@ This change prevents security problems that can be caused by subverting Perl or Tcl code that will be executed later in the same session under another SQL user identity (for example, within a <literal>SECURITY - DEFINER</> function). Most scripting languages offer numerous ways that + DEFINER</literal> function). Most scripting languages offer numerous ways that that might be done, such as redefining standard functions or operators called by the target function. Without this change, any SQL user with Perl or Tcl language usage rights can do essentially anything with the @@ -1113,7 +1113,7 @@ <listitem> <para> - Prevent possible crashes in <function>pg_get_expr()</> by disallowing + Prevent possible crashes in <function>pg_get_expr()</function> by disallowing it from being called with an argument that is not one of the system catalog columns it's intended to be used with (Heikki Linnakangas, Tom Lane) @@ -1135,7 +1135,7 @@ <listitem> <para> - Treat exit code 128 (<literal>ERROR_WAIT_NO_CHILDREN</>) as non-fatal on + Treat exit code 128 (<literal>ERROR_WAIT_NO_CHILDREN</literal>) as non-fatal on Windows (Magnus Hagander) </para> @@ -1149,7 +1149,7 @@ <listitem> <para> - Fix possible duplicate scans of <literal>UNION ALL</> member relations + Fix possible duplicate scans of <literal>UNION ALL</literal> member relations (Tom Lane) </para> </listitem> @@ -1201,7 +1201,7 @@ <listitem> <para> Take care to fsync the contents of lockfiles (both - <filename>postmaster.pid</> and the socket lockfile) while writing them + <filename>postmaster.pid</filename> and the socket lockfile) while writing them (Tom Lane) </para> @@ -1227,7 +1227,7 @@ <listitem> <para> - Fix <varname>log_line_prefix</>'s <literal>%i</> escape, + Fix <varname>log_line_prefix</varname>'s <literal>%i</literal> escape, which could produce junk early in backend startup (Tom Lane) </para> </listitem> @@ -1235,28 +1235,28 @@ <listitem> <para> Fix possible data corruption in <command>ALTER TABLE ... SET - TABLESPACE</> when archiving is enabled (Jeff Davis) + TABLESPACE</command> when archiving is enabled (Jeff Davis) </para> </listitem> <listitem> <para> - Allow <command>CREATE DATABASE</> and <command>ALTER DATABASE ... SET - TABLESPACE</> to be interrupted by query-cancel (Guillaume Lelarge) + Allow <command>CREATE DATABASE</command> and <command>ALTER DATABASE ... SET + TABLESPACE</command> to be interrupted by query-cancel (Guillaume Lelarge) </para> </listitem> <listitem> <para> In PL/Python, defend against null pointer results from - <function>PyCObject_AsVoidPtr</> and <function>PyCObject_FromVoidPtr</> + <function>PyCObject_AsVoidPtr</function> and <function>PyCObject_FromVoidPtr</function> (Peter Eisentraut) </para> </listitem> <listitem> <para> - Improve <filename>contrib/dblink</>'s handling of tables containing + Improve <filename>contrib/dblink</filename>'s handling of tables containing dropped columns (Tom Lane) </para> </listitem> @@ -1264,30 +1264,30 @@ <listitem> <para> Fix connection leak after <quote>duplicate connection name</quote> - errors in <filename>contrib/dblink</> (Itagaki Takahiro) + errors in <filename>contrib/dblink</filename> (Itagaki Takahiro) </para> </listitem> <listitem> <para> - Fix <filename>contrib/dblink</> to handle connection names longer than + Fix <filename>contrib/dblink</filename> to handle connection names longer than 62 bytes correctly (Itagaki Takahiro) </para> </listitem> <listitem> <para> - Add <function>hstore(text, text)</> - function to <filename>contrib/hstore</> (Robert Haas) + Add <function>hstore(text, text)</function> + function to <filename>contrib/hstore</filename> (Robert Haas) </para> <para> This function is the recommended substitute for the now-deprecated - <literal>=></> operator. It was back-patched so that future-proofed + <literal>=></literal> operator. It was back-patched so that future-proofed code can be used with older server versions. Note that the patch will - be effective only after <filename>contrib/hstore</> is installed or + be effective only after <filename>contrib/hstore</filename> is installed or reinstalled in a particular database. Users might prefer to execute - the <command>CREATE FUNCTION</> command by hand, instead. + the <command>CREATE FUNCTION</command> command by hand, instead. </para> </listitem> @@ -1300,7 +1300,7 @@ <listitem> <para> - Update time zone data files to <application>tzdata</> release 2010l + Update time zone data files to <application>tzdata</application> release 2010l for DST law changes in Egypt and Palestine; also historical corrections for Finland. </para> @@ -1315,7 +1315,7 @@ <listitem> <para> - Make Windows' <quote>N. Central Asia Standard Time</> timezone map to + Make Windows' <quote>N. Central Asia Standard Time</quote> timezone map to Asia/Novosibirsk, not Asia/Almaty (Magnus Hagander) </para> @@ -1362,19 +1362,19 @@ <listitem> <para> - Enforce restrictions in <literal>plperl</> using an opmask applied to - the whole interpreter, instead of using <filename>Safe.pm</> + Enforce restrictions in <literal>plperl</literal> using an opmask applied to + the whole interpreter, instead of using <filename>Safe.pm</filename> (Tim Bunce, Andrew Dunstan) </para> <para> - Recent developments have convinced us that <filename>Safe.pm</> is too - insecure to rely on for making <literal>plperl</> trustable. This - change removes use of <filename>Safe.pm</> altogether, in favor of using + Recent developments have convinced us that <filename>Safe.pm</filename> is too + insecure to rely on for making <literal>plperl</literal> trustable. This + change removes use of <filename>Safe.pm</filename> altogether, in favor of using a separate interpreter with an opcode mask that is always applied. Pleasant side effects of the change include that it is now possible to - use Perl's <literal>strict</> pragma in a natural way in - <literal>plperl</>, and that Perl's <literal>$a</> and <literal>$b</> + use Perl's <literal>strict</literal> pragma in a natural way in + <literal>plperl</literal>, and that Perl's <literal>$a</literal> and <literal>$b</literal> variables work as expected in sort routines, and that function compilation is significantly faster. (CVE-2010-1169) </para> @@ -1383,19 +1383,19 @@ <listitem> <para> Prevent PL/Tcl from executing untrustworthy code from - <structname>pltcl_modules</> (Tom) + <structname>pltcl_modules</structname> (Tom) </para> <para> PL/Tcl's feature for autoloading Tcl code from a database table could be exploited for trojan-horse attacks, because there was no restriction on who could create or insert into that table. This change - disables the feature unless <structname>pltcl_modules</> is owned by a + disables the feature unless <structname>pltcl_modules</structname> is owned by a superuser. (However, the permissions on the table are not checked, so installations that really need a less-than-secure modules table can still grant suitable privileges to trusted non-superusers.) Also, - prevent loading code into the unrestricted <quote>normal</> Tcl - interpreter unless we are really going to execute a <literal>pltclu</> + prevent loading code into the unrestricted <quote>normal</quote> Tcl + interpreter unless we are really going to execute a <literal>pltclu</literal> function. (CVE-2010-1170) </para> </listitem> @@ -1419,10 +1419,10 @@ <para> Previously, if an unprivileged user ran <literal>ALTER USER ... RESET - ALL</> for himself, or <literal>ALTER DATABASE ... RESET ALL</> for + ALL</literal> for himself, or <literal>ALTER DATABASE ... RESET ALL</literal> for a database he owns, this would remove all special parameter settings for the user or database, even ones that are only supposed to be - changeable by a superuser. Now, the <command>ALTER</> will only + changeable by a superuser. Now, the <command>ALTER</command> will only remove the parameters that the user has permission to change. </para> </listitem> @@ -1430,7 +1430,7 @@ <listitem> <para> Avoid possible crash during backend shutdown if shutdown occurs - when a <literal>CONTEXT</> addition would be made to log entries (Tom) + when a <literal>CONTEXT</literal> addition would be made to log entries (Tom) </para> <para> @@ -1442,7 +1442,7 @@ <listitem> <para> - Update PL/Perl's <filename>ppport.h</> for modern Perl versions + Update PL/Perl's <filename>ppport.h</filename> for modern Perl versions (Andrew) </para> </listitem> @@ -1455,15 +1455,15 @@ <listitem> <para> - Prevent infinite recursion in <application>psql</> when expanding + Prevent infinite recursion in <application>psql</application> when expanding a variable that refers to itself (Tom) </para> </listitem> <listitem> <para> - Fix <application>psql</>'s <literal>\copy</> to not add spaces around - a dot within <literal>\copy (select ...)</> (Tom) + Fix <application>psql</application>'s <literal>\copy</literal> to not add spaces around + a dot within <literal>\copy (select ...)</literal> (Tom) </para> <para> @@ -1474,7 +1474,7 @@ <listitem> <para> - Ensure that <filename>contrib/pgstattuple</> functions respond to cancel + Ensure that <filename>contrib/pgstattuple</filename> functions respond to cancel interrupts promptly (Tatsuhito Kasahara) </para> </listitem> @@ -1482,7 +1482,7 @@ <listitem> <para> Make server startup deal properly with the case that - <function>shmget()</> returns <literal>EINVAL</> for an existing + <function>shmget()</function> returns <literal>EINVAL</literal> for an existing shared memory segment (Tom) </para> @@ -1514,14 +1514,14 @@ <listitem> <para> - Update time zone data files to <application>tzdata</> release 2010j + Update time zone data files to <application>tzdata</application> release 2010j for DST law changes in Argentina, Australian Antarctic, Bangladesh, Mexico, Morocco, Pakistan, Palestine, Russia, Syria, Tunisia; also historical corrections for Taiwan. </para> <para> - Also, add <literal>PKST</> (Pakistan Summer Time) to the default set of + Also, add <literal>PKST</literal> (Pakistan Summer Time) to the default set of timezone abbreviations. </para> </listitem> @@ -1563,7 +1563,7 @@ <listitem> <para> - Add new configuration parameter <varname>ssl_renegotiation_limit</> to + Add new configuration parameter <varname>ssl_renegotiation_limit</varname> to control how often we do session key renegotiation for an SSL connection (Magnus) </para> @@ -1619,8 +1619,8 @@ <listitem> <para> - Make <function>substring()</> for <type>bit</> types treat any negative - length as meaning <quote>all the rest of the string</> (Tom) + Make <function>substring()</function> for <type>bit</type> types treat any negative + length as meaning <quote>all the rest of the string</quote> (Tom) </para> <para> @@ -1646,7 +1646,7 @@ <listitem> <para> - Fix the <literal>STOP WAL LOCATION</> entry in backup history files to + Fix the <literal>STOP WAL LOCATION</literal> entry in backup history files to report the next WAL segment's name when the end location is exactly at a segment boundary (Itagaki Takahiro) </para> @@ -1668,23 +1668,23 @@ <para> Improve constraint exclusion processing of boolean-variable cases, in particular make it possible to exclude a partition that has a - <quote>bool_column = false</> constraint (Tom) + <quote>bool_column = false</quote> constraint (Tom) </para> </listitem> <listitem> <para> - When reading <filename>pg_hba.conf</> and related files, do not treat - <literal>@something</> as a file inclusion request if the <literal>@</> - appears inside quote marks; also, never treat <literal>@</> by itself + When reading <filename>pg_hba.conf</filename> and related files, do not treat + <literal>@something</literal> as a file inclusion request if the <literal>@</literal> + appears inside quote marks; also, never treat <literal>@</literal> by itself as a file inclusion request (Tom) </para> <para> This prevents erratic behavior if a role or database name starts with - <literal>@</>. If you need to include a file whose path name + <literal>@</literal>. If you need to include a file whose path name contains spaces, you can still do so, but you must write - <literal>@"/path to/file"</> rather than putting the quotes around + <literal>@"/path to/file"</literal> rather than putting the quotes around the whole construct. </para> </listitem> @@ -1692,35 +1692,35 @@ <listitem> <para> Prevent infinite loop on some platforms if a directory is named as - an inclusion target in <filename>pg_hba.conf</> and related files + an inclusion target in <filename>pg_hba.conf</filename> and related files (Tom) </para> </listitem> <listitem> <para> - Fix possible infinite loop if <function>SSL_read</> or - <function>SSL_write</> fails without setting <varname>errno</> (Tom) + Fix possible infinite loop if <function>SSL_read</function> or + <function>SSL_write</function> fails without setting <varname>errno</varname> (Tom) </para> <para> This is reportedly possible with some Windows versions of - <application>openssl</>. + <application>openssl</application>. </para> </listitem> <listitem> <para> - Fix <application>psql</>'s <literal>numericlocale</> option to not + Fix <application>psql</application>'s <literal>numericlocale</literal> option to not format strings it shouldn't in latex and troff output formats (Heikki) </para> </listitem> <listitem> <para> - Make <application>psql</> return the correct exit status (3) when - <literal>ON_ERROR_STOP</> and <literal>--single-transaction</> are - both specified and an error occurs during the implied <command>COMMIT</> + Make <application>psql</application> return the correct exit status (3) when + <literal>ON_ERROR_STOP</literal> and <literal>--single-transaction</literal> are + both specified and an error occurs during the implied <command>COMMIT</command> (Bruce) </para> </listitem> @@ -1741,7 +1741,7 @@ <listitem> <para> - Add <literal>volatile</> markings in PL/Python to avoid possible + Add <literal>volatile</literal> markings in PL/Python to avoid possible compiler-specific misbehavior (Zdenek Kotala) </para> </listitem> @@ -1753,28 +1753,28 @@ <para> The only known symptom of this oversight is that the Tcl - <literal>clock</> command misbehaves if using Tcl 8.5 or later. + <literal>clock</literal> command misbehaves if using Tcl 8.5 or later. </para> </listitem> <listitem> <para> - Prevent crash in <filename>contrib/dblink</> when too many key - columns are specified to a <function>dblink_build_sql_*</> function + Prevent crash in <filename>contrib/dblink</filename> when too many key + columns are specified to a <function>dblink_build_sql_*</function> function (Rushabh Lathia, Joe Conway) </para> </listitem> <listitem> <para> - Fix assorted crashes in <filename>contrib/xml2</> caused by sloppy + Fix assorted crashes in <filename>contrib/xml2</filename> caused by sloppy memory management (Tom) </para> </listitem> <listitem> <para> - Make building of <filename>contrib/xml2</> more robust on Windows + Make building of <filename>contrib/xml2</filename> more robust on Windows (Andrew) </para> </listitem> @@ -1785,14 +1785,14 @@ </para> <para> - One known symptom of this bug is that rows in <structname>pg_listener</> + One known symptom of this bug is that rows in <structname>pg_listener</structname> could be dropped under heavy load. </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2010e + Update time zone data files to <application>tzdata</application> release 2010e for DST law changes in Bangladesh, Chile, Fiji, Mexico, Paraguay, Samoa. </para> </listitem> @@ -1864,14 +1864,14 @@ <listitem> <para> - Prevent signals from interrupting <literal>VACUUM</> at unsafe times + Prevent signals from interrupting <literal>VACUUM</literal> at unsafe times (Alvaro) </para> <para> - This fix prevents a PANIC if a <literal>VACUUM FULL</> is canceled + This fix prevents a PANIC if a <literal>VACUUM FULL</literal> is canceled after it's already committed its tuple movements, as well as transient - errors if a plain <literal>VACUUM</> is interrupted after having + errors if a plain <literal>VACUUM</literal> is interrupted after having truncated the table. </para> </listitem> @@ -1890,7 +1890,7 @@ <listitem> <para> - Fix very rare crash in <type>inet</>/<type>cidr</> comparisons (Chris + Fix very rare crash in <type>inet</type>/<type>cidr</type> comparisons (Chris Mikkelson) </para> </listitem> @@ -1948,7 +1948,7 @@ <para> The previous code is known to fail with the combination of the Linux - <literal>pam_krb5</> PAM module with Microsoft Active Directory as the + <literal>pam_krb5</literal> PAM module with Microsoft Active Directory as the domain controller. It might have problems elsewhere too, since it was making unjustified assumptions about what arguments the PAM stack would pass to it. @@ -1958,13 +1958,13 @@ <listitem> <para> Fix processing of ownership dependencies during <literal>CREATE OR - REPLACE FUNCTION</> (Tom) + REPLACE FUNCTION</literal> (Tom) </para> </listitem> <listitem> <para> - Fix bug with calling <literal>plperl</> from <literal>plperlu</> or vice + Fix bug with calling <literal>plperl</literal> from <literal>plperlu</literal> or vice versa (Tom) </para> @@ -1984,7 +1984,7 @@ <listitem> <para> Ensure that Perl arrays are properly converted to - <productname>PostgreSQL</> arrays when returned by a set-returning + <productname>PostgreSQL</productname> arrays when returned by a set-returning PL/Perl function (Andrew Dunstan, Abhijit Menon-Sen) </para> @@ -2001,20 +2001,20 @@ <listitem> <para> - Ensure <application>psql</>'s flex module is compiled with the correct + Ensure <application>psql</application>'s flex module is compiled with the correct system header definitions (Tom) </para> <para> This fixes build failures on platforms where - <literal>--enable-largefile</> causes incompatible changes in the + <literal>--enable-largefile</literal> causes incompatible changes in the generated code. </para> </listitem> <listitem> <para> - Make the postmaster ignore any <literal>application_name</> parameter in + Make the postmaster ignore any <literal>application_name</literal> parameter in connection request packets, to improve compatibility with future libpq versions (Tom) </para> @@ -2027,14 +2027,14 @@ </para> <para> - This includes adding <literal>IDT</> and <literal>SGT</> to the default + This includes adding <literal>IDT</literal> and <literal>SGT</literal> to the default timezone abbreviation set. </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2009s + Update time zone data files to <application>tzdata</application> release 2009s for DST law changes in Antarctica, Argentina, Bangladesh, Fiji, Novokuznetsk, Pakistan, Palestine, Samoa, Syria; also historical corrections for Hong Kong. @@ -2065,8 +2065,8 @@ <para> A dump/restore is not required for those running 8.2.X. - However, if you have any hash indexes on <type>interval</> columns, - you must <command>REINDEX</> them after updating to 8.2.14. + However, if you have any hash indexes on <type>interval</type> columns, + you must <command>REINDEX</command> them after updating to 8.2.14. Also, if you are upgrading from a version earlier than 8.2.11, see <xref linkend="release-8-2-11">. </para> @@ -2080,7 +2080,7 @@ <listitem> <para> - Force WAL segment switch during <function>pg_start_backup()</> + Force WAL segment switch during <function>pg_start_backup()</function> (Heikki) </para> @@ -2091,26 +2091,26 @@ <listitem> <para> - Disallow <command>RESET ROLE</> and <command>RESET SESSION - AUTHORIZATION</> inside security-definer functions (Tom, Heikki) + Disallow <command>RESET ROLE</command> and <command>RESET SESSION + AUTHORIZATION</command> inside security-definer functions (Tom, Heikki) </para> <para> This covers a case that was missed in the previous patch that - disallowed <command>SET ROLE</> and <command>SET SESSION - AUTHORIZATION</> inside security-definer functions. + disallowed <command>SET ROLE</command> and <command>SET SESSION + AUTHORIZATION</command> inside security-definer functions. (See CVE-2007-6600) </para> </listitem> <listitem> <para> - Make <command>LOAD</> of an already-loaded loadable module + Make <command>LOAD</command> of an already-loaded loadable module into a no-op (Tom) </para> <para> - Formerly, <command>LOAD</> would attempt to unload and re-load the + Formerly, <command>LOAD</command> would attempt to unload and re-load the module, but this is unsafe and not all that useful. </para> </listitem> @@ -2145,32 +2145,32 @@ <listitem> <para> - Fix hash calculation for data type <type>interval</> (Tom) + Fix hash calculation for data type <type>interval</type> (Tom) </para> <para> This corrects wrong results for hash joins on interval values. It also changes the contents of hash indexes on interval columns. - If you have any such indexes, you must <command>REINDEX</> them + If you have any such indexes, you must <command>REINDEX</command> them after updating. </para> </listitem> <listitem> <para> - Treat <function>to_char(..., 'TH')</> as an uppercase ordinal - suffix with <literal>'HH'</>/<literal>'HH12'</> (Heikki) + Treat <function>to_char(..., 'TH')</function> as an uppercase ordinal + suffix with <literal>'HH'</literal>/<literal>'HH12'</literal> (Heikki) </para> <para> - It was previously handled as <literal>'th'</> (lowercase). + It was previously handled as <literal>'th'</literal> (lowercase). </para> </listitem> <listitem> <para> - Fix overflow for <literal>INTERVAL '<replaceable>x</> ms'</literal> - when <replaceable>x</> is more than 2 million and integer + Fix overflow for <literal>INTERVAL '<replaceable>x</replaceable> ms'</literal> + when <replaceable>x</replaceable> is more than 2 million and integer datetimes are in use (Alex Hunsaker) </para> </listitem> @@ -2187,7 +2187,7 @@ <listitem> <para> - Fix <type>money</> data type to work in locales where currency + Fix <type>money</type> data type to work in locales where currency amounts have no fractional digits, e.g. Japan (Itagaki Takahiro) </para> </listitem> @@ -2195,7 +2195,7 @@ <listitem> <para> Properly round datetime input like - <literal>00:12:57.9999999999999999999999999999</> (Tom) + <literal>00:12:57.9999999999999999999999999999</literal> (Tom) </para> </listitem> @@ -2228,14 +2228,14 @@ <listitem> <para> - Fix <application>pg_ctl</> to not go into an infinite loop if - <filename>postgresql.conf</> is empty (Jeff Davis) + Fix <application>pg_ctl</application> to not go into an infinite loop if + <filename>postgresql.conf</filename> is empty (Jeff Davis) </para> </listitem> <listitem> <para> - Make <filename>contrib/hstore</> throw an error when a key or + Make <filename>contrib/hstore</filename> throw an error when a key or value is too long to fit in its data structure, rather than silently truncating it (Andrew Gierth) </para> @@ -2243,15 +2243,15 @@ <listitem> <para> - Fix <filename>contrib/xml2</>'s <function>xslt_process()</> to + Fix <filename>contrib/xml2</filename>'s <function>xslt_process()</function> to properly handle the maximum number of parameters (twenty) (Tom) </para> </listitem> <listitem> <para> - Improve robustness of <application>libpq</>'s code to recover - from errors during <command>COPY FROM STDIN</> (Tom) + Improve robustness of <application>libpq</application>'s code to recover + from errors during <command>COPY FROM STDIN</command> (Tom) </para> </listitem> @@ -2264,7 +2264,7 @@ <listitem> <para> - Update time zone data files to <application>tzdata</> release 2009l + Update time zone data files to <application>tzdata</application> release 2009l for DST law changes in Bangladesh, Egypt, Jordan, Pakistan, Argentina/San_Luis, Cuba, Jordan (historical correction only), Mauritius, Morocco, Palestine, Syria, Tunisia. @@ -2315,7 +2315,7 @@ This change extends fixes made in the last two minor releases for related failure scenarios. The previous fixes were narrowly tailored for the original problem reports, but we have now recognized that - <emphasis>any</> error thrown by an encoding conversion function could + <emphasis>any</emphasis> error thrown by an encoding conversion function could potentially lead to infinite recursion while trying to report the error. The solution therefore is to disable translation and encoding conversion and report the plain-ASCII form of any error message, @@ -2326,7 +2326,7 @@ <listitem> <para> - Disallow <command>CREATE CONVERSION</> with the wrong encodings + Disallow <command>CREATE CONVERSION</command> with the wrong encodings for the specified conversion function (Heikki) </para> @@ -2339,40 +2339,40 @@ <listitem> <para> - Fix core dump when <function>to_char()</> is given format codes that + Fix core dump when <function>to_char()</function> is given format codes that are inappropriate for the type of the data argument (Tom) </para> </listitem> <listitem> <para> - Fix possible failure in <filename>contrib/tsearch2</> when C locale is + Fix possible failure in <filename>contrib/tsearch2</filename> when C locale is used with a multi-byte encoding (Teodor) </para> <para> - Crashes were possible on platforms where <type>wchar_t</> is narrower - than <type>int</>; Windows in particular. + Crashes were possible on platforms where <type>wchar_t</type> is narrower + than <type>int</type>; Windows in particular. </para> </listitem> <listitem> <para> - Fix extreme inefficiency in <filename>contrib/tsearch2</> parser's - handling of an email-like string containing multiple <literal>@</> + Fix extreme inefficiency in <filename>contrib/tsearch2</filename> parser's + handling of an email-like string containing multiple <literal>@</literal> characters (Heikki) </para> </listitem> <listitem> <para> - Fix decompilation of <literal>CASE WHEN</> with an implicit coercion + Fix decompilation of <literal>CASE WHEN</literal> with an implicit coercion (Tom) </para> <para> This mistake could lead to Assert failures in an Assert-enabled build, - or an <quote>unexpected CASE WHEN clause</> error message in other + or an <quote>unexpected CASE WHEN clause</quote> error message in other cases, when trying to examine or dump a view. </para> </listitem> @@ -2383,24 +2383,24 @@ </para> <para> - If <command>CLUSTER</> or a rewriting variant of <command>ALTER TABLE</> + If <command>CLUSTER</command> or a rewriting variant of <command>ALTER TABLE</command> were executed by someone other than the table owner, the - <structname>pg_type</> entry for the table's TOAST table would end up + <structname>pg_type</structname> entry for the table's TOAST table would end up marked as owned by that someone. This caused no immediate problems, since the permissions on the TOAST rowtype aren't examined by any ordinary database operation. However, it could lead to unexpected failures if one later tried to drop the role that issued the command - (in 8.1 or 8.2), or <quote>owner of data type appears to be invalid</> - warnings from <application>pg_dump</> after having done so (in 8.3). + (in 8.1 or 8.2), or <quote>owner of data type appears to be invalid</quote> + warnings from <application>pg_dump</application> after having done so (in 8.3). </para> </listitem> <listitem> <para> - Fix PL/pgSQL to not treat <literal>INTO</> after <command>INSERT</> as + Fix PL/pgSQL to not treat <literal>INTO</literal> after <command>INSERT</command> as an INTO-variables clause anywhere in the string, not only at the start; - in particular, don't fail for <command>INSERT INTO</> within - <command>CREATE RULE</> (Tom) + in particular, don't fail for <command>INSERT INTO</command> within + <command>CREATE RULE</command> (Tom) </para> </listitem> @@ -2418,21 +2418,21 @@ <listitem> <para> - Retry failed calls to <function>CallNamedPipe()</> on Windows + Retry failed calls to <function>CallNamedPipe()</function> on Windows (Steve Marshall, Magnus) </para> <para> It appears that this function can sometimes fail transiently; we previously treated any failure as a hard error, which could - confuse <command>LISTEN</>/<command>NOTIFY</> as well as other + confuse <command>LISTEN</command>/<command>NOTIFY</command> as well as other operations. </para> </listitem> <listitem> <para> - Add <literal>MUST</> (Mauritius Island Summer Time) to the default list + Add <literal>MUST</literal> (Mauritius Island Summer Time) to the default list of known timezone abbreviations (Xavier Bugaud) </para> </listitem> @@ -2474,13 +2474,13 @@ <listitem> <para> - Improve handling of URLs in <function>headline()</> function (Teodor) + Improve handling of URLs in <function>headline()</function> function (Teodor) </para> </listitem> <listitem> <para> - Improve handling of overlength headlines in <function>headline()</> + Improve handling of overlength headlines in <function>headline()</function> function (Teodor) </para> </listitem> @@ -2497,7 +2497,7 @@ <para> Fix possible Assert failure if a statement executed in PL/pgSQL is rewritten into another kind of statement, for example if an - <command>INSERT</> is rewritten into an <command>UPDATE</> (Heikki) + <command>INSERT</command> is rewritten into an <command>UPDATE</command> (Heikki) </para> </listitem> @@ -2507,7 +2507,7 @@ </para> <para> - This primarily affects domains that are declared with <literal>CHECK</> + This primarily affects domains that are declared with <literal>CHECK</literal> constraints involving user-defined stable or immutable functions. Such functions typically fail if no snapshot has been set. </para> @@ -2522,14 +2522,14 @@ <listitem> <para> - Avoid unnecessary locking of small tables in <command>VACUUM</> + Avoid unnecessary locking of small tables in <command>VACUUM</command> (Heikki) </para> </listitem> <listitem> <para> - Fix a problem that made <literal>UPDATE RETURNING tableoid</> + Fix a problem that made <literal>UPDATE RETURNING tableoid</literal> return zero instead of the correct OID (Tom) </para> </listitem> @@ -2542,13 +2542,13 @@ <para> This could result in bad plans for queries like - <literal>... from a left join b on a.a1 = b.b1 where a.a1 = 42 ...</> + <literal>... from a left join b on a.a1 = b.b1 where a.a1 = 42 ...</literal> </para> </listitem> <listitem> <para> - Improve optimizer's handling of long <literal>IN</> lists (Tom) + Improve optimizer's handling of long <literal>IN</literal> lists (Tom) </para> <para> @@ -2581,37 +2581,37 @@ <listitem> <para> - Fix <filename>contrib/dblink</>'s - <function>dblink_get_result(text,bool)</> function (Joe) + Fix <filename>contrib/dblink</filename>'s + <function>dblink_get_result(text,bool)</function> function (Joe) </para> </listitem> <listitem> <para> - Fix possible garbage output from <filename>contrib/sslinfo</> functions + Fix possible garbage output from <filename>contrib/sslinfo</filename> functions (Tom) </para> </listitem> <listitem> <para> - Fix <application>configure</> script to properly report failure when + Fix <application>configure</application> script to properly report failure when unable to obtain linkage information for PL/Perl (Andrew) </para> </listitem> <listitem> <para> - Make all documentation reference <literal>pgsql-bugs</> and/or - <literal>pgsql-hackers</> as appropriate, instead of the - now-decommissioned <literal>pgsql-ports</> and <literal>pgsql-patches</> + Make all documentation reference <literal>pgsql-bugs</literal> and/or + <literal>pgsql-hackers</literal> as appropriate, instead of the + now-decommissioned <literal>pgsql-ports</literal> and <literal>pgsql-patches</literal> mailing lists (Tom) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2009a (for + Update time zone data files to <application>tzdata</application> release 2009a (for Kathmandu and historical DST corrections in Switzerland, Cuba) </para> </listitem> @@ -2642,7 +2642,7 @@ A dump/restore is not required for those running 8.2.X. However, if you are upgrading from a version earlier than 8.2.7, see <xref linkend="release-8-2-7">. Also, if you were running a previous - 8.2.X release, it is recommended to <command>REINDEX</> all GiST + 8.2.X release, it is recommended to <command>REINDEX</command> all GiST indexes after the upgrade. </para> @@ -2656,13 +2656,13 @@ <listitem> <para> Fix GiST index corruption due to marking the wrong index entry - <quote>dead</> after a deletion (Teodor) + <quote>dead</quote> after a deletion (Teodor) </para> <para> This would result in index searches failing to find rows they should have found. Corrupted indexes can be fixed with - <command>REINDEX</>. + <command>REINDEX</command>. </para> </listitem> @@ -2674,7 +2674,7 @@ <para> We have addressed similar issues before, but it would still fail if - the <quote>character has no equivalent</> message itself couldn't + the <quote>character has no equivalent</quote> message itself couldn't be converted. The fix is to disable localization and send the plain ASCII error message when we detect such a situation. </para> @@ -2689,8 +2689,8 @@ <listitem> <para> - Improve optimization of <replaceable>expression</> <literal>IN</> - (<replaceable>expression-list</>) queries (Tom, per an idea from Robert + Improve optimization of <replaceable>expression</replaceable> <literal>IN</literal> + (<replaceable>expression-list</replaceable>) queries (Tom, per an idea from Robert Haas) </para> @@ -2703,13 +2703,13 @@ <listitem> <para> - Fix mis-expansion of rule queries when a sub-<literal>SELECT</> appears - in a function call in <literal>FROM</>, a multi-row <literal>VALUES</> - list, or a <literal>RETURNING</> list (Tom) + Fix mis-expansion of rule queries when a sub-<literal>SELECT</literal> appears + in a function call in <literal>FROM</literal>, a multi-row <literal>VALUES</literal> + list, or a <literal>RETURNING</literal> list (Tom) </para> <para> - The usual symptom of this problem is an <quote>unrecognized node type</> + The usual symptom of this problem is an <quote>unrecognized node type</quote> error. </para> </listitem> @@ -2729,9 +2729,9 @@ <listitem> <para> - Prevent possible collision of <structfield>relfilenode</> numbers + Prevent possible collision of <structfield>relfilenode</structfield> numbers when moving a table to another tablespace with <command>ALTER SET - TABLESPACE</> (Heikki) + TABLESPACE</command> (Heikki) </para> <para> @@ -2750,14 +2750,14 @@ <listitem> <para> Fix improper display of fractional seconds in interval values when - using a non-ISO datestyle in an <option>--enable-integer-datetimes</> + using a non-ISO datestyle in an <option>--enable-integer-datetimes</option> build (Ron Mayer) </para> </listitem> <listitem> <para> - Ensure <function>SPI_getvalue</> and <function>SPI_getbinval</> + Ensure <function>SPI_getvalue</function> and <function>SPI_getbinval</function> behave correctly when the passed tuple and tuple descriptor have different numbers of columns (Tom) </para> @@ -2771,31 +2771,31 @@ <listitem> <para> - Fix <application>ecpg</>'s parsing of <command>CREATE ROLE</> (Michael) + Fix <application>ecpg</application>'s parsing of <command>CREATE ROLE</command> (Michael) </para> </listitem> <listitem> <para> - Fix recent breakage of <literal>pg_ctl restart</> (Tom) + Fix recent breakage of <literal>pg_ctl restart</literal> (Tom) </para> </listitem> <listitem> <para> - Ensure <filename>pg_control</> is opened in binary mode + Ensure <filename>pg_control</filename> is opened in binary mode (Itagaki Takahiro) </para> <para> - <application>pg_controldata</> and <application>pg_resetxlog</> + <application>pg_controldata</application> and <application>pg_resetxlog</application> did this incorrectly, and so could fail on Windows. </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2008i (for + Update time zone data files to <application>tzdata</application> release 2008i (for DST law changes in Argentina, Brazil, Mauritius, Syria) </para> </listitem> @@ -2847,12 +2847,12 @@ <listitem> <para> - Fix potential miscalculation of <structfield>datfrozenxid</> (Alvaro) + Fix potential miscalculation of <structfield>datfrozenxid</structfield> (Alvaro) </para> <para> This error may explain some recent reports of failure to remove old - <structname>pg_clog</> data. + <structname>pg_clog</structname> data. </para> </listitem> @@ -2864,7 +2864,7 @@ <para> This responds to reports that the counters could overflow in sufficiently long transactions, leading to unexpected <quote>lock is - already held</> errors. + already held</quote> errors. </para> </listitem> @@ -2877,7 +2877,7 @@ <listitem> <para> Fix missed permissions checks when a view contains a simple - <literal>UNION ALL</> construct (Heikki) + <literal>UNION ALL</literal> construct (Heikki) </para> <para> @@ -2889,12 +2889,12 @@ <listitem> <para> Add checks in executor startup to ensure that the tuples produced by an - <command>INSERT</> or <command>UPDATE</> will match the target table's + <command>INSERT</command> or <command>UPDATE</command> will match the target table's current rowtype (Tom) </para> <para> - <command>ALTER COLUMN TYPE</>, followed by re-use of a previously + <command>ALTER COLUMN TYPE</command>, followed by re-use of a previously cached plan, could produce this type of situation. The check protects against data corruption and/or crashes that could ensue. </para> @@ -2902,29 +2902,29 @@ <listitem> <para> - Fix possible repeated drops during <command>DROP OWNED</> (Tom) + Fix possible repeated drops during <command>DROP OWNED</command> (Tom) </para> <para> This would typically result in strange errors such as <quote>cache - lookup failed for relation NNN</>. + lookup failed for relation NNN</quote>. </para> </listitem> <listitem> <para> - Fix <literal>AT TIME ZONE</> to first try to interpret its timezone + Fix <literal>AT TIME ZONE</literal> to first try to interpret its timezone argument as a timezone abbreviation, and only try it as a full timezone name if that fails, rather than the other way around as formerly (Tom) </para> <para> The timestamp input functions have always resolved ambiguous zone names - in this order. Making <literal>AT TIME ZONE</> do so as well improves + in this order. Making <literal>AT TIME ZONE</literal> do so as well improves consistency, and fixes a compatibility bug introduced in 8.1: in ambiguous cases we now behave the same as 8.0 and before did, - since in the older versions <literal>AT TIME ZONE</> accepted - <emphasis>only</> abbreviations. + since in the older versions <literal>AT TIME ZONE</literal> accepted + <emphasis>only</emphasis> abbreviations. </para> </listitem> @@ -2951,14 +2951,14 @@ <listitem> <para> Allow spaces in the suffix part of an LDAP URL in - <filename>pg_hba.conf</> (Tom) + <filename>pg_hba.conf</filename> (Tom) </para> </listitem> <listitem> <para> Fix bug in backwards scanning of a cursor on a <literal>SELECT DISTINCT - ON</> query (Tom) + ON</literal> query (Tom) </para> </listitem> @@ -2976,21 +2976,21 @@ <listitem> <para> - Fix planner to estimate that <literal>GROUP BY</> expressions yielding + Fix planner to estimate that <literal>GROUP BY</literal> expressions yielding boolean results always result in two groups, regardless of the expressions' contents (Tom) </para> <para> This is very substantially more accurate than the regular <literal>GROUP - BY</> estimate for certain boolean tests like <replaceable>col</> - <literal>IS NULL</>. + BY</literal> estimate for certain boolean tests like <replaceable>col</replaceable> + <literal>IS NULL</literal>. </para> </listitem> <listitem> <para> - Fix PL/pgSQL to not fail when a <literal>FOR</> loop's target variable + Fix PL/pgSQL to not fail when a <literal>FOR</literal> loop's target variable is a record containing composite-type fields (Tom) </para> </listitem> @@ -3005,28 +3005,28 @@ <listitem> <para> On Windows, work around a Microsoft bug by preventing - <application>libpq</> from trying to send more than 64kB per system call + <application>libpq</application> from trying to send more than 64kB per system call (Magnus) </para> </listitem> <listitem> <para> - Improve <application>pg_dump</> and <application>pg_restore</>'s + Improve <application>pg_dump</application> and <application>pg_restore</application>'s error reporting after failure to send a SQL command (Tom) </para> </listitem> <listitem> <para> - Fix <application>pg_ctl</> to properly preserve postmaster - command-line arguments across a <literal>restart</> (Bruce) + Fix <application>pg_ctl</application> to properly preserve postmaster + command-line arguments across a <literal>restart</literal> (Bruce) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2008f (for + Update time zone data files to <application>tzdata</application> release 2008f (for DST law changes in Argentina, Bahamas, Brazil, Mauritius, Morocco, Pakistan, Palestine, and Paraguay) </para> @@ -3069,18 +3069,18 @@ <listitem> <para> - Make <function>pg_get_ruledef()</> parenthesize negative constants (Tom) + Make <function>pg_get_ruledef()</function> parenthesize negative constants (Tom) </para> <para> Before this fix, a negative constant in a view or rule might be dumped - as, say, <literal>-42::integer</>, which is subtly incorrect: it should - be <literal>(-42)::integer</> due to operator precedence rules. + as, say, <literal>-42::integer</literal>, which is subtly incorrect: it should + be <literal>(-42)::integer</literal> due to operator precedence rules. Usually this would make little difference, but it could interact with another recent patch to cause - <productname>PostgreSQL</> to reject what had been a valid - <command>SELECT DISTINCT</> view query. Since this could result in - <application>pg_dump</> output failing to reload, it is being treated + <productname>PostgreSQL</productname> to reject what had been a valid + <command>SELECT DISTINCT</command> view query. Since this could result in + <application>pg_dump</application> output failing to reload, it is being treated as a high-priority fix. The only released versions in which dump output is actually incorrect are 8.3.1 and 8.2.7. </para> @@ -3088,13 +3088,13 @@ <listitem> <para> - Make <command>ALTER AGGREGATE ... OWNER TO</> update - <structname>pg_shdepend</> (Tom) + Make <command>ALTER AGGREGATE ... OWNER TO</command> update + <structname>pg_shdepend</structname> (Tom) </para> <para> This oversight could lead to problems if the aggregate was later - involved in a <command>DROP OWNED</> or <command>REASSIGN OWNED</> + involved in a <command>DROP OWNED</command> or <command>REASSIGN OWNED</command> operation. </para> </listitem> @@ -3144,7 +3144,7 @@ <listitem> <para> - Fix <command>ALTER TABLE ADD COLUMN ... PRIMARY KEY</> so that the new + Fix <command>ALTER TABLE ADD COLUMN ... PRIMARY KEY</command> so that the new column is correctly checked to see if it's been initialized to all non-nulls (Brendan Jurd) </para> @@ -3156,16 +3156,16 @@ <listitem> <para> - Fix possible <command>CREATE TABLE</> failure when inheriting the - <quote>same</> constraint from multiple parent relations that + Fix possible <command>CREATE TABLE</command> failure when inheriting the + <quote>same</quote> constraint from multiple parent relations that inherited that constraint from a common ancestor (Tom) </para> </listitem> <listitem> <para> - Fix <function>pg_get_ruledef()</> to show the alias, if any, attached - to the target table of an <command>UPDATE</> or <command>DELETE</> + Fix <function>pg_get_ruledef()</function> to show the alias, if any, attached + to the target table of an <command>UPDATE</command> or <command>DELETE</command> (Tom) </para> </listitem> @@ -3200,14 +3200,14 @@ <listitem> <para> Fix conversions between ISO-8859-5 and other encodings to handle - Cyrillic <quote>Yo</> characters (<literal>e</> and <literal>E</> with + Cyrillic <quote>Yo</quote> characters (<literal>e</literal> and <literal>E</literal> with two dots) (Sergey Burladyan) </para> </listitem> <listitem> <para> - Fix several datatype input functions, notably <function>array_in()</>, + Fix several datatype input functions, notably <function>array_in()</function>, that were allowing unused bytes in their results to contain uninitialized, unpredictable values (Tom) </para> @@ -3215,7 +3215,7 @@ <para> This could lead to failures in which two apparently identical literal values were not seen as equal, resulting in the parser complaining - about unmatched <literal>ORDER BY</> and <literal>DISTINCT</> + about unmatched <literal>ORDER BY</literal> and <literal>DISTINCT</literal> expressions. </para> </listitem> @@ -3223,24 +3223,24 @@ <listitem> <para> Fix a corner case in regular-expression substring matching - (<literal>substring(<replaceable>string</> from - <replaceable>pattern</>)</literal>) (Tom) + (<literal>substring(<replaceable>string</replaceable> from + <replaceable>pattern</replaceable>)</literal>) (Tom) </para> <para> The problem occurs when there is a match to the pattern overall but the user has specified a parenthesized subexpression and that subexpression hasn't got a match. An example is - <literal>substring('foo' from 'foo(bar)?')</>. - This should return NULL, since <literal>(bar)</> isn't matched, but + <literal>substring('foo' from 'foo(bar)?')</literal>. + This should return NULL, since <literal>(bar)</literal> isn't matched, but it was mistakenly returning the whole-pattern match instead (ie, - <literal>foo</>). + <literal>foo</literal>). </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2008c (for + Update time zone data files to <application>tzdata</application> release 2008c (for DST law changes in Morocco, Iraq, Choibalsan, Pakistan, Syria, Cuba, and Argentina/San_Luis) </para> @@ -3248,47 +3248,47 @@ <listitem> <para> - Fix incorrect result from <application>ecpg</>'s - <function>PGTYPEStimestamp_sub()</> function (Michael) + Fix incorrect result from <application>ecpg</application>'s + <function>PGTYPEStimestamp_sub()</function> function (Michael) </para> </listitem> <listitem> <para> - Fix broken GiST comparison function for <filename>contrib/tsearch2</>'s - <type>tsquery</> type (Teodor) + Fix broken GiST comparison function for <filename>contrib/tsearch2</filename>'s + <type>tsquery</type> type (Teodor) </para> </listitem> <listitem> <para> - Fix possible crashes in <filename>contrib/cube</> functions (Tom) + Fix possible crashes in <filename>contrib/cube</filename> functions (Tom) </para> </listitem> <listitem> <para> - Fix core dump in <filename>contrib/xml2</>'s - <function>xpath_table()</> function when the input query returns a + Fix core dump in <filename>contrib/xml2</filename>'s + <function>xpath_table()</function> function when the input query returns a NULL value (Tom) </para> </listitem> <listitem> <para> - Fix <filename>contrib/xml2</>'s makefile to not override - <literal>CFLAGS</> (Tom) + Fix <filename>contrib/xml2</filename>'s makefile to not override + <literal>CFLAGS</literal> (Tom) </para> </listitem> <listitem> <para> - Fix <literal>DatumGetBool</> macro to not fail with <application>gcc</> + Fix <literal>DatumGetBool</literal> macro to not fail with <application>gcc</application> 4.3 (Tom) </para> <para> - This problem affects <quote>old style</> (V0) C functions that + This problem affects <quote>old style</quote> (V0) C functions that return boolean. The fix is already in 8.3, but the need to back-patch it was not realized at the time. </para> @@ -3318,7 +3318,7 @@ <para> A dump/restore is not required for those running 8.2.X. - However, you might need to <command>REINDEX</> indexes on textual + However, you might need to <command>REINDEX</command> indexes on textual columns after updating, if you are affected by the Windows locale issue described below. </para> @@ -3342,34 +3342,34 @@ over two years ago, but Windows with UTF-8 uses a separate code path that was not updated. If you are using a locale that considers some non-identical strings as equal, you may need to - <command>REINDEX</> to fix existing indexes on textual columns. + <command>REINDEX</command> to fix existing indexes on textual columns. </para> </listitem> <listitem> <para> - Repair potential deadlock between concurrent <command>VACUUM FULL</> + Repair potential deadlock between concurrent <command>VACUUM FULL</command> operations on different system catalogs (Tom) </para> </listitem> <listitem> <para> - Fix longstanding <command>LISTEN</>/<command>NOTIFY</> + Fix longstanding <command>LISTEN</command>/<command>NOTIFY</command> race condition (Tom) </para> <para> In rare cases a session that had just executed a - <command>LISTEN</> might not get a notification, even though + <command>LISTEN</command> might not get a notification, even though one would be expected because the concurrent transaction executing - <command>NOTIFY</> was observed to commit later. + <command>NOTIFY</command> was observed to commit later. </para> <para> A side effect of the fix is that a transaction that has executed - a not-yet-committed <command>LISTEN</> command will not see any - row in <structname>pg_listener</> for the <command>LISTEN</>, + a not-yet-committed <command>LISTEN</command> command will not see any + row in <structname>pg_listener</structname> for the <command>LISTEN</command>, should it choose to look; formerly it would have. This behavior was never documented one way or the other, but it is possible that some applications depend on the old behavior. @@ -3378,14 +3378,14 @@ <listitem> <para> - Disallow <command>LISTEN</> and <command>UNLISTEN</> within a + Disallow <command>LISTEN</command> and <command>UNLISTEN</command> within a prepared transaction (Tom) </para> <para> This was formerly allowed but trying to do it had various unpleasant consequences, notably that the originating backend could not exit - as long as an <command>UNLISTEN</> remained uncommitted. + as long as an <command>UNLISTEN</command> remained uncommitted. </para> </listitem> @@ -3426,14 +3426,14 @@ <listitem> <para> - Fix <quote>unrecognized node type</> error in some variants of - <command>ALTER OWNER</> (Tom) + Fix <quote>unrecognized node type</quote> error in some variants of + <command>ALTER OWNER</command> (Tom) </para> </listitem> <listitem> <para> - Ensure <structname>pg_stat_activity</>.<structfield>waiting</> flag + Ensure <structname>pg_stat_activity</structname>.<structfield>waiting</structfield> flag is cleared when a lock wait is aborted (Tom) </para> </listitem> @@ -3451,20 +3451,20 @@ <listitem> <para> - Update time zone data files to <application>tzdata</> release 2008a + Update time zone data files to <application>tzdata</application> release 2008a (in particular, recent Chile changes); adjust timezone abbreviation - <literal>VET</> (Venezuela) to mean UTC-4:30, not UTC-4:00 (Tom) + <literal>VET</literal> (Venezuela) to mean UTC-4:30, not UTC-4:00 (Tom) </para> </listitem> <listitem> <para> - Fix <application>pg_ctl</> to correctly extract the postmaster's port + Fix <application>pg_ctl</application> to correctly extract the postmaster's port number from command-line options (Itagaki Takahiro, Tom) </para> <para> - Previously, <literal>pg_ctl start -w</> could try to contact the + Previously, <literal>pg_ctl start -w</literal> could try to contact the postmaster on the wrong port, leading to bogus reports of startup failure. </para> @@ -3472,31 +3472,31 @@ <listitem> <para> - Use <option>-fwrapv</> to defend against possible misoptimization - in recent <application>gcc</> versions (Tom) + Use <option>-fwrapv</option> to defend against possible misoptimization + in recent <application>gcc</application> versions (Tom) </para> <para> - This is known to be necessary when building <productname>PostgreSQL</> - with <application>gcc</> 4.3 or later. + This is known to be necessary when building <productname>PostgreSQL</productname> + with <application>gcc</application> 4.3 or later. </para> </listitem> <listitem> <para> - Correctly enforce <varname>statement_timeout</> values longer - than <literal>INT_MAX</> microseconds (about 35 minutes) (Tom) + Correctly enforce <varname>statement_timeout</varname> values longer + than <literal>INT_MAX</literal> microseconds (about 35 minutes) (Tom) </para> <para> - This bug affects only builds with <option>--enable-integer-datetimes</>. + This bug affects only builds with <option>--enable-integer-datetimes</option>. </para> </listitem> <listitem> <para> - Fix <quote>unexpected PARAM_SUBLINK ID</> planner error when + Fix <quote>unexpected PARAM_SUBLINK ID</quote> planner error when constant-folding simplifies a sub-select (Tom) </para> </listitem> @@ -3504,7 +3504,7 @@ <listitem> <para> Fix logical errors in constraint-exclusion handling of <literal>IS - NULL</> and <literal>NOT</> expressions (Tom) + NULL</literal> and <literal>NOT</literal> expressions (Tom) </para> <para> @@ -3515,7 +3515,7 @@ <listitem> <para> - Fix another cause of <quote>failed to build any N-way joins</> + Fix another cause of <quote>failed to build any N-way joins</quote> planner errors (Tom) </para> @@ -3539,8 +3539,8 @@ <listitem> <para> - Fix display of constant expressions in <literal>ORDER BY</> - and <literal>GROUP BY</> (Tom) + Fix display of constant expressions in <literal>ORDER BY</literal> + and <literal>GROUP BY</literal> (Tom) </para> <para> @@ -3552,7 +3552,7 @@ <listitem> <para> - Fix <application>libpq</> to handle NOTICE messages correctly + Fix <application>libpq</application> to handle NOTICE messages correctly during COPY OUT (Tom) </para> @@ -3600,7 +3600,7 @@ <listitem> <para> Prevent functions in indexes from executing with the privileges of - the user running <command>VACUUM</>, <command>ANALYZE</>, etc (Tom) + the user running <command>VACUUM</command>, <command>ANALYZE</command>, etc (Tom) </para> <para> @@ -3611,18 +3611,18 @@ (Note that triggers, defaults, check constraints, etc. pose the same type of risk.) But functions in indexes pose extra danger because they will be executed by routine maintenance operations - such as <command>VACUUM FULL</>, which are commonly performed + such as <command>VACUUM FULL</command>, which are commonly performed automatically under a superuser account. For example, a nefarious user can execute code with superuser privileges by setting up a trojan-horse index definition and waiting for the next routine vacuum. The fix arranges for standard maintenance operations - (including <command>VACUUM</>, <command>ANALYZE</>, <command>REINDEX</>, - and <command>CLUSTER</>) to execute as the table owner rather than + (including <command>VACUUM</command>, <command>ANALYZE</command>, <command>REINDEX</command>, + and <command>CLUSTER</command>) to execute as the table owner rather than the calling user, using the same privilege-switching mechanism already - used for <literal>SECURITY DEFINER</> functions. To prevent bypassing + used for <literal>SECURITY DEFINER</literal> functions. To prevent bypassing this security measure, execution of <command>SET SESSION - AUTHORIZATION</> and <command>SET ROLE</> is now forbidden within a - <literal>SECURITY DEFINER</> context. (CVE-2007-6600) + AUTHORIZATION</command> and <command>SET ROLE</command> is now forbidden within a + <literal>SECURITY DEFINER</literal> context. (CVE-2007-6600) </para> </listitem> @@ -3642,13 +3642,13 @@ <listitem> <para> - Require non-superusers who use <filename>/contrib/dblink</> to use only + Require non-superusers who use <filename>/contrib/dblink</filename> to use only password authentication, as a security measure (Joe) </para> <para> The fix that appeared for this in 8.2.5 was incomplete, as it plugged - the hole for only some <filename>dblink</> functions. (CVE-2007-6601, + the hole for only some <filename>dblink</filename> functions. (CVE-2007-6601, CVE-2007-3278) </para> </listitem> @@ -3662,13 +3662,13 @@ <listitem> <para> Fix GIN index build to work properly when - <varname>maintenance_work_mem</> is 4GB or more (Tom) + <varname>maintenance_work_mem</varname> is 4GB or more (Tom) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2007k + Update time zone data files to <application>tzdata</application> release 2007k (in particular, recent Argentina changes) (Tom) </para> </listitem> @@ -3690,22 +3690,22 @@ <listitem> <para> Fix planner failure in some cases of <literal>WHERE false AND var IN - (SELECT ...)</> (Tom) + (SELECT ...)</literal> (Tom) </para> </listitem> <listitem> <para> - Make <command>CREATE TABLE ... SERIAL</> and - <command>ALTER SEQUENCE ... OWNED BY</> not change the - <function>currval()</> state of the sequence (Tom) + Make <command>CREATE TABLE ... SERIAL</command> and + <command>ALTER SEQUENCE ... OWNED BY</command> not change the + <function>currval()</function> state of the sequence (Tom) </para> </listitem> <listitem> <para> Preserve the tablespace and storage parameters of indexes that are - rebuilt by <command>ALTER TABLE ... ALTER COLUMN TYPE</> (Tom) + rebuilt by <command>ALTER TABLE ... ALTER COLUMN TYPE</command> (Tom) </para> </listitem> @@ -3724,28 +3724,28 @@ <listitem> <para> - Make <command>VACUUM</> not use all of <varname>maintenance_work_mem</> + Make <command>VACUUM</command> not use all of <varname>maintenance_work_mem</varname> when the table is too small for it to be useful (Alvaro) </para> </listitem> <listitem> <para> - Fix potential crash in <function>translate()</> when using a multibyte + Fix potential crash in <function>translate()</function> when using a multibyte database encoding (Tom) </para> </listitem> <listitem> <para> - Make <function>corr()</> return the correct result for negative + Make <function>corr()</function> return the correct result for negative correlation values (Neil) </para> </listitem> <listitem> <para> - Fix overflow in <literal>extract(epoch from interval)</> for intervals + Fix overflow in <literal>extract(epoch from interval)</literal> for intervals exceeding 68 years (Tom) </para> </listitem> @@ -3759,13 +3759,13 @@ <listitem> <para> - Fix PL/Perl to cope when platform's Perl defines type <literal>bool</> - as <literal>int</> rather than <literal>char</> (Tom) + Fix PL/Perl to cope when platform's Perl defines type <literal>bool</literal> + as <literal>int</literal> rather than <literal>char</literal> (Tom) </para> <para> While this could theoretically happen anywhere, no standard build of - Perl did things this way ... until <productname>macOS</> 10.5. + Perl did things this way ... until <productname>macOS</productname> 10.5. </para> </listitem> @@ -3784,73 +3784,73 @@ <listitem> <para> - Fix <application>pg_dump</> to correctly handle inheritance child tables + Fix <application>pg_dump</application> to correctly handle inheritance child tables that have default expressions different from their parent's (Tom) </para> </listitem> <listitem> <para> - Fix <application>libpq</> crash when <varname>PGPASSFILE</> refers + Fix <application>libpq</application> crash when <varname>PGPASSFILE</varname> refers to a file that is not a plain file (Martin Pitt) </para> </listitem> <listitem> <para> - <application>ecpg</> parser fixes (Michael) + <application>ecpg</application> parser fixes (Michael) </para> </listitem> <listitem> <para> - Make <filename>contrib/pgcrypto</> defend against - <application>OpenSSL</> libraries that fail on keys longer than 128 + Make <filename>contrib/pgcrypto</filename> defend against + <application>OpenSSL</application> libraries that fail on keys longer than 128 bits; which is the case at least on some Solaris versions (Marko Kreen) </para> </listitem> <listitem> <para> - Make <filename>contrib/tablefunc</>'s <function>crosstab()</> handle + Make <filename>contrib/tablefunc</filename>'s <function>crosstab()</function> handle NULL rowid as a category in its own right, rather than crashing (Joe) </para> </listitem> <listitem> <para> - Fix <type>tsvector</> and <type>tsquery</> output routines to + Fix <type>tsvector</type> and <type>tsquery</type> output routines to escape backslashes correctly (Teodor, Bruce) </para> </listitem> <listitem> <para> - Fix crash of <function>to_tsvector()</> on huge input strings (Teodor) + Fix crash of <function>to_tsvector()</function> on huge input strings (Teodor) </para> </listitem> <listitem> <para> - Require a specific version of <productname>Autoconf</> to be used - when re-generating the <command>configure</> script (Peter) + Require a specific version of <productname>Autoconf</productname> to be used + when re-generating the <command>configure</command> script (Peter) </para> <para> This affects developers and packagers only. The change was made to prevent accidental use of untested combinations of - <productname>Autoconf</> and <productname>PostgreSQL</> versions. + <productname>Autoconf</productname> and <productname>PostgreSQL</productname> versions. You can remove the version check if you really want to use a - different <productname>Autoconf</> version, but it's + different <productname>Autoconf</productname> version, but it's your responsibility whether the result works or not. </para> </listitem> <listitem> <para> - Update <function>gettimeofday</> configuration check so that - <productname>PostgreSQL</> can be built on newer versions of - <productname>MinGW</> (Magnus) + Update <function>gettimeofday</function> configuration check so that + <productname>PostgreSQL</productname> can be built on newer versions of + <productname>MinGW</productname> (Magnus) </para> </listitem> @@ -3890,48 +3890,48 @@ <listitem> <para> Prevent index corruption when a transaction inserts rows and - then aborts close to the end of a concurrent <command>VACUUM</> + then aborts close to the end of a concurrent <command>VACUUM</command> on the same table (Tom) </para> </listitem> <listitem> <para> - Fix <literal>ALTER DOMAIN ADD CONSTRAINT</> for cases involving + Fix <literal>ALTER DOMAIN ADD CONSTRAINT</literal> for cases involving domains over domains (Tom) </para> </listitem> <listitem> <para> - Make <command>CREATE DOMAIN ... DEFAULT NULL</> work properly (Tom) + Make <command>CREATE DOMAIN ... DEFAULT NULL</command> work properly (Tom) </para> </listitem> <listitem> <para> Fix some planner problems with outer joins, notably poor - size estimation for <literal>t1 LEFT JOIN t2 WHERE t2.col IS NULL</> + size estimation for <literal>t1 LEFT JOIN t2 WHERE t2.col IS NULL</literal> (Tom) </para> </listitem> <listitem> <para> - Allow the <type>interval</> data type to accept input consisting only of + Allow the <type>interval</type> data type to accept input consisting only of milliseconds or microseconds (Neil) </para> </listitem> <listitem> <para> - Allow timezone name to appear before the year in <type>timestamp</> input (Tom) + Allow timezone name to appear before the year in <type>timestamp</type> input (Tom) </para> </listitem> <listitem> <para> - Fixes for <acronym>GIN</> indexes used by <filename>/contrib/tsearch2</> (Teodor) + Fixes for <acronym>GIN</acronym> indexes used by <filename>/contrib/tsearch2</filename> (Teodor) </para> </listitem> @@ -3943,7 +3943,7 @@ <listitem> <para> - Fix excessive logging of <acronym>SSL</> error messages (Tom) + Fix excessive logging of <acronym>SSL</acronym> error messages (Tom) </para> </listitem> @@ -3956,7 +3956,7 @@ <listitem> <para> - Fix crash when <varname>log_min_error_statement</> logging runs out + Fix crash when <varname>log_min_error_statement</varname> logging runs out of memory (Tom) </para> </listitem> @@ -3969,13 +3969,13 @@ <listitem> <para> - Fix <function>stddev_pop(numeric)</> and <function>var_pop(numeric)</> (Tom) + Fix <function>stddev_pop(numeric)</function> and <function>var_pop(numeric)</function> (Tom) </para> </listitem> <listitem> <para> - Prevent <command>REINDEX</> and <command>CLUSTER</> from failing + Prevent <command>REINDEX</command> and <command>CLUSTER</command> from failing due to attempting to process temporary tables of other sessions (Alvaro) </para> </listitem> @@ -3994,39 +3994,39 @@ <listitem> <para> - Make <command>pg_ctl -w</> work properly in Windows service mode (Dave Page) + Make <command>pg_ctl -w</command> work properly in Windows service mode (Dave Page) </para> </listitem> <listitem> <para> - Fix memory allocation bug when using <application>MIT Kerberos</> on Windows (Magnus) + Fix memory allocation bug when using <application>MIT Kerberos</application> on Windows (Magnus) </para> </listitem> <listitem> <para> - Suppress timezone name (<literal>%Z</>) in log timestamps on Windows + Suppress timezone name (<literal>%Z</literal>) in log timestamps on Windows because of possible encoding mismatches (Tom) </para> </listitem> <listitem> <para> - Require non-superusers who use <filename>/contrib/dblink</> to use only + Require non-superusers who use <filename>/contrib/dblink</filename> to use only password authentication, as a security measure (Joe) </para> </listitem> <listitem> <para> - Restrict <filename>/contrib/pgstattuple</> functions to superusers, for security reasons (Tom) + Restrict <filename>/contrib/pgstattuple</filename> functions to superusers, for security reasons (Tom) </para> </listitem> <listitem> <para> - Do not let <filename>/contrib/intarray</> try to make its GIN opclass + Do not let <filename>/contrib/intarray</filename> try to make its GIN opclass the default (this caused problems at dump/restore) (Tom) </para> </listitem> @@ -4068,56 +4068,56 @@ <listitem> <para> Support explicit placement of the temporary-table schema within - <varname>search_path</>, and disable searching it for functions + <varname>search_path</varname>, and disable searching it for functions and operators (Tom) </para> <para> This is needed to allow a security-definer function to set a - truly secure value of <varname>search_path</>. Without it, + truly secure value of <varname>search_path</varname>. Without it, an unprivileged SQL user can use temporary objects to execute code with the privileges of the security-definer function (CVE-2007-2138). - See <command>CREATE FUNCTION</> for more information. + See <command>CREATE FUNCTION</command> for more information. </para> </listitem> <listitem> <para> - Fix <varname>shared_preload_libraries</> for Windows + Fix <varname>shared_preload_libraries</varname> for Windows by forcing reload in each backend (Korry Douglas) </para> </listitem> <listitem> <para> - Fix <function>to_char()</> so it properly upper/lower cases localized day or month + Fix <function>to_char()</function> so it properly upper/lower cases localized day or month names (Pavel Stehule) </para> </listitem> <listitem> <para> - <filename>/contrib/tsearch2</> crash fixes (Teodor) + <filename>/contrib/tsearch2</filename> crash fixes (Teodor) </para> </listitem> <listitem> <para> - Require <command>COMMIT PREPARED</> to be executed in the same + Require <command>COMMIT PREPARED</command> to be executed in the same database as the transaction was prepared in (Heikki) </para> </listitem> <listitem> <para> - Allow <command>pg_dump</> to do binary backups larger than two gigabytes + Allow <command>pg_dump</command> to do binary backups larger than two gigabytes on Windows (Magnus) </para> </listitem> <listitem> <para> - New traditional (Taiwan) Chinese <acronym>FAQ</> (Zhou Daojing) + New traditional (Taiwan) Chinese <acronym>FAQ</acronym> (Zhou Daojing) </para> </listitem> @@ -4129,8 +4129,8 @@ <listitem> <para> - Fix potential-data-corruption bug in how <command>VACUUM FULL</> handles - <command>UPDATE</> chains (Tom, Pavan Deolasee) + Fix potential-data-corruption bug in how <command>VACUUM FULL</command> handles + <command>UPDATE</command> chains (Tom, Pavan Deolasee) </para> </listitem> @@ -4142,8 +4142,8 @@ <listitem> <para> - Fix <command>pg_dump</> so it can dump a serial column's sequence - using <option>-t</> when not also dumping the owning table + Fix <command>pg_dump</command> so it can dump a serial column's sequence + using <option>-t</option> when not also dumping the owning table (Tom) </para> </listitem> @@ -4158,7 +4158,7 @@ <listitem> <para> Fix possible wrong answers or crash when a PL/pgSQL function tries - to <literal>RETURN</> from within an <literal>EXCEPTION</> block + to <literal>RETURN</literal> from within an <literal>EXCEPTION</literal> block (Tom) </para> </listitem> @@ -4286,8 +4286,8 @@ <listitem> <para> - Properly handle <function>to_char('CC')</> for years ending in - <literal>00</> (Tom) + Properly handle <function>to_char('CC')</function> for years ending in + <literal>00</literal> (Tom) </para> <para> @@ -4297,41 +4297,41 @@ <listitem> <para> - <filename>/contrib/tsearch2</> localization improvements (Tatsuo, Teodor) + <filename>/contrib/tsearch2</filename> localization improvements (Tatsuo, Teodor) </para> </listitem> <listitem> <para> Fix incorrect permission check in - <literal>information_schema.key_column_usage</> view (Tom) + <literal>information_schema.key_column_usage</literal> view (Tom) </para> <para> - The symptom is <quote>relation with OID nnnnn does not exist</> errors. - To get this fix without using <command>initdb</>, use <command>CREATE OR - REPLACE VIEW</> to install the corrected definition found in - <filename>share/information_schema.sql</>. Note you will need to do + The symptom is <quote>relation with OID nnnnn does not exist</quote> errors. + To get this fix without using <command>initdb</command>, use <command>CREATE OR + REPLACE VIEW</command> to install the corrected definition found in + <filename>share/information_schema.sql</filename>. Note you will need to do this in each database. </para> </listitem> <listitem> <para> - Improve <command>VACUUM</> performance for databases with many tables (Tom) + Improve <command>VACUUM</command> performance for databases with many tables (Tom) </para> </listitem> <listitem> <para> - Fix for rare Assert() crash triggered by <literal>UNION</> (Tom) + Fix for rare Assert() crash triggered by <literal>UNION</literal> (Tom) </para> </listitem> <listitem> <para> Fix potentially incorrect results from index searches using - <literal>ROW</> inequality conditions (Tom) + <literal>ROW</literal> inequality conditions (Tom) </para> </listitem> @@ -4344,7 +4344,7 @@ <listitem> <para> - Fix bogus <quote>permission denied</> failures occurring on Windows + Fix bogus <quote>permission denied</quote> failures occurring on Windows due to attempts to fsync already-deleted files (Magnus, Tom) </para> </listitem> @@ -4414,21 +4414,21 @@ <listitem> <para> - Fix crash with <literal>SELECT</> ... <literal>LIMIT ALL</> (also - <literal>LIMIT NULL</>) (Tom) + Fix crash with <literal>SELECT</literal> ... <literal>LIMIT ALL</literal> (also + <literal>LIMIT NULL</literal>) (Tom) </para> </listitem> <listitem> <para> - <filename>Several /contrib/tsearch2</> fixes (Teodor) + <filename>Several /contrib/tsearch2</filename> fixes (Teodor) </para> </listitem> <listitem> <para> On Windows, make log messages coming from the operating system use - <acronym>ASCII</> encoding (Hiroshi Saito) + <acronym>ASCII</acronym> encoding (Hiroshi Saito) </para> <para> @@ -4439,8 +4439,8 @@ <listitem> <para> - Fix Windows linking of <application>pg_dump</> using - <filename>win32.mak</> + Fix Windows linking of <application>pg_dump</application> using + <filename>win32.mak</filename> (Hiroshi Saito) </para> </listitem> @@ -4469,13 +4469,13 @@ <listitem> <para> - Improve build speed of <acronym>PDF</> documentation (Peter) + Improve build speed of <acronym>PDF</acronym> documentation (Peter) </para> </listitem> <listitem> <para> - Re-add <acronym>JST</> (Japan) timezone abbreviation (Tom) + Re-add <acronym>JST</acronym> (Japan) timezone abbreviation (Tom) </para> </listitem> @@ -4487,8 +4487,8 @@ <listitem> <para> - Have <application>psql</> print multi-byte combining characters as - before, rather than output as <literal>\u</> (Tom) + Have <application>psql</application> print multi-byte combining characters as + before, rather than output as <literal>\u</literal> (Tom) </para> </listitem> @@ -4498,19 +4498,19 @@ </para> <para> - This improves <application>psql</> <literal>\d</> performance also. + This improves <application>psql</application> <literal>\d</literal> performance also. </para> </listitem> <listitem> <para> - Make <application>pg_dumpall</> assume that databases have public - <literal>CONNECT</> privilege, when dumping from a pre-8.2 server (Tom) + Make <application>pg_dumpall</application> assume that databases have public + <literal>CONNECT</literal> privilege, when dumping from a pre-8.2 server (Tom) </para> <para> This preserves the previous behavior that anyone can connect to a - database if allowed by <filename>pg_hba.conf</>. + database if allowed by <filename>pg_hba.conf</filename>. </para> </listitem> @@ -4541,14 +4541,14 @@ Query language enhancements including <command>INSERT/UPDATE/DELETE RETURNING</command>, multirow <literal>VALUES</literal> lists, and optional target-table alias in - <command>UPDATE</>/<command>DELETE</command> + <command>UPDATE</command>/<command>DELETE</command> </para> </listitem> <listitem> <para> Index creation without blocking concurrent - <command>INSERT</>/<command>UPDATE</>/<command>DELETE</> + <command>INSERT</command>/<command>UPDATE</command>/<command>DELETE</command> operations </para> </listitem> @@ -4659,13 +4659,13 @@ <listitem> <para> Set <link - linkend="guc-escape-string-warning"><varname>escape_string_warning</></link> - to <literal>on</> by default (Bruce) + linkend="guc-escape-string-warning"><varname>escape_string_warning</varname></link> + to <literal>on</literal> by default (Bruce) </para> <para> This issues a warning if backslash escapes are used in - <link linkend="sql-syntax-strings">non-escape (non-<literal>E''</>) + <link linkend="sql-syntax-strings">non-escape (non-<literal>E''</literal>) strings</link>. </para> </listitem> @@ -4673,8 +4673,8 @@ <listitem> <para> Change the <link linkend="sql-syntax-row-constructors">row - constructor syntax</link> (<literal>ROW(...)</>) so that - list elements <literal>foo.*</> will be expanded to a list + constructor syntax</link> (<literal>ROW(...)</literal>) so that + list elements <literal>foo.*</literal> will be expanded to a list of their member fields, rather than creating a nested row type field as formerly (Tom) </para> @@ -4682,15 +4682,15 @@ <para> The new behavior is substantially more useful since it allows, for example, triggers to check for data changes - with <literal>IF row(new.*) IS DISTINCT FROM row(old.*)</>. - The old behavior is still available by omitting <literal>.*</>. + with <literal>IF row(new.*) IS DISTINCT FROM row(old.*)</literal>. + The old behavior is still available by omitting <literal>.*</literal>. </para> </listitem> <listitem> <para> Make <link linkend="row-wise-comparison">row comparisons</link> - follow <acronym>SQL</> standard semantics and allow them + follow <acronym>SQL</acronym> standard semantics and allow them to be used in index scans (Tom) </para> @@ -4704,13 +4704,13 @@ <listitem> <para> - Make <link linkend="functions-comparison">row <literal>IS <optional>NOT</> NULL</literal></link> - tests follow <acronym>SQL</> standard semantics (Tom) + Make <link linkend="functions-comparison">row <literal>IS <optional>NOT</optional> NULL</literal></link> + tests follow <acronym>SQL</acronym> standard semantics (Tom) </para> <para> The former behavior conformed to the standard for simple cases - with <literal>IS NULL</>, but <literal>IS NOT NULL</> would return + with <literal>IS NULL</literal>, but <literal>IS NOT NULL</literal> would return true if any row field was non-null, whereas the standard says it should return true only when all fields are non-null. </para> @@ -4719,11 +4719,11 @@ <listitem> <para> Make <link linkend="SQL-SET-CONSTRAINTS"><command>SET - CONSTRAINT</></link> affect only one constraint (Kris Jurka) + CONSTRAINT</command></link> affect only one constraint (Kris Jurka) </para> <para> - In previous releases, <command>SET CONSTRAINT</> modified + In previous releases, <command>SET CONSTRAINT</command> modified all constraints with a matching name. In this release, the schema search path is used to modify only the first matching constraint. A schema specification is also @@ -4733,14 +4733,14 @@ <listitem> <para> - Remove <literal>RULE</> permission for tables, for security reasons + Remove <literal>RULE</literal> permission for tables, for security reasons (Tom) </para> <para> As of this release, only a table's owner can create or modify rules for the table. For backwards compatibility, - <command>GRANT</>/<command>REVOKE RULE</> is still accepted, + <command>GRANT</command>/<command>REVOKE RULE</command> is still accepted, but it does nothing. </para> </listitem> @@ -4769,14 +4769,14 @@ <listitem> <para> - Make command-line options of <application>postmaster</> - and <link linkend="app-postgres"><application>postgres</></link> + Make command-line options of <application>postmaster</application> + and <link linkend="app-postgres"><application>postgres</application></link> identical (Peter) </para> <para> This allows the postmaster to pass arguments to each backend - without using <literal>-o</>. Note that some options are now + without using <literal>-o</literal>. Note that some options are now only available as long-form options, because there were conflicting single-letter options. </para> @@ -4784,13 +4784,13 @@ <listitem> <para> - Deprecate use of <application>postmaster</> symbolic link (Peter) + Deprecate use of <application>postmaster</application> symbolic link (Peter) </para> <para> - <application>postmaster</> and <application>postgres</> + <application>postmaster</application> and <application>postgres</application> commands now act identically, with the behavior determined - by command-line options. The <application>postmaster</> symbolic link is + by command-line options. The <application>postmaster</application> symbolic link is kept for compatibility, but is not really needed. </para> </listitem> @@ -4798,12 +4798,12 @@ <listitem> <para> Change <link - linkend="guc-log-duration"><varname>log_duration</></link> + linkend="guc-log-duration"><varname>log_duration</varname></link> to output even if the query is not output (Tom) </para> <para> - In prior releases, <varname>log_duration</> only printed if + In prior releases, <varname>log_duration</varname> only printed if the query appeared earlier in the log. </para> </listitem> @@ -4811,15 +4811,15 @@ <listitem> <para> Make <link - linkend="functions-formatting"><function>to_char(time)</></link> + linkend="functions-formatting"><function>to_char(time)</function></link> and <link - linkend="functions-formatting"><function>to_char(interval)</></link> - treat <literal>HH</> and <literal>HH12</> as 12-hour + linkend="functions-formatting"><function>to_char(interval)</function></link> + treat <literal>HH</literal> and <literal>HH12</literal> as 12-hour intervals </para> <para> - Most applications should use <literal>HH24</> unless they + Most applications should use <literal>HH24</literal> unless they want a 12-hour display. </para> </listitem> @@ -4827,19 +4827,19 @@ <listitem> <para> Zero unmasked bits in conversion from <link - linkend="datatype-inet"><type>INET</></link> to <link - linkend="datatype-inet"><type>CIDR</></link> (Tom) + linkend="datatype-inet"><type>INET</type></link> to <link + linkend="datatype-inet"><type>CIDR</type></link> (Tom) </para> <para> This ensures that the converted value is actually valid for - <type>CIDR</>. + <type>CIDR</type>. </para> </listitem> <listitem> <para> - Remove <varname>australian_timezones</> configuration variable + Remove <varname>australian_timezones</varname> configuration variable (Joachim Wieland) </para> @@ -4857,35 +4857,35 @@ <para> This might eliminate the need to set unrealistically small values of <link - linkend="guc-random-page-cost"><varname>random_page_cost</></link>. - If you have been using a very small <varname>random_page_cost</>, + linkend="guc-random-page-cost"><varname>random_page_cost</varname></link>. + If you have been using a very small <varname>random_page_cost</varname>, please recheck your test cases. </para> </listitem> <listitem> <para> - Change behavior of <command>pg_dump</> <literal>-n</> and - <literal>-t</> options. (Greg Sabino Mullane) + Change behavior of <command>pg_dump</command> <literal>-n</literal> and + <literal>-t</literal> options. (Greg Sabino Mullane) </para> <para> - See the <command>pg_dump</> manual page for details. + See the <command>pg_dump</command> manual page for details. </para> </listitem> <listitem> <para> - Change <link linkend="libpq"><application>libpq</></link> - <function>PQdsplen()</> to return a useful value (Martijn + Change <link linkend="libpq"><application>libpq</application></link> + <function>PQdsplen()</function> to return a useful value (Martijn van Oosterhout) </para> </listitem> <listitem> <para> - Declare <link linkend="libpq"><application>libpq</></link> - <function>PQgetssl()</> as returning <literal>void *</>, - rather than <literal>SSL *</> (Martijn van Oosterhout) + Declare <link linkend="libpq"><application>libpq</application></link> + <function>PQgetssl()</function> as returning <literal>void *</literal>, + rather than <literal>SSL *</literal> (Martijn van Oosterhout) </para> <para> @@ -4897,7 +4897,7 @@ <listitem> <para> C-language loadable modules must now include a - <link linkend="xfunc-c-dynload"><literal>PG_MODULE_MAGIC</></link> + <link linkend="xfunc-c-dynload"><literal>PG_MODULE_MAGIC</literal></link> macro call for version compatibility checking (Martijn van Oosterhout) </para> @@ -4923,12 +4923,12 @@ <listitem> <para> - In <filename>contrib/xml2/</>, rename <function>xml_valid()</> to - <function>xml_is_well_formed()</> (Tom) + In <filename>contrib/xml2/</filename>, rename <function>xml_valid()</function> to + <function>xml_is_well_formed()</function> (Tom) </para> <para> - <function>xml_valid()</> will remain for backward compatibility, + <function>xml_valid()</function> will remain for backward compatibility, but its behavior will change to do schema checking in a future release. </para> @@ -4936,7 +4936,7 @@ <listitem> <para> - Remove <filename>contrib/ora2pg/</>, now at <ulink + Remove <filename>contrib/ora2pg/</filename>, now at <ulink url="http://www.samse.fr/GPL/ora2pg"></ulink> </para> </listitem> @@ -4944,21 +4944,21 @@ <listitem> <para> Remove contrib modules that have been migrated to PgFoundry: - <filename>adddepend</>, <filename>dbase</>, <filename>dbmirror</>, - <filename>fulltextindex</>, <filename>mac</>, <filename>userlock</> + <filename>adddepend</filename>, <filename>dbase</filename>, <filename>dbmirror</filename>, + <filename>fulltextindex</filename>, <filename>mac</filename>, <filename>userlock</filename> </para> </listitem> <listitem> <para> Remove abandoned contrib modules: - <filename>mSQL-interface</>, <filename>tips</> + <filename>mSQL-interface</filename>, <filename>tips</filename> </para> </listitem> <listitem> <para> - Remove <acronym>QNX</> and <acronym>BEOS</> ports (Bruce) + Remove <acronym>QNX</acronym> and <acronym>BEOS</acronym> ports (Bruce) </para> <para> @@ -5002,7 +5002,7 @@ <listitem> <para> Improve efficiency of <link - linkend="functions-comparisons"><literal>IN</> + linkend="functions-comparisons"><literal>IN</literal> (list-of-expressions)</link> clauses (Tom) </para> </listitem> @@ -5022,7 +5022,7 @@ <listitem> <para> - Add <literal>FILLFACTOR</> to <link + Add <literal>FILLFACTOR</literal> to <link linkend="SQL-CREATETABLE">table</link> and <link linkend="SQL-CREATEINDEX">index</link> creation (ITAGAKI Takahiro) @@ -5038,8 +5038,8 @@ <listitem> <para> Increase default values for <link - linkend="guc-shared-buffers"><varname>shared_buffers</></link> - and <varname>max_fsm_pages</> + linkend="guc-shared-buffers"><varname>shared_buffers</varname></link> + and <varname>max_fsm_pages</varname> (Andrew) </para> </listitem> @@ -5074,8 +5074,8 @@ <listitem> <para> Improve the optimizer's selectivity estimates for <link - linkend="functions-like"><literal>LIKE</></link>, <link - linkend="functions-like"><literal>ILIKE</></link>, and + linkend="functions-like"><literal>LIKE</literal></link>, <link + linkend="functions-like"><literal>ILIKE</literal></link>, and <link linkend="functions-posix-regexp">regular expression</link> operations (Tom) </para> @@ -5085,7 +5085,7 @@ <para> Improve planning of joins to <link linkend="ddl-inherit">inherited tables</link> and <link linkend="queries-union"><literal>UNION - ALL</></link> views (Tom) + ALL</literal></link> views (Tom) </para> </listitem> @@ -5093,18 +5093,18 @@ <para> Allow <link linkend="guc-constraint-exclusion">constraint exclusion</link> to be applied to <link - linkend="ddl-inherit">inherited</link> <command>UPDATE</> and - <command>DELETE</> queries (Tom) + linkend="ddl-inherit">inherited</link> <command>UPDATE</command> and + <command>DELETE</command> queries (Tom) </para> <para> - <command>SELECT</> already honored constraint exclusion. + <command>SELECT</command> already honored constraint exclusion. </para> </listitem> <listitem> <para> - Improve planning of constant <literal>WHERE</> clauses, such as + Improve planning of constant <literal>WHERE</literal> clauses, such as a condition that depends only on variables inherited from an outer query level (Tom) </para> @@ -5113,7 +5113,7 @@ <listitem> <para> Protocol-level unnamed prepared statements are re-planned - for each set of <literal>BIND</> values (Tom) + for each set of <literal>BIND</literal> values (Tom) </para> <para> @@ -5132,13 +5132,13 @@ <listitem> <para> Avoid extra scan of tables without indexes during <link - linkend="SQL-VACUUM"><command>VACUUM</></link> (Greg Stark) + linkend="SQL-VACUUM"><command>VACUUM</command></link> (Greg Stark) </para> </listitem> <listitem> <para> - Improve multicolumn <link linkend="GiST"><acronym>GiST</></link> + Improve multicolumn <link linkend="GiST"><acronym>GiST</acronym></link> indexing (Oleg, Teodor) </para> </listitem> @@ -5167,7 +5167,7 @@ This is valuable for keeping warm standby slave servers in sync with the master. Transaction log file switching now also happens automatically during <link - linkend="functions-admin"><function>pg_stop_backup()</></link>. + linkend="functions-admin"><function>pg_stop_backup()</function></link>. This ensures that all transaction log files needed for recovery can be archived immediately. </para> @@ -5175,26 +5175,26 @@ <listitem> <para> - Add <acronym>WAL</> informational functions (Simon) + Add <acronym>WAL</acronym> informational functions (Simon) </para> <para> Add functions for interrogating the current transaction log insertion - point and determining <acronym>WAL</> filenames from the - hex <acronym>WAL</> locations displayed by <link - linkend="functions-admin"><function>pg_stop_backup()</></link> + point and determining <acronym>WAL</acronym> filenames from the + hex <acronym>WAL</acronym> locations displayed by <link + linkend="functions-admin"><function>pg_stop_backup()</function></link> and related functions. </para> </listitem> <listitem> <para> - Improve recovery from a crash during <acronym>WAL</> replay (Simon) + Improve recovery from a crash during <acronym>WAL</acronym> replay (Simon) </para> <para> - The server now does periodic checkpoints during <acronym>WAL</> - recovery, so if there is a crash, future <acronym>WAL</> + The server now does periodic checkpoints during <acronym>WAL</acronym> + recovery, so if there is a crash, future <acronym>WAL</acronym> recovery is shortened. This also eliminates the need for warm standby servers to replay the entire log since the base backup if they crash. @@ -5203,7 +5203,7 @@ <listitem> <para> - Improve reliability of long-term <acronym>WAL</> replay + Improve reliability of long-term <acronym>WAL</acronym> replay (Heikki, Simon, Tom) </para> @@ -5218,7 +5218,7 @@ <listitem> <para> Add <link - linkend="guc-archive-timeout"><varname>archive_timeout</></link> + linkend="guc-archive-timeout"><varname>archive_timeout</varname></link> to force transaction log file switches at a given interval (Simon) </para> @@ -5229,46 +5229,46 @@ <listitem> <para> - Add native <link linkend="auth-ldap"><acronym>LDAP</></link> + Add native <link linkend="auth-ldap"><acronym>LDAP</acronym></link> authentication (Magnus Hagander) </para> <para> This is particularly useful for platforms that do not - support <acronym>PAM</>, such as Windows. + support <acronym>PAM</acronym>, such as Windows. </para> </listitem> <listitem> <para> Add <link linkend="sql-grant-description-objects"><literal>GRANT - CONNECT ON DATABASE</></link> (Gevik Babakhani) + CONNECT ON DATABASE</literal></link> (Gevik Babakhani) </para> <para> This gives SQL-level control over database access. It works as an additional filter on top of the existing - <link linkend="auth-pg-hba-conf"><filename>pg_hba.conf</></link> + <link linkend="auth-pg-hba-conf"><filename>pg_hba.conf</filename></link> controls. </para> </listitem> <listitem> <para> - Add support for <link linkend="ssl-tcp"><acronym>SSL</> - Certificate Revocation List</link> (<acronym>CRL</>) files + Add support for <link linkend="ssl-tcp"><acronym>SSL</acronym> + Certificate Revocation List</link> (<acronym>CRL</acronym>) files (Libor Hohoš) </para> <para> - The server and <application>libpq</> both recognize <acronym>CRL</> + The server and <application>libpq</application> both recognize <acronym>CRL</acronym> files now. </para> </listitem> <listitem> <para> - <link linkend="GiST"><acronym>GiST</></link> indexes are + <link linkend="GiST"><acronym>GiST</acronym></link> indexes are now clusterable (Teodor) </para> </listitem> @@ -5280,7 +5280,7 @@ <para> <link - linkend="monitoring-stats-views-table"><literal>pg_stat_activity</></link> + linkend="monitoring-stats-views-table"><literal>pg_stat_activity</literal></link> now shows autovacuum activity. </para> </listitem> @@ -5304,7 +5304,7 @@ <para> These values now appear in the <link - linkend="monitoring-stats-views-table"><literal>pg_stat_*_tables</></link> + linkend="monitoring-stats-views-table"><literal>pg_stat_*_tables</literal></link> system views. </para> </listitem> @@ -5312,44 +5312,44 @@ <listitem> <para> Improve performance of statistics monitoring, especially - <varname>stats_command_string</> + <varname>stats_command_string</varname> (Tom, Bruce) </para> <para> - This release enables <varname>stats_command_string</> by + This release enables <varname>stats_command_string</varname> by default, now that its overhead is minimal. This means <link - linkend="monitoring-stats-views-table"><literal>pg_stat_activity</></link> + linkend="monitoring-stats-views-table"><literal>pg_stat_activity</literal></link> will now show all active queries by default. </para> </listitem> <listitem> <para> - Add a <literal>waiting</> column to <link - linkend="monitoring-stats-views-table"><literal>pg_stat_activity</></link> + Add a <literal>waiting</literal> column to <link + linkend="monitoring-stats-views-table"><literal>pg_stat_activity</literal></link> (Tom) </para> <para> - This allows <structname>pg_stat_activity</> to show all the - information included in the <application>ps</> display. + This allows <structname>pg_stat_activity</structname> to show all the + information included in the <application>ps</application> display. </para> </listitem> <listitem> <para> Add configuration parameter <link - linkend="guc-update-process-title"><varname>update_process_title</></link> - to control whether the <application>ps</> display is updated + linkend="guc-update-process-title"><varname>update_process_title</varname></link> + to control whether the <application>ps</application> display is updated for every command (Bruce) </para> <para> - On platforms where it is expensive to update the <application>ps</> + On platforms where it is expensive to update the <application>ps</application> display, it might be worthwhile to turn this off and rely solely on - <structname>pg_stat_activity</> for status information. + <structname>pg_stat_activity</structname> for status information. </para> </listitem> @@ -5361,15 +5361,15 @@ <para> For example, you can now set <link - linkend="guc-shared-buffers"><varname>shared_buffers</></link> - to <literal>32MB</> rather than mentally converting sizes. + linkend="guc-shared-buffers"><varname>shared_buffers</varname></link> + to <literal>32MB</literal> rather than mentally converting sizes. </para> </listitem> <listitem> <para> Add support for <link linkend="config-setting">include - directives</link> in <filename>postgresql.conf</> (Joachim + directives</link> in <filename>postgresql.conf</filename> (Joachim Wieland) </para> </listitem> @@ -5384,21 +5384,21 @@ Such logging now shows statement names, bind parameter values, and the text of the query being executed. Also, the query text is properly included in logged error messages - when enabled by <varname>log_min_error_statement</>. + when enabled by <varname>log_min_error_statement</varname>. </para> </listitem> <listitem> <para> Prevent <link - linkend="guc-max-stack-depth"><varname>max_stack_depth</></link> + linkend="guc-max-stack-depth"><varname>max_stack_depth</varname></link> from being set to unsafe values </para> <para> On platforms where we can determine the actual kernel stack depth limit (which is most), make sure that the initial default value of - <varname>max_stack_depth</> is safe, and reject attempts to set it + <varname>max_stack_depth</varname> is safe, and reject attempts to set it to unsafely large values. </para> </listitem> @@ -5418,14 +5418,14 @@ <listitem> <para> - Fix <quote>failed to re-find parent key</> errors in - <command>VACUUM</> (Tom) + Fix <quote>failed to re-find parent key</quote> errors in + <command>VACUUM</command> (Tom) </para> </listitem> <listitem> <para> - Clean out <filename>pg_internal.init</> cache files during server + Clean out <filename>pg_internal.init</filename> cache files during server restart (Simon) </para> @@ -5438,7 +5438,7 @@ <listitem> <para> Fix race condition for truncation of a large relation across a - gigabyte boundary by <command>VACUUM</> (Tom) + gigabyte boundary by <command>VACUUM</command> (Tom) </para> </listitem> @@ -5475,15 +5475,15 @@ <listitem> <para> - Add <link linkend="SQL-INSERT"><command>INSERT</></link>/<link - linkend="SQL-UPDATE"><command>UPDATE</></link>/<link - linkend="SQL-DELETE"><command>DELETE</></link> - <literal>RETURNING</> (Jonah Harris, Tom) + Add <link linkend="SQL-INSERT"><command>INSERT</command></link>/<link + linkend="SQL-UPDATE"><command>UPDATE</command></link>/<link + linkend="SQL-DELETE"><command>DELETE</command></link> + <literal>RETURNING</literal> (Jonah Harris, Tom) </para> <para> This allows these commands to return values, such as the - computed serial key for a new row. In the <command>UPDATE</> + computed serial key for a new row. In the <command>UPDATE</command> case, values from the updated version of the row are returned. </para> </listitem> @@ -5491,23 +5491,23 @@ <listitem> <para> Add support for multiple-row <link - linkend="queries-values"><literal>VALUES</></link> clauses, + linkend="queries-values"><literal>VALUES</literal></link> clauses, per SQL standard (Joe, Tom) </para> <para> - This allows <command>INSERT</> to insert multiple rows of + This allows <command>INSERT</command> to insert multiple rows of constants, or queries to generate result sets using constants. For example, <literal>INSERT ... VALUES (...), (...), - ....</>, and <literal>SELECT * FROM (VALUES (...), (...), - ....) AS alias(f1, ...)</>. + ....</literal>, and <literal>SELECT * FROM (VALUES (...), (...), + ....) AS alias(f1, ...)</literal>. </para> </listitem> <listitem> <para> - Allow <link linkend="SQL-UPDATE"><command>UPDATE</></link> - and <link linkend="SQL-DELETE"><command>DELETE</></link> + Allow <link linkend="SQL-UPDATE"><command>UPDATE</command></link> + and <link linkend="SQL-DELETE"><command>DELETE</command></link> to use an alias for the target table (Atsushi Ogawa) </para> @@ -5519,7 +5519,7 @@ <listitem> <para> - Allow <link linkend="SQL-UPDATE"><command>UPDATE</></link> + Allow <link linkend="SQL-UPDATE"><command>UPDATE</command></link> to set multiple columns with a list of values (Susanne Ebrecht) </para> @@ -5527,7 +5527,7 @@ <para> This is basically a short-hand for assigning the columns and values in pairs. The syntax is <literal>UPDATE tab - SET (<replaceable>column</>, ...) = (<replaceable>val</>, ...)</>. + SET (<replaceable>column</replaceable>, ...) = (<replaceable>val</replaceable>, ...)</literal>. </para> </listitem> @@ -5546,12 +5546,12 @@ <listitem> <para> - Add <link linkend="SQL-TRUNCATE"><literal>CASCADE</></link> - option to <command>TRUNCATE</> (Joachim Wieland) + Add <link linkend="SQL-TRUNCATE"><literal>CASCADE</literal></link> + option to <command>TRUNCATE</command> (Joachim Wieland) </para> <para> - This causes <command>TRUNCATE</> to automatically include all tables + This causes <command>TRUNCATE</command> to automatically include all tables that reference the specified table(s) via foreign keys. While convenient, this is a dangerous tool — use with caution! </para> @@ -5559,8 +5559,8 @@ <listitem> <para> - Support <literal>FOR UPDATE</> and <literal>FOR SHARE</> - in the same <link linkend="SQL-INSERT"><literal>SELECT</></link> + Support <literal>FOR UPDATE</literal> and <literal>FOR SHARE</literal> + in the same <link linkend="SQL-INSERT"><literal>SELECT</literal></link> command (Tom) </para> </listitem> @@ -5568,21 +5568,21 @@ <listitem> <para> Add <link linkend="functions-comparisons"><literal>IS NOT - DISTINCT FROM</></link> (Pavel Stehule) + DISTINCT FROM</literal></link> (Pavel Stehule) </para> <para> - This operator is similar to equality (<literal>=</>), but + This operator is similar to equality (<literal>=</literal>), but evaluates to true when both left and right operands are - <literal>NULL</>, and to false when just one is, rather than - yielding <literal>NULL</> in these cases. + <literal>NULL</literal>, and to false when just one is, rather than + yielding <literal>NULL</literal> in these cases. </para> </listitem> <listitem> <para> Improve the length output used by <link - linkend="queries-union"><literal>UNION</></link>/<literal>INTERSECT</>/<literal>EXCEPT</> + linkend="queries-union"><literal>UNION</literal></link>/<literal>INTERSECT</literal>/<literal>EXCEPT</literal> (Tom) </para> @@ -5594,13 +5594,13 @@ <listitem> <para> - Allow <link linkend="functions-like"><literal>ILIKE</></link> + Allow <link linkend="functions-like"><literal>ILIKE</literal></link> to work for multi-byte encodings (Tom) </para> <para> - Internally, <literal>ILIKE</> now calls <function>lower()</> - and then uses <literal>LIKE</>. Locale-specific regular + Internally, <literal>ILIKE</literal> now calls <function>lower()</function> + and then uses <literal>LIKE</literal>. Locale-specific regular expression patterns still do not work in these encodings. </para> </listitem> @@ -5608,39 +5608,39 @@ <listitem> <para> Enable <link - linkend="guc-standard-conforming-strings"><varname>standard_conforming_strings</></link> - to be turned <literal>on</> (Kevin Grittner) + linkend="guc-standard-conforming-strings"><varname>standard_conforming_strings</varname></link> + to be turned <literal>on</literal> (Kevin Grittner) </para> <para> This allows backslash escaping in strings to be disabled, - making <productname>PostgreSQL</> more - standards-compliant. The default is <literal>off</> for backwards - compatibility, but future releases will default this to <literal>on</>. + making <productname>PostgreSQL</productname> more + standards-compliant. The default is <literal>off</literal> for backwards + compatibility, but future releases will default this to <literal>on</literal>. </para> </listitem> <listitem> <para> - Do not flatten subqueries that contain <literal>volatile</> + Do not flatten subqueries that contain <literal>volatile</literal> functions in their target lists (Jaime Casanova) </para> <para> This prevents surprising behavior due to multiple evaluation - of a <literal>volatile</> function (such as <function>random()</> - or <function>nextval()</>). It might cause performance + of a <literal>volatile</literal> function (such as <function>random()</function> + or <function>nextval()</function>). It might cause performance degradation in the presence of functions that are unnecessarily - marked as <literal>volatile</>. + marked as <literal>volatile</literal>. </para> </listitem> <listitem> <para> Add system views <link - linkend="view-pg-prepared-statements"><literal>pg_prepared_statements</></link> + linkend="view-pg-prepared-statements"><literal>pg_prepared_statements</literal></link> and <link - linkend="view-pg-cursors"><literal>pg_cursors</></link> + linkend="view-pg-cursors"><literal>pg_cursors</literal></link> to show prepared statements and open cursors (Joachim Wieland, Neil) </para> @@ -5652,32 +5652,32 @@ <listitem> <para> Support portal parameters in <link - linkend="SQL-EXPLAIN"><command>EXPLAIN</></link> and <link - linkend="SQL-EXECUTE"><command>EXECUTE</></link> (Tom) + linkend="SQL-EXPLAIN"><command>EXPLAIN</command></link> and <link + linkend="SQL-EXECUTE"><command>EXECUTE</command></link> (Tom) </para> <para> - This allows, for example, <acronym>JDBC</> <literal>?</> parameters to + This allows, for example, <acronym>JDBC</acronym> <literal>?</literal> parameters to work in these commands. </para> </listitem> <listitem> <para> - If <acronym>SQL</>-level <link - linkend="SQL-PREPARE"><command>PREPARE</></link> parameters + If <acronym>SQL</acronym>-level <link + linkend="SQL-PREPARE"><command>PREPARE</command></link> parameters are unspecified, infer their types from the content of the query (Neil) </para> <para> - Protocol-level <command>PREPARE</> already did this. + Protocol-level <command>PREPARE</command> already did this. </para> </listitem> <listitem> <para> - Allow <literal>LIMIT</> and <literal>OFFSET</> to exceed + Allow <literal>LIMIT</literal> and <literal>OFFSET</literal> to exceed two billion (Dhanaraj M) </para> </listitem> @@ -5692,8 +5692,8 @@ <listitem> <para> - Add <literal>TABLESPACE</> clause to <link - linkend="SQL-CREATETABLEAS"><command>CREATE TABLE AS</></link> + Add <literal>TABLESPACE</literal> clause to <link + linkend="SQL-CREATETABLEAS"><command>CREATE TABLE AS</command></link> (Neil) </para> @@ -5704,8 +5704,8 @@ <listitem> <para> - Add <literal>ON COMMIT</> clause to <link - linkend="SQL-CREATETABLEAS"><command>CREATE TABLE AS</></link> + Add <literal>ON COMMIT</literal> clause to <link + linkend="SQL-CREATETABLEAS"><command>CREATE TABLE AS</command></link> (Neil) </para> @@ -5718,13 +5718,13 @@ <listitem> <para> - Add <literal>INCLUDING CONSTRAINTS</> to <link - linkend="SQL-CREATETABLE"><command>CREATE TABLE LIKE</></link> + Add <literal>INCLUDING CONSTRAINTS</literal> to <link + linkend="SQL-CREATETABLE"><command>CREATE TABLE LIKE</command></link> (Greg Stark) </para> <para> - This allows easy copying of <literal>CHECK</> constraints to a new + This allows easy copying of <literal>CHECK</literal> constraints to a new table. </para> </listitem> @@ -5740,8 +5740,8 @@ any of the details of the type. Making a shell type is useful because it allows cleaner declaration of the type's input/output functions, which must exist before the type can be defined <quote>for - real</>. The syntax is <command>CREATE TYPE <replaceable - class="parameter">typename</replaceable></>. + real</quote>. The syntax is <command>CREATE TYPE <replaceable + class="parameter">typename</replaceable></command>. </para> </listitem> @@ -5760,8 +5760,8 @@ <para> The new syntax is <command>CREATE AGGREGATE - <replaceable>aggname</> (<replaceable>input_type</>) - (<replaceable>parameter_list</>)</command>. This more + <replaceable>aggname</replaceable> (<replaceable>input_type</replaceable>) + (<replaceable>parameter_list</replaceable>)</command>. This more naturally supports the new multi-parameter aggregate functionality. The previous syntax is still supported. </para> @@ -5770,26 +5770,26 @@ <listitem> <para> Add <link - linkend="SQL-ALTERROLE"><command>ALTER ROLE PASSWORD NULL</></link> + linkend="SQL-ALTERROLE"><command>ALTER ROLE PASSWORD NULL</command></link> to remove a previously set role password (Peter) </para> </listitem> <listitem> <para> - Add <command>DROP</> object <literal>IF EXISTS</> for many + Add <command>DROP</command> object <literal>IF EXISTS</literal> for many object types (Andrew) </para> <para> - This allows <command>DROP</> operations on non-existent + This allows <command>DROP</command> operations on non-existent objects without generating an error. </para> </listitem> <listitem> <para> - Add <link linkend="SQL-DROP-OWNED"><literal>DROP OWNED</></link> + Add <link linkend="SQL-DROP-OWNED"><literal>DROP OWNED</literal></link> to drop all objects owned by a role (Alvaro) </para> </listitem> @@ -5797,50 +5797,50 @@ <listitem> <para> Add <link linkend="SQL-REASSIGN-OWNED"><literal>REASSIGN - OWNED</></link> to reassign ownership of all objects owned + OWNED</literal></link> to reassign ownership of all objects owned by a role (Alvaro) </para> <para> - This, and <literal>DROP OWNED</> above, facilitate dropping + This, and <literal>DROP OWNED</literal> above, facilitate dropping roles. </para> </listitem> <listitem> <para> - Add <link linkend="SQL-GRANT"><command>GRANT ON SEQUENCE</></link> + Add <link linkend="SQL-GRANT"><command>GRANT ON SEQUENCE</command></link> syntax (Bruce) </para> <para> This was added for setting sequence-specific permissions. - <literal>GRANT ON TABLE</> for sequences is still supported + <literal>GRANT ON TABLE</literal> for sequences is still supported for backward compatibility. </para> </listitem> <listitem> <para> - Add <link linkend="SQL-GRANT"><literal>USAGE</></link> - permission for sequences that allows only <function>currval()</> - and <function>nextval()</>, not <function>setval()</> + Add <link linkend="SQL-GRANT"><literal>USAGE</literal></link> + permission for sequences that allows only <function>currval()</function> + and <function>nextval()</function>, not <function>setval()</function> (Bruce) </para> <para> - <literal>USAGE</> permission allows more fine-grained - control over sequence access. Granting <literal>USAGE</> + <literal>USAGE</literal> permission allows more fine-grained + control over sequence access. Granting <literal>USAGE</literal> allows users to increment a sequence, but prevents them from setting the sequence to - an arbitrary value using <function>setval()</>. + an arbitrary value using <function>setval()</function>. </para> </listitem> <listitem> <para> Add <link linkend="SQL-ALTERTABLE"><literal>ALTER TABLE - [ NO ] INHERIT</></link> (Greg Stark) + [ NO ] INHERIT</literal></link> (Greg Stark) </para> <para> @@ -5882,7 +5882,7 @@ <para> The new syntax is <link linkend="SQL-CREATEINDEX"><command>CREATE - INDEX CONCURRENTLY</></link>. The default behavior is + INDEX CONCURRENTLY</command></link>. The default behavior is still to block table modification while an index is being created. </para> @@ -5902,20 +5902,20 @@ <listitem> <para> - Allow <link linkend="SQL-COPY"><command>COPY</></link> to - dump a <command>SELECT</> query (Zoltan Boszormenyi, Karel + Allow <link linkend="SQL-COPY"><command>COPY</command></link> to + dump a <command>SELECT</command> query (Zoltan Boszormenyi, Karel Zak) </para> <para> - This allows <command>COPY</> to dump arbitrary <acronym>SQL</> - queries. The syntax is <literal>COPY (SELECT ...) TO</>. + This allows <command>COPY</command> to dump arbitrary <acronym>SQL</acronym> + queries. The syntax is <literal>COPY (SELECT ...) TO</literal>. </para> </listitem> <listitem> <para> - Make the <link linkend="SQL-COPY"><command>COPY</></link> + Make the <link linkend="SQL-COPY"><command>COPY</command></link> command return a command tag that includes the number of rows copied (Volkan YAZICI) </para> @@ -5923,29 +5923,29 @@ <listitem> <para> - Allow <link linkend="SQL-VACUUM"><command>VACUUM</></link> + Allow <link linkend="SQL-VACUUM"><command>VACUUM</command></link> to expire rows without being affected by other concurrent - <command>VACUUM</> operations (Hannu Krossing, Alvaro, Tom) + <command>VACUUM</command> operations (Hannu Krossing, Alvaro, Tom) </para> </listitem> <listitem> <para> - Make <link linkend="APP-INITDB"><application>initdb</></link> + Make <link linkend="APP-INITDB"><application>initdb</application></link> detect the operating system locale and set the default - <varname>DateStyle</> accordingly (Peter) + <varname>DateStyle</varname> accordingly (Peter) </para> <para> This makes it more likely that the installed - <filename>postgresql.conf</> <varname>DateStyle</> value will + <filename>postgresql.conf</filename> <varname>DateStyle</varname> value will be as desired. </para> </listitem> <listitem> <para> - Reduce number of progress messages displayed by <application>initdb</> (Tom) + Reduce number of progress messages displayed by <application>initdb</application> (Tom) </para> </listitem> @@ -5960,13 +5960,13 @@ <listitem> <para> Allow full timezone names in <link - linkend="datatype-datetime"><type>timestamp</></link> input values + linkend="datatype-datetime"><type>timestamp</type></link> input values (Joachim Wieland) </para> <para> For example, <literal>'2006-05-24 21:11 - America/New_York'::timestamptz</>. + America/New_York'::timestamptz</literal>. </para> </listitem> @@ -5978,16 +5978,16 @@ <para> A desired set of timezone abbreviations can be chosen via the configuration parameter <link - linkend="guc-timezone-abbreviations"><varname>timezone_abbreviations</></link>. + linkend="guc-timezone-abbreviations"><varname>timezone_abbreviations</varname></link>. </para> </listitem> <listitem> <para> Add <link - linkend="view-pg-timezone-abbrevs"><varname>pg_timezone_abbrevs</></link> + linkend="view-pg-timezone-abbrevs"><varname>pg_timezone_abbrevs</varname></link> and <link - linkend="view-pg-timezone-names"><varname>pg_timezone_names</></link> + linkend="view-pg-timezone-names"><varname>pg_timezone_names</varname></link> views to show supported timezones (Magnus Hagander) </para> </listitem> @@ -5995,27 +5995,27 @@ <listitem> <para> Add <link - linkend="functions-datetime-table"><function>clock_timestamp()</></link>, + linkend="functions-datetime-table"><function>clock_timestamp()</function></link>, <link - linkend="functions-datetime-table"><function>statement_timestamp()</></link>, + linkend="functions-datetime-table"><function>statement_timestamp()</function></link>, and <link - linkend="functions-datetime-table"><function>transaction_timestamp()</></link> + linkend="functions-datetime-table"><function>transaction_timestamp()</function></link> (Bruce) </para> <para> - <function>clock_timestamp()</> is the current wall-clock time, - <function>statement_timestamp()</> is the time the current + <function>clock_timestamp()</function> is the current wall-clock time, + <function>statement_timestamp()</function> is the time the current statement arrived at the server, and - <function>transaction_timestamp()</> is an alias for - <function>now()</>. + <function>transaction_timestamp()</function> is an alias for + <function>now()</function>. </para> </listitem> <listitem> <para> Allow <link - linkend="functions-formatting"><function>to_char()</></link> + linkend="functions-formatting"><function>to_char()</function></link> to print localized month and day names (Euler Taveira de Oliveira) </para> @@ -6024,23 +6024,23 @@ <listitem> <para> Allow <link - linkend="functions-formatting"><function>to_char(time)</></link> + linkend="functions-formatting"><function>to_char(time)</function></link> and <link - linkend="functions-formatting"><function>to_char(interval)</></link> - to output <acronym>AM</>/<acronym>PM</> specifications + linkend="functions-formatting"><function>to_char(interval)</function></link> + to output <acronym>AM</acronym>/<acronym>PM</acronym> specifications (Bruce) </para> <para> Intervals and times are treated as 24-hour periods, e.g. - <literal>25 hours</> is considered <acronym>AM</>. + <literal>25 hours</literal> is considered <acronym>AM</acronym>. </para> </listitem> <listitem> <para> Add new function <link - linkend="functions-datetime-table"><function>justify_interval()</></link> + linkend="functions-datetime-table"><function>justify_interval()</function></link> to adjust interval units (Mark Dilger) </para> </listitem> @@ -6071,7 +6071,7 @@ <listitem> <para> - Allow arrays to contain <literal>NULL</> elements (Tom) + Allow arrays to contain <literal>NULL</literal> elements (Tom) </para> </listitem> @@ -6090,13 +6090,13 @@ <listitem> <para> New built-in <link linkend="functions-array">operators</link> - for array-subset comparisons (<literal>@></>, - <literal><@</>, <literal>&&</>) (Teodor, Tom) + for array-subset comparisons (<literal>@></literal>, + <literal><@</literal>, <literal>&&</literal>) (Teodor, Tom) </para> <para> These operators can be indexed for many data types using - <acronym>GiST</> or <acronym>GIN</> indexes. + <acronym>GiST</acronym> or <acronym>GIN</acronym> indexes. </para> </listitem> @@ -6104,15 +6104,15 @@ <para> Add convenient arithmetic <link linkend="cidr-inet-operators-table">operations</link> on - <type>INET</>/<type>CIDR</> values (Stephen R. van den + <type>INET</type>/<type>CIDR</type> values (Stephen R. van den Berg) </para> <para> - The new operators are <literal>&</> (and), <literal>|</> - (or), <literal>~</> (not), <type>inet</> <literal>+</> <type>int8</>, - <type>inet</> <literal>-</> <type>int8</>, and - <type>inet</> <literal>-</> <type>inet</>. + The new operators are <literal>&</literal> (and), <literal>|</literal> + (or), <literal>~</literal> (not), <type>inet</type> <literal>+</literal> <type>int8</type>, + <type>inet</type> <literal>-</literal> <type>int8</type>, and + <type>inet</type> <literal>-</literal> <type>inet</type>. </para> </listitem> @@ -6124,12 +6124,12 @@ </para> <para> - The new functions are <function>var_pop()</>, - <function>var_samp()</>, <function>stddev_pop()</>, and - <function>stddev_samp()</>. <function>var_samp()</> and - <function>stddev_samp()</> are merely renamings of the - existing aggregates <function>variance()</> and - <function>stddev()</>. The latter names remain available + The new functions are <function>var_pop()</function>, + <function>var_samp()</function>, <function>stddev_pop()</function>, and + <function>stddev_samp()</function>. <function>var_samp()</function> and + <function>stddev_samp()</function> are merely renamings of the + existing aggregates <function>variance()</function> and + <function>stddev()</function>. The latter names remain available for backward compatibility. </para> </listitem> @@ -6142,13 +6142,13 @@ </para> <para> - New functions: <function>regr_intercept()</>, - <function>regr_slope()</>, <function>regr_r2()</>, - <function>corr()</>, <function>covar_samp()</>, - <function>covar_pop()</>, <function>regr_avgx()</>, - <function>regr_avgy()</>, <function>regr_sxy()</>, - <function>regr_sxx()</>, <function>regr_syy()</>, - <function>regr_count()</>. + New functions: <function>regr_intercept()</function>, + <function>regr_slope()</function>, <function>regr_r2()</function>, + <function>corr()</function>, <function>covar_samp()</function>, + <function>covar_pop()</function>, <function>regr_avgx()</function>, + <function>regr_avgy()</function>, <function>regr_sxy()</function>, + <function>regr_sxx()</function>, <function>regr_syy()</function>, + <function>regr_count()</function>. </para> </listitem> @@ -6162,7 +6162,7 @@ <listitem> <para> Properly enforce domain <link - linkend="ddl-constraints"><literal>CHECK</></link> constraints + linkend="ddl-constraints"><literal>CHECK</literal></link> constraints everywhere (Neil, Tom) </para> @@ -6177,24 +6177,24 @@ <listitem> <para> Fix problems with dumping renamed <link - linkend="datatype-serial"><type>SERIAL</></link> columns + linkend="datatype-serial"><type>SERIAL</type></link> columns (Tom) </para> <para> - The fix is to dump a <type>SERIAL</> column by explicitly - specifying its <literal>DEFAULT</> and sequence elements, - and reconstructing the <type>SERIAL</> column on reload + The fix is to dump a <type>SERIAL</type> column by explicitly + specifying its <literal>DEFAULT</literal> and sequence elements, + and reconstructing the <type>SERIAL</type> column on reload using a new <link linkend="SQL-ALTERSEQUENCE"><command>ALTER - SEQUENCE OWNED BY</></link> command. This also allows - dropping a <type>SERIAL</> column specification. + SEQUENCE OWNED BY</command></link> command. This also allows + dropping a <type>SERIAL</type> column specification. </para> </listitem> <listitem> <para> Add a server-side sleep function <link - linkend="functions-datetime-delay"><function>pg_sleep()</></link> + linkend="functions-datetime-delay"><function>pg_sleep()</function></link> (Joachim Wieland) </para> </listitem> @@ -6202,7 +6202,7 @@ <listitem> <para> Add all comparison operators for the <link - linkend="datatype-oid"><type>tid</></link> (tuple id) data + linkend="datatype-oid"><type>tid</type></link> (tuple id) data type (Mark Kirkwood, Greg Stark, Tom) </para> </listitem> @@ -6217,12 +6217,12 @@ <listitem> <para> - Add <literal>TG_table_name</> and <literal>TG_table_schema</> to + Add <literal>TG_table_name</literal> and <literal>TG_table_schema</literal> to trigger parameters (Andrew) </para> <para> - <literal>TG_relname</> is now deprecated. Comparable + <literal>TG_relname</literal> is now deprecated. Comparable changes have been made in the trigger parameters for the other PLs as well. </para> @@ -6230,29 +6230,29 @@ <listitem> <para> - Allow <literal>FOR</> statements to return values to scalars + Allow <literal>FOR</literal> statements to return values to scalars as well as records and row types (Pavel Stehule) </para> </listitem> <listitem> <para> - Add a <literal>BY</> clause to the <literal>FOR</> loop, + Add a <literal>BY</literal> clause to the <literal>FOR</literal> loop, to control the iteration increment (Jaime Casanova) </para> </listitem> <listitem> <para> - Add <literal>STRICT</> to <link + Add <literal>STRICT</literal> to <link linkend="plpgsql-statements-sql-onerow"><command>SELECT - INTO</></link> (Matt Miller) + INTO</command></link> (Matt Miller) </para> <para> - <literal>STRICT</> mode throws an exception if more or less - than one row is returned by the <command>SELECT</>, for - <productname>Oracle PL/SQL</> compatibility. + <literal>STRICT</literal> mode throws an exception if more or less + than one row is returned by the <command>SELECT</command>, for + <productname>Oracle PL/SQL</productname> compatibility. </para> </listitem> @@ -6266,7 +6266,7 @@ <listitem> <para> - Add <literal>table_name</> and <literal>table_schema</> to + Add <literal>table_name</literal> and <literal>table_schema</literal> to trigger parameters (Adam Sjøgren) </para> </listitem> @@ -6279,7 +6279,7 @@ <listitem> <para> - Make <literal>$_TD</> trigger data a global variable (Andrew) + Make <literal>$_TD</literal> trigger data a global variable (Andrew) </para> <para> @@ -6312,13 +6312,13 @@ <listitem> <para> Named parameters are passed as ordinary variables, as well as in the - <literal>args[]</> array (Sven Suursoho) + <literal>args[]</literal> array (Sven Suursoho) </para> </listitem> <listitem> <para> - Add <literal>table_name</> and <literal>table_schema</> to + Add <literal>table_name</literal> and <literal>table_schema</literal> to trigger parameters (Andrew) </para> </listitem> @@ -6331,14 +6331,14 @@ <listitem> <para> - Return result-set as <literal>list</>, <literal>iterator</>, - or <literal>generator </>(Sven Suursoho) + Return result-set as <literal>list</literal>, <literal>iterator</literal>, + or <literal>generator </literal>(Sven Suursoho) </para> </listitem> <listitem> <para> - Allow functions to return <literal>void</> (Neil) + Allow functions to return <literal>void</literal> (Neil) </para> </listitem> @@ -6353,40 +6353,40 @@ </sect3> <sect3> - <title><link linkend="APP-PSQL"><application>psql</></link> Changes</title> + <title><link linkend="APP-PSQL"><application>psql</application></link> Changes</title> <itemizedlist> <listitem> <para> - Add new command <literal>\password</> for changing role + Add new command <literal>\password</literal> for changing role password with client-side password encryption (Peter) </para> </listitem> <listitem> <para> - Allow <literal>\c</> to connect to a new host and port + Allow <literal>\c</literal> to connect to a new host and port number (David, Volkan YAZICI) </para> </listitem> <listitem> <para> - Add tablespace display to <literal>\l+</> (Philip Yarra) + Add tablespace display to <literal>\l+</literal> (Philip Yarra) </para> </listitem> <listitem> <para> - Improve <literal>\df</> slash command to include the argument - names and modes (<literal>OUT</> or <literal>INOUT</>) of + Improve <literal>\df</literal> slash command to include the argument + names and modes (<literal>OUT</literal> or <literal>INOUT</literal>) of the function (David Fetter) </para> </listitem> <listitem> <para> - Support binary <command>COPY</> (Andreas Pflug) + Support binary <command>COPY</command> (Andreas Pflug) </para> </listitem> @@ -6397,21 +6397,21 @@ </para> <para> - Use option <literal>-1</> or <literal>--single-transaction</>. + Use option <literal>-1</literal> or <literal>--single-transaction</literal>. </para> </listitem> <listitem> <para> - Support for automatically retrieving <command>SELECT</> + Support for automatically retrieving <command>SELECT</command> results in batches using a cursor (Chris Mair) </para> <para> This is enabled using <command>\set FETCH_COUNT - <replaceable>n</></command>. This + <replaceable>n</replaceable></command>. This feature allows large result sets to be retrieved in - <application>psql</> without attempting to buffer the entire + <application>psql</application> without attempting to buffer the entire result set in memory. </para> </listitem> @@ -6451,8 +6451,8 @@ <listitem> <para> Report both the returned data and the command status tag - for <command>INSERT</>/<command>UPDATE</>/<command>DELETE - RETURNING</> (Tom) + for <command>INSERT</command>/<command>UPDATE</command>/<command>DELETE + RETURNING</command> (Tom) </para> </listitem> @@ -6461,31 +6461,31 @@ </sect3> <sect3> - <title><link linkend="APP-PGDUMP"><application>pg_dump</></link> Changes</title> + <title><link linkend="APP-PGDUMP"><application>pg_dump</application></link> Changes</title> <itemizedlist> <listitem> <para> Allow complex selection of objects to be included or excluded - by <application>pg_dump</> (Greg Sabino Mullane) + by <application>pg_dump</application> (Greg Sabino Mullane) </para> <para> - <application>pg_dump</> now supports multiple <literal>-n</> - (schema) and <literal>-t</> (table) options, and adds - <literal>-N</> and <literal>-T</> options to exclude objects. + <application>pg_dump</application> now supports multiple <literal>-n</literal> + (schema) and <literal>-t</literal> (table) options, and adds + <literal>-N</literal> and <literal>-T</literal> options to exclude objects. Also, the arguments of these switches can now be wild-card expressions rather than single object names, for example - <literal>-t 'foo*'</>, and a schema can be part of - a <literal>-t</> or <literal>-T</> switch, for example - <literal>-t schema1.table1</>. + <literal>-t 'foo*'</literal>, and a schema can be part of + a <literal>-t</literal> or <literal>-T</literal> switch, for example + <literal>-t schema1.table1</literal>. </para> </listitem> <listitem> <para> - Add <link linkend="APP-PGRESTORE"><application>pg_restore</></link> - <literal>--no-data-for-failed-tables</> option to suppress + Add <link linkend="APP-PGRESTORE"><application>pg_restore</application></link> + <literal>--no-data-for-failed-tables</literal> option to suppress loading data if table creation failed (i.e., the table already exists) (Martin Pitt) </para> @@ -6493,13 +6493,13 @@ <listitem> <para> - Add <link linkend="APP-PGRESTORE"><application>pg_restore</></link> + Add <link linkend="APP-PGRESTORE"><application>pg_restore</application></link> option to run the entire session in a single transaction (Simon) </para> <para> - Use option <literal>-1</> or <literal>--single-transaction</>. + Use option <literal>-1</literal> or <literal>--single-transaction</literal>. </para> </listitem> @@ -6508,27 +6508,27 @@ </sect3> <sect3> - <title><link linkend="libpq"><application>libpq</></link> Changes</title> + <title><link linkend="libpq"><application>libpq</application></link> Changes</title> <itemizedlist> <listitem> <para> Add <link - linkend="libpq-misc"><function>PQencryptPassword()</></link> + linkend="libpq-misc"><function>PQencryptPassword()</function></link> to encrypt passwords (Tom) </para> <para> This allows passwords to be sent pre-encrypted for commands like <link linkend="SQL-ALTERROLE"><command>ALTER ROLE ... - PASSWORD</></link>. + PASSWORD</command></link>. </para> </listitem> <listitem> <para> Add function <link - linkend="libpq-threading"><function>PQisthreadsafe()</></link> + linkend="libpq-threading"><function>PQisthreadsafe()</function></link> (Bruce) </para> @@ -6541,9 +6541,9 @@ <listitem> <para> Add <link - linkend="libpq-exec-main"><function>PQdescribePrepared()</></link>, + linkend="libpq-exec-main"><function>PQdescribePrepared()</function></link>, <link - linkend="libpq-exec-main"><function>PQdescribePortal()</></link>, + linkend="libpq-exec-main"><function>PQdescribePortal()</function></link>, and related functions to return information about previously prepared statements and open cursors (Volkan YAZICI) </para> @@ -6551,9 +6551,9 @@ <listitem> <para> - Allow <link linkend="libpq-ldap"><acronym>LDAP</></link> lookups + Allow <link linkend="libpq-ldap"><acronym>LDAP</acronym></link> lookups from <link - linkend="libpq-pgservice"><filename>pg_service.conf</></link> + linkend="libpq-pgservice"><filename>pg_service.conf</filename></link> (Laurenz Albe) </para> </listitem> @@ -6561,7 +6561,7 @@ <listitem> <para> Allow a hostname in <link - linkend="libpq-pgpass"><filename>~/.pgpass</></link> + linkend="libpq-pgpass"><filename>~/.pgpass</filename></link> to match the default socket directory (Bruce) </para> @@ -6577,19 +6577,19 @@ </sect3> <sect3> - <title><link linkend="ecpg"><application>ecpg</></link> Changes</title> + <title><link linkend="ecpg"><application>ecpg</application></link> Changes</title> <itemizedlist> <listitem> <para> - Allow <link linkend="SQL-SHOW"><command>SHOW</></link> to + Allow <link linkend="SQL-SHOW"><command>SHOW</command></link> to put its result into a variable (Joachim Wieland) </para> </listitem> <listitem> <para> - Add <link linkend="SQL-COPY"><command>COPY TO STDOUT</></link> + Add <link linkend="SQL-COPY"><command>COPY TO STDOUT</command></link> (Joachim Wieland) </para> </listitem> @@ -6611,28 +6611,28 @@ </sect3> <sect3> - <title><application>Windows</> Port</title> + <title><application>Windows</application> Port</title> <itemizedlist> <listitem> <para> - Allow <acronym>MSVC</> to compile the <productname>PostgreSQL</> + Allow <acronym>MSVC</acronym> to compile the <productname>PostgreSQL</productname> server (Magnus, Hiroshi Saito) </para> </listitem> <listitem> <para> - Add <acronym>MSVC</> support for utility commands and <link - linkend="APP-PGDUMP"><application>pg_dump</></link> (Hiroshi + Add <acronym>MSVC</acronym> support for utility commands and <link + linkend="APP-PGDUMP"><application>pg_dump</application></link> (Hiroshi Saito) </para> </listitem> <listitem> <para> - Add support for Windows code pages <literal>1253</>, - <literal>1254</>, <literal>1255</>, and <literal>1257</> + Add support for Windows code pages <literal>1253</literal>, + <literal>1254</literal>, <literal>1255</literal>, and <literal>1257</literal> (Kris Jurka) </para> </listitem> @@ -6670,7 +6670,7 @@ <listitem> <para> - Add <link linkend="GIN"><acronym>GIN</></link> (Generalized + Add <link linkend="GIN"><acronym>GIN</acronym></link> (Generalized Inverted iNdex) index access method (Teodor, Oleg) </para> </listitem> @@ -6682,7 +6682,7 @@ <para> Rtree has been re-implemented using <link - linkend="GiST"><acronym>GiST</></link>. Among other + linkend="GiST"><acronym>GiST</acronym></link>. Among other differences, this means that rtree indexes now have support for crash recovery via write-ahead logging (WAL). </para> @@ -6698,12 +6698,12 @@ <listitem> <para> Add a configure flag to allow libedit to be preferred over - <acronym>GNU</> readline (Bruce) + <acronym>GNU</acronym> readline (Bruce) </para> <para> Use configure <link - linkend="configure"><literal>--with-libedit-preferred</></link>. + linkend="configure"><literal>--with-libedit-preferred</literal></link>. </para> </listitem> @@ -6722,21 +6722,21 @@ <listitem> <para> - Add support for <productname>Solaris x86_64</> using the - <productname>Solaris</> compiler (Pierre Girard, Theo + Add support for <productname>Solaris x86_64</productname> using the + <productname>Solaris</productname> compiler (Pierre Girard, Theo Schlossnagle, Bruce) </para> </listitem> <listitem> <para> - Add <application>DTrace</> support (Robert Lor) + Add <application>DTrace</application> support (Robert Lor) </para> </listitem> <listitem> <para> - Add <literal>PG_VERSION_NUM</> for use by third-party + Add <literal>PG_VERSION_NUM</literal> for use by third-party applications wanting to test the backend version in C using > and < comparisons (Bruce) </para> @@ -6744,37 +6744,37 @@ <listitem> <para> - Add <literal>XLOG_BLCKSZ</> as independent from <literal>BLCKSZ</> + Add <literal>XLOG_BLCKSZ</literal> as independent from <literal>BLCKSZ</literal> (Mark Wong) </para> </listitem> <listitem> <para> - Add <literal>LWLOCK_STATS</> define to report locking + Add <literal>LWLOCK_STATS</literal> define to report locking activity (Tom) </para> </listitem> <listitem> <para> - Emit warnings for unknown <application>configure</> options + Emit warnings for unknown <application>configure</application> options (Martijn van Oosterhout) </para> </listitem> <listitem> <para> - Add server support for <quote>plugin</> libraries + Add server support for <quote>plugin</quote> libraries that can be used for add-on tasks such as debugging and performance measurement (Korry Douglas) </para> <para> This consists of two features: a table of <quote>rendezvous - variables</> that allows separately-loaded shared libraries to + variables</quote> that allows separately-loaded shared libraries to communicate, and a new configuration parameter <link - linkend="guc-local-preload-libraries"><varname>local_preload_libraries</></link> + linkend="guc-local-preload-libraries"><varname>local_preload_libraries</varname></link> that allows libraries to be loaded into specific sessions without explicit cooperation from the client application. This allows external add-ons to implement features such as a PL/pgSQL debugger. @@ -6784,27 +6784,27 @@ <listitem> <para> Rename existing configuration parameter - <varname>preload_libraries</> to <link - linkend="guc-shared-preload-libraries"><varname>shared_preload_libraries</></link> + <varname>preload_libraries</varname> to <link + linkend="guc-shared-preload-libraries"><varname>shared_preload_libraries</varname></link> (Tom) </para> <para> This was done for clarity in comparison to - <varname>local_preload_libraries</>. + <varname>local_preload_libraries</varname>. </para> </listitem> <listitem> <para> Add new configuration parameter <link - linkend="guc-server-version-num"><varname>server_version_num</></link> + linkend="guc-server-version-num"><varname>server_version_num</varname></link> (Greg Sabino Mullane) </para> <para> This is like <varname>server_version</varname>, but is an - integer, e.g. <literal>80200</>. This allows applications to + integer, e.g. <literal>80200</literal>. This allows applications to make version checks more easily. </para> </listitem> @@ -6812,7 +6812,7 @@ <listitem> <para> Add a configuration parameter <link - linkend="guc-seq-page-cost"><varname>seq_page_cost</></link> + linkend="guc-seq-page-cost"><varname>seq_page_cost</varname></link> (Tom) </para> </listitem> @@ -6839,11 +6839,11 @@ <para> New <link linkend="xfunc-c-dynload">functions</link> - <function>_PG_init()</> and <function>_PG_fini()</> are + <function>_PG_init()</function> and <function>_PG_fini()</function> are called if the library defines such symbols. Hence we no longer need to specify an initialization function in - <varname>shared_preload_libraries</>; we can assume that - the library used the <function>_PG_init()</> convention + <varname>shared_preload_libraries</varname>; we can assume that + the library used the <function>_PG_init()</function> convention instead. </para> </listitem> @@ -6851,7 +6851,7 @@ <listitem> <para> Add <link - linkend="xfunc-c-dynload"><literal>PG_MODULE_MAGIC</></link> + linkend="xfunc-c-dynload"><literal>PG_MODULE_MAGIC</literal></link> header block to all shared object files (Martijn van Oosterhout) </para> @@ -6870,7 +6870,7 @@ <listitem> <para> - New <link linkend="datatype-xml"><acronym>XML</></link> + New <link linkend="datatype-xml"><acronym>XML</acronym></link> documentation section (Bruce) </para> </listitem> @@ -6892,7 +6892,7 @@ <listitem> <para> - multibyte encoding support, including <acronym>UTF8</> + multibyte encoding support, including <acronym>UTF8</acronym> </para> </listitem> <listitem> @@ -6912,13 +6912,13 @@ </listitem> <listitem> <para> - Ispell dictionaries now recognize <application>MySpell</> - format, used by <application>OpenOffice</> + Ispell dictionaries now recognize <application>MySpell</application> + format, used by <application>OpenOffice</application> </para> </listitem> <listitem> <para> - <acronym>GIN</> support + <acronym>GIN</acronym> support </para> </listitem> @@ -6928,13 +6928,13 @@ <listitem> <para> - Add adminpack module containing <application>Pgadmin</> administration + Add adminpack module containing <application>Pgadmin</application> administration functions (Dave) </para> <para> These functions provide additional file system access - routines not present in the default <productname>PostgreSQL</> + routines not present in the default <productname>PostgreSQL</productname> server. </para> </listitem> @@ -6945,7 +6945,7 @@ </para> <para> - Reports information about the current connection's <acronym>SSL</> + Reports information about the current connection's <acronym>SSL</acronym> certificate. </para> </listitem> @@ -6972,9 +6972,9 @@ </para> <para> - This new implementation supports <acronym>EAN13</>, <acronym>UPC</>, - <acronym>ISBN</> (books), <acronym>ISMN</> (music), and - <acronym>ISSN</> (serials). + This new implementation supports <acronym>EAN13</acronym>, <acronym>UPC</acronym>, + <acronym>ISBN</acronym> (books), <acronym>ISMN</acronym> (music), and + <acronym>ISSN</acronym> (serials). </para> </listitem> @@ -7034,9 +7034,9 @@ </para> <para> - New functions are <function>cube(float[])</>, - <function>cube(float[], float[])</>, and - <function>cube_subset(cube, int4[])</>. + New functions are <function>cube(float[])</function>, + <function>cube(float[], float[])</function>, and + <function>cube_subset(cube, int4[])</function>. </para> </listitem> @@ -7049,8 +7049,8 @@ <listitem> <para> - New operators for array-subset comparisons (<literal>@></>, - <literal><@</>, <literal>&&</>) (Tom) + New operators for array-subset comparisons (<literal>@></literal>, + <literal><@</literal>, <literal>&&</literal>) (Tom) </para> <para> diff --git a/doc/src/sgml/release-8.3.sgml b/doc/src/sgml/release-8.3.sgml index a82410d0577..45ecf9c054a 100644 --- a/doc/src/sgml/release-8.3.sgml +++ b/doc/src/sgml/release-8.3.sgml @@ -16,7 +16,7 @@ </para> <para> - This is expected to be the last <productname>PostgreSQL</> release + This is expected to be the last <productname>PostgreSQL</productname> release in the 8.3.X series. Users are encouraged to update to a newer release branch soon. </para> @@ -42,7 +42,7 @@ <listitem> <para> - Prevent execution of <function>enum_recv</> from SQL (Tom Lane) + Prevent execution of <function>enum_recv</function> from SQL (Tom Lane) </para> <para> @@ -63,19 +63,19 @@ <listitem> <para> Protect against race conditions when scanning - <structname>pg_tablespace</> (Stephen Frost, Tom Lane) + <structname>pg_tablespace</structname> (Stephen Frost, Tom Lane) </para> <para> - <command>CREATE DATABASE</> and <command>DROP DATABASE</> could + <command>CREATE DATABASE</command> and <command>DROP DATABASE</command> could misbehave if there were concurrent updates of - <structname>pg_tablespace</> entries. + <structname>pg_tablespace</structname> entries. </para> </listitem> <listitem> <para> - Prevent <command>DROP OWNED</> from trying to drop whole databases or + Prevent <command>DROP OWNED</command> from trying to drop whole databases or tablespaces (Álvaro Herrera) </para> @@ -86,13 +86,13 @@ <listitem> <para> - Prevent misbehavior when a <symbol>RowExpr</> or <symbol>XmlExpr</> + Prevent misbehavior when a <symbol>RowExpr</symbol> or <symbol>XmlExpr</symbol> is parse-analyzed twice (Andres Freund, Tom Lane) </para> <para> This mistake could be user-visible in contexts such as - <literal>CREATE TABLE LIKE INCLUDING INDEXES</>. + <literal>CREATE TABLE LIKE INCLUDING INDEXES</literal>. </para> </listitem> @@ -110,26 +110,26 @@ </para> <para> - This bug affected <application>psql</> and some other client programs. + This bug affected <application>psql</application> and some other client programs. </para> </listitem> <listitem> <para> - Fix possible crash in <application>psql</>'s <command>\?</> command + Fix possible crash in <application>psql</application>'s <command>\?</command> command when not connected to a database (Meng Qingzhong) </para> </listitem> <listitem> <para> - Fix one-byte buffer overrun in <application>libpq</>'s - <function>PQprintTuples</> (Xi Wang) + Fix one-byte buffer overrun in <application>libpq</application>'s + <function>PQprintTuples</function> (Xi Wang) </para> <para> This ancient function is not used anywhere by - <productname>PostgreSQL</> itself, but it might still be used by some + <productname>PostgreSQL</productname> itself, but it might still be used by some client code. </para> </listitem> @@ -149,15 +149,15 @@ <listitem> <para> - Make <application>pgxs</> build executables with the right - <literal>.exe</> suffix when cross-compiling for Windows + Make <application>pgxs</application> build executables with the right + <literal>.exe</literal> suffix when cross-compiling for Windows (Zoltan Boszormenyi) </para> </listitem> <listitem> <para> - Add new timezone abbreviation <literal>FET</> (Tom Lane) + Add new timezone abbreviation <literal>FET</literal> (Tom Lane) </para> <para> @@ -185,7 +185,7 @@ </para> <para> - The <productname>PostgreSQL</> community will stop releasing updates + The <productname>PostgreSQL</productname> community will stop releasing updates for the 8.3.X release series in February 2013. Users are encouraged to update to a newer release branch soon. </para> @@ -212,13 +212,13 @@ <listitem> <para> Fix multiple bugs associated with <command>CREATE INDEX - CONCURRENTLY</> (Andres Freund, Tom Lane) + CONCURRENTLY</command> (Andres Freund, Tom Lane) </para> <para> - Fix <command>CREATE INDEX CONCURRENTLY</> to use + Fix <command>CREATE INDEX CONCURRENTLY</command> to use in-place updates when changing the state of an index's - <structname>pg_index</> row. This prevents race conditions that could + <structname>pg_index</structname> row. This prevents race conditions that could cause concurrent sessions to miss updating the target index, thus resulting in corrupt concurrently-created indexes. </para> @@ -226,8 +226,8 @@ <para> Also, fix various other operations to ensure that they ignore invalid indexes resulting from a failed <command>CREATE INDEX - CONCURRENTLY</> command. The most important of these is - <command>VACUUM</>, because an auto-vacuum could easily be launched + CONCURRENTLY</command> command. The most important of these is + <command>VACUUM</command>, because an auto-vacuum could easily be launched on the table before corrective action can be taken to fix or remove the invalid index. </para> @@ -249,8 +249,8 @@ <para> The planner could derive incorrect constraints from a clause equating a non-strict construct to something else, for example - <literal>WHERE COALESCE(foo, 0) = 0</> - when <literal>foo</> is coming from the nullable side of an outer join. + <literal>WHERE COALESCE(foo, 0) = 0</literal> + when <literal>foo</literal> is coming from the nullable side of an outer join. </para> </listitem> @@ -268,10 +268,10 @@ </para> <para> - This affects multicolumn <literal>NOT IN</> subplans, such as - <literal>WHERE (a, b) NOT IN (SELECT x, y FROM ...)</> - when for instance <literal>b</> and <literal>y</> are <type>int4</> - and <type>int8</> respectively. This mistake led to wrong answers + This affects multicolumn <literal>NOT IN</literal> subplans, such as + <literal>WHERE (a, b) NOT IN (SELECT x, y FROM ...)</literal> + when for instance <literal>b</literal> and <literal>y</literal> are <type>int4</type> + and <type>int8</type> respectively. This mistake led to wrong answers or crashes depending on the specific datatypes involved. </para> </listitem> @@ -279,7 +279,7 @@ <listitem> <para> Acquire buffer lock when re-fetching the old tuple for an - <literal>AFTER ROW UPDATE/DELETE</> trigger (Andres Freund) + <literal>AFTER ROW UPDATE/DELETE</literal> trigger (Andres Freund) </para> <para> @@ -292,14 +292,14 @@ <listitem> <para> - Fix <command>REASSIGN OWNED</> to handle grants on tablespaces + Fix <command>REASSIGN OWNED</command> to handle grants on tablespaces (Álvaro Herrera) </para> </listitem> <listitem> <para> - Ignore incorrect <structname>pg_attribute</> entries for system + Ignore incorrect <structname>pg_attribute</structname> entries for system columns for views (Tom Lane) </para> @@ -313,7 +313,7 @@ <listitem> <para> - Fix rule printing to dump <literal>INSERT INTO <replaceable>table</> + Fix rule printing to dump <literal>INSERT INTO <replaceable>table</replaceable> DEFAULT VALUES</literal> correctly (Tom Lane) </para> </listitem> @@ -321,7 +321,7 @@ <listitem> <para> Guard against stack overflow when there are too many - <literal>UNION</>/<literal>INTERSECT</>/<literal>EXCEPT</> clauses + <literal>UNION</literal>/<literal>INTERSECT</literal>/<literal>EXCEPT</literal> clauses in a query (Tom Lane) </para> </listitem> @@ -349,7 +349,7 @@ <para> Formerly, this would result in something quite unhelpful, such as - <quote>Non-recoverable failure in name resolution</>. + <quote>Non-recoverable failure in name resolution</quote>. </para> </listitem> @@ -362,8 +362,8 @@ <listitem> <para> - Make <application>pg_ctl</> more robust about reading the - <filename>postmaster.pid</> file (Heikki Linnakangas) + Make <application>pg_ctl</application> more robust about reading the + <filename>postmaster.pid</filename> file (Heikki Linnakangas) </para> <para> @@ -373,33 +373,33 @@ <listitem> <para> - Fix possible crash in <application>psql</> if incorrectly-encoded data - is presented and the <varname>client_encoding</> setting is a + Fix possible crash in <application>psql</application> if incorrectly-encoded data + is presented and the <varname>client_encoding</varname> setting is a client-only encoding, such as SJIS (Jiang Guiqing) </para> </listitem> <listitem> <para> - Fix bugs in the <filename>restore.sql</> script emitted by - <application>pg_dump</> in <literal>tar</> output format (Tom Lane) + Fix bugs in the <filename>restore.sql</filename> script emitted by + <application>pg_dump</application> in <literal>tar</literal> output format (Tom Lane) </para> <para> The script would fail outright on tables whose names include upper-case characters. Also, make the script capable of restoring - data in <option>--inserts</> mode as well as the regular COPY mode. + data in <option>--inserts</option> mode as well as the regular COPY mode. </para> </listitem> <listitem> <para> - Fix <application>pg_restore</> to accept POSIX-conformant - <literal>tar</> files (Brian Weaver, Tom Lane) + Fix <application>pg_restore</application> to accept POSIX-conformant + <literal>tar</literal> files (Brian Weaver, Tom Lane) </para> <para> - The original coding of <application>pg_dump</>'s <literal>tar</> + The original coding of <application>pg_dump</application>'s <literal>tar</literal> output mode produced files that are not fully conformant with the POSIX standard. This has been corrected for version 9.3. This patch updates previous branches so that they will accept both the @@ -410,41 +410,41 @@ <listitem> <para> - Fix <application>pg_resetxlog</> to locate <filename>postmaster.pid</> + Fix <application>pg_resetxlog</application> to locate <filename>postmaster.pid</filename> correctly when given a relative path to the data directory (Tom Lane) </para> <para> - This mistake could lead to <application>pg_resetxlog</> not noticing + This mistake could lead to <application>pg_resetxlog</application> not noticing that there is an active postmaster using the data directory. </para> </listitem> <listitem> <para> - Fix <application>libpq</>'s <function>lo_import()</> and - <function>lo_export()</> functions to report file I/O errors properly + Fix <application>libpq</application>'s <function>lo_import()</function> and + <function>lo_export()</function> functions to report file I/O errors properly (Tom Lane) </para> </listitem> <listitem> <para> - Fix <application>ecpg</>'s processing of nested structure pointer + Fix <application>ecpg</application>'s processing of nested structure pointer variables (Muhammad Usama) </para> </listitem> <listitem> <para> - Make <filename>contrib/pageinspect</>'s btree page inspection + Make <filename>contrib/pageinspect</filename>'s btree page inspection functions take buffer locks while examining pages (Tom Lane) </para> </listitem> <listitem> <para> - Fix <application>pgxs</> support for building loadable modules on AIX + Fix <application>pgxs</application> support for building loadable modules on AIX (Tom Lane) </para> @@ -455,7 +455,7 @@ <listitem> <para> - Update time zone data files to <application>tzdata</> release 2012j + Update time zone data files to <application>tzdata</application> release 2012j for DST law changes in Cuba, Israel, Jordan, Libya, Palestine, Western Samoa, and portions of Brazil. </para> @@ -481,7 +481,7 @@ </para> <para> - The <productname>PostgreSQL</> community will stop releasing updates + The <productname>PostgreSQL</productname> community will stop releasing updates for the 8.3.X release series in February 2013. Users are encouraged to update to a newer release branch soon. </para> @@ -524,22 +524,22 @@ </para> <para> - If we revoke a grant option from some role <replaceable>X</>, but - <replaceable>X</> still holds that option via a grant from someone + If we revoke a grant option from some role <replaceable>X</replaceable>, but + <replaceable>X</replaceable> still holds that option via a grant from someone else, we should not recursively revoke the corresponding privilege - from role(s) <replaceable>Y</> that <replaceable>X</> had granted it + from role(s) <replaceable>Y</replaceable> that <replaceable>X</replaceable> had granted it to. </para> </listitem> <listitem> <para> - Fix handling of <literal>SIGFPE</> when PL/Perl is in use (Andres Freund) + Fix handling of <literal>SIGFPE</literal> when PL/Perl is in use (Andres Freund) </para> <para> - Perl resets the process's <literal>SIGFPE</> handler to - <literal>SIG_IGN</>, which could result in crashes later on. Restore + Perl resets the process's <literal>SIGFPE</literal> handler to + <literal>SIG_IGN</literal>, which could result in crashes later on. Restore the normal Postgres signal handler after initializing PL/Perl. </para> </listitem> @@ -558,7 +558,7 @@ <para> Some Linux distributions contain an incorrect version of - <filename>pthread.h</> that results in incorrect compiled code in + <filename>pthread.h</filename> that results in incorrect compiled code in PL/Perl, leading to crashes if a PL/Perl function calls another one that throws an error. </para> @@ -566,7 +566,7 @@ <listitem> <para> - Update time zone data files to <application>tzdata</> release 2012f + Update time zone data files to <application>tzdata</application> release 2012f for DST law changes in Fiji </para> </listitem> @@ -591,7 +591,7 @@ </para> <para> - The <productname>PostgreSQL</> community will stop releasing updates + The <productname>PostgreSQL</productname> community will stop releasing updates for the 8.3.X release series in February 2013. Users are encouraged to update to a newer release branch soon. </para> @@ -622,7 +622,7 @@ </para> <para> - <function>xml_parse()</> would attempt to fetch external files or + <function>xml_parse()</function> would attempt to fetch external files or URLs as needed to resolve DTD and entity references in an XML value, thus allowing unprivileged database users to attempt to fetch data with the privileges of the database server. While the external data @@ -635,22 +635,22 @@ <listitem> <para> - Prevent access to external files/URLs via <filename>contrib/xml2</>'s - <function>xslt_process()</> (Peter Eisentraut) + Prevent access to external files/URLs via <filename>contrib/xml2</filename>'s + <function>xslt_process()</function> (Peter Eisentraut) </para> <para> - <application>libxslt</> offers the ability to read and write both + <application>libxslt</application> offers the ability to read and write both files and URLs through stylesheet commands, thus allowing unprivileged database users to both read and write data with the privileges of the database server. Disable that through proper use - of <application>libxslt</>'s security options. (CVE-2012-3488) + of <application>libxslt</application>'s security options. (CVE-2012-3488) </para> <para> - Also, remove <function>xslt_process()</>'s ability to fetch documents + Also, remove <function>xslt_process()</function>'s ability to fetch documents and stylesheets from external files/URLs. While this was a - documented <quote>feature</>, it was long regarded as a bad idea. + documented <quote>feature</quote>, it was long regarded as a bad idea. The fix for CVE-2012-3489 broke that capability, and rather than expend effort on trying to fix it, we're just going to summarily remove it. @@ -678,22 +678,22 @@ </para> <para> - If <command>ALTER SEQUENCE</> was executed on a freshly created or - reset sequence, and then precisely one <function>nextval()</> call + If <command>ALTER SEQUENCE</command> was executed on a freshly created or + reset sequence, and then precisely one <function>nextval()</function> call was made on it, and then the server crashed, WAL replay would restore the sequence to a state in which it appeared that no - <function>nextval()</> had been done, thus allowing the first + <function>nextval()</function> had been done, thus allowing the first sequence value to be returned again by the next - <function>nextval()</> call. In particular this could manifest for - <type>serial</> columns, since creation of a serial column's sequence - includes an <command>ALTER SEQUENCE OWNED BY</> step. + <function>nextval()</function> call. In particular this could manifest for + <type>serial</type> columns, since creation of a serial column's sequence + includes an <command>ALTER SEQUENCE OWNED BY</command> step. </para> </listitem> <listitem> <para> - Ensure the <filename>backup_label</> file is fsync'd after - <function>pg_start_backup()</> (Dave Kerr) + Ensure the <filename>backup_label</filename> file is fsync'd after + <function>pg_start_backup()</function> (Dave Kerr) </para> </listitem> @@ -718,7 +718,7 @@ <para> The original coding could allow inconsistent behavior in some cases; in particular, an autovacuum could get canceled after less than - <literal>deadlock_timeout</> grace period. + <literal>deadlock_timeout</literal> grace period. </para> </listitem> @@ -730,7 +730,7 @@ <listitem> <para> - Fix log collector so that <literal>log_truncate_on_rotation</> works + Fix log collector so that <literal>log_truncate_on_rotation</literal> works during the very first log rotation after server start (Tom Lane) </para> </listitem> @@ -738,24 +738,24 @@ <listitem> <para> Ensure that a whole-row reference to a subquery doesn't include any - extra <literal>GROUP BY</> or <literal>ORDER BY</> columns (Tom Lane) + extra <literal>GROUP BY</literal> or <literal>ORDER BY</literal> columns (Tom Lane) </para> </listitem> <listitem> <para> - Disallow copying whole-row references in <literal>CHECK</> - constraints and index definitions during <command>CREATE TABLE</> + Disallow copying whole-row references in <literal>CHECK</literal> + constraints and index definitions during <command>CREATE TABLE</command> (Tom Lane) </para> <para> - This situation can arise in <command>CREATE TABLE</> with - <literal>LIKE</> or <literal>INHERITS</>. The copied whole-row + This situation can arise in <command>CREATE TABLE</command> with + <literal>LIKE</literal> or <literal>INHERITS</literal>. The copied whole-row variable was incorrectly labeled with the row type of the original table not the new one. Rejecting the case seems reasonable for - <literal>LIKE</>, since the row types might well diverge later. For - <literal>INHERITS</> we should ideally allow it, with an implicit + <literal>LIKE</literal>, since the row types might well diverge later. For + <literal>INHERITS</literal> we should ideally allow it, with an implicit coercion to the parent table's row type; but that will require more work than seems safe to back-patch. </para> @@ -763,7 +763,7 @@ <listitem> <para> - Fix memory leak in <literal>ARRAY(SELECT ...)</> subqueries (Heikki + Fix memory leak in <literal>ARRAY(SELECT ...)</literal> subqueries (Heikki Linnakangas, Tom Lane) </para> </listitem> @@ -775,21 +775,21 @@ <para> The code could get confused by quantified parenthesized - subexpressions, such as <literal>^(foo)?bar</>. This would lead to + subexpressions, such as <literal>^(foo)?bar</literal>. This would lead to incorrect index optimization of searches for such patterns. </para> </listitem> <listitem> <para> - Report errors properly in <filename>contrib/xml2</>'s - <function>xslt_process()</> (Tom Lane) + Report errors properly in <filename>contrib/xml2</filename>'s + <function>xslt_process()</function> (Tom Lane) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2012e + Update time zone data files to <application>tzdata</application> release 2012e for DST law changes in Morocco and Tokelau </para> </listitem> @@ -835,12 +835,12 @@ <listitem> <para> Fix incorrect password transformation in - <filename>contrib/pgcrypto</>'s DES <function>crypt()</> function + <filename>contrib/pgcrypto</filename>'s DES <function>crypt()</function> function (Solar Designer) </para> <para> - If a password string contained the byte value <literal>0x80</>, the + If a password string contained the byte value <literal>0x80</literal>, the remainder of the password was ignored, causing the password to be much weaker than it appeared. With this fix, the rest of the string is properly included in the DES hash. Any stored password values that are @@ -851,7 +851,7 @@ <listitem> <para> - Ignore <literal>SECURITY DEFINER</> and <literal>SET</> attributes for + Ignore <literal>SECURITY DEFINER</literal> and <literal>SET</literal> attributes for a procedural language's call handler (Tom Lane) </para> @@ -863,7 +863,7 @@ <listitem> <para> - Allow numeric timezone offsets in <type>timestamp</> input to be up to + Allow numeric timezone offsets in <type>timestamp</type> input to be up to 16 hours away from UTC (Tom Lane) </para> @@ -889,7 +889,7 @@ <listitem> <para> - Fix <type>text</> to <type>name</> and <type>char</> to <type>name</> + Fix <type>text</type> to <type>name</type> and <type>char</type> to <type>name</type> casts to perform string truncation correctly in multibyte encodings (Karl Schnaitter) </para> @@ -897,19 +897,19 @@ <listitem> <para> - Fix memory copying bug in <function>to_tsquery()</> (Heikki Linnakangas) + Fix memory copying bug in <function>to_tsquery()</function> (Heikki Linnakangas) </para> </listitem> <listitem> <para> - Fix slow session startup when <structname>pg_attribute</> is very large + Fix slow session startup when <structname>pg_attribute</structname> is very large (Tom Lane) </para> <para> - If <structname>pg_attribute</> exceeds one-fourth of - <varname>shared_buffers</>, cache rebuilding code that is sometimes + If <structname>pg_attribute</structname> exceeds one-fourth of + <varname>shared_buffers</varname>, cache rebuilding code that is sometimes needed during session start would trigger the synchronized-scan logic, causing it to take many times longer than normal. The problem was particularly acute if many new sessions were starting at once. @@ -930,8 +930,8 @@ <listitem> <para> - Ensure the Windows implementation of <function>PGSemaphoreLock()</> - clears <varname>ImmediateInterruptOK</> before returning (Tom Lane) + Ensure the Windows implementation of <function>PGSemaphoreLock()</function> + clears <varname>ImmediateInterruptOK</varname> before returning (Tom Lane) </para> <para> @@ -964,7 +964,7 @@ <para> Previously, infinite recursion in a function invoked by - auto-<command>ANALYZE</> could crash worker processes. + auto-<command>ANALYZE</command> could crash worker processes. </para> </listitem> @@ -983,25 +983,25 @@ <listitem> <para> Fix logging collector to ensure it will restart file rotation - after receiving <systemitem>SIGHUP</> (Tom Lane) + after receiving <systemitem>SIGHUP</systemitem> (Tom Lane) </para> </listitem> <listitem> <para> - Fix PL/pgSQL's <command>GET DIAGNOSTICS</> command when the target + Fix PL/pgSQL's <command>GET DIAGNOSTICS</command> command when the target is the function's first variable (Tom Lane) </para> </listitem> <listitem> <para> - Fix several performance problems in <application>pg_dump</> when + Fix several performance problems in <application>pg_dump</application> when the database contains many objects (Jeff Janes, Tom Lane) </para> <para> - <application>pg_dump</> could get very slow if the database contained + <application>pg_dump</application> could get very slow if the database contained many schemas, or if many objects are in dependency loops, or if there are many owned sequences. </para> @@ -1009,14 +1009,14 @@ <listitem> <para> - Fix <filename>contrib/dblink</>'s <function>dblink_exec()</> to not leak + Fix <filename>contrib/dblink</filename>'s <function>dblink_exec()</function> to not leak temporary database connections upon error (Tom Lane) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2012c + Update time zone data files to <application>tzdata</application> release 2012c for DST law changes in Antarctica, Armenia, Chile, Cuba, Falkland Islands, Gaza, Haiti, Hebron, Morocco, Syria, and Tokelau Islands; also historical corrections for Canada. @@ -1064,26 +1064,26 @@ <listitem> <para> Require execute permission on the trigger function for - <command>CREATE TRIGGER</> (Robert Haas) + <command>CREATE TRIGGER</command> (Robert Haas) </para> <para> This missing check could allow another user to execute a trigger function with forged input data, by installing it on a table he owns. This is only of significance for trigger functions marked - <literal>SECURITY DEFINER</>, since otherwise trigger functions run + <literal>SECURITY DEFINER</literal>, since otherwise trigger functions run as the table owner anyway. (CVE-2012-0866) </para> </listitem> <listitem> <para> - Convert newlines to spaces in names written in <application>pg_dump</> + Convert newlines to spaces in names written in <application>pg_dump</application> comments (Robert Haas) </para> <para> - <application>pg_dump</> was incautious about sanitizing object names + <application>pg_dump</application> was incautious about sanitizing object names that are emitted within SQL comments in its output script. A name containing a newline would at least render the script syntactically incorrect. Maliciously crafted object names could present a SQL @@ -1099,10 +1099,10 @@ <para> An index page split caused by an insertion could sometimes cause a - concurrently-running <command>VACUUM</> to miss removing index entries + concurrently-running <command>VACUUM</command> to miss removing index entries that it should remove. After the corresponding table rows are removed, the dangling index entries would cause errors (such as <quote>could not - read block N in file ...</>) or worse, silently wrong query results + read block N in file ...</quote>) or worse, silently wrong query results after unrelated rows are re-inserted at the now-free table locations. This bug has been present since release 8.2, but occurs so infrequently that it was not diagnosed until now. If you have reason to suspect @@ -1114,16 +1114,16 @@ <listitem> <para> Allow non-existent values for some settings in <command>ALTER - USER/DATABASE SET</> (Heikki Linnakangas) + USER/DATABASE SET</command> (Heikki Linnakangas) </para> <para> - Allow <varname>default_text_search_config</>, - <varname>default_tablespace</>, and <varname>temp_tablespaces</> to be + Allow <varname>default_text_search_config</varname>, + <varname>default_tablespace</varname>, and <varname>temp_tablespaces</varname> to be set to names that are not known. This is because they might be known in another database where the setting is intended to be used, or for the tablespace cases because the tablespace might not be created yet. The - same issue was previously recognized for <varname>search_path</>, and + same issue was previously recognized for <varname>search_path</varname>, and these settings now act like that one. </para> </listitem> @@ -1145,7 +1145,7 @@ <listitem> <para> - Fix regular expression back-references with <literal>*</> attached + Fix regular expression back-references with <literal>*</literal> attached (Tom Lane) </para> @@ -1159,18 +1159,18 @@ A similar problem still afflicts back-references that are embedded in a larger quantified expression, rather than being the immediate subject of the quantifier. This will be addressed in a future - <productname>PostgreSQL</> release. + <productname>PostgreSQL</productname> release. </para> </listitem> <listitem> <para> Fix recently-introduced memory leak in processing of - <type>inet</>/<type>cidr</> values (Heikki Linnakangas) + <type>inet</type>/<type>cidr</type> values (Heikki Linnakangas) </para> <para> - A patch in the December 2011 releases of <productname>PostgreSQL</> + A patch in the December 2011 releases of <productname>PostgreSQL</productname> caused memory leakage in these operations, which could be significant in scenarios such as building a btree index on such a column. </para> @@ -1201,32 +1201,32 @@ <listitem> <para> - Improve <application>pg_dump</>'s handling of inherited table columns + Improve <application>pg_dump</application>'s handling of inherited table columns (Tom Lane) </para> <para> - <application>pg_dump</> mishandled situations where a child column has + <application>pg_dump</application> mishandled situations where a child column has a different default expression than its parent column. If the default is textually identical to the parent's default, but not actually the same (for instance, because of schema search path differences) it would not be recognized as different, so that after dump and restore the child would be allowed to inherit the parent's default. Child columns - that are <literal>NOT NULL</> where their parent is not could also be + that are <literal>NOT NULL</literal> where their parent is not could also be restored subtly incorrectly. </para> </listitem> <listitem> <para> - Fix <application>pg_restore</>'s direct-to-database mode for + Fix <application>pg_restore</application>'s direct-to-database mode for INSERT-style table data (Tom Lane) </para> <para> Direct-to-database restores from archive files made with - <option>--inserts</> or <option>--column-inserts</> options fail when - using <application>pg_restore</> from a release dated September or + <option>--inserts</option> or <option>--column-inserts</option> options fail when + using <application>pg_restore</application> from a release dated September or December 2011, as a result of an oversight in a fix for another problem. The archive file itself is not at fault, and text-mode output is okay. @@ -1235,8 +1235,8 @@ <listitem> <para> - Fix error in <filename>contrib/intarray</>'s <literal>int[] & - int[]</> operator (Guillaume Lelarge) + Fix error in <filename>contrib/intarray</filename>'s <literal>int[] & + int[]</literal> operator (Guillaume Lelarge) </para> <para> @@ -1248,8 +1248,8 @@ <listitem> <para> - Fix error detection in <filename>contrib/pgcrypto</>'s - <function>encrypt_iv()</> and <function>decrypt_iv()</> + Fix error detection in <filename>contrib/pgcrypto</filename>'s + <function>encrypt_iv()</function> and <function>decrypt_iv()</function> (Marko Kreen) </para> @@ -1261,26 +1261,26 @@ <listitem> <para> - Fix one-byte buffer overrun in <filename>contrib/test_parser</> + Fix one-byte buffer overrun in <filename>contrib/test_parser</filename> (Paul Guyot) </para> <para> The code would try to read one more byte than it should, which would crash in corner cases. - Since <filename>contrib/test_parser</> is only example code, this is + Since <filename>contrib/test_parser</filename> is only example code, this is not a security issue in itself, but bad example code is still bad. </para> </listitem> <listitem> <para> - Use <function>__sync_lock_test_and_set()</> for spinlocks on ARM, if + Use <function>__sync_lock_test_and_set()</function> for spinlocks on ARM, if available (Martin Pitt) </para> <para> - This function replaces our previous use of the <literal>SWPB</> + This function replaces our previous use of the <literal>SWPB</literal> instruction, which is deprecated and not available on ARMv6 and later. Reports suggest that the old code doesn't fail in an obvious way on recent ARM boards, but simply doesn't interlock concurrent accesses, @@ -1290,7 +1290,7 @@ <listitem> <para> - Use <option>-fexcess-precision=standard</> option when building with + Use <option>-fexcess-precision=standard</option> option when building with gcc versions that accept it (Andrew Dunstan) </para> @@ -1339,7 +1339,7 @@ <para> However, a longstanding error was discovered in the definition of the - <literal>information_schema.referential_constraints</> view. If you + <literal>information_schema.referential_constraints</literal> view. If you rely on correct results from that view, you should replace its definition as explained in the first changelog item below. </para> @@ -1358,7 +1358,7 @@ <listitem> <para> - Fix bugs in <literal>information_schema.referential_constraints</> view + Fix bugs in <literal>information_schema.referential_constraints</literal> view (Tom Lane) </para> @@ -1371,13 +1371,13 @@ </para> <para> - Since the view definition is installed by <application>initdb</>, + Since the view definition is installed by <application>initdb</application>, merely upgrading will not fix the problem. If you need to fix this in an existing installation, you can (as a superuser) drop the - <literal>information_schema</> schema then re-create it by sourcing - <filename><replaceable>SHAREDIR</>/information_schema.sql</filename>. - (Run <literal>pg_config --sharedir</> if you're uncertain where - <replaceable>SHAREDIR</> is.) This must be repeated in each database + <literal>information_schema</literal> schema then re-create it by sourcing + <filename><replaceable>SHAREDIR</replaceable>/information_schema.sql</filename>. + (Run <literal>pg_config --sharedir</literal> if you're uncertain where + <replaceable>SHAREDIR</replaceable> is.) This must be repeated in each database to be fixed. </para> </listitem> @@ -1385,12 +1385,12 @@ <listitem> <para> Fix TOAST-related data corruption during <literal>CREATE TABLE dest AS - SELECT * FROM src</> or <literal>INSERT INTO dest SELECT * FROM src</> + SELECT * FROM src</literal> or <literal>INSERT INTO dest SELECT * FROM src</literal> (Tom Lane) </para> <para> - If a table has been modified by <command>ALTER TABLE ADD COLUMN</>, + If a table has been modified by <command>ALTER TABLE ADD COLUMN</command>, attempts to copy its data verbatim to another table could produce corrupt results in certain corner cases. The problem can only manifest in this precise form in 8.4 and later, @@ -1407,36 +1407,36 @@ <para> The typical symptom was transient errors like <quote>missing chunk - number 0 for toast value NNNNN in pg_toast_2619</>, where the cited + number 0 for toast value NNNNN in pg_toast_2619</quote>, where the cited toast table would always belong to a system catalog. </para> </listitem> <listitem> <para> - Make <function>DatumGetInetP()</> unpack inet datums that have a 1-byte - header, and add a new macro, <function>DatumGetInetPP()</>, that does + Make <function>DatumGetInetP()</function> unpack inet datums that have a 1-byte + header, and add a new macro, <function>DatumGetInetPP()</function>, that does not (Heikki Linnakangas) </para> <para> This change affects no core code, but might prevent crashes in add-on - code that expects <function>DatumGetInetP()</> to produce an unpacked + code that expects <function>DatumGetInetP()</function> to produce an unpacked datum as per usual convention. </para> </listitem> <listitem> <para> - Improve locale support in <type>money</> type's input and output + Improve locale support in <type>money</type> type's input and output (Tom Lane) </para> <para> Aside from not supporting all standard - <link linkend="guc-lc-monetary"><varname>lc_monetary</></link> + <link linkend="guc-lc-monetary"><varname>lc_monetary</varname></link> formatting options, the input and output functions were inconsistent, - meaning there were locales in which dumped <type>money</> values could + meaning there were locales in which dumped <type>money</type> values could not be re-read. </para> </listitem> @@ -1444,15 +1444,15 @@ <listitem> <para> Don't let <link - linkend="guc-transform-null-equals"><varname>transform_null_equals</></link> - affect <literal>CASE foo WHEN NULL ...</> constructs + linkend="guc-transform-null-equals"><varname>transform_null_equals</varname></link> + affect <literal>CASE foo WHEN NULL ...</literal> constructs (Heikki Linnakangas) </para> <para> - <varname>transform_null_equals</> is only supposed to affect - <literal>foo = NULL</> expressions written directly by the user, not - equality checks generated internally by this form of <literal>CASE</>. + <varname>transform_null_equals</varname> is only supposed to affect + <literal>foo = NULL</literal> expressions written directly by the user, not + equality checks generated internally by this form of <literal>CASE</literal>. </para> </listitem> @@ -1464,14 +1464,14 @@ <para> For a cascading foreign key that references its own table, a row update - will fire both the <literal>ON UPDATE</> trigger and the - <literal>CHECK</> trigger as one event. The <literal>ON UPDATE</> - trigger must execute first, else the <literal>CHECK</> will check a + will fire both the <literal>ON UPDATE</literal> trigger and the + <literal>CHECK</literal> trigger as one event. The <literal>ON UPDATE</literal> + trigger must execute first, else the <literal>CHECK</literal> will check a non-final state of the row and possibly throw an inappropriate error. However, the firing order of these triggers is determined by their names, which generally sort in creation order since the triggers have auto-generated names following the convention - <quote>RI_ConstraintTrigger_NNNN</>. A proper fix would require + <quote>RI_ConstraintTrigger_NNNN</quote>. A proper fix would require modifying that convention, which we will do in 9.2, but it seems risky to change it in existing releases. So this patch just changes the creation order of the triggers. Users encountering this type of error @@ -1494,7 +1494,7 @@ <listitem> <para> - Preserve blank lines within commands in <application>psql</>'s command + Preserve blank lines within commands in <application>psql</application>'s command history (Robert Haas) </para> @@ -1506,14 +1506,14 @@ <listitem> <para> - Fix <application>pg_dump</> to dump user-defined casts between + Fix <application>pg_dump</application> to dump user-defined casts between auto-generated types, such as table rowtypes (Tom Lane) </para> </listitem> <listitem> <para> - Use the preferred version of <application>xsubpp</> to build PL/Perl, + Use the preferred version of <application>xsubpp</application> to build PL/Perl, not necessarily the operating system's main copy (David Wheeler and Alex Hunsaker) </para> @@ -1521,19 +1521,19 @@ <listitem> <para> - Fix incorrect coding in <filename>contrib/dict_int</> and - <filename>contrib/dict_xsyn</> (Tom Lane) + Fix incorrect coding in <filename>contrib/dict_int</filename> and + <filename>contrib/dict_xsyn</filename> (Tom Lane) </para> <para> Some functions incorrectly assumed that memory returned by - <function>palloc()</> is guaranteed zeroed. + <function>palloc()</function> is guaranteed zeroed. </para> </listitem> <listitem> <para> - Honor query cancel interrupts promptly in <function>pgstatindex()</> + Honor query cancel interrupts promptly in <function>pgstatindex()</function> (Robert Haas) </para> </listitem> @@ -1564,15 +1564,15 @@ </para> <para> - Map <quote>Central America Standard Time</> to <literal>CST6</>, not - <literal>CST6CDT</>, because DST is generally not observed anywhere in + Map <quote>Central America Standard Time</quote> to <literal>CST6</literal>, not + <literal>CST6CDT</literal>, because DST is generally not observed anywhere in Central America. </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2011n + Update time zone data files to <application>tzdata</application> release 2011n for DST law changes in Brazil, Cuba, Fiji, Palestine, Russia, and Samoa; also historical corrections for Alaska and British East Africa. </para> @@ -1638,7 +1638,7 @@ <listitem> <para> - Fix possible buffer overrun in <function>tsvector_concat()</> + Fix possible buffer overrun in <function>tsvector_concat()</function> (Tom Lane) </para> @@ -1650,14 +1650,14 @@ <listitem> <para> - Fix crash in <function>xml_recv</> when processing a - <quote>standalone</> parameter (Tom Lane) + Fix crash in <function>xml_recv</function> when processing a + <quote>standalone</quote> parameter (Tom Lane) </para> </listitem> <listitem> <para> - Avoid possibly accessing off the end of memory in <command>ANALYZE</> + Avoid possibly accessing off the end of memory in <command>ANALYZE</command> and in SJIS-2004 encoding conversion (Noah Misch) </para> @@ -1675,7 +1675,7 @@ There was a window wherein a new backend process could read a stale init file but miss the inval messages that would tell it the data is stale. The result would be bizarre failures in catalog accesses, typically - <quote>could not read block 0 in file ...</> later during startup. + <quote>could not read block 0 in file ...</quote> later during startup. </para> </listitem> @@ -1724,13 +1724,13 @@ <listitem> <para> - Fix dump bug for <literal>VALUES</> in a view (Tom Lane) + Fix dump bug for <literal>VALUES</literal> in a view (Tom Lane) </para> </listitem> <listitem> <para> - Disallow <literal>SELECT FOR UPDATE/SHARE</> on sequences (Tom Lane) + Disallow <literal>SELECT FOR UPDATE/SHARE</literal> on sequences (Tom Lane) </para> <para> @@ -1747,7 +1747,7 @@ <listitem> <para> - Fix cases where <command>CLUSTER</> might attempt to access + Fix cases where <command>CLUSTER</command> might attempt to access already-removed TOAST data (Tom Lane) </para> </listitem> @@ -1755,7 +1755,7 @@ <listitem> <para> Fix portability bugs in use of credentials control messages for - <quote>peer</> authentication (Tom Lane) + <quote>peer</quote> authentication (Tom Lane) </para> </listitem> @@ -1767,18 +1767,18 @@ <para> The typical symptom of this problem was <quote>The function requested is - not supported</> errors during SSPI login. + not supported</quote> errors during SSPI login. </para> </listitem> <listitem> <para> - Fix typo in <function>pg_srand48</> seed initialization (Andres Freund) + Fix typo in <function>pg_srand48</function> seed initialization (Andres Freund) </para> <para> This led to failure to use all bits of the provided seed. This function - is not used on most platforms (only those without <function>srandom</>), + is not used on most platforms (only those without <function>srandom</function>), and the potential security exposure from a less-random-than-expected seed seems minimal in any case. </para> @@ -1786,25 +1786,25 @@ <listitem> <para> - Avoid integer overflow when the sum of <literal>LIMIT</> and - <literal>OFFSET</> values exceeds 2^63 (Heikki Linnakangas) + Avoid integer overflow when the sum of <literal>LIMIT</literal> and + <literal>OFFSET</literal> values exceeds 2^63 (Heikki Linnakangas) </para> </listitem> <listitem> <para> - Add overflow checks to <type>int4</> and <type>int8</> versions of - <function>generate_series()</> (Robert Haas) + Add overflow checks to <type>int4</type> and <type>int8</type> versions of + <function>generate_series()</function> (Robert Haas) </para> </listitem> <listitem> <para> - Fix trailing-zero removal in <function>to_char()</> (Marti Raudsepp) + Fix trailing-zero removal in <function>to_char()</function> (Marti Raudsepp) </para> <para> - In a format with <literal>FM</> and no digit positions + In a format with <literal>FM</literal> and no digit positions after the decimal point, zeroes to the left of the decimal point could be removed incorrectly. </para> @@ -1812,48 +1812,48 @@ <listitem> <para> - Fix <function>pg_size_pretty()</> to avoid overflow for inputs close to + Fix <function>pg_size_pretty()</function> to avoid overflow for inputs close to 2^63 (Tom Lane) </para> </listitem> <listitem> <para> - In <application>pg_ctl</>, support silent mode for service registrations + In <application>pg_ctl</application>, support silent mode for service registrations on Windows (MauMau) </para> </listitem> <listitem> <para> - Fix <application>psql</>'s counting of script file line numbers during - <literal>COPY</> from a different file (Tom Lane) + Fix <application>psql</application>'s counting of script file line numbers during + <literal>COPY</literal> from a different file (Tom Lane) </para> </listitem> <listitem> <para> - Fix <application>pg_restore</>'s direct-to-database mode for - <varname>standard_conforming_strings</> (Tom Lane) + Fix <application>pg_restore</application>'s direct-to-database mode for + <varname>standard_conforming_strings</varname> (Tom Lane) </para> <para> - <application>pg_restore</> could emit incorrect commands when restoring + <application>pg_restore</application> could emit incorrect commands when restoring directly to a database server from an archive file that had been made - with <varname>standard_conforming_strings</> set to <literal>on</>. + with <varname>standard_conforming_strings</varname> set to <literal>on</literal>. </para> </listitem> <listitem> <para> - Fix write-past-buffer-end and memory leak in <application>libpq</>'s + Fix write-past-buffer-end and memory leak in <application>libpq</application>'s LDAP service lookup code (Albe Laurenz) </para> </listitem> <listitem> <para> - In <application>libpq</>, avoid failures when using nonblocking I/O + In <application>libpq</application>, avoid failures when using nonblocking I/O and an SSL connection (Martin Pihlak, Tom Lane) </para> </listitem> @@ -1865,28 +1865,28 @@ </para> <para> - In particular, the response to a server report of <function>fork()</> + In particular, the response to a server report of <function>fork()</function> failure during SSL connection startup is now saner. </para> </listitem> <listitem> <para> - Improve <application>libpq</>'s error reporting for SSL failures (Tom + Improve <application>libpq</application>'s error reporting for SSL failures (Tom Lane) </para> </listitem> <listitem> <para> - Make <application>ecpglib</> write <type>double</> values with 15 digits + Make <application>ecpglib</application> write <type>double</type> values with 15 digits precision (Akira Kurosawa) </para> </listitem> <listitem> <para> - In <application>ecpglib</>, be sure <literal>LC_NUMERIC</> setting is + In <application>ecpglib</application>, be sure <literal>LC_NUMERIC</literal> setting is restored after an error (Michael Meskes) </para> </listitem> @@ -1898,7 +1898,7 @@ </para> <para> - <filename>contrib/pg_crypto</>'s blowfish encryption code could give + <filename>contrib/pg_crypto</filename>'s blowfish encryption code could give wrong results on platforms where char is signed (which is most), leading to encrypted passwords being weaker than they should be. </para> @@ -1906,13 +1906,13 @@ <listitem> <para> - Fix memory leak in <filename>contrib/seg</> (Heikki Linnakangas) + Fix memory leak in <filename>contrib/seg</filename> (Heikki Linnakangas) </para> </listitem> <listitem> <para> - Fix <function>pgstatindex()</> to give consistent results for empty + Fix <function>pgstatindex()</function> to give consistent results for empty indexes (Tom Lane) </para> </listitem> @@ -1944,7 +1944,7 @@ <listitem> <para> - Update time zone data files to <application>tzdata</> release 2011i + Update time zone data files to <application>tzdata</application> release 2011i for DST law changes in Canada, Egypt, Russia, Samoa, and South Sudan. </para> </listitem> @@ -2013,15 +2013,15 @@ <listitem> <para> - Fix dangling-pointer problem in <literal>BEFORE ROW UPDATE</> trigger + Fix dangling-pointer problem in <literal>BEFORE ROW UPDATE</literal> trigger handling when there was a concurrent update to the target tuple (Tom Lane) </para> <para> This bug has been observed to result in intermittent <quote>cannot - extract system attribute from virtual tuple</> failures while trying to - do <literal>UPDATE RETURNING ctid</>. There is a very small probability + extract system attribute from virtual tuple</quote> failures while trying to + do <literal>UPDATE RETURNING ctid</literal>. There is a very small probability of more serious errors, such as generating incorrect index entries for the updated tuple. </para> @@ -2029,13 +2029,13 @@ <listitem> <para> - Disallow <command>DROP TABLE</> when there are pending deferred trigger + Disallow <command>DROP TABLE</command> when there are pending deferred trigger events for the table (Tom Lane) </para> <para> - Formerly the <command>DROP</> would go through, leading to - <quote>could not open relation with OID nnn</> errors when the + Formerly the <command>DROP</command> would go through, leading to + <quote>could not open relation with OID nnn</quote> errors when the triggers were eventually fired. </para> </listitem> @@ -2048,7 +2048,7 @@ <listitem> <para> - Fix <application>pg_restore</> to cope with long lines (over 1KB) in + Fix <application>pg_restore</application> to cope with long lines (over 1KB) in TOC files (Tom Lane) </para> </listitem> @@ -2080,14 +2080,14 @@ <listitem> <para> - Fix version-incompatibility problem with <application>libintl</> on + Fix version-incompatibility problem with <application>libintl</application> on Windows (Hiroshi Inoue) </para> </listitem> <listitem> <para> - Fix usage of <application>xcopy</> in Windows build scripts to + Fix usage of <application>xcopy</application> in Windows build scripts to work correctly under Windows 7 (Andrew Dunstan) </para> @@ -2098,14 +2098,14 @@ <listitem> <para> - Fix path separator used by <application>pg_regress</> on Cygwin + Fix path separator used by <application>pg_regress</application> on Cygwin (Andrew Dunstan) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2011f + Update time zone data files to <application>tzdata</application> release 2011f for DST law changes in Chile, Cuba, Falkland Islands, Morocco, Samoa, and Turkey; also historical corrections for South Australia, Alaska, and Hawaii. @@ -2149,15 +2149,15 @@ <listitem> <para> - Avoid failures when <command>EXPLAIN</> tries to display a simple-form - <literal>CASE</> expression (Tom Lane) + Avoid failures when <command>EXPLAIN</command> tries to display a simple-form + <literal>CASE</literal> expression (Tom Lane) </para> <para> - If the <literal>CASE</>'s test expression was a constant, the planner - could simplify the <literal>CASE</> into a form that confused the + If the <literal>CASE</literal>'s test expression was a constant, the planner + could simplify the <literal>CASE</literal> into a form that confused the expression-display code, resulting in <quote>unexpected CASE WHEN - clause</> errors. + clause</quote> errors. </para> </listitem> @@ -2182,44 +2182,44 @@ </para> <para> - The <type>date</> type supports a wider range of dates than can be - represented by the <type>timestamp</> types, but the planner assumed it + The <type>date</type> type supports a wider range of dates than can be + represented by the <type>timestamp</type> types, but the planner assumed it could always convert a date to timestamp with impunity. </para> </listitem> <listitem> <para> - Fix <application>pg_restore</>'s text output for large objects (BLOBs) - when <varname>standard_conforming_strings</> is on (Tom Lane) + Fix <application>pg_restore</application>'s text output for large objects (BLOBs) + when <varname>standard_conforming_strings</varname> is on (Tom Lane) </para> <para> Although restoring directly to a database worked correctly, string - escaping was incorrect if <application>pg_restore</> was asked for - SQL text output and <varname>standard_conforming_strings</> had been + escaping was incorrect if <application>pg_restore</application> was asked for + SQL text output and <varname>standard_conforming_strings</varname> had been enabled in the source database. </para> </listitem> <listitem> <para> - Fix erroneous parsing of <type>tsquery</> values containing + Fix erroneous parsing of <type>tsquery</type> values containing <literal>... & !(subexpression) | ...</literal> (Tom Lane) </para> <para> Queries containing this combination of operators were not executed - correctly. The same error existed in <filename>contrib/intarray</>'s - <type>query_int</> type and <filename>contrib/ltree</>'s - <type>ltxtquery</> type. + correctly. The same error existed in <filename>contrib/intarray</filename>'s + <type>query_int</type> type and <filename>contrib/ltree</filename>'s + <type>ltxtquery</type> type. </para> </listitem> <listitem> <para> - Fix buffer overrun in <filename>contrib/intarray</>'s input function - for the <type>query_int</> type (Apple) + Fix buffer overrun in <filename>contrib/intarray</filename>'s input function + for the <type>query_int</type> type (Apple) </para> <para> @@ -2231,16 +2231,16 @@ <listitem> <para> - Fix bug in <filename>contrib/seg</>'s GiST picksplit algorithm + Fix bug in <filename>contrib/seg</filename>'s GiST picksplit algorithm (Alexander Korotkov) </para> <para> This could result in considerable inefficiency, though not actually - incorrect answers, in a GiST index on a <type>seg</> column. - If you have such an index, consider <command>REINDEX</>ing it after + incorrect answers, in a GiST index on a <type>seg</type> column. + If you have such an index, consider <command>REINDEX</command>ing it after installing this update. (This is identical to the bug that was fixed in - <filename>contrib/cube</> in the previous update.) + <filename>contrib/cube</filename> in the previous update.) </para> </listitem> @@ -2282,17 +2282,17 @@ <listitem> <para> Force the default - <link linkend="guc-wal-sync-method"><varname>wal_sync_method</></link> - to be <literal>fdatasync</> on Linux (Tom Lane, Marti Raudsepp) + <link linkend="guc-wal-sync-method"><varname>wal_sync_method</varname></link> + to be <literal>fdatasync</literal> on Linux (Tom Lane, Marti Raudsepp) </para> <para> - The default on Linux has actually been <literal>fdatasync</> for many - years, but recent kernel changes caused <productname>PostgreSQL</> to - choose <literal>open_datasync</> instead. This choice did not result + The default on Linux has actually been <literal>fdatasync</literal> for many + years, but recent kernel changes caused <productname>PostgreSQL</productname> to + choose <literal>open_datasync</literal> instead. This choice did not result in any performance improvement, and caused outright failures on - certain filesystems, notably <literal>ext4</> with the - <literal>data=journal</> mount option. + certain filesystems, notably <literal>ext4</literal> with the + <literal>data=journal</literal> mount option. </para> </listitem> @@ -2302,7 +2302,7 @@ </para> <para> - This could result in <quote>bad buffer id: 0</> failures or + This could result in <quote>bad buffer id: 0</quote> failures or corruption of index contents during replication. </para> </listitem> @@ -2321,7 +2321,7 @@ </para> <para> - The effective <varname>vacuum_cost_limit</> for an autovacuum worker + The effective <varname>vacuum_cost_limit</varname> for an autovacuum worker could drop to nearly zero if it processed enough tables, causing it to run extremely slowly. </para> @@ -2329,19 +2329,19 @@ <listitem> <para> - Add support for detecting register-stack overrun on <literal>IA64</> + Add support for detecting register-stack overrun on <literal>IA64</literal> (Tom Lane) </para> <para> - The <literal>IA64</> architecture has two hardware stacks. Full + The <literal>IA64</literal> architecture has two hardware stacks. Full prevention of stack-overrun failures requires checking both. </para> </listitem> <listitem> <para> - Add a check for stack overflow in <function>copyObject()</> (Tom Lane) + Add a check for stack overflow in <function>copyObject()</function> (Tom Lane) </para> <para> @@ -2357,7 +2357,7 @@ </para> <para> - It is possible to have a <quote>concurrent</> page split in a + It is possible to have a <quote>concurrent</quote> page split in a temporary index, if for example there is an open cursor scanning the index when an insertion is done. GiST failed to detect this case and hence could deliver wrong results when execution of the cursor @@ -2367,7 +2367,7 @@ <listitem> <para> - Avoid memory leakage while <command>ANALYZE</>'ing complex index + Avoid memory leakage while <command>ANALYZE</command>'ing complex index expressions (Tom Lane) </para> </listitem> @@ -2379,14 +2379,14 @@ </para> <para> - An index declared like <literal>create index i on t (foo(t.*))</> + An index declared like <literal>create index i on t (foo(t.*))</literal> would not automatically get dropped when its table was dropped. </para> </listitem> <listitem> <para> - Do not <quote>inline</> a SQL function with multiple <literal>OUT</> + Do not <quote>inline</quote> a SQL function with multiple <literal>OUT</literal> parameters (Tom Lane) </para> @@ -2398,15 +2398,15 @@ <listitem> <para> - Behave correctly if <literal>ORDER BY</>, <literal>LIMIT</>, - <literal>FOR UPDATE</>, or <literal>WITH</> is attached to the - <literal>VALUES</> part of <literal>INSERT ... VALUES</> (Tom Lane) + Behave correctly if <literal>ORDER BY</literal>, <literal>LIMIT</literal>, + <literal>FOR UPDATE</literal>, or <literal>WITH</literal> is attached to the + <literal>VALUES</literal> part of <literal>INSERT ... VALUES</literal> (Tom Lane) </para> </listitem> <listitem> <para> - Fix constant-folding of <literal>COALESCE()</> expressions (Tom Lane) + Fix constant-folding of <literal>COALESCE()</literal> expressions (Tom Lane) </para> <para> @@ -2418,7 +2418,7 @@ <listitem> <para> Fix postmaster crash when connection acceptance - (<function>accept()</> or one of the calls made immediately after it) + (<function>accept()</function> or one of the calls made immediately after it) fails, and the postmaster was compiled with GSSAPI support (Alexander Chernikov) </para> @@ -2426,7 +2426,7 @@ <listitem> <para> - Fix missed unlink of temporary files when <varname>log_temp_files</> + Fix missed unlink of temporary files when <varname>log_temp_files</varname> is active (Tom Lane) </para> @@ -2438,11 +2438,11 @@ <listitem> <para> - Add print functionality for <structname>InhRelation</> nodes (Tom Lane) + Add print functionality for <structname>InhRelation</structname> nodes (Tom Lane) </para> <para> - This avoids a failure when <varname>debug_print_parse</> is enabled + This avoids a failure when <varname>debug_print_parse</varname> is enabled and certain types of query are executed. </para> </listitem> @@ -2461,14 +2461,14 @@ <listitem> <para> - Fix <application>PL/pgSQL</>'s handling of <quote>simple</> + Fix <application>PL/pgSQL</application>'s handling of <quote>simple</quote> expressions to not fail in recursion or error-recovery cases (Tom Lane) </para> </listitem> <listitem> <para> - Fix <application>PL/Python</>'s handling of set-returning functions + Fix <application>PL/Python</application>'s handling of set-returning functions (Jan Urbanski) </para> @@ -2480,22 +2480,22 @@ <listitem> <para> - Fix bug in <filename>contrib/cube</>'s GiST picksplit algorithm + Fix bug in <filename>contrib/cube</filename>'s GiST picksplit algorithm (Alexander Korotkov) </para> <para> This could result in considerable inefficiency, though not actually - incorrect answers, in a GiST index on a <type>cube</> column. - If you have such an index, consider <command>REINDEX</>ing it after + incorrect answers, in a GiST index on a <type>cube</type> column. + If you have such an index, consider <command>REINDEX</command>ing it after installing this update. </para> </listitem> <listitem> <para> - Don't emit <quote>identifier will be truncated</> notices in - <filename>contrib/dblink</> except when creating new connections + Don't emit <quote>identifier will be truncated</quote> notices in + <filename>contrib/dblink</filename> except when creating new connections (Itagaki Takahiro) </para> </listitem> @@ -2503,20 +2503,20 @@ <listitem> <para> Fix potential coredump on missing public key in - <filename>contrib/pgcrypto</> (Marti Raudsepp) + <filename>contrib/pgcrypto</filename> (Marti Raudsepp) </para> </listitem> <listitem> <para> - Fix memory leak in <filename>contrib/xml2</>'s XPath query functions + Fix memory leak in <filename>contrib/xml2</filename>'s XPath query functions (Tom Lane) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2010o + Update time zone data files to <application>tzdata</application> release 2010o for DST law changes in Fiji and Samoa; also historical corrections for Hong Kong. </para> @@ -2567,7 +2567,7 @@ This change prevents security problems that can be caused by subverting Perl or Tcl code that will be executed later in the same session under another SQL user identity (for example, within a <literal>SECURITY - DEFINER</> function). Most scripting languages offer numerous ways that + DEFINER</literal> function). Most scripting languages offer numerous ways that that might be done, such as redefining standard functions or operators called by the target function. Without this change, any SQL user with Perl or Tcl language usage rights can do essentially anything with the @@ -2596,7 +2596,7 @@ <listitem> <para> - Prevent possible crashes in <function>pg_get_expr()</> by disallowing + Prevent possible crashes in <function>pg_get_expr()</function> by disallowing it from being called with an argument that is not one of the system catalog columns it's intended to be used with (Heikki Linnakangas, Tom Lane) @@ -2605,7 +2605,7 @@ <listitem> <para> - Treat exit code 128 (<literal>ERROR_WAIT_NO_CHILDREN</>) as non-fatal on + Treat exit code 128 (<literal>ERROR_WAIT_NO_CHILDREN</literal>) as non-fatal on Windows (Magnus Hagander) </para> @@ -2627,13 +2627,13 @@ This is a back-patch of an 8.4 fix that was missed in the 8.3 branch. This corrects an error introduced in 8.3.8 that could cause incorrect results for outer joins when the inner relation is an inheritance tree - or <literal>UNION ALL</> subquery. + or <literal>UNION ALL</literal> subquery. </para> </listitem> <listitem> <para> - Fix possible duplicate scans of <literal>UNION ALL</> member relations + Fix possible duplicate scans of <literal>UNION ALL</literal> member relations (Tom Lane) </para> </listitem> @@ -2655,7 +2655,7 @@ </para> <para> - If a plan is prepared while <command>CREATE INDEX CONCURRENTLY</> is + If a plan is prepared while <command>CREATE INDEX CONCURRENTLY</command> is in progress for one of the referenced tables, it is supposed to be re-planned once the index is ready for use. This was not happening reliably. @@ -2709,7 +2709,7 @@ <listitem> <para> Take care to fsync the contents of lockfiles (both - <filename>postmaster.pid</> and the socket lockfile) while writing them + <filename>postmaster.pid</filename> and the socket lockfile) while writing them (Tom Lane) </para> @@ -2746,7 +2746,7 @@ <listitem> <para> - Fix <varname>log_line_prefix</>'s <literal>%i</> escape, + Fix <varname>log_line_prefix</varname>'s <literal>%i</literal> escape, which could produce junk early in backend startup (Tom Lane) </para> </listitem> @@ -2754,35 +2754,35 @@ <listitem> <para> Fix possible data corruption in <command>ALTER TABLE ... SET - TABLESPACE</> when archiving is enabled (Jeff Davis) + TABLESPACE</command> when archiving is enabled (Jeff Davis) </para> </listitem> <listitem> <para> - Allow <command>CREATE DATABASE</> and <command>ALTER DATABASE ... SET - TABLESPACE</> to be interrupted by query-cancel (Guillaume Lelarge) + Allow <command>CREATE DATABASE</command> and <command>ALTER DATABASE ... SET + TABLESPACE</command> to be interrupted by query-cancel (Guillaume Lelarge) </para> </listitem> <listitem> <para> - Fix <command>REASSIGN OWNED</> to handle operator classes and families + Fix <command>REASSIGN OWNED</command> to handle operator classes and families (Asko Tiidumaa) </para> </listitem> <listitem> <para> - Fix possible core dump when comparing two empty <type>tsquery</> values + Fix possible core dump when comparing two empty <type>tsquery</type> values (Tom Lane) </para> </listitem> <listitem> <para> - Fix <literal>LIKE</>'s handling of patterns containing <literal>%</> - followed by <literal>_</> (Tom Lane) + Fix <literal>LIKE</literal>'s handling of patterns containing <literal>%</literal> + followed by <literal>_</literal> (Tom Lane) </para> <para> @@ -2794,14 +2794,14 @@ <listitem> <para> In PL/Python, defend against null pointer results from - <function>PyCObject_AsVoidPtr</> and <function>PyCObject_FromVoidPtr</> + <function>PyCObject_AsVoidPtr</function> and <function>PyCObject_FromVoidPtr</function> (Peter Eisentraut) </para> </listitem> <listitem> <para> - Make psql recognize <command>DISCARD ALL</> as a command that should + Make psql recognize <command>DISCARD ALL</command> as a command that should not be encased in a transaction block in autocommit-off mode (Itagaki Takahiro) </para> @@ -2809,14 +2809,14 @@ <listitem> <para> - Fix <application>ecpg</> to process data from <literal>RETURNING</> + Fix <application>ecpg</application> to process data from <literal>RETURNING</literal> clauses correctly (Michael Meskes) </para> </listitem> <listitem> <para> - Improve <filename>contrib/dblink</>'s handling of tables containing + Improve <filename>contrib/dblink</filename>'s handling of tables containing dropped columns (Tom Lane) </para> </listitem> @@ -2824,30 +2824,30 @@ <listitem> <para> Fix connection leak after <quote>duplicate connection name</quote> - errors in <filename>contrib/dblink</> (Itagaki Takahiro) + errors in <filename>contrib/dblink</filename> (Itagaki Takahiro) </para> </listitem> <listitem> <para> - Fix <filename>contrib/dblink</> to handle connection names longer than + Fix <filename>contrib/dblink</filename> to handle connection names longer than 62 bytes correctly (Itagaki Takahiro) </para> </listitem> <listitem> <para> - Add <function>hstore(text, text)</> - function to <filename>contrib/hstore</> (Robert Haas) + Add <function>hstore(text, text)</function> + function to <filename>contrib/hstore</filename> (Robert Haas) </para> <para> This function is the recommended substitute for the now-deprecated - <literal>=></> operator. It was back-patched so that future-proofed + <literal>=></literal> operator. It was back-patched so that future-proofed code can be used with older server versions. Note that the patch will - be effective only after <filename>contrib/hstore</> is installed or + be effective only after <filename>contrib/hstore</filename> is installed or reinstalled in a particular database. Users might prefer to execute - the <command>CREATE FUNCTION</> command by hand, instead. + the <command>CREATE FUNCTION</command> command by hand, instead. </para> </listitem> @@ -2860,7 +2860,7 @@ <listitem> <para> - Update time zone data files to <application>tzdata</> release 2010l + Update time zone data files to <application>tzdata</application> release 2010l for DST law changes in Egypt and Palestine; also historical corrections for Finland. </para> @@ -2875,7 +2875,7 @@ <listitem> <para> - Make Windows' <quote>N. Central Asia Standard Time</> timezone map to + Make Windows' <quote>N. Central Asia Standard Time</quote> timezone map to Asia/Novosibirsk, not Asia/Almaty (Magnus Hagander) </para> @@ -2922,19 +2922,19 @@ <listitem> <para> - Enforce restrictions in <literal>plperl</> using an opmask applied to - the whole interpreter, instead of using <filename>Safe.pm</> + Enforce restrictions in <literal>plperl</literal> using an opmask applied to + the whole interpreter, instead of using <filename>Safe.pm</filename> (Tim Bunce, Andrew Dunstan) </para> <para> - Recent developments have convinced us that <filename>Safe.pm</> is too - insecure to rely on for making <literal>plperl</> trustable. This - change removes use of <filename>Safe.pm</> altogether, in favor of using + Recent developments have convinced us that <filename>Safe.pm</filename> is too + insecure to rely on for making <literal>plperl</literal> trustable. This + change removes use of <filename>Safe.pm</filename> altogether, in favor of using a separate interpreter with an opcode mask that is always applied. Pleasant side effects of the change include that it is now possible to - use Perl's <literal>strict</> pragma in a natural way in - <literal>plperl</>, and that Perl's <literal>$a</> and <literal>$b</> + use Perl's <literal>strict</literal> pragma in a natural way in + <literal>plperl</literal>, and that Perl's <literal>$a</literal> and <literal>$b</literal> variables work as expected in sort routines, and that function compilation is significantly faster. (CVE-2010-1169) </para> @@ -2943,19 +2943,19 @@ <listitem> <para> Prevent PL/Tcl from executing untrustworthy code from - <structname>pltcl_modules</> (Tom) + <structname>pltcl_modules</structname> (Tom) </para> <para> PL/Tcl's feature for autoloading Tcl code from a database table could be exploited for trojan-horse attacks, because there was no restriction on who could create or insert into that table. This change - disables the feature unless <structname>pltcl_modules</> is owned by a + disables the feature unless <structname>pltcl_modules</structname> is owned by a superuser. (However, the permissions on the table are not checked, so installations that really need a less-than-secure modules table can still grant suitable privileges to trusted non-superusers.) Also, - prevent loading code into the unrestricted <quote>normal</> Tcl - interpreter unless we are really going to execute a <literal>pltclu</> + prevent loading code into the unrestricted <quote>normal</quote> Tcl + interpreter unless we are really going to execute a <literal>pltclu</literal> function. (CVE-2010-1170) </para> </listitem> @@ -2980,7 +2980,7 @@ <para> This avoids failures if the function's code is invalid without the setting; an example is that SQL functions may not parse if the - <varname>search_path</> is not correct. + <varname>search_path</varname> is not correct. </para> </listitem> @@ -2992,10 +2992,10 @@ <para> Previously, if an unprivileged user ran <literal>ALTER USER ... RESET - ALL</> for himself, or <literal>ALTER DATABASE ... RESET ALL</> for + ALL</literal> for himself, or <literal>ALTER DATABASE ... RESET ALL</literal> for a database he owns, this would remove all special parameter settings for the user or database, even ones that are only supposed to be - changeable by a superuser. Now, the <command>ALTER</> will only + changeable by a superuser. Now, the <command>ALTER</command> will only remove the parameters that the user has permission to change. </para> </listitem> @@ -3003,7 +3003,7 @@ <listitem> <para> Avoid possible crash during backend shutdown if shutdown occurs - when a <literal>CONTEXT</> addition would be made to log entries (Tom) + when a <literal>CONTEXT</literal> addition would be made to log entries (Tom) </para> <para> @@ -3016,13 +3016,13 @@ <listitem> <para> Ensure the archiver process responds to changes in - <varname>archive_command</> as soon as possible (Tom) + <varname>archive_command</varname> as soon as possible (Tom) </para> </listitem> <listitem> <para> - Update PL/Perl's <filename>ppport.h</> for modern Perl versions + Update PL/Perl's <filename>ppport.h</filename> for modern Perl versions (Andrew) </para> </listitem> @@ -3035,15 +3035,15 @@ <listitem> <para> - Prevent infinite recursion in <application>psql</> when expanding + Prevent infinite recursion in <application>psql</application> when expanding a variable that refers to itself (Tom) </para> </listitem> <listitem> <para> - Fix <application>psql</>'s <literal>\copy</> to not add spaces around - a dot within <literal>\copy (select ...)</> (Tom) + Fix <application>psql</application>'s <literal>\copy</literal> to not add spaces around + a dot within <literal>\copy (select ...)</literal> (Tom) </para> <para> @@ -3054,15 +3054,15 @@ <listitem> <para> - Fix unnecessary <quote>GIN indexes do not support whole-index scans</> - errors for unsatisfiable queries using <filename>contrib/intarray</> + Fix unnecessary <quote>GIN indexes do not support whole-index scans</quote> + errors for unsatisfiable queries using <filename>contrib/intarray</filename> operators (Tom) </para> </listitem> <listitem> <para> - Ensure that <filename>contrib/pgstattuple</> functions respond to cancel + Ensure that <filename>contrib/pgstattuple</filename> functions respond to cancel interrupts promptly (Tatsuhito Kasahara) </para> </listitem> @@ -3070,7 +3070,7 @@ <listitem> <para> Make server startup deal properly with the case that - <function>shmget()</> returns <literal>EINVAL</> for an existing + <function>shmget()</function> returns <literal>EINVAL</literal> for an existing shared memory segment (Tom) </para> @@ -3102,14 +3102,14 @@ <listitem> <para> - Update time zone data files to <application>tzdata</> release 2010j + Update time zone data files to <application>tzdata</application> release 2010j for DST law changes in Argentina, Australian Antarctic, Bangladesh, Mexico, Morocco, Pakistan, Palestine, Russia, Syria, Tunisia; also historical corrections for Taiwan. </para> <para> - Also, add <literal>PKST</> (Pakistan Summer Time) to the default set of + Also, add <literal>PKST</literal> (Pakistan Summer Time) to the default set of timezone abbreviations. </para> </listitem> @@ -3151,7 +3151,7 @@ <listitem> <para> - Add new configuration parameter <varname>ssl_renegotiation_limit</> to + Add new configuration parameter <varname>ssl_renegotiation_limit</varname> to control how often we do session key renegotiation for an SSL connection (Magnus) </para> @@ -3214,8 +3214,8 @@ <listitem> <para> - Make <function>substring()</> for <type>bit</> types treat any negative - length as meaning <quote>all the rest of the string</> (Tom) + Make <function>substring()</function> for <type>bit</type> types treat any negative + length as meaning <quote>all the rest of the string</quote> (Tom) </para> <para> @@ -3241,7 +3241,7 @@ <listitem> <para> - Fix assorted crashes in <type>xml</> processing caused by sloppy + Fix assorted crashes in <type>xml</type> processing caused by sloppy memory management (Tom) </para> @@ -3261,7 +3261,7 @@ <listitem> <para> - Fix the <literal>STOP WAL LOCATION</> entry in backup history files to + Fix the <literal>STOP WAL LOCATION</literal> entry in backup history files to report the next WAL segment's name when the end location is exactly at a segment boundary (Itagaki Takahiro) </para> @@ -3283,23 +3283,23 @@ <para> Improve constraint exclusion processing of boolean-variable cases, in particular make it possible to exclude a partition that has a - <quote>bool_column = false</> constraint (Tom) + <quote>bool_column = false</quote> constraint (Tom) </para> </listitem> <listitem> <para> - When reading <filename>pg_hba.conf</> and related files, do not treat - <literal>@something</> as a file inclusion request if the <literal>@</> - appears inside quote marks; also, never treat <literal>@</> by itself + When reading <filename>pg_hba.conf</filename> and related files, do not treat + <literal>@something</literal> as a file inclusion request if the <literal>@</literal> + appears inside quote marks; also, never treat <literal>@</literal> by itself as a file inclusion request (Tom) </para> <para> This prevents erratic behavior if a role or database name starts with - <literal>@</>. If you need to include a file whose path name + <literal>@</literal>. If you need to include a file whose path name contains spaces, you can still do so, but you must write - <literal>@"/path to/file"</> rather than putting the quotes around + <literal>@"/path to/file"</literal> rather than putting the quotes around the whole construct. </para> </listitem> @@ -3307,49 +3307,49 @@ <listitem> <para> Prevent infinite loop on some platforms if a directory is named as - an inclusion target in <filename>pg_hba.conf</> and related files + an inclusion target in <filename>pg_hba.conf</filename> and related files (Tom) </para> </listitem> <listitem> <para> - Fix possible infinite loop if <function>SSL_read</> or - <function>SSL_write</> fails without setting <varname>errno</> (Tom) + Fix possible infinite loop if <function>SSL_read</function> or + <function>SSL_write</function> fails without setting <varname>errno</varname> (Tom) </para> <para> This is reportedly possible with some Windows versions of - <application>openssl</>. + <application>openssl</application>. </para> </listitem> <listitem> <para> - Disallow <acronym>GSSAPI</> authentication on local connections, + Disallow <acronym>GSSAPI</acronym> authentication on local connections, since it requires a hostname to function correctly (Magnus) </para> </listitem> <listitem> <para> - Make <application>ecpg</> report the proper SQLSTATE if the connection + Make <application>ecpg</application> report the proper SQLSTATE if the connection disappears (Michael) </para> </listitem> <listitem> <para> - Fix <application>psql</>'s <literal>numericlocale</> option to not + Fix <application>psql</application>'s <literal>numericlocale</literal> option to not format strings it shouldn't in latex and troff output formats (Heikki) </para> </listitem> <listitem> <para> - Make <application>psql</> return the correct exit status (3) when - <literal>ON_ERROR_STOP</> and <literal>--single-transaction</> are - both specified and an error occurs during the implied <command>COMMIT</> + Make <application>psql</application> return the correct exit status (3) when + <literal>ON_ERROR_STOP</literal> and <literal>--single-transaction</literal> are + both specified and an error occurs during the implied <command>COMMIT</command> (Bruce) </para> </listitem> @@ -3370,7 +3370,7 @@ <listitem> <para> - Add <literal>volatile</> markings in PL/Python to avoid possible + Add <literal>volatile</literal> markings in PL/Python to avoid possible compiler-specific misbehavior (Zdenek Kotala) </para> </listitem> @@ -3382,43 +3382,43 @@ <para> The only known symptom of this oversight is that the Tcl - <literal>clock</> command misbehaves if using Tcl 8.5 or later. + <literal>clock</literal> command misbehaves if using Tcl 8.5 or later. </para> </listitem> <listitem> <para> - Prevent crash in <filename>contrib/dblink</> when too many key - columns are specified to a <function>dblink_build_sql_*</> function + Prevent crash in <filename>contrib/dblink</filename> when too many key + columns are specified to a <function>dblink_build_sql_*</function> function (Rushabh Lathia, Joe Conway) </para> </listitem> <listitem> <para> - Allow zero-dimensional arrays in <filename>contrib/ltree</> operations + Allow zero-dimensional arrays in <filename>contrib/ltree</filename> operations (Tom) </para> <para> This case was formerly rejected as an error, but it's more convenient to treat it the same as a zero-element array. In particular this avoids - unnecessary failures when an <type>ltree</> operation is applied to the - result of <literal>ARRAY(SELECT ...)</> and the sub-select returns no + unnecessary failures when an <type>ltree</type> operation is applied to the + result of <literal>ARRAY(SELECT ...)</literal> and the sub-select returns no rows. </para> </listitem> <listitem> <para> - Fix assorted crashes in <filename>contrib/xml2</> caused by sloppy + Fix assorted crashes in <filename>contrib/xml2</filename> caused by sloppy memory management (Tom) </para> </listitem> <listitem> <para> - Make building of <filename>contrib/xml2</> more robust on Windows + Make building of <filename>contrib/xml2</filename> more robust on Windows (Andrew) </para> </listitem> @@ -3429,14 +3429,14 @@ </para> <para> - One known symptom of this bug is that rows in <structname>pg_listener</> + One known symptom of this bug is that rows in <structname>pg_listener</structname> could be dropped under heavy load. </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2010e + Update time zone data files to <application>tzdata</application> release 2010e for DST law changes in Bangladesh, Chile, Fiji, Mexico, Paraguay, Samoa. </para> </listitem> @@ -3514,14 +3514,14 @@ <listitem> <para> - Prevent signals from interrupting <literal>VACUUM</> at unsafe times + Prevent signals from interrupting <literal>VACUUM</literal> at unsafe times (Alvaro) </para> <para> - This fix prevents a PANIC if a <literal>VACUUM FULL</> is canceled + This fix prevents a PANIC if a <literal>VACUUM FULL</literal> is canceled after it's already committed its tuple movements, as well as transient - errors if a plain <literal>VACUUM</> is interrupted after having + errors if a plain <literal>VACUUM</literal> is interrupted after having truncated the table. </para> </listitem> @@ -3540,7 +3540,7 @@ <listitem> <para> - Fix very rare crash in <type>inet</>/<type>cidr</> comparisons (Chris + Fix very rare crash in <type>inet</type>/<type>cidr</type> comparisons (Chris Mikkelson) </para> </listitem> @@ -3617,7 +3617,7 @@ <para> The previous code is known to fail with the combination of the Linux - <literal>pam_krb5</> PAM module with Microsoft Active Directory as the + <literal>pam_krb5</literal> PAM module with Microsoft Active Directory as the domain controller. It might have problems elsewhere too, since it was making unjustified assumptions about what arguments the PAM stack would pass to it. @@ -3650,19 +3650,19 @@ <listitem> <para> Fix processing of ownership dependencies during <literal>CREATE OR - REPLACE FUNCTION</> (Tom) + REPLACE FUNCTION</literal> (Tom) </para> </listitem> <listitem> <para> - Fix incorrect handling of <literal>WHERE</> - <replaceable>x</>=<replaceable>x</> conditions (Tom) + Fix incorrect handling of <literal>WHERE</literal> + <replaceable>x</replaceable>=<replaceable>x</replaceable> conditions (Tom) </para> <para> In some cases these could get ignored as redundant, but they aren't - — they're equivalent to <replaceable>x</> <literal>IS NOT NULL</>. + — they're equivalent to <replaceable>x</replaceable> <literal>IS NOT NULL</literal>. </para> </listitem> @@ -3674,7 +3674,7 @@ <listitem> <para> - Fix encoding handling in <type>xml</> binary input (Heikki) + Fix encoding handling in <type>xml</type> binary input (Heikki) </para> <para> @@ -3685,7 +3685,7 @@ <listitem> <para> - Fix bug with calling <literal>plperl</> from <literal>plperlu</> or vice + Fix bug with calling <literal>plperl</literal> from <literal>plperlu</literal> or vice versa (Tom) </para> @@ -3705,7 +3705,7 @@ <listitem> <para> Ensure that Perl arrays are properly converted to - <productname>PostgreSQL</> arrays when returned by a set-returning + <productname>PostgreSQL</productname> arrays when returned by a set-returning PL/Perl function (Andrew Dunstan, Abhijit Menon-Sen) </para> @@ -3722,7 +3722,7 @@ <listitem> <para> - In <filename>contrib/pg_standby</>, disable triggering failover with a + In <filename>contrib/pg_standby</filename>, disable triggering failover with a signal on Windows (Fujii Masao) </para> @@ -3734,20 +3734,20 @@ <listitem> <para> - Ensure <application>psql</>'s flex module is compiled with the correct + Ensure <application>psql</application>'s flex module is compiled with the correct system header definitions (Tom) </para> <para> This fixes build failures on platforms where - <literal>--enable-largefile</> causes incompatible changes in the + <literal>--enable-largefile</literal> causes incompatible changes in the generated code. </para> </listitem> <listitem> <para> - Make the postmaster ignore any <literal>application_name</> parameter in + Make the postmaster ignore any <literal>application_name</literal> parameter in connection request packets, to improve compatibility with future libpq versions (Tom) </para> @@ -3760,14 +3760,14 @@ </para> <para> - This includes adding <literal>IDT</> and <literal>SGT</> to the default + This includes adding <literal>IDT</literal> and <literal>SGT</literal> to the default timezone abbreviation set. </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2009s + Update time zone data files to <application>tzdata</application> release 2009s for DST law changes in Antarctica, Argentina, Bangladesh, Fiji, Novokuznetsk, Pakistan, Palestine, Samoa, Syria; also historical corrections for Hong Kong. @@ -3798,8 +3798,8 @@ <para> A dump/restore is not required for those running 8.3.X. - However, if you have any hash indexes on <type>interval</> columns, - you must <command>REINDEX</> them after updating to 8.3.8. + However, if you have any hash indexes on <type>interval</type> columns, + you must <command>REINDEX</command> them after updating to 8.3.8. Also, if you are upgrading from a version earlier than 8.3.5, see <xref linkend="release-8-3-5">. </para> @@ -3818,13 +3818,13 @@ <para> This bug led to the often-reported <quote>could not reattach - to shared memory</> error message. + to shared memory</quote> error message. </para> </listitem> <listitem> <para> - Force WAL segment switch during <function>pg_start_backup()</> + Force WAL segment switch during <function>pg_start_backup()</function> (Heikki) </para> @@ -3835,26 +3835,26 @@ <listitem> <para> - Disallow <command>RESET ROLE</> and <command>RESET SESSION - AUTHORIZATION</> inside security-definer functions (Tom, Heikki) + Disallow <command>RESET ROLE</command> and <command>RESET SESSION + AUTHORIZATION</command> inside security-definer functions (Tom, Heikki) </para> <para> This covers a case that was missed in the previous patch that - disallowed <command>SET ROLE</> and <command>SET SESSION - AUTHORIZATION</> inside security-definer functions. + disallowed <command>SET ROLE</command> and <command>SET SESSION + AUTHORIZATION</command> inside security-definer functions. (See CVE-2007-6600) </para> </listitem> <listitem> <para> - Make <command>LOAD</> of an already-loaded loadable module + Make <command>LOAD</command> of an already-loaded loadable module into a no-op (Tom) </para> <para> - Formerly, <command>LOAD</> would attempt to unload and re-load the + Formerly, <command>LOAD</command> would attempt to unload and re-load the module, but this is unsafe and not all that useful. </para> </listitem> @@ -3881,8 +3881,8 @@ <listitem> <para> - Prevent <varname>synchronize_seqscans</> from changing the results of - scrollable and <literal>WITH HOLD</> cursors (Tom) + Prevent <varname>synchronize_seqscans</varname> from changing the results of + scrollable and <literal>WITH HOLD</literal> cursors (Tom) </para> </listitem> @@ -3896,32 +3896,32 @@ <listitem> <para> - Fix hash calculation for data type <type>interval</> (Tom) + Fix hash calculation for data type <type>interval</type> (Tom) </para> <para> This corrects wrong results for hash joins on interval values. It also changes the contents of hash indexes on interval columns. - If you have any such indexes, you must <command>REINDEX</> them + If you have any such indexes, you must <command>REINDEX</command> them after updating. </para> </listitem> <listitem> <para> - Treat <function>to_char(..., 'TH')</> as an uppercase ordinal - suffix with <literal>'HH'</>/<literal>'HH12'</> (Heikki) + Treat <function>to_char(..., 'TH')</function> as an uppercase ordinal + suffix with <literal>'HH'</literal>/<literal>'HH12'</literal> (Heikki) </para> <para> - It was previously handled as <literal>'th'</> (lowercase). + It was previously handled as <literal>'th'</literal> (lowercase). </para> </listitem> <listitem> <para> - Fix overflow for <literal>INTERVAL '<replaceable>x</> ms'</literal> - when <replaceable>x</> is more than 2 million and integer + Fix overflow for <literal>INTERVAL '<replaceable>x</replaceable> ms'</literal> + when <replaceable>x</replaceable> is more than 2 million and integer datetimes are in use (Alex Hunsaker) </para> </listitem> @@ -3938,14 +3938,14 @@ <listitem> <para> - Fix <type>money</> data type to work in locales where currency + Fix <type>money</type> data type to work in locales where currency amounts have no fractional digits, e.g. Japan (Itagaki Takahiro) </para> </listitem> <listitem> <para> - Fix <literal>LIKE</> for case where pattern contains <literal>%_</> + Fix <literal>LIKE</literal> for case where pattern contains <literal>%_</literal> (Tom) </para> </listitem> @@ -3953,7 +3953,7 @@ <listitem> <para> Properly round datetime input like - <literal>00:12:57.9999999999999999999999999999</> (Tom) + <literal>00:12:57.9999999999999999999999999999</literal> (Tom) </para> </listitem> @@ -3972,8 +3972,8 @@ <listitem> <para> - Ensure that a <quote>fast shutdown</> request will forcibly terminate - open sessions, even if a <quote>smart shutdown</> was already in progress + Ensure that a <quote>fast shutdown</quote> request will forcibly terminate + open sessions, even if a <quote>smart shutdown</quote> was already in progress (Fujii Masao) </para> </listitem> @@ -4000,35 +4000,35 @@ <listitem> <para> - Fix <application>pg_ctl</> to not go into an infinite loop if - <filename>postgresql.conf</> is empty (Jeff Davis) + Fix <application>pg_ctl</application> to not go into an infinite loop if + <filename>postgresql.conf</filename> is empty (Jeff Davis) </para> </listitem> <listitem> <para> - Improve <application>pg_dump</>'s efficiency when there are + Improve <application>pg_dump</application>'s efficiency when there are many large objects (Tamas Vincze) </para> </listitem> <listitem> <para> - Use <literal>SIGUSR1</>, not <literal>SIGQUIT</>, as the - failover signal for <application>pg_standby</> (Heikki) + Use <literal>SIGUSR1</literal>, not <literal>SIGQUIT</literal>, as the + failover signal for <application>pg_standby</application> (Heikki) </para> </listitem> <listitem> <para> - Make <application>pg_standby</>'s <literal>maxretries</> option + Make <application>pg_standby</application>'s <literal>maxretries</literal> option behave as documented (Fujii Masao) </para> </listitem> <listitem> <para> - Make <filename>contrib/hstore</> throw an error when a key or + Make <filename>contrib/hstore</filename> throw an error when a key or value is too long to fit in its data structure, rather than silently truncating it (Andrew Gierth) </para> @@ -4036,15 +4036,15 @@ <listitem> <para> - Fix <filename>contrib/xml2</>'s <function>xslt_process()</> to + Fix <filename>contrib/xml2</filename>'s <function>xslt_process()</function> to properly handle the maximum number of parameters (twenty) (Tom) </para> </listitem> <listitem> <para> - Improve robustness of <application>libpq</>'s code to recover - from errors during <command>COPY FROM STDIN</> (Tom) + Improve robustness of <application>libpq</application>'s code to recover + from errors during <command>COPY FROM STDIN</command> (Tom) </para> </listitem> @@ -4057,7 +4057,7 @@ <listitem> <para> - Update time zone data files to <application>tzdata</> release 2009l + Update time zone data files to <application>tzdata</application> release 2009l for DST law changes in Bangladesh, Egypt, Jordan, Pakistan, Argentina/San_Luis, Cuba, Jordan (historical correction only), Mauritius, Morocco, Palestine, Syria, Tunisia. @@ -4108,7 +4108,7 @@ This change extends fixes made in the last two minor releases for related failure scenarios. The previous fixes were narrowly tailored for the original problem reports, but we have now recognized that - <emphasis>any</> error thrown by an encoding conversion function could + <emphasis>any</emphasis> error thrown by an encoding conversion function could potentially lead to infinite recursion while trying to report the error. The solution therefore is to disable translation and encoding conversion and report the plain-ASCII form of any error message, @@ -4119,7 +4119,7 @@ <listitem> <para> - Disallow <command>CREATE CONVERSION</> with the wrong encodings + Disallow <command>CREATE CONVERSION</command> with the wrong encodings for the specified conversion function (Heikki) </para> @@ -4132,19 +4132,19 @@ <listitem> <para> - Fix <function>xpath()</> to not modify the path expression unless + Fix <function>xpath()</function> to not modify the path expression unless necessary, and to make a saner attempt at it when necessary (Andrew) </para> <para> - The SQL standard suggests that <function>xpath</> should work on data - that is a document fragment, but <application>libxml</> doesn't support + The SQL standard suggests that <function>xpath</function> should work on data + that is a document fragment, but <application>libxml</application> doesn't support that, and indeed it's not clear that this is sensible according to the - XPath standard. <function>xpath</> attempted to work around this + XPath standard. <function>xpath</function> attempted to work around this mismatch by modifying both the data and the path expression, but the modification was buggy and could cause valid searches to fail. Now, - <function>xpath</> checks whether the data is in fact a well-formed - document, and if so invokes <application>libxml</> with no change to the + <function>xpath</function> checks whether the data is in fact a well-formed + document, and if so invokes <application>libxml</application> with no change to the data or path expression. Otherwise, a different modification method that is somewhat less likely to fail is used. </para> @@ -4155,15 +4155,15 @@ seems likely that no real solution is possible. This patch should therefore be viewed as a band-aid to keep from breaking existing applications unnecessarily. It is likely that - <productname>PostgreSQL</> 8.4 will simply reject use of - <function>xpath</> on data that is not a well-formed document. + <productname>PostgreSQL</productname> 8.4 will simply reject use of + <function>xpath</function> on data that is not a well-formed document. </para> </note> </listitem> <listitem> <para> - Fix core dump when <function>to_char()</> is given format codes that + Fix core dump when <function>to_char()</function> is given format codes that are inappropriate for the type of the data argument (Tom) </para> </listitem> @@ -4175,40 +4175,40 @@ </para> <para> - Crashes were possible on platforms where <type>wchar_t</> is narrower - than <type>int</>; Windows in particular. + Crashes were possible on platforms where <type>wchar_t</type> is narrower + than <type>int</type>; Windows in particular. </para> </listitem> <listitem> <para> Fix extreme inefficiency in text search parser's handling of an - email-like string containing multiple <literal>@</> characters (Heikki) + email-like string containing multiple <literal>@</literal> characters (Heikki) </para> </listitem> <listitem> <para> - Fix planner problem with sub-<command>SELECT</> in the output list + Fix planner problem with sub-<command>SELECT</command> in the output list of a larger subquery (Tom) </para> <para> The known symptom of this bug is a <quote>failed to locate grouping - columns</> error that is dependent on the datatype involved; + columns</quote> error that is dependent on the datatype involved; but there could be other issues as well. </para> </listitem> <listitem> <para> - Fix decompilation of <literal>CASE WHEN</> with an implicit coercion + Fix decompilation of <literal>CASE WHEN</literal> with an implicit coercion (Tom) </para> <para> This mistake could lead to Assert failures in an Assert-enabled build, - or an <quote>unexpected CASE WHEN clause</> error message in other + or an <quote>unexpected CASE WHEN clause</quote> error message in other cases, when trying to examine or dump a view. </para> </listitem> @@ -4219,38 +4219,38 @@ </para> <para> - If <command>CLUSTER</> or a rewriting variant of <command>ALTER TABLE</> + If <command>CLUSTER</command> or a rewriting variant of <command>ALTER TABLE</command> were executed by someone other than the table owner, the - <structname>pg_type</> entry for the table's TOAST table would end up + <structname>pg_type</structname> entry for the table's TOAST table would end up marked as owned by that someone. This caused no immediate problems, since the permissions on the TOAST rowtype aren't examined by any ordinary database operation. However, it could lead to unexpected failures if one later tried to drop the role that issued the command - (in 8.1 or 8.2), or <quote>owner of data type appears to be invalid</> - warnings from <application>pg_dump</> after having done so (in 8.3). + (in 8.1 or 8.2), or <quote>owner of data type appears to be invalid</quote> + warnings from <application>pg_dump</application> after having done so (in 8.3). </para> </listitem> <listitem> <para> - Change <command>UNLISTEN</> to exit quickly if the current session has - never executed any <command>LISTEN</> command (Tom) + Change <command>UNLISTEN</command> to exit quickly if the current session has + never executed any <command>LISTEN</command> command (Tom) </para> <para> Most of the time this is not a particularly useful optimization, but - since <command>DISCARD ALL</> invokes <command>UNLISTEN</>, the previous + since <command>DISCARD ALL</command> invokes <command>UNLISTEN</command>, the previous coding caused a substantial performance problem for applications that - made heavy use of <command>DISCARD ALL</>. + made heavy use of <command>DISCARD ALL</command>. </para> </listitem> <listitem> <para> - Fix PL/pgSQL to not treat <literal>INTO</> after <command>INSERT</> as + Fix PL/pgSQL to not treat <literal>INTO</literal> after <command>INSERT</command> as an INTO-variables clause anywhere in the string, not only at the start; - in particular, don't fail for <command>INSERT INTO</> within - <command>CREATE RULE</> (Tom) + in particular, don't fail for <command>INSERT INTO</command> within + <command>CREATE RULE</command> (Tom) </para> </listitem> @@ -4268,21 +4268,21 @@ <listitem> <para> - Retry failed calls to <function>CallNamedPipe()</> on Windows + Retry failed calls to <function>CallNamedPipe()</function> on Windows (Steve Marshall, Magnus) </para> <para> It appears that this function can sometimes fail transiently; we previously treated any failure as a hard error, which could - confuse <command>LISTEN</>/<command>NOTIFY</> as well as other + confuse <command>LISTEN</command>/<command>NOTIFY</command> as well as other operations. </para> </listitem> <listitem> <para> - Add <literal>MUST</> (Mauritius Island Summer Time) to the default list + Add <literal>MUST</literal> (Mauritius Island Summer Time) to the default list of known timezone abbreviations (Xavier Bugaud) </para> </listitem> @@ -4324,7 +4324,7 @@ <listitem> <para> - Make <command>DISCARD ALL</> release advisory locks, in addition + Make <command>DISCARD ALL</command> release advisory locks, in addition to everything it already did (Tom) </para> @@ -4347,13 +4347,13 @@ <listitem> <para> - Fix crash of <literal>xmlconcat(NULL)</> (Peter) + Fix crash of <literal>xmlconcat(NULL)</literal> (Peter) </para> </listitem> <listitem> <para> - Fix possible crash in <literal>ispell</> dictionary if high-bit-set + Fix possible crash in <literal>ispell</literal> dictionary if high-bit-set characters are used as flags (Teodor) </para> @@ -4365,7 +4365,7 @@ <listitem> <para> - Fix misordering of <application>pg_dump</> output for composite types + Fix misordering of <application>pg_dump</application> output for composite types (Tom) </para> @@ -4377,13 +4377,13 @@ <listitem> <para> - Improve handling of URLs in <function>headline()</> function (Teodor) + Improve handling of URLs in <function>headline()</function> function (Teodor) </para> </listitem> <listitem> <para> - Improve handling of overlength headlines in <function>headline()</> + Improve handling of overlength headlines in <function>headline()</function> function (Teodor) </para> </listitem> @@ -4400,7 +4400,7 @@ <para> Fix possible Assert failure if a statement executed in PL/pgSQL is rewritten into another kind of statement, for example if an - <command>INSERT</> is rewritten into an <command>UPDATE</> (Heikki) + <command>INSERT</command> is rewritten into an <command>UPDATE</command> (Heikki) </para> </listitem> @@ -4410,7 +4410,7 @@ </para> <para> - This primarily affects domains that are declared with <literal>CHECK</> + This primarily affects domains that are declared with <literal>CHECK</literal> constraints involving user-defined stable or immutable functions. Such functions typically fail if no snapshot has been set. </para> @@ -4425,7 +4425,7 @@ <listitem> <para> - Avoid unnecessary locking of small tables in <command>VACUUM</> + Avoid unnecessary locking of small tables in <command>VACUUM</command> (Heikki) </para> </listitem> @@ -4433,21 +4433,21 @@ <listitem> <para> Fix a problem that sometimes kept <command>ALTER TABLE ENABLE/DISABLE - RULE</> from being recognized by active sessions (Tom) + RULE</command> from being recognized by active sessions (Tom) </para> </listitem> <listitem> <para> - Fix a problem that made <literal>UPDATE RETURNING tableoid</> + Fix a problem that made <literal>UPDATE RETURNING tableoid</literal> return zero instead of the correct OID (Tom) </para> </listitem> <listitem> <para> - Allow functions declared as taking <type>ANYARRAY</> to work on - the <structname>pg_statistic</> columns of that type (Tom) + Allow functions declared as taking <type>ANYARRAY</type> to work on + the <structname>pg_statistic</structname> columns of that type (Tom) </para> <para> @@ -4463,13 +4463,13 @@ <para> This could result in bad plans for queries like - <literal>... from a left join b on a.a1 = b.b1 where a.a1 = 42 ...</> + <literal>... from a left join b on a.a1 = b.b1 where a.a1 = 42 ...</literal> </para> </listitem> <listitem> <para> - Improve optimizer's handling of long <literal>IN</> lists (Tom) + Improve optimizer's handling of long <literal>IN</literal> lists (Tom) </para> <para> @@ -4521,21 +4521,21 @@ <listitem> <para> - Fix <filename>contrib/dblink</>'s - <function>dblink_get_result(text,bool)</> function (Joe) + Fix <filename>contrib/dblink</filename>'s + <function>dblink_get_result(text,bool)</function> function (Joe) </para> </listitem> <listitem> <para> - Fix possible garbage output from <filename>contrib/sslinfo</> functions + Fix possible garbage output from <filename>contrib/sslinfo</filename> functions (Tom) </para> </listitem> <listitem> <para> - Fix incorrect behavior of <filename>contrib/tsearch2</> compatibility + Fix incorrect behavior of <filename>contrib/tsearch2</filename> compatibility trigger when it's fired more than once in a command (Teodor) </para> </listitem> @@ -4554,29 +4554,29 @@ <listitem> <para> - Fix <application>ecpg</>'s handling of varchar structs (Michael) + Fix <application>ecpg</application>'s handling of varchar structs (Michael) </para> </listitem> <listitem> <para> - Fix <application>configure</> script to properly report failure when + Fix <application>configure</application> script to properly report failure when unable to obtain linkage information for PL/Perl (Andrew) </para> </listitem> <listitem> <para> - Make all documentation reference <literal>pgsql-bugs</> and/or - <literal>pgsql-hackers</> as appropriate, instead of the - now-decommissioned <literal>pgsql-ports</> and <literal>pgsql-patches</> + Make all documentation reference <literal>pgsql-bugs</literal> and/or + <literal>pgsql-hackers</literal> as appropriate, instead of the + now-decommissioned <literal>pgsql-ports</literal> and <literal>pgsql-patches</literal> mailing lists (Tom) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2009a (for + Update time zone data files to <application>tzdata</application> release 2009a (for Kathmandu and historical DST corrections in Switzerland, Cuba) </para> </listitem> @@ -4607,7 +4607,7 @@ A dump/restore is not required for those running 8.3.X. However, if you are upgrading from a version earlier than 8.3.1, see <xref linkend="release-8-3-1">. Also, if you were running a previous - 8.3.X release, it is recommended to <command>REINDEX</> all GiST + 8.3.X release, it is recommended to <command>REINDEX</command> all GiST indexes after the upgrade. </para> @@ -4621,13 +4621,13 @@ <listitem> <para> Fix GiST index corruption due to marking the wrong index entry - <quote>dead</> after a deletion (Teodor) + <quote>dead</quote> after a deletion (Teodor) </para> <para> This would result in index searches failing to find rows they should have found. Corrupted indexes can be fixed with - <command>REINDEX</>. + <command>REINDEX</command>. </para> </listitem> @@ -4639,7 +4639,7 @@ <para> We have addressed similar issues before, but it would still fail if - the <quote>character has no equivalent</> message itself couldn't + the <quote>character has no equivalent</quote> message itself couldn't be converted. The fix is to disable localization and send the plain ASCII error message when we detect such a situation. </para> @@ -4647,7 +4647,7 @@ <listitem> <para> - Fix possible crash in <type>bytea</>-to-XML mapping (Michael McMaster) + Fix possible crash in <type>bytea</type>-to-XML mapping (Michael McMaster) </para> </listitem> @@ -4660,8 +4660,8 @@ <listitem> <para> - Improve optimization of <replaceable>expression</> <literal>IN</> - (<replaceable>expression-list</>) queries (Tom, per an idea from Robert + Improve optimization of <replaceable>expression</replaceable> <literal>IN</literal> + (<replaceable>expression-list</replaceable>) queries (Tom, per an idea from Robert Haas) </para> @@ -4674,20 +4674,20 @@ <listitem> <para> - Fix mis-expansion of rule queries when a sub-<literal>SELECT</> appears - in a function call in <literal>FROM</>, a multi-row <literal>VALUES</> - list, or a <literal>RETURNING</> list (Tom) + Fix mis-expansion of rule queries when a sub-<literal>SELECT</literal> appears + in a function call in <literal>FROM</literal>, a multi-row <literal>VALUES</literal> + list, or a <literal>RETURNING</literal> list (Tom) </para> <para> - The usual symptom of this problem is an <quote>unrecognized node type</> + The usual symptom of this problem is an <quote>unrecognized node type</quote> error. </para> </listitem> <listitem> <para> - Fix Assert failure during rescan of an <literal>IS NULL</> + Fix Assert failure during rescan of an <literal>IS NULL</literal> search of a GiST index (Teodor) </para> </listitem> @@ -4707,7 +4707,7 @@ <listitem> <para> - Force a checkpoint before <command>CREATE DATABASE</> starts to copy + Force a checkpoint before <command>CREATE DATABASE</command> starts to copy files (Heikki) </para> @@ -4719,9 +4719,9 @@ <listitem> <para> - Prevent possible collision of <structfield>relfilenode</> numbers + Prevent possible collision of <structfield>relfilenode</structfield> numbers when moving a table to another tablespace with <command>ALTER SET - TABLESPACE</> (Heikki) + TABLESPACE</command> (Heikki) </para> <para> @@ -4740,21 +4740,21 @@ <listitem> <para> Fix improper display of fractional seconds in interval values when - using a non-ISO datestyle in an <option>--enable-integer-datetimes</> + using a non-ISO datestyle in an <option>--enable-integer-datetimes</option> build (Ron Mayer) </para> </listitem> <listitem> <para> - Make <literal>ILIKE</> compare characters case-insensitively + Make <literal>ILIKE</literal> compare characters case-insensitively even when they're escaped (Andrew) </para> </listitem> <listitem> <para> - Ensure <command>DISCARD</> is handled properly by statement logging (Tom) + Ensure <command>DISCARD</command> is handled properly by statement logging (Tom) </para> </listitem> @@ -4767,7 +4767,7 @@ <listitem> <para> - Ensure <function>SPI_getvalue</> and <function>SPI_getbinval</> + Ensure <function>SPI_getvalue</function> and <function>SPI_getbinval</function> behave correctly when the passed tuple and tuple descriptor have different numbers of columns (Tom) </para> @@ -4781,15 +4781,15 @@ <listitem> <para> - Mark <varname>SessionReplicationRole</> as <literal>PGDLLIMPORT</> - so it can be used by <application>Slony</> on Windows (Magnus) + Mark <varname>SessionReplicationRole</varname> as <literal>PGDLLIMPORT</literal> + so it can be used by <application>Slony</application> on Windows (Magnus) </para> </listitem> <listitem> <para> - Fix small memory leak when using <application>libpq</>'s - <literal>gsslib</> parameter (Magnus) + Fix small memory leak when using <application>libpq</application>'s + <literal>gsslib</literal> parameter (Magnus) </para> <para> @@ -4800,38 +4800,38 @@ <listitem> <para> - Ensure <application>libgssapi</> is linked into <application>libpq</> + Ensure <application>libgssapi</application> is linked into <application>libpq</application> if needed (Markus Schaaf) </para> </listitem> <listitem> <para> - Fix <application>ecpg</>'s parsing of <command>CREATE ROLE</> (Michael) + Fix <application>ecpg</application>'s parsing of <command>CREATE ROLE</command> (Michael) </para> </listitem> <listitem> <para> - Fix recent breakage of <literal>pg_ctl restart</> (Tom) + Fix recent breakage of <literal>pg_ctl restart</literal> (Tom) </para> </listitem> <listitem> <para> - Ensure <filename>pg_control</> is opened in binary mode + Ensure <filename>pg_control</filename> is opened in binary mode (Itagaki Takahiro) </para> <para> - <application>pg_controldata</> and <application>pg_resetxlog</> + <application>pg_controldata</application> and <application>pg_resetxlog</application> did this incorrectly, and so could fail on Windows. </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2008i (for + Update time zone data files to <application>tzdata</application> release 2008i (for DST law changes in Argentina, Brazil, Mauritius, Syria) </para> </listitem> @@ -4888,41 +4888,41 @@ <para> This error created a risk of corruption in system - catalogs that are consulted by <command>VACUUM</>: dead tuple versions + catalogs that are consulted by <command>VACUUM</command>: dead tuple versions might be removed too soon. The impact of this on actual database operations would be minimal, since the system doesn't follow MVCC rules while examining catalogs, but it might result in transiently - wrong output from <application>pg_dump</> or other client programs. + wrong output from <application>pg_dump</application> or other client programs. </para> </listitem> <listitem> <para> - Fix potential miscalculation of <structfield>datfrozenxid</> (Alvaro) + Fix potential miscalculation of <structfield>datfrozenxid</structfield> (Alvaro) </para> <para> This error may explain some recent reports of failure to remove old - <structname>pg_clog</> data. + <structname>pg_clog</structname> data. </para> </listitem> <listitem> <para> - Fix incorrect HOT updates after <structname>pg_class</> is reindexed + Fix incorrect HOT updates after <structname>pg_class</structname> is reindexed (Tom) </para> <para> - Corruption of <structname>pg_class</> could occur if <literal>REINDEX - TABLE pg_class</> was followed in the same session by an <literal>ALTER - TABLE RENAME</> or <literal>ALTER TABLE SET SCHEMA</> command. + Corruption of <structname>pg_class</structname> could occur if <literal>REINDEX + TABLE pg_class</literal> was followed in the same session by an <literal>ALTER + TABLE RENAME</literal> or <literal>ALTER TABLE SET SCHEMA</literal> command. </para> </listitem> <listitem> <para> - Fix missed <quote>combo cid</> case (Karl Schnaitter) + Fix missed <quote>combo cid</quote> case (Karl Schnaitter) </para> <para> @@ -4946,7 +4946,7 @@ <para> This responds to reports that the counters could overflow in sufficiently long transactions, leading to unexpected <quote>lock is - already held</> errors. + already held</quote> errors. </para> </listitem> @@ -4972,7 +4972,7 @@ <listitem> <para> Fix missed permissions checks when a view contains a simple - <literal>UNION ALL</> construct (Heikki) + <literal>UNION ALL</literal> construct (Heikki) </para> <para> @@ -4984,7 +4984,7 @@ <listitem> <para> Add checks in executor startup to ensure that the tuples produced by an - <command>INSERT</> or <command>UPDATE</> will match the target table's + <command>INSERT</command> or <command>UPDATE</command> will match the target table's current rowtype (Tom) </para> @@ -4996,12 +4996,12 @@ <listitem> <para> - Fix possible repeated drops during <command>DROP OWNED</> (Tom) + Fix possible repeated drops during <command>DROP OWNED</command> (Tom) </para> <para> This would typically result in strange errors such as <quote>cache - lookup failed for relation NNN</>. + lookup failed for relation NNN</quote>. </para> </listitem> @@ -5013,7 +5013,7 @@ <listitem> <para> - Fix <function>xmlserialize()</> to raise error properly for + Fix <function>xmlserialize()</function> to raise error properly for unacceptable target data type (Tom) </para> </listitem> @@ -5026,7 +5026,7 @@ <para> Certain characters occurring in configuration files would always cause - <quote>invalid byte sequence for encoding</> failures. + <quote>invalid byte sequence for encoding</quote> failures. </para> </listitem> @@ -5039,18 +5039,18 @@ <listitem> <para> - Fix <literal>AT TIME ZONE</> to first try to interpret its timezone + Fix <literal>AT TIME ZONE</literal> to first try to interpret its timezone argument as a timezone abbreviation, and only try it as a full timezone name if that fails, rather than the other way around as formerly (Tom) </para> <para> The timestamp input functions have always resolved ambiguous zone names - in this order. Making <literal>AT TIME ZONE</> do so as well improves + in this order. Making <literal>AT TIME ZONE</literal> do so as well improves consistency, and fixes a compatibility bug introduced in 8.1: in ambiguous cases we now behave the same as 8.0 and before did, - since in the older versions <literal>AT TIME ZONE</> accepted - <emphasis>only</> abbreviations. + since in the older versions <literal>AT TIME ZONE</literal> accepted + <emphasis>only</emphasis> abbreviations. </para> </listitem> @@ -5077,26 +5077,26 @@ <listitem> <para> Allow spaces in the suffix part of an LDAP URL in - <filename>pg_hba.conf</> (Tom) + <filename>pg_hba.conf</filename> (Tom) </para> </listitem> <listitem> <para> Fix bug in backwards scanning of a cursor on a <literal>SELECT DISTINCT - ON</> query (Tom) + ON</literal> query (Tom) </para> </listitem> <listitem> <para> - Fix planner bug that could improperly push down <literal>IS NULL</> + Fix planner bug that could improperly push down <literal>IS NULL</literal> tests below an outer join (Tom) </para> <para> - This was triggered by occurrence of <literal>IS NULL</> tests for - the same relation in all arms of an upper <literal>OR</> clause. + This was triggered by occurrence of <literal>IS NULL</literal> tests for + the same relation in all arms of an upper <literal>OR</literal> clause. </para> </listitem> @@ -5114,21 +5114,21 @@ <listitem> <para> - Fix planner to estimate that <literal>GROUP BY</> expressions yielding + Fix planner to estimate that <literal>GROUP BY</literal> expressions yielding boolean results always result in two groups, regardless of the expressions' contents (Tom) </para> <para> This is very substantially more accurate than the regular <literal>GROUP - BY</> estimate for certain boolean tests like <replaceable>col</> - <literal>IS NULL</>. + BY</literal> estimate for certain boolean tests like <replaceable>col</replaceable> + <literal>IS NULL</literal>. </para> </listitem> <listitem> <para> - Fix PL/pgSQL to not fail when a <literal>FOR</> loop's target variable + Fix PL/pgSQL to not fail when a <literal>FOR</literal> loop's target variable is a record containing composite-type fields (Tom) </para> </listitem> @@ -5142,49 +5142,49 @@ <listitem> <para> - Improve performance of <function>PQescapeBytea()</> (Rudolf Leitgeb) + Improve performance of <function>PQescapeBytea()</function> (Rudolf Leitgeb) </para> </listitem> <listitem> <para> On Windows, work around a Microsoft bug by preventing - <application>libpq</> from trying to send more than 64kB per system call + <application>libpq</application> from trying to send more than 64kB per system call (Magnus) </para> </listitem> <listitem> <para> - Fix <application>ecpg</> to handle variables properly in <command>SET</> + Fix <application>ecpg</application> to handle variables properly in <command>SET</command> commands (Michael) </para> </listitem> <listitem> <para> - Improve <application>pg_dump</> and <application>pg_restore</>'s + Improve <application>pg_dump</application> and <application>pg_restore</application>'s error reporting after failure to send a SQL command (Tom) </para> </listitem> <listitem> <para> - Fix <application>pg_ctl</> to properly preserve postmaster - command-line arguments across a <literal>restart</> (Bruce) + Fix <application>pg_ctl</application> to properly preserve postmaster + command-line arguments across a <literal>restart</literal> (Bruce) </para> </listitem> <listitem> <para> Fix erroneous WAL file cutoff point calculation in - <application>pg_standby</> (Simon) + <application>pg_standby</application> (Simon) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2008f (for + Update time zone data files to <application>tzdata</application> release 2008f (for DST law changes in Argentina, Bahamas, Brazil, Mauritius, Morocco, Pakistan, Palestine, and Paraguay) </para> @@ -5227,18 +5227,18 @@ <listitem> <para> - Make <function>pg_get_ruledef()</> parenthesize negative constants (Tom) + Make <function>pg_get_ruledef()</function> parenthesize negative constants (Tom) </para> <para> Before this fix, a negative constant in a view or rule might be dumped - as, say, <literal>-42::integer</>, which is subtly incorrect: it should - be <literal>(-42)::integer</> due to operator precedence rules. + as, say, <literal>-42::integer</literal>, which is subtly incorrect: it should + be <literal>(-42)::integer</literal> due to operator precedence rules. Usually this would make little difference, but it could interact with another recent patch to cause - <productname>PostgreSQL</> to reject what had been a valid - <command>SELECT DISTINCT</> view query. Since this could result in - <application>pg_dump</> output failing to reload, it is being treated + <productname>PostgreSQL</productname> to reject what had been a valid + <command>SELECT DISTINCT</command> view query. Since this could result in + <application>pg_dump</application> output failing to reload, it is being treated as a high-priority fix. The only released versions in which dump output is actually incorrect are 8.3.1 and 8.2.7. </para> @@ -5246,13 +5246,13 @@ <listitem> <para> - Make <command>ALTER AGGREGATE ... OWNER TO</> update - <structname>pg_shdepend</> (Tom) + Make <command>ALTER AGGREGATE ... OWNER TO</command> update + <structname>pg_shdepend</structname> (Tom) </para> <para> This oversight could lead to problems if the aggregate was later - involved in a <command>DROP OWNED</> or <command>REASSIGN OWNED</> + involved in a <command>DROP OWNED</command> or <command>REASSIGN OWNED</command> operation. </para> </listitem> @@ -5303,19 +5303,19 @@ <listitem> <para> Fix incorrect archive truncation point calculation for the - <literal>%r</> macro in <varname>restore_command</> parameters + <literal>%r</literal> macro in <varname>restore_command</varname> parameters (Simon) </para> <para> This could lead to data loss if a warm-standby script relied on - <literal>%r</> to decide when to throw away WAL segment files. + <literal>%r</literal> to decide when to throw away WAL segment files. </para> </listitem> <listitem> <para> - Fix <command>ALTER TABLE ADD COLUMN ... PRIMARY KEY</> so that the new + Fix <command>ALTER TABLE ADD COLUMN ... PRIMARY KEY</command> so that the new column is correctly checked to see if it's been initialized to all non-nulls (Brendan Jurd) </para> @@ -5327,31 +5327,31 @@ <listitem> <para> - Fix <command>REASSIGN OWNED</> so that it works on procedural + Fix <command>REASSIGN OWNED</command> so that it works on procedural languages too (Alvaro) </para> </listitem> <listitem> <para> - Fix problems with <command>SELECT FOR UPDATE/SHARE</> occurring as a - subquery in a query with a non-<command>SELECT</> top-level operation + Fix problems with <command>SELECT FOR UPDATE/SHARE</command> occurring as a + subquery in a query with a non-<command>SELECT</command> top-level operation (Tom) </para> </listitem> <listitem> <para> - Fix possible <command>CREATE TABLE</> failure when inheriting the - <quote>same</> constraint from multiple parent relations that + Fix possible <command>CREATE TABLE</command> failure when inheriting the + <quote>same</quote> constraint from multiple parent relations that inherited that constraint from a common ancestor (Tom) </para> </listitem> <listitem> <para> - Fix <function>pg_get_ruledef()</> to show the alias, if any, attached - to the target table of an <command>UPDATE</> or <command>DELETE</> + Fix <function>pg_get_ruledef()</function> to show the alias, if any, attached + to the target table of an <command>UPDATE</command> or <command>DELETE</command> (Tom) </para> </listitem> @@ -5377,13 +5377,13 @@ <listitem> <para> - Fix broken GiST comparison function for <type>tsquery</> (Teodor) + Fix broken GiST comparison function for <type>tsquery</type> (Teodor) </para> </listitem> <listitem> <para> - Fix <function>tsvector_update_trigger()</> and <function>ts_stat()</> + Fix <function>tsvector_update_trigger()</function> and <function>ts_stat()</function> to accept domains over the types they expect to work with (Tom) </para> </listitem> @@ -5404,7 +5404,7 @@ <listitem> <para> Fix race conditions between delayed unlinks and <command>DROP - DATABASE</> (Heikki) + DATABASE</command> (Heikki) </para> <para> @@ -5431,11 +5431,11 @@ <listitem> <para> Fix possible crash due to incorrect plan generated for an - <literal><replaceable>x</> IN (SELECT <replaceable>y</> - FROM ...)</literal> clause when <replaceable>x</> and <replaceable>y</> + <literal><replaceable>x</replaceable> IN (SELECT <replaceable>y</replaceable> + FROM ...)</literal> clause when <replaceable>x</replaceable> and <replaceable>y</replaceable> have different data types; and make sure the behavior is semantically - correct when the conversion from <replaceable>y</>'s type to - <replaceable>x</>'s type is lossy (Tom) + correct when the conversion from <replaceable>y</replaceable>'s type to + <replaceable>x</replaceable>'s type is lossy (Tom) </para> </listitem> @@ -5456,15 +5456,15 @@ <listitem> <para> - Fix planner failure when an indexable <function>MIN</> or - <function>MAX</> aggregate is used with <literal>DISTINCT</> or - <literal>ORDER BY</> (Tom) + Fix planner failure when an indexable <function>MIN</function> or + <function>MAX</function> aggregate is used with <literal>DISTINCT</literal> or + <literal>ORDER BY</literal> (Tom) </para> </listitem> <listitem> <para> - Fix planner to ensure it never uses a <quote>physical tlist</> for a + Fix planner to ensure it never uses a <quote>physical tlist</quote> for a plan node that is feeding a Sort node (Tom) </para> @@ -5488,7 +5488,7 @@ <listitem> <para> - Make <function>TransactionIdIsCurrentTransactionId()</> use binary + Make <function>TransactionIdIsCurrentTransactionId()</function> use binary search instead of linear search when checking child-transaction XIDs (Heikki) </para> @@ -5502,14 +5502,14 @@ <listitem> <para> Fix conversions between ISO-8859-5 and other encodings to handle - Cyrillic <quote>Yo</> characters (<literal>e</> and <literal>E</> with + Cyrillic <quote>Yo</quote> characters (<literal>e</literal> and <literal>E</literal> with two dots) (Sergey Burladyan) </para> </listitem> <listitem> <para> - Fix several datatype input functions, notably <function>array_in()</>, + Fix several datatype input functions, notably <function>array_in()</function>, that were allowing unused bytes in their results to contain uninitialized, unpredictable values (Tom) </para> @@ -5517,7 +5517,7 @@ <para> This could lead to failures in which two apparently identical literal values were not seen as equal, resulting in the parser complaining - about unmatched <literal>ORDER BY</> and <literal>DISTINCT</> + about unmatched <literal>ORDER BY</literal> and <literal>DISTINCT</literal> expressions. </para> </listitem> @@ -5525,18 +5525,18 @@ <listitem> <para> Fix a corner case in regular-expression substring matching - (<literal>substring(<replaceable>string</> from - <replaceable>pattern</>)</literal>) (Tom) + (<literal>substring(<replaceable>string</replaceable> from + <replaceable>pattern</replaceable>)</literal>) (Tom) </para> <para> The problem occurs when there is a match to the pattern overall but the user has specified a parenthesized subexpression and that subexpression hasn't got a match. An example is - <literal>substring('foo' from 'foo(bar)?')</>. - This should return NULL, since <literal>(bar)</> isn't matched, but + <literal>substring('foo' from 'foo(bar)?')</literal>. + This should return NULL, since <literal>(bar)</literal> isn't matched, but it was mistakenly returning the whole-pattern match instead (ie, - <literal>foo</>). + <literal>foo</literal>). </para> </listitem> @@ -5549,7 +5549,7 @@ <listitem> <para> - Improve <command>ANALYZE</>'s handling of in-doubt tuples (those + Improve <command>ANALYZE</command>'s handling of in-doubt tuples (those inserted or deleted by a not-yet-committed transaction) so that the counts it reports to the stats collector are more likely to be correct (Pavan Deolasee) @@ -5558,14 +5558,14 @@ <listitem> <para> - Fix <application>initdb</> to reject a relative path for its - <literal>--xlogdir</> (<literal>-X</>) option (Tom) + Fix <application>initdb</application> to reject a relative path for its + <literal>--xlogdir</literal> (<literal>-X</literal>) option (Tom) </para> </listitem> <listitem> <para> - Make <application>psql</> print tab characters as an appropriate + Make <application>psql</application> print tab characters as an appropriate number of spaces, rather than <literal>\x09</literal> as was done in 8.3.0 and 8.3.1 (Bruce) </para> @@ -5573,7 +5573,7 @@ <listitem> <para> - Update time zone data files to <application>tzdata</> release 2008c (for + Update time zone data files to <application>tzdata</application> release 2008c (for DST law changes in Morocco, Iraq, Choibalsan, Pakistan, Syria, Cuba, and Argentina/San_Luis) </para> @@ -5581,44 +5581,44 @@ <listitem> <para> - Add <function>ECPGget_PGconn()</> function to - <application>ecpglib</> (Michael) + Add <function>ECPGget_PGconn()</function> function to + <application>ecpglib</application> (Michael) </para> </listitem> <listitem> <para> - Fix incorrect result from <application>ecpg</>'s - <function>PGTYPEStimestamp_sub()</> function (Michael) + Fix incorrect result from <application>ecpg</application>'s + <function>PGTYPEStimestamp_sub()</function> function (Michael) </para> </listitem> <listitem> <para> - Fix handling of continuation line markers in <application>ecpg</> + Fix handling of continuation line markers in <application>ecpg</application> (Michael) </para> </listitem> <listitem> <para> - Fix possible crashes in <filename>contrib/cube</> functions (Tom) + Fix possible crashes in <filename>contrib/cube</filename> functions (Tom) </para> </listitem> <listitem> <para> - Fix core dump in <filename>contrib/xml2</>'s - <function>xpath_table()</> function when the input query returns a + Fix core dump in <filename>contrib/xml2</filename>'s + <function>xpath_table()</function> function when the input query returns a NULL value (Tom) </para> </listitem> <listitem> <para> - Fix <filename>contrib/xml2</>'s makefile to not override - <literal>CFLAGS</>, and make it auto-configure properly for - <application>libxslt</> present or not (Tom) + Fix <filename>contrib/xml2</filename>'s makefile to not override + <literal>CFLAGS</literal>, and make it auto-configure properly for + <application>libxslt</application> present or not (Tom) </para> </listitem> @@ -5646,7 +5646,7 @@ <para> A dump/restore is not required for those running 8.3.X. - However, you might need to <command>REINDEX</> indexes on textual + However, you might need to <command>REINDEX</command> indexes on textual columns after updating, if you are affected by the Windows locale issue described below. </para> @@ -5670,17 +5670,17 @@ over two years ago, but Windows with UTF-8 uses a separate code path that was not updated. If you are using a locale that considers some non-identical strings as equal, you may need to - <command>REINDEX</> to fix existing indexes on textual columns. + <command>REINDEX</command> to fix existing indexes on textual columns. </para> </listitem> <listitem> <para> - Repair corner-case bugs in <command>VACUUM FULL</> (Tom) + Repair corner-case bugs in <command>VACUUM FULL</command> (Tom) </para> <para> - A potential deadlock between concurrent <command>VACUUM FULL</> + A potential deadlock between concurrent <command>VACUUM FULL</command> operations on different system catalogs was introduced in 8.2. This has now been corrected. 8.3 made this worse because the deadlock could occur within a critical code section, making it @@ -5688,13 +5688,13 @@ </para> <para> - Also, a <command>VACUUM FULL</> that failed partway through + Also, a <command>VACUUM FULL</command> that failed partway through vacuuming a system catalog could result in cache corruption in concurrent database sessions. </para> <para> - Another <command>VACUUM FULL</> bug introduced in 8.3 could + Another <command>VACUUM FULL</command> bug introduced in 8.3 could result in a crash or out-of-memory report when dealing with pages containing no live tuples. </para> @@ -5702,13 +5702,13 @@ <listitem> <para> - Fix misbehavior of foreign key checks involving <type>character</> - or <type>bit</> columns (Tom) + Fix misbehavior of foreign key checks involving <type>character</type> + or <type>bit</type> columns (Tom) </para> <para> If the referencing column were of a different but compatible type - (for instance <type>varchar</>), the constraint was enforced incorrectly. + (for instance <type>varchar</type>), the constraint was enforced incorrectly. </para> </listitem> @@ -5726,7 +5726,7 @@ <para> This bug affected only protocol-level prepare operations, not - SQL <command>PREPARE</>, and so tended to be seen only with + SQL <command>PREPARE</command>, and so tended to be seen only with JDBC, DBI, and other client-side drivers that use prepared statements heavily. </para> @@ -5748,21 +5748,21 @@ <listitem> <para> - Fix longstanding <command>LISTEN</>/<command>NOTIFY</> + Fix longstanding <command>LISTEN</command>/<command>NOTIFY</command> race condition (Tom) </para> <para> In rare cases a session that had just executed a - <command>LISTEN</> might not get a notification, even though + <command>LISTEN</command> might not get a notification, even though one would be expected because the concurrent transaction executing - <command>NOTIFY</> was observed to commit later. + <command>NOTIFY</command> was observed to commit later. </para> <para> A side effect of the fix is that a transaction that has executed - a not-yet-committed <command>LISTEN</> command will not see any - row in <structname>pg_listener</> for the <command>LISTEN</>, + a not-yet-committed <command>LISTEN</command> command will not see any + row in <structname>pg_listener</structname> for the <command>LISTEN</command>, should it choose to look; formerly it would have. This behavior was never documented one way or the other, but it is possible that some applications depend on the old behavior. @@ -5771,14 +5771,14 @@ <listitem> <para> - Disallow <command>LISTEN</> and <command>UNLISTEN</> within a + Disallow <command>LISTEN</command> and <command>UNLISTEN</command> within a prepared transaction (Tom) </para> <para> This was formerly allowed but trying to do it had various unpleasant consequences, notably that the originating backend could not exit - as long as an <command>UNLISTEN</> remained uncommitted. + as long as an <command>UNLISTEN</command> remained uncommitted. </para> </listitem> @@ -5803,20 +5803,20 @@ <listitem> <para> - Fix incorrect comparison of <type>tsquery</> values (Teodor) + Fix incorrect comparison of <type>tsquery</type> values (Teodor) </para> </listitem> <listitem> <para> - Fix incorrect behavior of <literal>LIKE</> with non-ASCII characters + Fix incorrect behavior of <literal>LIKE</literal> with non-ASCII characters in single-byte encodings (Rolf Jentsch) </para> </listitem> <listitem> <para> - Disable <function>xmlvalidate</> (Tom) + Disable <function>xmlvalidate</function> (Tom) </para> <para> @@ -5835,8 +5835,8 @@ <listitem> <para> - Make <function>encode(<replaceable>bytea</>, 'escape')</> convert all - high-bit-set byte values into <literal>\</><replaceable>nnn</> octal + Make <function>encode(<replaceable>bytea</replaceable>, 'escape')</function> convert all + high-bit-set byte values into <literal>\</literal><replaceable>nnn</replaceable> octal escape sequences (Tom) </para> @@ -5844,7 +5844,7 @@ This is necessary to avoid encoding problems when the database encoding is multi-byte. This change could pose compatibility issues for applications that are expecting specific results from - <function>encode</>. + <function>encode</function>. </para> </listitem> @@ -5860,21 +5860,21 @@ <listitem> <para> - Fix <quote>unrecognized node type</> error in some variants of - <command>ALTER OWNER</> (Tom) + Fix <quote>unrecognized node type</quote> error in some variants of + <command>ALTER OWNER</command> (Tom) </para> </listitem> <listitem> <para> Avoid tablespace permissions errors in <command>CREATE TABLE LIKE - INCLUDING INDEXES</> (Tom) + INCLUDING INDEXES</command> (Tom) </para> </listitem> <listitem> <para> - Ensure <structname>pg_stat_activity</>.<structfield>waiting</> flag + Ensure <structname>pg_stat_activity</structname>.<structfield>waiting</structfield> flag is cleared when a lock wait is aborted (Tom) </para> </listitem> @@ -5892,26 +5892,26 @@ <listitem> <para> - Update time zone data files to <application>tzdata</> release 2008a + Update time zone data files to <application>tzdata</application> release 2008a (in particular, recent Chile changes); adjust timezone abbreviation - <literal>VET</> (Venezuela) to mean UTC-4:30, not UTC-4:00 (Tom) + <literal>VET</literal> (Venezuela) to mean UTC-4:30, not UTC-4:00 (Tom) </para> </listitem> <listitem> <para> - Fix <application>ecpg</> problems with arrays (Michael) + Fix <application>ecpg</application> problems with arrays (Michael) </para> </listitem> <listitem> <para> - Fix <application>pg_ctl</> to correctly extract the postmaster's port + Fix <application>pg_ctl</application> to correctly extract the postmaster's port number from command-line options (Itagaki Takahiro, Tom) </para> <para> - Previously, <literal>pg_ctl start -w</> could try to contact the + Previously, <literal>pg_ctl start -w</literal> could try to contact the postmaster on the wrong port, leading to bogus reports of startup failure. </para> @@ -5919,19 +5919,19 @@ <listitem> <para> - Use <option>-fwrapv</> to defend against possible misoptimization - in recent <application>gcc</> versions (Tom) + Use <option>-fwrapv</option> to defend against possible misoptimization + in recent <application>gcc</application> versions (Tom) </para> <para> - This is known to be necessary when building <productname>PostgreSQL</> - with <application>gcc</> 4.3 or later. + This is known to be necessary when building <productname>PostgreSQL</productname> + with <application>gcc</application> 4.3 or later. </para> </listitem> <listitem> <para> - Enable building <filename>contrib/uuid-ossp</> with MSVC (Hiroshi Saito) + Enable building <filename>contrib/uuid-ossp</filename> with MSVC (Hiroshi Saito) </para> </listitem> @@ -5954,7 +5954,7 @@ <para> With significant new functionality and performance enhancements, this release represents a major leap forward for - <productname>PostgreSQL</>. This was made possible by a growing + <productname>PostgreSQL</productname>. This was made possible by a growing community that has dramatically accelerated the pace of development. This release adds the following major features: </para> @@ -5988,13 +5988,13 @@ <listitem> <para> - Universally Unique Identifier (<type>UUID</>) data type + Universally Unique Identifier (<type>UUID</type>) data type </para> </listitem> <listitem> <para> - Add control over whether <literal>NULL</>s sort first or last + Add control over whether <literal>NULL</literal>s sort first or last </para> </listitem> @@ -6032,7 +6032,7 @@ <listitem> <para> - Support Security Service Provider Interface (<acronym>SSPI</>) for + Support Security Service Provider Interface (<acronym>SSPI</acronym>) for authentication on Windows </para> </listitem> @@ -6046,8 +6046,8 @@ <listitem> <para> - Allow the whole <productname>PostgreSQL</> distribution to be compiled - with <productname>Microsoft Visual C++</> + Allow the whole <productname>PostgreSQL</productname> distribution to be compiled + with <productname>Microsoft Visual C++</productname> </para> </listitem> @@ -6076,8 +6076,8 @@ <listitem> <para> - Heap-Only Tuples (<acronym>HOT</>) accelerate space reuse for - most <command>UPDATE</>s and <command>DELETE</>s + Heap-Only Tuples (<acronym>HOT</acronym>) accelerate space reuse for + most <command>UPDATE</command>s and <command>DELETE</command>s </para> </listitem> @@ -6091,7 +6091,7 @@ <listitem> <para> Using non-persistent transaction IDs for read-only transactions - reduces overhead and <command>VACUUM</> requirements + reduces overhead and <command>VACUUM</command> requirements </para> </listitem> @@ -6116,7 +6116,7 @@ <listitem> <para> - <literal>ORDER BY ... LIMIT</> can be done without sorting + <literal>ORDER BY ... LIMIT</literal> can be done without sorting </para> </listitem> @@ -6148,14 +6148,14 @@ <listitem> <para> Non-character data types are no longer automatically cast to - <type>TEXT</> (Peter, Tom) + <type>TEXT</type> (Peter, Tom) </para> <para> Previously, if a non-character value was supplied to an operator or - function that requires <type>text</> input, it was automatically - cast to <type>text</>, for most (though not all) built-in data types. - This no longer happens: an explicit cast to <type>text</> is now + function that requires <type>text</type> input, it was automatically + cast to <type>text</type>, for most (though not all) built-in data types. + This no longer happens: an explicit cast to <type>text</type> is now required for all non-character-string types. For example, these expressions formerly worked: @@ -6164,15 +6164,15 @@ substr(current_date, 1, 4) 23 LIKE '2%' </programlisting> - but will now draw <quote>function does not exist</> and <quote>operator - does not exist</> errors respectively. Use an explicit cast instead: + but will now draw <quote>function does not exist</quote> and <quote>operator + does not exist</quote> errors respectively. Use an explicit cast instead: <programlisting> substr(current_date::text, 1, 4) 23::text LIKE '2%' </programlisting> - (Of course, you can use the more verbose <literal>CAST()</> syntax too.) + (Of course, you can use the more verbose <literal>CAST()</literal> syntax too.) The reason for the change is that these automatic casts too often caused surprising behavior. An example is that in previous releases, this expression was accepted but did not do what was expected: @@ -6183,35 +6183,35 @@ current_date < 2017-11-17 This is actually comparing a date to an integer, which should be (and now is) rejected — but in the presence of automatic - casts both sides were cast to <type>text</> and a textual comparison - was done, because the <literal>text < text</> operator was able - to match the expression when no other <literal><</> operator could. + casts both sides were cast to <type>text</type> and a textual comparison + was done, because the <literal>text < text</literal> operator was able + to match the expression when no other <literal><</literal> operator could. </para> <para> - Types <type>char(<replaceable>n</>)</type> and - <type>varchar(<replaceable>n</>)</type> still cast to <type>text</> - automatically. Also, automatic casting to <type>text</> still works for - inputs to the concatenation (<literal>||</>) operator, so long as least + Types <type>char(<replaceable>n</replaceable>)</type> and + <type>varchar(<replaceable>n</replaceable>)</type> still cast to <type>text</type> + automatically. Also, automatic casting to <type>text</type> still works for + inputs to the concatenation (<literal>||</literal>) operator, so long as least one input is a character-string type. </para> </listitem> <listitem> <para> - Full text search features from <filename>contrib/tsearch2</> have + Full text search features from <filename>contrib/tsearch2</filename> have been moved into the core server, with some minor syntax changes </para> <para> - <filename>contrib/tsearch2</> now contains a compatibility + <filename>contrib/tsearch2</filename> now contains a compatibility interface. </para> </listitem> <listitem> <para> - <literal>ARRAY(SELECT ...)</literal>, where the <command>SELECT</> + <literal>ARRAY(SELECT ...)</literal>, where the <command>SELECT</command> returns no rows, now returns an empty array, rather than NULL (Tom) </para> @@ -6233,8 +6233,8 @@ current_date < 2017-11-17 <listitem> <para> - <literal>ORDER BY ... USING</> <replaceable>operator</> must now - use a less-than or greater-than <replaceable>operator</> that is + <literal>ORDER BY ... USING</literal> <replaceable>operator</replaceable> must now + use a less-than or greater-than <replaceable>operator</replaceable> that is defined in a btree operator class </para> @@ -6251,7 +6251,7 @@ current_date < 2017-11-17 <para> Previously <command>SET LOCAL</command>'s effects were lost - after subtransaction commit (<command>RELEASE SAVEPOINT</> + after subtransaction commit (<command>RELEASE SAVEPOINT</command> or exit from a PL/pgSQL exception block). </para> </listitem> @@ -6263,15 +6263,15 @@ current_date < 2017-11-17 </para> <para> - For example, <literal>"BEGIN; DROP DATABASE; COMMIT"</> will now be + For example, <literal>"BEGIN; DROP DATABASE; COMMIT"</literal> will now be rejected even if submitted as a single query message. </para> </listitem> <listitem> <para> - <command>ROLLBACK</> outside a transaction block now - issues <literal>NOTICE</> instead of <literal>WARNING</> (Bruce) + <command>ROLLBACK</command> outside a transaction block now + issues <literal>NOTICE</literal> instead of <literal>WARNING</literal> (Bruce) </para> </listitem> @@ -6282,15 +6282,15 @@ current_date < 2017-11-17 </para> <para> - Formerly, these commands accepted <literal>schema.relation</> but + Formerly, these commands accepted <literal>schema.relation</literal> but ignored the schema part, which was confusing. </para> </listitem> <listitem> <para> - <command>ALTER SEQUENCE</> no longer affects the sequence's - <function>currval()</> state (Tom) + <command>ALTER SEQUENCE</command> no longer affects the sequence's + <function>currval()</function> state (Tom) </para> </listitem> @@ -6314,16 +6314,16 @@ current_date < 2017-11-17 <para> For example, <function>pg_database_size()</function> now requires - <literal>CONNECT</> permission, which is granted to everyone by + <literal>CONNECT</literal> permission, which is granted to everyone by default. <function>pg_tablespace_size()</function> requires - <literal>CREATE</> permission in the tablespace, or is allowed if + <literal>CREATE</literal> permission in the tablespace, or is allowed if the tablespace is the default tablespace for the database. </para> </listitem> <listitem> <para> - Remove the undocumented <literal>!!=</> (not in) operator (Tom) + Remove the undocumented <literal>!!=</literal> (not in) operator (Tom) </para> <para> @@ -6339,7 +6339,7 @@ current_date < 2017-11-17 <para> If application code was computing and storing hash values using - internal <productname>PostgreSQL</> hashing functions, the hash + internal <productname>PostgreSQL</productname> hashing functions, the hash values must be regenerated. </para> </listitem> @@ -6351,8 +6351,8 @@ current_date < 2017-11-17 </para> <para> - The new <function>SET_VARSIZE()</> macro <emphasis>must</> be used - to set the length of generated <type>varlena</> values. Also, it + The new <function>SET_VARSIZE()</function> macro <emphasis>must</emphasis> be used + to set the length of generated <type>varlena</type> values. Also, it might be necessary to expand (<quote>de-TOAST</quote>) input values in more cases. </para> @@ -6361,7 +6361,7 @@ current_date < 2017-11-17 <listitem> <para> Continuous archiving no longer reports each successful archive - operation to the server logs unless <literal>DEBUG</> level is used + operation to the server logs unless <literal>DEBUG</literal> level is used (Simon) </para> </listitem> @@ -6381,18 +6381,18 @@ current_date < 2017-11-17 </para> <para> - <varname>bgwriter_lru_percent</>, - <varname>bgwriter_all_percent</>, - <varname>bgwriter_all_maxpages</>, - <varname>stats_start_collector</>, and - <varname>stats_reset_on_server_start</> are removed. - <varname>redirect_stderr</> is renamed to - <varname>logging_collector</>. - <varname>stats_command_string</> is renamed to - <varname>track_activities</>. - <varname>stats_block_level</> and <varname>stats_row_level</> - are merged into <varname>track_counts</>. - A new boolean configuration parameter, <varname>archive_mode</>, + <varname>bgwriter_lru_percent</varname>, + <varname>bgwriter_all_percent</varname>, + <varname>bgwriter_all_maxpages</varname>, + <varname>stats_start_collector</varname>, and + <varname>stats_reset_on_server_start</varname> are removed. + <varname>redirect_stderr</varname> is renamed to + <varname>logging_collector</varname>. + <varname>stats_command_string</varname> is renamed to + <varname>track_activities</varname>. + <varname>stats_block_level</varname> and <varname>stats_row_level</varname> + are merged into <varname>track_counts</varname>. + A new boolean configuration parameter, <varname>archive_mode</varname>, controls archiving. Autovacuum's default settings have changed. </para> </listitem> @@ -6403,7 +6403,7 @@ current_date < 2017-11-17 </para> <para> - We now always start the collector process, unless <acronym>UDP</> + We now always start the collector process, unless <acronym>UDP</acronym> socket creation fails. </para> </listitem> @@ -6421,7 +6421,7 @@ current_date < 2017-11-17 <listitem> <para> - Commenting out a parameter in <filename>postgresql.conf</> now + Commenting out a parameter in <filename>postgresql.conf</filename> now causes it to revert to its default value (Joachim Wieland) </para> @@ -6461,12 +6461,12 @@ current_date < 2017-11-17 </para> <para> - On most platforms, <literal>C</> locale is the only locale that + On most platforms, <literal>C</literal> locale is the only locale that will work with any database encoding. Other locale settings imply a specific encoding and will misbehave if the database encoding is something different. (Typical symptoms include bogus textual - sort order and wrong results from <function>upper()</> or - <function>lower()</>.) The server now rejects attempts to create + sort order and wrong results from <function>upper()</function> or + <function>lower()</function>.) The server now rejects attempts to create databases that have an incompatible encoding. </para> </listitem> @@ -6503,7 +6503,7 @@ current_date < 2017-11-17 <listitem> <para> <function>convert_from(bytea, name)</function> returns - <type>text</> — converts the first argument from the named + <type>text</type> — converts the first argument from the named encoding to the database encoding </para> </listitem> @@ -6511,7 +6511,7 @@ current_date < 2017-11-17 <listitem> <para> <function>convert_to(text, name)</function> returns - <type>bytea</> — converts the first argument from the + <type>bytea</type> — converts the first argument from the database encoding to the named encoding </para> </listitem> @@ -6519,7 +6519,7 @@ current_date < 2017-11-17 <listitem> <para> <function>length(bytea, name)</function> returns - <type>integer</> — gives the length of the first + <type>integer</type> — gives the length of the first argument in characters in the named encoding </para> </listitem> @@ -6582,10 +6582,10 @@ current_date < 2017-11-17 database consistency at risk; the worst case is that after a crash the last few reportedly-committed transactions might not be committed after all. - This feature is enabled by turning off <varname>synchronous_commit</> + This feature is enabled by turning off <varname>synchronous_commit</varname> (which can be done per-session or per-transaction, if some transactions are critical and others are not). - <varname>wal_writer_delay</> can be adjusted to control the maximum + <varname>wal_writer_delay</varname> can be adjusted to control the maximum delay before transactions actually reach disk. </para> </listitem> @@ -6609,19 +6609,19 @@ current_date < 2017-11-17 <listitem> <para> - Heap-Only Tuples (<acronym>HOT</>) accelerate space reuse for most - <command>UPDATE</>s and <command>DELETE</>s (Pavan Deolasee, with + Heap-Only Tuples (<acronym>HOT</acronym>) accelerate space reuse for most + <command>UPDATE</command>s and <command>DELETE</command>s (Pavan Deolasee, with ideas from many others) </para> <para> - <command>UPDATE</>s and <command>DELETE</>s leave dead tuples - behind, as do failed <command>INSERT</>s. Previously only - <command>VACUUM</> could reclaim space taken by dead tuples. With - <acronym>HOT</> dead tuple space can be automatically reclaimed at - the time of <command>INSERT</> or <command>UPDATE</> if no changes + <command>UPDATE</command>s and <command>DELETE</command>s leave dead tuples + behind, as do failed <command>INSERT</command>s. Previously only + <command>VACUUM</command> could reclaim space taken by dead tuples. With + <acronym>HOT</acronym> dead tuple space can be automatically reclaimed at + the time of <command>INSERT</command> or <command>UPDATE</command> if no changes are made to indexed columns. This allows for more consistent - performance. Also, <acronym>HOT</> avoids adding duplicate index + performance. Also, <acronym>HOT</acronym> avoids adding duplicate index entries. </para> </listitem> @@ -6655,13 +6655,13 @@ current_date < 2017-11-17 <listitem> <para> Using non-persistent transaction IDs for read-only transactions - reduces overhead and <command>VACUUM</> requirements (Florian Pflug) + reduces overhead and <command>VACUUM</command> requirements (Florian Pflug) </para> <para> Non-persistent transaction IDs do not increment the global transaction counter. Therefore, they reduce the load on - <structname>pg_clog</> and increase the time between forced + <structname>pg_clog</structname> and increase the time between forced vacuums to prevent transaction ID wraparound. Other performance improvements were also made that should improve concurrency. @@ -6674,7 +6674,7 @@ current_date < 2017-11-17 </para> <para> - There was formerly a hard limit of 2<superscript>32</> + There was formerly a hard limit of 2<superscript>32</superscript> (4 billion) commands per transaction. Now only commands that actually changed the database count, so while this limit still exists, it should be significantly less annoying. @@ -6683,7 +6683,7 @@ current_date < 2017-11-17 <listitem> <para> - Create a dedicated <acronym>WAL</> writer process to off-load + Create a dedicated <acronym>WAL</acronym> writer process to off-load work from backends (Simon) </para> </listitem> @@ -6696,7 +6696,7 @@ current_date < 2017-11-17 <para> Unless WAL archiving is enabled, the system now avoids WAL writes - for <command>CLUSTER</command> and just <function>fsync()</>s the + for <command>CLUSTER</command> and just <function>fsync()</function>s the table at the end of the command. It also does the same for <command>COPY</command> if the table was created in the same transaction. @@ -6720,22 +6720,22 @@ current_date < 2017-11-17 middle of the table (where another sequential scan is already in-progress) and wrapping around to the beginning to finish. This can affect the order of returned rows in a query that does not - specify <literal>ORDER BY</>. The <varname>synchronize_seqscans</> + specify <literal>ORDER BY</literal>. The <varname>synchronize_seqscans</varname> configuration parameter can be used to disable this if necessary. </para> </listitem> <listitem> <para> - <literal>ORDER BY ... LIMIT</> can be done without sorting + <literal>ORDER BY ... LIMIT</literal> can be done without sorting (Greg Stark) </para> <para> This is done by sequentially scanning the table and tracking just - the <quote>top N</> candidate rows, rather than performing a + the <quote>top N</quote> candidate rows, rather than performing a full sort of the entire table. This is useful when there is no - matching index and the <literal>LIMIT</> is not large. + matching index and the <literal>LIMIT</literal> is not large. </para> </listitem> @@ -6805,7 +6805,7 @@ current_date < 2017-11-17 <para> Previously PL/pgSQL functions that referenced temporary tables would fail if the temporary table was dropped and recreated - between function invocations, unless <literal>EXECUTE</> was + between function invocations, unless <literal>EXECUTE</literal> was used. This improvement fixes that problem and many related issues. </para> </listitem> @@ -6830,7 +6830,7 @@ current_date < 2017-11-17 <listitem> <para> Place temporary tables' TOAST tables in special schemas named - <literal>pg_toast_temp_<replaceable>nnn</></literal> (Tom) + <literal>pg_toast_temp_<replaceable>nnn</replaceable></literal> (Tom) </para> <para> @@ -6860,7 +6860,7 @@ current_date < 2017-11-17 <listitem> <para> - Fix <command>CREATE CONSTRAINT TRIGGER</> + Fix <command>CREATE CONSTRAINT TRIGGER</command> to convert old-style foreign key trigger definitions into regular foreign key constraints (Tom) </para> @@ -6868,17 +6868,17 @@ current_date < 2017-11-17 <para> This will ease porting of foreign key constraints carried forward from pre-7.3 databases, if they were never converted using - <filename>contrib/adddepend</>. + <filename>contrib/adddepend</filename>. </para> </listitem> <listitem> <para> - Fix <literal>DEFAULT NULL</> to override inherited defaults (Tom) + Fix <literal>DEFAULT NULL</literal> to override inherited defaults (Tom) </para> <para> - <literal>DEFAULT NULL</> was formerly considered a noise phrase, but it + <literal>DEFAULT NULL</literal> was formerly considered a noise phrase, but it should (and now does) override non-null defaults that would otherwise be inherited from a parent table or domain. </para> @@ -6998,9 +6998,9 @@ current_date < 2017-11-17 <para> This avoids Windows-specific problems with localized time zone names that are in the wrong encoding. There is a new - <varname>log_timezone</> parameter that controls the timezone + <varname>log_timezone</varname> parameter that controls the timezone used in log messages, independently of the client-visible - <varname>timezone</> parameter. + <varname>timezone</varname> parameter. </para> </listitem> @@ -7031,7 +7031,7 @@ current_date < 2017-11-17 <listitem> <para> - Add <literal>n_live_tuples</> and <literal>n_dead_tuples</> columns + Add <literal>n_live_tuples</literal> and <literal>n_dead_tuples</literal> columns to <literal>pg_stat_all_tables</literal> and related views (Glen Parker) </para> @@ -7039,8 +7039,8 @@ current_date < 2017-11-17 <listitem> <para> - Merge <varname>stats_block_level</> and <varname>stats_row_level</> - parameters into a single parameter <varname>track_counts</>, which + Merge <varname>stats_block_level</varname> and <varname>stats_row_level</varname> + parameters into a single parameter <varname>track_counts</varname>, which controls all messages sent to the statistics collector process (Tom) </para> @@ -7070,7 +7070,7 @@ current_date < 2017-11-17 <listitem> <para> - Support Security Service Provider Interface (<acronym>SSPI</>) for + Support Security Service Provider Interface (<acronym>SSPI</acronym>) for authentication on Windows (Magnus) </para> </listitem> @@ -7094,14 +7094,14 @@ current_date < 2017-11-17 <listitem> <para> - Add <varname>ssl_ciphers</> parameter to control accepted SSL ciphers + Add <varname>ssl_ciphers</varname> parameter to control accepted SSL ciphers (Victor Wagner) </para> </listitem> <listitem> <para> - Add a Kerberos realm parameter, <varname>krb_realm</> (Magnus) + Add a Kerberos realm parameter, <varname>krb_realm</varname> (Magnus) </para> </listitem> @@ -7110,7 +7110,7 @@ current_date < 2017-11-17 </sect3> <sect3> - <title>Write-Ahead Log (<acronym>WAL</>) and Continuous Archiving</title> + <title>Write-Ahead Log (<acronym>WAL</acronym>) and Continuous Archiving</title> <itemizedlist> <listitem> @@ -7133,7 +7133,7 @@ current_date < 2017-11-17 <para> This change allows a warm standby server to pass the name of the earliest still-needed WAL file to the recovery script, allowing automatic removal - of no-longer-needed WAL files. This is done using <literal>%r</> in + of no-longer-needed WAL files. This is done using <literal>%r</literal> in the <varname>restore_command</varname> parameter of <filename>recovery.conf</filename>. </para> @@ -7141,14 +7141,14 @@ current_date < 2017-11-17 <listitem> <para> - New boolean configuration parameter, <varname>archive_mode</>, + New boolean configuration parameter, <varname>archive_mode</varname>, controls archiving (Simon) </para> <para> - Previously setting <varname>archive_command</> to an empty string - turned off archiving. Now <varname>archive_mode</> turns archiving - on and off, independently of <varname>archive_command</>. This is + Previously setting <varname>archive_command</varname> to an empty string + turned off archiving. Now <varname>archive_mode</varname> turns archiving + on and off, independently of <varname>archive_command</varname>. This is useful for stopping archiving temporarily. </para> </listitem> @@ -7169,40 +7169,40 @@ current_date < 2017-11-17 <para> Text search has been improved, moved into the core code, and is now - installed by default. <filename>contrib/tsearch2</> now contains + installed by default. <filename>contrib/tsearch2</filename> now contains a compatibility interface. </para> </listitem> <listitem> <para> - Add control over whether <literal>NULL</>s sort first or last (Teodor, Tom) + Add control over whether <literal>NULL</literal>s sort first or last (Teodor, Tom) </para> <para> - The syntax is <literal>ORDER BY ... NULLS FIRST/LAST</>. + The syntax is <literal>ORDER BY ... NULLS FIRST/LAST</literal>. </para> </listitem> <listitem> <para> - Allow per-column ascending/descending (<literal>ASC</>/<literal>DESC</>) + Allow per-column ascending/descending (<literal>ASC</literal>/<literal>DESC</literal>) ordering options for indexes (Teodor, Tom) </para> <para> - Previously a query using <literal>ORDER BY</> with mixed - <literal>ASC</>/<literal>DESC</> specifiers could not fully use + Previously a query using <literal>ORDER BY</literal> with mixed + <literal>ASC</literal>/<literal>DESC</literal> specifiers could not fully use an index. Now an index can be fully used in such cases if the index was created with matching - <literal>ASC</>/<literal>DESC</> specifications. - <literal>NULL</> sort order within an index can be controlled, too. + <literal>ASC</literal>/<literal>DESC</literal> specifications. + <literal>NULL</literal> sort order within an index can be controlled, too. </para> </listitem> <listitem> <para> - Allow <literal>col IS NULL</> to use an index (Teodor) + Allow <literal>col IS NULL</literal> to use an index (Teodor) </para> </listitem> @@ -7213,8 +7213,8 @@ current_date < 2017-11-17 <para> This eliminates the need to reference a primary key to - <command>UPDATE</> or <command>DELETE</> rows returned by a cursor. - The syntax is <literal>UPDATE/DELETE WHERE CURRENT OF</>. + <command>UPDATE</command> or <command>DELETE</command> rows returned by a cursor. + The syntax is <literal>UPDATE/DELETE WHERE CURRENT OF</literal>. </para> </listitem> @@ -7243,7 +7243,7 @@ current_date < 2017-11-17 <listitem> <para> - Allow <literal>UNION</> and related constructs to return a domain + Allow <literal>UNION</literal> and related constructs to return a domain type, when all inputs are of that domain type (Tom) </para> @@ -7271,7 +7271,7 @@ current_date < 2017-11-17 <listitem> <para> Improve optimizer logic for detecting when variables are equal - in a <literal>WHERE</> clause (Tom) + in a <literal>WHERE</literal> clause (Tom) </para> <para> @@ -7318,8 +7318,8 @@ current_date < 2017-11-17 <para> For example, functions can now set their own - <varname>search_path</> to prevent unexpected behavior if a - different <varname>search_path</> exists at run-time. Security + <varname>search_path</varname> to prevent unexpected behavior if a + different <varname>search_path</varname> exists at run-time. Security definer functions should set <varname>search_path</varname> to avoid security loopholes. </para> @@ -7367,7 +7367,7 @@ current_date < 2017-11-17 <listitem> <para> - Make <command>CREATE/DROP/RENAME DATABASE</> wait briefly for + Make <command>CREATE/DROP/RENAME DATABASE</command> wait briefly for conflicting backends to exit before failing (Tom) </para> @@ -7385,7 +7385,7 @@ current_date < 2017-11-17 <para> This allows replication systems to disable triggers and rewrite rules as a group without modifying the system catalogs directly. - The behavior is controlled by <command>ALTER TABLE</> and a new + The behavior is controlled by <command>ALTER TABLE</command> and a new parameter <varname>session_replication_role</varname>. </para> </listitem> @@ -7397,7 +7397,7 @@ current_date < 2017-11-17 <para> This allows a user-defined type to take a modifier, like - <type>ssnum(7)</>. Previously only built-in + <type>ssnum(7)</type>. Previously only built-in data types could have modifiers. </para> </listitem> @@ -7419,7 +7419,7 @@ current_date < 2017-11-17 <para> While this is reasonably safe, some administrators might wish to revoke the privilege. It is controlled by - <structname>pg_pltemplate</>.<structfield>tmpldbacreate</>. + <structname>pg_pltemplate</structname>.<structfield>tmpldbacreate</structfield>. </para> </listitem> @@ -7465,7 +7465,7 @@ current_date < 2017-11-17 <listitem> <para> Add new <command>CLUSTER</command> syntax: <literal>CLUSTER - <replaceable>table</> USING <replaceable>index</></literal> + <replaceable>table</replaceable> USING <replaceable>index</replaceable></literal> (Holger Schurig) </para> @@ -7483,7 +7483,7 @@ current_date < 2017-11-17 <para> References to subplan outputs are now always shown correctly, - instead of using <literal>?column<replaceable>N</>?</literal> + instead of using <literal>?column<replaceable>N</replaceable>?</literal> for complicated cases. </para> </listitem> @@ -7527,19 +7527,19 @@ current_date < 2017-11-17 <para> This feature provides convenient support for fields that have a small, fixed set of allowed values. An example of creating an - <literal>ENUM</> type is - <literal>CREATE TYPE mood AS ENUM ('sad', 'ok', 'happy')</>. + <literal>ENUM</literal> type is + <literal>CREATE TYPE mood AS ENUM ('sad', 'ok', 'happy')</literal>. </para> </listitem> <listitem> <para> - Universally Unique Identifier (<type>UUID</>) data type (Gevik + Universally Unique Identifier (<type>UUID</type>) data type (Gevik Babakhani, Neil) </para> <para> - This closely matches <acronym>RFC</> 4122. + This closely matches <acronym>RFC</acronym> 4122. </para> </listitem> @@ -7549,7 +7549,7 @@ current_date < 2017-11-17 </para> <para> - This greatly increases the range of supported <type>MONEY</> + This greatly increases the range of supported <type>MONEY</type> values. </para> </listitem> @@ -7557,13 +7557,13 @@ current_date < 2017-11-17 <listitem> <para> Fix <type>float4</type>/<type>float8</type> to handle - <literal>Infinity</> and <literal>NAN</> (Not A Number) + <literal>Infinity</literal> and <literal>NAN</literal> (Not A Number) consistently (Bruce) </para> <para> The code formerly was not consistent about distinguishing - <literal>Infinity</> from overflow conditions. + <literal>Infinity</literal> from overflow conditions. </para> </listitem> @@ -7576,7 +7576,7 @@ current_date < 2017-11-17 <listitem> <para> - Prevent <command>COPY</> from using digits and lowercase letters as + Prevent <command>COPY</command> from using digits and lowercase letters as delimiters (Tom) </para> </listitem> @@ -7613,7 +7613,7 @@ current_date < 2017-11-17 <listitem> <para> - Implement <function>width_bucket()</function> for the <type>float8</> + Implement <function>width_bucket()</function> for the <type>float8</type> data type (Neil) </para> </listitem> @@ -7636,34 +7636,34 @@ current_date < 2017-11-17 <listitem> <para> - Add <literal>isodow</> option to <function>EXTRACT()</> and - <function>date_part()</> (Bruce) + Add <literal>isodow</literal> option to <function>EXTRACT()</function> and + <function>date_part()</function> (Bruce) </para> <para> This returns the day of the week, with Sunday as seven. - (<literal>dow</> returns Sunday as zero.) + (<literal>dow</literal> returns Sunday as zero.) </para> </listitem> <listitem> <para> - Add <literal>ID</> (ISO day of week) and <literal>IDDD</> (ISO - day of year) format codes for <function>to_char()</>, - <function>to_date()</>, and <function>to_timestamp()</> (Brendan + Add <literal>ID</literal> (ISO day of week) and <literal>IDDD</literal> (ISO + day of year) format codes for <function>to_char()</function>, + <function>to_date()</function>, and <function>to_timestamp()</function> (Brendan Jurd) </para> </listitem> <listitem> <para> - Make <function>to_timestamp()</> and <function>to_date()</> + Make <function>to_timestamp()</function> and <function>to_date()</function> assume <literal>TM</literal> (trim) option for potentially variable-width fields (Bruce) </para> <para> - This matches <productname>Oracle</>'s behavior. + This matches <productname>Oracle</productname>'s behavior. </para> </listitem> @@ -7671,7 +7671,7 @@ current_date < 2017-11-17 <para> Fix off-by-one conversion error in <function>to_date()</function>/<function>to_timestamp()</function> - <literal>D</> (non-ISO day of week) fields (Bruce) + <literal>D</literal> (non-ISO day of week) fields (Bruce) </para> </listitem> @@ -7757,7 +7757,7 @@ current_date < 2017-11-17 <para> This adds convenient syntax for PL/pgSQL set-returning functions - that want to return the result of a query. <command>RETURN QUERY</> + that want to return the result of a query. <command>RETURN QUERY</command> is easier and more efficient than a loop around <command>RETURN NEXT</command>. </para> @@ -7770,7 +7770,7 @@ current_date < 2017-11-17 </para> <para> - For example, <literal>myfunc.myvar</>. This is particularly + For example, <literal>myfunc.myvar</literal>. This is particularly useful for specifying variables in a query where the variable name might match a column name. </para> @@ -7790,11 +7790,11 @@ current_date < 2017-11-17 <listitem> <para> Tighten requirements for <literal>FOR</literal> loop - <literal>STEP</> values (Tom) + <literal>STEP</literal> values (Tom) </para> <para> - Prevent non-positive <literal>STEP</> values, and handle + Prevent non-positive <literal>STEP</literal> values, and handle loop overflows. </para> </listitem> @@ -7831,7 +7831,7 @@ current_date < 2017-11-17 <listitem> <para> - Allow type-name arguments to PL/Tcl <function>spi_prepare</> to + Allow type-name arguments to PL/Tcl <function>spi_prepare</function> to be data type aliases in addition to names found in <literal>pg_type</literal> (Andrew) </para> @@ -7852,7 +7852,7 @@ current_date < 2017-11-17 <listitem> <para> - Fix PL/Tcl problems with thread-enabled <filename>libtcl</> spawning + Fix PL/Tcl problems with thread-enabled <filename>libtcl</filename> spawning multiple threads within the backend (Steve Marshall, Paul Bayer, Doug Knight) </para> @@ -7867,7 +7867,7 @@ current_date < 2017-11-17 </sect3> <sect3> - <title><link linkend="APP-PSQL"><application>psql</></link></title> + <title><link linkend="APP-PSQL"><application>psql</application></link></title> <itemizedlist> <listitem> @@ -7907,20 +7907,20 @@ current_date < 2017-11-17 <listitem> <para> Allow <literal>\pset</literal>, <literal>\t</literal>, and - <literal>\x</literal> to specify <literal>on</> or <literal>off</>, + <literal>\x</literal> to specify <literal>on</literal> or <literal>off</literal>, rather than just toggling (Chad Wagner) </para> </listitem> <listitem> <para> - Add <literal>\sleep</> capability (Jan) + Add <literal>\sleep</literal> capability (Jan) </para> </listitem> <listitem> <para> - Enable <literal>\timing</> output for <literal>\copy</> (Andrew) + Enable <literal>\timing</literal> output for <literal>\copy</literal> (Andrew) </para> </listitem> @@ -7933,20 +7933,20 @@ current_date < 2017-11-17 <listitem> <para> - Flush <literal>\o</> output after each backslash command (Tom) + Flush <literal>\o</literal> output after each backslash command (Tom) </para> </listitem> <listitem> <para> - Correctly detect and report errors while reading a <literal>-f</> + Correctly detect and report errors while reading a <literal>-f</literal> input file (Peter) </para> </listitem> <listitem> <para> - Remove <literal>-u</> option (this option has long been deprecated) + Remove <literal>-u</literal> option (this option has long been deprecated) (Tom) </para> </listitem> @@ -7956,12 +7956,12 @@ current_date < 2017-11-17 </sect3> <sect3> - <title><link linkend="APP-PGDUMP"><application>pg_dump</></link></title> + <title><link linkend="APP-PGDUMP"><application>pg_dump</application></link></title> <itemizedlist> <listitem> <para> - Add <literal>--tablespaces-only</> and <literal>--roles-only</> + Add <literal>--tablespaces-only</literal> and <literal>--roles-only</literal> options to <application>pg_dumpall</application> (Dave Page) </para> </listitem> @@ -7980,7 +7980,7 @@ current_date < 2017-11-17 <listitem> <para> - Allow <application>pg_dumpall</> to accept an initial-connection + Allow <application>pg_dumpall</application> to accept an initial-connection database name rather than the default <literal>template1</literal> (Dave Page) </para> @@ -7988,7 +7988,7 @@ current_date < 2017-11-17 <listitem> <para> - In <literal>-n</> and <literal>-t</> switches, always match + In <literal>-n</literal> and <literal>-t</literal> switches, always match <literal>$</literal> literally (Tom) </para> </listitem> @@ -8001,7 +8001,7 @@ current_date < 2017-11-17 <listitem> <para> - Remove <literal>-u</> option (this option has long been deprecated) + Remove <literal>-u</literal> option (this option has long been deprecated) (Tom) </para> </listitem> @@ -8016,7 +8016,7 @@ current_date < 2017-11-17 <listitem> <para> - In <application>initdb</>, allow the location of the + In <application>initdb</application>, allow the location of the <filename>pg_xlog</filename> directory to be specified (Euler Taveira de Oliveira) </para> @@ -8024,19 +8024,19 @@ current_date < 2017-11-17 <listitem> <para> - Enable server core dump generation in <application>pg_regress</> + Enable server core dump generation in <application>pg_regress</application> on supported operating systems (Andrew) </para> </listitem> <listitem> <para> - Add a <literal>-t</> (timeout) parameter to <application>pg_ctl</> + Add a <literal>-t</literal> (timeout) parameter to <application>pg_ctl</application> (Bruce) </para> <para> - This controls how long <application>pg_ctl</> will wait when waiting + This controls how long <application>pg_ctl</application> will wait when waiting for server startup or shutdown. Formerly the timeout was hard-wired as 60 seconds. </para> @@ -8044,28 +8044,28 @@ current_date < 2017-11-17 <listitem> <para> - Add a <application>pg_ctl</> option to control generation + Add a <application>pg_ctl</application> option to control generation of server core dumps (Andrew) </para> </listitem> <listitem> <para> - Allow Control-C to cancel <application>clusterdb</>, - <application>reindexdb</>, and <application>vacuumdb</> (Itagaki + Allow Control-C to cancel <application>clusterdb</application>, + <application>reindexdb</application>, and <application>vacuumdb</application> (Itagaki Takahiro, Magnus) </para> </listitem> <listitem> <para> - Suppress command tag output for <application>createdb</>, - <application>createuser</>, <application>dropdb</>, and - <application>dropuser</> (Peter) + Suppress command tag output for <application>createdb</application>, + <application>createuser</application>, <application>dropdb</application>, and + <application>dropuser</application> (Peter) </para> <para> - The <literal>--quiet</> option is ignored and will be removed in 8.4. + The <literal>--quiet</literal> option is ignored and will be removed in 8.4. Progress messages when acting on all databases now go to stdout instead of stderr because they are not actually errors. </para> @@ -8076,33 +8076,33 @@ current_date < 2017-11-17 </sect3> <sect3> - <title><link linkend="libpq"><application>libpq</></link></title> + <title><link linkend="libpq"><application>libpq</application></link></title> <itemizedlist> <listitem> <para> - Interpret the <literal>dbName</> parameter of - <function>PQsetdbLogin()</> as a <literal>conninfo</> string if + Interpret the <literal>dbName</literal> parameter of + <function>PQsetdbLogin()</function> as a <literal>conninfo</literal> string if it contains an equals sign (Andrew) </para> <para> - This allows use of <literal>conninfo</> strings in client - programs that still use <literal>PQsetdbLogin()</>. + This allows use of <literal>conninfo</literal> strings in client + programs that still use <literal>PQsetdbLogin()</literal>. </para> </listitem> <listitem> <para> - Support a global <acronym>SSL</> configuration file (Victor + Support a global <acronym>SSL</acronym> configuration file (Victor Wagner) </para> </listitem> <listitem> <para> - Add environment variable <varname>PGSSLKEY</> to control - <acronym>SSL</> hardware keys (Victor Wagner) + Add environment variable <varname>PGSSLKEY</varname> to control + <acronym>SSL</acronym> hardware keys (Victor Wagner) </para> </listitem> @@ -8147,7 +8147,7 @@ current_date < 2017-11-17 </sect3> <sect3> - <title><link linkend="ecpg"><application>ecpg</></link></title> + <title><link linkend="ecpg"><application>ecpg</application></link></title> <itemizedlist> <listitem> @@ -8183,13 +8183,13 @@ current_date < 2017-11-17 </sect3> <sect3> - <title><application>Windows</> Port</title> + <title><application>Windows</application> Port</title> <itemizedlist> <listitem> <para> - Allow the whole <productname>PostgreSQL</> distribution to be compiled - with <productname>Microsoft Visual C++</> (Magnus and others) + Allow the whole <productname>PostgreSQL</productname> distribution to be compiled + with <productname>Microsoft Visual C++</productname> (Magnus and others) </para> <para> @@ -8226,7 +8226,7 @@ current_date < 2017-11-17 </sect3> <sect3> - <title>Server Programming Interface (<acronym>SPI</>)</title> + <title>Server Programming Interface (<acronym>SPI</acronym>)</title> <itemizedlist> <listitem> @@ -8236,7 +8236,7 @@ current_date < 2017-11-17 <para> Allow access to the cursor-related planning options, and add - <command>FETCH</>/<command>MOVE</> routines. + <command>FETCH</command>/<command>MOVE</command> routines. </para> </listitem> @@ -8247,15 +8247,15 @@ current_date < 2017-11-17 </para> <para> - The macro <literal>SPI_ERROR_CURSOR</> still exists but will + The macro <literal>SPI_ERROR_CURSOR</literal> still exists but will never be returned. </para> </listitem> <listitem> <para> - SPI plan pointers are now declared as <literal>SPIPlanPtr</> instead of - <literal>void *</> (Tom) + SPI plan pointers are now declared as <literal>SPIPlanPtr</literal> instead of + <literal>void *</literal> (Tom) </para> <para> @@ -8274,35 +8274,35 @@ current_date < 2017-11-17 <listitem> <para> - Add <application>configure</> option <literal>--enable-profiling</> - to enable code profiling (works only with <application>gcc</>) + Add <application>configure</application> option <literal>--enable-profiling</literal> + to enable code profiling (works only with <application>gcc</application>) (Korry Douglas and Nikhil Sontakke) </para> </listitem> <listitem> <para> - Add <application>configure</> option <literal>--with-system-tzdata</> + Add <application>configure</application> option <literal>--with-system-tzdata</literal> to use the operating system's time zone database (Peter) </para> </listitem> <listitem> <para> - Fix <acronym>PGXS</> so extensions can be built against PostgreSQL - installations whose <application>pg_config</> program does not - appear first in the <varname>PATH</> (Tom) + Fix <acronym>PGXS</acronym> so extensions can be built against PostgreSQL + installations whose <application>pg_config</application> program does not + appear first in the <varname>PATH</varname> (Tom) </para> </listitem> <listitem> <para> Support <command>gmake draft</command> when building the - <acronym>SGML</> documentation (Bruce) + <acronym>SGML</acronym> documentation (Bruce) </para> <para> - Unless <literal>draft</> is used, the documentation build will + Unless <literal>draft</literal> is used, the documentation build will now be repeated if necessary to ensure the index is up-to-date. </para> </listitem> @@ -8317,9 +8317,9 @@ current_date < 2017-11-17 <listitem> <para> - Rename macro <literal>DLLIMPORT</> to <literal>PGDLLIMPORT</> to + Rename macro <literal>DLLIMPORT</literal> to <literal>PGDLLIMPORT</literal> to avoid conflicting with third party includes (like Tcl) that - define <literal>DLLIMPORT</> (Magnus) + define <literal>DLLIMPORT</literal> (Magnus) </para> </listitem> @@ -8332,15 +8332,15 @@ current_date < 2017-11-17 <listitem> <para> - Update GIN <function>extractQuery()</> API to allow signalling + Update GIN <function>extractQuery()</function> API to allow signalling that nothing can satisfy the query (Teodor) </para> </listitem> <listitem> <para> - Move <literal>NAMEDATALEN</> definition from - <filename>postgres_ext.h</> to <filename>pg_config_manual.h</> + Move <literal>NAMEDATALEN</literal> definition from + <filename>postgres_ext.h</filename> to <filename>pg_config_manual.h</filename> (Peter) </para> </listitem> @@ -8364,7 +8364,7 @@ current_date < 2017-11-17 <listitem> <para> - Create a function variable <literal>join_search_hook</> to let plugins + Create a function variable <literal>join_search_hook</literal> to let plugins override the join search order portion of the planner (Julius Stroffek) </para> @@ -8372,7 +8372,7 @@ current_date < 2017-11-17 <listitem> <para> - Add <function>tas()</> support for Renesas' M32R processor + Add <function>tas()</function> support for Renesas' M32R processor (Kazuhiro Inaoka) </para> </listitem> @@ -8388,14 +8388,14 @@ current_date < 2017-11-17 <listitem> <para> Change the on-disk representation of the <type>NUMERIC</type> - data type so that the <structfield>sign_dscale</> word comes + data type so that the <structfield>sign_dscale</structfield> word comes before the weight (Tom) </para> </listitem> <listitem> <para> - Use <acronym>SYSV</> semaphores rather than POSIX on Darwin + Use <acronym>SYSV</acronym> semaphores rather than POSIX on Darwin >= 6.0, i.e., macOS 10.2 and up (Chris Marcellino) </para> </listitem> @@ -8432,8 +8432,8 @@ current_date < 2017-11-17 <listitem> <para> - Move <filename>contrib</> <filename>README</> content into the - main <productname>PostgreSQL</> documentation (Albert Cervera i + Move <filename>contrib</filename> <filename>README</filename> content into the + main <productname>PostgreSQL</productname> documentation (Albert Cervera i Areny) </para> </listitem> @@ -8455,11 +8455,11 @@ current_date < 2017-11-17 <listitem> <para> Add <filename>contrib/uuid-ossp</filename> module for generating - <type>UUID</> values using the OSSP UUID library (Peter) + <type>UUID</type> values using the OSSP UUID library (Peter) </para> <para> - Use <application>configure</> + Use <application>configure</application> <literal>--with-ossp-uuid</literal> to activate. This takes advantage of the new <type>UUID</type> builtin type. </para> @@ -8477,14 +8477,14 @@ current_date < 2017-11-17 <listitem> <para> - Allow <application>contrib/pgbench</> to set the fillfactor (Pavan + Allow <application>contrib/pgbench</application> to set the fillfactor (Pavan Deolasee) </para> </listitem> <listitem> <para> - Add timestamps to <application>contrib/pgbench</> <literal>-l</> + Add timestamps to <application>contrib/pgbench</application> <literal>-l</literal> (Greg Smith) </para> </listitem> @@ -8498,13 +8498,13 @@ current_date < 2017-11-17 <listitem> <para> - Add GIN support for <filename>contrib/hstore</> (Teodor) + Add GIN support for <filename>contrib/hstore</filename> (Teodor) </para> </listitem> <listitem> <para> - Add GIN support for <filename>contrib/pg_trgm</> (Guillaume Smet, Teodor) + Add GIN support for <filename>contrib/pg_trgm</filename> (Guillaume Smet, Teodor) </para> </listitem> diff --git a/doc/src/sgml/release-8.4.sgml b/doc/src/sgml/release-8.4.sgml index 53e319ff33e..521048ad93b 100644 --- a/doc/src/sgml/release-8.4.sgml +++ b/doc/src/sgml/release-8.4.sgml @@ -16,7 +16,7 @@ </para> <para> - This is expected to be the last <productname>PostgreSQL</> release + This is expected to be the last <productname>PostgreSQL</productname> release in the 8.4.X series. Users are encouraged to update to a newer release branch soon. </para> @@ -48,15 +48,15 @@ <listitem> <para> - Correctly initialize padding bytes in <filename>contrib/btree_gist</> - indexes on <type>bit</> columns (Heikki Linnakangas) + Correctly initialize padding bytes in <filename>contrib/btree_gist</filename> + indexes on <type>bit</type> columns (Heikki Linnakangas) </para> <para> This error could result in incorrect query results due to values that should compare equal not being seen as equal. - Users with GiST indexes on <type>bit</> or <type>bit varying</> - columns should <command>REINDEX</> those indexes after installing this + Users with GiST indexes on <type>bit</type> or <type>bit varying</type> + columns should <command>REINDEX</command> those indexes after installing this update. </para> </listitem> @@ -76,7 +76,7 @@ <listitem> <para> Fix possibly-incorrect cache invalidation during nested calls - to <function>ReceiveSharedInvalidMessages</> (Andres Freund) + to <function>ReceiveSharedInvalidMessages</function> (Andres Freund) </para> </listitem> @@ -103,13 +103,13 @@ This corrects cases where TOAST pointers could be copied into other tables without being dereferenced. If the original data is later deleted, it would lead to errors like <quote>missing chunk number 0 - for toast value ...</> when the now-dangling pointer is used. + for toast value ...</quote> when the now-dangling pointer is used. </para> </listitem> <listitem> <para> - Fix <quote>record type has not been registered</> failures with + Fix <quote>record type has not been registered</quote> failures with whole-row references to the output of Append plan nodes (Tom Lane) </para> </listitem> @@ -124,7 +124,7 @@ <listitem> <para> Fix query-lifespan memory leak while evaluating the arguments for a - function in <literal>FROM</> (Tom Lane) + function in <literal>FROM</literal> (Tom Lane) </para> </listitem> @@ -137,7 +137,7 @@ <listitem> <para> - Fix data encoding error in <filename>hungarian.stop</> (Tom Lane) + Fix data encoding error in <filename>hungarian.stop</filename> (Tom Lane) </para> </listitem> @@ -150,19 +150,19 @@ <para> This could cause problems (at least spurious warnings, and at worst an - infinite loop) if <command>CREATE INDEX</> or <command>CLUSTER</> were + infinite loop) if <command>CREATE INDEX</command> or <command>CLUSTER</command> were done later in the same transaction. </para> </listitem> <listitem> <para> - Clear <structname>pg_stat_activity</>.<structfield>xact_start</> - during <command>PREPARE TRANSACTION</> (Andres Freund) + Clear <structname>pg_stat_activity</structname>.<structfield>xact_start</structfield> + during <command>PREPARE TRANSACTION</command> (Andres Freund) </para> <para> - After the <command>PREPARE</>, the originating session is no longer in + After the <command>PREPARE</command>, the originating session is no longer in a transaction, so it should not continue to display a transaction start time. </para> @@ -170,7 +170,7 @@ <listitem> <para> - Fix <command>REASSIGN OWNED</> to not fail for text search objects + Fix <command>REASSIGN OWNED</command> to not fail for text search objects (Álvaro Herrera) </para> </listitem> @@ -182,7 +182,7 @@ <para> This ensures that the postmaster will properly clean up after itself - if, for example, it receives <systemitem>SIGINT</> while still + if, for example, it receives <systemitem>SIGINT</systemitem> while still starting up. </para> </listitem> @@ -190,7 +190,7 @@ <listitem> <para> Secure Unix-domain sockets of temporary postmasters started during - <literal>make check</> (Noah Misch) + <literal>make check</literal> (Noah Misch) </para> <para> @@ -199,16 +199,16 @@ the operating-system user running the test, as we previously noted in CVE-2014-0067. This change defends against that risk by placing the server's socket in a temporary, mode 0700 subdirectory - of <filename>/tmp</>. The hazard remains however on platforms where + of <filename>/tmp</filename>. The hazard remains however on platforms where Unix sockets are not supported, notably Windows, because then the temporary postmaster must accept local TCP connections. </para> <para> A useful side effect of this change is to simplify - <literal>make check</> testing in builds that - override <literal>DEFAULT_PGSOCKET_DIR</>. Popular non-default values - like <filename>/var/run/postgresql</> are often not writable by the + <literal>make check</literal> testing in builds that + override <literal>DEFAULT_PGSOCKET_DIR</literal>. Popular non-default values + like <filename>/var/run/postgresql</filename> are often not writable by the build user, requiring workarounds that will no longer be necessary. </para> </listitem> @@ -232,15 +232,15 @@ </para> <para> - This oversight could cause <application>initdb</> - and <application>pg_upgrade</> to fail on Windows, if the installation - path contained both spaces and <literal>@</> signs. + This oversight could cause <application>initdb</application> + and <application>pg_upgrade</application> to fail on Windows, if the installation + path contained both spaces and <literal>@</literal> signs. </para> </listitem> <listitem> <para> - Fix linking of <application>libpython</> on macOS (Tom Lane) + Fix linking of <application>libpython</application> on macOS (Tom Lane) </para> <para> @@ -251,17 +251,17 @@ <listitem> <para> - Avoid buffer bloat in <application>libpq</> when the server + Avoid buffer bloat in <application>libpq</application> when the server consistently sends data faster than the client can absorb it (Shin-ichi Morita, Tom Lane) </para> <para> - <application>libpq</> could be coerced into enlarging its input buffer + <application>libpq</application> could be coerced into enlarging its input buffer until it runs out of memory (which would be reported misleadingly - as <quote>lost synchronization with server</>). Under ordinary + as <quote>lost synchronization with server</quote>). Under ordinary circumstances it's quite far-fetched that data could be continuously - transmitted more quickly than the <function>recv()</> loop can + transmitted more quickly than the <function>recv()</function> loop can absorb it, but this has been observed when the client is artificially slowed by scheduler constraints. </para> @@ -269,27 +269,27 @@ <listitem> <para> - Ensure that LDAP lookup attempts in <application>libpq</> time out as + Ensure that LDAP lookup attempts in <application>libpq</application> time out as intended (Laurenz Albe) </para> </listitem> <listitem> <para> - Fix <application>pg_restore</>'s processing of old-style large object + Fix <application>pg_restore</application>'s processing of old-style large object comments (Tom Lane) </para> <para> A direct-to-database restore from an archive file generated by a - pre-9.0 version of <application>pg_dump</> would usually fail if the + pre-9.0 version of <application>pg_dump</application> would usually fail if the archive contained more than a few comments for large objects. </para> </listitem> <listitem> <para> - In <filename>contrib/pgcrypto</> functions, ensure sensitive + In <filename>contrib/pgcrypto</filename> functions, ensure sensitive information is cleared from stack variables before returning (Marko Kreen) </para> @@ -297,20 +297,20 @@ <listitem> <para> - In <filename>contrib/uuid-ossp</>, cache the state of the OSSP UUID + In <filename>contrib/uuid-ossp</filename>, cache the state of the OSSP UUID library across calls (Tom Lane) </para> <para> This improves the efficiency of UUID generation and reduces the amount - of entropy drawn from <filename>/dev/urandom</>, on platforms that + of entropy drawn from <filename>/dev/urandom</filename>, on platforms that have that. </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2014e + Update time zone data files to <application>tzdata</application> release 2014e for DST law changes in Crimea, Egypt, and Morocco. </para> </listitem> @@ -335,7 +335,7 @@ </para> <para> - The <productname>PostgreSQL</> community will stop releasing updates + The <productname>PostgreSQL</productname> community will stop releasing updates for the 8.4.X release series in July 2014. Users are encouraged to update to a newer release branch soon. </para> @@ -387,7 +387,7 @@ <listitem> <para> - Remove incorrect code that tried to allow <literal>OVERLAPS</> with + Remove incorrect code that tried to allow <literal>OVERLAPS</literal> with single-element row arguments (Joshua Yanovski) </para> @@ -400,35 +400,35 @@ <listitem> <para> - Avoid getting more than <literal>AccessShareLock</> when de-parsing a + Avoid getting more than <literal>AccessShareLock</literal> when de-parsing a rule or view (Dean Rasheed) </para> <para> - This oversight resulted in <application>pg_dump</> unexpectedly - acquiring <literal>RowExclusiveLock</> locks on tables mentioned as - the targets of <literal>INSERT</>/<literal>UPDATE</>/<literal>DELETE</> + This oversight resulted in <application>pg_dump</application> unexpectedly + acquiring <literal>RowExclusiveLock</literal> locks on tables mentioned as + the targets of <literal>INSERT</literal>/<literal>UPDATE</literal>/<literal>DELETE</literal> commands in rules. While usually harmless, that could interfere with concurrent transactions that tried to acquire, for example, - <literal>ShareLock</> on those tables. + <literal>ShareLock</literal> on those tables. </para> </listitem> <listitem> <para> - Prevent interrupts while reporting non-<literal>ERROR</> messages + Prevent interrupts while reporting non-<literal>ERROR</literal> messages (Tom Lane) </para> <para> This guards against rare server-process freezeups due to recursive - entry to <function>syslog()</>, and perhaps other related problems. + entry to <function>syslog()</function>, and perhaps other related problems. </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2014a + Update time zone data files to <application>tzdata</application> release 2014a for DST law changes in Fiji and Turkey, plus historical changes in Israel and Ukraine. </para> @@ -454,7 +454,7 @@ </para> <para> - The <productname>PostgreSQL</> community will stop releasing updates + The <productname>PostgreSQL</productname> community will stop releasing updates for the 8.4.X release series in July 2014. Users are encouraged to update to a newer release branch soon. </para> @@ -480,19 +480,19 @@ <listitem> <para> - Shore up <literal>GRANT ... WITH ADMIN OPTION</> restrictions + Shore up <literal>GRANT ... WITH ADMIN OPTION</literal> restrictions (Noah Misch) </para> <para> - Granting a role without <literal>ADMIN OPTION</> is supposed to + Granting a role without <literal>ADMIN OPTION</literal> is supposed to prevent the grantee from adding or removing members from the granted role, but this restriction was easily bypassed by doing <literal>SET - ROLE</> first. The security impact is mostly that a role member can + ROLE</literal> first. The security impact is mostly that a role member can revoke the access of others, contrary to the wishes of his grantor. Unapproved role member additions are a lesser concern, since an uncooperative role member could provide most of his rights to others - anyway by creating views or <literal>SECURITY DEFINER</> functions. + anyway by creating views or <literal>SECURITY DEFINER</literal> functions. (CVE-2014-0060) </para> </listitem> @@ -505,7 +505,7 @@ <para> The primary role of PL validator functions is to be called implicitly - during <command>CREATE FUNCTION</>, but they are also normal SQL + during <command>CREATE FUNCTION</command>, but they are also normal SQL functions that a user can call explicitly. Calling a validator on a function actually written in some other language was not checked for and could be exploited for privilege-escalation purposes. @@ -525,7 +525,7 @@ <para> If the name lookups come to different conclusions due to concurrent activity, we might perform some parts of the DDL on a different table - than other parts. At least in the case of <command>CREATE INDEX</>, + than other parts. At least in the case of <command>CREATE INDEX</command>, this can be used to cause the permissions checks to be performed against a different table than the index creation, allowing for a privilege escalation attack. @@ -539,12 +539,12 @@ </para> <para> - The <literal>MAXDATELEN</> constant was too small for the longest - possible value of type <type>interval</>, allowing a buffer overrun - in <function>interval_out()</>. Although the datetime input + The <literal>MAXDATELEN</literal> constant was too small for the longest + possible value of type <type>interval</type>, allowing a buffer overrun + in <function>interval_out()</function>. Although the datetime input functions were more careful about avoiding buffer overrun, the limit was short enough to cause them to reject some valid inputs, such as - input containing a very long timezone name. The <application>ecpg</> + input containing a very long timezone name. The <application>ecpg</application> library contained these vulnerabilities along with some of its own. (CVE-2014-0063) </para> @@ -571,7 +571,7 @@ </para> <para> - Use <function>strlcpy()</> and related functions to provide a clear + Use <function>strlcpy()</function> and related functions to provide a clear guarantee that fixed-size buffers are not overrun. Unlike the preceding items, it is unclear whether these cases really represent live issues, since in most cases there appear to be previous @@ -583,35 +583,35 @@ <listitem> <para> - Avoid crashing if <function>crypt()</> returns NULL (Honza Horak, + Avoid crashing if <function>crypt()</function> returns NULL (Honza Horak, Bruce Momjian) </para> <para> - There are relatively few scenarios in which <function>crypt()</> - could return NULL, but <filename>contrib/chkpass</> would crash + There are relatively few scenarios in which <function>crypt()</function> + could return NULL, but <filename>contrib/chkpass</filename> would crash if it did. One practical case in which this could be an issue is - if <application>libc</> is configured to refuse to execute unapproved - hashing algorithms (e.g., <quote>FIPS mode</>). + if <application>libc</application> is configured to refuse to execute unapproved + hashing algorithms (e.g., <quote>FIPS mode</quote>). (CVE-2014-0066) </para> </listitem> <listitem> <para> - Document risks of <literal>make check</> in the regression testing + Document risks of <literal>make check</literal> in the regression testing instructions (Noah Misch, Tom Lane) </para> <para> - Since the temporary server started by <literal>make check</> - uses <quote>trust</> authentication, another user on the same machine + Since the temporary server started by <literal>make check</literal> + uses <quote>trust</quote> authentication, another user on the same machine could connect to it as database superuser, and then potentially exploit the privileges of the operating-system user who started the tests. A future release will probably incorporate changes in the testing procedure to prevent this risk, but some public discussion is needed first. So for the moment, just warn people against using - <literal>make check</> when there are untrusted users on the + <literal>make check</literal> when there are untrusted users on the same machine. (CVE-2014-0067) </para> @@ -626,7 +626,7 @@ <para> The WAL update could be applied to the wrong page, potentially many pages past where it should have been. Aside from corrupting data, - this error has been observed to result in significant <quote>bloat</> + this error has been observed to result in significant <quote>bloat</quote> of standby servers compared to their masters, due to updates being applied far beyond where the end-of-file should have been. This failure mode does not appear to be a significant risk during crash @@ -654,25 +654,25 @@ <para> Ensure that signal handlers don't attempt to use the - process's <varname>MyProc</> pointer after it's no longer valid. + process's <varname>MyProc</varname> pointer after it's no longer valid. </para> </listitem> <listitem> <para> - Fix unsafe references to <varname>errno</> within error reporting + Fix unsafe references to <varname>errno</varname> within error reporting logic (Christian Kruse) </para> <para> This would typically lead to odd behaviors such as missing or - inappropriate <literal>HINT</> fields. + inappropriate <literal>HINT</literal> fields. </para> </listitem> <listitem> <para> - Fix possible crashes from using <function>ereport()</> too early + Fix possible crashes from using <function>ereport()</function> too early during server startup (Tom Lane) </para> @@ -696,7 +696,7 @@ <listitem> <para> - Fix length checking for Unicode identifiers (<literal>U&"..."</> + Fix length checking for Unicode identifiers (<literal>U&"..."</literal> syntax) containing escapes (Tom Lane) </para> @@ -710,19 +710,19 @@ <listitem> <para> Fix possible crash due to invalid plan for nested sub-selects, such - as <literal>WHERE (... x IN (SELECT ...) ...) IN (SELECT ...)</> + as <literal>WHERE (... x IN (SELECT ...) ...) IN (SELECT ...)</literal> (Tom Lane) </para> </listitem> <listitem> <para> - Ensure that <command>ANALYZE</> creates statistics for a table column - even when all the values in it are <quote>too wide</> (Tom Lane) + Ensure that <command>ANALYZE</command> creates statistics for a table column + even when all the values in it are <quote>too wide</quote> (Tom Lane) </para> <para> - <command>ANALYZE</> intentionally omits very wide values from its + <command>ANALYZE</command> intentionally omits very wide values from its histogram and most-common-values calculations, but it neglected to do something sane in the case that all the sampled entries are too wide. </para> @@ -730,21 +730,21 @@ <listitem> <para> - In <literal>ALTER TABLE ... SET TABLESPACE</>, allow the database's + In <literal>ALTER TABLE ... SET TABLESPACE</literal>, allow the database's default tablespace to be used without a permissions check (Stephen Frost) </para> <para> - <literal>CREATE TABLE</> has always allowed such usage, - but <literal>ALTER TABLE</> didn't get the memo. + <literal>CREATE TABLE</literal> has always allowed such usage, + but <literal>ALTER TABLE</literal> didn't get the memo. </para> </listitem> <listitem> <para> - Fix <quote>cannot accept a set</> error when some arms of - a <literal>CASE</> return a set and others don't (Tom Lane) + Fix <quote>cannot accept a set</quote> error when some arms of + a <literal>CASE</literal> return a set and others don't (Tom Lane) </para> </listitem> @@ -769,12 +769,12 @@ <listitem> <para> - Fix possible misbehavior in <function>plainto_tsquery()</> + Fix possible misbehavior in <function>plainto_tsquery()</function> (Heikki Linnakangas) </para> <para> - Use <function>memmove()</> not <function>memcpy()</> for copying + Use <function>memmove()</function> not <function>memcpy()</function> for copying overlapping memory regions. There have been no field reports of this actually causing trouble, but it's certainly risky. </para> @@ -782,51 +782,51 @@ <listitem> <para> - Accept <literal>SHIFT_JIS</> as an encoding name for locale checking + Accept <literal>SHIFT_JIS</literal> as an encoding name for locale checking purposes (Tatsuo Ishii) </para> </listitem> <listitem> <para> - Fix misbehavior of <function>PQhost()</> on Windows (Fujii Masao) + Fix misbehavior of <function>PQhost()</function> on Windows (Fujii Masao) </para> <para> - It should return <literal>localhost</> if no host has been specified. + It should return <literal>localhost</literal> if no host has been specified. </para> </listitem> <listitem> <para> - Improve error handling in <application>libpq</> and <application>psql</> - for failures during <literal>COPY TO STDOUT/FROM STDIN</> (Tom Lane) + Improve error handling in <application>libpq</application> and <application>psql</application> + for failures during <literal>COPY TO STDOUT/FROM STDIN</literal> (Tom Lane) </para> <para> In particular this fixes an infinite loop that could occur in 9.2 and up if the server connection was lost during <literal>COPY FROM - STDIN</>. Variants of that scenario might be possible in older + STDIN</literal>. Variants of that scenario might be possible in older versions, or with other client applications. </para> </listitem> <listitem> <para> - Fix misaligned descriptors in <application>ecpg</> (MauMau) + Fix misaligned descriptors in <application>ecpg</application> (MauMau) </para> </listitem> <listitem> <para> - In <application>ecpg</>, handle lack of a hostname in the connection + In <application>ecpg</application>, handle lack of a hostname in the connection parameters properly (Michael Meskes) </para> </listitem> <listitem> <para> - Fix performance regression in <filename>contrib/dblink</> connection + Fix performance regression in <filename>contrib/dblink</filename> connection startup (Joe Conway) </para> @@ -837,7 +837,7 @@ <listitem> <para> - In <filename>contrib/isn</>, fix incorrect calculation of the check + In <filename>contrib/isn</filename>, fix incorrect calculation of the check digit for ISMN values (Fabien Coelho) </para> </listitem> @@ -851,21 +851,21 @@ <listitem> <para> - In Mingw and Cygwin builds, install the <application>libpq</> DLL - in the <filename>bin</> directory (Andrew Dunstan) + In Mingw and Cygwin builds, install the <application>libpq</application> DLL + in the <filename>bin</filename> directory (Andrew Dunstan) </para> <para> This duplicates what the MSVC build has long done. It should fix - problems with programs like <application>psql</> failing to start + problems with programs like <application>psql</application> failing to start because they can't find the DLL. </para> </listitem> <listitem> <para> - Don't generate plain-text <filename>HISTORY</> - and <filename>src/test/regress/README</> files anymore (Tom Lane) + Don't generate plain-text <filename>HISTORY</filename> + and <filename>src/test/regress/README</filename> files anymore (Tom Lane) </para> <para> @@ -874,20 +874,20 @@ the likely audience for plain-text format. Distribution tarballs will still contain files by these names, but they'll just be stubs directing the reader to consult the main documentation. - The plain-text <filename>INSTALL</> file will still be maintained, as + The plain-text <filename>INSTALL</filename> file will still be maintained, as there is arguably a use-case for that. </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2013i + Update time zone data files to <application>tzdata</application> release 2013i for DST law changes in Jordan and historical changes in Cuba. </para> <para> - In addition, the zones <literal>Asia/Riyadh87</>, - <literal>Asia/Riyadh88</>, and <literal>Asia/Riyadh89</> have been + In addition, the zones <literal>Asia/Riyadh87</literal>, + <literal>Asia/Riyadh88</literal>, and <literal>Asia/Riyadh89</literal> have been removed, as they are no longer maintained by IANA, and never represented actual civil timekeeping practice. </para> @@ -939,13 +939,13 @@ <listitem> <para> - Fix <command>VACUUM</>'s tests to see whether it can - update <structfield>relfrozenxid</> (Andres Freund) + Fix <command>VACUUM</command>'s tests to see whether it can + update <structfield>relfrozenxid</structfield> (Andres Freund) </para> <para> - In some cases <command>VACUUM</> (either manual or autovacuum) could - incorrectly advance a table's <structfield>relfrozenxid</> value, + In some cases <command>VACUUM</command> (either manual or autovacuum) could + incorrectly advance a table's <structfield>relfrozenxid</structfield> value, allowing tuples to escape freezing, causing those rows to become invisible once 2^31 transactions have elapsed. The probability of data loss is fairly low since multiple incorrect advancements would @@ -957,12 +957,12 @@ <para> The issue can be ameliorated by, after upgrading, vacuuming all tables in all databases while having <link - linkend="guc-vacuum-freeze-table-age"><varname>vacuum_freeze_table_age</></link> + linkend="guc-vacuum-freeze-table-age"><varname>vacuum_freeze_table_age</varname></link> set to zero. This will fix any latent corruption but will not be able to fix all pre-existing data errors. However, an installation can be presumed safe after performing this vacuuming if it has executed fewer than 2^31 update transactions in its lifetime (check this with - <literal>SELECT txid_current() < 2^31</>). + <literal>SELECT txid_current() < 2^31</literal>). </para> </listitem> @@ -979,8 +979,8 @@ <listitem> <para> - Avoid flattening a subquery whose <literal>SELECT</> list contains a - volatile function wrapped inside a sub-<literal>SELECT</> (Tom Lane) + Avoid flattening a subquery whose <literal>SELECT</literal> list contains a + volatile function wrapped inside a sub-<literal>SELECT</literal> (Tom Lane) </para> <para> @@ -997,7 +997,7 @@ <para> This error could lead to incorrect plans for queries involving - multiple levels of subqueries within <literal>JOIN</> syntax. + multiple levels of subqueries within <literal>JOIN</literal> syntax. </para> </listitem> @@ -1015,13 +1015,13 @@ <listitem> <para> - Fix array slicing of <type>int2vector</> and <type>oidvector</> values + Fix array slicing of <type>int2vector</type> and <type>oidvector</type> values (Tom Lane) </para> <para> Expressions of this kind are now implicitly promoted to - regular <type>int2</> or <type>oid</> arrays. + regular <type>int2</type> or <type>oid</type> arrays. </para> </listitem> @@ -1035,7 +1035,7 @@ In some cases, the system would use the simple GMT offset value when it should have used the regular timezone setting that had prevailed before the simple offset was selected. This change also causes - the <function>timeofday</> function to honor the simple GMT offset + the <function>timeofday</function> function to honor the simple GMT offset zone. </para> </listitem> @@ -1049,7 +1049,7 @@ <listitem> <para> - Properly quote generated command lines in <application>pg_ctl</> + Properly quote generated command lines in <application>pg_ctl</application> (Naoya Anzai and Tom Lane) </para> @@ -1060,10 +1060,10 @@ <listitem> <para> - Fix <application>pg_dumpall</> to work when a source database + Fix <application>pg_dumpall</application> to work when a source database sets <link - linkend="guc-default-transaction-read-only"><varname>default_transaction_read_only</></link> - via <command>ALTER DATABASE SET</> (Kevin Grittner) + linkend="guc-default-transaction-read-only"><varname>default_transaction_read_only</varname></link> + via <command>ALTER DATABASE SET</command> (Kevin Grittner) </para> <para> @@ -1073,21 +1073,21 @@ <listitem> <para> - Fix <application>ecpg</>'s processing of lists of variables - declared <type>varchar</> (Zoltán Böszörményi) + Fix <application>ecpg</application>'s processing of lists of variables + declared <type>varchar</type> (Zoltán Böszörményi) </para> </listitem> <listitem> <para> - Make <filename>contrib/lo</> defend against incorrect trigger definitions + Make <filename>contrib/lo</filename> defend against incorrect trigger definitions (Marc Cousin) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2013h + Update time zone data files to <application>tzdata</application> release 2013h for DST law changes in Argentina, Brazil, Jordan, Libya, Liechtenstein, Morocco, and Palestine. Also, new timezone abbreviations WIB, WIT, WITA for Indonesia. @@ -1139,7 +1139,7 @@ </para> <para> - <productname>PostgreSQL</> case-folds non-ASCII characters only + <productname>PostgreSQL</productname> case-folds non-ASCII characters only when using a single-byte server encoding. </para> </listitem> @@ -1153,7 +1153,7 @@ <listitem> <para> - Fix memory overcommit bug when <varname>work_mem</> is using more + Fix memory overcommit bug when <varname>work_mem</varname> is using more than 24GB of memory (Stephen Frost) </para> </listitem> @@ -1171,29 +1171,29 @@ </para> <para> - Previously tests like <literal>col IS NOT TRUE</> and <literal>col IS - NOT FALSE</> did not properly factor in NULL values when estimating + Previously tests like <literal>col IS NOT TRUE</literal> and <literal>col IS + NOT FALSE</literal> did not properly factor in NULL values when estimating plan costs. </para> </listitem> <listitem> <para> - Prevent pushing down <literal>WHERE</> clauses into unsafe - <literal>UNION/INTERSECT</> subqueries (Tom Lane) + Prevent pushing down <literal>WHERE</literal> clauses into unsafe + <literal>UNION/INTERSECT</literal> subqueries (Tom Lane) </para> <para> - Subqueries of a <literal>UNION</> or <literal>INTERSECT</> that + Subqueries of a <literal>UNION</literal> or <literal>INTERSECT</literal> that contain set-returning functions or volatile functions in their - <literal>SELECT</> lists could be improperly optimized, leading to + <literal>SELECT</literal> lists could be improperly optimized, leading to run-time errors or incorrect query results. </para> </listitem> <listitem> <para> - Fix rare case of <quote>failed to locate grouping columns</> + Fix rare case of <quote>failed to locate grouping columns</quote> planner failure (Tom Lane) </para> </listitem> @@ -1208,13 +1208,13 @@ <listitem> <para> Fix possible deadlock during concurrent <command>CREATE INDEX - CONCURRENTLY</> operations (Tom Lane) + CONCURRENTLY</command> operations (Tom Lane) </para> </listitem> <listitem> <para> - Fix <function>regexp_matches()</> handling of zero-length matches + Fix <function>regexp_matches()</function> handling of zero-length matches (Jeevan Chalke) </para> @@ -1238,14 +1238,14 @@ <listitem> <para> - Prevent <command>CREATE FUNCTION</> from checking <command>SET</> + Prevent <command>CREATE FUNCTION</command> from checking <command>SET</command> variables unless function body checking is enabled (Tom Lane) </para> </listitem> <listitem> <para> - Fix <function>pgp_pub_decrypt()</> so it works for secret keys with + Fix <function>pgp_pub_decrypt()</function> so it works for secret keys with passwords (Marko Kreen) </para> </listitem> @@ -1260,21 +1260,21 @@ <listitem> <para> Avoid possible failure when performing transaction control commands (e.g - <command>ROLLBACK</>) in prepared queries (Tom Lane) + <command>ROLLBACK</command>) in prepared queries (Tom Lane) </para> </listitem> <listitem> <para> Ensure that floating-point data input accepts standard spellings - of <quote>infinity</> on all platforms (Tom Lane) + of <quote>infinity</quote> on all platforms (Tom Lane) </para> <para> - The C99 standard says that allowable spellings are <literal>inf</>, - <literal>+inf</>, <literal>-inf</>, <literal>infinity</>, - <literal>+infinity</>, and <literal>-infinity</>. Make sure we - recognize these even if the platform's <function>strtod</> function + The C99 standard says that allowable spellings are <literal>inf</literal>, + <literal>+inf</literal>, <literal>-inf</literal>, <literal>infinity</literal>, + <literal>+infinity</literal>, and <literal>-infinity</literal>. Make sure we + recognize these even if the platform's <function>strtod</function> function doesn't. </para> </listitem> @@ -1288,7 +1288,7 @@ <listitem> <para> - Update time zone data files to <application>tzdata</> release 2013d + Update time zone data files to <application>tzdata</application> release 2013d for DST law changes in Israel, Morocco, Palestine, and Paraguay. Also, historical zone data corrections for Macquarie Island. </para> @@ -1323,7 +1323,7 @@ <para> However, this release corrects several errors in management of GiST indexes. After installing this update, it is advisable to - <command>REINDEX</> any GiST indexes that meet one or more of the + <command>REINDEX</command> any GiST indexes that meet one or more of the conditions described below. </para> @@ -1347,41 +1347,41 @@ <para> This avoids a scenario wherein random numbers generated by - <filename>contrib/pgcrypto</> functions might be relatively easy for + <filename>contrib/pgcrypto</filename> functions might be relatively easy for another database user to guess. The risk is only significant when - the postmaster is configured with <varname>ssl</> = <literal>on</> + the postmaster is configured with <varname>ssl</varname> = <literal>on</literal> but most connections don't use SSL encryption. (CVE-2013-1900) </para> </listitem> <listitem> <para> - Fix GiST indexes to not use <quote>fuzzy</> geometric comparisons when + Fix GiST indexes to not use <quote>fuzzy</quote> geometric comparisons when it's not appropriate to do so (Alexander Korotkov) </para> <para> - The core geometric types perform comparisons using <quote>fuzzy</> - equality, but <function>gist_box_same</> must do exact comparisons, + The core geometric types perform comparisons using <quote>fuzzy</quote> + equality, but <function>gist_box_same</function> must do exact comparisons, else GiST indexes using it might become inconsistent. After installing - this update, users should <command>REINDEX</> any GiST indexes on - <type>box</>, <type>polygon</>, <type>circle</>, or <type>point</> - columns, since all of these use <function>gist_box_same</>. + this update, users should <command>REINDEX</command> any GiST indexes on + <type>box</type>, <type>polygon</type>, <type>circle</type>, or <type>point</type> + columns, since all of these use <function>gist_box_same</function>. </para> </listitem> <listitem> <para> Fix erroneous range-union and penalty logic in GiST indexes that use - <filename>contrib/btree_gist</> for variable-width data types, that is - <type>text</>, <type>bytea</>, <type>bit</>, and <type>numeric</> + <filename>contrib/btree_gist</filename> for variable-width data types, that is + <type>text</type>, <type>bytea</type>, <type>bit</type>, and <type>numeric</type> columns (Tom Lane) </para> <para> These errors could result in inconsistent indexes in which some keys that are present would not be found by searches, and also in useless - index bloat. Users are advised to <command>REINDEX</> such indexes + index bloat. Users are advised to <command>REINDEX</command> such indexes after installing this update. </para> </listitem> @@ -1396,7 +1396,7 @@ These errors could result in inconsistent indexes in which some keys that are present would not be found by searches, and also in indexes that are unnecessarily inefficient to search. Users are advised to - <command>REINDEX</> multi-column GiST indexes after installing this + <command>REINDEX</command> multi-column GiST indexes after installing this update. </para> </listitem> @@ -1417,27 +1417,27 @@ <listitem> <para> - Fix <function>to_char()</> to use ASCII-only case-folding rules where + Fix <function>to_char()</function> to use ASCII-only case-folding rules where appropriate (Tom Lane) </para> <para> This fixes misbehavior of some template patterns that should be - locale-independent, but mishandled <quote><literal>I</></quote> and - <quote><literal>i</></quote> in Turkish locales. + locale-independent, but mishandled <quote><literal>I</literal></quote> and + <quote><literal>i</literal></quote> in Turkish locales. </para> </listitem> <listitem> <para> - Fix unwanted rejection of timestamp <literal>1999-12-31 24:00:00</> + Fix unwanted rejection of timestamp <literal>1999-12-31 24:00:00</literal> (Tom Lane) </para> </listitem> <listitem> <para> - Remove useless <quote>picksplit doesn't support secondary split</> log + Remove useless <quote>picksplit doesn't support secondary split</quote> log messages (Josh Hansen, Tom Lane) </para> @@ -1458,28 +1458,28 @@ <listitem> <para> - Eliminate memory leaks in PL/Perl's <function>spi_prepare()</> function + Eliminate memory leaks in PL/Perl's <function>spi_prepare()</function> function (Alex Hunsaker, Tom Lane) </para> </listitem> <listitem> <para> - Fix <application>pg_dumpall</> to handle database names containing - <quote><literal>=</></quote> correctly (Heikki Linnakangas) + Fix <application>pg_dumpall</application> to handle database names containing + <quote><literal>=</literal></quote> correctly (Heikki Linnakangas) </para> </listitem> <listitem> <para> - Avoid crash in <application>pg_dump</> when an incorrect connection + Avoid crash in <application>pg_dump</application> when an incorrect connection string is given (Heikki Linnakangas) </para> </listitem> <listitem> <para> - Ignore invalid indexes in <application>pg_dump</> (Michael Paquier) + Ignore invalid indexes in <application>pg_dump</application> (Michael Paquier) </para> <para> @@ -1488,24 +1488,24 @@ a uniqueness condition not satisfied by the table's data. Also, if the index creation is in fact still in progress, it seems reasonable to consider it to be an uncommitted DDL change, which - <application>pg_dump</> wouldn't be expected to dump anyway. + <application>pg_dump</application> wouldn't be expected to dump anyway. </para> </listitem> <listitem> <para> - Fix <filename>contrib/pg_trgm</>'s <function>similarity()</> function + Fix <filename>contrib/pg_trgm</filename>'s <function>similarity()</function> function to return zero for trigram-less strings (Tom Lane) </para> <para> - Previously it returned <literal>NaN</> due to internal division by zero. + Previously it returned <literal>NaN</literal> due to internal division by zero. </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2013b + Update time zone data files to <application>tzdata</application> release 2013b for DST law changes in Chile, Haiti, Morocco, Paraguay, and some Russian areas. Also, historical zone data corrections for numerous places. @@ -1513,12 +1513,12 @@ <para> Also, update the time zone abbreviation files for recent changes in - Russia and elsewhere: <literal>CHOT</>, <literal>GET</>, - <literal>IRKT</>, <literal>KGT</>, <literal>KRAT</>, <literal>MAGT</>, - <literal>MAWT</>, <literal>MSK</>, <literal>NOVT</>, <literal>OMST</>, - <literal>TKT</>, <literal>VLAT</>, <literal>WST</>, <literal>YAKT</>, - <literal>YEKT</> now follow their current meanings, and - <literal>VOLT</> (Europe/Volgograd) and <literal>MIST</> + Russia and elsewhere: <literal>CHOT</literal>, <literal>GET</literal>, + <literal>IRKT</literal>, <literal>KGT</literal>, <literal>KRAT</literal>, <literal>MAGT</literal>, + <literal>MAWT</literal>, <literal>MSK</literal>, <literal>NOVT</literal>, <literal>OMST</literal>, + <literal>TKT</literal>, <literal>VLAT</literal>, <literal>WST</literal>, <literal>YAKT</literal>, + <literal>YEKT</literal> now follow their current meanings, and + <literal>VOLT</literal> (Europe/Volgograd) and <literal>MIST</literal> (Antarctica/Macquarie) are added to the default abbreviations list. </para> </listitem> @@ -1563,7 +1563,7 @@ <listitem> <para> - Prevent execution of <function>enum_recv</> from SQL (Tom Lane) + Prevent execution of <function>enum_recv</function> from SQL (Tom Lane) </para> <para> @@ -1596,19 +1596,19 @@ <listitem> <para> Protect against race conditions when scanning - <structname>pg_tablespace</> (Stephen Frost, Tom Lane) + <structname>pg_tablespace</structname> (Stephen Frost, Tom Lane) </para> <para> - <command>CREATE DATABASE</> and <command>DROP DATABASE</> could + <command>CREATE DATABASE</command> and <command>DROP DATABASE</command> could misbehave if there were concurrent updates of - <structname>pg_tablespace</> entries. + <structname>pg_tablespace</structname> entries. </para> </listitem> <listitem> <para> - Prevent <command>DROP OWNED</> from trying to drop whole databases or + Prevent <command>DROP OWNED</command> from trying to drop whole databases or tablespaces (Álvaro Herrera) </para> @@ -1620,13 +1620,13 @@ <listitem> <para> Fix error in <link - linkend="guc-vacuum-freeze-table-age"><varname>vacuum_freeze_table_age</></link> + linkend="guc-vacuum-freeze-table-age"><varname>vacuum_freeze_table_age</varname></link> implementation (Andres Freund) </para> <para> In installations that have existed for more than <link - linkend="guc-vacuum-freeze-min-age"><varname>vacuum_freeze_min_age</></link> + linkend="guc-vacuum-freeze-min-age"><varname>vacuum_freeze_min_age</varname></link> transactions, this mistake prevented autovacuum from using partial-table scans, so that a full-table scan would always happen instead. </para> @@ -1634,13 +1634,13 @@ <listitem> <para> - Prevent misbehavior when a <symbol>RowExpr</> or <symbol>XmlExpr</> + Prevent misbehavior when a <symbol>RowExpr</symbol> or <symbol>XmlExpr</symbol> is parse-analyzed twice (Andres Freund, Tom Lane) </para> <para> This mistake could be user-visible in contexts such as - <literal>CREATE TABLE LIKE INCLUDING INDEXES</>. + <literal>CREATE TABLE LIKE INCLUDING INDEXES</literal>. </para> </listitem> @@ -1653,7 +1653,7 @@ <listitem> <para> - Reject out-of-range dates in <function>to_date()</> (Hitoshi Harada) + Reject out-of-range dates in <function>to_date()</function> (Hitoshi Harada) </para> </listitem> @@ -1664,41 +1664,41 @@ </para> <para> - This bug affected <application>psql</> and some other client programs. + This bug affected <application>psql</application> and some other client programs. </para> </listitem> <listitem> <para> - Fix possible crash in <application>psql</>'s <command>\?</> command + Fix possible crash in <application>psql</application>'s <command>\?</command> command when not connected to a database (Meng Qingzhong) </para> </listitem> <listitem> <para> - Fix one-byte buffer overrun in <application>libpq</>'s - <function>PQprintTuples</> (Xi Wang) + Fix one-byte buffer overrun in <application>libpq</application>'s + <function>PQprintTuples</function> (Xi Wang) </para> <para> This ancient function is not used anywhere by - <productname>PostgreSQL</> itself, but it might still be used by some + <productname>PostgreSQL</productname> itself, but it might still be used by some client code. </para> </listitem> <listitem> <para> - Make <application>ecpglib</> use translated messages properly + Make <application>ecpglib</application> use translated messages properly (Chen Huajun) </para> </listitem> <listitem> <para> - Properly install <application>ecpg_compat</> and - <application>pgtypes</> libraries on MSVC (Jiang Guiqing) + Properly install <application>ecpg_compat</application> and + <application>pgtypes</application> libraries on MSVC (Jiang Guiqing) </para> </listitem> @@ -1717,15 +1717,15 @@ <listitem> <para> - Make <application>pgxs</> build executables with the right - <literal>.exe</> suffix when cross-compiling for Windows + Make <application>pgxs</application> build executables with the right + <literal>.exe</literal> suffix when cross-compiling for Windows (Zoltan Boszormenyi) </para> </listitem> <listitem> <para> - Add new timezone abbreviation <literal>FET</> (Tom Lane) + Add new timezone abbreviation <literal>FET</literal> (Tom Lane) </para> <para> @@ -1774,13 +1774,13 @@ <listitem> <para> Fix multiple bugs associated with <command>CREATE INDEX - CONCURRENTLY</> (Andres Freund, Tom Lane) + CONCURRENTLY</command> (Andres Freund, Tom Lane) </para> <para> - Fix <command>CREATE INDEX CONCURRENTLY</> to use + Fix <command>CREATE INDEX CONCURRENTLY</command> to use in-place updates when changing the state of an index's - <structname>pg_index</> row. This prevents race conditions that could + <structname>pg_index</structname> row. This prevents race conditions that could cause concurrent sessions to miss updating the target index, thus resulting in corrupt concurrently-created indexes. </para> @@ -1788,8 +1788,8 @@ <para> Also, fix various other operations to ensure that they ignore invalid indexes resulting from a failed <command>CREATE INDEX - CONCURRENTLY</> command. The most important of these is - <command>VACUUM</>, because an auto-vacuum could easily be launched + CONCURRENTLY</command> command. The most important of these is + <command>VACUUM</command>, because an auto-vacuum could easily be launched on the table before corrective action can be taken to fix or remove the invalid index. </para> @@ -1811,8 +1811,8 @@ <para> The planner could derive incorrect constraints from a clause equating a non-strict construct to something else, for example - <literal>WHERE COALESCE(foo, 0) = 0</> - when <literal>foo</> is coming from the nullable side of an outer join. + <literal>WHERE COALESCE(foo, 0) = 0</literal> + when <literal>foo</literal> is coming from the nullable side of an outer join. </para> </listitem> @@ -1830,10 +1830,10 @@ </para> <para> - This affects multicolumn <literal>NOT IN</> subplans, such as - <literal>WHERE (a, b) NOT IN (SELECT x, y FROM ...)</> - when for instance <literal>b</> and <literal>y</> are <type>int4</> - and <type>int8</> respectively. This mistake led to wrong answers + This affects multicolumn <literal>NOT IN</literal> subplans, such as + <literal>WHERE (a, b) NOT IN (SELECT x, y FROM ...)</literal> + when for instance <literal>b</literal> and <literal>y</literal> are <type>int4</type> + and <type>int8</type> respectively. This mistake led to wrong answers or crashes depending on the specific datatypes involved. </para> </listitem> @@ -1841,7 +1841,7 @@ <listitem> <para> Acquire buffer lock when re-fetching the old tuple for an - <literal>AFTER ROW UPDATE/DELETE</> trigger (Andres Freund) + <literal>AFTER ROW UPDATE/DELETE</literal> trigger (Andres Freund) </para> <para> @@ -1854,7 +1854,7 @@ <listitem> <para> - Fix <command>ALTER COLUMN TYPE</> to handle inherited check + Fix <command>ALTER COLUMN TYPE</command> to handle inherited check constraints properly (Pavan Deolasee) </para> @@ -1866,14 +1866,14 @@ <listitem> <para> - Fix <command>REASSIGN OWNED</> to handle grants on tablespaces + Fix <command>REASSIGN OWNED</command> to handle grants on tablespaces (Álvaro Herrera) </para> </listitem> <listitem> <para> - Ignore incorrect <structname>pg_attribute</> entries for system + Ignore incorrect <structname>pg_attribute</structname> entries for system columns for views (Tom Lane) </para> @@ -1887,7 +1887,7 @@ <listitem> <para> - Fix rule printing to dump <literal>INSERT INTO <replaceable>table</> + Fix rule printing to dump <literal>INSERT INTO <replaceable>table</replaceable> DEFAULT VALUES</literal> correctly (Tom Lane) </para> </listitem> @@ -1895,7 +1895,7 @@ <listitem> <para> Guard against stack overflow when there are too many - <literal>UNION</>/<literal>INTERSECT</>/<literal>EXCEPT</> clauses + <literal>UNION</literal>/<literal>INTERSECT</literal>/<literal>EXCEPT</literal> clauses in a query (Tom Lane) </para> </listitem> @@ -1923,7 +1923,7 @@ <para> Formerly, this would result in something quite unhelpful, such as - <quote>Non-recoverable failure in name resolution</>. + <quote>Non-recoverable failure in name resolution</quote>. </para> </listitem> @@ -1936,8 +1936,8 @@ <listitem> <para> - Make <application>pg_ctl</> more robust about reading the - <filename>postmaster.pid</> file (Heikki Linnakangas) + Make <application>pg_ctl</application> more robust about reading the + <filename>postmaster.pid</filename> file (Heikki Linnakangas) </para> <para> @@ -1947,33 +1947,33 @@ <listitem> <para> - Fix possible crash in <application>psql</> if incorrectly-encoded data - is presented and the <varname>client_encoding</> setting is a + Fix possible crash in <application>psql</application> if incorrectly-encoded data + is presented and the <varname>client_encoding</varname> setting is a client-only encoding, such as SJIS (Jiang Guiqing) </para> </listitem> <listitem> <para> - Fix bugs in the <filename>restore.sql</> script emitted by - <application>pg_dump</> in <literal>tar</> output format (Tom Lane) + Fix bugs in the <filename>restore.sql</filename> script emitted by + <application>pg_dump</application> in <literal>tar</literal> output format (Tom Lane) </para> <para> The script would fail outright on tables whose names include upper-case characters. Also, make the script capable of restoring - data in <option>--inserts</> mode as well as the regular COPY mode. + data in <option>--inserts</option> mode as well as the regular COPY mode. </para> </listitem> <listitem> <para> - Fix <application>pg_restore</> to accept POSIX-conformant - <literal>tar</> files (Brian Weaver, Tom Lane) + Fix <application>pg_restore</application> to accept POSIX-conformant + <literal>tar</literal> files (Brian Weaver, Tom Lane) </para> <para> - The original coding of <application>pg_dump</>'s <literal>tar</> + The original coding of <application>pg_dump</application>'s <literal>tar</literal> output mode produced files that are not fully conformant with the POSIX standard. This has been corrected for version 9.3. This patch updates previous branches so that they will accept both the @@ -1984,41 +1984,41 @@ <listitem> <para> - Fix <application>pg_resetxlog</> to locate <filename>postmaster.pid</> + Fix <application>pg_resetxlog</application> to locate <filename>postmaster.pid</filename> correctly when given a relative path to the data directory (Tom Lane) </para> <para> - This mistake could lead to <application>pg_resetxlog</> not noticing + This mistake could lead to <application>pg_resetxlog</application> not noticing that there is an active postmaster using the data directory. </para> </listitem> <listitem> <para> - Fix <application>libpq</>'s <function>lo_import()</> and - <function>lo_export()</> functions to report file I/O errors properly + Fix <application>libpq</application>'s <function>lo_import()</function> and + <function>lo_export()</function> functions to report file I/O errors properly (Tom Lane) </para> </listitem> <listitem> <para> - Fix <application>ecpg</>'s processing of nested structure pointer + Fix <application>ecpg</application>'s processing of nested structure pointer variables (Muhammad Usama) </para> </listitem> <listitem> <para> - Make <filename>contrib/pageinspect</>'s btree page inspection + Make <filename>contrib/pageinspect</filename>'s btree page inspection functions take buffer locks while examining pages (Tom Lane) </para> </listitem> <listitem> <para> - Fix <application>pgxs</> support for building loadable modules on AIX + Fix <application>pgxs</application> support for building loadable modules on AIX (Tom Lane) </para> @@ -2029,7 +2029,7 @@ <listitem> <para> - Update time zone data files to <application>tzdata</> release 2012j + Update time zone data files to <application>tzdata</application> release 2012j for DST law changes in Cuba, Israel, Jordan, Libya, Palestine, Western Samoa, and portions of Brazil. </para> @@ -2081,7 +2081,7 @@ <para> These errors could result in wrong answers from queries that scan the - same <literal>WITH</> subquery multiple times. + same <literal>WITH</literal> subquery multiple times. </para> </listitem> @@ -2104,22 +2104,22 @@ </para> <para> - If we revoke a grant option from some role <replaceable>X</>, but - <replaceable>X</> still holds that option via a grant from someone + If we revoke a grant option from some role <replaceable>X</replaceable>, but + <replaceable>X</replaceable> still holds that option via a grant from someone else, we should not recursively revoke the corresponding privilege - from role(s) <replaceable>Y</> that <replaceable>X</> had granted it + from role(s) <replaceable>Y</replaceable> that <replaceable>X</replaceable> had granted it to. </para> </listitem> <listitem> <para> - Fix handling of <literal>SIGFPE</> when PL/Perl is in use (Andres Freund) + Fix handling of <literal>SIGFPE</literal> when PL/Perl is in use (Andres Freund) </para> <para> - Perl resets the process's <literal>SIGFPE</> handler to - <literal>SIG_IGN</>, which could result in crashes later on. Restore + Perl resets the process's <literal>SIGFPE</literal> handler to + <literal>SIG_IGN</literal>, which could result in crashes later on. Restore the normal Postgres signal handler after initializing PL/Perl. </para> </listitem> @@ -2138,7 +2138,7 @@ <para> Some Linux distributions contain an incorrect version of - <filename>pthread.h</> that results in incorrect compiled code in + <filename>pthread.h</filename> that results in incorrect compiled code in PL/Perl, leading to crashes if a PL/Perl function calls another one that throws an error. </para> @@ -2146,7 +2146,7 @@ <listitem> <para> - Update time zone data files to <application>tzdata</> release 2012f + Update time zone data files to <application>tzdata</application> release 2012f for DST law changes in Fiji </para> </listitem> @@ -2196,7 +2196,7 @@ </para> <para> - <function>xml_parse()</> would attempt to fetch external files or + <function>xml_parse()</function> would attempt to fetch external files or URLs as needed to resolve DTD and entity references in an XML value, thus allowing unprivileged database users to attempt to fetch data with the privileges of the database server. While the external data @@ -2209,22 +2209,22 @@ <listitem> <para> - Prevent access to external files/URLs via <filename>contrib/xml2</>'s - <function>xslt_process()</> (Peter Eisentraut) + Prevent access to external files/URLs via <filename>contrib/xml2</filename>'s + <function>xslt_process()</function> (Peter Eisentraut) </para> <para> - <application>libxslt</> offers the ability to read and write both + <application>libxslt</application> offers the ability to read and write both files and URLs through stylesheet commands, thus allowing unprivileged database users to both read and write data with the privileges of the database server. Disable that through proper use - of <application>libxslt</>'s security options. (CVE-2012-3488) + of <application>libxslt</application>'s security options. (CVE-2012-3488) </para> <para> - Also, remove <function>xslt_process()</>'s ability to fetch documents + Also, remove <function>xslt_process()</function>'s ability to fetch documents and stylesheets from external files/URLs. While this was a - documented <quote>feature</>, it was long regarded as a bad idea. + documented <quote>feature</quote>, it was long regarded as a bad idea. The fix for CVE-2012-3489 broke that capability, and rather than expend effort on trying to fix it, we're just going to summarily remove it. @@ -2252,22 +2252,22 @@ </para> <para> - If <command>ALTER SEQUENCE</> was executed on a freshly created or - reset sequence, and then precisely one <function>nextval()</> call + If <command>ALTER SEQUENCE</command> was executed on a freshly created or + reset sequence, and then precisely one <function>nextval()</function> call was made on it, and then the server crashed, WAL replay would restore the sequence to a state in which it appeared that no - <function>nextval()</> had been done, thus allowing the first + <function>nextval()</function> had been done, thus allowing the first sequence value to be returned again by the next - <function>nextval()</> call. In particular this could manifest for - <type>serial</> columns, since creation of a serial column's sequence - includes an <command>ALTER SEQUENCE OWNED BY</> step. + <function>nextval()</function> call. In particular this could manifest for + <type>serial</type> columns, since creation of a serial column's sequence + includes an <command>ALTER SEQUENCE OWNED BY</command> step. </para> </listitem> <listitem> <para> - Ensure the <filename>backup_label</> file is fsync'd after - <function>pg_start_backup()</> (Dave Kerr) + Ensure the <filename>backup_label</filename> file is fsync'd after + <function>pg_start_backup()</function> (Dave Kerr) </para> </listitem> @@ -2292,7 +2292,7 @@ <para> The original coding could allow inconsistent behavior in some cases; in particular, an autovacuum could get canceled after less than - <literal>deadlock_timeout</> grace period. + <literal>deadlock_timeout</literal> grace period. </para> </listitem> @@ -2304,15 +2304,15 @@ <listitem> <para> - Fix log collector so that <literal>log_truncate_on_rotation</> works + Fix log collector so that <literal>log_truncate_on_rotation</literal> works during the very first log rotation after server start (Tom Lane) </para> </listitem> <listitem> <para> - Fix <literal>WITH</> attached to a nested set operation - (<literal>UNION</>/<literal>INTERSECT</>/<literal>EXCEPT</>) + Fix <literal>WITH</literal> attached to a nested set operation + (<literal>UNION</literal>/<literal>INTERSECT</literal>/<literal>EXCEPT</literal>) (Tom Lane) </para> </listitem> @@ -2320,24 +2320,24 @@ <listitem> <para> Ensure that a whole-row reference to a subquery doesn't include any - extra <literal>GROUP BY</> or <literal>ORDER BY</> columns (Tom Lane) + extra <literal>GROUP BY</literal> or <literal>ORDER BY</literal> columns (Tom Lane) </para> </listitem> <listitem> <para> - Disallow copying whole-row references in <literal>CHECK</> - constraints and index definitions during <command>CREATE TABLE</> + Disallow copying whole-row references in <literal>CHECK</literal> + constraints and index definitions during <command>CREATE TABLE</command> (Tom Lane) </para> <para> - This situation can arise in <command>CREATE TABLE</> with - <literal>LIKE</> or <literal>INHERITS</>. The copied whole-row + This situation can arise in <command>CREATE TABLE</command> with + <literal>LIKE</literal> or <literal>INHERITS</literal>. The copied whole-row variable was incorrectly labeled with the row type of the original table not the new one. Rejecting the case seems reasonable for - <literal>LIKE</>, since the row types might well diverge later. For - <literal>INHERITS</> we should ideally allow it, with an implicit + <literal>LIKE</literal>, since the row types might well diverge later. For + <literal>INHERITS</literal> we should ideally allow it, with an implicit coercion to the parent table's row type; but that will require more work than seems safe to back-patch. </para> @@ -2345,7 +2345,7 @@ <listitem> <para> - Fix memory leak in <literal>ARRAY(SELECT ...)</> subqueries (Heikki + Fix memory leak in <literal>ARRAY(SELECT ...)</literal> subqueries (Heikki Linnakangas, Tom Lane) </para> </listitem> @@ -2357,7 +2357,7 @@ <para> The code could get confused by quantified parenthesized - subexpressions, such as <literal>^(foo)?bar</>. This would lead to + subexpressions, such as <literal>^(foo)?bar</literal>. This would lead to incorrect index optimization of searches for such patterns. </para> </listitem> @@ -2365,22 +2365,22 @@ <listitem> <para> Fix bugs with parsing signed - <replaceable>hh</><literal>:</><replaceable>mm</> and - <replaceable>hh</><literal>:</><replaceable>mm</><literal>:</><replaceable>ss</> - fields in <type>interval</> constants (Amit Kapila, Tom Lane) + <replaceable>hh</replaceable><literal>:</literal><replaceable>mm</replaceable> and + <replaceable>hh</replaceable><literal>:</literal><replaceable>mm</replaceable><literal>:</literal><replaceable>ss</replaceable> + fields in <type>interval</type> constants (Amit Kapila, Tom Lane) </para> </listitem> <listitem> <para> - Report errors properly in <filename>contrib/xml2</>'s - <function>xslt_process()</> (Tom Lane) + Report errors properly in <filename>contrib/xml2</filename>'s + <function>xslt_process()</function> (Tom Lane) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2012e + Update time zone data files to <application>tzdata</application> release 2012e for DST law changes in Morocco and Tokelau </para> </listitem> @@ -2426,12 +2426,12 @@ <listitem> <para> Fix incorrect password transformation in - <filename>contrib/pgcrypto</>'s DES <function>crypt()</> function + <filename>contrib/pgcrypto</filename>'s DES <function>crypt()</function> function (Solar Designer) </para> <para> - If a password string contained the byte value <literal>0x80</>, the + If a password string contained the byte value <literal>0x80</literal>, the remainder of the password was ignored, causing the password to be much weaker than it appeared. With this fix, the rest of the string is properly included in the DES hash. Any stored password values that are @@ -2442,7 +2442,7 @@ <listitem> <para> - Ignore <literal>SECURITY DEFINER</> and <literal>SET</> attributes for + Ignore <literal>SECURITY DEFINER</literal> and <literal>SET</literal> attributes for a procedural language's call handler (Tom Lane) </para> @@ -2454,7 +2454,7 @@ <listitem> <para> - Allow numeric timezone offsets in <type>timestamp</> input to be up to + Allow numeric timezone offsets in <type>timestamp</type> input to be up to 16 hours away from UTC (Tom Lane) </para> @@ -2480,7 +2480,7 @@ <listitem> <para> - Fix <type>text</> to <type>name</> and <type>char</> to <type>name</> + Fix <type>text</type> to <type>name</type> and <type>char</type> to <type>name</type> casts to perform string truncation correctly in multibyte encodings (Karl Schnaitter) </para> @@ -2488,7 +2488,7 @@ <listitem> <para> - Fix memory copying bug in <function>to_tsquery()</> (Heikki Linnakangas) + Fix memory copying bug in <function>to_tsquery()</function> (Heikki Linnakangas) </para> </listitem> @@ -2502,7 +2502,7 @@ This bug concerns sub-SELECTs that reference variables coming from the nullable side of an outer join of the surrounding query. In 9.1, queries affected by this bug would fail with <quote>ERROR: - Upper-level PlaceHolderVar found where not expected</>. But in 9.0 and + Upper-level PlaceHolderVar found where not expected</quote>. But in 9.0 and 8.4, you'd silently get possibly-wrong answers, since the value transmitted into the subquery wouldn't go to null when it should. </para> @@ -2510,13 +2510,13 @@ <listitem> <para> - Fix slow session startup when <structname>pg_attribute</> is very large + Fix slow session startup when <structname>pg_attribute</structname> is very large (Tom Lane) </para> <para> - If <structname>pg_attribute</> exceeds one-fourth of - <varname>shared_buffers</>, cache rebuilding code that is sometimes + If <structname>pg_attribute</structname> exceeds one-fourth of + <varname>shared_buffers</varname>, cache rebuilding code that is sometimes needed during session start would trigger the synchronized-scan logic, causing it to take many times longer than normal. The problem was particularly acute if many new sessions were starting at once. @@ -2537,8 +2537,8 @@ <listitem> <para> - Ensure the Windows implementation of <function>PGSemaphoreLock()</> - clears <varname>ImmediateInterruptOK</> before returning (Tom Lane) + Ensure the Windows implementation of <function>PGSemaphoreLock()</function> + clears <varname>ImmediateInterruptOK</varname> before returning (Tom Lane) </para> <para> @@ -2565,12 +2565,12 @@ <listitem> <para> - Fix <command>COPY FROM</> to properly handle null marker strings that + Fix <command>COPY FROM</command> to properly handle null marker strings that correspond to invalid encoding (Tom Lane) </para> <para> - A null marker string such as <literal>E'\\0'</> should work, and did + A null marker string such as <literal>E'\\0'</literal> should work, and did work in the past, but the case got broken in 8.4. </para> </listitem> @@ -2583,7 +2583,7 @@ <para> Previously, infinite recursion in a function invoked by - auto-<command>ANALYZE</> could crash worker processes. + auto-<command>ANALYZE</command> could crash worker processes. </para> </listitem> @@ -2602,7 +2602,7 @@ <listitem> <para> Fix logging collector to ensure it will restart file rotation - after receiving <systemitem>SIGHUP</> (Tom Lane) + after receiving <systemitem>SIGHUP</systemitem> (Tom Lane) </para> </listitem> @@ -2615,33 +2615,33 @@ <listitem> <para> - Fix memory leak in PL/pgSQL's <command>RETURN NEXT</> command (Joe + Fix memory leak in PL/pgSQL's <command>RETURN NEXT</command> command (Joe Conway) </para> </listitem> <listitem> <para> - Fix PL/pgSQL's <command>GET DIAGNOSTICS</> command when the target + Fix PL/pgSQL's <command>GET DIAGNOSTICS</command> command when the target is the function's first variable (Tom Lane) </para> </listitem> <listitem> <para> - Fix potential access off the end of memory in <application>psql</>'s - expanded display (<command>\x</>) mode (Peter Eisentraut) + Fix potential access off the end of memory in <application>psql</application>'s + expanded display (<command>\x</command>) mode (Peter Eisentraut) </para> </listitem> <listitem> <para> - Fix several performance problems in <application>pg_dump</> when + Fix several performance problems in <application>pg_dump</application> when the database contains many objects (Jeff Janes, Tom Lane) </para> <para> - <application>pg_dump</> could get very slow if the database contained + <application>pg_dump</application> could get very slow if the database contained many schemas, or if many objects are in dependency loops, or if there are many owned sequences. </para> @@ -2649,21 +2649,21 @@ <listitem> <para> - Fix <filename>contrib/dblink</>'s <function>dblink_exec()</> to not leak + Fix <filename>contrib/dblink</filename>'s <function>dblink_exec()</function> to not leak temporary database connections upon error (Tom Lane) </para> </listitem> <listitem> <para> - Fix <filename>contrib/dblink</> to report the correct connection name in + Fix <filename>contrib/dblink</filename> to report the correct connection name in error messages (Kyotaro Horiguchi) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2012c + Update time zone data files to <application>tzdata</application> release 2012c for DST law changes in Antarctica, Armenia, Chile, Cuba, Falkland Islands, Gaza, Haiti, Hebron, Morocco, Syria, and Tokelau Islands; also historical corrections for Canada. @@ -2711,14 +2711,14 @@ <listitem> <para> Require execute permission on the trigger function for - <command>CREATE TRIGGER</> (Robert Haas) + <command>CREATE TRIGGER</command> (Robert Haas) </para> <para> This missing check could allow another user to execute a trigger function with forged input data, by installing it on a table he owns. This is only of significance for trigger functions marked - <literal>SECURITY DEFINER</>, since otherwise trigger functions run + <literal>SECURITY DEFINER</literal>, since otherwise trigger functions run as the table owner anyway. (CVE-2012-0866) </para> </listitem> @@ -2730,7 +2730,7 @@ </para> <para> - Both <application>libpq</> and the server truncated the common name + Both <application>libpq</application> and the server truncated the common name extracted from an SSL certificate at 32 bytes. Normally this would cause nothing worse than an unexpected verification failure, but there are some rather-implausible scenarios in which it might allow one @@ -2745,12 +2745,12 @@ <listitem> <para> - Convert newlines to spaces in names written in <application>pg_dump</> + Convert newlines to spaces in names written in <application>pg_dump</application> comments (Robert Haas) </para> <para> - <application>pg_dump</> was incautious about sanitizing object names + <application>pg_dump</application> was incautious about sanitizing object names that are emitted within SQL comments in its output script. A name containing a newline would at least render the script syntactically incorrect. Maliciously crafted object names could present a SQL @@ -2766,10 +2766,10 @@ <para> An index page split caused by an insertion could sometimes cause a - concurrently-running <command>VACUUM</> to miss removing index entries + concurrently-running <command>VACUUM</command> to miss removing index entries that it should remove. After the corresponding table rows are removed, the dangling index entries would cause errors (such as <quote>could not - read block N in file ...</>) or worse, silently wrong query results + read block N in file ...</quote>) or worse, silently wrong query results after unrelated rows are re-inserted at the now-free table locations. This bug has been present since release 8.2, but occurs so infrequently that it was not diagnosed until now. If you have reason to suspect @@ -2795,16 +2795,16 @@ <listitem> <para> Allow non-existent values for some settings in <command>ALTER - USER/DATABASE SET</> (Heikki Linnakangas) + USER/DATABASE SET</command> (Heikki Linnakangas) </para> <para> - Allow <varname>default_text_search_config</>, - <varname>default_tablespace</>, and <varname>temp_tablespaces</> to be + Allow <varname>default_text_search_config</varname>, + <varname>default_tablespace</varname>, and <varname>temp_tablespaces</varname> to be set to names that are not known. This is because they might be known in another database where the setting is intended to be used, or for the tablespace cases because the tablespace might not be created yet. The - same issue was previously recognized for <varname>search_path</>, and + same issue was previously recognized for <varname>search_path</varname>, and these settings now act like that one. </para> </listitem> @@ -2842,7 +2842,7 @@ <listitem> <para> - Fix regular expression back-references with <literal>*</> attached + Fix regular expression back-references with <literal>*</literal> attached (Tom Lane) </para> @@ -2856,18 +2856,18 @@ A similar problem still afflicts back-references that are embedded in a larger quantified expression, rather than being the immediate subject of the quantifier. This will be addressed in a future - <productname>PostgreSQL</> release. + <productname>PostgreSQL</productname> release. </para> </listitem> <listitem> <para> Fix recently-introduced memory leak in processing of - <type>inet</>/<type>cidr</> values (Heikki Linnakangas) + <type>inet</type>/<type>cidr</type> values (Heikki Linnakangas) </para> <para> - A patch in the December 2011 releases of <productname>PostgreSQL</> + A patch in the December 2011 releases of <productname>PostgreSQL</productname> caused memory leakage in these operations, which could be significant in scenarios such as building a btree index on such a column. </para> @@ -2875,8 +2875,8 @@ <listitem> <para> - Fix dangling pointer after <command>CREATE TABLE AS</>/<command>SELECT - INTO</> in a SQL-language function (Tom Lane) + Fix dangling pointer after <command>CREATE TABLE AS</command>/<command>SELECT + INTO</command> in a SQL-language function (Tom Lane) </para> <para> @@ -2910,32 +2910,32 @@ <listitem> <para> - Improve <application>pg_dump</>'s handling of inherited table columns + Improve <application>pg_dump</application>'s handling of inherited table columns (Tom Lane) </para> <para> - <application>pg_dump</> mishandled situations where a child column has + <application>pg_dump</application> mishandled situations where a child column has a different default expression than its parent column. If the default is textually identical to the parent's default, but not actually the same (for instance, because of schema search path differences) it would not be recognized as different, so that after dump and restore the child would be allowed to inherit the parent's default. Child columns - that are <literal>NOT NULL</> where their parent is not could also be + that are <literal>NOT NULL</literal> where their parent is not could also be restored subtly incorrectly. </para> </listitem> <listitem> <para> - Fix <application>pg_restore</>'s direct-to-database mode for + Fix <application>pg_restore</application>'s direct-to-database mode for INSERT-style table data (Tom Lane) </para> <para> Direct-to-database restores from archive files made with - <option>--inserts</> or <option>--column-inserts</> options fail when - using <application>pg_restore</> from a release dated September or + <option>--inserts</option> or <option>--column-inserts</option> options fail when + using <application>pg_restore</application> from a release dated September or December 2011, as a result of an oversight in a fix for another problem. The archive file itself is not at fault, and text-mode output is okay. @@ -2944,8 +2944,8 @@ <listitem> <para> - Allow <literal>AT</> option in <application>ecpg</> - <literal>DEALLOCATE</> statements (Michael Meskes) + Allow <literal>AT</literal> option in <application>ecpg</application> + <literal>DEALLOCATE</literal> statements (Michael Meskes) </para> <para> @@ -2956,8 +2956,8 @@ <listitem> <para> - Fix error in <filename>contrib/intarray</>'s <literal>int[] & - int[]</> operator (Guillaume Lelarge) + Fix error in <filename>contrib/intarray</filename>'s <literal>int[] & + int[]</literal> operator (Guillaume Lelarge) </para> <para> @@ -2969,8 +2969,8 @@ <listitem> <para> - Fix error detection in <filename>contrib/pgcrypto</>'s - <function>encrypt_iv()</> and <function>decrypt_iv()</> + Fix error detection in <filename>contrib/pgcrypto</filename>'s + <function>encrypt_iv()</function> and <function>decrypt_iv()</function> (Marko Kreen) </para> @@ -2982,26 +2982,26 @@ <listitem> <para> - Fix one-byte buffer overrun in <filename>contrib/test_parser</> + Fix one-byte buffer overrun in <filename>contrib/test_parser</filename> (Paul Guyot) </para> <para> The code would try to read one more byte than it should, which would crash in corner cases. - Since <filename>contrib/test_parser</> is only example code, this is + Since <filename>contrib/test_parser</filename> is only example code, this is not a security issue in itself, but bad example code is still bad. </para> </listitem> <listitem> <para> - Use <function>__sync_lock_test_and_set()</> for spinlocks on ARM, if + Use <function>__sync_lock_test_and_set()</function> for spinlocks on ARM, if available (Martin Pitt) </para> <para> - This function replaces our previous use of the <literal>SWPB</> + This function replaces our previous use of the <literal>SWPB</literal> instruction, which is deprecated and not available on ARMv6 and later. Reports suggest that the old code doesn't fail in an obvious way on recent ARM boards, but simply doesn't interlock concurrent accesses, @@ -3011,7 +3011,7 @@ <listitem> <para> - Use <option>-fexcess-precision=standard</> option when building with + Use <option>-fexcess-precision=standard</option> option when building with gcc versions that accept it (Andrew Dunstan) </para> @@ -3060,7 +3060,7 @@ <para> However, a longstanding error was discovered in the definition of the - <literal>information_schema.referential_constraints</> view. If you + <literal>information_schema.referential_constraints</literal> view. If you rely on correct results from that view, you should replace its definition as explained in the first changelog item below. </para> @@ -3079,7 +3079,7 @@ <listitem> <para> - Fix bugs in <literal>information_schema.referential_constraints</> view + Fix bugs in <literal>information_schema.referential_constraints</literal> view (Tom Lane) </para> @@ -3092,13 +3092,13 @@ </para> <para> - Since the view definition is installed by <application>initdb</>, + Since the view definition is installed by <application>initdb</application>, merely upgrading will not fix the problem. If you need to fix this in an existing installation, you can (as a superuser) drop the - <literal>information_schema</> schema then re-create it by sourcing - <filename><replaceable>SHAREDIR</>/information_schema.sql</filename>. - (Run <literal>pg_config --sharedir</> if you're uncertain where - <replaceable>SHAREDIR</> is.) This must be repeated in each database + <literal>information_schema</literal> schema then re-create it by sourcing + <filename><replaceable>SHAREDIR</replaceable>/information_schema.sql</filename>. + (Run <literal>pg_config --sharedir</literal> if you're uncertain where + <replaceable>SHAREDIR</replaceable> is.) This must be repeated in each database to be fixed. </para> </listitem> @@ -3112,19 +3112,19 @@ <para> This could result in transiently failing to find index entries after a crash, or on a hot-standby server. The problem would be repaired - by the next <command>VACUUM</> of the index, however. + by the next <command>VACUUM</command> of the index, however. </para> </listitem> <listitem> <para> Fix TOAST-related data corruption during <literal>CREATE TABLE dest AS - SELECT * FROM src</> or <literal>INSERT INTO dest SELECT * FROM src</> + SELECT * FROM src</literal> or <literal>INSERT INTO dest SELECT * FROM src</literal> (Tom Lane) </para> <para> - If a table has been modified by <command>ALTER TABLE ADD COLUMN</>, + If a table has been modified by <command>ALTER TABLE ADD COLUMN</command>, attempts to copy its data verbatim to another table could produce corrupt results in certain corner cases. The problem can only manifest in this precise form in 8.4 and later, @@ -3141,7 +3141,7 @@ <para> The typical symptom was transient errors like <quote>missing chunk - number 0 for toast value NNNNN in pg_toast_2619</>, where the cited + number 0 for toast value NNNNN in pg_toast_2619</quote>, where the cited toast table would always belong to a system catalog. </para> </listitem> @@ -3157,7 +3157,7 @@ or modified the function, leading to misbehavior when the function was used. Note that merely installing this update will not fix the missing dependency entries; to do that, you'd need to <command>CREATE OR - REPLACE</> each such function afterwards. If you have functions whose + REPLACE</command> each such function afterwards. If you have functions whose defaults depend on non-built-in objects, doing so is recommended. </para> </listitem> @@ -3171,29 +3171,29 @@ <listitem> <para> - Make <function>DatumGetInetP()</> unpack inet datums that have a 1-byte - header, and add a new macro, <function>DatumGetInetPP()</>, that does + Make <function>DatumGetInetP()</function> unpack inet datums that have a 1-byte + header, and add a new macro, <function>DatumGetInetPP()</function>, that does not (Heikki Linnakangas) </para> <para> This change affects no core code, but might prevent crashes in add-on - code that expects <function>DatumGetInetP()</> to produce an unpacked + code that expects <function>DatumGetInetP()</function> to produce an unpacked datum as per usual convention. </para> </listitem> <listitem> <para> - Improve locale support in <type>money</> type's input and output + Improve locale support in <type>money</type> type's input and output (Tom Lane) </para> <para> Aside from not supporting all standard - <link linkend="guc-lc-monetary"><varname>lc_monetary</></link> + <link linkend="guc-lc-monetary"><varname>lc_monetary</varname></link> formatting options, the input and output functions were inconsistent, - meaning there were locales in which dumped <type>money</> values could + meaning there were locales in which dumped <type>money</type> values could not be re-read. </para> </listitem> @@ -3201,15 +3201,15 @@ <listitem> <para> Don't let <link - linkend="guc-transform-null-equals"><varname>transform_null_equals</></link> - affect <literal>CASE foo WHEN NULL ...</> constructs + linkend="guc-transform-null-equals"><varname>transform_null_equals</varname></link> + affect <literal>CASE foo WHEN NULL ...</literal> constructs (Heikki Linnakangas) </para> <para> - <varname>transform_null_equals</> is only supposed to affect - <literal>foo = NULL</> expressions written directly by the user, not - equality checks generated internally by this form of <literal>CASE</>. + <varname>transform_null_equals</varname> is only supposed to affect + <literal>foo = NULL</literal> expressions written directly by the user, not + equality checks generated internally by this form of <literal>CASE</literal>. </para> </listitem> @@ -3221,14 +3221,14 @@ <para> For a cascading foreign key that references its own table, a row update - will fire both the <literal>ON UPDATE</> trigger and the - <literal>CHECK</> trigger as one event. The <literal>ON UPDATE</> - trigger must execute first, else the <literal>CHECK</> will check a + will fire both the <literal>ON UPDATE</literal> trigger and the + <literal>CHECK</literal> trigger as one event. The <literal>ON UPDATE</literal> + trigger must execute first, else the <literal>CHECK</literal> will check a non-final state of the row and possibly throw an inappropriate error. However, the firing order of these triggers is determined by their names, which generally sort in creation order since the triggers have auto-generated names following the convention - <quote>RI_ConstraintTrigger_NNNN</>. A proper fix would require + <quote>RI_ConstraintTrigger_NNNN</quote>. A proper fix would require modifying that convention, which we will do in 9.2, but it seems risky to change it in existing releases. So this patch just changes the creation order of the triggers. Users encountering this type of error @@ -3257,13 +3257,13 @@ <para> Formerly, these would not be displayed correctly in the - <structname>pg_settings</> view. + <structname>pg_settings</structname> view. </para> </listitem> <listitem> <para> - Preserve blank lines within commands in <application>psql</>'s command + Preserve blank lines within commands in <application>psql</application>'s command history (Robert Haas) </para> @@ -3275,14 +3275,14 @@ <listitem> <para> - Fix <application>pg_dump</> to dump user-defined casts between + Fix <application>pg_dump</application> to dump user-defined casts between auto-generated types, such as table rowtypes (Tom Lane) </para> </listitem> <listitem> <para> - Use the preferred version of <application>xsubpp</> to build PL/Perl, + Use the preferred version of <application>xsubpp</application> to build PL/Perl, not necessarily the operating system's main copy (David Wheeler and Alex Hunsaker) </para> @@ -3290,19 +3290,19 @@ <listitem> <para> - Fix incorrect coding in <filename>contrib/dict_int</> and - <filename>contrib/dict_xsyn</> (Tom Lane) + Fix incorrect coding in <filename>contrib/dict_int</filename> and + <filename>contrib/dict_xsyn</filename> (Tom Lane) </para> <para> Some functions incorrectly assumed that memory returned by - <function>palloc()</> is guaranteed zeroed. + <function>palloc()</function> is guaranteed zeroed. </para> </listitem> <listitem> <para> - Honor query cancel interrupts promptly in <function>pgstatindex()</> + Honor query cancel interrupts promptly in <function>pgstatindex()</function> (Robert Haas) </para> </listitem> @@ -3333,15 +3333,15 @@ </para> <para> - Map <quote>Central America Standard Time</> to <literal>CST6</>, not - <literal>CST6CDT</>, because DST is generally not observed anywhere in + Map <quote>Central America Standard Time</quote> to <literal>CST6</literal>, not + <literal>CST6CDT</literal>, because DST is generally not observed anywhere in Central America. </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2011n + Update time zone data files to <application>tzdata</application> release 2011n for DST law changes in Brazil, Cuba, Fiji, Palestine, Russia, and Samoa; also historical corrections for Alaska and British East Africa. </para> @@ -3410,7 +3410,7 @@ <listitem> <para> - Fix possible buffer overrun in <function>tsvector_concat()</> + Fix possible buffer overrun in <function>tsvector_concat()</function> (Tom Lane) </para> @@ -3422,14 +3422,14 @@ <listitem> <para> - Fix crash in <function>xml_recv</> when processing a - <quote>standalone</> parameter (Tom Lane) + Fix crash in <function>xml_recv</function> when processing a + <quote>standalone</quote> parameter (Tom Lane) </para> </listitem> <listitem> <para> - Make <function>pg_options_to_table</> return NULL for an option with no + Make <function>pg_options_to_table</function> return NULL for an option with no value (Tom Lane) </para> @@ -3440,7 +3440,7 @@ <listitem> <para> - Avoid possibly accessing off the end of memory in <command>ANALYZE</> + Avoid possibly accessing off the end of memory in <command>ANALYZE</command> and in SJIS-2004 encoding conversion (Noah Misch) </para> @@ -3469,7 +3469,7 @@ There was a window wherein a new backend process could read a stale init file but miss the inval messages that would tell it the data is stale. The result would be bizarre failures in catalog accesses, typically - <quote>could not read block 0 in file ...</> later during startup. + <quote>could not read block 0 in file ...</quote> later during startup. </para> </listitem> @@ -3490,7 +3490,7 @@ <para> Fix incorrect memory accounting (leading to possible memory bloat) in tuplestores supporting holdable cursors and plpgsql's <literal>RETURN - NEXT</> command (Tom Lane) + NEXT</literal> command (Tom Lane) </para> </listitem> @@ -3526,7 +3526,7 @@ <listitem> <para> - Allow nested <literal>EXISTS</> queries to be optimized properly (Tom + Allow nested <literal>EXISTS</literal> queries to be optimized properly (Tom Lane) </para> </listitem> @@ -3546,12 +3546,12 @@ <listitem> <para> - Fix <command>EXPLAIN</> to handle gating Result nodes within + Fix <command>EXPLAIN</command> to handle gating Result nodes within inner-indexscan subplans (Tom Lane) </para> <para> - The usual symptom of this oversight was <quote>bogus varno</> errors. + The usual symptom of this oversight was <quote>bogus varno</quote> errors. </para> </listitem> @@ -3567,13 +3567,13 @@ <listitem> <para> - Fix dump bug for <literal>VALUES</> in a view (Tom Lane) + Fix dump bug for <literal>VALUES</literal> in a view (Tom Lane) </para> </listitem> <listitem> <para> - Disallow <literal>SELECT FOR UPDATE/SHARE</> on sequences (Tom Lane) + Disallow <literal>SELECT FOR UPDATE/SHARE</literal> on sequences (Tom Lane) </para> <para> @@ -3583,8 +3583,8 @@ <listitem> <para> - Fix <command>VACUUM</> so that it always updates - <literal>pg_class</>.<literal>reltuples</>/<literal>relpages</> (Tom + Fix <command>VACUUM</command> so that it always updates + <literal>pg_class</literal>.<literal>reltuples</literal>/<literal>relpages</literal> (Tom Lane) </para> @@ -3603,7 +3603,7 @@ <listitem> <para> - Fix cases where <command>CLUSTER</> might attempt to access + Fix cases where <command>CLUSTER</command> might attempt to access already-removed TOAST data (Tom Lane) </para> </listitem> @@ -3611,7 +3611,7 @@ <listitem> <para> Fix portability bugs in use of credentials control messages for - <quote>peer</> authentication (Tom Lane) + <quote>peer</quote> authentication (Tom Lane) </para> </listitem> @@ -3623,13 +3623,13 @@ <para> The typical symptom of this problem was <quote>The function requested is - not supported</> errors during SSPI login. + not supported</quote> errors during SSPI login. </para> </listitem> <listitem> <para> - Throw an error if <filename>pg_hba.conf</> contains <literal>hostssl</> + Throw an error if <filename>pg_hba.conf</filename> contains <literal>hostssl</literal> but SSL is disabled (Tom Lane) </para> @@ -3641,12 +3641,12 @@ <listitem> <para> - Fix typo in <function>pg_srand48</> seed initialization (Andres Freund) + Fix typo in <function>pg_srand48</function> seed initialization (Andres Freund) </para> <para> This led to failure to use all bits of the provided seed. This function - is not used on most platforms (only those without <function>srandom</>), + is not used on most platforms (only those without <function>srandom</function>), and the potential security exposure from a less-random-than-expected seed seems minimal in any case. </para> @@ -3654,25 +3654,25 @@ <listitem> <para> - Avoid integer overflow when the sum of <literal>LIMIT</> and - <literal>OFFSET</> values exceeds 2^63 (Heikki Linnakangas) + Avoid integer overflow when the sum of <literal>LIMIT</literal> and + <literal>OFFSET</literal> values exceeds 2^63 (Heikki Linnakangas) </para> </listitem> <listitem> <para> - Add overflow checks to <type>int4</> and <type>int8</> versions of - <function>generate_series()</> (Robert Haas) + Add overflow checks to <type>int4</type> and <type>int8</type> versions of + <function>generate_series()</function> (Robert Haas) </para> </listitem> <listitem> <para> - Fix trailing-zero removal in <function>to_char()</> (Marti Raudsepp) + Fix trailing-zero removal in <function>to_char()</function> (Marti Raudsepp) </para> <para> - In a format with <literal>FM</> and no digit positions + In a format with <literal>FM</literal> and no digit positions after the decimal point, zeroes to the left of the decimal point could be removed incorrectly. </para> @@ -3680,7 +3680,7 @@ <listitem> <para> - Fix <function>pg_size_pretty()</> to avoid overflow for inputs close to + Fix <function>pg_size_pretty()</function> to avoid overflow for inputs close to 2^63 (Tom Lane) </para> </listitem> @@ -3698,59 +3698,59 @@ <listitem> <para> - Correctly handle quotes in locale names during <application>initdb</> + Correctly handle quotes in locale names during <application>initdb</application> (Heikki Linnakangas) </para> <para> The case can arise with some Windows locales, such as <quote>People's - Republic of China</>. + Republic of China</quote>. </para> </listitem> <listitem> <para> - Fix <application>pg_upgrade</> to preserve toast tables' relfrozenxids + Fix <application>pg_upgrade</application> to preserve toast tables' relfrozenxids during an upgrade from 8.3 (Bruce Momjian) </para> <para> - Failure to do this could lead to <filename>pg_clog</> files being + Failure to do this could lead to <filename>pg_clog</filename> files being removed too soon after the upgrade. </para> </listitem> <listitem> <para> - In <application>pg_ctl</>, support silent mode for service registrations + In <application>pg_ctl</application>, support silent mode for service registrations on Windows (MauMau) </para> </listitem> <listitem> <para> - Fix <application>psql</>'s counting of script file line numbers during - <literal>COPY</> from a different file (Tom Lane) + Fix <application>psql</application>'s counting of script file line numbers during + <literal>COPY</literal> from a different file (Tom Lane) </para> </listitem> <listitem> <para> - Fix <application>pg_restore</>'s direct-to-database mode for - <varname>standard_conforming_strings</> (Tom Lane) + Fix <application>pg_restore</application>'s direct-to-database mode for + <varname>standard_conforming_strings</varname> (Tom Lane) </para> <para> - <application>pg_restore</> could emit incorrect commands when restoring + <application>pg_restore</application> could emit incorrect commands when restoring directly to a database server from an archive file that had been made - with <varname>standard_conforming_strings</> set to <literal>on</>. + with <varname>standard_conforming_strings</varname> set to <literal>on</literal>. </para> </listitem> <listitem> <para> Be more user-friendly about unsupported cases for parallel - <application>pg_restore</> (Tom Lane) + <application>pg_restore</application> (Tom Lane) </para> <para> @@ -3761,14 +3761,14 @@ <listitem> <para> - Fix write-past-buffer-end and memory leak in <application>libpq</>'s + Fix write-past-buffer-end and memory leak in <application>libpq</application>'s LDAP service lookup code (Albe Laurenz) </para> </listitem> <listitem> <para> - In <application>libpq</>, avoid failures when using nonblocking I/O + In <application>libpq</application>, avoid failures when using nonblocking I/O and an SSL connection (Martin Pihlak, Tom Lane) </para> </listitem> @@ -3780,36 +3780,36 @@ </para> <para> - In particular, the response to a server report of <function>fork()</> + In particular, the response to a server report of <function>fork()</function> failure during SSL connection startup is now saner. </para> </listitem> <listitem> <para> - Improve <application>libpq</>'s error reporting for SSL failures (Tom + Improve <application>libpq</application>'s error reporting for SSL failures (Tom Lane) </para> </listitem> <listitem> <para> - Fix <function>PQsetvalue()</> to avoid possible crash when adding a new - tuple to a <structname>PGresult</> originally obtained from a server + Fix <function>PQsetvalue()</function> to avoid possible crash when adding a new + tuple to a <structname>PGresult</structname> originally obtained from a server query (Andrew Chernow) </para> </listitem> <listitem> <para> - Make <application>ecpglib</> write <type>double</> values with 15 digits + Make <application>ecpglib</application> write <type>double</type> values with 15 digits precision (Akira Kurosawa) </para> </listitem> <listitem> <para> - In <application>ecpglib</>, be sure <literal>LC_NUMERIC</> setting is + In <application>ecpglib</application>, be sure <literal>LC_NUMERIC</literal> setting is restored after an error (Michael Meskes) </para> </listitem> @@ -3821,7 +3821,7 @@ </para> <para> - <filename>contrib/pg_crypto</>'s blowfish encryption code could give + <filename>contrib/pg_crypto</filename>'s blowfish encryption code could give wrong results on platforms where char is signed (which is most), leading to encrypted passwords being weaker than they should be. </para> @@ -3829,13 +3829,13 @@ <listitem> <para> - Fix memory leak in <filename>contrib/seg</> (Heikki Linnakangas) + Fix memory leak in <filename>contrib/seg</filename> (Heikki Linnakangas) </para> </listitem> <listitem> <para> - Fix <function>pgstatindex()</> to give consistent results for empty + Fix <function>pgstatindex()</function> to give consistent results for empty indexes (Tom Lane) </para> </listitem> @@ -3867,7 +3867,7 @@ <listitem> <para> - Update time zone data files to <application>tzdata</> release 2011i + Update time zone data files to <application>tzdata</application> release 2011i for DST law changes in Canada, Egypt, Russia, Samoa, and South Sudan. </para> </listitem> @@ -3900,10 +3900,10 @@ <para> However, if your installation was upgraded from a previous major - release by running <application>pg_upgrade</>, you should take + release by running <application>pg_upgrade</application>, you should take action to prevent possible data loss due to a now-fixed bug in - <application>pg_upgrade</>. The recommended solution is to run - <command>VACUUM FREEZE</> on all TOAST tables. + <application>pg_upgrade</application>. The recommended solution is to run + <command>VACUUM FREEZE</command> on all TOAST tables. More information is available at <ulink url="http://wiki.postgresql.org/wiki/20110408pg_upgrade_fix"> http://wiki.postgresql.org/wiki/20110408pg_upgrade_fix</ulink>. @@ -3923,36 +3923,36 @@ <listitem> <para> - Fix <application>pg_upgrade</>'s handling of TOAST tables + Fix <application>pg_upgrade</application>'s handling of TOAST tables (Bruce Momjian) </para> <para> - The <structname>pg_class</>.<structfield>relfrozenxid</> value for + The <structname>pg_class</structname>.<structfield>relfrozenxid</structfield> value for TOAST tables was not correctly copied into the new installation - during <application>pg_upgrade</>. This could later result in - <literal>pg_clog</> files being discarded while they were still + during <application>pg_upgrade</application>. This could later result in + <literal>pg_clog</literal> files being discarded while they were still needed to validate tuples in the TOAST tables, leading to - <quote>could not access status of transaction</> failures. + <quote>could not access status of transaction</quote> failures. </para> <para> This error poses a significant risk of data loss for installations - that have been upgraded with <application>pg_upgrade</>. This patch - corrects the problem for future uses of <application>pg_upgrade</>, + that have been upgraded with <application>pg_upgrade</application>. This patch + corrects the problem for future uses of <application>pg_upgrade</application>, but does not in itself cure the issue in installations that have been - processed with a buggy version of <application>pg_upgrade</>. + processed with a buggy version of <application>pg_upgrade</application>. </para> </listitem> <listitem> <para> - Suppress incorrect <quote>PD_ALL_VISIBLE flag was incorrectly set</> + Suppress incorrect <quote>PD_ALL_VISIBLE flag was incorrectly set</quote> warning (Heikki Linnakangas) </para> <para> - <command>VACUUM</> would sometimes issue this warning in cases that + <command>VACUUM</command> would sometimes issue this warning in cases that are actually valid. </para> </listitem> @@ -3986,15 +3986,15 @@ <listitem> <para> - Fix dangling-pointer problem in <literal>BEFORE ROW UPDATE</> trigger + Fix dangling-pointer problem in <literal>BEFORE ROW UPDATE</literal> trigger handling when there was a concurrent update to the target tuple (Tom Lane) </para> <para> This bug has been observed to result in intermittent <quote>cannot - extract system attribute from virtual tuple</> failures while trying to - do <literal>UPDATE RETURNING ctid</>. There is a very small probability + extract system attribute from virtual tuple</quote> failures while trying to + do <literal>UPDATE RETURNING ctid</literal>. There is a very small probability of more serious errors, such as generating incorrect index entries for the updated tuple. </para> @@ -4002,13 +4002,13 @@ <listitem> <para> - Disallow <command>DROP TABLE</> when there are pending deferred trigger + Disallow <command>DROP TABLE</command> when there are pending deferred trigger events for the table (Tom Lane) </para> <para> - Formerly the <command>DROP</> would go through, leading to - <quote>could not open relation with OID nnn</> errors when the + Formerly the <command>DROP</command> would go through, leading to + <quote>could not open relation with OID nnn</quote> errors when the triggers were eventually fired. </para> </listitem> @@ -4053,7 +4053,7 @@ <listitem> <para> - Fix <application>pg_restore</> to cope with long lines (over 1KB) in + Fix <application>pg_restore</application> to cope with long lines (over 1KB) in TOC files (Tom Lane) </para> </listitem> @@ -4085,14 +4085,14 @@ <listitem> <para> - Fix version-incompatibility problem with <application>libintl</> on + Fix version-incompatibility problem with <application>libintl</application> on Windows (Hiroshi Inoue) </para> </listitem> <listitem> <para> - Fix usage of <application>xcopy</> in Windows build scripts to + Fix usage of <application>xcopy</application> in Windows build scripts to work correctly under Windows 7 (Andrew Dunstan) </para> @@ -4103,14 +4103,14 @@ <listitem> <para> - Fix path separator used by <application>pg_regress</> on Cygwin + Fix path separator used by <application>pg_regress</application> on Cygwin (Andrew Dunstan) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2011f + Update time zone data files to <application>tzdata</application> release 2011f for DST law changes in Chile, Cuba, Falkland Islands, Morocco, Samoa, and Turkey; also historical corrections for South Australia, Alaska, and Hawaii. @@ -4154,15 +4154,15 @@ <listitem> <para> - Avoid failures when <command>EXPLAIN</> tries to display a simple-form - <literal>CASE</> expression (Tom Lane) + Avoid failures when <command>EXPLAIN</command> tries to display a simple-form + <literal>CASE</literal> expression (Tom Lane) </para> <para> - If the <literal>CASE</>'s test expression was a constant, the planner - could simplify the <literal>CASE</> into a form that confused the + If the <literal>CASE</literal>'s test expression was a constant, the planner + could simplify the <literal>CASE</literal> into a form that confused the expression-display code, resulting in <quote>unexpected CASE WHEN - clause</> errors. + clause</quote> errors. </para> </listitem> @@ -4187,44 +4187,44 @@ </para> <para> - The <type>date</> type supports a wider range of dates than can be - represented by the <type>timestamp</> types, but the planner assumed it + The <type>date</type> type supports a wider range of dates than can be + represented by the <type>timestamp</type> types, but the planner assumed it could always convert a date to timestamp with impunity. </para> </listitem> <listitem> <para> - Fix <application>pg_restore</>'s text output for large objects (BLOBs) - when <varname>standard_conforming_strings</> is on (Tom Lane) + Fix <application>pg_restore</application>'s text output for large objects (BLOBs) + when <varname>standard_conforming_strings</varname> is on (Tom Lane) </para> <para> Although restoring directly to a database worked correctly, string - escaping was incorrect if <application>pg_restore</> was asked for - SQL text output and <varname>standard_conforming_strings</> had been + escaping was incorrect if <application>pg_restore</application> was asked for + SQL text output and <varname>standard_conforming_strings</varname> had been enabled in the source database. </para> </listitem> <listitem> <para> - Fix erroneous parsing of <type>tsquery</> values containing + Fix erroneous parsing of <type>tsquery</type> values containing <literal>... & !(subexpression) | ...</literal> (Tom Lane) </para> <para> Queries containing this combination of operators were not executed - correctly. The same error existed in <filename>contrib/intarray</>'s - <type>query_int</> type and <filename>contrib/ltree</>'s - <type>ltxtquery</> type. + correctly. The same error existed in <filename>contrib/intarray</filename>'s + <type>query_int</type> type and <filename>contrib/ltree</filename>'s + <type>ltxtquery</type> type. </para> </listitem> <listitem> <para> - Fix buffer overrun in <filename>contrib/intarray</>'s input function - for the <type>query_int</> type (Apple) + Fix buffer overrun in <filename>contrib/intarray</filename>'s input function + for the <type>query_int</type> type (Apple) </para> <para> @@ -4236,16 +4236,16 @@ <listitem> <para> - Fix bug in <filename>contrib/seg</>'s GiST picksplit algorithm + Fix bug in <filename>contrib/seg</filename>'s GiST picksplit algorithm (Alexander Korotkov) </para> <para> This could result in considerable inefficiency, though not actually - incorrect answers, in a GiST index on a <type>seg</> column. - If you have such an index, consider <command>REINDEX</>ing it after + incorrect answers, in a GiST index on a <type>seg</type> column. + If you have such an index, consider <command>REINDEX</command>ing it after installing this update. (This is identical to the bug that was fixed in - <filename>contrib/cube</> in the previous update.) + <filename>contrib/cube</filename> in the previous update.) </para> </listitem> @@ -4287,17 +4287,17 @@ <listitem> <para> Force the default - <link linkend="guc-wal-sync-method"><varname>wal_sync_method</></link> - to be <literal>fdatasync</> on Linux (Tom Lane, Marti Raudsepp) + <link linkend="guc-wal-sync-method"><varname>wal_sync_method</varname></link> + to be <literal>fdatasync</literal> on Linux (Tom Lane, Marti Raudsepp) </para> <para> - The default on Linux has actually been <literal>fdatasync</> for many - years, but recent kernel changes caused <productname>PostgreSQL</> to - choose <literal>open_datasync</> instead. This choice did not result + The default on Linux has actually been <literal>fdatasync</literal> for many + years, but recent kernel changes caused <productname>PostgreSQL</productname> to + choose <literal>open_datasync</literal> instead. This choice did not result in any performance improvement, and caused outright failures on - certain filesystems, notably <literal>ext4</> with the - <literal>data=journal</> mount option. + certain filesystems, notably <literal>ext4</literal> with the + <literal>data=journal</literal> mount option. </para> </listitem> @@ -4307,7 +4307,7 @@ </para> <para> - This could result in <quote>bad buffer id: 0</> failures or + This could result in <quote>bad buffer id: 0</quote> failures or corruption of index contents during replication. </para> </listitem> @@ -4326,7 +4326,7 @@ </para> <para> - The effective <varname>vacuum_cost_limit</> for an autovacuum worker + The effective <varname>vacuum_cost_limit</varname> for an autovacuum worker could drop to nearly zero if it processed enough tables, causing it to run extremely slowly. </para> @@ -4334,19 +4334,19 @@ <listitem> <para> - Add support for detecting register-stack overrun on <literal>IA64</> + Add support for detecting register-stack overrun on <literal>IA64</literal> (Tom Lane) </para> <para> - The <literal>IA64</> architecture has two hardware stacks. Full + The <literal>IA64</literal> architecture has two hardware stacks. Full prevention of stack-overrun failures requires checking both. </para> </listitem> <listitem> <para> - Add a check for stack overflow in <function>copyObject()</> (Tom Lane) + Add a check for stack overflow in <function>copyObject()</function> (Tom Lane) </para> <para> @@ -4362,7 +4362,7 @@ </para> <para> - It is possible to have a <quote>concurrent</> page split in a + It is possible to have a <quote>concurrent</quote> page split in a temporary index, if for example there is an open cursor scanning the index when an insertion is done. GiST failed to detect this case and hence could deliver wrong results when execution of the cursor @@ -4389,16 +4389,16 @@ <para> Certain cases where a large number of tuples needed to be read in - advance, but <varname>work_mem</> was large enough to allow them all + advance, but <varname>work_mem</varname> was large enough to allow them all to be held in memory, were unexpectedly slow. - <function>percent_rank()</>, <function>cume_dist()</> and - <function>ntile()</> in particular were subject to this problem. + <function>percent_rank()</function>, <function>cume_dist()</function> and + <function>ntile()</function> in particular were subject to this problem. </para> </listitem> <listitem> <para> - Avoid memory leakage while <command>ANALYZE</>'ing complex index + Avoid memory leakage while <command>ANALYZE</command>'ing complex index expressions (Tom Lane) </para> </listitem> @@ -4410,14 +4410,14 @@ </para> <para> - An index declared like <literal>create index i on t (foo(t.*))</> + An index declared like <literal>create index i on t (foo(t.*))</literal> would not automatically get dropped when its table was dropped. </para> </listitem> <listitem> <para> - Do not <quote>inline</> a SQL function with multiple <literal>OUT</> + Do not <quote>inline</quote> a SQL function with multiple <literal>OUT</literal> parameters (Tom Lane) </para> @@ -4429,15 +4429,15 @@ <listitem> <para> - Behave correctly if <literal>ORDER BY</>, <literal>LIMIT</>, - <literal>FOR UPDATE</>, or <literal>WITH</> is attached to the - <literal>VALUES</> part of <literal>INSERT ... VALUES</> (Tom Lane) + Behave correctly if <literal>ORDER BY</literal>, <literal>LIMIT</literal>, + <literal>FOR UPDATE</literal>, or <literal>WITH</literal> is attached to the + <literal>VALUES</literal> part of <literal>INSERT ... VALUES</literal> (Tom Lane) </para> </listitem> <listitem> <para> - Fix constant-folding of <literal>COALESCE()</> expressions (Tom Lane) + Fix constant-folding of <literal>COALESCE()</literal> expressions (Tom Lane) </para> <para> @@ -4449,7 +4449,7 @@ <listitem> <para> Fix postmaster crash when connection acceptance - (<function>accept()</> or one of the calls made immediately after it) + (<function>accept()</function> or one of the calls made immediately after it) fails, and the postmaster was compiled with GSSAPI support (Alexander Chernikov) </para> @@ -4457,7 +4457,7 @@ <listitem> <para> - Fix missed unlink of temporary files when <varname>log_temp_files</> + Fix missed unlink of temporary files when <varname>log_temp_files</varname> is active (Tom Lane) </para> @@ -4469,11 +4469,11 @@ <listitem> <para> - Add print functionality for <structname>InhRelation</> nodes (Tom Lane) + Add print functionality for <structname>InhRelation</structname> nodes (Tom Lane) </para> <para> - This avoids a failure when <varname>debug_print_parse</> is enabled + This avoids a failure when <varname>debug_print_parse</varname> is enabled and certain types of query are executed. </para> </listitem> @@ -4493,20 +4493,20 @@ <listitem> <para> Fix incorrect calculation of transaction status in - <application>ecpg</> (Itagaki Takahiro) + <application>ecpg</application> (Itagaki Takahiro) </para> </listitem> <listitem> <para> - Fix <application>PL/pgSQL</>'s handling of <quote>simple</> + Fix <application>PL/pgSQL</application>'s handling of <quote>simple</quote> expressions to not fail in recursion or error-recovery cases (Tom Lane) </para> </listitem> <listitem> <para> - Fix <application>PL/Python</>'s handling of set-returning functions + Fix <application>PL/Python</application>'s handling of set-returning functions (Jan Urbanski) </para> @@ -4518,22 +4518,22 @@ <listitem> <para> - Fix bug in <filename>contrib/cube</>'s GiST picksplit algorithm + Fix bug in <filename>contrib/cube</filename>'s GiST picksplit algorithm (Alexander Korotkov) </para> <para> This could result in considerable inefficiency, though not actually - incorrect answers, in a GiST index on a <type>cube</> column. - If you have such an index, consider <command>REINDEX</>ing it after + incorrect answers, in a GiST index on a <type>cube</type> column. + If you have such an index, consider <command>REINDEX</command>ing it after installing this update. </para> </listitem> <listitem> <para> - Don't emit <quote>identifier will be truncated</> notices in - <filename>contrib/dblink</> except when creating new connections + Don't emit <quote>identifier will be truncated</quote> notices in + <filename>contrib/dblink</filename> except when creating new connections (Itagaki Takahiro) </para> </listitem> @@ -4541,20 +4541,20 @@ <listitem> <para> Fix potential coredump on missing public key in - <filename>contrib/pgcrypto</> (Marti Raudsepp) + <filename>contrib/pgcrypto</filename> (Marti Raudsepp) </para> </listitem> <listitem> <para> - Fix memory leak in <filename>contrib/xml2</>'s XPath query functions + Fix memory leak in <filename>contrib/xml2</filename>'s XPath query functions (Tom Lane) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2010o + Update time zone data files to <application>tzdata</application> release 2010o for DST law changes in Fiji and Samoa; also historical corrections for Hong Kong. </para> @@ -4605,7 +4605,7 @@ This change prevents security problems that can be caused by subverting Perl or Tcl code that will be executed later in the same session under another SQL user identity (for example, within a <literal>SECURITY - DEFINER</> function). Most scripting languages offer numerous ways that + DEFINER</literal> function). Most scripting languages offer numerous ways that that might be done, such as redefining standard functions or operators called by the target function. Without this change, any SQL user with Perl or Tcl language usage rights can do essentially anything with the @@ -4634,7 +4634,7 @@ <listitem> <para> - Prevent possible crashes in <function>pg_get_expr()</> by disallowing + Prevent possible crashes in <function>pg_get_expr()</function> by disallowing it from being called with an argument that is not one of the system catalog columns it's intended to be used with (Heikki Linnakangas, Tom Lane) @@ -4643,7 +4643,7 @@ <listitem> <para> - Treat exit code 128 (<literal>ERROR_WAIT_NO_CHILDREN</>) as non-fatal on + Treat exit code 128 (<literal>ERROR_WAIT_NO_CHILDREN</literal>) as non-fatal on Windows (Magnus Hagander) </para> @@ -4669,7 +4669,7 @@ <listitem> <para> - Fix possible duplicate scans of <literal>UNION ALL</> member relations + Fix possible duplicate scans of <literal>UNION ALL</literal> member relations (Tom Lane) </para> </listitem> @@ -4694,18 +4694,18 @@ <listitem> <para> - Fix mishandling of cross-type <literal>IN</> comparisons (Tom Lane) + Fix mishandling of cross-type <literal>IN</literal> comparisons (Tom Lane) </para> <para> This could result in failures if the planner tried to implement an - <literal>IN</> join with a sort-then-unique-then-plain-join plan. + <literal>IN</literal> join with a sort-then-unique-then-plain-join plan. </para> </listitem> <listitem> <para> - Fix computation of <command>ANALYZE</> statistics for <type>tsvector</> + Fix computation of <command>ANALYZE</command> statistics for <type>tsvector</type> columns (Jan Urbanski) </para> @@ -4717,8 +4717,8 @@ <listitem> <para> - Improve planner's estimate of memory used by <function>array_agg()</>, - <function>string_agg()</>, and similar aggregate functions + Improve planner's estimate of memory used by <function>array_agg()</function>, + <function>string_agg()</function>, and similar aggregate functions (Hitoshi Harada) </para> @@ -4734,7 +4734,7 @@ </para> <para> - If a plan is prepared while <command>CREATE INDEX CONCURRENTLY</> is + If a plan is prepared while <command>CREATE INDEX CONCURRENTLY</command> is in progress for one of the referenced tables, it is supposed to be re-planned once the index is ready for use. This was not happening reliably. @@ -4812,7 +4812,7 @@ <listitem> <para> Take care to fsync the contents of lockfiles (both - <filename>postmaster.pid</> and the socket lockfile) while writing them + <filename>postmaster.pid</filename> and the socket lockfile) while writing them (Tom Lane) </para> @@ -4849,7 +4849,7 @@ <listitem> <para> - Fix <varname>log_line_prefix</>'s <literal>%i</> escape, + Fix <varname>log_line_prefix</varname>'s <literal>%i</literal> escape, which could produce junk early in backend startup (Tom Lane) </para> </listitem> @@ -4861,7 +4861,7 @@ </para> <para> - In particular, <literal>fillfactor</> would be read as zero if any + In particular, <literal>fillfactor</literal> would be read as zero if any other reloption had been set for the table, leading to serious bloat. </para> </listitem> @@ -4869,49 +4869,49 @@ <listitem> <para> Fix inheritance count tracking in <command>ALTER TABLE ... ADD - CONSTRAINT</> (Robert Haas) + CONSTRAINT</command> (Robert Haas) </para> </listitem> <listitem> <para> Fix possible data corruption in <command>ALTER TABLE ... SET - TABLESPACE</> when archiving is enabled (Jeff Davis) + TABLESPACE</command> when archiving is enabled (Jeff Davis) </para> </listitem> <listitem> <para> - Allow <command>CREATE DATABASE</> and <command>ALTER DATABASE ... SET - TABLESPACE</> to be interrupted by query-cancel (Guillaume Lelarge) + Allow <command>CREATE DATABASE</command> and <command>ALTER DATABASE ... SET + TABLESPACE</command> to be interrupted by query-cancel (Guillaume Lelarge) </para> </listitem> <listitem> <para> - Improve <command>CREATE INDEX</>'s checking of whether proposed index + Improve <command>CREATE INDEX</command>'s checking of whether proposed index expressions are immutable (Tom Lane) </para> </listitem> <listitem> <para> - Fix <command>REASSIGN OWNED</> to handle operator classes and families + Fix <command>REASSIGN OWNED</command> to handle operator classes and families (Asko Tiidumaa) </para> </listitem> <listitem> <para> - Fix possible core dump when comparing two empty <type>tsquery</> values + Fix possible core dump when comparing two empty <type>tsquery</type> values (Tom Lane) </para> </listitem> <listitem> <para> - Fix <literal>LIKE</>'s handling of patterns containing <literal>%</> - followed by <literal>_</> (Tom Lane) + Fix <literal>LIKE</literal>'s handling of patterns containing <literal>%</literal> + followed by <literal>_</literal> (Tom Lane) </para> <para> @@ -4926,7 +4926,7 @@ </para> <para> - Input such as <literal>'J100000'::date</> worked before 8.4, + Input such as <literal>'J100000'::date</literal> worked before 8.4, but was unintentionally broken by added error-checking. </para> </listitem> @@ -4934,7 +4934,7 @@ <listitem> <para> Fix PL/pgSQL to throw an error, not crash, if a cursor is closed within - a <literal>FOR</> loop that is iterating over that cursor + a <literal>FOR</literal> loop that is iterating over that cursor (Heikki Linnakangas) </para> </listitem> @@ -4942,22 +4942,22 @@ <listitem> <para> In PL/Python, defend against null pointer results from - <function>PyCObject_AsVoidPtr</> and <function>PyCObject_FromVoidPtr</> + <function>PyCObject_AsVoidPtr</function> and <function>PyCObject_FromVoidPtr</function> (Peter Eisentraut) </para> </listitem> <listitem> <para> - In <application>libpq</>, fix full SSL certificate verification for the - case where both <literal>host</> and <literal>hostaddr</> are specified + In <application>libpq</application>, fix full SSL certificate verification for the + case where both <literal>host</literal> and <literal>hostaddr</literal> are specified (Tom Lane) </para> </listitem> <listitem> <para> - Make psql recognize <command>DISCARD ALL</> as a command that should + Make psql recognize <command>DISCARD ALL</command> as a command that should not be encased in a transaction block in autocommit-off mode (Itagaki Takahiro) </para> @@ -4965,19 +4965,19 @@ <listitem> <para> - Fix some issues in <application>pg_dump</>'s handling of SQL/MED objects + Fix some issues in <application>pg_dump</application>'s handling of SQL/MED objects (Tom Lane) </para> <para> - Notably, <application>pg_dump</> would always fail if run by a + Notably, <application>pg_dump</application> would always fail if run by a non-superuser, which was not intended. </para> </listitem> <listitem> <para> - Improve <application>pg_dump</> and <application>pg_restore</>'s + Improve <application>pg_dump</application> and <application>pg_restore</application>'s handling of non-seekable archive files (Tom Lane, Robert Haas) </para> @@ -4989,31 +4989,31 @@ <listitem> <para> Improve parallel pg_restore's ability to cope with selective restore - (<literal>-L</> option) (Tom Lane) + (<literal>-L</literal> option) (Tom Lane) </para> <para> - The original code tended to fail if the <literal>-L</> file commanded + The original code tended to fail if the <literal>-L</literal> file commanded a non-default restore ordering. </para> </listitem> <listitem> <para> - Fix <application>ecpg</> to process data from <literal>RETURNING</> + Fix <application>ecpg</application> to process data from <literal>RETURNING</literal> clauses correctly (Michael Meskes) </para> </listitem> <listitem> <para> - Fix some memory leaks in <application>ecpg</> (Zoltan Boszormenyi) + Fix some memory leaks in <application>ecpg</application> (Zoltan Boszormenyi) </para> </listitem> <listitem> <para> - Improve <filename>contrib/dblink</>'s handling of tables containing + Improve <filename>contrib/dblink</filename>'s handling of tables containing dropped columns (Tom Lane) </para> </listitem> @@ -5021,30 +5021,30 @@ <listitem> <para> Fix connection leak after <quote>duplicate connection name</quote> - errors in <filename>contrib/dblink</> (Itagaki Takahiro) + errors in <filename>contrib/dblink</filename> (Itagaki Takahiro) </para> </listitem> <listitem> <para> - Fix <filename>contrib/dblink</> to handle connection names longer than + Fix <filename>contrib/dblink</filename> to handle connection names longer than 62 bytes correctly (Itagaki Takahiro) </para> </listitem> <listitem> <para> - Add <function>hstore(text, text)</> - function to <filename>contrib/hstore</> (Robert Haas) + Add <function>hstore(text, text)</function> + function to <filename>contrib/hstore</filename> (Robert Haas) </para> <para> This function is the recommended substitute for the now-deprecated - <literal>=></> operator. It was back-patched so that future-proofed + <literal>=></literal> operator. It was back-patched so that future-proofed code can be used with older server versions. Note that the patch will - be effective only after <filename>contrib/hstore</> is installed or + be effective only after <filename>contrib/hstore</filename> is installed or reinstalled in a particular database. Users might prefer to execute - the <command>CREATE FUNCTION</> command by hand, instead. + the <command>CREATE FUNCTION</command> command by hand, instead. </para> </listitem> @@ -5057,7 +5057,7 @@ <listitem> <para> - Update time zone data files to <application>tzdata</> release 2010l + Update time zone data files to <application>tzdata</application> release 2010l for DST law changes in Egypt and Palestine; also historical corrections for Finland. </para> @@ -5072,7 +5072,7 @@ <listitem> <para> - Make Windows' <quote>N. Central Asia Standard Time</> timezone map to + Make Windows' <quote>N. Central Asia Standard Time</quote> timezone map to Asia/Novosibirsk, not Asia/Almaty (Magnus Hagander) </para> @@ -5119,19 +5119,19 @@ <listitem> <para> - Enforce restrictions in <literal>plperl</> using an opmask applied to - the whole interpreter, instead of using <filename>Safe.pm</> + Enforce restrictions in <literal>plperl</literal> using an opmask applied to + the whole interpreter, instead of using <filename>Safe.pm</filename> (Tim Bunce, Andrew Dunstan) </para> <para> - Recent developments have convinced us that <filename>Safe.pm</> is too - insecure to rely on for making <literal>plperl</> trustable. This - change removes use of <filename>Safe.pm</> altogether, in favor of using + Recent developments have convinced us that <filename>Safe.pm</filename> is too + insecure to rely on for making <literal>plperl</literal> trustable. This + change removes use of <filename>Safe.pm</filename> altogether, in favor of using a separate interpreter with an opcode mask that is always applied. Pleasant side effects of the change include that it is now possible to - use Perl's <literal>strict</> pragma in a natural way in - <literal>plperl</>, and that Perl's <literal>$a</> and <literal>$b</> + use Perl's <literal>strict</literal> pragma in a natural way in + <literal>plperl</literal>, and that Perl's <literal>$a</literal> and <literal>$b</literal> variables work as expected in sort routines, and that function compilation is significantly faster. (CVE-2010-1169) </para> @@ -5140,19 +5140,19 @@ <listitem> <para> Prevent PL/Tcl from executing untrustworthy code from - <structname>pltcl_modules</> (Tom) + <structname>pltcl_modules</structname> (Tom) </para> <para> PL/Tcl's feature for autoloading Tcl code from a database table could be exploited for trojan-horse attacks, because there was no restriction on who could create or insert into that table. This change - disables the feature unless <structname>pltcl_modules</> is owned by a + disables the feature unless <structname>pltcl_modules</structname> is owned by a superuser. (However, the permissions on the table are not checked, so installations that really need a less-than-secure modules table can still grant suitable privileges to trusted non-superusers.) Also, - prevent loading code into the unrestricted <quote>normal</> Tcl - interpreter unless we are really going to execute a <literal>pltclu</> + prevent loading code into the unrestricted <quote>normal</quote> Tcl + interpreter unless we are really going to execute a <literal>pltclu</literal> function. (CVE-2010-1170) </para> </listitem> @@ -5160,16 +5160,16 @@ <listitem> <para> Fix data corruption during WAL replay of - <literal>ALTER ... SET TABLESPACE</> (Tom) + <literal>ALTER ... SET TABLESPACE</literal> (Tom) </para> <para> - When <varname>archive_mode</> is on, <literal>ALTER ... SET TABLESPACE</> + When <varname>archive_mode</varname> is on, <literal>ALTER ... SET TABLESPACE</literal> generates a WAL record whose replay logic was incorrect. It could write the data to the wrong place, leading to possibly-unrecoverable data corruption. Data corruption would be observed on standby slaves, and could occur on the master as well if a database crash and recovery - occurred after committing the <literal>ALTER</> and before the next + occurred after committing the <literal>ALTER</literal> and before the next checkpoint. </para> </listitem> @@ -5194,20 +5194,20 @@ <para> This avoids failures if the function's code is invalid without the setting; an example is that SQL functions may not parse if the - <varname>search_path</> is not correct. + <varname>search_path</varname> is not correct. </para> </listitem> <listitem> <para> - Do constraint exclusion for inherited <command>UPDATE</> and - <command>DELETE</> target tables when - <varname>constraint_exclusion</> = <literal>partition</> (Tom) + Do constraint exclusion for inherited <command>UPDATE</command> and + <command>DELETE</command> target tables when + <varname>constraint_exclusion</varname> = <literal>partition</literal> (Tom) </para> <para> Due to an oversight, this setting previously only caused constraint - exclusion to be checked in <command>SELECT</> commands. + exclusion to be checked in <command>SELECT</command> commands. </para> </listitem> @@ -5219,10 +5219,10 @@ <para> Previously, if an unprivileged user ran <literal>ALTER USER ... RESET - ALL</> for himself, or <literal>ALTER DATABASE ... RESET ALL</> for + ALL</literal> for himself, or <literal>ALTER DATABASE ... RESET ALL</literal> for a database he owns, this would remove all special parameter settings for the user or database, even ones that are only supposed to be - changeable by a superuser. Now, the <command>ALTER</> will only + changeable by a superuser. Now, the <command>ALTER</command> will only remove the parameters that the user has permission to change. </para> </listitem> @@ -5230,7 +5230,7 @@ <listitem> <para> Avoid possible crash during backend shutdown if shutdown occurs - when a <literal>CONTEXT</> addition would be made to log entries (Tom) + when a <literal>CONTEXT</literal> addition would be made to log entries (Tom) </para> <para> @@ -5242,8 +5242,8 @@ <listitem> <para> - Fix erroneous handling of <literal>%r</> parameter in - <varname>recovery_end_command</> (Heikki) + Fix erroneous handling of <literal>%r</literal> parameter in + <varname>recovery_end_command</varname> (Heikki) </para> <para> @@ -5254,20 +5254,20 @@ <listitem> <para> Ensure the archiver process responds to changes in - <varname>archive_command</> as soon as possible (Tom) + <varname>archive_command</varname> as soon as possible (Tom) </para> </listitem> <listitem> <para> - Fix PL/pgSQL's <literal>CASE</> statement to not fail when the + Fix PL/pgSQL's <literal>CASE</literal> statement to not fail when the case expression is a query that returns no rows (Tom) </para> </listitem> <listitem> <para> - Update PL/Perl's <filename>ppport.h</> for modern Perl versions + Update PL/Perl's <filename>ppport.h</filename> for modern Perl versions (Andrew) </para> </listitem> @@ -5286,15 +5286,15 @@ <listitem> <para> - Prevent infinite recursion in <application>psql</> when expanding + Prevent infinite recursion in <application>psql</application> when expanding a variable that refers to itself (Tom) </para> </listitem> <listitem> <para> - Fix <application>psql</>'s <literal>\copy</> to not add spaces around - a dot within <literal>\copy (select ...)</> (Tom) + Fix <application>psql</application>'s <literal>\copy</literal> to not add spaces around + a dot within <literal>\copy (select ...)</literal> (Tom) </para> <para> @@ -5305,23 +5305,23 @@ <listitem> <para> - Avoid formatting failure in <application>psql</> when running in a - locale context that doesn't match the <varname>client_encoding</> + Avoid formatting failure in <application>psql</application> when running in a + locale context that doesn't match the <varname>client_encoding</varname> (Tom) </para> </listitem> <listitem> <para> - Fix unnecessary <quote>GIN indexes do not support whole-index scans</> - errors for unsatisfiable queries using <filename>contrib/intarray</> + Fix unnecessary <quote>GIN indexes do not support whole-index scans</quote> + errors for unsatisfiable queries using <filename>contrib/intarray</filename> operators (Tom) </para> </listitem> <listitem> <para> - Ensure that <filename>contrib/pgstattuple</> functions respond to cancel + Ensure that <filename>contrib/pgstattuple</filename> functions respond to cancel interrupts promptly (Tatsuhito Kasahara) </para> </listitem> @@ -5329,7 +5329,7 @@ <listitem> <para> Make server startup deal properly with the case that - <function>shmget()</> returns <literal>EINVAL</> for an existing + <function>shmget()</function> returns <literal>EINVAL</literal> for an existing shared memory segment (Tom) </para> @@ -5361,14 +5361,14 @@ <listitem> <para> - Update time zone data files to <application>tzdata</> release 2010j + Update time zone data files to <application>tzdata</application> release 2010j for DST law changes in Argentina, Australian Antarctic, Bangladesh, Mexico, Morocco, Pakistan, Palestine, Russia, Syria, Tunisia; also historical corrections for Taiwan. </para> <para> - Also, add <literal>PKST</> (Pakistan Summer Time) to the default set of + Also, add <literal>PKST</literal> (Pakistan Summer Time) to the default set of timezone abbreviations. </para> </listitem> @@ -5410,7 +5410,7 @@ <listitem> <para> - Add new configuration parameter <varname>ssl_renegotiation_limit</> to + Add new configuration parameter <varname>ssl_renegotiation_limit</varname> to control how often we do session key renegotiation for an SSL connection (Magnus) </para> @@ -5446,7 +5446,7 @@ <listitem> <para> Fix possible crash due to overenthusiastic invalidation of cached - plan for <command>ROLLBACK</> (Tom) + plan for <command>ROLLBACK</command> (Tom) </para> </listitem> @@ -5492,8 +5492,8 @@ <listitem> <para> - Make <function>substring()</> for <type>bit</> types treat any negative - length as meaning <quote>all the rest of the string</> (Tom) + Make <function>substring()</function> for <type>bit</type> types treat any negative + length as meaning <quote>all the rest of the string</quote> (Tom) </para> <para> @@ -5533,12 +5533,12 @@ <listitem> <para> - Avoid failure when <command>EXPLAIN</> has to print a FieldStore or + Avoid failure when <command>EXPLAIN</command> has to print a FieldStore or assignment ArrayRef expression (Tom) </para> <para> - These cases can arise now that <command>EXPLAIN VERBOSE</> tries to + These cases can arise now that <command>EXPLAIN VERBOSE</command> tries to print plan node target lists. </para> </listitem> @@ -5547,7 +5547,7 @@ <para> Avoid an unnecessary coercion failure in some cases where an undecorated literal string appears in a subquery within - <command>UNION</>/<command>INTERSECT</>/<command>EXCEPT</> (Tom) + <command>UNION</command>/<command>INTERSECT</command>/<command>EXCEPT</command> (Tom) </para> <para> @@ -5564,7 +5564,7 @@ <listitem> <para> - Fix the <literal>STOP WAL LOCATION</> entry in backup history files to + Fix the <literal>STOP WAL LOCATION</literal> entry in backup history files to report the next WAL segment's name when the end location is exactly at a segment boundary (Itagaki Takahiro) </para> @@ -5573,7 +5573,7 @@ <listitem> <para> Always pass the catalog ID to an option validator function specified in - <command>CREATE FOREIGN DATA WRAPPER</> (Martin Pihlak) + <command>CREATE FOREIGN DATA WRAPPER</command> (Martin Pihlak) </para> </listitem> @@ -5591,7 +5591,7 @@ <listitem> <para> - Add support for doing <literal>FULL JOIN ON FALSE</> (Tom) + Add support for doing <literal>FULL JOIN ON FALSE</literal> (Tom) </para> <para> @@ -5604,13 +5604,13 @@ <para> Improve constraint exclusion processing of boolean-variable cases, in particular make it possible to exclude a partition that has a - <quote>bool_column = false</> constraint (Tom) + <quote>bool_column = false</quote> constraint (Tom) </para> </listitem> <listitem> <para> - Prevent treating an <literal>INOUT</> cast as representing binary + Prevent treating an <literal>INOUT</literal> cast as representing binary compatibility (Heikki) </para> </listitem> @@ -5623,24 +5623,24 @@ <para> This is more useful than before and helps to prevent confusion when - a <command>REVOKE</> generates multiple messages, which formerly + a <command>REVOKE</command> generates multiple messages, which formerly appeared to be duplicates. </para> </listitem> <listitem> <para> - When reading <filename>pg_hba.conf</> and related files, do not treat - <literal>@something</> as a file inclusion request if the <literal>@</> - appears inside quote marks; also, never treat <literal>@</> by itself + When reading <filename>pg_hba.conf</filename> and related files, do not treat + <literal>@something</literal> as a file inclusion request if the <literal>@</literal> + appears inside quote marks; also, never treat <literal>@</literal> by itself as a file inclusion request (Tom) </para> <para> This prevents erratic behavior if a role or database name starts with - <literal>@</>. If you need to include a file whose path name + <literal>@</literal>. If you need to include a file whose path name contains spaces, you can still do so, but you must write - <literal>@"/path to/file"</> rather than putting the quotes around + <literal>@"/path to/file"</literal> rather than putting the quotes around the whole construct. </para> </listitem> @@ -5648,83 +5648,83 @@ <listitem> <para> Prevent infinite loop on some platforms if a directory is named as - an inclusion target in <filename>pg_hba.conf</> and related files + an inclusion target in <filename>pg_hba.conf</filename> and related files (Tom) </para> </listitem> <listitem> <para> - Fix possible infinite loop if <function>SSL_read</> or - <function>SSL_write</> fails without setting <varname>errno</> (Tom) + Fix possible infinite loop if <function>SSL_read</function> or + <function>SSL_write</function> fails without setting <varname>errno</varname> (Tom) </para> <para> This is reportedly possible with some Windows versions of - <application>openssl</>. + <application>openssl</application>. </para> </listitem> <listitem> <para> - Disallow <acronym>GSSAPI</> authentication on local connections, + Disallow <acronym>GSSAPI</acronym> authentication on local connections, since it requires a hostname to function correctly (Magnus) </para> </listitem> <listitem> <para> - Protect <application>ecpg</> against applications freeing strings + Protect <application>ecpg</application> against applications freeing strings unexpectedly (Michael) </para> </listitem> <listitem> <para> - Make <application>ecpg</> report the proper SQLSTATE if the connection + Make <application>ecpg</application> report the proper SQLSTATE if the connection disappears (Michael) </para> </listitem> <listitem> <para> - Fix translation of cell contents in <application>psql</> <literal>\d</> + Fix translation of cell contents in <application>psql</application> <literal>\d</literal> output (Heikki) </para> </listitem> <listitem> <para> - Fix <application>psql</>'s <literal>numericlocale</> option to not + Fix <application>psql</application>'s <literal>numericlocale</literal> option to not format strings it shouldn't in latex and troff output formats (Heikki) </para> </listitem> <listitem> <para> - Fix a small per-query memory leak in <application>psql</> (Tom) + Fix a small per-query memory leak in <application>psql</application> (Tom) </para> </listitem> <listitem> <para> - Make <application>psql</> return the correct exit status (3) when - <literal>ON_ERROR_STOP</> and <literal>--single-transaction</> are - both specified and an error occurs during the implied <command>COMMIT</> + Make <application>psql</application> return the correct exit status (3) when + <literal>ON_ERROR_STOP</literal> and <literal>--single-transaction</literal> are + both specified and an error occurs during the implied <command>COMMIT</command> (Bruce) </para> </listitem> <listitem> <para> - Fix <application>pg_dump</>'s output of permissions for foreign servers + Fix <application>pg_dump</application>'s output of permissions for foreign servers (Heikki) </para> </listitem> <listitem> <para> - Fix possible crash in parallel <application>pg_restore</> due to + Fix possible crash in parallel <application>pg_restore</application> due to out-of-range dependency IDs (Tom) </para> </listitem> @@ -5745,7 +5745,7 @@ <listitem> <para> - Add <literal>volatile</> markings in PL/Python to avoid possible + Add <literal>volatile</literal> markings in PL/Python to avoid possible compiler-specific misbehavior (Zdenek Kotala) </para> </listitem> @@ -5757,55 +5757,55 @@ <para> The only known symptom of this oversight is that the Tcl - <literal>clock</> command misbehaves if using Tcl 8.5 or later. + <literal>clock</literal> command misbehaves if using Tcl 8.5 or later. </para> </listitem> <listitem> <para> - Prevent <function>ExecutorEnd</> from being run on portals created + Prevent <function>ExecutorEnd</function> from being run on portals created within a failed transaction or subtransaction (Tom) </para> <para> This is known to cause issues when using - <filename>contrib/auto_explain</>. + <filename>contrib/auto_explain</filename>. </para> </listitem> <listitem> <para> - Prevent crash in <filename>contrib/dblink</> when too many key - columns are specified to a <function>dblink_build_sql_*</> function + Prevent crash in <filename>contrib/dblink</filename> when too many key + columns are specified to a <function>dblink_build_sql_*</function> function (Rushabh Lathia, Joe Conway) </para> </listitem> <listitem> <para> - Allow zero-dimensional arrays in <filename>contrib/ltree</> operations + Allow zero-dimensional arrays in <filename>contrib/ltree</filename> operations (Tom) </para> <para> This case was formerly rejected as an error, but it's more convenient to treat it the same as a zero-element array. In particular this avoids - unnecessary failures when an <type>ltree</> operation is applied to the - result of <literal>ARRAY(SELECT ...)</> and the sub-select returns no + unnecessary failures when an <type>ltree</type> operation is applied to the + result of <literal>ARRAY(SELECT ...)</literal> and the sub-select returns no rows. </para> </listitem> <listitem> <para> - Fix assorted crashes in <filename>contrib/xml2</> caused by sloppy + Fix assorted crashes in <filename>contrib/xml2</filename> caused by sloppy memory management (Tom) </para> </listitem> <listitem> <para> - Make building of <filename>contrib/xml2</> more robust on Windows + Make building of <filename>contrib/xml2</filename> more robust on Windows (Andrew) </para> </listitem> @@ -5816,7 +5816,7 @@ </para> <para> - One known symptom of this bug is that rows in <structname>pg_listener</> + One known symptom of this bug is that rows in <structname>pg_listener</structname> could be dropped under heavy load. </para> </listitem> @@ -5835,7 +5835,7 @@ <listitem> <para> - Update time zone data files to <application>tzdata</> release 2010e + Update time zone data files to <application>tzdata</application> release 2010e for DST law changes in Bangladesh, Chile, Fiji, Mexico, Paraguay, Samoa. </para> </listitem> @@ -5865,7 +5865,7 @@ <para> A dump/restore is not required for those running 8.4.X. However, if you have any hash indexes, - you should <command>REINDEX</> them after updating to 8.4.2, + you should <command>REINDEX</command> them after updating to 8.4.2, to repair possible damage. </para> @@ -5911,7 +5911,7 @@ preserve the ordering. So application of either of those operations could lead to permanent corruption of an index, in the sense that searches might fail to find entries that are present. To deal with - this, it is recommended to <literal>REINDEX</> any hash indexes you may + this, it is recommended to <literal>REINDEX</literal> any hash indexes you may have after installing this update. </para> </listitem> @@ -5930,14 +5930,14 @@ <listitem> <para> - Prevent signals from interrupting <literal>VACUUM</> at unsafe times + Prevent signals from interrupting <literal>VACUUM</literal> at unsafe times (Alvaro) </para> <para> - This fix prevents a PANIC if a <literal>VACUUM FULL</> is canceled + This fix prevents a PANIC if a <literal>VACUUM FULL</literal> is canceled after it's already committed its tuple movements, as well as transient - errors if a plain <literal>VACUUM</> is interrupted after having + errors if a plain <literal>VACUUM</literal> is interrupted after having truncated the table. </para> </listitem> @@ -5956,14 +5956,14 @@ <listitem> <para> - Fix crash if a <literal>DROP</> is attempted on an internally-dependent + Fix crash if a <literal>DROP</literal> is attempted on an internally-dependent object (Tom) </para> </listitem> <listitem> <para> - Fix very rare crash in <type>inet</>/<type>cidr</> comparisons (Chris + Fix very rare crash in <type>inet</type>/<type>cidr</type> comparisons (Chris Mikkelson) </para> </listitem> @@ -5991,7 +5991,7 @@ <listitem> <para> - Fix memory leak in postmaster when re-parsing <filename>pg_hba.conf</> + Fix memory leak in postmaster when re-parsing <filename>pg_hba.conf</filename> (Tom) </para> </listitem> @@ -6010,8 +6010,8 @@ <listitem> <para> - Make <literal>FOR UPDATE/SHARE</> in the primary query not propagate - into <literal>WITH</> queries (Tom) + Make <literal>FOR UPDATE/SHARE</literal> in the primary query not propagate + into <literal>WITH</literal> queries (Tom) </para> <para> @@ -6019,18 +6019,18 @@ <programlisting> WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE </programlisting> - the <literal>FOR UPDATE</> will now affect <literal>bar</> but not - <literal>foo</>. This is more useful and consistent than the original - 8.4 behavior, which tried to propagate <literal>FOR UPDATE</> into the - <literal>WITH</> query but always failed due to assorted implementation - restrictions. It also follows the design rule that <literal>WITH</> + the <literal>FOR UPDATE</literal> will now affect <literal>bar</literal> but not + <literal>foo</literal>. This is more useful and consistent than the original + 8.4 behavior, which tried to propagate <literal>FOR UPDATE</literal> into the + <literal>WITH</literal> query but always failed due to assorted implementation + restrictions. It also follows the design rule that <literal>WITH</literal> queries are executed as if independent of the main query. </para> </listitem> <listitem> <para> - Fix bug with a <literal>WITH RECURSIVE</> query immediately inside + Fix bug with a <literal>WITH RECURSIVE</literal> query immediately inside another one (Tom) </para> </listitem> @@ -6056,7 +6056,7 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> Fix wrong search results for a multi-column GIN index with - <literal>fastupdate</> enabled (Teodor) + <literal>fastupdate</literal> enabled (Teodor) </para> </listitem> @@ -6066,7 +6066,7 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE </para> <para> - These bugs were masked when <varname>full_page_writes</> was on, but + These bugs were masked when <varname>full_page_writes</varname> was on, but with it off a WAL replay failure was certain if a crash occurred before the next checkpoint. </para> @@ -6104,7 +6104,7 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <para> The previous code is known to fail with the combination of the Linux - <literal>pam_krb5</> PAM module with Microsoft Active Directory as the + <literal>pam_krb5</literal> PAM module with Microsoft Active Directory as the domain controller. It might have problems elsewhere too, since it was making unjustified assumptions about what arguments the PAM stack would pass to it. @@ -6127,7 +6127,7 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> Ensure that domain constraints are enforced in constructs like - <literal>ARRAY[...]::domain</>, where the domain is over an array type + <literal>ARRAY[...]::domain</literal>, where the domain is over an array type (Heikki) </para> </listitem> @@ -6153,7 +6153,7 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Fix <literal>CREATE TABLE</> to properly merge default expressions + Fix <literal>CREATE TABLE</literal> to properly merge default expressions coming from different inheritance parent tables (Tom) </para> @@ -6175,39 +6175,39 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> Fix processing of ownership dependencies during <literal>CREATE OR - REPLACE FUNCTION</> (Tom) + REPLACE FUNCTION</literal> (Tom) </para> </listitem> <listitem> <para> - Fix incorrect handling of <literal>WHERE</> - <replaceable>x</>=<replaceable>x</> conditions (Tom) + Fix incorrect handling of <literal>WHERE</literal> + <replaceable>x</replaceable>=<replaceable>x</replaceable> conditions (Tom) </para> <para> In some cases these could get ignored as redundant, but they aren't - — they're equivalent to <replaceable>x</> <literal>IS NOT NULL</>. + — they're equivalent to <replaceable>x</replaceable> <literal>IS NOT NULL</literal>. </para> </listitem> <listitem> <para> Fix incorrect plan construction when using hash aggregation to implement - <literal>DISTINCT</> for textually identical volatile expressions (Tom) + <literal>DISTINCT</literal> for textually identical volatile expressions (Tom) </para> </listitem> <listitem> <para> - Fix Assert failure for a volatile <literal>SELECT DISTINCT ON</> + Fix Assert failure for a volatile <literal>SELECT DISTINCT ON</literal> expression (Tom) </para> </listitem> <listitem> <para> - Fix <function>ts_stat()</> to not fail on an empty <type>tsvector</> + Fix <function>ts_stat()</function> to not fail on an empty <type>tsvector</type> value (Tom) </para> </listitem> @@ -6220,7 +6220,7 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Fix encoding handling in <type>xml</> binary input (Heikki) + Fix encoding handling in <type>xml</type> binary input (Heikki) </para> <para> @@ -6231,7 +6231,7 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Fix bug with calling <literal>plperl</> from <literal>plperlu</> or vice + Fix bug with calling <literal>plperl</literal> from <literal>plperlu</literal> or vice versa (Tom) </para> @@ -6251,7 +6251,7 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> Ensure that Perl arrays are properly converted to - <productname>PostgreSQL</> arrays when returned by a set-returning + <productname>PostgreSQL</productname> arrays when returned by a set-returning PL/Perl function (Andrew Dunstan, Abhijit Menon-Sen) </para> @@ -6268,43 +6268,43 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Fix <application>ecpg</> problem with comments in <literal>DECLARE - CURSOR</> statements (Michael) + Fix <application>ecpg</application> problem with comments in <literal>DECLARE + CURSOR</literal> statements (Michael) </para> </listitem> <listitem> <para> - Fix <application>ecpg</> to not treat recently-added keywords as + Fix <application>ecpg</application> to not treat recently-added keywords as reserved words (Tom) </para> <para> - This affected the keywords <literal>CALLED</>, <literal>CATALOG</>, - <literal>DEFINER</>, <literal>ENUM</>, <literal>FOLLOWING</>, - <literal>INVOKER</>, <literal>OPTIONS</>, <literal>PARTITION</>, - <literal>PRECEDING</>, <literal>RANGE</>, <literal>SECURITY</>, - <literal>SERVER</>, <literal>UNBOUNDED</>, and <literal>WRAPPER</>. + This affected the keywords <literal>CALLED</literal>, <literal>CATALOG</literal>, + <literal>DEFINER</literal>, <literal>ENUM</literal>, <literal>FOLLOWING</literal>, + <literal>INVOKER</literal>, <literal>OPTIONS</literal>, <literal>PARTITION</literal>, + <literal>PRECEDING</literal>, <literal>RANGE</literal>, <literal>SECURITY</literal>, + <literal>SERVER</literal>, <literal>UNBOUNDED</literal>, and <literal>WRAPPER</literal>. </para> </listitem> <listitem> <para> - Re-allow regular expression special characters in <application>psql</>'s - <literal>\df</> function name parameter (Tom) + Re-allow regular expression special characters in <application>psql</application>'s + <literal>\df</literal> function name parameter (Tom) </para> </listitem> <listitem> <para> - In <filename>contrib/fuzzystrmatch</>, correct the calculation of - <function>levenshtein</> distances with non-default costs (Marcin Mank) + In <filename>contrib/fuzzystrmatch</filename>, correct the calculation of + <function>levenshtein</function> distances with non-default costs (Marcin Mank) </para> </listitem> <listitem> <para> - In <filename>contrib/pg_standby</>, disable triggering failover with a + In <filename>contrib/pg_standby</filename>, disable triggering failover with a signal on Windows (Fujii Masao) </para> @@ -6316,35 +6316,35 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Put <literal>FREEZE</> and <literal>VERBOSE</> options in the right - order in the <literal>VACUUM</> command that - <filename>contrib/vacuumdb</> produces (Heikki) + Put <literal>FREEZE</literal> and <literal>VERBOSE</literal> options in the right + order in the <literal>VACUUM</literal> command that + <filename>contrib/vacuumdb</filename> produces (Heikki) </para> </listitem> <listitem> <para> - Fix possible leak of connections when <filename>contrib/dblink</> + Fix possible leak of connections when <filename>contrib/dblink</filename> encounters an error (Tatsuhito Kasahara) </para> </listitem> <listitem> <para> - Ensure <application>psql</>'s flex module is compiled with the correct + Ensure <application>psql</application>'s flex module is compiled with the correct system header definitions (Tom) </para> <para> This fixes build failures on platforms where - <literal>--enable-largefile</> causes incompatible changes in the + <literal>--enable-largefile</literal> causes incompatible changes in the generated code. </para> </listitem> <listitem> <para> - Make the postmaster ignore any <literal>application_name</> parameter in + Make the postmaster ignore any <literal>application_name</literal> parameter in connection request packets, to improve compatibility with future libpq versions (Tom) </para> @@ -6357,14 +6357,14 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE </para> <para> - This includes adding <literal>IDT</> to the default + This includes adding <literal>IDT</literal> to the default timezone abbreviation set. </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2009s + Update time zone data files to <application>tzdata</application> release 2009s for DST law changes in Antarctica, Argentina, Bangladesh, Fiji, Novokuznetsk, Pakistan, Palestine, Samoa, Syria; also historical corrections for Hong Kong. @@ -6418,7 +6418,7 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Fix <quote>cannot make new WAL entries during recovery</> error (Tom) + Fix <quote>cannot make new WAL entries during recovery</quote> error (Tom) </para> </listitem> @@ -6435,39 +6435,39 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Disallow <command>RESET ROLE</> and <command>RESET SESSION - AUTHORIZATION</> inside security-definer functions (Tom, Heikki) + Disallow <command>RESET ROLE</command> and <command>RESET SESSION + AUTHORIZATION</command> inside security-definer functions (Tom, Heikki) </para> <para> This covers a case that was missed in the previous patch that - disallowed <command>SET ROLE</> and <command>SET SESSION - AUTHORIZATION</> inside security-definer functions. + disallowed <command>SET ROLE</command> and <command>SET SESSION + AUTHORIZATION</command> inside security-definer functions. (See CVE-2007-6600) </para> </listitem> <listitem> <para> - Make <command>LOAD</> of an already-loaded loadable module + Make <command>LOAD</command> of an already-loaded loadable module into a no-op (Tom) </para> <para> - Formerly, <command>LOAD</> would attempt to unload and re-load the + Formerly, <command>LOAD</command> would attempt to unload and re-load the module, but this is unsafe and not all that useful. </para> </listitem> <listitem> <para> - Make window function <literal>PARTITION BY</> and <literal>ORDER BY</> + Make window function <literal>PARTITION BY</literal> and <literal>ORDER BY</literal> items always be interpreted as simple expressions (Tom) </para> <para> In 8.4.0 these lists were parsed following the rules used for - top-level <literal>GROUP BY</> and <literal>ORDER BY</> lists. + top-level <literal>GROUP BY</literal> and <literal>ORDER BY</literal> lists. But this was not correct per the SQL standard, and it led to possible circularity. </para> @@ -6479,8 +6479,8 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE </para> <para> - These led to wrong query results in some cases where <literal>IN</> - or <literal>EXISTS</> was used together with another join. + These led to wrong query results in some cases where <literal>IN</literal> + or <literal>EXISTS</literal> was used together with another join. </para> </listitem> @@ -6492,8 +6492,8 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <para> An example is - <literal>SELECT COUNT(ss.*) FROM ... LEFT JOIN (SELECT ...) ss ON ...</>. - Here, <literal>ss.*</> would be treated as <literal>ROW(NULL,NULL,...)</> + <literal>SELECT COUNT(ss.*) FROM ... LEFT JOIN (SELECT ...) ss ON ...</literal>. + Here, <literal>ss.*</literal> would be treated as <literal>ROW(NULL,NULL,...)</literal> for null-extended join rows, which is not the same as a simple NULL. Now it is treated as a simple NULL. </para> @@ -6506,7 +6506,7 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <para> This bug led to the often-reported <quote>could not reattach - to shared memory</> error message. + to shared memory</quote> error message. </para> </listitem> @@ -6530,36 +6530,36 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Ensure that a <quote>fast shutdown</> request will forcibly terminate - open sessions, even if a <quote>smart shutdown</> was already in progress + Ensure that a <quote>fast shutdown</quote> request will forcibly terminate + open sessions, even if a <quote>smart shutdown</quote> was already in progress (Fujii Masao) </para> </listitem> <listitem> <para> - Avoid memory leak for <function>array_agg()</> in <literal>GROUP BY</> + Avoid memory leak for <function>array_agg()</function> in <literal>GROUP BY</literal> queries (Tom) </para> </listitem> <listitem> <para> - Treat <function>to_char(..., 'TH')</> as an uppercase ordinal - suffix with <literal>'HH'</>/<literal>'HH12'</> (Heikki) + Treat <function>to_char(..., 'TH')</function> as an uppercase ordinal + suffix with <literal>'HH'</literal>/<literal>'HH12'</literal> (Heikki) </para> <para> - It was previously handled as <literal>'th'</> (lowercase). + It was previously handled as <literal>'th'</literal> (lowercase). </para> </listitem> <listitem> <para> Include the fractional part in the result of - <function>EXTRACT(second)</> and - <function>EXTRACT(milliseconds)</> for - <type>time</> and <type>time with time zone</> inputs (Tom) + <function>EXTRACT(second)</function> and + <function>EXTRACT(milliseconds)</function> for + <type>time</type> and <type>time with time zone</type> inputs (Tom) </para> <para> @@ -6570,8 +6570,8 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Fix overflow for <literal>INTERVAL '<replaceable>x</> ms'</literal> - when <replaceable>x</> is more than 2 million and integer + Fix overflow for <literal>INTERVAL '<replaceable>x</replaceable> ms'</literal> + when <replaceable>x</replaceable> is more than 2 million and integer datetimes are in use (Alex Hunsaker) </para> </listitem> @@ -6589,13 +6589,13 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Fix a typo that disabled <varname>commit_delay</> (Jeff Janes) + Fix a typo that disabled <varname>commit_delay</varname> (Jeff Janes) </para> </listitem> <listitem> <para> - Output early-startup messages to <filename>postmaster.log</> if the + Output early-startup messages to <filename>postmaster.log</filename> if the server is started in silent mode (Tom) </para> @@ -6619,33 +6619,33 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Fix <application>pg_ctl</> to not go into an infinite loop if - <filename>postgresql.conf</> is empty (Jeff Davis) + Fix <application>pg_ctl</application> to not go into an infinite loop if + <filename>postgresql.conf</filename> is empty (Jeff Davis) </para> </listitem> <listitem> <para> - Fix several errors in <application>pg_dump</>'s - <literal>--binary-upgrade</> mode (Bruce, Tom) + Fix several errors in <application>pg_dump</application>'s + <literal>--binary-upgrade</literal> mode (Bruce, Tom) </para> <para> - <literal>pg_dump --binary-upgrade</> is used by pg_migrator. + <literal>pg_dump --binary-upgrade</literal> is used by pg_migrator. </para> </listitem> <listitem> <para> - Fix <filename>contrib/xml2</>'s <function>xslt_process()</> to + Fix <filename>contrib/xml2</filename>'s <function>xslt_process()</function> to properly handle the maximum number of parameters (twenty) (Tom) </para> </listitem> <listitem> <para> - Improve robustness of <application>libpq</>'s code to recover - from errors during <command>COPY FROM STDIN</> (Tom) + Improve robustness of <application>libpq</application>'s code to recover + from errors during <command>COPY FROM STDIN</command> (Tom) </para> </listitem> @@ -6658,14 +6658,14 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Work around gcc bug that causes <quote>floating-point exception</> - instead of <quote>division by zero</> on some platforms (Tom) + Work around gcc bug that causes <quote>floating-point exception</quote> + instead of <quote>division by zero</quote> on some platforms (Tom) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2009l + Update time zone data files to <application>tzdata</application> release 2009l for DST law changes in Bangladesh, Egypt, Mauritius. </para> </listitem> @@ -6687,7 +6687,7 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <title>Overview</title> <para> - After many years of development, <productname>PostgreSQL</> has + After many years of development, <productname>PostgreSQL</productname> has become feature-complete in many areas. This release shows a targeted approach to adding features (e.g., authentication, monitoring, space reuse), and adds capabilities defined in the @@ -6742,7 +6742,7 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Improved join performance for <literal>EXISTS</> and <literal>NOT EXISTS</> queries + Improved join performance for <literal>EXISTS</literal> and <literal>NOT EXISTS</literal> queries </para> </listitem> @@ -6825,15 +6825,15 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE </para> <para> - Previously this was selected by <application>configure</>'s - <option>--enable-integer-datetimes</> option. To retain - the old behavior, build with <option>--disable-integer-datetimes</>. + Previously this was selected by <application>configure</application>'s + <option>--enable-integer-datetimes</option> option. To retain + the old behavior, build with <option>--disable-integer-datetimes</option>. </para> </listitem> <listitem> <para> - Remove <application>ipcclean</> utility command (Bruce) + Remove <application>ipcclean</application> utility command (Bruce) </para> <para> @@ -6853,50 +6853,50 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> Change default setting for - <literal>log_min_messages</> to <literal>warning</> (previously - it was <literal>notice</>) to reduce log file volume (Tom) + <literal>log_min_messages</literal> to <literal>warning</literal> (previously + it was <literal>notice</literal>) to reduce log file volume (Tom) </para> </listitem> <listitem> <para> - Change default setting for <literal>max_prepared_transactions</> to + Change default setting for <literal>max_prepared_transactions</literal> to zero (previously it was 5) (Tom) </para> </listitem> <listitem> <para> - Make <literal>debug_print_parse</>, <literal>debug_print_rewritten</>, - and <literal>debug_print_plan</> - output appear at <literal>LOG</> message level, not - <literal>DEBUG1</> as formerly (Tom) + Make <literal>debug_print_parse</literal>, <literal>debug_print_rewritten</literal>, + and <literal>debug_print_plan</literal> + output appear at <literal>LOG</literal> message level, not + <literal>DEBUG1</literal> as formerly (Tom) </para> </listitem> <listitem> <para> - Make <literal>debug_pretty_print</> default to <literal>on</> (Tom) + Make <literal>debug_pretty_print</literal> default to <literal>on</literal> (Tom) </para> </listitem> <listitem> <para> - Remove <varname>explain_pretty_print</> parameter (no longer needed) (Tom) + Remove <varname>explain_pretty_print</varname> parameter (no longer needed) (Tom) </para> </listitem> <listitem> <para> - Make <varname>log_temp_files</> settable by superusers only, like other + Make <varname>log_temp_files</varname> settable by superusers only, like other logging options (Simon Riggs) </para> </listitem> <listitem> <para> - Remove automatic appending of the epoch timestamp when no <literal>%</> - escapes are present in <literal>log_filename</> (Robert Haas) + Remove automatic appending of the epoch timestamp when no <literal>%</literal> + escapes are present in <literal>log_filename</literal> (Robert Haas) </para> <para> @@ -6907,22 +6907,22 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Remove <varname>log_restartpoints</> from <filename>recovery.conf</>; - instead use <varname>log_checkpoints</> (Simon) + Remove <varname>log_restartpoints</varname> from <filename>recovery.conf</filename>; + instead use <varname>log_checkpoints</varname> (Simon) </para> </listitem> <listitem> <para> - Remove <varname>krb_realm</> and <varname>krb_server_hostname</>; - these are now set in <filename>pg_hba.conf</> instead (Magnus) + Remove <varname>krb_realm</varname> and <varname>krb_server_hostname</varname>; + these are now set in <filename>pg_hba.conf</filename> instead (Magnus) </para> </listitem> <listitem> <para> There are also significant changes in <link - linkend="release-8-4-pg-hba-conf"><filename>pg_hba.conf</></link>, + linkend="release-8-4-pg-hba-conf"><filename>pg_hba.conf</filename></link>, as described below. </para> </listitem> @@ -6938,12 +6938,12 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Change <command>TRUNCATE</> and <command>LOCK</> to + Change <command>TRUNCATE</command> and <command>LOCK</command> to apply to child tables of the specified table(s) (Peter) </para> <para> - These commands now accept an <literal>ONLY</> option that prevents + These commands now accept an <literal>ONLY</literal> option that prevents processing child tables; this option must be used if the old behavior is needed. </para> @@ -6951,8 +6951,8 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - <command>SELECT DISTINCT</> and - <literal>UNION</>/<literal>INTERSECT</>/<literal>EXCEPT</> + <command>SELECT DISTINCT</command> and + <literal>UNION</literal>/<literal>INTERSECT</literal>/<literal>EXCEPT</literal> no longer always produce sorted output (Tom) </para> @@ -6961,17 +6961,17 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE by means of Sort/Unique processing (i.e., sort then remove adjacent duplicates). Now they can be implemented by hashing, which will not produce sorted output. If an application relied on the output being - in sorted order, the recommended fix is to add an <literal>ORDER BY</> + in sorted order, the recommended fix is to add an <literal>ORDER BY</literal> clause. As a short-term workaround, the previous behavior can be - restored by disabling <literal>enable_hashagg</>, but that is a very - performance-expensive fix. <literal>SELECT DISTINCT ON</> never uses + restored by disabling <literal>enable_hashagg</literal>, but that is a very + performance-expensive fix. <literal>SELECT DISTINCT ON</literal> never uses hashing, however, so its behavior is unchanged. </para> </listitem> <listitem> <para> - Force child tables to inherit <literal>CHECK</> constraints from parents + Force child tables to inherit <literal>CHECK</literal> constraints from parents (Alex Hunsaker, Nikhil Sontakke, Tom) </para> @@ -6985,14 +6985,14 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Disallow negative <literal>LIMIT</> or <literal>OFFSET</> + Disallow negative <literal>LIMIT</literal> or <literal>OFFSET</literal> values, rather than treating them as zero (Simon) </para> </listitem> <listitem> <para> - Disallow <command>LOCK TABLE</> outside a transaction block + Disallow <command>LOCK TABLE</command> outside a transaction block (Tom) </para> @@ -7004,12 +7004,12 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Sequences now contain an additional <structfield>start_value</> column + Sequences now contain an additional <structfield>start_value</structfield> column (Zoltan Boszormenyi) </para> <para> - This supports <command>ALTER SEQUENCE ... RESTART</>. + This supports <command>ALTER SEQUENCE ... RESTART</command>. </para> </listitem> @@ -7025,14 +7025,14 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Make <type>numeric</> zero raised to a fractional power return - <literal>0</>, rather than throwing an error, and make - <type>numeric</> zero raised to the zero power return <literal>1</>, + Make <type>numeric</type> zero raised to a fractional power return + <literal>0</literal>, rather than throwing an error, and make + <type>numeric</type> zero raised to the zero power return <literal>1</literal>, rather than error (Bruce) </para> <para> - This matches the longstanding <type>float8</> behavior. + This matches the longstanding <type>float8</type> behavior. </para> </listitem> @@ -7042,7 +7042,7 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE </para> <para> - The changed behavior is more <acronym>IEEE</>-standard + The changed behavior is more <acronym>IEEE</acronym>-standard compliant. </para> </listitem> @@ -7050,7 +7050,7 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> Throw an error if an escape character is the last character in - a <literal>LIKE</> pattern (i.e., it has nothing to escape) (Tom) + a <literal>LIKE</literal> pattern (i.e., it has nothing to escape) (Tom) </para> <para> @@ -7061,8 +7061,8 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Remove <literal>~=~</> and <literal>~<>~</> operators - formerly used for <literal>LIKE</> index comparisons (Tom) + Remove <literal>~=~</literal> and <literal>~<>~</literal> operators + formerly used for <literal>LIKE</literal> index comparisons (Tom) </para> <para> @@ -7072,7 +7072,7 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - <function>xpath()</> now passes its arguments to <application>libxml</> + <function>xpath()</function> now passes its arguments to <application>libxml</application> without any changes (Andrew) </para> @@ -7085,7 +7085,7 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Make <function>xmlelement()</> format attribute values just like + Make <function>xmlelement()</function> format attribute values just like content values (Peter) </para> @@ -7098,13 +7098,13 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Rewrite memory management for <application>libxml</>-using functions + Rewrite memory management for <application>libxml</application>-using functions (Tom) </para> <para> This change should avoid some compatibility problems with use of - <application>libxml</> in PL/Perl and other add-on code. + <application>libxml</application> in PL/Perl and other add-on code. </para> </listitem> @@ -7129,8 +7129,8 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - <varname>DateStyle</> no longer controls <type>interval</> output - formatting; instead there is a new variable <varname>IntervalStyle</> + <varname>DateStyle</varname> no longer controls <type>interval</type> output + formatting; instead there is a new variable <varname>IntervalStyle</varname> (Ron Mayer) </para> </listitem> @@ -7138,7 +7138,7 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> Improve consistency of handling of fractional seconds in - <type>timestamp</> and <type>interval</> output (Ron Mayer) + <type>timestamp</type> and <type>interval</type> output (Ron Mayer) </para> <para> @@ -7149,15 +7149,15 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Make <function>to_char()</>'s localized month/day names depend - on <varname>LC_TIME</>, not <varname>LC_MESSAGES</> (Euler + Make <function>to_char()</function>'s localized month/day names depend + on <varname>LC_TIME</varname>, not <varname>LC_MESSAGES</varname> (Euler Taveira de Oliveira) </para> </listitem> <listitem> <para> - Cause <function>to_date()</> and <function>to_timestamp()</> + Cause <function>to_date()</function> and <function>to_timestamp()</function> to more consistently report errors for invalid input (Brendan Jurd) </para> @@ -7171,15 +7171,15 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Fix <function>to_timestamp()</> to not require upper/lower case - matching for meridian (<literal>AM</>/<literal>PM</>) and era - (<literal>BC</>/<literal>AD</>) format designations (Brendan + Fix <function>to_timestamp()</function> to not require upper/lower case + matching for meridian (<literal>AM</literal>/<literal>PM</literal>) and era + (<literal>BC</literal>/<literal>AD</literal>) format designations (Brendan Jurd) </para> <para> - For example, input value <literal>ad</> now matches the format - string <literal>AD</>. + For example, input value <literal>ad</literal> now matches the format + string <literal>AD</literal>. </para> </listitem> @@ -7217,8 +7217,8 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Allow <command>SELECT DISTINCT</> and - <literal>UNION</>/<literal>INTERSECT</>/<literal>EXCEPT</> to + Allow <command>SELECT DISTINCT</command> and + <literal>UNION</literal>/<literal>INTERSECT</literal>/<literal>EXCEPT</literal> to use hashing (Tom) </para> @@ -7235,12 +7235,12 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <para> This work formalizes our previous ad-hoc treatment of <literal>IN - (SELECT ...)</> clauses, and extends it to <literal>EXISTS</> and - <literal>NOT EXISTS</> clauses. It should result in significantly - better planning of <literal>EXISTS</> and <literal>NOT EXISTS</> - queries. In general, logically equivalent <literal>IN</> and - <literal>EXISTS</> clauses should now have similar performance, - whereas previously <literal>IN</> often won. + (SELECT ...)</literal> clauses, and extends it to <literal>EXISTS</literal> and + <literal>NOT EXISTS</literal> clauses. It should result in significantly + better planning of <literal>EXISTS</literal> and <literal>NOT EXISTS</literal> + queries. In general, logically equivalent <literal>IN</literal> and + <literal>EXISTS</literal> clauses should now have similar performance, + whereas previously <literal>IN</literal> often won. </para> </listitem> @@ -7258,7 +7258,7 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Improve the performance of <function>text_position()</> and + Improve the performance of <function>text_position()</function> and related functions by using Boyer-Moore-Horspool searching (David Rowley) </para> @@ -7283,26 +7283,26 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Increase the default value of <varname>default_statistics_target</> - from <literal>10</> to <literal>100</> (Greg Sabino Mullane, + Increase the default value of <varname>default_statistics_target</varname> + from <literal>10</literal> to <literal>100</literal> (Greg Sabino Mullane, Tom) </para> <para> - The maximum value was also increased from <literal>1000</> to - <literal>10000</>. + The maximum value was also increased from <literal>1000</literal> to + <literal>10000</literal>. </para> </listitem> <listitem> <para> - Perform <varname>constraint_exclusion</> checking by default - in queries involving inheritance or <literal>UNION ALL</> (Tom) + Perform <varname>constraint_exclusion</varname> checking by default + in queries involving inheritance or <literal>UNION ALL</literal> (Tom) </para> <para> - A new <varname>constraint_exclusion</> setting, - <literal>partition</>, was added to specify this behavior. + A new <varname>constraint_exclusion</varname> setting, + <literal>partition</literal>, was added to specify this behavior. </para> </listitem> @@ -7313,15 +7313,15 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <para> The amount of read-ahead is controlled by - <varname>effective_io_concurrency</>. This feature is available only - if the kernel has <function>posix_fadvise()</> support. + <varname>effective_io_concurrency</varname>. This feature is available only + if the kernel has <function>posix_fadvise()</function> support. </para> </listitem> <listitem> <para> - Inline simple set-returning <acronym>SQL</> functions in - <literal>FROM</> clauses (Richard Rowell) + Inline simple set-returning <acronym>SQL</acronym> functions in + <literal>FROM</literal> clauses (Richard Rowell) </para> </listitem> @@ -7336,7 +7336,7 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> Reduce volume of temporary data in multi-batch hash joins - by suppressing <quote>physical tlist</> optimization (Michael + by suppressing <quote>physical tlist</quote> optimization (Michael Henderson, Ramon Lawrence) </para> </listitem> @@ -7344,7 +7344,7 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> Avoid waiting for idle-in-transaction sessions during - <command>CREATE INDEX CONCURRENTLY</> (Simon) + <command>CREATE INDEX CONCURRENTLY</command> (Simon) </para> </listitem> @@ -7368,15 +7368,15 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Convert many <filename>postgresql.conf</> settings to enumerated - values so that <literal>pg_settings</> can display the valid + Convert many <filename>postgresql.conf</filename> settings to enumerated + values so that <literal>pg_settings</literal> can display the valid values (Magnus) </para> </listitem> <listitem> <para> - Add <varname>cursor_tuple_fraction</> parameter to control the + Add <varname>cursor_tuple_fraction</varname> parameter to control the fraction of a cursor's rows that the planner assumes will be fetched (Robert Hell) </para> @@ -7385,7 +7385,7 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> Allow underscores in the names of custom variable - classes in <filename>postgresql.conf</> (Tom) + classes in <filename>postgresql.conf</filename> (Tom) </para> </listitem> @@ -7399,12 +7399,12 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Remove support for the (insecure) <literal>crypt</> authentication method + Remove support for the (insecure) <literal>crypt</literal> authentication method (Magnus) </para> <para> - This effectively obsoletes pre-<productname>PostgreSQL</> 7.2 client + This effectively obsoletes pre-<productname>PostgreSQL</productname> 7.2 client libraries, as there is no longer any non-plaintext password method that they can use. </para> @@ -7412,21 +7412,21 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Support regular expressions in <filename>pg_ident.conf</> + Support regular expressions in <filename>pg_ident.conf</filename> (Magnus) </para> </listitem> <listitem> <para> - Allow <productname>Kerberos</>/<acronym>GSSAPI</> parameters + Allow <productname>Kerberos</productname>/<acronym>GSSAPI</acronym> parameters to be changed without restarting the postmaster (Magnus) </para> </listitem> <listitem> <para> - Support <acronym>SSL</> certificate chains in server certificate + Support <acronym>SSL</acronym> certificate chains in server certificate file (Andrew Gierth) </para> @@ -7440,8 +7440,8 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Report appropriate error message for combination of <literal>MD5</> - authentication and <varname>db_user_namespace</> enabled (Bruce) + Report appropriate error message for combination of <literal>MD5</literal> + authentication and <varname>db_user_namespace</varname> enabled (Bruce) </para> </listitem> </itemizedlist> @@ -7449,26 +7449,26 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE </sect4> <sect4 id="release-8-4-pg-hba-conf"> - <title><filename>pg_hba.conf</></title> + <title><filename>pg_hba.conf</filename></title> <itemizedlist> <listitem> <para> - Change all authentication options to use <literal>name=value</> + Change all authentication options to use <literal>name=value</literal> syntax (Magnus) </para> <para> - This makes incompatible changes to the <literal>ldap</>, - <literal>pam</> and <literal>ident</> authentication methods. All - <filename>pg_hba.conf</> entries with these methods need to be + This makes incompatible changes to the <literal>ldap</literal>, + <literal>pam</literal> and <literal>ident</literal> authentication methods. All + <filename>pg_hba.conf</filename> entries with these methods need to be rewritten using the new format. </para> </listitem> <listitem> <para> - Remove the <literal>ident sameuser</> option, instead making that + Remove the <literal>ident sameuser</literal> option, instead making that behavior the default if no usermap is specified (Magnus) </para> </listitem> @@ -7480,14 +7480,14 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE </para> <para> - Previously a usermap was only supported for <literal>ident</> + Previously a usermap was only supported for <literal>ident</literal> authentication. </para> </listitem> <listitem> <para> - Add <literal>clientcert</> option to control requesting of a + Add <literal>clientcert</literal> option to control requesting of a client certificate (Magnus) </para> @@ -7499,13 +7499,13 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Add <literal>cert</> authentication method to allow - <emphasis>user</> authentication via <acronym>SSL</> certificates + Add <literal>cert</literal> authentication method to allow + <emphasis>user</emphasis> authentication via <acronym>SSL</acronym> certificates (Magnus) </para> <para> - Previously <acronym>SSL</> certificates could only verify that + Previously <acronym>SSL</acronym> certificates could only verify that the client had access to a certificate, not authenticate a user. </para> @@ -7513,20 +7513,20 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Allow <literal>krb5</>, <literal>gssapi</> and <literal>sspi</> - realm and <literal>krb5</> host settings to be specified in - <filename>pg_hba.conf</> (Magnus) + Allow <literal>krb5</literal>, <literal>gssapi</literal> and <literal>sspi</literal> + realm and <literal>krb5</literal> host settings to be specified in + <filename>pg_hba.conf</filename> (Magnus) </para> <para> - These override the settings in <filename>postgresql.conf</>. + These override the settings in <filename>postgresql.conf</filename>. </para> </listitem> <listitem> <para> - Add <varname>include_realm</> parameter for <literal>krb5</>, - <literal>gssapi</>, and <literal>sspi</> methods (Magnus) + Add <varname>include_realm</varname> parameter for <literal>krb5</literal>, + <literal>gssapi</literal>, and <literal>sspi</literal> methods (Magnus) </para> <para> @@ -7537,7 +7537,7 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Parse <filename>pg_hba.conf</> fully when it is loaded, + Parse <filename>pg_hba.conf</filename> fully when it is loaded, so that errors are reported immediately (Magnus) </para> @@ -7552,15 +7552,15 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Show all parsing errors in <filename>pg_hba.conf</> instead of + Show all parsing errors in <filename>pg_hba.conf</filename> instead of aborting after the first one (Selena Deckelmann) </para> </listitem> <listitem> <para> - Support <literal>ident</> authentication over Unix-domain sockets - on <productname>Solaris</> (Garick Hamlin) + Support <literal>ident</literal> authentication over Unix-domain sockets + on <productname>Solaris</productname> (Garick Hamlin) </para> </listitem> @@ -7574,7 +7574,7 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Provide an option to <function>pg_start_backup()</> to force its + Provide an option to <function>pg_start_backup()</function> to force its implied checkpoint to finish as quickly as possible (Tom) </para> @@ -7586,13 +7586,13 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Make <function>pg_stop_backup()</> wait for modified <acronym>WAL</> + Make <function>pg_stop_backup()</function> wait for modified <acronym>WAL</acronym> files to be archived (Simon) </para> <para> This guarantees that the backup is valid at the time - <function>pg_stop_backup()</> completes. + <function>pg_stop_backup()</function> completes. </para> </listitem> @@ -7606,22 +7606,22 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Delay <quote>smart</> shutdown while a continuous archiving base backup + Delay <quote>smart</quote> shutdown while a continuous archiving base backup is in progress (Laurenz Albe) </para> </listitem> <listitem> <para> - Cancel a continuous archiving base backup if <quote>fast</> shutdown + Cancel a continuous archiving base backup if <quote>fast</quote> shutdown is requested (Laurenz Albe) </para> </listitem> <listitem> <para> - Allow <filename>recovery.conf</> boolean variables to take the - same range of string values as <filename>postgresql.conf</> + Allow <filename>recovery.conf</filename> boolean variables to take the + same range of string values as <filename>postgresql.conf</filename> boolean variables (Bruce) </para> @@ -7637,20 +7637,20 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Add <function>pg_conf_load_time()</> to report when - the <productname>PostgreSQL</> configuration files were last loaded + Add <function>pg_conf_load_time()</function> to report when + the <productname>PostgreSQL</productname> configuration files were last loaded (George Gensure) </para> </listitem> <listitem> <para> - Add <function>pg_terminate_backend()</> to safely terminate a - backend (the <literal>SIGTERM</> signal works also) (Tom, Bruce) + Add <function>pg_terminate_backend()</function> to safely terminate a + backend (the <literal>SIGTERM</literal> signal works also) (Tom, Bruce) </para> <para> - While it's always been possible to <literal>SIGTERM</> a single + While it's always been possible to <literal>SIGTERM</literal> a single backend, this was previously considered unsupported; and testing of the case found some bugs that are now fixed. </para> @@ -7664,30 +7664,30 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <para> Function statistics appear in a new system view, - <literal>pg_stat_user_functions</>. Tracking is controlled - by the new parameter <varname>track_functions</>. + <literal>pg_stat_user_functions</literal>. Tracking is controlled + by the new parameter <varname>track_functions</varname>. </para> </listitem> <listitem> <para> Allow specification of the maximum query string size in - <literal>pg_stat_activity</> via new - <varname>track_activity_query_size</> parameter (Thomas Lee) + <literal>pg_stat_activity</literal> via new + <varname>track_activity_query_size</varname> parameter (Thomas Lee) </para> </listitem> <listitem> <para> - Increase the maximum line length sent to <application>syslog</>, in + Increase the maximum line length sent to <application>syslog</application>, in hopes of improving performance (Tom) </para> </listitem> <listitem> <para> - Add read-only configuration variables <varname>segment_size</>, - <varname>wal_block_size</>, and <varname>wal_segment_size</> + Add read-only configuration variables <varname>segment_size</varname>, + <varname>wal_block_size</varname>, and <varname>wal_segment_size</varname> (Bernd Helmle) </para> </listitem> @@ -7701,7 +7701,7 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Add <function>pg_stat_get_activity(pid)</> function to return + Add <function>pg_stat_get_activity(pid)</function> function to return information about a specific process id (Magnus) </para> </listitem> @@ -7709,14 +7709,14 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> Allow the location of the server's statistics file to be specified - via <varname>stats_temp_directory</> (Magnus) + via <varname>stats_temp_directory</varname> (Magnus) </para> <para> This allows the statistics file to be placed in a - <acronym>RAM</>-resident directory to reduce I/O requirements. + <acronym>RAM</acronym>-resident directory to reduce I/O requirements. On startup/shutdown, the file is copied to its traditional location - (<literal>$PGDATA/global/</>) so it is preserved across restarts. + (<literal>$PGDATA/global/</literal>) so it is preserved across restarts. </para> </listitem> @@ -7732,45 +7732,45 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Add support for <literal>WINDOW</> functions (Hitoshi Harada) + Add support for <literal>WINDOW</literal> functions (Hitoshi Harada) </para> </listitem> <listitem> <para> - Add support for <literal>WITH</> clauses (CTEs), including <literal>WITH - RECURSIVE</> (Yoshiyuki Asaba, Tatsuo Ishii, Tom) + Add support for <literal>WITH</literal> clauses (CTEs), including <literal>WITH + RECURSIVE</literal> (Yoshiyuki Asaba, Tatsuo Ishii, Tom) </para> </listitem> <listitem> <para> - Add <command>TABLE</> command (Peter) + Add <command>TABLE</command> command (Peter) </para> <para> - <literal>TABLE tablename</> is a SQL standard short-hand for - <literal>SELECT * FROM tablename</>. + <literal>TABLE tablename</literal> is a SQL standard short-hand for + <literal>SELECT * FROM tablename</literal>. </para> </listitem> <listitem> <para> - Allow <literal>AS</> to be optional when specifying a - <command>SELECT</> (or <literal>RETURNING</>) column output + Allow <literal>AS</literal> to be optional when specifying a + <command>SELECT</command> (or <literal>RETURNING</literal>) column output label (Hiroshi Saito) </para> <para> This works so long as the column label is not any - <productname>PostgreSQL</> keyword; otherwise <literal>AS</> is still + <productname>PostgreSQL</productname> keyword; otherwise <literal>AS</literal> is still needed. </para> </listitem> <listitem> <para> - Support set-returning functions in <command>SELECT</> result lists + Support set-returning functions in <command>SELECT</command> result lists even for functions that return their result via a tuplestore (Tom) </para> @@ -7789,22 +7789,22 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Allow <command>SELECT FOR UPDATE</>/<literal>SHARE</> to work + Allow <command>SELECT FOR UPDATE</command>/<literal>SHARE</literal> to work on inheritance trees (Tom) </para> </listitem> <listitem> <para> - Add infrastructure for <acronym>SQL/MED</> (Martin Pihlak, + Add infrastructure for <acronym>SQL/MED</acronym> (Martin Pihlak, Peter) </para> <para> - There are no remote or external <acronym>SQL/MED</> capabilities + There are no remote or external <acronym>SQL/MED</acronym> capabilities yet, but this change provides a standardized and future-proof system for managing connection information for modules like - <filename>dblink</> and <filename>plproxy</>. + <filename>dblink</filename> and <filename>plproxy</filename>. </para> </listitem> @@ -7827,7 +7827,7 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <para> This allows constructs such as - <literal>row(1, 1.1) = any (array[row(7, 7.7), row(1, 1.0)])</>. + <literal>row(1, 1.1) = any (array[row(7, 7.7), row(1, 1.0)])</literal>. This is particularly useful in recursive queries. </para> </listitem> @@ -7835,14 +7835,14 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> Add support for Unicode string literal and identifier specifications - using code points, e.g. <literal>U&'d\0061t\+000061'</> + using code points, e.g. <literal>U&'d\0061t\+000061'</literal> (Peter) </para> </listitem> <listitem> <para> - Reject <literal>\000</> in string literals and <command>COPY</> data + Reject <literal>\000</literal> in string literals and <command>COPY</command> data (Tom) </para> @@ -7866,37 +7866,37 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE </itemizedlist> <sect4> - <title><command>TRUNCATE</></title> + <title><command>TRUNCATE</command></title> <itemizedlist> <listitem> <para> - Support statement-level <literal>ON TRUNCATE</> triggers (Simon) + Support statement-level <literal>ON TRUNCATE</literal> triggers (Simon) </para> </listitem> <listitem> <para> - Add <literal>RESTART</>/<literal>CONTINUE IDENTITY</> options - for <command>TRUNCATE TABLE</> + Add <literal>RESTART</literal>/<literal>CONTINUE IDENTITY</literal> options + for <command>TRUNCATE TABLE</command> (Zoltan Boszormenyi) </para> <para> The start value of a sequence can be changed by <command>ALTER - SEQUENCE START WITH</>. + SEQUENCE START WITH</command>. </para> </listitem> <listitem> <para> - Allow <command>TRUNCATE tab1, tab1</> to succeed (Bruce) + Allow <command>TRUNCATE tab1, tab1</command> to succeed (Bruce) </para> </listitem> <listitem> <para> - Add a separate <command>TRUNCATE</> permission (Robert Haas) + Add a separate <command>TRUNCATE</command> permission (Robert Haas) </para> </listitem> @@ -7905,38 +7905,38 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE </sect4> <sect4> - <title><command>EXPLAIN</></title> + <title><command>EXPLAIN</command></title> <itemizedlist> <listitem> <para> - Make <command>EXPLAIN VERBOSE</> show the output columns of each + Make <command>EXPLAIN VERBOSE</command> show the output columns of each plan node (Tom) </para> <para> - Previously <command>EXPLAIN VERBOSE</> output an internal + Previously <command>EXPLAIN VERBOSE</command> output an internal representation of the query plan. (That behavior is now - available via <varname>debug_print_plan</>.) + available via <varname>debug_print_plan</varname>.) </para> </listitem> <listitem> <para> - Make <command>EXPLAIN</> identify subplans and initplans with + Make <command>EXPLAIN</command> identify subplans and initplans with individual labels (Tom) </para> </listitem> <listitem> <para> - Make <command>EXPLAIN</> honor <varname>debug_print_plan</> (Tom) + Make <command>EXPLAIN</command> honor <varname>debug_print_plan</varname> (Tom) </para> </listitem> <listitem> <para> - Allow <command>EXPLAIN</> on <command>CREATE TABLE AS</> (Peter) + Allow <command>EXPLAIN</command> on <command>CREATE TABLE AS</command> (Peter) </para> </listitem> @@ -7945,25 +7945,25 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE </sect4> <sect4> - <title><literal>LIMIT</>/<literal>OFFSET</></title> + <title><literal>LIMIT</literal>/<literal>OFFSET</literal></title> <itemizedlist> <listitem> <para> - Allow sub-selects in <literal>LIMIT</> and <literal>OFFSET</> (Tom) + Allow sub-selects in <literal>LIMIT</literal> and <literal>OFFSET</literal> (Tom) </para> </listitem> <listitem> <para> - Add <acronym>SQL</>-standard syntax for - <literal>LIMIT</>/<literal>OFFSET</> capabilities (Peter) + Add <acronym>SQL</acronym>-standard syntax for + <literal>LIMIT</literal>/<literal>OFFSET</literal> capabilities (Peter) </para> <para> To wit, <literal>OFFSET num {ROW|ROWS} FETCH {FIRST|NEXT} [num] {ROW|ROWS} - ONLY</>. + ONLY</literal>. </para> </listitem> @@ -7986,20 +7986,20 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Refactor multi-object <command>DROP</> operations to reduce the - need for <literal>CASCADE</> (Alex Hunsaker) + Refactor multi-object <command>DROP</command> operations to reduce the + need for <literal>CASCADE</literal> (Alex Hunsaker) </para> <para> - For example, if table <literal>B</> has a dependency on table - <literal>A</>, the command <literal>DROP TABLE A, B</> no longer - requires the <literal>CASCADE</> option. + For example, if table <literal>B</literal> has a dependency on table + <literal>A</literal>, the command <literal>DROP TABLE A, B</literal> no longer + requires the <literal>CASCADE</literal> option. </para> </listitem> <listitem> <para> - Fix various problems with concurrent <command>DROP</> commands + Fix various problems with concurrent <command>DROP</command> commands by ensuring that locks are taken before we begin to drop dependencies of an object (Tom) </para> @@ -8007,15 +8007,15 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Improve reporting of dependencies during <command>DROP</> + Improve reporting of dependencies during <command>DROP</command> commands (Tom) </para> </listitem> <listitem> <para> - Add <literal>WITH [NO] DATA</> clause to <command>CREATE TABLE - AS</>, per the <acronym>SQL</> standard (Peter, Tom) + Add <literal>WITH [NO] DATA</literal> clause to <command>CREATE TABLE + AS</command>, per the <acronym>SQL</acronym> standard (Peter, Tom) </para> </listitem> @@ -8027,14 +8027,14 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Allow <command>CREATE AGGREGATE</> to use an <type>internal</> + Allow <command>CREATE AGGREGATE</command> to use an <type>internal</type> transition datatype (Tom) </para> </listitem> <listitem> <para> - Add <literal>LIKE</> clause to <command>CREATE TYPE</> (Tom) + Add <literal>LIKE</literal> clause to <command>CREATE TYPE</command> (Tom) </para> <para> @@ -8045,7 +8045,7 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Allow specification of the type category and <quote>preferred</> + Allow specification of the type category and <quote>preferred</quote> status for user-defined base types (Tom) </para> @@ -8057,7 +8057,7 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Allow <command>CREATE OR REPLACE VIEW</> to add columns to the + Allow <command>CREATE OR REPLACE VIEW</command> to add columns to the end of a view (Robert Haas) </para> </listitem> @@ -8065,25 +8065,25 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE </itemizedlist> <sect4> - <title><command>ALTER</></title> + <title><command>ALTER</command></title> <itemizedlist> <listitem> <para> - Add <command>ALTER TYPE RENAME</> (Petr Jelinek) + Add <command>ALTER TYPE RENAME</command> (Petr Jelinek) </para> </listitem> <listitem> <para> - Add <command>ALTER SEQUENCE ... RESTART</> (with no parameter) to + Add <command>ALTER SEQUENCE ... RESTART</command> (with no parameter) to reset a sequence to its initial value (Zoltan Boszormenyi) </para> </listitem> <listitem> <para> - Modify the <command>ALTER TABLE</> syntax to allow all reasonable + Modify the <command>ALTER TABLE</command> syntax to allow all reasonable combinations for tables, indexes, sequences, and views (Tom) </para> @@ -8093,28 +8093,28 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <itemizedlist> <listitem> <para> - <command>ALTER SEQUENCE OWNER TO</> + <command>ALTER SEQUENCE OWNER TO</command> </para> </listitem> <listitem> <para> - <command>ALTER VIEW ALTER COLUMN SET/DROP DEFAULT</> + <command>ALTER VIEW ALTER COLUMN SET/DROP DEFAULT</command> </para> </listitem> <listitem> <para> - <command>ALTER VIEW OWNER TO</> + <command>ALTER VIEW OWNER TO</command> </para> </listitem> <listitem> <para> - <command>ALTER VIEW SET SCHEMA</> + <command>ALTER VIEW SET SCHEMA</command> </para> </listitem> </itemizedlist> There is no actual new functionality here, but formerly - you had to say <command>ALTER TABLE</> to do these things, + you had to say <command>ALTER TABLE</command> to do these things, which was confusing. </para> </listitem> @@ -8122,24 +8122,24 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> Add support for the syntax <command>ALTER TABLE ... ALTER COLUMN - ... SET DATA TYPE</> (Peter) + ... SET DATA TYPE</command> (Peter) </para> <para> - This is <acronym>SQL</>-standard syntax for functionality that + This is <acronym>SQL</acronym>-standard syntax for functionality that was already supported. </para> </listitem> <listitem> <para> - Make <command>ALTER TABLE SET WITHOUT OIDS</> rewrite the table - to physically remove <type>OID</> values (Tom) + Make <command>ALTER TABLE SET WITHOUT OIDS</command> rewrite the table + to physically remove <type>OID</type> values (Tom) </para> <para> - Also, add <command>ALTER TABLE SET WITH OIDS</> to rewrite the - table to add <type>OID</>s. + Also, add <command>ALTER TABLE SET WITH OIDS</command> to rewrite the + table to add <type>OID</type>s. </para> </listitem> @@ -8154,7 +8154,7 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> Improve reporting of - <command>CREATE</>/<command>DROP</>/<command>RENAME DATABASE</> + <command>CREATE</command>/<command>DROP</command>/<command>RENAME DATABASE</command> failure when uncommitted prepared transactions are the cause (Tom) </para> @@ -8162,7 +8162,7 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Make <varname>LC_COLLATE</> and <varname>LC_CTYPE</> into + Make <varname>LC_COLLATE</varname> and <varname>LC_CTYPE</varname> into per-database settings (Radek Strnad, Heikki) </para> @@ -8175,20 +8175,20 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> Improve checks that the database encoding, collation - (<varname>LC_COLLATE</>), and character classes - (<varname>LC_CTYPE</>) match (Heikki, Tom) + (<varname>LC_COLLATE</varname>), and character classes + (<varname>LC_CTYPE</varname>) match (Heikki, Tom) </para> <para> Note in particular that a new database's encoding and locale - settings can be changed only when copying from <literal>template0</>. + settings can be changed only when copying from <literal>template0</literal>. This prevents possibly copying data that doesn't match the settings. </para> </listitem> <listitem> <para> - Add <command>ALTER DATABASE SET TABLESPACE</> to move a database + Add <command>ALTER DATABASE SET TABLESPACE</command> to move a database to a new tablespace (Guillaume Lelarge, Bernd Helmle) </para> </listitem> @@ -8206,8 +8206,8 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Add a <literal>VERBOSE</> option to the <command>CLUSTER</> command and - <application>clusterdb</> (Jim Cox) + Add a <literal>VERBOSE</literal> option to the <command>CLUSTER</command> command and + <application>clusterdb</application> (Jim Cox) </para> </listitem> @@ -8261,8 +8261,8 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - <literal>xxx_pattern_ops</> indexes can now be used for simple - equality comparisons, not only for <literal>LIKE</> (Tom) + <literal>xxx_pattern_ops</literal> indexes can now be used for simple + equality comparisons, not only for <literal>LIKE</literal> (Tom) </para> </listitem> @@ -8276,19 +8276,19 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Remove the requirement to use <literal>@@@</> when doing - <acronym>GIN</> weighted lookups on full text indexes (Tom, Teodor) + Remove the requirement to use <literal>@@@</literal> when doing + <acronym>GIN</acronym> weighted lookups on full text indexes (Tom, Teodor) </para> <para> - The normal <literal>@@</> text search operator can be used + The normal <literal>@@</literal> text search operator can be used instead. </para> </listitem> <listitem> <para> - Add an optimizer selectivity function for <literal>@@</> text + Add an optimizer selectivity function for <literal>@@</literal> text search operations (Jan Urbanski) </para> </listitem> @@ -8302,7 +8302,7 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Support multi-column <acronym>GIN</> indexes (Teodor Sigaev) + Support multi-column <acronym>GIN</acronym> indexes (Teodor Sigaev) </para> </listitem> @@ -8317,18 +8317,18 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE </sect4> <sect4> - <title><command>VACUUM</></title> + <title><command>VACUUM</command></title> <itemizedlist> <listitem> <para> - Track free space in separate per-relation <quote>fork</> files (Heikki) + Track free space in separate per-relation <quote>fork</quote> files (Heikki) </para> <para> - Free space discovered by <command>VACUUM</> is now recorded in - <filename>*_fsm</> files, rather than in a fixed-sized shared memory - area. The <varname>max_fsm_pages</> and <varname>max_fsm_relations</> + Free space discovered by <command>VACUUM</command> is now recorded in + <filename>*_fsm</filename> files, rather than in a fixed-sized shared memory + area. The <varname>max_fsm_pages</varname> and <varname>max_fsm_relations</varname> settings have been removed, greatly simplifying administration of free space management. </para> @@ -8341,16 +8341,16 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE </para> <para> - This allows <command>VACUUM</> to avoid scanning all of + This allows <command>VACUUM</command> to avoid scanning all of a table when only a portion of the table needs vacuuming. - The visibility map is stored in per-relation <quote>fork</> files. + The visibility map is stored in per-relation <quote>fork</quote> files. </para> </listitem> <listitem> <para> - Add <varname>vacuum_freeze_table_age</> parameter to control - when <command>VACUUM</> should ignore the visibility map and + Add <varname>vacuum_freeze_table_age</varname> parameter to control + when <command>VACUUM</command> should ignore the visibility map and do a full table scan to freeze tuples (Heikki) </para> </listitem> @@ -8361,15 +8361,15 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE </para> <para> - This improves <command>VACUUM</>'s ability to reclaim space + This improves <command>VACUUM</command>'s ability to reclaim space in the presence of long-running transactions. </para> </listitem> <listitem> <para> - Add ability to specify per-relation autovacuum and <acronym>TOAST</> - parameters in <command>CREATE TABLE</> (Alvaro, Euler Taveira de + Add ability to specify per-relation autovacuum and <acronym>TOAST</acronym> + parameters in <command>CREATE TABLE</command> (Alvaro, Euler Taveira de Oliveira) </para> @@ -8380,7 +8380,7 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Add <literal>--freeze</> option to <application>vacuumdb</> + Add <literal>--freeze</literal> option to <application>vacuumdb</application> (Bruce) </para> </listitem> @@ -8397,20 +8397,20 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Add a <literal>CaseSensitive</> option for text search synonym + Add a <literal>CaseSensitive</literal> option for text search synonym dictionaries (Simon) </para> </listitem> <listitem> <para> - Improve the precision of <type>NUMERIC</> division (Tom) + Improve the precision of <type>NUMERIC</type> division (Tom) </para> </listitem> <listitem> <para> - Add basic arithmetic operators for <type>int2</> with <type>int8</> + Add basic arithmetic operators for <type>int2</type> with <type>int8</type> (Tom) </para> @@ -8421,22 +8421,22 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Allow <type>UUID</> input to accept an optional hyphen after + Allow <type>UUID</type> input to accept an optional hyphen after every fourth digit (Robert Haas) </para> </listitem> <listitem> <para> - Allow <literal>on</>/<literal>off</> as input for the boolean data type + Allow <literal>on</literal>/<literal>off</literal> as input for the boolean data type (Itagaki Takahiro) </para> </listitem> <listitem> <para> - Allow spaces around <literal>NaN</> in the input string for - type <type>numeric</> (Sam Mason) + Allow spaces around <literal>NaN</literal> in the input string for + type <type>numeric</type> (Sam Mason) </para> </listitem> @@ -8448,53 +8448,53 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Reject year <literal>0 BC</> and years <literal>000</> and - <literal>0000</> (Tom) + Reject year <literal>0 BC</literal> and years <literal>000</literal> and + <literal>0000</literal> (Tom) </para> <para> - Previously these were interpreted as <literal>1 BC</>. - (Note: years <literal>0</> and <literal>00</> are still assumed to be + Previously these were interpreted as <literal>1 BC</literal>. + (Note: years <literal>0</literal> and <literal>00</literal> are still assumed to be the year 2000.) </para> </listitem> <listitem> <para> - Include <literal>SGT</> (Singapore time) in the default list of + Include <literal>SGT</literal> (Singapore time) in the default list of known time zone abbreviations (Tom) </para> </listitem> <listitem> <para> - Support <literal>infinity</> and <literal>-infinity</> as - values of type <type>date</> (Tom) + Support <literal>infinity</literal> and <literal>-infinity</literal> as + values of type <type>date</type> (Tom) </para> </listitem> <listitem> <para> - Make parsing of <type>interval</> literals more standard-compliant + Make parsing of <type>interval</type> literals more standard-compliant (Tom, Ron Mayer) </para> <para> - For example, <literal>INTERVAL '1' YEAR</> now does what it's + For example, <literal>INTERVAL '1' YEAR</literal> now does what it's supposed to. </para> </listitem> <listitem> <para> - Allow <type>interval</> fractional-seconds precision to be specified - after the <literal>second</> keyword, for <acronym>SQL</> standard + Allow <type>interval</type> fractional-seconds precision to be specified + after the <literal>second</literal> keyword, for <acronym>SQL</acronym> standard compliance (Tom) </para> <para> Formerly the precision had to be specified after the keyword - <type>interval</>. (For backwards compatibility, this syntax is still + <type>interval</type>. (For backwards compatibility, this syntax is still supported, though deprecated.) Data type definitions will now be output using the standard format. </para> @@ -8502,26 +8502,26 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Support the <acronym>IS0 8601</> <type>interval</> syntax (Ron + Support the <acronym>IS0 8601</acronym> <type>interval</type> syntax (Ron Mayer, Kevin Grittner) </para> <para> - For example, <literal>INTERVAL 'P1Y2M3DT4H5M6.7S'</> is now + For example, <literal>INTERVAL 'P1Y2M3DT4H5M6.7S'</literal> is now supported. </para> </listitem> <listitem> <para> - Add <varname>IntervalStyle</> parameter - which controls how <type>interval</> values are output (Ron Mayer) + Add <varname>IntervalStyle</varname> parameter + which controls how <type>interval</type> values are output (Ron Mayer) </para> <para> - Valid values are: <literal>postgres</>, <literal>postgres_verbose</>, - <literal>sql_standard</>, <literal>iso_8601</>. This setting also - controls the handling of negative <type>interval</> input when only + Valid values are: <literal>postgres</literal>, <literal>postgres_verbose</literal>, + <literal>sql_standard</literal>, <literal>iso_8601</literal>. This setting also + controls the handling of negative <type>interval</type> input when only some fields have positive/negative designations. </para> </listitem> @@ -8529,7 +8529,7 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> Improve consistency of handling of fractional seconds in - <type>timestamp</> and <type>interval</> output (Ron Mayer) + <type>timestamp</type> and <type>interval</type> output (Ron Mayer) </para> </listitem> @@ -8543,38 +8543,38 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Improve the handling of casts applied to <literal>ARRAY[]</> - constructs, such as <literal>ARRAY[...]::integer[]</> + Improve the handling of casts applied to <literal>ARRAY[]</literal> + constructs, such as <literal>ARRAY[...]::integer[]</literal> (Brendan Jurd) </para> <para> - Formerly <productname>PostgreSQL</> attempted to determine a data type - for the <literal>ARRAY[]</> construct without reference to the ensuing + Formerly <productname>PostgreSQL</productname> attempted to determine a data type + for the <literal>ARRAY[]</literal> construct without reference to the ensuing cast. This could fail unnecessarily in many cases, in particular when - the <literal>ARRAY[]</> construct was empty or contained only - ambiguous entries such as <literal>NULL</>. Now the cast is consulted + the <literal>ARRAY[]</literal> construct was empty or contained only + ambiguous entries such as <literal>NULL</literal>. Now the cast is consulted to determine the type that the array elements must be. </para> </listitem> <listitem> <para> - Make <acronym>SQL</>-syntax <type>ARRAY</> dimensions optional - to match the <acronym>SQL</> standard (Peter) + Make <acronym>SQL</acronym>-syntax <type>ARRAY</type> dimensions optional + to match the <acronym>SQL</acronym> standard (Peter) </para> </listitem> <listitem> <para> - Add <function>array_ndims()</> to return the number + Add <function>array_ndims()</function> to return the number of dimensions of an array (Robert Haas) </para> </listitem> <listitem> <para> - Add <function>array_length()</> to return the length + Add <function>array_length()</function> to return the length of an array for a specified dimension (Jim Nasby, Robert Haas, Peter Eisentraut) </para> @@ -8582,7 +8582,7 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Add aggregate function <function>array_agg()</>, which + Add aggregate function <function>array_agg()</function>, which returns all aggregated values as a single array (Robert Haas, Jeff Davis, Peter) </para> @@ -8590,25 +8590,25 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Add <function>unnest()</>, which converts an array to + Add <function>unnest()</function>, which converts an array to individual row values (Tom) </para> <para> - This is the opposite of <function>array_agg()</>. + This is the opposite of <function>array_agg()</function>. </para> </listitem> <listitem> <para> - Add <function>array_fill()</> to create arrays initialized with + Add <function>array_fill()</function> to create arrays initialized with a value (Pavel Stehule) </para> </listitem> <listitem> <para> - Add <function>generate_subscripts()</> to simplify generating + Add <function>generate_subscripts()</function> to simplify generating the range of an array's subscripts (Pavel Stehule) </para> </listitem> @@ -8618,19 +8618,19 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE </sect4> <sect4> - <title>Wide-Value Storage (<acronym>TOAST</>)</title> + <title>Wide-Value Storage (<acronym>TOAST</acronym>)</title> <itemizedlist> <listitem> <para> - Consider <acronym>TOAST</> compression on values as short as + Consider <acronym>TOAST</acronym> compression on values as short as 32 bytes (previously 256 bytes) (Greg Stark) </para> </listitem> <listitem> <para> - Require 25% minimum space savings before using <acronym>TOAST</> + Require 25% minimum space savings before using <acronym>TOAST</acronym> compression (previously 20% for small values and any-savings-at-all for large values) (Greg) </para> @@ -8638,7 +8638,7 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Improve <acronym>TOAST</> heuristics for rows that have a mix of large + Improve <acronym>TOAST</acronym> heuristics for rows that have a mix of large and small toastable fields, so that we prefer to push large values out of line and don't compress small values unnecessarily (Greg, Tom) </para> @@ -8656,52 +8656,52 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Document that <function>setseed()</> allows values from - <literal>-1</> to <literal>1</> (not just <literal>0</> to - <literal>1</>), and enforce the valid range (Kris Jurka) + Document that <function>setseed()</function> allows values from + <literal>-1</literal> to <literal>1</literal> (not just <literal>0</literal> to + <literal>1</literal>), and enforce the valid range (Kris Jurka) </para> </listitem> <listitem> <para> - Add server-side function <function>lo_import(filename, oid)</> + Add server-side function <function>lo_import(filename, oid)</function> (Tatsuo) </para> </listitem> <listitem> <para> - Add <function>quote_nullable()</>, which behaves like - <function>quote_literal()</> but returns the string <literal>NULL</> for + Add <function>quote_nullable()</function>, which behaves like + <function>quote_literal()</function> but returns the string <literal>NULL</literal> for a null argument (Brendan Jurd) </para> </listitem> <listitem> <para> - Improve full text search <function>headline()</> function to + Improve full text search <function>headline()</function> function to allow extracting several fragments of text (Sushant Sinha) </para> </listitem> <listitem> <para> - Add <function>suppress_redundant_updates_trigger()</> trigger + Add <function>suppress_redundant_updates_trigger()</function> trigger function to avoid overhead for non-data-changing updates (Andrew) </para> </listitem> <listitem> <para> - Add <function>div(numeric, numeric)</> to perform <type>numeric</> + Add <function>div(numeric, numeric)</function> to perform <type>numeric</type> division without rounding (Tom) </para> </listitem> <listitem> <para> - Add <type>timestamp</> and <type>timestamptz</> versions of - <function>generate_series()</> (Hitoshi Harada) + Add <type>timestamp</type> and <type>timestamptz</type> versions of + <function>generate_series()</function> (Hitoshi Harada) </para> </listitem> @@ -8713,54 +8713,54 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Implement <function>current_query()</> for use by functions + Implement <function>current_query()</function> for use by functions that need to know the currently running query (Tomas Doran) </para> </listitem> <listitem> <para> - Add <function>pg_get_keywords()</> to return a list of the + Add <function>pg_get_keywords()</function> to return a list of the parser keywords (Dave Page) </para> </listitem> <listitem> <para> - Add <function>pg_get_functiondef()</> to see a function's + Add <function>pg_get_functiondef()</function> to see a function's definition (Abhijit Menon-Sen) </para> </listitem> <listitem> <para> - Allow the second argument of <function>pg_get_expr()</> to be zero + Allow the second argument of <function>pg_get_expr()</function> to be zero when deparsing an expression that does not contain variables (Tom) </para> </listitem> <listitem> <para> - Modify <function>pg_relation_size()</> to use <literal>regclass</> + Modify <function>pg_relation_size()</function> to use <literal>regclass</literal> (Heikki) </para> <para> - <function>pg_relation_size(data_type_name)</> no longer works. + <function>pg_relation_size(data_type_name)</function> no longer works. </para> </listitem> <listitem> <para> - Add <literal>boot_val</> and <literal>reset_val</> columns to - <literal>pg_settings</> output (Greg Smith) + Add <literal>boot_val</literal> and <literal>reset_val</literal> columns to + <literal>pg_settings</literal> output (Greg Smith) </para> </listitem> <listitem> <para> Add source file name and line number columns to - <literal>pg_settings</> output for variables set in a configuration + <literal>pg_settings</literal> output for variables set in a configuration file (Magnus, Alvaro) </para> @@ -8771,26 +8771,26 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Add support for <varname>CURRENT_CATALOG</>, - <varname>CURRENT_SCHEMA</>, <varname>SET CATALOG</>, <varname>SET - SCHEMA</> (Peter) + Add support for <varname>CURRENT_CATALOG</varname>, + <varname>CURRENT_SCHEMA</varname>, <varname>SET CATALOG</varname>, <varname>SET + SCHEMA</varname> (Peter) </para> <para> - These provide <acronym>SQL</>-standard syntax for existing features. + These provide <acronym>SQL</acronym>-standard syntax for existing features. </para> </listitem> <listitem> <para> - Add <function>pg_typeof()</> which returns the data type + Add <function>pg_typeof()</function> which returns the data type of any value (Brendan Jurd) </para> </listitem> <listitem> <para> - Make <function>version()</> return information about whether + Make <function>version()</function> return information about whether the server is a 32- or 64-bit binary (Bruce) </para> </listitem> @@ -8798,7 +8798,7 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> Fix the behavior of information schema columns - <structfield>is_insertable_into</> and <structfield>is_updatable</> to + <structfield>is_insertable_into</structfield> and <structfield>is_updatable</structfield> to be consistent (Peter) </para> </listitem> @@ -8806,13 +8806,13 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> Improve the behavior of information schema - <structfield>datetime_precision</> columns (Peter) + <structfield>datetime_precision</structfield> columns (Peter) </para> <para> - These columns now show zero for <type>date</> columns, and 6 - (the default precision) for <type>time</>, <type>timestamp</>, and - <type>interval</> without a declared precision, rather than showing + These columns now show zero for <type>date</type> columns, and 6 + (the default precision) for <type>time</type>, <type>timestamp</type>, and + <type>interval</type> without a declared precision, rather than showing null as formerly. </para> </listitem> @@ -8820,28 +8820,28 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> Convert remaining builtin set-returning functions to use - <literal>OUT</> parameters (Jaime Casanova) + <literal>OUT</literal> parameters (Jaime Casanova) </para> <para> This makes it possible to call these functions without specifying - a column list: <function>pg_show_all_settings()</>, - <function>pg_lock_status()</>, <function>pg_prepared_xact()</>, - <function>pg_prepared_statement()</>, <function>pg_cursor()</> + a column list: <function>pg_show_all_settings()</function>, + <function>pg_lock_status()</function>, <function>pg_prepared_xact()</function>, + <function>pg_prepared_statement()</function>, <function>pg_cursor()</function> </para> </listitem> <listitem> <para> - Make <function>pg_*_is_visible()</> and - <function>has_*_privilege()</> functions return <literal>NULL</> + Make <function>pg_*_is_visible()</function> and + <function>has_*_privilege()</function> functions return <literal>NULL</literal> for invalid OIDs, rather than reporting an error (Tom) </para> </listitem> <listitem> <para> - Extend <function>has_*_privilege()</> functions to allow inquiring + Extend <function>has_*_privilege()</function> functions to allow inquiring about the OR of multiple privileges in one call (Stephen Frost, Tom) </para> @@ -8849,8 +8849,8 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Add <function>has_column_privilege()</> and - <function>has_any_column_privilege()</> functions (Stephen + Add <function>has_column_privilege()</function> and + <function>has_any_column_privilege()</function> functions (Stephen Frost, Tom) </para> </listitem> @@ -8883,16 +8883,16 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Add <command>CREATE FUNCTION ... RETURNS TABLE</> clause (Pavel + Add <command>CREATE FUNCTION ... RETURNS TABLE</command> clause (Pavel Stehule) </para> </listitem> <listitem> <para> - Allow <acronym>SQL</>-language functions to return the output - of an <command>INSERT</>/<command>UPDATE</>/<command>DELETE</> - <literal>RETURNING</> clause (Tom) + Allow <acronym>SQL</acronym>-language functions to return the output + of an <command>INSERT</command>/<command>UPDATE</command>/<command>DELETE</command> + <literal>RETURNING</literal> clause (Tom) </para> </listitem> @@ -8906,38 +8906,38 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Support <literal>EXECUTE USING</> for easier insertion of data + Support <literal>EXECUTE USING</literal> for easier insertion of data values into a dynamic query string (Pavel Stehule) </para> </listitem> <listitem> <para> - Allow looping over the results of a cursor using a <literal>FOR</> + Allow looping over the results of a cursor using a <literal>FOR</literal> loop (Pavel Stehule) </para> </listitem> <listitem> <para> - Support <literal>RETURN QUERY EXECUTE</> (Pavel + Support <literal>RETURN QUERY EXECUTE</literal> (Pavel Stehule) </para> </listitem> <listitem> <para> - Improve the <literal>RAISE</> command (Pavel Stehule) + Improve the <literal>RAISE</literal> command (Pavel Stehule) <itemizedlist> <listitem> <para> - Support <literal>DETAIL</> and <literal>HINT</> fields + Support <literal>DETAIL</literal> and <literal>HINT</literal> fields </para> </listitem> <listitem> <para> - Support specification of the <literal>SQLSTATE</> error code + Support specification of the <literal>SQLSTATE</literal> error code </para> </listitem> <listitem> @@ -8947,7 +8947,7 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE </listitem> <listitem> <para> - Allow <literal>RAISE</> without parameters in an exception + Allow <literal>RAISE</literal> without parameters in an exception block to re-throw the current error </para> </listitem> @@ -8957,45 +8957,45 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Allow specification of <varname>SQLSTATE</> codes - in <literal>EXCEPTION</> lists (Pavel Stehule) + Allow specification of <varname>SQLSTATE</varname> codes + in <literal>EXCEPTION</literal> lists (Pavel Stehule) </para> <para> - This is useful for handling custom <varname>SQLSTATE</> codes. + This is useful for handling custom <varname>SQLSTATE</varname> codes. </para> </listitem> <listitem> <para> - Support the <literal>CASE</> statement (Pavel Stehule) + Support the <literal>CASE</literal> statement (Pavel Stehule) </para> </listitem> <listitem> <para> - Make <command>RETURN QUERY</> set the special <literal>FOUND</> and - <command>GET DIAGNOSTICS</> <literal>ROW_COUNT</> variables + Make <command>RETURN QUERY</command> set the special <literal>FOUND</literal> and + <command>GET DIAGNOSTICS</command> <literal>ROW_COUNT</literal> variables (Pavel Stehule) </para> </listitem> <listitem> <para> - Make <command>FETCH</> and <command>MOVE</> set the - <command>GET DIAGNOSTICS</> <literal>ROW_COUNT</> variable + Make <command>FETCH</command> and <command>MOVE</command> set the + <command>GET DIAGNOSTICS</command> <literal>ROW_COUNT</literal> variable (Andrew Gierth) </para> </listitem> <listitem> <para> - Make <command>EXIT</> without a label always exit the innermost + Make <command>EXIT</command> without a label always exit the innermost loop (Tom) </para> <para> - Formerly, if there were a <literal>BEGIN</> block more closely nested + Formerly, if there were a <literal>BEGIN</literal> block more closely nested than any loop, it would exit that block instead. The new behavior matches Oracle(TM) and is also what was previously stated by our own documentation. @@ -9009,11 +9009,11 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE </para> <para> - In particular, the format string in <command>RAISE</> now works + In particular, the format string in <command>RAISE</command> now works the same as any other string literal, including being subject - to <varname>standard_conforming_strings</>. This change also + to <varname>standard_conforming_strings</varname>. This change also fixes other cases in which valid commands would fail when - <varname>standard_conforming_strings</> is on. + <varname>standard_conforming_strings</varname> is on. </para> </listitem> @@ -9037,28 +9037,28 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Fix <literal>pg_ctl restart</> to preserve command-line arguments + Fix <literal>pg_ctl restart</literal> to preserve command-line arguments (Bruce) </para> </listitem> <listitem> <para> - Add <literal>-w</>/<literal>--no-password</> option that + Add <literal>-w</literal>/<literal>--no-password</literal> option that prevents password prompting in all utilities that have a - <literal>-W</>/<literal>--password</> option (Peter) + <literal>-W</literal>/<literal>--password</literal> option (Peter) </para> </listitem> <listitem> <para> - Remove <option>-q</> (quiet) option of <application>createdb</>, - <application>createuser</>, <application>dropdb</>, - <application>dropuser</> (Peter) + Remove <option>-q</option> (quiet) option of <application>createdb</application>, + <application>createuser</application>, <application>dropdb</application>, + <application>dropuser</application> (Peter) </para> <para> - These options have had no effect since <productname>PostgreSQL</> + These options have had no effect since <productname>PostgreSQL</productname> 8.3. </para> </listitem> @@ -9066,41 +9066,41 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE </itemizedlist> <sect4> - <title><application>psql</></title> + <title><application>psql</application></title> <itemizedlist> <listitem> <para> - Remove verbose startup banner; now just suggest <literal>help</> + Remove verbose startup banner; now just suggest <literal>help</literal> (Joshua Drake) </para> </listitem> <listitem> <para> - Make <literal>help</> show common backslash commands (Greg + Make <literal>help</literal> show common backslash commands (Greg Sabino Mullane) </para> </listitem> <listitem> <para> - Add <literal>\pset format wrapped</> mode to wrap output to the - screen width, or file/pipe output too if <literal>\pset columns</> + Add <literal>\pset format wrapped</literal> mode to wrap output to the + screen width, or file/pipe output too if <literal>\pset columns</literal> is set (Bryce Nesbitt) </para> </listitem> <listitem> <para> - Allow all supported spellings of boolean values in <command>\pset</>, - rather than just <literal>on</> and <literal>off</> (Bruce) + Allow all supported spellings of boolean values in <command>\pset</command>, + rather than just <literal>on</literal> and <literal>off</literal> (Bruce) </para> <para> - Formerly, any string other than <quote>off</> was silently taken - to mean <literal>true</>. <application>psql</> will now complain - about unrecognized spellings (but still take them as <literal>true</>). + Formerly, any string other than <quote>off</quote> was silently taken + to mean <literal>true</literal>. <application>psql</application> will now complain + about unrecognized spellings (but still take them as <literal>true</literal>). </para> </listitem> @@ -9130,8 +9130,8 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Add optional <literal>on</>/<literal>off</> argument for - <command>\timing</> (David Fetter) + Add optional <literal>on</literal>/<literal>off</literal> argument for + <command>\timing</command> (David Fetter) </para> </listitem> @@ -9144,20 +9144,20 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Make <command>\l</> show database access privileges (Andrew Gilligan) + Make <command>\l</command> show database access privileges (Andrew Gilligan) </para> </listitem> <listitem> <para> - Make <command>\l+</> show database sizes, if permissions + Make <command>\l+</command> show database sizes, if permissions allow (Andrew Gilligan) </para> </listitem> <listitem> <para> - Add the <command>\ef</> command to edit function definitions + Add the <command>\ef</command> command to edit function definitions (Abhijit Menon-Sen) </para> </listitem> @@ -9167,28 +9167,28 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE </sect4> <sect4> - <title><application>psql</> \d* commands</title> + <title><application>psql</application> \d* commands</title> <itemizedlist> <listitem> <para> - Make <command>\d*</> commands that do not have a pattern argument - show system objects only if the <literal>S</> modifier is specified + Make <command>\d*</command> commands that do not have a pattern argument + show system objects only if the <literal>S</literal> modifier is specified (Greg Sabino Mullane, Bruce) </para> <para> The former behavior was inconsistent across different variants - of <command>\d</>, and in most cases it provided no easy way to see + of <command>\d</command>, and in most cases it provided no easy way to see just user objects. </para> </listitem> <listitem> <para> - Improve <command>\d*</> commands to work with older - <productname>PostgreSQL</> server versions (back to 7.4), + Improve <command>\d*</command> commands to work with older + <productname>PostgreSQL</productname> server versions (back to 7.4), not only the current server version (Guillaume Lelarge) </para> @@ -9196,14 +9196,14 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Make <command>\d</> show foreign-key constraints that reference + Make <command>\d</command> show foreign-key constraints that reference the selected table (Kenneth D'Souza) </para> </listitem> <listitem> <para> - Make <command>\d</> on a sequence show its column values + Make <command>\d</command> on a sequence show its column values (Euler Taveira de Oliveira) </para> </listitem> @@ -9211,43 +9211,43 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> Add column storage type and other relation options to the - <command>\d+</> display (Gregory Stark, Euler Taveira de + <command>\d+</command> display (Gregory Stark, Euler Taveira de Oliveira) </para> </listitem> <listitem> <para> - Show relation size in <command>\dt+</> output (Dickson S. + Show relation size in <command>\dt+</command> output (Dickson S. Guedes) </para> </listitem> <listitem> <para> - Show the possible values of <literal>enum</> types in <command>\dT+</> + Show the possible values of <literal>enum</literal> types in <command>\dT+</command> (David Fetter) </para> </listitem> <listitem> <para> - Allow <command>\dC</> to accept a wildcard pattern, which matches + Allow <command>\dC</command> to accept a wildcard pattern, which matches either datatype involved in the cast (Tom) </para> </listitem> <listitem> <para> - Add a function type column to <command>\df</>'s output, and add + Add a function type column to <command>\df</command>'s output, and add options to list only selected types of functions (David Fetter) </para> </listitem> <listitem> <para> - Make <command>\df</> not hide functions that take or return - type <type>cstring</> (Tom) + Make <command>\df</command> not hide functions that take or return + type <type>cstring</type> (Tom) </para> <para> @@ -9263,13 +9263,13 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE </sect4> <sect4> - <title><application>pg_dump</></title> + <title><application>pg_dump</application></title> <itemizedlist> <listitem> <para> - Add a <literal>--no-tablespaces</> option to - <application>pg_dump</>/<application>pg_dumpall</>/<application>pg_restore</> + Add a <literal>--no-tablespaces</literal> option to + <application>pg_dump</application>/<application>pg_dumpall</application>/<application>pg_restore</application> so that dumps can be restored to clusters that have non-matching tablespace layouts (Gavin Roy) </para> @@ -9277,23 +9277,23 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Remove <option>-d</> and <option>-D</> options from - <application>pg_dump</> and <application>pg_dumpall</> (Tom) + Remove <option>-d</option> and <option>-D</option> options from + <application>pg_dump</application> and <application>pg_dumpall</application> (Tom) </para> <para> These options were too frequently confused with the option to - select a database name in other <productname>PostgreSQL</> + select a database name in other <productname>PostgreSQL</productname> client applications. The functionality is still available, but you must now spell out the long option name - <option>--inserts</> or <option>--column-inserts</>. + <option>--inserts</option> or <option>--column-inserts</option>. </para> </listitem> <listitem> <para> - Remove <option>-i</>/<option>--ignore-version</> option from - <application>pg_dump</> and <application>pg_dumpall</> (Tom) + Remove <option>-i</option>/<option>--ignore-version</option> option from + <application>pg_dump</application> and <application>pg_dumpall</application> (Tom) </para> <para> @@ -9305,15 +9305,15 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Disable <varname>statement_timeout</> during dump and restore + Disable <varname>statement_timeout</varname> during dump and restore (Joshua Drake) </para> </listitem> <listitem> <para> - Add <application>pg_dump</>/<application>pg_dumpall</> option - <option>--lock-wait-timeout</> (David Gould) + Add <application>pg_dump</application>/<application>pg_dumpall</application> option + <option>--lock-wait-timeout</option> (David Gould) </para> <para> @@ -9324,7 +9324,7 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Reorder <application>pg_dump</> <literal>--data-only</> output + Reorder <application>pg_dump</application> <literal>--data-only</literal> output to dump tables referenced by foreign keys before the referencing tables (Tom) </para> @@ -9332,27 +9332,27 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <para> This allows data loads when foreign keys are already present. If circular references make a safe ordering impossible, a - <literal>NOTICE</> is issued. + <literal>NOTICE</literal> is issued. </para> </listitem> <listitem> <para> - Allow <application>pg_dump</>, <application>pg_dumpall</>, and - <application>pg_restore</> to use a specified role (Benedek + Allow <application>pg_dump</application>, <application>pg_dumpall</application>, and + <application>pg_restore</application> to use a specified role (Benedek László) </para> </listitem> <listitem> <para> - Allow <application>pg_restore</> to use multiple concurrent + Allow <application>pg_restore</application> to use multiple concurrent connections to do the restore (Andrew) </para> <para> The number of concurrent connections is controlled by the option - <literal>--jobs</>. This is supported only for custom-format archives. + <literal>--jobs</literal>. This is supported only for custom-format archives. </para> </listitem> @@ -9366,24 +9366,24 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <title>Programming Tools</title> <sect4> - <title><application>libpq</></title> + <title><application>libpq</application></title> <itemizedlist> <listitem> <para> - Allow the <type>OID</> to be specified when importing a large - object, via new function <function>lo_import_with_oid()</> (Tatsuo) + Allow the <type>OID</type> to be specified when importing a large + object, via new function <function>lo_import_with_oid()</function> (Tatsuo) </para> </listitem> <listitem> <para> - Add <quote>events</> support (Andrew Chernow, Merlin Moncure) + Add <quote>events</quote> support (Andrew Chernow, Merlin Moncure) </para> <para> This adds the ability to register callbacks to manage private - data associated with <structname>PGconn</> and <structname>PGresult</> + data associated with <structname>PGconn</structname> and <structname>PGresult</structname> objects. </para> </listitem> @@ -9397,18 +9397,18 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Make <function>PQexecParams()</> and related functions return - <varname>PGRES_EMPTY_QUERY</> for an empty query (Tom) + Make <function>PQexecParams()</function> and related functions return + <varname>PGRES_EMPTY_QUERY</varname> for an empty query (Tom) </para> <para> - They previously returned <varname>PGRES_COMMAND_OK</>. + They previously returned <varname>PGRES_COMMAND_OK</varname>. </para> </listitem> <listitem> <para> - Document how to avoid the overhead of <function>WSACleanup()</> + Document how to avoid the overhead of <function>WSACleanup()</function> on Windows (Andrew Chernow) </para> </listitem> @@ -9434,22 +9434,22 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE </sect4> <sect4> - <title><application>libpq</> <acronym>SSL</> (Secure Sockets Layer) + <title><application>libpq</application> <acronym>SSL</acronym> (Secure Sockets Layer) support</title> <itemizedlist> <listitem> <para> - Fix certificate validation for <acronym>SSL</> connections + Fix certificate validation for <acronym>SSL</acronym> connections (Magnus) </para> <para> - <application>libpq</> now supports verifying both the certificate - and the name of the server when making <acronym>SSL</> + <application>libpq</application> now supports verifying both the certificate + and the name of the server when making <acronym>SSL</acronym> connections. If a root certificate is not available to use for - verification, <acronym>SSL</> connections will fail. The - <literal>sslmode</> parameter is used to enable certificate + verification, <acronym>SSL</acronym> connections will fail. The + <literal>sslmode</literal> parameter is used to enable certificate verification and set the level of checking. The default is still not to do any verification, allowing connections to SSL-enabled servers without requiring a root certificate on the @@ -9463,7 +9463,7 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE </para> <para> - If a certificate <acronym>CN</> starts with <literal>*</>, it will + If a certificate <acronym>CN</acronym> starts with <literal>*</literal>, it will be treated as a wildcard when matching the hostname, allowing the use of the same certificate for multiple servers. </para> @@ -9478,21 +9478,21 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Add a <function>PQinitOpenSSL</> function to allow greater control + Add a <function>PQinitOpenSSL</function> function to allow greater control over OpenSSL/libcrypto initialization (Andrew Chernow) </para> </listitem> <listitem> <para> - Make <application>libpq</> unregister its <application>OpenSSL</> + Make <application>libpq</application> unregister its <application>OpenSSL</application> callbacks when no database connections remain open (Bruce, Magnus, Russell Smith) </para> <para> This is required for applications that unload the libpq library, - otherwise invalid <application>OpenSSL</> callbacks will remain. + otherwise invalid <application>OpenSSL</application> callbacks will remain. </para> </listitem> @@ -9501,7 +9501,7 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE </sect4> <sect4> - <title><application>ecpg</></title> + <title><application>ecpg</application></title> <itemizedlist> <listitem> @@ -9527,7 +9527,7 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE </sect4> <sect4> - <title>Server Programming Interface (<acronym>SPI</>)</title> + <title>Server Programming Interface (<acronym>SPI</acronym>)</title> <itemizedlist> <listitem> @@ -9539,8 +9539,8 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Add new <varname>SPI_OK_REWRITTEN</> return code for - <function>SPI_execute()</> (Heikki) + Add new <varname>SPI_OK_REWRITTEN</varname> return code for + <function>SPI_execute()</function> (Heikki) </para> <para> @@ -9551,12 +9551,12 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Remove unnecessary inclusions from <filename>executor/spi.h</> (Tom) + Remove unnecessary inclusions from <filename>executor/spi.h</filename> (Tom) </para> <para> - SPI-using modules might need to add some <literal>#include</> - lines if they were depending on <filename>spi.h</> to include + SPI-using modules might need to add some <literal>#include</literal> + lines if they were depending on <filename>spi.h</filename> to include things for them. </para> </listitem> @@ -9573,13 +9573,13 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Update build system to use <productname>Autoconf</> 2.61 (Peter) + Update build system to use <productname>Autoconf</productname> 2.61 (Peter) </para> </listitem> <listitem> <para> - Require <productname>GNU bison</> for source code builds (Peter) + Require <productname>GNU bison</productname> for source code builds (Peter) </para> <para> @@ -9590,63 +9590,63 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Add <application>pg_config</> <literal>--htmldir</> option + Add <application>pg_config</application> <literal>--htmldir</literal> option (Peter) </para> </listitem> <listitem> <para> - Pass <type>float4</> by value inside the server (Zoltan + Pass <type>float4</type> by value inside the server (Zoltan Boszormenyi) </para> <para> - Add <application>configure</> option - <literal>--disable-float4-byval</> to use the old behavior. + Add <application>configure</application> option + <literal>--disable-float4-byval</literal> to use the old behavior. External C functions that use old-style (version 0) call convention - and pass or return <type>float4</> values will be broken by this - change, so you may need the <application>configure</> option if you + and pass or return <type>float4</type> values will be broken by this + change, so you may need the <application>configure</application> option if you have such functions and don't want to update them. </para> </listitem> <listitem> <para> - Pass <type>float8</>, <type>int8</>, and related datatypes + Pass <type>float8</type>, <type>int8</type>, and related datatypes by value inside the server on 64-bit platforms (Zoltan Boszormenyi) </para> <para> - Add <application>configure</> option - <literal>--disable-float8-byval</> to use the old behavior. + Add <application>configure</application> option + <literal>--disable-float8-byval</literal> to use the old behavior. As above, this change might break old-style external C functions. </para> </listitem> <listitem> <para> - Add configure options <literal>--with-segsize</>, - <literal>--with-blocksize</>, <literal>--with-wal-blocksize</>, - <literal>--with-wal-segsize</> (Zdenek Kotala, Tom) + Add configure options <literal>--with-segsize</literal>, + <literal>--with-blocksize</literal>, <literal>--with-wal-blocksize</literal>, + <literal>--with-wal-segsize</literal> (Zdenek Kotala, Tom) </para> <para> This simplifies build-time control over several constants that previously could only be changed by editing - <filename>pg_config_manual.h</>. + <filename>pg_config_manual.h</filename>. </para> </listitem> <listitem> <para> - Allow threaded builds on <productname>Solaris</> 2.5 (Bruce) + Allow threaded builds on <productname>Solaris</productname> 2.5 (Bruce) </para> </listitem> <listitem> <para> - Use the system's <function>getopt_long()</> on <productname>Solaris</> + Use the system's <function>getopt_long()</function> on <productname>Solaris</productname> (Zdenek Kotala, Tom) </para> @@ -9658,16 +9658,16 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Add support for the <productname>Sun Studio</> compiler on - <productname>Linux</> (Julius Stroffek) + Add support for the <productname>Sun Studio</productname> compiler on + <productname>Linux</productname> (Julius Stroffek) </para> </listitem> <listitem> <para> - Append the major version number to the backend <application>gettext</> - domain, and the <literal>soname</> major version number to - libraries' <application>gettext</> domain (Peter) + Append the major version number to the backend <application>gettext</application> + domain, and the <literal>soname</literal> major version number to + libraries' <application>gettext</application> domain (Peter) </para> <para> @@ -9677,21 +9677,21 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Add support for code coverage testing with <application>gcov</> + Add support for code coverage testing with <application>gcov</application> (Michelle Caisse) </para> </listitem> <listitem> <para> - Allow out-of-tree builds on <productname>Mingw</> and - <productname>Cygwin</> (Richard Evans) + Allow out-of-tree builds on <productname>Mingw</productname> and + <productname>Cygwin</productname> (Richard Evans) </para> </listitem> <listitem> <para> - Fix the use of <productname>Mingw</> as a cross-compiling source + Fix the use of <productname>Mingw</productname> as a cross-compiling source platform (Peter) </para> </listitem> @@ -9710,20 +9710,20 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE </para> <para> - This adds support for daylight saving time (<acronym>DST</>) + This adds support for daylight saving time (<acronym>DST</acronym>) calculations beyond the year 2038. </para> </listitem> <listitem> <para> - Deprecate use of platform's <type>time_t</> data type (Tom) + Deprecate use of platform's <type>time_t</type> data type (Tom) </para> <para> - Some platforms have migrated to 64-bit <type>time_t</>, some have + Some platforms have migrated to 64-bit <type>time_t</type>, some have not, and Windows can't make up its mind what it's doing. Define - <type>pg_time_t</> to have the same meaning as <type>time_t</>, + <type>pg_time_t</type> to have the same meaning as <type>time_t</type>, but always be 64 bits (unless the platform has no 64-bit integer type), and use that type in all module APIs and on-disk data formats. </para> @@ -9745,7 +9745,7 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Improve <application>gettext</> support to allow better translation + Improve <application>gettext</application> support to allow better translation of plurals (Peter) </para> </listitem> @@ -9758,44 +9758,44 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Add more <application>DTrace</> probes (Robert Lor) + Add more <application>DTrace</application> probes (Robert Lor) </para> </listitem> <listitem> <para> - Enable <application>DTrace</> support on <application>macOS - Leopard</> and other non-Solaris platforms (Robert Lor) + Enable <application>DTrace</application> support on <application>macOS + Leopard</application> and other non-Solaris platforms (Robert Lor) </para> </listitem> <listitem> <para> Simplify and standardize conversions between C strings and - <type>text</> datums, by providing common functions for the purpose + <type>text</type> datums, by providing common functions for the purpose (Brendan Jurd, Tom) </para> </listitem> <listitem> <para> - Clean up the <filename>include/catalog/</> header files so that + Clean up the <filename>include/catalog/</filename> header files so that frontend programs can include them without including - <filename>postgres.h</> + <filename>postgres.h</filename> (Zdenek Kotala) </para> </listitem> <listitem> <para> - Make <type>name</> char-aligned, and suppress zero-padding of - <type>name</> entries in indexes (Tom) + Make <type>name</type> char-aligned, and suppress zero-padding of + <type>name</type> entries in indexes (Tom) </para> </listitem> <listitem> <para> - Recover better if dynamically-loaded code executes <function>exit()</> + Recover better if dynamically-loaded code executes <function>exit()</function> (Tom) </para> </listitem> @@ -9816,55 +9816,55 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Add <function>shmem_startup_hook()</> for custom shared memory + Add <function>shmem_startup_hook()</function> for custom shared memory requirements (Tom) </para> </listitem> <listitem> <para> - Replace the index access method <function>amgetmulti</> entry point - with <function>amgetbitmap</>, and extend the API for - <function>amgettuple</> to support run-time determination of + Replace the index access method <function>amgetmulti</function> entry point + with <function>amgetbitmap</function>, and extend the API for + <function>amgettuple</function> to support run-time determination of operator lossiness (Heikki, Tom, Teodor) </para> <para> - The API for GIN and GiST opclass <function>consistent</> functions + The API for GIN and GiST opclass <function>consistent</function> functions has been extended as well. </para> </listitem> <listitem> <para> - Add support for partial-match searches in <acronym>GIN</> indexes + Add support for partial-match searches in <acronym>GIN</acronym> indexes (Teodor Sigaev, Oleg Bartunov) </para> </listitem> <listitem> <para> - Replace <structname>pg_class</> column <structfield>reltriggers</> - with boolean <structfield>relhastriggers</> (Simon) + Replace <structname>pg_class</structname> column <structfield>reltriggers</structfield> + with boolean <structfield>relhastriggers</structfield> (Simon) </para> <para> - Also remove unused <structname>pg_class</> columns - <structfield>relukeys</>, <structfield>relfkeys</>, and - <structfield>relrefs</>. + Also remove unused <structname>pg_class</structname> columns + <structfield>relukeys</structfield>, <structfield>relfkeys</structfield>, and + <structfield>relrefs</structfield>. </para> </listitem> <listitem> <para> - Add a <structfield>relistemp</> column to <structname>pg_class</> + Add a <structfield>relistemp</structfield> column to <structname>pg_class</structname> to ease identification of temporary tables (Tom) </para> </listitem> <listitem> <para> - Move platform <acronym>FAQ</>s into the main documentation + Move platform <acronym>FAQ</acronym>s into the main documentation (Peter) </para> </listitem> @@ -9878,7 +9878,7 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Add support for the <literal>KOI8U</> (Ukrainian) encoding + Add support for the <literal>KOI8U</literal> (Ukrainian) encoding (Peter) </para> </listitem> @@ -9895,8 +9895,8 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Fix problem when setting <varname>LC_MESSAGES</> on - <application>MSVC</>-built systems (Hiroshi Inoue, Hiroshi + Fix problem when setting <varname>LC_MESSAGES</varname> on + <application>MSVC</application>-built systems (Hiroshi Inoue, Hiroshi Saito, Magnus) </para> </listitem> @@ -9912,65 +9912,65 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Add <filename>contrib/auto_explain</> to automatically run - <command>EXPLAIN</> on queries exceeding a specified duration + Add <filename>contrib/auto_explain</filename> to automatically run + <command>EXPLAIN</command> on queries exceeding a specified duration (Itagaki Takahiro, Tom) </para> </listitem> <listitem> <para> - Add <filename>contrib/btree_gin</> to allow GIN indexes to + Add <filename>contrib/btree_gin</filename> to allow GIN indexes to handle more datatypes (Oleg, Teodor) </para> </listitem> <listitem> <para> - Add <filename>contrib/citext</> to provide a case-insensitive, + Add <filename>contrib/citext</filename> to provide a case-insensitive, multibyte-aware text data type (David Wheeler) </para> </listitem> <listitem> <para> - Add <filename>contrib/pg_stat_statements</> for server-wide + Add <filename>contrib/pg_stat_statements</filename> for server-wide tracking of statement execution statistics (Itagaki Takahiro) </para> </listitem> <listitem> <para> - Add duration and query mode options to <filename>contrib/pgbench</> + Add duration and query mode options to <filename>contrib/pgbench</filename> (Itagaki Takahiro) </para> </listitem> <listitem> <para> - Make <filename>contrib/pgbench</> use table names - <structname>pgbench_accounts</>, <structname>pgbench_branches</>, - <structname>pgbench_history</>, and <structname>pgbench_tellers</>, - rather than just <structname>accounts</>, <structname>branches</>, - <structname>history</>, and <structname>tellers</> (Tom) + Make <filename>contrib/pgbench</filename> use table names + <structname>pgbench_accounts</structname>, <structname>pgbench_branches</structname>, + <structname>pgbench_history</structname>, and <structname>pgbench_tellers</structname>, + rather than just <structname>accounts</structname>, <structname>branches</structname>, + <structname>history</structname>, and <structname>tellers</structname> (Tom) </para> <para> This is to reduce the risk of accidentally destroying real data - by running <application>pgbench</>. + by running <application>pgbench</application>. </para> </listitem> <listitem> <para> - Fix <filename>contrib/pgstattuple</> to handle tables and + Fix <filename>contrib/pgstattuple</filename> to handle tables and indexes with over 2 billion pages (Tatsuhito Kasahara) </para> </listitem> <listitem> <para> - In <filename>contrib/fuzzystrmatch</>, add a version of the + In <filename>contrib/fuzzystrmatch</filename>, add a version of the Levenshtein string-distance function that allows the user to specify the costs of insertion, deletion, and substitution (Volkan Yazici) @@ -9979,28 +9979,28 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Make <filename>contrib/ltree</> support multibyte encodings + Make <filename>contrib/ltree</filename> support multibyte encodings (laser) </para> </listitem> <listitem> <para> - Enable <filename>contrib/dblink</> to use connection information + Enable <filename>contrib/dblink</filename> to use connection information stored in the SQL/MED catalogs (Joe Conway) </para> </listitem> <listitem> <para> - Improve <filename>contrib/dblink</>'s reporting of errors from + Improve <filename>contrib/dblink</filename>'s reporting of errors from the remote server (Joe Conway) </para> </listitem> <listitem> <para> - Make <filename>contrib/dblink</> set <varname>client_encoding</> + Make <filename>contrib/dblink</filename> set <varname>client_encoding</varname> to match the local database's encoding (Joe Conway) </para> @@ -10012,9 +10012,9 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Make sure <filename>contrib/dblink</> uses a password supplied + Make sure <filename>contrib/dblink</filename> uses a password supplied by the user, and not accidentally taken from the server's - <filename>.pgpass</> file (Joe Conway) + <filename>.pgpass</filename> file (Joe Conway) </para> <para> @@ -10024,51 +10024,51 @@ WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE <listitem> <para> - Add <function>fsm_page_contents()</> - to <filename>contrib/pageinspect</> (Heikki) + Add <function>fsm_page_contents()</function> + to <filename>contrib/pageinspect</filename> (Heikki) </para> </listitem> <listitem> <para> - Modify <function>get_raw_page()</> to support free space map - (<filename>*_fsm</>) files. Also update - <filename>contrib/pg_freespacemap</>. + Modify <function>get_raw_page()</function> to support free space map + (<filename>*_fsm</filename>) files. Also update + <filename>contrib/pg_freespacemap</filename>. </para> </listitem> <listitem> <para> - Add support for multibyte encodings to <filename>contrib/pg_trgm</> + Add support for multibyte encodings to <filename>contrib/pg_trgm</filename> (Teodor) </para> </listitem> <listitem> <para> - Rewrite <filename>contrib/intagg</> to use new - functions <function>array_agg()</> and <function>unnest()</> + Rewrite <filename>contrib/intagg</filename> to use new + functions <function>array_agg()</function> and <function>unnest()</function> (Tom) </para> </listitem> <listitem> <para> - Make <filename>contrib/pg_standby</> recover all available WAL before + Make <filename>contrib/pg_standby</filename> recover all available WAL before failover (Fujii Masao, Simon, Heikki) </para> <para> To make this work safely, you now need to set the new - <literal>recovery_end_command</> option in <filename>recovery.conf</> - to clean up the trigger file after failover. <application>pg_standby</> + <literal>recovery_end_command</literal> option in <filename>recovery.conf</filename> + to clean up the trigger file after failover. <application>pg_standby</application> will no longer remove the trigger file itself. </para> </listitem> <listitem> <para> - <filename>contrib/pg_standby</>'s <option>-l</> option is now a no-op, + <filename>contrib/pg_standby</filename>'s <option>-l</option> option is now a no-op, because it is unsafe to use a symlink (Simon) </para> </listitem> diff --git a/doc/src/sgml/release-9.0.sgml b/doc/src/sgml/release-9.0.sgml index f7c63fc5677..e09f38e1808 100644 --- a/doc/src/sgml/release-9.0.sgml +++ b/doc/src/sgml/release-9.0.sgml @@ -16,7 +16,7 @@ </para> <para> - This is expected to be the last <productname>PostgreSQL</> release + This is expected to be the last <productname>PostgreSQL</productname> release in the 9.0.X series. Users are encouraged to update to a newer release branch soon. </para> @@ -42,8 +42,8 @@ <listitem> <para> - Fix <filename>contrib/pgcrypto</> to detect and report - too-short <function>crypt()</> salts (Josh Kupershmidt) + Fix <filename>contrib/pgcrypto</filename> to detect and report + too-short <function>crypt()</function> salts (Josh Kupershmidt) </para> <para> @@ -69,13 +69,13 @@ <listitem> <para> - Fix insertion of relations into the relation cache <quote>init file</> + Fix insertion of relations into the relation cache <quote>init file</quote> (Tom Lane) </para> <para> An oversight in a patch in the most recent minor releases - caused <structname>pg_trigger_tgrelid_tgname_index</> to be omitted + caused <structname>pg_trigger_tgrelid_tgname_index</structname> to be omitted from the init file. Subsequent sessions detected this, then deemed the init file to be broken and silently ignored it, resulting in a significant degradation in session startup time. In addition to fixing @@ -93,7 +93,7 @@ <listitem> <para> - Improve <command>LISTEN</> startup time when there are many unread + Improve <command>LISTEN</command> startup time when there are many unread notifications (Matt Newell) </para> </listitem> @@ -108,13 +108,13 @@ too many bugs in practice, both in the underlying OpenSSL library and in our usage of it. Renegotiation will be removed entirely in 9.5 and later. In the older branches, just change the default value - of <varname>ssl_renegotiation_limit</> to zero (disabled). + of <varname>ssl_renegotiation_limit</varname> to zero (disabled). </para> </listitem> <listitem> <para> - Lower the minimum values of the <literal>*_freeze_max_age</> parameters + Lower the minimum values of the <literal>*_freeze_max_age</literal> parameters (Andres Freund) </para> @@ -126,14 +126,14 @@ <listitem> <para> - Limit the maximum value of <varname>wal_buffers</> to 2GB to avoid + Limit the maximum value of <varname>wal_buffers</varname> to 2GB to avoid server crashes (Josh Berkus) </para> </listitem> <listitem> <para> - Fix rare internal overflow in multiplication of <type>numeric</> values + Fix rare internal overflow in multiplication of <type>numeric</type> values (Dean Rasheed) </para> </listitem> @@ -141,21 +141,21 @@ <listitem> <para> Guard against hard-to-reach stack overflows involving record types, - range types, <type>json</>, <type>jsonb</>, <type>tsquery</>, - <type>ltxtquery</> and <type>query_int</> (Noah Misch) + range types, <type>json</type>, <type>jsonb</type>, <type>tsquery</type>, + <type>ltxtquery</type> and <type>query_int</type> (Noah Misch) </para> </listitem> <listitem> <para> - Fix handling of <literal>DOW</> and <literal>DOY</> in datetime input + Fix handling of <literal>DOW</literal> and <literal>DOY</literal> in datetime input (Greg Stark) </para> <para> These tokens aren't meant to be used in datetime values, but previously they resulted in opaque internal error messages rather - than <quote>invalid input syntax</>. + than <quote>invalid input syntax</quote>. </para> </listitem> @@ -168,7 +168,7 @@ <listitem> <para> Add recursion depth protections to regular expression, <literal>SIMILAR - TO</>, and <literal>LIKE</> matching (Tom Lane) + TO</literal>, and <literal>LIKE</literal> matching (Tom Lane) </para> <para> @@ -212,22 +212,22 @@ <listitem> <para> - Fix <quote>unexpected out-of-memory situation during sort</> errors - when using tuplestores with small <varname>work_mem</> settings (Tom + Fix <quote>unexpected out-of-memory situation during sort</quote> errors + when using tuplestores with small <varname>work_mem</varname> settings (Tom Lane) </para> </listitem> <listitem> <para> - Fix very-low-probability stack overrun in <function>qsort</> (Tom Lane) + Fix very-low-probability stack overrun in <function>qsort</function> (Tom Lane) </para> </listitem> <listitem> <para> - Fix <quote>invalid memory alloc request size</> failure in hash joins - with large <varname>work_mem</> settings (Tomas Vondra, Tom Lane) + Fix <quote>invalid memory alloc request size</quote> failure in hash joins + with large <varname>work_mem</varname> settings (Tomas Vondra, Tom Lane) </para> </listitem> @@ -240,9 +240,9 @@ These mistakes could lead to incorrect query plans that would give wrong answers, or to assertion failures in assert-enabled builds, or to odd planner errors such as <quote>could not devise a query plan for the - given query</>, <quote>could not find pathkey item to - sort</>, <quote>plan should not reference subplan's variable</>, - or <quote>failed to assign all NestLoopParams to plan nodes</>. + given query</quote>, <quote>could not find pathkey item to + sort</quote>, <quote>plan should not reference subplan's variable</quote>, + or <quote>failed to assign all NestLoopParams to plan nodes</quote>. Thanks are due to Andreas Seltenreich and Piotr Stefaniak for fuzz testing that exposed these problems. </para> @@ -263,12 +263,12 @@ <para> During postmaster shutdown, ensure that per-socket lock files are removed and listen sockets are closed before we remove - the <filename>postmaster.pid</> file (Tom Lane) + the <filename>postmaster.pid</filename> file (Tom Lane) </para> <para> This avoids race-condition failures if an external script attempts to - start a new postmaster as soon as <literal>pg_ctl stop</> returns. + start a new postmaster as soon as <literal>pg_ctl stop</literal> returns. </para> </listitem> @@ -288,7 +288,7 @@ <listitem> <para> - Do not print a <literal>WARNING</> when an autovacuum worker is already + Do not print a <literal>WARNING</literal> when an autovacuum worker is already gone when we attempt to signal it, and reduce log verbosity for such signals (Tom Lane) </para> @@ -321,30 +321,30 @@ <listitem> <para> Fix off-by-one error that led to otherwise-harmless warnings - about <quote>apparent wraparound</> in subtrans/multixact truncation + about <quote>apparent wraparound</quote> in subtrans/multixact truncation (Thomas Munro) </para> </listitem> <listitem> <para> - Fix misreporting of <command>CONTINUE</> and <command>MOVE</> statement - types in <application>PL/pgSQL</>'s error context messages + Fix misreporting of <command>CONTINUE</command> and <command>MOVE</command> statement + types in <application>PL/pgSQL</application>'s error context messages (Pavel Stehule, Tom Lane) </para> </listitem> <listitem> <para> - Fix some places in <application>PL/Tcl</> that neglected to check for - failure of <function>malloc()</> calls (Michael Paquier, Álvaro + Fix some places in <application>PL/Tcl</application> that neglected to check for + failure of <function>malloc()</function> calls (Michael Paquier, Álvaro Herrera) </para> </listitem> <listitem> <para> - Improve <application>libpq</>'s handling of out-of-memory conditions + Improve <application>libpq</application>'s handling of out-of-memory conditions (Michael Paquier, Heikki Linnakangas) </para> </listitem> @@ -352,61 +352,61 @@ <listitem> <para> Fix memory leaks and missing out-of-memory checks - in <application>ecpg</> (Michael Paquier) + in <application>ecpg</application> (Michael Paquier) </para> </listitem> <listitem> <para> - Fix <application>psql</>'s code for locale-aware formatting of numeric + Fix <application>psql</application>'s code for locale-aware formatting of numeric output (Tom Lane) </para> <para> - The formatting code invoked by <literal>\pset numericlocale on</> + The formatting code invoked by <literal>\pset numericlocale on</literal> did the wrong thing for some uncommon cases such as numbers with an exponent but no decimal point. It could also mangle already-localized - output from the <type>money</> data type. + output from the <type>money</type> data type. </para> </listitem> <listitem> <para> - Prevent crash in <application>psql</>'s <command>\c</> command when + Prevent crash in <application>psql</application>'s <command>\c</command> command when there is no current connection (Noah Misch) </para> </listitem> <listitem> <para> - Ensure that temporary files created during a <application>pg_dump</> - run with <acronym>tar</>-format output are not world-readable (Michael + Ensure that temporary files created during a <application>pg_dump</application> + run with <acronym>tar</acronym>-format output are not world-readable (Michael Paquier) </para> </listitem> <listitem> <para> - Fix <application>pg_dump</> and <application>pg_upgrade</> to support - cases where the <literal>postgres</> or <literal>template1</> database + Fix <application>pg_dump</application> and <application>pg_upgrade</application> to support + cases where the <literal>postgres</literal> or <literal>template1</literal> database is in a non-default tablespace (Marti Raudsepp, Bruce Momjian) </para> </listitem> <listitem> <para> - Fix <application>pg_dump</> to handle object privileges sanely when + Fix <application>pg_dump</application> to handle object privileges sanely when dumping from a server too old to have a particular privilege type (Tom Lane) </para> <para> When dumping functions or procedural languages from pre-7.3 - servers, <application>pg_dump</> would - produce <command>GRANT</>/<command>REVOKE</> commands that revoked the + servers, <application>pg_dump</application> would + produce <command>GRANT</command>/<command>REVOKE</command> commands that revoked the owner's grantable privileges and instead granted all privileges - to <literal>PUBLIC</>. Since the privileges involved are - just <literal>USAGE</> and <literal>EXECUTE</>, this isn't a security + to <literal>PUBLIC</literal>. Since the privileges involved are + just <literal>USAGE</literal> and <literal>EXECUTE</literal>, this isn't a security problem, but it's certainly a surprising representation of the older systems' behavior. Fix it to leave the default privilege state alone in these cases. @@ -415,23 +415,23 @@ <listitem> <para> - Fix <application>pg_dump</> to dump shell types (Tom Lane) + Fix <application>pg_dump</application> to dump shell types (Tom Lane) </para> <para> Shell types (that is, not-yet-fully-defined types) aren't useful for - much, but nonetheless <application>pg_dump</> should dump them. + much, but nonetheless <application>pg_dump</application> should dump them. </para> </listitem> <listitem> <para> Fix spinlock assembly code for PPC hardware to be compatible - with <acronym>AIX</>'s native assembler (Tom Lane) + with <acronym>AIX</acronym>'s native assembler (Tom Lane) </para> <para> - Building with <application>gcc</> didn't work if <application>gcc</> + Building with <application>gcc</application> didn't work if <application>gcc</application> had been configured to use the native assembler, which is becoming more common. </para> @@ -439,14 +439,14 @@ <listitem> <para> - On <acronym>AIX</>, test the <literal>-qlonglong</> compiler option + On <acronym>AIX</acronym>, test the <literal>-qlonglong</literal> compiler option rather than just assuming it's safe to use (Noah Misch) </para> </listitem> <listitem> <para> - On <acronym>AIX</>, use <literal>-Wl,-brtllib</> link option to allow + On <acronym>AIX</acronym>, use <literal>-Wl,-brtllib</literal> link option to allow symbols to be resolved at runtime (Noah Misch) </para> @@ -458,38 +458,38 @@ <listitem> <para> Avoid use of inline functions when compiling with - 32-bit <application>xlc</>, due to compiler bugs (Noah Misch) + 32-bit <application>xlc</application>, due to compiler bugs (Noah Misch) </para> </listitem> <listitem> <para> - Use <filename>librt</> for <function>sched_yield()</> when necessary, + Use <filename>librt</filename> for <function>sched_yield()</function> when necessary, which it is on some Solaris versions (Oskari Saarenmaa) </para> </listitem> <listitem> <para> - Fix Windows <filename>install.bat</> script to handle target directory + Fix Windows <filename>install.bat</filename> script to handle target directory names that contain spaces (Heikki Linnakangas) </para> </listitem> <listitem> <para> - Make the numeric form of the <productname>PostgreSQL</> version number - (e.g., <literal>90405</>) readily available to extension Makefiles, - as a variable named <varname>VERSION_NUM</> (Michael Paquier) + Make the numeric form of the <productname>PostgreSQL</productname> version number + (e.g., <literal>90405</literal>) readily available to extension Makefiles, + as a variable named <varname>VERSION_NUM</varname> (Michael Paquier) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2015g for + Update time zone data files to <application>tzdata</application> release 2015g for DST law changes in Cayman Islands, Fiji, Moldova, Morocco, Norfolk Island, North Korea, Turkey, and Uruguay. There is a new zone name - <literal>America/Fort_Nelson</> for the Canadian Northern Rockies. + <literal>America/Fort_Nelson</literal> for the Canadian Northern Rockies. </para> </listitem> @@ -513,7 +513,7 @@ </para> <para> - The <productname>PostgreSQL</> community will stop releasing updates + The <productname>PostgreSQL</productname> community will stop releasing updates for the 9.0.X release series in September 2015. Users are encouraged to update to a newer release branch soon. </para> @@ -544,7 +544,7 @@ <para> With just the wrong timing of concurrent activity, a <command>VACUUM - FULL</> on a system catalog might fail to update the <quote>init file</> + FULL</command> on a system catalog might fail to update the <quote>init file</quote> that's used to avoid cache-loading work for new sessions. This would result in later sessions being unable to access that catalog at all. This is a very ancient bug, but it's so hard to trigger that no @@ -555,13 +555,13 @@ <listitem> <para> Avoid deadlock between incoming sessions and <literal>CREATE/DROP - DATABASE</> (Tom Lane) + DATABASE</literal> (Tom Lane) </para> <para> A new session starting in a database that is the target of - a <command>DROP DATABASE</> command, or is the template for - a <command>CREATE DATABASE</> command, could cause the command to wait + a <command>DROP DATABASE</command> command, or is the template for + a <command>CREATE DATABASE</command> command, could cause the command to wait for five seconds and then fail, even if the new session would have exited before that. </para> @@ -587,7 +587,7 @@ </para> <para> - The <productname>PostgreSQL</> community will stop releasing updates + The <productname>PostgreSQL</productname> community will stop releasing updates for the 9.0.X release series in September 2015. Users are encouraged to update to a newer release branch soon. </para> @@ -613,12 +613,12 @@ <listitem> <para> - Avoid failures while <function>fsync</>'ing data directory during + Avoid failures while <function>fsync</function>'ing data directory during crash restart (Abhijit Menon-Sen, Tom Lane) </para> <para> - In the previous minor releases we added a patch to <function>fsync</> + In the previous minor releases we added a patch to <function>fsync</function> everything in the data directory after a crash. Unfortunately its response to any error condition was to fail, thereby preventing the server from starting up, even when the problem was quite harmless. @@ -632,29 +632,29 @@ <listitem> <para> - Remove <application>configure</>'s check prohibiting linking to a - threaded <application>libpython</> - on <systemitem class="osname">OpenBSD</> (Tom Lane) + Remove <application>configure</application>'s check prohibiting linking to a + threaded <application>libpython</application> + on <systemitem class="osname">OpenBSD</systemitem> (Tom Lane) </para> <para> The failure this restriction was meant to prevent seems to not be a - problem anymore on current <systemitem class="osname">OpenBSD</> + problem anymore on current <systemitem class="osname">OpenBSD</systemitem> versions. </para> </listitem> <listitem> <para> - Allow <application>libpq</> to use TLS protocol versions beyond v1 + Allow <application>libpq</application> to use TLS protocol versions beyond v1 (Noah Misch) </para> <para> - For a long time, <application>libpq</> was coded so that the only SSL + For a long time, <application>libpq</application> was coded so that the only SSL protocol it would allow was TLS v1. Now that newer TLS versions are becoming popular, allow it to negotiate the highest commonly-supported - TLS version with the server. (<productname>PostgreSQL</> servers were + TLS version with the server. (<productname>PostgreSQL</productname> servers were already capable of such negotiation, so no change is needed on the server side.) This is a back-patch of a change already released in 9.4.0. @@ -681,7 +681,7 @@ </para> <para> - The <productname>PostgreSQL</> community will stop releasing updates + The <productname>PostgreSQL</productname> community will stop releasing updates for the 9.0.X release series in September 2015. Users are encouraged to update to a newer release branch soon. </para> @@ -727,7 +727,7 @@ </para> <para> - Our replacement implementation of <function>snprintf()</> failed to + Our replacement implementation of <function>snprintf()</function> failed to check for errors reported by the underlying system library calls; the main case that might be missed is out-of-memory situations. In the worst case this might lead to information exposure, due to our @@ -737,7 +737,7 @@ </para> <para> - It remains possible that some calls of the <function>*printf()</> + It remains possible that some calls of the <function>*printf()</function> family of functions are vulnerable to information disclosure if an out-of-memory error occurs at just the wrong time. We judge the risk to not be large, but will continue analysis in this area. @@ -747,15 +747,15 @@ <listitem> <para> - In <filename>contrib/pgcrypto</>, uniformly report decryption failures - as <quote>Wrong key or corrupt data</> (Noah Misch) + In <filename>contrib/pgcrypto</filename>, uniformly report decryption failures + as <quote>Wrong key or corrupt data</quote> (Noah Misch) </para> <para> Previously, some cases of decryption with an incorrect key could report other error message texts. It has been shown that such variance in error reports can aid attackers in recovering keys from other systems. - While it's unknown whether <filename>pgcrypto</>'s specific behaviors + While it's unknown whether <filename>pgcrypto</filename>'s specific behaviors are likewise exploitable, it seems better to avoid the risk by using a one-size-fits-all message. (CVE-2015-3167) @@ -786,7 +786,7 @@ <para> This oversight in the planner has been observed to cause <quote>could - not find RelOptInfo for given relids</> errors, but it seems possible + not find RelOptInfo for given relids</quote> errors, but it seems possible that sometimes an incorrect query plan might get past that consistency check and result in silently-wrong query output. </para> @@ -814,7 +814,7 @@ <para> This oversight has been seen to lead to <quote>failed to join all - relations together</> errors in queries involving <literal>LATERAL</>, + relations together</quote> errors in queries involving <literal>LATERAL</literal>, and that might happen in other cases as well. </para> </listitem> @@ -822,7 +822,7 @@ <listitem> <para> Fix possible deadlock at startup - when <literal>max_prepared_transactions</> is too small + when <literal>max_prepared_transactions</literal> is too small (Heikki Linnakangas) </para> </listitem> @@ -836,14 +836,14 @@ <listitem> <para> - Avoid <quote>cannot GetMultiXactIdMembers() during recovery</> error + Avoid <quote>cannot GetMultiXactIdMembers() during recovery</quote> error (Álvaro Herrera) </para> </listitem> <listitem> <para> - Recursively <function>fsync()</> the data directory after a crash + Recursively <function>fsync()</function> the data directory after a crash (Abhijit Menon-Sen, Robert Haas) </para> @@ -863,13 +863,13 @@ <listitem> <para> - Cope with unexpected signals in <function>LockBufferForCleanup()</> + Cope with unexpected signals in <function>LockBufferForCleanup()</function> (Andres Freund) </para> <para> This oversight could result in spurious errors about <quote>multiple - backends attempting to wait for pincount 1</>. + backends attempting to wait for pincount 1</quote>. </para> </listitem> @@ -910,9 +910,9 @@ </para> <para> - <command>ANALYZE</> executes index expressions many times; if there are + <command>ANALYZE</command> executes index expressions many times; if there are slow functions in such an expression, it's desirable to be able to - cancel the <command>ANALYZE</> before that loop finishes. + cancel the <command>ANALYZE</command> before that loop finishes. </para> </listitem> @@ -925,20 +925,20 @@ <listitem> <para> - Recommend setting <literal>include_realm</> to 1 when using + Recommend setting <literal>include_realm</literal> to 1 when using Kerberos/GSSAPI/SSPI authentication (Stephen Frost) </para> <para> Without this, identically-named users from different realms cannot be distinguished. For the moment this is only a documentation change, but - it will become the default setting in <productname>PostgreSQL</> 9.5. + it will become the default setting in <productname>PostgreSQL</productname> 9.5. </para> </listitem> <listitem> <para> - Remove code for matching IPv4 <filename>pg_hba.conf</> entries to + Remove code for matching IPv4 <filename>pg_hba.conf</filename> entries to IPv4-in-IPv6 addresses (Tom Lane) </para> @@ -951,7 +951,7 @@ crashes on some systems, so let's just remove it rather than fix it. (Had we chosen to fix it, that would make for a subtle and potentially security-sensitive change in the effective meaning of - IPv4 <filename>pg_hba.conf</> entries, which does not seem like a good + IPv4 <filename>pg_hba.conf</filename> entries, which does not seem like a good thing to do in minor releases.) </para> </listitem> @@ -960,14 +960,14 @@ <para> While shutting down service on Windows, periodically send status updates to the Service Control Manager to prevent it from killing the - service too soon; and ensure that <application>pg_ctl</> will wait for + service too soon; and ensure that <application>pg_ctl</application> will wait for shutdown (Krystian Bigaj) </para> </listitem> <listitem> <para> - Reduce risk of network deadlock when using <application>libpq</>'s + Reduce risk of network deadlock when using <application>libpq</application>'s non-blocking mode (Heikki Linnakangas) </para> @@ -976,25 +976,25 @@ buffer every so often, in case the server has sent enough response data to cause it to block on output. (A typical scenario is that the server is sending a stream of NOTICE messages during <literal>COPY FROM - STDIN</>.) This worked properly in the normal blocking mode, but not - so much in non-blocking mode. We've modified <application>libpq</> + STDIN</literal>.) This worked properly in the normal blocking mode, but not + so much in non-blocking mode. We've modified <application>libpq</application> to opportunistically drain input when it can, but a full defense against this problem requires application cooperation: the application should watch for socket read-ready as well as write-ready conditions, - and be sure to call <function>PQconsumeInput()</> upon read-ready. + and be sure to call <function>PQconsumeInput()</function> upon read-ready. </para> </listitem> <listitem> <para> - Fix array handling in <application>ecpg</> (Michael Meskes) + Fix array handling in <application>ecpg</application> (Michael Meskes) </para> </listitem> <listitem> <para> - Fix <application>psql</> to sanely handle URIs and conninfo strings as - the first parameter to <command>\connect</> + Fix <application>psql</application> to sanely handle URIs and conninfo strings as + the first parameter to <command>\connect</command> (David Fetter, Andrew Dunstan, Álvaro Herrera) </para> @@ -1007,37 +1007,37 @@ <listitem> <para> - Suppress incorrect complaints from <application>psql</> on some - platforms that it failed to write <filename>~/.psql_history</> at exit + Suppress incorrect complaints from <application>psql</application> on some + platforms that it failed to write <filename>~/.psql_history</filename> at exit (Tom Lane) </para> <para> This misbehavior was caused by a workaround for a bug in very old - (pre-2006) versions of <application>libedit</>. We fixed it by + (pre-2006) versions of <application>libedit</application>. We fixed it by removing the workaround, which will cause a similar failure to appear - for anyone still using such versions of <application>libedit</>. - Recommendation: upgrade that library, or use <application>libreadline</>. + for anyone still using such versions of <application>libedit</application>. + Recommendation: upgrade that library, or use <application>libreadline</application>. </para> </listitem> <listitem> <para> - Fix <application>pg_dump</>'s rule for deciding which casts are + Fix <application>pg_dump</application>'s rule for deciding which casts are system-provided casts that should not be dumped (Tom Lane) </para> </listitem> <listitem> <para> - Fix dumping of views that are just <literal>VALUES(...)</> but have + Fix dumping of views that are just <literal>VALUES(...)</literal> but have column aliases (Tom Lane) </para> </listitem> <listitem> <para> - In <application>pg_upgrade</>, force timeline 1 in the new cluster + In <application>pg_upgrade</application>, force timeline 1 in the new cluster (Bruce Momjian) </para> @@ -1049,7 +1049,7 @@ <listitem> <para> - In <application>pg_upgrade</>, check for improperly non-connectable + In <application>pg_upgrade</application>, check for improperly non-connectable databases before proceeding (Bruce Momjian) </para> @@ -1057,28 +1057,28 @@ <listitem> <para> - In <application>pg_upgrade</>, quote directory paths - properly in the generated <literal>delete_old_cluster</> script + In <application>pg_upgrade</application>, quote directory paths + properly in the generated <literal>delete_old_cluster</literal> script (Bruce Momjian) </para> </listitem> <listitem> <para> - In <application>pg_upgrade</>, preserve database-level freezing info + In <application>pg_upgrade</application>, preserve database-level freezing info properly (Bruce Momjian) </para> <para> This oversight could cause missing-clog-file errors for tables within - the <literal>postgres</> and <literal>template1</> databases. + the <literal>postgres</literal> and <literal>template1</literal> databases. </para> </listitem> <listitem> <para> - Run <application>pg_upgrade</> and <application>pg_resetxlog</> with + Run <application>pg_upgrade</application> and <application>pg_resetxlog</application> with restricted privileges on Windows, so that they don't fail when run by an administrator (Muhammad Asif Naeem) </para> @@ -1086,7 +1086,7 @@ <listitem> <para> - Fix slow sorting algorithm in <filename>contrib/intarray</> (Tom Lane) + Fix slow sorting algorithm in <filename>contrib/intarray</filename> (Tom Lane) </para> </listitem> @@ -1098,7 +1098,7 @@ <listitem> <para> - Update time zone data files to <application>tzdata</> release 2015d + Update time zone data files to <application>tzdata</application> release 2015d for DST law changes in Egypt, Mongolia, and Palestine, plus historical changes in Canada and Chile. Also adopt revised zone abbreviations for the America/Adak zone (HST/HDT not HAST/HADT). @@ -1145,15 +1145,15 @@ <listitem> <para> - Fix buffer overruns in <function>to_char()</> + Fix buffer overruns in <function>to_char()</function> (Bruce Momjian) </para> <para> - When <function>to_char()</> processes a numeric formatting template - calling for a large number of digits, <productname>PostgreSQL</> + When <function>to_char()</function> processes a numeric formatting template + calling for a large number of digits, <productname>PostgreSQL</productname> would read past the end of a buffer. When processing a crafted - timestamp formatting template, <productname>PostgreSQL</> would write + timestamp formatting template, <productname>PostgreSQL</productname> would write past the end of a buffer. Either case could crash the server. We have not ruled out the possibility of attacks that lead to privilege escalation, though they seem unlikely. @@ -1163,27 +1163,27 @@ <listitem> <para> - Fix buffer overrun in replacement <function>*printf()</> functions + Fix buffer overrun in replacement <function>*printf()</function> functions (Tom Lane) </para> <para> - <productname>PostgreSQL</> includes a replacement implementation - of <function>printf</> and related functions. This code will overrun + <productname>PostgreSQL</productname> includes a replacement implementation + of <function>printf</function> and related functions. This code will overrun a stack buffer when formatting a floating point number (conversion - specifiers <literal>e</>, <literal>E</>, <literal>f</>, <literal>F</>, - <literal>g</> or <literal>G</>) with requested precision greater than + specifiers <literal>e</literal>, <literal>E</literal>, <literal>f</literal>, <literal>F</literal>, + <literal>g</literal> or <literal>G</literal>) with requested precision greater than about 500. This will crash the server, and we have not ruled out the possibility of attacks that lead to privilege escalation. A database user can trigger such a buffer overrun through - the <function>to_char()</> SQL function. While that is the only - affected core <productname>PostgreSQL</> functionality, extension + the <function>to_char()</function> SQL function. While that is the only + affected core <productname>PostgreSQL</productname> functionality, extension modules that use printf-family functions may be at risk as well. </para> <para> - This issue primarily affects <productname>PostgreSQL</> on Windows. - <productname>PostgreSQL</> uses the system implementation of these + This issue primarily affects <productname>PostgreSQL</productname> on Windows. + <productname>PostgreSQL</productname> uses the system implementation of these functions where adequate, which it is on other modern platforms. (CVE-2015-0242) </para> @@ -1191,12 +1191,12 @@ <listitem> <para> - Fix buffer overruns in <filename>contrib/pgcrypto</> + Fix buffer overruns in <filename>contrib/pgcrypto</filename> (Marko Tiikkaja, Noah Misch) </para> <para> - Errors in memory size tracking within the <filename>pgcrypto</> + Errors in memory size tracking within the <filename>pgcrypto</filename> module permitted stack buffer overruns and improper dependence on the contents of uninitialized memory. The buffer overrun cases can crash the server, and we have not ruled out the possibility of @@ -1237,7 +1237,7 @@ <para> Some server error messages show the values of columns that violate a constraint, such as a unique constraint. If the user does not have - <literal>SELECT</> privilege on all columns of the table, this could + <literal>SELECT</literal> privilege on all columns of the table, this could mean exposing values that the user should not be able to see. Adjust the code so that values are displayed only when they came from the SQL command or could be selected by the user. @@ -1263,21 +1263,21 @@ <listitem> <para> Avoid possible data corruption if <command>ALTER DATABASE SET - TABLESPACE</> is used to move a database to a new tablespace and then + TABLESPACE</command> is used to move a database to a new tablespace and then shortly later move it back to its original tablespace (Tom Lane) </para> </listitem> <listitem> <para> - Avoid corrupting tables when <command>ANALYZE</> inside a transaction + Avoid corrupting tables when <command>ANALYZE</command> inside a transaction is rolled back (Andres Freund, Tom Lane, Michael Paquier) </para> <para> If the failing transaction had earlier removed the last index, rule, or trigger from the table, the table would be left in a corrupted state - with the relevant <structname>pg_class</> flags not set though they + with the relevant <structname>pg_class</structname> flags not set though they should be. </para> </listitem> @@ -1289,22 +1289,22 @@ </para> <para> - In <literal>READ COMMITTED</> mode, queries that lock or update + In <literal>READ COMMITTED</literal> mode, queries that lock or update recently-updated rows could crash as a result of this bug. </para> </listitem> <listitem> <para> - Fix planning of <command>SELECT FOR UPDATE</> when using a partial + Fix planning of <command>SELECT FOR UPDATE</command> when using a partial index on a child table (Kyotaro Horiguchi) </para> <para> - In <literal>READ COMMITTED</> mode, <command>SELECT FOR UPDATE</> must - also recheck the partial index's <literal>WHERE</> condition when + In <literal>READ COMMITTED</literal> mode, <command>SELECT FOR UPDATE</command> must + also recheck the partial index's <literal>WHERE</literal> condition when rechecking a recently-updated row to see if it still satisfies the - query's <literal>WHERE</> condition. This requirement was missed if the + query's <literal>WHERE</literal> condition. This requirement was missed if the index belonged to an inheritance child table, so that it was possible to incorrectly return rows that no longer satisfy the query condition. </para> @@ -1312,12 +1312,12 @@ <listitem> <para> - Fix corner case wherein <command>SELECT FOR UPDATE</> could return a row + Fix corner case wherein <command>SELECT FOR UPDATE</command> could return a row twice, and possibly miss returning other rows (Tom Lane) </para> <para> - In <literal>READ COMMITTED</> mode, a <command>SELECT FOR UPDATE</> + In <literal>READ COMMITTED</literal> mode, a <command>SELECT FOR UPDATE</command> that is scanning an inheritance tree could incorrectly return a row from a prior child table instead of the one it should return from a later child table. @@ -1327,7 +1327,7 @@ <listitem> <para> Reject duplicate column names in the referenced-columns list of - a <literal>FOREIGN KEY</> declaration (David Rowley) + a <literal>FOREIGN KEY</literal> declaration (David Rowley) </para> <para> @@ -1339,7 +1339,7 @@ <listitem> <para> - Fix bugs in raising a <type>numeric</> value to a large integral power + Fix bugs in raising a <type>numeric</type> value to a large integral power (Tom Lane) </para> @@ -1352,19 +1352,19 @@ <listitem> <para> - In <function>numeric_recv()</>, truncate away any fractional digits - that would be hidden according to the value's <literal>dscale</> field + In <function>numeric_recv()</function>, truncate away any fractional digits + that would be hidden according to the value's <literal>dscale</literal> field (Tom Lane) </para> <para> - A <type>numeric</> value's display scale (<literal>dscale</>) should + A <type>numeric</type> value's display scale (<literal>dscale</literal>) should never be less than the number of nonzero fractional digits; but apparently there's at least one broken client application that - transmits binary <type>numeric</> values in which that's true. + transmits binary <type>numeric</type> values in which that's true. This leads to strange behavior since the extra digits are taken into account by arithmetic operations even though they aren't printed. - The least risky fix seems to be to truncate away such <quote>hidden</> + The least risky fix seems to be to truncate away such <quote>hidden</quote> digits on receipt, so that the value is indeed what it prints as. </para> </listitem> @@ -1384,7 +1384,7 @@ <listitem> <para> - Fix bugs in <type>tsquery</> <literal>@></> <type>tsquery</> + Fix bugs in <type>tsquery</type> <literal>@></literal> <type>tsquery</type> operator (Heikki Linnakangas) </para> @@ -1415,14 +1415,14 @@ <listitem> <para> - Fix namespace handling in <function>xpath()</> (Ali Akbar) + Fix namespace handling in <function>xpath()</function> (Ali Akbar) </para> <para> - Previously, the <type>xml</> value resulting from - an <function>xpath()</> call would not have namespace declarations if + Previously, the <type>xml</type> value resulting from + an <function>xpath()</function> call would not have namespace declarations if the namespace declarations were attached to an ancestor element in the - input <type>xml</> value, rather than to the specific element being + input <type>xml</type> value, rather than to the specific element being returned. Propagate the ancestral declaration so that the result is correct when considered in isolation. </para> @@ -1431,7 +1431,7 @@ <listitem> <para> Fix planner problems with nested append relations, such as inherited - tables within <literal>UNION ALL</> subqueries (Tom Lane) + tables within <literal>UNION ALL</literal> subqueries (Tom Lane) </para> </listitem> @@ -1444,8 +1444,8 @@ <listitem> <para> - Exempt tables that have per-table <varname>cost_limit</> - and/or <varname>cost_delay</> settings from autovacuum's global cost + Exempt tables that have per-table <varname>cost_limit</varname> + and/or <varname>cost_delay</varname> settings from autovacuum's global cost balancing rules (Álvaro Herrera) </para> @@ -1471,7 +1471,7 @@ the target database, if they met the usual thresholds for autovacuuming. This is at best pretty unexpected; at worst it delays response to the wraparound threat. Fix it so that if autovacuum is - turned off, workers <emphasis>only</> do anti-wraparound vacuums and + turned off, workers <emphasis>only</emphasis> do anti-wraparound vacuums and not any other work. </para> </listitem> @@ -1491,19 +1491,19 @@ <listitem> <para> Fix several cases where recovery logic improperly ignored WAL records - for <literal>COMMIT/ABORT PREPARED</> (Heikki Linnakangas) + for <literal>COMMIT/ABORT PREPARED</literal> (Heikki Linnakangas) </para> <para> The most notable oversight was - that <varname>recovery_target_xid</> could not be used to stop at + that <varname>recovery_target_xid</varname> could not be used to stop at a two-phase commit. </para> </listitem> <listitem> <para> - Avoid creating unnecessary <filename>.ready</> marker files for + Avoid creating unnecessary <filename>.ready</filename> marker files for timeline history files (Fujii Masao) </para> </listitem> @@ -1511,14 +1511,14 @@ <listitem> <para> Fix possible null pointer dereference when an empty prepared statement - is used and the <varname>log_statement</> setting is <literal>mod</> - or <literal>ddl</> (Fujii Masao) + is used and the <varname>log_statement</varname> setting is <literal>mod</literal> + or <literal>ddl</literal> (Fujii Masao) </para> </listitem> <listitem> <para> - Change <quote>pgstat wait timeout</> warning message to be LOG level, + Change <quote>pgstat wait timeout</quote> warning message to be LOG level, and rephrase it to be more understandable (Tom Lane) </para> @@ -1527,7 +1527,7 @@ case, but it occurs often enough on our slower buildfarm members to be a nuisance. Reduce it to LOG level, and expend a bit more effort on the wording: it now reads <quote>using stale statistics instead of - current ones because stats collector is not responding</>. + current ones because stats collector is not responding</quote>. </para> </listitem> @@ -1541,32 +1541,32 @@ <listitem> <para> - Warn if macOS's <function>setlocale()</> starts an unwanted extra + Warn if macOS's <function>setlocale()</function> starts an unwanted extra thread inside the postmaster (Noah Misch) </para> </listitem> <listitem> <para> - Fix processing of repeated <literal>dbname</> parameters - in <function>PQconnectdbParams()</> (Alex Shulgin) + Fix processing of repeated <literal>dbname</literal> parameters + in <function>PQconnectdbParams()</function> (Alex Shulgin) </para> <para> Unexpected behavior ensued if the first occurrence - of <literal>dbname</> contained a connection string or URI to be + of <literal>dbname</literal> contained a connection string or URI to be expanded. </para> </listitem> <listitem> <para> - Ensure that <application>libpq</> reports a suitable error message on + Ensure that <application>libpq</application> reports a suitable error message on unexpected socket EOF (Marko Tiikkaja, Tom Lane) </para> <para> - Depending on kernel behavior, <application>libpq</> might return an + Depending on kernel behavior, <application>libpq</application> might return an empty error string rather than something useful when the server unexpectedly closed the socket. </para> @@ -1574,14 +1574,14 @@ <listitem> <para> - Clear any old error message during <function>PQreset()</> + Clear any old error message during <function>PQreset()</function> (Heikki Linnakangas) </para> <para> - If <function>PQreset()</> is called repeatedly, and the connection + If <function>PQreset()</function> is called repeatedly, and the connection cannot be re-established, error messages from the failed connection - attempts kept accumulating in the <structname>PGconn</>'s error + attempts kept accumulating in the <structname>PGconn</structname>'s error string. </para> </listitem> @@ -1589,32 +1589,32 @@ <listitem> <para> Properly handle out-of-memory conditions while parsing connection - options in <application>libpq</> (Alex Shulgin, Heikki Linnakangas) + options in <application>libpq</application> (Alex Shulgin, Heikki Linnakangas) </para> </listitem> <listitem> <para> - Fix array overrun in <application>ecpg</>'s version - of <function>ParseDateTime()</> (Michael Paquier) + Fix array overrun in <application>ecpg</application>'s version + of <function>ParseDateTime()</function> (Michael Paquier) </para> </listitem> <listitem> <para> - In <application>initdb</>, give a clearer error message if a password + In <application>initdb</application>, give a clearer error message if a password file is specified but is empty (Mats Erik Andersson) </para> </listitem> <listitem> <para> - Fix <application>psql</>'s <command>\s</> command to work nicely with + Fix <application>psql</application>'s <command>\s</command> command to work nicely with libedit, and add pager support (Stepan Rutz, Tom Lane) </para> <para> - When using libedit rather than readline, <command>\s</> printed the + When using libedit rather than readline, <command>\s</command> printed the command history in a fairly unreadable encoded format, and on recent libedit versions might fail altogether. Fix that by printing the history ourselves rather than having the library do it. A pleasant @@ -1624,7 +1624,7 @@ <para> This patch also fixes a bug that caused newline encoding to be applied inconsistently when saving the command history with libedit. - Multiline history entries written by older <application>psql</> + Multiline history entries written by older <application>psql</application> versions will be read cleanly with this patch, but perhaps not vice versa, depending on the exact libedit versions involved. </para> @@ -1632,17 +1632,17 @@ <listitem> <para> - Improve consistency of parsing of <application>psql</>'s special + Improve consistency of parsing of <application>psql</application>'s special variables (Tom Lane) </para> <para> - Allow variant spellings of <literal>on</> and <literal>off</> (such - as <literal>1</>/<literal>0</>) for <literal>ECHO_HIDDEN</> - and <literal>ON_ERROR_ROLLBACK</>. Report a warning for unrecognized - values for <literal>COMP_KEYWORD_CASE</>, <literal>ECHO</>, - <literal>ECHO_HIDDEN</>, <literal>HISTCONTROL</>, - <literal>ON_ERROR_ROLLBACK</>, and <literal>VERBOSITY</>. Recognize + Allow variant spellings of <literal>on</literal> and <literal>off</literal> (such + as <literal>1</literal>/<literal>0</literal>) for <literal>ECHO_HIDDEN</literal> + and <literal>ON_ERROR_ROLLBACK</literal>. Report a warning for unrecognized + values for <literal>COMP_KEYWORD_CASE</literal>, <literal>ECHO</literal>, + <literal>ECHO_HIDDEN</literal>, <literal>HISTCONTROL</literal>, + <literal>ON_ERROR_ROLLBACK</literal>, and <literal>VERBOSITY</literal>. Recognize all values for all these variables case-insensitively; previously there was a mishmash of case-sensitive and case-insensitive behaviors. </para> @@ -1650,9 +1650,9 @@ <listitem> <para> - Fix <application>psql</>'s expanded-mode display to work - consistently when using <literal>border</> = 3 - and <literal>linestyle</> = <literal>ascii</> or <literal>unicode</> + Fix <application>psql</application>'s expanded-mode display to work + consistently when using <literal>border</literal> = 3 + and <literal>linestyle</literal> = <literal>ascii</literal> or <literal>unicode</literal> (Stephen Frost) </para> </listitem> @@ -1666,7 +1666,7 @@ <listitem> <para> - Fix core dump in <literal>pg_dump --binary-upgrade</> on zero-column + Fix core dump in <literal>pg_dump --binary-upgrade</literal> on zero-column composite type (Rushabh Lathia) </para> </listitem> @@ -1674,7 +1674,7 @@ <listitem> <para> Fix block number checking - in <filename>contrib/pageinspect</>'s <function>get_raw_page()</> + in <filename>contrib/pageinspect</filename>'s <function>get_raw_page()</function> (Tom Lane) </para> @@ -1686,7 +1686,7 @@ <listitem> <para> - Fix <filename>contrib/pgcrypto</>'s <function>pgp_sym_decrypt()</> + Fix <filename>contrib/pgcrypto</filename>'s <function>pgp_sym_decrypt()</function> to not fail on messages whose length is 6 less than a power of 2 (Marko Tiikkaja) </para> @@ -1695,24 +1695,24 @@ <listitem> <para> Handle unexpected query results, especially NULLs, safely in - <filename>contrib/tablefunc</>'s <function>connectby()</> + <filename>contrib/tablefunc</filename>'s <function>connectby()</function> (Michael Paquier) </para> <para> - <function>connectby()</> previously crashed if it encountered a NULL + <function>connectby()</function> previously crashed if it encountered a NULL key value. It now prints that row but doesn't recurse further. </para> </listitem> <listitem> <para> - Avoid a possible crash in <filename>contrib/xml2</>'s - <function>xslt_process()</> (Mark Simonetti) + Avoid a possible crash in <filename>contrib/xml2</filename>'s + <function>xslt_process()</function> (Mark Simonetti) </para> <para> - <application>libxslt</> seems to have an undocumented dependency on + <application>libxslt</application> seems to have an undocumented dependency on the order in which resources are freed; reorder our calls to avoid a crash. </para> @@ -1739,29 +1739,29 @@ <para> With OpenLDAP versions 2.4.24 through 2.4.31, - inclusive, <productname>PostgreSQL</> backends can crash at exit. - Raise a warning during <application>configure</> based on the + inclusive, <productname>PostgreSQL</productname> backends can crash at exit. + Raise a warning during <application>configure</application> based on the compile-time OpenLDAP version number, and test the crashing scenario - in the <filename>contrib/dblink</> regression test. + in the <filename>contrib/dblink</filename> regression test. </para> </listitem> <listitem> <para> - In non-MSVC Windows builds, ensure <filename>libpq.dll</> is installed + In non-MSVC Windows builds, ensure <filename>libpq.dll</filename> is installed with execute permissions (Noah Misch) </para> </listitem> <listitem> <para> - Make <application>pg_regress</> remove any temporary installation it + Make <application>pg_regress</application> remove any temporary installation it created upon successful exit (Tom Lane) </para> <para> This results in a very substantial reduction in disk space usage - during <literal>make check-world</>, since that sequence involves + during <literal>make check-world</literal>, since that sequence involves creation of numerous temporary installations. </para> </listitem> @@ -1773,15 +1773,15 @@ </para> <para> - Previously, <productname>PostgreSQL</> assumed that the UTC offset - associated with a time zone abbreviation (such as <literal>EST</>) + Previously, <productname>PostgreSQL</productname> assumed that the UTC offset + associated with a time zone abbreviation (such as <literal>EST</literal>) never changes in the usage of any particular locale. However this assumption fails in the real world, so introduce the ability for a zone abbreviation to represent a UTC offset that sometimes changes. Update the zone abbreviation definition files to make use of this feature in timezone locales that have changed the UTC offset of their abbreviations since 1970 (according to the IANA timezone database). - In such timezones, <productname>PostgreSQL</> will now associate the + In such timezones, <productname>PostgreSQL</productname> will now associate the correct UTC offset with the abbreviation depending on the given date. </para> </listitem> @@ -1793,9 +1793,9 @@ <para> Add CST (China Standard Time) to our lists. - Remove references to ADT as <quote>Arabia Daylight Time</>, an + Remove references to ADT as <quote>Arabia Daylight Time</quote>, an abbreviation that's been out of use since 2007; therefore, claiming - there is a conflict with <quote>Atlantic Daylight Time</> doesn't seem + there is a conflict with <quote>Atlantic Daylight Time</quote> doesn't seem especially helpful. Fix entirely incorrect GMT offsets for CKT (Cook Islands), FJT, and FJST (Fiji); we didn't even have them on the proper side of the date line. @@ -1804,21 +1804,21 @@ <listitem> <para> - Update time zone data files to <application>tzdata</> release 2015a. + Update time zone data files to <application>tzdata</application> release 2015a. </para> <para> The IANA timezone database has adopted abbreviations of the form - <literal>A<replaceable>x</>ST</literal>/<literal>A<replaceable>x</>DT</literal> + <literal>A<replaceable>x</replaceable>ST</literal>/<literal>A<replaceable>x</replaceable>DT</literal> for all Australian time zones, reflecting what they believe to be current majority practice Down Under. These names do not conflict with usage elsewhere (other than ACST for Acre Summer Time, which has been in disuse since 1994). Accordingly, adopt these names into - our <quote>Default</> timezone abbreviation set. - The <quote>Australia</> abbreviation set now contains only CST, EAST, + our <quote>Default</quote> timezone abbreviation set. + The <quote>Australia</quote> abbreviation set now contains only CST, EAST, EST, SAST, SAT, and WST, all of which are thought to be mostly historical usage. Note that SAST has also been changed to be South - Africa Standard Time in the <quote>Default</> abbreviation set. + Africa Standard Time in the <quote>Default</quote> abbreviation set. </para> <para> @@ -1877,15 +1877,15 @@ <listitem> <para> - Correctly initialize padding bytes in <filename>contrib/btree_gist</> - indexes on <type>bit</> columns (Heikki Linnakangas) + Correctly initialize padding bytes in <filename>contrib/btree_gist</filename> + indexes on <type>bit</type> columns (Heikki Linnakangas) </para> <para> This error could result in incorrect query results due to values that should compare equal not being seen as equal. - Users with GiST indexes on <type>bit</> or <type>bit varying</> - columns should <command>REINDEX</> those indexes after installing this + Users with GiST indexes on <type>bit</type> or <type>bit varying</type> + columns should <command>REINDEX</command> those indexes after installing this update. </para> </listitem> @@ -1917,7 +1917,7 @@ <listitem> <para> Fix possibly-incorrect cache invalidation during nested calls - to <function>ReceiveSharedInvalidMessages</> (Andres Freund) + to <function>ReceiveSharedInvalidMessages</function> (Andres Freund) </para> </listitem> @@ -1944,13 +1944,13 @@ This corrects cases where TOAST pointers could be copied into other tables without being dereferenced. If the original data is later deleted, it would lead to errors like <quote>missing chunk number 0 - for toast value ...</> when the now-dangling pointer is used. + for toast value ...</quote> when the now-dangling pointer is used. </para> </listitem> <listitem> <para> - Fix <quote>record type has not been registered</> failures with + Fix <quote>record type has not been registered</quote> failures with whole-row references to the output of Append plan nodes (Tom Lane) </para> </listitem> @@ -1965,7 +1965,7 @@ <listitem> <para> Fix query-lifespan memory leak while evaluating the arguments for a - function in <literal>FROM</> (Tom Lane) + function in <literal>FROM</literal> (Tom Lane) </para> </listitem> @@ -1978,7 +1978,7 @@ <listitem> <para> - Fix data encoding error in <filename>hungarian.stop</> (Tom Lane) + Fix data encoding error in <filename>hungarian.stop</filename> (Tom Lane) </para> </listitem> @@ -1991,19 +1991,19 @@ <para> This could cause problems (at least spurious warnings, and at worst an - infinite loop) if <command>CREATE INDEX</> or <command>CLUSTER</> were + infinite loop) if <command>CREATE INDEX</command> or <command>CLUSTER</command> were done later in the same transaction. </para> </listitem> <listitem> <para> - Clear <structname>pg_stat_activity</>.<structfield>xact_start</> - during <command>PREPARE TRANSACTION</> (Andres Freund) + Clear <structname>pg_stat_activity</structname>.<structfield>xact_start</structfield> + during <command>PREPARE TRANSACTION</command> (Andres Freund) </para> <para> - After the <command>PREPARE</>, the originating session is no longer in + After the <command>PREPARE</command>, the originating session is no longer in a transaction, so it should not continue to display a transaction start time. </para> @@ -2011,7 +2011,7 @@ <listitem> <para> - Fix <command>REASSIGN OWNED</> to not fail for text search objects + Fix <command>REASSIGN OWNED</command> to not fail for text search objects (Álvaro Herrera) </para> </listitem> @@ -2023,7 +2023,7 @@ <para> This ensures that the postmaster will properly clean up after itself - if, for example, it receives <systemitem>SIGINT</> while still + if, for example, it receives <systemitem>SIGINT</systemitem> while still starting up. </para> </listitem> @@ -2031,7 +2031,7 @@ <listitem> <para> Secure Unix-domain sockets of temporary postmasters started during - <literal>make check</> (Noah Misch) + <literal>make check</literal> (Noah Misch) </para> <para> @@ -2040,16 +2040,16 @@ the operating-system user running the test, as we previously noted in CVE-2014-0067. This change defends against that risk by placing the server's socket in a temporary, mode 0700 subdirectory - of <filename>/tmp</>. The hazard remains however on platforms where + of <filename>/tmp</filename>. The hazard remains however on platforms where Unix sockets are not supported, notably Windows, because then the temporary postmaster must accept local TCP connections. </para> <para> A useful side effect of this change is to simplify - <literal>make check</> testing in builds that - override <literal>DEFAULT_PGSOCKET_DIR</>. Popular non-default values - like <filename>/var/run/postgresql</> are often not writable by the + <literal>make check</literal> testing in builds that + override <literal>DEFAULT_PGSOCKET_DIR</literal>. Popular non-default values + like <filename>/var/run/postgresql</filename> are often not writable by the build user, requiring workarounds that will no longer be necessary. </para> </listitem> @@ -2085,15 +2085,15 @@ </para> <para> - This oversight could cause <application>initdb</> - and <application>pg_upgrade</> to fail on Windows, if the installation - path contained both spaces and <literal>@</> signs. + This oversight could cause <application>initdb</application> + and <application>pg_upgrade</application> to fail on Windows, if the installation + path contained both spaces and <literal>@</literal> signs. </para> </listitem> <listitem> <para> - Fix linking of <application>libpython</> on macOS (Tom Lane) + Fix linking of <application>libpython</application> on macOS (Tom Lane) </para> <para> @@ -2104,17 +2104,17 @@ <listitem> <para> - Avoid buffer bloat in <application>libpq</> when the server + Avoid buffer bloat in <application>libpq</application> when the server consistently sends data faster than the client can absorb it (Shin-ichi Morita, Tom Lane) </para> <para> - <application>libpq</> could be coerced into enlarging its input buffer + <application>libpq</application> could be coerced into enlarging its input buffer until it runs out of memory (which would be reported misleadingly - as <quote>lost synchronization with server</>). Under ordinary + as <quote>lost synchronization with server</quote>). Under ordinary circumstances it's quite far-fetched that data could be continuously - transmitted more quickly than the <function>recv()</> loop can + transmitted more quickly than the <function>recv()</function> loop can absorb it, but this has been observed when the client is artificially slowed by scheduler constraints. </para> @@ -2122,15 +2122,15 @@ <listitem> <para> - Ensure that LDAP lookup attempts in <application>libpq</> time out as + Ensure that LDAP lookup attempts in <application>libpq</application> time out as intended (Laurenz Albe) </para> </listitem> <listitem> <para> - Fix <application>ecpg</> to do the right thing when an array - of <type>char *</> is the target for a FETCH statement returning more + Fix <application>ecpg</application> to do the right thing when an array + of <type>char *</type> is the target for a FETCH statement returning more than one row, as well as some other array-handling fixes (Ashutosh Bapat) </para> @@ -2138,20 +2138,20 @@ <listitem> <para> - Fix <application>pg_restore</>'s processing of old-style large object + Fix <application>pg_restore</application>'s processing of old-style large object comments (Tom Lane) </para> <para> A direct-to-database restore from an archive file generated by a - pre-9.0 version of <application>pg_dump</> would usually fail if the + pre-9.0 version of <application>pg_dump</application> would usually fail if the archive contained more than a few comments for large objects. </para> </listitem> <listitem> <para> - In <filename>contrib/pgcrypto</> functions, ensure sensitive + In <filename>contrib/pgcrypto</filename> functions, ensure sensitive information is cleared from stack variables before returning (Marko Kreen) </para> @@ -2159,20 +2159,20 @@ <listitem> <para> - In <filename>contrib/uuid-ossp</>, cache the state of the OSSP UUID + In <filename>contrib/uuid-ossp</filename>, cache the state of the OSSP UUID library across calls (Tom Lane) </para> <para> This improves the efficiency of UUID generation and reduces the amount - of entropy drawn from <filename>/dev/urandom</>, on platforms that + of entropy drawn from <filename>/dev/urandom</filename>, on platforms that have that. </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2014e + Update time zone data files to <application>tzdata</application> release 2014e for DST law changes in Crimea, Egypt, and Morocco. </para> </listitem> @@ -2232,7 +2232,7 @@ <listitem> <para> Avoid race condition in checking transaction commit status during - receipt of a <command>NOTIFY</> message (Marko Tiikkaja) + receipt of a <command>NOTIFY</command> message (Marko Tiikkaja) </para> <para> @@ -2256,7 +2256,7 @@ <listitem> <para> - Remove incorrect code that tried to allow <literal>OVERLAPS</> with + Remove incorrect code that tried to allow <literal>OVERLAPS</literal> with single-element row arguments (Joshua Yanovski) </para> @@ -2269,17 +2269,17 @@ <listitem> <para> - Avoid getting more than <literal>AccessShareLock</> when de-parsing a + Avoid getting more than <literal>AccessShareLock</literal> when de-parsing a rule or view (Dean Rasheed) </para> <para> - This oversight resulted in <application>pg_dump</> unexpectedly - acquiring <literal>RowExclusiveLock</> locks on tables mentioned as - the targets of <literal>INSERT</>/<literal>UPDATE</>/<literal>DELETE</> + This oversight resulted in <application>pg_dump</application> unexpectedly + acquiring <literal>RowExclusiveLock</literal> locks on tables mentioned as + the targets of <literal>INSERT</literal>/<literal>UPDATE</literal>/<literal>DELETE</literal> commands in rules. While usually harmless, that could interfere with concurrent transactions that tried to acquire, for example, - <literal>ShareLock</> on those tables. + <literal>ShareLock</literal> on those tables. </para> </listitem> @@ -2305,26 +2305,26 @@ <listitem> <para> - Prevent interrupts while reporting non-<literal>ERROR</> messages + Prevent interrupts while reporting non-<literal>ERROR</literal> messages (Tom Lane) </para> <para> This guards against rare server-process freezeups due to recursive - entry to <function>syslog()</>, and perhaps other related problems. + entry to <function>syslog()</function>, and perhaps other related problems. </para> </listitem> <listitem> <para> - Prevent intermittent <quote>could not reserve shared memory region</> + Prevent intermittent <quote>could not reserve shared memory region</quote> failures on recent Windows versions (MauMau) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2014a + Update time zone data files to <application>tzdata</application> release 2014a for DST law changes in Fiji and Turkey, plus historical changes in Israel and Ukraine. </para> @@ -2370,19 +2370,19 @@ <listitem> <para> - Shore up <literal>GRANT ... WITH ADMIN OPTION</> restrictions + Shore up <literal>GRANT ... WITH ADMIN OPTION</literal> restrictions (Noah Misch) </para> <para> - Granting a role without <literal>ADMIN OPTION</> is supposed to + Granting a role without <literal>ADMIN OPTION</literal> is supposed to prevent the grantee from adding or removing members from the granted role, but this restriction was easily bypassed by doing <literal>SET - ROLE</> first. The security impact is mostly that a role member can + ROLE</literal> first. The security impact is mostly that a role member can revoke the access of others, contrary to the wishes of his grantor. Unapproved role member additions are a lesser concern, since an uncooperative role member could provide most of his rights to others - anyway by creating views or <literal>SECURITY DEFINER</> functions. + anyway by creating views or <literal>SECURITY DEFINER</literal> functions. (CVE-2014-0060) </para> </listitem> @@ -2395,7 +2395,7 @@ <para> The primary role of PL validator functions is to be called implicitly - during <command>CREATE FUNCTION</>, but they are also normal SQL + during <command>CREATE FUNCTION</command>, but they are also normal SQL functions that a user can call explicitly. Calling a validator on a function actually written in some other language was not checked for and could be exploited for privilege-escalation purposes. @@ -2415,7 +2415,7 @@ <para> If the name lookups come to different conclusions due to concurrent activity, we might perform some parts of the DDL on a different table - than other parts. At least in the case of <command>CREATE INDEX</>, + than other parts. At least in the case of <command>CREATE INDEX</command>, this can be used to cause the permissions checks to be performed against a different table than the index creation, allowing for a privilege escalation attack. @@ -2429,12 +2429,12 @@ </para> <para> - The <literal>MAXDATELEN</> constant was too small for the longest - possible value of type <type>interval</>, allowing a buffer overrun - in <function>interval_out()</>. Although the datetime input + The <literal>MAXDATELEN</literal> constant was too small for the longest + possible value of type <type>interval</type>, allowing a buffer overrun + in <function>interval_out()</function>. Although the datetime input functions were more careful about avoiding buffer overrun, the limit was short enough to cause them to reject some valid inputs, such as - input containing a very long timezone name. The <application>ecpg</> + input containing a very long timezone name. The <application>ecpg</application> library contained these vulnerabilities along with some of its own. (CVE-2014-0063) </para> @@ -2461,7 +2461,7 @@ </para> <para> - Use <function>strlcpy()</> and related functions to provide a clear + Use <function>strlcpy()</function> and related functions to provide a clear guarantee that fixed-size buffers are not overrun. Unlike the preceding items, it is unclear whether these cases really represent live issues, since in most cases there appear to be previous @@ -2473,35 +2473,35 @@ <listitem> <para> - Avoid crashing if <function>crypt()</> returns NULL (Honza Horak, + Avoid crashing if <function>crypt()</function> returns NULL (Honza Horak, Bruce Momjian) </para> <para> - There are relatively few scenarios in which <function>crypt()</> - could return NULL, but <filename>contrib/chkpass</> would crash + There are relatively few scenarios in which <function>crypt()</function> + could return NULL, but <filename>contrib/chkpass</filename> would crash if it did. One practical case in which this could be an issue is - if <application>libc</> is configured to refuse to execute unapproved - hashing algorithms (e.g., <quote>FIPS mode</>). + if <application>libc</application> is configured to refuse to execute unapproved + hashing algorithms (e.g., <quote>FIPS mode</quote>). (CVE-2014-0066) </para> </listitem> <listitem> <para> - Document risks of <literal>make check</> in the regression testing + Document risks of <literal>make check</literal> in the regression testing instructions (Noah Misch, Tom Lane) </para> <para> - Since the temporary server started by <literal>make check</> - uses <quote>trust</> authentication, another user on the same machine + Since the temporary server started by <literal>make check</literal> + uses <quote>trust</quote> authentication, another user on the same machine could connect to it as database superuser, and then potentially exploit the privileges of the operating-system user who started the tests. A future release will probably incorporate changes in the testing procedure to prevent this risk, but some public discussion is needed first. So for the moment, just warn people against using - <literal>make check</> when there are untrusted users on the + <literal>make check</literal> when there are untrusted users on the same machine. (CVE-2014-0067) </para> @@ -2516,7 +2516,7 @@ <para> The WAL update could be applied to the wrong page, potentially many pages past where it should have been. Aside from corrupting data, - this error has been observed to result in significant <quote>bloat</> + this error has been observed to result in significant <quote>bloat</quote> of standby servers compared to their masters, due to updates being applied far beyond where the end-of-file should have been. This failure mode does not appear to be a significant risk during crash @@ -2536,20 +2536,20 @@ was already consistent at the start of replay, thus possibly allowing hot-standby queries before the database was really consistent. Other symptoms such as <quote>PANIC: WAL contains references to invalid - pages</> were also possible. + pages</quote> were also possible. </para> </listitem> <listitem> <para> Fix improper locking of btree index pages while replaying - a <literal>VACUUM</> operation in hot-standby mode (Andres Freund, + a <literal>VACUUM</literal> operation in hot-standby mode (Andres Freund, Heikki Linnakangas, Tom Lane) </para> <para> This error could result in <quote>PANIC: WAL contains references to - invalid pages</> failures. + invalid pages</quote> failures. </para> </listitem> @@ -2572,25 +2572,25 @@ <para> Ensure that signal handlers don't attempt to use the - process's <varname>MyProc</> pointer after it's no longer valid. + process's <varname>MyProc</varname> pointer after it's no longer valid. </para> </listitem> <listitem> <para> - Fix unsafe references to <varname>errno</> within error reporting + Fix unsafe references to <varname>errno</varname> within error reporting logic (Christian Kruse) </para> <para> This would typically lead to odd behaviors such as missing or - inappropriate <literal>HINT</> fields. + inappropriate <literal>HINT</literal> fields. </para> </listitem> <listitem> <para> - Fix possible crashes from using <function>ereport()</> too early + Fix possible crashes from using <function>ereport()</function> too early during server startup (Tom Lane) </para> @@ -2614,7 +2614,7 @@ <listitem> <para> - Fix length checking for Unicode identifiers (<literal>U&"..."</> + Fix length checking for Unicode identifiers (<literal>U&"..."</literal> syntax) containing escapes (Tom Lane) </para> @@ -2634,26 +2634,26 @@ <para> A previous patch allowed such keywords to be used without quoting in places such as role identifiers; but it missed cases where a - list of role identifiers was permitted, such as <literal>DROP ROLE</>. + list of role identifiers was permitted, such as <literal>DROP ROLE</literal>. </para> </listitem> <listitem> <para> Fix possible crash due to invalid plan for nested sub-selects, such - as <literal>WHERE (... x IN (SELECT ...) ...) IN (SELECT ...)</> + as <literal>WHERE (... x IN (SELECT ...) ...) IN (SELECT ...)</literal> (Tom Lane) </para> </listitem> <listitem> <para> - Ensure that <command>ANALYZE</> creates statistics for a table column - even when all the values in it are <quote>too wide</> (Tom Lane) + Ensure that <command>ANALYZE</command> creates statistics for a table column + even when all the values in it are <quote>too wide</quote> (Tom Lane) </para> <para> - <command>ANALYZE</> intentionally omits very wide values from its + <command>ANALYZE</command> intentionally omits very wide values from its histogram and most-common-values calculations, but it neglected to do something sane in the case that all the sampled entries are too wide. </para> @@ -2661,21 +2661,21 @@ <listitem> <para> - In <literal>ALTER TABLE ... SET TABLESPACE</>, allow the database's + In <literal>ALTER TABLE ... SET TABLESPACE</literal>, allow the database's default tablespace to be used without a permissions check (Stephen Frost) </para> <para> - <literal>CREATE TABLE</> has always allowed such usage, - but <literal>ALTER TABLE</> didn't get the memo. + <literal>CREATE TABLE</literal> has always allowed such usage, + but <literal>ALTER TABLE</literal> didn't get the memo. </para> </listitem> <listitem> <para> - Fix <quote>cannot accept a set</> error when some arms of - a <literal>CASE</> return a set and others don't (Tom Lane) + Fix <quote>cannot accept a set</quote> error when some arms of + a <literal>CASE</literal> return a set and others don't (Tom Lane) </para> </listitem> @@ -2700,12 +2700,12 @@ <listitem> <para> - Fix possible misbehavior in <function>plainto_tsquery()</> + Fix possible misbehavior in <function>plainto_tsquery()</function> (Heikki Linnakangas) </para> <para> - Use <function>memmove()</> not <function>memcpy()</> for copying + Use <function>memmove()</function> not <function>memcpy()</function> for copying overlapping memory regions. There have been no field reports of this actually causing trouble, but it's certainly risky. </para> @@ -2713,51 +2713,51 @@ <listitem> <para> - Accept <literal>SHIFT_JIS</> as an encoding name for locale checking + Accept <literal>SHIFT_JIS</literal> as an encoding name for locale checking purposes (Tatsuo Ishii) </para> </listitem> <listitem> <para> - Fix misbehavior of <function>PQhost()</> on Windows (Fujii Masao) + Fix misbehavior of <function>PQhost()</function> on Windows (Fujii Masao) </para> <para> - It should return <literal>localhost</> if no host has been specified. + It should return <literal>localhost</literal> if no host has been specified. </para> </listitem> <listitem> <para> - Improve error handling in <application>libpq</> and <application>psql</> - for failures during <literal>COPY TO STDOUT/FROM STDIN</> (Tom Lane) + Improve error handling in <application>libpq</application> and <application>psql</application> + for failures during <literal>COPY TO STDOUT/FROM STDIN</literal> (Tom Lane) </para> <para> In particular this fixes an infinite loop that could occur in 9.2 and up if the server connection was lost during <literal>COPY FROM - STDIN</>. Variants of that scenario might be possible in older + STDIN</literal>. Variants of that scenario might be possible in older versions, or with other client applications. </para> </listitem> <listitem> <para> - Fix misaligned descriptors in <application>ecpg</> (MauMau) + Fix misaligned descriptors in <application>ecpg</application> (MauMau) </para> </listitem> <listitem> <para> - In <application>ecpg</>, handle lack of a hostname in the connection + In <application>ecpg</application>, handle lack of a hostname in the connection parameters properly (Michael Meskes) </para> </listitem> <listitem> <para> - Fix performance regression in <filename>contrib/dblink</> connection + Fix performance regression in <filename>contrib/dblink</filename> connection startup (Joe Conway) </para> @@ -2768,7 +2768,7 @@ <listitem> <para> - In <filename>contrib/isn</>, fix incorrect calculation of the check + In <filename>contrib/isn</filename>, fix incorrect calculation of the check digit for ISMN values (Fabien Coelho) </para> </listitem> @@ -2782,28 +2782,28 @@ <listitem> <para> - In Mingw and Cygwin builds, install the <application>libpq</> DLL - in the <filename>bin</> directory (Andrew Dunstan) + In Mingw and Cygwin builds, install the <application>libpq</application> DLL + in the <filename>bin</filename> directory (Andrew Dunstan) </para> <para> This duplicates what the MSVC build has long done. It should fix - problems with programs like <application>psql</> failing to start + problems with programs like <application>psql</application> failing to start because they can't find the DLL. </para> </listitem> <listitem> <para> - Avoid using the deprecated <literal>dllwrap</> tool in Cygwin builds + Avoid using the deprecated <literal>dllwrap</literal> tool in Cygwin builds (Marco Atzeri) </para> </listitem> <listitem> <para> - Don't generate plain-text <filename>HISTORY</> - and <filename>src/test/regress/README</> files anymore (Tom Lane) + Don't generate plain-text <filename>HISTORY</filename> + and <filename>src/test/regress/README</filename> files anymore (Tom Lane) </para> <para> @@ -2812,20 +2812,20 @@ the likely audience for plain-text format. Distribution tarballs will still contain files by these names, but they'll just be stubs directing the reader to consult the main documentation. - The plain-text <filename>INSTALL</> file will still be maintained, as + The plain-text <filename>INSTALL</filename> file will still be maintained, as there is arguably a use-case for that. </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2013i + Update time zone data files to <application>tzdata</application> release 2013i for DST law changes in Jordan and historical changes in Cuba. </para> <para> - In addition, the zones <literal>Asia/Riyadh87</>, - <literal>Asia/Riyadh88</>, and <literal>Asia/Riyadh89</> have been + In addition, the zones <literal>Asia/Riyadh87</literal>, + <literal>Asia/Riyadh88</literal>, and <literal>Asia/Riyadh89</literal> have been removed, as they are no longer maintained by IANA, and never represented actual civil timekeeping practice. </para> @@ -2877,13 +2877,13 @@ <listitem> <para> - Fix <command>VACUUM</>'s tests to see whether it can - update <structfield>relfrozenxid</> (Andres Freund) + Fix <command>VACUUM</command>'s tests to see whether it can + update <structfield>relfrozenxid</structfield> (Andres Freund) </para> <para> - In some cases <command>VACUUM</> (either manual or autovacuum) could - incorrectly advance a table's <structfield>relfrozenxid</> value, + In some cases <command>VACUUM</command> (either manual or autovacuum) could + incorrectly advance a table's <structfield>relfrozenxid</structfield> value, allowing tuples to escape freezing, causing those rows to become invisible once 2^31 transactions have elapsed. The probability of data loss is fairly low since multiple incorrect advancements would @@ -2895,18 +2895,18 @@ <para> The issue can be ameliorated by, after upgrading, vacuuming all tables in all databases while having <link - linkend="guc-vacuum-freeze-table-age"><varname>vacuum_freeze_table_age</></link> + linkend="guc-vacuum-freeze-table-age"><varname>vacuum_freeze_table_age</varname></link> set to zero. This will fix any latent corruption but will not be able to fix all pre-existing data errors. However, an installation can be presumed safe after performing this vacuuming if it has executed fewer than 2^31 update transactions in its lifetime (check this with - <literal>SELECT txid_current() < 2^31</>). + <literal>SELECT txid_current() < 2^31</literal>). </para> </listitem> <listitem> <para> - Fix initialization of <filename>pg_clog</> and <filename>pg_subtrans</> + Fix initialization of <filename>pg_clog</filename> and <filename>pg_subtrans</filename> during hot standby startup (Andres Freund, Heikki Linnakangas) </para> @@ -2932,7 +2932,7 @@ <listitem> <para> - Truncate <filename>pg_multixact</> contents during WAL replay + Truncate <filename>pg_multixact</filename> contents during WAL replay (Andres Freund) </para> @@ -2954,8 +2954,8 @@ <listitem> <para> - Avoid flattening a subquery whose <literal>SELECT</> list contains a - volatile function wrapped inside a sub-<literal>SELECT</> (Tom Lane) + Avoid flattening a subquery whose <literal>SELECT</literal> list contains a + volatile function wrapped inside a sub-<literal>SELECT</literal> (Tom Lane) </para> <para> @@ -2972,7 +2972,7 @@ <para> This error could lead to incorrect plans for queries involving - multiple levels of subqueries within <literal>JOIN</> syntax. + multiple levels of subqueries within <literal>JOIN</literal> syntax. </para> </listitem> @@ -2990,13 +2990,13 @@ <listitem> <para> - Fix array slicing of <type>int2vector</> and <type>oidvector</> values + Fix array slicing of <type>int2vector</type> and <type>oidvector</type> values (Tom Lane) </para> <para> Expressions of this kind are now implicitly promoted to - regular <type>int2</> or <type>oid</> arrays. + regular <type>int2</type> or <type>oid</type> arrays. </para> </listitem> @@ -3010,7 +3010,7 @@ In some cases, the system would use the simple GMT offset value when it should have used the regular timezone setting that had prevailed before the simple offset was selected. This change also causes - the <function>timeofday</> function to honor the simple GMT offset + the <function>timeofday</function> function to honor the simple GMT offset zone. </para> </listitem> @@ -3024,7 +3024,7 @@ <listitem> <para> - Properly quote generated command lines in <application>pg_ctl</> + Properly quote generated command lines in <application>pg_ctl</application> (Naoya Anzai and Tom Lane) </para> @@ -3035,10 +3035,10 @@ <listitem> <para> - Fix <application>pg_dumpall</> to work when a source database + Fix <application>pg_dumpall</application> to work when a source database sets <link - linkend="guc-default-transaction-read-only"><varname>default_transaction_read_only</></link> - via <command>ALTER DATABASE SET</> (Kevin Grittner) + linkend="guc-default-transaction-read-only"><varname>default_transaction_read_only</varname></link> + via <command>ALTER DATABASE SET</command> (Kevin Grittner) </para> <para> @@ -3048,21 +3048,21 @@ <listitem> <para> - Fix <application>ecpg</>'s processing of lists of variables - declared <type>varchar</> (Zoltán Böszörményi) + Fix <application>ecpg</application>'s processing of lists of variables + declared <type>varchar</type> (Zoltán Böszörményi) </para> </listitem> <listitem> <para> - Make <filename>contrib/lo</> defend against incorrect trigger definitions + Make <filename>contrib/lo</filename> defend against incorrect trigger definitions (Marc Cousin) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2013h + Update time zone data files to <application>tzdata</application> release 2013h for DST law changes in Argentina, Brazil, Jordan, Libya, Liechtenstein, Morocco, and Palestine. Also, new timezone abbreviations WIB, WIT, WITA for Indonesia. @@ -3114,7 +3114,7 @@ </para> <para> - <productname>PostgreSQL</> case-folds non-ASCII characters only + <productname>PostgreSQL</productname> case-folds non-ASCII characters only when using a single-byte server encoding. </para> </listitem> @@ -3122,7 +3122,7 @@ <listitem> <para> Fix checkpoint memory leak in background writer when <literal>wal_level = - hot_standby</> (Naoya Anzai) + hot_standby</literal> (Naoya Anzai) </para> </listitem> @@ -3135,7 +3135,7 @@ <listitem> <para> - Fix memory overcommit bug when <varname>work_mem</> is using more + Fix memory overcommit bug when <varname>work_mem</varname> is using more than 24GB of memory (Stephen Frost) </para> </listitem> @@ -3160,29 +3160,29 @@ </para> <para> - Previously tests like <literal>col IS NOT TRUE</> and <literal>col IS - NOT FALSE</> did not properly factor in NULL values when estimating + Previously tests like <literal>col IS NOT TRUE</literal> and <literal>col IS + NOT FALSE</literal> did not properly factor in NULL values when estimating plan costs. </para> </listitem> <listitem> <para> - Prevent pushing down <literal>WHERE</> clauses into unsafe - <literal>UNION/INTERSECT</> subqueries (Tom Lane) + Prevent pushing down <literal>WHERE</literal> clauses into unsafe + <literal>UNION/INTERSECT</literal> subqueries (Tom Lane) </para> <para> - Subqueries of a <literal>UNION</> or <literal>INTERSECT</> that + Subqueries of a <literal>UNION</literal> or <literal>INTERSECT</literal> that contain set-returning functions or volatile functions in their - <literal>SELECT</> lists could be improperly optimized, leading to + <literal>SELECT</literal> lists could be improperly optimized, leading to run-time errors or incorrect query results. </para> </listitem> <listitem> <para> - Fix rare case of <quote>failed to locate grouping columns</> + Fix rare case of <quote>failed to locate grouping columns</quote> planner failure (Tom Lane) </para> </listitem> @@ -3196,37 +3196,37 @@ <listitem> <para> - Properly record index comments created using <literal>UNIQUE</> - and <literal>PRIMARY KEY</> syntax (Andres Freund) + Properly record index comments created using <literal>UNIQUE</literal> + and <literal>PRIMARY KEY</literal> syntax (Andres Freund) </para> <para> - This fixes a parallel <application>pg_restore</> failure. + This fixes a parallel <application>pg_restore</application> failure. </para> </listitem> <listitem> <para> - Fix <command>REINDEX TABLE</> and <command>REINDEX DATABASE</> + Fix <command>REINDEX TABLE</command> and <command>REINDEX DATABASE</command> to properly revalidate constraints and mark invalidated indexes as valid (Noah Misch) </para> <para> - <command>REINDEX INDEX</> has always worked properly. + <command>REINDEX INDEX</command> has always worked properly. </para> </listitem> <listitem> <para> Fix possible deadlock during concurrent <command>CREATE INDEX - CONCURRENTLY</> operations (Tom Lane) + CONCURRENTLY</command> operations (Tom Lane) </para> </listitem> <listitem> <para> - Fix <function>regexp_matches()</> handling of zero-length matches + Fix <function>regexp_matches()</function> handling of zero-length matches (Jeevan Chalke) </para> @@ -3250,14 +3250,14 @@ <listitem> <para> - Prevent <command>CREATE FUNCTION</> from checking <command>SET</> + Prevent <command>CREATE FUNCTION</command> from checking <command>SET</command> variables unless function body checking is enabled (Tom Lane) </para> </listitem> <listitem> <para> - Allow <command>ALTER DEFAULT PRIVILEGES</> to operate on schemas + Allow <command>ALTER DEFAULT PRIVILEGES</command> to operate on schemas without requiring CREATE permission (Tom Lane) </para> </listitem> @@ -3269,16 +3269,16 @@ <para> Specifically, lessen keyword restrictions for role names, language - names, <command>EXPLAIN</> and <command>COPY</> options, and - <command>SET</> values. This allows <literal>COPY ... (FORMAT - BINARY)</> to work as expected; previously <literal>BINARY</> needed + names, <command>EXPLAIN</command> and <command>COPY</command> options, and + <command>SET</command> values. This allows <literal>COPY ... (FORMAT + BINARY)</literal> to work as expected; previously <literal>BINARY</literal> needed to be quoted. </para> </listitem> <listitem> <para> - Fix <function>pgp_pub_decrypt()</> so it works for secret keys with + Fix <function>pgp_pub_decrypt()</function> so it works for secret keys with passwords (Marko Kreen) </para> </listitem> @@ -3292,7 +3292,7 @@ <listitem> <para> - Ensure that <command>VACUUM ANALYZE</> still runs the ANALYZE phase + Ensure that <command>VACUUM ANALYZE</command> still runs the ANALYZE phase if its attempt to truncate the file is cancelled due to lock conflicts (Kevin Grittner) </para> @@ -3308,14 +3308,14 @@ <listitem> <para> Ensure that floating-point data input accepts standard spellings - of <quote>infinity</> on all platforms (Tom Lane) + of <quote>infinity</quote> on all platforms (Tom Lane) </para> <para> - The C99 standard says that allowable spellings are <literal>inf</>, - <literal>+inf</>, <literal>-inf</>, <literal>infinity</>, - <literal>+infinity</>, and <literal>-infinity</>. Make sure we - recognize these even if the platform's <function>strtod</> function + The C99 standard says that allowable spellings are <literal>inf</literal>, + <literal>+inf</literal>, <literal>-inf</literal>, <literal>infinity</literal>, + <literal>+infinity</literal>, and <literal>-infinity</literal>. Make sure we + recognize these even if the platform's <function>strtod</function> function doesn't. </para> </listitem> @@ -3329,7 +3329,7 @@ <listitem> <para> - Update time zone data files to <application>tzdata</> release 2013d + Update time zone data files to <application>tzdata</application> release 2013d for DST law changes in Israel, Morocco, Palestine, and Paraguay. Also, historical zone data corrections for Macquarie Island. </para> @@ -3364,7 +3364,7 @@ <para> However, this release corrects several errors in management of GiST indexes. After installing this update, it is advisable to - <command>REINDEX</> any GiST indexes that meet one or more of the + <command>REINDEX</command> any GiST indexes that meet one or more of the conditions described below. </para> @@ -3388,7 +3388,7 @@ <para> A connection request containing a database name that begins with - <quote><literal>-</></quote> could be crafted to damage or destroy + <quote><literal>-</literal></quote> could be crafted to damage or destroy files within the server's data directory, even if the request is eventually rejected. (CVE-2013-1899) </para> @@ -3402,41 +3402,41 @@ <para> This avoids a scenario wherein random numbers generated by - <filename>contrib/pgcrypto</> functions might be relatively easy for + <filename>contrib/pgcrypto</filename> functions might be relatively easy for another database user to guess. The risk is only significant when - the postmaster is configured with <varname>ssl</> = <literal>on</> + the postmaster is configured with <varname>ssl</varname> = <literal>on</literal> but most connections don't use SSL encryption. (CVE-2013-1900) </para> </listitem> <listitem> <para> - Fix GiST indexes to not use <quote>fuzzy</> geometric comparisons when + Fix GiST indexes to not use <quote>fuzzy</quote> geometric comparisons when it's not appropriate to do so (Alexander Korotkov) </para> <para> - The core geometric types perform comparisons using <quote>fuzzy</> - equality, but <function>gist_box_same</> must do exact comparisons, + The core geometric types perform comparisons using <quote>fuzzy</quote> + equality, but <function>gist_box_same</function> must do exact comparisons, else GiST indexes using it might become inconsistent. After installing - this update, users should <command>REINDEX</> any GiST indexes on - <type>box</>, <type>polygon</>, <type>circle</>, or <type>point</> - columns, since all of these use <function>gist_box_same</>. + this update, users should <command>REINDEX</command> any GiST indexes on + <type>box</type>, <type>polygon</type>, <type>circle</type>, or <type>point</type> + columns, since all of these use <function>gist_box_same</function>. </para> </listitem> <listitem> <para> Fix erroneous range-union and penalty logic in GiST indexes that use - <filename>contrib/btree_gist</> for variable-width data types, that is - <type>text</>, <type>bytea</>, <type>bit</>, and <type>numeric</> + <filename>contrib/btree_gist</filename> for variable-width data types, that is + <type>text</type>, <type>bytea</type>, <type>bit</type>, and <type>numeric</type> columns (Tom Lane) </para> <para> These errors could result in inconsistent indexes in which some keys that are present would not be found by searches, and also in useless - index bloat. Users are advised to <command>REINDEX</> such indexes + index bloat. Users are advised to <command>REINDEX</command> such indexes after installing this update. </para> </listitem> @@ -3451,21 +3451,21 @@ These errors could result in inconsistent indexes in which some keys that are present would not be found by searches, and also in indexes that are unnecessarily inefficient to search. Users are advised to - <command>REINDEX</> multi-column GiST indexes after installing this + <command>REINDEX</command> multi-column GiST indexes after installing this update. </para> </listitem> <listitem> <para> - Fix <function>gist_point_consistent</> + Fix <function>gist_point_consistent</function> to handle fuzziness consistently (Alexander Korotkov) </para> <para> - Index scans on GiST indexes on <type>point</> columns would sometimes + Index scans on GiST indexes on <type>point</type> columns would sometimes yield results different from a sequential scan, because - <function>gist_point_consistent</> disagreed with the underlying + <function>gist_point_consistent</function> disagreed with the underlying operator code about whether to do comparisons exactly or fuzzily. </para> </listitem> @@ -3476,21 +3476,21 @@ </para> <para> - This bug could result in <quote>incorrect local pin count</> errors + This bug could result in <quote>incorrect local pin count</quote> errors during replay, making recovery impossible. </para> </listitem> <listitem> <para> - Fix race condition in <command>DELETE RETURNING</> (Tom Lane) + Fix race condition in <command>DELETE RETURNING</command> (Tom Lane) </para> <para> - Under the right circumstances, <command>DELETE RETURNING</> could + Under the right circumstances, <command>DELETE RETURNING</command> could attempt to fetch data from a shared buffer that the current process no longer has any pin on. If some other process changed the buffer - meanwhile, this would lead to garbage <literal>RETURNING</> output, or + meanwhile, this would lead to garbage <literal>RETURNING</literal> output, or even a crash. </para> </listitem> @@ -3511,28 +3511,28 @@ <listitem> <para> - Fix <function>to_char()</> to use ASCII-only case-folding rules where + Fix <function>to_char()</function> to use ASCII-only case-folding rules where appropriate (Tom Lane) </para> <para> This fixes misbehavior of some template patterns that should be - locale-independent, but mishandled <quote><literal>I</></quote> and - <quote><literal>i</></quote> in Turkish locales. + locale-independent, but mishandled <quote><literal>I</literal></quote> and + <quote><literal>i</literal></quote> in Turkish locales. </para> </listitem> <listitem> <para> - Fix unwanted rejection of timestamp <literal>1999-12-31 24:00:00</> + Fix unwanted rejection of timestamp <literal>1999-12-31 24:00:00</literal> (Tom Lane) </para> </listitem> <listitem> <para> - Fix logic error when a single transaction does <command>UNLISTEN</> - then <command>LISTEN</> (Tom Lane) + Fix logic error when a single transaction does <command>UNLISTEN</command> + then <command>LISTEN</command> (Tom Lane) </para> <para> @@ -3543,7 +3543,7 @@ <listitem> <para> - Remove useless <quote>picksplit doesn't support secondary split</> log + Remove useless <quote>picksplit doesn't support secondary split</quote> log messages (Josh Hansen, Tom Lane) </para> @@ -3564,29 +3564,29 @@ <listitem> <para> - Eliminate memory leaks in PL/Perl's <function>spi_prepare()</> function + Eliminate memory leaks in PL/Perl's <function>spi_prepare()</function> function (Alex Hunsaker, Tom Lane) </para> </listitem> <listitem> <para> - Fix <application>pg_dumpall</> to handle database names containing - <quote><literal>=</></quote> correctly (Heikki Linnakangas) + Fix <application>pg_dumpall</application> to handle database names containing + <quote><literal>=</literal></quote> correctly (Heikki Linnakangas) </para> </listitem> <listitem> <para> - Avoid crash in <application>pg_dump</> when an incorrect connection + Avoid crash in <application>pg_dump</application> when an incorrect connection string is given (Heikki Linnakangas) </para> </listitem> <listitem> <para> - Ignore invalid indexes in <application>pg_dump</> and - <application>pg_upgrade</> (Michael Paquier, Bruce Momjian) + Ignore invalid indexes in <application>pg_dump</application> and + <application>pg_upgrade</application> (Michael Paquier, Bruce Momjian) </para> <para> @@ -3595,26 +3595,26 @@ a uniqueness condition not satisfied by the table's data. Also, if the index creation is in fact still in progress, it seems reasonable to consider it to be an uncommitted DDL change, which - <application>pg_dump</> wouldn't be expected to dump anyway. - <application>pg_upgrade</> now also skips invalid indexes rather than + <application>pg_dump</application> wouldn't be expected to dump anyway. + <application>pg_upgrade</application> now also skips invalid indexes rather than failing. </para> </listitem> <listitem> <para> - Fix <filename>contrib/pg_trgm</>'s <function>similarity()</> function + Fix <filename>contrib/pg_trgm</filename>'s <function>similarity()</function> function to return zero for trigram-less strings (Tom Lane) </para> <para> - Previously it returned <literal>NaN</> due to internal division by zero. + Previously it returned <literal>NaN</literal> due to internal division by zero. </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2013b + Update time zone data files to <application>tzdata</application> release 2013b for DST law changes in Chile, Haiti, Morocco, Paraguay, and some Russian areas. Also, historical zone data corrections for numerous places. @@ -3622,12 +3622,12 @@ <para> Also, update the time zone abbreviation files for recent changes in - Russia and elsewhere: <literal>CHOT</>, <literal>GET</>, - <literal>IRKT</>, <literal>KGT</>, <literal>KRAT</>, <literal>MAGT</>, - <literal>MAWT</>, <literal>MSK</>, <literal>NOVT</>, <literal>OMST</>, - <literal>TKT</>, <literal>VLAT</>, <literal>WST</>, <literal>YAKT</>, - <literal>YEKT</> now follow their current meanings, and - <literal>VOLT</> (Europe/Volgograd) and <literal>MIST</> + Russia and elsewhere: <literal>CHOT</literal>, <literal>GET</literal>, + <literal>IRKT</literal>, <literal>KGT</literal>, <literal>KRAT</literal>, <literal>MAGT</literal>, + <literal>MAWT</literal>, <literal>MSK</literal>, <literal>NOVT</literal>, <literal>OMST</literal>, + <literal>TKT</literal>, <literal>VLAT</literal>, <literal>WST</literal>, <literal>YAKT</literal>, + <literal>YEKT</literal> now follow their current meanings, and + <literal>VOLT</literal> (Europe/Volgograd) and <literal>MIST</literal> (Antarctica/Macquarie) are added to the default abbreviations list. </para> </listitem> @@ -3672,7 +3672,7 @@ <listitem> <para> - Prevent execution of <function>enum_recv</> from SQL (Tom Lane) + Prevent execution of <function>enum_recv</function> from SQL (Tom Lane) </para> <para> @@ -3742,19 +3742,19 @@ <listitem> <para> Protect against race conditions when scanning - <structname>pg_tablespace</> (Stephen Frost, Tom Lane) + <structname>pg_tablespace</structname> (Stephen Frost, Tom Lane) </para> <para> - <command>CREATE DATABASE</> and <command>DROP DATABASE</> could + <command>CREATE DATABASE</command> and <command>DROP DATABASE</command> could misbehave if there were concurrent updates of - <structname>pg_tablespace</> entries. + <structname>pg_tablespace</structname> entries. </para> </listitem> <listitem> <para> - Prevent <command>DROP OWNED</> from trying to drop whole databases or + Prevent <command>DROP OWNED</command> from trying to drop whole databases or tablespaces (Álvaro Herrera) </para> @@ -3766,13 +3766,13 @@ <listitem> <para> Fix error in <link - linkend="guc-vacuum-freeze-table-age"><varname>vacuum_freeze_table_age</></link> + linkend="guc-vacuum-freeze-table-age"><varname>vacuum_freeze_table_age</varname></link> implementation (Andres Freund) </para> <para> In installations that have existed for more than <link - linkend="guc-vacuum-freeze-min-age"><varname>vacuum_freeze_min_age</></link> + linkend="guc-vacuum-freeze-min-age"><varname>vacuum_freeze_min_age</varname></link> transactions, this mistake prevented autovacuum from using partial-table scans, so that a full-table scan would always happen instead. </para> @@ -3780,13 +3780,13 @@ <listitem> <para> - Prevent misbehavior when a <symbol>RowExpr</> or <symbol>XmlExpr</> + Prevent misbehavior when a <symbol>RowExpr</symbol> or <symbol>XmlExpr</symbol> is parse-analyzed twice (Andres Freund, Tom Lane) </para> <para> This mistake could be user-visible in contexts such as - <literal>CREATE TABLE LIKE INCLUDING INDEXES</>. + <literal>CREATE TABLE LIKE INCLUDING INDEXES</literal>. </para> </listitem> @@ -3799,7 +3799,7 @@ <listitem> <para> - Reject out-of-range dates in <function>to_date()</> (Hitoshi Harada) + Reject out-of-range dates in <function>to_date()</function> (Hitoshi Harada) </para> </listitem> @@ -3810,55 +3810,55 @@ </para> <para> - This bug affected <application>psql</> and some other client programs. + This bug affected <application>psql</application> and some other client programs. </para> </listitem> <listitem> <para> - Fix possible crash in <application>psql</>'s <command>\?</> command + Fix possible crash in <application>psql</application>'s <command>\?</command> command when not connected to a database (Meng Qingzhong) </para> </listitem> <listitem> <para> - Fix <application>pg_upgrade</> to deal with invalid indexes safely + Fix <application>pg_upgrade</application> to deal with invalid indexes safely (Bruce Momjian) </para> </listitem> <listitem> <para> - Fix one-byte buffer overrun in <application>libpq</>'s - <function>PQprintTuples</> (Xi Wang) + Fix one-byte buffer overrun in <application>libpq</application>'s + <function>PQprintTuples</function> (Xi Wang) </para> <para> This ancient function is not used anywhere by - <productname>PostgreSQL</> itself, but it might still be used by some + <productname>PostgreSQL</productname> itself, but it might still be used by some client code. </para> </listitem> <listitem> <para> - Make <application>ecpglib</> use translated messages properly + Make <application>ecpglib</application> use translated messages properly (Chen Huajun) </para> </listitem> <listitem> <para> - Properly install <application>ecpg_compat</> and - <application>pgtypes</> libraries on MSVC (Jiang Guiqing) + Properly install <application>ecpg_compat</application> and + <application>pgtypes</application> libraries on MSVC (Jiang Guiqing) </para> </listitem> <listitem> <para> - Include our version of <function>isinf()</> in - <application>libecpg</> if it's not provided by the system + Include our version of <function>isinf()</function> in + <application>libecpg</application> if it's not provided by the system (Jiang Guiqing) </para> </listitem> @@ -3878,15 +3878,15 @@ <listitem> <para> - Make <application>pgxs</> build executables with the right - <literal>.exe</> suffix when cross-compiling for Windows + Make <application>pgxs</application> build executables with the right + <literal>.exe</literal> suffix when cross-compiling for Windows (Zoltan Boszormenyi) </para> </listitem> <listitem> <para> - Add new timezone abbreviation <literal>FET</> (Tom Lane) + Add new timezone abbreviation <literal>FET</literal> (Tom Lane) </para> <para> @@ -3935,13 +3935,13 @@ <listitem> <para> Fix multiple bugs associated with <command>CREATE INDEX - CONCURRENTLY</> (Andres Freund, Tom Lane) + CONCURRENTLY</command> (Andres Freund, Tom Lane) </para> <para> - Fix <command>CREATE INDEX CONCURRENTLY</> to use + Fix <command>CREATE INDEX CONCURRENTLY</command> to use in-place updates when changing the state of an index's - <structname>pg_index</> row. This prevents race conditions that could + <structname>pg_index</structname> row. This prevents race conditions that could cause concurrent sessions to miss updating the target index, thus resulting in corrupt concurrently-created indexes. </para> @@ -3949,8 +3949,8 @@ <para> Also, fix various other operations to ensure that they ignore invalid indexes resulting from a failed <command>CREATE INDEX - CONCURRENTLY</> command. The most important of these is - <command>VACUUM</>, because an auto-vacuum could easily be launched + CONCURRENTLY</command> command. The most important of these is + <command>VACUUM</command>, because an auto-vacuum could easily be launched on the table before corrective action can be taken to fix or remove the invalid index. </para> @@ -3987,13 +3987,13 @@ <para> This oversight could prevent subsequent execution of certain - operations such as <command>CREATE INDEX CONCURRENTLY</>. + operations such as <command>CREATE INDEX CONCURRENTLY</command>. </para> </listitem> <listitem> <para> - Avoid bogus <quote>out-of-sequence timeline ID</> errors in standby + Avoid bogus <quote>out-of-sequence timeline ID</quote> errors in standby mode (Heikki Linnakangas) </para> </listitem> @@ -4026,8 +4026,8 @@ <para> The planner could derive incorrect constraints from a clause equating a non-strict construct to something else, for example - <literal>WHERE COALESCE(foo, 0) = 0</> - when <literal>foo</> is coming from the nullable side of an outer join. + <literal>WHERE COALESCE(foo, 0) = 0</literal> + when <literal>foo</literal> is coming from the nullable side of an outer join. </para> </listitem> @@ -4045,10 +4045,10 @@ </para> <para> - This affects multicolumn <literal>NOT IN</> subplans, such as - <literal>WHERE (a, b) NOT IN (SELECT x, y FROM ...)</> - when for instance <literal>b</> and <literal>y</> are <type>int4</> - and <type>int8</> respectively. This mistake led to wrong answers + This affects multicolumn <literal>NOT IN</literal> subplans, such as + <literal>WHERE (a, b) NOT IN (SELECT x, y FROM ...)</literal> + when for instance <literal>b</literal> and <literal>y</literal> are <type>int4</type> + and <type>int8</type> respectively. This mistake led to wrong answers or crashes depending on the specific datatypes involved. </para> </listitem> @@ -4056,7 +4056,7 @@ <listitem> <para> Acquire buffer lock when re-fetching the old tuple for an - <literal>AFTER ROW UPDATE/DELETE</> trigger (Andres Freund) + <literal>AFTER ROW UPDATE/DELETE</literal> trigger (Andres Freund) </para> <para> @@ -4069,7 +4069,7 @@ <listitem> <para> - Fix <command>ALTER COLUMN TYPE</> to handle inherited check + Fix <command>ALTER COLUMN TYPE</command> to handle inherited check constraints properly (Pavan Deolasee) </para> @@ -4081,14 +4081,14 @@ <listitem> <para> - Fix <command>REASSIGN OWNED</> to handle grants on tablespaces + Fix <command>REASSIGN OWNED</command> to handle grants on tablespaces (Álvaro Herrera) </para> </listitem> <listitem> <para> - Ignore incorrect <structname>pg_attribute</> entries for system + Ignore incorrect <structname>pg_attribute</structname> entries for system columns for views (Tom Lane) </para> @@ -4102,7 +4102,7 @@ <listitem> <para> - Fix rule printing to dump <literal>INSERT INTO <replaceable>table</> + Fix rule printing to dump <literal>INSERT INTO <replaceable>table</replaceable> DEFAULT VALUES</literal> correctly (Tom Lane) </para> </listitem> @@ -4110,7 +4110,7 @@ <listitem> <para> Guard against stack overflow when there are too many - <literal>UNION</>/<literal>INTERSECT</>/<literal>EXCEPT</> clauses + <literal>UNION</literal>/<literal>INTERSECT</literal>/<literal>EXCEPT</literal> clauses in a query (Tom Lane) </para> </listitem> @@ -4132,14 +4132,14 @@ <listitem> <para> Fix failure to advance XID epoch if XID wraparound happens during a - checkpoint and <varname>wal_level</> is <literal>hot_standby</> + checkpoint and <varname>wal_level</varname> is <literal>hot_standby</literal> (Tom Lane, Andres Freund) </para> <para> While this mistake had no particular impact on <productname>PostgreSQL</productname> itself, it was bad for - applications that rely on <function>txid_current()</> and related + applications that rely on <function>txid_current()</function> and related functions: the TXID value would appear to go backwards. </para> </listitem> @@ -4153,7 +4153,7 @@ <para> Formerly, this would result in something quite unhelpful, such as - <quote>Non-recoverable failure in name resolution</>. + <quote>Non-recoverable failure in name resolution</quote>. </para> </listitem> @@ -4166,8 +4166,8 @@ <listitem> <para> - Make <application>pg_ctl</> more robust about reading the - <filename>postmaster.pid</> file (Heikki Linnakangas) + Make <application>pg_ctl</application> more robust about reading the + <filename>postmaster.pid</filename> file (Heikki Linnakangas) </para> <para> @@ -4177,33 +4177,33 @@ <listitem> <para> - Fix possible crash in <application>psql</> if incorrectly-encoded data - is presented and the <varname>client_encoding</> setting is a + Fix possible crash in <application>psql</application> if incorrectly-encoded data + is presented and the <varname>client_encoding</varname> setting is a client-only encoding, such as SJIS (Jiang Guiqing) </para> </listitem> <listitem> <para> - Fix bugs in the <filename>restore.sql</> script emitted by - <application>pg_dump</> in <literal>tar</> output format (Tom Lane) + Fix bugs in the <filename>restore.sql</filename> script emitted by + <application>pg_dump</application> in <literal>tar</literal> output format (Tom Lane) </para> <para> The script would fail outright on tables whose names include upper-case characters. Also, make the script capable of restoring - data in <option>--inserts</> mode as well as the regular COPY mode. + data in <option>--inserts</option> mode as well as the regular COPY mode. </para> </listitem> <listitem> <para> - Fix <application>pg_restore</> to accept POSIX-conformant - <literal>tar</> files (Brian Weaver, Tom Lane) + Fix <application>pg_restore</application> to accept POSIX-conformant + <literal>tar</literal> files (Brian Weaver, Tom Lane) </para> <para> - The original coding of <application>pg_dump</>'s <literal>tar</> + The original coding of <application>pg_dump</application>'s <literal>tar</literal> output mode produced files that are not fully conformant with the POSIX standard. This has been corrected for version 9.3. This patch updates previous branches so that they will accept both the @@ -4214,48 +4214,48 @@ <listitem> <para> - Fix <application>pg_resetxlog</> to locate <filename>postmaster.pid</> + Fix <application>pg_resetxlog</application> to locate <filename>postmaster.pid</filename> correctly when given a relative path to the data directory (Tom Lane) </para> <para> - This mistake could lead to <application>pg_resetxlog</> not noticing + This mistake could lead to <application>pg_resetxlog</application> not noticing that there is an active postmaster using the data directory. </para> </listitem> <listitem> <para> - Fix <application>libpq</>'s <function>lo_import()</> and - <function>lo_export()</> functions to report file I/O errors properly + Fix <application>libpq</application>'s <function>lo_import()</function> and + <function>lo_export()</function> functions to report file I/O errors properly (Tom Lane) </para> </listitem> <listitem> <para> - Fix <application>ecpg</>'s processing of nested structure pointer + Fix <application>ecpg</application>'s processing of nested structure pointer variables (Muhammad Usama) </para> </listitem> <listitem> <para> - Fix <application>ecpg</>'s <function>ecpg_get_data</> function to + Fix <application>ecpg</application>'s <function>ecpg_get_data</function> function to handle arrays properly (Michael Meskes) </para> </listitem> <listitem> <para> - Make <filename>contrib/pageinspect</>'s btree page inspection + Make <filename>contrib/pageinspect</filename>'s btree page inspection functions take buffer locks while examining pages (Tom Lane) </para> </listitem> <listitem> <para> - Fix <application>pgxs</> support for building loadable modules on AIX + Fix <application>pgxs</application> support for building loadable modules on AIX (Tom Lane) </para> @@ -4266,7 +4266,7 @@ <listitem> <para> - Update time zone data files to <application>tzdata</> release 2012j + Update time zone data files to <application>tzdata</application> release 2012j for DST law changes in Cuba, Israel, Jordan, Libya, Palestine, Western Samoa, and portions of Brazil. </para> @@ -4318,7 +4318,7 @@ <para> These errors could result in wrong answers from queries that scan the - same <literal>WITH</> subquery multiple times. + same <literal>WITH</literal> subquery multiple times. </para> </listitem> @@ -4341,10 +4341,10 @@ </para> <para> - If we revoke a grant option from some role <replaceable>X</>, but - <replaceable>X</> still holds that option via a grant from someone + If we revoke a grant option from some role <replaceable>X</replaceable>, but + <replaceable>X</replaceable> still holds that option via a grant from someone else, we should not recursively revoke the corresponding privilege - from role(s) <replaceable>Y</> that <replaceable>X</> had granted it + from role(s) <replaceable>Y</replaceable> that <replaceable>X</replaceable> had granted it to. </para> </listitem> @@ -4358,12 +4358,12 @@ <listitem> <para> - Fix handling of <literal>SIGFPE</> when PL/Perl is in use (Andres Freund) + Fix handling of <literal>SIGFPE</literal> when PL/Perl is in use (Andres Freund) </para> <para> - Perl resets the process's <literal>SIGFPE</> handler to - <literal>SIG_IGN</>, which could result in crashes later on. Restore + Perl resets the process's <literal>SIGFPE</literal> handler to + <literal>SIG_IGN</literal>, which could result in crashes later on. Restore the normal Postgres signal handler after initializing PL/Perl. </para> </listitem> @@ -4382,7 +4382,7 @@ <para> Some Linux distributions contain an incorrect version of - <filename>pthread.h</> that results in incorrect compiled code in + <filename>pthread.h</filename> that results in incorrect compiled code in PL/Perl, leading to crashes if a PL/Perl function calls another one that throws an error. </para> @@ -4390,26 +4390,26 @@ <listitem> <para> - Fix <application>pg_upgrade</>'s handling of line endings on Windows + Fix <application>pg_upgrade</application>'s handling of line endings on Windows (Andrew Dunstan) </para> <para> - Previously, <application>pg_upgrade</> might add or remove carriage + Previously, <application>pg_upgrade</application> might add or remove carriage returns in places such as function bodies. </para> </listitem> <listitem> <para> - On Windows, make <application>pg_upgrade</> use backslash path + On Windows, make <application>pg_upgrade</application> use backslash path separators in the scripts it emits (Andrew Dunstan) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2012f + Update time zone data files to <application>tzdata</application> release 2012f for DST law changes in Fiji </para> </listitem> @@ -4459,7 +4459,7 @@ </para> <para> - <function>xml_parse()</> would attempt to fetch external files or + <function>xml_parse()</function> would attempt to fetch external files or URLs as needed to resolve DTD and entity references in an XML value, thus allowing unprivileged database users to attempt to fetch data with the privileges of the database server. While the external data @@ -4472,22 +4472,22 @@ <listitem> <para> - Prevent access to external files/URLs via <filename>contrib/xml2</>'s - <function>xslt_process()</> (Peter Eisentraut) + Prevent access to external files/URLs via <filename>contrib/xml2</filename>'s + <function>xslt_process()</function> (Peter Eisentraut) </para> <para> - <application>libxslt</> offers the ability to read and write both + <application>libxslt</application> offers the ability to read and write both files and URLs through stylesheet commands, thus allowing unprivileged database users to both read and write data with the privileges of the database server. Disable that through proper use - of <application>libxslt</>'s security options. (CVE-2012-3488) + of <application>libxslt</application>'s security options. (CVE-2012-3488) </para> <para> - Also, remove <function>xslt_process()</>'s ability to fetch documents + Also, remove <function>xslt_process()</function>'s ability to fetch documents and stylesheets from external files/URLs. While this was a - documented <quote>feature</>, it was long regarded as a bad idea. + documented <quote>feature</quote>, it was long regarded as a bad idea. The fix for CVE-2012-3489 broke that capability, and rather than expend effort on trying to fix it, we're just going to summarily remove it. @@ -4515,21 +4515,21 @@ </para> <para> - If <command>ALTER SEQUENCE</> was executed on a freshly created or - reset sequence, and then precisely one <function>nextval()</> call + If <command>ALTER SEQUENCE</command> was executed on a freshly created or + reset sequence, and then precisely one <function>nextval()</function> call was made on it, and then the server crashed, WAL replay would restore the sequence to a state in which it appeared that no - <function>nextval()</> had been done, thus allowing the first + <function>nextval()</function> had been done, thus allowing the first sequence value to be returned again by the next - <function>nextval()</> call. In particular this could manifest for - <type>serial</> columns, since creation of a serial column's sequence - includes an <command>ALTER SEQUENCE OWNED BY</> step. + <function>nextval()</function> call. In particular this could manifest for + <type>serial</type> columns, since creation of a serial column's sequence + includes an <command>ALTER SEQUENCE OWNED BY</command> step. </para> </listitem> <listitem> <para> - Fix <function>txid_current()</> to report the correct epoch when not + Fix <function>txid_current()</function> to report the correct epoch when not in hot standby (Heikki Linnakangas) </para> @@ -4546,14 +4546,14 @@ <para> This mistake led to failures reported as <quote>out-of-order XID - insertion in KnownAssignedXids</>. + insertion in KnownAssignedXids</quote>. </para> </listitem> <listitem> <para> - Ensure the <filename>backup_label</> file is fsync'd after - <function>pg_start_backup()</> (Dave Kerr) + Ensure the <filename>backup_label</filename> file is fsync'd after + <function>pg_start_backup()</function> (Dave Kerr) </para> </listitem> @@ -4564,7 +4564,7 @@ <para> WAL sender background processes neglected to establish a - <systemitem>SIGALRM</> handler, meaning they would wait forever in + <systemitem>SIGALRM</systemitem> handler, meaning they would wait forever in some corner cases where a timeout ought to happen. </para> </listitem> @@ -4583,15 +4583,15 @@ <listitem> <para> - Fix <literal>LISTEN</>/<literal>NOTIFY</> to cope better with I/O + Fix <literal>LISTEN</literal>/<literal>NOTIFY</literal> to cope better with I/O problems, such as out of disk space (Tom Lane) </para> <para> After a write failure, all subsequent attempts to send more - <literal>NOTIFY</> messages would fail with messages like - <quote>Could not read from file "pg_notify/<replaceable>nnnn</>" at - offset <replaceable>nnnnn</>: Success</quote>. + <literal>NOTIFY</literal> messages would fail with messages like + <quote>Could not read from file "pg_notify/<replaceable>nnnn</replaceable>" at + offset <replaceable>nnnnn</replaceable>: Success</quote>. </para> </listitem> @@ -4604,7 +4604,7 @@ <para> The original coding could allow inconsistent behavior in some cases; in particular, an autovacuum could get canceled after less than - <literal>deadlock_timeout</> grace period. + <literal>deadlock_timeout</literal> grace period. </para> </listitem> @@ -4616,15 +4616,15 @@ <listitem> <para> - Fix log collector so that <literal>log_truncate_on_rotation</> works + Fix log collector so that <literal>log_truncate_on_rotation</literal> works during the very first log rotation after server start (Tom Lane) </para> </listitem> <listitem> <para> - Fix <literal>WITH</> attached to a nested set operation - (<literal>UNION</>/<literal>INTERSECT</>/<literal>EXCEPT</>) + Fix <literal>WITH</literal> attached to a nested set operation + (<literal>UNION</literal>/<literal>INTERSECT</literal>/<literal>EXCEPT</literal>) (Tom Lane) </para> </listitem> @@ -4632,24 +4632,24 @@ <listitem> <para> Ensure that a whole-row reference to a subquery doesn't include any - extra <literal>GROUP BY</> or <literal>ORDER BY</> columns (Tom Lane) + extra <literal>GROUP BY</literal> or <literal>ORDER BY</literal> columns (Tom Lane) </para> </listitem> <listitem> <para> - Disallow copying whole-row references in <literal>CHECK</> - constraints and index definitions during <command>CREATE TABLE</> + Disallow copying whole-row references in <literal>CHECK</literal> + constraints and index definitions during <command>CREATE TABLE</command> (Tom Lane) </para> <para> - This situation can arise in <command>CREATE TABLE</> with - <literal>LIKE</> or <literal>INHERITS</>. The copied whole-row + This situation can arise in <command>CREATE TABLE</command> with + <literal>LIKE</literal> or <literal>INHERITS</literal>. The copied whole-row variable was incorrectly labeled with the row type of the original table not the new one. Rejecting the case seems reasonable for - <literal>LIKE</>, since the row types might well diverge later. For - <literal>INHERITS</> we should ideally allow it, with an implicit + <literal>LIKE</literal>, since the row types might well diverge later. For + <literal>INHERITS</literal> we should ideally allow it, with an implicit coercion to the parent table's row type; but that will require more work than seems safe to back-patch. </para> @@ -4657,7 +4657,7 @@ <listitem> <para> - Fix memory leak in <literal>ARRAY(SELECT ...)</> subqueries (Heikki + Fix memory leak in <literal>ARRAY(SELECT ...)</literal> subqueries (Heikki Linnakangas, Tom Lane) </para> </listitem> @@ -4669,7 +4669,7 @@ <para> The code could get confused by quantified parenthesized - subexpressions, such as <literal>^(foo)?bar</>. This would lead to + subexpressions, such as <literal>^(foo)?bar</literal>. This would lead to incorrect index optimization of searches for such patterns. </para> </listitem> @@ -4677,9 +4677,9 @@ <listitem> <para> Fix bugs with parsing signed - <replaceable>hh</><literal>:</><replaceable>mm</> and - <replaceable>hh</><literal>:</><replaceable>mm</><literal>:</><replaceable>ss</> - fields in <type>interval</> constants (Amit Kapila, Tom Lane) + <replaceable>hh</replaceable><literal>:</literal><replaceable>mm</replaceable> and + <replaceable>hh</replaceable><literal>:</literal><replaceable>mm</replaceable><literal>:</literal><replaceable>ss</replaceable> + fields in <type>interval</type> constants (Amit Kapila, Tom Lane) </para> </listitem> @@ -4708,14 +4708,14 @@ <listitem> <para> - Report errors properly in <filename>contrib/xml2</>'s - <function>xslt_process()</> (Tom Lane) + Report errors properly in <filename>contrib/xml2</filename>'s + <function>xslt_process()</function> (Tom Lane) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2012e + Update time zone data files to <application>tzdata</application> release 2012e for DST law changes in Morocco and Tokelau </para> </listitem> @@ -4761,12 +4761,12 @@ <listitem> <para> Fix incorrect password transformation in - <filename>contrib/pgcrypto</>'s DES <function>crypt()</> function + <filename>contrib/pgcrypto</filename>'s DES <function>crypt()</function> function (Solar Designer) </para> <para> - If a password string contained the byte value <literal>0x80</>, the + If a password string contained the byte value <literal>0x80</literal>, the remainder of the password was ignored, causing the password to be much weaker than it appeared. With this fix, the rest of the string is properly included in the DES hash. Any stored password values that are @@ -4777,7 +4777,7 @@ <listitem> <para> - Ignore <literal>SECURITY DEFINER</> and <literal>SET</> attributes for + Ignore <literal>SECURITY DEFINER</literal> and <literal>SET</literal> attributes for a procedural language's call handler (Tom Lane) </para> @@ -4789,7 +4789,7 @@ <listitem> <para> - Allow numeric timezone offsets in <type>timestamp</> input to be up to + Allow numeric timezone offsets in <type>timestamp</type> input to be up to 16 hours away from UTC (Tom Lane) </para> @@ -4815,7 +4815,7 @@ <listitem> <para> - Fix <type>text</> to <type>name</> and <type>char</> to <type>name</> + Fix <type>text</type> to <type>name</type> and <type>char</type> to <type>name</type> casts to perform string truncation correctly in multibyte encodings (Karl Schnaitter) </para> @@ -4823,13 +4823,13 @@ <listitem> <para> - Fix memory copying bug in <function>to_tsquery()</> (Heikki Linnakangas) + Fix memory copying bug in <function>to_tsquery()</function> (Heikki Linnakangas) </para> </listitem> <listitem> <para> - Ensure <function>txid_current()</> reports the correct epoch when + Ensure <function>txid_current()</function> reports the correct epoch when executed in hot standby (Simon Riggs) </para> </listitem> @@ -4844,7 +4844,7 @@ This bug concerns sub-SELECTs that reference variables coming from the nullable side of an outer join of the surrounding query. In 9.1, queries affected by this bug would fail with <quote>ERROR: - Upper-level PlaceHolderVar found where not expected</>. But in 9.0 and + Upper-level PlaceHolderVar found where not expected</quote>. But in 9.0 and 8.4, you'd silently get possibly-wrong answers, since the value transmitted into the subquery wouldn't go to null when it should. </para> @@ -4852,13 +4852,13 @@ <listitem> <para> - Fix slow session startup when <structname>pg_attribute</> is very large + Fix slow session startup when <structname>pg_attribute</structname> is very large (Tom Lane) </para> <para> - If <structname>pg_attribute</> exceeds one-fourth of - <varname>shared_buffers</>, cache rebuilding code that is sometimes + If <structname>pg_attribute</structname> exceeds one-fourth of + <varname>shared_buffers</varname>, cache rebuilding code that is sometimes needed during session start would trigger the synchronized-scan logic, causing it to take many times longer than normal. The problem was particularly acute if many new sessions were starting at once. @@ -4879,8 +4879,8 @@ <listitem> <para> - Ensure the Windows implementation of <function>PGSemaphoreLock()</> - clears <varname>ImmediateInterruptOK</> before returning (Tom Lane) + Ensure the Windows implementation of <function>PGSemaphoreLock()</function> + clears <varname>ImmediateInterruptOK</varname> before returning (Tom Lane) </para> <para> @@ -4907,12 +4907,12 @@ <listitem> <para> - Fix <command>COPY FROM</> to properly handle null marker strings that + Fix <command>COPY FROM</command> to properly handle null marker strings that correspond to invalid encoding (Tom Lane) </para> <para> - A null marker string such as <literal>E'\\0'</> should work, and did + A null marker string such as <literal>E'\\0'</literal> should work, and did work in the past, but the case got broken in 8.4. </para> </listitem> @@ -4925,7 +4925,7 @@ <para> Previously, infinite recursion in a function invoked by - auto-<command>ANALYZE</> could crash worker processes. + auto-<command>ANALYZE</command> could crash worker processes. </para> </listitem> @@ -4944,7 +4944,7 @@ <listitem> <para> Fix logging collector to ensure it will restart file rotation - after receiving <systemitem>SIGHUP</> (Tom Lane) + after receiving <systemitem>SIGHUP</systemitem> (Tom Lane) </para> </listitem> @@ -4957,33 +4957,33 @@ <listitem> <para> - Fix memory leak in PL/pgSQL's <command>RETURN NEXT</> command (Joe + Fix memory leak in PL/pgSQL's <command>RETURN NEXT</command> command (Joe Conway) </para> </listitem> <listitem> <para> - Fix PL/pgSQL's <command>GET DIAGNOSTICS</> command when the target + Fix PL/pgSQL's <command>GET DIAGNOSTICS</command> command when the target is the function's first variable (Tom Lane) </para> </listitem> <listitem> <para> - Fix potential access off the end of memory in <application>psql</>'s - expanded display (<command>\x</>) mode (Peter Eisentraut) + Fix potential access off the end of memory in <application>psql</application>'s + expanded display (<command>\x</command>) mode (Peter Eisentraut) </para> </listitem> <listitem> <para> - Fix several performance problems in <application>pg_dump</> when + Fix several performance problems in <application>pg_dump</application> when the database contains many objects (Jeff Janes, Tom Lane) </para> <para> - <application>pg_dump</> could get very slow if the database contained + <application>pg_dump</application> could get very slow if the database contained many schemas, or if many objects are in dependency loops, or if there are many owned sequences. </para> @@ -4991,7 +4991,7 @@ <listitem> <para> - Fix <application>pg_upgrade</> for the case that a database stored in a + Fix <application>pg_upgrade</application> for the case that a database stored in a non-default tablespace contains a table in the cluster's default tablespace (Bruce Momjian) </para> @@ -4999,41 +4999,41 @@ <listitem> <para> - In <application>ecpg</>, fix rare memory leaks and possible overwrite - of one byte after the <structname>sqlca_t</> structure (Peter Eisentraut) + In <application>ecpg</application>, fix rare memory leaks and possible overwrite + of one byte after the <structname>sqlca_t</structname> structure (Peter Eisentraut) </para> </listitem> <listitem> <para> - Fix <filename>contrib/dblink</>'s <function>dblink_exec()</> to not leak + Fix <filename>contrib/dblink</filename>'s <function>dblink_exec()</function> to not leak temporary database connections upon error (Tom Lane) </para> </listitem> <listitem> <para> - Fix <filename>contrib/dblink</> to report the correct connection name in + Fix <filename>contrib/dblink</filename> to report the correct connection name in error messages (Kyotaro Horiguchi) </para> </listitem> <listitem> <para> - Fix <filename>contrib/vacuumlo</> to use multiple transactions when + Fix <filename>contrib/vacuumlo</filename> to use multiple transactions when dropping many large objects (Tim Lewis, Robert Haas, Tom Lane) </para> <para> - This change avoids exceeding <varname>max_locks_per_transaction</> when + This change avoids exceeding <varname>max_locks_per_transaction</varname> when many objects need to be dropped. The behavior can be adjusted with the - new <literal>-l</> (limit) option. + new <literal>-l</literal> (limit) option. </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2012c + Update time zone data files to <application>tzdata</application> release 2012c for DST law changes in Antarctica, Armenia, Chile, Cuba, Falkland Islands, Gaza, Haiti, Hebron, Morocco, Syria, and Tokelau Islands; also historical corrections for Canada. @@ -5081,14 +5081,14 @@ <listitem> <para> Require execute permission on the trigger function for - <command>CREATE TRIGGER</> (Robert Haas) + <command>CREATE TRIGGER</command> (Robert Haas) </para> <para> This missing check could allow another user to execute a trigger function with forged input data, by installing it on a table he owns. This is only of significance for trigger functions marked - <literal>SECURITY DEFINER</>, since otherwise trigger functions run + <literal>SECURITY DEFINER</literal>, since otherwise trigger functions run as the table owner anyway. (CVE-2012-0866) </para> </listitem> @@ -5100,7 +5100,7 @@ </para> <para> - Both <application>libpq</> and the server truncated the common name + Both <application>libpq</application> and the server truncated the common name extracted from an SSL certificate at 32 bytes. Normally this would cause nothing worse than an unexpected verification failure, but there are some rather-implausible scenarios in which it might allow one @@ -5115,12 +5115,12 @@ <listitem> <para> - Convert newlines to spaces in names written in <application>pg_dump</> + Convert newlines to spaces in names written in <application>pg_dump</application> comments (Robert Haas) </para> <para> - <application>pg_dump</> was incautious about sanitizing object names + <application>pg_dump</application> was incautious about sanitizing object names that are emitted within SQL comments in its output script. A name containing a newline would at least render the script syntactically incorrect. Maliciously crafted object names could present a SQL @@ -5136,10 +5136,10 @@ <para> An index page split caused by an insertion could sometimes cause a - concurrently-running <command>VACUUM</> to miss removing index entries + concurrently-running <command>VACUUM</command> to miss removing index entries that it should remove. After the corresponding table rows are removed, the dangling index entries would cause errors (such as <quote>could not - read block N in file ...</>) or worse, silently wrong query results + read block N in file ...</quote>) or worse, silently wrong query results after unrelated rows are re-inserted at the now-free table locations. This bug has been present since release 8.2, but occurs so infrequently that it was not diagnosed until now. If you have reason to suspect @@ -5158,7 +5158,7 @@ that the contents were transiently invalid. In hot standby mode this can result in a query that's executing in parallel seeing garbage data. Various symptoms could result from that, but the most common one seems - to be <quote>invalid memory alloc request size</>. + to be <quote>invalid memory alloc request size</quote>. </para> </listitem> @@ -5176,13 +5176,13 @@ <listitem> <para> - Fix <command>CLUSTER</>/<command>VACUUM FULL</> handling of toast + Fix <command>CLUSTER</command>/<command>VACUUM FULL</command> handling of toast values owned by recently-updated rows (Tom Lane) </para> <para> This oversight could lead to <quote>duplicate key value violates unique - constraint</> errors being reported against the toast table's index + constraint</quote> errors being reported against the toast table's index during one of these commands. </para> </listitem> @@ -5204,11 +5204,11 @@ <listitem> <para> Support foreign data wrappers and foreign servers in - <command>REASSIGN OWNED</> (Alvaro Herrera) + <command>REASSIGN OWNED</command> (Alvaro Herrera) </para> <para> - This command failed with <quote>unexpected classid</> errors if + This command failed with <quote>unexpected classid</quote> errors if it needed to change the ownership of any such objects. </para> </listitem> @@ -5216,16 +5216,16 @@ <listitem> <para> Allow non-existent values for some settings in <command>ALTER - USER/DATABASE SET</> (Heikki Linnakangas) + USER/DATABASE SET</command> (Heikki Linnakangas) </para> <para> - Allow <varname>default_text_search_config</>, - <varname>default_tablespace</>, and <varname>temp_tablespaces</> to be + Allow <varname>default_text_search_config</varname>, + <varname>default_tablespace</varname>, and <varname>temp_tablespaces</varname> to be set to names that are not known. This is because they might be known in another database where the setting is intended to be used, or for the tablespace cases because the tablespace might not be created yet. The - same issue was previously recognized for <varname>search_path</>, and + same issue was previously recognized for <varname>search_path</varname>, and these settings now act like that one. </para> </listitem> @@ -5249,7 +5249,7 @@ <listitem> <para> Recover from errors occurring during WAL replay of <command>DROP - TABLESPACE</> (Tom Lane) + TABLESPACE</command> (Tom Lane) </para> <para> @@ -5271,7 +5271,7 @@ <para> Sometimes a lock would be logged as being held by <quote>transaction - zero</>. This is at least known to produce assertion failures on + zero</quote>. This is at least known to produce assertion failures on slave servers, and might be the cause of more serious problems. </para> </listitem> @@ -5293,7 +5293,7 @@ <listitem> <para> - Prevent emitting misleading <quote>consistent recovery state reached</> + Prevent emitting misleading <quote>consistent recovery state reached</quote> log message at the beginning of crash recovery (Heikki Linnakangas) </para> </listitem> @@ -5301,7 +5301,7 @@ <listitem> <para> Fix initial value of - <structname>pg_stat_replication</>.<structfield>replay_location</> + <structname>pg_stat_replication</structname>.<structfield>replay_location</structfield> (Fujii Masao) </para> @@ -5313,7 +5313,7 @@ <listitem> <para> - Fix regular expression back-references with <literal>*</> attached + Fix regular expression back-references with <literal>*</literal> attached (Tom Lane) </para> @@ -5327,18 +5327,18 @@ A similar problem still afflicts back-references that are embedded in a larger quantified expression, rather than being the immediate subject of the quantifier. This will be addressed in a future - <productname>PostgreSQL</> release. + <productname>PostgreSQL</productname> release. </para> </listitem> <listitem> <para> Fix recently-introduced memory leak in processing of - <type>inet</>/<type>cidr</> values (Heikki Linnakangas) + <type>inet</type>/<type>cidr</type> values (Heikki Linnakangas) </para> <para> - A patch in the December 2011 releases of <productname>PostgreSQL</> + A patch in the December 2011 releases of <productname>PostgreSQL</productname> caused memory leakage in these operations, which could be significant in scenarios such as building a btree index on such a column. </para> @@ -5346,8 +5346,8 @@ <listitem> <para> - Fix dangling pointer after <command>CREATE TABLE AS</>/<command>SELECT - INTO</> in a SQL-language function (Tom Lane) + Fix dangling pointer after <command>CREATE TABLE AS</command>/<command>SELECT + INTO</command> in a SQL-language function (Tom Lane) </para> <para> @@ -5381,32 +5381,32 @@ <listitem> <para> - Improve <application>pg_dump</>'s handling of inherited table columns + Improve <application>pg_dump</application>'s handling of inherited table columns (Tom Lane) </para> <para> - <application>pg_dump</> mishandled situations where a child column has + <application>pg_dump</application> mishandled situations where a child column has a different default expression than its parent column. If the default is textually identical to the parent's default, but not actually the same (for instance, because of schema search path differences) it would not be recognized as different, so that after dump and restore the child would be allowed to inherit the parent's default. Child columns - that are <literal>NOT NULL</> where their parent is not could also be + that are <literal>NOT NULL</literal> where their parent is not could also be restored subtly incorrectly. </para> </listitem> <listitem> <para> - Fix <application>pg_restore</>'s direct-to-database mode for + Fix <application>pg_restore</application>'s direct-to-database mode for INSERT-style table data (Tom Lane) </para> <para> Direct-to-database restores from archive files made with - <option>--inserts</> or <option>--column-inserts</> options fail when - using <application>pg_restore</> from a release dated September or + <option>--inserts</option> or <option>--column-inserts</option> options fail when + using <application>pg_restore</application> from a release dated September or December 2011, as a result of an oversight in a fix for another problem. The archive file itself is not at fault, and text-mode output is okay. @@ -5415,20 +5415,20 @@ <listitem> <para> - Allow <application>pg_upgrade</> to process tables containing - <type>regclass</> columns (Bruce Momjian) + Allow <application>pg_upgrade</application> to process tables containing + <type>regclass</type> columns (Bruce Momjian) </para> <para> - Since <application>pg_upgrade</> now takes care to preserve - <structname>pg_class</> OIDs, there was no longer any reason for this + Since <application>pg_upgrade</application> now takes care to preserve + <structname>pg_class</structname> OIDs, there was no longer any reason for this restriction. </para> </listitem> <listitem> <para> - Make <application>libpq</> ignore <literal>ENOTDIR</> errors + Make <application>libpq</application> ignore <literal>ENOTDIR</literal> errors when looking for an SSL client certificate file (Magnus Hagander) </para> @@ -5436,21 +5436,21 @@ <para> This allows SSL connections to be established, though without a certificate, even when the user's home directory is set to something - like <literal>/dev/null</>. + like <literal>/dev/null</literal>. </para> </listitem> <listitem> <para> - Fix some more field alignment issues in <application>ecpg</>'s SQLDA area + Fix some more field alignment issues in <application>ecpg</application>'s SQLDA area (Zoltan Boszormenyi) </para> </listitem> <listitem> <para> - Allow <literal>AT</> option in <application>ecpg</> - <literal>DEALLOCATE</> statements (Michael Meskes) + Allow <literal>AT</literal> option in <application>ecpg</application> + <literal>DEALLOCATE</literal> statements (Michael Meskes) </para> <para> @@ -5468,7 +5468,7 @@ <listitem> <para> - Fix <filename>contrib/auto_explain</>'s JSON output mode to produce + Fix <filename>contrib/auto_explain</filename>'s JSON output mode to produce valid JSON (Andrew Dunstan) </para> @@ -5480,8 +5480,8 @@ <listitem> <para> - Fix error in <filename>contrib/intarray</>'s <literal>int[] & - int[]</> operator (Guillaume Lelarge) + Fix error in <filename>contrib/intarray</filename>'s <literal>int[] & + int[]</literal> operator (Guillaume Lelarge) </para> <para> @@ -5493,8 +5493,8 @@ <listitem> <para> - Fix error detection in <filename>contrib/pgcrypto</>'s - <function>encrypt_iv()</> and <function>decrypt_iv()</> + Fix error detection in <filename>contrib/pgcrypto</filename>'s + <function>encrypt_iv()</function> and <function>decrypt_iv()</function> (Marko Kreen) </para> @@ -5506,26 +5506,26 @@ <listitem> <para> - Fix one-byte buffer overrun in <filename>contrib/test_parser</> + Fix one-byte buffer overrun in <filename>contrib/test_parser</filename> (Paul Guyot) </para> <para> The code would try to read one more byte than it should, which would crash in corner cases. - Since <filename>contrib/test_parser</> is only example code, this is + Since <filename>contrib/test_parser</filename> is only example code, this is not a security issue in itself, but bad example code is still bad. </para> </listitem> <listitem> <para> - Use <function>__sync_lock_test_and_set()</> for spinlocks on ARM, if + Use <function>__sync_lock_test_and_set()</function> for spinlocks on ARM, if available (Martin Pitt) </para> <para> - This function replaces our previous use of the <literal>SWPB</> + This function replaces our previous use of the <literal>SWPB</literal> instruction, which is deprecated and not available on ARMv6 and later. Reports suggest that the old code doesn't fail in an obvious way on recent ARM boards, but simply doesn't interlock concurrent accesses, @@ -5535,7 +5535,7 @@ <listitem> <para> - Use <option>-fexcess-precision=standard</> option when building with + Use <option>-fexcess-precision=standard</option> option when building with gcc versions that accept it (Andrew Dunstan) </para> @@ -5584,7 +5584,7 @@ <para> However, a longstanding error was discovered in the definition of the - <literal>information_schema.referential_constraints</> view. If you + <literal>information_schema.referential_constraints</literal> view. If you rely on correct results from that view, you should replace its definition as explained in the first changelog item below. </para> @@ -5603,7 +5603,7 @@ <listitem> <para> - Fix bugs in <literal>information_schema.referential_constraints</> view + Fix bugs in <literal>information_schema.referential_constraints</literal> view (Tom Lane) </para> @@ -5616,20 +5616,20 @@ </para> <para> - Since the view definition is installed by <application>initdb</>, + Since the view definition is installed by <application>initdb</application>, merely upgrading will not fix the problem. If you need to fix this in an existing installation, you can (as a superuser) drop the - <literal>information_schema</> schema then re-create it by sourcing - <filename><replaceable>SHAREDIR</>/information_schema.sql</filename>. - (Run <literal>pg_config --sharedir</> if you're uncertain where - <replaceable>SHAREDIR</> is.) This must be repeated in each database + <literal>information_schema</literal> schema then re-create it by sourcing + <filename><replaceable>SHAREDIR</replaceable>/information_schema.sql</filename>. + (Run <literal>pg_config --sharedir</literal> if you're uncertain where + <replaceable>SHAREDIR</replaceable> is.) This must be repeated in each database to be fixed. </para> </listitem> <listitem> <para> - Fix possible crash during <command>UPDATE</> or <command>DELETE</> that + Fix possible crash during <command>UPDATE</command> or <command>DELETE</command> that joins to the output of a scalar-returning function (Tom Lane) </para> @@ -5648,19 +5648,19 @@ <para> This could result in transiently failing to find index entries after a crash, or on a hot-standby server. The problem would be repaired - by the next <command>VACUUM</> of the index, however. + by the next <command>VACUUM</command> of the index, however. </para> </listitem> <listitem> <para> Fix TOAST-related data corruption during <literal>CREATE TABLE dest AS - SELECT * FROM src</> or <literal>INSERT INTO dest SELECT * FROM src</> + SELECT * FROM src</literal> or <literal>INSERT INTO dest SELECT * FROM src</literal> (Tom Lane) </para> <para> - If a table has been modified by <command>ALTER TABLE ADD COLUMN</>, + If a table has been modified by <command>ALTER TABLE ADD COLUMN</command>, attempts to copy its data verbatim to another table could produce corrupt results in certain corner cases. The problem can only manifest in this precise form in 8.4 and later, @@ -5690,7 +5690,7 @@ <para> The typical symptom was transient errors like <quote>missing chunk - number 0 for toast value NNNNN in pg_toast_2619</>, where the cited + number 0 for toast value NNNNN in pg_toast_2619</quote>, where the cited toast table would always belong to a system catalog. </para> </listitem> @@ -5706,7 +5706,7 @@ or modified the function, leading to misbehavior when the function was used. Note that merely installing this update will not fix the missing dependency entries; to do that, you'd need to <command>CREATE OR - REPLACE</> each such function afterwards. If you have functions whose + REPLACE</command> each such function afterwards. If you have functions whose defaults depend on non-built-in objects, doing so is recommended. </para> </listitem> @@ -5732,29 +5732,29 @@ <listitem> <para> - Make <function>DatumGetInetP()</> unpack inet datums that have a 1-byte - header, and add a new macro, <function>DatumGetInetPP()</>, that does + Make <function>DatumGetInetP()</function> unpack inet datums that have a 1-byte + header, and add a new macro, <function>DatumGetInetPP()</function>, that does not (Heikki Linnakangas) </para> <para> This change affects no core code, but might prevent crashes in add-on - code that expects <function>DatumGetInetP()</> to produce an unpacked + code that expects <function>DatumGetInetP()</function> to produce an unpacked datum as per usual convention. </para> </listitem> <listitem> <para> - Improve locale support in <type>money</> type's input and output + Improve locale support in <type>money</type> type's input and output (Tom Lane) </para> <para> Aside from not supporting all standard - <link linkend="guc-lc-monetary"><varname>lc_monetary</></link> + <link linkend="guc-lc-monetary"><varname>lc_monetary</varname></link> formatting options, the input and output functions were inconsistent, - meaning there were locales in which dumped <type>money</> values could + meaning there were locales in which dumped <type>money</type> values could not be re-read. </para> </listitem> @@ -5762,15 +5762,15 @@ <listitem> <para> Don't let <link - linkend="guc-transform-null-equals"><varname>transform_null_equals</></link> - affect <literal>CASE foo WHEN NULL ...</> constructs + linkend="guc-transform-null-equals"><varname>transform_null_equals</varname></link> + affect <literal>CASE foo WHEN NULL ...</literal> constructs (Heikki Linnakangas) </para> <para> - <varname>transform_null_equals</> is only supposed to affect - <literal>foo = NULL</> expressions written directly by the user, not - equality checks generated internally by this form of <literal>CASE</>. + <varname>transform_null_equals</varname> is only supposed to affect + <literal>foo = NULL</literal> expressions written directly by the user, not + equality checks generated internally by this form of <literal>CASE</literal>. </para> </listitem> @@ -5782,14 +5782,14 @@ <para> For a cascading foreign key that references its own table, a row update - will fire both the <literal>ON UPDATE</> trigger and the - <literal>CHECK</> trigger as one event. The <literal>ON UPDATE</> - trigger must execute first, else the <literal>CHECK</> will check a + will fire both the <literal>ON UPDATE</literal> trigger and the + <literal>CHECK</literal> trigger as one event. The <literal>ON UPDATE</literal> + trigger must execute first, else the <literal>CHECK</literal> will check a non-final state of the row and possibly throw an inappropriate error. However, the firing order of these triggers is determined by their names, which generally sort in creation order since the triggers have auto-generated names following the convention - <quote>RI_ConstraintTrigger_NNNN</>. A proper fix would require + <quote>RI_ConstraintTrigger_NNNN</quote>. A proper fix would require modifying that convention, which we will do in 9.2, but it seems risky to change it in existing releases. So this patch just changes the creation order of the triggers. Users encountering this type of error @@ -5818,20 +5818,20 @@ <para> Formerly, these would not be displayed correctly in the - <structname>pg_settings</> view. + <structname>pg_settings</structname> view. </para> </listitem> <listitem> <para> - Fix incorrect field alignment in <application>ecpg</>'s SQLDA area + Fix incorrect field alignment in <application>ecpg</application>'s SQLDA area (Zoltan Boszormenyi) </para> </listitem> <listitem> <para> - Preserve blank lines within commands in <application>psql</>'s command + Preserve blank lines within commands in <application>psql</application>'s command history (Robert Haas) </para> @@ -5843,14 +5843,14 @@ <listitem> <para> - Fix <application>pg_dump</> to dump user-defined casts between + Fix <application>pg_dump</application> to dump user-defined casts between auto-generated types, such as table rowtypes (Tom Lane) </para> </listitem> <listitem> <para> - Assorted fixes for <application>pg_upgrade</> (Bruce Momjian) + Assorted fixes for <application>pg_upgrade</application> (Bruce Momjian) </para> <para> @@ -5861,7 +5861,7 @@ <listitem> <para> - Use the preferred version of <application>xsubpp</> to build PL/Perl, + Use the preferred version of <application>xsubpp</application> to build PL/Perl, not necessarily the operating system's main copy (David Wheeler and Alex Hunsaker) </para> @@ -5869,26 +5869,26 @@ <listitem> <para> - Fix incorrect coding in <filename>contrib/dict_int</> and - <filename>contrib/dict_xsyn</> (Tom Lane) + Fix incorrect coding in <filename>contrib/dict_int</filename> and + <filename>contrib/dict_xsyn</filename> (Tom Lane) </para> <para> Some functions incorrectly assumed that memory returned by - <function>palloc()</> is guaranteed zeroed. + <function>palloc()</function> is guaranteed zeroed. </para> </listitem> <listitem> <para> - Fix assorted errors in <filename>contrib/unaccent</>'s configuration + Fix assorted errors in <filename>contrib/unaccent</filename>'s configuration file parsing (Tom Lane) </para> </listitem> <listitem> <para> - Honor query cancel interrupts promptly in <function>pgstatindex()</> + Honor query cancel interrupts promptly in <function>pgstatindex()</function> (Robert Haas) </para> </listitem> @@ -5926,15 +5926,15 @@ </para> <para> - Map <quote>Central America Standard Time</> to <literal>CST6</>, not - <literal>CST6CDT</>, because DST is generally not observed anywhere in + Map <quote>Central America Standard Time</quote> to <literal>CST6</literal>, not + <literal>CST6CDT</literal>, because DST is generally not observed anywhere in Central America. </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2011n + Update time zone data files to <application>tzdata</application> release 2011n for DST law changes in Brazil, Cuba, Fiji, Palestine, Russia, and Samoa; also historical corrections for Alaska and British East Africa. </para> @@ -5980,8 +5980,8 @@ <listitem> <para> - Fix catalog cache invalidation after a <command>VACUUM FULL</> or - <command>CLUSTER</> on a system catalog (Tom Lane) + Fix catalog cache invalidation after a <command>VACUUM FULL</command> or + <command>CLUSTER</command> on a system catalog (Tom Lane) </para> <para> @@ -6001,7 +6001,7 @@ <para> These mistakes could lead to transient failures after a <command>VACUUM - FULL</> or <command>CLUSTER</> on a system catalog. + FULL</command> or <command>CLUSTER</command> on a system catalog. </para> </listitem> @@ -6030,7 +6030,7 @@ <listitem> <para> - Fix possible buffer overrun in <function>tsvector_concat()</> + Fix possible buffer overrun in <function>tsvector_concat()</function> (Tom Lane) </para> @@ -6042,14 +6042,14 @@ <listitem> <para> - Fix crash in <function>xml_recv</> when processing a - <quote>standalone</> parameter (Tom Lane) + Fix crash in <function>xml_recv</function> when processing a + <quote>standalone</quote> parameter (Tom Lane) </para> </listitem> <listitem> <para> - Make <function>pg_options_to_table</> return NULL for an option with no + Make <function>pg_options_to_table</function> return NULL for an option with no value (Tom Lane) </para> @@ -6060,7 +6060,7 @@ <listitem> <para> - Avoid possibly accessing off the end of memory in <command>ANALYZE</> + Avoid possibly accessing off the end of memory in <command>ANALYZE</command> and in SJIS-2004 encoding conversion (Noah Misch) </para> @@ -6071,7 +6071,7 @@ <listitem> <para> - Protect <function>pg_stat_reset_shared()</> against NULL input (Magnus + Protect <function>pg_stat_reset_shared()</function> against NULL input (Magnus Hagander) </para> </listitem> @@ -6111,7 +6111,7 @@ There was a window wherein a new backend process could read a stale init file but miss the inval messages that would tell it the data is stale. The result would be bizarre failures in catalog accesses, typically - <quote>could not read block 0 in file ...</> later during startup. + <quote>could not read block 0 in file ...</quote> later during startup. </para> </listitem> @@ -6131,7 +6131,7 @@ <listitem> <para> Fix memory leak when encoding conversion has to be done on incoming - command strings and <command>LISTEN</> is active (Tom Lane) + command strings and <command>LISTEN</command> is active (Tom Lane) </para> </listitem> @@ -6139,20 +6139,20 @@ <para> Fix incorrect memory accounting (leading to possible memory bloat) in tuplestores supporting holdable cursors and plpgsql's <literal>RETURN - NEXT</> command (Tom Lane) + NEXT</literal> command (Tom Lane) </para> </listitem> <listitem> <para> - Fix trigger <literal>WHEN</> conditions when both <literal>BEFORE</> and - <literal>AFTER</> triggers exist (Tom Lane) + Fix trigger <literal>WHEN</literal> conditions when both <literal>BEFORE</literal> and + <literal>AFTER</literal> triggers exist (Tom Lane) </para> <para> - Evaluation of <literal>WHEN</> conditions for <literal>AFTER ROW - UPDATE</> triggers could crash if there had been a <literal>BEFORE - ROW</> trigger fired for the same update. + Evaluation of <literal>WHEN</literal> conditions for <literal>AFTER ROW + UPDATE</literal> triggers could crash if there had been a <literal>BEFORE + ROW</literal> trigger fired for the same update. </para> </listitem> @@ -6202,7 +6202,7 @@ <listitem> <para> - Allow nested <literal>EXISTS</> queries to be optimized properly (Tom + Allow nested <literal>EXISTS</literal> queries to be optimized properly (Tom Lane) </para> </listitem> @@ -6222,19 +6222,19 @@ <listitem> <para> - Fix <command>EXPLAIN</> to handle gating Result nodes within + Fix <command>EXPLAIN</command> to handle gating Result nodes within inner-indexscan subplans (Tom Lane) </para> <para> - The usual symptom of this oversight was <quote>bogus varno</> errors. + The usual symptom of this oversight was <quote>bogus varno</quote> errors. </para> </listitem> <listitem> <para> - Fix btree preprocessing of <replaceable>indexedcol</> <literal>IS - NULL</> conditions (Dean Rasheed) + Fix btree preprocessing of <replaceable>indexedcol</replaceable> <literal>IS + NULL</literal> conditions (Dean Rasheed) </para> <para> @@ -6257,13 +6257,13 @@ <listitem> <para> - Fix dump bug for <literal>VALUES</> in a view (Tom Lane) + Fix dump bug for <literal>VALUES</literal> in a view (Tom Lane) </para> </listitem> <listitem> <para> - Disallow <literal>SELECT FOR UPDATE/SHARE</> on sequences (Tom Lane) + Disallow <literal>SELECT FOR UPDATE/SHARE</literal> on sequences (Tom Lane) </para> <para> @@ -6273,8 +6273,8 @@ <listitem> <para> - Fix <command>VACUUM</> so that it always updates - <literal>pg_class</>.<literal>reltuples</>/<literal>relpages</> (Tom + Fix <command>VACUUM</command> so that it always updates + <literal>pg_class</literal>.<literal>reltuples</literal>/<literal>relpages</literal> (Tom Lane) </para> @@ -6293,7 +6293,7 @@ <listitem> <para> - Fix cases where <command>CLUSTER</> might attempt to access + Fix cases where <command>CLUSTER</command> might attempt to access already-removed TOAST data (Tom Lane) </para> </listitem> @@ -6308,7 +6308,7 @@ <listitem> <para> Fix portability bugs in use of credentials control messages for - <quote>peer</> authentication (Tom Lane) + <quote>peer</quote> authentication (Tom Lane) </para> </listitem> @@ -6320,20 +6320,20 @@ <para> The typical symptom of this problem was <quote>The function requested is - not supported</> errors during SSPI login. + not supported</quote> errors during SSPI login. </para> </listitem> <listitem> <para> Fix failure when adding a new variable of a custom variable class to - <filename>postgresql.conf</> (Tom Lane) + <filename>postgresql.conf</filename> (Tom Lane) </para> </listitem> <listitem> <para> - Throw an error if <filename>pg_hba.conf</> contains <literal>hostssl</> + Throw an error if <filename>pg_hba.conf</filename> contains <literal>hostssl</literal> but SSL is disabled (Tom Lane) </para> @@ -6345,19 +6345,19 @@ <listitem> <para> - Fix failure when <command>DROP OWNED BY</> attempts to remove default + Fix failure when <command>DROP OWNED BY</command> attempts to remove default privileges on sequences (Shigeru Hanada) </para> </listitem> <listitem> <para> - Fix typo in <function>pg_srand48</> seed initialization (Andres Freund) + Fix typo in <function>pg_srand48</function> seed initialization (Andres Freund) </para> <para> This led to failure to use all bits of the provided seed. This function - is not used on most platforms (only those without <function>srandom</>), + is not used on most platforms (only those without <function>srandom</function>), and the potential security exposure from a less-random-than-expected seed seems minimal in any case. </para> @@ -6365,25 +6365,25 @@ <listitem> <para> - Avoid integer overflow when the sum of <literal>LIMIT</> and - <literal>OFFSET</> values exceeds 2^63 (Heikki Linnakangas) + Avoid integer overflow when the sum of <literal>LIMIT</literal> and + <literal>OFFSET</literal> values exceeds 2^63 (Heikki Linnakangas) </para> </listitem> <listitem> <para> - Add overflow checks to <type>int4</> and <type>int8</> versions of - <function>generate_series()</> (Robert Haas) + Add overflow checks to <type>int4</type> and <type>int8</type> versions of + <function>generate_series()</function> (Robert Haas) </para> </listitem> <listitem> <para> - Fix trailing-zero removal in <function>to_char()</> (Marti Raudsepp) + Fix trailing-zero removal in <function>to_char()</function> (Marti Raudsepp) </para> <para> - In a format with <literal>FM</> and no digit positions + In a format with <literal>FM</literal> and no digit positions after the decimal point, zeroes to the left of the decimal point could be removed incorrectly. </para> @@ -6391,7 +6391,7 @@ <listitem> <para> - Fix <function>pg_size_pretty()</> to avoid overflow for inputs close to + Fix <function>pg_size_pretty()</function> to avoid overflow for inputs close to 2^63 (Tom Lane) </para> </listitem> @@ -6409,19 +6409,19 @@ <listitem> <para> - Correctly handle quotes in locale names during <application>initdb</> + Correctly handle quotes in locale names during <application>initdb</application> (Heikki Linnakangas) </para> <para> The case can arise with some Windows locales, such as <quote>People's - Republic of China</>. + Republic of China</quote>. </para> </listitem> <listitem> <para> - In <application>pg_upgrade</>, avoid dumping orphaned temporary tables + In <application>pg_upgrade</application>, avoid dumping orphaned temporary tables (Bruce Momjian) </para> @@ -6433,54 +6433,54 @@ <listitem> <para> - Fix <application>pg_upgrade</> to preserve toast tables' relfrozenxids + Fix <application>pg_upgrade</application> to preserve toast tables' relfrozenxids during an upgrade from 8.3 (Bruce Momjian) </para> <para> - Failure to do this could lead to <filename>pg_clog</> files being + Failure to do this could lead to <filename>pg_clog</filename> files being removed too soon after the upgrade. </para> </listitem> <listitem> <para> - In <application>pg_upgrade</>, fix the <literal>-l</> (log) option to + In <application>pg_upgrade</application>, fix the <literal>-l</literal> (log) option to work on Windows (Bruce Momjian) </para> </listitem> <listitem> <para> - In <application>pg_ctl</>, support silent mode for service registrations + In <application>pg_ctl</application>, support silent mode for service registrations on Windows (MauMau) </para> </listitem> <listitem> <para> - Fix <application>psql</>'s counting of script file line numbers during - <literal>COPY</> from a different file (Tom Lane) + Fix <application>psql</application>'s counting of script file line numbers during + <literal>COPY</literal> from a different file (Tom Lane) </para> </listitem> <listitem> <para> - Fix <application>pg_restore</>'s direct-to-database mode for - <varname>standard_conforming_strings</> (Tom Lane) + Fix <application>pg_restore</application>'s direct-to-database mode for + <varname>standard_conforming_strings</varname> (Tom Lane) </para> <para> - <application>pg_restore</> could emit incorrect commands when restoring + <application>pg_restore</application> could emit incorrect commands when restoring directly to a database server from an archive file that had been made - with <varname>standard_conforming_strings</> set to <literal>on</>. + with <varname>standard_conforming_strings</varname> set to <literal>on</literal>. </para> </listitem> <listitem> <para> Be more user-friendly about unsupported cases for parallel - <application>pg_restore</> (Tom Lane) + <application>pg_restore</application> (Tom Lane) </para> <para> @@ -6491,14 +6491,14 @@ <listitem> <para> - Fix write-past-buffer-end and memory leak in <application>libpq</>'s + Fix write-past-buffer-end and memory leak in <application>libpq</application>'s LDAP service lookup code (Albe Laurenz) </para> </listitem> <listitem> <para> - In <application>libpq</>, avoid failures when using nonblocking I/O + In <application>libpq</application>, avoid failures when using nonblocking I/O and an SSL connection (Martin Pihlak, Tom Lane) </para> </listitem> @@ -6510,36 +6510,36 @@ </para> <para> - In particular, the response to a server report of <function>fork()</> + In particular, the response to a server report of <function>fork()</function> failure during SSL connection startup is now saner. </para> </listitem> <listitem> <para> - Improve <application>libpq</>'s error reporting for SSL failures (Tom + Improve <application>libpq</application>'s error reporting for SSL failures (Tom Lane) </para> </listitem> <listitem> <para> - Fix <function>PQsetvalue()</> to avoid possible crash when adding a new - tuple to a <structname>PGresult</> originally obtained from a server + Fix <function>PQsetvalue()</function> to avoid possible crash when adding a new + tuple to a <structname>PGresult</structname> originally obtained from a server query (Andrew Chernow) </para> </listitem> <listitem> <para> - Make <application>ecpglib</> write <type>double</> values with 15 digits + Make <application>ecpglib</application> write <type>double</type> values with 15 digits precision (Akira Kurosawa) </para> </listitem> <listitem> <para> - In <application>ecpglib</>, be sure <literal>LC_NUMERIC</> setting is + In <application>ecpglib</application>, be sure <literal>LC_NUMERIC</literal> setting is restored after an error (Michael Meskes) </para> </listitem> @@ -6551,7 +6551,7 @@ </para> <para> - <filename>contrib/pg_crypto</>'s blowfish encryption code could give + <filename>contrib/pg_crypto</filename>'s blowfish encryption code could give wrong results on platforms where char is signed (which is most), leading to encrypted passwords being weaker than they should be. </para> @@ -6559,13 +6559,13 @@ <listitem> <para> - Fix memory leak in <filename>contrib/seg</> (Heikki Linnakangas) + Fix memory leak in <filename>contrib/seg</filename> (Heikki Linnakangas) </para> </listitem> <listitem> <para> - Fix <function>pgstatindex()</> to give consistent results for empty + Fix <function>pgstatindex()</function> to give consistent results for empty indexes (Tom Lane) </para> </listitem> @@ -6585,7 +6585,7 @@ <listitem> <para> - Update time zone data files to <application>tzdata</> release 2011i + Update time zone data files to <application>tzdata</application> release 2011i for DST law changes in Canada, Egypt, Russia, Samoa, and South Sudan. </para> </listitem> @@ -6618,10 +6618,10 @@ <para> However, if your installation was upgraded from a previous major - release by running <application>pg_upgrade</>, you should take + release by running <application>pg_upgrade</application>, you should take action to prevent possible data loss due to a now-fixed bug in - <application>pg_upgrade</>. The recommended solution is to run - <command>VACUUM FREEZE</> on all TOAST tables. + <application>pg_upgrade</application>. The recommended solution is to run + <command>VACUUM FREEZE</command> on all TOAST tables. More information is available at <ulink url="http://wiki.postgresql.org/wiki/20110408pg_upgrade_fix"> http://wiki.postgresql.org/wiki/20110408pg_upgrade_fix</ulink>. @@ -6636,36 +6636,36 @@ <listitem> <para> - Fix <application>pg_upgrade</>'s handling of TOAST tables + Fix <application>pg_upgrade</application>'s handling of TOAST tables (Bruce Momjian) </para> <para> - The <structname>pg_class</>.<structfield>relfrozenxid</> value for + The <structname>pg_class</structname>.<structfield>relfrozenxid</structfield> value for TOAST tables was not correctly copied into the new installation - during <application>pg_upgrade</>. This could later result in - <literal>pg_clog</> files being discarded while they were still + during <application>pg_upgrade</application>. This could later result in + <literal>pg_clog</literal> files being discarded while they were still needed to validate tuples in the TOAST tables, leading to - <quote>could not access status of transaction</> failures. + <quote>could not access status of transaction</quote> failures. </para> <para> This error poses a significant risk of data loss for installations - that have been upgraded with <application>pg_upgrade</>. This patch - corrects the problem for future uses of <application>pg_upgrade</>, + that have been upgraded with <application>pg_upgrade</application>. This patch + corrects the problem for future uses of <application>pg_upgrade</application>, but does not in itself cure the issue in installations that have been - processed with a buggy version of <application>pg_upgrade</>. + processed with a buggy version of <application>pg_upgrade</application>. </para> </listitem> <listitem> <para> - Suppress incorrect <quote>PD_ALL_VISIBLE flag was incorrectly set</> + Suppress incorrect <quote>PD_ALL_VISIBLE flag was incorrectly set</quote> warning (Heikki Linnakangas) </para> <para> - <command>VACUUM</> would sometimes issue this warning in cases that + <command>VACUUM</command> would sometimes issue this warning in cases that are actually valid. </para> </listitem> @@ -6680,8 +6680,8 @@ All retryable conflict errors now have an error code that indicates that a retry is possible. Also, session closure due to the database being dropped on the master is now reported as - <literal>ERRCODE_DATABASE_DROPPED</>, rather than - <literal>ERRCODE_ADMIN_SHUTDOWN</>, so that connection poolers can + <literal>ERRCODE_DATABASE_DROPPED</literal>, rather than + <literal>ERRCODE_ADMIN_SHUTDOWN</literal>, so that connection poolers can handle the situation correctly. </para> </listitem> @@ -6726,15 +6726,15 @@ <listitem> <para> - Fix dangling-pointer problem in <literal>BEFORE ROW UPDATE</> trigger + Fix dangling-pointer problem in <literal>BEFORE ROW UPDATE</literal> trigger handling when there was a concurrent update to the target tuple (Tom Lane) </para> <para> This bug has been observed to result in intermittent <quote>cannot - extract system attribute from virtual tuple</> failures while trying to - do <literal>UPDATE RETURNING ctid</>. There is a very small probability + extract system attribute from virtual tuple</quote> failures while trying to + do <literal>UPDATE RETURNING ctid</literal>. There is a very small probability of more serious errors, such as generating incorrect index entries for the updated tuple. </para> @@ -6742,25 +6742,25 @@ <listitem> <para> - Disallow <command>DROP TABLE</> when there are pending deferred trigger + Disallow <command>DROP TABLE</command> when there are pending deferred trigger events for the table (Tom Lane) </para> <para> - Formerly the <command>DROP</> would go through, leading to - <quote>could not open relation with OID nnn</> errors when the + Formerly the <command>DROP</command> would go through, leading to + <quote>could not open relation with OID nnn</quote> errors when the triggers were eventually fired. </para> </listitem> <listitem> <para> - Allow <quote>replication</> as a user name in - <filename>pg_hba.conf</> (Andrew Dunstan) + Allow <quote>replication</quote> as a user name in + <filename>pg_hba.conf</filename> (Andrew Dunstan) </para> <para> - <quote>replication</> is special in the database name column, but it + <quote>replication</quote> is special in the database name column, but it was mistakenly also treated as special in the user name column. </para> </listitem> @@ -6781,13 +6781,13 @@ <listitem> <para> - Fix handling of <literal>SELECT FOR UPDATE</> in a sub-SELECT + Fix handling of <literal>SELECT FOR UPDATE</literal> in a sub-SELECT (Tom Lane) </para> <para> This bug typically led to <quote>cannot extract system attribute from - virtual tuple</> errors. + virtual tuple</quote> errors. </para> </listitem> @@ -6813,7 +6813,7 @@ <listitem> <para> - Allow <application>libpq</>'s SSL initialization to succeed when + Allow <application>libpq</application>'s SSL initialization to succeed when user's home directory is unavailable (Tom Lane) </para> @@ -6826,34 +6826,34 @@ <listitem> <para> - Fix <application>libpq</> to return a useful error message for errors - detected in <function>conninfo_array_parse</> (Joseph Adams) + Fix <application>libpq</application> to return a useful error message for errors + detected in <function>conninfo_array_parse</function> (Joseph Adams) </para> <para> A typo caused the library to return NULL, rather than the - <structname>PGconn</> structure containing the error message, to the + <structname>PGconn</structname> structure containing the error message, to the application. </para> </listitem> <listitem> <para> - Fix <application>ecpg</> preprocessor's handling of float constants + Fix <application>ecpg</application> preprocessor's handling of float constants (Heikki Linnakangas) </para> </listitem> <listitem> <para> - Fix parallel <application>pg_restore</> to handle comments on + Fix parallel <application>pg_restore</application> to handle comments on POST_DATA items correctly (Arnd Hannemann) </para> </listitem> <listitem> <para> - Fix <application>pg_restore</> to cope with long lines (over 1KB) in + Fix <application>pg_restore</application> to cope with long lines (over 1KB) in TOC files (Tom Lane) </para> </listitem> @@ -6899,14 +6899,14 @@ <listitem> <para> - Fix version-incompatibility problem with <application>libintl</> on + Fix version-incompatibility problem with <application>libintl</application> on Windows (Hiroshi Inoue) </para> </listitem> <listitem> <para> - Fix usage of <application>xcopy</> in Windows build scripts to + Fix usage of <application>xcopy</application> in Windows build scripts to work correctly under Windows 7 (Andrew Dunstan) </para> @@ -6917,14 +6917,14 @@ <listitem> <para> - Fix path separator used by <application>pg_regress</> on Cygwin + Fix path separator used by <application>pg_regress</application> on Cygwin (Andrew Dunstan) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2011f + Update time zone data files to <application>tzdata</application> release 2011f for DST law changes in Chile, Cuba, Falkland Islands, Morocco, Samoa, and Turkey; also historical corrections for South Australia, Alaska, and Hawaii. @@ -6966,7 +6966,7 @@ <listitem> <para> - Before exiting <application>walreceiver</>, ensure all the received WAL + Before exiting <application>walreceiver</application>, ensure all the received WAL is fsync'd to disk (Heikki Linnakangas) </para> @@ -6978,27 +6978,27 @@ <listitem> <para> - Avoid excess fsync activity in <application>walreceiver</> + Avoid excess fsync activity in <application>walreceiver</application> (Heikki Linnakangas) </para> </listitem> <listitem> <para> - Make <command>ALTER TABLE</> revalidate uniqueness and exclusion + Make <command>ALTER TABLE</command> revalidate uniqueness and exclusion constraints when needed (Noah Misch) </para> <para> This was broken in 9.0 by a change that was intended to suppress - revalidation during <command>VACUUM FULL</> and <command>CLUSTER</>, - but unintentionally affected <command>ALTER TABLE</> as well. + revalidation during <command>VACUUM FULL</command> and <command>CLUSTER</command>, + but unintentionally affected <command>ALTER TABLE</command> as well. </para> </listitem> <listitem> <para> - Fix EvalPlanQual for <command>UPDATE</> of an inheritance tree in which + Fix EvalPlanQual for <command>UPDATE</command> of an inheritance tree in which the tables are not all alike (Tom Lane) </para> @@ -7013,15 +7013,15 @@ <listitem> <para> - Avoid failures when <command>EXPLAIN</> tries to display a simple-form - <literal>CASE</> expression (Tom Lane) + Avoid failures when <command>EXPLAIN</command> tries to display a simple-form + <literal>CASE</literal> expression (Tom Lane) </para> <para> - If the <literal>CASE</>'s test expression was a constant, the planner - could simplify the <literal>CASE</> into a form that confused the + If the <literal>CASE</literal>'s test expression was a constant, the planner + could simplify the <literal>CASE</literal> into a form that confused the expression-display code, resulting in <quote>unexpected CASE WHEN - clause</> errors. + clause</quote> errors. </para> </listitem> @@ -7046,8 +7046,8 @@ </para> <para> - The <type>date</> type supports a wider range of dates than can be - represented by the <type>timestamp</> types, but the planner assumed it + The <type>date</type> type supports a wider range of dates than can be + represented by the <type>timestamp</type> types, but the planner assumed it could always convert a date to timestamp with impunity. </para> </listitem> @@ -7060,29 +7060,29 @@ <listitem> <para> - Remove <application>ecpg</>'s fixed length limit for constants defining + Remove <application>ecpg</application>'s fixed length limit for constants defining an array dimension (Michael Meskes) </para> </listitem> <listitem> <para> - Fix erroneous parsing of <type>tsquery</> values containing + Fix erroneous parsing of <type>tsquery</type> values containing <literal>... & !(subexpression) | ...</literal> (Tom Lane) </para> <para> Queries containing this combination of operators were not executed - correctly. The same error existed in <filename>contrib/intarray</>'s - <type>query_int</> type and <filename>contrib/ltree</>'s - <type>ltxtquery</> type. + correctly. The same error existed in <filename>contrib/intarray</filename>'s + <type>query_int</type> type and <filename>contrib/ltree</filename>'s + <type>ltxtquery</type> type. </para> </listitem> <listitem> <para> - Fix buffer overrun in <filename>contrib/intarray</>'s input function - for the <type>query_int</> type (Apple) + Fix buffer overrun in <filename>contrib/intarray</filename>'s input function + for the <type>query_int</type> type (Apple) </para> <para> @@ -7094,16 +7094,16 @@ <listitem> <para> - Fix bug in <filename>contrib/seg</>'s GiST picksplit algorithm + Fix bug in <filename>contrib/seg</filename>'s GiST picksplit algorithm (Alexander Korotkov) </para> <para> This could result in considerable inefficiency, though not actually - incorrect answers, in a GiST index on a <type>seg</> column. - If you have such an index, consider <command>REINDEX</>ing it after + incorrect answers, in a GiST index on a <type>seg</type> column. + If you have such an index, consider <command>REINDEX</command>ing it after installing this update. (This is identical to the bug that was fixed in - <filename>contrib/cube</> in the previous update.) + <filename>contrib/cube</filename> in the previous update.) </para> </listitem> @@ -7143,23 +7143,23 @@ <listitem> <para> Force the default - <link linkend="guc-wal-sync-method"><varname>wal_sync_method</></link> - to be <literal>fdatasync</> on Linux (Tom Lane, Marti Raudsepp) + <link linkend="guc-wal-sync-method"><varname>wal_sync_method</varname></link> + to be <literal>fdatasync</literal> on Linux (Tom Lane, Marti Raudsepp) </para> <para> - The default on Linux has actually been <literal>fdatasync</> for many - years, but recent kernel changes caused <productname>PostgreSQL</> to - choose <literal>open_datasync</> instead. This choice did not result + The default on Linux has actually been <literal>fdatasync</literal> for many + years, but recent kernel changes caused <productname>PostgreSQL</productname> to + choose <literal>open_datasync</literal> instead. This choice did not result in any performance improvement, and caused outright failures on - certain filesystems, notably <literal>ext4</> with the - <literal>data=journal</> mount option. + certain filesystems, notably <literal>ext4</literal> with the + <literal>data=journal</literal> mount option. </para> </listitem> <listitem> <para> - Fix <quote>too many KnownAssignedXids</> error during Hot Standby + Fix <quote>too many KnownAssignedXids</quote> error during Hot Standby replay (Heikki Linnakangas) </para> </listitem> @@ -7188,7 +7188,7 @@ </para> <para> - This could result in <quote>bad buffer id: 0</> failures or + This could result in <quote>bad buffer id: 0</quote> failures or corruption of index contents during replication. </para> </listitem> @@ -7214,7 +7214,7 @@ </para> <para> - The effective <varname>vacuum_cost_limit</> for an autovacuum worker + The effective <varname>vacuum_cost_limit</varname> for an autovacuum worker could drop to nearly zero if it processed enough tables, causing it to run extremely slowly. </para> @@ -7240,19 +7240,19 @@ <listitem> <para> - Add support for detecting register-stack overrun on <literal>IA64</> + Add support for detecting register-stack overrun on <literal>IA64</literal> (Tom Lane) </para> <para> - The <literal>IA64</> architecture has two hardware stacks. Full + The <literal>IA64</literal> architecture has two hardware stacks. Full prevention of stack-overrun failures requires checking both. </para> </listitem> <listitem> <para> - Add a check for stack overflow in <function>copyObject()</> (Tom Lane) + Add a check for stack overflow in <function>copyObject()</function> (Tom Lane) </para> <para> @@ -7268,7 +7268,7 @@ </para> <para> - It is possible to have a <quote>concurrent</> page split in a + It is possible to have a <quote>concurrent</quote> page split in a temporary index, if for example there is an open cursor scanning the index when an insertion is done. GiST failed to detect this case and hence could deliver wrong results when execution of the cursor @@ -7295,16 +7295,16 @@ <para> Certain cases where a large number of tuples needed to be read in - advance, but <varname>work_mem</> was large enough to allow them all + advance, but <varname>work_mem</varname> was large enough to allow them all to be held in memory, were unexpectedly slow. - <function>percent_rank()</>, <function>cume_dist()</> and - <function>ntile()</> in particular were subject to this problem. + <function>percent_rank()</function>, <function>cume_dist()</function> and + <function>ntile()</function> in particular were subject to this problem. </para> </listitem> <listitem> <para> - Avoid memory leakage while <command>ANALYZE</>'ing complex index + Avoid memory leakage while <command>ANALYZE</command>'ing complex index expressions (Tom Lane) </para> </listitem> @@ -7316,21 +7316,21 @@ </para> <para> - An index declared like <literal>create index i on t (foo(t.*))</> + An index declared like <literal>create index i on t (foo(t.*))</literal> would not automatically get dropped when its table was dropped. </para> </listitem> <listitem> <para> - Add missing support in <command>DROP OWNED BY</> for removing foreign + Add missing support in <command>DROP OWNED BY</command> for removing foreign data wrapper/server privileges belonging to a user (Heikki Linnakangas) </para> </listitem> <listitem> <para> - Do not <quote>inline</> a SQL function with multiple <literal>OUT</> + Do not <quote>inline</quote> a SQL function with multiple <literal>OUT</literal> parameters (Tom Lane) </para> @@ -7349,28 +7349,28 @@ <listitem> <para> - Behave correctly if <literal>ORDER BY</>, <literal>LIMIT</>, - <literal>FOR UPDATE</>, or <literal>WITH</> is attached to the - <literal>VALUES</> part of <literal>INSERT ... VALUES</> (Tom Lane) + Behave correctly if <literal>ORDER BY</literal>, <literal>LIMIT</literal>, + <literal>FOR UPDATE</literal>, or <literal>WITH</literal> is attached to the + <literal>VALUES</literal> part of <literal>INSERT ... VALUES</literal> (Tom Lane) </para> </listitem> <listitem> <para> - Make the <literal>OFF</> keyword unreserved (Heikki Linnakangas) + Make the <literal>OFF</literal> keyword unreserved (Heikki Linnakangas) </para> <para> - This prevents problems with using <literal>off</> as a variable name in - <application>PL/pgSQL</>. That worked before 9.0, but was now broken - because <application>PL/pgSQL</> now treats all core reserved words + This prevents problems with using <literal>off</literal> as a variable name in + <application>PL/pgSQL</application>. That worked before 9.0, but was now broken + because <application>PL/pgSQL</application> now treats all core reserved words as reserved. </para> </listitem> <listitem> <para> - Fix constant-folding of <literal>COALESCE()</> expressions (Tom Lane) + Fix constant-folding of <literal>COALESCE()</literal> expressions (Tom Lane) </para> <para> @@ -7381,7 +7381,7 @@ <listitem> <para> - Fix <quote>could not find pathkey item to sort</> planner failure + Fix <quote>could not find pathkey item to sort</quote> planner failure with comparison of whole-row Vars (Tom Lane) </para> </listitem> @@ -7389,7 +7389,7 @@ <listitem> <para> Fix postmaster crash when connection acceptance - (<function>accept()</> or one of the calls made immediately after it) + (<function>accept()</function> or one of the calls made immediately after it) fails, and the postmaster was compiled with GSSAPI support (Alexander Chernikov) </para> @@ -7408,7 +7408,7 @@ <listitem> <para> - Fix missed unlink of temporary files when <varname>log_temp_files</> + Fix missed unlink of temporary files when <varname>log_temp_files</varname> is active (Tom Lane) </para> @@ -7420,11 +7420,11 @@ <listitem> <para> - Add print functionality for <structname>InhRelation</> nodes (Tom Lane) + Add print functionality for <structname>InhRelation</structname> nodes (Tom Lane) </para> <para> - This avoids a failure when <varname>debug_print_parse</> is enabled + This avoids a failure when <varname>debug_print_parse</varname> is enabled and certain types of query are executed. </para> </listitem> @@ -7444,46 +7444,46 @@ <listitem> <para> Fix incorrect calculation of transaction status in - <application>ecpg</> (Itagaki Takahiro) + <application>ecpg</application> (Itagaki Takahiro) </para> </listitem> <listitem> <para> - Fix errors in <application>psql</>'s Unicode-escape support (Tom Lane) + Fix errors in <application>psql</application>'s Unicode-escape support (Tom Lane) </para> </listitem> <listitem> <para> - Speed up parallel <application>pg_restore</> when the archive + Speed up parallel <application>pg_restore</application> when the archive contains many large objects (blobs) (Tom Lane) </para> </listitem> <listitem> <para> - Fix <application>PL/pgSQL</>'s handling of <quote>simple</> + Fix <application>PL/pgSQL</application>'s handling of <quote>simple</quote> expressions to not fail in recursion or error-recovery cases (Tom Lane) </para> </listitem> <listitem> <para> - Fix <application>PL/pgSQL</>'s error reporting for no-such-column + Fix <application>PL/pgSQL</application>'s error reporting for no-such-column cases (Tom Lane) </para> <para> As of 9.0, it would sometimes report <quote>missing FROM-clause entry - for table foo</> when <quote>record foo has no field bar</> would be + for table foo</quote> when <quote>record foo has no field bar</quote> would be more appropriate. </para> </listitem> <listitem> <para> - Fix <application>PL/Python</> to honor typmod (i.e., length or + Fix <application>PL/Python</application> to honor typmod (i.e., length or precision restrictions) when assigning to tuple fields (Tom Lane) </para> @@ -7494,7 +7494,7 @@ <listitem> <para> - Fix <application>PL/Python</>'s handling of set-returning functions + Fix <application>PL/Python</application>'s handling of set-returning functions (Jan Urbanski) </para> @@ -7506,22 +7506,22 @@ <listitem> <para> - Fix bug in <filename>contrib/cube</>'s GiST picksplit algorithm + Fix bug in <filename>contrib/cube</filename>'s GiST picksplit algorithm (Alexander Korotkov) </para> <para> This could result in considerable inefficiency, though not actually - incorrect answers, in a GiST index on a <type>cube</> column. - If you have such an index, consider <command>REINDEX</>ing it after + incorrect answers, in a GiST index on a <type>cube</type> column. + If you have such an index, consider <command>REINDEX</command>ing it after installing this update. </para> </listitem> <listitem> <para> - Don't emit <quote>identifier will be truncated</> notices in - <filename>contrib/dblink</> except when creating new connections + Don't emit <quote>identifier will be truncated</quote> notices in + <filename>contrib/dblink</filename> except when creating new connections (Itagaki Takahiro) </para> </listitem> @@ -7529,26 +7529,26 @@ <listitem> <para> Fix potential coredump on missing public key in - <filename>contrib/pgcrypto</> (Marti Raudsepp) + <filename>contrib/pgcrypto</filename> (Marti Raudsepp) </para> </listitem> <listitem> <para> - Fix buffer overrun in <filename>contrib/pg_upgrade</> (Hernan Gonzalez) + Fix buffer overrun in <filename>contrib/pg_upgrade</filename> (Hernan Gonzalez) </para> </listitem> <listitem> <para> - Fix memory leak in <filename>contrib/xml2</>'s XPath query functions + Fix memory leak in <filename>contrib/xml2</filename>'s XPath query functions (Tom Lane) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2010o + Update time zone data files to <application>tzdata</application> release 2010o for DST law changes in Fiji and Samoa; also historical corrections for Hong Kong. </para> @@ -7597,7 +7597,7 @@ This change prevents security problems that can be caused by subverting Perl or Tcl code that will be executed later in the same session under another SQL user identity (for example, within a <literal>SECURITY - DEFINER</> function). Most scripting languages offer numerous ways that + DEFINER</literal> function). Most scripting languages offer numerous ways that that might be done, such as redefining standard functions or operators called by the target function. Without this change, any SQL user with Perl or Tcl language usage rights can do essentially anything with the @@ -7626,7 +7626,7 @@ <listitem> <para> - Improve <function>pg_get_expr()</> security fix so that the function + Improve <function>pg_get_expr()</function> security fix so that the function can still be used on the output of a sub-select (Tom Lane) </para> </listitem> @@ -7651,7 +7651,7 @@ <listitem> <para> - Fix possible duplicate scans of <literal>UNION ALL</> member relations + Fix possible duplicate scans of <literal>UNION ALL</literal> member relations (Tom Lane) </para> </listitem> @@ -7676,14 +7676,14 @@ </para> <para> - Input such as <literal>'J100000'::date</> worked before 8.4, + Input such as <literal>'J100000'::date</literal> worked before 8.4, but was unintentionally broken by added error-checking. </para> </listitem> <listitem> <para> - Make psql recognize <command>DISCARD ALL</> as a command that should + Make psql recognize <command>DISCARD ALL</command> as a command that should not be encased in a transaction block in autocommit-off mode (Itagaki Takahiro) </para> @@ -7714,12 +7714,12 @@ <para> This release of - <productname>PostgreSQL</> adds features that have been requested + <productname>PostgreSQL</productname> adds features that have been requested for years, such as easy-to-use replication, a mass permission-changing facility, and anonymous code blocks. While past major releases have been conservative in their scope, this release shows a bold new desire to provide facilities that new and existing - users of <productname>PostgreSQL</> will embrace. This has all + users of <productname>PostgreSQL</productname> will embrace. This has all been done with few incompatibilities. Major enhancements include: </para> @@ -7732,7 +7732,7 @@ <para> Built-in replication based on log shipping. This advance consists of two features: Streaming Replication, allowing continuous archive - (<acronym>WAL</>) files to be streamed over a network connection to a + (<acronym>WAL</acronym>) files to be streamed over a network connection to a standby server, and Hot Standby, allowing continuous archive standby servers to execute read-only queries. The net effect is to support a single master with multiple read-only slave servers. @@ -7742,10 +7742,10 @@ <listitem> <para> Easier database object permissions management. <link - linkend="SQL-GRANT"><command>GRANT</>/<command>REVOKE IN - SCHEMA</></link> supports mass permissions changes on existing objects, + linkend="SQL-GRANT"><command>GRANT</command>/<command>REVOKE IN + SCHEMA</command></link> supports mass permissions changes on existing objects, while <link linkend="SQL-ALTERDEFAULTPRIVILEGES"><command>ALTER DEFAULT - PRIVILEGES</></link> allows control of privileges for objects created in + PRIVILEGES</command></link> allows control of privileges for objects created in the future. Large objects (BLOBs) now support permissions management as well. </para> @@ -7754,8 +7754,8 @@ <listitem> <para> Broadly enhanced stored procedure support. - The <link linkend="SQL-DO"><command>DO</></link> statement supports - ad-hoc or <quote>anonymous</> code blocks. + The <link linkend="SQL-DO"><command>DO</command></link> statement supports + ad-hoc or <quote>anonymous</quote> code blocks. Functions can now be called using named parameters. <link linkend="plpgsql">PL/pgSQL</link> is now installed by default, and <link linkend="plperl">PL/Perl</link> and <link @@ -7767,14 +7767,14 @@ <listitem> <para> Full support for <link linkend="install-windows">64-bit - <productname>Windows</></link>. + <productname>Windows</productname></link>. </para> </listitem> <listitem> <para> More advanced reporting queries, including additional windowing options - (<literal>PRECEDING</> and <literal>FOLLOWING</>) and the ability to + (<literal>PRECEDING</literal> and <literal>FOLLOWING</literal>) and the ability to control the order in which values are fed to aggregate functions. </para> </listitem> @@ -7808,7 +7808,7 @@ <para> New and enhanced security features, including RADIUS authentication, LDAP authentication improvements, and a new contrib module - <link linkend="passwordcheck"><filename>passwordcheck</></link> + <link linkend="passwordcheck"><filename>passwordcheck</filename></link> for testing password strength. </para> </listitem> @@ -7816,10 +7816,10 @@ <listitem> <para> New high-performance implementation of the - <link linkend="SQL-LISTEN"><command>LISTEN</></link>/<link - linkend="SQL-NOTIFY"><command>NOTIFY</></link> feature. + <link linkend="SQL-LISTEN"><command>LISTEN</command></link>/<link + linkend="SQL-NOTIFY"><command>NOTIFY</command></link> feature. Pending events are now stored in a memory-based queue rather than - a table. Also, a <quote>payload</> string can be sent with each + a table. Also, a <quote>payload</quote> string can be sent with each event, rather than transmitting just an event name as before. </para> </listitem> @@ -7827,7 +7827,7 @@ <listitem> <para> New implementation of - <link linkend="SQL-VACUUM"><command>VACUUM FULL</></link>. + <link linkend="SQL-VACUUM"><command>VACUUM FULL</command></link>. This command now rewrites the entire table and indexes, rather than moving individual rows to compact space. It is substantially faster in most cases, and no longer results in index bloat. @@ -7837,7 +7837,7 @@ <listitem> <para> New contrib module - <link linkend="pgupgrade"><filename>pg_upgrade</></link> + <link linkend="pgupgrade"><filename>pg_upgrade</filename></link> to support in-place upgrades from 8.3 or 8.4 to 9.0. </para> </listitem> @@ -7853,7 +7853,7 @@ <listitem> <para> - <link linkend="SQL-EXPLAIN "><command>EXPLAIN</></link> enhancements. + <link linkend="SQL-EXPLAIN "><command>EXPLAIN</command></link> enhancements. The output is now available in JSON, XML, or YAML format, and includes buffer utilization and other data not previously available. </para> @@ -7861,7 +7861,7 @@ <listitem> <para> - <link linkend="hstore"><filename>hstore</></link> improvements, + <link linkend="hstore"><filename>hstore</filename></link> improvements, including new functions and greater data capacity. </para> </listitem> @@ -7901,34 +7901,34 @@ <listitem> <para> - Remove server parameter <varname>add_missing_from</>, which was + Remove server parameter <varname>add_missing_from</varname>, which was defaulted to off for many years (Tom Lane) </para> </listitem> <listitem> <para> - Remove server parameter <varname>regex_flavor</>, which + Remove server parameter <varname>regex_flavor</varname>, which was defaulted to <link - linkend="posix-syntax-details"><literal>advanced</></link> + linkend="posix-syntax-details"><literal>advanced</literal></link> for many years (Tom Lane) </para> </listitem> <listitem> <para> - <link linkend="guc-archive-mode"><varname>archive_mode</></link> + <link linkend="guc-archive-mode"><varname>archive_mode</varname></link> now only affects <link - linkend="guc-archive-command"><varname>archive_command</></link>; + linkend="guc-archive-command"><varname>archive_command</varname></link>; a new setting, <link - linkend="guc-wal-level"><varname>wal_level</></link>, affects + linkend="guc-wal-level"><varname>wal_level</varname></link>, affects the contents of the write-ahead log (Heikki Linnakangas) </para> </listitem> <listitem> <para> - <link linkend="guc-log-temp-files"><varname>log_temp_files</></link> + <link linkend="guc-log-temp-files"><varname>log_temp_files</varname></link> now uses default file size units of kilobytes (Robert Haas) </para> </listitem> @@ -7967,13 +7967,13 @@ <listitem> <para> - <link linkend="datatype-binary"><type>bytea</></link> output now + <link linkend="datatype-binary"><type>bytea</type></link> output now appears in hex format by default (Peter Eisentraut) </para> <para> The server parameter <link - linkend="guc-bytea-output"><varname>bytea_output</></link> can be + linkend="guc-bytea-output"><varname>bytea_output</varname></link> can be used to select the traditional output format if needed for compatibility. </para> @@ -7995,18 +7995,18 @@ <listitem> <para> Improve standards compliance of <link - linkend="functions-similarto-regexp"><literal>SIMILAR TO</></link> - patterns and SQL-style <function>substring()</> patterns (Tom Lane) + linkend="functions-similarto-regexp"><literal>SIMILAR TO</literal></link> + patterns and SQL-style <function>substring()</function> patterns (Tom Lane) </para> <para> - This includes treating <literal>?</> and <literal>{...}</> as + This includes treating <literal>?</literal> and <literal>{...}</literal> as pattern metacharacters, while they were simple literal characters before; that corresponds to new features added in SQL:2008. - Also, <literal>^</> and <literal>$</> are now treated as simple + Also, <literal>^</literal> and <literal>$</literal> are now treated as simple literal characters; formerly they were treated as metacharacters, as if the pattern were following POSIX rather than SQL rules. - Also, in SQL-standard <function>substring()</>, use of parentheses + Also, in SQL-standard <function>substring()</function>, use of parentheses for nesting no longer interferes with capturing of a substring. Also, processing of bracket expressions (character classes) is now more standards-compliant. @@ -8016,14 +8016,14 @@ <listitem> <para> Reject negative length values in 3-parameter <link - linkend="functions-string-sql"><function>substring()</></link> + linkend="functions-string-sql"><function>substring()</function></link> for bit strings, per the SQL standard (Tom Lane) </para> </listitem> <listitem> <para> - Make <function>date_trunc</> truncate rather than round when reducing + Make <function>date_trunc</function> truncate rather than round when reducing precision of fractional seconds (Tom Lane) </para> @@ -8044,7 +8044,7 @@ <listitem> <para> - Tighten enforcement of column name consistency during <command>RENAME</> + Tighten enforcement of column name consistency during <command>RENAME</command> when a child table inherits the same column from multiple unrelated parents (KaiGai Kohei) </para> @@ -8100,8 +8100,8 @@ situations. Although it's recommended that functions encountering this type of error be modified to remove the conflict, the old behavior can be restored if necessary via the configuration parameter <link - linkend="plpgsql-var-subst"><varname>plpgsql.variable_conflict</></link>, - or via the per-function option <literal>#variable_conflict</>. + linkend="plpgsql-var-subst"><varname>plpgsql.variable_conflict</varname></link>, + or via the per-function option <literal>#variable_conflict</literal>. </para> </listitem> @@ -8126,8 +8126,8 @@ <para> For example, if a column of the result type is declared as - <literal>NUMERIC(30,2)</>, it is no longer acceptable to return a - <literal>NUMERIC</> of some other precision in that column. Previous + <literal>NUMERIC(30,2)</literal>, it is no longer acceptable to return a + <literal>NUMERIC</literal> of some other precision in that column. Previous versions neglected to check the type modifier and would thus allow result rows that didn't actually conform to the declared restrictions. </para> @@ -8141,33 +8141,33 @@ <para> Formerly, a statement like - <literal>SELECT ... INTO <replaceable>rec</>.<replaceable>fld</> FROM ...</literal> + <literal>SELECT ... INTO <replaceable>rec</replaceable>.<replaceable>fld</replaceable> FROM ...</literal> was treated as a scalar assignment even if the record field - <replaceable>fld</> was of composite type. Now it is treated as a - record assignment, the same as when the <literal>INTO</> target is a + <replaceable>fld</replaceable> was of composite type. Now it is treated as a + record assignment, the same as when the <literal>INTO</literal> target is a regular variable of composite type. So the values to be assigned to the field's subfields should be written as separate columns of the - <command>SELECT</> list, not as a <literal>ROW(...)</> construct as in + <command>SELECT</command> list, not as a <literal>ROW(...)</literal> construct as in previous versions. </para> <para> If you need to do this in a way that will work in both 9.0 and previous releases, you can write something like - <literal><replaceable>rec</>.<replaceable>fld</> := ROW(...) FROM ...</literal>. + <literal><replaceable>rec</replaceable>.<replaceable>fld</replaceable> := ROW(...) FROM ...</literal>. </para> </listitem> <listitem> <para> - Remove PL/pgSQL's <literal>RENAME</> declaration (Tom Lane) + Remove PL/pgSQL's <literal>RENAME</literal> declaration (Tom Lane) </para> <para> - Instead of <literal>RENAME</>, use <link - linkend="plpgsql-declaration-alias"><literal>ALIAS</></link>, + Instead of <literal>RENAME</literal>, use <link + linkend="plpgsql-declaration-alias"><literal>ALIAS</literal></link>, which can now create an alias for any variable, not only dollar sign - parameter names (such as <literal>$1</>) as before. + parameter names (such as <literal>$1</literal>) as before. </para> </listitem> </itemizedlist> @@ -8181,11 +8181,11 @@ <listitem> <para> - Deprecate use of <literal>=></> as an operator name (Robert Haas) + Deprecate use of <literal>=></literal> as an operator name (Robert Haas) </para> <para> - Future versions of <productname>PostgreSQL</> will probably reject + Future versions of <productname>PostgreSQL</productname> will probably reject this operator name entirely, in order to support the SQL-standard notation for named function parameters. For the moment, it is still allowed, but a warning is emitted when such an operator is @@ -8240,7 +8240,7 @@ <para> This feature is called Hot Standby. There are new - <filename>postgresql.conf</> and <filename>recovery.conf</> + <filename>postgresql.conf</filename> and <filename>recovery.conf</filename> settings to control this feature, as well as extensive <link linkend="hot-standby">documentation</link>. </para> @@ -8248,18 +8248,18 @@ <listitem> <para> - Allow write-ahead log (<acronym>WAL</>) data to be streamed to a + Allow write-ahead log (<acronym>WAL</acronym>) data to be streamed to a standby server (Fujii Masao, Heikki Linnakangas) </para> <para> This feature is called Streaming Replication. - Previously <acronym>WAL</> data could be sent to standby servers only - in units of entire <acronym>WAL</> files (normally 16 megabytes each). + Previously <acronym>WAL</acronym> data could be sent to standby servers only + in units of entire <acronym>WAL</acronym> files (normally 16 megabytes each). Streaming Replication eliminates this inefficiency and allows updates on the master to be propagated to standby servers with very little - delay. There are new <filename>postgresql.conf</> and - <filename>recovery.conf</> settings to control this feature, as well as + delay. There are new <filename>postgresql.conf</filename> and + <filename>recovery.conf</filename> settings to control this feature, as well as extensive <link linkend="streaming-replication">documentation</link>. </para> </listitem> @@ -8267,9 +8267,9 @@ <listitem> <para> Add <link - linkend="functions-recovery-info-table"><function>pg_last_xlog_receive_location()</></link> - and <function>pg_last_xlog_replay_location()</>, which - can be used to monitor standby server <acronym>WAL</> + linkend="functions-recovery-info-table"><function>pg_last_xlog_receive_location()</function></link> + and <function>pg_last_xlog_replay_location()</function>, which + can be used to monitor standby server <acronym>WAL</acronym> activity (Simon Riggs, Fujii Masao, Heikki Linnakangas) </para> </listitem> @@ -8286,9 +8286,9 @@ <listitem> <para> Allow per-tablespace values to be set for sequential and random page - cost estimates (<varname>seq_page_cost</>/<varname>random_page_cost</>) + cost estimates (<varname>seq_page_cost</varname>/<varname>random_page_cost</varname>) via <link linkend="SQL-ALTERTABLESPACE"><command>ALTER TABLESPACE - ... SET/RESET</></link> (Robert Haas) + ... SET/RESET</command></link> (Robert Haas) </para> </listitem> @@ -8299,8 +8299,8 @@ </para> <para> - <command>UPDATE</>, <command>DELETE</>, and <command>SELECT FOR - UPDATE/SHARE</> queries that involve joins will now behave much better + <command>UPDATE</command>, <command>DELETE</command>, and <command>SELECT FOR + UPDATE/SHARE</command> queries that involve joins will now behave much better when encountering freshly-updated rows. </para> </listitem> @@ -8308,7 +8308,7 @@ <listitem> <para> Improve performance of <link - linkend="SQL-TRUNCATE"><command>TRUNCATE</></link> when + linkend="SQL-TRUNCATE"><command>TRUNCATE</command></link> when the table was created or truncated earlier in the same transaction (Tom Lane) </para> @@ -8345,12 +8345,12 @@ <listitem> <para> - Allow <literal>IS NOT NULL</> restrictions to use indexes (Tom Lane) + Allow <literal>IS NOT NULL</literal> restrictions to use indexes (Tom Lane) </para> <para> This is particularly useful for finding - <function>MAX()</>/<function>MIN()</> values in indexes that + <function>MAX()</function>/<function>MIN()</function> values in indexes that contain many null values. </para> </listitem> @@ -8358,7 +8358,7 @@ <listitem> <para> Improve the optimizer's choices about when to use materialize nodes, - and when to use sorting versus hashing for <literal>DISTINCT</> + and when to use sorting versus hashing for <literal>DISTINCT</literal> (Tom Lane) </para> </listitem> @@ -8366,7 +8366,7 @@ <listitem> <para> Improve the optimizer's equivalence detection for expressions involving - <type>boolean</> <literal><></> operators (Tom Lane) + <type>boolean</type> <literal><></literal> operators (Tom Lane) </para> </listitem> </itemizedlist> @@ -8387,7 +8387,7 @@ While the Genetic Query Optimizer (GEQO) still selects random plans, it now always selects the same random plans for identical queries, thus giving more consistent performance. You can modify <link - linkend="guc-geqo-seed"><varname>geqo_seed</></link> to experiment with + linkend="guc-geqo-seed"><varname>geqo_seed</varname></link> to experiment with alternative plans. </para> </listitem> @@ -8398,7 +8398,7 @@ </para> <para> - This avoids the rare error <quote>failed to make a valid plan</>, + This avoids the rare error <quote>failed to make a valid plan</quote>, and should also improve planning speed. </para> </listitem> @@ -8414,7 +8414,7 @@ <listitem> <para> - Improve <link linkend="SQL-ANALYZE"><command>ANALYZE</></link> + Improve <link linkend="SQL-ANALYZE"><command>ANALYZE</command></link> to support inheritance-tree statistics (Tom Lane) </para> @@ -8451,14 +8451,14 @@ <listitem> <para> Allow setting of number-of-distinct-values statistics using <link - linkend="SQL-ALTERTABLE"><command>ALTER TABLE</></link> + linkend="SQL-ALTERTABLE"><command>ALTER TABLE</command></link> (Robert Haas) </para> <para> This allows users to override the estimated number or percentage of distinct values for a column. This statistic is normally computed by - <command>ANALYZE</>, but the estimate can be poor, especially on tables + <command>ANALYZE</command>, but the estimate can be poor, especially on tables with very large numbers of rows. </para> </listitem> @@ -8475,7 +8475,7 @@ <listitem> <para> Add support for <link - linkend="auth-radius"><acronym>RADIUS</></link> (Remote + linkend="auth-radius"><acronym>RADIUS</acronym></link> (Remote Authentication Dial In User Service) authentication (Magnus Hagander) </para> @@ -8483,28 +8483,28 @@ <listitem> <para> - Allow <link linkend="auth-ldap"><acronym>LDAP</></link> + Allow <link linkend="auth-ldap"><acronym>LDAP</acronym></link> (Lightweight Directory Access Protocol) authentication - to operate in <quote>search/bind</> mode + to operate in <quote>search/bind</quote> mode (Robert Fleming, Magnus Hagander) </para> <para> This allows the user to be looked up first, then the system uses - the <acronym>DN</> (Distinguished Name) returned for that user. + the <acronym>DN</acronym> (Distinguished Name) returned for that user. </para> </listitem> <listitem> <para> Add <link - linkend="auth-pg-hba-conf"><literal>samehost</></link> - and <literal>samenet</> designations to - <filename>pg_hba.conf</> (Stef Walter) + linkend="auth-pg-hba-conf"><literal>samehost</literal></link> + and <literal>samenet</literal> designations to + <filename>pg_hba.conf</filename> (Stef Walter) </para> <para> - These match the server's <acronym>IP</> address and subnet address + These match the server's <acronym>IP</acronym> address and subnet address respectively. </para> </listitem> @@ -8530,7 +8530,7 @@ Add the ability for clients to set an <link linkend="libpq-connect-application-name">application name</link>, which is displayed in - <structname>pg_stat_activity</> (Dave Page) + <structname>pg_stat_activity</structname> (Dave Page) </para> <para> @@ -8541,8 +8541,8 @@ <listitem> <para> - Add a SQLSTATE option (<literal>%e</>) to <link - linkend="guc-log-line-prefix"><varname>log_line_prefix</></link> + Add a SQLSTATE option (<literal>%e</literal>) to <link + linkend="guc-log-line-prefix"><varname>log_line_prefix</varname></link> (Guillaume Smet) </para> @@ -8555,7 +8555,7 @@ <listitem> <para> - Write to the Windows event log in <acronym>UTF16</> encoding + Write to the Windows event log in <acronym>UTF16</acronym> encoding (Itagaki Takahiro) </para> @@ -8577,7 +8577,7 @@ <listitem> <para> Add <link - linkend="monitoring-stats-funcs-table"><function>pg_stat_reset_shared('bgwriter')</></link> + linkend="monitoring-stats-funcs-table"><function>pg_stat_reset_shared('bgwriter')</function></link> to reset the cluster-wide shared statistics for the background writer (Greg Smith) </para> @@ -8586,8 +8586,8 @@ <listitem> <para> Add <link - linkend="monitoring-stats-funcs-table"><function>pg_stat_reset_single_table_counters()</></link> - and <function>pg_stat_reset_single_function_counters()</> + linkend="monitoring-stats-funcs-table"><function>pg_stat_reset_single_table_counters()</function></link> + and <function>pg_stat_reset_single_function_counters()</function> to allow resetting the statistics counters for individual tables and functions (Magnus Hagander) </para> @@ -8612,10 +8612,10 @@ <para> Previously only per-database and per-role settings were possible, not combinations. All role and database settings are now stored - in the new <structname>pg_db_role_setting</> system catalog. A new - <application>psql</> command <literal>\drds</> shows these settings. - The legacy system views <structname>pg_roles</>, - <structname>pg_shadow</>, and <structname>pg_user</> + in the new <structname>pg_db_role_setting</structname> system catalog. A new + <application>psql</application> command <literal>\drds</literal> shows these settings. + The legacy system views <structname>pg_roles</structname>, + <structname>pg_shadow</structname>, and <structname>pg_user</structname> do not show combination settings, and therefore no longer completely represent the configuration for a user or database. </para> @@ -8624,9 +8624,9 @@ <listitem> <para> Add server parameter <link - linkend="guc-bonjour"><varname>bonjour</></link>, which + linkend="guc-bonjour"><varname>bonjour</varname></link>, which controls whether a Bonjour-enabled server advertises - itself via <productname>Bonjour</> (Tom Lane) + itself via <productname>Bonjour</productname> (Tom Lane) </para> <para> @@ -8639,7 +8639,7 @@ <listitem> <para> Add server parameter <link - linkend="guc-enable-material"><varname>enable_material</></link>, which + linkend="guc-enable-material"><varname>enable_material</varname></link>, which controls the use of materialize nodes in the optimizer (Robert Haas) </para> @@ -8654,7 +8654,7 @@ <listitem> <para> Change server parameter <link - linkend="guc-log-temp-files"><varname>log_temp_files</></link> to + linkend="guc-log-temp-files"><varname>log_temp_files</varname></link> to use default file size units of kilobytes (Robert Haas) </para> @@ -8666,14 +8666,14 @@ <listitem> <para> - Log changes of parameter values when <filename>postgresql.conf</> is + Log changes of parameter values when <filename>postgresql.conf</filename> is reloaded (Peter Eisentraut) </para> <para> This lets administrators and security staff audit changes of database settings, and is also very convenient for checking the effects of - <filename>postgresql.conf</> edits. + <filename>postgresql.conf</filename> edits. </para> </listitem> @@ -8685,10 +8685,10 @@ <para> Non-superusers can no longer issue <command>ALTER - ROLE</>/<command>DATABASE SET</> for parameters that are not currently + ROLE</command>/<command>DATABASE SET</command> for parameters that are not currently known to the server. This allows the server to correctly check that superuser-only parameters are only set by superusers. Previously, - the <literal>SET</> would be allowed and then ignored at session start, + the <literal>SET</literal> would be allowed and then ignored at session start, making superuser-only custom parameters much less useful than they should be. </para> @@ -8708,24 +8708,24 @@ <listitem> <para> Perform <link linkend="SQL-FOR-UPDATE-SHARE"><command>SELECT - FOR UPDATE</>/<literal>SHARE</></link> processing after - applying <literal>LIMIT</>, so the number of rows returned + FOR UPDATE</command>/<literal>SHARE</literal></link> processing after + applying <literal>LIMIT</literal>, so the number of rows returned is always predictable (Tom Lane) </para> <para> Previously, changes made by concurrent transactions could cause a - <command>SELECT FOR UPDATE</> to unexpectedly return fewer rows than - specified by its <literal>LIMIT</>. <literal>FOR UPDATE</> in combination - with <literal>ORDER BY</> can still produce surprising results, but that - can be corrected by placing <literal>FOR UPDATE</> in a subquery. + <command>SELECT FOR UPDATE</command> to unexpectedly return fewer rows than + specified by its <literal>LIMIT</literal>. <literal>FOR UPDATE</literal> in combination + with <literal>ORDER BY</literal> can still produce surprising results, but that + can be corrected by placing <literal>FOR UPDATE</literal> in a subquery. </para> </listitem> <listitem> <para> Allow mixing of traditional and SQL-standard <link - linkend="SQL-LIMIT"><literal>LIMIT</>/<literal>OFFSET</></link> + linkend="SQL-LIMIT"><literal>LIMIT</literal>/<literal>OFFSET</literal></link> syntax (Tom Lane) </para> </listitem> @@ -8738,15 +8738,15 @@ </para> <para> - Frames can now start with <literal>CURRENT ROW</>, and the <literal>ROWS - <replaceable>n</> PRECEDING</>/<literal>FOLLOWING</> options are now + Frames can now start with <literal>CURRENT ROW</literal>, and the <literal>ROWS + <replaceable>n</replaceable> PRECEDING</literal>/<literal>FOLLOWING</literal> options are now supported. </para> </listitem> <listitem> <para> - Make <command>SELECT INTO</> and <command>CREATE TABLE AS</> return + Make <command>SELECT INTO</command> and <command>CREATE TABLE AS</command> return row counts to the client in their command tags (Boszormenyi Zoltan) </para> @@ -8769,7 +8769,7 @@ <para> Support Unicode surrogate pairs (dual 16-bit representation) in <link - linkend="sql-syntax-strings-uescape"><literal>U&</></link> + linkend="sql-syntax-strings-uescape"><literal>U&</literal></link> strings and identifiers (Peter Eisentraut) </para> </listitem> @@ -8777,7 +8777,7 @@ <listitem> <para> Support Unicode escapes in <link - linkend="sql-syntax-strings-escape"><literal>E'...'</></link> + linkend="sql-syntax-strings-escape"><literal>E'...'</literal></link> strings (Marko Kreen) </para> </listitem> @@ -8796,7 +8796,7 @@ <listitem> <para> Speed up <link linkend="SQL-CREATEDATABASE"><command>CREATE - DATABASE</></link> by deferring flushes to disk (Andres + DATABASE</command></link> by deferring flushes to disk (Andres Freund, Greg Stark) </para> </listitem> @@ -8805,7 +8805,7 @@ <para> Allow <link linkend="SQL-COMMENT">comments</link> on columns of tables, views, and composite types only, not other - relation types such as indexes and <acronym>TOAST</> tables (Tom Lane) + relation types such as indexes and <acronym>TOAST</acronym> tables (Tom Lane) </para> </listitem> @@ -8819,12 +8819,12 @@ <listitem> <para> - Let values of columns having storage type <literal>MAIN</> remain on + Let values of columns having storage type <literal>MAIN</literal> remain on the main heap page unless the row cannot fit on a page (Kevin Grittner) </para> <para> - Previously <literal>MAIN</> values were forced out to <acronym>TOAST</> + Previously <literal>MAIN</literal> values were forced out to <acronym>TOAST</acronym> tables until the row size was less than one-quarter of the page size. </para> </listitem> @@ -8832,26 +8832,26 @@ </itemizedlist> <sect4> - <title><command>ALTER TABLE</></title> + <title><command>ALTER TABLE</command></title> <itemizedlist> <listitem> <para> - Implement <literal>IF EXISTS</> for <literal>ALTER TABLE DROP COLUMN</> - and <literal>ALTER TABLE DROP CONSTRAINT </> (Andres Freund) + Implement <literal>IF EXISTS</literal> for <literal>ALTER TABLE DROP COLUMN</literal> + and <literal>ALTER TABLE DROP CONSTRAINT </literal> (Andres Freund) </para> </listitem> <listitem> <para> - Allow <command>ALTER TABLE</> commands that rewrite tables to skip - <acronym>WAL</> logging (Itagaki Takahiro) + Allow <command>ALTER TABLE</command> commands that rewrite tables to skip + <acronym>WAL</acronym> logging (Itagaki Takahiro) </para> <para> Such operations either produce a new copy of the table or are rolled - back, so <acronym>WAL</> archiving can be skipped, unless running in + back, so <acronym>WAL</acronym> archiving can be skipped, unless running in continuous archiving mode. This reduces I/O overhead and improves performance. </para> @@ -8859,8 +8859,8 @@ <listitem> <para> - Fix failure of <literal>ALTER TABLE <replaceable>table</> ADD COLUMN - <replaceable>col</> serial</literal> when done by non-owner of table + Fix failure of <literal>ALTER TABLE <replaceable>table</replaceable> ADD COLUMN + <replaceable>col</replaceable> serial</literal> when done by non-owner of table (Tom Lane) </para> </listitem> @@ -8870,14 +8870,14 @@ </sect4> <sect4> - <title><link linkend="SQL-CREATETABLE"><command>CREATE TABLE</></link></title> + <title><link linkend="SQL-CREATETABLE"><command>CREATE TABLE</command></link></title> <itemizedlist> <listitem> <para> - Add support for copying <literal>COMMENTS</> and <literal>STORAGE</> - settings in <command>CREATE TABLE ... LIKE</> commands + Add support for copying <literal>COMMENTS</literal> and <literal>STORAGE</literal> + settings in <command>CREATE TABLE ... LIKE</command> commands (Itagaki Takahiro) </para> </listitem> @@ -8885,14 +8885,14 @@ <listitem> <para> Add a shortcut for copying all properties in <command>CREATE - TABLE ... LIKE</> commands (Itagaki Takahiro) + TABLE ... LIKE</command> commands (Itagaki Takahiro) </para> </listitem> <listitem> <para> Add the SQL-standard - <literal>CREATE TABLE ... OF <replaceable>type</></literal> command + <literal>CREATE TABLE ... OF <replaceable>type</replaceable></literal> command (Peter Eisentraut) </para> @@ -8920,10 +8920,10 @@ <para> This allows mass updates, such as - <literal>UPDATE tab SET col = col + 1</>, + <literal>UPDATE tab SET col = col + 1</literal>, to work reliably on columns that have unique indexes or are marked as primary keys. - If the constraint is specified as <literal>DEFERRABLE</> it will be + If the constraint is specified as <literal>DEFERRABLE</literal> it will be checked at the end of the statement, rather than after each row is updated. The constraint check can also be deferred until the end of the current transaction, allowing such updates to be spread over multiple @@ -8942,7 +8942,7 @@ Exclusion constraints generalize uniqueness constraints by allowing arbitrary comparison operators, not just equality. They are created with the <link linkend="SQL-CREATETABLE-EXCLUDE"><command>CREATE - TABLE CONSTRAINT ... EXCLUDE</></link> clause. + TABLE CONSTRAINT ... EXCLUDE</command></link> clause. The most common use of exclusion constraints is to specify that column entries must not overlap, rather than simply not be equal. This is useful for time periods and other ranges, as well as arrays. @@ -8959,7 +8959,7 @@ <para> For example, a uniqueness constraint violation might now report - <literal>Key (x)=(2) already exists</>. + <literal>Key (x)=(2) already exists</literal>. </para> </listitem> @@ -8976,8 +8976,8 @@ <para> Add the ability to make mass permission changes across a whole schema using the new <link - linkend="SQL-GRANT"><command>GRANT</>/<command>REVOKE - IN SCHEMA</></link> clause (Petr Jelinek) + linkend="SQL-GRANT"><command>GRANT</command>/<command>REVOKE + IN SCHEMA</command></link> clause (Petr Jelinek) </para> <para> @@ -8990,7 +8990,7 @@ <listitem> <para> Add <link linkend="SQL-ALTERDEFAULTPRIVILEGES"><command>ALTER - DEFAULT PRIVILEGES</></link> command to control privileges + DEFAULT PRIVILEGES</command></link> command to control privileges of objects created later (Petr Jelinek) </para> @@ -9005,7 +9005,7 @@ <listitem> <para> Add the ability to control large object (BLOB) permissions with - <command>GRANT</>/<command>REVOKE</> (KaiGai Kohei) + <command>GRANT</command>/<command>REVOKE</command> (KaiGai Kohei) </para> <para> @@ -9028,8 +9028,8 @@ <listitem> <para> - Make <link linkend="SQL-LISTEN"><command>LISTEN</></link>/<link - linkend="SQL-NOTIFY"><command>NOTIFY</></link> store pending events + Make <link linkend="SQL-LISTEN"><command>LISTEN</command></link>/<link + linkend="SQL-NOTIFY"><command>NOTIFY</command></link> store pending events in a memory queue, rather than in a system table (Joachim Wieland) </para> @@ -9042,21 +9042,21 @@ <listitem> <para> - Allow <link linkend="SQL-NOTIFY"><command>NOTIFY</></link> - to pass an optional <quote>payload</> string to listeners + Allow <link linkend="SQL-NOTIFY"><command>NOTIFY</command></link> + to pass an optional <quote>payload</quote> string to listeners (Joachim Wieland) </para> <para> This greatly improves the usefulness of - <command>LISTEN</>/<command>NOTIFY</> as a + <command>LISTEN</command>/<command>NOTIFY</command> as a general-purpose event queue system. </para> </listitem> <listitem> <para> - Allow <link linkend="SQL-CLUSTER"><command>CLUSTER</></link> + Allow <link linkend="SQL-CLUSTER"><command>CLUSTER</command></link> on all per-database system catalogs (Tom Lane) </para> @@ -9068,30 +9068,30 @@ </itemizedlist> <sect4> - <title><link linkend="SQL-COPY"><command>COPY</></link></title> + <title><link linkend="SQL-COPY"><command>COPY</command></link></title> <itemizedlist> <listitem> <para> - Accept <literal>COPY ... CSV FORCE QUOTE *</> + Accept <literal>COPY ... CSV FORCE QUOTE *</literal> (Itagaki Takahiro) </para> <para> - Now <literal>*</> can be used as shorthand for <quote>all columns</> - in the <literal>FORCE QUOTE</> clause. + Now <literal>*</literal> can be used as shorthand for <quote>all columns</quote> + in the <literal>FORCE QUOTE</literal> clause. </para> </listitem> <listitem> <para> - Add new <command>COPY</> syntax that allows options to be + Add new <command>COPY</command> syntax that allows options to be specified inside parentheses (Robert Haas, Emmanuel Cecchet) </para> <para> - This allows greater flexibility for future <command>COPY</> options. + This allows greater flexibility for future <command>COPY</command> options. The old syntax is still supported, but only for pre-existing options. </para> </listitem> @@ -9101,27 +9101,27 @@ </sect4> <sect4> - <title><link linkend="SQL-EXPLAIN"><command>EXPLAIN</></link></title> + <title><link linkend="SQL-EXPLAIN"><command>EXPLAIN</command></link></title> <itemizedlist> <listitem> <para> - Allow <command>EXPLAIN</> to output in <acronym>XML</>, - <acronym>JSON</>, or <acronym>YAML</> format (Robert Haas, Greg + Allow <command>EXPLAIN</command> to output in <acronym>XML</acronym>, + <acronym>JSON</acronym>, or <acronym>YAML</acronym> format (Robert Haas, Greg Sabino Mullane) </para> <para> The new output formats are easily machine-readable, supporting the - development of new tools for analysis of <command>EXPLAIN</> output. + development of new tools for analysis of <command>EXPLAIN</command> output. </para> </listitem> <listitem> <para> - Add new <literal>BUFFERS</> option to report query - buffer usage during <command>EXPLAIN ANALYZE</> (Itagaki Takahiro) + Add new <literal>BUFFERS</literal> option to report query + buffer usage during <command>EXPLAIN ANALYZE</command> (Itagaki Takahiro) </para> <para> @@ -9134,19 +9134,19 @@ <listitem> <para> - Add hash usage information to <command>EXPLAIN</> output (Robert + Add hash usage information to <command>EXPLAIN</command> output (Robert Haas) </para> </listitem> <listitem> <para> - Add new <command>EXPLAIN</> syntax that allows options to be + Add new <command>EXPLAIN</command> syntax that allows options to be specified inside parentheses (Robert Haas) </para> <para> - This allows greater flexibility for future <command>EXPLAIN</> options. + This allows greater flexibility for future <command>EXPLAIN</command> options. The old syntax is still supported, but only for pre-existing options. </para> </listitem> @@ -9156,13 +9156,13 @@ </sect4> <sect4> - <title><link linkend="SQL-VACUUM"><command>VACUUM</></link></title> + <title><link linkend="SQL-VACUUM"><command>VACUUM</command></link></title> <itemizedlist> <listitem> <para> - Change <command>VACUUM FULL</> to rewrite the entire table and + Change <command>VACUUM FULL</command> to rewrite the entire table and rebuild its indexes, rather than moving individual rows around to compact space (Itagaki Takahiro, Tom Lane) </para> @@ -9170,7 +9170,7 @@ <para> The previous method was usually slower and caused index bloat. Note that the new method will use more disk space transiently - during <command>VACUUM FULL</>; potentially as much as twice + during <command>VACUUM FULL</command>; potentially as much as twice the space normally occupied by the table and its indexes. </para> @@ -9178,12 +9178,12 @@ <listitem> <para> - Add new <command>VACUUM</> syntax that allows options to be + Add new <command>VACUUM</command> syntax that allows options to be specified inside parentheses (Itagaki Takahiro) </para> <para> - This allows greater flexibility for future <command>VACUUM</> options. + This allows greater flexibility for future <command>VACUUM</command> options. The old syntax is still supported, but only for pre-existing options. </para> </listitem> @@ -9200,7 +9200,7 @@ <listitem> <para> Allow an index to be named automatically by omitting the index name in - <link linkend="SQL-CREATEINDEX"><command>CREATE INDEX</></link> + <link linkend="SQL-CREATEINDEX"><command>CREATE INDEX</command></link> (Tom Lane) </para> </listitem> @@ -9228,22 +9228,22 @@ <listitem> <para> - Add <literal>point_ops</> operator class for <acronym>GiST</> + Add <literal>point_ops</literal> operator class for <acronym>GiST</acronym> (Teodor Sigaev) </para> <para> - This feature permits <acronym>GiST</> indexing of <type>point</> + This feature permits <acronym>GiST</acronym> indexing of <type>point</type> columns. The index can be used for several types of queries - such as <replaceable>point</> <literal><@</> <replaceable>polygon</> + such as <replaceable>point</replaceable> <literal><@</literal> <replaceable>polygon</replaceable> (point is in polygon). This should make many - <productname>PostGIS</> queries faster. + <productname>PostGIS</productname> queries faster. </para> </listitem> <listitem> <para> - Use red-black binary trees for <acronym>GIN</> index creation + Use red-black binary trees for <acronym>GIN</acronym> index creation (Teodor Sigaev) </para> @@ -9267,16 +9267,16 @@ <listitem> <para> - Allow <link linkend="datatype-binary"><type>bytea</></link> values + Allow <link linkend="datatype-binary"><type>bytea</type></link> values to be written in hex notation (Peter Eisentraut) </para> <para> The server parameter <link - linkend="guc-bytea-output"><varname>bytea_output</></link> controls - whether hex or traditional format is used for <type>bytea</> - output. Libpq's <function>PQescapeByteaConn()</> function automatically - uses the hex format when connected to <productname>PostgreSQL</> 9.0 + linkend="guc-bytea-output"><varname>bytea_output</varname></link> controls + whether hex or traditional format is used for <type>bytea</type> + output. Libpq's <function>PQescapeByteaConn()</function> function automatically + uses the hex format when connected to <productname>PostgreSQL</productname> 9.0 or newer servers. However, pre-9.0 libpq versions will not correctly process hex format from newer servers. </para> @@ -9293,20 +9293,20 @@ <para> Allow server parameter <link linkend="guc-extra-float-digits">extra_float_digits</link> - to be increased to <literal>3</> (Tom Lane) + to be increased to <literal>3</literal> (Tom Lane) </para> <para> - The previous maximum <varname>extra_float_digits</> setting was - <literal>2</>. There are cases where 3 digits are needed to dump and - restore <type>float4</> values exactly. <application>pg_dump</> will + The previous maximum <varname>extra_float_digits</varname> setting was + <literal>2</literal>. There are cases where 3 digits are needed to dump and + restore <type>float4</type> values exactly. <application>pg_dump</application> will now use the setting of 3 when dumping from a server that allows it. </para> </listitem> <listitem> <para> - Tighten input checking for <type>int2vector</> values (Caleb + Tighten input checking for <type>int2vector</type> values (Caleb Welton) </para> </listitem> @@ -9320,14 +9320,14 @@ <listitem> <para> - Add prefix support in <literal>synonym</> dictionaries + Add prefix support in <literal>synonym</literal> dictionaries (Teodor Sigaev) </para> </listitem> <listitem> <para> - Add <firstterm>filtering</> dictionaries (Teodor Sigaev) + Add <firstterm>filtering</firstterm> dictionaries (Teodor Sigaev) </para> <para> @@ -9344,7 +9344,7 @@ <listitem> <para> - Use more standards-compliant rules for parsing <acronym>URL</> tokens + Use more standards-compliant rules for parsing <acronym>URL</acronym> tokens (Tom Lane) </para> </listitem> @@ -9367,9 +9367,9 @@ </para> <para> - For example, if a function is defined to take parameters <literal>a</> - and <literal>b</>, it can be called with <literal>func(a := 7, b - := 12)</> or <literal>func(b := 12, a := 7)</>. + For example, if a function is defined to take parameters <literal>a</literal> + and <literal>b</literal>, it can be called with <literal>func(a := 7, b + := 12)</literal> or <literal>func(b := 12, a := 7)</literal>. </para> </listitem> @@ -9377,24 +9377,24 @@ <para> Support locale-specific <link linkend="functions-posix-regexp">regular expression</link> - processing with <acronym>UTF-8</> server encoding (Tom Lane) + processing with <acronym>UTF-8</acronym> server encoding (Tom Lane) </para> <para> Locale-specific regular expression functionality includes case-insensitive matching and locale-specific character classes. - Previously, these features worked correctly for non-<acronym>ASCII</> + Previously, these features worked correctly for non-<acronym>ASCII</acronym> characters only if the database used a single-byte server encoding (such as LATIN1). They will still misbehave in multi-byte encodings other - than <acronym>UTF-8</>. + than <acronym>UTF-8</acronym>. </para> </listitem> <listitem> <para> Add support for scientific notation in <link - linkend="functions-formatting"><function>to_char()</></link> - (<link linkend="functions-formatting-numeric-table"><literal>EEEE</> + linkend="functions-formatting"><function>to_char()</function></link> + (<link linkend="functions-formatting-numeric-table"><literal>EEEE</literal> specification</link>) (Pavel Stehule, Brendan Jurd) </para> @@ -9402,21 +9402,21 @@ <listitem> <para> - Make <function>to_char()</> honor <link - linkend="functions-formatting-datetimemod-table"><literal>FM</></link> - (fill mode) in <literal>Y</>, <literal>YY</>, and - <literal>YYY</> specifications (Bruce Momjian, Tom Lane) + Make <function>to_char()</function> honor <link + linkend="functions-formatting-datetimemod-table"><literal>FM</literal></link> + (fill mode) in <literal>Y</literal>, <literal>YY</literal>, and + <literal>YYY</literal> specifications (Bruce Momjian, Tom Lane) </para> <para> - It was already honored by <literal>YYYY</>. + It was already honored by <literal>YYYY</literal>. </para> </listitem> <listitem> <para> - Fix <function>to_char()</> to output localized numeric and monetary - strings in the correct encoding on <productname>Windows</> + Fix <function>to_char()</function> to output localized numeric and monetary + strings in the correct encoding on <productname>Windows</productname> (Hiroshi Inoue, Itagaki Takahiro, Bruce Momjian) </para> </listitem> @@ -9429,12 +9429,12 @@ </para> <para> - The polygon <literal>&&</> (overlaps) operator formerly just + The polygon <literal>&&</literal> (overlaps) operator formerly just checked to see if the two polygons' bounding boxes overlapped. It now - does a more correct check. The polygon <literal>@></> and - <literal><@</> (contains/contained by) operators formerly checked + does a more correct check. The polygon <literal>@></literal> and + <literal><@</literal> (contains/contained by) operators formerly checked to see if one polygon's vertexes were all contained in the other; - this can wrongly report <quote>true</> for some non-convex polygons. + this can wrongly report <quote>true</quote> for some non-convex polygons. Now they check that all line segments of one polygon are contained in the other. </para> @@ -9450,12 +9450,12 @@ <listitem> <para> Allow aggregate functions to use <link - linkend="syntax-aggregates"><literal>ORDER BY</></link> (Andrew Gierth) + linkend="syntax-aggregates"><literal>ORDER BY</literal></link> (Andrew Gierth) </para> <para> For example, this is now supported: <literal>array_agg(a ORDER BY - b)</>. This is useful with aggregates for which the order of input + b)</literal>. This is useful with aggregates for which the order of input values is significant, and eliminates the need to use a nonstandard subquery to determine the ordering. </para> @@ -9463,7 +9463,7 @@ <listitem> <para> - Multi-argument aggregate functions can now use <literal>DISTINCT</> + Multi-argument aggregate functions can now use <literal>DISTINCT</literal> (Andrew Gierth) </para> </listitem> @@ -9471,7 +9471,7 @@ <listitem> <para> Add the <link - linkend="functions-aggregate-table"><function>string_agg()</></link> + linkend="functions-aggregate-table"><function>string_agg()</function></link> aggregate function to combine values into a single string (Pavel Stehule) </para> @@ -9479,15 +9479,15 @@ <listitem> <para> - Aggregate functions that are called with <literal>DISTINCT</> are + Aggregate functions that are called with <literal>DISTINCT</literal> are now passed NULL values if the aggregate transition function is - not marked as <literal>STRICT</> (Andrew Gierth) + not marked as <literal>STRICT</literal> (Andrew Gierth) </para> <para> - For example, <literal>agg(DISTINCT x)</> might pass a NULL <literal>x</> - value to <function>agg()</>. This is more consistent with the behavior - in non-<literal>DISTINCT</> cases. + For example, <literal>agg(DISTINCT x)</literal> might pass a NULL <literal>x</literal> + value to <function>agg()</function>. This is more consistent with the behavior + in non-<literal>DISTINCT</literal> cases. </para> </listitem> @@ -9503,9 +9503,9 @@ <listitem> <para> Add <link - linkend="functions-binarystring-other"><function>get_bit()</></link> - and <function>set_bit()</> functions for <type>bit</> - strings, mirroring those for <type>bytea</> (Leonardo + linkend="functions-binarystring-other"><function>get_bit()</function></link> + and <function>set_bit()</function> functions for <type>bit</type> + strings, mirroring those for <type>bytea</type> (Leonardo F) </para> </listitem> @@ -9513,8 +9513,8 @@ <listitem> <para> Implement <link - linkend="functions-string-sql"><function>OVERLAY()</></link> - (replace) for <type>bit</> strings and <type>bytea</> + linkend="functions-string-sql"><function>OVERLAY()</function></link> + (replace) for <type>bit</type> strings and <type>bytea</type> (Leonardo F) </para> </listitem> @@ -9531,9 +9531,9 @@ <listitem> <para> Add <link - linkend="functions-admin-dbsize"><function>pg_table_size()</></link> - and <function>pg_indexes_size()</> to provide a more - user-friendly interface to the <function>pg_relation_size()</> + linkend="functions-admin-dbsize"><function>pg_table_size()</function></link> + and <function>pg_indexes_size()</function> to provide a more + user-friendly interface to the <function>pg_relation_size()</function> function (Bernd Helmle) </para> </listitem> @@ -9541,7 +9541,7 @@ <listitem> <para> Add <link - linkend="functions-info-access-table"><function>has_sequence_privilege()</></link> + linkend="functions-info-access-table"><function>has_sequence_privilege()</function></link> for sequence permission checking (Abhijit Menon-Sen) </para> </listitem> @@ -9556,15 +9556,15 @@ <listitem> <para> - Make the <literal>information_schema</> views correctly display maximum - octet lengths for <type>char</> and <type>varchar</> columns (Peter + Make the <literal>information_schema</literal> views correctly display maximum + octet lengths for <type>char</type> and <type>varchar</type> columns (Peter Eisentraut) </para> </listitem> <listitem> <para> - Speed up <literal>information_schema</> privilege views + Speed up <literal>information_schema</literal> privilege views (Joachim Wieland) </para> </listitem> @@ -9581,7 +9581,7 @@ <listitem> <para> Support execution of anonymous code blocks using the <link - linkend="SQL-DO"><command>DO</></link> statement + linkend="SQL-DO"><command>DO</command></link> statement (Petr Jelinek, Joshua Tolley, Hannu Valtonen) </para> @@ -9601,22 +9601,22 @@ <para> Such triggers are fired only when the specified column(s) are affected - by the query, e.g. appear in an <command>UPDATE</>'s <literal>SET</> + by the query, e.g. appear in an <command>UPDATE</command>'s <literal>SET</literal> list. </para> </listitem> <listitem> <para> - Add the <literal>WHEN</> clause to <link - linkend="SQL-CREATETRIGGER"><command>CREATE TRIGGER</></link> + Add the <literal>WHEN</literal> clause to <link + linkend="SQL-CREATETRIGGER"><command>CREATE TRIGGER</command></link> to allow control over whether a trigger is fired (Itagaki Takahiro) </para> <para> While the same type of check can always be performed inside the - trigger, doing it in an external <literal>WHEN</> clause can have + trigger, doing it in an external <literal>WHEN</literal> clause can have performance benefits. </para> </listitem> @@ -9634,8 +9634,8 @@ <listitem> <para> - Add the <literal>OR REPLACE</> clause to <link - linkend="SQL-CREATELANGUAGE"><command>CREATE LANGUAGE</></link> + Add the <literal>OR REPLACE</literal> clause to <link + linkend="SQL-CREATELANGUAGE"><command>CREATE LANGUAGE</command></link> (Tom Lane) </para> @@ -9677,8 +9677,8 @@ The default behavior is now to throw an error when there is a conflict, so as to avoid surprising behaviors. This can be modified, via the configuration parameter <link - linkend="plpgsql-var-subst"><varname>plpgsql.variable_conflict</></link> - or the per-function option <literal>#variable_conflict</>, to allow + linkend="plpgsql-var-subst"><varname>plpgsql.variable_conflict</varname></link> + or the per-function option <literal>#variable_conflict</literal>, to allow either the variable or the query-supplied column to be used. In any case PL/pgSQL will no longer attempt to substitute variables in places where they would not be syntactically valid. @@ -9731,7 +9731,7 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <para> Formerly, input parameters were treated as being declared - <literal>CONST</>, so the function's code could not change their + <literal>CONST</literal>, so the function's code could not change their values. This restriction has been removed to simplify porting of functions from other DBMSes that do not impose the equivalent restriction. An input parameter now acts like a local @@ -9747,26 +9747,26 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <listitem> <para> - Add <replaceable>count</> and <literal>ALL</> options to <command>MOVE - FORWARD</>/<literal>BACKWARD</> in PL/pgSQL (Pavel Stehule) + Add <replaceable>count</replaceable> and <literal>ALL</literal> options to <command>MOVE + FORWARD</command>/<literal>BACKWARD</literal> in PL/pgSQL (Pavel Stehule) </para> </listitem> <listitem> <para> - Allow PL/pgSQL's <literal>WHERE CURRENT OF</> to use a cursor + Allow PL/pgSQL's <literal>WHERE CURRENT OF</literal> to use a cursor variable (Tom Lane) </para> </listitem> <listitem> <para> - Allow PL/pgSQL's <command>OPEN <replaceable>cursor</> FOR EXECUTE</> to + Allow PL/pgSQL's <command>OPEN <replaceable>cursor</replaceable> FOR EXECUTE</command> to use parameters (Pavel Stehule, Itagaki Takahiro) </para> <para> - This is accomplished with a new <literal>USING</> clause. + This is accomplished with a new <literal>USING</literal> clause. </para> </listitem> @@ -9782,28 +9782,28 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <listitem> <para> Add new PL/Perl functions: <link - linkend="plperl-utility-functions"><function>quote_literal()</></link>, - <function>quote_nullable()</>, <function>quote_ident()</>, - <function>encode_bytea()</>, <function>decode_bytea()</>, - <function>looks_like_number()</>, - <function>encode_array_literal()</>, - <function>encode_array_constructor()</> (Tim Bunce) + linkend="plperl-utility-functions"><function>quote_literal()</function></link>, + <function>quote_nullable()</function>, <function>quote_ident()</function>, + <function>encode_bytea()</function>, <function>decode_bytea()</function>, + <function>looks_like_number()</function>, + <function>encode_array_literal()</function>, + <function>encode_array_constructor()</function> (Tim Bunce) </para> </listitem> <listitem> <para> Add server parameter <link - linkend="guc-plperl-on-init"><varname>plperl.on_init</></link> to + linkend="guc-plperl-on-init"><varname>plperl.on_init</varname></link> to specify a PL/Perl initialization function (Tim Bunce) </para> <para> <link - linkend="guc-plperl-on-plperl-init"><varname>plperl.on_plperl_init</></link> + linkend="guc-plperl-on-plperl-init"><varname>plperl.on_plperl_init</varname></link> and <link - linkend="guc-plperl-on-plperl-init"><varname>plperl.on_plperlu_init</></link> + linkend="guc-plperl-on-plperl-init"><varname>plperl.on_plperlu_init</varname></link> are also available for initialization that is specific to the trusted or untrusted language respectively. </para> @@ -9811,29 +9811,29 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <listitem> <para> - Support <command>END</> blocks in PL/Perl (Tim Bunce) + Support <command>END</command> blocks in PL/Perl (Tim Bunce) </para> <para> - <command>END</> blocks do not currently allow database access. + <command>END</command> blocks do not currently allow database access. </para> </listitem> <listitem> <para> - Allow <command>use strict</> in PL/Perl (Tim Bunce) + Allow <command>use strict</command> in PL/Perl (Tim Bunce) </para> <para> - Perl <literal>strict</> checks can also be globally enabled with the + Perl <literal>strict</literal> checks can also be globally enabled with the new server parameter <link - linkend="guc-plperl-use-strict"><varname>plperl.use_strict</></link>. + linkend="guc-plperl-use-strict"><varname>plperl.use_strict</varname></link>. </para> </listitem> <listitem> <para> - Allow <command>require</> in PL/Perl (Tim Bunce) + Allow <command>require</command> in PL/Perl (Tim Bunce) </para> <para> @@ -9845,7 +9845,7 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <listitem> <para> - Allow <command>use feature</> in PL/Perl if Perl version 5.10 or + Allow <command>use feature</command> in PL/Perl if Perl version 5.10 or later is used (Tim Bunce) </para> </listitem> @@ -9879,13 +9879,13 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <listitem> <para> - Improve <type>bytea</> support in PL/Python (Caleb Welton) + Improve <type>bytea</type> support in PL/Python (Caleb Welton) </para> <para> - <type>Bytea</> values passed into PL/Python are now represented as - binary, rather than the PostgreSQL <type>bytea</> text format. - <type>Bytea</> values containing null bytes are now also output + <type>Bytea</type> values passed into PL/Python are now represented as + binary, rather than the PostgreSQL <type>bytea</type> text format. + <type>Bytea</type> values containing null bytes are now also output properly from PL/Python. Passing of boolean, integer, and float values was also improved. </para> @@ -9906,14 +9906,14 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <listitem> <para> - Add <application>Python</> 3 support to PL/Python (Peter Eisentraut) + Add <application>Python</application> 3 support to PL/Python (Peter Eisentraut) </para> <para> The new server-side language is called <link - linkend="plpython-python23"><literal>plpython3u</></link>. This + linkend="plpython-python23"><literal>plpython3u</literal></link>. This cannot be used in the same session with the - <application>Python</> 2 server-side language. + <application>Python</application> 2 server-side language. </para> </listitem> @@ -9936,8 +9936,8 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <listitem> <para> - Add an <option>--analyze-only</> option to <link - linkend="APP-VACUUMDB"><command>vacuumdb</></link>, to analyze without + Add an <option>--analyze-only</option> option to <link + linkend="APP-VACUUMDB"><command>vacuumdb</command></link>, to analyze without vacuuming (Bruce Momjian) </para> </listitem> @@ -9945,21 +9945,21 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then </itemizedlist> <sect4> - <title><link linkend="APP-PSQL"><application>psql</></link></title> + <title><link linkend="APP-PSQL"><application>psql</application></link></title> <itemizedlist> <listitem> <para> - Add support for quoting/escaping the values of <application>psql</> + Add support for quoting/escaping the values of <application>psql</application> <link linkend="APP-PSQL-variables">variables</link> as SQL strings or identifiers (Pavel Stehule, Robert Haas) </para> <para> - For example, <literal>:'var'</> will produce the value of - <literal>var</> quoted and properly escaped as a literal string, while - <literal>:"var"</> will produce its value quoted and escaped as an + For example, <literal>:'var'</literal> will produce the value of + <literal>var</literal> quoted and properly escaped as a literal string, while + <literal>:"var"</literal> will produce its value quoted and escaped as an identifier. </para> </listitem> @@ -9967,11 +9967,11 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <listitem> <para> Ignore a leading UTF-8-encoded Unicode byte-order marker in - script files read by <application>psql</> (Itagaki Takahiro) + script files read by <application>psql</application> (Itagaki Takahiro) </para> <para> - This is enabled when the client encoding is <acronym>UTF-8</>. + This is enabled when the client encoding is <acronym>UTF-8</acronym>. It improves compatibility with certain editors, mostly on Windows, that insist on inserting such markers. </para> @@ -9979,57 +9979,57 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <listitem> <para> - Fix <command>psql --file -</> to properly honor <link - linkend="R1-APP-PSQL-3"><option>--single-transaction</></link> + Fix <command>psql --file -</command> to properly honor <link + linkend="R1-APP-PSQL-3"><option>--single-transaction</option></link> (Bruce Momjian) </para> </listitem> <listitem> <para> - Avoid overwriting of <application>psql</>'s command-line history when - two <application>psql</> sessions are run concurrently (Tom Lane) + Avoid overwriting of <application>psql</application>'s command-line history when + two <application>psql</application> sessions are run concurrently (Tom Lane) </para> </listitem> <listitem> <para> - Improve <application>psql</>'s tab completion support (Itagaki + Improve <application>psql</application>'s tab completion support (Itagaki Takahiro) </para> </listitem> <listitem> <para> - Show <literal>\timing</> output when it is enabled, regardless of - <quote>quiet</> mode (Peter Eisentraut) + Show <literal>\timing</literal> output when it is enabled, regardless of + <quote>quiet</quote> mode (Peter Eisentraut) </para> </listitem> </itemizedlist> <sect5> - <title><application>psql</> Display</title> + <title><application>psql</application> Display</title> <itemizedlist> <listitem> <para> - Improve display of wrapped columns in <application>psql</> (Roger + Improve display of wrapped columns in <application>psql</application> (Roger Leigh) </para> <para> This behavior is now the default. The previous formatting is available by using <command>\pset linestyle - old-ascii</>. + old-ascii</command>. </para> </listitem> <listitem> <para> - Allow <application>psql</> to use fancy Unicode line-drawing - characters via <command>\pset linestyle unicode</> (Roger Leigh) + Allow <application>psql</application> to use fancy Unicode line-drawing + characters via <command>\pset linestyle unicode</command> (Roger Leigh) </para> </listitem> @@ -10038,27 +10038,27 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then </sect5> <sect5> - <title><application>psql</> <link - linkend="APP-PSQL-meta-commands"><command>\d</></link> + <title><application>psql</application> <link + linkend="APP-PSQL-meta-commands"><command>\d</command></link> Commands</title> <itemizedlist> <listitem> <para> - Make <command>\d</> show child tables that inherit from the specified + Make <command>\d</command> show child tables that inherit from the specified parent (Damien Clochard) </para> <para> - <command>\d</> shows only the number of child tables, while - <command>\d+</> shows the names of all child tables. + <command>\d</command> shows only the number of child tables, while + <command>\d+</command> shows the names of all child tables. </para> </listitem> <listitem> <para> - Show definitions of index columns in <command>\d index_name</> + Show definitions of index columns in <command>\d index_name</command> (Khee Chin) </para> @@ -10070,7 +10070,7 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <listitem> <para> Show a view's defining query only in - <command>\d+</>, not in <command>\d</> (Peter Eisentraut) + <command>\d+</command>, not in <command>\d</command> (Peter Eisentraut) </para> <para> @@ -10084,33 +10084,33 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then </sect4> <sect4> - <title><link linkend="APP-PGDUMP"><application>pg_dump</></link></title> + <title><link linkend="APP-PGDUMP"><application>pg_dump</application></link></title> <itemizedlist> <listitem> <para> - Make <application>pg_dump</>/<application>pg_restore</> - <link linkend="pg-dump-options"><option>--clean</></link> + Make <application>pg_dump</application>/<application>pg_restore</application> + <link linkend="pg-dump-options"><option>--clean</option></link> also remove large objects (Itagaki Takahiro) </para> </listitem> <listitem> <para> - Fix <application>pg_dump</> to properly dump large objects when - <literal>standard_conforming_strings</> is enabled (Tom Lane) + Fix <application>pg_dump</application> to properly dump large objects when + <literal>standard_conforming_strings</literal> is enabled (Tom Lane) </para> <para> The previous coding could fail when dumping to an archive file - and then generating script output from <application>pg_restore</>. + and then generating script output from <application>pg_restore</application>. </para> </listitem> <listitem> <para> - <application>pg_restore</> now emits large-object data in hex format + <application>pg_restore</application> now emits large-object data in hex format when generating script output (Tom Lane) </para> @@ -10123,16 +10123,16 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <listitem> <para> - Allow <application>pg_dump</> to dump comments attached to columns + Allow <application>pg_dump</application> to dump comments attached to columns of composite types (Taro Minowa (Higepon)) </para> </listitem> <listitem> <para> - Make <application>pg_dump</> <link - linkend="pg-dump-options"><option>--verbose</></link> - output the <application>pg_dump</> and server versions + Make <application>pg_dump</application> <link + linkend="pg-dump-options"><option>--verbose</option></link> + output the <application>pg_dump</application> and server versions in text output mode (Jim Cox, Tom Lane) </para> @@ -10143,7 +10143,7 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <listitem> <para> - <application>pg_restore</> now complains if any command-line arguments + <application>pg_restore</application> now complains if any command-line arguments remain after the switches and optional file name (Tom Lane) </para> @@ -10158,28 +10158,28 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <sect4> <title><link - linkend="app-pg-ctl"><application>pg_ctl</></link></title> + linkend="app-pg-ctl"><application>pg_ctl</application></link></title> <itemizedlist> <listitem> <para> - Allow <application>pg_ctl</> to be used safely to start the - <application>postmaster</> during a system reboot (Tom Lane) + Allow <application>pg_ctl</application> to be used safely to start the + <application>postmaster</application> during a system reboot (Tom Lane) </para> <para> - Previously, <application>pg_ctl</>'s parent process could have been - mistakenly identified as a running <application>postmaster</> based on - a stale <application>postmaster</> lock file, resulting in a transient + Previously, <application>pg_ctl</application>'s parent process could have been + mistakenly identified as a running <application>postmaster</application> based on + a stale <application>postmaster</application> lock file, resulting in a transient failure to start the database. </para> </listitem> <listitem> <para> - Give <application>pg_ctl</> the ability to initialize the database - (by invoking <application>initdb</>) (Zdenek Kotala) + Give <application>pg_ctl</application> the ability to initialize the database + (by invoking <application>initdb</application>) (Zdenek Kotala) </para> </listitem> @@ -10190,25 +10190,25 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then </sect3> <sect3> - <title><application>Development Tools</></title> + <title><application>Development Tools</application></title> <sect4> - <title><link linkend="libpq"><application>libpq</></link></title> + <title><link linkend="libpq"><application>libpq</application></link></title> <itemizedlist> <listitem> <para> - Add new <application>libpq</> functions + Add new <application>libpq</application> functions <link - linkend="libpq-connect"><function>PQconnectdbParams()</></link> - and <function>PQconnectStartParams()</> (Guillaume + linkend="libpq-connect"><function>PQconnectdbParams()</function></link> + and <function>PQconnectStartParams()</function> (Guillaume Lelarge) </para> <para> - These functions are similar to <function>PQconnectdb()</> and - <function>PQconnectStart()</> except that they accept a null-terminated + These functions are similar to <function>PQconnectdb()</function> and + <function>PQconnectStart()</function> except that they accept a null-terminated array of connection options, rather than requiring all options to be provided in a single string. </para> @@ -10216,22 +10216,22 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <listitem> <para> - Add <application>libpq</> functions <link - linkend="libpq-exec-escape-string"><function>PQescapeLiteral()</></link> - and <function>PQescapeIdentifier()</> (Robert Haas) + Add <application>libpq</application> functions <link + linkend="libpq-exec-escape-string"><function>PQescapeLiteral()</function></link> + and <function>PQescapeIdentifier()</function> (Robert Haas) </para> <para> These functions return appropriately quoted and escaped SQL string literals and identifiers. The caller is not required to pre-allocate - the string result, as is required by <function>PQescapeStringConn()</>. + the string result, as is required by <function>PQescapeStringConn()</function>. </para> </listitem> <listitem> <para> Add support for a per-user service file (<link - linkend="libpq-pgservice"><filename>.pg_service.conf</></link>), + linkend="libpq-pgservice"><filename>.pg_service.conf</filename></link>), which is checked before the site-wide service file (Peter Eisentraut) </para> @@ -10239,7 +10239,7 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <listitem> <para> - Properly report an error if the specified <application>libpq</> service + Properly report an error if the specified <application>libpq</application> service cannot be found (Peter Eisentraut) </para> </listitem> @@ -10258,15 +10258,15 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <listitem> <para> - Avoid extra system calls to block and unblock <literal>SIGPIPE</> - in <application>libpq</>, on platforms that offer alternative methods + Avoid extra system calls to block and unblock <literal>SIGPIPE</literal> + in <application>libpq</application>, on platforms that offer alternative methods (Jeremy Kerr) </para> </listitem> <listitem> <para> - When a <link linkend="libpq-pgpass"><filename>.pgpass</></link>-supplied + When a <link linkend="libpq-pgpass"><filename>.pgpass</filename></link>-supplied password fails, mention where the password came from in the error message (Bruce Momjian) </para> @@ -10288,22 +10288,22 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then </sect4> <sect4> - <title><link linkend="ecpg"><application>ecpg</></link></title> + <title><link linkend="ecpg"><application>ecpg</application></link></title> <itemizedlist> <listitem> <para> - Add <link linkend="ecpg-descriptors"><acronym>SQLDA</></link> - (SQL Descriptor Area) support to <application>ecpg</> + Add <link linkend="ecpg-descriptors"><acronym>SQLDA</acronym></link> + (SQL Descriptor Area) support to <application>ecpg</application> (Boszormenyi Zoltan) </para> </listitem> <listitem> <para> - Add the <link linkend="ecpg-descriptors"><command>DESCRIBE</> - [ <literal>OUTPUT</> ]</link> statement to <application>ecpg</> + Add the <link linkend="ecpg-descriptors"><command>DESCRIBE</command> + [ <literal>OUTPUT</literal> ]</link> statement to <application>ecpg</application> (Boszormenyi Zoltan) </para> </listitem> @@ -10317,28 +10317,28 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <listitem> <para> - Add the <literal>string</> data type in <application>ecpg</> + Add the <literal>string</literal> data type in <application>ecpg</application> Informix-compatibility mode (Boszormenyi Zoltan) </para> </listitem> <listitem> <para> - Allow <application>ecpg</> to use <literal>new</> and <literal>old</> + Allow <application>ecpg</application> to use <literal>new</literal> and <literal>old</literal> variable names without restriction (Michael Meskes) </para> </listitem> <listitem> <para> - Allow <application>ecpg</> to use variable names in - <function>free()</> (Michael Meskes) + Allow <application>ecpg</application> to use variable names in + <function>free()</function> (Michael Meskes) </para> </listitem> <listitem> <para> - Make <function>ecpg_dynamic_type()</> return zero for non-SQL3 data + Make <function>ecpg_dynamic_type()</function> return zero for non-SQL3 data types (Michael Meskes) </para> @@ -10350,41 +10350,41 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <listitem> <para> - Support <type>long long</> types on platforms that already have 64-bit - <type>long</> (Michael Meskes) + Support <type>long long</type> types on platforms that already have 64-bit + <type>long</type> (Michael Meskes) </para> </listitem> </itemizedlist> <sect5> - <title><application>ecpg</> Cursors</title> + <title><application>ecpg</application> Cursors</title> <itemizedlist> <listitem> <para> - Add out-of-scope cursor support in <application>ecpg</>'s native mode + Add out-of-scope cursor support in <application>ecpg</application>'s native mode (Boszormenyi Zoltan) </para> <para> - This allows <command>DECLARE</> to use variables that are not in - scope when <command>OPEN</> is called. This facility already existed - in <application>ecpg</>'s Informix-compatibility mode. + This allows <command>DECLARE</command> to use variables that are not in + scope when <command>OPEN</command> is called. This facility already existed + in <application>ecpg</application>'s Informix-compatibility mode. </para> </listitem> <listitem> <para> - Allow dynamic cursor names in <application>ecpg</> (Boszormenyi Zoltan) + Allow dynamic cursor names in <application>ecpg</application> (Boszormenyi Zoltan) </para> </listitem> <listitem> <para> - Allow <application>ecpg</> to use noise words <literal>FROM</> and - <literal>IN</> in <command>FETCH</> and <command>MOVE</> (Boszormenyi + Allow <application>ecpg</application> to use noise words <literal>FROM</literal> and + <literal>IN</literal> in <command>FETCH</command> and <command>MOVE</command> (Boszormenyi Zoltan) </para> </listitem> @@ -10409,8 +10409,8 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <para> The thread-safety option can be disabled with <link - linkend="configure"><literal>configure</></link> - <option>--disable-thread-safety</>. + linkend="configure"><literal>configure</literal></link> + <option>--disable-thread-safety</option>. </para> </listitem> @@ -10421,12 +10421,12 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then </para> <para> - Now that <filename>/proc/self/oom_adj</> allows disabling - of the <productname>Linux</> out-of-memory (<acronym>OOM</>) + Now that <filename>/proc/self/oom_adj</filename> allows disabling + of the <productname>Linux</productname> out-of-memory (<acronym>OOM</acronym>) killer, it's recommendable to disable OOM kills for the postmaster. It may then be desirable to re-enable OOM kills for the postmaster's child processes. The new compile-time option <link - linkend="linux-memory-overcommit"><literal>LINUX_OOM_ADJ</></link> + linkend="linux-memory-overcommit"><literal>LINUX_OOM_ADJ</literal></link> allows the killer to be reactivated for child processes. </para> </listitem> @@ -10440,31 +10440,31 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <listitem> <para> - New <filename>Makefile</> targets <link - linkend="build"><literal>world</></link>, - <literal>install-world</>, and <literal>installcheck-world</> + New <filename>Makefile</filename> targets <link + linkend="build"><literal>world</literal></link>, + <literal>install-world</literal>, and <literal>installcheck-world</literal> (Andrew Dunstan) </para> <para> - These are similar to the existing <literal>all</>, <literal>install</>, - and <literal>installcheck</> targets, but they also build the - <acronym>HTML</> documentation, build and test <filename>contrib</>, - and test server-side languages and <application>ecpg</>. + These are similar to the existing <literal>all</literal>, <literal>install</literal>, + and <literal>installcheck</literal> targets, but they also build the + <acronym>HTML</acronym> documentation, build and test <filename>contrib</filename>, + and test server-side languages and <application>ecpg</application>. </para> </listitem> <listitem> <para> Add data and documentation installation location control to - <acronym>PGXS</> Makefiles (Mark Cave-Ayland) + <acronym>PGXS</acronym> Makefiles (Mark Cave-Ayland) </para> </listitem> <listitem> <para> - Add Makefile rules to build the <productname>PostgreSQL</> documentation - as a single <acronym>HTML</> file or as a single plain-text file + Add Makefile rules to build the <productname>PostgreSQL</productname> documentation + as a single <acronym>HTML</acronym> file or as a single plain-text file (Peter Eisentraut, Bruce Momjian) </para> </listitem> @@ -10482,12 +10482,12 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <para> Support compiling on <link linkend="install-windows">64-bit - <productname>Windows</></link> and running in 64-bit + <productname>Windows</productname></link> and running in 64-bit mode (Tsutomu Yamada, Magnus Hagander) </para> <para> - This allows for large shared memory sizes on <productname>Windows</>. + This allows for large shared memory sizes on <productname>Windows</productname>. </para> </listitem> @@ -10495,7 +10495,7 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <para> Support server builds using <link linkend="install-windows-full"><productname>Visual Studio - 2008</></link> (Magnus Hagander) + 2008</productname></link> (Magnus Hagander) </para> </listitem> @@ -10518,8 +10518,8 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then </para> <para> - For example, the prebuilt <acronym>HTML</> documentation is now in - <filename>doc/src/sgml/html/</>; the manual pages are packaged + For example, the prebuilt <acronym>HTML</acronym> documentation is now in + <filename>doc/src/sgml/html/</filename>; the manual pages are packaged similarly. </para> </listitem> @@ -10543,13 +10543,13 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <listitem> <para> User-defined constraint triggers now have entries in - <structname>pg_constraint</> as well as <structname>pg_trigger</> + <structname>pg_constraint</structname> as well as <structname>pg_trigger</structname> (Tom Lane) </para> <para> Because of this change, - <structname>pg_constraint</>.<structfield>pgconstrname</> is now + <structname>pg_constraint</structname>.<structfield>pgconstrname</structfield> is now redundant and has been removed. </para> </listitem> @@ -10557,8 +10557,8 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <listitem> <para> Add system catalog columns - <structname>pg_constraint</>.<structfield>conindid</> and - <structname>pg_trigger</>.<structfield>tgconstrindid</> + <structname>pg_constraint</structname>.<structfield>conindid</structfield> and + <structname>pg_trigger</structname>.<structfield>tgconstrindid</structfield> to better document the use of indexes for constraint enforcement (Tom Lane) </para> @@ -10578,7 +10578,7 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <listitem> <para> - Improve source code test coverage, including <filename>contrib</>, PL/Python, + Improve source code test coverage, including <filename>contrib</filename>, PL/Python, and PL/Perl (Peter Eisentraut, Andrew Dunstan) </para> </listitem> @@ -10598,7 +10598,7 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <listitem> <para> Automatically generate the initial contents of - <structname>pg_attribute</> for <quote>bootstrapped</> catalogs + <structname>pg_attribute</structname> for <quote>bootstrapped</quote> catalogs (John Naylor) </para> @@ -10610,8 +10610,8 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <listitem> <para> Split the processing of - <command>INSERT</>/<command>UPDATE</>/<command>DELETE</> operations out - of <filename>execMain.c</> (Marko Tiikkaja) + <command>INSERT</command>/<command>UPDATE</command>/<command>DELETE</command> operations out + of <filename>execMain.c</filename> (Marko Tiikkaja) </para> <para> @@ -10622,7 +10622,7 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <listitem> <para> - Simplify translation of <application>psql</>'s SQL help text + Simplify translation of <application>psql</application>'s SQL help text (Peter Eisentraut) </para> </listitem> @@ -10641,8 +10641,8 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <listitem> <para> Add a new <link - linkend="errcodes-table"><literal>ERRCODE_INVALID_PASSWORD</></link> - <literal>SQLSTATE</> error code (Bruce Momjian) + linkend="errcodes-table"><literal>ERRCODE_INVALID_PASSWORD</literal></link> + <literal>SQLSTATE</literal> error code (Bruce Momjian) </para> </listitem> @@ -10661,23 +10661,23 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <listitem> <para> Add new documentation <link linkend="non-durability">section</link> - about running <productname>PostgreSQL</> in non-durable mode + about running <productname>PostgreSQL</productname> in non-durable mode to improve performance (Bruce Momjian) </para> </listitem> <listitem> <para> - Restructure the <acronym>HTML</> documentation - <filename>Makefile</> rules to make their dependency checks work + Restructure the <acronym>HTML</acronym> documentation + <filename>Makefile</filename> rules to make their dependency checks work correctly, avoiding unnecessary rebuilds (Peter Eisentraut) </para> </listitem> <listitem> <para> - Use <productname>DocBook</> <acronym>XSL</> stylesheets for man page - building, rather than <productname>Docbook2X</> (Peter Eisentraut) + Use <productname>DocBook</productname> <acronym>XSL</acronym> stylesheets for man page + building, rather than <productname>Docbook2X</productname> (Peter Eisentraut) </para> <para> @@ -10711,22 +10711,22 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <itemizedlist> <listitem> <para> - Require <application>Autoconf</> 2.63 to build - <application>configure</> (Peter Eisentraut) + Require <application>Autoconf</application> 2.63 to build + <application>configure</application> (Peter Eisentraut) </para> </listitem> <listitem> <para> - Require <application>Flex</> 2.5.31 or later to build - from a <acronym>CVS</> checkout (Tom Lane) + Require <application>Flex</application> 2.5.31 or later to build + from a <acronym>CVS</acronym> checkout (Tom Lane) </para> </listitem> <listitem> <para> - Require <application>Perl</> version 5.8 or later to build - from a <acronym>CVS</> checkout (John Naylor, Andrew Dunstan) + Require <application>Perl</application> version 5.8 or later to build + from a <acronym>CVS</acronym> checkout (John Naylor, Andrew Dunstan) </para> </listitem> @@ -10741,25 +10741,25 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <listitem> <para> - Use a more modern <acronym>API</> for <application>Bonjour</> (Tom Lane) + Use a more modern <acronym>API</acronym> for <application>Bonjour</application> (Tom Lane) </para> <para> - Bonjour support now requires <productname>macOS</> 10.3 or later. + Bonjour support now requires <productname>macOS</productname> 10.3 or later. The older API has been deprecated by Apple. </para> </listitem> <listitem> <para> - Add spinlock support for the <productname>SuperH</> + Add spinlock support for the <productname>SuperH</productname> architecture (Nobuhiro Iwamatsu) </para> </listitem> <listitem> <para> - Allow non-<application>GCC</> compilers to use inline functions if + Allow non-<application>GCC</application> compilers to use inline functions if they support them (Kurt Harriman) </para> </listitem> @@ -10773,14 +10773,14 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <listitem> <para> - Restructure use of <literal>LDFLAGS</> to be more consistent + Restructure use of <literal>LDFLAGS</literal> to be more consistent across platforms (Tom Lane) </para> <para> - <literal>LDFLAGS</> is now used for linking both executables and shared - libraries, and we add on <literal>LDFLAGS_EX</> when linking - executables, or <literal>LDFLAGS_SL</> when linking shared libraries. + <literal>LDFLAGS</literal> is now used for linking both executables and shared + libraries, and we add on <literal>LDFLAGS_EX</literal> when linking + executables, or <literal>LDFLAGS_SL</literal> when linking shared libraries. </para> </listitem> @@ -10795,15 +10795,15 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <listitem> <para> - Make backend header files safe to include in <productname>C++</> + Make backend header files safe to include in <productname>C++</productname> (Kurt Harriman, Peter Eisentraut) </para> <para> These changes remove keyword conflicts that previously made - <productname>C++</> usage difficult in backend code. However, there - are still other complexities when using <productname>C++</> for backend - functions. <literal>extern "C" { }</> is still necessary in + <productname>C++</productname> usage difficult in backend code. However, there + are still other complexities when using <productname>C++</productname> for backend + functions. <literal>extern "C" { }</literal> is still necessary in appropriate places, and memory management and error handling are still problematic. </para> @@ -10812,15 +10812,15 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <listitem> <para> Add <link - linkend="xaggr"><function>AggCheckCallContext()</></link> - for use in detecting if a <productname>C</> function is + linkend="xaggr"><function>AggCheckCallContext()</function></link> + for use in detecting if a <productname>C</productname> function is being called as an aggregate (Hitoshi Harada) </para> </listitem> <listitem> <para> - Change calling convention for <function>SearchSysCache()</> and related + Change calling convention for <function>SearchSysCache()</function> and related functions to avoid hard-wiring the maximum number of cache keys (Robert Haas) </para> @@ -10833,8 +10833,8 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <listitem> <para> - Require calls of <function>fastgetattr()</> and - <function>heap_getattr()</> backend macros to provide a non-NULL fourth + Require calls of <function>fastgetattr()</function> and + <function>heap_getattr()</function> backend macros to provide a non-NULL fourth argument (Robert Haas) </para> </listitem> @@ -10842,7 +10842,7 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <listitem> <para> Custom typanalyze functions should no longer rely on - <structname>VacAttrStats</>.<structfield>attr</> to determine the type + <structname>VacAttrStats</structname>.<structfield>attr</structfield> to determine the type of data they will be passed (Tom Lane) </para> @@ -10888,7 +10888,7 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <listitem> <para> - Add <link linkend="pgupgrade"><filename>contrib/pg_upgrade</></link> + Add <link linkend="pgupgrade"><filename>contrib/pg_upgrade</filename></link> to support in-place upgrades (Bruce Momjian) </para> @@ -10903,15 +10903,15 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <listitem> <para> Add support for preserving relation <link - linkend="catalog-pg-class"><structname>relfilenode</></link> values + linkend="catalog-pg-class"><structname>relfilenode</structname></link> values during binary upgrades (Bruce Momjian) </para> </listitem> <listitem> <para> - Add support for preserving <structname>pg_type</> - and <structname>pg_enum</> OIDs during binary upgrades + Add support for preserving <structname>pg_type</structname> + and <structname>pg_enum</structname> OIDs during binary upgrades (Bruce Momjian) </para> </listitem> @@ -10919,7 +10919,7 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <listitem> <para> Move data files within tablespaces into - <productname>PostgreSQL</>-version-specific subdirectories + <productname>PostgreSQL</productname>-version-specific subdirectories (Bruce Momjian) </para> @@ -10941,22 +10941,22 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <listitem> <para> - Add multithreading option (<option>-j</>) to <link - linkend="pgbench"><filename>contrib/pgbench</></link> + Add multithreading option (<option>-j</option>) to <link + linkend="pgbench"><filename>contrib/pgbench</filename></link> (Itagaki Takahiro) </para> <para> - This allows multiple <acronym>CPU</>s to be used by pgbench, + This allows multiple <acronym>CPU</acronym>s to be used by pgbench, reducing the risk of pgbench itself becoming the test bottleneck. </para> </listitem> <listitem> <para> - Add <command>\shell</> and <command>\setshell</> meta + Add <command>\shell</command> and <command>\setshell</command> meta commands to <link - linkend="pgbench"><filename>contrib/pgbench</></link> + linkend="pgbench"><filename>contrib/pgbench</filename></link> (Michael Paquier) </para> </listitem> @@ -10964,20 +10964,20 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <listitem> <para> New features for <link - linkend="dict-xsyn"><filename>contrib/dict_xsyn</></link> + linkend="dict-xsyn"><filename>contrib/dict_xsyn</filename></link> (Sergey Karpov) </para> <para> - The new options are <literal>matchorig</>, <literal>matchsynonyms</>, - and <literal>keepsynonyms</>. + The new options are <literal>matchorig</literal>, <literal>matchsynonyms</literal>, + and <literal>keepsynonyms</literal>. </para> </listitem> <listitem> <para> Add full text dictionary <link - linkend="unaccent"><filename>contrib/unaccent</></link> + linkend="unaccent"><filename>contrib/unaccent</filename></link> (Teodor Sigaev) </para> @@ -10990,24 +10990,24 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <listitem> <para> Add <link - linkend="CONTRIB-DBLINK-GET-NOTIFY"><function>dblink_get_notify()</></link> - to <filename>contrib/dblink</> (Marcus Kempe) + linkend="CONTRIB-DBLINK-GET-NOTIFY"><function>dblink_get_notify()</function></link> + to <filename>contrib/dblink</filename> (Marcus Kempe) </para> <para> - This allows asynchronous notifications in <productname>dblink</>. + This allows asynchronous notifications in <productname>dblink</productname>. </para> </listitem> <listitem> <para> - Improve <filename>contrib/dblink</>'s handling of dropped columns + Improve <filename>contrib/dblink</filename>'s handling of dropped columns (Tom Lane) </para> <para> This affects <link - linkend="CONTRIB-DBLINK-BUILD-SQL-INSERT"><function>dblink_build_sql_insert()</></link> + linkend="CONTRIB-DBLINK-BUILD-SQL-INSERT"><function>dblink_build_sql_insert()</function></link> and related functions. These functions now number columns according to logical not physical column numbers. </para> @@ -11016,23 +11016,23 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <listitem> <para> Greatly increase <link - linkend="hstore"><filename>contrib/hstore</></link>'s data + linkend="hstore"><filename>contrib/hstore</filename></link>'s data length limit, and add B-tree and hash support so <literal>GROUP - BY</> and <literal>DISTINCT</> operations are possible on - <type>hstore</> columns (Andrew Gierth) + BY</literal> and <literal>DISTINCT</literal> operations are possible on + <type>hstore</type> columns (Andrew Gierth) </para> <para> New functions and operators were also added. These improvements - make <type>hstore</> a full-function key-value store embedded in - <productname>PostgreSQL</>. + make <type>hstore</type> a full-function key-value store embedded in + <productname>PostgreSQL</productname>. </para> </listitem> <listitem> <para> Add <link - linkend="passwordcheck"><filename>contrib/passwordcheck</></link> + linkend="passwordcheck"><filename>contrib/passwordcheck</filename></link> to support site-specific password strength policies (Laurenz Albe) </para> @@ -11046,7 +11046,7 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <listitem> <para> Add <link - linkend="pgarchivecleanup"><filename>contrib/pg_archivecleanup</></link> + linkend="pgarchivecleanup"><filename>contrib/pg_archivecleanup</filename></link> tool (Simon Riggs) </para> @@ -11060,7 +11060,7 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <listitem> <para> Add query text to <link - linkend="auto-explain"><filename>contrib/auto_explain</></link> + linkend="auto-explain"><filename>contrib/auto_explain</filename></link> output (Andrew Dunstan) </para> </listitem> @@ -11068,7 +11068,7 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <listitem> <para> Add buffer access counters to <link - linkend="pgstatstatements"><filename>contrib/pg_stat_statements</></link> + linkend="pgstatstatements"><filename>contrib/pg_stat_statements</filename></link> (Itagaki Takahiro) </para> </listitem> @@ -11076,10 +11076,10 @@ if TG_OP = 'INSERT' and NEW.col1 = ... then <listitem> <para> Update <link - linkend="server-start"><filename>contrib/start-scripts/linux</></link> - to use <filename>/proc/self/oom_adj</> to disable the - <link linkend="linux-memory-overcommit"><productname>Linux</> - out-of-memory</link> (<acronym>OOM</>) killer (Alex + linkend="server-start"><filename>contrib/start-scripts/linux</filename></link> + to use <filename>/proc/self/oom_adj</filename> to disable the + <link linkend="linux-memory-overcommit"><productname>Linux</productname> + out-of-memory</link> (<acronym>OOM</acronym>) killer (Alex Hunsaker, Tom Lane) </para> </listitem> diff --git a/doc/src/sgml/release-9.1.sgml b/doc/src/sgml/release-9.1.sgml index c354b7d1bc0..29396316098 100644 --- a/doc/src/sgml/release-9.1.sgml +++ b/doc/src/sgml/release-9.1.sgml @@ -16,7 +16,7 @@ </para> <para> - This is expected to be the last <productname>PostgreSQL</> release + This is expected to be the last <productname>PostgreSQL</productname> release in the 9.1.X series. Users are encouraged to update to a newer release branch soon. </para> @@ -68,13 +68,13 @@ <listitem> <para> - Fix timeout length when <command>VACUUM</> is waiting for exclusive + Fix timeout length when <command>VACUUM</command> is waiting for exclusive table lock so that it can truncate the table (Simon Riggs) </para> <para> The timeout was meant to be 50 milliseconds, but it was actually only - 50 microseconds, causing <command>VACUUM</> to give up on truncation + 50 microseconds, causing <command>VACUUM</command> to give up on truncation much more easily than intended. Set it to the intended value. </para> </listitem> @@ -82,15 +82,15 @@ <listitem> <para> Remove artificial restrictions on the values accepted - by <function>numeric_in()</> and <function>numeric_recv()</> + by <function>numeric_in()</function> and <function>numeric_recv()</function> (Tom Lane) </para> <para> We allow numeric values up to the limit of the storage format (more - than <literal>1e100000</>), so it seems fairly pointless - that <function>numeric_in()</> rejected scientific-notation exponents - above 1000. Likewise, it was silly for <function>numeric_recv()</> to + than <literal>1e100000</literal>), so it seems fairly pointless + that <function>numeric_in()</function> rejected scientific-notation exponents + above 1000. Likewise, it was silly for <function>numeric_recv()</function> to reject more than 1000 digits in an input value. </para> </listitem> @@ -112,7 +112,7 @@ <listitem> <para> - Disallow starting a standalone backend with <literal>standby_mode</> + Disallow starting a standalone backend with <literal>standby_mode</literal> turned on (Michael Paquier) </para> @@ -126,7 +126,7 @@ <listitem> <para> Don't try to share SSL contexts across multiple connections - in <application>libpq</> (Heikki Linnakangas) + in <application>libpq</application> (Heikki Linnakangas) </para> <para> @@ -137,26 +137,26 @@ <listitem> <para> - Avoid corner-case memory leak in <application>libpq</> (Tom Lane) + Avoid corner-case memory leak in <application>libpq</application> (Tom Lane) </para> <para> The reported problem involved leaking an error report - during <function>PQreset()</>, but there might be related cases. + during <function>PQreset()</function>, but there might be related cases. </para> </listitem> <listitem> <para> - Make <application>ecpg</>'s <option>--help</> and <option>--version</> + Make <application>ecpg</application>'s <option>--help</option> and <option>--version</option> options work consistently with our other executables (Haribabu Kommi) </para> </listitem> <listitem> <para> - Fix <filename>contrib/intarray/bench/bench.pl</> to print the results - of the <command>EXPLAIN</> it does when given the <option>-e</> option + Fix <filename>contrib/intarray/bench/bench.pl</filename> to print the results + of the <command>EXPLAIN</command> it does when given the <option>-e</option> option (Daniel Gustafsson) </para> </listitem> @@ -170,17 +170,17 @@ If a dynamic time zone abbreviation does not match any entry in the referenced time zone, treat it as equivalent to the time zone name. This avoids unexpected failures when IANA removes abbreviations from - their time zone database, as they did in <application>tzdata</> + their time zone database, as they did in <application>tzdata</application> release 2016f and seem likely to do again in the future. The consequences were not limited to not recognizing the individual abbreviation; any mismatch caused - the <structname>pg_timezone_abbrevs</> view to fail altogether. + the <structname>pg_timezone_abbrevs</structname> view to fail altogether. </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2016h + Update time zone data files to <application>tzdata</application> release 2016h for DST law changes in Palestine and Turkey, plus historical corrections for Turkey and some regions of Russia. Switch to numeric abbreviations for some time zones in Antarctica, @@ -193,15 +193,15 @@ or no currency among the local population. They are in process of reversing that policy in favor of using numeric UTC offsets in zones where there is no evidence of real-world use of an English - abbreviation. At least for the time being, <productname>PostgreSQL</> + abbreviation. At least for the time being, <productname>PostgreSQL</productname> will continue to accept such removed abbreviations for timestamp input. - But they will not be shown in the <structname>pg_timezone_names</> + But they will not be shown in the <structname>pg_timezone_names</structname> view nor used for output. </para> <para> - In this update, <literal>AMT</> is no longer shown as being in use to - mean Armenia Time. Therefore, we have changed the <literal>Default</> + In this update, <literal>AMT</literal> is no longer shown as being in use to + mean Armenia Time. Therefore, we have changed the <literal>Default</literal> abbreviation set to interpret it as Amazon Time, thus UTC-4 not UTC+4. </para> </listitem> @@ -226,7 +226,7 @@ </para> <para> - The <productname>PostgreSQL</> community will stop releasing updates + The <productname>PostgreSQL</productname> community will stop releasing updates for the 9.1.X release series in September 2016. Users are encouraged to update to a newer release branch soon. </para> @@ -253,17 +253,17 @@ <listitem> <para> Fix possible mis-evaluation of - nested <literal>CASE</>-<literal>WHEN</> expressions (Heikki + nested <literal>CASE</literal>-<literal>WHEN</literal> expressions (Heikki Linnakangas, Michael Paquier, Tom Lane) </para> <para> - A <literal>CASE</> expression appearing within the test value - subexpression of another <literal>CASE</> could become confused about + A <literal>CASE</literal> expression appearing within the test value + subexpression of another <literal>CASE</literal> could become confused about whether its own test value was null or not. Also, inlining of a SQL function implementing the equality operator used by - a <literal>CASE</> expression could result in passing the wrong test - value to functions called within a <literal>CASE</> expression in the + a <literal>CASE</literal> expression could result in passing the wrong test + value to functions called within a <literal>CASE</literal> expression in the SQL function's body. If the test values were of different data types, a crash might result; moreover such situations could be abused to allow disclosure of portions of server memory. (CVE-2016-5423) @@ -277,7 +277,7 @@ </para> <para> - Numerous places in <application>vacuumdb</> and other client programs + Numerous places in <application>vacuumdb</application> and other client programs could become confused by database and role names containing double quotes or backslashes. Tighten up quoting rules to make that safe. Also, ensure that when a conninfo string is used as a database name @@ -286,22 +286,22 @@ <para> Fix handling of paired double quotes - in <application>psql</>'s <command>\connect</> - and <command>\password</> commands to match the documentation. + in <application>psql</application>'s <command>\connect</command> + and <command>\password</command> commands to match the documentation. </para> <para> - Introduce a new <option>-reuse-previous</> option - in <application>psql</>'s <command>\connect</> command to allow + Introduce a new <option>-reuse-previous</option> option + in <application>psql</application>'s <command>\connect</command> command to allow explicit control of whether to re-use connection parameters from a previous connection. (Without this, the choice is based on whether the database name looks like a conninfo string, as before.) This allows secure handling of database names containing special - characters in <application>pg_dumpall</> scripts. + characters in <application>pg_dumpall</application> scripts. </para> <para> - <application>pg_dumpall</> now refuses to deal with database and role + <application>pg_dumpall</application> now refuses to deal with database and role names containing carriage returns or newlines, as it seems impractical to quote those characters safely on Windows. In future we may reject such names on the server side, but that step has not been taken yet. @@ -311,40 +311,40 @@ These are considered security fixes because crafted object names containing special characters could have been used to execute commands with superuser privileges the next time a superuser - executes <application>pg_dumpall</> or other routine maintenance + executes <application>pg_dumpall</application> or other routine maintenance operations. (CVE-2016-5424) </para> </listitem> <listitem> <para> - Fix corner-case misbehaviors for <literal>IS NULL</>/<literal>IS NOT - NULL</> applied to nested composite values (Andrew Gierth, Tom Lane) + Fix corner-case misbehaviors for <literal>IS NULL</literal>/<literal>IS NOT + NULL</literal> applied to nested composite values (Andrew Gierth, Tom Lane) </para> <para> - The SQL standard specifies that <literal>IS NULL</> should return + The SQL standard specifies that <literal>IS NULL</literal> should return TRUE for a row of all null values (thus <literal>ROW(NULL,NULL) IS - NULL</> yields TRUE), but this is not meant to apply recursively - (thus <literal>ROW(NULL, ROW(NULL,NULL)) IS NULL</> yields FALSE). + NULL</literal> yields TRUE), but this is not meant to apply recursively + (thus <literal>ROW(NULL, ROW(NULL,NULL)) IS NULL</literal> yields FALSE). The core executor got this right, but certain planner optimizations treated the test as recursive (thus producing TRUE in both cases), - and <filename>contrib/postgres_fdw</> could produce remote queries + and <filename>contrib/postgres_fdw</filename> could produce remote queries that misbehaved similarly. </para> </listitem> <listitem> <para> - Make the <type>inet</> and <type>cidr</> data types properly reject + Make the <type>inet</type> and <type>cidr</type> data types properly reject IPv6 addresses with too many colon-separated fields (Tom Lane) </para> </listitem> <listitem> <para> - Prevent crash in <function>close_ps()</> - (the <type>point</> <literal>##</> <type>lseg</> operator) + Prevent crash in <function>close_ps()</function> + (the <type>point</type> <literal>##</literal> <type>lseg</type> operator) for NaN input coordinates (Tom Lane) </para> @@ -355,12 +355,12 @@ <listitem> <para> - Fix several one-byte buffer over-reads in <function>to_number()</> + Fix several one-byte buffer over-reads in <function>to_number()</function> (Peter Eisentraut) </para> <para> - In several cases the <function>to_number()</> function would read one + In several cases the <function>to_number()</function> function would read one more character than it should from the input string. There is a small chance of a crash, if the input happens to be adjacent to the end of memory. @@ -370,7 +370,7 @@ <listitem> <para> Avoid unsafe intermediate state during expensive paths - through <function>heap_update()</> (Masahiko Sawada, Andres Freund) + through <function>heap_update()</function> (Masahiko Sawada, Andres Freund) </para> <para> @@ -383,12 +383,12 @@ <listitem> <para> - Avoid consuming a transaction ID during <command>VACUUM</> + Avoid consuming a transaction ID during <command>VACUUM</command> (Alexander Korotkov) </para> <para> - Some cases in <command>VACUUM</> unnecessarily caused an XID to be + Some cases in <command>VACUUM</command> unnecessarily caused an XID to be assigned to the current transaction. Normally this is negligible, but if one is up against the XID wraparound limit, consuming more XIDs during anti-wraparound vacuums is a very bad thing. @@ -397,12 +397,12 @@ <listitem> <para> - Avoid canceling hot-standby queries during <command>VACUUM FREEZE</> + Avoid canceling hot-standby queries during <command>VACUUM FREEZE</command> (Simon Riggs, Álvaro Herrera) </para> <para> - <command>VACUUM FREEZE</> on an otherwise-idle master server could + <command>VACUUM FREEZE</command> on an otherwise-idle master server could result in unnecessary cancellations of queries on its standby servers. </para> @@ -410,8 +410,8 @@ <listitem> <para> - When a manual <command>ANALYZE</> specifies a column list, don't - reset the table's <literal>changes_since_analyze</> counter + When a manual <command>ANALYZE</command> specifies a column list, don't + reset the table's <literal>changes_since_analyze</literal> counter (Tom Lane) </para> @@ -423,7 +423,7 @@ <listitem> <para> - Fix <command>ANALYZE</>'s overestimation of <literal>n_distinct</> + Fix <command>ANALYZE</command>'s overestimation of <literal>n_distinct</literal> for a unique or nearly-unique column with many null entries (Tom Lane) </para> @@ -451,8 +451,8 @@ <listitem> <para> - Fix <filename>contrib/btree_gin</> to handle the smallest - possible <type>bigint</> value correctly (Peter Eisentraut) + Fix <filename>contrib/btree_gin</filename> to handle the smallest + possible <type>bigint</type> value correctly (Peter Eisentraut) </para> </listitem> @@ -465,21 +465,21 @@ <para> It's planned to switch to two-part instead of three-part server version numbers for releases after 9.6. Make sure - that <function>PQserverVersion()</> returns the correct value for + that <function>PQserverVersion()</function> returns the correct value for such cases. </para> </listitem> <listitem> <para> - Fix <application>ecpg</>'s code for <literal>unsigned long long</> + Fix <application>ecpg</application>'s code for <literal>unsigned long long</literal> array elements (Michael Meskes) </para> </listitem> <listitem> <para> - Make <application>pg_basebackup</> accept <literal>-Z 0</> as + Make <application>pg_basebackup</application> accept <literal>-Z 0</literal> as specifying no compression (Fujii Masao) </para> </listitem> @@ -491,13 +491,13 @@ Branch: REL9_1_STABLE [d56c02f1a] 2016-06-19 13:45:03 -0400 Branch: REL9_1_STABLE [354b3a3ac] 2016-06-19 14:01:17 -0400 --> <para> - Revert to the old heuristic timeout for <literal>pg_ctl start -w</> + Revert to the old heuristic timeout for <literal>pg_ctl start -w</literal> (Tom Lane) </para> <para> The new method adopted as of release 9.1.20 does not work - when <varname>silent_mode</> is enabled, so go back to the old way. + when <varname>silent_mode</varname> is enabled, so go back to the old way. </para> </listitem> @@ -530,7 +530,7 @@ Branch: REL9_1_STABLE [354b3a3ac] 2016-06-19 14:01:17 -0400 <listitem> <para> Update our copy of the timezone code to match - IANA's <application>tzcode</> release 2016c (Tom Lane) + IANA's <application>tzcode</application> release 2016c (Tom Lane) </para> <para> @@ -542,7 +542,7 @@ Branch: REL9_1_STABLE [354b3a3ac] 2016-06-19 14:01:17 -0400 <listitem> <para> - Update time zone data files to <application>tzdata</> release 2016f + Update time zone data files to <application>tzdata</application> release 2016f for DST law changes in Kemerovo and Novosibirsk, plus historical corrections for Azerbaijan, Belarus, and Morocco. </para> @@ -568,7 +568,7 @@ Branch: REL9_1_STABLE [354b3a3ac] 2016-06-19 14:01:17 -0400 </para> <para> - The <productname>PostgreSQL</> community will stop releasing updates + The <productname>PostgreSQL</productname> community will stop releasing updates for the 9.1.X release series in September 2016. Users are encouraged to update to a newer release branch soon. </para> @@ -604,7 +604,7 @@ Branch: REL9_1_STABLE [354b3a3ac] 2016-06-19 14:01:17 -0400 using OpenSSL within a single process and not all the code involved follows the same rules for when to clear the error queue. Failures have been reported specifically when a client application - uses SSL connections in <application>libpq</> concurrently with + uses SSL connections in <application>libpq</application> concurrently with SSL connections using the PHP, Python, or Ruby wrappers for OpenSSL. It's possible for similar problems to arise within the server as well, if an extension module establishes an outgoing SSL connection. @@ -613,7 +613,7 @@ Branch: REL9_1_STABLE [354b3a3ac] 2016-06-19 14:01:17 -0400 <listitem> <para> - Fix <quote>failed to build any <replaceable>N</>-way joins</quote> + Fix <quote>failed to build any <replaceable>N</replaceable>-way joins</quote> planner error with a full join enclosed in the right-hand side of a left join (Tom Lane) </para> @@ -621,8 +621,8 @@ Branch: REL9_1_STABLE [354b3a3ac] 2016-06-19 14:01:17 -0400 <listitem> <para> - Fix possible misbehavior of <literal>TH</>, <literal>th</>, - and <literal>Y,YYY</> format codes in <function>to_timestamp()</> + Fix possible misbehavior of <literal>TH</literal>, <literal>th</literal>, + and <literal>Y,YYY</literal> format codes in <function>to_timestamp()</function> (Tom Lane) </para> @@ -634,28 +634,28 @@ Branch: REL9_1_STABLE [354b3a3ac] 2016-06-19 14:01:17 -0400 <listitem> <para> - Fix dumping of rules and views in which the <replaceable>array</> - argument of a <literal><replaceable>value</> <replaceable>operator</> - ANY (<replaceable>array</>)</literal> construct is a sub-SELECT + Fix dumping of rules and views in which the <replaceable>array</replaceable> + argument of a <literal><replaceable>value</replaceable> <replaceable>operator</replaceable> + ANY (<replaceable>array</replaceable>)</literal> construct is a sub-SELECT (Tom Lane) </para> </listitem> <listitem> <para> - Make <application>pg_regress</> use a startup timeout from the - <envar>PGCTLTIMEOUT</> environment variable, if that's set (Tom Lane) + Make <application>pg_regress</application> use a startup timeout from the + <envar>PGCTLTIMEOUT</envar> environment variable, if that's set (Tom Lane) </para> <para> This is for consistency with a behavior recently added - to <application>pg_ctl</>; it eases automated testing on slow machines. + to <application>pg_ctl</application>; it eases automated testing on slow machines. </para> </listitem> <listitem> <para> - Fix <application>pg_upgrade</> to correctly restore extension + Fix <application>pg_upgrade</application> to correctly restore extension membership for operator families containing only one operator class (Tom Lane) </para> @@ -663,23 +663,23 @@ Branch: REL9_1_STABLE [354b3a3ac] 2016-06-19 14:01:17 -0400 <para> In such a case, the operator family was restored into the new database, but it was no longer marked as part of the extension. This had no - immediate ill effects, but would cause later <application>pg_dump</> + immediate ill effects, but would cause later <application>pg_dump</application> runs to emit output that would cause (harmless) errors on restore. </para> </listitem> <listitem> <para> - Rename internal function <function>strtoi()</> - to <function>strtoint()</> to avoid conflict with a NetBSD library + Rename internal function <function>strtoi()</function> + to <function>strtoint()</function> to avoid conflict with a NetBSD library function (Thomas Munro) </para> </listitem> <listitem> <para> - Fix reporting of errors from <function>bind()</> - and <function>listen()</> system calls on Windows (Tom Lane) + Fix reporting of errors from <function>bind()</function> + and <function>listen()</function> system calls on Windows (Tom Lane) </para> </listitem> @@ -692,12 +692,12 @@ Branch: REL9_1_STABLE [354b3a3ac] 2016-06-19 14:01:17 -0400 <listitem> <para> - Avoid possibly-unsafe use of Windows' <function>FormatMessage()</> + Avoid possibly-unsafe use of Windows' <function>FormatMessage()</function> function (Christian Ullrich) </para> <para> - Use the <literal>FORMAT_MESSAGE_IGNORE_INSERTS</> flag where + Use the <literal>FORMAT_MESSAGE_IGNORE_INSERTS</literal> flag where appropriate. No live bug is known to exist here, but it seems like a good idea to be careful. </para> @@ -705,9 +705,9 @@ Branch: REL9_1_STABLE [354b3a3ac] 2016-06-19 14:01:17 -0400 <listitem> <para> - Update time zone data files to <application>tzdata</> release 2016d + Update time zone data files to <application>tzdata</application> release 2016d for DST law changes in Russia and Venezuela. There are new zone - names <literal>Europe/Kirov</> and <literal>Asia/Tomsk</> to reflect + names <literal>Europe/Kirov</literal> and <literal>Asia/Tomsk</literal> to reflect the fact that these regions now have different time zone histories from adjacent regions. </para> @@ -754,56 +754,56 @@ Branch: REL9_1_STABLE [354b3a3ac] 2016-06-19 14:01:17 -0400 <listitem> <para> Fix incorrect handling of NULL index entries in - indexed <literal>ROW()</> comparisons (Tom Lane) + indexed <literal>ROW()</literal> comparisons (Tom Lane) </para> <para> An index search using a row comparison such as <literal>ROW(a, b) > - ROW('x', 'y')</> would stop upon reaching a NULL entry in - the <structfield>b</> column, ignoring the fact that there might be - non-NULL <structfield>b</> values associated with later values - of <structfield>a</>. + ROW('x', 'y')</literal> would stop upon reaching a NULL entry in + the <structfield>b</structfield> column, ignoring the fact that there might be + non-NULL <structfield>b</structfield> values associated with later values + of <structfield>a</structfield>. </para> </listitem> <listitem> <para> Avoid unlikely data-loss scenarios due to renaming files without - adequate <function>fsync()</> calls before and after (Michael Paquier, + adequate <function>fsync()</function> calls before and after (Michael Paquier, Tomas Vondra, Andres Freund) </para> </listitem> <listitem> <para> - Correctly handle cases where <literal>pg_subtrans</> is close to XID + Correctly handle cases where <literal>pg_subtrans</literal> is close to XID wraparound during server startup (Jeff Janes) </para> </listitem> <listitem> <para> - Fix corner-case crash due to trying to free <function>localeconv()</> + Fix corner-case crash due to trying to free <function>localeconv()</function> output strings more than once (Tom Lane) </para> </listitem> <listitem> <para> - Fix parsing of affix files for <literal>ispell</> dictionaries + Fix parsing of affix files for <literal>ispell</literal> dictionaries (Tom Lane) </para> <para> The code could go wrong if the affix file contained any characters whose byte length changes during case-folding, for - example <literal>I</> in Turkish UTF8 locales. + example <literal>I</literal> in Turkish UTF8 locales. </para> </listitem> <listitem> <para> - Avoid use of <function>sscanf()</> to parse <literal>ispell</> + Avoid use of <function>sscanf()</function> to parse <literal>ispell</literal> dictionary files (Artur Zakirov) </para> @@ -829,27 +829,27 @@ Branch: REL9_1_STABLE [354b3a3ac] 2016-06-19 14:01:17 -0400 <listitem> <para> - Fix <application>psql</>'s tab completion logic to handle multibyte + Fix <application>psql</application>'s tab completion logic to handle multibyte characters properly (Kyotaro Horiguchi, Robert Haas) </para> </listitem> <listitem> <para> - Fix <application>psql</>'s tab completion for - <literal>SECURITY LABEL</> (Tom Lane) + Fix <application>psql</application>'s tab completion for + <literal>SECURITY LABEL</literal> (Tom Lane) </para> <para> - Pressing TAB after <literal>SECURITY LABEL</> might cause a crash + Pressing TAB after <literal>SECURITY LABEL</literal> might cause a crash or offering of inappropriate keywords. </para> </listitem> <listitem> <para> - Make <application>pg_ctl</> accept a wait timeout from the - <envar>PGCTLTIMEOUT</> environment variable, if none is specified on + Make <application>pg_ctl</application> accept a wait timeout from the + <envar>PGCTLTIMEOUT</envar> environment variable, if none is specified on the command line (Noah Misch) </para> @@ -863,20 +863,20 @@ Branch: REL9_1_STABLE [354b3a3ac] 2016-06-19 14:01:17 -0400 <listitem> <para> Fix incorrect test for Windows service status - in <application>pg_ctl</> (Manuel Mathar) + in <application>pg_ctl</application> (Manuel Mathar) </para> <para> The previous set of minor releases attempted to - fix <application>pg_ctl</> to properly determine whether to send log + fix <application>pg_ctl</application> to properly determine whether to send log messages to Window's Event Log, but got the test backwards. </para> </listitem> <listitem> <para> - Fix <application>pgbench</> to correctly handle the combination - of <literal>-C</> and <literal>-M prepared</> options (Tom Lane) + Fix <application>pgbench</application> to correctly handle the combination + of <literal>-C</literal> and <literal>-M prepared</literal> options (Tom Lane) </para> </listitem> @@ -897,21 +897,21 @@ Branch: REL9_1_STABLE [354b3a3ac] 2016-06-19 14:01:17 -0400 <listitem> <para> Fix multiple mistakes in the statistics returned - by <filename>contrib/pgstattuple</>'s <function>pgstatindex()</> + by <filename>contrib/pgstattuple</filename>'s <function>pgstatindex()</function> function (Tom Lane) </para> </listitem> <listitem> <para> - Remove dependency on <literal>psed</> in MSVC builds, since it's no + Remove dependency on <literal>psed</literal> in MSVC builds, since it's no longer provided by core Perl (Michael Paquier, Andrew Dunstan) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2016c + Update time zone data files to <application>tzdata</application> release 2016c for DST law changes in Azerbaijan, Chile, Haiti, Palestine, and Russia (Altai, Astrakhan, Kirov, Sakhalin, Ulyanovsk regions), plus historical corrections for Lithuania, Moldova, and Russia @@ -972,25 +972,25 @@ Branch: REL9_1_STABLE [354b3a3ac] 2016-06-19 14:01:17 -0400 <listitem> <para> - Perform an immediate shutdown if the <filename>postmaster.pid</> file + Perform an immediate shutdown if the <filename>postmaster.pid</filename> file is removed (Tom Lane) </para> <para> The postmaster now checks every minute or so - that <filename>postmaster.pid</> is still there and still contains its + that <filename>postmaster.pid</filename> is still there and still contains its own PID. If not, it performs an immediate shutdown, as though it had - received <systemitem>SIGQUIT</>. The main motivation for this change + received <systemitem>SIGQUIT</systemitem>. The main motivation for this change is to ensure that failed buildfarm runs will get cleaned up without manual intervention; but it also serves to limit the bad effects if a - DBA forcibly removes <filename>postmaster.pid</> and then starts a new + DBA forcibly removes <filename>postmaster.pid</filename> and then starts a new postmaster. </para> </listitem> <listitem> <para> - In <literal>SERIALIZABLE</> transaction isolation mode, serialization + In <literal>SERIALIZABLE</literal> transaction isolation mode, serialization anomalies could be missed due to race conditions during insertions (Kevin Grittner, Thomas Munro) </para> @@ -999,7 +999,7 @@ Branch: REL9_1_STABLE [354b3a3ac] 2016-06-19 14:01:17 -0400 <listitem> <para> Fix failure to emit appropriate WAL records when doing <literal>ALTER - TABLE ... SET TABLESPACE</> for unlogged relations (Michael Paquier, + TABLE ... SET TABLESPACE</literal> for unlogged relations (Michael Paquier, Andres Freund) </para> @@ -1018,21 +1018,21 @@ Branch: REL9_1_STABLE [354b3a3ac] 2016-06-19 14:01:17 -0400 <listitem> <para> - Fix <command>ALTER COLUMN TYPE</> to reconstruct inherited check + Fix <command>ALTER COLUMN TYPE</command> to reconstruct inherited check constraints properly (Tom Lane) </para> </listitem> <listitem> <para> - Fix <command>REASSIGN OWNED</> to change ownership of composite types + Fix <command>REASSIGN OWNED</command> to change ownership of composite types properly (Álvaro Herrera) </para> </listitem> <listitem> <para> - Fix <command>REASSIGN OWNED</> and <command>ALTER OWNER</> to correctly + Fix <command>REASSIGN OWNED</command> and <command>ALTER OWNER</command> to correctly update granted-permissions lists when changing owners of data types, foreign data wrappers, or foreign servers (Bruce Momjian, Álvaro Herrera) @@ -1041,7 +1041,7 @@ Branch: REL9_1_STABLE [354b3a3ac] 2016-06-19 14:01:17 -0400 <listitem> <para> - Fix <command>REASSIGN OWNED</> to ignore foreign user mappings, + Fix <command>REASSIGN OWNED</command> to ignore foreign user mappings, rather than fail (Álvaro Herrera) </para> </listitem> @@ -1063,14 +1063,14 @@ Branch: REL9_1_STABLE [354b3a3ac] 2016-06-19 14:01:17 -0400 <listitem> <para> - Fix dumping of whole-row Vars in <literal>ROW()</> - and <literal>VALUES()</> lists (Tom Lane) + Fix dumping of whole-row Vars in <literal>ROW()</literal> + and <literal>VALUES()</literal> lists (Tom Lane) </para> </listitem> <listitem> <para> - Fix possible internal overflow in <type>numeric</> division + Fix possible internal overflow in <type>numeric</type> division (Dean Rasheed) </para> </listitem> @@ -1122,7 +1122,7 @@ Branch: REL9_1_STABLE [354b3a3ac] 2016-06-19 14:01:17 -0400 <para> This causes the code to emit <quote>regular expression is too - complex</> errors in some cases that previously used unreasonable + complex</quote> errors in some cases that previously used unreasonable amounts of time and memory. </para> </listitem> @@ -1135,14 +1135,14 @@ Branch: REL9_1_STABLE [354b3a3ac] 2016-06-19 14:01:17 -0400 <listitem> <para> - Make <literal>%h</> and <literal>%r</> escapes - in <varname>log_line_prefix</> work for messages emitted due - to <varname>log_connections</> (Tom Lane) + Make <literal>%h</literal> and <literal>%r</literal> escapes + in <varname>log_line_prefix</varname> work for messages emitted due + to <varname>log_connections</varname> (Tom Lane) </para> <para> - Previously, <literal>%h</>/<literal>%r</> started to work just after a - new session had emitted the <quote>connection received</> log message; + Previously, <literal>%h</literal>/<literal>%r</literal> started to work just after a + new session had emitted the <quote>connection received</quote> log message; now they work for that message too. </para> </listitem> @@ -1155,7 +1155,7 @@ Branch: REL9_1_STABLE [354b3a3ac] 2016-06-19 14:01:17 -0400 <para> This oversight resulted in failure to recover from crashes - whenever <varname>logging_collector</> is turned on. + whenever <varname>logging_collector</varname> is turned on. </para> </listitem> @@ -1181,13 +1181,13 @@ Branch: REL9_1_STABLE [354b3a3ac] 2016-06-19 14:01:17 -0400 <listitem> <para> - In <application>psql</>, ensure that <application>libreadline</>'s idea + In <application>psql</application>, ensure that <application>libreadline</application>'s idea of the screen size is updated when the terminal window size changes (Merlin Moncure) </para> <para> - Previously, <application>libreadline</> did not notice if the window + Previously, <application>libreadline</application> did not notice if the window was resized during query output, leading to strange behavior during later input of multiline queries. </para> @@ -1195,15 +1195,15 @@ Branch: REL9_1_STABLE [354b3a3ac] 2016-06-19 14:01:17 -0400 <listitem> <para> - Fix <application>psql</>'s <literal>\det</> command to interpret its - pattern argument the same way as other <literal>\d</> commands with + Fix <application>psql</application>'s <literal>\det</literal> command to interpret its + pattern argument the same way as other <literal>\d</literal> commands with potentially schema-qualified patterns do (Reece Hart) </para> </listitem> <listitem> <para> - Avoid possible crash in <application>psql</>'s <literal>\c</> command + Avoid possible crash in <application>psql</application>'s <literal>\c</literal> command when previous connection was via Unix socket and command specifies a new hostname and same username (Tom Lane) </para> @@ -1211,21 +1211,21 @@ Branch: REL9_1_STABLE [354b3a3ac] 2016-06-19 14:01:17 -0400 <listitem> <para> - In <literal>pg_ctl start -w</>, test child process status directly + In <literal>pg_ctl start -w</literal>, test child process status directly rather than relying on heuristics (Tom Lane, Michael Paquier) </para> <para> - Previously, <application>pg_ctl</> relied on an assumption that the new - postmaster would always create <filename>postmaster.pid</> within five + Previously, <application>pg_ctl</application> relied on an assumption that the new + postmaster would always create <filename>postmaster.pid</filename> within five seconds. But that can fail on heavily-loaded systems, - causing <application>pg_ctl</> to report incorrectly that the + causing <application>pg_ctl</application> to report incorrectly that the postmaster failed to start. </para> <para> Except on Windows, this change also means that a <literal>pg_ctl start - -w</> done immediately after another such command will now reliably + -w</literal> done immediately after another such command will now reliably fail, whereas previously it would report success if done within two seconds of the first command. </para> @@ -1233,23 +1233,23 @@ Branch: REL9_1_STABLE [354b3a3ac] 2016-06-19 14:01:17 -0400 <listitem> <para> - In <literal>pg_ctl start -w</>, don't attempt to use a wildcard listen + In <literal>pg_ctl start -w</literal>, don't attempt to use a wildcard listen address to connect to the postmaster (Kondo Yuta) </para> <para> - On Windows, <application>pg_ctl</> would fail to detect postmaster - startup if <varname>listen_addresses</> is set to <literal>0.0.0.0</> - or <literal>::</>, because it would try to use that value verbatim as + On Windows, <application>pg_ctl</application> would fail to detect postmaster + startup if <varname>listen_addresses</varname> is set to <literal>0.0.0.0</literal> + or <literal>::</literal>, because it would try to use that value verbatim as the address to connect to, which doesn't work. Instead assume - that <literal>127.0.0.1</> or <literal>::1</>, respectively, is the + that <literal>127.0.0.1</literal> or <literal>::1</literal>, respectively, is the right thing to use. </para> </listitem> <listitem> <para> - In <application>pg_ctl</> on Windows, check service status to decide + In <application>pg_ctl</application> on Windows, check service status to decide where to send output, rather than checking if standard output is a terminal (Michael Paquier) </para> @@ -1257,18 +1257,18 @@ Branch: REL9_1_STABLE [354b3a3ac] 2016-06-19 14:01:17 -0400 <listitem> <para> - In <application>pg_dump</> and <application>pg_basebackup</>, adopt + In <application>pg_dump</application> and <application>pg_basebackup</application>, adopt the GNU convention for handling tar-archive members exceeding 8GB (Tom Lane) </para> <para> - The POSIX standard for <literal>tar</> file format does not allow + The POSIX standard for <literal>tar</literal> file format does not allow archive member files to exceed 8GB, but most modern implementations - of <application>tar</> support an extension that fixes that. Adopt - this extension so that <application>pg_dump</> with <option>-Ft</> no + of <application>tar</application> support an extension that fixes that. Adopt + this extension so that <application>pg_dump</application> with <option>-Ft</option> no longer fails on tables with more than 8GB of data, and so - that <application>pg_basebackup</> can handle files larger than 8GB. + that <application>pg_basebackup</application> can handle files larger than 8GB. In addition, fix some portability issues that could cause failures for members between 4GB and 8GB on some platforms. Potentially these problems could cause unrecoverable data loss due to unreadable backup @@ -1278,44 +1278,44 @@ Branch: REL9_1_STABLE [354b3a3ac] 2016-06-19 14:01:17 -0400 <listitem> <para> - Fix assorted corner-case bugs in <application>pg_dump</>'s processing + Fix assorted corner-case bugs in <application>pg_dump</application>'s processing of extension member objects (Tom Lane) </para> </listitem> <listitem> <para> - Make <application>pg_dump</> mark a view's triggers as needing to be + Make <application>pg_dump</application> mark a view's triggers as needing to be processed after its rule, to prevent possible failure during - parallel <application>pg_restore</> (Tom Lane) + parallel <application>pg_restore</application> (Tom Lane) </para> </listitem> <listitem> <para> Ensure that relation option values are properly quoted - in <application>pg_dump</> (Kouhei Sutou, Tom Lane) + in <application>pg_dump</application> (Kouhei Sutou, Tom Lane) </para> <para> A reloption value that isn't a simple identifier or number could lead to dump/reload failures due to syntax errors in CREATE statements - issued by <application>pg_dump</>. This is not an issue with any - reloption currently supported by core <productname>PostgreSQL</>, but + issued by <application>pg_dump</application>. This is not an issue with any + reloption currently supported by core <productname>PostgreSQL</productname>, but extensions could allow reloptions that cause the problem. </para> </listitem> <listitem> <para> - Fix <application>pg_upgrade</>'s file-copying code to handle errors + Fix <application>pg_upgrade</application>'s file-copying code to handle errors properly on Windows (Bruce Momjian) </para> </listitem> <listitem> <para> - Install guards in <application>pgbench</> against corner-case overflow + Install guards in <application>pgbench</application> against corner-case overflow conditions during evaluation of script-specified division or modulo operators (Fabien Coelho, Michael Paquier) </para> @@ -1323,22 +1323,22 @@ Branch: REL9_1_STABLE [354b3a3ac] 2016-06-19 14:01:17 -0400 <listitem> <para> - Prevent certain <application>PL/Java</> parameters from being set by + Prevent certain <application>PL/Java</application> parameters from being set by non-superusers (Noah Misch) </para> <para> - This change mitigates a <application>PL/Java</> security bug - (CVE-2016-0766), which was fixed in <application>PL/Java</> by marking + This change mitigates a <application>PL/Java</application> security bug + (CVE-2016-0766), which was fixed in <application>PL/Java</application> by marking these parameters as superuser-only. To fix the security hazard for - sites that update <productname>PostgreSQL</> more frequently - than <application>PL/Java</>, make the core code aware of them also. + sites that update <productname>PostgreSQL</productname> more frequently + than <application>PL/Java</application>, make the core code aware of them also. </para> </listitem> <listitem> <para> - Improve <application>libpq</>'s handling of out-of-memory situations + Improve <application>libpq</application>'s handling of out-of-memory situations (Michael Paquier, Amit Kapila, Heikki Linnakangas) </para> </listitem> @@ -1346,42 +1346,42 @@ Branch: REL9_1_STABLE [354b3a3ac] 2016-06-19 14:01:17 -0400 <listitem> <para> Fix order of arguments - in <application>ecpg</>-generated <literal>typedef</> statements + in <application>ecpg</application>-generated <literal>typedef</literal> statements (Michael Meskes) </para> </listitem> <listitem> <para> - Use <literal>%g</> not <literal>%f</> format - in <application>ecpg</>'s <function>PGTYPESnumeric_from_double()</> + Use <literal>%g</literal> not <literal>%f</literal> format + in <application>ecpg</application>'s <function>PGTYPESnumeric_from_double()</function> (Tom Lane) </para> </listitem> <listitem> <para> - Fix <application>ecpg</>-supplied header files to not contain comments + Fix <application>ecpg</application>-supplied header files to not contain comments continued from a preprocessor directive line onto the next line (Michael Meskes) </para> <para> - Such a comment is rejected by <application>ecpg</>. It's not yet clear - whether <application>ecpg</> itself should be changed. + Such a comment is rejected by <application>ecpg</application>. It's not yet clear + whether <application>ecpg</application> itself should be changed. </para> </listitem> <listitem> <para> - Ensure that <filename>contrib/pgcrypto</>'s <function>crypt()</> + Ensure that <filename>contrib/pgcrypto</filename>'s <function>crypt()</function> function can be interrupted by query cancel (Andreas Karlsson) </para> </listitem> <listitem> <para> - Accept <application>flex</> versions later than 2.5.x + Accept <application>flex</application> versions later than 2.5.x (Tom Lane, Michael Paquier) </para> @@ -1393,19 +1393,19 @@ Branch: REL9_1_STABLE [354b3a3ac] 2016-06-19 14:01:17 -0400 <listitem> <para> - Install our <filename>missing</> script where PGXS builds can find it + Install our <filename>missing</filename> script where PGXS builds can find it (Jim Nasby) </para> <para> This allows sane behavior in a PGXS build done on a machine where build - tools such as <application>bison</> are missing. + tools such as <application>bison</application> are missing. </para> </listitem> <listitem> <para> - Ensure that <filename>dynloader.h</> is included in the installed + Ensure that <filename>dynloader.h</filename> is included in the installed header files in MSVC builds (Bruce Momjian, Michael Paquier) </para> </listitem> @@ -1413,11 +1413,11 @@ Branch: REL9_1_STABLE [354b3a3ac] 2016-06-19 14:01:17 -0400 <listitem> <para> Add variant regression test expected-output file to match behavior of - current <application>libxml2</> (Tom Lane) + current <application>libxml2</application> (Tom Lane) </para> <para> - The fix for <application>libxml2</>'s CVE-2015-7499 causes it not to + The fix for <application>libxml2</application>'s CVE-2015-7499 causes it not to output error context reports in some cases where it used to do so. This seems to be a bug, but we'll probably have to live with it for some time, so work around it. @@ -1426,7 +1426,7 @@ Branch: REL9_1_STABLE [354b3a3ac] 2016-06-19 14:01:17 -0400 <listitem> <para> - Update time zone data files to <application>tzdata</> release 2016a for + Update time zone data files to <application>tzdata</application> release 2016a for DST law changes in Cayman Islands, Metlakatla, and Trans-Baikal Territory (Zabaykalsky Krai), plus historical corrections for Pakistan. </para> @@ -1472,8 +1472,8 @@ Branch: REL9_1_STABLE [354b3a3ac] 2016-06-19 14:01:17 -0400 <listitem> <para> - Fix <filename>contrib/pgcrypto</> to detect and report - too-short <function>crypt()</> salts (Josh Kupershmidt) + Fix <filename>contrib/pgcrypto</filename> to detect and report + too-short <function>crypt()</function> salts (Josh Kupershmidt) </para> <para> @@ -1499,13 +1499,13 @@ Branch: REL9_1_STABLE [354b3a3ac] 2016-06-19 14:01:17 -0400 <listitem> <para> - Fix insertion of relations into the relation cache <quote>init file</> + Fix insertion of relations into the relation cache <quote>init file</quote> (Tom Lane) </para> <para> An oversight in a patch in the most recent minor releases - caused <structname>pg_trigger_tgrelid_tgname_index</> to be omitted + caused <structname>pg_trigger_tgrelid_tgname_index</structname> to be omitted from the init file. Subsequent sessions detected this, then deemed the init file to be broken and silently ignored it, resulting in a significant degradation in session startup time. In addition to fixing @@ -1523,7 +1523,7 @@ Branch: REL9_1_STABLE [354b3a3ac] 2016-06-19 14:01:17 -0400 <listitem> <para> - Improve <command>LISTEN</> startup time when there are many unread + Improve <command>LISTEN</command> startup time when there are many unread notifications (Matt Newell) </para> </listitem> @@ -1535,7 +1535,7 @@ Branch: REL9_1_STABLE [354b3a3ac] 2016-06-19 14:01:17 -0400 </para> <para> - This substantially improves performance when <application>pg_dump</> + This substantially improves performance when <application>pg_dump</application> tries to dump a large number of tables. </para> </listitem> @@ -1550,13 +1550,13 @@ Branch: REL9_1_STABLE [354b3a3ac] 2016-06-19 14:01:17 -0400 too many bugs in practice, both in the underlying OpenSSL library and in our usage of it. Renegotiation will be removed entirely in 9.5 and later. In the older branches, just change the default value - of <varname>ssl_renegotiation_limit</> to zero (disabled). + of <varname>ssl_renegotiation_limit</varname> to zero (disabled). </para> </listitem> <listitem> <para> - Lower the minimum values of the <literal>*_freeze_max_age</> parameters + Lower the minimum values of the <literal>*_freeze_max_age</literal> parameters (Andres Freund) </para> @@ -1568,14 +1568,14 @@ Branch: REL9_1_STABLE [354b3a3ac] 2016-06-19 14:01:17 -0400 <listitem> <para> - Limit the maximum value of <varname>wal_buffers</> to 2GB to avoid + Limit the maximum value of <varname>wal_buffers</varname> to 2GB to avoid server crashes (Josh Berkus) </para> </listitem> <listitem> <para> - Fix rare internal overflow in multiplication of <type>numeric</> values + Fix rare internal overflow in multiplication of <type>numeric</type> values (Dean Rasheed) </para> </listitem> @@ -1583,21 +1583,21 @@ Branch: REL9_1_STABLE [354b3a3ac] 2016-06-19 14:01:17 -0400 <listitem> <para> Guard against hard-to-reach stack overflows involving record types, - range types, <type>json</>, <type>jsonb</>, <type>tsquery</>, - <type>ltxtquery</> and <type>query_int</> (Noah Misch) + range types, <type>json</type>, <type>jsonb</type>, <type>tsquery</type>, + <type>ltxtquery</type> and <type>query_int</type> (Noah Misch) </para> </listitem> <listitem> <para> - Fix handling of <literal>DOW</> and <literal>DOY</> in datetime input + Fix handling of <literal>DOW</literal> and <literal>DOY</literal> in datetime input (Greg Stark) </para> <para> These tokens aren't meant to be used in datetime values, but previously they resulted in opaque internal error messages rather - than <quote>invalid input syntax</>. + than <quote>invalid input syntax</quote>. </para> </listitem> @@ -1610,7 +1610,7 @@ Branch: REL9_1_STABLE [354b3a3ac] 2016-06-19 14:01:17 -0400 <listitem> <para> Add recursion depth protections to regular expression, <literal>SIMILAR - TO</>, and <literal>LIKE</> matching (Tom Lane) + TO</literal>, and <literal>LIKE</literal> matching (Tom Lane) </para> <para> @@ -1654,22 +1654,22 @@ Branch: REL9_1_STABLE [354b3a3ac] 2016-06-19 14:01:17 -0400 <listitem> <para> - Fix <quote>unexpected out-of-memory situation during sort</> errors - when using tuplestores with small <varname>work_mem</> settings (Tom + Fix <quote>unexpected out-of-memory situation during sort</quote> errors + when using tuplestores with small <varname>work_mem</varname> settings (Tom Lane) </para> </listitem> <listitem> <para> - Fix very-low-probability stack overrun in <function>qsort</> (Tom Lane) + Fix very-low-probability stack overrun in <function>qsort</function> (Tom Lane) </para> </listitem> <listitem> <para> - Fix <quote>invalid memory alloc request size</> failure in hash joins - with large <varname>work_mem</> settings (Tomas Vondra, Tom Lane) + Fix <quote>invalid memory alloc request size</quote> failure in hash joins + with large <varname>work_mem</varname> settings (Tomas Vondra, Tom Lane) </para> </listitem> @@ -1682,9 +1682,9 @@ Branch: REL9_1_STABLE [354b3a3ac] 2016-06-19 14:01:17 -0400 These mistakes could lead to incorrect query plans that would give wrong answers, or to assertion failures in assert-enabled builds, or to odd planner errors such as <quote>could not devise a query plan for the - given query</>, <quote>could not find pathkey item to - sort</>, <quote>plan should not reference subplan's variable</>, - or <quote>failed to assign all NestLoopParams to plan nodes</>. + given query</quote>, <quote>could not find pathkey item to + sort</quote>, <quote>plan should not reference subplan's variable</quote>, + or <quote>failed to assign all NestLoopParams to plan nodes</quote>. Thanks are due to Andreas Seltenreich and Piotr Stefaniak for fuzz testing that exposed these problems. </para> @@ -1723,12 +1723,12 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> During postmaster shutdown, ensure that per-socket lock files are removed and listen sockets are closed before we remove - the <filename>postmaster.pid</> file (Tom Lane) + the <filename>postmaster.pid</filename> file (Tom Lane) </para> <para> This avoids race-condition failures if an external script attempts to - start a new postmaster as soon as <literal>pg_ctl stop</> returns. + start a new postmaster as soon as <literal>pg_ctl stop</literal> returns. </para> </listitem> @@ -1748,7 +1748,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Do not print a <literal>WARNING</> when an autovacuum worker is already + Do not print a <literal>WARNING</literal> when an autovacuum worker is already gone when we attempt to signal it, and reduce log verbosity for such signals (Tom Lane) </para> @@ -1781,44 +1781,44 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Fix off-by-one error that led to otherwise-harmless warnings - about <quote>apparent wraparound</> in subtrans/multixact truncation + about <quote>apparent wraparound</quote> in subtrans/multixact truncation (Thomas Munro) </para> </listitem> <listitem> <para> - Fix misreporting of <command>CONTINUE</> and <command>MOVE</> statement - types in <application>PL/pgSQL</>'s error context messages + Fix misreporting of <command>CONTINUE</command> and <command>MOVE</command> statement + types in <application>PL/pgSQL</application>'s error context messages (Pavel Stehule, Tom Lane) </para> </listitem> <listitem> <para> - Fix <application>PL/Perl</> to handle non-<acronym>ASCII</> error + Fix <application>PL/Perl</application> to handle non-<acronym>ASCII</acronym> error message texts correctly (Alex Hunsaker) </para> </listitem> <listitem> <para> - Fix <application>PL/Python</> crash when returning the string - representation of a <type>record</> result (Tom Lane) + Fix <application>PL/Python</application> crash when returning the string + representation of a <type>record</type> result (Tom Lane) </para> </listitem> <listitem> <para> - Fix some places in <application>PL/Tcl</> that neglected to check for - failure of <function>malloc()</> calls (Michael Paquier, Álvaro + Fix some places in <application>PL/Tcl</application> that neglected to check for + failure of <function>malloc()</function> calls (Michael Paquier, Álvaro Herrera) </para> </listitem> <listitem> <para> - In <filename>contrib/isn</>, fix output of ISBN-13 numbers that begin + In <filename>contrib/isn</filename>, fix output of ISBN-13 numbers that begin with 979 (Fabien Coelho) </para> @@ -1830,7 +1830,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Improve <application>libpq</>'s handling of out-of-memory conditions + Improve <application>libpq</application>'s handling of out-of-memory conditions (Michael Paquier, Heikki Linnakangas) </para> </listitem> @@ -1838,68 +1838,68 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Fix memory leaks and missing out-of-memory checks - in <application>ecpg</> (Michael Paquier) + in <application>ecpg</application> (Michael Paquier) </para> </listitem> <listitem> <para> - Fix <application>psql</>'s code for locale-aware formatting of numeric + Fix <application>psql</application>'s code for locale-aware formatting of numeric output (Tom Lane) </para> <para> - The formatting code invoked by <literal>\pset numericlocale on</> + The formatting code invoked by <literal>\pset numericlocale on</literal> did the wrong thing for some uncommon cases such as numbers with an exponent but no decimal point. It could also mangle already-localized - output from the <type>money</> data type. + output from the <type>money</type> data type. </para> </listitem> <listitem> <para> - Prevent crash in <application>psql</>'s <command>\c</> command when + Prevent crash in <application>psql</application>'s <command>\c</command> command when there is no current connection (Noah Misch) </para> </listitem> <listitem> <para> - Fix selection of default <application>zlib</> compression level - in <application>pg_dump</>'s directory output format (Andrew Dunstan) + Fix selection of default <application>zlib</application> compression level + in <application>pg_dump</application>'s directory output format (Andrew Dunstan) </para> </listitem> <listitem> <para> - Ensure that temporary files created during a <application>pg_dump</> - run with <acronym>tar</>-format output are not world-readable (Michael + Ensure that temporary files created during a <application>pg_dump</application> + run with <acronym>tar</acronym>-format output are not world-readable (Michael Paquier) </para> </listitem> <listitem> <para> - Fix <application>pg_dump</> and <application>pg_upgrade</> to support - cases where the <literal>postgres</> or <literal>template1</> database + Fix <application>pg_dump</application> and <application>pg_upgrade</application> to support + cases where the <literal>postgres</literal> or <literal>template1</literal> database is in a non-default tablespace (Marti Raudsepp, Bruce Momjian) </para> </listitem> <listitem> <para> - Fix <application>pg_dump</> to handle object privileges sanely when + Fix <application>pg_dump</application> to handle object privileges sanely when dumping from a server too old to have a particular privilege type (Tom Lane) </para> <para> When dumping functions or procedural languages from pre-7.3 - servers, <application>pg_dump</> would - produce <command>GRANT</>/<command>REVOKE</> commands that revoked the + servers, <application>pg_dump</application> would + produce <command>GRANT</command>/<command>REVOKE</command> commands that revoked the owner's grantable privileges and instead granted all privileges - to <literal>PUBLIC</>. Since the privileges involved are - just <literal>USAGE</> and <literal>EXECUTE</>, this isn't a security + to <literal>PUBLIC</literal>. Since the privileges involved are + just <literal>USAGE</literal> and <literal>EXECUTE</literal>, this isn't a security problem, but it's certainly a surprising representation of the older systems' behavior. Fix it to leave the default privilege state alone in these cases. @@ -1908,18 +1908,18 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix <application>pg_dump</> to dump shell types (Tom Lane) + Fix <application>pg_dump</application> to dump shell types (Tom Lane) </para> <para> Shell types (that is, not-yet-fully-defined types) aren't useful for - much, but nonetheless <application>pg_dump</> should dump them. + much, but nonetheless <application>pg_dump</application> should dump them. </para> </listitem> <listitem> <para> - Fix assorted minor memory leaks in <application>pg_dump</> and other + Fix assorted minor memory leaks in <application>pg_dump</application> and other client-side programs (Michael Paquier) </para> </listitem> @@ -1927,11 +1927,11 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Fix spinlock assembly code for PPC hardware to be compatible - with <acronym>AIX</>'s native assembler (Tom Lane) + with <acronym>AIX</acronym>'s native assembler (Tom Lane) </para> <para> - Building with <application>gcc</> didn't work if <application>gcc</> + Building with <application>gcc</application> didn't work if <application>gcc</application> had been configured to use the native assembler, which is becoming more common. </para> @@ -1939,14 +1939,14 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - On <acronym>AIX</>, test the <literal>-qlonglong</> compiler option + On <acronym>AIX</acronym>, test the <literal>-qlonglong</literal> compiler option rather than just assuming it's safe to use (Noah Misch) </para> </listitem> <listitem> <para> - On <acronym>AIX</>, use <literal>-Wl,-brtllib</> link option to allow + On <acronym>AIX</acronym>, use <literal>-Wl,-brtllib</literal> link option to allow symbols to be resolved at runtime (Noah Misch) </para> @@ -1958,38 +1958,38 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Avoid use of inline functions when compiling with - 32-bit <application>xlc</>, due to compiler bugs (Noah Misch) + 32-bit <application>xlc</application>, due to compiler bugs (Noah Misch) </para> </listitem> <listitem> <para> - Use <filename>librt</> for <function>sched_yield()</> when necessary, + Use <filename>librt</filename> for <function>sched_yield()</function> when necessary, which it is on some Solaris versions (Oskari Saarenmaa) </para> </listitem> <listitem> <para> - Fix Windows <filename>install.bat</> script to handle target directory + Fix Windows <filename>install.bat</filename> script to handle target directory names that contain spaces (Heikki Linnakangas) </para> </listitem> <listitem> <para> - Make the numeric form of the <productname>PostgreSQL</> version number - (e.g., <literal>90405</>) readily available to extension Makefiles, - as a variable named <varname>VERSION_NUM</> (Michael Paquier) + Make the numeric form of the <productname>PostgreSQL</productname> version number + (e.g., <literal>90405</literal>) readily available to extension Makefiles, + as a variable named <varname>VERSION_NUM</varname> (Michael Paquier) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2015g for + Update time zone data files to <application>tzdata</application> release 2015g for DST law changes in Cayman Islands, Fiji, Moldova, Morocco, Norfolk Island, North Korea, Turkey, and Uruguay. There is a new zone name - <literal>America/Fort_Nelson</> for the Canadian Northern Rockies. + <literal>America/Fort_Nelson</literal> for the Canadian Northern Rockies. </para> </listitem> @@ -2038,7 +2038,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> With just the wrong timing of concurrent activity, a <command>VACUUM - FULL</> on a system catalog might fail to update the <quote>init file</> + FULL</command> on a system catalog might fail to update the <quote>init file</quote> that's used to avoid cache-loading work for new sessions. This would result in later sessions being unable to access that catalog at all. This is a very ancient bug, but it's so hard to trigger that no @@ -2049,13 +2049,13 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Avoid deadlock between incoming sessions and <literal>CREATE/DROP - DATABASE</> (Tom Lane) + DATABASE</literal> (Tom Lane) </para> <para> A new session starting in a database that is the target of - a <command>DROP DATABASE</> command, or is the template for - a <command>CREATE DATABASE</> command, could cause the command to wait + a <command>DROP DATABASE</command> command, or is the template for + a <command>CREATE DATABASE</command> command, could cause the command to wait for five seconds and then fail, even if the new session would have exited before that. </para> @@ -2101,12 +2101,12 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Avoid failures while <function>fsync</>'ing data directory during + Avoid failures while <function>fsync</function>'ing data directory during crash restart (Abhijit Menon-Sen, Tom Lane) </para> <para> - In the previous minor releases we added a patch to <function>fsync</> + In the previous minor releases we added a patch to <function>fsync</function> everything in the data directory after a crash. Unfortunately its response to any error condition was to fail, thereby preventing the server from starting up, even when the problem was quite harmless. @@ -2120,29 +2120,29 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Remove <application>configure</>'s check prohibiting linking to a - threaded <application>libpython</> - on <systemitem class="osname">OpenBSD</> (Tom Lane) + Remove <application>configure</application>'s check prohibiting linking to a + threaded <application>libpython</application> + on <systemitem class="osname">OpenBSD</systemitem> (Tom Lane) </para> <para> The failure this restriction was meant to prevent seems to not be a - problem anymore on current <systemitem class="osname">OpenBSD</> + problem anymore on current <systemitem class="osname">OpenBSD</systemitem> versions. </para> </listitem> <listitem> <para> - Allow <application>libpq</> to use TLS protocol versions beyond v1 + Allow <application>libpq</application> to use TLS protocol versions beyond v1 (Noah Misch) </para> <para> - For a long time, <application>libpq</> was coded so that the only SSL + For a long time, <application>libpq</application> was coded so that the only SSL protocol it would allow was TLS v1. Now that newer TLS versions are becoming popular, allow it to negotiate the highest commonly-supported - TLS version with the server. (<productname>PostgreSQL</> servers were + TLS version with the server. (<productname>PostgreSQL</productname> servers were already capable of such negotiation, so no change is needed on the server side.) This is a back-patch of a change already released in 9.4.0. @@ -2176,8 +2176,8 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 </para> <para> - However, if you use <filename>contrib/citext</>'s - <function>regexp_matches()</> functions, see the changelog entry below + However, if you use <filename>contrib/citext</filename>'s + <function>regexp_matches()</function> functions, see the changelog entry below about that. </para> @@ -2215,7 +2215,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 </para> <para> - Our replacement implementation of <function>snprintf()</> failed to + Our replacement implementation of <function>snprintf()</function> failed to check for errors reported by the underlying system library calls; the main case that might be missed is out-of-memory situations. In the worst case this might lead to information exposure, due to our @@ -2225,7 +2225,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 </para> <para> - It remains possible that some calls of the <function>*printf()</> + It remains possible that some calls of the <function>*printf()</function> family of functions are vulnerable to information disclosure if an out-of-memory error occurs at just the wrong time. We judge the risk to not be large, but will continue analysis in this area. @@ -2235,15 +2235,15 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - In <filename>contrib/pgcrypto</>, uniformly report decryption failures - as <quote>Wrong key or corrupt data</> (Noah Misch) + In <filename>contrib/pgcrypto</filename>, uniformly report decryption failures + as <quote>Wrong key or corrupt data</quote> (Noah Misch) </para> <para> Previously, some cases of decryption with an incorrect key could report other error message texts. It has been shown that such variance in error reports can aid attackers in recovering keys from other systems. - While it's unknown whether <filename>pgcrypto</>'s specific behaviors + While it's unknown whether <filename>pgcrypto</filename>'s specific behaviors are likewise exploitable, it seems better to avoid the risk by using a one-size-fits-all message. (CVE-2015-3167) @@ -2252,16 +2252,16 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix incorrect declaration of <filename>contrib/citext</>'s - <function>regexp_matches()</> functions (Tom Lane) + Fix incorrect declaration of <filename>contrib/citext</filename>'s + <function>regexp_matches()</function> functions (Tom Lane) </para> <para> - These functions should return <type>setof text[]</>, like the core + These functions should return <type>setof text[]</type>, like the core functions they are wrappers for; but they were incorrectly declared as - returning just <type>text[]</>. This mistake had two results: first, + returning just <type>text[]</type>. This mistake had two results: first, if there was no match you got a scalar null result, whereas what you - should get is an empty set (zero rows). Second, the <literal>g</> flag + should get is an empty set (zero rows). Second, the <literal>g</literal> flag was effectively ignored, since you would get only one result array even if there were multiple matches. </para> @@ -2269,16 +2269,16 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> While the latter behavior is clearly a bug, there might be applications depending on the former behavior; therefore the function declarations - will not be changed by default until <productname>PostgreSQL</> 9.5. + will not be changed by default until <productname>PostgreSQL</productname> 9.5. In pre-9.5 branches, the old behavior exists in version 1.0 of - the <literal>citext</> extension, while we have provided corrected - declarations in version 1.1 (which is <emphasis>not</> installed by + the <literal>citext</literal> extension, while we have provided corrected + declarations in version 1.1 (which is <emphasis>not</emphasis> installed by default). To adopt the fix in pre-9.5 branches, execute - <literal>ALTER EXTENSION citext UPDATE TO '1.1'</> in each database in - which <literal>citext</> is installed. (You can also <quote>update</> + <literal>ALTER EXTENSION citext UPDATE TO '1.1'</literal> in each database in + which <literal>citext</literal> is installed. (You can also <quote>update</quote> back to 1.0 if you need to undo that.) Be aware that either update direction will require dropping and recreating any views or rules that - use <filename>citext</>'s <function>regexp_matches()</> functions. + use <filename>citext</filename>'s <function>regexp_matches()</function> functions. </para> </listitem> @@ -2306,7 +2306,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> This oversight in the planner has been observed to cause <quote>could - not find RelOptInfo for given relids</> errors, but it seems possible + not find RelOptInfo for given relids</quote> errors, but it seems possible that sometimes an incorrect query plan might get past that consistency check and result in silently-wrong query output. </para> @@ -2334,7 +2334,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> This oversight has been seen to lead to <quote>failed to join all - relations together</> errors in queries involving <literal>LATERAL</>, + relations together</quote> errors in queries involving <literal>LATERAL</literal>, and that might happen in other cases as well. </para> </listitem> @@ -2342,7 +2342,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Fix possible deadlock at startup - when <literal>max_prepared_transactions</> is too small + when <literal>max_prepared_transactions</literal> is too small (Heikki Linnakangas) </para> </listitem> @@ -2356,14 +2356,14 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Avoid <quote>cannot GetMultiXactIdMembers() during recovery</> error + Avoid <quote>cannot GetMultiXactIdMembers() during recovery</quote> error (Álvaro Herrera) </para> </listitem> <listitem> <para> - Recursively <function>fsync()</> the data directory after a crash + Recursively <function>fsync()</function> the data directory after a crash (Abhijit Menon-Sen, Robert Haas) </para> @@ -2383,13 +2383,13 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Cope with unexpected signals in <function>LockBufferForCleanup()</> + Cope with unexpected signals in <function>LockBufferForCleanup()</function> (Andres Freund) </para> <para> This oversight could result in spurious errors about <quote>multiple - backends attempting to wait for pincount 1</>. + backends attempting to wait for pincount 1</quote>. </para> </listitem> @@ -2430,18 +2430,18 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 </para> <para> - <command>ANALYZE</> executes index expressions many times; if there are + <command>ANALYZE</command> executes index expressions many times; if there are slow functions in such an expression, it's desirable to be able to - cancel the <command>ANALYZE</> before that loop finishes. + cancel the <command>ANALYZE</command> before that loop finishes. </para> </listitem> <listitem> <para> - Ensure <structfield>tableoid</> of a foreign table is reported - correctly when a <literal>READ COMMITTED</> recheck occurs after - locking rows in <command>SELECT FOR UPDATE</>, <command>UPDATE</>, - or <command>DELETE</> (Etsuro Fujita) + Ensure <structfield>tableoid</structfield> of a foreign table is reported + correctly when a <literal>READ COMMITTED</literal> recheck occurs after + locking rows in <command>SELECT FOR UPDATE</command>, <command>UPDATE</command>, + or <command>DELETE</command> (Etsuro Fujita) </para> </listitem> @@ -2454,20 +2454,20 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Recommend setting <literal>include_realm</> to 1 when using + Recommend setting <literal>include_realm</literal> to 1 when using Kerberos/GSSAPI/SSPI authentication (Stephen Frost) </para> <para> Without this, identically-named users from different realms cannot be distinguished. For the moment this is only a documentation change, but - it will become the default setting in <productname>PostgreSQL</> 9.5. + it will become the default setting in <productname>PostgreSQL</productname> 9.5. </para> </listitem> <listitem> <para> - Remove code for matching IPv4 <filename>pg_hba.conf</> entries to + Remove code for matching IPv4 <filename>pg_hba.conf</filename> entries to IPv4-in-IPv6 addresses (Tom Lane) </para> @@ -2480,20 +2480,20 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 crashes on some systems, so let's just remove it rather than fix it. (Had we chosen to fix it, that would make for a subtle and potentially security-sensitive change in the effective meaning of - IPv4 <filename>pg_hba.conf</> entries, which does not seem like a good + IPv4 <filename>pg_hba.conf</filename> entries, which does not seem like a good thing to do in minor releases.) </para> </listitem> <listitem> <para> - Report WAL flush, not insert, position in <literal>IDENTIFY_SYSTEM</> + Report WAL flush, not insert, position in <literal>IDENTIFY_SYSTEM</literal> replication command (Heikki Linnakangas) </para> <para> This avoids a possible startup failure - in <application>pg_receivexlog</>. + in <application>pg_receivexlog</application>. </para> </listitem> @@ -2501,14 +2501,14 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> While shutting down service on Windows, periodically send status updates to the Service Control Manager to prevent it from killing the - service too soon; and ensure that <application>pg_ctl</> will wait for + service too soon; and ensure that <application>pg_ctl</application> will wait for shutdown (Krystian Bigaj) </para> </listitem> <listitem> <para> - Reduce risk of network deadlock when using <application>libpq</>'s + Reduce risk of network deadlock when using <application>libpq</application>'s non-blocking mode (Heikki Linnakangas) </para> @@ -2517,25 +2517,25 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 buffer every so often, in case the server has sent enough response data to cause it to block on output. (A typical scenario is that the server is sending a stream of NOTICE messages during <literal>COPY FROM - STDIN</>.) This worked properly in the normal blocking mode, but not - so much in non-blocking mode. We've modified <application>libpq</> + STDIN</literal>.) This worked properly in the normal blocking mode, but not + so much in non-blocking mode. We've modified <application>libpq</application> to opportunistically drain input when it can, but a full defense against this problem requires application cooperation: the application should watch for socket read-ready as well as write-ready conditions, - and be sure to call <function>PQconsumeInput()</> upon read-ready. + and be sure to call <function>PQconsumeInput()</function> upon read-ready. </para> </listitem> <listitem> <para> - Fix array handling in <application>ecpg</> (Michael Meskes) + Fix array handling in <application>ecpg</application> (Michael Meskes) </para> </listitem> <listitem> <para> - Fix <application>psql</> to sanely handle URIs and conninfo strings as - the first parameter to <command>\connect</> + Fix <application>psql</application> to sanely handle URIs and conninfo strings as + the first parameter to <command>\connect</command> (David Fetter, Andrew Dunstan, Álvaro Herrera) </para> @@ -2548,38 +2548,38 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Suppress incorrect complaints from <application>psql</> on some - platforms that it failed to write <filename>~/.psql_history</> at exit + Suppress incorrect complaints from <application>psql</application> on some + platforms that it failed to write <filename>~/.psql_history</filename> at exit (Tom Lane) </para> <para> This misbehavior was caused by a workaround for a bug in very old - (pre-2006) versions of <application>libedit</>. We fixed it by + (pre-2006) versions of <application>libedit</application>. We fixed it by removing the workaround, which will cause a similar failure to appear - for anyone still using such versions of <application>libedit</>. - Recommendation: upgrade that library, or use <application>libreadline</>. + for anyone still using such versions of <application>libedit</application>. + Recommendation: upgrade that library, or use <application>libreadline</application>. </para> </listitem> <listitem> <para> - Fix <application>pg_dump</>'s rule for deciding which casts are + Fix <application>pg_dump</application>'s rule for deciding which casts are system-provided casts that should not be dumped (Tom Lane) </para> </listitem> <listitem> <para> - In <application>pg_dump</>, fix failure to honor <literal>-Z</> - compression level option together with <literal>-Fd</> + In <application>pg_dump</application>, fix failure to honor <literal>-Z</literal> + compression level option together with <literal>-Fd</literal> (Michael Paquier) </para> </listitem> <listitem> <para> - Make <application>pg_dump</> consider foreign key relationships + Make <application>pg_dump</application> consider foreign key relationships between extension configuration tables while choosing dump order (Gilles Darold, Michael Paquier, Stephen Frost) </para> @@ -2592,14 +2592,14 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix dumping of views that are just <literal>VALUES(...)</> but have + Fix dumping of views that are just <literal>VALUES(...)</literal> but have column aliases (Tom Lane) </para> </listitem> <listitem> <para> - In <application>pg_upgrade</>, force timeline 1 in the new cluster + In <application>pg_upgrade</application>, force timeline 1 in the new cluster (Bruce Momjian) </para> @@ -2611,7 +2611,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - In <application>pg_upgrade</>, check for improperly non-connectable + In <application>pg_upgrade</application>, check for improperly non-connectable databases before proceeding (Bruce Momjian) </para> @@ -2619,28 +2619,28 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - In <application>pg_upgrade</>, quote directory paths - properly in the generated <literal>delete_old_cluster</> script + In <application>pg_upgrade</application>, quote directory paths + properly in the generated <literal>delete_old_cluster</literal> script (Bruce Momjian) </para> </listitem> <listitem> <para> - In <application>pg_upgrade</>, preserve database-level freezing info + In <application>pg_upgrade</application>, preserve database-level freezing info properly (Bruce Momjian) </para> <para> This oversight could cause missing-clog-file errors for tables within - the <literal>postgres</> and <literal>template1</> databases. + the <literal>postgres</literal> and <literal>template1</literal> databases. </para> </listitem> <listitem> <para> - Run <application>pg_upgrade</> and <application>pg_resetxlog</> with + Run <application>pg_upgrade</application> and <application>pg_resetxlog</application> with restricted privileges on Windows, so that they don't fail when run by an administrator (Muhammad Asif Naeem) </para> @@ -2648,15 +2648,15 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Improve handling of <function>readdir()</> failures when scanning - directories in <application>initdb</> and <application>pg_basebackup</> + Improve handling of <function>readdir()</function> failures when scanning + directories in <application>initdb</application> and <application>pg_basebackup</application> (Marco Nenciarini) </para> </listitem> <listitem> <para> - Fix slow sorting algorithm in <filename>contrib/intarray</> (Tom Lane) + Fix slow sorting algorithm in <filename>contrib/intarray</filename> (Tom Lane) </para> </listitem> @@ -2668,7 +2668,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Update time zone data files to <application>tzdata</> release 2015d + Update time zone data files to <application>tzdata</application> release 2015d for DST law changes in Egypt, Mongolia, and Palestine, plus historical changes in Canada and Chile. Also adopt revised zone abbreviations for the America/Adak zone (HST/HDT not HAST/HADT). @@ -2715,15 +2715,15 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix buffer overruns in <function>to_char()</> + Fix buffer overruns in <function>to_char()</function> (Bruce Momjian) </para> <para> - When <function>to_char()</> processes a numeric formatting template - calling for a large number of digits, <productname>PostgreSQL</> + When <function>to_char()</function> processes a numeric formatting template + calling for a large number of digits, <productname>PostgreSQL</productname> would read past the end of a buffer. When processing a crafted - timestamp formatting template, <productname>PostgreSQL</> would write + timestamp formatting template, <productname>PostgreSQL</productname> would write past the end of a buffer. Either case could crash the server. We have not ruled out the possibility of attacks that lead to privilege escalation, though they seem unlikely. @@ -2733,27 +2733,27 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix buffer overrun in replacement <function>*printf()</> functions + Fix buffer overrun in replacement <function>*printf()</function> functions (Tom Lane) </para> <para> - <productname>PostgreSQL</> includes a replacement implementation - of <function>printf</> and related functions. This code will overrun + <productname>PostgreSQL</productname> includes a replacement implementation + of <function>printf</function> and related functions. This code will overrun a stack buffer when formatting a floating point number (conversion - specifiers <literal>e</>, <literal>E</>, <literal>f</>, <literal>F</>, - <literal>g</> or <literal>G</>) with requested precision greater than + specifiers <literal>e</literal>, <literal>E</literal>, <literal>f</literal>, <literal>F</literal>, + <literal>g</literal> or <literal>G</literal>) with requested precision greater than about 500. This will crash the server, and we have not ruled out the possibility of attacks that lead to privilege escalation. A database user can trigger such a buffer overrun through - the <function>to_char()</> SQL function. While that is the only - affected core <productname>PostgreSQL</> functionality, extension + the <function>to_char()</function> SQL function. While that is the only + affected core <productname>PostgreSQL</productname> functionality, extension modules that use printf-family functions may be at risk as well. </para> <para> - This issue primarily affects <productname>PostgreSQL</> on Windows. - <productname>PostgreSQL</> uses the system implementation of these + This issue primarily affects <productname>PostgreSQL</productname> on Windows. + <productname>PostgreSQL</productname> uses the system implementation of these functions where adequate, which it is on other modern platforms. (CVE-2015-0242) </para> @@ -2761,12 +2761,12 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix buffer overruns in <filename>contrib/pgcrypto</> + Fix buffer overruns in <filename>contrib/pgcrypto</filename> (Marko Tiikkaja, Noah Misch) </para> <para> - Errors in memory size tracking within the <filename>pgcrypto</> + Errors in memory size tracking within the <filename>pgcrypto</filename> module permitted stack buffer overruns and improper dependence on the contents of uninitialized memory. The buffer overrun cases can crash the server, and we have not ruled out the possibility of @@ -2807,7 +2807,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> Some server error messages show the values of columns that violate a constraint, such as a unique constraint. If the user does not have - <literal>SELECT</> privilege on all columns of the table, this could + <literal>SELECT</literal> privilege on all columns of the table, this could mean exposing values that the user should not be able to see. Adjust the code so that values are displayed only when they came from the SQL command or could be selected by the user. @@ -2833,21 +2833,21 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Avoid possible data corruption if <command>ALTER DATABASE SET - TABLESPACE</> is used to move a database to a new tablespace and then + TABLESPACE</command> is used to move a database to a new tablespace and then shortly later move it back to its original tablespace (Tom Lane) </para> </listitem> <listitem> <para> - Avoid corrupting tables when <command>ANALYZE</> inside a transaction + Avoid corrupting tables when <command>ANALYZE</command> inside a transaction is rolled back (Andres Freund, Tom Lane, Michael Paquier) </para> <para> If the failing transaction had earlier removed the last index, rule, or trigger from the table, the table would be left in a corrupted state - with the relevant <structname>pg_class</> flags not set though they + with the relevant <structname>pg_class</structname> flags not set though they should be. </para> </listitem> @@ -2855,14 +2855,14 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Ensure that unlogged tables are copied correctly - during <command>CREATE DATABASE</> or <command>ALTER DATABASE SET - TABLESPACE</> (Pavan Deolasee, Andres Freund) + during <command>CREATE DATABASE</command> or <command>ALTER DATABASE SET + TABLESPACE</command> (Pavan Deolasee, Andres Freund) </para> </listitem> <listitem> <para> - Fix <command>DROP</>'s dependency searching to correctly handle the + Fix <command>DROP</command>'s dependency searching to correctly handle the case where a table column is recursively visited before its table (Petr Jelinek, Tom Lane) </para> @@ -2870,7 +2870,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> This case is only known to arise when an extension creates both a datatype and a table using that datatype. The faulty code might - refuse a <command>DROP EXTENSION</> unless <literal>CASCADE</> is + refuse a <command>DROP EXTENSION</command> unless <literal>CASCADE</literal> is specified, which should not be required. </para> </listitem> @@ -2882,22 +2882,22 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 </para> <para> - In <literal>READ COMMITTED</> mode, queries that lock or update + In <literal>READ COMMITTED</literal> mode, queries that lock or update recently-updated rows could crash as a result of this bug. </para> </listitem> <listitem> <para> - Fix planning of <command>SELECT FOR UPDATE</> when using a partial + Fix planning of <command>SELECT FOR UPDATE</command> when using a partial index on a child table (Kyotaro Horiguchi) </para> <para> - In <literal>READ COMMITTED</> mode, <command>SELECT FOR UPDATE</> must - also recheck the partial index's <literal>WHERE</> condition when + In <literal>READ COMMITTED</literal> mode, <command>SELECT FOR UPDATE</command> must + also recheck the partial index's <literal>WHERE</literal> condition when rechecking a recently-updated row to see if it still satisfies the - query's <literal>WHERE</> condition. This requirement was missed if the + query's <literal>WHERE</literal> condition. This requirement was missed if the index belonged to an inheritance child table, so that it was possible to incorrectly return rows that no longer satisfy the query condition. </para> @@ -2905,12 +2905,12 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix corner case wherein <command>SELECT FOR UPDATE</> could return a row + Fix corner case wherein <command>SELECT FOR UPDATE</command> could return a row twice, and possibly miss returning other rows (Tom Lane) </para> <para> - In <literal>READ COMMITTED</> mode, a <command>SELECT FOR UPDATE</> + In <literal>READ COMMITTED</literal> mode, a <command>SELECT FOR UPDATE</command> that is scanning an inheritance tree could incorrectly return a row from a prior child table instead of the one it should return from a later child table. @@ -2920,7 +2920,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Reject duplicate column names in the referenced-columns list of - a <literal>FOREIGN KEY</> declaration (David Rowley) + a <literal>FOREIGN KEY</literal> declaration (David Rowley) </para> <para> @@ -2932,7 +2932,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix bugs in raising a <type>numeric</> value to a large integral power + Fix bugs in raising a <type>numeric</type> value to a large integral power (Tom Lane) </para> @@ -2945,19 +2945,19 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - In <function>numeric_recv()</>, truncate away any fractional digits - that would be hidden according to the value's <literal>dscale</> field + In <function>numeric_recv()</function>, truncate away any fractional digits + that would be hidden according to the value's <literal>dscale</literal> field (Tom Lane) </para> <para> - A <type>numeric</> value's display scale (<literal>dscale</>) should + A <type>numeric</type> value's display scale (<literal>dscale</literal>) should never be less than the number of nonzero fractional digits; but apparently there's at least one broken client application that - transmits binary <type>numeric</> values in which that's true. + transmits binary <type>numeric</type> values in which that's true. This leads to strange behavior since the extra digits are taken into account by arithmetic operations even though they aren't printed. - The least risky fix seems to be to truncate away such <quote>hidden</> + The least risky fix seems to be to truncate away such <quote>hidden</quote> digits on receipt, so that the value is indeed what it prints as. </para> </listitem> @@ -2977,7 +2977,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix bugs in <type>tsquery</> <literal>@></> <type>tsquery</> + Fix bugs in <type>tsquery</type> <literal>@></literal> <type>tsquery</type> operator (Heikki Linnakangas) </para> @@ -3008,14 +3008,14 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix namespace handling in <function>xpath()</> (Ali Akbar) + Fix namespace handling in <function>xpath()</function> (Ali Akbar) </para> <para> - Previously, the <type>xml</> value resulting from - an <function>xpath()</> call would not have namespace declarations if + Previously, the <type>xml</type> value resulting from + an <function>xpath()</function> call would not have namespace declarations if the namespace declarations were attached to an ancestor element in the - input <type>xml</> value, rather than to the specific element being + input <type>xml</type> value, rather than to the specific element being returned. Propagate the ancestral declaration so that the result is correct when considered in isolation. </para> @@ -3024,7 +3024,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Fix planner problems with nested append relations, such as inherited - tables within <literal>UNION ALL</> subqueries (Tom Lane) + tables within <literal>UNION ALL</literal> subqueries (Tom Lane) </para> </listitem> @@ -3037,8 +3037,8 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Exempt tables that have per-table <varname>cost_limit</> - and/or <varname>cost_delay</> settings from autovacuum's global cost + Exempt tables that have per-table <varname>cost_limit</varname> + and/or <varname>cost_delay</varname> settings from autovacuum's global cost balancing rules (Álvaro Herrera) </para> @@ -3064,7 +3064,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 the target database, if they met the usual thresholds for autovacuuming. This is at best pretty unexpected; at worst it delays response to the wraparound threat. Fix it so that if autovacuum is - turned off, workers <emphasis>only</> do anti-wraparound vacuums and + turned off, workers <emphasis>only</emphasis> do anti-wraparound vacuums and not any other work. </para> </listitem> @@ -3097,19 +3097,19 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Fix several cases where recovery logic improperly ignored WAL records - for <literal>COMMIT/ABORT PREPARED</> (Heikki Linnakangas) + for <literal>COMMIT/ABORT PREPARED</literal> (Heikki Linnakangas) </para> <para> The most notable oversight was - that <varname>recovery_target_xid</> could not be used to stop at + that <varname>recovery_target_xid</varname> could not be used to stop at a two-phase commit. </para> </listitem> <listitem> <para> - Avoid creating unnecessary <filename>.ready</> marker files for + Avoid creating unnecessary <filename>.ready</filename> marker files for timeline history files (Fujii Masao) </para> </listitem> @@ -3117,14 +3117,14 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Fix possible null pointer dereference when an empty prepared statement - is used and the <varname>log_statement</> setting is <literal>mod</> - or <literal>ddl</> (Fujii Masao) + is used and the <varname>log_statement</varname> setting is <literal>mod</literal> + or <literal>ddl</literal> (Fujii Masao) </para> </listitem> <listitem> <para> - Change <quote>pgstat wait timeout</> warning message to be LOG level, + Change <quote>pgstat wait timeout</quote> warning message to be LOG level, and rephrase it to be more understandable (Tom Lane) </para> @@ -3133,7 +3133,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 case, but it occurs often enough on our slower buildfarm members to be a nuisance. Reduce it to LOG level, and expend a bit more effort on the wording: it now reads <quote>using stale statistics instead of - current ones because stats collector is not responding</>. + current ones because stats collector is not responding</quote>. </para> </listitem> @@ -3147,32 +3147,32 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Warn if macOS's <function>setlocale()</> starts an unwanted extra + Warn if macOS's <function>setlocale()</function> starts an unwanted extra thread inside the postmaster (Noah Misch) </para> </listitem> <listitem> <para> - Fix processing of repeated <literal>dbname</> parameters - in <function>PQconnectdbParams()</> (Alex Shulgin) + Fix processing of repeated <literal>dbname</literal> parameters + in <function>PQconnectdbParams()</function> (Alex Shulgin) </para> <para> Unexpected behavior ensued if the first occurrence - of <literal>dbname</> contained a connection string or URI to be + of <literal>dbname</literal> contained a connection string or URI to be expanded. </para> </listitem> <listitem> <para> - Ensure that <application>libpq</> reports a suitable error message on + Ensure that <application>libpq</application> reports a suitable error message on unexpected socket EOF (Marko Tiikkaja, Tom Lane) </para> <para> - Depending on kernel behavior, <application>libpq</> might return an + Depending on kernel behavior, <application>libpq</application> might return an empty error string rather than something useful when the server unexpectedly closed the socket. </para> @@ -3180,14 +3180,14 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Clear any old error message during <function>PQreset()</> + Clear any old error message during <function>PQreset()</function> (Heikki Linnakangas) </para> <para> - If <function>PQreset()</> is called repeatedly, and the connection + If <function>PQreset()</function> is called repeatedly, and the connection cannot be re-established, error messages from the failed connection - attempts kept accumulating in the <structname>PGconn</>'s error + attempts kept accumulating in the <structname>PGconn</structname>'s error string. </para> </listitem> @@ -3195,32 +3195,32 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Properly handle out-of-memory conditions while parsing connection - options in <application>libpq</> (Alex Shulgin, Heikki Linnakangas) + options in <application>libpq</application> (Alex Shulgin, Heikki Linnakangas) </para> </listitem> <listitem> <para> - Fix array overrun in <application>ecpg</>'s version - of <function>ParseDateTime()</> (Michael Paquier) + Fix array overrun in <application>ecpg</application>'s version + of <function>ParseDateTime()</function> (Michael Paquier) </para> </listitem> <listitem> <para> - In <application>initdb</>, give a clearer error message if a password + In <application>initdb</application>, give a clearer error message if a password file is specified but is empty (Mats Erik Andersson) </para> </listitem> <listitem> <para> - Fix <application>psql</>'s <command>\s</> command to work nicely with + Fix <application>psql</application>'s <command>\s</command> command to work nicely with libedit, and add pager support (Stepan Rutz, Tom Lane) </para> <para> - When using libedit rather than readline, <command>\s</> printed the + When using libedit rather than readline, <command>\s</command> printed the command history in a fairly unreadable encoded format, and on recent libedit versions might fail altogether. Fix that by printing the history ourselves rather than having the library do it. A pleasant @@ -3230,7 +3230,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> This patch also fixes a bug that caused newline encoding to be applied inconsistently when saving the command history with libedit. - Multiline history entries written by older <application>psql</> + Multiline history entries written by older <application>psql</application> versions will be read cleanly with this patch, but perhaps not vice versa, depending on the exact libedit versions involved. </para> @@ -3238,17 +3238,17 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Improve consistency of parsing of <application>psql</>'s special + Improve consistency of parsing of <application>psql</application>'s special variables (Tom Lane) </para> <para> - Allow variant spellings of <literal>on</> and <literal>off</> (such - as <literal>1</>/<literal>0</>) for <literal>ECHO_HIDDEN</> - and <literal>ON_ERROR_ROLLBACK</>. Report a warning for unrecognized - values for <literal>COMP_KEYWORD_CASE</>, <literal>ECHO</>, - <literal>ECHO_HIDDEN</>, <literal>HISTCONTROL</>, - <literal>ON_ERROR_ROLLBACK</>, and <literal>VERBOSITY</>. Recognize + Allow variant spellings of <literal>on</literal> and <literal>off</literal> (such + as <literal>1</literal>/<literal>0</literal>) for <literal>ECHO_HIDDEN</literal> + and <literal>ON_ERROR_ROLLBACK</literal>. Report a warning for unrecognized + values for <literal>COMP_KEYWORD_CASE</literal>, <literal>ECHO</literal>, + <literal>ECHO_HIDDEN</literal>, <literal>HISTCONTROL</literal>, + <literal>ON_ERROR_ROLLBACK</literal>, and <literal>VERBOSITY</literal>. Recognize all values for all these variables case-insensitively; previously there was a mishmash of case-sensitive and case-insensitive behaviors. </para> @@ -3256,16 +3256,16 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix <application>psql</>'s expanded-mode display to work - consistently when using <literal>border</> = 3 - and <literal>linestyle</> = <literal>ascii</> or <literal>unicode</> + Fix <application>psql</application>'s expanded-mode display to work + consistently when using <literal>border</literal> = 3 + and <literal>linestyle</literal> = <literal>ascii</literal> or <literal>unicode</literal> (Stephen Frost) </para> </listitem> <listitem> <para> - Improve performance of <application>pg_dump</> when the database + Improve performance of <application>pg_dump</application> when the database contains many instances of multiple dependency paths between the same two objects (Tom Lane) </para> @@ -3280,21 +3280,21 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix core dump in <literal>pg_dump --binary-upgrade</> on zero-column + Fix core dump in <literal>pg_dump --binary-upgrade</literal> on zero-column composite type (Rushabh Lathia) </para> </listitem> <listitem> <para> - Prevent WAL files created by <literal>pg_basebackup -x/-X</> from + Prevent WAL files created by <literal>pg_basebackup -x/-X</literal> from being archived again when the standby is promoted (Andres Freund) </para> </listitem> <listitem> <para> - Fix upgrade-from-unpackaged script for <filename>contrib/citext</> + Fix upgrade-from-unpackaged script for <filename>contrib/citext</filename> (Tom Lane) </para> </listitem> @@ -3302,7 +3302,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Fix block number checking - in <filename>contrib/pageinspect</>'s <function>get_raw_page()</> + in <filename>contrib/pageinspect</filename>'s <function>get_raw_page()</function> (Tom Lane) </para> @@ -3314,7 +3314,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix <filename>contrib/pgcrypto</>'s <function>pgp_sym_decrypt()</> + Fix <filename>contrib/pgcrypto</filename>'s <function>pgp_sym_decrypt()</function> to not fail on messages whose length is 6 less than a power of 2 (Marko Tiikkaja) </para> @@ -3322,7 +3322,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix file descriptor leak in <filename>contrib/pg_test_fsync</> + Fix file descriptor leak in <filename>contrib/pg_test_fsync</filename> (Jeff Janes) </para> @@ -3334,24 +3334,24 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Handle unexpected query results, especially NULLs, safely in - <filename>contrib/tablefunc</>'s <function>connectby()</> + <filename>contrib/tablefunc</filename>'s <function>connectby()</function> (Michael Paquier) </para> <para> - <function>connectby()</> previously crashed if it encountered a NULL + <function>connectby()</function> previously crashed if it encountered a NULL key value. It now prints that row but doesn't recurse further. </para> </listitem> <listitem> <para> - Avoid a possible crash in <filename>contrib/xml2</>'s - <function>xslt_process()</> (Mark Simonetti) + Avoid a possible crash in <filename>contrib/xml2</filename>'s + <function>xslt_process()</function> (Mark Simonetti) </para> <para> - <application>libxslt</> seems to have an undocumented dependency on + <application>libxslt</application> seems to have an undocumented dependency on the order in which resources are freed; reorder our calls to avoid a crash. </para> @@ -3359,7 +3359,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Mark some <filename>contrib</> I/O functions with correct volatility + Mark some <filename>contrib</filename> I/O functions with correct volatility properties (Tom Lane) </para> @@ -3393,29 +3393,29 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> With OpenLDAP versions 2.4.24 through 2.4.31, - inclusive, <productname>PostgreSQL</> backends can crash at exit. - Raise a warning during <application>configure</> based on the + inclusive, <productname>PostgreSQL</productname> backends can crash at exit. + Raise a warning during <application>configure</application> based on the compile-time OpenLDAP version number, and test the crashing scenario - in the <filename>contrib/dblink</> regression test. + in the <filename>contrib/dblink</filename> regression test. </para> </listitem> <listitem> <para> - In non-MSVC Windows builds, ensure <filename>libpq.dll</> is installed + In non-MSVC Windows builds, ensure <filename>libpq.dll</filename> is installed with execute permissions (Noah Misch) </para> </listitem> <listitem> <para> - Make <application>pg_regress</> remove any temporary installation it + Make <application>pg_regress</application> remove any temporary installation it created upon successful exit (Tom Lane) </para> <para> This results in a very substantial reduction in disk space usage - during <literal>make check-world</>, since that sequence involves + during <literal>make check-world</literal>, since that sequence involves creation of numerous temporary installations. </para> </listitem> @@ -3427,15 +3427,15 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 </para> <para> - Previously, <productname>PostgreSQL</> assumed that the UTC offset - associated with a time zone abbreviation (such as <literal>EST</>) + Previously, <productname>PostgreSQL</productname> assumed that the UTC offset + associated with a time zone abbreviation (such as <literal>EST</literal>) never changes in the usage of any particular locale. However this assumption fails in the real world, so introduce the ability for a zone abbreviation to represent a UTC offset that sometimes changes. Update the zone abbreviation definition files to make use of this feature in timezone locales that have changed the UTC offset of their abbreviations since 1970 (according to the IANA timezone database). - In such timezones, <productname>PostgreSQL</> will now associate the + In such timezones, <productname>PostgreSQL</productname> will now associate the correct UTC offset with the abbreviation depending on the given date. </para> </listitem> @@ -3447,9 +3447,9 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> Add CST (China Standard Time) to our lists. - Remove references to ADT as <quote>Arabia Daylight Time</>, an + Remove references to ADT as <quote>Arabia Daylight Time</quote>, an abbreviation that's been out of use since 2007; therefore, claiming - there is a conflict with <quote>Atlantic Daylight Time</> doesn't seem + there is a conflict with <quote>Atlantic Daylight Time</quote> doesn't seem especially helpful. Fix entirely incorrect GMT offsets for CKT (Cook Islands), FJT, and FJST (Fiji); we didn't even have them on the proper side of the date line. @@ -3458,21 +3458,21 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Update time zone data files to <application>tzdata</> release 2015a. + Update time zone data files to <application>tzdata</application> release 2015a. </para> <para> The IANA timezone database has adopted abbreviations of the form - <literal>A<replaceable>x</>ST</literal>/<literal>A<replaceable>x</>DT</literal> + <literal>A<replaceable>x</replaceable>ST</literal>/<literal>A<replaceable>x</replaceable>DT</literal> for all Australian time zones, reflecting what they believe to be current majority practice Down Under. These names do not conflict with usage elsewhere (other than ACST for Acre Summer Time, which has been in disuse since 1994). Accordingly, adopt these names into - our <quote>Default</> timezone abbreviation set. - The <quote>Australia</> abbreviation set now contains only CST, EAST, + our <quote>Default</quote> timezone abbreviation set. + The <quote>Australia</quote> abbreviation set now contains only CST, EAST, EST, SAST, SAT, and WST, all of which are thought to be mostly historical usage. Note that SAST has also been changed to be South - Africa Standard Time in the <quote>Default</> abbreviation set. + Africa Standard Time in the <quote>Default</quote> abbreviation set. </para> <para> @@ -3531,15 +3531,15 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Correctly initialize padding bytes in <filename>contrib/btree_gist</> - indexes on <type>bit</> columns (Heikki Linnakangas) + Correctly initialize padding bytes in <filename>contrib/btree_gist</filename> + indexes on <type>bit</type> columns (Heikki Linnakangas) </para> <para> This error could result in incorrect query results due to values that should compare equal not being seen as equal. - Users with GiST indexes on <type>bit</> or <type>bit varying</> - columns should <command>REINDEX</> those indexes after installing this + Users with GiST indexes on <type>bit</type> or <type>bit varying</type> + columns should <command>REINDEX</command> those indexes after installing this update. </para> </listitem> @@ -3578,14 +3578,14 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Fix possibly-incorrect cache invalidation during nested calls - to <function>ReceiveSharedInvalidMessages</> (Andres Freund) + to <function>ReceiveSharedInvalidMessages</function> (Andres Freund) </para> </listitem> <listitem> <para> - Fix <quote>could not find pathkey item to sort</> planner failures - with <literal>UNION ALL</> over subqueries reading from tables with + Fix <quote>could not find pathkey item to sort</quote> planner failures + with <literal>UNION ALL</literal> over subqueries reading from tables with inheritance children (Tom Lane) </para> </listitem> @@ -3613,13 +3613,13 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 This corrects cases where TOAST pointers could be copied into other tables without being dereferenced. If the original data is later deleted, it would lead to errors like <quote>missing chunk number 0 - for toast value ...</> when the now-dangling pointer is used. + for toast value ...</quote> when the now-dangling pointer is used. </para> </listitem> <listitem> <para> - Fix <quote>record type has not been registered</> failures with + Fix <quote>record type has not been registered</quote> failures with whole-row references to the output of Append plan nodes (Tom Lane) </para> </listitem> @@ -3634,7 +3634,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Fix query-lifespan memory leak while evaluating the arguments for a - function in <literal>FROM</> (Tom Lane) + function in <literal>FROM</literal> (Tom Lane) </para> </listitem> @@ -3647,7 +3647,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix data encoding error in <filename>hungarian.stop</> (Tom Lane) + Fix data encoding error in <filename>hungarian.stop</filename> (Tom Lane) </para> </listitem> @@ -3668,19 +3668,19 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> This could cause problems (at least spurious warnings, and at worst an - infinite loop) if <command>CREATE INDEX</> or <command>CLUSTER</> were + infinite loop) if <command>CREATE INDEX</command> or <command>CLUSTER</command> were done later in the same transaction. </para> </listitem> <listitem> <para> - Clear <structname>pg_stat_activity</>.<structfield>xact_start</> - during <command>PREPARE TRANSACTION</> (Andres Freund) + Clear <structname>pg_stat_activity</structname>.<structfield>xact_start</structfield> + during <command>PREPARE TRANSACTION</command> (Andres Freund) </para> <para> - After the <command>PREPARE</>, the originating session is no longer in + After the <command>PREPARE</command>, the originating session is no longer in a transaction, so it should not continue to display a transaction start time. </para> @@ -3688,7 +3688,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix <command>REASSIGN OWNED</> to not fail for text search objects + Fix <command>REASSIGN OWNED</command> to not fail for text search objects (Álvaro Herrera) </para> </listitem> @@ -3700,14 +3700,14 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> This ensures that the postmaster will properly clean up after itself - if, for example, it receives <systemitem>SIGINT</> while still + if, for example, it receives <systemitem>SIGINT</systemitem> while still starting up. </para> </listitem> <listitem> <para> - Fix client host name lookup when processing <filename>pg_hba.conf</> + Fix client host name lookup when processing <filename>pg_hba.conf</filename> entries that specify host names instead of IP addresses (Tom Lane) </para> @@ -3722,7 +3722,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Secure Unix-domain sockets of temporary postmasters started during - <literal>make check</> (Noah Misch) + <literal>make check</literal> (Noah Misch) </para> <para> @@ -3731,16 +3731,16 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 the operating-system user running the test, as we previously noted in CVE-2014-0067. This change defends against that risk by placing the server's socket in a temporary, mode 0700 subdirectory - of <filename>/tmp</>. The hazard remains however on platforms where + of <filename>/tmp</filename>. The hazard remains however on platforms where Unix sockets are not supported, notably Windows, because then the temporary postmaster must accept local TCP connections. </para> <para> A useful side effect of this change is to simplify - <literal>make check</> testing in builds that - override <literal>DEFAULT_PGSOCKET_DIR</>. Popular non-default values - like <filename>/var/run/postgresql</> are often not writable by the + <literal>make check</literal> testing in builds that + override <literal>DEFAULT_PGSOCKET_DIR</literal>. Popular non-default values + like <filename>/var/run/postgresql</filename> are often not writable by the build user, requiring workarounds that will no longer be necessary. </para> </listitem> @@ -3776,15 +3776,15 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 </para> <para> - This oversight could cause <application>initdb</> - and <application>pg_upgrade</> to fail on Windows, if the installation - path contained both spaces and <literal>@</> signs. + This oversight could cause <application>initdb</application> + and <application>pg_upgrade</application> to fail on Windows, if the installation + path contained both spaces and <literal>@</literal> signs. </para> </listitem> <listitem> <para> - Fix linking of <application>libpython</> on macOS (Tom Lane) + Fix linking of <application>libpython</application> on macOS (Tom Lane) </para> <para> @@ -3795,17 +3795,17 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Avoid buffer bloat in <application>libpq</> when the server + Avoid buffer bloat in <application>libpq</application> when the server consistently sends data faster than the client can absorb it (Shin-ichi Morita, Tom Lane) </para> <para> - <application>libpq</> could be coerced into enlarging its input buffer + <application>libpq</application> could be coerced into enlarging its input buffer until it runs out of memory (which would be reported misleadingly - as <quote>lost synchronization with server</>). Under ordinary + as <quote>lost synchronization with server</quote>). Under ordinary circumstances it's quite far-fetched that data could be continuously - transmitted more quickly than the <function>recv()</> loop can + transmitted more quickly than the <function>recv()</function> loop can absorb it, but this has been observed when the client is artificially slowed by scheduler constraints. </para> @@ -3813,15 +3813,15 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Ensure that LDAP lookup attempts in <application>libpq</> time out as + Ensure that LDAP lookup attempts in <application>libpq</application> time out as intended (Laurenz Albe) </para> </listitem> <listitem> <para> - Fix <application>ecpg</> to do the right thing when an array - of <type>char *</> is the target for a FETCH statement returning more + Fix <application>ecpg</application> to do the right thing when an array + of <type>char *</type> is the target for a FETCH statement returning more than one row, as well as some other array-handling fixes (Ashutosh Bapat) </para> @@ -3829,20 +3829,20 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix <application>pg_restore</>'s processing of old-style large object + Fix <application>pg_restore</application>'s processing of old-style large object comments (Tom Lane) </para> <para> A direct-to-database restore from an archive file generated by a - pre-9.0 version of <application>pg_dump</> would usually fail if the + pre-9.0 version of <application>pg_dump</application> would usually fail if the archive contained more than a few comments for large objects. </para> </listitem> <listitem> <para> - In <filename>contrib/pgcrypto</> functions, ensure sensitive + In <filename>contrib/pgcrypto</filename> functions, ensure sensitive information is cleared from stack variables before returning (Marko Kreen) </para> @@ -3850,20 +3850,20 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - In <filename>contrib/uuid-ossp</>, cache the state of the OSSP UUID + In <filename>contrib/uuid-ossp</filename>, cache the state of the OSSP UUID library across calls (Tom Lane) </para> <para> This improves the efficiency of UUID generation and reduces the amount - of entropy drawn from <filename>/dev/urandom</>, on platforms that + of entropy drawn from <filename>/dev/urandom</filename>, on platforms that have that. </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2014e + Update time zone data files to <application>tzdata</application> release 2014e for DST law changes in Crimea, Egypt, and Morocco. </para> </listitem> @@ -3923,7 +3923,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Avoid race condition in checking transaction commit status during - receipt of a <command>NOTIFY</> message (Marko Tiikkaja) + receipt of a <command>NOTIFY</command> message (Marko Tiikkaja) </para> <para> @@ -3947,7 +3947,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Remove incorrect code that tried to allow <literal>OVERLAPS</> with + Remove incorrect code that tried to allow <literal>OVERLAPS</literal> with single-element row arguments (Joshua Yanovski) </para> @@ -3960,17 +3960,17 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Avoid getting more than <literal>AccessShareLock</> when de-parsing a + Avoid getting more than <literal>AccessShareLock</literal> when de-parsing a rule or view (Dean Rasheed) </para> <para> - This oversight resulted in <application>pg_dump</> unexpectedly - acquiring <literal>RowExclusiveLock</> locks on tables mentioned as - the targets of <literal>INSERT</>/<literal>UPDATE</>/<literal>DELETE</> + This oversight resulted in <application>pg_dump</application> unexpectedly + acquiring <literal>RowExclusiveLock</literal> locks on tables mentioned as + the targets of <literal>INSERT</literal>/<literal>UPDATE</literal>/<literal>DELETE</literal> commands in rules. While usually harmless, that could interfere with concurrent transactions that tried to acquire, for example, - <literal>ShareLock</> on those tables. + <literal>ShareLock</literal> on those tables. </para> </listitem> @@ -3989,8 +3989,8 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix <application>walsender</>'s failure to shut down cleanly when client - is <application>pg_receivexlog</> (Fujii Masao) + Fix <application>walsender</application>'s failure to shut down cleanly when client + is <application>pg_receivexlog</application> (Fujii Masao) </para> </listitem> @@ -4003,13 +4003,13 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Prevent interrupts while reporting non-<literal>ERROR</> messages + Prevent interrupts while reporting non-<literal>ERROR</literal> messages (Tom Lane) </para> <para> This guards against rare server-process freezeups due to recursive - entry to <function>syslog()</>, and perhaps other related problems. + entry to <function>syslog()</function>, and perhaps other related problems. </para> </listitem> @@ -4022,14 +4022,14 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Prevent intermittent <quote>could not reserve shared memory region</> + Prevent intermittent <quote>could not reserve shared memory region</quote> failures on recent Windows versions (MauMau) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2014a + Update time zone data files to <application>tzdata</application> release 2014a for DST law changes in Fiji and Turkey, plus historical changes in Israel and Ukraine. </para> @@ -4075,19 +4075,19 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Shore up <literal>GRANT ... WITH ADMIN OPTION</> restrictions + Shore up <literal>GRANT ... WITH ADMIN OPTION</literal> restrictions (Noah Misch) </para> <para> - Granting a role without <literal>ADMIN OPTION</> is supposed to + Granting a role without <literal>ADMIN OPTION</literal> is supposed to prevent the grantee from adding or removing members from the granted role, but this restriction was easily bypassed by doing <literal>SET - ROLE</> first. The security impact is mostly that a role member can + ROLE</literal> first. The security impact is mostly that a role member can revoke the access of others, contrary to the wishes of his grantor. Unapproved role member additions are a lesser concern, since an uncooperative role member could provide most of his rights to others - anyway by creating views or <literal>SECURITY DEFINER</> functions. + anyway by creating views or <literal>SECURITY DEFINER</literal> functions. (CVE-2014-0060) </para> </listitem> @@ -4100,7 +4100,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> The primary role of PL validator functions is to be called implicitly - during <command>CREATE FUNCTION</>, but they are also normal SQL + during <command>CREATE FUNCTION</command>, but they are also normal SQL functions that a user can call explicitly. Calling a validator on a function actually written in some other language was not checked for and could be exploited for privilege-escalation purposes. @@ -4120,7 +4120,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> If the name lookups come to different conclusions due to concurrent activity, we might perform some parts of the DDL on a different table - than other parts. At least in the case of <command>CREATE INDEX</>, + than other parts. At least in the case of <command>CREATE INDEX</command>, this can be used to cause the permissions checks to be performed against a different table than the index creation, allowing for a privilege escalation attack. @@ -4134,12 +4134,12 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 </para> <para> - The <literal>MAXDATELEN</> constant was too small for the longest - possible value of type <type>interval</>, allowing a buffer overrun - in <function>interval_out()</>. Although the datetime input + The <literal>MAXDATELEN</literal> constant was too small for the longest + possible value of type <type>interval</type>, allowing a buffer overrun + in <function>interval_out()</function>. Although the datetime input functions were more careful about avoiding buffer overrun, the limit was short enough to cause them to reject some valid inputs, such as - input containing a very long timezone name. The <application>ecpg</> + input containing a very long timezone name. The <application>ecpg</application> library contained these vulnerabilities along with some of its own. (CVE-2014-0063) </para> @@ -4166,7 +4166,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 </para> <para> - Use <function>strlcpy()</> and related functions to provide a clear + Use <function>strlcpy()</function> and related functions to provide a clear guarantee that fixed-size buffers are not overrun. Unlike the preceding items, it is unclear whether these cases really represent live issues, since in most cases there appear to be previous @@ -4178,35 +4178,35 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Avoid crashing if <function>crypt()</> returns NULL (Honza Horak, + Avoid crashing if <function>crypt()</function> returns NULL (Honza Horak, Bruce Momjian) </para> <para> - There are relatively few scenarios in which <function>crypt()</> - could return NULL, but <filename>contrib/chkpass</> would crash + There are relatively few scenarios in which <function>crypt()</function> + could return NULL, but <filename>contrib/chkpass</filename> would crash if it did. One practical case in which this could be an issue is - if <application>libc</> is configured to refuse to execute unapproved - hashing algorithms (e.g., <quote>FIPS mode</>). + if <application>libc</application> is configured to refuse to execute unapproved + hashing algorithms (e.g., <quote>FIPS mode</quote>). (CVE-2014-0066) </para> </listitem> <listitem> <para> - Document risks of <literal>make check</> in the regression testing + Document risks of <literal>make check</literal> in the regression testing instructions (Noah Misch, Tom Lane) </para> <para> - Since the temporary server started by <literal>make check</> - uses <quote>trust</> authentication, another user on the same machine + Since the temporary server started by <literal>make check</literal> + uses <quote>trust</quote> authentication, another user on the same machine could connect to it as database superuser, and then potentially exploit the privileges of the operating-system user who started the tests. A future release will probably incorporate changes in the testing procedure to prevent this risk, but some public discussion is needed first. So for the moment, just warn people against using - <literal>make check</> when there are untrusted users on the + <literal>make check</literal> when there are untrusted users on the same machine. (CVE-2014-0067) </para> @@ -4221,7 +4221,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> The WAL update could be applied to the wrong page, potentially many pages past where it should have been. Aside from corrupting data, - this error has been observed to result in significant <quote>bloat</> + this error has been observed to result in significant <quote>bloat</quote> of standby servers compared to their masters, due to updates being applied far beyond where the end-of-file should have been. This failure mode does not appear to be a significant risk during crash @@ -4241,20 +4241,20 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 was already consistent at the start of replay, thus possibly allowing hot-standby queries before the database was really consistent. Other symptoms such as <quote>PANIC: WAL contains references to invalid - pages</> were also possible. + pages</quote> were also possible. </para> </listitem> <listitem> <para> Fix improper locking of btree index pages while replaying - a <literal>VACUUM</> operation in hot-standby mode (Andres Freund, + a <literal>VACUUM</literal> operation in hot-standby mode (Andres Freund, Heikki Linnakangas, Tom Lane) </para> <para> This error could result in <quote>PANIC: WAL contains references to - invalid pages</> failures. + invalid pages</quote> failures. </para> </listitem> @@ -4272,8 +4272,8 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - When <literal>pause_at_recovery_target</> - and <literal>recovery_target_inclusive</> are both set, ensure the + When <literal>pause_at_recovery_target</literal> + and <literal>recovery_target_inclusive</literal> are both set, ensure the target record is applied before pausing, not after (Heikki Linnakangas) </para> @@ -4286,7 +4286,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> Ensure that signal handlers don't attempt to use the - process's <varname>MyProc</> pointer after it's no longer valid. + process's <varname>MyProc</varname> pointer after it's no longer valid. </para> </listitem> @@ -4299,19 +4299,19 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix unsafe references to <varname>errno</> within error reporting + Fix unsafe references to <varname>errno</varname> within error reporting logic (Christian Kruse) </para> <para> This would typically lead to odd behaviors such as missing or - inappropriate <literal>HINT</> fields. + inappropriate <literal>HINT</literal> fields. </para> </listitem> <listitem> <para> - Fix possible crashes from using <function>ereport()</> too early + Fix possible crashes from using <function>ereport()</function> too early during server startup (Tom Lane) </para> @@ -4335,7 +4335,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix length checking for Unicode identifiers (<literal>U&"..."</> + Fix length checking for Unicode identifiers (<literal>U&"..."</literal> syntax) containing escapes (Tom Lane) </para> @@ -4355,7 +4355,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> A previous patch allowed such keywords to be used without quoting in places such as role identifiers; but it missed cases where a - list of role identifiers was permitted, such as <literal>DROP ROLE</>. + list of role identifiers was permitted, such as <literal>DROP ROLE</literal>. </para> </listitem> @@ -4369,19 +4369,19 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Fix possible crash due to invalid plan for nested sub-selects, such - as <literal>WHERE (... x IN (SELECT ...) ...) IN (SELECT ...)</> + as <literal>WHERE (... x IN (SELECT ...) ...) IN (SELECT ...)</literal> (Tom Lane) </para> </listitem> <listitem> <para> - Ensure that <command>ANALYZE</> creates statistics for a table column - even when all the values in it are <quote>too wide</> (Tom Lane) + Ensure that <command>ANALYZE</command> creates statistics for a table column + even when all the values in it are <quote>too wide</quote> (Tom Lane) </para> <para> - <command>ANALYZE</> intentionally omits very wide values from its + <command>ANALYZE</command> intentionally omits very wide values from its histogram and most-common-values calculations, but it neglected to do something sane in the case that all the sampled entries are too wide. </para> @@ -4389,21 +4389,21 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - In <literal>ALTER TABLE ... SET TABLESPACE</>, allow the database's + In <literal>ALTER TABLE ... SET TABLESPACE</literal>, allow the database's default tablespace to be used without a permissions check (Stephen Frost) </para> <para> - <literal>CREATE TABLE</> has always allowed such usage, - but <literal>ALTER TABLE</> didn't get the memo. + <literal>CREATE TABLE</literal> has always allowed such usage, + but <literal>ALTER TABLE</literal> didn't get the memo. </para> </listitem> <listitem> <para> - Fix <quote>cannot accept a set</> error when some arms of - a <literal>CASE</> return a set and others don't (Tom Lane) + Fix <quote>cannot accept a set</quote> error when some arms of + a <literal>CASE</literal> return a set and others don't (Tom Lane) </para> </listitem> @@ -4428,12 +4428,12 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix possible misbehavior in <function>plainto_tsquery()</> + Fix possible misbehavior in <function>plainto_tsquery()</function> (Heikki Linnakangas) </para> <para> - Use <function>memmove()</> not <function>memcpy()</> for copying + Use <function>memmove()</function> not <function>memcpy()</function> for copying overlapping memory regions. There have been no field reports of this actually causing trouble, but it's certainly risky. </para> @@ -4441,8 +4441,8 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix placement of permissions checks in <function>pg_start_backup()</> - and <function>pg_stop_backup()</> (Andres Freund, Magnus Hagander) + Fix placement of permissions checks in <function>pg_start_backup()</function> + and <function>pg_stop_backup()</function> (Andres Freund, Magnus Hagander) </para> <para> @@ -4453,31 +4453,31 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Accept <literal>SHIFT_JIS</> as an encoding name for locale checking + Accept <literal>SHIFT_JIS</literal> as an encoding name for locale checking purposes (Tatsuo Ishii) </para> </listitem> <listitem> <para> - Fix misbehavior of <function>PQhost()</> on Windows (Fujii Masao) + Fix misbehavior of <function>PQhost()</function> on Windows (Fujii Masao) </para> <para> - It should return <literal>localhost</> if no host has been specified. + It should return <literal>localhost</literal> if no host has been specified. </para> </listitem> <listitem> <para> - Improve error handling in <application>libpq</> and <application>psql</> - for failures during <literal>COPY TO STDOUT/FROM STDIN</> (Tom Lane) + Improve error handling in <application>libpq</application> and <application>psql</application> + for failures during <literal>COPY TO STDOUT/FROM STDIN</literal> (Tom Lane) </para> <para> In particular this fixes an infinite loop that could occur in 9.2 and up if the server connection was lost during <literal>COPY FROM - STDIN</>. Variants of that scenario might be possible in older + STDIN</literal>. Variants of that scenario might be possible in older versions, or with other client applications. </para> </listitem> @@ -4485,7 +4485,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Fix possible incorrect printing of filenames - in <application>pg_basebackup</>'s verbose mode (Magnus Hagander) + in <application>pg_basebackup</application>'s verbose mode (Magnus Hagander) </para> </listitem> @@ -4498,20 +4498,20 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix misaligned descriptors in <application>ecpg</> (MauMau) + Fix misaligned descriptors in <application>ecpg</application> (MauMau) </para> </listitem> <listitem> <para> - In <application>ecpg</>, handle lack of a hostname in the connection + In <application>ecpg</application>, handle lack of a hostname in the connection parameters properly (Michael Meskes) </para> </listitem> <listitem> <para> - Fix performance regression in <filename>contrib/dblink</> connection + Fix performance regression in <filename>contrib/dblink</filename> connection startup (Joe Conway) </para> @@ -4522,7 +4522,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - In <filename>contrib/isn</>, fix incorrect calculation of the check + In <filename>contrib/isn</filename>, fix incorrect calculation of the check digit for ISMN values (Fabien Coelho) </para> </listitem> @@ -4536,28 +4536,28 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - In Mingw and Cygwin builds, install the <application>libpq</> DLL - in the <filename>bin</> directory (Andrew Dunstan) + In Mingw and Cygwin builds, install the <application>libpq</application> DLL + in the <filename>bin</filename> directory (Andrew Dunstan) </para> <para> This duplicates what the MSVC build has long done. It should fix - problems with programs like <application>psql</> failing to start + problems with programs like <application>psql</application> failing to start because they can't find the DLL. </para> </listitem> <listitem> <para> - Avoid using the deprecated <literal>dllwrap</> tool in Cygwin builds + Avoid using the deprecated <literal>dllwrap</literal> tool in Cygwin builds (Marco Atzeri) </para> </listitem> <listitem> <para> - Don't generate plain-text <filename>HISTORY</> - and <filename>src/test/regress/README</> files anymore (Tom Lane) + Don't generate plain-text <filename>HISTORY</filename> + and <filename>src/test/regress/README</filename> files anymore (Tom Lane) </para> <para> @@ -4566,20 +4566,20 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 the likely audience for plain-text format. Distribution tarballs will still contain files by these names, but they'll just be stubs directing the reader to consult the main documentation. - The plain-text <filename>INSTALL</> file will still be maintained, as + The plain-text <filename>INSTALL</filename> file will still be maintained, as there is arguably a use-case for that. </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2013i + Update time zone data files to <application>tzdata</application> release 2013i for DST law changes in Jordan and historical changes in Cuba. </para> <para> - In addition, the zones <literal>Asia/Riyadh87</>, - <literal>Asia/Riyadh88</>, and <literal>Asia/Riyadh89</> have been + In addition, the zones <literal>Asia/Riyadh87</literal>, + <literal>Asia/Riyadh88</literal>, and <literal>Asia/Riyadh89</literal> have been removed, as they are no longer maintained by IANA, and never represented actual civil timekeeping practice. </para> @@ -4631,13 +4631,13 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix <command>VACUUM</>'s tests to see whether it can - update <structfield>relfrozenxid</> (Andres Freund) + Fix <command>VACUUM</command>'s tests to see whether it can + update <structfield>relfrozenxid</structfield> (Andres Freund) </para> <para> - In some cases <command>VACUUM</> (either manual or autovacuum) could - incorrectly advance a table's <structfield>relfrozenxid</> value, + In some cases <command>VACUUM</command> (either manual or autovacuum) could + incorrectly advance a table's <structfield>relfrozenxid</structfield> value, allowing tuples to escape freezing, causing those rows to become invisible once 2^31 transactions have elapsed. The probability of data loss is fairly low since multiple incorrect advancements would @@ -4649,18 +4649,18 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> The issue can be ameliorated by, after upgrading, vacuuming all tables in all databases while having <link - linkend="guc-vacuum-freeze-table-age"><varname>vacuum_freeze_table_age</></link> + linkend="guc-vacuum-freeze-table-age"><varname>vacuum_freeze_table_age</varname></link> set to zero. This will fix any latent corruption but will not be able to fix all pre-existing data errors. However, an installation can be presumed safe after performing this vacuuming if it has executed fewer than 2^31 update transactions in its lifetime (check this with - <literal>SELECT txid_current() < 2^31</>). + <literal>SELECT txid_current() < 2^31</literal>). </para> </listitem> <listitem> <para> - Fix initialization of <filename>pg_clog</> and <filename>pg_subtrans</> + Fix initialization of <filename>pg_clog</filename> and <filename>pg_subtrans</filename> during hot standby startup (Andres Freund, Heikki Linnakangas) </para> @@ -4686,7 +4686,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Truncate <filename>pg_multixact</> contents during WAL replay + Truncate <filename>pg_multixact</filename> contents during WAL replay (Andres Freund) </para> @@ -4708,8 +4708,8 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Avoid flattening a subquery whose <literal>SELECT</> list contains a - volatile function wrapped inside a sub-<literal>SELECT</> (Tom Lane) + Avoid flattening a subquery whose <literal>SELECT</literal> list contains a + volatile function wrapped inside a sub-<literal>SELECT</literal> (Tom Lane) </para> <para> @@ -4726,7 +4726,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> This error could lead to incorrect plans for queries involving - multiple levels of subqueries within <literal>JOIN</> syntax. + multiple levels of subqueries within <literal>JOIN</literal> syntax. </para> </listitem> @@ -4756,13 +4756,13 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix array slicing of <type>int2vector</> and <type>oidvector</> values + Fix array slicing of <type>int2vector</type> and <type>oidvector</type> values (Tom Lane) </para> <para> Expressions of this kind are now implicitly promoted to - regular <type>int2</> or <type>oid</> arrays. + regular <type>int2</type> or <type>oid</type> arrays. </para> </listitem> @@ -4776,7 +4776,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 In some cases, the system would use the simple GMT offset value when it should have used the regular timezone setting that had prevailed before the simple offset was selected. This change also causes - the <function>timeofday</> function to honor the simple GMT offset + the <function>timeofday</function> function to honor the simple GMT offset zone. </para> </listitem> @@ -4790,7 +4790,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Properly quote generated command lines in <application>pg_ctl</> + Properly quote generated command lines in <application>pg_ctl</application> (Naoya Anzai and Tom Lane) </para> @@ -4801,10 +4801,10 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix <application>pg_dumpall</> to work when a source database + Fix <application>pg_dumpall</application> to work when a source database sets <link - linkend="guc-default-transaction-read-only"><varname>default_transaction_read_only</></link> - via <command>ALTER DATABASE SET</> (Kevin Grittner) + linkend="guc-default-transaction-read-only"><varname>default_transaction_read_only</varname></link> + via <command>ALTER DATABASE SET</command> (Kevin Grittner) </para> <para> @@ -4814,28 +4814,28 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Make <application>ecpg</> search for quoted cursor names + Make <application>ecpg</application> search for quoted cursor names case-sensitively (Zoltán Böszörményi) </para> </listitem> <listitem> <para> - Fix <application>ecpg</>'s processing of lists of variables - declared <type>varchar</> (Zoltán Böszörményi) + Fix <application>ecpg</application>'s processing of lists of variables + declared <type>varchar</type> (Zoltán Böszörményi) </para> </listitem> <listitem> <para> - Make <filename>contrib/lo</> defend against incorrect trigger definitions + Make <filename>contrib/lo</filename> defend against incorrect trigger definitions (Marc Cousin) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2013h + Update time zone data files to <application>tzdata</application> release 2013h for DST law changes in Argentina, Brazil, Jordan, Libya, Liechtenstein, Morocco, and Palestine. Also, new timezone abbreviations WIB, WIT, WITA for Indonesia. @@ -4887,7 +4887,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 </para> <para> - <productname>PostgreSQL</> case-folds non-ASCII characters only + <productname>PostgreSQL</productname> case-folds non-ASCII characters only when using a single-byte server encoding. </para> </listitem> @@ -4895,7 +4895,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Fix checkpoint memory leak in background writer when <literal>wal_level = - hot_standby</> (Naoya Anzai) + hot_standby</literal> (Naoya Anzai) </para> </listitem> @@ -4908,7 +4908,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix memory overcommit bug when <varname>work_mem</> is using more + Fix memory overcommit bug when <varname>work_mem</varname> is using more than 24GB of memory (Stephen Frost) </para> </listitem> @@ -4939,46 +4939,46 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 </para> <para> - Previously tests like <literal>col IS NOT TRUE</> and <literal>col IS - NOT FALSE</> did not properly factor in NULL values when estimating + Previously tests like <literal>col IS NOT TRUE</literal> and <literal>col IS + NOT FALSE</literal> did not properly factor in NULL values when estimating plan costs. </para> </listitem> <listitem> <para> - Prevent pushing down <literal>WHERE</> clauses into unsafe - <literal>UNION/INTERSECT</> subqueries (Tom Lane) + Prevent pushing down <literal>WHERE</literal> clauses into unsafe + <literal>UNION/INTERSECT</literal> subqueries (Tom Lane) </para> <para> - Subqueries of a <literal>UNION</> or <literal>INTERSECT</> that + Subqueries of a <literal>UNION</literal> or <literal>INTERSECT</literal> that contain set-returning functions or volatile functions in their - <literal>SELECT</> lists could be improperly optimized, leading to + <literal>SELECT</literal> lists could be improperly optimized, leading to run-time errors or incorrect query results. </para> </listitem> <listitem> <para> - Fix rare case of <quote>failed to locate grouping columns</> + Fix rare case of <quote>failed to locate grouping columns</quote> planner failure (Tom Lane) </para> </listitem> <listitem> <para> - Fix <application>pg_dump</> of foreign tables with dropped columns (Andrew Dunstan) + Fix <application>pg_dump</application> of foreign tables with dropped columns (Andrew Dunstan) </para> <para> - Previously such cases could cause a <application>pg_upgrade</> error. + Previously such cases could cause a <application>pg_upgrade</application> error. </para> </listitem> <listitem> <para> - Reorder <application>pg_dump</> processing of extension-related + Reorder <application>pg_dump</application> processing of extension-related rules and event triggers (Joe Conway) </para> </listitem> @@ -4986,7 +4986,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Force dumping of extension tables if specified by <command>pg_dump - -t</> or <literal>-n</> (Joe Conway) + -t</command> or <literal>-n</literal> (Joe Conway) </para> </listitem> @@ -4999,19 +4999,19 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix <command>pg_restore -l</> with the directory archive to display + Fix <command>pg_restore -l</command> with the directory archive to display the correct format name (Fujii Masao) </para> </listitem> <listitem> <para> - Properly record index comments created using <literal>UNIQUE</> - and <literal>PRIMARY KEY</> syntax (Andres Freund) + Properly record index comments created using <literal>UNIQUE</literal> + and <literal>PRIMARY KEY</literal> syntax (Andres Freund) </para> <para> - This fixes a parallel <application>pg_restore</> failure. + This fixes a parallel <application>pg_restore</application> failure. </para> </listitem> @@ -5041,26 +5041,26 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix <command>REINDEX TABLE</> and <command>REINDEX DATABASE</> + Fix <command>REINDEX TABLE</command> and <command>REINDEX DATABASE</command> to properly revalidate constraints and mark invalidated indexes as valid (Noah Misch) </para> <para> - <command>REINDEX INDEX</> has always worked properly. + <command>REINDEX INDEX</command> has always worked properly. </para> </listitem> <listitem> <para> Fix possible deadlock during concurrent <command>CREATE INDEX - CONCURRENTLY</> operations (Tom Lane) + CONCURRENTLY</command> operations (Tom Lane) </para> </listitem> <listitem> <para> - Fix <function>regexp_matches()</> handling of zero-length matches + Fix <function>regexp_matches()</function> handling of zero-length matches (Jeevan Chalke) </para> @@ -5084,14 +5084,14 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Prevent <command>CREATE FUNCTION</> from checking <command>SET</> + Prevent <command>CREATE FUNCTION</command> from checking <command>SET</command> variables unless function body checking is enabled (Tom Lane) </para> </listitem> <listitem> <para> - Allow <command>ALTER DEFAULT PRIVILEGES</> to operate on schemas + Allow <command>ALTER DEFAULT PRIVILEGES</command> to operate on schemas without requiring CREATE permission (Tom Lane) </para> </listitem> @@ -5103,24 +5103,24 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> Specifically, lessen keyword restrictions for role names, language - names, <command>EXPLAIN</> and <command>COPY</> options, and - <command>SET</> values. This allows <literal>COPY ... (FORMAT - BINARY)</> to work as expected; previously <literal>BINARY</> needed + names, <command>EXPLAIN</command> and <command>COPY</command> options, and + <command>SET</command> values. This allows <literal>COPY ... (FORMAT + BINARY)</literal> to work as expected; previously <literal>BINARY</literal> needed to be quoted. </para> </listitem> <listitem> <para> - Fix <function>pgp_pub_decrypt()</> so it works for secret keys with + Fix <function>pgp_pub_decrypt()</function> so it works for secret keys with passwords (Marko Kreen) </para> </listitem> <listitem> <para> - Make <application>pg_upgrade</> use <literal>pg_dump - --quote-all-identifiers</> to avoid problems with keyword changes + Make <application>pg_upgrade</application> use <literal>pg_dump + --quote-all-identifiers</literal> to avoid problems with keyword changes between releases (Tom Lane) </para> </listitem> @@ -5134,7 +5134,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Ensure that <command>VACUUM ANALYZE</> still runs the ANALYZE phase + Ensure that <command>VACUUM ANALYZE</command> still runs the ANALYZE phase if its attempt to truncate the file is cancelled due to lock conflicts (Kevin Grittner) </para> @@ -5143,21 +5143,21 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Avoid possible failure when performing transaction control commands (e.g - <command>ROLLBACK</>) in prepared queries (Tom Lane) + <command>ROLLBACK</command>) in prepared queries (Tom Lane) </para> </listitem> <listitem> <para> Ensure that floating-point data input accepts standard spellings - of <quote>infinity</> on all platforms (Tom Lane) + of <quote>infinity</quote> on all platforms (Tom Lane) </para> <para> - The C99 standard says that allowable spellings are <literal>inf</>, - <literal>+inf</>, <literal>-inf</>, <literal>infinity</>, - <literal>+infinity</>, and <literal>-infinity</>. Make sure we - recognize these even if the platform's <function>strtod</> function + The C99 standard says that allowable spellings are <literal>inf</literal>, + <literal>+inf</literal>, <literal>-inf</literal>, <literal>infinity</literal>, + <literal>+infinity</literal>, and <literal>-infinity</literal>. Make sure we + recognize these even if the platform's <function>strtod</function> function doesn't. </para> </listitem> @@ -5171,7 +5171,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Update time zone data files to <application>tzdata</> release 2013d + Update time zone data files to <application>tzdata</application> release 2013d for DST law changes in Israel, Morocco, Palestine, and Paraguay. Also, historical zone data corrections for Macquarie Island. </para> @@ -5206,7 +5206,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> However, this release corrects several errors in management of GiST indexes. After installing this update, it is advisable to - <command>REINDEX</> any GiST indexes that meet one or more of the + <command>REINDEX</command> any GiST indexes that meet one or more of the conditions described below. </para> @@ -5230,7 +5230,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> A connection request containing a database name that begins with - <quote><literal>-</></quote> could be crafted to damage or destroy + <quote><literal>-</literal></quote> could be crafted to damage or destroy files within the server's data directory, even if the request is eventually rejected. (CVE-2013-1899) </para> @@ -5244,9 +5244,9 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> This avoids a scenario wherein random numbers generated by - <filename>contrib/pgcrypto</> functions might be relatively easy for + <filename>contrib/pgcrypto</filename> functions might be relatively easy for another database user to guess. The risk is only significant when - the postmaster is configured with <varname>ssl</> = <literal>on</> + the postmaster is configured with <varname>ssl</varname> = <literal>on</literal> but most connections don't use SSL encryption. (CVE-2013-1900) </para> </listitem> @@ -5259,7 +5259,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> An unprivileged database user could exploit this mistake to call - <function>pg_start_backup()</> or <function>pg_stop_backup()</>, + <function>pg_start_backup()</function> or <function>pg_stop_backup()</function>, thus possibly interfering with creation of routine backups. (CVE-2013-1901) </para> @@ -5267,32 +5267,32 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix GiST indexes to not use <quote>fuzzy</> geometric comparisons when + Fix GiST indexes to not use <quote>fuzzy</quote> geometric comparisons when it's not appropriate to do so (Alexander Korotkov) </para> <para> - The core geometric types perform comparisons using <quote>fuzzy</> - equality, but <function>gist_box_same</> must do exact comparisons, + The core geometric types perform comparisons using <quote>fuzzy</quote> + equality, but <function>gist_box_same</function> must do exact comparisons, else GiST indexes using it might become inconsistent. After installing - this update, users should <command>REINDEX</> any GiST indexes on - <type>box</>, <type>polygon</>, <type>circle</>, or <type>point</> - columns, since all of these use <function>gist_box_same</>. + this update, users should <command>REINDEX</command> any GiST indexes on + <type>box</type>, <type>polygon</type>, <type>circle</type>, or <type>point</type> + columns, since all of these use <function>gist_box_same</function>. </para> </listitem> <listitem> <para> Fix erroneous range-union and penalty logic in GiST indexes that use - <filename>contrib/btree_gist</> for variable-width data types, that is - <type>text</>, <type>bytea</>, <type>bit</>, and <type>numeric</> + <filename>contrib/btree_gist</filename> for variable-width data types, that is + <type>text</type>, <type>bytea</type>, <type>bit</type>, and <type>numeric</type> columns (Tom Lane) </para> <para> These errors could result in inconsistent indexes in which some keys that are present would not be found by searches, and also in useless - index bloat. Users are advised to <command>REINDEX</> such indexes + index bloat. Users are advised to <command>REINDEX</command> such indexes after installing this update. </para> </listitem> @@ -5307,21 +5307,21 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 These errors could result in inconsistent indexes in which some keys that are present would not be found by searches, and also in indexes that are unnecessarily inefficient to search. Users are advised to - <command>REINDEX</> multi-column GiST indexes after installing this + <command>REINDEX</command> multi-column GiST indexes after installing this update. </para> </listitem> <listitem> <para> - Fix <function>gist_point_consistent</> + Fix <function>gist_point_consistent</function> to handle fuzziness consistently (Alexander Korotkov) </para> <para> - Index scans on GiST indexes on <type>point</> columns would sometimes + Index scans on GiST indexes on <type>point</type> columns would sometimes yield results different from a sequential scan, because - <function>gist_point_consistent</> disagreed with the underlying + <function>gist_point_consistent</function> disagreed with the underlying operator code about whether to do comparisons exactly or fuzzily. </para> </listitem> @@ -5332,21 +5332,21 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 </para> <para> - This bug could result in <quote>incorrect local pin count</> errors + This bug could result in <quote>incorrect local pin count</quote> errors during replay, making recovery impossible. </para> </listitem> <listitem> <para> - Fix race condition in <command>DELETE RETURNING</> (Tom Lane) + Fix race condition in <command>DELETE RETURNING</command> (Tom Lane) </para> <para> - Under the right circumstances, <command>DELETE RETURNING</> could + Under the right circumstances, <command>DELETE RETURNING</command> could attempt to fetch data from a shared buffer that the current process no longer has any pin on. If some other process changed the buffer - meanwhile, this would lead to garbage <literal>RETURNING</> output, or + meanwhile, this would lead to garbage <literal>RETURNING</literal> output, or even a crash. </para> </listitem> @@ -5367,28 +5367,28 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix <function>to_char()</> to use ASCII-only case-folding rules where + Fix <function>to_char()</function> to use ASCII-only case-folding rules where appropriate (Tom Lane) </para> <para> This fixes misbehavior of some template patterns that should be - locale-independent, but mishandled <quote><literal>I</></quote> and - <quote><literal>i</></quote> in Turkish locales. + locale-independent, but mishandled <quote><literal>I</literal></quote> and + <quote><literal>i</literal></quote> in Turkish locales. </para> </listitem> <listitem> <para> - Fix unwanted rejection of timestamp <literal>1999-12-31 24:00:00</> + Fix unwanted rejection of timestamp <literal>1999-12-31 24:00:00</literal> (Tom Lane) </para> </listitem> <listitem> <para> - Fix logic error when a single transaction does <command>UNLISTEN</> - then <command>LISTEN</> (Tom Lane) + Fix logic error when a single transaction does <command>UNLISTEN</command> + then <command>LISTEN</command> (Tom Lane) </para> <para> @@ -5406,7 +5406,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Remove useless <quote>picksplit doesn't support secondary split</> log + Remove useless <quote>picksplit doesn't support secondary split</quote> log messages (Josh Hansen, Tom Lane) </para> @@ -5427,29 +5427,29 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Eliminate memory leaks in PL/Perl's <function>spi_prepare()</> function + Eliminate memory leaks in PL/Perl's <function>spi_prepare()</function> function (Alex Hunsaker, Tom Lane) </para> </listitem> <listitem> <para> - Fix <application>pg_dumpall</> to handle database names containing - <quote><literal>=</></quote> correctly (Heikki Linnakangas) + Fix <application>pg_dumpall</application> to handle database names containing + <quote><literal>=</literal></quote> correctly (Heikki Linnakangas) </para> </listitem> <listitem> <para> - Avoid crash in <application>pg_dump</> when an incorrect connection + Avoid crash in <application>pg_dump</application> when an incorrect connection string is given (Heikki Linnakangas) </para> </listitem> <listitem> <para> - Ignore invalid indexes in <application>pg_dump</> and - <application>pg_upgrade</> (Michael Paquier, Bruce Momjian) + Ignore invalid indexes in <application>pg_dump</application> and + <application>pg_upgrade</application> (Michael Paquier, Bruce Momjian) </para> <para> @@ -5458,15 +5458,15 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 a uniqueness condition not satisfied by the table's data. Also, if the index creation is in fact still in progress, it seems reasonable to consider it to be an uncommitted DDL change, which - <application>pg_dump</> wouldn't be expected to dump anyway. - <application>pg_upgrade</> now also skips invalid indexes rather than + <application>pg_dump</application> wouldn't be expected to dump anyway. + <application>pg_upgrade</application> now also skips invalid indexes rather than failing. </para> </listitem> <listitem> <para> - In <application>pg_basebackup</>, include only the current server + In <application>pg_basebackup</application>, include only the current server version's subdirectory when backing up a tablespace (Heikki Linnakangas) </para> @@ -5474,26 +5474,26 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Add a server version check in <application>pg_basebackup</> and - <application>pg_receivexlog</>, so they fail cleanly with version + Add a server version check in <application>pg_basebackup</application> and + <application>pg_receivexlog</application>, so they fail cleanly with version combinations that won't work (Heikki Linnakangas) </para> </listitem> <listitem> <para> - Fix <filename>contrib/pg_trgm</>'s <function>similarity()</> function + Fix <filename>contrib/pg_trgm</filename>'s <function>similarity()</function> function to return zero for trigram-less strings (Tom Lane) </para> <para> - Previously it returned <literal>NaN</> due to internal division by zero. + Previously it returned <literal>NaN</literal> due to internal division by zero. </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2013b + Update time zone data files to <application>tzdata</application> release 2013b for DST law changes in Chile, Haiti, Morocco, Paraguay, and some Russian areas. Also, historical zone data corrections for numerous places. @@ -5501,12 +5501,12 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> Also, update the time zone abbreviation files for recent changes in - Russia and elsewhere: <literal>CHOT</>, <literal>GET</>, - <literal>IRKT</>, <literal>KGT</>, <literal>KRAT</>, <literal>MAGT</>, - <literal>MAWT</>, <literal>MSK</>, <literal>NOVT</>, <literal>OMST</>, - <literal>TKT</>, <literal>VLAT</>, <literal>WST</>, <literal>YAKT</>, - <literal>YEKT</> now follow their current meanings, and - <literal>VOLT</> (Europe/Volgograd) and <literal>MIST</> + Russia and elsewhere: <literal>CHOT</literal>, <literal>GET</literal>, + <literal>IRKT</literal>, <literal>KGT</literal>, <literal>KRAT</literal>, <literal>MAGT</literal>, + <literal>MAWT</literal>, <literal>MSK</literal>, <literal>NOVT</literal>, <literal>OMST</literal>, + <literal>TKT</literal>, <literal>VLAT</literal>, <literal>WST</literal>, <literal>YAKT</literal>, + <literal>YEKT</literal> now follow their current meanings, and + <literal>VOLT</literal> (Europe/Volgograd) and <literal>MIST</literal> (Antarctica/Macquarie) are added to the default abbreviations list. </para> </listitem> @@ -5551,7 +5551,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Prevent execution of <function>enum_recv</> from SQL (Tom Lane) + Prevent execution of <function>enum_recv</function> from SQL (Tom Lane) </para> <para> @@ -5635,19 +5635,19 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Protect against race conditions when scanning - <structname>pg_tablespace</> (Stephen Frost, Tom Lane) + <structname>pg_tablespace</structname> (Stephen Frost, Tom Lane) </para> <para> - <command>CREATE DATABASE</> and <command>DROP DATABASE</> could + <command>CREATE DATABASE</command> and <command>DROP DATABASE</command> could misbehave if there were concurrent updates of - <structname>pg_tablespace</> entries. + <structname>pg_tablespace</structname> entries. </para> </listitem> <listitem> <para> - Prevent <command>DROP OWNED</> from trying to drop whole databases or + Prevent <command>DROP OWNED</command> from trying to drop whole databases or tablespaces (Álvaro Herrera) </para> @@ -5659,13 +5659,13 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Fix error in <link - linkend="guc-vacuum-freeze-table-age"><varname>vacuum_freeze_table_age</></link> + linkend="guc-vacuum-freeze-table-age"><varname>vacuum_freeze_table_age</varname></link> implementation (Andres Freund) </para> <para> In installations that have existed for more than <link - linkend="guc-vacuum-freeze-min-age"><varname>vacuum_freeze_min_age</></link> + linkend="guc-vacuum-freeze-min-age"><varname>vacuum_freeze_min_age</varname></link> transactions, this mistake prevented autovacuum from using partial-table scans, so that a full-table scan would always happen instead. </para> @@ -5673,13 +5673,13 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Prevent misbehavior when a <symbol>RowExpr</> or <symbol>XmlExpr</> + Prevent misbehavior when a <symbol>RowExpr</symbol> or <symbol>XmlExpr</symbol> is parse-analyzed twice (Andres Freund, Tom Lane) </para> <para> This mistake could be user-visible in contexts such as - <literal>CREATE TABLE LIKE INCLUDING INDEXES</>. + <literal>CREATE TABLE LIKE INCLUDING INDEXES</literal>. </para> </listitem> @@ -5699,13 +5699,13 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Reject out-of-range dates in <function>to_date()</> (Hitoshi Harada) + Reject out-of-range dates in <function>to_date()</function> (Hitoshi Harada) </para> </listitem> <listitem> <para> - Fix <function>pg_extension_config_dump()</> to handle + Fix <function>pg_extension_config_dump()</function> to handle extension-update cases properly (Tom Lane) </para> @@ -5729,13 +5729,13 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 </para> <para> - This bug affected <application>psql</> and some other client programs. + This bug affected <application>psql</application> and some other client programs. </para> </listitem> <listitem> <para> - Fix possible crash in <application>psql</>'s <command>\?</> command + Fix possible crash in <application>psql</application>'s <command>\?</command> command when not connected to a database (Meng Qingzhong) </para> </listitem> @@ -5743,61 +5743,61 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Fix possible error if a relation file is removed while - <application>pg_basebackup</> is running (Heikki Linnakangas) + <application>pg_basebackup</application> is running (Heikki Linnakangas) </para> </listitem> <listitem> <para> - Make <application>pg_dump</> exclude data of unlogged tables when + Make <application>pg_dump</application> exclude data of unlogged tables when running on a hot-standby server (Magnus Hagander) </para> <para> This would fail anyway because the data is not available on the standby server, so it seems most convenient to assume - <option>--no-unlogged-table-data</> automatically. + <option>--no-unlogged-table-data</option> automatically. </para> </listitem> <listitem> <para> - Fix <application>pg_upgrade</> to deal with invalid indexes safely + Fix <application>pg_upgrade</application> to deal with invalid indexes safely (Bruce Momjian) </para> </listitem> <listitem> <para> - Fix one-byte buffer overrun in <application>libpq</>'s - <function>PQprintTuples</> (Xi Wang) + Fix one-byte buffer overrun in <application>libpq</application>'s + <function>PQprintTuples</function> (Xi Wang) </para> <para> This ancient function is not used anywhere by - <productname>PostgreSQL</> itself, but it might still be used by some + <productname>PostgreSQL</productname> itself, but it might still be used by some client code. </para> </listitem> <listitem> <para> - Make <application>ecpglib</> use translated messages properly + Make <application>ecpglib</application> use translated messages properly (Chen Huajun) </para> </listitem> <listitem> <para> - Properly install <application>ecpg_compat</> and - <application>pgtypes</> libraries on MSVC (Jiang Guiqing) + Properly install <application>ecpg_compat</application> and + <application>pgtypes</application> libraries on MSVC (Jiang Guiqing) </para> </listitem> <listitem> <para> - Include our version of <function>isinf()</> in - <application>libecpg</> if it's not provided by the system + Include our version of <function>isinf()</function> in + <application>libecpg</application> if it's not provided by the system (Jiang Guiqing) </para> </listitem> @@ -5817,15 +5817,15 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Make <application>pgxs</> build executables with the right - <literal>.exe</> suffix when cross-compiling for Windows + Make <application>pgxs</application> build executables with the right + <literal>.exe</literal> suffix when cross-compiling for Windows (Zoltan Boszormenyi) </para> </listitem> <listitem> <para> - Add new timezone abbreviation <literal>FET</> (Tom Lane) + Add new timezone abbreviation <literal>FET</literal> (Tom Lane) </para> <para> @@ -5874,13 +5874,13 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Fix multiple bugs associated with <command>CREATE INDEX - CONCURRENTLY</> (Andres Freund, Tom Lane) + CONCURRENTLY</command> (Andres Freund, Tom Lane) </para> <para> - Fix <command>CREATE INDEX CONCURRENTLY</> to use + Fix <command>CREATE INDEX CONCURRENTLY</command> to use in-place updates when changing the state of an index's - <structname>pg_index</> row. This prevents race conditions that could + <structname>pg_index</structname> row. This prevents race conditions that could cause concurrent sessions to miss updating the target index, thus resulting in corrupt concurrently-created indexes. </para> @@ -5888,8 +5888,8 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> Also, fix various other operations to ensure that they ignore invalid indexes resulting from a failed <command>CREATE INDEX - CONCURRENTLY</> command. The most important of these is - <command>VACUUM</>, because an auto-vacuum could easily be launched + CONCURRENTLY</command> command. The most important of these is + <command>VACUUM</command>, because an auto-vacuum could easily be launched on the table before corrective action can be taken to fix or remove the invalid index. </para> @@ -5926,13 +5926,13 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> This oversight could prevent subsequent execution of certain - operations such as <command>CREATE INDEX CONCURRENTLY</>. + operations such as <command>CREATE INDEX CONCURRENTLY</command>. </para> </listitem> <listitem> <para> - Avoid bogus <quote>out-of-sequence timeline ID</> errors in standby + Avoid bogus <quote>out-of-sequence timeline ID</quote> errors in standby mode (Heikki Linnakangas) </para> </listitem> @@ -5990,20 +5990,20 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> The planner could derive incorrect constraints from a clause equating a non-strict construct to something else, for example - <literal>WHERE COALESCE(foo, 0) = 0</> - when <literal>foo</> is coming from the nullable side of an outer join. + <literal>WHERE COALESCE(foo, 0) = 0</literal> + when <literal>foo</literal> is coming from the nullable side of an outer join. </para> </listitem> <listitem> <para> - Fix <command>SELECT DISTINCT</> with index-optimized - <function>MIN</>/<function>MAX</> on an inheritance tree (Tom Lane) + Fix <command>SELECT DISTINCT</command> with index-optimized + <function>MIN</function>/<function>MAX</function> on an inheritance tree (Tom Lane) </para> <para> The planner would fail with <quote>failed to re-find MinMaxAggInfo - record</> given this combination of factors. + record</quote> given this combination of factors. </para> </listitem> @@ -6021,10 +6021,10 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 </para> <para> - This affects multicolumn <literal>NOT IN</> subplans, such as - <literal>WHERE (a, b) NOT IN (SELECT x, y FROM ...)</> - when for instance <literal>b</> and <literal>y</> are <type>int4</> - and <type>int8</> respectively. This mistake led to wrong answers + This affects multicolumn <literal>NOT IN</literal> subplans, such as + <literal>WHERE (a, b) NOT IN (SELECT x, y FROM ...)</literal> + when for instance <literal>b</literal> and <literal>y</literal> are <type>int4</type> + and <type>int8</type> respectively. This mistake led to wrong answers or crashes depending on the specific datatypes involved. </para> </listitem> @@ -6032,12 +6032,12 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Acquire buffer lock when re-fetching the old tuple for an - <literal>AFTER ROW UPDATE/DELETE</> trigger (Andres Freund) + <literal>AFTER ROW UPDATE/DELETE</literal> trigger (Andres Freund) </para> <para> In very unusual circumstances, this oversight could result in passing - incorrect data to a trigger <literal>WHEN</> condition, or to the + incorrect data to a trigger <literal>WHEN</literal> condition, or to the precheck logic for a foreign-key enforcement trigger. That could result in a crash, or in an incorrect decision about whether to fire the trigger. @@ -6046,7 +6046,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix <command>ALTER COLUMN TYPE</> to handle inherited check + Fix <command>ALTER COLUMN TYPE</command> to handle inherited check constraints properly (Pavan Deolasee) </para> @@ -6058,7 +6058,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix <command>ALTER EXTENSION SET SCHEMA</>'s failure to move some + Fix <command>ALTER EXTENSION SET SCHEMA</command>'s failure to move some subsidiary objects into the new schema (Álvaro Herrera, Dimitri Fontaine) </para> @@ -6066,14 +6066,14 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix <command>REASSIGN OWNED</> to handle grants on tablespaces + Fix <command>REASSIGN OWNED</command> to handle grants on tablespaces (Álvaro Herrera) </para> </listitem> <listitem> <para> - Ignore incorrect <structname>pg_attribute</> entries for system + Ignore incorrect <structname>pg_attribute</structname> entries for system columns for views (Tom Lane) </para> @@ -6087,7 +6087,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix rule printing to dump <literal>INSERT INTO <replaceable>table</> + Fix rule printing to dump <literal>INSERT INTO <replaceable>table</replaceable> DEFAULT VALUES</literal> correctly (Tom Lane) </para> </listitem> @@ -6095,7 +6095,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Guard against stack overflow when there are too many - <literal>UNION</>/<literal>INTERSECT</>/<literal>EXCEPT</> clauses + <literal>UNION</literal>/<literal>INTERSECT</literal>/<literal>EXCEPT</literal> clauses in a query (Tom Lane) </para> </listitem> @@ -6117,14 +6117,14 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Fix failure to advance XID epoch if XID wraparound happens during a - checkpoint and <varname>wal_level</> is <literal>hot_standby</> + checkpoint and <varname>wal_level</varname> is <literal>hot_standby</literal> (Tom Lane, Andres Freund) </para> <para> While this mistake had no particular impact on <productname>PostgreSQL</productname> itself, it was bad for - applications that rely on <function>txid_current()</> and related + applications that rely on <function>txid_current()</function> and related functions: the TXID value would appear to go backwards. </para> </listitem> @@ -6132,7 +6132,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Fix display of - <structname>pg_stat_replication</>.<structfield>sync_state</> at a + <structname>pg_stat_replication</structname>.<structfield>sync_state</structfield> at a page boundary (Kyotaro Horiguchi) </para> </listitem> @@ -6146,7 +6146,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> Formerly, this would result in something quite unhelpful, such as - <quote>Non-recoverable failure in name resolution</>. + <quote>Non-recoverable failure in name resolution</quote>. </para> </listitem> @@ -6159,8 +6159,8 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Make <application>pg_ctl</> more robust about reading the - <filename>postmaster.pid</> file (Heikki Linnakangas) + Make <application>pg_ctl</application> more robust about reading the + <filename>postmaster.pid</filename> file (Heikki Linnakangas) </para> <para> @@ -6170,15 +6170,15 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix possible crash in <application>psql</> if incorrectly-encoded data - is presented and the <varname>client_encoding</> setting is a + Fix possible crash in <application>psql</application> if incorrectly-encoded data + is presented and the <varname>client_encoding</varname> setting is a client-only encoding, such as SJIS (Jiang Guiqing) </para> </listitem> <listitem> <para> - Make <application>pg_dump</> dump <literal>SEQUENCE SET</> items in + Make <application>pg_dump</application> dump <literal>SEQUENCE SET</literal> items in the data not pre-data section of the archive (Tom Lane) </para> @@ -6190,25 +6190,25 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix bugs in the <filename>restore.sql</> script emitted by - <application>pg_dump</> in <literal>tar</> output format (Tom Lane) + Fix bugs in the <filename>restore.sql</filename> script emitted by + <application>pg_dump</application> in <literal>tar</literal> output format (Tom Lane) </para> <para> The script would fail outright on tables whose names include upper-case characters. Also, make the script capable of restoring - data in <option>--inserts</> mode as well as the regular COPY mode. + data in <option>--inserts</option> mode as well as the regular COPY mode. </para> </listitem> <listitem> <para> - Fix <application>pg_restore</> to accept POSIX-conformant - <literal>tar</> files (Brian Weaver, Tom Lane) + Fix <application>pg_restore</application> to accept POSIX-conformant + <literal>tar</literal> files (Brian Weaver, Tom Lane) </para> <para> - The original coding of <application>pg_dump</>'s <literal>tar</> + The original coding of <application>pg_dump</application>'s <literal>tar</literal> output mode produced files that are not fully conformant with the POSIX standard. This has been corrected for version 9.3. This patch updates previous branches so that they will accept both the @@ -6219,67 +6219,67 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix <literal>tar</> files emitted by <application>pg_basebackup</> to + Fix <literal>tar</literal> files emitted by <application>pg_basebackup</application> to be POSIX conformant (Brian Weaver, Tom Lane) </para> </listitem> <listitem> <para> - Fix <application>pg_resetxlog</> to locate <filename>postmaster.pid</> + Fix <application>pg_resetxlog</application> to locate <filename>postmaster.pid</filename> correctly when given a relative path to the data directory (Tom Lane) </para> <para> - This mistake could lead to <application>pg_resetxlog</> not noticing + This mistake could lead to <application>pg_resetxlog</application> not noticing that there is an active postmaster using the data directory. </para> </listitem> <listitem> <para> - Fix <application>libpq</>'s <function>lo_import()</> and - <function>lo_export()</> functions to report file I/O errors properly + Fix <application>libpq</application>'s <function>lo_import()</function> and + <function>lo_export()</function> functions to report file I/O errors properly (Tom Lane) </para> </listitem> <listitem> <para> - Fix <application>ecpg</>'s processing of nested structure pointer + Fix <application>ecpg</application>'s processing of nested structure pointer variables (Muhammad Usama) </para> </listitem> <listitem> <para> - Fix <application>ecpg</>'s <function>ecpg_get_data</> function to + Fix <application>ecpg</application>'s <function>ecpg_get_data</function> function to handle arrays properly (Michael Meskes) </para> </listitem> <listitem> <para> - Make <filename>contrib/pageinspect</>'s btree page inspection + Make <filename>contrib/pageinspect</filename>'s btree page inspection functions take buffer locks while examining pages (Tom Lane) </para> </listitem> <listitem> <para> - Ensure that <literal>make install</> for an extension creates the - <filename>extension</> installation directory (Cédric Villemain) + Ensure that <literal>make install</literal> for an extension creates the + <filename>extension</filename> installation directory (Cédric Villemain) </para> <para> - Previously, this step was missed if <varname>MODULEDIR</> was set in + Previously, this step was missed if <varname>MODULEDIR</varname> was set in the extension's Makefile. </para> </listitem> <listitem> <para> - Fix <application>pgxs</> support for building loadable modules on AIX + Fix <application>pgxs</application> support for building loadable modules on AIX (Tom Lane) </para> @@ -6290,7 +6290,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Update time zone data files to <application>tzdata</> release 2012j + Update time zone data files to <application>tzdata</application> release 2012j for DST law changes in Cuba, Israel, Jordan, Libya, Palestine, Western Samoa, and portions of Brazil. </para> @@ -6323,7 +6323,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 </para> <para> - However, you may need to perform <command>REINDEX</> operations to + However, you may need to perform <command>REINDEX</command> operations to recover from the effects of the data corruption bug described in the first changelog item below. </para> @@ -6354,7 +6354,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 likely to occur on standby slave servers since those perform much more WAL replay. There is a low probability of corruption of btree and GIN indexes. There is a much higher probability of corruption of - table <quote>visibility maps</>. Fortunately, visibility maps are + table <quote>visibility maps</quote>. Fortunately, visibility maps are non-critical data in 9.1, so the worst consequence of such corruption in 9.1 installations is transient inefficiency of vacuuming. Table data proper cannot be corrupted by this bug. @@ -6363,18 +6363,18 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> While no index corruption due to this bug is known to have occurred in the field, as a precautionary measure it is recommended that - production installations <command>REINDEX</> all btree and GIN + production installations <command>REINDEX</command> all btree and GIN indexes at a convenient time after upgrading to 9.1.6. </para> <para> Also, if you intend to do an in-place upgrade to 9.2.X, before doing - so it is recommended to perform a <command>VACUUM</> of all tables + so it is recommended to perform a <command>VACUUM</command> of all tables while having <link - linkend="guc-vacuum-freeze-table-age"><varname>vacuum_freeze_table_age</></link> + linkend="guc-vacuum-freeze-table-age"><varname>vacuum_freeze_table_age</varname></link> set to zero. This will ensure that any lingering wrong data in the visibility maps is corrected before 9.2.X can depend on it. <link - linkend="guc-vacuum-cost-delay"><varname>vacuum_cost_delay</></link> + linkend="guc-vacuum-cost-delay"><varname>vacuum_cost_delay</varname></link> can be adjusted to reduce the performance impact of vacuuming, while causing it to take longer to finish. </para> @@ -6388,15 +6388,15 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> These errors could result in wrong answers from queries that scan the - same <literal>WITH</> subquery multiple times. + same <literal>WITH</literal> subquery multiple times. </para> </listitem> <listitem> <para> Fix misbehavior when <link - linkend="guc-default-transaction-isolation"><varname>default_transaction_isolation</></link> - is set to <literal>serializable</> (Kevin Grittner, Tom Lane, Heikki + linkend="guc-default-transaction-isolation"><varname>default_transaction_isolation</varname></link> + is set to <literal>serializable</literal> (Kevin Grittner, Tom Lane, Heikki Linnakangas) </para> @@ -6409,7 +6409,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Improve selectivity estimation for text search queries involving - prefixes, i.e. <replaceable>word</><literal>:*</> patterns (Tom Lane) + prefixes, i.e. <replaceable>word</replaceable><literal>:*</literal> patterns (Tom Lane) </para> </listitem> @@ -6432,10 +6432,10 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 </para> <para> - If we revoke a grant option from some role <replaceable>X</>, but - <replaceable>X</> still holds that option via a grant from someone + If we revoke a grant option from some role <replaceable>X</replaceable>, but + <replaceable>X</replaceable> still holds that option via a grant from someone else, we should not recursively revoke the corresponding privilege - from role(s) <replaceable>Y</> that <replaceable>X</> had granted it + from role(s) <replaceable>Y</replaceable> that <replaceable>X</replaceable> had granted it to. </para> </listitem> @@ -6448,7 +6448,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> This situation creates circular dependencies that confuse - <application>pg_dump</> and probably other things. It's confusing + <application>pg_dump</application> and probably other things. It's confusing for humans too, so disallow it. </para> </listitem> @@ -6462,7 +6462,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Make <application>configure</> probe for <function>mbstowcs_l</> (Tom + Make <application>configure</application> probe for <function>mbstowcs_l</function> (Tom Lane) </para> @@ -6473,12 +6473,12 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix handling of <literal>SIGFPE</> when PL/Perl is in use (Andres Freund) + Fix handling of <literal>SIGFPE</literal> when PL/Perl is in use (Andres Freund) </para> <para> - Perl resets the process's <literal>SIGFPE</> handler to - <literal>SIG_IGN</>, which could result in crashes later on. Restore + Perl resets the process's <literal>SIGFPE</literal> handler to + <literal>SIG_IGN</literal>, which could result in crashes later on. Restore the normal Postgres signal handler after initializing PL/Perl. </para> </listitem> @@ -6497,7 +6497,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> Some Linux distributions contain an incorrect version of - <filename>pthread.h</> that results in incorrect compiled code in + <filename>pthread.h</filename> that results in incorrect compiled code in PL/Perl, leading to crashes if a PL/Perl function calls another one that throws an error. </para> @@ -6505,45 +6505,45 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix bugs in <filename>contrib/pg_trgm</>'s <literal>LIKE</> pattern + Fix bugs in <filename>contrib/pg_trgm</filename>'s <literal>LIKE</literal> pattern analysis code (Fujii Masao) </para> <para> - <literal>LIKE</> queries using a trigram index could produce wrong - results if the pattern contained <literal>LIKE</> escape characters. + <literal>LIKE</literal> queries using a trigram index could produce wrong + results if the pattern contained <literal>LIKE</literal> escape characters. </para> </listitem> <listitem> <para> - Fix <application>pg_upgrade</>'s handling of line endings on Windows + Fix <application>pg_upgrade</application>'s handling of line endings on Windows (Andrew Dunstan) </para> <para> - Previously, <application>pg_upgrade</> might add or remove carriage + Previously, <application>pg_upgrade</application> might add or remove carriage returns in places such as function bodies. </para> </listitem> <listitem> <para> - On Windows, make <application>pg_upgrade</> use backslash path + On Windows, make <application>pg_upgrade</application> use backslash path separators in the scripts it emits (Andrew Dunstan) </para> </listitem> <listitem> <para> - Remove unnecessary dependency on <application>pg_config</> from - <application>pg_upgrade</> (Peter Eisentraut) + Remove unnecessary dependency on <application>pg_config</application> from + <application>pg_upgrade</application> (Peter Eisentraut) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2012f + Update time zone data files to <application>tzdata</application> release 2012f for DST law changes in Fiji </para> </listitem> @@ -6593,7 +6593,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 </para> <para> - <function>xml_parse()</> would attempt to fetch external files or + <function>xml_parse()</function> would attempt to fetch external files or URLs as needed to resolve DTD and entity references in an XML value, thus allowing unprivileged database users to attempt to fetch data with the privileges of the database server. While the external data @@ -6606,22 +6606,22 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Prevent access to external files/URLs via <filename>contrib/xml2</>'s - <function>xslt_process()</> (Peter Eisentraut) + Prevent access to external files/URLs via <filename>contrib/xml2</filename>'s + <function>xslt_process()</function> (Peter Eisentraut) </para> <para> - <application>libxslt</> offers the ability to read and write both + <application>libxslt</application> offers the ability to read and write both files and URLs through stylesheet commands, thus allowing unprivileged database users to both read and write data with the privileges of the database server. Disable that through proper use - of <application>libxslt</>'s security options. (CVE-2012-3488) + of <application>libxslt</application>'s security options. (CVE-2012-3488) </para> <para> - Also, remove <function>xslt_process()</>'s ability to fetch documents + Also, remove <function>xslt_process()</function>'s ability to fetch documents and stylesheets from external files/URLs. While this was a - documented <quote>feature</>, it was long regarded as a bad idea. + documented <quote>feature</quote>, it was long regarded as a bad idea. The fix for CVE-2012-3489 broke that capability, and rather than expend effort on trying to fix it, we're just going to summarily remove it. @@ -6649,21 +6649,21 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 </para> <para> - If <command>ALTER SEQUENCE</> was executed on a freshly created or - reset sequence, and then precisely one <function>nextval()</> call + If <command>ALTER SEQUENCE</command> was executed on a freshly created or + reset sequence, and then precisely one <function>nextval()</function> call was made on it, and then the server crashed, WAL replay would restore the sequence to a state in which it appeared that no - <function>nextval()</> had been done, thus allowing the first + <function>nextval()</function> had been done, thus allowing the first sequence value to be returned again by the next - <function>nextval()</> call. In particular this could manifest for - <type>serial</> columns, since creation of a serial column's sequence - includes an <command>ALTER SEQUENCE OWNED BY</> step. + <function>nextval()</function> call. In particular this could manifest for + <type>serial</type> columns, since creation of a serial column's sequence + includes an <command>ALTER SEQUENCE OWNED BY</command> step. </para> </listitem> <listitem> <para> - Fix race condition in <literal>enum</>-type value comparisons (Robert + Fix race condition in <literal>enum</literal>-type value comparisons (Robert Haas, Tom Lane) </para> @@ -6675,7 +6675,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix <function>txid_current()</> to report the correct epoch when not + Fix <function>txid_current()</function> to report the correct epoch when not in hot standby (Heikki Linnakangas) </para> @@ -6692,7 +6692,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> The master might improperly choose pseudo-servers such as - <application>pg_receivexlog</> or <application>pg_basebackup</> + <application>pg_receivexlog</application> or <application>pg_basebackup</application> as the synchronous standby, and then wait indefinitely for them. </para> </listitem> @@ -6705,14 +6705,14 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> This mistake led to failures reported as <quote>out-of-order XID - insertion in KnownAssignedXids</>. + insertion in KnownAssignedXids</quote>. </para> </listitem> <listitem> <para> - Ensure the <filename>backup_label</> file is fsync'd after - <function>pg_start_backup()</> (Dave Kerr) + Ensure the <filename>backup_label</filename> file is fsync'd after + <function>pg_start_backup()</function> (Dave Kerr) </para> </listitem> @@ -6723,7 +6723,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> WAL sender background processes neglected to establish a - <systemitem>SIGALRM</> handler, meaning they would wait forever in + <systemitem>SIGALRM</systemitem> handler, meaning they would wait forever in some corner cases where a timeout ought to happen. </para> </listitem> @@ -6742,15 +6742,15 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix <literal>LISTEN</>/<literal>NOTIFY</> to cope better with I/O + Fix <literal>LISTEN</literal>/<literal>NOTIFY</literal> to cope better with I/O problems, such as out of disk space (Tom Lane) </para> <para> After a write failure, all subsequent attempts to send more - <literal>NOTIFY</> messages would fail with messages like - <quote>Could not read from file "pg_notify/<replaceable>nnnn</>" at - offset <replaceable>nnnnn</>: Success</quote>. + <literal>NOTIFY</literal> messages would fail with messages like + <quote>Could not read from file "pg_notify/<replaceable>nnnn</replaceable>" at + offset <replaceable>nnnnn</replaceable>: Success</quote>. </para> </listitem> @@ -6763,7 +6763,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> The original coding could allow inconsistent behavior in some cases; in particular, an autovacuum could get canceled after less than - <literal>deadlock_timeout</> grace period. + <literal>deadlock_timeout</literal> grace period. </para> </listitem> @@ -6775,15 +6775,15 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix log collector so that <literal>log_truncate_on_rotation</> works + Fix log collector so that <literal>log_truncate_on_rotation</literal> works during the very first log rotation after server start (Tom Lane) </para> </listitem> <listitem> <para> - Fix <literal>WITH</> attached to a nested set operation - (<literal>UNION</>/<literal>INTERSECT</>/<literal>EXCEPT</>) + Fix <literal>WITH</literal> attached to a nested set operation + (<literal>UNION</literal>/<literal>INTERSECT</literal>/<literal>EXCEPT</literal>) (Tom Lane) </para> </listitem> @@ -6791,44 +6791,44 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Ensure that a whole-row reference to a subquery doesn't include any - extra <literal>GROUP BY</> or <literal>ORDER BY</> columns (Tom Lane) + extra <literal>GROUP BY</literal> or <literal>ORDER BY</literal> columns (Tom Lane) </para> </listitem> <listitem> <para> Fix dependencies generated during <literal>ALTER TABLE ... ADD - CONSTRAINT USING INDEX</> (Tom Lane) + CONSTRAINT USING INDEX</literal> (Tom Lane) </para> <para> - This command left behind a redundant <structname>pg_depend</> entry + This command left behind a redundant <structname>pg_depend</structname> entry for the index, which could confuse later operations, notably - <literal>ALTER TABLE ... ALTER COLUMN TYPE</> on one of the indexed + <literal>ALTER TABLE ... ALTER COLUMN TYPE</literal> on one of the indexed columns. </para> </listitem> <listitem> <para> - Fix <command>REASSIGN OWNED</> to work on extensions (Alvaro Herrera) + Fix <command>REASSIGN OWNED</command> to work on extensions (Alvaro Herrera) </para> </listitem> <listitem> <para> - Disallow copying whole-row references in <literal>CHECK</> - constraints and index definitions during <command>CREATE TABLE</> + Disallow copying whole-row references in <literal>CHECK</literal> + constraints and index definitions during <command>CREATE TABLE</command> (Tom Lane) </para> <para> - This situation can arise in <command>CREATE TABLE</> with - <literal>LIKE</> or <literal>INHERITS</>. The copied whole-row + This situation can arise in <command>CREATE TABLE</command> with + <literal>LIKE</literal> or <literal>INHERITS</literal>. The copied whole-row variable was incorrectly labeled with the row type of the original table not the new one. Rejecting the case seems reasonable for - <literal>LIKE</>, since the row types might well diverge later. For - <literal>INHERITS</> we should ideally allow it, with an implicit + <literal>LIKE</literal>, since the row types might well diverge later. For + <literal>INHERITS</literal> we should ideally allow it, with an implicit coercion to the parent table's row type; but that will require more work than seems safe to back-patch. </para> @@ -6836,7 +6836,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix memory leak in <literal>ARRAY(SELECT ...)</> subqueries (Heikki + Fix memory leak in <literal>ARRAY(SELECT ...)</literal> subqueries (Heikki Linnakangas, Tom Lane) </para> </listitem> @@ -6860,7 +6860,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> The code could get confused by quantified parenthesized - subexpressions, such as <literal>^(foo)?bar</>. This would lead to + subexpressions, such as <literal>^(foo)?bar</literal>. This would lead to incorrect index optimization of searches for such patterns. </para> </listitem> @@ -6868,26 +6868,26 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Fix bugs with parsing signed - <replaceable>hh</><literal>:</><replaceable>mm</> and - <replaceable>hh</><literal>:</><replaceable>mm</><literal>:</><replaceable>ss</> - fields in <type>interval</> constants (Amit Kapila, Tom Lane) + <replaceable>hh</replaceable><literal>:</literal><replaceable>mm</replaceable> and + <replaceable>hh</replaceable><literal>:</literal><replaceable>mm</replaceable><literal>:</literal><replaceable>ss</replaceable> + fields in <type>interval</type> constants (Amit Kapila, Tom Lane) </para> </listitem> <listitem> <para> - Fix <application>pg_dump</> to better handle views containing partial - <literal>GROUP BY</> lists (Tom Lane) + Fix <application>pg_dump</application> to better handle views containing partial + <literal>GROUP BY</literal> lists (Tom Lane) </para> <para> - A view that lists only a primary key column in <literal>GROUP BY</>, + A view that lists only a primary key column in <literal>GROUP BY</literal>, but uses other table columns as if they were grouped, gets marked as depending on the primary key. Improper handling of such primary key - dependencies in <application>pg_dump</> resulted in poorly-ordered + dependencies in <application>pg_dump</application> resulted in poorly-ordered dumps, which at best would be inefficient to restore and at worst could result in outright failure of a parallel - <application>pg_restore</> run. + <application>pg_restore</application> run. </para> </listitem> @@ -6923,14 +6923,14 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Report errors properly in <filename>contrib/xml2</>'s - <function>xslt_process()</> (Tom Lane) + Report errors properly in <filename>contrib/xml2</filename>'s + <function>xslt_process()</function> (Tom Lane) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2012e + Update time zone data files to <application>tzdata</application> release 2012e for DST law changes in Morocco and Tokelau </para> </listitem> @@ -6962,13 +6962,13 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 </para> <para> - However, if you use the <type>citext</> data type, and you upgraded - from a previous major release by running <application>pg_upgrade</>, - you should run <literal>CREATE EXTENSION citext FROM unpackaged</> - to avoid collation-related failures in <type>citext</> operations. + However, if you use the <type>citext</type> data type, and you upgraded + from a previous major release by running <application>pg_upgrade</application>, + you should run <literal>CREATE EXTENSION citext FROM unpackaged</literal> + to avoid collation-related failures in <type>citext</type> operations. The same is necessary if you restore a dump from a pre-9.1 database - that contains an instance of the <type>citext</> data type. - If you've already run the <command>CREATE EXTENSION</> command before + that contains an instance of the <type>citext</type> data type. + If you've already run the <command>CREATE EXTENSION</command> command before upgrading to 9.1.4, you will instead need to do manual catalog updates as explained in the third changelog item below. </para> @@ -6988,12 +6988,12 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Fix incorrect password transformation in - <filename>contrib/pgcrypto</>'s DES <function>crypt()</> function + <filename>contrib/pgcrypto</filename>'s DES <function>crypt()</function> function (Solar Designer) </para> <para> - If a password string contained the byte value <literal>0x80</>, the + If a password string contained the byte value <literal>0x80</literal>, the remainder of the password was ignored, causing the password to be much weaker than it appeared. With this fix, the rest of the string is properly included in the DES hash. Any stored password values that are @@ -7004,7 +7004,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Ignore <literal>SECURITY DEFINER</> and <literal>SET</> attributes for + Ignore <literal>SECURITY DEFINER</literal> and <literal>SET</literal> attributes for a procedural language's call handler (Tom Lane) </para> @@ -7016,16 +7016,16 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Make <filename>contrib/citext</>'s upgrade script fix collations of - <type>citext</> arrays and domains over <type>citext</> + Make <filename>contrib/citext</filename>'s upgrade script fix collations of + <type>citext</type> arrays and domains over <type>citext</type> (Tom Lane) </para> <para> - Release 9.1.2 provided a fix for collations of <type>citext</> columns + Release 9.1.2 provided a fix for collations of <type>citext</type> columns and indexes in databases upgraded or reloaded from pre-9.1 installations, but that fix was incomplete: it neglected to handle arrays - and domains over <type>citext</>. This release extends the module's + and domains over <type>citext</type>. This release extends the module's upgrade script to handle these cases. As before, if you have already run the upgrade script, you'll need to run the collation update commands by hand instead. See the 9.1.2 release notes for more @@ -7035,7 +7035,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Allow numeric timezone offsets in <type>timestamp</> input to be up to + Allow numeric timezone offsets in <type>timestamp</type> input to be up to 16 hours away from UTC (Tom Lane) </para> @@ -7061,7 +7061,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix <type>text</> to <type>name</> and <type>char</> to <type>name</> + Fix <type>text</type> to <type>name</type> and <type>char</type> to <type>name</type> casts to perform string truncation correctly in multibyte encodings (Karl Schnaitter) </para> @@ -7069,13 +7069,13 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix memory copying bug in <function>to_tsquery()</> (Heikki Linnakangas) + Fix memory copying bug in <function>to_tsquery()</function> (Heikki Linnakangas) </para> </listitem> <listitem> <para> - Ensure <function>txid_current()</> reports the correct epoch when + Ensure <function>txid_current()</function> reports the correct epoch when executed in hot standby (Simon Riggs) </para> </listitem> @@ -7090,7 +7090,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 This bug concerns sub-SELECTs that reference variables coming from the nullable side of an outer join of the surrounding query. In 9.1, queries affected by this bug would fail with <quote>ERROR: - Upper-level PlaceHolderVar found where not expected</>. But in 9.0 and + Upper-level PlaceHolderVar found where not expected</quote>. But in 9.0 and 8.4, you'd silently get possibly-wrong answers, since the value transmitted into the subquery wouldn't go to null when it should. </para> @@ -7098,26 +7098,26 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix planning of <literal>UNION ALL</> subqueries with output columns + Fix planning of <literal>UNION ALL</literal> subqueries with output columns that are not simple variables (Tom Lane) </para> <para> Planning of such cases got noticeably worse in 9.1 as a result of a misguided fix for <quote>MergeAppend child's targetlist doesn't match - MergeAppend</> errors. Revert that fix and do it another way. + MergeAppend</quote> errors. Revert that fix and do it another way. </para> </listitem> <listitem> <para> - Fix slow session startup when <structname>pg_attribute</> is very large + Fix slow session startup when <structname>pg_attribute</structname> is very large (Tom Lane) </para> <para> - If <structname>pg_attribute</> exceeds one-fourth of - <varname>shared_buffers</>, cache rebuilding code that is sometimes + If <structname>pg_attribute</structname> exceeds one-fourth of + <varname>shared_buffers</varname>, cache rebuilding code that is sometimes needed during session start would trigger the synchronized-scan logic, causing it to take many times longer than normal. The problem was particularly acute if many new sessions were starting at once. @@ -7138,8 +7138,8 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Ensure the Windows implementation of <function>PGSemaphoreLock()</> - clears <varname>ImmediateInterruptOK</> before returning (Tom Lane) + Ensure the Windows implementation of <function>PGSemaphoreLock()</function> + clears <varname>ImmediateInterruptOK</varname> before returning (Tom Lane) </para> <para> @@ -7166,31 +7166,31 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix <command>COPY FROM</> to properly handle null marker strings that + Fix <command>COPY FROM</command> to properly handle null marker strings that correspond to invalid encoding (Tom Lane) </para> <para> - A null marker string such as <literal>E'\\0'</> should work, and did + A null marker string such as <literal>E'\\0'</literal> should work, and did work in the past, but the case got broken in 8.4. </para> </listitem> <listitem> <para> - Fix <command>EXPLAIN VERBOSE</> for writable CTEs containing - <literal>RETURNING</> clauses (Tom Lane) + Fix <command>EXPLAIN VERBOSE</command> for writable CTEs containing + <literal>RETURNING</literal> clauses (Tom Lane) </para> </listitem> <listitem> <para> - Fix <command>PREPARE TRANSACTION</> to work correctly in the presence + Fix <command>PREPARE TRANSACTION</command> to work correctly in the presence of advisory locks (Tom Lane) </para> <para> - Historically, <command>PREPARE TRANSACTION</> has simply ignored any + Historically, <command>PREPARE TRANSACTION</command> has simply ignored any session-level advisory locks the session holds, but this case was accidentally broken in 9.1. </para> @@ -7205,14 +7205,14 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Ignore missing schemas during non-interactive assignments of - <varname>search_path</> (Tom Lane) + <varname>search_path</varname> (Tom Lane) </para> <para> This re-aligns 9.1's behavior with that of older branches. Previously 9.1 would throw an error for nonexistent schemas mentioned in - <varname>search_path</> settings obtained from places such as - <command>ALTER DATABASE SET</>. + <varname>search_path</varname> settings obtained from places such as + <command>ALTER DATABASE SET</command>. </para> </listitem> @@ -7223,7 +7223,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 </para> <para> - This includes cases such as a rewriting <command>ALTER TABLE</> within + This includes cases such as a rewriting <command>ALTER TABLE</command> within an extension update script, since that uses a transient table behind the scenes. </para> @@ -7237,7 +7237,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> Previously, infinite recursion in a function invoked by - auto-<command>ANALYZE</> could crash worker processes. + auto-<command>ANALYZE</command> could crash worker processes. </para> </listitem> @@ -7256,13 +7256,13 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Fix logging collector to ensure it will restart file rotation - after receiving <systemitem>SIGHUP</> (Tom Lane) + after receiving <systemitem>SIGHUP</systemitem> (Tom Lane) </para> </listitem> <listitem> <para> - Fix <quote>too many LWLocks taken</> failure in GiST indexes (Heikki + Fix <quote>too many LWLocks taken</quote> failure in GiST indexes (Heikki Linnakangas) </para> </listitem> @@ -7296,35 +7296,35 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix error handling in <application>pg_basebackup</> + Fix error handling in <application>pg_basebackup</application> (Thomas Ogrisegg, Fujii Masao) </para> </listitem> <listitem> <para> - Fix <application>walsender</> to not go into a busy loop if connection + Fix <application>walsender</application> to not go into a busy loop if connection is terminated (Fujii Masao) </para> </listitem> <listitem> <para> - Fix memory leak in PL/pgSQL's <command>RETURN NEXT</> command (Joe + Fix memory leak in PL/pgSQL's <command>RETURN NEXT</command> command (Joe Conway) </para> </listitem> <listitem> <para> - Fix PL/pgSQL's <command>GET DIAGNOSTICS</> command when the target + Fix PL/pgSQL's <command>GET DIAGNOSTICS</command> command when the target is the function's first variable (Tom Lane) </para> </listitem> <listitem> <para> - Ensure that PL/Perl package-qualifies the <varname>_TD</> variable + Ensure that PL/Perl package-qualifies the <varname>_TD</varname> variable (Alex Hunsaker) </para> @@ -7349,19 +7349,19 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix potential access off the end of memory in <application>psql</>'s - expanded display (<command>\x</>) mode (Peter Eisentraut) + Fix potential access off the end of memory in <application>psql</application>'s + expanded display (<command>\x</command>) mode (Peter Eisentraut) </para> </listitem> <listitem> <para> - Fix several performance problems in <application>pg_dump</> when + Fix several performance problems in <application>pg_dump</application> when the database contains many objects (Jeff Janes, Tom Lane) </para> <para> - <application>pg_dump</> could get very slow if the database contained + <application>pg_dump</application> could get very slow if the database contained many schemas, or if many objects are in dependency loops, or if there are many owned sequences. </para> @@ -7369,14 +7369,14 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix memory and file descriptor leaks in <application>pg_restore</> + Fix memory and file descriptor leaks in <application>pg_restore</application> when reading a directory-format archive (Peter Eisentraut) </para> </listitem> <listitem> <para> - Fix <application>pg_upgrade</> for the case that a database stored in a + Fix <application>pg_upgrade</application> for the case that a database stored in a non-default tablespace contains a table in the cluster's default tablespace (Bruce Momjian) </para> @@ -7384,41 +7384,41 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - In <application>ecpg</>, fix rare memory leaks and possible overwrite - of one byte after the <structname>sqlca_t</> structure (Peter Eisentraut) + In <application>ecpg</application>, fix rare memory leaks and possible overwrite + of one byte after the <structname>sqlca_t</structname> structure (Peter Eisentraut) </para> </listitem> <listitem> <para> - Fix <filename>contrib/dblink</>'s <function>dblink_exec()</> to not leak + Fix <filename>contrib/dblink</filename>'s <function>dblink_exec()</function> to not leak temporary database connections upon error (Tom Lane) </para> </listitem> <listitem> <para> - Fix <filename>contrib/dblink</> to report the correct connection name in + Fix <filename>contrib/dblink</filename> to report the correct connection name in error messages (Kyotaro Horiguchi) </para> </listitem> <listitem> <para> - Fix <filename>contrib/vacuumlo</> to use multiple transactions when + Fix <filename>contrib/vacuumlo</filename> to use multiple transactions when dropping many large objects (Tim Lewis, Robert Haas, Tom Lane) </para> <para> - This change avoids exceeding <varname>max_locks_per_transaction</> when + This change avoids exceeding <varname>max_locks_per_transaction</varname> when many objects need to be dropped. The behavior can be adjusted with the - new <literal>-l</> (limit) option. + new <literal>-l</literal> (limit) option. </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2012c + Update time zone data files to <application>tzdata</application> release 2012c for DST law changes in Antarctica, Armenia, Chile, Cuba, Falkland Islands, Gaza, Haiti, Hebron, Morocco, Syria, and Tokelau Islands; also historical corrections for Canada. @@ -7466,14 +7466,14 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Require execute permission on the trigger function for - <command>CREATE TRIGGER</> (Robert Haas) + <command>CREATE TRIGGER</command> (Robert Haas) </para> <para> This missing check could allow another user to execute a trigger function with forged input data, by installing it on a table he owns. This is only of significance for trigger functions marked - <literal>SECURITY DEFINER</>, since otherwise trigger functions run + <literal>SECURITY DEFINER</literal>, since otherwise trigger functions run as the table owner anyway. (CVE-2012-0866) </para> </listitem> @@ -7485,7 +7485,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 </para> <para> - Both <application>libpq</> and the server truncated the common name + Both <application>libpq</application> and the server truncated the common name extracted from an SSL certificate at 32 bytes. Normally this would cause nothing worse than an unexpected verification failure, but there are some rather-implausible scenarios in which it might allow one @@ -7500,12 +7500,12 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Convert newlines to spaces in names written in <application>pg_dump</> + Convert newlines to spaces in names written in <application>pg_dump</application> comments (Robert Haas) </para> <para> - <application>pg_dump</> was incautious about sanitizing object names + <application>pg_dump</application> was incautious about sanitizing object names that are emitted within SQL comments in its output script. A name containing a newline would at least render the script syntactically incorrect. Maliciously crafted object names could present a SQL @@ -7521,10 +7521,10 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> An index page split caused by an insertion could sometimes cause a - concurrently-running <command>VACUUM</> to miss removing index entries + concurrently-running <command>VACUUM</command> to miss removing index entries that it should remove. After the corresponding table rows are removed, the dangling index entries would cause errors (such as <quote>could not - read block N in file ...</>) or worse, silently wrong query results + read block N in file ...</quote>) or worse, silently wrong query results after unrelated rows are re-inserted at the now-free table locations. This bug has been present since release 8.2, but occurs so infrequently that it was not diagnosed until now. If you have reason to suspect @@ -7543,22 +7543,22 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 that the contents were transiently invalid. In hot standby mode this can result in a query that's executing in parallel seeing garbage data. Various symptoms could result from that, but the most common one seems - to be <quote>invalid memory alloc request size</>. + to be <quote>invalid memory alloc request size</quote>. </para> </listitem> <listitem> <para> - Fix handling of data-modifying <literal>WITH</> subplans in - <literal>READ COMMITTED</> rechecking (Tom Lane) + Fix handling of data-modifying <literal>WITH</literal> subplans in + <literal>READ COMMITTED</literal> rechecking (Tom Lane) </para> <para> - A <literal>WITH</> clause containing - <command>INSERT</>/<command>UPDATE</>/<command>DELETE</> would crash - if the parent <command>UPDATE</> or <command>DELETE</> command needed + A <literal>WITH</literal> clause containing + <command>INSERT</command>/<command>UPDATE</command>/<command>DELETE</command> would crash + if the parent <command>UPDATE</command> or <command>DELETE</command> command needed to be re-evaluated at one or more rows due to concurrent updates - in <literal>READ COMMITTED</> mode. + in <literal>READ COMMITTED</literal> mode. </para> </listitem> @@ -7589,13 +7589,13 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix <command>CLUSTER</>/<command>VACUUM FULL</> handling of toast + Fix <command>CLUSTER</command>/<command>VACUUM FULL</command> handling of toast values owned by recently-updated rows (Tom Lane) </para> <para> This oversight could lead to <quote>duplicate key value violates unique - constraint</> errors being reported against the toast table's index + constraint</quote> errors being reported against the toast table's index during one of these commands. </para> </listitem> @@ -7617,11 +7617,11 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Support foreign data wrappers and foreign servers in - <command>REASSIGN OWNED</> (Alvaro Herrera) + <command>REASSIGN OWNED</command> (Alvaro Herrera) </para> <para> - This command failed with <quote>unexpected classid</> errors if + This command failed with <quote>unexpected classid</quote> errors if it needed to change the ownership of any such objects. </para> </listitem> @@ -7629,24 +7629,24 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Allow non-existent values for some settings in <command>ALTER - USER/DATABASE SET</> (Heikki Linnakangas) + USER/DATABASE SET</command> (Heikki Linnakangas) </para> <para> - Allow <varname>default_text_search_config</>, - <varname>default_tablespace</>, and <varname>temp_tablespaces</> to be + Allow <varname>default_text_search_config</varname>, + <varname>default_tablespace</varname>, and <varname>temp_tablespaces</varname> to be set to names that are not known. This is because they might be known in another database where the setting is intended to be used, or for the tablespace cases because the tablespace might not be created yet. The - same issue was previously recognized for <varname>search_path</>, and + same issue was previously recognized for <varname>search_path</varname>, and these settings now act like that one. </para> </listitem> <listitem> <para> - Fix <quote>unsupported node type</> error caused by <literal>COLLATE</> - in an <command>INSERT</> expression (Tom Lane) + Fix <quote>unsupported node type</quote> error caused by <literal>COLLATE</literal> + in an <command>INSERT</command> expression (Tom Lane) </para> </listitem> @@ -7669,7 +7669,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Recover from errors occurring during WAL replay of <command>DROP - TABLESPACE</> (Tom Lane) + TABLESPACE</command> (Tom Lane) </para> <para> @@ -7691,7 +7691,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> Sometimes a lock would be logged as being held by <quote>transaction - zero</>. This is at least known to produce assertion failures on + zero</quote>. This is at least known to produce assertion failures on slave servers, and might be the cause of more serious problems. </para> </listitem> @@ -7713,7 +7713,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Prevent emitting misleading <quote>consistent recovery state reached</> + Prevent emitting misleading <quote>consistent recovery state reached</quote> log message at the beginning of crash recovery (Heikki Linnakangas) </para> </listitem> @@ -7721,7 +7721,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Fix initial value of - <structname>pg_stat_replication</>.<structfield>replay_location</> + <structname>pg_stat_replication</structname>.<structfield>replay_location</structfield> (Fujii Masao) </para> @@ -7733,7 +7733,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix regular expression back-references with <literal>*</> attached + Fix regular expression back-references with <literal>*</literal> attached (Tom Lane) </para> @@ -7747,18 +7747,18 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 A similar problem still afflicts back-references that are embedded in a larger quantified expression, rather than being the immediate subject of the quantifier. This will be addressed in a future - <productname>PostgreSQL</> release. + <productname>PostgreSQL</productname> release. </para> </listitem> <listitem> <para> Fix recently-introduced memory leak in processing of - <type>inet</>/<type>cidr</> values (Heikki Linnakangas) + <type>inet</type>/<type>cidr</type> values (Heikki Linnakangas) </para> <para> - A patch in the December 2011 releases of <productname>PostgreSQL</> + A patch in the December 2011 releases of <productname>PostgreSQL</productname> caused memory leakage in these operations, which could be significant in scenarios such as building a btree index on such a column. </para> @@ -7767,7 +7767,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Fix planner's ability to push down index-expression restrictions - through <literal>UNION ALL</> (Tom Lane) + through <literal>UNION ALL</literal> (Tom Lane) </para> <para> @@ -7778,19 +7778,19 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix planning of <literal>WITH</> clauses referenced in - <command>UPDATE</>/<command>DELETE</> on an inherited table + Fix planning of <literal>WITH</literal> clauses referenced in + <command>UPDATE</command>/<command>DELETE</command> on an inherited table (Tom Lane) </para> <para> - This bug led to <quote>could not find plan for CTE</> failures. + This bug led to <quote>could not find plan for CTE</quote> failures. </para> </listitem> <listitem> <para> - Fix GIN cost estimation to handle <literal>column IN (...)</> + Fix GIN cost estimation to handle <literal>column IN (...)</literal> index conditions (Marti Raudsepp) </para> @@ -7813,8 +7813,8 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix dangling pointer after <command>CREATE TABLE AS</>/<command>SELECT - INTO</> in a SQL-language function (Tom Lane) + Fix dangling pointer after <command>CREATE TABLE AS</command>/<command>SELECT + INTO</command> in a SQL-language function (Tom Lane) </para> <para> @@ -7853,14 +7853,14 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> This function crashes when handed a typeglob or certain read-only - objects such as <literal>$^V</>. Make plperl avoid passing those to + objects such as <literal>$^V</literal>. Make plperl avoid passing those to it. </para> </listitem> <listitem> <para> - In <application>pg_dump</>, don't dump contents of an extension's + In <application>pg_dump</application>, don't dump contents of an extension's configuration tables if the extension itself is not being dumped (Tom Lane) </para> @@ -7868,32 +7868,32 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Improve <application>pg_dump</>'s handling of inherited table columns + Improve <application>pg_dump</application>'s handling of inherited table columns (Tom Lane) </para> <para> - <application>pg_dump</> mishandled situations where a child column has + <application>pg_dump</application> mishandled situations where a child column has a different default expression than its parent column. If the default is textually identical to the parent's default, but not actually the same (for instance, because of schema search path differences) it would not be recognized as different, so that after dump and restore the child would be allowed to inherit the parent's default. Child columns - that are <literal>NOT NULL</> where their parent is not could also be + that are <literal>NOT NULL</literal> where their parent is not could also be restored subtly incorrectly. </para> </listitem> <listitem> <para> - Fix <application>pg_restore</>'s direct-to-database mode for + Fix <application>pg_restore</application>'s direct-to-database mode for INSERT-style table data (Tom Lane) </para> <para> Direct-to-database restores from archive files made with - <option>--inserts</> or <option>--column-inserts</> options fail when - using <application>pg_restore</> from a release dated September or + <option>--inserts</option> or <option>--column-inserts</option> options fail when + using <application>pg_restore</application> from a release dated September or December 2011, as a result of an oversight in a fix for another problem. The archive file itself is not at fault, and text-mode output is okay. @@ -7902,8 +7902,8 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Teach <application>pg_upgrade</> to handle renaming of - <application>plpython</>'s shared library (Bruce Momjian) + Teach <application>pg_upgrade</application> to handle renaming of + <application>plpython</application>'s shared library (Bruce Momjian) </para> <para> @@ -7914,20 +7914,20 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Allow <application>pg_upgrade</> to process tables containing - <type>regclass</> columns (Bruce Momjian) + Allow <application>pg_upgrade</application> to process tables containing + <type>regclass</type> columns (Bruce Momjian) </para> <para> - Since <application>pg_upgrade</> now takes care to preserve - <structname>pg_class</> OIDs, there was no longer any reason for this + Since <application>pg_upgrade</application> now takes care to preserve + <structname>pg_class</structname> OIDs, there was no longer any reason for this restriction. </para> </listitem> <listitem> <para> - Make <application>libpq</> ignore <literal>ENOTDIR</> errors + Make <application>libpq</application> ignore <literal>ENOTDIR</literal> errors when looking for an SSL client certificate file (Magnus Hagander) </para> @@ -7935,21 +7935,21 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> This allows SSL connections to be established, though without a certificate, even when the user's home directory is set to something - like <literal>/dev/null</>. + like <literal>/dev/null</literal>. </para> </listitem> <listitem> <para> - Fix some more field alignment issues in <application>ecpg</>'s SQLDA area + Fix some more field alignment issues in <application>ecpg</application>'s SQLDA area (Zoltan Boszormenyi) </para> </listitem> <listitem> <para> - Allow <literal>AT</> option in <application>ecpg</> - <literal>DEALLOCATE</> statements (Michael Meskes) + Allow <literal>AT</literal> option in <application>ecpg</application> + <literal>DEALLOCATE</literal> statements (Michael Meskes) </para> <para> @@ -7967,7 +7967,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix <filename>contrib/auto_explain</>'s JSON output mode to produce + Fix <filename>contrib/auto_explain</filename>'s JSON output mode to produce valid JSON (Andrew Dunstan) </para> @@ -7979,8 +7979,8 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix error in <filename>contrib/intarray</>'s <literal>int[] & - int[]</> operator (Guillaume Lelarge) + Fix error in <filename>contrib/intarray</filename>'s <literal>int[] & + int[]</literal> operator (Guillaume Lelarge) </para> <para> @@ -7992,8 +7992,8 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix error detection in <filename>contrib/pgcrypto</>'s - <function>encrypt_iv()</> and <function>decrypt_iv()</> + Fix error detection in <filename>contrib/pgcrypto</filename>'s + <function>encrypt_iv()</function> and <function>decrypt_iv()</function> (Marko Kreen) </para> @@ -8005,26 +8005,26 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix one-byte buffer overrun in <filename>contrib/test_parser</> + Fix one-byte buffer overrun in <filename>contrib/test_parser</filename> (Paul Guyot) </para> <para> The code would try to read one more byte than it should, which would crash in corner cases. - Since <filename>contrib/test_parser</> is only example code, this is + Since <filename>contrib/test_parser</filename> is only example code, this is not a security issue in itself, but bad example code is still bad. </para> </listitem> <listitem> <para> - Use <function>__sync_lock_test_and_set()</> for spinlocks on ARM, if + Use <function>__sync_lock_test_and_set()</function> for spinlocks on ARM, if available (Martin Pitt) </para> <para> - This function replaces our previous use of the <literal>SWPB</> + This function replaces our previous use of the <literal>SWPB</literal> instruction, which is deprecated and not available on ARMv6 and later. Reports suggest that the old code doesn't fail in an obvious way on recent ARM boards, but simply doesn't interlock concurrent accesses, @@ -8034,7 +8034,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Use <option>-fexcess-precision=standard</> option when building with + Use <option>-fexcess-precision=standard</option> option when building with gcc versions that accept it (Andrew Dunstan) </para> @@ -8090,19 +8090,19 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> However, a longstanding error was discovered in the definition of the - <literal>information_schema.referential_constraints</> view. If you + <literal>information_schema.referential_constraints</literal> view. If you rely on correct results from that view, you should replace its definition as explained in the first changelog item below. </para> <para> - Also, if you use the <type>citext</> data type, and you upgraded - from a previous major release by running <application>pg_upgrade</>, - you should run <literal>CREATE EXTENSION citext FROM unpackaged</> - to avoid collation-related failures in <type>citext</> operations. + Also, if you use the <type>citext</type> data type, and you upgraded + from a previous major release by running <application>pg_upgrade</application>, + you should run <literal>CREATE EXTENSION citext FROM unpackaged</literal> + to avoid collation-related failures in <type>citext</type> operations. The same is necessary if you restore a dump from a pre-9.1 database - that contains an instance of the <type>citext</> data type. - If you've already run the <command>CREATE EXTENSION</> command before + that contains an instance of the <type>citext</type> data type. + If you've already run the <command>CREATE EXTENSION</command> command before upgrading to 9.1.2, you will instead need to do manual catalog updates as explained in the second changelog item. </para> @@ -8116,7 +8116,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix bugs in <literal>information_schema.referential_constraints</> view + Fix bugs in <literal>information_schema.referential_constraints</literal> view (Tom Lane) </para> @@ -8129,50 +8129,50 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 </para> <para> - Since the view definition is installed by <application>initdb</>, + Since the view definition is installed by <application>initdb</application>, merely upgrading will not fix the problem. If you need to fix this in an existing installation, you can (as a superuser) drop the - <literal>information_schema</> schema then re-create it by sourcing - <filename><replaceable>SHAREDIR</>/information_schema.sql</filename>. - (Run <literal>pg_config --sharedir</> if you're uncertain where - <replaceable>SHAREDIR</> is.) This must be repeated in each database + <literal>information_schema</literal> schema then re-create it by sourcing + <filename><replaceable>SHAREDIR</replaceable>/information_schema.sql</filename>. + (Run <literal>pg_config --sharedir</literal> if you're uncertain where + <replaceable>SHAREDIR</replaceable> is.) This must be repeated in each database to be fixed. </para> </listitem> <listitem> <para> - Make <filename>contrib/citext</>'s upgrade script fix collations of - <type>citext</> columns and indexes (Tom Lane) + Make <filename>contrib/citext</filename>'s upgrade script fix collations of + <type>citext</type> columns and indexes (Tom Lane) </para> <para> - Existing <type>citext</> columns and indexes aren't correctly marked as - being of a collatable data type during <application>pg_upgrade</> from - a pre-9.1 server, or when a pre-9.1 dump containing the <type>citext</> + Existing <type>citext</type> columns and indexes aren't correctly marked as + being of a collatable data type during <application>pg_upgrade</application> from + a pre-9.1 server, or when a pre-9.1 dump containing the <type>citext</type> type is loaded into a 9.1 server. That leads to operations on these columns failing with errors such as <quote>could not determine which collation to use for string - comparison</>. This change allows them to be fixed by the same - script that upgrades the <type>citext</> module into a proper 9.1 - extension during <literal>CREATE EXTENSION citext FROM unpackaged</>. + comparison</quote>. This change allows them to be fixed by the same + script that upgrades the <type>citext</type> module into a proper 9.1 + extension during <literal>CREATE EXTENSION citext FROM unpackaged</literal>. </para> <para> If you have a previously-upgraded database that is suffering from this - problem, and you already ran the <command>CREATE EXTENSION</> command, - you can manually run (as superuser) the <command>UPDATE</> commands + problem, and you already ran the <command>CREATE EXTENSION</command> command, + you can manually run (as superuser) the <command>UPDATE</command> commands found at the end of - <filename><replaceable>SHAREDIR</>/extension/citext--unpackaged--1.0.sql</filename>. - (Run <literal>pg_config --sharedir</> if you're uncertain where - <replaceable>SHAREDIR</> is.) + <filename><replaceable>SHAREDIR</replaceable>/extension/citext--unpackaged--1.0.sql</filename>. + (Run <literal>pg_config --sharedir</literal> if you're uncertain where + <replaceable>SHAREDIR</replaceable> is.) There is no harm in doing this again if unsure. </para> </listitem> <listitem> <para> - Fix possible crash during <command>UPDATE</> or <command>DELETE</> that + Fix possible crash during <command>UPDATE</command> or <command>DELETE</command> that joins to the output of a scalar-returning function (Tom Lane) </para> @@ -8191,19 +8191,19 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> This could result in transiently failing to find index entries after a crash, or on a hot-standby server. The problem would be repaired - by the next <command>VACUUM</> of the index, however. + by the next <command>VACUUM</command> of the index, however. </para> </listitem> <listitem> <para> Fix TOAST-related data corruption during <literal>CREATE TABLE dest AS - SELECT * FROM src</> or <literal>INSERT INTO dest SELECT * FROM src</> + SELECT * FROM src</literal> or <literal>INSERT INTO dest SELECT * FROM src</literal> (Tom Lane) </para> <para> - If a table has been modified by <command>ALTER TABLE ADD COLUMN</>, + If a table has been modified by <command>ALTER TABLE ADD COLUMN</command>, attempts to copy its data verbatim to another table could produce corrupt results in certain corner cases. The problem can only manifest in this precise form in 8.4 and later, @@ -8233,7 +8233,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> The typical symptom was transient errors like <quote>missing chunk - number 0 for toast value NNNNN in pg_toast_2619</>, where the cited + number 0 for toast value NNNNN in pg_toast_2619</quote>, where the cited toast table would always belong to a system catalog. </para> </listitem> @@ -8249,7 +8249,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 or modified the function, leading to misbehavior when the function was used. Note that merely installing this update will not fix the missing dependency entries; to do that, you'd need to <command>CREATE OR - REPLACE</> each such function afterwards. If you have functions whose + REPLACE</command> each such function afterwards. If you have functions whose defaults depend on non-built-in objects, doing so is recommended. </para> </listitem> @@ -8262,7 +8262,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> This bug is known to lead to <quote>variable not found in subplan target - list</> planner errors, and could possibly result in wrong query output + list</quote> planner errors, and could possibly result in wrong query output when outer joins are involved. </para> </listitem> @@ -8275,13 +8275,13 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> Previously these could fail with <quote>could not find pathkey item to - sort</> planner errors. + sort</quote> planner errors. </para> </listitem> <listitem> <para> - Fix <quote>MergeAppend child's targetlist doesn't match MergeAppend</> + Fix <quote>MergeAppend child's targetlist doesn't match MergeAppend</quote> planner errors (Tom Lane) </para> </listitem> @@ -8296,7 +8296,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 In 9.1.0, an indexable operator that has a non-collatable left-hand input type and a collatable right-hand input type would not be recognized as matching the left-hand column's index. An example is - the <type>hstore</> <literal>?</> <type>text</> operator. + the <type>hstore</type> <literal>?</literal> <type>text</type> operator. </para> </listitem> @@ -8321,29 +8321,29 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Make <function>DatumGetInetP()</> unpack inet datums that have a 1-byte - header, and add a new macro, <function>DatumGetInetPP()</>, that does + Make <function>DatumGetInetP()</function> unpack inet datums that have a 1-byte + header, and add a new macro, <function>DatumGetInetPP()</function>, that does not (Heikki Linnakangas) </para> <para> This change affects no core code, but might prevent crashes in add-on - code that expects <function>DatumGetInetP()</> to produce an unpacked + code that expects <function>DatumGetInetP()</function> to produce an unpacked datum as per usual convention. </para> </listitem> <listitem> <para> - Improve locale support in <type>money</> type's input and output + Improve locale support in <type>money</type> type's input and output (Tom Lane) </para> <para> Aside from not supporting all standard - <link linkend="guc-lc-monetary"><varname>lc_monetary</></link> + <link linkend="guc-lc-monetary"><varname>lc_monetary</varname></link> formatting options, the input and output functions were inconsistent, - meaning there were locales in which dumped <type>money</> values could + meaning there were locales in which dumped <type>money</type> values could not be re-read. </para> </listitem> @@ -8351,15 +8351,15 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Don't let <link - linkend="guc-transform-null-equals"><varname>transform_null_equals</></link> - affect <literal>CASE foo WHEN NULL ...</> constructs + linkend="guc-transform-null-equals"><varname>transform_null_equals</varname></link> + affect <literal>CASE foo WHEN NULL ...</literal> constructs (Heikki Linnakangas) </para> <para> - <varname>transform_null_equals</> is only supposed to affect - <literal>foo = NULL</> expressions written directly by the user, not - equality checks generated internally by this form of <literal>CASE</>. + <varname>transform_null_equals</varname> is only supposed to affect + <literal>foo = NULL</literal> expressions written directly by the user, not + equality checks generated internally by this form of <literal>CASE</literal>. </para> </listitem> @@ -8371,14 +8371,14 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> For a cascading foreign key that references its own table, a row update - will fire both the <literal>ON UPDATE</> trigger and the - <literal>CHECK</> trigger as one event. The <literal>ON UPDATE</> - trigger must execute first, else the <literal>CHECK</> will check a + will fire both the <literal>ON UPDATE</literal> trigger and the + <literal>CHECK</literal> trigger as one event. The <literal>ON UPDATE</literal> + trigger must execute first, else the <literal>CHECK</literal> will check a non-final state of the row and possibly throw an inappropriate error. However, the firing order of these triggers is determined by their names, which generally sort in creation order since the triggers have auto-generated names following the convention - <quote>RI_ConstraintTrigger_NNNN</>. A proper fix would require + <quote>RI_ConstraintTrigger_NNNN</quote>. A proper fix would require modifying that convention, which we will do in 9.2, but it seems risky to change it in existing releases. So this patch just changes the creation order of the triggers. Users encountering this type of error @@ -8389,8 +8389,8 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix <literal>IF EXISTS</> to work correctly in <command>DROP OPERATOR - FAMILY</> (Robert Haas) + Fix <literal>IF EXISTS</literal> to work correctly in <command>DROP OPERATOR + FAMILY</command> (Robert Haas) </para> </listitem> @@ -8413,15 +8413,15 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> Relation rowtypes and automatically-generated array types do not need to - have their own extension membership entries in <structname>pg_depend</>, + have their own extension membership entries in <structname>pg_depend</structname>, and creating such entries complicates matters for extension upgrades. </para> </listitem> <listitem> <para> - Cope with invalid pre-existing <varname>search_path</> settings during - <command>CREATE EXTENSION</> (Tom Lane) + Cope with invalid pre-existing <varname>search_path</varname> settings during + <command>CREATE EXTENSION</command> (Tom Lane) </para> </listitem> @@ -8453,14 +8453,14 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Ensure walsender processes respond promptly to <systemitem>SIGTERM</> + Ensure walsender processes respond promptly to <systemitem>SIGTERM</systemitem> (Magnus Hagander) </para> </listitem> <listitem> <para> - Exclude <filename>postmaster.opts</> from base backups + Exclude <filename>postmaster.opts</filename> from base backups (Magnus Hagander) </para> </listitem> @@ -8473,20 +8473,20 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> Formerly, these would not be displayed correctly in the - <structname>pg_settings</> view. + <structname>pg_settings</structname> view. </para> </listitem> <listitem> <para> - Fix incorrect field alignment in <application>ecpg</>'s SQLDA area + Fix incorrect field alignment in <application>ecpg</application>'s SQLDA area (Zoltan Boszormenyi) </para> </listitem> <listitem> <para> - Preserve blank lines within commands in <application>psql</>'s command + Preserve blank lines within commands in <application>psql</application>'s command history (Robert Haas) </para> @@ -8498,41 +8498,41 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Avoid platform-specific infinite loop in <application>pg_dump</> + Avoid platform-specific infinite loop in <application>pg_dump</application> (Steve Singer) </para> </listitem> <listitem> <para> - Fix compression of plain-text output format in <application>pg_dump</> + Fix compression of plain-text output format in <application>pg_dump</application> (Adrian Klaver and Tom Lane) </para> <para> - <application>pg_dump</> has historically understood <literal>-Z</> with - no <literal>-F</> switch to mean that it should emit a gzip-compressed + <application>pg_dump</application> has historically understood <literal>-Z</literal> with + no <literal>-F</literal> switch to mean that it should emit a gzip-compressed version of its plain text output. Restore that behavior. </para> </listitem> <listitem> <para> - Fix <application>pg_dump</> to dump user-defined casts between + Fix <application>pg_dump</application> to dump user-defined casts between auto-generated types, such as table rowtypes (Tom Lane) </para> </listitem> <listitem> <para> - Fix missed quoting of foreign server names in <application>pg_dump</> + Fix missed quoting of foreign server names in <application>pg_dump</application> (Tom Lane) </para> </listitem> <listitem> <para> - Assorted fixes for <application>pg_upgrade</> (Bruce Momjian) + Assorted fixes for <application>pg_upgrade</application> (Bruce Momjian) </para> <para> @@ -8556,15 +8556,15 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> Restore the pre-9.1 behavior that PL/Perl functions returning - <type>void</> ignore the result value of their last Perl statement; + <type>void</type> ignore the result value of their last Perl statement; 9.1.0 would throw an error if that statement returned a reference. Also, make sure it works to return a string value for a composite type, so long as the string meets the type's input format. In addition, throw errors for attempts to return Perl arrays or hashes when the function's declared result type is not an array or composite type, respectively. (Pre-9.1 versions rather uselessly returned - strings like <literal>ARRAY(0x221a9a0)</> or - <literal>HASH(0x221aa90)</> in such cases.) + strings like <literal>ARRAY(0x221a9a0)</literal> or + <literal>HASH(0x221aa90)</literal> in such cases.) </para> </listitem> @@ -8577,7 +8577,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Use the preferred version of <application>xsubpp</> to build PL/Perl, + Use the preferred version of <application>xsubpp</application> to build PL/Perl, not necessarily the operating system's main copy (David Wheeler and Alex Hunsaker) </para> @@ -8599,14 +8599,14 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Change all the <filename>contrib</> extension script files to report - a useful error message if they are fed to <application>psql</> + Change all the <filename>contrib</filename> extension script files to report + a useful error message if they are fed to <application>psql</application> (Andrew Dunstan and Tom Lane) </para> <para> This should help teach people about the new method of using - <command>CREATE EXTENSION</> to load these files. In most cases, + <command>CREATE EXTENSION</command> to load these files. In most cases, sourcing the scripts directly would fail anyway, but with harder-to-interpret messages. </para> @@ -8614,19 +8614,19 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix incorrect coding in <filename>contrib/dict_int</> and - <filename>contrib/dict_xsyn</> (Tom Lane) + Fix incorrect coding in <filename>contrib/dict_int</filename> and + <filename>contrib/dict_xsyn</filename> (Tom Lane) </para> <para> Some functions incorrectly assumed that memory returned by - <function>palloc()</> is guaranteed zeroed. + <function>palloc()</function> is guaranteed zeroed. </para> </listitem> <listitem> <para> - Remove <filename>contrib/sepgsql</> tests from the regular regression + Remove <filename>contrib/sepgsql</filename> tests from the regular regression test mechanism (Tom Lane) </para> @@ -8639,14 +8639,14 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix assorted errors in <filename>contrib/unaccent</>'s configuration + Fix assorted errors in <filename>contrib/unaccent</filename>'s configuration file parsing (Tom Lane) </para> </listitem> <listitem> <para> - Honor query cancel interrupts promptly in <function>pgstatindex()</> + Honor query cancel interrupts promptly in <function>pgstatindex()</function> (Robert Haas) </para> </listitem> @@ -8660,7 +8660,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Revert unintentional enabling of <literal>WAL_DEBUG</> (Robert Haas) + Revert unintentional enabling of <literal>WAL_DEBUG</literal> (Robert Haas) </para> <para> @@ -8695,15 +8695,15 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 </para> <para> - Map <quote>Central America Standard Time</> to <literal>CST6</>, not - <literal>CST6CDT</>, because DST is generally not observed anywhere in + Map <quote>Central America Standard Time</quote> to <literal>CST6</literal>, not + <literal>CST6CDT</literal>, because DST is generally not observed anywhere in Central America. </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2011n + Update time zone data files to <application>tzdata</application> release 2011n for DST law changes in Brazil, Cuba, Fiji, Palestine, Russia, and Samoa; also historical corrections for Alaska and British East Africa. </para> @@ -8744,7 +8744,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Make <function>pg_options_to_table</> return NULL for an option with no + Make <function>pg_options_to_table</function> return NULL for an option with no value (Tom Lane) </para> @@ -8768,8 +8768,8 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Fix explicit reference to <literal>pg_temp</> schema in <command>CREATE - TEMPORARY TABLE</> (Robert Haas) + Fix explicit reference to <literal>pg_temp</literal> schema in <command>CREATE + TEMPORARY TABLE</command> (Robert Haas) </para> <para> @@ -8794,9 +8794,9 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <title>Overview</title> <para> - This release shows <productname>PostgreSQL</> moving beyond the + This release shows <productname>PostgreSQL</productname> moving beyond the traditional relational-database feature set with new, ground-breaking - functionality that is unique to <productname>PostgreSQL</>. + functionality that is unique to <productname>PostgreSQL</productname>. The streaming replication feature introduced in release 9.0 is significantly enhanced by adding a synchronous-replication option, streaming backups, and monitoring improvements. @@ -8831,7 +8831,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Add <link linkend="extend-extensions">extensions</link> which - simplify packaging of additions to <productname>PostgreSQL</> + simplify packaging of additions to <productname>PostgreSQL</productname> </para> </listitem> @@ -8844,32 +8844,32 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Support unlogged tables using the <literal>UNLOGGED</> + Support unlogged tables using the <literal>UNLOGGED</literal> option in <link linkend="SQL-CREATETABLE"><command>CREATE - TABLE</></link> + TABLE</command></link> </para> </listitem> <listitem> <para> Allow data-modification commands - (<command>INSERT</>/<command>UPDATE</>/<command>DELETE</>) in - <link linkend="queries-with"><literal>WITH</></link> clauses + (<command>INSERT</command>/<command>UPDATE</command>/<command>DELETE</command>) in + <link linkend="queries-with"><literal>WITH</literal></link> clauses </para> </listitem> <listitem> <para> Add nearest-neighbor (order-by-operator) searching to <link - linkend="GiST"><acronym>GiST</> indexes</link> + linkend="GiST"><acronym>GiST</acronym> indexes</link> </para> </listitem> <listitem> <para> Add a <link linkend="SQL-SECURITY-LABEL"><command>SECURITY - LABEL</></link> command and support for - <link linkend="sepgsql"><acronym>SELinux</> permissions control</link> + LABEL</command></link> command and support for + <link linkend="sepgsql"><acronym>SELinux</acronym> permissions control</link> </para> </listitem> @@ -8912,7 +8912,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Change the default value of <link - linkend="guc-standard-conforming-strings"><varname>standard_conforming_strings</></link> + linkend="guc-standard-conforming-strings"><varname>standard_conforming_strings</varname></link> to on (Robert Haas) </para> @@ -8920,8 +8920,8 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 By default, backslashes are now ordinary characters in string literals, not escape characters. This change removes a long-standing incompatibility with the SQL standard. <link - linkend="guc-escape-string-warning"><varname>escape_string_warning</></link> - has produced warnings about this usage for years. <literal>E''</> + linkend="guc-escape-string-warning"><varname>escape_string_warning</varname></link> + has produced warnings about this usage for years. <literal>E''</literal> strings are the proper way to embed backslash escapes in strings and are unaffected by this change. </para> @@ -8955,12 +8955,12 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> For example, disallow - <literal><replaceable>composite_value</>.text</literal> and - <literal>text(<replaceable>composite_value</>)</literal>. + <literal><replaceable>composite_value</replaceable>.text</literal> and + <literal>text(<replaceable>composite_value</replaceable>)</literal>. Unintentional uses of this syntax have frequently resulted in bug reports; although it was not a bug, it seems better to go back to rejecting such expressions. - The <literal>CAST</> and <literal>::</> syntaxes are still available + The <literal>CAST</literal> and <literal>::</literal> syntaxes are still available for use when a cast of an entire composite value is actually intended. </para> </listitem> @@ -8972,10 +8972,10 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> When a domain is based on an array type, it is allowed to <quote>look - through</> the domain type to access the array elements, including + through</quote> the domain type to access the array elements, including subscripting the domain value to fetch or assign an element. Assignment to an element of such a domain value, for instance via - <literal>UPDATE ... SET domaincol[5] = ...</>, will now result in + <literal>UPDATE ... SET domaincol[5] = ...</literal>, will now result in rechecking the domain type's constraints, whereas before the checks were skipped. </para> @@ -8993,7 +8993,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Change <link - linkend="array-functions-table"><function>string_to_array()</></link> + linkend="array-functions-table"><function>string_to_array()</function></link> to return an empty array for a zero-length string (Pavel Stehule) </para> @@ -9006,8 +9006,8 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Change <link - linkend="array-functions-table"><function>string_to_array()</></link> - so a <literal>NULL</> separator splits the string into characters + linkend="array-functions-table"><function>string_to_array()</function></link> + so a <literal>NULL</literal> separator splits the string into characters (Pavel Stehule) </para> @@ -9031,8 +9031,8 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 </para> <para> - Triggers can now be fired in three cases: <literal>BEFORE</>, - <literal>AFTER</>, or <literal>INSTEAD OF</> some action. + Triggers can now be fired in three cases: <literal>BEFORE</literal>, + <literal>AFTER</literal>, or <literal>INSTEAD OF</literal> some action. Trigger function authors should verify that their logic behaves sanely in all three cases. </para> @@ -9040,7 +9040,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Require superuser or <literal>CREATEROLE</> permissions in order to + Require superuser or <literal>CREATEROLE</literal> permissions in order to set comments on roles (Tom Lane) </para> </listitem> @@ -9057,12 +9057,12 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Change <link - linkend="functions-recovery-info-table"><function>pg_last_xlog_receive_location()</></link> + linkend="functions-recovery-info-table"><function>pg_last_xlog_receive_location()</function></link> so it never moves backwards (Fujii Masao) </para> <para> - Previously, the value of <function>pg_last_xlog_receive_location()</> + Previously, the value of <function>pg_last_xlog_receive_location()</function> could move backward when streaming replication is restarted. </para> </listitem> @@ -9070,7 +9070,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Have logging of replication connections honor <link - linkend="guc-log-connections"><varname>log_connections</></link> + linkend="guc-log-connections"><varname>log_connections</varname></link> (Magnus Hagander) </para> @@ -9090,12 +9090,12 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Change PL/pgSQL's <literal>RAISE</> command without parameters + Change PL/pgSQL's <literal>RAISE</literal> command without parameters to be catchable by the attached exception block (Piyush Newe) </para> <para> - Previously <literal>RAISE</> in a code block was always scoped to + Previously <literal>RAISE</literal> in a code block was always scoped to an attached exception block, so it was uncatchable at the same scope. </para> @@ -9154,7 +9154,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> All contrib modules are now installed with <link - linkend="SQL-CREATEEXTENSION"><command>CREATE EXTENSION</></link> + linkend="SQL-CREATEEXTENSION"><command>CREATE EXTENSION</command></link> rather than by manually invoking their SQL scripts (Dimitri Fontaine, Tom Lane) </para> @@ -9164,7 +9164,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 module, use <literal>CREATE EXTENSION ... FROM unpackaged</literal> to wrap the existing contrib module's objects into an extension. When updating from a pre-9.0 version, drop the contrib module's objects - using its old uninstall script, then use <literal>CREATE EXTENSION</>. + using its old uninstall script, then use <literal>CREATE EXTENSION</literal>. </para> </listitem> @@ -9180,26 +9180,26 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Make <link - linkend="monitoring-stats-funcs-table"><function>pg_stat_reset()</></link> + linkend="monitoring-stats-funcs-table"><function>pg_stat_reset()</function></link> reset all database-level statistics (Tomas Vondra) </para> <para> - Some <structname>pg_stat_database</> counters were not being reset. + Some <structname>pg_stat_database</structname> counters were not being reset. </para> </listitem> <listitem> <para> Fix some <link - linkend="infoschema-triggers"><structname>information_schema.triggers</></link> + linkend="infoschema-triggers"><structname>information_schema.triggers</structname></link> column names to match the new SQL-standard names (Dean Rasheed) </para> </listitem> <listitem> <para> - Treat <application>ECPG</> cursor names as case-insensitive + Treat <application>ECPG</application> cursor names as case-insensitive (Zoltan Boszormenyi) </para> </listitem> @@ -9228,9 +9228,9 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Support unlogged tables using the <literal>UNLOGGED</> + Support unlogged tables using the <literal>UNLOGGED</literal> option in <link linkend="SQL-CREATETABLE"><command>CREATE - TABLE</></link> (Robert Haas) + TABLE</command></link> (Robert Haas) </para> <para> @@ -9244,8 +9244,8 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Allow <literal>FULL OUTER JOIN</literal> to be implemented as a - hash join, and allow either side of a <literal>LEFT OUTER JOIN</> - or <literal>RIGHT OUTER JOIN</> to be hashed (Tom Lane) + hash join, and allow either side of a <literal>LEFT OUTER JOIN</literal> + or <literal>RIGHT OUTER JOIN</literal> to be hashed (Tom Lane) </para> <para> @@ -9270,7 +9270,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Improve performance of <link - linkend="guc-commit-siblings"><varname>commit_siblings</></link> + linkend="guc-commit-siblings"><varname>commit_siblings</varname></link> (Greg Smith) </para> @@ -9289,7 +9289,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Avoid leaving data files open after <quote>blind writes</> + Avoid leaving data files open after <quote>blind writes</quote> (Alvaro Herrera) </para> @@ -9317,7 +9317,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> This allows better optimization of queries that use <literal>ORDER - BY</>, <literal>LIMIT</>, or <literal>MIN</>/<literal>MAX</> with + BY</literal>, <literal>LIMIT</literal>, or <literal>MIN</literal>/<literal>MAX</literal> with inherited tables. </para> </listitem> @@ -9346,34 +9346,34 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Support host names and host suffixes - (e.g. <literal>.example.com</>) in <link - linkend="auth-pg-hba-conf"><filename>pg_hba.conf</></link> + (e.g. <literal>.example.com</literal>) in <link + linkend="auth-pg-hba-conf"><filename>pg_hba.conf</filename></link> (Peter Eisentraut) </para> <para> - Previously only host <acronym>IP</> addresses and <acronym>CIDR</> + Previously only host <acronym>IP</acronym> addresses and <acronym>CIDR</acronym> values were supported. </para> </listitem> <listitem> <para> - Support the key word <literal>all</> in the host column of <link - linkend="auth-pg-hba-conf"><filename>pg_hba.conf</></link> + Support the key word <literal>all</literal> in the host column of <link + linkend="auth-pg-hba-conf"><filename>pg_hba.conf</filename></link> (Peter Eisentraut) </para> <para> - Previously people used <literal>0.0.0.0/0</> or <literal>::/0</> + Previously people used <literal>0.0.0.0/0</literal> or <literal>::/0</literal> for this. </para> </listitem> <listitem> <para> - Reject <literal>local</> lines in <link - linkend="auth-pg-hba-conf"><filename>pg_hba.conf</></link> + Reject <literal>local</literal> lines in <link + linkend="auth-pg-hba-conf"><filename>pg_hba.conf</filename></link> on platforms that don't support Unix-socket connections (Magnus Hagander) </para> @@ -9386,14 +9386,14 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Allow <link linkend="gssapi-auth"><acronym>GSSAPI</></link> + Allow <link linkend="gssapi-auth"><acronym>GSSAPI</acronym></link> to be used to authenticate to servers via <link - linkend="sspi-auth"><acronym>SSPI</></link> (Christian Ullrich) + linkend="sspi-auth"><acronym>SSPI</acronym></link> (Christian Ullrich) </para> <para> - Specifically this allows Unix-based <acronym>GSSAPI</> clients - to do <acronym>SSPI</> authentication with Windows servers. + Specifically this allows Unix-based <acronym>GSSAPI</acronym> clients + to do <acronym>SSPI</acronym> authentication with Windows servers. </para> </listitem> @@ -9414,14 +9414,14 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Rewrite <link linkend="auth-peer"><acronym>peer</></link> + Rewrite <link linkend="auth-peer"><acronym>peer</acronym></link> authentication to avoid use of credential control messages (Tom Lane) </para> <para> This change makes the peer authentication code simpler and better-performing. However, it requires the platform to provide the - <function>getpeereid</> function or an equivalent socket operation. + <function>getpeereid</function> function or an equivalent socket operation. So far as is known, the only platform for which peer authentication worked before and now will not is pre-5.0 NetBSD. </para> @@ -9440,19 +9440,19 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> Add details to the logging of restartpoints and checkpoints, which is controlled by <link - linkend="guc-log-checkpoints"><varname>log_checkpoints</></link> + linkend="guc-log-checkpoints"><varname>log_checkpoints</varname></link> (Fujii Masao, Greg Smith) </para> <para> - New details include <acronym>WAL</> file and sync activity. + New details include <acronym>WAL</acronym> file and sync activity. </para> </listitem> <listitem> <para> Add <link - linkend="guc-log-file-mode"><varname>log_file_mode</></link> + linkend="guc-log-file-mode"><varname>log_file_mode</varname></link> which controls the permissions on log files created by the logging collector (Martin Pihlak) </para> @@ -9460,7 +9460,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Reduce the default maximum line length for <application>syslog</> + Reduce the default maximum line length for <application>syslog</application> logging to 900 bytes plus prefixes (Noah Misch) </para> @@ -9482,7 +9482,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Add <structfield>client_hostname</structfield> column to <link - linkend="monitoring-stats-views-table"><structname>pg_stat_activity</></link> + linkend="monitoring-stats-views-table"><structname>pg_stat_activity</structname></link> (Peter Eisentraut) </para> @@ -9494,7 +9494,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Add <link - linkend="monitoring-stats-views-table"><structname>pg_stat_xact_*</></link> + linkend="monitoring-stats-views-table"><structname>pg_stat_xact_*</structname></link> statistics functions and views (Joel Jacobson) </para> @@ -9515,15 +9515,15 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> Add columns showing the number of vacuum and analyze operations in <link - linkend="monitoring-stats-views-table"><structname>pg_stat_*_tables</></link> + linkend="monitoring-stats-views-table"><structname>pg_stat_*_tables</structname></link> views (Magnus Hagander) </para> </listitem> <listitem> <para> - Add <structfield>buffers_backend_fsync</> column to <link - linkend="monitoring-stats-views-table"><structname>pg_stat_bgwriter</></link> + Add <structfield>buffers_backend_fsync</structfield> column to <link + linkend="monitoring-stats-views-table"><structname>pg_stat_bgwriter</structname></link> (Greg Smith) </para> @@ -9545,13 +9545,13 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Provide auto-tuning of <link - linkend="guc-wal-buffers"><varname>wal_buffers</></link> (Greg + linkend="guc-wal-buffers"><varname>wal_buffers</varname></link> (Greg Smith) </para> <para> - By default, the value of <varname>wal_buffers</> is now chosen - automatically based on the value of <varname>shared_buffers</>. + By default, the value of <varname>wal_buffers</varname> is now chosen + automatically based on the value of <varname>shared_buffers</varname>. </para> </listitem> @@ -9598,7 +9598,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <link linkend="guc-synchronous-standby-names"><varname>synchronous_standby_names</varname></link> setting. Synchronous replication can be enabled or disabled on a per-transaction basis using the - <link linkend="guc-synchronous-commit"><varname>synchronous_commit</></link> + <link linkend="guc-synchronous-commit"><varname>synchronous_commit</varname></link> setting. </para> </listitem> @@ -9619,13 +9619,13 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Add - <varname>replication_timeout</> + <varname>replication_timeout</varname> setting (Fujii Masao, Heikki Linnakangas) </para> <para> Replication connections that are idle for more than the - <varname>replication_timeout</> interval will be terminated + <varname>replication_timeout</varname> interval will be terminated automatically. Formerly, a failed connection was typically not detected until the TCP timeout elapsed, which is inconveniently long in many situations. @@ -9635,7 +9635,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Add command-line tool <link - linkend="app-pgbasebackup"><application>pg_basebackup</></link> + linkend="app-pgbasebackup"><application>pg_basebackup</application></link> for creating a new standby server or database backup (Magnus Hagander) </para> @@ -9667,8 +9667,8 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Add system view <link - linkend="monitoring-stats-views-table"><structname>pg_stat_replication</></link> - which displays activity of <acronym>WAL</> sender processes (Itagaki + linkend="monitoring-stats-views-table"><structname>pg_stat_replication</structname></link> + which displays activity of <acronym>WAL</acronym> sender processes (Itagaki Takahiro, Simon Riggs) </para> @@ -9680,7 +9680,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Add monitoring function <link - linkend="functions-recovery-info-table"><function>pg_last_xact_replay_timestamp()</></link> + linkend="functions-recovery-info-table"><function>pg_last_xact_replay_timestamp()</function></link> (Fujii Masao) </para> @@ -9702,7 +9702,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Add configuration parameter <link - linkend="guc-hot-standby-feedback"><varname>hot_standby_feedback</></link> + linkend="guc-hot-standby-feedback"><varname>hot_standby_feedback</varname></link> to enable standbys to postpone cleanup of old row versions on the primary (Simon Riggs) </para> @@ -9715,7 +9715,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Add the <link - linkend="monitoring-stats-views-table"><structname>pg_stat_database_conflicts</></link> + linkend="monitoring-stats-views-table"><structname>pg_stat_database_conflicts</structname></link> system view to show queries that have been canceled and the reason (Magnus Hagander) </para> @@ -9728,8 +9728,8 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Add a <structfield>conflicts</> count to <link - linkend="monitoring-stats-views-table"><structname>pg_stat_database</></link> + Add a <structfield>conflicts</structfield> count to <link + linkend="monitoring-stats-views-table"><structname>pg_stat_database</structname></link> (Magnus Hagander) </para> @@ -9754,7 +9754,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Add <link - linkend="errcodes-table"><literal>ERRCODE_T_R_DATABASE_DROPPED</></link> + linkend="errcodes-table"><literal>ERRCODE_T_R_DATABASE_DROPPED</literal></link> error code to report recovery conflicts due to dropped databases (Tatsuo Ishii) </para> @@ -9780,18 +9780,18 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> The new functions are <link - linkend="functions-recovery-control-table"><function>pg_xlog_replay_pause()</></link>, + linkend="functions-recovery-control-table"><function>pg_xlog_replay_pause()</function></link>, <link - linkend="functions-recovery-control-table"><function>pg_xlog_replay_resume()</></link>, + linkend="functions-recovery-control-table"><function>pg_xlog_replay_resume()</function></link>, and the status function <link - linkend="functions-recovery-control-table"><function>pg_is_xlog_replay_paused()</></link>. + linkend="functions-recovery-control-table"><function>pg_is_xlog_replay_paused()</function></link>. </para> </listitem> <listitem> <para> - Add <filename>recovery.conf</> setting - <varname>pause_at_recovery_target</> + Add <filename>recovery.conf</filename> setting + <varname>pause_at_recovery_target</varname> to pause recovery at target (Simon Riggs) </para> @@ -9804,14 +9804,14 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Add the ability to create named restore points using <link - linkend="functions-admin-backup-table"><function>pg_create_restore_point()</></link> + linkend="functions-admin-backup-table"><function>pg_create_restore_point()</function></link> (Jaime Casanova) </para> <para> These named restore points can be specified as recovery - targets using the new <filename>recovery.conf</> setting - <link linkend="recovery-target-name"><varname>recovery_target_name</></link>. + targets using the new <filename>recovery.conf</filename> setting + <link linkend="recovery-target-name"><varname>recovery_target_name</varname></link>. </para> </listitem> @@ -9830,7 +9830,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Add <link - linkend="guc-restart-after-crash"><varname>restart_after_crash</></link> + linkend="guc-restart-after-crash"><varname>restart_after_crash</varname></link> setting which disables automatic server restart after a backend crash (Robert Haas) </para> @@ -9844,8 +9844,8 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Allow <link - linkend="recovery-config"><filename>recovery.conf</></link> - to use the same quoting behavior as <filename>postgresql.conf</> + linkend="recovery-config"><filename>recovery.conf</filename></link> + to use the same quoting behavior as <filename>postgresql.conf</filename> (Dimitri Fontaine) </para> @@ -9877,7 +9877,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 single MVCC snapshot would be used for the entire transaction, which allowed certain documented anomalies. The old snapshot isolation behavior is still available by requesting the <link - linkend="xact-repeatable-read"><literal>REPEATABLE READ</></link> + linkend="xact-repeatable-read"><literal>REPEATABLE READ</literal></link> isolation level. </para> </listitem> @@ -9885,30 +9885,30 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Allow data-modification commands - (<command>INSERT</>/<command>UPDATE</>/<command>DELETE</>) in - <link linkend="queries-with"><literal>WITH</></link> clauses + (<command>INSERT</command>/<command>UPDATE</command>/<command>DELETE</command>) in + <link linkend="queries-with"><literal>WITH</literal></link> clauses (Marko Tiikkaja, Hitoshi Harada) </para> <para> - These commands can use <literal>RETURNING</> to pass data up to the + These commands can use <literal>RETURNING</literal> to pass data up to the containing query. </para> </listitem> <listitem> <para> - Allow <link linkend="queries-with"><literal>WITH</></link> - clauses to be attached to <command>INSERT</>, <command>UPDATE</>, - <command>DELETE</> statements (Marko Tiikkaja, Hitoshi Harada) + Allow <link linkend="queries-with"><literal>WITH</literal></link> + clauses to be attached to <command>INSERT</command>, <command>UPDATE</command>, + <command>DELETE</command> statements (Marko Tiikkaja, Hitoshi Harada) </para> </listitem> <listitem> <para> Allow non-<link linkend="queries-group"><literal>GROUP - BY</></link> columns in the query target list when the primary - key is specified in the <literal>GROUP BY</> clause (Peter + BY</literal></link> columns in the query target list when the primary + key is specified in the <literal>GROUP BY</literal> clause (Peter Eisentraut) </para> @@ -9920,13 +9920,13 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Allow use of the key word <literal>DISTINCT</> in <link - linkend="queries-union"><literal>UNION</>/<literal>INTERSECT</>/<literal>EXCEPT</></link> + Allow use of the key word <literal>DISTINCT</literal> in <link + linkend="queries-union"><literal>UNION</literal>/<literal>INTERSECT</literal>/<literal>EXCEPT</literal></link> clauses (Tom Lane) </para> <para> - <literal>DISTINCT</> is the default behavior so use of this + <literal>DISTINCT</literal> is the default behavior so use of this key word is redundant, but the SQL standard allows it. </para> </listitem> @@ -9934,13 +9934,13 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Fix ordinary queries with rules to use the same snapshot behavior - as <command>EXPLAIN ANALYZE</> (Marko Tiikkaja) + as <command>EXPLAIN ANALYZE</command> (Marko Tiikkaja) </para> <para> - Previously <command>EXPLAIN ANALYZE</> used slightly different + Previously <command>EXPLAIN ANALYZE</command> used slightly different snapshot timing for queries involving rules. The - <command>EXPLAIN ANALYZE</> behavior was judged to be more logical. + <command>EXPLAIN ANALYZE</command> behavior was judged to be more logical. </para> </listitem> @@ -9962,7 +9962,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 Previously collation (the sort ordering of text strings) could only be chosen at database creation. Collation can now be set per column, domain, index, or - expression, via the SQL-standard <literal>COLLATE</> clause. + expression, via the SQL-standard <literal>COLLATE</literal> clause. </para> </listitem> @@ -9980,17 +9980,17 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Add <link linkend="extend-extensions">extensions</link> which - simplify packaging of additions to <productname>PostgreSQL</> + simplify packaging of additions to <productname>PostgreSQL</productname> (Dimitri Fontaine, Tom Lane) </para> <para> Extensions are controlled by the new <link - linkend="SQL-CREATEEXTENSION"><command>CREATE</></link>/<link - linkend="SQL-ALTEREXTENSION"><command>ALTER</></link>/<link - linkend="SQL-DROPEXTENSION"><command>DROP EXTENSION</></link> + linkend="SQL-CREATEEXTENSION"><command>CREATE</command></link>/<link + linkend="SQL-ALTEREXTENSION"><command>ALTER</command></link>/<link + linkend="SQL-DROPEXTENSION"><command>DROP EXTENSION</command></link> commands. This replaces ad-hoc methods of grouping objects that - are added to a <productname>PostgreSQL</> installation. + are added to a <productname>PostgreSQL</productname> installation. </para> </listitem> @@ -10003,7 +10003,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <para> This allows data stored outside the database to be used like - native <productname>PostgreSQL</>-stored data. Foreign tables + native <productname>PostgreSQL</productname>-stored data. Foreign tables are currently read-only, however. </para> </listitem> @@ -10011,7 +10011,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Allow new values to be added to an existing enum type via - <link linkend="SQL-ALTERTYPE"><command>ALTER TYPE</></link> (Andrew + <link linkend="SQL-ALTERTYPE"><command>ALTER TYPE</command></link> (Andrew Dunstan) </para> </listitem> @@ -10019,7 +10019,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Add <link linkend="SQL-ALTERTYPE"><command>ALTER TYPE ... - ADD/DROP/ALTER/RENAME ATTRIBUTE</></link> (Peter Eisentraut) + ADD/DROP/ALTER/RENAME ATTRIBUTE</command></link> (Peter Eisentraut) </para> <para> @@ -10030,28 +10030,28 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 </itemizedlist> <sect4> - <title><command>ALTER</> Object</title> + <title><command>ALTER</command> Object</title> <itemizedlist> <listitem> <para> - Add <literal>RESTRICT</>/<literal>CASCADE</> to <link - linkend="SQL-ALTERTYPE"><command>ALTER TYPE</></link> operations + Add <literal>RESTRICT</literal>/<literal>CASCADE</literal> to <link + linkend="SQL-ALTERTYPE"><command>ALTER TYPE</command></link> operations on typed tables (Peter Eisentraut) </para> <para> This controls - <literal>ADD</>/<literal>DROP</>/<literal>ALTER</>/<literal>RENAME - ATTRIBUTE</> cascading behavior. + <literal>ADD</literal>/<literal>DROP</literal>/<literal>ALTER</literal>/<literal>RENAME + ATTRIBUTE</literal> cascading behavior. </para> </listitem> <listitem> <para> - Support <literal>ALTER TABLE <replaceable>name</> {OF | NOT OF} - <replaceable>type</></literal> + Support <literal>ALTER TABLE <replaceable>name</replaceable> {OF | NOT OF} + <replaceable>type</replaceable></literal> (Noah Misch) </para> @@ -10064,7 +10064,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Add support for more object types in <command>ALTER ... SET - SCHEMA</> commands (Dimitri Fontaine) + SCHEMA</command> commands (Dimitri Fontaine) </para> <para> @@ -10079,7 +10079,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 </sect4> <sect4> - <title><link linkend="SQL-CREATETABLE"><command>CREATE/ALTER TABLE</></link></title> + <title><link linkend="SQL-CREATETABLE"><command>CREATE/ALTER TABLE</command></link></title> <itemizedlist> @@ -10098,13 +10098,13 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> - Allow <command>ALTER TABLE</> + Allow <command>ALTER TABLE</command> to add foreign keys without validation (Simon Riggs) </para> <para> - The new option is called <literal>NOT VALID</>. The constraint's - state can later be modified to <literal>VALIDATED</> and validation + The new option is called <literal>NOT VALID</literal>. The constraint's + state can later be modified to <literal>VALIDATED</literal> and validation checks performed. Together these allow you to add a foreign key with minimal impact on read and write operations. </para> @@ -10118,17 +10118,17 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 </para> <para> - For example, converting a <type>varchar</> column to - <type>text</> no longer requires a rewrite of the table. + For example, converting a <type>varchar</type> column to + <type>text</type> no longer requires a rewrite of the table. However, increasing the length constraint on a - <type>varchar</> column still requires a table rewrite. + <type>varchar</type> column still requires a table rewrite. </para> </listitem> <listitem> <para> Add <link linkend="SQL-CREATETABLE"><command>CREATE TABLE IF - NOT EXISTS</></link> syntax (Robert Haas) + NOT EXISTS</command></link> syntax (Robert Haas) </para> <para> @@ -10163,7 +10163,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Add a <link linkend="SQL-SECURITY-LABEL"><command>SECURITY - LABEL</></link> command (KaiGai Kohei) + LABEL</command></link> command (KaiGai Kohei) </para> <para> @@ -10197,7 +10197,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Make <link linkend="SQL-TRUNCATE"><command>TRUNCATE ... RESTART - IDENTITY</></link> restart sequences transactionally (Steve + IDENTITY</command></link> restart sequences transactionally (Steve Singer) </para> @@ -10211,26 +10211,26 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 </itemizedlist> <sect4> - <title><link linkend="SQL-COPY"><command>COPY</></link></title> + <title><link linkend="SQL-COPY"><command>COPY</command></link></title> <itemizedlist> <listitem> <para> - Add <literal>ENCODING</> option to <link - linkend="SQL-COPY"><command>COPY TO/FROM</></link> (Hitoshi + Add <literal>ENCODING</literal> option to <link + linkend="SQL-COPY"><command>COPY TO/FROM</command></link> (Hitoshi Harada, Itagaki Takahiro) </para> <para> - This allows the encoding of the <command>COPY</> file to be + This allows the encoding of the <command>COPY</command> file to be specified separately from client encoding. </para> </listitem> <listitem> <para> - Add bidirectional <link linkend="SQL-COPY"><command>COPY</></link> + Add bidirectional <link linkend="SQL-COPY"><command>COPY</command></link> protocol support (Fujii Masao) </para> @@ -10244,13 +10244,13 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 </sect4> <sect4> - <title><link linkend="SQL-EXPLAIN"><command>EXPLAIN</></link></title> + <title><link linkend="SQL-EXPLAIN"><command>EXPLAIN</command></link></title> <itemizedlist> <listitem> <para> - Make <command>EXPLAIN VERBOSE</> show the function call expression + Make <command>EXPLAIN VERBOSE</command> show the function call expression in a <literal>FunctionScan</literal> node (Tom Lane) </para> </listitem> @@ -10260,21 +10260,21 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 </sect4> <sect4> - <title><link linkend="SQL-VACUUM"><command>VACUUM</></link></title> + <title><link linkend="SQL-VACUUM"><command>VACUUM</command></link></title> <itemizedlist> <listitem> <para> Add additional details to the output of <link - linkend="SQL-VACUUM"><command>VACUUM FULL VERBOSE</></link> - and <link linkend="SQL-CLUSTER"><command>CLUSTER VERBOSE</></link> + linkend="SQL-VACUUM"><command>VACUUM FULL VERBOSE</command></link> + and <link linkend="SQL-CLUSTER"><command>CLUSTER VERBOSE</command></link> (Itagaki Takahiro) </para> <para> New information includes the live and dead tuple count and - whether <command>CLUSTER</> is using an index to rebuild. + whether <command>CLUSTER</command> is using an index to rebuild. </para> </listitem> @@ -10294,13 +10294,13 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 </sect4> <sect4> - <title><link linkend="SQL-CLUSTER"><command>CLUSTER</></link></title> + <title><link linkend="SQL-CLUSTER"><command>CLUSTER</command></link></title> <itemizedlist> <listitem> <para> - Allow <command>CLUSTER</> to sort the table rather than scanning + Allow <command>CLUSTER</command> to sort the table rather than scanning the index when it seems likely to be cheaper (Leonardo Francalanci) </para> </listitem> @@ -10317,12 +10317,12 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400 <listitem> <para> Add nearest-neighbor (order-by-operator) searching to <link - linkend="GiST"><acronym>GiST</> indexes</link> (Teodor Sigaev, Tom Lane) + linkend="GiST"><acronym>GiST</acronym> indexes</link> (Teodor Sigaev, Tom Lane) </para> <para> - This allows <acronym>GiST</> indexes to quickly return the - <replaceable>N</> closest values in a query with <literal>LIMIT</>. + This allows <acronym>GiST</acronym> indexes to quickly return the + <replaceable>N</replaceable> closest values in a query with <literal>LIMIT</literal>. For example <programlisting><![CDATA[ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; @@ -10334,19 +10334,19 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> - Allow <link linkend="GIN"><acronym>GIN</> indexes</link> to index null + Allow <link linkend="GIN"><acronym>GIN</acronym> indexes</link> to index null and empty values (Tom Lane) </para> <para> - This allows full <acronym>GIN</> index scans, and fixes various + This allows full <acronym>GIN</acronym> index scans, and fixes various corner cases in which GIN scans would fail. </para> </listitem> <listitem> <para> - Allow <link linkend="GIN"><acronym>GIN</> indexes</link> to + Allow <link linkend="GIN"><acronym>GIN</acronym> indexes</link> to better recognize duplicate search entries (Tom Lane) </para> @@ -10358,12 +10358,12 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> - Fix <link linkend="GiST"><acronym>GiST</> indexes</link> to be fully + Fix <link linkend="GiST"><acronym>GiST</acronym> indexes</link> to be fully crash-safe (Heikki Linnakangas) </para> <para> - Previously there were rare cases where a <command>REINDEX</> + Previously there were rare cases where a <command>REINDEX</command> would be required (you would be informed). </para> </listitem> @@ -10381,19 +10381,19 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> - Allow <type>numeric</> to use a more compact, two-byte header + Allow <type>numeric</type> to use a more compact, two-byte header in common cases (Robert Haas) </para> <para> - Previously all <type>numeric</> values had four-byte headers; + Previously all <type>numeric</type> values had four-byte headers; this change saves on disk storage. </para> </listitem> <listitem> <para> - Add support for dividing <type>money</> by <type>money</> + Add support for dividing <type>money</type> by <type>money</type> (Andy Balholm) </para> </listitem> @@ -10431,9 +10431,9 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; </para> <para> - This avoids possible <quote>could not identify a comparison function</> + This avoids possible <quote>could not identify a comparison function</quote> failures at runtime, if it is possible to implement the query without - sorting. Also, <command>ANALYZE</> won't try to use inappropriate + sorting. Also, <command>ANALYZE</command> won't try to use inappropriate statistics-gathering methods for columns of such composite types. </para> </listitem> @@ -10447,15 +10447,15 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> - Add support for casting between <type>money</> and <type>numeric</> + Add support for casting between <type>money</type> and <type>numeric</type> (Andy Balholm) </para> </listitem> <listitem> <para> - Add support for casting from <type>int4</> and <type>int8</> - to <type>money</> (Joey Adams) + Add support for casting from <type>int4</type> and <type>int8</type> + to <type>money</type> (Joey Adams) </para> </listitem> @@ -10476,15 +10476,15 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; </sect4> <sect4> - <title><link linkend="functions-xml"><acronym>XML</></link></title> + <title><link linkend="functions-xml"><acronym>XML</acronym></link></title> <itemizedlist> <listitem> <para> - Add <acronym>XML</> function <link - linkend="xml-exists"><literal>XMLEXISTS</></link> and <link - linkend="xml-exists"><function>xpath_exists()</></link> + Add <acronym>XML</acronym> function <link + linkend="xml-exists"><literal>XMLEXISTS</literal></link> and <link + linkend="xml-exists"><function>xpath_exists()</function></link> functions (Mike Fowler) </para> @@ -10495,17 +10495,17 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> - Add <acronym>XML</> functions <link - linkend="xml-is-well-formed"><function>xml_is_well_formed()</></link>, + Add <acronym>XML</acronym> functions <link + linkend="xml-is-well-formed"><function>xml_is_well_formed()</function></link>, <link - linkend="xml-is-well-formed"><function>xml_is_well_formed_document()</></link>, + linkend="xml-is-well-formed"><function>xml_is_well_formed_document()</function></link>, <link - linkend="xml-is-well-formed"><function>xml_is_well_formed_content()</></link> + linkend="xml-is-well-formed"><function>xml_is_well_formed_content()</function></link> (Mike Fowler) </para> <para> - These check whether the input is properly-formed <acronym>XML</>. + These check whether the input is properly-formed <acronym>XML</acronym>. They provide functionality that was previously available only in the deprecated <filename>contrib/xml2</filename> module. </para> @@ -10525,8 +10525,8 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> Add SQL function <link - linkend="format"><function>format(text, ...)</></link>, which - behaves analogously to C's <function>printf()</> (Pavel Stehule, + linkend="format"><function>format(text, ...)</function></link>, which + behaves analogously to C's <function>printf()</function> (Pavel Stehule, Robert Haas) </para> @@ -10539,13 +10539,13 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> Add string functions <link - linkend="functions-string-other"><function>concat()</></link>, + linkend="functions-string-other"><function>concat()</function></link>, <link - linkend="functions-string-other"><function>concat_ws()</></link>, - <link linkend="functions-string-other"><function>left()</></link>, - <link linkend="functions-string-other"><function>right()</></link>, + linkend="functions-string-other"><function>concat_ws()</function></link>, + <link linkend="functions-string-other"><function>left()</function></link>, + <link linkend="functions-string-other"><function>right()</function></link>, and <link - linkend="functions-string-other"><function>reverse()</></link> + linkend="functions-string-other"><function>reverse()</function></link> (Pavel Stehule) </para> @@ -10557,7 +10557,7 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> Add function <link - linkend="functions-admin-genfile"><function>pg_read_binary_file()</></link> + linkend="functions-admin-genfile"><function>pg_read_binary_file()</function></link> to read binary files (Dimitri Fontaine, Itagaki Takahiro) </para> </listitem> @@ -10565,7 +10565,7 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> Add a single-parameter version of function <link - linkend="functions-admin-genfile"><function>pg_read_file()</></link> + linkend="functions-admin-genfile"><function>pg_read_file()</function></link> to read an entire file (Dimitri Fontaine, Itagaki Takahiro) </para> </listitem> @@ -10573,9 +10573,9 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> Add three-parameter forms of <link - linkend="array-functions-table"><function>array_to_string()</></link> + linkend="array-functions-table"><function>array_to_string()</function></link> and <link - linkend="array-functions-table"><function>string_to_array()</></link> + linkend="array-functions-table"><function>string_to_array()</function></link> for null value processing control (Pavel Stehule) </para> </listitem> @@ -10590,7 +10590,7 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> Add the <link - linkend="functions-info-catalog-table"><function>pg_describe_object()</></link> + linkend="functions-info-catalog-table"><function>pg_describe_object()</function></link> function (Alvaro Herrera) </para> @@ -10619,10 +10619,10 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> Add variable <link - linkend="guc-quote-all-identifiers"><varname>quote_all_identifiers</></link> - to force the quoting of all identifiers in <command>EXPLAIN</> + linkend="guc-quote-all-identifiers"><varname>quote_all_identifiers</varname></link> + to force the quoting of all identifiers in <command>EXPLAIN</command> and in system catalog functions like <link - linkend="functions-info-catalog-table"><function>pg_get_viewdef()</></link> + linkend="functions-info-catalog-table"><function>pg_get_viewdef()</function></link> (Robert Haas) </para> @@ -10635,7 +10635,7 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> Add columns to the <link - linkend="infoschema-sequences"><structname>information_schema.sequences</></link> + linkend="infoschema-sequences"><structname>information_schema.sequences</structname></link> system view (Peter Eisentraut) </para> @@ -10647,8 +10647,8 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> - Allow <literal>public</> as a pseudo-role name in <link - linkend="functions-info-access-table"><function>has_table_privilege()</></link> + Allow <literal>public</literal> as a pseudo-role name in <link + linkend="functions-info-access-table"><function>has_table_privilege()</function></link> and related functions (Alvaro Herrera) </para> @@ -10669,7 +10669,7 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> Support <link linkend="SQL-CREATETRIGGER"><literal>INSTEAD - OF</></link> triggers on views (Dean Rasheed) + OF</literal></link> triggers on views (Dean Rasheed) </para> <para> @@ -10694,7 +10694,7 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> Add <link linkend="plpgsql-foreach-array"><command>FOREACH IN - ARRAY</></link> to PL/pgSQL + ARRAY</command></link> to PL/pgSQL (Pavel Stehule) </para> @@ -10734,7 +10734,7 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; </para> <para> - PL/Perl functions can now be declared to accept type <type>record</>. + PL/Perl functions can now be declared to accept type <type>record</type>. The behavior is the same as for any named composite type. </para> </listitem> @@ -10776,7 +10776,7 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; </para> <para> - PL/Python can now return multiple <literal>OUT</> parameters + PL/Python can now return multiple <literal>OUT</literal> parameters and record sets. </para> </listitem> @@ -10816,10 +10816,10 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <para> These functions are <link - linkend="plpython-util"><literal>plpy.quote_ident</></link>, - <link linkend="plpython-util"><literal>plpy.quote_literal</></link>, + linkend="plpython-util"><literal>plpy.quote_ident</literal></link>, + <link linkend="plpython-util"><literal>plpy.quote_literal</literal></link>, and <link - linkend="plpython-util"><literal>plpy.quote_nullable</></link>. + linkend="plpython-util"><literal>plpy.quote_nullable</literal></link>. </para> </listitem> @@ -10831,7 +10831,7 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> - Report PL/Python errors from iterators with <literal>PLy_elog</> (Jan + Report PL/Python errors from iterators with <literal>PLy_elog</literal> (Jan Urbanski) </para> </listitem> @@ -10843,7 +10843,7 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <para> Exception classes were previously not available in - <literal>plpy</> under Python 3. + <literal>plpy</literal> under Python 3. </para> </listitem> @@ -10860,7 +10860,7 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> - Mark <application>createlang</> and <application>droplang</> + Mark <application>createlang</application> and <application>droplang</application> as deprecated now that they just invoke extension commands (Tom Lane) </para> @@ -10869,64 +10869,64 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; </itemizedlist> <sect4> - <title><link linkend="APP-PSQL"><application>psql</></link></title> + <title><link linkend="APP-PSQL"><application>psql</application></link></title> <itemizedlist> <listitem> <para> - Add <application>psql</> command <literal>\conninfo</> + Add <application>psql</application> command <literal>\conninfo</literal> to show current connection information (David Christensen) </para> </listitem> <listitem> <para> - Add <application>psql</> command <literal>\sf</> to + Add <application>psql</application> command <literal>\sf</literal> to show a function's definition (Pavel Stehule) </para> </listitem> <listitem> <para> - Add <application>psql</> command <literal>\dL</> to list + Add <application>psql</application> command <literal>\dL</literal> to list languages (Fernando Ike) </para> </listitem> <listitem> <para> - Add the <option>S</> (<quote>system</>) option to <application>psql</>'s - <literal>\dn</> (list schemas) command (Tom Lane) + Add the <option>S</option> (<quote>system</quote>) option to <application>psql</application>'s + <literal>\dn</literal> (list schemas) command (Tom Lane) </para> <para> - <literal>\dn</> without <literal>S</> now suppresses system + <literal>\dn</literal> without <literal>S</literal> now suppresses system schemas. </para> </listitem> <listitem> <para> - Allow <application>psql</>'s <literal>\e</> and <literal>\ef</> + Allow <application>psql</application>'s <literal>\e</literal> and <literal>\ef</literal> commands to accept a line number to be used to position the cursor in the editor (Pavel Stehule) </para> <para> This is passed to the editor according to the - <envar>PSQL_EDITOR_LINENUMBER_ARG</> environment variable. + <envar>PSQL_EDITOR_LINENUMBER_ARG</envar> environment variable. </para> </listitem> <listitem> <para> - Have <application>psql</> set the client encoding from the + Have <application>psql</application> set the client encoding from the operating system locale by default (Heikki Linnakangas) </para> <para> - This only happens if the <envar>PGCLIENTENCODING</> environment + This only happens if the <envar>PGCLIENTENCODING</envar> environment variable is not set. </para> </listitem> @@ -10940,8 +10940,8 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> - Make <literal>\dt+</literal> report <function>pg_table_size</> - instead of <function>pg_relation_size</> when talking to 9.0 or + Make <literal>\dt+</literal> report <function>pg_table_size</function> + instead of <function>pg_relation_size</function> when talking to 9.0 or later servers (Bernd Helmle) </para> @@ -10963,29 +10963,29 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; </sect4> <sect4> - <title><link linkend="APP-PGDUMP"><application>pg_dump</></link></title> + <title><link linkend="APP-PGDUMP"><application>pg_dump</application></link></title> <itemizedlist> <listitem> <para> - Add <link linkend="APP-PGDUMP"><application>pg_dump</></link> + Add <link linkend="APP-PGDUMP"><application>pg_dump</application></link> and <link - linkend="APP-PG-DUMPALL"><application>pg_dumpall</></link> - option <option>--quote-all-identifiers</> to force quoting + linkend="APP-PG-DUMPALL"><application>pg_dumpall</application></link> + option <option>--quote-all-identifiers</option> to force quoting of all identifiers (Robert Haas) </para> </listitem> <listitem> <para> - Add <literal>directory</> format to <application>pg_dump</> + Add <literal>directory</literal> format to <application>pg_dump</application> (Joachim Wieland, Heikki Linnakangas) </para> <para> - This is internally similar to the <literal>tar</> - <application>pg_dump</> format. + This is internally similar to the <literal>tar</literal> + <application>pg_dump</application> format. </para> </listitem> @@ -10994,27 +10994,27 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; </sect4> <sect4> - <title><link linkend="APP-PG-CTL"><application>pg_ctl</></link></title> + <title><link linkend="APP-PG-CTL"><application>pg_ctl</application></link></title> <itemizedlist> <listitem> <para> - Fix <application>pg_ctl</> + Fix <application>pg_ctl</application> so it no longer incorrectly reports that the server is not running (Bruce Momjian) </para> <para> Previously this could happen if the server was running but - <application>pg_ctl</> could not authenticate. + <application>pg_ctl</application> could not authenticate. </para> </listitem> <listitem> <para> - Improve <application>pg_ctl</> start's <quote>wait</quote> - (<option>-w</>) option (Bruce Momjian, Tom Lane) + Improve <application>pg_ctl</application> start's <quote>wait</quote> + (<option>-w</option>) option (Bruce Momjian, Tom Lane) </para> <para> @@ -11027,7 +11027,7 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> - Add <literal>promote</> option to <application>pg_ctl</> to + Add <literal>promote</literal> option to <application>pg_ctl</application> to switch a standby server to primary (Fujii Masao) </para> </listitem> @@ -11039,23 +11039,23 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; </sect3> <sect3> - <title><application>Development Tools</></title> + <title><application>Development Tools</application></title> <sect4> - <title><link linkend="libpq"><application>libpq</></link></title> + <title><link linkend="libpq"><application>libpq</application></link></title> <itemizedlist> <listitem> <para> Add a libpq connection option <link - linkend="libpq-connect-client-encoding"><literal>client_encoding</></link> - which behaves like the <envar>PGCLIENTENCODING</> environment + linkend="libpq-connect-client-encoding"><literal>client_encoding</literal></link> + which behaves like the <envar>PGCLIENTENCODING</envar> environment variable (Heikki Linnakangas) </para> <para> - The value <literal>auto</> sets the client encoding based on + The value <literal>auto</literal> sets the client encoding based on the operating system locale. </para> </listitem> @@ -11063,13 +11063,13 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> Add <link - linkend="libpq-pqlibversion"><function>PQlibVersion()</></link> + linkend="libpq-pqlibversion"><function>PQlibVersion()</function></link> function which returns the libpq library version (Magnus Hagander) </para> <para> - libpq already had <function>PQserverVersion()</> which returns + libpq already had <function>PQserverVersion()</function> which returns the server version. </para> </listitem> @@ -11079,22 +11079,22 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; Allow libpq-using clients to check the user name of the server process when connecting via Unix-domain sockets, with the new <link - linkend="libpq-connect-requirepeer"><literal>requirepeer</></link> + linkend="libpq-connect-requirepeer"><literal>requirepeer</literal></link> connection option (Peter Eisentraut) </para> <para> - <productname>PostgreSQL</> already allowed servers to check + <productname>PostgreSQL</productname> already allowed servers to check the client user name when connecting via Unix-domain sockets. </para> </listitem> <listitem> <para> - Add <link linkend="libpq-pqping"><function>PQping()</></link> + Add <link linkend="libpq-pqping"><function>PQping()</function></link> and <link - linkend="libpq-pqpingparams"><function>PQpingParams()</></link> + linkend="libpq-pqpingparams"><function>PQpingParams()</function></link> to libpq (Bruce Momjian, Tom Lane) </para> @@ -11109,7 +11109,7 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; </sect4> <sect4> - <title><link linkend="ecpg"><application>ECPG</></link></title> + <title><link linkend="ecpg"><application>ECPG</application></link></title> <itemizedlist> @@ -11123,7 +11123,7 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> - Make <application>ecpglib</> write <type>double</> values with a + Make <application>ecpglib</application> write <type>double</type> values with a precision of 15 digits, not 14 as formerly (Akira Kurosawa) </para> </listitem> @@ -11140,7 +11140,7 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> - Use <literal>+Olibmerrno</> compile flag with HP-UX C compilers + Use <literal>+Olibmerrno</literal> compile flag with HP-UX C compilers that accept it (Ibrar Ahmed) </para> @@ -11163,15 +11163,15 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; </para> <para> - This allows for faster compiles. Also, <literal>make -k</> + This allows for faster compiles. Also, <literal>make -k</literal> now works more consistently. </para> </listitem> <listitem> <para> - Require <acronym>GNU</> <link - linkend="install-requirements"><application>make</></link> + Require <acronym>GNU</acronym> <link + linkend="install-requirements"><application>make</application></link> 3.80 or newer (Peter Eisentraut) </para> @@ -11182,7 +11182,7 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> - Add <literal>make maintainer-check</> target + Add <literal>make maintainer-check</literal> target (Peter Eisentraut) </para> @@ -11195,15 +11195,15 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> - Support <literal>make check</> in <filename>contrib</> + Support <literal>make check</literal> in <filename>contrib</filename> (Peter Eisentraut) </para> <para> - Formerly only <literal>make installcheck</> worked, but now + Formerly only <literal>make installcheck</literal> worked, but now there is support for testing in a temporary installation. - The top-level <literal>make check-world</> target now includes - testing <filename>contrib</> this way. + The top-level <literal>make check-world</literal> target now includes + testing <filename>contrib</filename> this way. </para> </listitem> @@ -11219,7 +11219,7 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> On Windows, allow <link - linkend="app-pg-ctl"><application>pg_ctl</></link> to register + linkend="app-pg-ctl"><application>pg_ctl</application></link> to register the service as auto-start or start-on-demand (Quan Zongliang) </para> </listitem> @@ -11231,7 +11231,7 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; </para> <para> - <productname>minidumps</> can now be generated by non-debug + <productname>minidumps</productname> can now be generated by non-debug Windows binaries and analyzed by standard debugging tools. </para> </listitem> @@ -11287,7 +11287,7 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> - Add missing <function>get_<replaceable>object</>_oid()</function> functions, for consistency + Add missing <function>get_<replaceable>object</replaceable>_oid()</function> functions, for consistency (Robert Haas) </para> </listitem> @@ -11302,13 +11302,13 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> - Add support for DragonFly <acronym>BSD</> (Rumko) + Add support for DragonFly <acronym>BSD</acronym> (Rumko) </para> </listitem> <listitem> <para> - Expose <function>quote_literal_cstr()</> for backend use + Expose <function>quote_literal_cstr()</function> for backend use (Robert Haas) </para> </listitem> @@ -11321,22 +11321,22 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <para> Regression tests were previously always run with - <literal>SQL_ASCII</> encoding. + <literal>SQL_ASCII</literal> encoding. </para> </listitem> <listitem> <para> - Add <application>src/tools/git_changelog</> to replace - <application>cvs2cl</> and <application>pgcvslog</> (Robert + Add <application>src/tools/git_changelog</application> to replace + <application>cvs2cl</application> and <application>pgcvslog</application> (Robert Haas, Tom Lane) </para> </listitem> <listitem> <para> - Add <application>git-external-diff</> script to - <filename>src/tools</> (Bruce Momjian) + Add <application>git-external-diff</application> script to + <filename>src/tools</filename> (Bruce Momjian) </para> <para> @@ -11391,7 +11391,7 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> - Modify <filename>contrib</> modules and procedural + Modify <filename>contrib</filename> modules and procedural languages to install via the new <link linkend="extend-extensions">extension</link> mechanism (Tom Lane, Dimitri Fontaine) @@ -11400,21 +11400,21 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> - Add <link linkend="file-fdw"><filename>contrib/file_fdw</></link> + Add <link linkend="file-fdw"><filename>contrib/file_fdw</filename></link> foreign-data wrapper (Shigeru Hanada) </para> <para> Foreign tables using this foreign data wrapper can read flat files - in a manner very similar to <command>COPY</>. + in a manner very similar to <command>COPY</command>. </para> </listitem> <listitem> <para> Add nearest-neighbor search support to <link - linkend="pgtrgm"><filename>contrib/pg_trgm</></link> and <link - linkend="btree-gist"><filename>contrib/btree_gist</></link> + linkend="pgtrgm"><filename>contrib/pg_trgm</filename></link> and <link + linkend="btree-gist"><filename>contrib/btree_gist</filename></link> (Teodor Sigaev) </para> </listitem> @@ -11422,7 +11422,7 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> Add <link - linkend="btree-gist"><filename>contrib/btree_gist</></link> + linkend="btree-gist"><filename>contrib/btree_gist</filename></link> support for searching on not-equals (Jeff Davis) </para> </listitem> @@ -11430,25 +11430,25 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> Fix <link - linkend="fuzzystrmatch"><filename>contrib/fuzzystrmatch</></link>'s - <function>levenshtein()</> function to handle multibyte characters + linkend="fuzzystrmatch"><filename>contrib/fuzzystrmatch</filename></link>'s + <function>levenshtein()</function> function to handle multibyte characters (Alexander Korotkov) </para> </listitem> <listitem> <para> - Add <function>ssl_cipher()</> and <function>ssl_version()</> + Add <function>ssl_cipher()</function> and <function>ssl_version()</function> functions to <link - linkend="sslinfo"><filename>contrib/sslinfo</></link> (Robert + linkend="sslinfo"><filename>contrib/sslinfo</filename></link> (Robert Haas) </para> </listitem> <listitem> <para> - Fix <link linkend="intarray"><filename>contrib/intarray</></link> - and <link linkend="hstore"><filename>contrib/hstore</></link> + Fix <link linkend="intarray"><filename>contrib/intarray</filename></link> + and <link linkend="hstore"><filename>contrib/hstore</filename></link> to give consistent results with indexed empty arrays (Tom Lane) </para> @@ -11460,7 +11460,7 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> - Allow <link linkend="intarray"><filename>contrib/intarray</></link> + Allow <link linkend="intarray"><filename>contrib/intarray</filename></link> to work properly on multidimensional arrays (Tom Lane) </para> </listitem> @@ -11468,7 +11468,7 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> In - <link linkend="intarray"><filename>contrib/intarray</></link>, + <link linkend="intarray"><filename>contrib/intarray</filename></link>, avoid errors complaining about the presence of nulls in cases where no nulls are actually present (Tom Lane) </para> @@ -11477,7 +11477,7 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> In - <link linkend="intarray"><filename>contrib/intarray</></link>, + <link linkend="intarray"><filename>contrib/intarray</filename></link>, fix behavior of containment operators with respect to empty arrays (Tom Lane) </para> @@ -11490,10 +11490,10 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> - Remove <link linkend="xml2"><filename>contrib/xml2</></link>'s + Remove <link linkend="xml2"><filename>contrib/xml2</filename></link>'s arbitrary limit on the number of - <replaceable>parameter</>=<replaceable>value</> pairs that can be - handled by <function>xslt_process()</> (Pavel Stehule) + <replaceable>parameter</replaceable>=<replaceable>value</replaceable> pairs that can be + handled by <function>xslt_process()</function> (Pavel Stehule) </para> <para> @@ -11503,7 +11503,7 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> - In <link linkend="pageinspect"><filename>contrib/pageinspect</></link>, + In <link linkend="pageinspect"><filename>contrib/pageinspect</filename></link>, fix heap_page_item to return infomasks as 32-bit values (Alvaro Herrera) </para> @@ -11522,13 +11522,13 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> - Add <link linkend="sepgsql"><filename>contrib/sepgsql</></link> - to interface permission checks with <acronym>SELinux</> (KaiGai Kohei) + Add <link linkend="sepgsql"><filename>contrib/sepgsql</filename></link> + to interface permission checks with <acronym>SELinux</acronym> (KaiGai Kohei) </para> <para> This uses the new <link - linkend="SQL-SECURITY-LABEL"><command>SECURITY LABEL</></link> + linkend="SQL-SECURITY-LABEL"><command>SECURITY LABEL</command></link> facility. </para> </listitem> @@ -11536,7 +11536,7 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> Add contrib module <link - linkend="auth-delay"><filename>auth_delay</></link> (KaiGai + linkend="auth-delay"><filename>auth_delay</filename></link> (KaiGai Kohei) </para> @@ -11549,7 +11549,7 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> - Add <filename>dummy_seclabel</> + Add <filename>dummy_seclabel</filename> contrib module (KaiGai Kohei) </para> @@ -11569,17 +11569,17 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> - Add support for <literal>LIKE</> and <literal>ILIKE</> index + Add support for <literal>LIKE</literal> and <literal>ILIKE</literal> index searches to <link - linkend="pgtrgm"><filename>contrib/pg_trgm</></link> (Alexander + linkend="pgtrgm"><filename>contrib/pg_trgm</filename></link> (Alexander Korotkov) </para> </listitem> <listitem> <para> - Add <function>levenshtein_less_equal()</> function to <link - linkend="fuzzystrmatch"><filename>contrib/fuzzystrmatch</></link>, + Add <function>levenshtein_less_equal()</function> function to <link + linkend="fuzzystrmatch"><filename>contrib/fuzzystrmatch</filename></link>, which is optimized for small distances (Alexander Korotkov) </para> </listitem> @@ -11587,7 +11587,7 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> Improve performance of index lookups on <link - linkend="seg"><filename>contrib/seg</></link> columns (Alexander + linkend="seg"><filename>contrib/seg</filename></link> columns (Alexander Korotkov) </para> </listitem> @@ -11595,7 +11595,7 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> Improve performance of <link - linkend="pgupgrade"><application>pg_upgrade</></link> for + linkend="pgupgrade"><application>pg_upgrade</application></link> for databases with many relations (Bruce Momjian) </para> </listitem> @@ -11603,7 +11603,7 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> Add flag to <link - linkend="pgbench"><filename>contrib/pgbench</></link> to + linkend="pgbench"><filename>contrib/pgbench</filename></link> to report per-statement latencies (Florian Pflug) </para> </listitem> @@ -11619,29 +11619,29 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> - Move <filename>src/tools/test_fsync</> to <link - linkend="pgtestfsync"><filename>contrib/pg_test_fsync</></link> + Move <filename>src/tools/test_fsync</filename> to <link + linkend="pgtestfsync"><filename>contrib/pg_test_fsync</filename></link> (Bruce Momjian, Tom Lane) </para> </listitem> <listitem> <para> - Add <literal>O_DIRECT</> support to <link - linkend="pgtestfsync"><filename>contrib/pg_test_fsync</></link> + Add <literal>O_DIRECT</literal> support to <link + linkend="pgtestfsync"><filename>contrib/pg_test_fsync</filename></link> (Bruce Momjian) </para> <para> - This matches the use of <literal>O_DIRECT</> by <link - linkend="guc-wal-sync-method"><varname>wal_sync_method</></link>. + This matches the use of <literal>O_DIRECT</literal> by <link + linkend="guc-wal-sync-method"><varname>wal_sync_method</varname></link>. </para> </listitem> <listitem> <para> Add new tests to <link - linkend="pgtestfsync"><filename>contrib/pg_test_fsync</></link> + linkend="pgtestfsync"><filename>contrib/pg_test_fsync</filename></link> (Bruce Momjian) </para> </listitem> @@ -11659,7 +11659,7 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> - Extensive <link linkend="ecpg"><application>ECPG</></link> + Extensive <link linkend="ecpg"><application>ECPG</application></link> documentation improvements (Satoshi Nagayasu) </para> </listitem> @@ -11674,7 +11674,7 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> Add documentation for <link - linkend="guc-exit-on-error"><varname>exit_on_error</></link> + linkend="guc-exit-on-error"><varname>exit_on_error</varname></link> (Robert Haas) </para> @@ -11686,7 +11686,7 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> Add documentation for <link - linkend="functions-info-catalog-table"><function>pg_options_to_table()</></link> + linkend="functions-info-catalog-table"><function>pg_options_to_table()</function></link> (Josh Berkus) </para> @@ -11699,7 +11699,7 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <para> Document that it is possible to access all composite type fields using <link - linkend="field-selection"><literal>(compositeval).*</></link> + linkend="field-selection"><literal>(compositeval).*</literal></link> syntax (Peter Eisentraut) </para> </listitem> @@ -11707,16 +11707,16 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> Document that <link - linkend="functions-string-other"><function>translate()</></link> - removes characters in <literal>from</> that don't have a - corresponding <literal>to</> character (Josh Kupershmidt) + linkend="functions-string-other"><function>translate()</function></link> + removes characters in <literal>from</literal> that don't have a + corresponding <literal>to</literal> character (Josh Kupershmidt) </para> </listitem> <listitem> <para> - Merge documentation for <command>CREATE CONSTRAINT TRIGGER</> and <link - linkend="SQL-CREATETRIGGER"><command>CREATE TRIGGER</></link> + Merge documentation for <command>CREATE CONSTRAINT TRIGGER</command> and <link + linkend="SQL-CREATETRIGGER"><command>CREATE TRIGGER</command></link> (Alvaro Herrera) </para> </listitem> @@ -11741,12 +11741,12 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; <listitem> <para> - Handle non-ASCII characters consistently in <filename>HISTORY</> file + Handle non-ASCII characters consistently in <filename>HISTORY</filename> file (Peter Eisentraut) </para> <para> - While the <filename>HISTORY</> file is in English, we do have to deal + While the <filename>HISTORY</filename> file is in English, we do have to deal with non-ASCII letters in contributor names. These are now transliterated so that they are reasonably legible without assumptions about character set. diff --git a/doc/src/sgml/release-9.2.sgml b/doc/src/sgml/release-9.2.sgml index 6fa21e3759c..ca8c87a4aba 100644 --- a/doc/src/sgml/release-9.2.sgml +++ b/doc/src/sgml/release-9.2.sgml @@ -16,7 +16,7 @@ </para> <para> - The <productname>PostgreSQL</> community will stop releasing updates + The <productname>PostgreSQL</productname> community will stop releasing updates for the 9.2.X release series in September 2017. Users are encouraged to update to a newer release branch soon. </para> @@ -43,20 +43,20 @@ <listitem> <para> Show foreign tables - in <structname>information_schema</>.<structname>table_privileges</> + in <structname>information_schema</structname>.<structname>table_privileges</structname> view (Peter Eisentraut) </para> <para> - All other relevant <structname>information_schema</> views include + All other relevant <structname>information_schema</structname> views include foreign tables, but this one ignored them. </para> <para> - Since this view definition is installed by <application>initdb</>, + Since this view definition is installed by <application>initdb</application>, merely upgrading will not fix the problem. If you need to fix this in an existing installation, you can, as a superuser, do this - in <application>psql</>: + in <application>psql</application>: <programlisting> SET search_path TO information_schema; CREATE OR REPLACE VIEW table_privileges AS @@ -95,21 +95,21 @@ CREATE OR REPLACE VIEW table_privileges AS OR grantee.rolname = 'PUBLIC'); </programlisting> This must be repeated in each database to be fixed, - including <literal>template0</>. + including <literal>template0</literal>. </para> </listitem> <listitem> <para> Clean up handling of a fatal exit (e.g., due to receipt - of <systemitem>SIGTERM</>) that occurs while trying to execute - a <command>ROLLBACK</> of a failed transaction (Tom Lane) + of <systemitem>SIGTERM</systemitem>) that occurs while trying to execute + a <command>ROLLBACK</command> of a failed transaction (Tom Lane) </para> <para> This situation could result in an assertion failure. In production builds, the exit would still occur, but it would log an unexpected - message about <quote>cannot drop active portal</>. + message about <quote>cannot drop active portal</quote>. </para> </listitem> @@ -126,7 +126,7 @@ CREATE OR REPLACE VIEW table_privileges AS </para> <para> - Certain <command>ALTER</> commands that change the definition of a + Certain <command>ALTER</command> commands that change the definition of a composite type or domain type are supposed to fail if there are any stored values of that type in the database, because they lack the infrastructure needed to update or check such values. Previously, @@ -138,13 +138,13 @@ CREATE OR REPLACE VIEW table_privileges AS <listitem> <para> - Change <application>ecpg</>'s parser to allow <literal>RETURNING</> + Change <application>ecpg</application>'s parser to allow <literal>RETURNING</literal> clauses without attached C variables (Michael Meskes) </para> <para> - This allows <application>ecpg</> programs to contain SQL constructs - that use <literal>RETURNING</> internally (for example, inside a CTE) + This allows <application>ecpg</application> programs to contain SQL constructs + that use <literal>RETURNING</literal> internally (for example, inside a CTE) rather than using it to define values to be returned to the client. </para> </listitem> @@ -156,12 +156,12 @@ CREATE OR REPLACE VIEW table_privileges AS <para> This fix avoids possible crashes of PL/Perl due to inconsistent - assumptions about the width of <type>time_t</> values. + assumptions about the width of <type>time_t</type> values. A side-effect that may be visible to extension developers is - that <literal>_USE_32BIT_TIME_T</> is no longer defined globally - in <productname>PostgreSQL</> Windows builds. This is not expected - to cause problems, because type <type>time_t</> is not used - in any <productname>PostgreSQL</> API definitions. + that <literal>_USE_32BIT_TIME_T</literal> is no longer defined globally + in <productname>PostgreSQL</productname> Windows builds. This is not expected + to cause problems, because type <type>time_t</type> is not used + in any <productname>PostgreSQL</productname> API definitions. </para> </listitem> @@ -185,7 +185,7 @@ CREATE OR REPLACE VIEW table_privileges AS </para> <para> - The <productname>PostgreSQL</> community will stop releasing updates + The <productname>PostgreSQL</productname> community will stop releasing updates for the 9.2.X release series in September 2017. Users are encouraged to update to a newer release branch soon. </para> @@ -217,7 +217,7 @@ CREATE OR REPLACE VIEW table_privileges AS <listitem> <para> Further restrict visibility - of <structname>pg_user_mappings</>.<structfield>umoptions</>, to + of <structname>pg_user_mappings</structname>.<structfield>umoptions</structfield>, to protect passwords stored as user mapping options (Noah Misch) </para> @@ -225,11 +225,11 @@ CREATE OR REPLACE VIEW table_privileges AS <para> The fix for CVE-2017-7486 was incorrect: it allowed a user to see the options in her own user mapping, even if she did not - have <literal>USAGE</> permission on the associated foreign server. + have <literal>USAGE</literal> permission on the associated foreign server. Such options might include a password that had been provided by the server owner rather than the user herself. - Since <structname>information_schema.user_mapping_options</> does not - show the options in such cases, <structname>pg_user_mappings</> + Since <structname>information_schema.user_mapping_options</structname> does not + show the options in such cases, <structname>pg_user_mappings</structname> should not either. (CVE-2017-7547) </para> @@ -244,15 +244,15 @@ CREATE OR REPLACE VIEW table_privileges AS <step> <para> Restart the postmaster after adding <literal>allow_system_table_mods - = true</> to <filename>postgresql.conf</>. (In versions - supporting <command>ALTER SYSTEM</>, you can use that to make the + = true</literal> to <filename>postgresql.conf</filename>. (In versions + supporting <command>ALTER SYSTEM</command>, you can use that to make the configuration change, but you'll still need a restart.) </para> </step> <step> <para> - In <emphasis>each</> database of the cluster, + In <emphasis>each</emphasis> database of the cluster, run the following commands as superuser: <programlisting> SET search_path = pg_catalog; @@ -283,15 +283,15 @@ CREATE OR REPLACE VIEW pg_user_mappings AS <step> <para> - Do not forget to include the <literal>template0</> - and <literal>template1</> databases, or the vulnerability will still - exist in databases you create later. To fix <literal>template0</>, + Do not forget to include the <literal>template0</literal> + and <literal>template1</literal> databases, or the vulnerability will still + exist in databases you create later. To fix <literal>template0</literal>, you'll need to temporarily make it accept connections. - In <productname>PostgreSQL</> 9.5 and later, you can use + In <productname>PostgreSQL</productname> 9.5 and later, you can use <programlisting> ALTER DATABASE template0 WITH ALLOW_CONNECTIONS true; </programlisting> - and then after fixing <literal>template0</>, undo that with + and then after fixing <literal>template0</literal>, undo that with <programlisting> ALTER DATABASE template0 WITH ALLOW_CONNECTIONS false; </programlisting> @@ -305,7 +305,7 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <step> <para> - Finally, remove the <literal>allow_system_table_mods</> configuration + Finally, remove the <literal>allow_system_table_mods</literal> configuration setting, and again restart the postmaster. </para> </step> @@ -319,16 +319,16 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; </para> <para> - <application>libpq</> ignores empty password specifications, and does + <application>libpq</application> ignores empty password specifications, and does not transmit them to the server. So, if a user's password has been set to the empty string, it's impossible to log in with that password - via <application>psql</> or other <application>libpq</>-based + via <application>psql</application> or other <application>libpq</application>-based clients. An administrator might therefore believe that setting the password to empty is equivalent to disabling password login. - However, with a modified or non-<application>libpq</>-based client, + However, with a modified or non-<application>libpq</application>-based client, logging in could be possible, depending on which authentication method is configured. In particular the most common - method, <literal>md5</>, accepted empty passwords. + method, <literal>md5</literal>, accepted empty passwords. Change the server to reject empty passwords in all cases. (CVE-2017-7546) </para> @@ -406,28 +406,28 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> Fix possible creation of an invalid WAL segment when a standby is - promoted just after it processes an <literal>XLOG_SWITCH</> WAL + promoted just after it processes an <literal>XLOG_SWITCH</literal> WAL record (Andres Freund) </para> </listitem> <listitem> <para> - Fix <systemitem>SIGHUP</> and <systemitem>SIGUSR1</> handling in + Fix <systemitem>SIGHUP</systemitem> and <systemitem>SIGUSR1</systemitem> handling in walsender processes (Petr Jelinek, Andres Freund) </para> </listitem> <listitem> <para> - Fix unnecessarily slow restarts of <application>walreceiver</> + Fix unnecessarily slow restarts of <application>walreceiver</application> processes due to race condition in postmaster (Tom Lane) </para> </listitem> <listitem> <para> - Fix cases where an <command>INSERT</> or <command>UPDATE</> assigns + Fix cases where an <command>INSERT</command> or <command>UPDATE</command> assigns to more than one element of a column that is of domain-over-array type (Tom Lane) </para> @@ -436,56 +436,56 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> Move autogenerated array types out of the way during - <command>ALTER ... RENAME</> (Vik Fearing) + <command>ALTER ... RENAME</command> (Vik Fearing) </para> <para> Previously, we would rename a conflicting autogenerated array type - out of the way during <command>CREATE</>; this fix extends that + out of the way during <command>CREATE</command>; this fix extends that behavior to renaming operations. </para> </listitem> <listitem> <para> - Ensure that <command>ALTER USER ... SET</> accepts all the syntax - variants that <command>ALTER ROLE ... SET</> does (Peter Eisentraut) + Ensure that <command>ALTER USER ... SET</command> accepts all the syntax + variants that <command>ALTER ROLE ... SET</command> does (Peter Eisentraut) </para> </listitem> <listitem> <para> Properly update dependency info when changing a datatype I/O - function's argument or return type from <type>opaque</> to the + function's argument or return type from <type>opaque</type> to the correct type (Heikki Linnakangas) </para> <para> - <command>CREATE TYPE</> updates I/O functions declared in this + <command>CREATE TYPE</command> updates I/O functions declared in this long-obsolete style, but it forgot to record a dependency on the - type, allowing a subsequent <command>DROP TYPE</> to leave broken + type, allowing a subsequent <command>DROP TYPE</command> to leave broken function definitions behind. </para> </listitem> <listitem> <para> - Reduce memory usage when <command>ANALYZE</> processes - a <type>tsvector</> column (Heikki Linnakangas) + Reduce memory usage when <command>ANALYZE</command> processes + a <type>tsvector</type> column (Heikki Linnakangas) </para> </listitem> <listitem> <para> Fix unnecessary precision loss and sloppy rounding when multiplying - or dividing <type>money</> values by integers or floats (Tom Lane) + or dividing <type>money</type> values by integers or floats (Tom Lane) </para> </listitem> <listitem> <para> Tighten checks for whitespace in functions that parse identifiers, - such as <function>regprocedurein()</> (Tom Lane) + such as <function>regprocedurein()</function> (Tom Lane) </para> <para> @@ -496,22 +496,22 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Use relevant <literal>#define</> symbols from Perl while - compiling <application>PL/Perl</> (Ashutosh Sharma, Tom Lane) + Use relevant <literal>#define</literal> symbols from Perl while + compiling <application>PL/Perl</application> (Ashutosh Sharma, Tom Lane) </para> <para> This avoids portability problems, typically manifesting as - a <quote>handshake</> mismatch during library load, when working with + a <quote>handshake</quote> mismatch during library load, when working with recent Perl versions. </para> </listitem> <listitem> <para> - In <application>psql</>, fix failure when <command>COPY FROM STDIN</> + In <application>psql</application>, fix failure when <command>COPY FROM STDIN</command> is ended with a keyboard EOF signal and then another <command>COPY - FROM STDIN</> is attempted (Thomas Munro) + FROM STDIN</command> is attempted (Thomas Munro) </para> <para> @@ -522,14 +522,14 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Fix <application>pg_dump</> to not emit invalid SQL for an empty + Fix <application>pg_dump</application> to not emit invalid SQL for an empty operator class (Daniel Gustafsson) </para> </listitem> <listitem> <para> - Fix <application>pg_dump</> output to stdout on Windows (Kuntal Ghosh) + Fix <application>pg_dump</application> output to stdout on Windows (Kuntal Ghosh) </para> <para> @@ -540,21 +540,21 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Fix <function>pg_get_ruledef()</> to print correct output for - the <literal>ON SELECT</> rule of a view whose columns have been + Fix <function>pg_get_ruledef()</function> to print correct output for + the <literal>ON SELECT</literal> rule of a view whose columns have been renamed (Tom Lane) </para> <para> - In some corner cases, <application>pg_dump</> relies - on <function>pg_get_ruledef()</> to dump views, so that this error + In some corner cases, <application>pg_dump</application> relies + on <function>pg_get_ruledef()</function> to dump views, so that this error could result in dump/reload failures. </para> </listitem> <listitem> <para> - Fix dumping of function expressions in the <literal>FROM</> clause in + Fix dumping of function expressions in the <literal>FROM</literal> clause in cases where the expression does not deparse into something that looks like a function call (Tom Lane) </para> @@ -562,7 +562,7 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Fix <application>pg_basebackup</> output to stdout on Windows + Fix <application>pg_basebackup</application> output to stdout on Windows (Haribabu Kommi) </para> @@ -574,8 +574,8 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Fix <application>pg_upgrade</> to ensure that the ending WAL record - does not have <xref linkend="guc-wal-level"> = <literal>minimum</> + Fix <application>pg_upgrade</application> to ensure that the ending WAL record + does not have <xref linkend="guc-wal-level"> = <literal>minimum</literal> (Bruce Momjian) </para> @@ -587,7 +587,7 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Always use <option>-fPIC</>, not <option>-fpic</>, when building + Always use <option>-fPIC</option>, not <option>-fpic</option>, when building shared libraries with gcc (Tom Lane) </para> @@ -607,27 +607,27 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - In MSVC builds, handle the case where the <application>openssl</> - library is not within a <filename>VC</> subdirectory (Andrew Dunstan) + In MSVC builds, handle the case where the <application>openssl</application> + library is not within a <filename>VC</filename> subdirectory (Andrew Dunstan) </para> </listitem> <listitem> <para> - In MSVC builds, add proper include path for <application>libxml2</> + In MSVC builds, add proper include path for <application>libxml2</application> header files (Andrew Dunstan) </para> <para> This fixes a former need to move things around in standard Windows - installations of <application>libxml2</>. + installations of <application>libxml2</application>. </para> </listitem> <listitem> <para> In MSVC builds, recognize a Tcl library that is - named <filename>tcl86.lib</> (Noah Misch) + named <filename>tcl86.lib</filename> (Noah Misch) </para> </listitem> @@ -651,7 +651,7 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; </para> <para> - The <productname>PostgreSQL</> community will stop releasing updates + The <productname>PostgreSQL</productname> community will stop releasing updates for the 9.2.X release series in September 2017. Users are encouraged to update to a newer release branch soon. </para> @@ -683,18 +683,18 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> Restrict visibility - of <structname>pg_user_mappings</>.<structfield>umoptions</>, to + of <structname>pg_user_mappings</structname>.<structfield>umoptions</structfield>, to protect passwords stored as user mapping options (Michael Paquier, Feike Steenbergen) </para> <para> The previous coding allowed the owner of a foreign server object, - or anyone he has granted server <literal>USAGE</> permission to, + or anyone he has granted server <literal>USAGE</literal> permission to, to see the options for all user mappings associated with that server. This might well include passwords for other users. Adjust the view definition to match the behavior of - <structname>information_schema.user_mapping_options</>, namely that + <structname>information_schema.user_mapping_options</structname>, namely that these options are visible to the user being mapped, or if the mapping is for <literal>PUBLIC</literal> and the current user is the server owner, or if the current user is a superuser. @@ -718,7 +718,7 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <para> Some selectivity estimation functions in the planner will apply user-defined operators to values obtained - from <structname>pg_statistic</>, such as most common values and + from <structname>pg_statistic</structname>, such as most common values and histogram entries. This occurs before table permissions are checked, so a nefarious user could exploit the behavior to obtain these values for table columns he does not have permission to read. To fix, @@ -732,7 +732,7 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Fix possible corruption of <quote>init forks</> of unlogged indexes + Fix possible corruption of <quote>init forks</quote> of unlogged indexes (Robert Haas, Michael Paquier) </para> @@ -745,7 +745,7 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Fix incorrect reconstruction of <structname>pg_subtrans</> entries + Fix incorrect reconstruction of <structname>pg_subtrans</structname> entries when a standby server replays a prepared but uncommitted two-phase transaction (Tom Lane) </para> @@ -753,7 +753,7 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <para> In most cases this turned out to have no visible ill effects, but in corner cases it could result in circular references - in <structname>pg_subtrans</>, potentially causing infinite loops + in <structname>pg_subtrans</structname>, potentially causing infinite loops in queries that examine rows modified by the two-phase transaction. </para> </listitem> @@ -768,19 +768,19 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; Due to lack of a cache flush step between commands in an extension script file, non-utility queries might not see the effects of an immediately preceding catalog change, such as <command>ALTER TABLE - ... RENAME</>. + ... RENAME</command>. </para> </listitem> <listitem> <para> Skip tablespace privilege checks when <command>ALTER TABLE ... ALTER - COLUMN TYPE</> rebuilds an existing index (Noah Misch) + COLUMN TYPE</command> rebuilds an existing index (Noah Misch) </para> <para> The command failed if the calling user did not currently have - <literal>CREATE</> privilege for the tablespace containing the index. + <literal>CREATE</literal> privilege for the tablespace containing the index. That behavior seems unhelpful, so skip the check, allowing the index to be rebuilt where it is. </para> @@ -788,27 +788,27 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Fix <command>ALTER TABLE ... VALIDATE CONSTRAINT</> to not recurse - to child tables when the constraint is marked <literal>NO INHERIT</> + Fix <command>ALTER TABLE ... VALIDATE CONSTRAINT</command> to not recurse + to child tables when the constraint is marked <literal>NO INHERIT</literal> (Amit Langote) </para> <para> - This fix prevents unwanted <quote>constraint does not exist</> failures + This fix prevents unwanted <quote>constraint does not exist</quote> failures when no matching constraint is present in the child tables. </para> </listitem> <listitem> <para> - Fix <command>VACUUM</> to account properly for pages that could not + Fix <command>VACUUM</command> to account properly for pages that could not be scanned due to conflicting page pins (Andrew Gierth) </para> <para> This tended to lead to underestimation of the number of tuples in the table. In the worst case of a small heavily-contended - table, <command>VACUUM</> could incorrectly report that the table + table, <command>VACUUM</command> could incorrectly report that the table contained no tuples, leading to very bad planning choices. </para> </listitem> @@ -822,33 +822,33 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Fix <function>cursor_to_xml()</> to produce valid output - with <replaceable>tableforest</> = false + Fix <function>cursor_to_xml()</function> to produce valid output + with <replaceable>tableforest</replaceable> = false (Thomas Munro, Peter Eisentraut) </para> <para> - Previously it failed to produce a wrapping <literal><table></> + Previously it failed to produce a wrapping <literal><table></literal> element. </para> </listitem> <listitem> <para> - Improve performance of <structname>pg_timezone_names</> view + Improve performance of <structname>pg_timezone_names</structname> view (Tom Lane, David Rowley) </para> </listitem> <listitem> <para> - Fix sloppy handling of corner-case errors from <function>lseek()</> - and <function>close()</> (Tom Lane) + Fix sloppy handling of corner-case errors from <function>lseek()</function> + and <function>close()</function> (Tom Lane) </para> <para> Neither of these system calls are likely to fail in typical situations, - but if they did, <filename>fd.c</> could get quite confused. + but if they did, <filename>fd.c</filename> could get quite confused. </para> </listitem> @@ -866,21 +866,21 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Fix <application>ecpg</> to support <command>COMMIT PREPARED</> - and <command>ROLLBACK PREPARED</> (Masahiko Sawada) + Fix <application>ecpg</application> to support <command>COMMIT PREPARED</command> + and <command>ROLLBACK PREPARED</command> (Masahiko Sawada) </para> </listitem> <listitem> <para> Fix a double-free error when processing dollar-quoted string literals - in <application>ecpg</> (Michael Meskes) + in <application>ecpg</application> (Michael Meskes) </para> </listitem> <listitem> <para> - In <application>pg_dump</>, fix incorrect schema and owner marking for + In <application>pg_dump</application>, fix incorrect schema and owner marking for comments and security labels of some types of database objects (Giuseppe Broccolo, Tom Lane) </para> @@ -895,20 +895,20 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Avoid emitting an invalid list file in <literal>pg_restore -l</> + Avoid emitting an invalid list file in <literal>pg_restore -l</literal> when SQL object names contain newlines (Tom Lane) </para> <para> Replace newlines by spaces, which is sufficient to make the output - valid for <literal>pg_restore -L</>'s purposes. + valid for <literal>pg_restore -L</literal>'s purposes. </para> </listitem> <listitem> <para> - Fix <application>pg_upgrade</> to transfer comments and security labels - attached to <quote>large objects</> (blobs) (Stephen Frost) + Fix <application>pg_upgrade</application> to transfer comments and security labels + attached to <quote>large objects</quote> (blobs) (Stephen Frost) </para> <para> @@ -920,19 +920,19 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> Improve error handling - in <filename>contrib/adminpack</>'s <function>pg_file_write()</> + in <filename>contrib/adminpack</filename>'s <function>pg_file_write()</function> function (Noah Misch) </para> <para> Notably, it failed to detect errors reported - by <function>fclose()</>. + by <function>fclose()</function>. </para> </listitem> <listitem> <para> - In <filename>contrib/dblink</>, avoid leaking the previous unnamed + In <filename>contrib/dblink</filename>, avoid leaking the previous unnamed connection when establishing a new unnamed connection (Joe Conway) </para> </listitem> @@ -967,7 +967,7 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Update time zone data files to <application>tzdata</> release 2017b + Update time zone data files to <application>tzdata</application> release 2017b for DST law changes in Chile, Haiti, and Mongolia, plus historical corrections for Ecuador, Kazakhstan, Liberia, and Spain. Switch to numeric abbreviations for numerous time zones in South @@ -981,9 +981,9 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; or no currency among the local population. They are in process of reversing that policy in favor of using numeric UTC offsets in zones where there is no evidence of real-world use of an English - abbreviation. At least for the time being, <productname>PostgreSQL</> + abbreviation. At least for the time being, <productname>PostgreSQL</productname> will continue to accept such removed abbreviations for timestamp input. - But they will not be shown in the <structname>pg_timezone_names</> + But they will not be shown in the <structname>pg_timezone_names</structname> view nor used for output. </para> </listitem> @@ -996,15 +996,15 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <para> The Microsoft MSVC build scripts neglected to install - the <filename>posixrules</> file in the timezone directory tree. + the <filename>posixrules</filename> file in the timezone directory tree. This resulted in the timezone code falling back to its built-in rule about what DST behavior to assume for a POSIX-style time zone name. For historical reasons that still corresponds to the DST rules the USA was using before 2007 (i.e., change on first Sunday in April and last Sunday in October). With this fix, a POSIX-style zone name will use the current and historical DST transition dates of - the <literal>US/Eastern</> zone. If you don't want that, remove - the <filename>posixrules</> file, or replace it with a copy of some + the <literal>US/Eastern</literal> zone. If you don't want that, remove + the <filename>posixrules</filename> file, or replace it with a copy of some other zone file (see <xref linkend="datatype-timezones">). Note that due to caching, you may need to restart the server to get such changes to take effect. @@ -1058,15 +1058,15 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> Fix a race condition that could cause indexes built - with <command>CREATE INDEX CONCURRENTLY</> to be corrupt + with <command>CREATE INDEX CONCURRENTLY</command> to be corrupt (Pavan Deolasee, Tom Lane) </para> <para> - If <command>CREATE INDEX CONCURRENTLY</> was used to build an index + If <command>CREATE INDEX CONCURRENTLY</command> was used to build an index that depends on a column not previously indexed, then rows updated by transactions that ran concurrently with - the <command>CREATE INDEX</> command could have received incorrect + the <command>CREATE INDEX</command> command could have received incorrect index entries. If you suspect this may have happened, the most reliable solution is to rebuild affected indexes after installing this update. @@ -1075,13 +1075,13 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Unconditionally WAL-log creation of the <quote>init fork</> for an + Unconditionally WAL-log creation of the <quote>init fork</quote> for an unlogged table (Michael Paquier) </para> <para> Previously, this was skipped when <xref linkend="guc-wal-level"> - = <literal>minimal</>, but actually it's necessary even in that case + = <literal>minimal</literal>, but actually it's necessary even in that case to ensure that the unlogged table is properly reset to empty after a crash. </para> @@ -1098,7 +1098,7 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 </para> <para> - In corner cases, a spurious <quote>out-of-sequence TLI</> error + In corner cases, a spurious <quote>out-of-sequence TLI</quote> error could be reported during recovery. </para> </listitem> @@ -1144,7 +1144,7 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> - Make sure <command>ALTER TABLE</> preserves index tablespace + Make sure <command>ALTER TABLE</command> preserves index tablespace assignments when rebuilding indexes (Tom Lane, Michael Paquier) </para> @@ -1162,15 +1162,15 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 </para> <para> - This avoids <quote>could not find trigger <replaceable>NNN</></quote> - or <quote>relation <replaceable>NNN</> has no triggers</quote> errors. + This avoids <quote>could not find trigger <replaceable>NNN</replaceable></quote> + or <quote>relation <replaceable>NNN</replaceable> has no triggers</quote> errors. </para> </listitem> <listitem> <para> Fix processing of OID column when a table with OIDs is associated to - a parent with OIDs via <command>ALTER TABLE ... INHERIT</> (Amit + a parent with OIDs via <command>ALTER TABLE ... INHERIT</command> (Amit Langote) </para> @@ -1203,12 +1203,12 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> Ensure that column typmods are determined accurately for - multi-row <literal>VALUES</> constructs (Tom Lane) + multi-row <literal>VALUES</literal> constructs (Tom Lane) </para> <para> This fixes problems occurring when the first value in a column has a - determinable typmod (e.g., length for a <type>varchar</> value) but + determinable typmod (e.g., length for a <type>varchar</type> value) but later values don't share the same limit. </para> </listitem> @@ -1223,15 +1223,15 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 Normally, a Unicode surrogate leading character must be followed by a Unicode surrogate trailing character, but the check for this was missed if the leading character was the last character in a Unicode - string literal (<literal>U&'...'</>) or Unicode identifier - (<literal>U&"..."</>). + string literal (<literal>U&'...'</literal>) or Unicode identifier + (<literal>U&"..."</literal>). </para> </listitem> <listitem> <para> Ensure that a purely negative text search query, such - as <literal>!foo</>, matches empty <type>tsvector</>s (Tom Dunstan) + as <literal>!foo</literal>, matches empty <type>tsvector</type>s (Tom Dunstan) </para> <para> @@ -1242,33 +1242,33 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> - Prevent crash when <function>ts_rewrite()</> replaces a non-top-level + Prevent crash when <function>ts_rewrite()</function> replaces a non-top-level subtree with an empty query (Artur Zakirov) </para> </listitem> <listitem> <para> - Fix performance problems in <function>ts_rewrite()</> (Tom Lane) + Fix performance problems in <function>ts_rewrite()</function> (Tom Lane) </para> </listitem> <listitem> <para> - Fix <function>ts_rewrite()</>'s handling of nested NOT operators + Fix <function>ts_rewrite()</function>'s handling of nested NOT operators (Tom Lane) </para> </listitem> <listitem> <para> - Fix <function>array_fill()</> to handle empty arrays properly (Tom Lane) + Fix <function>array_fill()</function> to handle empty arrays properly (Tom Lane) </para> </listitem> <listitem> <para> - Fix one-byte buffer overrun in <function>quote_literal_cstr()</> + Fix one-byte buffer overrun in <function>quote_literal_cstr()</function> (Heikki Linnakangas) </para> @@ -1280,8 +1280,8 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> - Prevent multiple calls of <function>pg_start_backup()</> - and <function>pg_stop_backup()</> from running concurrently (Michael + Prevent multiple calls of <function>pg_start_backup()</function> + and <function>pg_stop_backup()</function> from running concurrently (Michael Paquier) </para> @@ -1293,28 +1293,28 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> - Avoid discarding <type>interval</>-to-<type>interval</> casts + Avoid discarding <type>interval</type>-to-<type>interval</type> casts that aren't really no-ops (Tom Lane) </para> <para> In some cases, a cast that should result in zeroing out - low-order <type>interval</> fields was mistakenly deemed to be a + low-order <type>interval</type> fields was mistakenly deemed to be a no-op and discarded. An example is that casting from <type>INTERVAL - MONTH</> to <type>INTERVAL YEAR</> failed to clear the months field. + MONTH</type> to <type>INTERVAL YEAR</type> failed to clear the months field. </para> </listitem> <listitem> <para> - Fix <application>pg_dump</> to dump user-defined casts and transforms + Fix <application>pg_dump</application> to dump user-defined casts and transforms that use built-in functions (Stephen Frost) </para> </listitem> <listitem> <para> - Fix possible <application>pg_basebackup</> failure on standby + Fix possible <application>pg_basebackup</application> failure on standby server when including WAL files (Amit Kapila, Robert Haas) </para> </listitem> @@ -1333,21 +1333,21 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> - Fix PL/Tcl to support triggers on tables that have <literal>.tupno</> + Fix PL/Tcl to support triggers on tables that have <literal>.tupno</literal> as a column name (Tom Lane) </para> <para> This matches the (previously undocumented) behavior of - PL/Tcl's <command>spi_exec</> and <command>spi_execp</> commands, - namely that a magic <literal>.tupno</> column is inserted only if + PL/Tcl's <command>spi_exec</command> and <command>spi_execp</command> commands, + namely that a magic <literal>.tupno</literal> column is inserted only if there isn't a real column named that. </para> </listitem> <listitem> <para> - Allow DOS-style line endings in <filename>~/.pgpass</> files, + Allow DOS-style line endings in <filename>~/.pgpass</filename> files, even on Unix (Vik Fearing) </para> @@ -1359,23 +1359,23 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> - Fix one-byte buffer overrun if <application>ecpg</> is given a file + Fix one-byte buffer overrun if <application>ecpg</application> is given a file name that ends with a dot (Takayuki Tsunakawa) </para> </listitem> <listitem> <para> - Fix <application>psql</>'s tab completion for <command>ALTER DEFAULT - PRIVILEGES</> (Gilles Darold, Stephen Frost) + Fix <application>psql</application>'s tab completion for <command>ALTER DEFAULT + PRIVILEGES</command> (Gilles Darold, Stephen Frost) </para> </listitem> <listitem> <para> - In <application>psql</>, treat an empty or all-blank setting of - the <envar>PAGER</> environment variable as meaning <quote>no - pager</> (Tom Lane) + In <application>psql</application>, treat an empty or all-blank setting of + the <envar>PAGER</envar> environment variable as meaning <quote>no + pager</quote> (Tom Lane) </para> <para> @@ -1386,8 +1386,8 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> - Improve <filename>contrib/dblink</>'s reporting of - low-level <application>libpq</> errors, such as out-of-memory + Improve <filename>contrib/dblink</filename>'s reporting of + low-level <application>libpq</application> errors, such as out-of-memory (Joe Conway) </para> </listitem> @@ -1414,7 +1414,7 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> - Update time zone data files to <application>tzdata</> release 2016j + Update time zone data files to <application>tzdata</application> release 2016j for DST law changes in northern Cyprus (adding a new zone Asia/Famagusta), Russia (adding a new zone Europe/Saratov), Tonga, and Antarctica/Casey. @@ -1489,71 +1489,71 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> - Fix <command>EXPLAIN</> to emit valid XML when + Fix <command>EXPLAIN</command> to emit valid XML when <xref linkend="guc-track-io-timing"> is on (Markus Winand) </para> <para> Previously the XML output-format option produced syntactically invalid - tags such as <literal><I/O-Read-Time></>. That is now - rendered as <literal><I-O-Read-Time></>. + tags such as <literal><I/O-Read-Time></literal>. That is now + rendered as <literal><I-O-Read-Time></literal>. </para> </listitem> <listitem> <para> Suppress printing of zeroes for unmeasured times - in <command>EXPLAIN</> (Maksim Milyutin) + in <command>EXPLAIN</command> (Maksim Milyutin) </para> <para> Certain option combinations resulted in printing zero values for times that actually aren't ever measured in that combination. Our general - policy in <command>EXPLAIN</> is not to print such fields at all, so + policy in <command>EXPLAIN</command> is not to print such fields at all, so do that consistently in all cases. </para> </listitem> <listitem> <para> - Fix timeout length when <command>VACUUM</> is waiting for exclusive + Fix timeout length when <command>VACUUM</command> is waiting for exclusive table lock so that it can truncate the table (Simon Riggs) </para> <para> The timeout was meant to be 50 milliseconds, but it was actually only - 50 microseconds, causing <command>VACUUM</> to give up on truncation + 50 microseconds, causing <command>VACUUM</command> to give up on truncation much more easily than intended. Set it to the intended value. </para> </listitem> <listitem> <para> - Fix bugs in merging inherited <literal>CHECK</> constraints while + Fix bugs in merging inherited <literal>CHECK</literal> constraints while creating or altering a table (Tom Lane, Amit Langote) </para> <para> - Allow identical <literal>CHECK</> constraints to be added to a parent + Allow identical <literal>CHECK</literal> constraints to be added to a parent and child table in either order. Prevent merging of a valid - constraint from the parent table with a <literal>NOT VALID</> + constraint from the parent table with a <literal>NOT VALID</literal> constraint on the child. Likewise, prevent merging of a <literal>NO - INHERIT</> child constraint with an inherited constraint. + INHERIT</literal> child constraint with an inherited constraint. </para> </listitem> <listitem> <para> Remove artificial restrictions on the values accepted - by <function>numeric_in()</> and <function>numeric_recv()</> + by <function>numeric_in()</function> and <function>numeric_recv()</function> (Tom Lane) </para> <para> We allow numeric values up to the limit of the storage format (more - than <literal>1e100000</>), so it seems fairly pointless - that <function>numeric_in()</> rejected scientific-notation exponents - above 1000. Likewise, it was silly for <function>numeric_recv()</> to + than <literal>1e100000</literal>), so it seems fairly pointless + that <function>numeric_in()</function> rejected scientific-notation exponents + above 1000. Likewise, it was silly for <function>numeric_recv()</function> to reject more than 1000 digits in an input value. </para> </listitem> @@ -1575,7 +1575,7 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> - Disallow starting a standalone backend with <literal>standby_mode</> + Disallow starting a standalone backend with <literal>standby_mode</literal> turned on (Michael Paquier) </para> @@ -1589,7 +1589,7 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> Don't try to share SSL contexts across multiple connections - in <application>libpq</> (Heikki Linnakangas) + in <application>libpq</application> (Heikki Linnakangas) </para> <para> @@ -1600,30 +1600,30 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> - Avoid corner-case memory leak in <application>libpq</> (Tom Lane) + Avoid corner-case memory leak in <application>libpq</application> (Tom Lane) </para> <para> The reported problem involved leaking an error report - during <function>PQreset()</>, but there might be related cases. + during <function>PQreset()</function>, but there might be related cases. </para> </listitem> <listitem> <para> - Make <application>ecpg</>'s <option>--help</> and <option>--version</> + Make <application>ecpg</application>'s <option>--help</option> and <option>--version</option> options work consistently with our other executables (Haribabu Kommi) </para> </listitem> <listitem> <para> - In <application>pg_dump</>, never dump range constructor functions + In <application>pg_dump</application>, never dump range constructor functions (Tom Lane) </para> <para> - This oversight led to <application>pg_upgrade</> failures with + This oversight led to <application>pg_upgrade</application> failures with extensions containing range types, due to duplicate creation of the constructor functions. </para> @@ -1631,8 +1631,8 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> - Fix <filename>contrib/intarray/bench/bench.pl</> to print the results - of the <command>EXPLAIN</> it does when given the <option>-e</> option + Fix <filename>contrib/intarray/bench/bench.pl</filename> to print the results + of the <command>EXPLAIN</command> it does when given the <option>-e</option> option (Daniel Gustafsson) </para> </listitem> @@ -1653,17 +1653,17 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 If a dynamic time zone abbreviation does not match any entry in the referenced time zone, treat it as equivalent to the time zone name. This avoids unexpected failures when IANA removes abbreviations from - their time zone database, as they did in <application>tzdata</> + their time zone database, as they did in <application>tzdata</application> release 2016f and seem likely to do again in the future. The consequences were not limited to not recognizing the individual abbreviation; any mismatch caused - the <structname>pg_timezone_abbrevs</> view to fail altogether. + the <structname>pg_timezone_abbrevs</structname> view to fail altogether. </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2016h + Update time zone data files to <application>tzdata</application> release 2016h for DST law changes in Palestine and Turkey, plus historical corrections for Turkey and some regions of Russia. Switch to numeric abbreviations for some time zones in Antarctica, @@ -1676,15 +1676,15 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 or no currency among the local population. They are in process of reversing that policy in favor of using numeric UTC offsets in zones where there is no evidence of real-world use of an English - abbreviation. At least for the time being, <productname>PostgreSQL</> + abbreviation. At least for the time being, <productname>PostgreSQL</productname> will continue to accept such removed abbreviations for timestamp input. - But they will not be shown in the <structname>pg_timezone_names</> + But they will not be shown in the <structname>pg_timezone_names</structname> view nor used for output. </para> <para> - In this update, <literal>AMT</> is no longer shown as being in use to - mean Armenia Time. Therefore, we have changed the <literal>Default</> + In this update, <literal>AMT</literal> is no longer shown as being in use to + mean Armenia Time. Therefore, we have changed the <literal>Default</literal> abbreviation set to interpret it as Amazon Time, thus UTC-4 not UTC+4. </para> </listitem> @@ -1730,17 +1730,17 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> Fix possible mis-evaluation of - nested <literal>CASE</>-<literal>WHEN</> expressions (Heikki + nested <literal>CASE</literal>-<literal>WHEN</literal> expressions (Heikki Linnakangas, Michael Paquier, Tom Lane) </para> <para> - A <literal>CASE</> expression appearing within the test value - subexpression of another <literal>CASE</> could become confused about + A <literal>CASE</literal> expression appearing within the test value + subexpression of another <literal>CASE</literal> could become confused about whether its own test value was null or not. Also, inlining of a SQL function implementing the equality operator used by - a <literal>CASE</> expression could result in passing the wrong test - value to functions called within a <literal>CASE</> expression in the + a <literal>CASE</literal> expression could result in passing the wrong test + value to functions called within a <literal>CASE</literal> expression in the SQL function's body. If the test values were of different data types, a crash might result; moreover such situations could be abused to allow disclosure of portions of server memory. (CVE-2016-5423) @@ -1754,7 +1754,7 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 </para> <para> - Numerous places in <application>vacuumdb</> and other client programs + Numerous places in <application>vacuumdb</application> and other client programs could become confused by database and role names containing double quotes or backslashes. Tighten up quoting rules to make that safe. Also, ensure that when a conninfo string is used as a database name @@ -1763,22 +1763,22 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <para> Fix handling of paired double quotes - in <application>psql</>'s <command>\connect</> - and <command>\password</> commands to match the documentation. + in <application>psql</application>'s <command>\connect</command> + and <command>\password</command> commands to match the documentation. </para> <para> - Introduce a new <option>-reuse-previous</> option - in <application>psql</>'s <command>\connect</> command to allow + Introduce a new <option>-reuse-previous</option> option + in <application>psql</application>'s <command>\connect</command> command to allow explicit control of whether to re-use connection parameters from a previous connection. (Without this, the choice is based on whether the database name looks like a conninfo string, as before.) This allows secure handling of database names containing special - characters in <application>pg_dumpall</> scripts. + characters in <application>pg_dumpall</application> scripts. </para> <para> - <application>pg_dumpall</> now refuses to deal with database and role + <application>pg_dumpall</application> now refuses to deal with database and role names containing carriage returns or newlines, as it seems impractical to quote those characters safely on Windows. In future we may reject such names on the server side, but that step has not been taken yet. @@ -1788,40 +1788,40 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 These are considered security fixes because crafted object names containing special characters could have been used to execute commands with superuser privileges the next time a superuser - executes <application>pg_dumpall</> or other routine maintenance + executes <application>pg_dumpall</application> or other routine maintenance operations. (CVE-2016-5424) </para> </listitem> <listitem> <para> - Fix corner-case misbehaviors for <literal>IS NULL</>/<literal>IS NOT - NULL</> applied to nested composite values (Andrew Gierth, Tom Lane) + Fix corner-case misbehaviors for <literal>IS NULL</literal>/<literal>IS NOT + NULL</literal> applied to nested composite values (Andrew Gierth, Tom Lane) </para> <para> - The SQL standard specifies that <literal>IS NULL</> should return + The SQL standard specifies that <literal>IS NULL</literal> should return TRUE for a row of all null values (thus <literal>ROW(NULL,NULL) IS - NULL</> yields TRUE), but this is not meant to apply recursively - (thus <literal>ROW(NULL, ROW(NULL,NULL)) IS NULL</> yields FALSE). + NULL</literal> yields TRUE), but this is not meant to apply recursively + (thus <literal>ROW(NULL, ROW(NULL,NULL)) IS NULL</literal> yields FALSE). The core executor got this right, but certain planner optimizations treated the test as recursive (thus producing TRUE in both cases), - and <filename>contrib/postgres_fdw</> could produce remote queries + and <filename>contrib/postgres_fdw</filename> could produce remote queries that misbehaved similarly. </para> </listitem> <listitem> <para> - Make the <type>inet</> and <type>cidr</> data types properly reject + Make the <type>inet</type> and <type>cidr</type> data types properly reject IPv6 addresses with too many colon-separated fields (Tom Lane) </para> </listitem> <listitem> <para> - Prevent crash in <function>close_ps()</> - (the <type>point</> <literal>##</> <type>lseg</> operator) + Prevent crash in <function>close_ps()</function> + (the <type>point</type> <literal>##</literal> <type>lseg</type> operator) for NaN input coordinates (Tom Lane) </para> @@ -1832,12 +1832,12 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> - Fix several one-byte buffer over-reads in <function>to_number()</> + Fix several one-byte buffer over-reads in <function>to_number()</function> (Peter Eisentraut) </para> <para> - In several cases the <function>to_number()</> function would read one + In several cases the <function>to_number()</function> function would read one more character than it should from the input string. There is a small chance of a crash, if the input happens to be adjacent to the end of memory. @@ -1847,7 +1847,7 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> Avoid unsafe intermediate state during expensive paths - through <function>heap_update()</> (Masahiko Sawada, Andres Freund) + through <function>heap_update()</function> (Masahiko Sawada, Andres Freund) </para> <para> @@ -1860,19 +1860,19 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> - Avoid crash in <literal>postgres -C</> when the specified variable + Avoid crash in <literal>postgres -C</literal> when the specified variable has a null string value (Michael Paquier) </para> </listitem> <listitem> <para> - Avoid consuming a transaction ID during <command>VACUUM</> + Avoid consuming a transaction ID during <command>VACUUM</command> (Alexander Korotkov) </para> <para> - Some cases in <command>VACUUM</> unnecessarily caused an XID to be + Some cases in <command>VACUUM</command> unnecessarily caused an XID to be assigned to the current transaction. Normally this is negligible, but if one is up against the XID wraparound limit, consuming more XIDs during anti-wraparound vacuums is a very bad thing. @@ -1881,12 +1881,12 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> - Avoid canceling hot-standby queries during <command>VACUUM FREEZE</> + Avoid canceling hot-standby queries during <command>VACUUM FREEZE</command> (Simon Riggs, Álvaro Herrera) </para> <para> - <command>VACUUM FREEZE</> on an otherwise-idle master server could + <command>VACUUM FREEZE</command> on an otherwise-idle master server could result in unnecessary cancellations of queries on its standby servers. </para> @@ -1894,8 +1894,8 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> - When a manual <command>ANALYZE</> specifies a column list, don't - reset the table's <literal>changes_since_analyze</> counter + When a manual <command>ANALYZE</command> specifies a column list, don't + reset the table's <literal>changes_since_analyze</literal> counter (Tom Lane) </para> @@ -1907,7 +1907,7 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> - Fix <command>ANALYZE</>'s overestimation of <literal>n_distinct</> + Fix <command>ANALYZE</command>'s overestimation of <literal>n_distinct</literal> for a unique or nearly-unique column with many null entries (Tom Lane) </para> @@ -1942,8 +1942,8 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> - Fix <filename>contrib/btree_gin</> to handle the smallest - possible <type>bigint</> value correctly (Peter Eisentraut) + Fix <filename>contrib/btree_gin</filename> to handle the smallest + possible <type>bigint</type> value correctly (Peter Eisentraut) </para> </listitem> @@ -1956,29 +1956,29 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <para> It's planned to switch to two-part instead of three-part server version numbers for releases after 9.6. Make sure - that <function>PQserverVersion()</> returns the correct value for + that <function>PQserverVersion()</function> returns the correct value for such cases. </para> </listitem> <listitem> <para> - Fix <application>ecpg</>'s code for <literal>unsigned long long</> + Fix <application>ecpg</application>'s code for <literal>unsigned long long</literal> array elements (Michael Meskes) </para> </listitem> <listitem> <para> - In <application>pg_dump</> with both <option>-c</> and <option>-C</> - options, avoid emitting an unwanted <literal>CREATE SCHEMA public</> + In <application>pg_dump</application> with both <option>-c</option> and <option>-C</option> + options, avoid emitting an unwanted <literal>CREATE SCHEMA public</literal> command (David Johnston, Tom Lane) </para> </listitem> <listitem> <para> - Make <application>pg_basebackup</> accept <literal>-Z 0</> as + Make <application>pg_basebackup</application> accept <literal>-Z 0</literal> as specifying no compression (Fujii Masao) </para> </listitem> @@ -2012,7 +2012,7 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> Update our copy of the timezone code to match - IANA's <application>tzcode</> release 2016c (Tom Lane) + IANA's <application>tzcode</application> release 2016c (Tom Lane) </para> <para> @@ -2024,7 +2024,7 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> - Update time zone data files to <application>tzdata</> release 2016f + Update time zone data files to <application>tzdata</application> release 2016f for DST law changes in Kemerovo and Novosibirsk, plus historical corrections for Azerbaijan, Belarus, and Morocco. </para> @@ -2080,7 +2080,7 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 using OpenSSL within a single process and not all the code involved follows the same rules for when to clear the error queue. Failures have been reported specifically when a client application - uses SSL connections in <application>libpq</> concurrently with + uses SSL connections in <application>libpq</application> concurrently with SSL connections using the PHP, Python, or Ruby wrappers for OpenSSL. It's possible for similar problems to arise within the server as well, if an extension module establishes an outgoing SSL connection. @@ -2089,7 +2089,7 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> - Fix <quote>failed to build any <replaceable>N</>-way joins</quote> + Fix <quote>failed to build any <replaceable>N</replaceable>-way joins</quote> planner error with a full join enclosed in the right-hand side of a left join (Tom Lane) </para> @@ -2103,10 +2103,10 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <para> Given a three-or-more-way equivalence class of variables, such - as <literal>X.X = Y.Y = Z.Z</>, it was possible for the planner to omit + as <literal>X.X = Y.Y = Z.Z</literal>, it was possible for the planner to omit some of the tests needed to enforce that all the variables are actually equal, leading to join rows being output that didn't satisfy - the <literal>WHERE</> clauses. For various reasons, erroneous plans + the <literal>WHERE</literal> clauses. For various reasons, erroneous plans were seldom selected in practice, so that this bug has gone undetected for a long time. </para> @@ -2114,8 +2114,8 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> - Fix possible misbehavior of <literal>TH</>, <literal>th</>, - and <literal>Y,YYY</> format codes in <function>to_timestamp()</> + Fix possible misbehavior of <literal>TH</literal>, <literal>th</literal>, + and <literal>Y,YYY</literal> format codes in <function>to_timestamp()</function> (Tom Lane) </para> @@ -2127,28 +2127,28 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> - Fix dumping of rules and views in which the <replaceable>array</> - argument of a <literal><replaceable>value</> <replaceable>operator</> - ANY (<replaceable>array</>)</literal> construct is a sub-SELECT + Fix dumping of rules and views in which the <replaceable>array</replaceable> + argument of a <literal><replaceable>value</replaceable> <replaceable>operator</replaceable> + ANY (<replaceable>array</replaceable>)</literal> construct is a sub-SELECT (Tom Lane) </para> </listitem> <listitem> <para> - Make <application>pg_regress</> use a startup timeout from the - <envar>PGCTLTIMEOUT</> environment variable, if that's set (Tom Lane) + Make <application>pg_regress</application> use a startup timeout from the + <envar>PGCTLTIMEOUT</envar> environment variable, if that's set (Tom Lane) </para> <para> This is for consistency with a behavior recently added - to <application>pg_ctl</>; it eases automated testing on slow machines. + to <application>pg_ctl</application>; it eases automated testing on slow machines. </para> </listitem> <listitem> <para> - Fix <application>pg_upgrade</> to correctly restore extension + Fix <application>pg_upgrade</application> to correctly restore extension membership for operator families containing only one operator class (Tom Lane) </para> @@ -2156,7 +2156,7 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <para> In such a case, the operator family was restored into the new database, but it was no longer marked as part of the extension. This had no - immediate ill effects, but would cause later <application>pg_dump</> + immediate ill effects, but would cause later <application>pg_dump</application> runs to emit output that would cause (harmless) errors on restore. </para> </listitem> @@ -2177,22 +2177,22 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> Reduce the number of SysV semaphores used by a build configured with - <option>--disable-spinlocks</> (Tom Lane) + <option>--disable-spinlocks</option> (Tom Lane) </para> </listitem> <listitem> <para> - Rename internal function <function>strtoi()</> - to <function>strtoint()</> to avoid conflict with a NetBSD library + Rename internal function <function>strtoi()</function> + to <function>strtoint()</function> to avoid conflict with a NetBSD library function (Thomas Munro) </para> </listitem> <listitem> <para> - Fix reporting of errors from <function>bind()</> - and <function>listen()</> system calls on Windows (Tom Lane) + Fix reporting of errors from <function>bind()</function> + and <function>listen()</function> system calls on Windows (Tom Lane) </para> </listitem> @@ -2205,12 +2205,12 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> - Avoid possibly-unsafe use of Windows' <function>FormatMessage()</> + Avoid possibly-unsafe use of Windows' <function>FormatMessage()</function> function (Christian Ullrich) </para> <para> - Use the <literal>FORMAT_MESSAGE_IGNORE_INSERTS</> flag where + Use the <literal>FORMAT_MESSAGE_IGNORE_INSERTS</literal> flag where appropriate. No live bug is known to exist here, but it seems like a good idea to be careful. </para> @@ -2218,9 +2218,9 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> - Update time zone data files to <application>tzdata</> release 2016d + Update time zone data files to <application>tzdata</application> release 2016d for DST law changes in Russia and Venezuela. There are new zone - names <literal>Europe/Kirov</> and <literal>Asia/Tomsk</> to reflect + names <literal>Europe/Kirov</literal> and <literal>Asia/Tomsk</literal> to reflect the fact that these regions now have different time zone histories from adjacent regions. </para> @@ -2267,56 +2267,56 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> Fix incorrect handling of NULL index entries in - indexed <literal>ROW()</> comparisons (Tom Lane) + indexed <literal>ROW()</literal> comparisons (Tom Lane) </para> <para> An index search using a row comparison such as <literal>ROW(a, b) > - ROW('x', 'y')</> would stop upon reaching a NULL entry in - the <structfield>b</> column, ignoring the fact that there might be - non-NULL <structfield>b</> values associated with later values - of <structfield>a</>. + ROW('x', 'y')</literal> would stop upon reaching a NULL entry in + the <structfield>b</structfield> column, ignoring the fact that there might be + non-NULL <structfield>b</structfield> values associated with later values + of <structfield>a</structfield>. </para> </listitem> <listitem> <para> Avoid unlikely data-loss scenarios due to renaming files without - adequate <function>fsync()</> calls before and after (Michael Paquier, + adequate <function>fsync()</function> calls before and after (Michael Paquier, Tomas Vondra, Andres Freund) </para> </listitem> <listitem> <para> - Correctly handle cases where <literal>pg_subtrans</> is close to XID + Correctly handle cases where <literal>pg_subtrans</literal> is close to XID wraparound during server startup (Jeff Janes) </para> </listitem> <listitem> <para> - Fix corner-case crash due to trying to free <function>localeconv()</> + Fix corner-case crash due to trying to free <function>localeconv()</function> output strings more than once (Tom Lane) </para> </listitem> <listitem> <para> - Fix parsing of affix files for <literal>ispell</> dictionaries + Fix parsing of affix files for <literal>ispell</literal> dictionaries (Tom Lane) </para> <para> The code could go wrong if the affix file contained any characters whose byte length changes during case-folding, for - example <literal>I</> in Turkish UTF8 locales. + example <literal>I</literal> in Turkish UTF8 locales. </para> </listitem> <listitem> <para> - Avoid use of <function>sscanf()</> to parse <literal>ispell</> + Avoid use of <function>sscanf()</function> to parse <literal>ispell</literal> dictionary files (Artur Zakirov) </para> @@ -2342,27 +2342,27 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> - Fix <application>psql</>'s tab completion logic to handle multibyte + Fix <application>psql</application>'s tab completion logic to handle multibyte characters properly (Kyotaro Horiguchi, Robert Haas) </para> </listitem> <listitem> <para> - Fix <application>psql</>'s tab completion for - <literal>SECURITY LABEL</> (Tom Lane) + Fix <application>psql</application>'s tab completion for + <literal>SECURITY LABEL</literal> (Tom Lane) </para> <para> - Pressing TAB after <literal>SECURITY LABEL</> might cause a crash + Pressing TAB after <literal>SECURITY LABEL</literal> might cause a crash or offering of inappropriate keywords. </para> </listitem> <listitem> <para> - Make <application>pg_ctl</> accept a wait timeout from the - <envar>PGCTLTIMEOUT</> environment variable, if none is specified on + Make <application>pg_ctl</application> accept a wait timeout from the + <envar>PGCTLTIMEOUT</envar> environment variable, if none is specified on the command line (Noah Misch) </para> @@ -2376,20 +2376,20 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> Fix incorrect test for Windows service status - in <application>pg_ctl</> (Manuel Mathar) + in <application>pg_ctl</application> (Manuel Mathar) </para> <para> The previous set of minor releases attempted to - fix <application>pg_ctl</> to properly determine whether to send log + fix <application>pg_ctl</application> to properly determine whether to send log messages to Window's Event Log, but got the test backwards. </para> </listitem> <listitem> <para> - Fix <application>pgbench</> to correctly handle the combination - of <literal>-C</> and <literal>-M prepared</> options (Tom Lane) + Fix <application>pgbench</application> to correctly handle the combination + of <literal>-C</literal> and <literal>-M prepared</literal> options (Tom Lane) </para> </listitem> @@ -2410,21 +2410,21 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> Fix multiple mistakes in the statistics returned - by <filename>contrib/pgstattuple</>'s <function>pgstatindex()</> + by <filename>contrib/pgstattuple</filename>'s <function>pgstatindex()</function> function (Tom Lane) </para> </listitem> <listitem> <para> - Remove dependency on <literal>psed</> in MSVC builds, since it's no + Remove dependency on <literal>psed</literal> in MSVC builds, since it's no longer provided by core Perl (Michael Paquier, Andrew Dunstan) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2016c + Update time zone data files to <application>tzdata</application> release 2016c for DST law changes in Azerbaijan, Chile, Haiti, Palestine, and Russia (Altai, Astrakhan, Kirov, Sakhalin, Ulyanovsk regions), plus historical corrections for Lithuania, Moldova, and Russia @@ -2485,25 +2485,25 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> - Perform an immediate shutdown if the <filename>postmaster.pid</> file + Perform an immediate shutdown if the <filename>postmaster.pid</filename> file is removed (Tom Lane) </para> <para> The postmaster now checks every minute or so - that <filename>postmaster.pid</> is still there and still contains its + that <filename>postmaster.pid</filename> is still there and still contains its own PID. If not, it performs an immediate shutdown, as though it had - received <systemitem>SIGQUIT</>. The main motivation for this change + received <systemitem>SIGQUIT</systemitem>. The main motivation for this change is to ensure that failed buildfarm runs will get cleaned up without manual intervention; but it also serves to limit the bad effects if a - DBA forcibly removes <filename>postmaster.pid</> and then starts a new + DBA forcibly removes <filename>postmaster.pid</filename> and then starts a new postmaster. </para> </listitem> <listitem> <para> - In <literal>SERIALIZABLE</> transaction isolation mode, serialization + In <literal>SERIALIZABLE</literal> transaction isolation mode, serialization anomalies could be missed due to race conditions during insertions (Kevin Grittner, Thomas Munro) </para> @@ -2512,7 +2512,7 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> Fix failure to emit appropriate WAL records when doing <literal>ALTER - TABLE ... SET TABLESPACE</> for unlogged relations (Michael Paquier, + TABLE ... SET TABLESPACE</literal> for unlogged relations (Michael Paquier, Andres Freund) </para> @@ -2531,21 +2531,21 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> - Fix <command>ALTER COLUMN TYPE</> to reconstruct inherited check + Fix <command>ALTER COLUMN TYPE</command> to reconstruct inherited check constraints properly (Tom Lane) </para> </listitem> <listitem> <para> - Fix <command>REASSIGN OWNED</> to change ownership of composite types + Fix <command>REASSIGN OWNED</command> to change ownership of composite types properly (Álvaro Herrera) </para> </listitem> <listitem> <para> - Fix <command>REASSIGN OWNED</> and <command>ALTER OWNER</> to correctly + Fix <command>REASSIGN OWNED</command> and <command>ALTER OWNER</command> to correctly update granted-permissions lists when changing owners of data types, foreign data wrappers, or foreign servers (Bruce Momjian, Álvaro Herrera) @@ -2554,7 +2554,7 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> - Fix <command>REASSIGN OWNED</> to ignore foreign user mappings, + Fix <command>REASSIGN OWNED</command> to ignore foreign user mappings, rather than fail (Álvaro Herrera) </para> </listitem> @@ -2576,14 +2576,14 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> - Fix dumping of whole-row Vars in <literal>ROW()</> - and <literal>VALUES()</> lists (Tom Lane) + Fix dumping of whole-row Vars in <literal>ROW()</literal> + and <literal>VALUES()</literal> lists (Tom Lane) </para> </listitem> <listitem> <para> - Fix possible internal overflow in <type>numeric</> division + Fix possible internal overflow in <type>numeric</type> division (Dean Rasheed) </para> </listitem> @@ -2635,7 +2635,7 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <para> This causes the code to emit <quote>regular expression is too - complex</> errors in some cases that previously used unreasonable + complex</quote> errors in some cases that previously used unreasonable amounts of time and memory. </para> </listitem> @@ -2648,14 +2648,14 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> - Make <literal>%h</> and <literal>%r</> escapes - in <varname>log_line_prefix</> work for messages emitted due - to <varname>log_connections</> (Tom Lane) + Make <literal>%h</literal> and <literal>%r</literal> escapes + in <varname>log_line_prefix</varname> work for messages emitted due + to <varname>log_connections</varname> (Tom Lane) </para> <para> - Previously, <literal>%h</>/<literal>%r</> started to work just after a - new session had emitted the <quote>connection received</> log message; + Previously, <literal>%h</literal>/<literal>%r</literal> started to work just after a + new session had emitted the <quote>connection received</quote> log message; now they work for that message too. </para> </listitem> @@ -2668,7 +2668,7 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <para> This oversight resulted in failure to recover from crashes - whenever <varname>logging_collector</> is turned on. + whenever <varname>logging_collector</varname> is turned on. </para> </listitem> @@ -2694,13 +2694,13 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> - In <application>psql</>, ensure that <application>libreadline</>'s idea + In <application>psql</application>, ensure that <application>libreadline</application>'s idea of the screen size is updated when the terminal window size changes (Merlin Moncure) </para> <para> - Previously, <application>libreadline</> did not notice if the window + Previously, <application>libreadline</application> did not notice if the window was resized during query output, leading to strange behavior during later input of multiline queries. </para> @@ -2708,15 +2708,15 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> - Fix <application>psql</>'s <literal>\det</> command to interpret its - pattern argument the same way as other <literal>\d</> commands with + Fix <application>psql</application>'s <literal>\det</literal> command to interpret its + pattern argument the same way as other <literal>\d</literal> commands with potentially schema-qualified patterns do (Reece Hart) </para> </listitem> <listitem> <para> - Avoid possible crash in <application>psql</>'s <literal>\c</> command + Avoid possible crash in <application>psql</application>'s <literal>\c</literal> command when previous connection was via Unix socket and command specifies a new hostname and same username (Tom Lane) </para> @@ -2724,21 +2724,21 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> - In <literal>pg_ctl start -w</>, test child process status directly + In <literal>pg_ctl start -w</literal>, test child process status directly rather than relying on heuristics (Tom Lane, Michael Paquier) </para> <para> - Previously, <application>pg_ctl</> relied on an assumption that the new - postmaster would always create <filename>postmaster.pid</> within five + Previously, <application>pg_ctl</application> relied on an assumption that the new + postmaster would always create <filename>postmaster.pid</filename> within five seconds. But that can fail on heavily-loaded systems, - causing <application>pg_ctl</> to report incorrectly that the + causing <application>pg_ctl</application> to report incorrectly that the postmaster failed to start. </para> <para> Except on Windows, this change also means that a <literal>pg_ctl start - -w</> done immediately after another such command will now reliably + -w</literal> done immediately after another such command will now reliably fail, whereas previously it would report success if done within two seconds of the first command. </para> @@ -2746,23 +2746,23 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> - In <literal>pg_ctl start -w</>, don't attempt to use a wildcard listen + In <literal>pg_ctl start -w</literal>, don't attempt to use a wildcard listen address to connect to the postmaster (Kondo Yuta) </para> <para> - On Windows, <application>pg_ctl</> would fail to detect postmaster - startup if <varname>listen_addresses</> is set to <literal>0.0.0.0</> - or <literal>::</>, because it would try to use that value verbatim as + On Windows, <application>pg_ctl</application> would fail to detect postmaster + startup if <varname>listen_addresses</varname> is set to <literal>0.0.0.0</literal> + or <literal>::</literal>, because it would try to use that value verbatim as the address to connect to, which doesn't work. Instead assume - that <literal>127.0.0.1</> or <literal>::1</>, respectively, is the + that <literal>127.0.0.1</literal> or <literal>::1</literal>, respectively, is the right thing to use. </para> </listitem> <listitem> <para> - In <application>pg_ctl</> on Windows, check service status to decide + In <application>pg_ctl</application> on Windows, check service status to decide where to send output, rather than checking if standard output is a terminal (Michael Paquier) </para> @@ -2770,18 +2770,18 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> - In <application>pg_dump</> and <application>pg_basebackup</>, adopt + In <application>pg_dump</application> and <application>pg_basebackup</application>, adopt the GNU convention for handling tar-archive members exceeding 8GB (Tom Lane) </para> <para> - The POSIX standard for <literal>tar</> file format does not allow + The POSIX standard for <literal>tar</literal> file format does not allow archive member files to exceed 8GB, but most modern implementations - of <application>tar</> support an extension that fixes that. Adopt - this extension so that <application>pg_dump</> with <option>-Ft</> no + of <application>tar</application> support an extension that fixes that. Adopt + this extension so that <application>pg_dump</application> with <option>-Ft</option> no longer fails on tables with more than 8GB of data, and so - that <application>pg_basebackup</> can handle files larger than 8GB. + that <application>pg_basebackup</application> can handle files larger than 8GB. In addition, fix some portability issues that could cause failures for members between 4GB and 8GB on some platforms. Potentially these problems could cause unrecoverable data loss due to unreadable backup @@ -2791,44 +2791,44 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> - Fix assorted corner-case bugs in <application>pg_dump</>'s processing + Fix assorted corner-case bugs in <application>pg_dump</application>'s processing of extension member objects (Tom Lane) </para> </listitem> <listitem> <para> - Make <application>pg_dump</> mark a view's triggers as needing to be + Make <application>pg_dump</application> mark a view's triggers as needing to be processed after its rule, to prevent possible failure during - parallel <application>pg_restore</> (Tom Lane) + parallel <application>pg_restore</application> (Tom Lane) </para> </listitem> <listitem> <para> Ensure that relation option values are properly quoted - in <application>pg_dump</> (Kouhei Sutou, Tom Lane) + in <application>pg_dump</application> (Kouhei Sutou, Tom Lane) </para> <para> A reloption value that isn't a simple identifier or number could lead to dump/reload failures due to syntax errors in CREATE statements - issued by <application>pg_dump</>. This is not an issue with any - reloption currently supported by core <productname>PostgreSQL</>, but + issued by <application>pg_dump</application>. This is not an issue with any + reloption currently supported by core <productname>PostgreSQL</productname>, but extensions could allow reloptions that cause the problem. </para> </listitem> <listitem> <para> - Fix <application>pg_upgrade</>'s file-copying code to handle errors + Fix <application>pg_upgrade</application>'s file-copying code to handle errors properly on Windows (Bruce Momjian) </para> </listitem> <listitem> <para> - Install guards in <application>pgbench</> against corner-case overflow + Install guards in <application>pgbench</application> against corner-case overflow conditions during evaluation of script-specified division or modulo operators (Fabien Coelho, Michael Paquier) </para> @@ -2837,22 +2837,22 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> Fix failure to localize messages emitted - by <application>pg_receivexlog</> and <application>pg_recvlogical</> + by <application>pg_receivexlog</application> and <application>pg_recvlogical</application> (Ioseph Kim) </para> </listitem> <listitem> <para> - Avoid dump/reload problems when using both <application>plpython2</> - and <application>plpython3</> (Tom Lane) + Avoid dump/reload problems when using both <application>plpython2</application> + and <application>plpython3</application> (Tom Lane) </para> <para> - In principle, both versions of <application>PL/Python</> can be used in + In principle, both versions of <application>PL/Python</application> can be used in the same database, though not in the same session (because the two - versions of <application>libpython</> cannot safely be used concurrently). - However, <application>pg_restore</> and <application>pg_upgrade</> both + versions of <application>libpython</application> cannot safely be used concurrently). + However, <application>pg_restore</application> and <application>pg_upgrade</application> both do things that can fall foul of the same-session restriction. Work around that by changing the timing of the check. </para> @@ -2860,29 +2860,29 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> - Fix <application>PL/Python</> regression tests to pass with Python 3.5 + Fix <application>PL/Python</application> regression tests to pass with Python 3.5 (Peter Eisentraut) </para> </listitem> <listitem> <para> - Prevent certain <application>PL/Java</> parameters from being set by + Prevent certain <application>PL/Java</application> parameters from being set by non-superusers (Noah Misch) </para> <para> - This change mitigates a <application>PL/Java</> security bug - (CVE-2016-0766), which was fixed in <application>PL/Java</> by marking + This change mitigates a <application>PL/Java</application> security bug + (CVE-2016-0766), which was fixed in <application>PL/Java</application> by marking these parameters as superuser-only. To fix the security hazard for - sites that update <productname>PostgreSQL</> more frequently - than <application>PL/Java</>, make the core code aware of them also. + sites that update <productname>PostgreSQL</productname> more frequently + than <application>PL/Java</application>, make the core code aware of them also. </para> </listitem> <listitem> <para> - Improve <application>libpq</>'s handling of out-of-memory situations + Improve <application>libpq</application>'s handling of out-of-memory situations (Michael Paquier, Amit Kapila, Heikki Linnakangas) </para> </listitem> @@ -2890,42 +2890,42 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> Fix order of arguments - in <application>ecpg</>-generated <literal>typedef</> statements + in <application>ecpg</application>-generated <literal>typedef</literal> statements (Michael Meskes) </para> </listitem> <listitem> <para> - Use <literal>%g</> not <literal>%f</> format - in <application>ecpg</>'s <function>PGTYPESnumeric_from_double()</> + Use <literal>%g</literal> not <literal>%f</literal> format + in <application>ecpg</application>'s <function>PGTYPESnumeric_from_double()</function> (Tom Lane) </para> </listitem> <listitem> <para> - Fix <application>ecpg</>-supplied header files to not contain comments + Fix <application>ecpg</application>-supplied header files to not contain comments continued from a preprocessor directive line onto the next line (Michael Meskes) </para> <para> - Such a comment is rejected by <application>ecpg</>. It's not yet clear - whether <application>ecpg</> itself should be changed. + Such a comment is rejected by <application>ecpg</application>. It's not yet clear + whether <application>ecpg</application> itself should be changed. </para> </listitem> <listitem> <para> - Ensure that <filename>contrib/pgcrypto</>'s <function>crypt()</> + Ensure that <filename>contrib/pgcrypto</filename>'s <function>crypt()</function> function can be interrupted by query cancel (Andreas Karlsson) </para> </listitem> <listitem> <para> - Accept <application>flex</> versions later than 2.5.x + Accept <application>flex</application> versions later than 2.5.x (Tom Lane, Michael Paquier) </para> @@ -2937,19 +2937,19 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> - Install our <filename>missing</> script where PGXS builds can find it + Install our <filename>missing</filename> script where PGXS builds can find it (Jim Nasby) </para> <para> This allows sane behavior in a PGXS build done on a machine where build - tools such as <application>bison</> are missing. + tools such as <application>bison</application> are missing. </para> </listitem> <listitem> <para> - Ensure that <filename>dynloader.h</> is included in the installed + Ensure that <filename>dynloader.h</filename> is included in the installed header files in MSVC builds (Bruce Momjian, Michael Paquier) </para> </listitem> @@ -2957,11 +2957,11 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> Add variant regression test expected-output file to match behavior of - current <application>libxml2</> (Tom Lane) + current <application>libxml2</application> (Tom Lane) </para> <para> - The fix for <application>libxml2</>'s CVE-2015-7499 causes it not to + The fix for <application>libxml2</application>'s CVE-2015-7499 causes it not to output error context reports in some cases where it used to do so. This seems to be a bug, but we'll probably have to live with it for some time, so work around it. @@ -2970,7 +2970,7 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> - Update time zone data files to <application>tzdata</> release 2016a for + Update time zone data files to <application>tzdata</application> release 2016a for DST law changes in Cayman Islands, Metlakatla, and Trans-Baikal Territory (Zabaykalsky Krai), plus historical corrections for Pakistan. </para> @@ -3016,8 +3016,8 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> - Fix <filename>contrib/pgcrypto</> to detect and report - too-short <function>crypt()</> salts (Josh Kupershmidt) + Fix <filename>contrib/pgcrypto</filename> to detect and report + too-short <function>crypt()</function> salts (Josh Kupershmidt) </para> <para> @@ -3043,13 +3043,13 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> - Fix insertion of relations into the relation cache <quote>init file</> + Fix insertion of relations into the relation cache <quote>init file</quote> (Tom Lane) </para> <para> An oversight in a patch in the most recent minor releases - caused <structname>pg_trigger_tgrelid_tgname_index</> to be omitted + caused <structname>pg_trigger_tgrelid_tgname_index</structname> to be omitted from the init file. Subsequent sessions detected this, then deemed the init file to be broken and silently ignored it, resulting in a significant degradation in session startup time. In addition to fixing @@ -3067,7 +3067,7 @@ Branch: REL9_2_STABLE [38bec1805] 2017-01-25 07:02:25 +0900 <listitem> <para> - Improve <command>LISTEN</> startup time when there are many unread + Improve <command>LISTEN</command> startup time when there are many unread notifications (Matt Newell) </para> </listitem> @@ -3085,7 +3085,7 @@ Branch: REL9_1_STABLE [9b1b9446f] 2015-08-27 12:22:10 -0400 </para> <para> - This substantially improves performance when <application>pg_dump</> + This substantially improves performance when <application>pg_dump</application> tries to dump a large number of tables. </para> </listitem> @@ -3100,13 +3100,13 @@ Branch: REL9_1_STABLE [9b1b9446f] 2015-08-27 12:22:10 -0400 too many bugs in practice, both in the underlying OpenSSL library and in our usage of it. Renegotiation will be removed entirely in 9.5 and later. In the older branches, just change the default value - of <varname>ssl_renegotiation_limit</> to zero (disabled). + of <varname>ssl_renegotiation_limit</varname> to zero (disabled). </para> </listitem> <listitem> <para> - Lower the minimum values of the <literal>*_freeze_max_age</> parameters + Lower the minimum values of the <literal>*_freeze_max_age</literal> parameters (Andres Freund) </para> @@ -3118,14 +3118,14 @@ Branch: REL9_1_STABLE [9b1b9446f] 2015-08-27 12:22:10 -0400 <listitem> <para> - Limit the maximum value of <varname>wal_buffers</> to 2GB to avoid + Limit the maximum value of <varname>wal_buffers</varname> to 2GB to avoid server crashes (Josh Berkus) </para> </listitem> <listitem> <para> - Fix rare internal overflow in multiplication of <type>numeric</> values + Fix rare internal overflow in multiplication of <type>numeric</type> values (Dean Rasheed) </para> </listitem> @@ -3133,21 +3133,21 @@ Branch: REL9_1_STABLE [9b1b9446f] 2015-08-27 12:22:10 -0400 <listitem> <para> Guard against hard-to-reach stack overflows involving record types, - range types, <type>json</>, <type>jsonb</>, <type>tsquery</>, - <type>ltxtquery</> and <type>query_int</> (Noah Misch) + range types, <type>json</type>, <type>jsonb</type>, <type>tsquery</type>, + <type>ltxtquery</type> and <type>query_int</type> (Noah Misch) </para> </listitem> <listitem> <para> - Fix handling of <literal>DOW</> and <literal>DOY</> in datetime input + Fix handling of <literal>DOW</literal> and <literal>DOY</literal> in datetime input (Greg Stark) </para> <para> These tokens aren't meant to be used in datetime values, but previously they resulted in opaque internal error messages rather - than <quote>invalid input syntax</>. + than <quote>invalid input syntax</quote>. </para> </listitem> @@ -3160,7 +3160,7 @@ Branch: REL9_1_STABLE [9b1b9446f] 2015-08-27 12:22:10 -0400 <listitem> <para> Add recursion depth protections to regular expression, <literal>SIMILAR - TO</>, and <literal>LIKE</> matching (Tom Lane) + TO</literal>, and <literal>LIKE</literal> matching (Tom Lane) </para> <para> @@ -3212,22 +3212,22 @@ Branch: REL9_1_STABLE [9b1b9446f] 2015-08-27 12:22:10 -0400 <listitem> <para> - Fix <quote>unexpected out-of-memory situation during sort</> errors - when using tuplestores with small <varname>work_mem</> settings (Tom + Fix <quote>unexpected out-of-memory situation during sort</quote> errors + when using tuplestores with small <varname>work_mem</varname> settings (Tom Lane) </para> </listitem> <listitem> <para> - Fix very-low-probability stack overrun in <function>qsort</> (Tom Lane) + Fix very-low-probability stack overrun in <function>qsort</function> (Tom Lane) </para> </listitem> <listitem> <para> - Fix <quote>invalid memory alloc request size</> failure in hash joins - with large <varname>work_mem</> settings (Tomas Vondra, Tom Lane) + Fix <quote>invalid memory alloc request size</quote> failure in hash joins + with large <varname>work_mem</varname> settings (Tomas Vondra, Tom Lane) </para> </listitem> @@ -3240,9 +3240,9 @@ Branch: REL9_1_STABLE [9b1b9446f] 2015-08-27 12:22:10 -0400 These mistakes could lead to incorrect query plans that would give wrong answers, or to assertion failures in assert-enabled builds, or to odd planner errors such as <quote>could not devise a query plan for the - given query</>, <quote>could not find pathkey item to - sort</>, <quote>plan should not reference subplan's variable</>, - or <quote>failed to assign all NestLoopParams to plan nodes</>. + given query</quote>, <quote>could not find pathkey item to + sort</quote>, <quote>plan should not reference subplan's variable</quote>, + or <quote>failed to assign all NestLoopParams to plan nodes</quote>. Thanks are due to Andreas Seltenreich and Piotr Stefaniak for fuzz testing that exposed these problems. </para> @@ -3250,7 +3250,7 @@ Branch: REL9_1_STABLE [9b1b9446f] 2015-08-27 12:22:10 -0400 <listitem> <para> - Improve planner's performance for <command>UPDATE</>/<command>DELETE</> + Improve planner's performance for <command>UPDATE</command>/<command>DELETE</command> on large inheritance sets (Tom Lane, Dean Rasheed) </para> </listitem> @@ -3271,12 +3271,12 @@ Branch: REL9_1_STABLE [9b1b9446f] 2015-08-27 12:22:10 -0400 <para> During postmaster shutdown, ensure that per-socket lock files are removed and listen sockets are closed before we remove - the <filename>postmaster.pid</> file (Tom Lane) + the <filename>postmaster.pid</filename> file (Tom Lane) </para> <para> This avoids race-condition failures if an external script attempts to - start a new postmaster as soon as <literal>pg_ctl stop</> returns. + start a new postmaster as soon as <literal>pg_ctl stop</literal> returns. </para> </listitem> @@ -3296,7 +3296,7 @@ Branch: REL9_1_STABLE [9b1b9446f] 2015-08-27 12:22:10 -0400 <listitem> <para> - Do not print a <literal>WARNING</> when an autovacuum worker is already + Do not print a <literal>WARNING</literal> when an autovacuum worker is already gone when we attempt to signal it, and reduce log verbosity for such signals (Tom Lane) </para> @@ -3333,7 +3333,7 @@ Branch: REL9_1_STABLE [9b1b9446f] 2015-08-27 12:22:10 -0400 </para> <para> - <command>VACUUM</> attempted to recycle such pages, but did so in a + <command>VACUUM</command> attempted to recycle such pages, but did so in a way that wasn't crash-safe. </para> </listitem> @@ -3341,44 +3341,44 @@ Branch: REL9_1_STABLE [9b1b9446f] 2015-08-27 12:22:10 -0400 <listitem> <para> Fix off-by-one error that led to otherwise-harmless warnings - about <quote>apparent wraparound</> in subtrans/multixact truncation + about <quote>apparent wraparound</quote> in subtrans/multixact truncation (Thomas Munro) </para> </listitem> <listitem> <para> - Fix misreporting of <command>CONTINUE</> and <command>MOVE</> statement - types in <application>PL/pgSQL</>'s error context messages + Fix misreporting of <command>CONTINUE</command> and <command>MOVE</command> statement + types in <application>PL/pgSQL</application>'s error context messages (Pavel Stehule, Tom Lane) </para> </listitem> <listitem> <para> - Fix <application>PL/Perl</> to handle non-<acronym>ASCII</> error + Fix <application>PL/Perl</application> to handle non-<acronym>ASCII</acronym> error message texts correctly (Alex Hunsaker) </para> </listitem> <listitem> <para> - Fix <application>PL/Python</> crash when returning the string - representation of a <type>record</> result (Tom Lane) + Fix <application>PL/Python</application> crash when returning the string + representation of a <type>record</type> result (Tom Lane) </para> </listitem> <listitem> <para> - Fix some places in <application>PL/Tcl</> that neglected to check for - failure of <function>malloc()</> calls (Michael Paquier, Álvaro + Fix some places in <application>PL/Tcl</application> that neglected to check for + failure of <function>malloc()</function> calls (Michael Paquier, Álvaro Herrera) </para> </listitem> <listitem> <para> - In <filename>contrib/isn</>, fix output of ISBN-13 numbers that begin + In <filename>contrib/isn</filename>, fix output of ISBN-13 numbers that begin with 979 (Fabien Coelho) </para> @@ -3395,14 +3395,14 @@ Branch: REL9_2_STABLE [e90a629e1] 2015-09-22 14:58:38 -0700 <listitem> <para> - Fix <filename>contrib/sepgsql</>'s handling of <command>SELECT INTO</> + Fix <filename>contrib/sepgsql</filename>'s handling of <command>SELECT INTO</command> statements (Kohei KaiGai) </para> </listitem> <listitem> <para> - Improve <application>libpq</>'s handling of out-of-memory conditions + Improve <application>libpq</application>'s handling of out-of-memory conditions (Michael Paquier, Heikki Linnakangas) </para> </listitem> @@ -3410,64 +3410,64 @@ Branch: REL9_2_STABLE [e90a629e1] 2015-09-22 14:58:38 -0700 <listitem> <para> Fix memory leaks and missing out-of-memory checks - in <application>ecpg</> (Michael Paquier) + in <application>ecpg</application> (Michael Paquier) </para> </listitem> <listitem> <para> - Fix <application>psql</>'s code for locale-aware formatting of numeric + Fix <application>psql</application>'s code for locale-aware formatting of numeric output (Tom Lane) </para> <para> - The formatting code invoked by <literal>\pset numericlocale on</> + The formatting code invoked by <literal>\pset numericlocale on</literal> did the wrong thing for some uncommon cases such as numbers with an exponent but no decimal point. It could also mangle already-localized - output from the <type>money</> data type. + output from the <type>money</type> data type. </para> </listitem> <listitem> <para> - Prevent crash in <application>psql</>'s <command>\c</> command when + Prevent crash in <application>psql</application>'s <command>\c</command> command when there is no current connection (Noah Misch) </para> </listitem> <listitem> <para> - Make <application>pg_dump</> handle inherited <literal>NOT VALID</> + Make <application>pg_dump</application> handle inherited <literal>NOT VALID</literal> check constraints correctly (Tom Lane) </para> </listitem> <listitem> <para> - Fix selection of default <application>zlib</> compression level - in <application>pg_dump</>'s directory output format (Andrew Dunstan) + Fix selection of default <application>zlib</application> compression level + in <application>pg_dump</application>'s directory output format (Andrew Dunstan) </para> </listitem> <listitem> <para> - Ensure that temporary files created during a <application>pg_dump</> - run with <acronym>tar</>-format output are not world-readable (Michael + Ensure that temporary files created during a <application>pg_dump</application> + run with <acronym>tar</acronym>-format output are not world-readable (Michael Paquier) </para> </listitem> <listitem> <para> - Fix <application>pg_dump</> and <application>pg_upgrade</> to support - cases where the <literal>postgres</> or <literal>template1</> database + Fix <application>pg_dump</application> and <application>pg_upgrade</application> to support + cases where the <literal>postgres</literal> or <literal>template1</literal> database is in a non-default tablespace (Marti Raudsepp, Bruce Momjian) </para> </listitem> <listitem> <para> - Fix <application>pg_dump</> to handle object privileges sanely when + Fix <application>pg_dump</application> to handle object privileges sanely when dumping from a server too old to have a particular privilege type (Tom Lane) </para> @@ -3475,11 +3475,11 @@ Branch: REL9_2_STABLE [e90a629e1] 2015-09-22 14:58:38 -0700 <para> When dumping data types from pre-9.2 servers, and when dumping functions or procedural languages from pre-7.3 - servers, <application>pg_dump</> would - produce <command>GRANT</>/<command>REVOKE</> commands that revoked the + servers, <application>pg_dump</application> would + produce <command>GRANT</command>/<command>REVOKE</command> commands that revoked the owner's grantable privileges and instead granted all privileges - to <literal>PUBLIC</>. Since the privileges involved are - just <literal>USAGE</> and <literal>EXECUTE</>, this isn't a security + to <literal>PUBLIC</literal>. Since the privileges involved are + just <literal>USAGE</literal> and <literal>EXECUTE</literal>, this isn't a security problem, but it's certainly a surprising representation of the older systems' behavior. Fix it to leave the default privilege state alone in these cases. @@ -3488,18 +3488,18 @@ Branch: REL9_2_STABLE [e90a629e1] 2015-09-22 14:58:38 -0700 <listitem> <para> - Fix <application>pg_dump</> to dump shell types (Tom Lane) + Fix <application>pg_dump</application> to dump shell types (Tom Lane) </para> <para> Shell types (that is, not-yet-fully-defined types) aren't useful for - much, but nonetheless <application>pg_dump</> should dump them. + much, but nonetheless <application>pg_dump</application> should dump them. </para> </listitem> <listitem> <para> - Fix assorted minor memory leaks in <application>pg_dump</> and other + Fix assorted minor memory leaks in <application>pg_dump</application> and other client-side programs (Michael Paquier) </para> </listitem> @@ -3507,11 +3507,11 @@ Branch: REL9_2_STABLE [e90a629e1] 2015-09-22 14:58:38 -0700 <listitem> <para> Fix spinlock assembly code for PPC hardware to be compatible - with <acronym>AIX</>'s native assembler (Tom Lane) + with <acronym>AIX</acronym>'s native assembler (Tom Lane) </para> <para> - Building with <application>gcc</> didn't work if <application>gcc</> + Building with <application>gcc</application> didn't work if <application>gcc</application> had been configured to use the native assembler, which is becoming more common. </para> @@ -3519,14 +3519,14 @@ Branch: REL9_2_STABLE [e90a629e1] 2015-09-22 14:58:38 -0700 <listitem> <para> - On <acronym>AIX</>, test the <literal>-qlonglong</> compiler option + On <acronym>AIX</acronym>, test the <literal>-qlonglong</literal> compiler option rather than just assuming it's safe to use (Noah Misch) </para> </listitem> <listitem> <para> - On <acronym>AIX</>, use <literal>-Wl,-brtllib</> link option to allow + On <acronym>AIX</acronym>, use <literal>-Wl,-brtllib</literal> link option to allow symbols to be resolved at runtime (Noah Misch) </para> @@ -3538,38 +3538,38 @@ Branch: REL9_2_STABLE [e90a629e1] 2015-09-22 14:58:38 -0700 <listitem> <para> Avoid use of inline functions when compiling with - 32-bit <application>xlc</>, due to compiler bugs (Noah Misch) + 32-bit <application>xlc</application>, due to compiler bugs (Noah Misch) </para> </listitem> <listitem> <para> - Use <filename>librt</> for <function>sched_yield()</> when necessary, + Use <filename>librt</filename> for <function>sched_yield()</function> when necessary, which it is on some Solaris versions (Oskari Saarenmaa) </para> </listitem> <listitem> <para> - Fix Windows <filename>install.bat</> script to handle target directory + Fix Windows <filename>install.bat</filename> script to handle target directory names that contain spaces (Heikki Linnakangas) </para> </listitem> <listitem> <para> - Make the numeric form of the <productname>PostgreSQL</> version number - (e.g., <literal>90405</>) readily available to extension Makefiles, - as a variable named <varname>VERSION_NUM</> (Michael Paquier) + Make the numeric form of the <productname>PostgreSQL</productname> version number + (e.g., <literal>90405</literal>) readily available to extension Makefiles, + as a variable named <varname>VERSION_NUM</varname> (Michael Paquier) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2015g for + Update time zone data files to <application>tzdata</application> release 2015g for DST law changes in Cayman Islands, Fiji, Moldova, Morocco, Norfolk Island, North Korea, Turkey, and Uruguay. There is a new zone name - <literal>America/Fort_Nelson</> for the Canadian Northern Rockies. + <literal>America/Fort_Nelson</literal> for the Canadian Northern Rockies. </para> </listitem> @@ -3618,7 +3618,7 @@ Branch: REL9_2_STABLE [e90a629e1] 2015-09-22 14:58:38 -0700 <para> With just the wrong timing of concurrent activity, a <command>VACUUM - FULL</> on a system catalog might fail to update the <quote>init file</> + FULL</command> on a system catalog might fail to update the <quote>init file</quote> that's used to avoid cache-loading work for new sessions. This would result in later sessions being unable to access that catalog at all. This is a very ancient bug, but it's so hard to trigger that no @@ -3629,13 +3629,13 @@ Branch: REL9_2_STABLE [e90a629e1] 2015-09-22 14:58:38 -0700 <listitem> <para> Avoid deadlock between incoming sessions and <literal>CREATE/DROP - DATABASE</> (Tom Lane) + DATABASE</literal> (Tom Lane) </para> <para> A new session starting in a database that is the target of - a <command>DROP DATABASE</> command, or is the template for - a <command>CREATE DATABASE</> command, could cause the command to wait + a <command>DROP DATABASE</command> command, or is the template for + a <command>CREATE DATABASE</command> command, could cause the command to wait for five seconds and then fail, even if the new session would have exited before that. </para> @@ -3681,12 +3681,12 @@ Branch: REL9_2_STABLE [e90a629e1] 2015-09-22 14:58:38 -0700 <listitem> <para> - Avoid failures while <function>fsync</>'ing data directory during + Avoid failures while <function>fsync</function>'ing data directory during crash restart (Abhijit Menon-Sen, Tom Lane) </para> <para> - In the previous minor releases we added a patch to <function>fsync</> + In the previous minor releases we added a patch to <function>fsync</function> everything in the data directory after a crash. Unfortunately its response to any error condition was to fail, thereby preventing the server from starting up, even when the problem was quite harmless. @@ -3700,36 +3700,36 @@ Branch: REL9_2_STABLE [e90a629e1] 2015-09-22 14:58:38 -0700 <listitem> <para> - Fix <function>pg_get_functiondef()</> to show - functions' <literal>LEAKPROOF</> property, if set (Jeevan Chalke) + Fix <function>pg_get_functiondef()</function> to show + functions' <literal>LEAKPROOF</literal> property, if set (Jeevan Chalke) </para> </listitem> <listitem> <para> - Remove <application>configure</>'s check prohibiting linking to a - threaded <application>libpython</> - on <systemitem class="osname">OpenBSD</> (Tom Lane) + Remove <application>configure</application>'s check prohibiting linking to a + threaded <application>libpython</application> + on <systemitem class="osname">OpenBSD</systemitem> (Tom Lane) </para> <para> The failure this restriction was meant to prevent seems to not be a - problem anymore on current <systemitem class="osname">OpenBSD</> + problem anymore on current <systemitem class="osname">OpenBSD</systemitem> versions. </para> </listitem> <listitem> <para> - Allow <application>libpq</> to use TLS protocol versions beyond v1 + Allow <application>libpq</application> to use TLS protocol versions beyond v1 (Noah Misch) </para> <para> - For a long time, <application>libpq</> was coded so that the only SSL + For a long time, <application>libpq</application> was coded so that the only SSL protocol it would allow was TLS v1. Now that newer TLS versions are becoming popular, allow it to negotiate the highest commonly-supported - TLS version with the server. (<productname>PostgreSQL</> servers were + TLS version with the server. (<productname>PostgreSQL</productname> servers were already capable of such negotiation, so no change is needed on the server side.) This is a back-patch of a change already released in 9.4.0. @@ -3763,8 +3763,8 @@ Branch: REL9_2_STABLE [e90a629e1] 2015-09-22 14:58:38 -0700 </para> <para> - However, if you use <filename>contrib/citext</>'s - <function>regexp_matches()</> functions, see the changelog entry below + However, if you use <filename>contrib/citext</filename>'s + <function>regexp_matches()</function> functions, see the changelog entry below about that. </para> @@ -3802,7 +3802,7 @@ Branch: REL9_2_STABLE [e90a629e1] 2015-09-22 14:58:38 -0700 </para> <para> - Our replacement implementation of <function>snprintf()</> failed to + Our replacement implementation of <function>snprintf()</function> failed to check for errors reported by the underlying system library calls; the main case that might be missed is out-of-memory situations. In the worst case this might lead to information exposure, due to our @@ -3812,7 +3812,7 @@ Branch: REL9_2_STABLE [e90a629e1] 2015-09-22 14:58:38 -0700 </para> <para> - It remains possible that some calls of the <function>*printf()</> + It remains possible that some calls of the <function>*printf()</function> family of functions are vulnerable to information disclosure if an out-of-memory error occurs at just the wrong time. We judge the risk to not be large, but will continue analysis in this area. @@ -3822,15 +3822,15 @@ Branch: REL9_2_STABLE [e90a629e1] 2015-09-22 14:58:38 -0700 <listitem> <para> - In <filename>contrib/pgcrypto</>, uniformly report decryption failures - as <quote>Wrong key or corrupt data</> (Noah Misch) + In <filename>contrib/pgcrypto</filename>, uniformly report decryption failures + as <quote>Wrong key or corrupt data</quote> (Noah Misch) </para> <para> Previously, some cases of decryption with an incorrect key could report other error message texts. It has been shown that such variance in error reports can aid attackers in recovering keys from other systems. - While it's unknown whether <filename>pgcrypto</>'s specific behaviors + While it's unknown whether <filename>pgcrypto</filename>'s specific behaviors are likewise exploitable, it seems better to avoid the risk by using a one-size-fits-all message. (CVE-2015-3167) @@ -3839,16 +3839,16 @@ Branch: REL9_2_STABLE [e90a629e1] 2015-09-22 14:58:38 -0700 <listitem> <para> - Fix incorrect declaration of <filename>contrib/citext</>'s - <function>regexp_matches()</> functions (Tom Lane) + Fix incorrect declaration of <filename>contrib/citext</filename>'s + <function>regexp_matches()</function> functions (Tom Lane) </para> <para> - These functions should return <type>setof text[]</>, like the core + These functions should return <type>setof text[]</type>, like the core functions they are wrappers for; but they were incorrectly declared as - returning just <type>text[]</>. This mistake had two results: first, + returning just <type>text[]</type>. This mistake had two results: first, if there was no match you got a scalar null result, whereas what you - should get is an empty set (zero rows). Second, the <literal>g</> flag + should get is an empty set (zero rows). Second, the <literal>g</literal> flag was effectively ignored, since you would get only one result array even if there were multiple matches. </para> @@ -3856,16 +3856,16 @@ Branch: REL9_2_STABLE [e90a629e1] 2015-09-22 14:58:38 -0700 <para> While the latter behavior is clearly a bug, there might be applications depending on the former behavior; therefore the function declarations - will not be changed by default until <productname>PostgreSQL</> 9.5. + will not be changed by default until <productname>PostgreSQL</productname> 9.5. In pre-9.5 branches, the old behavior exists in version 1.0 of - the <literal>citext</> extension, while we have provided corrected - declarations in version 1.1 (which is <emphasis>not</> installed by + the <literal>citext</literal> extension, while we have provided corrected + declarations in version 1.1 (which is <emphasis>not</emphasis> installed by default). To adopt the fix in pre-9.5 branches, execute - <literal>ALTER EXTENSION citext UPDATE TO '1.1'</> in each database in - which <literal>citext</> is installed. (You can also <quote>update</> + <literal>ALTER EXTENSION citext UPDATE TO '1.1'</literal> in each database in + which <literal>citext</literal> is installed. (You can also <quote>update</quote> back to 1.0 if you need to undo that.) Be aware that either update direction will require dropping and recreating any views or rules that - use <filename>citext</>'s <function>regexp_matches()</> functions. + use <filename>citext</filename>'s <function>regexp_matches()</function> functions. </para> </listitem> @@ -3907,7 +3907,7 @@ Branch: REL9_2_STABLE [e90a629e1] 2015-09-22 14:58:38 -0700 <para> This oversight in the planner has been observed to cause <quote>could - not find RelOptInfo for given relids</> errors, but it seems possible + not find RelOptInfo for given relids</quote> errors, but it seems possible that sometimes an incorrect query plan might get past that consistency check and result in silently-wrong query output. </para> @@ -3935,7 +3935,7 @@ Branch: REL9_2_STABLE [e90a629e1] 2015-09-22 14:58:38 -0700 <para> This oversight has been seen to lead to <quote>failed to join all - relations together</> errors in queries involving <literal>LATERAL</>, + relations together</quote> errors in queries involving <literal>LATERAL</literal>, and that might happen in other cases as well. </para> </listitem> @@ -3943,7 +3943,7 @@ Branch: REL9_2_STABLE [e90a629e1] 2015-09-22 14:58:38 -0700 <listitem> <para> Fix possible deadlock at startup - when <literal>max_prepared_transactions</> is too small + when <literal>max_prepared_transactions</literal> is too small (Heikki Linnakangas) </para> </listitem> @@ -3964,14 +3964,14 @@ Branch: REL9_0_STABLE [850e1a566] 2015-05-18 17:44:21 -0300 <listitem> <para> - Avoid <quote>cannot GetMultiXactIdMembers() during recovery</> error + Avoid <quote>cannot GetMultiXactIdMembers() during recovery</quote> error (Álvaro Herrera) </para> </listitem> <listitem> <para> - Recursively <function>fsync()</> the data directory after a crash + Recursively <function>fsync()</function> the data directory after a crash (Abhijit Menon-Sen, Robert Haas) </para> @@ -3991,19 +3991,19 @@ Branch: REL9_0_STABLE [850e1a566] 2015-05-18 17:44:21 -0300 <listitem> <para> - Cope with unexpected signals in <function>LockBufferForCleanup()</> + Cope with unexpected signals in <function>LockBufferForCleanup()</function> (Andres Freund) </para> <para> This oversight could result in spurious errors about <quote>multiple - backends attempting to wait for pincount 1</>. + backends attempting to wait for pincount 1</quote>. </para> </listitem> <listitem> <para> - Fix crash when doing <literal>COPY IN</> to a table with check + Fix crash when doing <literal>COPY IN</literal> to a table with check constraints that contain whole-row references (Tom Lane) </para> @@ -4050,18 +4050,18 @@ Branch: REL9_0_STABLE [850e1a566] 2015-05-18 17:44:21 -0300 </para> <para> - <command>ANALYZE</> executes index expressions many times; if there are + <command>ANALYZE</command> executes index expressions many times; if there are slow functions in such an expression, it's desirable to be able to - cancel the <command>ANALYZE</> before that loop finishes. + cancel the <command>ANALYZE</command> before that loop finishes. </para> </listitem> <listitem> <para> - Ensure <structfield>tableoid</> of a foreign table is reported - correctly when a <literal>READ COMMITTED</> recheck occurs after - locking rows in <command>SELECT FOR UPDATE</>, <command>UPDATE</>, - or <command>DELETE</> (Etsuro Fujita) + Ensure <structfield>tableoid</structfield> of a foreign table is reported + correctly when a <literal>READ COMMITTED</literal> recheck occurs after + locking rows in <command>SELECT FOR UPDATE</command>, <command>UPDATE</command>, + or <command>DELETE</command> (Etsuro Fujita) </para> </listitem> @@ -4074,20 +4074,20 @@ Branch: REL9_0_STABLE [850e1a566] 2015-05-18 17:44:21 -0300 <listitem> <para> - Recommend setting <literal>include_realm</> to 1 when using + Recommend setting <literal>include_realm</literal> to 1 when using Kerberos/GSSAPI/SSPI authentication (Stephen Frost) </para> <para> Without this, identically-named users from different realms cannot be distinguished. For the moment this is only a documentation change, but - it will become the default setting in <productname>PostgreSQL</> 9.5. + it will become the default setting in <productname>PostgreSQL</productname> 9.5. </para> </listitem> <listitem> <para> - Remove code for matching IPv4 <filename>pg_hba.conf</> entries to + Remove code for matching IPv4 <filename>pg_hba.conf</filename> entries to IPv4-in-IPv6 addresses (Tom Lane) </para> @@ -4100,20 +4100,20 @@ Branch: REL9_0_STABLE [850e1a566] 2015-05-18 17:44:21 -0300 crashes on some systems, so let's just remove it rather than fix it. (Had we chosen to fix it, that would make for a subtle and potentially security-sensitive change in the effective meaning of - IPv4 <filename>pg_hba.conf</> entries, which does not seem like a good + IPv4 <filename>pg_hba.conf</filename> entries, which does not seem like a good thing to do in minor releases.) </para> </listitem> <listitem> <para> - Report WAL flush, not insert, position in <literal>IDENTIFY_SYSTEM</> + Report WAL flush, not insert, position in <literal>IDENTIFY_SYSTEM</literal> replication command (Heikki Linnakangas) </para> <para> This avoids a possible startup failure - in <application>pg_receivexlog</>. + in <application>pg_receivexlog</application>. </para> </listitem> @@ -4121,14 +4121,14 @@ Branch: REL9_0_STABLE [850e1a566] 2015-05-18 17:44:21 -0300 <para> While shutting down service on Windows, periodically send status updates to the Service Control Manager to prevent it from killing the - service too soon; and ensure that <application>pg_ctl</> will wait for + service too soon; and ensure that <application>pg_ctl</application> will wait for shutdown (Krystian Bigaj) </para> </listitem> <listitem> <para> - Reduce risk of network deadlock when using <application>libpq</>'s + Reduce risk of network deadlock when using <application>libpq</application>'s non-blocking mode (Heikki Linnakangas) </para> @@ -4137,32 +4137,32 @@ Branch: REL9_0_STABLE [850e1a566] 2015-05-18 17:44:21 -0300 buffer every so often, in case the server has sent enough response data to cause it to block on output. (A typical scenario is that the server is sending a stream of NOTICE messages during <literal>COPY FROM - STDIN</>.) This worked properly in the normal blocking mode, but not - so much in non-blocking mode. We've modified <application>libpq</> + STDIN</literal>.) This worked properly in the normal blocking mode, but not + so much in non-blocking mode. We've modified <application>libpq</application> to opportunistically drain input when it can, but a full defense against this problem requires application cooperation: the application should watch for socket read-ready as well as write-ready conditions, - and be sure to call <function>PQconsumeInput()</> upon read-ready. + and be sure to call <function>PQconsumeInput()</function> upon read-ready. </para> </listitem> <listitem> <para> - In <application>libpq</>, fix misparsing of empty values in URI + In <application>libpq</application>, fix misparsing of empty values in URI connection strings (Thomas Fanghaenel) </para> </listitem> <listitem> <para> - Fix array handling in <application>ecpg</> (Michael Meskes) + Fix array handling in <application>ecpg</application> (Michael Meskes) </para> </listitem> <listitem> <para> - Fix <application>psql</> to sanely handle URIs and conninfo strings as - the first parameter to <command>\connect</> + Fix <application>psql</application> to sanely handle URIs and conninfo strings as + the first parameter to <command>\connect</command> (David Fetter, Andrew Dunstan, Álvaro Herrera) </para> @@ -4175,38 +4175,38 @@ Branch: REL9_0_STABLE [850e1a566] 2015-05-18 17:44:21 -0300 <listitem> <para> - Suppress incorrect complaints from <application>psql</> on some - platforms that it failed to write <filename>~/.psql_history</> at exit + Suppress incorrect complaints from <application>psql</application> on some + platforms that it failed to write <filename>~/.psql_history</filename> at exit (Tom Lane) </para> <para> This misbehavior was caused by a workaround for a bug in very old - (pre-2006) versions of <application>libedit</>. We fixed it by + (pre-2006) versions of <application>libedit</application>. We fixed it by removing the workaround, which will cause a similar failure to appear - for anyone still using such versions of <application>libedit</>. - Recommendation: upgrade that library, or use <application>libreadline</>. + for anyone still using such versions of <application>libedit</application>. + Recommendation: upgrade that library, or use <application>libreadline</application>. </para> </listitem> <listitem> <para> - Fix <application>pg_dump</>'s rule for deciding which casts are + Fix <application>pg_dump</application>'s rule for deciding which casts are system-provided casts that should not be dumped (Tom Lane) </para> </listitem> <listitem> <para> - In <application>pg_dump</>, fix failure to honor <literal>-Z</> - compression level option together with <literal>-Fd</> + In <application>pg_dump</application>, fix failure to honor <literal>-Z</literal> + compression level option together with <literal>-Fd</literal> (Michael Paquier) </para> </listitem> <listitem> <para> - Make <application>pg_dump</> consider foreign key relationships + Make <application>pg_dump</application> consider foreign key relationships between extension configuration tables while choosing dump order (Gilles Darold, Michael Paquier, Stephen Frost) </para> @@ -4219,14 +4219,14 @@ Branch: REL9_0_STABLE [850e1a566] 2015-05-18 17:44:21 -0300 <listitem> <para> - Fix dumping of views that are just <literal>VALUES(...)</> but have + Fix dumping of views that are just <literal>VALUES(...)</literal> but have column aliases (Tom Lane) </para> </listitem> <listitem> <para> - In <application>pg_upgrade</>, force timeline 1 in the new cluster + In <application>pg_upgrade</application>, force timeline 1 in the new cluster (Bruce Momjian) </para> @@ -4238,7 +4238,7 @@ Branch: REL9_0_STABLE [850e1a566] 2015-05-18 17:44:21 -0300 <listitem> <para> - In <application>pg_upgrade</>, check for improperly non-connectable + In <application>pg_upgrade</application>, check for improperly non-connectable databases before proceeding (Bruce Momjian) </para> @@ -4246,28 +4246,28 @@ Branch: REL9_0_STABLE [850e1a566] 2015-05-18 17:44:21 -0300 <listitem> <para> - In <application>pg_upgrade</>, quote directory paths - properly in the generated <literal>delete_old_cluster</> script + In <application>pg_upgrade</application>, quote directory paths + properly in the generated <literal>delete_old_cluster</literal> script (Bruce Momjian) </para> </listitem> <listitem> <para> - In <application>pg_upgrade</>, preserve database-level freezing info + In <application>pg_upgrade</application>, preserve database-level freezing info properly (Bruce Momjian) </para> <para> This oversight could cause missing-clog-file errors for tables within - the <literal>postgres</> and <literal>template1</> databases. + the <literal>postgres</literal> and <literal>template1</literal> databases. </para> </listitem> <listitem> <para> - Run <application>pg_upgrade</> and <application>pg_resetxlog</> with + Run <application>pg_upgrade</application> and <application>pg_resetxlog</application> with restricted privileges on Windows, so that they don't fail when run by an administrator (Muhammad Asif Naeem) </para> @@ -4275,8 +4275,8 @@ Branch: REL9_0_STABLE [850e1a566] 2015-05-18 17:44:21 -0300 <listitem> <para> - Improve handling of <function>readdir()</> failures when scanning - directories in <application>initdb</> and <application>pg_basebackup</> + Improve handling of <function>readdir()</function> failures when scanning + directories in <application>initdb</application> and <application>pg_basebackup</application> (Marco Nenciarini) </para> </listitem> @@ -4288,18 +4288,18 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Fix failure in <application>pg_receivexlog</> (Andres Freund) + Fix failure in <application>pg_receivexlog</application> (Andres Freund) </para> <para> A patch merge mistake in 9.2.10 led to <quote>could not create archive - status file</> errors. + status file</quote> errors. </para> </listitem> <listitem> <para> - Fix slow sorting algorithm in <filename>contrib/intarray</> (Tom Lane) + Fix slow sorting algorithm in <filename>contrib/intarray</filename> (Tom Lane) </para> </listitem> @@ -4311,7 +4311,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Update time zone data files to <application>tzdata</> release 2015d + Update time zone data files to <application>tzdata</application> release 2015d for DST law changes in Egypt, Mongolia, and Palestine, plus historical changes in Canada and Chile. Also adopt revised zone abbreviations for the America/Adak zone (HST/HDT not HAST/HADT). @@ -4346,11 +4346,11 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> However, if you are a Windows user and are using the <quote>Norwegian - (Bokmål)</> locale, manual action is needed after the upgrade to - replace any <quote>Norwegian (Bokmål)_Norway</> locale names stored - in <productname>PostgreSQL</> system catalogs with the plain-ASCII - alias <quote>Norwegian_Norway</>. For details see - <ulink url="http://wiki.postgresql.org/wiki/Changes_To_Norwegian_Locale"></> + (Bokmål)</quote> locale, manual action is needed after the upgrade to + replace any <quote>Norwegian (Bokmål)_Norway</quote> locale names stored + in <productname>PostgreSQL</productname> system catalogs with the plain-ASCII + alias <quote>Norwegian_Norway</quote>. For details see + <ulink url="http://wiki.postgresql.org/wiki/Changes_To_Norwegian_Locale"></ulink> </para> <para> @@ -4367,15 +4367,15 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Fix buffer overruns in <function>to_char()</> + Fix buffer overruns in <function>to_char()</function> (Bruce Momjian) </para> <para> - When <function>to_char()</> processes a numeric formatting template - calling for a large number of digits, <productname>PostgreSQL</> + When <function>to_char()</function> processes a numeric formatting template + calling for a large number of digits, <productname>PostgreSQL</productname> would read past the end of a buffer. When processing a crafted - timestamp formatting template, <productname>PostgreSQL</> would write + timestamp formatting template, <productname>PostgreSQL</productname> would write past the end of a buffer. Either case could crash the server. We have not ruled out the possibility of attacks that lead to privilege escalation, though they seem unlikely. @@ -4385,27 +4385,27 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Fix buffer overrun in replacement <function>*printf()</> functions + Fix buffer overrun in replacement <function>*printf()</function> functions (Tom Lane) </para> <para> - <productname>PostgreSQL</> includes a replacement implementation - of <function>printf</> and related functions. This code will overrun + <productname>PostgreSQL</productname> includes a replacement implementation + of <function>printf</function> and related functions. This code will overrun a stack buffer when formatting a floating point number (conversion - specifiers <literal>e</>, <literal>E</>, <literal>f</>, <literal>F</>, - <literal>g</> or <literal>G</>) with requested precision greater than + specifiers <literal>e</literal>, <literal>E</literal>, <literal>f</literal>, <literal>F</literal>, + <literal>g</literal> or <literal>G</literal>) with requested precision greater than about 500. This will crash the server, and we have not ruled out the possibility of attacks that lead to privilege escalation. A database user can trigger such a buffer overrun through - the <function>to_char()</> SQL function. While that is the only - affected core <productname>PostgreSQL</> functionality, extension + the <function>to_char()</function> SQL function. While that is the only + affected core <productname>PostgreSQL</productname> functionality, extension modules that use printf-family functions may be at risk as well. </para> <para> - This issue primarily affects <productname>PostgreSQL</> on Windows. - <productname>PostgreSQL</> uses the system implementation of these + This issue primarily affects <productname>PostgreSQL</productname> on Windows. + <productname>PostgreSQL</productname> uses the system implementation of these functions where adequate, which it is on other modern platforms. (CVE-2015-0242) </para> @@ -4413,12 +4413,12 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Fix buffer overruns in <filename>contrib/pgcrypto</> + Fix buffer overruns in <filename>contrib/pgcrypto</filename> (Marko Tiikkaja, Noah Misch) </para> <para> - Errors in memory size tracking within the <filename>pgcrypto</> + Errors in memory size tracking within the <filename>pgcrypto</filename> module permitted stack buffer overruns and improper dependence on the contents of uninitialized memory. The buffer overrun cases can crash the server, and we have not ruled out the possibility of @@ -4459,7 +4459,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> Some server error messages show the values of columns that violate a constraint, such as a unique constraint. If the user does not have - <literal>SELECT</> privilege on all columns of the table, this could + <literal>SELECT</literal> privilege on all columns of the table, this could mean exposing values that the user should not be able to see. Adjust the code so that values are displayed only when they came from the SQL command or could be selected by the user. @@ -4484,35 +4484,35 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Cope with the Windows locale named <quote>Norwegian (Bokmål)</> + Cope with the Windows locale named <quote>Norwegian (Bokmål)</quote> (Heikki Linnakangas) </para> <para> Non-ASCII locale names are problematic since it's not clear what encoding they should be represented in. Map the troublesome locale - name to a plain-ASCII alias, <quote>Norwegian_Norway</>. + name to a plain-ASCII alias, <quote>Norwegian_Norway</quote>. </para> </listitem> <listitem> <para> Avoid possible data corruption if <command>ALTER DATABASE SET - TABLESPACE</> is used to move a database to a new tablespace and then + TABLESPACE</command> is used to move a database to a new tablespace and then shortly later move it back to its original tablespace (Tom Lane) </para> </listitem> <listitem> <para> - Avoid corrupting tables when <command>ANALYZE</> inside a transaction + Avoid corrupting tables when <command>ANALYZE</command> inside a transaction is rolled back (Andres Freund, Tom Lane, Michael Paquier) </para> <para> If the failing transaction had earlier removed the last index, rule, or trigger from the table, the table would be left in a corrupted state - with the relevant <structname>pg_class</> flags not set though they + with the relevant <structname>pg_class</structname> flags not set though they should be. </para> </listitem> @@ -4520,14 +4520,14 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Ensure that unlogged tables are copied correctly - during <command>CREATE DATABASE</> or <command>ALTER DATABASE SET - TABLESPACE</> (Pavan Deolasee, Andres Freund) + during <command>CREATE DATABASE</command> or <command>ALTER DATABASE SET + TABLESPACE</command> (Pavan Deolasee, Andres Freund) </para> </listitem> <listitem> <para> - Fix <command>DROP</>'s dependency searching to correctly handle the + Fix <command>DROP</command>'s dependency searching to correctly handle the case where a table column is recursively visited before its table (Petr Jelinek, Tom Lane) </para> @@ -4535,7 +4535,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> This case is only known to arise when an extension creates both a datatype and a table using that datatype. The faulty code might - refuse a <command>DROP EXTENSION</> unless <literal>CASCADE</> is + refuse a <command>DROP EXTENSION</command> unless <literal>CASCADE</literal> is specified, which should not be required. </para> </listitem> @@ -4547,22 +4547,22 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 </para> <para> - In <literal>READ COMMITTED</> mode, queries that lock or update + In <literal>READ COMMITTED</literal> mode, queries that lock or update recently-updated rows could crash as a result of this bug. </para> </listitem> <listitem> <para> - Fix planning of <command>SELECT FOR UPDATE</> when using a partial + Fix planning of <command>SELECT FOR UPDATE</command> when using a partial index on a child table (Kyotaro Horiguchi) </para> <para> - In <literal>READ COMMITTED</> mode, <command>SELECT FOR UPDATE</> must - also recheck the partial index's <literal>WHERE</> condition when + In <literal>READ COMMITTED</literal> mode, <command>SELECT FOR UPDATE</command> must + also recheck the partial index's <literal>WHERE</literal> condition when rechecking a recently-updated row to see if it still satisfies the - query's <literal>WHERE</> condition. This requirement was missed if the + query's <literal>WHERE</literal> condition. This requirement was missed if the index belonged to an inheritance child table, so that it was possible to incorrectly return rows that no longer satisfy the query condition. </para> @@ -4570,12 +4570,12 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Fix corner case wherein <command>SELECT FOR UPDATE</> could return a row + Fix corner case wherein <command>SELECT FOR UPDATE</command> could return a row twice, and possibly miss returning other rows (Tom Lane) </para> <para> - In <literal>READ COMMITTED</> mode, a <command>SELECT FOR UPDATE</> + In <literal>READ COMMITTED</literal> mode, a <command>SELECT FOR UPDATE</command> that is scanning an inheritance tree could incorrectly return a row from a prior child table instead of the one it should return from a later child table. @@ -4585,7 +4585,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Reject duplicate column names in the referenced-columns list of - a <literal>FOREIGN KEY</> declaration (David Rowley) + a <literal>FOREIGN KEY</literal> declaration (David Rowley) </para> <para> @@ -4611,7 +4611,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Fix bugs in raising a <type>numeric</> value to a large integral power + Fix bugs in raising a <type>numeric</type> value to a large integral power (Tom Lane) </para> @@ -4624,19 +4624,19 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - In <function>numeric_recv()</>, truncate away any fractional digits - that would be hidden according to the value's <literal>dscale</> field + In <function>numeric_recv()</function>, truncate away any fractional digits + that would be hidden according to the value's <literal>dscale</literal> field (Tom Lane) </para> <para> - A <type>numeric</> value's display scale (<literal>dscale</>) should + A <type>numeric</type> value's display scale (<literal>dscale</literal>) should never be less than the number of nonzero fractional digits; but apparently there's at least one broken client application that - transmits binary <type>numeric</> values in which that's true. + transmits binary <type>numeric</type> values in which that's true. This leads to strange behavior since the extra digits are taken into account by arithmetic operations even though they aren't printed. - The least risky fix seems to be to truncate away such <quote>hidden</> + The least risky fix seems to be to truncate away such <quote>hidden</quote> digits on receipt, so that the value is indeed what it prints as. </para> </listitem> @@ -4649,7 +4649,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> Matching would often fail when the number of allowed iterations is - limited by a <literal>?</> quantifier or a bound expression. + limited by a <literal>?</literal> quantifier or a bound expression. </para> </listitem> @@ -4668,7 +4668,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Fix bugs in <type>tsquery</> <literal>@></> <type>tsquery</> + Fix bugs in <type>tsquery</type> <literal>@></literal> <type>tsquery</type> operator (Heikki Linnakangas) </para> @@ -4699,14 +4699,14 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Fix namespace handling in <function>xpath()</> (Ali Akbar) + Fix namespace handling in <function>xpath()</function> (Ali Akbar) </para> <para> - Previously, the <type>xml</> value resulting from - an <function>xpath()</> call would not have namespace declarations if + Previously, the <type>xml</type> value resulting from + an <function>xpath()</function> call would not have namespace declarations if the namespace declarations were attached to an ancestor element in the - input <type>xml</> value, rather than to the specific element being + input <type>xml</type> value, rather than to the specific element being returned. Propagate the ancestral declaration so that the result is correct when considered in isolation. </para> @@ -4720,7 +4720,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 </para> <para> - In some contexts, constructs like <literal>row_to_json(tab.*)</> may + In some contexts, constructs like <literal>row_to_json(tab.*)</literal> may not produce the expected column names. This is fixed properly as of 9.4; in older branches, just ensure that we produce some nonempty name. (In some cases this will be the underlying table's column name @@ -4732,19 +4732,19 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Fix mishandling of system columns, - particularly <structfield>tableoid</>, in FDW queries (Etsuro Fujita) + particularly <structfield>tableoid</structfield>, in FDW queries (Etsuro Fujita) </para> </listitem> <listitem> <para> - Avoid doing <literal><replaceable>indexed_column</> = ANY - (<replaceable>array</>)</literal> as an index qualifier if that leads + Avoid doing <literal><replaceable>indexed_column</replaceable> = ANY + (<replaceable>array</replaceable>)</literal> as an index qualifier if that leads to an inferior plan (Andrew Gierth) </para> <para> - In some cases, <literal>= ANY</> conditions applied to non-first index + In some cases, <literal>= ANY</literal> conditions applied to non-first index columns would be done as index conditions even though it would be better to use them as simple filter conditions. </para> @@ -4753,7 +4753,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Fix planner problems with nested append relations, such as inherited - tables within <literal>UNION ALL</> subqueries (Tom Lane) + tables within <literal>UNION ALL</literal> subqueries (Tom Lane) </para> </listitem> @@ -4766,8 +4766,8 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Exempt tables that have per-table <varname>cost_limit</> - and/or <varname>cost_delay</> settings from autovacuum's global cost + Exempt tables that have per-table <varname>cost_limit</varname> + and/or <varname>cost_delay</varname> settings from autovacuum's global cost balancing rules (Álvaro Herrera) </para> @@ -4793,7 +4793,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 the target database, if they met the usual thresholds for autovacuuming. This is at best pretty unexpected; at worst it delays response to the wraparound threat. Fix it so that if autovacuum is - turned off, workers <emphasis>only</> do anti-wraparound vacuums and + turned off, workers <emphasis>only</emphasis> do anti-wraparound vacuums and not any other work. </para> </listitem> @@ -4826,12 +4826,12 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Fix several cases where recovery logic improperly ignored WAL records - for <literal>COMMIT/ABORT PREPARED</> (Heikki Linnakangas) + for <literal>COMMIT/ABORT PREPARED</literal> (Heikki Linnakangas) </para> <para> The most notable oversight was - that <varname>recovery_target_xid</> could not be used to stop at + that <varname>recovery_target_xid</varname> could not be used to stop at a two-phase commit. </para> </listitem> @@ -4845,7 +4845,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Avoid creating unnecessary <filename>.ready</> marker files for + Avoid creating unnecessary <filename>.ready</filename> marker files for timeline history files (Fujii Masao) </para> </listitem> @@ -4853,14 +4853,14 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Fix possible null pointer dereference when an empty prepared statement - is used and the <varname>log_statement</> setting is <literal>mod</> - or <literal>ddl</> (Fujii Masao) + is used and the <varname>log_statement</varname> setting is <literal>mod</literal> + or <literal>ddl</literal> (Fujii Masao) </para> </listitem> <listitem> <para> - Change <quote>pgstat wait timeout</> warning message to be LOG level, + Change <quote>pgstat wait timeout</quote> warning message to be LOG level, and rephrase it to be more understandable (Tom Lane) </para> @@ -4869,7 +4869,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 case, but it occurs often enough on our slower buildfarm members to be a nuisance. Reduce it to LOG level, and expend a bit more effort on the wording: it now reads <quote>using stale statistics instead of - current ones because stats collector is not responding</>. + current ones because stats collector is not responding</quote>. </para> </listitem> @@ -4883,32 +4883,32 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Warn if macOS's <function>setlocale()</> starts an unwanted extra + Warn if macOS's <function>setlocale()</function> starts an unwanted extra thread inside the postmaster (Noah Misch) </para> </listitem> <listitem> <para> - Fix processing of repeated <literal>dbname</> parameters - in <function>PQconnectdbParams()</> (Alex Shulgin) + Fix processing of repeated <literal>dbname</literal> parameters + in <function>PQconnectdbParams()</function> (Alex Shulgin) </para> <para> Unexpected behavior ensued if the first occurrence - of <literal>dbname</> contained a connection string or URI to be + of <literal>dbname</literal> contained a connection string or URI to be expanded. </para> </listitem> <listitem> <para> - Ensure that <application>libpq</> reports a suitable error message on + Ensure that <application>libpq</application> reports a suitable error message on unexpected socket EOF (Marko Tiikkaja, Tom Lane) </para> <para> - Depending on kernel behavior, <application>libpq</> might return an + Depending on kernel behavior, <application>libpq</application> might return an empty error string rather than something useful when the server unexpectedly closed the socket. </para> @@ -4916,14 +4916,14 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Clear any old error message during <function>PQreset()</> + Clear any old error message during <function>PQreset()</function> (Heikki Linnakangas) </para> <para> - If <function>PQreset()</> is called repeatedly, and the connection + If <function>PQreset()</function> is called repeatedly, and the connection cannot be re-established, error messages from the failed connection - attempts kept accumulating in the <structname>PGconn</>'s error + attempts kept accumulating in the <structname>PGconn</structname>'s error string. </para> </listitem> @@ -4931,32 +4931,32 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Properly handle out-of-memory conditions while parsing connection - options in <application>libpq</> (Alex Shulgin, Heikki Linnakangas) + options in <application>libpq</application> (Alex Shulgin, Heikki Linnakangas) </para> </listitem> <listitem> <para> - Fix array overrun in <application>ecpg</>'s version - of <function>ParseDateTime()</> (Michael Paquier) + Fix array overrun in <application>ecpg</application>'s version + of <function>ParseDateTime()</function> (Michael Paquier) </para> </listitem> <listitem> <para> - In <application>initdb</>, give a clearer error message if a password + In <application>initdb</application>, give a clearer error message if a password file is specified but is empty (Mats Erik Andersson) </para> </listitem> <listitem> <para> - Fix <application>psql</>'s <command>\s</> command to work nicely with + Fix <application>psql</application>'s <command>\s</command> command to work nicely with libedit, and add pager support (Stepan Rutz, Tom Lane) </para> <para> - When using libedit rather than readline, <command>\s</> printed the + When using libedit rather than readline, <command>\s</command> printed the command history in a fairly unreadable encoded format, and on recent libedit versions might fail altogether. Fix that by printing the history ourselves rather than having the library do it. A pleasant @@ -4966,7 +4966,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> This patch also fixes a bug that caused newline encoding to be applied inconsistently when saving the command history with libedit. - Multiline history entries written by older <application>psql</> + Multiline history entries written by older <application>psql</application> versions will be read cleanly with this patch, but perhaps not vice versa, depending on the exact libedit versions involved. </para> @@ -4974,17 +4974,17 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Improve consistency of parsing of <application>psql</>'s special + Improve consistency of parsing of <application>psql</application>'s special variables (Tom Lane) </para> <para> - Allow variant spellings of <literal>on</> and <literal>off</> (such - as <literal>1</>/<literal>0</>) for <literal>ECHO_HIDDEN</> - and <literal>ON_ERROR_ROLLBACK</>. Report a warning for unrecognized - values for <literal>COMP_KEYWORD_CASE</>, <literal>ECHO</>, - <literal>ECHO_HIDDEN</>, <literal>HISTCONTROL</>, - <literal>ON_ERROR_ROLLBACK</>, and <literal>VERBOSITY</>. Recognize + Allow variant spellings of <literal>on</literal> and <literal>off</literal> (such + as <literal>1</literal>/<literal>0</literal>) for <literal>ECHO_HIDDEN</literal> + and <literal>ON_ERROR_ROLLBACK</literal>. Report a warning for unrecognized + values for <literal>COMP_KEYWORD_CASE</literal>, <literal>ECHO</literal>, + <literal>ECHO_HIDDEN</literal>, <literal>HISTCONTROL</literal>, + <literal>ON_ERROR_ROLLBACK</literal>, and <literal>VERBOSITY</literal>. Recognize all values for all these variables case-insensitively; previously there was a mishmash of case-sensitive and case-insensitive behaviors. </para> @@ -4992,16 +4992,16 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Fix <application>psql</>'s expanded-mode display to work - consistently when using <literal>border</> = 3 - and <literal>linestyle</> = <literal>ascii</> or <literal>unicode</> + Fix <application>psql</application>'s expanded-mode display to work + consistently when using <literal>border</literal> = 3 + and <literal>linestyle</literal> = <literal>ascii</literal> or <literal>unicode</literal> (Stephen Frost) </para> </listitem> <listitem> <para> - Improve performance of <application>pg_dump</> when the database + Improve performance of <application>pg_dump</application> when the database contains many instances of multiple dependency paths between the same two objects (Tom Lane) </para> @@ -5009,7 +5009,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Fix <application>pg_dumpall</> to restore its ability to dump from + Fix <application>pg_dumpall</application> to restore its ability to dump from pre-8.1 servers (Gilles Darold) </para> </listitem> @@ -5023,28 +5023,28 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Fix core dump in <literal>pg_dump --binary-upgrade</> on zero-column + Fix core dump in <literal>pg_dump --binary-upgrade</literal> on zero-column composite type (Rushabh Lathia) </para> </listitem> <listitem> <para> - Prevent WAL files created by <literal>pg_basebackup -x/-X</> from + Prevent WAL files created by <literal>pg_basebackup -x/-X</literal> from being archived again when the standby is promoted (Andres Freund) </para> </listitem> <listitem> <para> - Fix failure of <filename>contrib/auto_explain</> to print per-node - timing information when doing <command>EXPLAIN ANALYZE</> (Tom Lane) + Fix failure of <filename>contrib/auto_explain</filename> to print per-node + timing information when doing <command>EXPLAIN ANALYZE</command> (Tom Lane) </para> </listitem> <listitem> <para> - Fix upgrade-from-unpackaged script for <filename>contrib/citext</> + Fix upgrade-from-unpackaged script for <filename>contrib/citext</filename> (Tom Lane) </para> </listitem> @@ -5052,7 +5052,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Fix block number checking - in <filename>contrib/pageinspect</>'s <function>get_raw_page()</> + in <filename>contrib/pageinspect</filename>'s <function>get_raw_page()</function> (Tom Lane) </para> @@ -5064,7 +5064,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Fix <filename>contrib/pgcrypto</>'s <function>pgp_sym_decrypt()</> + Fix <filename>contrib/pgcrypto</filename>'s <function>pgp_sym_decrypt()</function> to not fail on messages whose length is 6 less than a power of 2 (Marko Tiikkaja) </para> @@ -5072,7 +5072,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Fix file descriptor leak in <filename>contrib/pg_test_fsync</> + Fix file descriptor leak in <filename>contrib/pg_test_fsync</filename> (Jeff Janes) </para> @@ -5084,24 +5084,24 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Handle unexpected query results, especially NULLs, safely in - <filename>contrib/tablefunc</>'s <function>connectby()</> + <filename>contrib/tablefunc</filename>'s <function>connectby()</function> (Michael Paquier) </para> <para> - <function>connectby()</> previously crashed if it encountered a NULL + <function>connectby()</function> previously crashed if it encountered a NULL key value. It now prints that row but doesn't recurse further. </para> </listitem> <listitem> <para> - Avoid a possible crash in <filename>contrib/xml2</>'s - <function>xslt_process()</> (Mark Simonetti) + Avoid a possible crash in <filename>contrib/xml2</filename>'s + <function>xslt_process()</function> (Mark Simonetti) </para> <para> - <application>libxslt</> seems to have an undocumented dependency on + <application>libxslt</application> seems to have an undocumented dependency on the order in which resources are freed; reorder our calls to avoid a crash. </para> @@ -5109,7 +5109,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Mark some <filename>contrib</> I/O functions with correct volatility + Mark some <filename>contrib</filename> I/O functions with correct volatility properties (Tom Lane) </para> @@ -5143,29 +5143,29 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> With OpenLDAP versions 2.4.24 through 2.4.31, - inclusive, <productname>PostgreSQL</> backends can crash at exit. - Raise a warning during <application>configure</> based on the + inclusive, <productname>PostgreSQL</productname> backends can crash at exit. + Raise a warning during <application>configure</application> based on the compile-time OpenLDAP version number, and test the crashing scenario - in the <filename>contrib/dblink</> regression test. + in the <filename>contrib/dblink</filename> regression test. </para> </listitem> <listitem> <para> - In non-MSVC Windows builds, ensure <filename>libpq.dll</> is installed + In non-MSVC Windows builds, ensure <filename>libpq.dll</filename> is installed with execute permissions (Noah Misch) </para> </listitem> <listitem> <para> - Make <application>pg_regress</> remove any temporary installation it + Make <application>pg_regress</application> remove any temporary installation it created upon successful exit (Tom Lane) </para> <para> This results in a very substantial reduction in disk space usage - during <literal>make check-world</>, since that sequence involves + during <literal>make check-world</literal>, since that sequence involves creation of numerous temporary installations. </para> </listitem> @@ -5177,15 +5177,15 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 </para> <para> - Previously, <productname>PostgreSQL</> assumed that the UTC offset - associated with a time zone abbreviation (such as <literal>EST</>) + Previously, <productname>PostgreSQL</productname> assumed that the UTC offset + associated with a time zone abbreviation (such as <literal>EST</literal>) never changes in the usage of any particular locale. However this assumption fails in the real world, so introduce the ability for a zone abbreviation to represent a UTC offset that sometimes changes. Update the zone abbreviation definition files to make use of this feature in timezone locales that have changed the UTC offset of their abbreviations since 1970 (according to the IANA timezone database). - In such timezones, <productname>PostgreSQL</> will now associate the + In such timezones, <productname>PostgreSQL</productname> will now associate the correct UTC offset with the abbreviation depending on the given date. </para> </listitem> @@ -5197,9 +5197,9 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> Add CST (China Standard Time) to our lists. - Remove references to ADT as <quote>Arabia Daylight Time</>, an + Remove references to ADT as <quote>Arabia Daylight Time</quote>, an abbreviation that's been out of use since 2007; therefore, claiming - there is a conflict with <quote>Atlantic Daylight Time</> doesn't seem + there is a conflict with <quote>Atlantic Daylight Time</quote> doesn't seem especially helpful. Fix entirely incorrect GMT offsets for CKT (Cook Islands), FJT, and FJST (Fiji); we didn't even have them on the proper side of the date line. @@ -5208,21 +5208,21 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Update time zone data files to <application>tzdata</> release 2015a. + Update time zone data files to <application>tzdata</application> release 2015a. </para> <para> The IANA timezone database has adopted abbreviations of the form - <literal>A<replaceable>x</>ST</literal>/<literal>A<replaceable>x</>DT</literal> + <literal>A<replaceable>x</replaceable>ST</literal>/<literal>A<replaceable>x</replaceable>DT</literal> for all Australian time zones, reflecting what they believe to be current majority practice Down Under. These names do not conflict with usage elsewhere (other than ACST for Acre Summer Time, which has been in disuse since 1994). Accordingly, adopt these names into - our <quote>Default</> timezone abbreviation set. - The <quote>Australia</> abbreviation set now contains only CST, EAST, + our <quote>Default</quote> timezone abbreviation set. + The <quote>Australia</quote> abbreviation set now contains only CST, EAST, EST, SAST, SAT, and WST, all of which are thought to be mostly historical usage. Note that SAST has also been changed to be South - Africa Standard Time in the <quote>Default</> abbreviation set. + Africa Standard Time in the <quote>Default</quote> abbreviation set. </para> <para> @@ -5281,15 +5281,15 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Correctly initialize padding bytes in <filename>contrib/btree_gist</> - indexes on <type>bit</> columns (Heikki Linnakangas) + Correctly initialize padding bytes in <filename>contrib/btree_gist</filename> + indexes on <type>bit</type> columns (Heikki Linnakangas) </para> <para> This error could result in incorrect query results due to values that should compare equal not being seen as equal. - Users with GiST indexes on <type>bit</> or <type>bit varying</> - columns should <command>REINDEX</> those indexes after installing this + Users with GiST indexes on <type>bit</type> or <type>bit varying</type> + columns should <command>REINDEX</command> those indexes after installing this update. </para> </listitem> @@ -5335,7 +5335,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Fix possibly-incorrect cache invalidation during nested calls - to <function>ReceiveSharedInvalidMessages</> (Andres Freund) + to <function>ReceiveSharedInvalidMessages</function> (Andres Freund) </para> </listitem> @@ -5347,14 +5347,14 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> This oversight could result in <quote>variable not found in subplan - target lists</> errors, or in silently wrong query results. + target lists</quote> errors, or in silently wrong query results. </para> </listitem> <listitem> <para> - Fix <quote>could not find pathkey item to sort</> planner failures - with <literal>UNION ALL</> over subqueries reading from tables with + Fix <quote>could not find pathkey item to sort</quote> planner failures + with <literal>UNION ALL</literal> over subqueries reading from tables with inheritance children (Tom Lane) </para> </listitem> @@ -5375,7 +5375,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Improve planner to drop constant-NULL inputs - of <literal>AND</>/<literal>OR</> when possible (Tom Lane) + of <literal>AND</literal>/<literal>OR</literal> when possible (Tom Lane) </para> <para> @@ -5387,13 +5387,13 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Fix identification of input type category in <function>to_json()</> + Fix identification of input type category in <function>to_json()</function> and friends (Tom Lane) </para> <para> - This is known to have led to inadequate quoting of <type>money</> - fields in the <type>JSON</> result, and there may have been wrong + This is known to have led to inadequate quoting of <type>money</type> + fields in the <type>JSON</type> result, and there may have been wrong results for other data types as well. </para> </listitem> @@ -5408,13 +5408,13 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 This corrects cases where TOAST pointers could be copied into other tables without being dereferenced. If the original data is later deleted, it would lead to errors like <quote>missing chunk number 0 - for toast value ...</> when the now-dangling pointer is used. + for toast value ...</quote> when the now-dangling pointer is used. </para> </listitem> <listitem> <para> - Fix <quote>record type has not been registered</> failures with + Fix <quote>record type has not been registered</quote> failures with whole-row references to the output of Append plan nodes (Tom Lane) </para> </listitem> @@ -5429,7 +5429,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Fix query-lifespan memory leak while evaluating the arguments for a - function in <literal>FROM</> (Tom Lane) + function in <literal>FROM</literal> (Tom Lane) </para> </listitem> @@ -5442,7 +5442,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Fix data encoding error in <filename>hungarian.stop</> (Tom Lane) + Fix data encoding error in <filename>hungarian.stop</filename> (Tom Lane) </para> </listitem> @@ -5463,19 +5463,19 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> This could cause problems (at least spurious warnings, and at worst an - infinite loop) if <command>CREATE INDEX</> or <command>CLUSTER</> were + infinite loop) if <command>CREATE INDEX</command> or <command>CLUSTER</command> were done later in the same transaction. </para> </listitem> <listitem> <para> - Clear <structname>pg_stat_activity</>.<structfield>xact_start</> - during <command>PREPARE TRANSACTION</> (Andres Freund) + Clear <structname>pg_stat_activity</structname>.<structfield>xact_start</structfield> + during <command>PREPARE TRANSACTION</command> (Andres Freund) </para> <para> - After the <command>PREPARE</>, the originating session is no longer in + After the <command>PREPARE</command>, the originating session is no longer in a transaction, so it should not continue to display a transaction start time. </para> @@ -5483,7 +5483,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Fix <command>REASSIGN OWNED</> to not fail for text search objects + Fix <command>REASSIGN OWNED</command> to not fail for text search objects (Álvaro Herrera) </para> </listitem> @@ -5495,14 +5495,14 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> This ensures that the postmaster will properly clean up after itself - if, for example, it receives <systemitem>SIGINT</> while still + if, for example, it receives <systemitem>SIGINT</systemitem> while still starting up. </para> </listitem> <listitem> <para> - Fix client host name lookup when processing <filename>pg_hba.conf</> + Fix client host name lookup when processing <filename>pg_hba.conf</filename> entries that specify host names instead of IP addresses (Tom Lane) </para> @@ -5516,21 +5516,21 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Allow the root user to use <literal>postgres -C variable</> and - <literal>postgres --describe-config</> (MauMau) + Allow the root user to use <literal>postgres -C variable</literal> and + <literal>postgres --describe-config</literal> (MauMau) </para> <para> The prohibition on starting the server as root does not need to extend to these operations, and relaxing it prevents failure - of <application>pg_ctl</> in some scenarios. + of <application>pg_ctl</application> in some scenarios. </para> </listitem> <listitem> <para> Secure Unix-domain sockets of temporary postmasters started during - <literal>make check</> (Noah Misch) + <literal>make check</literal> (Noah Misch) </para> <para> @@ -5539,16 +5539,16 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 the operating-system user running the test, as we previously noted in CVE-2014-0067. This change defends against that risk by placing the server's socket in a temporary, mode 0700 subdirectory - of <filename>/tmp</>. The hazard remains however on platforms where + of <filename>/tmp</filename>. The hazard remains however on platforms where Unix sockets are not supported, notably Windows, because then the temporary postmaster must accept local TCP connections. </para> <para> A useful side effect of this change is to simplify - <literal>make check</> testing in builds that - override <literal>DEFAULT_PGSOCKET_DIR</>. Popular non-default values - like <filename>/var/run/postgresql</> are often not writable by the + <literal>make check</literal> testing in builds that + override <literal>DEFAULT_PGSOCKET_DIR</literal>. Popular non-default values + like <filename>/var/run/postgresql</filename> are often not writable by the build user, requiring workarounds that will no longer be necessary. </para> </listitem> @@ -5584,15 +5584,15 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 </para> <para> - This oversight could cause <application>initdb</> - and <application>pg_upgrade</> to fail on Windows, if the installation - path contained both spaces and <literal>@</> signs. + This oversight could cause <application>initdb</application> + and <application>pg_upgrade</application> to fail on Windows, if the installation + path contained both spaces and <literal>@</literal> signs. </para> </listitem> <listitem> <para> - Fix linking of <application>libpython</> on macOS (Tom Lane) + Fix linking of <application>libpython</application> on macOS (Tom Lane) </para> <para> @@ -5603,17 +5603,17 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Avoid buffer bloat in <application>libpq</> when the server + Avoid buffer bloat in <application>libpq</application> when the server consistently sends data faster than the client can absorb it (Shin-ichi Morita, Tom Lane) </para> <para> - <application>libpq</> could be coerced into enlarging its input buffer + <application>libpq</application> could be coerced into enlarging its input buffer until it runs out of memory (which would be reported misleadingly - as <quote>lost synchronization with server</>). Under ordinary + as <quote>lost synchronization with server</quote>). Under ordinary circumstances it's quite far-fetched that data could be continuously - transmitted more quickly than the <function>recv()</> loop can + transmitted more quickly than the <function>recv()</function> loop can absorb it, but this has been observed when the client is artificially slowed by scheduler constraints. </para> @@ -5621,15 +5621,15 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Ensure that LDAP lookup attempts in <application>libpq</> time out as + Ensure that LDAP lookup attempts in <application>libpq</application> time out as intended (Laurenz Albe) </para> </listitem> <listitem> <para> - Fix <application>ecpg</> to do the right thing when an array - of <type>char *</> is the target for a FETCH statement returning more + Fix <application>ecpg</application> to do the right thing when an array + of <type>char *</type> is the target for a FETCH statement returning more than one row, as well as some other array-handling fixes (Ashutosh Bapat) </para> @@ -5637,52 +5637,52 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Fix <application>pg_restore</>'s processing of old-style large object + Fix <application>pg_restore</application>'s processing of old-style large object comments (Tom Lane) </para> <para> A direct-to-database restore from an archive file generated by a - pre-9.0 version of <application>pg_dump</> would usually fail if the + pre-9.0 version of <application>pg_dump</application> would usually fail if the archive contained more than a few comments for large objects. </para> </listitem> <listitem> <para> - Fix <application>pg_upgrade</> for cases where the new server creates + Fix <application>pg_upgrade</application> for cases where the new server creates a TOAST table but the old version did not (Bruce Momjian) </para> <para> - This rare situation would manifest as <quote>relation OID mismatch</> + This rare situation would manifest as <quote>relation OID mismatch</quote> errors. </para> </listitem> <listitem> <para> - Prevent <filename>contrib/auto_explain</> from changing the output of - a user's <command>EXPLAIN</> (Tom Lane) + Prevent <filename>contrib/auto_explain</filename> from changing the output of + a user's <command>EXPLAIN</command> (Tom Lane) </para> <para> - If <filename>auto_explain</> is active, it could cause - an <literal>EXPLAIN (ANALYZE, TIMING OFF)</> command to nonetheless + If <filename>auto_explain</filename> is active, it could cause + an <literal>EXPLAIN (ANALYZE, TIMING OFF)</literal> command to nonetheless print timing information. </para> </listitem> <listitem> <para> - Fix query-lifespan memory leak in <filename>contrib/dblink</> + Fix query-lifespan memory leak in <filename>contrib/dblink</filename> (MauMau, Joe Conway) </para> </listitem> <listitem> <para> - In <filename>contrib/pgcrypto</> functions, ensure sensitive + In <filename>contrib/pgcrypto</filename> functions, ensure sensitive information is cleared from stack variables before returning (Marko Kreen) </para> @@ -5691,27 +5691,27 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Prevent use of already-freed memory in - <filename>contrib/pgstattuple</>'s <function>pgstat_heap()</> + <filename>contrib/pgstattuple</filename>'s <function>pgstat_heap()</function> (Noah Misch) </para> </listitem> <listitem> <para> - In <filename>contrib/uuid-ossp</>, cache the state of the OSSP UUID + In <filename>contrib/uuid-ossp</filename>, cache the state of the OSSP UUID library across calls (Tom Lane) </para> <para> This improves the efficiency of UUID generation and reduces the amount - of entropy drawn from <filename>/dev/urandom</>, on platforms that + of entropy drawn from <filename>/dev/urandom</filename>, on platforms that have that. </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2014e + Update time zone data files to <application>tzdata</application> release 2014e for DST law changes in Crimea, Egypt, and Morocco. </para> </listitem> @@ -5771,7 +5771,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Avoid race condition in checking transaction commit status during - receipt of a <command>NOTIFY</> message (Marko Tiikkaja) + receipt of a <command>NOTIFY</command> message (Marko Tiikkaja) </para> <para> @@ -5795,7 +5795,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Remove incorrect code that tried to allow <literal>OVERLAPS</> with + Remove incorrect code that tried to allow <literal>OVERLAPS</literal> with single-element row arguments (Joshua Yanovski) </para> @@ -5808,17 +5808,17 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Avoid getting more than <literal>AccessShareLock</> when de-parsing a + Avoid getting more than <literal>AccessShareLock</literal> when de-parsing a rule or view (Dean Rasheed) </para> <para> - This oversight resulted in <application>pg_dump</> unexpectedly - acquiring <literal>RowExclusiveLock</> locks on tables mentioned as - the targets of <literal>INSERT</>/<literal>UPDATE</>/<literal>DELETE</> + This oversight resulted in <application>pg_dump</application> unexpectedly + acquiring <literal>RowExclusiveLock</literal> locks on tables mentioned as + the targets of <literal>INSERT</literal>/<literal>UPDATE</literal>/<literal>DELETE</literal> commands in rules. While usually harmless, that could interfere with concurrent transactions that tried to acquire, for example, - <literal>ShareLock</> on those tables. + <literal>ShareLock</literal> on those tables. </para> </listitem> @@ -5837,8 +5837,8 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Fix <application>walsender</>'s failure to shut down cleanly when client - is <application>pg_receivexlog</> (Fujii Masao) + Fix <application>walsender</application>'s failure to shut down cleanly when client + is <application>pg_receivexlog</application> (Fujii Masao) </para> </listitem> @@ -5858,13 +5858,13 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Prevent interrupts while reporting non-<literal>ERROR</> messages + Prevent interrupts while reporting non-<literal>ERROR</literal> messages (Tom Lane) </para> <para> This guards against rare server-process freezeups due to recursive - entry to <function>syslog()</>, and perhaps other related problems. + entry to <function>syslog()</function>, and perhaps other related problems. </para> </listitem> @@ -5877,13 +5877,13 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Fix tracking of <application>psql</> script line numbers - during <literal>\copy</> from out-of-line data + Fix tracking of <application>psql</application> script line numbers + during <literal>\copy</literal> from out-of-line data (Kumar Rajeev Rastogi, Amit Khandekar) </para> <para> - <literal>\copy ... from</> incremented the script file line number + <literal>\copy ... from</literal> incremented the script file line number for each data line, even if the data was not coming from the script file. This mistake resulted in wrong line numbers being reported for any errors occurring later in the same script file. @@ -5892,14 +5892,14 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Prevent intermittent <quote>could not reserve shared memory region</> + Prevent intermittent <quote>could not reserve shared memory region</quote> failures on recent Windows versions (MauMau) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2014a + Update time zone data files to <application>tzdata</application> release 2014a for DST law changes in Fiji and Turkey, plus historical changes in Israel and Ukraine. </para> @@ -5945,19 +5945,19 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Shore up <literal>GRANT ... WITH ADMIN OPTION</> restrictions + Shore up <literal>GRANT ... WITH ADMIN OPTION</literal> restrictions (Noah Misch) </para> <para> - Granting a role without <literal>ADMIN OPTION</> is supposed to + Granting a role without <literal>ADMIN OPTION</literal> is supposed to prevent the grantee from adding or removing members from the granted role, but this restriction was easily bypassed by doing <literal>SET - ROLE</> first. The security impact is mostly that a role member can + ROLE</literal> first. The security impact is mostly that a role member can revoke the access of others, contrary to the wishes of his grantor. Unapproved role member additions are a lesser concern, since an uncooperative role member could provide most of his rights to others - anyway by creating views or <literal>SECURITY DEFINER</> functions. + anyway by creating views or <literal>SECURITY DEFINER</literal> functions. (CVE-2014-0060) </para> </listitem> @@ -5970,7 +5970,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> The primary role of PL validator functions is to be called implicitly - during <command>CREATE FUNCTION</>, but they are also normal SQL + during <command>CREATE FUNCTION</command>, but they are also normal SQL functions that a user can call explicitly. Calling a validator on a function actually written in some other language was not checked for and could be exploited for privilege-escalation purposes. @@ -5990,7 +5990,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> If the name lookups come to different conclusions due to concurrent activity, we might perform some parts of the DDL on a different table - than other parts. At least in the case of <command>CREATE INDEX</>, + than other parts. At least in the case of <command>CREATE INDEX</command>, this can be used to cause the permissions checks to be performed against a different table than the index creation, allowing for a privilege escalation attack. @@ -6004,12 +6004,12 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 </para> <para> - The <literal>MAXDATELEN</> constant was too small for the longest - possible value of type <type>interval</>, allowing a buffer overrun - in <function>interval_out()</>. Although the datetime input + The <literal>MAXDATELEN</literal> constant was too small for the longest + possible value of type <type>interval</type>, allowing a buffer overrun + in <function>interval_out()</function>. Although the datetime input functions were more careful about avoiding buffer overrun, the limit was short enough to cause them to reject some valid inputs, such as - input containing a very long timezone name. The <application>ecpg</> + input containing a very long timezone name. The <application>ecpg</application> library contained these vulnerabilities along with some of its own. (CVE-2014-0063) </para> @@ -6036,7 +6036,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 </para> <para> - Use <function>strlcpy()</> and related functions to provide a clear + Use <function>strlcpy()</function> and related functions to provide a clear guarantee that fixed-size buffers are not overrun. Unlike the preceding items, it is unclear whether these cases really represent live issues, since in most cases there appear to be previous @@ -6048,35 +6048,35 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Avoid crashing if <function>crypt()</> returns NULL (Honza Horak, + Avoid crashing if <function>crypt()</function> returns NULL (Honza Horak, Bruce Momjian) </para> <para> - There are relatively few scenarios in which <function>crypt()</> - could return NULL, but <filename>contrib/chkpass</> would crash + There are relatively few scenarios in which <function>crypt()</function> + could return NULL, but <filename>contrib/chkpass</filename> would crash if it did. One practical case in which this could be an issue is - if <application>libc</> is configured to refuse to execute unapproved - hashing algorithms (e.g., <quote>FIPS mode</>). + if <application>libc</application> is configured to refuse to execute unapproved + hashing algorithms (e.g., <quote>FIPS mode</quote>). (CVE-2014-0066) </para> </listitem> <listitem> <para> - Document risks of <literal>make check</> in the regression testing + Document risks of <literal>make check</literal> in the regression testing instructions (Noah Misch, Tom Lane) </para> <para> - Since the temporary server started by <literal>make check</> - uses <quote>trust</> authentication, another user on the same machine + Since the temporary server started by <literal>make check</literal> + uses <quote>trust</quote> authentication, another user on the same machine could connect to it as database superuser, and then potentially exploit the privileges of the operating-system user who started the tests. A future release will probably incorporate changes in the testing procedure to prevent this risk, but some public discussion is needed first. So for the moment, just warn people against using - <literal>make check</> when there are untrusted users on the + <literal>make check</literal> when there are untrusted users on the same machine. (CVE-2014-0067) </para> @@ -6091,7 +6091,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> The WAL update could be applied to the wrong page, potentially many pages past where it should have been. Aside from corrupting data, - this error has been observed to result in significant <quote>bloat</> + this error has been observed to result in significant <quote>bloat</quote> of standby servers compared to their masters, due to updates being applied far beyond where the end-of-file should have been. This failure mode does not appear to be a significant risk during crash @@ -6111,20 +6111,20 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 was already consistent at the start of replay, thus possibly allowing hot-standby queries before the database was really consistent. Other symptoms such as <quote>PANIC: WAL contains references to invalid - pages</> were also possible. + pages</quote> were also possible. </para> </listitem> <listitem> <para> Fix improper locking of btree index pages while replaying - a <literal>VACUUM</> operation in hot-standby mode (Andres Freund, + a <literal>VACUUM</literal> operation in hot-standby mode (Andres Freund, Heikki Linnakangas, Tom Lane) </para> <para> This error could result in <quote>PANIC: WAL contains references to - invalid pages</> failures. + invalid pages</quote> failures. </para> </listitem> @@ -6142,8 +6142,8 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - When <literal>pause_at_recovery_target</> - and <literal>recovery_target_inclusive</> are both set, ensure the + When <literal>pause_at_recovery_target</literal> + and <literal>recovery_target_inclusive</literal> are both set, ensure the target record is applied before pausing, not after (Heikki Linnakangas) </para> @@ -6156,7 +6156,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> Ensure that signal handlers don't attempt to use the - process's <varname>MyProc</> pointer after it's no longer valid. + process's <varname>MyProc</varname> pointer after it's no longer valid. </para> </listitem> @@ -6169,19 +6169,19 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Fix unsafe references to <varname>errno</> within error reporting + Fix unsafe references to <varname>errno</varname> within error reporting logic (Christian Kruse) </para> <para> This would typically lead to odd behaviors such as missing or - inappropriate <literal>HINT</> fields. + inappropriate <literal>HINT</literal> fields. </para> </listitem> <listitem> <para> - Fix possible crashes from using <function>ereport()</> too early + Fix possible crashes from using <function>ereport()</function> too early during server startup (Tom Lane) </para> @@ -6205,7 +6205,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Fix length checking for Unicode identifiers (<literal>U&"..."</> + Fix length checking for Unicode identifiers (<literal>U&"..."</literal> syntax) containing escapes (Tom Lane) </para> @@ -6225,7 +6225,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> A previous patch allowed such keywords to be used without quoting in places such as role identifiers; but it missed cases where a - list of role identifiers was permitted, such as <literal>DROP ROLE</>. + list of role identifiers was permitted, such as <literal>DROP ROLE</literal>. </para> </listitem> @@ -6239,19 +6239,19 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Fix possible crash due to invalid plan for nested sub-selects, such - as <literal>WHERE (... x IN (SELECT ...) ...) IN (SELECT ...)</> + as <literal>WHERE (... x IN (SELECT ...) ...) IN (SELECT ...)</literal> (Tom Lane) </para> </listitem> <listitem> <para> - Fix <literal>UPDATE/DELETE</> of an inherited target table - that has <literal>UNION ALL</> subqueries (Tom Lane) + Fix <literal>UPDATE/DELETE</literal> of an inherited target table + that has <literal>UNION ALL</literal> subqueries (Tom Lane) </para> <para> - Without this fix, <literal>UNION ALL</> subqueries aren't correctly + Without this fix, <literal>UNION ALL</literal> subqueries aren't correctly inserted into the update plans for inheritance child tables after the first one, typically resulting in no update happening for those child table(s). @@ -6260,12 +6260,12 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Ensure that <command>ANALYZE</> creates statistics for a table column - even when all the values in it are <quote>too wide</> (Tom Lane) + Ensure that <command>ANALYZE</command> creates statistics for a table column + even when all the values in it are <quote>too wide</quote> (Tom Lane) </para> <para> - <command>ANALYZE</> intentionally omits very wide values from its + <command>ANALYZE</command> intentionally omits very wide values from its histogram and most-common-values calculations, but it neglected to do something sane in the case that all the sampled entries are too wide. </para> @@ -6273,21 +6273,21 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - In <literal>ALTER TABLE ... SET TABLESPACE</>, allow the database's + In <literal>ALTER TABLE ... SET TABLESPACE</literal>, allow the database's default tablespace to be used without a permissions check (Stephen Frost) </para> <para> - <literal>CREATE TABLE</> has always allowed such usage, - but <literal>ALTER TABLE</> didn't get the memo. + <literal>CREATE TABLE</literal> has always allowed such usage, + but <literal>ALTER TABLE</literal> didn't get the memo. </para> </listitem> <listitem> <para> - Fix <quote>cannot accept a set</> error when some arms of - a <literal>CASE</> return a set and others don't (Tom Lane) + Fix <quote>cannot accept a set</quote> error when some arms of + a <literal>CASE</literal> return a set and others don't (Tom Lane) </para> </listitem> @@ -6319,12 +6319,12 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Fix possible misbehavior in <function>plainto_tsquery()</> + Fix possible misbehavior in <function>plainto_tsquery()</function> (Heikki Linnakangas) </para> <para> - Use <function>memmove()</> not <function>memcpy()</> for copying + Use <function>memmove()</function> not <function>memcpy()</function> for copying overlapping memory regions. There have been no field reports of this actually causing trouble, but it's certainly risky. </para> @@ -6332,8 +6332,8 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Fix placement of permissions checks in <function>pg_start_backup()</> - and <function>pg_stop_backup()</> (Andres Freund, Magnus Hagander) + Fix placement of permissions checks in <function>pg_start_backup()</function> + and <function>pg_stop_backup()</function> (Andres Freund, Magnus Hagander) </para> <para> @@ -6344,44 +6344,44 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Accept <literal>SHIFT_JIS</> as an encoding name for locale checking + Accept <literal>SHIFT_JIS</literal> as an encoding name for locale checking purposes (Tatsuo Ishii) </para> </listitem> <listitem> <para> - Fix <literal>*</>-qualification of named parameters in SQL-language + Fix <literal>*</literal>-qualification of named parameters in SQL-language functions (Tom Lane) </para> <para> Given a composite-type parameter - named <literal>foo</>, <literal>$1.*</> worked fine, - but <literal>foo.*</> not so much. + named <literal>foo</literal>, <literal>$1.*</literal> worked fine, + but <literal>foo.*</literal> not so much. </para> </listitem> <listitem> <para> - Fix misbehavior of <function>PQhost()</> on Windows (Fujii Masao) + Fix misbehavior of <function>PQhost()</function> on Windows (Fujii Masao) </para> <para> - It should return <literal>localhost</> if no host has been specified. + It should return <literal>localhost</literal> if no host has been specified. </para> </listitem> <listitem> <para> - Improve error handling in <application>libpq</> and <application>psql</> - for failures during <literal>COPY TO STDOUT/FROM STDIN</> (Tom Lane) + Improve error handling in <application>libpq</application> and <application>psql</application> + for failures during <literal>COPY TO STDOUT/FROM STDIN</literal> (Tom Lane) </para> <para> In particular this fixes an infinite loop that could occur in 9.2 and up if the server connection was lost during <literal>COPY FROM - STDIN</>. Variants of that scenario might be possible in older + STDIN</literal>. Variants of that scenario might be possible in older versions, or with other client applications. </para> </listitem> @@ -6389,14 +6389,14 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Fix incorrect translation handling in - some <application>psql</> <literal>\d</> commands + some <application>psql</application> <literal>\d</literal> commands (Peter Eisentraut, Tom Lane) </para> </listitem> <listitem> <para> - Ensure <application>pg_basebackup</>'s background process is killed + Ensure <application>pg_basebackup</application>'s background process is killed when exiting its foreground process (Magnus Hagander) </para> </listitem> @@ -6404,7 +6404,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Fix possible incorrect printing of filenames - in <application>pg_basebackup</>'s verbose mode (Magnus Hagander) + in <application>pg_basebackup</application>'s verbose mode (Magnus Hagander) </para> </listitem> @@ -6417,20 +6417,20 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Fix misaligned descriptors in <application>ecpg</> (MauMau) + Fix misaligned descriptors in <application>ecpg</application> (MauMau) </para> </listitem> <listitem> <para> - In <application>ecpg</>, handle lack of a hostname in the connection + In <application>ecpg</application>, handle lack of a hostname in the connection parameters properly (Michael Meskes) </para> </listitem> <listitem> <para> - Fix performance regression in <filename>contrib/dblink</> connection + Fix performance regression in <filename>contrib/dblink</filename> connection startup (Joe Conway) </para> @@ -6441,15 +6441,15 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - In <filename>contrib/isn</>, fix incorrect calculation of the check + In <filename>contrib/isn</filename>, fix incorrect calculation of the check digit for ISMN values (Fabien Coelho) </para> </listitem> <listitem> <para> - Fix <filename>contrib/pg_stat_statement</>'s handling - of <literal>CURRENT_DATE</> and related constructs (Kyotaro + Fix <filename>contrib/pg_stat_statement</filename>'s handling + of <literal>CURRENT_DATE</literal> and related constructs (Kyotaro Horiguchi) </para> </listitem> @@ -6463,28 +6463,28 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - In Mingw and Cygwin builds, install the <application>libpq</> DLL - in the <filename>bin</> directory (Andrew Dunstan) + In Mingw and Cygwin builds, install the <application>libpq</application> DLL + in the <filename>bin</filename> directory (Andrew Dunstan) </para> <para> This duplicates what the MSVC build has long done. It should fix - problems with programs like <application>psql</> failing to start + problems with programs like <application>psql</application> failing to start because they can't find the DLL. </para> </listitem> <listitem> <para> - Avoid using the deprecated <literal>dllwrap</> tool in Cygwin builds + Avoid using the deprecated <literal>dllwrap</literal> tool in Cygwin builds (Marco Atzeri) </para> </listitem> <listitem> <para> - Don't generate plain-text <filename>HISTORY</> - and <filename>src/test/regress/README</> files anymore (Tom Lane) + Don't generate plain-text <filename>HISTORY</filename> + and <filename>src/test/regress/README</filename> files anymore (Tom Lane) </para> <para> @@ -6493,20 +6493,20 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 the likely audience for plain-text format. Distribution tarballs will still contain files by these names, but they'll just be stubs directing the reader to consult the main documentation. - The plain-text <filename>INSTALL</> file will still be maintained, as + The plain-text <filename>INSTALL</filename> file will still be maintained, as there is arguably a use-case for that. </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2013i + Update time zone data files to <application>tzdata</application> release 2013i for DST law changes in Jordan and historical changes in Cuba. </para> <para> - In addition, the zones <literal>Asia/Riyadh87</>, - <literal>Asia/Riyadh88</>, and <literal>Asia/Riyadh89</> have been + In addition, the zones <literal>Asia/Riyadh87</literal>, + <literal>Asia/Riyadh88</literal>, and <literal>Asia/Riyadh89</literal> have been removed, as they are no longer maintained by IANA, and never represented actual civil timekeeping practice. </para> @@ -6558,19 +6558,19 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Fix <command>VACUUM</>'s tests to see whether it can - update <structfield>relfrozenxid</> (Andres Freund) + Fix <command>VACUUM</command>'s tests to see whether it can + update <structfield>relfrozenxid</structfield> (Andres Freund) </para> <para> - In some cases <command>VACUUM</> (either manual or autovacuum) could - incorrectly advance a table's <structfield>relfrozenxid</> value, + In some cases <command>VACUUM</command> (either manual or autovacuum) could + incorrectly advance a table's <structfield>relfrozenxid</structfield> value, allowing tuples to escape freezing, causing those rows to become invisible once 2^31 transactions have elapsed. The probability of data loss is fairly low since multiple incorrect advancements would need to happen before actual loss occurs, but it's not zero. In 9.2.0 and later, the probability of loss is higher, and it's also possible - to get <quote>could not access status of transaction</> errors as a + to get <quote>could not access status of transaction</quote> errors as a consequence of this bug. Users upgrading from releases 9.0.4 or 8.4.8 or earlier are not affected, but all later versions contain the bug. </para> @@ -6578,18 +6578,18 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> The issue can be ameliorated by, after upgrading, vacuuming all tables in all databases while having <link - linkend="guc-vacuum-freeze-table-age"><varname>vacuum_freeze_table_age</></link> + linkend="guc-vacuum-freeze-table-age"><varname>vacuum_freeze_table_age</varname></link> set to zero. This will fix any latent corruption but will not be able to fix all pre-existing data errors. However, an installation can be presumed safe after performing this vacuuming if it has executed fewer than 2^31 update transactions in its lifetime (check this with - <literal>SELECT txid_current() < 2^31</>). + <literal>SELECT txid_current() < 2^31</literal>). </para> </listitem> <listitem> <para> - Fix initialization of <filename>pg_clog</> and <filename>pg_subtrans</> + Fix initialization of <filename>pg_clog</filename> and <filename>pg_subtrans</filename> during hot standby startup (Andres Freund, Heikki Linnakangas) </para> @@ -6620,13 +6620,13 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> This could lead to corruption of the lock data structures in shared - memory, causing <quote>lock already held</> and other odd errors. + memory, causing <quote>lock already held</quote> and other odd errors. </para> </listitem> <listitem> <para> - Truncate <filename>pg_multixact</> contents during WAL replay + Truncate <filename>pg_multixact</filename> contents during WAL replay (Andres Freund) </para> @@ -6637,14 +6637,14 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Ensure an anti-wraparound <command>VACUUM</> counts a page as scanned + Ensure an anti-wraparound <command>VACUUM</command> counts a page as scanned when it's only verified that no tuples need freezing (Sergey Burladyan, Jeff Janes) </para> <para> This bug could result in failing to - advance <structfield>relfrozenxid</>, so that the table would still be + advance <structfield>relfrozenxid</structfield>, so that the table would still be thought to need another anti-wraparound vacuum. In the worst case the database might even shut down to prevent wraparound. </para> @@ -6663,15 +6663,15 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Fix <quote>unexpected spgdoinsert() failure</> error during SP-GiST + Fix <quote>unexpected spgdoinsert() failure</quote> error during SP-GiST index creation (Teodor Sigaev) </para> </listitem> <listitem> <para> - Avoid flattening a subquery whose <literal>SELECT</> list contains a - volatile function wrapped inside a sub-<literal>SELECT</> (Tom Lane) + Avoid flattening a subquery whose <literal>SELECT</literal> list contains a + volatile function wrapped inside a sub-<literal>SELECT</literal> (Tom Lane) </para> <para> @@ -6688,14 +6688,14 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> This error could lead to incorrect plans for queries involving - multiple levels of subqueries within <literal>JOIN</> syntax. + multiple levels of subqueries within <literal>JOIN</literal> syntax. </para> </listitem> <listitem> <para> Fix incorrect planning in cases where the same non-strict expression - appears in multiple <literal>WHERE</> and outer <literal>JOIN</> + appears in multiple <literal>WHERE</literal> and outer <literal>JOIN</literal> equality clauses (Tom Lane) </para> </listitem> @@ -6763,13 +6763,13 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Fix array slicing of <type>int2vector</> and <type>oidvector</> values + Fix array slicing of <type>int2vector</type> and <type>oidvector</type> values (Tom Lane) </para> <para> Expressions of this kind are now implicitly promoted to - regular <type>int2</> or <type>oid</> arrays. + regular <type>int2</type> or <type>oid</type> arrays. </para> </listitem> @@ -6783,7 +6783,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 In some cases, the system would use the simple GMT offset value when it should have used the regular timezone setting that had prevailed before the simple offset was selected. This change also causes - the <function>timeofday</> function to honor the simple GMT offset + the <function>timeofday</function> function to honor the simple GMT offset zone. </para> </listitem> @@ -6797,7 +6797,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Properly quote generated command lines in <application>pg_ctl</> + Properly quote generated command lines in <application>pg_ctl</application> (Naoya Anzai and Tom Lane) </para> @@ -6808,10 +6808,10 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Fix <application>pg_dumpall</> to work when a source database + Fix <application>pg_dumpall</application> to work when a source database sets <link - linkend="guc-default-transaction-read-only"><varname>default_transaction_read_only</></link> - via <command>ALTER DATABASE SET</> (Kevin Grittner) + linkend="guc-default-transaction-read-only"><varname>default_transaction_read_only</varname></link> + via <command>ALTER DATABASE SET</command> (Kevin Grittner) </para> <para> @@ -6821,28 +6821,28 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Make <application>ecpg</> search for quoted cursor names + Make <application>ecpg</application> search for quoted cursor names case-sensitively (Zoltán Böszörményi) </para> </listitem> <listitem> <para> - Fix <application>ecpg</>'s processing of lists of variables - declared <type>varchar</> (Zoltán Böszörményi) + Fix <application>ecpg</application>'s processing of lists of variables + declared <type>varchar</type> (Zoltán Böszörményi) </para> </listitem> <listitem> <para> - Make <filename>contrib/lo</> defend against incorrect trigger definitions + Make <filename>contrib/lo</filename> defend against incorrect trigger definitions (Marc Cousin) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2013h + Update time zone data files to <application>tzdata</application> release 2013h for DST law changes in Argentina, Brazil, Jordan, Libya, Liechtenstein, Morocco, and Palestine. Also, new timezone abbreviations WIB, WIT, WITA for Indonesia. @@ -6894,7 +6894,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 </para> <para> - <productname>PostgreSQL</> case-folds non-ASCII characters only + <productname>PostgreSQL</productname> case-folds non-ASCII characters only when using a single-byte server encoding. </para> </listitem> @@ -6909,7 +6909,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Fix checkpoint memory leak in background writer when <literal>wal_level = - hot_standby</> (Naoya Anzai) + hot_standby</literal> (Naoya Anzai) </para> </listitem> @@ -6922,7 +6922,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Fix memory overcommit bug when <varname>work_mem</> is using more + Fix memory overcommit bug when <varname>work_mem</varname> is using more than 24GB of memory (Stephen Frost) </para> </listitem> @@ -6964,58 +6964,58 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 </para> <para> - Previously tests like <literal>col IS NOT TRUE</> and <literal>col IS - NOT FALSE</> did not properly factor in NULL values when estimating + Previously tests like <literal>col IS NOT TRUE</literal> and <literal>col IS + NOT FALSE</literal> did not properly factor in NULL values when estimating plan costs. </para> </listitem> <listitem> <para> - Fix accounting for qualifier evaluation costs in <literal>UNION ALL</> + Fix accounting for qualifier evaluation costs in <literal>UNION ALL</literal> and inheritance queries (Tom Lane) </para> <para> This fixes cases where suboptimal query plans could be chosen if - some <literal>WHERE</> clauses are expensive to calculate. + some <literal>WHERE</literal> clauses are expensive to calculate. </para> </listitem> <listitem> <para> - Prevent pushing down <literal>WHERE</> clauses into unsafe - <literal>UNION/INTERSECT</> subqueries (Tom Lane) + Prevent pushing down <literal>WHERE</literal> clauses into unsafe + <literal>UNION/INTERSECT</literal> subqueries (Tom Lane) </para> <para> - Subqueries of a <literal>UNION</> or <literal>INTERSECT</> that + Subqueries of a <literal>UNION</literal> or <literal>INTERSECT</literal> that contain set-returning functions or volatile functions in their - <literal>SELECT</> lists could be improperly optimized, leading to + <literal>SELECT</literal> lists could be improperly optimized, leading to run-time errors or incorrect query results. </para> </listitem> <listitem> <para> - Fix rare case of <quote>failed to locate grouping columns</> + Fix rare case of <quote>failed to locate grouping columns</quote> planner failure (Tom Lane) </para> </listitem> <listitem> <para> - Fix <application>pg_dump</> of foreign tables with dropped columns (Andrew Dunstan) + Fix <application>pg_dump</application> of foreign tables with dropped columns (Andrew Dunstan) </para> <para> - Previously such cases could cause a <application>pg_upgrade</> error. + Previously such cases could cause a <application>pg_upgrade</application> error. </para> </listitem> <listitem> <para> - Reorder <application>pg_dump</> processing of extension-related + Reorder <application>pg_dump</application> processing of extension-related rules and event triggers (Joe Conway) </para> </listitem> @@ -7023,7 +7023,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Force dumping of extension tables if specified by <command>pg_dump - -t</> or <literal>-n</> (Joe Conway) + -t</command> or <literal>-n</literal> (Joe Conway) </para> </listitem> @@ -7036,25 +7036,25 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Fix <command>pg_restore -l</> with the directory archive to display + Fix <command>pg_restore -l</command> with the directory archive to display the correct format name (Fujii Masao) </para> </listitem> <listitem> <para> - Properly record index comments created using <literal>UNIQUE</> - and <literal>PRIMARY KEY</> syntax (Andres Freund) + Properly record index comments created using <literal>UNIQUE</literal> + and <literal>PRIMARY KEY</literal> syntax (Andres Freund) </para> <para> - This fixes a parallel <application>pg_restore</> failure. + This fixes a parallel <application>pg_restore</application> failure. </para> </listitem> <listitem> <para> - Cause <command>pg_basebackup -x</> with an empty xlog directory + Cause <command>pg_basebackup -x</command> with an empty xlog directory to throw an error rather than crashing (Magnus Hagander, Haruka Takatsuka) </para> @@ -7093,13 +7093,13 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Fix <command>REINDEX TABLE</> and <command>REINDEX DATABASE</> + Fix <command>REINDEX TABLE</command> and <command>REINDEX DATABASE</command> to properly revalidate constraints and mark invalidated indexes as valid (Noah Misch) </para> <para> - <command>REINDEX INDEX</> has always worked properly. + <command>REINDEX INDEX</command> has always worked properly. </para> </listitem> @@ -7112,7 +7112,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Fix possible deadlock during concurrent <command>CREATE INDEX - CONCURRENTLY</> operations (Tom Lane) + CONCURRENTLY</command> operations (Tom Lane) </para> </listitem> @@ -7124,7 +7124,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Fix <function>regexp_matches()</> handling of zero-length matches + Fix <function>regexp_matches()</function> handling of zero-length matches (Jeevan Chalke) </para> @@ -7148,14 +7148,14 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Prevent <command>CREATE FUNCTION</> from checking <command>SET</> + Prevent <command>CREATE FUNCTION</command> from checking <command>SET</command> variables unless function body checking is enabled (Tom Lane) </para> </listitem> <listitem> <para> - Allow <command>ALTER DEFAULT PRIVILEGES</> to operate on schemas + Allow <command>ALTER DEFAULT PRIVILEGES</command> to operate on schemas without requiring CREATE permission (Tom Lane) </para> </listitem> @@ -7167,31 +7167,31 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> Specifically, lessen keyword restrictions for role names, language - names, <command>EXPLAIN</> and <command>COPY</> options, and - <command>SET</> values. This allows <literal>COPY ... (FORMAT - BINARY)</> to work as expected; previously <literal>BINARY</> needed + names, <command>EXPLAIN</command> and <command>COPY</command> options, and + <command>SET</command> values. This allows <literal>COPY ... (FORMAT + BINARY)</literal> to work as expected; previously <literal>BINARY</literal> needed to be quoted. </para> </listitem> <listitem> <para> - Print proper line number during <command>COPY</> failure (Heikki + Print proper line number during <command>COPY</command> failure (Heikki Linnakangas) </para> </listitem> <listitem> <para> - Fix <function>pgp_pub_decrypt()</> so it works for secret keys with + Fix <function>pgp_pub_decrypt()</function> so it works for secret keys with passwords (Marko Kreen) </para> </listitem> <listitem> <para> - Make <application>pg_upgrade</> use <literal>pg_dump - --quote-all-identifiers</> to avoid problems with keyword changes + Make <application>pg_upgrade</application> use <literal>pg_dump + --quote-all-identifiers</literal> to avoid problems with keyword changes between releases (Tom Lane) </para> </listitem> @@ -7205,7 +7205,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Ensure that <command>VACUUM ANALYZE</> still runs the ANALYZE phase + Ensure that <command>VACUUM ANALYZE</command> still runs the ANALYZE phase if its attempt to truncate the file is cancelled due to lock conflicts (Kevin Grittner) </para> @@ -7214,28 +7214,28 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Avoid possible failure when performing transaction control commands (e.g - <command>ROLLBACK</>) in prepared queries (Tom Lane) + <command>ROLLBACK</command>) in prepared queries (Tom Lane) </para> </listitem> <listitem> <para> Ensure that floating-point data input accepts standard spellings - of <quote>infinity</> on all platforms (Tom Lane) + of <quote>infinity</quote> on all platforms (Tom Lane) </para> <para> - The C99 standard says that allowable spellings are <literal>inf</>, - <literal>+inf</>, <literal>-inf</>, <literal>infinity</>, - <literal>+infinity</>, and <literal>-infinity</>. Make sure we - recognize these even if the platform's <function>strtod</> function + The C99 standard says that allowable spellings are <literal>inf</literal>, + <literal>+inf</literal>, <literal>-inf</literal>, <literal>infinity</literal>, + <literal>+infinity</literal>, and <literal>-infinity</literal>. Make sure we + recognize these even if the platform's <function>strtod</function> function doesn't. </para> </listitem> <listitem> <para> - Avoid unnecessary reporting when <varname>track_activities</> is off + Avoid unnecessary reporting when <varname>track_activities</varname> is off (Tom Lane) </para> </listitem> @@ -7249,7 +7249,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Prevent crash when <application>psql</>'s <envar>PSQLRC</> variable + Prevent crash when <application>psql</application>'s <envar>PSQLRC</envar> variable contains a tilde (Bruce Momjian) </para> </listitem> @@ -7262,7 +7262,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Update time zone data files to <application>tzdata</> release 2013d + Update time zone data files to <application>tzdata</application> release 2013d for DST law changes in Israel, Morocco, Palestine, and Paraguay. Also, historical zone data corrections for Macquarie Island. </para> @@ -7297,7 +7297,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> However, this release corrects several errors in management of GiST indexes. After installing this update, it is advisable to - <command>REINDEX</> any GiST indexes that meet one or more of the + <command>REINDEX</command> any GiST indexes that meet one or more of the conditions described below. </para> @@ -7321,7 +7321,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> A connection request containing a database name that begins with - <quote><literal>-</></quote> could be crafted to damage or destroy + <quote><literal>-</literal></quote> could be crafted to damage or destroy files within the server's data directory, even if the request is eventually rejected. (CVE-2013-1899) </para> @@ -7335,9 +7335,9 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> This avoids a scenario wherein random numbers generated by - <filename>contrib/pgcrypto</> functions might be relatively easy for + <filename>contrib/pgcrypto</filename> functions might be relatively easy for another database user to guess. The risk is only significant when - the postmaster is configured with <varname>ssl</> = <literal>on</> + the postmaster is configured with <varname>ssl</varname> = <literal>on</literal> but most connections don't use SSL encryption. (CVE-2013-1900) </para> </listitem> @@ -7350,7 +7350,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> An unprivileged database user could exploit this mistake to call - <function>pg_start_backup()</> or <function>pg_stop_backup()</>, + <function>pg_start_backup()</function> or <function>pg_stop_backup()</function>, thus possibly interfering with creation of routine backups. (CVE-2013-1901) </para> @@ -7358,32 +7358,32 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Fix GiST indexes to not use <quote>fuzzy</> geometric comparisons when + Fix GiST indexes to not use <quote>fuzzy</quote> geometric comparisons when it's not appropriate to do so (Alexander Korotkov) </para> <para> - The core geometric types perform comparisons using <quote>fuzzy</> - equality, but <function>gist_box_same</> must do exact comparisons, + The core geometric types perform comparisons using <quote>fuzzy</quote> + equality, but <function>gist_box_same</function> must do exact comparisons, else GiST indexes using it might become inconsistent. After installing - this update, users should <command>REINDEX</> any GiST indexes on - <type>box</>, <type>polygon</>, <type>circle</>, or <type>point</> - columns, since all of these use <function>gist_box_same</>. + this update, users should <command>REINDEX</command> any GiST indexes on + <type>box</type>, <type>polygon</type>, <type>circle</type>, or <type>point</type> + columns, since all of these use <function>gist_box_same</function>. </para> </listitem> <listitem> <para> Fix erroneous range-union and penalty logic in GiST indexes that use - <filename>contrib/btree_gist</> for variable-width data types, that is - <type>text</>, <type>bytea</>, <type>bit</>, and <type>numeric</> + <filename>contrib/btree_gist</filename> for variable-width data types, that is + <type>text</type>, <type>bytea</type>, <type>bit</type>, and <type>numeric</type> columns (Tom Lane) </para> <para> These errors could result in inconsistent indexes in which some keys that are present would not be found by searches, and also in useless - index bloat. Users are advised to <command>REINDEX</> such indexes + index bloat. Users are advised to <command>REINDEX</command> such indexes after installing this update. </para> </listitem> @@ -7398,21 +7398,21 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 These errors could result in inconsistent indexes in which some keys that are present would not be found by searches, and also in indexes that are unnecessarily inefficient to search. Users are advised to - <command>REINDEX</> multi-column GiST indexes after installing this + <command>REINDEX</command> multi-column GiST indexes after installing this update. </para> </listitem> <listitem> <para> - Fix <function>gist_point_consistent</> + Fix <function>gist_point_consistent</function> to handle fuzziness consistently (Alexander Korotkov) </para> <para> - Index scans on GiST indexes on <type>point</> columns would sometimes + Index scans on GiST indexes on <type>point</type> columns would sometimes yield results different from a sequential scan, because - <function>gist_point_consistent</> disagreed with the underlying + <function>gist_point_consistent</function> disagreed with the underlying operator code about whether to do comparisons exactly or fuzzily. </para> </listitem> @@ -7423,7 +7423,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 </para> <para> - This bug could result in <quote>incorrect local pin count</> errors + This bug could result in <quote>incorrect local pin count</quote> errors during replay, making recovery impossible. </para> </listitem> @@ -7431,7 +7431,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Ensure we do crash recovery before entering archive recovery, if the - database was not stopped cleanly and a <filename>recovery.conf</> file + database was not stopped cleanly and a <filename>recovery.conf</filename> file is present (Heikki Linnakangas, Kyotaro Horiguchi, Mitsumasa Kondo) </para> @@ -7451,14 +7451,14 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Fix race condition in <command>DELETE RETURNING</> (Tom Lane) + Fix race condition in <command>DELETE RETURNING</command> (Tom Lane) </para> <para> - Under the right circumstances, <command>DELETE RETURNING</> could + Under the right circumstances, <command>DELETE RETURNING</command> could attempt to fetch data from a shared buffer that the current process no longer has any pin on. If some other process changed the buffer - meanwhile, this would lead to garbage <literal>RETURNING</> output, or + meanwhile, this would lead to garbage <literal>RETURNING</literal> output, or even a crash. </para> </listitem> @@ -7479,20 +7479,20 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Fix <function>to_char()</> to use ASCII-only case-folding rules where + Fix <function>to_char()</function> to use ASCII-only case-folding rules where appropriate (Tom Lane) </para> <para> This fixes misbehavior of some template patterns that should be - locale-independent, but mishandled <quote><literal>I</></quote> and - <quote><literal>i</></quote> in Turkish locales. + locale-independent, but mishandled <quote><literal>I</literal></quote> and + <quote><literal>i</literal></quote> in Turkish locales. </para> </listitem> <listitem> <para> - Fix unwanted rejection of timestamp <literal>1999-12-31 24:00:00</> + Fix unwanted rejection of timestamp <literal>1999-12-31 24:00:00</literal> (Tom Lane) </para> </listitem> @@ -7506,8 +7506,8 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Fix logic error when a single transaction does <command>UNLISTEN</> - then <command>LISTEN</> (Tom Lane) + Fix logic error when a single transaction does <command>UNLISTEN</command> + then <command>LISTEN</command> (Tom Lane) </para> <para> @@ -7525,14 +7525,14 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Fix performance issue in <literal>EXPLAIN (ANALYZE, TIMING OFF)</> + Fix performance issue in <literal>EXPLAIN (ANALYZE, TIMING OFF)</literal> (Pavel Stehule) </para> </listitem> <listitem> <para> - Remove useless <quote>picksplit doesn't support secondary split</> log + Remove useless <quote>picksplit doesn't support secondary split</quote> log messages (Josh Hansen, Tom Lane) </para> @@ -7547,7 +7547,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Remove vestigial secondary-split support in - <function>gist_box_picksplit()</> (Tom Lane) + <function>gist_box_picksplit()</function> (Tom Lane) </para> <para> @@ -7566,29 +7566,29 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Eliminate memory leaks in PL/Perl's <function>spi_prepare()</> function + Eliminate memory leaks in PL/Perl's <function>spi_prepare()</function> function (Alex Hunsaker, Tom Lane) </para> </listitem> <listitem> <para> - Fix <application>pg_dumpall</> to handle database names containing - <quote><literal>=</></quote> correctly (Heikki Linnakangas) + Fix <application>pg_dumpall</application> to handle database names containing + <quote><literal>=</literal></quote> correctly (Heikki Linnakangas) </para> </listitem> <listitem> <para> - Avoid crash in <application>pg_dump</> when an incorrect connection + Avoid crash in <application>pg_dump</application> when an incorrect connection string is given (Heikki Linnakangas) </para> </listitem> <listitem> <para> - Ignore invalid indexes in <application>pg_dump</> and - <application>pg_upgrade</> (Michael Paquier, Bruce Momjian) + Ignore invalid indexes in <application>pg_dump</application> and + <application>pg_upgrade</application> (Michael Paquier, Bruce Momjian) </para> <para> @@ -7597,15 +7597,15 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 a uniqueness condition not satisfied by the table's data. Also, if the index creation is in fact still in progress, it seems reasonable to consider it to be an uncommitted DDL change, which - <application>pg_dump</> wouldn't be expected to dump anyway. - <application>pg_upgrade</> now also skips invalid indexes rather than + <application>pg_dump</application> wouldn't be expected to dump anyway. + <application>pg_upgrade</application> now also skips invalid indexes rather than failing. </para> </listitem> <listitem> <para> - In <application>pg_basebackup</>, include only the current server + In <application>pg_basebackup</application>, include only the current server version's subdirectory when backing up a tablespace (Heikki Linnakangas) </para> @@ -7613,16 +7613,16 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Add a server version check in <application>pg_basebackup</> and - <application>pg_receivexlog</>, so they fail cleanly with version + Add a server version check in <application>pg_basebackup</application> and + <application>pg_receivexlog</application>, so they fail cleanly with version combinations that won't work (Heikki Linnakangas) </para> </listitem> <listitem> <para> - Fix <filename>contrib/dblink</> to handle inconsistent settings of - <varname>DateStyle</> or <varname>IntervalStyle</> safely (Daniel + Fix <filename>contrib/dblink</filename> to handle inconsistent settings of + <varname>DateStyle</varname> or <varname>IntervalStyle</varname> safely (Daniel Farina, Tom Lane) </para> @@ -7630,7 +7630,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 Previously, if the remote server had different settings of these parameters, ambiguous dates might be read incorrectly. This fix ensures that datetime and interval columns fetched by a - <filename>dblink</> query will be interpreted correctly. Note however + <filename>dblink</filename> query will be interpreted correctly. Note however that inconsistent settings are still risky, since literal values appearing in SQL commands sent to the remote server might be interpreted differently than they would be locally. @@ -7639,25 +7639,25 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Fix <filename>contrib/pg_trgm</>'s <function>similarity()</> function + Fix <filename>contrib/pg_trgm</filename>'s <function>similarity()</function> function to return zero for trigram-less strings (Tom Lane) </para> <para> - Previously it returned <literal>NaN</> due to internal division by zero. + Previously it returned <literal>NaN</literal> due to internal division by zero. </para> </listitem> <listitem> <para> - Enable building <productname>PostgreSQL</> with Microsoft Visual + Enable building <productname>PostgreSQL</productname> with Microsoft Visual Studio 2012 (Brar Piening, Noah Misch) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2013b + Update time zone data files to <application>tzdata</application> release 2013b for DST law changes in Chile, Haiti, Morocco, Paraguay, and some Russian areas. Also, historical zone data corrections for numerous places. @@ -7665,12 +7665,12 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> Also, update the time zone abbreviation files for recent changes in - Russia and elsewhere: <literal>CHOT</>, <literal>GET</>, - <literal>IRKT</>, <literal>KGT</>, <literal>KRAT</>, <literal>MAGT</>, - <literal>MAWT</>, <literal>MSK</>, <literal>NOVT</>, <literal>OMST</>, - <literal>TKT</>, <literal>VLAT</>, <literal>WST</>, <literal>YAKT</>, - <literal>YEKT</> now follow their current meanings, and - <literal>VOLT</> (Europe/Volgograd) and <literal>MIST</> + Russia and elsewhere: <literal>CHOT</literal>, <literal>GET</literal>, + <literal>IRKT</literal>, <literal>KGT</literal>, <literal>KRAT</literal>, <literal>MAGT</literal>, + <literal>MAWT</literal>, <literal>MSK</literal>, <literal>NOVT</literal>, <literal>OMST</literal>, + <literal>TKT</literal>, <literal>VLAT</literal>, <literal>WST</literal>, <literal>YAKT</literal>, + <literal>YEKT</literal> now follow their current meanings, and + <literal>VOLT</literal> (Europe/Volgograd) and <literal>MIST</literal> (Antarctica/Macquarie) are added to the default abbreviations list. </para> </listitem> @@ -7715,7 +7715,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Prevent execution of <function>enum_recv</> from SQL (Tom Lane) + Prevent execution of <function>enum_recv</function> from SQL (Tom Lane) </para> <para> @@ -7742,7 +7742,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> This mistake could result in incorrect <quote>WAL ends before end of - online backup</> errors. + online backup</quote> errors. </para> </listitem> @@ -7824,8 +7824,8 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Improve performance of <function>SPI_execute</> and related - functions, thereby improving PL/pgSQL's <literal>EXECUTE</> + Improve performance of <function>SPI_execute</function> and related + functions, thereby improving PL/pgSQL's <literal>EXECUTE</literal> (Heikki Linnakangas, Tom Lane) </para> @@ -7860,20 +7860,20 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Fix intermittent crash in <literal>DROP INDEX CONCURRENTLY</> (Tom Lane) + Fix intermittent crash in <literal>DROP INDEX CONCURRENTLY</literal> (Tom Lane) </para> </listitem> <listitem> <para> Fix potential corruption of shared-memory lock table during - <command>CREATE/DROP INDEX CONCURRENTLY</> (Tom Lane) + <command>CREATE/DROP INDEX CONCURRENTLY</command> (Tom Lane) </para> </listitem> <listitem> <para> - Fix <command>COPY</>'s multiple-tuple-insertion code for the case of + Fix <command>COPY</command>'s multiple-tuple-insertion code for the case of a tuple larger than page size minus fillfactor (Heikki Linnakangas) </para> @@ -7885,19 +7885,19 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Protect against race conditions when scanning - <structname>pg_tablespace</> (Stephen Frost, Tom Lane) + <structname>pg_tablespace</structname> (Stephen Frost, Tom Lane) </para> <para> - <command>CREATE DATABASE</> and <command>DROP DATABASE</> could + <command>CREATE DATABASE</command> and <command>DROP DATABASE</command> could misbehave if there were concurrent updates of - <structname>pg_tablespace</> entries. + <structname>pg_tablespace</structname> entries. </para> </listitem> <listitem> <para> - Prevent <command>DROP OWNED</> from trying to drop whole databases or + Prevent <command>DROP OWNED</command> from trying to drop whole databases or tablespaces (Álvaro Herrera) </para> @@ -7909,13 +7909,13 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Fix error in <link - linkend="guc-vacuum-freeze-table-age"><varname>vacuum_freeze_table_age</></link> + linkend="guc-vacuum-freeze-table-age"><varname>vacuum_freeze_table_age</varname></link> implementation (Andres Freund) </para> <para> In installations that have existed for more than <link - linkend="guc-vacuum-freeze-min-age"><varname>vacuum_freeze_min_age</></link> + linkend="guc-vacuum-freeze-min-age"><varname>vacuum_freeze_min_age</varname></link> transactions, this mistake prevented autovacuum from using partial-table scans, so that a full-table scan would always happen instead. </para> @@ -7923,13 +7923,13 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Prevent misbehavior when a <symbol>RowExpr</> or <symbol>XmlExpr</> + Prevent misbehavior when a <symbol>RowExpr</symbol> or <symbol>XmlExpr</symbol> is parse-analyzed twice (Andres Freund, Tom Lane) </para> <para> This mistake could be user-visible in contexts such as - <literal>CREATE TABLE LIKE INCLUDING INDEXES</>. + <literal>CREATE TABLE LIKE INCLUDING INDEXES</literal>. </para> </listitem> @@ -7947,7 +7947,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> There were some issues with default privileges for types, and - <application>pg_dump</> failed to dump such privileges at all. + <application>pg_dump</application> failed to dump such privileges at all. </para> </listitem> @@ -7967,13 +7967,13 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Reject out-of-range dates in <function>to_date()</> (Hitoshi Harada) + Reject out-of-range dates in <function>to_date()</function> (Hitoshi Harada) </para> </listitem> <listitem> <para> - Fix <function>pg_extension_config_dump()</> to handle + Fix <function>pg_extension_config_dump()</function> to handle extension-update cases properly (Tom Lane) </para> @@ -7991,7 +7991,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> The previous coding resulted in sometimes omitting the first line in - the <literal>CONTEXT</> traceback for the error. + the <literal>CONTEXT</literal> traceback for the error. </para> </listitem> @@ -8009,13 +8009,13 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 </para> <para> - This bug affected <application>psql</> and some other client programs. + This bug affected <application>psql</application> and some other client programs. </para> </listitem> <listitem> <para> - Fix possible crash in <application>psql</>'s <command>\?</> command + Fix possible crash in <application>psql</application>'s <command>\?</command> command when not connected to a database (Meng Qingzhong) </para> </listitem> @@ -8023,74 +8023,74 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Fix possible error if a relation file is removed while - <application>pg_basebackup</> is running (Heikki Linnakangas) + <application>pg_basebackup</application> is running (Heikki Linnakangas) </para> </listitem> <listitem> <para> - Tolerate timeline switches while <literal>pg_basebackup -X fetch</> + Tolerate timeline switches while <literal>pg_basebackup -X fetch</literal> is backing up a standby server (Heikki Linnakangas) </para> </listitem> <listitem> <para> - Make <application>pg_dump</> exclude data of unlogged tables when + Make <application>pg_dump</application> exclude data of unlogged tables when running on a hot-standby server (Magnus Hagander) </para> <para> This would fail anyway because the data is not available on the standby server, so it seems most convenient to assume - <option>--no-unlogged-table-data</> automatically. + <option>--no-unlogged-table-data</option> automatically. </para> </listitem> <listitem> <para> - Fix <application>pg_upgrade</> to deal with invalid indexes safely + Fix <application>pg_upgrade</application> to deal with invalid indexes safely (Bruce Momjian) </para> </listitem> <listitem> <para> - Fix <application>pg_upgrade</>'s -O/-o options (Marti Raudsepp) + Fix <application>pg_upgrade</application>'s -O/-o options (Marti Raudsepp) </para> </listitem> <listitem> <para> - Fix one-byte buffer overrun in <application>libpq</>'s - <function>PQprintTuples</> (Xi Wang) + Fix one-byte buffer overrun in <application>libpq</application>'s + <function>PQprintTuples</function> (Xi Wang) </para> <para> This ancient function is not used anywhere by - <productname>PostgreSQL</> itself, but it might still be used by some + <productname>PostgreSQL</productname> itself, but it might still be used by some client code. </para> </listitem> <listitem> <para> - Make <application>ecpglib</> use translated messages properly + Make <application>ecpglib</application> use translated messages properly (Chen Huajun) </para> </listitem> <listitem> <para> - Properly install <application>ecpg_compat</> and - <application>pgtypes</> libraries on MSVC (Jiang Guiqing) + Properly install <application>ecpg_compat</application> and + <application>pgtypes</application> libraries on MSVC (Jiang Guiqing) </para> </listitem> <listitem> <para> - Include our version of <function>isinf()</> in - <application>libecpg</> if it's not provided by the system + Include our version of <function>isinf()</function> in + <application>libecpg</application> if it's not provided by the system (Jiang Guiqing) </para> </listitem> @@ -8110,15 +8110,15 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Make <application>pgxs</> build executables with the right - <literal>.exe</> suffix when cross-compiling for Windows + Make <application>pgxs</application> build executables with the right + <literal>.exe</literal> suffix when cross-compiling for Windows (Zoltan Boszormenyi) </para> </listitem> <listitem> <para> - Add new timezone abbreviation <literal>FET</> (Tom Lane) + Add new timezone abbreviation <literal>FET</literal> (Tom Lane) </para> <para> @@ -8153,7 +8153,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 </para> <para> - However, you may need to perform <command>REINDEX</> operations to + However, you may need to perform <command>REINDEX</command> operations to correct problems in concurrently-built indexes, as described in the first changelog item below. </para> @@ -8173,22 +8173,22 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Fix multiple bugs associated with <command>CREATE/DROP INDEX - CONCURRENTLY</> (Andres Freund, Tom Lane, Simon Riggs, Pavan Deolasee) + CONCURRENTLY</command> (Andres Freund, Tom Lane, Simon Riggs, Pavan Deolasee) </para> <para> - An error introduced while adding <command>DROP INDEX CONCURRENTLY</> + An error introduced while adding <command>DROP INDEX CONCURRENTLY</command> allowed incorrect indexing decisions to be made during the initial - phase of <command>CREATE INDEX CONCURRENTLY</>; so that indexes built + phase of <command>CREATE INDEX CONCURRENTLY</command>; so that indexes built by that command could be corrupt. It is recommended that indexes - built in 9.2.X with <command>CREATE INDEX CONCURRENTLY</> be rebuilt + built in 9.2.X with <command>CREATE INDEX CONCURRENTLY</command> be rebuilt after applying this update. </para> <para> - In addition, fix <command>CREATE/DROP INDEX CONCURRENTLY</> to use + In addition, fix <command>CREATE/DROP INDEX CONCURRENTLY</command> to use in-place updates when changing the state of an index's - <structname>pg_index</> row. This prevents race conditions that could + <structname>pg_index</structname> row. This prevents race conditions that could cause concurrent sessions to miss updating the target index, thus again resulting in corrupt concurrently-created indexes. </para> @@ -8196,33 +8196,33 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> Also, fix various other operations to ensure that they ignore invalid indexes resulting from a failed <command>CREATE INDEX - CONCURRENTLY</> command. The most important of these is - <command>VACUUM</>, because an auto-vacuum could easily be launched + CONCURRENTLY</command> command. The most important of these is + <command>VACUUM</command>, because an auto-vacuum could easily be launched on the table before corrective action can be taken to fix or remove the invalid index. </para> <para> - Also fix <command>DROP INDEX CONCURRENTLY</> to not disable + Also fix <command>DROP INDEX CONCURRENTLY</command> to not disable insertions into the target index until all queries using it are done. </para> <para> - Also fix misbehavior if <command>DROP INDEX CONCURRENTLY</> is + Also fix misbehavior if <command>DROP INDEX CONCURRENTLY</command> is canceled: the previous coding could leave an un-droppable index behind. </para> </listitem> <listitem> <para> - Correct predicate locking for <command>DROP INDEX CONCURRENTLY</> + Correct predicate locking for <command>DROP INDEX CONCURRENTLY</command> (Kevin Grittner) </para> <para> Previously, SSI predicate locks were processed at the wrong time, possibly leading to incorrect behavior of serializable transactions - executing in parallel with the <command>DROP</>. + executing in parallel with the <command>DROP</command>. </para> </listitem> @@ -8280,13 +8280,13 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> This oversight could prevent subsequent execution of certain - operations such as <command>CREATE INDEX CONCURRENTLY</>. + operations such as <command>CREATE INDEX CONCURRENTLY</command>. </para> </listitem> <listitem> <para> - Avoid bogus <quote>out-of-sequence timeline ID</> errors in standby + Avoid bogus <quote>out-of-sequence timeline ID</quote> errors in standby mode (Heikki Linnakangas) </para> </listitem> @@ -8306,20 +8306,20 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Fix the syslogger process to not fail when - <varname>log_rotation_age</> exceeds 2^31 milliseconds (about 25 days) + <varname>log_rotation_age</varname> exceeds 2^31 milliseconds (about 25 days) (Tom Lane) </para> </listitem> <listitem> <para> - Fix <function>WaitLatch()</> to return promptly when the requested + Fix <function>WaitLatch()</function> to return promptly when the requested timeout expires (Jeff Janes, Tom Lane) </para> <para> With the previous coding, a steady stream of non-wait-terminating - interrupts could delay return from <function>WaitLatch()</> + interrupts could delay return from <function>WaitLatch()</function> indefinitely. This has been shown to be a problem for the autovacuum launcher process, and might cause trouble elsewhere as well. </para> @@ -8372,8 +8372,8 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> The planner could derive incorrect constraints from a clause equating a non-strict construct to something else, for example - <literal>WHERE COALESCE(foo, 0) = 0</> - when <literal>foo</> is coming from the nullable side of an outer join. + <literal>WHERE COALESCE(foo, 0) = 0</literal> + when <literal>foo</literal> is coming from the nullable side of an outer join. 9.2 showed this type of error in more cases than previous releases, but the basic bug has been there for a long time. </para> @@ -8381,13 +8381,13 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Fix <command>SELECT DISTINCT</> with index-optimized - <function>MIN</>/<function>MAX</> on an inheritance tree (Tom Lane) + Fix <command>SELECT DISTINCT</command> with index-optimized + <function>MIN</function>/<function>MAX</function> on an inheritance tree (Tom Lane) </para> <para> The planner would fail with <quote>failed to re-find MinMaxAggInfo - record</> given this combination of factors. + record</quote> given this combination of factors. </para> </listitem> @@ -8407,7 +8407,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> A strict join clause can be sufficient to establish an - <replaceable>x</> <literal>IS NOT NULL</> predicate, for example. + <replaceable>x</replaceable> <literal>IS NOT NULL</literal> predicate, for example. This fixes a planner regression in 9.2, since previous versions could make comparable deductions. </para> @@ -8434,10 +8434,10 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 </para> <para> - This affects multicolumn <literal>NOT IN</> subplans, such as - <literal>WHERE (a, b) NOT IN (SELECT x, y FROM ...)</> - when for instance <literal>b</> and <literal>y</> are <type>int4</> - and <type>int8</> respectively. This mistake led to wrong answers + This affects multicolumn <literal>NOT IN</literal> subplans, such as + <literal>WHERE (a, b) NOT IN (SELECT x, y FROM ...)</literal> + when for instance <literal>b</literal> and <literal>y</literal> are <type>int4</type> + and <type>int8</type> respectively. This mistake led to wrong answers or crashes depending on the specific datatypes involved. </para> </listitem> @@ -8450,8 +8450,8 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> This oversight could result in wrong answers from merge joins whose inner side is an index scan using an - <literal><replaceable>indexed_column</> = - ANY(<replaceable>array</>)</literal> condition. + <literal><replaceable>indexed_column</replaceable> = + ANY(<replaceable>array</replaceable>)</literal> condition. </para> </listitem> @@ -8475,12 +8475,12 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Acquire buffer lock when re-fetching the old tuple for an - <literal>AFTER ROW UPDATE/DELETE</> trigger (Andres Freund) + <literal>AFTER ROW UPDATE/DELETE</literal> trigger (Andres Freund) </para> <para> In very unusual circumstances, this oversight could result in passing - incorrect data to a trigger <literal>WHEN</> condition, or to the + incorrect data to a trigger <literal>WHEN</literal> condition, or to the precheck logic for a foreign-key enforcement trigger. That could result in a crash, or in an incorrect decision about whether to fire the trigger. @@ -8489,7 +8489,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Fix <command>ALTER COLUMN TYPE</> to handle inherited check + Fix <command>ALTER COLUMN TYPE</command> to handle inherited check constraints properly (Pavan Deolasee) </para> @@ -8501,7 +8501,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Fix <command>ALTER EXTENSION SET SCHEMA</>'s failure to move some + Fix <command>ALTER EXTENSION SET SCHEMA</command>'s failure to move some subsidiary objects into the new schema (Álvaro Herrera, Dimitri Fontaine) </para> @@ -8509,7 +8509,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Handle <command>CREATE TABLE AS EXECUTE</> correctly in extended query + Handle <command>CREATE TABLE AS EXECUTE</command> correctly in extended query protocol (Tom Lane) </para> </listitem> @@ -8517,7 +8517,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Don't modify the input parse tree in <command>DROP RULE IF NOT - EXISTS</> and <command>DROP TRIGGER IF NOT EXISTS</> (Tom Lane) + EXISTS</command> and <command>DROP TRIGGER IF NOT EXISTS</command> (Tom Lane) </para> <para> @@ -8528,14 +8528,14 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Fix <command>REASSIGN OWNED</> to handle grants on tablespaces + Fix <command>REASSIGN OWNED</command> to handle grants on tablespaces (Álvaro Herrera) </para> </listitem> <listitem> <para> - Ignore incorrect <structname>pg_attribute</> entries for system + Ignore incorrect <structname>pg_attribute</structname> entries for system columns for views (Tom Lane) </para> @@ -8549,7 +8549,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Fix rule printing to dump <literal>INSERT INTO <replaceable>table</> + Fix rule printing to dump <literal>INSERT INTO <replaceable>table</replaceable> DEFAULT VALUES</literal> correctly (Tom Lane) </para> </listitem> @@ -8557,7 +8557,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Guard against stack overflow when there are too many - <literal>UNION</>/<literal>INTERSECT</>/<literal>EXCEPT</> clauses + <literal>UNION</literal>/<literal>INTERSECT</literal>/<literal>EXCEPT</literal> clauses in a query (Tom Lane) </para> </listitem> @@ -8579,22 +8579,22 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Fix failure to advance XID epoch if XID wraparound happens during a - checkpoint and <varname>wal_level</> is <literal>hot_standby</> + checkpoint and <varname>wal_level</varname> is <literal>hot_standby</literal> (Tom Lane, Andres Freund) </para> <para> While this mistake had no particular impact on <productname>PostgreSQL</productname> itself, it was bad for - applications that rely on <function>txid_current()</> and related + applications that rely on <function>txid_current()</function> and related functions: the TXID value would appear to go backwards. </para> </listitem> <listitem> <para> - Fix <function>pg_terminate_backend()</> and - <function>pg_cancel_backend()</> to not throw error for a non-existent + Fix <function>pg_terminate_backend()</function> and + <function>pg_cancel_backend()</function> to not throw error for a non-existent target process (Josh Kupershmidt) </para> @@ -8607,7 +8607,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Fix display of - <structname>pg_stat_replication</>.<structfield>sync_state</> at a + <structname>pg_stat_replication</structname>.<structfield>sync_state</structfield> at a page boundary (Kyotaro Horiguchi) </para> </listitem> @@ -8621,7 +8621,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> Formerly, this would result in something quite unhelpful, such as - <quote>Non-recoverable failure in name resolution</>. + <quote>Non-recoverable failure in name resolution</quote>. </para> </listitem> @@ -8646,8 +8646,8 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Make <application>pg_ctl</> more robust about reading the - <filename>postmaster.pid</> file (Heikki Linnakangas) + Make <application>pg_ctl</application> more robust about reading the + <filename>postmaster.pid</filename> file (Heikki Linnakangas) </para> <para> @@ -8657,45 +8657,45 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Fix possible crash in <application>psql</> if incorrectly-encoded data - is presented and the <varname>client_encoding</> setting is a + Fix possible crash in <application>psql</application> if incorrectly-encoded data + is presented and the <varname>client_encoding</varname> setting is a client-only encoding, such as SJIS (Jiang Guiqing) </para> </listitem> <listitem> <para> - Make <application>pg_dump</> dump <literal>SEQUENCE SET</> items in + Make <application>pg_dump</application> dump <literal>SEQUENCE SET</literal> items in the data not pre-data section of the archive (Tom Lane) </para> <para> This fixes an undesirable inconsistency between the meanings of - <option>--data-only</> and <option>--section=data</>, and also fixes + <option>--data-only</option> and <option>--section=data</option>, and also fixes dumping of sequences that are marked as extension configuration tables. </para> </listitem> <listitem> <para> - Fix <application>pg_dump</>'s handling of <command>DROP DATABASE</> - commands in <option>--clean</> mode (Guillaume Lelarge) + Fix <application>pg_dump</application>'s handling of <command>DROP DATABASE</command> + commands in <option>--clean</option> mode (Guillaume Lelarge) </para> <para> - Beginning in 9.2.0, <literal>pg_dump --clean</> would issue a - <command>DROP DATABASE</> command, which was either useless or + Beginning in 9.2.0, <literal>pg_dump --clean</literal> would issue a + <command>DROP DATABASE</command> command, which was either useless or dangerous depending on the usage scenario. It no longer does that. - This change also fixes the combination of <option>--clean</> and - <option>--create</> to work sensibly, i.e., emit <command>DROP - DATABASE</> then <command>CREATE DATABASE</> before reconnecting to the + This change also fixes the combination of <option>--clean</option> and + <option>--create</option> to work sensibly, i.e., emit <command>DROP + DATABASE</command> then <command>CREATE DATABASE</command> before reconnecting to the target database. </para> </listitem> <listitem> <para> - Fix <application>pg_dump</> for views with circular dependencies and + Fix <application>pg_dump</application> for views with circular dependencies and no relation options (Tom Lane) </para> @@ -8703,31 +8703,31 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 The previous fix to dump relation options when a view is involved in a circular dependency didn't work right for the case that the view has no options; it emitted <literal>ALTER VIEW foo - SET ()</> which is invalid syntax. + SET ()</literal> which is invalid syntax. </para> </listitem> <listitem> <para> - Fix bugs in the <filename>restore.sql</> script emitted by - <application>pg_dump</> in <literal>tar</> output format (Tom Lane) + Fix bugs in the <filename>restore.sql</filename> script emitted by + <application>pg_dump</application> in <literal>tar</literal> output format (Tom Lane) </para> <para> The script would fail outright on tables whose names include upper-case characters. Also, make the script capable of restoring - data in <option>--inserts</> mode as well as the regular COPY mode. + data in <option>--inserts</option> mode as well as the regular COPY mode. </para> </listitem> <listitem> <para> - Fix <application>pg_restore</> to accept POSIX-conformant - <literal>tar</> files (Brian Weaver, Tom Lane) + Fix <application>pg_restore</application> to accept POSIX-conformant + <literal>tar</literal> files (Brian Weaver, Tom Lane) </para> <para> - The original coding of <application>pg_dump</>'s <literal>tar</> + The original coding of <application>pg_dump</application>'s <literal>tar</literal> output mode produced files that are not fully conformant with the POSIX standard. This has been corrected for version 9.3. This patch updates previous branches so that they will accept both the @@ -8738,82 +8738,82 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Fix <literal>tar</> files emitted by <application>pg_basebackup</> to + Fix <literal>tar</literal> files emitted by <application>pg_basebackup</application> to be POSIX conformant (Brian Weaver, Tom Lane) </para> </listitem> <listitem> <para> - Fix <application>pg_resetxlog</> to locate <filename>postmaster.pid</> + Fix <application>pg_resetxlog</application> to locate <filename>postmaster.pid</filename> correctly when given a relative path to the data directory (Tom Lane) </para> <para> - This mistake could lead to <application>pg_resetxlog</> not noticing + This mistake could lead to <application>pg_resetxlog</application> not noticing that there is an active postmaster using the data directory. </para> </listitem> <listitem> <para> - Fix <application>libpq</>'s <function>lo_import()</> and - <function>lo_export()</> functions to report file I/O errors properly + Fix <application>libpq</application>'s <function>lo_import()</function> and + <function>lo_export()</function> functions to report file I/O errors properly (Tom Lane) </para> </listitem> <listitem> <para> - Fix <application>ecpg</>'s processing of nested structure pointer + Fix <application>ecpg</application>'s processing of nested structure pointer variables (Muhammad Usama) </para> </listitem> <listitem> <para> - Fix <application>ecpg</>'s <function>ecpg_get_data</> function to + Fix <application>ecpg</application>'s <function>ecpg_get_data</function> function to handle arrays properly (Michael Meskes) </para> </listitem> <listitem> <para> - Prevent <application>pg_upgrade</> from trying to process TOAST tables + Prevent <application>pg_upgrade</application> from trying to process TOAST tables for system catalogs (Bruce Momjian) </para> <para> - This fixes an error seen when the <literal>information_schema</> has + This fixes an error seen when the <literal>information_schema</literal> has been dropped and recreated. Other failures were also possible. </para> </listitem> <listitem> <para> - Improve <application>pg_upgrade</> performance by setting - <varname>synchronous_commit</> to <literal>off</> in the new cluster + Improve <application>pg_upgrade</application> performance by setting + <varname>synchronous_commit</varname> to <literal>off</literal> in the new cluster (Bruce Momjian) </para> </listitem> <listitem> <para> - Make <filename>contrib/pageinspect</>'s btree page inspection + Make <filename>contrib/pageinspect</filename>'s btree page inspection functions take buffer locks while examining pages (Tom Lane) </para> </listitem> <listitem> <para> - Work around unportable behavior of <literal>malloc(0)</> and - <literal>realloc(NULL, 0)</> (Tom Lane) + Work around unportable behavior of <literal>malloc(0)</literal> and + <literal>realloc(NULL, 0)</literal> (Tom Lane) </para> <para> - On platforms where these calls return <literal>NULL</>, some code + On platforms where these calls return <literal>NULL</literal>, some code mistakenly thought that meant out-of-memory. - This is known to have broken <application>pg_dump</> for databases + This is known to have broken <application>pg_dump</application> for databases containing no user-defined aggregates. There might be other cases as well. </para> @@ -8821,19 +8821,19 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Ensure that <literal>make install</> for an extension creates the - <filename>extension</> installation directory (Cédric Villemain) + Ensure that <literal>make install</literal> for an extension creates the + <filename>extension</filename> installation directory (Cédric Villemain) </para> <para> - Previously, this step was missed if <varname>MODULEDIR</> was set in + Previously, this step was missed if <varname>MODULEDIR</varname> was set in the extension's Makefile. </para> </listitem> <listitem> <para> - Fix <application>pgxs</> support for building loadable modules on AIX + Fix <application>pgxs</application> support for building loadable modules on AIX (Tom Lane) </para> @@ -8844,7 +8844,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Update time zone data files to <application>tzdata</> release 2012j + Update time zone data files to <application>tzdata</application> release 2012j for DST law changes in Cuba, Israel, Jordan, Libya, Palestine, Western Samoa, and portions of Brazil. </para> @@ -8877,8 +8877,8 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 </para> <para> - However, you may need to perform <command>REINDEX</> and/or - <command>VACUUM</> operations to recover from the effects of the data + However, you may need to perform <command>REINDEX</command> and/or + <command>VACUUM</command> operations to recover from the effects of the data corruption bug described in the first changelog item below. </para> @@ -8903,7 +8903,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 likely to occur on standby slave servers since those perform much more WAL replay. There is a low probability of corruption of btree and GIN indexes. There is a much higher probability of corruption - of table <quote>visibility maps</>, which might lead to wrong answers + of table <quote>visibility maps</quote>, which might lead to wrong answers from index-only scans. Table data proper cannot be corrupted by this bug. </para> @@ -8911,16 +8911,16 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> While no index corruption due to this bug is known to have occurred in the field, as a precautionary measure it is recommended that - production installations <command>REINDEX</> all btree and GIN + production installations <command>REINDEX</command> all btree and GIN indexes at a convenient time after upgrading to 9.2.1. </para> <para> - Also, it is recommended to perform a <command>VACUUM</> of all tables + Also, it is recommended to perform a <command>VACUUM</command> of all tables while having <link - linkend="guc-vacuum-freeze-table-age"><varname>vacuum_freeze_table_age</></link> + linkend="guc-vacuum-freeze-table-age"><varname>vacuum_freeze_table_age</varname></link> set to zero. This will fix any incorrect visibility map data. <link - linkend="guc-vacuum-cost-delay"><varname>vacuum_cost_delay</></link> + linkend="guc-vacuum-cost-delay"><varname>vacuum_cost_delay</varname></link> can be adjusted to reduce the performance impact of vacuuming, while causing it to take longer to finish. </para> @@ -8929,14 +8929,14 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Fix possible incorrect sorting of output from queries involving - <literal>WHERE <replaceable>indexed_column</> IN - (<replaceable>list_of_values</>)</literal> (Tom Lane) + <literal>WHERE <replaceable>indexed_column</replaceable> IN + (<replaceable>list_of_values</replaceable>)</literal> (Tom Lane) </para> </listitem> <listitem> <para> - Fix planner failure for queries involving <literal>GROUP BY</> + Fix planner failure for queries involving <literal>GROUP BY</literal> expressions along with window functions and aggregates (Tom Lane) </para> </listitem> @@ -8948,7 +8948,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> This error could result in wrong answers from queries that scan the - same <literal>WITH</> subquery multiple times. + same <literal>WITH</literal> subquery multiple times. </para> </listitem> @@ -8961,7 +8961,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Improve selectivity estimation for text search queries involving - prefixes, i.e. <replaceable>word</><literal>:*</> patterns (Tom Lane) + prefixes, i.e. <replaceable>word</replaceable><literal>:*</literal> patterns (Tom Lane) </para> </listitem> @@ -8972,14 +8972,14 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> A command that needed no locks other than ones its transaction already - had might fail to notice a concurrent <command>GRANT</> or - <command>REVOKE</> that committed since the start of its transaction. + had might fail to notice a concurrent <command>GRANT</command> or + <command>REVOKE</command> that committed since the start of its transaction. </para> </listitem> <listitem> <para> - Fix <command>ANALYZE</> to not fail when a column is a domain over an + Fix <command>ANALYZE</command> to not fail when a column is a domain over an array type (Tom Lane) </para> </listitem> @@ -8998,7 +8998,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> Some Linux distributions contain an incorrect version of - <filename>pthread.h</> that results in incorrect compiled code in + <filename>pthread.h</filename> that results in incorrect compiled code in PL/Perl, leading to crashes if a PL/Perl function calls another one that throws an error. </para> @@ -9006,14 +9006,14 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Remove unnecessary dependency on <application>pg_config</> from - <application>pg_upgrade</> (Peter Eisentraut) + Remove unnecessary dependency on <application>pg_config</application> from + <application>pg_upgrade</application> (Peter Eisentraut) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2012f + Update time zone data files to <application>tzdata</application> release 2012f for DST law changes in Fiji </para> </listitem> @@ -9047,7 +9047,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Allow queries to retrieve data only from indexes, avoiding heap - access (<firstterm>index-only scans</>) + access (<firstterm>index-only scans</firstterm>) </para> </listitem> @@ -9069,14 +9069,14 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> Allow streaming replication slaves to forward data to other slaves (<link linkend="cascading-replication"><firstterm>cascading - replication</></link>) + replication</firstterm></link>) </para> </listitem> <listitem> <para> Allow <link - linkend="app-pgbasebackup"><application>pg_basebackup</></link> + linkend="app-pgbasebackup"><application>pg_basebackup</application></link> to make base backups from standby servers </para> </listitem> @@ -9084,7 +9084,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Add a <link - linkend="app-pgreceivewal"><application>pg_receivexlog</></link> + linkend="app-pgreceivewal"><application>pg_receivexlog</application></link> tool to archive WAL file changes as they are written </para> </listitem> @@ -9112,14 +9112,14 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Add a <link - linkend="SQL-CREATEVIEW"><literal>security_barrier</></link> + linkend="SQL-CREATEVIEW"><literal>security_barrier</literal></link> option for views </para> </listitem> <listitem> <para> - Allow <application>libpq</> connection strings to have the format of a + Allow <application>libpq</application> connection strings to have the format of a <link linkend="libpq-connstring"><acronym>URI</acronym></link> </para> </listitem> @@ -9127,7 +9127,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Add a <link linkend="libpq-single-row-mode">single-row processing - mode</link> to <application>libpq</> for better handling of large + mode</link> to <application>libpq</application> for better handling of large result sets </para> </listitem> @@ -9162,8 +9162,8 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Remove the <structfield>spclocation</> field from <link - linkend="catalog-pg-tablespace"><structname>pg_tablespace</></link> + Remove the <structfield>spclocation</structfield> field from <link + linkend="catalog-pg-tablespace"><structname>pg_tablespace</structname></link> (Magnus Hagander) </para> @@ -9173,23 +9173,23 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 a tablespace. This change allows tablespace directories to be moved while the server is down, by manually adjusting the symbolic links. To replace this field, we have added <link - linkend="functions-info-catalog-table"><function>pg_tablespace_location()</></link> + linkend="functions-info-catalog-table"><function>pg_tablespace_location()</function></link> to allow querying of the symbolic links. </para> </listitem> <listitem> <para> - Move <type>tsvector</> most-common-element statistics to new - <link linkend="view-pg-stats"><structname>pg_stats</></link> columns + Move <type>tsvector</type> most-common-element statistics to new + <link linkend="view-pg-stats"><structname>pg_stats</structname></link> columns (Alexander Korotkov) </para> <para> - Consult <structfield>most_common_elems</> - and <structfield>most_common_elem_freqs</> for the data formerly - available in <structfield>most_common_vals</> - and <structfield>most_common_freqs</> for a <type>tsvector</> column. + Consult <structfield>most_common_elems</structfield> + and <structfield>most_common_elem_freqs</structfield> for the data formerly + available in <structfield>most_common_vals</structfield> + and <structfield>most_common_freqs</structfield> for a <type>tsvector</type> column. </para> </listitem> @@ -9204,14 +9204,14 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Remove <link linkend="hstore">hstore</link>'s <literal>=></> + Remove <link linkend="hstore">hstore</link>'s <literal>=></literal> operator (Robert Haas) </para> <para> - Users should now use <function>hstore(text, text)</>. Since + Users should now use <function>hstore(text, text)</function>. Since <productname>PostgreSQL</productname> 9.0, a warning message has been - emitted when an operator named <literal>=></> is created because + emitted when an operator named <literal>=></literal> is created because the <acronym>SQL</acronym> standard reserves that token for another use. </para> @@ -9220,7 +9220,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Ensure that <link - linkend="functions-xml-processing"><function>xpath()</></link> + linkend="functions-xml-processing"><function>xpath()</function></link> escapes special characters in string values (Florian Pflug) </para> @@ -9233,13 +9233,13 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Make <link - linkend="functions-admin-dbobject"><function>pg_relation_size()</></link> + linkend="functions-admin-dbobject"><function>pg_relation_size()</function></link> and friends return NULL if the object does not exist (Phil Sorber) </para> <para> This prevents queries that call these functions from returning - errors immediately after a concurrent <command>DROP</>. + errors immediately after a concurrent <command>DROP</command>. </para> </listitem> @@ -9247,7 +9247,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> Make <link linkend="functions-datetime-extract"><function>EXTRACT(EPOCH FROM - <replaceable>timestamp without time zone</>)</function></link> + <replaceable>timestamp without time zone</replaceable>)</function></link> measure the epoch from local midnight, not <acronym>UTC</acronym> midnight (Tom Lane) </para> @@ -9256,17 +9256,17 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 This change reverts an ill-considered change made in release 7.3. Measuring from <acronym>UTC</acronym> midnight was inconsistent because it made the result dependent on the <link - linkend="guc-timezone"><varname>timezone</></link> setting, which - computations for <type>timestamp without time zone</> should not be. + linkend="guc-timezone"><varname>timezone</varname></link> setting, which + computations for <type>timestamp without time zone</type> should not be. The previous behavior remains available by casting the input value - to <type>timestamp with time zone</>. + to <type>timestamp with time zone</type>. </para> </listitem> <listitem> <para> - Properly parse time strings with trailing <literal>yesterday</>, - <literal>today</>, and <literal>tomorrow</> (Dean Rasheed) + Properly parse time strings with trailing <literal>yesterday</literal>, + <literal>today</literal>, and <literal>tomorrow</literal> (Dean Rasheed) </para> <para> @@ -9278,8 +9278,8 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Fix <link - linkend="functions-formatting"><function>to_date()</></link> and - <function>to_timestamp()</> to wrap incomplete dates toward 2020 + linkend="functions-formatting"><function>to_date()</function></link> and + <function>to_timestamp()</function> to wrap incomplete dates toward 2020 (Bruce Momjian) </para> @@ -9314,15 +9314,15 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> No longer forcibly lowercase procedural language names in <link - linkend="SQL-CREATEFUNCTION"><command>CREATE FUNCTION</></link> + linkend="SQL-CREATEFUNCTION"><command>CREATE FUNCTION</command></link> (Robert Haas) </para> <para> While unquoted language identifiers are still lowercased, strings and quoted identifiers are no longer forcibly down-cased. - Thus for example <literal>CREATE FUNCTION ... LANGUAGE 'C'</> - will no longer work; it must be spelled <literal>'c'</>, or better + Thus for example <literal>CREATE FUNCTION ... LANGUAGE 'C'</literal> + will no longer work; it must be spelled <literal>'c'</literal>, or better omit the quotes. </para> </listitem> @@ -9352,15 +9352,15 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> Provide consistent backquote, variable expansion, and quoted substring behavior in <link - linkend="APP-PSQL"><application>psql</></link> meta-command + linkend="APP-PSQL"><application>psql</application></link> meta-command arguments (Tom Lane) </para> <para> Previously, such references were treated oddly when not separated by - whitespace from adjacent text. For example <literal>'FOO'BAR</> was - output as <literal>FOO BAR</> (unexpected insertion of a space) and - <literal>FOO'BAR'BAZ</> was output unchanged (not removing the quotes + whitespace from adjacent text. For example <literal>'FOO'BAR</literal> was + output as <literal>FOO BAR</literal> (unexpected insertion of a space) and + <literal>FOO'BAR'BAZ</literal> was output unchanged (not removing the quotes as most would expect). </para> </listitem> @@ -9368,9 +9368,9 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> No longer treat <link - linkend="APP-CLUSTERDB"><application>clusterdb</></link> + linkend="APP-CLUSTERDB"><application>clusterdb</application></link> table names as double-quoted; no longer treat <link - linkend="APP-REINDEXDB"><application>reindexdb</></link> table + linkend="APP-REINDEXDB"><application>reindexdb</application></link> table and index names as double-quoted (Bruce Momjian) </para> @@ -9382,20 +9382,20 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - <link linkend="APP-CREATEUSER"><application>createuser</></link> + <link linkend="APP-CREATEUSER"><application>createuser</application></link> no longer prompts for option settings by default (Peter Eisentraut) </para> <para> - Use <option>--interactive</> to obtain the old behavior. + Use <option>--interactive</option> to obtain the old behavior. </para> </listitem> <listitem> <para> Disable prompting for the user name in <link - linkend="APP-DROPUSER"><application>dropuser</></link> unless - <option>--interactive</> is specified (Peter Eisentraut) + linkend="APP-DROPUSER"><application>dropuser</application></link> unless + <option>--interactive</option> is specified (Peter Eisentraut) </para> </listitem> @@ -9417,36 +9417,36 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> This allows changing the names and locations of the files that were - previously hard-coded as <filename>server.crt</>, - <filename>server.key</>, <filename>root.crt</>, and - <filename>root.crl</> in the data directory. - <emphasis>The server will no longer examine <filename>root.crt</> or - <filename>root.crl</> by default</emphasis>; to load these files, the + previously hard-coded as <filename>server.crt</filename>, + <filename>server.key</filename>, <filename>root.crt</filename>, and + <filename>root.crl</filename> in the data directory. + <emphasis>The server will no longer examine <filename>root.crt</filename> or + <filename>root.crl</filename> by default</emphasis>; to load these files, the associated parameters must be set to non-default values. </para> </listitem> <listitem> <para> - Remove the <varname>silent_mode</> parameter (Heikki Linnakangas) + Remove the <varname>silent_mode</varname> parameter (Heikki Linnakangas) </para> <para> Similar behavior can be obtained with <command>pg_ctl start - -l postmaster.log</>. + -l postmaster.log</command>. </para> </listitem> <listitem> <para> - Remove the <varname>wal_sender_delay</> parameter, + Remove the <varname>wal_sender_delay</varname> parameter, as it is no longer needed (Tom Lane) </para> </listitem> <listitem> <para> - Remove the <varname>custom_variable_classes</> parameter (Tom Lane) + Remove the <varname>custom_variable_classes</varname> parameter (Tom Lane) </para> <para> @@ -9466,19 +9466,19 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Rename <link - linkend="monitoring-stats-views-table"><structname>pg_stat_activity</></link><structfield>.procpid</> - to <structfield>pid</>, to match other system tables (Magnus Hagander) + linkend="monitoring-stats-views-table"><structname>pg_stat_activity</structname></link><structfield>.procpid</structfield> + to <structfield>pid</structfield>, to match other system tables (Magnus Hagander) </para> </listitem> <listitem> <para> - Create a separate <structfield>pg_stat_activity</> column to + Create a separate <structfield>pg_stat_activity</structfield> column to report process state (Scott Mead, Magnus Hagander) </para> <para> - The previous <structfield>query</> and <structfield>query_start</> + The previous <structfield>query</structfield> and <structfield>query_start</structfield> values now remain available for an idle session, allowing enhanced analysis. </para> @@ -9486,8 +9486,8 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Rename <structname>pg_stat_activity</>.<structfield>current_query</> to - <structfield>query</> because it is not cleared when the query + Rename <structname>pg_stat_activity</structname>.<structfield>current_query</structfield> to + <structfield>query</structfield> because it is not cleared when the query completes (Magnus Hagander) </para> </listitem> @@ -9495,24 +9495,24 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Change all <acronym>SQL</acronym>-level statistics timing values - to be <type>float8</> columns measured in milliseconds (Tom Lane) + to be <type>float8</type> columns measured in milliseconds (Tom Lane) </para> <para> This change eliminates the designed-in assumption that the values - are accurate to microseconds and no more (since the <type>float8</> + are accurate to microseconds and no more (since the <type>float8</type> values can be fractional). The columns affected are - <structname>pg_stat_user_functions</>.<structfield>total_time</>, - <structname>pg_stat_user_functions</>.<structfield>self_time</>, - <structname>pg_stat_xact_user_functions</>.<structfield>total_time</>, + <structname>pg_stat_user_functions</structname>.<structfield>total_time</structfield>, + <structname>pg_stat_user_functions</structname>.<structfield>self_time</structfield>, + <structname>pg_stat_xact_user_functions</structname>.<structfield>total_time</structfield>, and - <structname>pg_stat_xact_user_functions</>.<structfield>self_time</>. + <structname>pg_stat_xact_user_functions</structname>.<structfield>self_time</structfield>. The statistics functions underlying these columns now also return - <type>float8</> milliseconds, rather than <type>bigint</> + <type>float8</type> milliseconds, rather than <type>bigint</type> microseconds. - <filename>contrib/pg_stat_statements</>' - <structfield>total_time</> column is now also measured in + <filename>contrib/pg_stat_statements</filename>' + <structfield>total_time</structfield> column is now also measured in milliseconds. </para> </listitem> @@ -9546,7 +9546,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 </para> <para> - This feature is often called <firstterm>index-only scans</>. + This feature is often called <firstterm>index-only scans</firstterm>. Heap access can be skipped for heap pages containing only tuples that are visible to all sessions, as reported by the visibility map; so the benefit applies mainly to mostly-static data. The visibility map @@ -9618,7 +9618,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Move the frequently accessed members of the <structname>PGPROC</> + Move the frequently accessed members of the <structname>PGPROC</structname> shared memory array to a separate array (Pavan Deolasee, Heikki Linnakangas, Robert Haas) </para> @@ -9663,7 +9663,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Make the number of CLOG buffers scale based on <link - linkend="guc-shared-buffers"><varname>shared_buffers</></link> + linkend="guc-shared-buffers"><varname>shared_buffers</varname></link> (Robert Haas, Simon Riggs, Tom Lane) </para> </listitem> @@ -9724,7 +9724,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> Previously, only <link - linkend="guc-wal-writer-delay"><varname>wal_writer_delay</></link> + linkend="guc-wal-writer-delay"><varname>wal_writer_delay</varname></link> triggered <acronym>WAL</acronym> flushing to disk; now filling a <acronym>WAL</acronym> buffer also triggers <acronym>WAL</acronym> writes. @@ -9763,7 +9763,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> In the past, a prepared statement always had a single - <quote>generic</> plan that was used for all parameter values, which + <quote>generic</quote> plan that was used for all parameter values, which was frequently much inferior to the plans used for non-prepared statements containing explicit constant values. Now, the planner attempts to generate custom plans for specific parameter values. @@ -9781,7 +9781,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 </para> <para> - The new <quote>parameterized path</> mechanism allows inner + The new <quote>parameterized path</quote> mechanism allows inner index scans to use values from relations that are more than one join level up from the scan. This can greatly improve performance in situations where semantic restrictions (such as outer joins) limit @@ -9796,7 +9796,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 </para> <para> - Wrappers can now provide multiple access <quote>paths</> for their + Wrappers can now provide multiple access <quote>paths</quote> for their tables, allowing more flexibility in join planning. </para> </listitem> @@ -9809,14 +9809,14 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> This check is only performed when <link - linkend="guc-constraint-exclusion"><varname>constraint_exclusion</></link> + linkend="guc-constraint-exclusion"><varname>constraint_exclusion</varname></link> is <literal>on</literal>. </para> </listitem> <listitem> <para> - Allow <literal>indexed_col op ANY(ARRAY[...])</> conditions to be + Allow <literal>indexed_col op ANY(ARRAY[...])</literal> conditions to be used in plain index scans and index-only scans (Tom Lane) </para> @@ -9827,14 +9827,14 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Support <function>MIN</>/<function>MAX</> index optimizations on + Support <function>MIN</function>/<function>MAX</function> index optimizations on <type>boolean</type> columns (Marti Raudsepp) </para> </listitem> <listitem> <para> - Account for set-returning functions in <command>SELECT</> target + Account for set-returning functions in <command>SELECT</command> target lists when setting row count estimates (Tom Lane) </para> </listitem> @@ -9882,7 +9882,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Improve statistical estimates for subqueries using - <literal>DISTINCT</> (Tom Lane) + <literal>DISTINCT</literal> (Tom Lane) </para> </listitem> @@ -9897,13 +9897,13 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Do not treat role names and <literal>samerole</> specified in <link + Do not treat role names and <literal>samerole</literal> specified in <link linkend="auth-pg-hba-conf"><filename>pg_hba.conf</filename></link> as automatically including superusers (Andrew Dunstan) </para> <para> - This makes it easier to use <literal>reject</> lines with group roles. + This makes it easier to use <literal>reject</literal> lines with group roles. </para> </listitem> @@ -9958,7 +9958,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> This logging is triggered by <link - linkend="guc-log-autovacuum-min-duration"><varname>log_autovacuum_min_duration</></link>. + linkend="guc-log-autovacuum-min-duration"><varname>log_autovacuum_min_duration</varname></link>. </para> </listitem> @@ -9977,7 +9977,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Add <link - linkend="functions-admin-backup"><function>pg_xlog_location_diff()</></link> + linkend="functions-admin-backup"><function>pg_xlog_location_diff()</function></link> to simplify WAL location comparisons (Euler Taveira de Oliveira) </para> @@ -9995,15 +9995,15 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> This allows different instances to use the event log with different identifiers, by setting the <link - linkend="guc-event-source"><varname>event_source</></link> + linkend="guc-event-source"><varname>event_source</varname></link> server parameter, which is similar to how <link - linkend="guc-syslog-ident"><varname>syslog_ident</></link> works. + linkend="guc-syslog-ident"><varname>syslog_ident</varname></link> works. </para> </listitem> <listitem> <para> - Change <quote>unexpected EOF</> messages to <literal>DEBUG1</> level, + Change <quote>unexpected EOF</quote> messages to <literal>DEBUG1</literal> level, except when there is an open transaction (Magnus Hagander) </para> @@ -10025,14 +10025,14 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Track temporary file sizes and file counts in the <link - linkend="pg-stat-database-view"><structname>pg_stat_database</></link> + linkend="pg-stat-database-view"><structname>pg_stat_database</structname></link> system view (Tomas Vondra) </para> </listitem> <listitem> <para> - Add a deadlock counter to the <structname>pg_stat_database</> + Add a deadlock counter to the <structname>pg_stat_database</structname> system view (Magnus Hagander) </para> </listitem> @@ -10040,7 +10040,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Add a server parameter <link - linkend="guc-track-io-timing"><varname>track_io_timing</></link> + linkend="guc-track-io-timing"><varname>track_io_timing</varname></link> to track I/O timings (Ants Aasma, Robert Haas) </para> </listitem> @@ -10048,7 +10048,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Report checkpoint timing information in <link - linkend="pg-stat-bgwriter-view"><structname>pg_stat_bgwriter</></link> + linkend="pg-stat-bgwriter-view"><structname>pg_stat_bgwriter</structname></link> (Greg Smith, Peter Geoghegan) </para> </listitem> @@ -10065,7 +10065,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Silently ignore nonexistent schemas specified in <link - linkend="guc-search-path"><varname>search_path</></link> (Tom Lane) + linkend="guc-search-path"><varname>search_path</varname></link> (Tom Lane) </para> <para> @@ -10077,12 +10077,12 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Allow superusers to set <link - linkend="guc-deadlock-timeout"><varname>deadlock_timeout</></link> + linkend="guc-deadlock-timeout"><varname>deadlock_timeout</varname></link> per-session, not just per-cluster (Noah Misch) </para> <para> - This allows <varname>deadlock_timeout</> to be reduced for + This allows <varname>deadlock_timeout</varname> to be reduced for transactions that are likely to be involved in a deadlock, thus detecting the failure more quickly. Alternatively, increasing the value can be used to reduce the chances of a session being chosen for @@ -10093,7 +10093,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Add a server parameter <link - linkend="guc-temp-file-limit"><varname>temp_file_limit</></link> + linkend="guc-temp-file-limit"><varname>temp_file_limit</varname></link> to constrain temporary file space usage per session (Mark Kirkwood) </para> </listitem> @@ -10114,13 +10114,13 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Add <link linkend="app-postmaster">postmaster</link> <option>-C</> + Add <link linkend="app-postmaster">postmaster</link> <option>-C</option> option to query configuration parameters (Bruce Momjian) </para> <para> - This allows <application>pg_ctl</> to better handle cases where - <envar>PGDATA</> or <option>-D</> points to a configuration-only + This allows <application>pg_ctl</application> to better handle cases where + <envar>PGDATA</envar> or <option>-D</option> points to a configuration-only directory. </para> </listitem> @@ -10128,14 +10128,14 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Replace an empty locale name with the implied value in - <command>CREATE DATABASE</> + <command>CREATE DATABASE</command> (Tom Lane) </para> <para> This prevents cases where - <structname>pg_database</>.<structfield>datcollate</> or - <structfield>datctype</> could be interpreted differently after a + <structname>pg_database</structname>.<structfield>datcollate</structfield> or + <structfield>datctype</structfield> could be interpreted differently after a server restart. </para> </listitem> @@ -10170,22 +10170,22 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Add an <literal>include_if_exists</> facility for configuration + Add an <literal>include_if_exists</literal> facility for configuration files (Greg Smith) </para> <para> - This works the same as <literal>include</>, except that an error + This works the same as <literal>include</literal>, except that an error is not thrown if the file is missing. </para> </listitem> <listitem> <para> - Identify the server time zone during <application>initdb</>, and set + Identify the server time zone during <application>initdb</application>, and set <filename>postgresql.conf</filename> entries - <link linkend="guc-timezone"><varname>timezone</></link> and - <link linkend="guc-log-timezone"><varname>log_timezone</></link> + <link linkend="guc-timezone"><varname>timezone</varname></link> and + <link linkend="guc-log-timezone"><varname>log_timezone</varname></link> accordingly (Tom Lane) </para> @@ -10197,7 +10197,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Fix <link - linkend="view-pg-settings"><structname>pg_settings</></link> to + linkend="view-pg-settings"><structname>pg_settings</structname></link> to report <filename>postgresql.conf</filename> line numbers on Windows (Tom Lane) </para> @@ -10220,7 +10220,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> Allow streaming replication slaves to forward data to other slaves (<link linkend="cascading-replication"><firstterm>cascading - replication</></link>) (Fujii Masao) + replication</firstterm></link>) (Fujii Masao) </para> <para> @@ -10232,8 +10232,8 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Add new <link - linkend="guc-synchronous-commit"><varname>synchronous_commit</></link> - mode <literal>remote_write</> (Fujii Masao, Simon Riggs) + linkend="guc-synchronous-commit"><varname>synchronous_commit</varname></link> + mode <literal>remote_write</literal> (Fujii Masao, Simon Riggs) </para> <para> @@ -10246,7 +10246,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Add a <link - linkend="app-pgreceivewal"><application>pg_receivexlog</></link> + linkend="app-pgreceivewal"><application>pg_receivexlog</application></link> tool to archive WAL file changes as they are written, rather than waiting for completed WAL files (Magnus Hagander) </para> @@ -10255,7 +10255,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Allow <link - linkend="app-pgbasebackup"><application>pg_basebackup</></link> + linkend="app-pgbasebackup"><application>pg_basebackup</application></link> to make base backups from standby servers (Jun Ishizuka, Fujii Masao) </para> @@ -10267,7 +10267,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Allow streaming of WAL files while <application>pg_basebackup</> + Allow streaming of WAL files while <application>pg_basebackup</application> is performing a backup (Magnus Hagander) </para> @@ -10306,19 +10306,19 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> This change allows better results when a row value is converted to - <type>hstore</> or <type>json</> type: the fields of the resulting + <type>hstore</type> or <type>json</type> type: the fields of the resulting value will now have the expected names. </para> </listitem> <listitem> <para> - Improve column labels used for sub-<command>SELECT</> results + Improve column labels used for sub-<command>SELECT</command> results (Marti Raudsepp) </para> <para> - Previously, the generic label <literal>?column?</> was used. + Previously, the generic label <literal>?column?</literal> was used. </para> </listitem> @@ -10348,7 +10348,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - When a row fails a <literal>CHECK</> or <literal>NOT NULL</> + When a row fails a <literal>CHECK</literal> or <literal>NOT NULL</literal> constraint, show the row's contents as error detail (Jan Kundrát) </para> @@ -10376,7 +10376,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> This change adds locking that should eliminate <quote>cache lookup - failed</> errors in many scenarios. Also, it is no longer possible + failed</quote> errors in many scenarios. Also, it is no longer possible to add relations to a schema that is being concurrently dropped, a scenario that formerly led to inconsistent system catalog contents. </para> @@ -10384,7 +10384,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Add <literal>CONCURRENTLY</> option to <link + Add <literal>CONCURRENTLY</literal> option to <link linkend="SQL-DROPINDEX"><command>DROP INDEX</command></link> (Simon Riggs) </para> @@ -10415,31 +10415,31 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Allow <link linkend="ddl-constraints"><literal>CHECK</></link> - constraints to be declared <literal>NOT VALID</> (Álvaro + Allow <link linkend="ddl-constraints"><literal>CHECK</literal></link> + constraints to be declared <literal>NOT VALID</literal> (Álvaro Herrera) </para> <para> - Adding a <literal>NOT VALID</> constraint does not cause the table to + Adding a <literal>NOT VALID</literal> constraint does not cause the table to be scanned to verify that existing rows meet the constraint. Subsequently, newly added or updated rows are checked. Such constraints are ignored by the planner when considering - <varname>constraint_exclusion</>, since it is not certain that all + <varname>constraint_exclusion</varname>, since it is not certain that all rows meet the constraint. </para> <para> - The new <command>ALTER TABLE VALIDATE</> command allows <literal>NOT - VALID</> constraints to be checked for existing rows, after which + The new <command>ALTER TABLE VALIDATE</command> command allows <literal>NOT + VALID</literal> constraints to be checked for existing rows, after which they are converted into ordinary constraints. </para> </listitem> <listitem> <para> - Allow <literal>CHECK</> constraints to be declared <literal>NO - INHERIT</> (Nikhil Sontakke, Alex Hunsaker, Álvaro Herrera) + Allow <literal>CHECK</literal> constraints to be declared <literal>NO + INHERIT</literal> (Nikhil Sontakke, Alex Hunsaker, Álvaro Herrera) </para> <para> @@ -10459,7 +10459,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 </sect4> <sect4> - <title><command>ALTER</></title> + <title><command>ALTER</command></title> <itemizedlist> @@ -10467,18 +10467,18 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> Reduce need to rebuild tables and indexes for certain <link linkend="SQL-ALTERTABLE"><command>ALTER TABLE</command></link> - ... <literal>ALTER COLUMN TYPE</> operations (Noah Misch) + ... <literal>ALTER COLUMN TYPE</literal> operations (Noah Misch) </para> <para> - Increasing the length limit for a <type>varchar</> or <type>varbit</> + Increasing the length limit for a <type>varchar</type> or <type>varbit</type> column, or removing the limit altogether, no longer requires a table rewrite. Similarly, increasing the allowable precision of a - <type>numeric</> column, or changing a column from constrained - <type>numeric</> to unconstrained <type>numeric</>, no longer + <type>numeric</type> column, or changing a column from constrained + <type>numeric</type> to unconstrained <type>numeric</type>, no longer requires a table rewrite. Table rewrites are also avoided in similar - cases involving the <type>interval</>, <type>timestamp</>, and - <type>timestamptz</> types. + cases involving the <type>interval</type>, <type>timestamp</type>, and + <type>timestamptz</type> types. </para> </listitem> @@ -10492,7 +10492,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Add <literal>IF EXISTS</> options to some <command>ALTER</command> + Add <literal>IF EXISTS</literal> options to some <command>ALTER</command> commands (Pavel Stehule) </para> @@ -10505,16 +10505,16 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Add <link linkend="SQL-ALTERFOREIGNDATAWRAPPER"><command>ALTER - FOREIGN DATA WRAPPER</command></link> ... <literal>RENAME</> + FOREIGN DATA WRAPPER</command></link> ... <literal>RENAME</literal> and <link linkend="SQL-ALTERSERVER"><command>ALTER - SERVER</command></link> ... <literal>RENAME</> (Peter Eisentraut) + SERVER</command></link> ... <literal>RENAME</literal> (Peter Eisentraut) </para> </listitem> <listitem> <para> Add <link linkend="SQL-ALTERDOMAIN"><command>ALTER - DOMAIN</command></link> ... <literal>RENAME</> (Peter Eisentraut) + DOMAIN</command></link> ... <literal>RENAME</literal> (Peter Eisentraut) </para> <para> @@ -10526,11 +10526,11 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Throw an error for <command>ALTER DOMAIN</command> ... <literal>DROP - CONSTRAINT</> on a nonexistent constraint (Peter Eisentraut) + CONSTRAINT</literal> on a nonexistent constraint (Peter Eisentraut) </para> <para> - An <literal>IF EXISTS</> option has been added to provide the + An <literal>IF EXISTS</literal> option has been added to provide the previous behavior. </para> </listitem> @@ -10540,7 +10540,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 </sect4> <sect4> - <title><link linkend="SQL-CREATETABLE"><command>CREATE TABLE</></link></title> + <title><link linkend="SQL-CREATETABLE"><command>CREATE TABLE</command></link></title> <itemizedlist> @@ -10565,8 +10565,8 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Fix <command>CREATE TABLE</command> ... <literal>AS EXECUTE</> - to handle <literal>WITH NO DATA</> and column name specifications + Fix <command>CREATE TABLE</command> ... <literal>AS EXECUTE</literal> + to handle <literal>WITH NO DATA</literal> and column name specifications (Tom Lane) </para> </listitem> @@ -10583,14 +10583,14 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Add a <link - linkend="SQL-CREATEVIEW"><literal>security_barrier</></link> + linkend="SQL-CREATEVIEW"><literal>security_barrier</literal></link> option for views (KaiGai Kohei, Robert Haas) </para> <para> This option prevents optimizations that might allow view-protected data to be exposed to users, for example pushing a clause involving - an insecure function into the <literal>WHERE</> clause of the view. + an insecure function into the <literal>WHERE</literal> clause of the view. Such views can be expected to perform more poorly than ordinary views. </para> @@ -10599,9 +10599,9 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Add a new <link - linkend="SQL-CREATEFUNCTION"><literal>LEAKPROOF</></link> function + linkend="SQL-CREATEFUNCTION"><literal>LEAKPROOF</literal></link> function attribute to mark functions that can safely be pushed down - into <literal>security_barrier</> views (KaiGai Kohei) + into <literal>security_barrier</literal> views (KaiGai Kohei) </para> </listitem> @@ -10611,8 +10611,8 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 </para> <para> - This adds support for the <acronym>SQL</>-conforming - <literal>USAGE</> privilege on types and domains. The intent is + This adds support for the <acronym>SQL</acronym>-conforming + <literal>USAGE</literal> privilege on types and domains. The intent is to be able to restrict which users can create dependencies on types, since such dependencies limit the owner's ability to alter the type. </para> @@ -10628,7 +10628,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 Because the object is being created by <command>SELECT INTO</command> or <command>CREATE TABLE AS</command>, the creator would ordinarily have insert permissions; but there are corner cases where this is not - true, such as when <literal>ALTER DEFAULT PRIVILEGES</> has removed + true, such as when <literal>ALTER DEFAULT PRIVILEGES</literal> has removed such permissions. </para> </listitem> @@ -10646,20 +10646,20 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Allow <link linkend="SQL-VACUUM"><command>VACUUM</></link> to more + Allow <link linkend="SQL-VACUUM"><command>VACUUM</command></link> to more easily skip pages that cannot be locked (Simon Riggs, Robert Haas) </para> <para> - This change should greatly reduce the incidence of <command>VACUUM</> - getting <quote>stuck</> waiting for other sessions. + This change should greatly reduce the incidence of <command>VACUUM</command> + getting <quote>stuck</quote> waiting for other sessions. </para> </listitem> <listitem> <para> - Make <link linkend="SQL-EXPLAIN"><command>EXPLAIN</></link> - <literal>(BUFFERS)</> count blocks dirtied and written (Robert Haas) + Make <link linkend="SQL-EXPLAIN"><command>EXPLAIN</command></link> + <literal>(BUFFERS)</literal> count blocks dirtied and written (Robert Haas) </para> </listitem> @@ -10677,8 +10677,8 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 </para> <para> - This is accomplished by setting the new <literal>TIMING</> option to - <literal>FALSE</>. + This is accomplished by setting the new <literal>TIMING</literal> option to + <literal>FALSE</literal>. </para> </listitem> @@ -10719,41 +10719,41 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Add <link - linkend="functions-json"><function>array_to_json()</></link> - and <function>row_to_json()</> (Andrew Dunstan) + linkend="functions-json"><function>array_to_json()</function></link> + and <function>row_to_json()</function> (Andrew Dunstan) </para> </listitem> <listitem> <para> - Add a <link linkend="datatype-serial"><type>SMALLSERIAL</></link> + Add a <link linkend="datatype-serial"><type>SMALLSERIAL</type></link> data type (Mike Pultz) </para> <para> - This is like <type>SERIAL</>, except it stores the sequence in - a two-byte integer column (<type>int2</>). + This is like <type>SERIAL</type>, except it stores the sequence in + a two-byte integer column (<type>int2</type>). </para> </listitem> <listitem> <para> Allow <link linkend="SQL-CREATEDOMAIN">domains</link> to be - declared <literal>NOT VALID</> (Álvaro Herrera) + declared <literal>NOT VALID</literal> (Álvaro Herrera) </para> <para> This option can be set at domain creation time, or via <command>ALTER - DOMAIN</command> ... <literal>ADD CONSTRAINT</> ... <literal>NOT - VALID</>. <command>ALTER DOMAIN</command> ... <literal>VALIDATE - CONSTRAINT</> fully validates the constraint. + DOMAIN</command> ... <literal>ADD CONSTRAINT</literal> ... <literal>NOT + VALID</literal>. <command>ALTER DOMAIN</command> ... <literal>VALIDATE + CONSTRAINT</literal> fully validates the constraint. </para> </listitem> <listitem> <para> Support more locale-specific formatting options for the <link - linkend="datatype-money"><type>money</></link> data type (Tom Lane) + linkend="datatype-money"><type>money</type></link> data type (Tom Lane) </para> <para> @@ -10766,22 +10766,22 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Add bitwise <quote>and</>, <quote>or</>, and <quote>not</> - operators for the <type>macaddr</> data type (Brendan Jurd) + Add bitwise <quote>and</quote>, <quote>or</quote>, and <quote>not</quote> + operators for the <type>macaddr</type> data type (Brendan Jurd) </para> </listitem> <listitem> <para> Allow <link - linkend="functions-xml-processing"><function>xpath()</></link> to + linkend="functions-xml-processing"><function>xpath()</function></link> to return a single-element <acronym>XML</acronym> array when supplied a scalar value (Florian Pflug) </para> <para> Previously, it returned an empty array. This change will also - cause <function>xpath_exists()</> to return true, not false, + cause <function>xpath_exists()</function> to return true, not false, for such expressions. </para> </listitem> @@ -10805,9 +10805,9 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Allow non-superusers to use <link - linkend="functions-admin-signal"><function>pg_cancel_backend()</></link> + linkend="functions-admin-signal"><function>pg_cancel_backend()</function></link> and <link - linkend="functions-admin-signal"><function>pg_terminate_backend()</></link> + linkend="functions-admin-signal"><function>pg_terminate_backend()</function></link> on other sessions belonging to the same user (Magnus Hagander, Josh Kupershmidt, Dan Farina) </para> @@ -10827,7 +10827,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 This allows multiple transactions to share identical views of the database state. Snapshots are exported via <link - linkend="functions-snapshot-synchronization"><function>pg_export_snapshot()</></link> + linkend="functions-snapshot-synchronization"><function>pg_export_snapshot()</function></link> and imported via <link linkend="SQL-SET-TRANSACTION"><command>SET TRANSACTION SNAPSHOT</command></link>. Only snapshots from currently-running transactions can be imported. @@ -10838,7 +10838,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> Support <link linkend="functions-info-catalog-table"><literal>COLLATION - FOR</></link> on expressions (Peter Eisentraut) + FOR</literal></link> on expressions (Peter Eisentraut) </para> <para> @@ -10849,23 +10849,23 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Add <link - linkend="functions-info-schema-table"><function>pg_opfamily_is_visible()</></link> + linkend="functions-info-schema-table"><function>pg_opfamily_is_visible()</function></link> (Josh Kupershmidt) </para> </listitem> <listitem> <para> - Add a <type>numeric</> variant of <link - linkend="functions-admin-dbsize"><function>pg_size_pretty()</></link> - for use with <function>pg_xlog_location_diff()</> (Fujii Masao) + Add a <type>numeric</type> variant of <link + linkend="functions-admin-dbsize"><function>pg_size_pretty()</function></link> + for use with <function>pg_xlog_location_diff()</function> (Fujii Masao) </para> </listitem> <listitem> <para> Add a <link - linkend="functions-info-session-table"><function>pg_trigger_depth()</></link> + linkend="functions-info-session-table"><function>pg_trigger_depth()</function></link> function (Kevin Grittner) </para> @@ -10877,8 +10877,8 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Allow <link - linkend="functions-aggregate-table"><function>string_agg()</></link> - to process <type>bytea</> values (Pavel Stehule) + linkend="functions-aggregate-table"><function>string_agg()</function></link> + to process <type>bytea</type> values (Pavel Stehule) </para> </listitem> @@ -10889,7 +10889,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 </para> <para> - For example, <literal>^(\w+)( \1)+$</>. Previous releases did not + For example, <literal>^(\w+)( \1)+$</literal>. Previous releases did not check that the back-reference actually matched the first occurrence. </para> </listitem> @@ -10906,22 +10906,22 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Add information schema views - <structname>role_udt_grants</>, <structname>udt_privileges</>, - and <structname>user_defined_types</> (Peter Eisentraut) + <structname>role_udt_grants</structname>, <structname>udt_privileges</structname>, + and <structname>user_defined_types</structname> (Peter Eisentraut) </para> </listitem> <listitem> <para> Add composite-type attributes to the - information schema <structname>element_types</> view + information schema <structname>element_types</structname> view (Peter Eisentraut) </para> </listitem> <listitem> <para> - Implement <structfield>interval_type</> columns in the information + Implement <structfield>interval_type</structfield> columns in the information schema (Peter Eisentraut) </para> @@ -10933,23 +10933,23 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Implement collation-related columns in the information schema - <structname>attributes</>, <structname>columns</>, - <structname>domains</>, and <structname>element_types</> + <structname>attributes</structname>, <structname>columns</structname>, + <structname>domains</structname>, and <structname>element_types</structname> views (Peter Eisentraut) </para> </listitem> <listitem> <para> - Implement the <structfield>with_hierarchy</> column in the - information schema <structname>table_privileges</> view (Peter + Implement the <structfield>with_hierarchy</structfield> column in the + information schema <structname>table_privileges</structname> view (Peter Eisentraut) </para> </listitem> <listitem> <para> - Add display of sequence <literal>USAGE</> privileges to information + Add display of sequence <literal>USAGE</literal> privileges to information schema (Peter Eisentraut) </para> </listitem> @@ -10980,7 +10980,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Allow the PL/pgSQL <command>OPEN</> cursor command to supply + Allow the PL/pgSQL <command>OPEN</command> cursor command to supply parameters by name (Yeb Havinga) </para> </listitem> @@ -11002,7 +11002,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Improve performance and memory consumption for long chains of - <literal>ELSIF</> clauses (Tom Lane) + <literal>ELSIF</literal> clauses (Tom Lane) </para> </listitem> @@ -11083,31 +11083,31 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Add <link linkend="APP-INITDB"><application>initdb</></link> - options <option>--auth-local</> and <option>--auth-host</> + Add <link linkend="APP-INITDB"><application>initdb</application></link> + options <option>--auth-local</option> and <option>--auth-host</option> (Peter Eisentraut) </para> <para> - This allows separate control of <literal>local</> and - <literal>host</> <filename>pg_hba.conf</filename> authentication - settings. <option>--auth</> still controls both. + This allows separate control of <literal>local</literal> and + <literal>host</literal> <filename>pg_hba.conf</filename> authentication + settings. <option>--auth</option> still controls both. </para> </listitem> <listitem> <para> - Add <option>--replication</>/<option>--no-replication</> flags to - <link linkend="APP-CREATEUSER"><application>createuser</></link> + Add <option>--replication</option>/<option>--no-replication</option> flags to + <link linkend="APP-CREATEUSER"><application>createuser</application></link> to control replication permission (Fujii Masao) </para> </listitem> <listitem> <para> - Add the <option>--if-exists</> option to <link - linkend="APP-DROPDB"><application>dropdb</></link> and <link - linkend="APP-DROPUSER"><application>dropuser</></link> (Josh + Add the <option>--if-exists</option> option to <link + linkend="APP-DROPDB"><application>dropdb</application></link> and <link + linkend="APP-DROPUSER"><application>dropuser</application></link> (Josh Kupershmidt) </para> </listitem> @@ -11115,15 +11115,15 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Give command-line tools the ability to specify the name of the - database to connect to, and fall back to <literal>template1</> - if a <literal>postgres</> database connection fails (Robert Haas) + database to connect to, and fall back to <literal>template1</literal> + if a <literal>postgres</literal> database connection fails (Robert Haas) </para> </listitem> </itemizedlist> <sect4> - <title><link linkend="APP-PSQL"><application>psql</></link></title> + <title><link linkend="APP-PSQL"><application>psql</application></link></title> <itemizedlist> @@ -11134,7 +11134,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 </para> <para> - This adds the <literal>auto</> option to the <command>\x</> + This adds the <literal>auto</literal> option to the <command>\x</command> command, which switches to the expanded mode when the normal output would be wider than the screen. </para> @@ -11147,32 +11147,32 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 </para> <para> - This is done with a new command <command>\ir</>. + This is done with a new command <command>\ir</command>. </para> </listitem> <listitem> <para> Add support for non-<acronym>ASCII</acronym> characters in - <application>psql</> variable names (Tom Lane) + <application>psql</application> variable names (Tom Lane) </para> </listitem> <listitem> <para> - Add support for major-version-specific <filename>.psqlrc</> files + Add support for major-version-specific <filename>.psqlrc</filename> files (Bruce Momjian) </para> <para> - <application>psql</> already supported minor-version-specific - <filename>.psqlrc</> files. + <application>psql</application> already supported minor-version-specific + <filename>.psqlrc</filename> files. </para> </listitem> <listitem> <para> - Provide environment variable overrides for <application>psql</> + Provide environment variable overrides for <application>psql</application> history and startup file locations (Andrew Dunstan) </para> @@ -11184,15 +11184,15 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Add a <command>\setenv</> command to modify + Add a <command>\setenv</command> command to modify the environment variables passed to child processes (Andrew Dunstan) </para> </listitem> <listitem> <para> - Name <application>psql</>'s temporary editor files with a - <filename>.sql</> extension (Peter Eisentraut) + Name <application>psql</application>'s temporary editor files with a + <filename>.sql</filename> extension (Peter Eisentraut) </para> <para> @@ -11202,19 +11202,19 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Allow <application>psql</> to use zero-byte field and record + Allow <application>psql</application> to use zero-byte field and record separators (Peter Eisentraut) </para> <para> Various shell tools use zero-byte (NUL) separators, - e.g. <application>find</>. + e.g. <application>find</application>. </para> </listitem> <listitem> <para> - Make the <command>\timing</> option report times for + Make the <command>\timing</command> option report times for failed queries (Magnus Hagander) </para> @@ -11225,13 +11225,13 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Unify and tighten <application>psql</>'s treatment of <command>\copy</> - and SQL <command>COPY</> (Noah Misch) + Unify and tighten <application>psql</application>'s treatment of <command>\copy</command> + and SQL <command>COPY</command> (Noah Misch) </para> <para> This fix makes failure behavior more predictable and honors - <command>\set ON_ERROR_ROLLBACK</>. + <command>\set ON_ERROR_ROLLBACK</command>. </para> </listitem> @@ -11245,21 +11245,21 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <itemizedlist> <listitem> <para> - Make <command>\d</> on a sequence show the + Make <command>\d</command> on a sequence show the table/column name owning it (Magnus Hagander) </para> </listitem> <listitem> <para> - Show statistics target for columns in <command>\d+</> (Magnus + Show statistics target for columns in <command>\d+</command> (Magnus Hagander) </para> </listitem> <listitem> <para> - Show role password expiration dates in <command>\du</> + Show role password expiration dates in <command>\du</command> (Fabrízio de Royes Mello) </para> </listitem> @@ -11271,8 +11271,8 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 </para> <para> - These are included in the output of <command>\dC+</>, - <command>\dc+</>, <command>\dD+</>, and <command>\dL</> respectively. + These are included in the output of <command>\dC+</command>, + <command>\dc+</command>, <command>\dD+</command>, and <command>\dL</command> respectively. </para> </listitem> @@ -11283,15 +11283,15 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 </para> <para> - These are included in the output of <command>\des+</>, - <command>\det+</>, and <command>\dew+</> for foreign servers, foreign + These are included in the output of <command>\des+</command>, + <command>\det+</command>, and <command>\dew+</command> for foreign servers, foreign tables, and foreign data wrappers respectively. </para> </listitem> <listitem> <para> - Change <command>\dd</> to display comments only for object types + Change <command>\dd</command> to display comments only for object types without their own backslash command (Josh Kupershmidt) </para> </listitem> @@ -11307,9 +11307,9 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - In <application>psql</> tab completion, complete <acronym>SQL</> + In <application>psql</application> tab completion, complete <acronym>SQL</acronym> keywords in either upper or lower case according to the new <link - linkend="APP-PSQL-variables"><literal>COMP_KEYWORD_CASE</></link> + linkend="APP-PSQL-variables"><literal>COMP_KEYWORD_CASE</literal></link> setting (Peter Eisentraut) </para> </listitem> @@ -11348,14 +11348,14 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 </sect4> <sect4> - <title><link linkend="APP-PGDUMP"><application>pg_dump</></link></title> + <title><link linkend="APP-PGDUMP"><application>pg_dump</application></link></title> <itemizedlist> <listitem> <para> - Add an <option>--exclude-table-data</> option to - <application>pg_dump</> (Andrew Dunstan) + Add an <option>--exclude-table-data</option> option to + <application>pg_dump</application> (Andrew Dunstan) </para> <para> @@ -11366,13 +11366,13 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Add a <option>--section</> option to <application>pg_dump</> - and <application>pg_restore</> (Andrew Dunstan) + Add a <option>--section</option> option to <application>pg_dump</application> + and <application>pg_restore</application> (Andrew Dunstan) </para> <para> - Valid values are <literal>pre-data</>, <literal>data</>, - and <literal>post-data</>. The option can be + Valid values are <literal>pre-data</literal>, <literal>data</literal>, + and <literal>post-data</literal>. The option can be given more than once to select two or more sections. </para> </listitem> @@ -11380,7 +11380,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Make <link - linkend="APP-PG-DUMPALL"><application>pg_dumpall</></link> dump all + linkend="APP-PG-DUMPALL"><application>pg_dumpall</application></link> dump all roles first, then all configuration settings on roles (Phil Sorber) </para> @@ -11392,8 +11392,8 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Allow <application>pg_dumpall</> to avoid errors if the - <literal>postgres</> database is missing in the new cluster + Allow <application>pg_dumpall</application> to avoid errors if the + <literal>postgres</literal> database is missing in the new cluster (Robert Haas) </para> </listitem> @@ -11418,13 +11418,13 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Tighten rules for when extension configuration tables are dumped - by <application>pg_dump</> (Tom Lane) + by <application>pg_dump</application> (Tom Lane) </para> </listitem> <listitem> <para> - Make <application>pg_dump</> emit more useful dependency + Make <application>pg_dump</application> emit more useful dependency information (Tom Lane) </para> @@ -11438,7 +11438,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Improve <application>pg_dump</>'s performance when dumping many + Improve <application>pg_dump</application>'s performance when dumping many database objects (Tom Lane) </para> </listitem> @@ -11450,19 +11450,19 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 </sect3> <sect3> - <title><link linkend="libpq"><application>libpq</></link></title> + <title><link linkend="libpq"><application>libpq</application></link></title> <itemizedlist> <listitem> <para> - Allow <application>libpq</> connection strings to have the format of a + Allow <application>libpq</application> connection strings to have the format of a <link linkend="libpq-connstring"><acronym>URI</acronym></link> (Alexander Shulgin) </para> <para> - The syntax begins with <literal>postgres://</>. This can allow + The syntax begins with <literal>postgres://</literal>. This can allow applications to avoid implementing their own parser for URIs representing database connections. </para> @@ -11489,30 +11489,30 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 </para> <para> - Previously, <application>libpq</> always collected the entire query + Previously, <application>libpq</application> always collected the entire query result in memory before passing it back to the application. </para> </listitem> <listitem> <para> - Add <literal>const</> qualifiers to the declarations of the functions - <function>PQconnectdbParams</>, <function>PQconnectStartParams</>, - and <function>PQpingParams</> (Lionel Elie Mamane) + Add <literal>const</literal> qualifiers to the declarations of the functions + <function>PQconnectdbParams</function>, <function>PQconnectStartParams</function>, + and <function>PQpingParams</function> (Lionel Elie Mamane) </para> </listitem> <listitem> <para> - Allow the <filename>.pgpass</> file to include escaped characters + Allow the <filename>.pgpass</filename> file to include escaped characters in the password field (Robert Haas) </para> </listitem> <listitem> <para> - Make library functions use <function>abort()</> instead of - <function>exit()</> when it is necessary to terminate the process + Make library functions use <function>abort()</function> instead of + <function>exit()</function> when it is necessary to terminate the process (Peter Eisentraut) </para> @@ -11557,7 +11557,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Install <filename>plpgsql.h</> into <filename>include/server</> during installation + Install <filename>plpgsql.h</filename> into <filename>include/server</filename> during installation (Heikki Linnakangas) </para> </listitem> @@ -11583,14 +11583,14 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Improve the concurrent transaction regression tests - (<application>isolationtester</>) (Noah Misch) + (<application>isolationtester</application>) (Noah Misch) </para> </listitem> <listitem> <para> - Modify <application>thread_test</> to create its test files in - the current directory, rather than <filename>/tmp</> (Bruce Momjian) + Modify <application>thread_test</application> to create its test files in + the current directory, rather than <filename>/tmp</filename> (Bruce Momjian) </para> </listitem> @@ -11639,7 +11639,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Add a <application>pg_upgrade</> test suite (Peter Eisentraut) + Add a <application>pg_upgrade</application> test suite (Peter Eisentraut) </para> </listitem> @@ -11659,14 +11659,14 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Add options to <application>git_changelog</> for use in major + Add options to <application>git_changelog</application> for use in major release note creation (Bruce Momjian) </para> </listitem> <listitem> <para> - Support Linux's <filename>/proc/self/oom_score_adj</> API (Tom Lane) + Support Linux's <filename>/proc/self/oom_score_adj</filename> API (Tom Lane) </para> </listitem> @@ -11688,13 +11688,13 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <para> This improvement does not apply to - <function>dblink_send_query()</>/<function>dblink_get_result()</>. + <function>dblink_send_query()</function>/<function>dblink_get_result()</function>. </para> </listitem> <listitem> <para> - Support <literal>force_not_null</> option in <link + Support <literal>force_not_null</literal> option in <link linkend="file-fdw">file_fdw</link> (Shigeru Hanada) </para> </listitem> @@ -11702,7 +11702,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Implement dry-run mode for <link - linkend="pgarchivecleanup"><application>pg_archivecleanup</></link> + linkend="pgarchivecleanup"><application>pg_archivecleanup</application></link> (Gabriele Bartolini) </para> @@ -11714,29 +11714,29 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Add new <link linkend="pgbench">pgbench</link> switches - <option>--unlogged-tables</>, <option>--tablespace</>, and - <option>--index-tablespace</> (Robert Haas) + <option>--unlogged-tables</option>, <option>--tablespace</option>, and + <option>--index-tablespace</option> (Robert Haas) </para> </listitem> <listitem> <para> Change <link - linkend="pgtestfsync"><application>pg_test_fsync</></link> to test + linkend="pgtestfsync"><application>pg_test_fsync</application></link> to test for a fixed amount of time, rather than a fixed number of cycles (Bruce Momjian) </para> <para> - The <option>-o</>/cycles option was removed, and - <option>-s</>/seconds added. + The <option>-o</option>/cycles option was removed, and + <option>-s</option>/seconds added. </para> </listitem> <listitem> <para> Add a <link - linkend="pgtesttiming"><application>pg_test_timing</></link> + linkend="pgtesttiming"><application>pg_test_timing</application></link> utility to measure clock monotonicity and timing overhead (Ants Aasma, Greg Smith) </para> @@ -11753,19 +11753,19 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 </itemizedlist> <sect4> - <title><link linkend="pgupgrade"><application>pg_upgrade</></link></title> + <title><link linkend="pgupgrade"><application>pg_upgrade</application></link></title> <itemizedlist> <listitem> <para> - Adjust <application>pg_upgrade</> environment variables (Bruce + Adjust <application>pg_upgrade</application> environment variables (Bruce Momjian) </para> <para> Rename data, bin, and port environment - variables to begin with <literal>PG</>, and support + variables to begin with <literal>PG</literal>, and support <envar>PGPORTOLD</envar>/<envar>PGPORTNEW</envar>, to replace <envar>PGPORT</envar>. </para> @@ -11773,22 +11773,22 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Overhaul <application>pg_upgrade</> logging and failure reporting + Overhaul <application>pg_upgrade</application> logging and failure reporting (Bruce Momjian) </para> <para> Create four append-only log files, and delete them on success. - Add <option>-r</>/<option>--retain</> option to unconditionally - retain these files. Also remove <application>pg_upgrade</> options - <option>-g</>/<option>-G</>/<option>-l</> options as unnecessary, + Add <option>-r</option>/<option>--retain</option> option to unconditionally + retain these files. Also remove <application>pg_upgrade</application> options + <option>-g</option>/<option>-G</option>/<option>-l</option> options as unnecessary, and tighten log file permissions. </para> </listitem> <listitem> <para> - Make <application>pg_upgrade</> create a script to incrementally + Make <application>pg_upgrade</application> create a script to incrementally generate more accurate optimizer statistics (Bruce Momjian) </para> @@ -11800,14 +11800,14 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Allow <application>pg_upgrade</> to upgrade an old cluster that - does not have a <literal>postgres</> database (Bruce Momjian) + Allow <application>pg_upgrade</application> to upgrade an old cluster that + does not have a <literal>postgres</literal> database (Bruce Momjian) </para> </listitem> <listitem> <para> - Allow <application>pg_upgrade</> to handle cases where some + Allow <application>pg_upgrade</application> to handle cases where some old or new databases are missing, as long as they are empty (Bruce Momjian) </para> @@ -11815,14 +11815,14 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Allow <application>pg_upgrade</> to handle configuration-only + Allow <application>pg_upgrade</application> to handle configuration-only directory installations (Bruce Momjian) </para> </listitem> <listitem> <para> - In <application>pg_upgrade</>, add <option>-o</>/<option>-O</> + In <application>pg_upgrade</application>, add <option>-o</option>/<option>-O</option> options to pass parameters to the servers (Bruce Momjian) </para> @@ -11833,7 +11833,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Change <application>pg_upgrade</> to use port 50432 by default + Change <application>pg_upgrade</application> to use port 50432 by default (Bruce Momjian) </para> @@ -11844,7 +11844,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Reduce cluster locking in <application>pg_upgrade</> (Bruce + Reduce cluster locking in <application>pg_upgrade</application> (Bruce Momjian) </para> @@ -11859,13 +11859,13 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 </sect4> <sect4> - <title><link linkend="pgstatstatements"><application>pg_stat_statements</></link></title> + <title><link linkend="pgstatstatements"><application>pg_stat_statements</application></link></title> <itemizedlist> <listitem> <para> - Allow <application>pg_stat_statements</> to aggregate similar + Allow <application>pg_stat_statements</application> to aggregate similar queries via SQL text normalization (Peter Geoghegan, Tom Lane) </para> @@ -11878,13 +11878,13 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Add dirtied and written block counts and read/write times to - <application>pg_stat_statements</> (Robert Haas, Ants Aasma) + <application>pg_stat_statements</application> (Robert Haas, Ants Aasma) </para> </listitem> <listitem> <para> - Prevent <application>pg_stat_statements</> from double-counting + Prevent <application>pg_stat_statements</application> from double-counting <command>PREPARE</command> and <command>EXECUTE</command> commands (Tom Lane) </para> @@ -11900,7 +11900,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <itemizedlist> <listitem> <para> - Support <literal>SECURITY LABEL</> on global objects (KaiGai + Support <literal>SECURITY LABEL</literal> on global objects (KaiGai Kohei, Robert Haas) </para> @@ -11925,7 +11925,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Add <function>sepgsql_setcon()</> and related functions to control + Add <function>sepgsql_setcon()</function> and related functions to control the sepgsql security domain (KaiGai Kohei) </para> </listitem> @@ -11954,7 +11954,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 </para> <para> - Use <command>gmake STYLE=website draft</>. + Use <command>gmake STYLE=website draft</command>. </para> </listitem> @@ -11967,7 +11967,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> Document that user/database names are preserved with double-quoting - by command-line tools like <application>vacuumdb</> (Bruce + by command-line tools like <application>vacuumdb</application> (Bruce Momjian) </para> </listitem> @@ -11981,12 +11981,12 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100 <listitem> <para> - Deprecate use of <literal>GLOBAL</> and <literal>LOCAL</> in - <command>CREATE TEMP TABLE</> (Noah Misch) + Deprecate use of <literal>GLOBAL</literal> and <literal>LOCAL</literal> in + <command>CREATE TEMP TABLE</command> (Noah Misch) </para> <para> - <productname>PostgreSQL</> has long treated these keyword as no-ops, + <productname>PostgreSQL</productname> has long treated these keyword as no-ops, and continues to do so; but in future they might mean what the SQL standard says they mean, so applications should avoid using them. </para> diff --git a/doc/src/sgml/release-9.3.sgml b/doc/src/sgml/release-9.3.sgml index 91fbb343999..dada2550575 100644 --- a/doc/src/sgml/release-9.3.sgml +++ b/doc/src/sgml/release-9.3.sgml @@ -37,20 +37,20 @@ <listitem> <para> Show foreign tables - in <structname>information_schema</>.<structname>table_privileges</> + in <structname>information_schema</structname>.<structname>table_privileges</structname> view (Peter Eisentraut) </para> <para> - All other relevant <structname>information_schema</> views include + All other relevant <structname>information_schema</structname> views include foreign tables, but this one ignored them. </para> <para> - Since this view definition is installed by <application>initdb</>, + Since this view definition is installed by <application>initdb</application>, merely upgrading will not fix the problem. If you need to fix this in an existing installation, you can, as a superuser, do this - in <application>psql</>: + in <application>psql</application>: <programlisting> SET search_path TO information_schema; CREATE OR REPLACE VIEW table_privileges AS @@ -89,21 +89,21 @@ CREATE OR REPLACE VIEW table_privileges AS OR grantee.rolname = 'PUBLIC'); </programlisting> This must be repeated in each database to be fixed, - including <literal>template0</>. + including <literal>template0</literal>. </para> </listitem> <listitem> <para> Clean up handling of a fatal exit (e.g., due to receipt - of <systemitem>SIGTERM</>) that occurs while trying to execute - a <command>ROLLBACK</> of a failed transaction (Tom Lane) + of <systemitem>SIGTERM</systemitem>) that occurs while trying to execute + a <command>ROLLBACK</command> of a failed transaction (Tom Lane) </para> <para> This situation could result in an assertion failure. In production builds, the exit would still occur, but it would log an unexpected - message about <quote>cannot drop active portal</>. + message about <quote>cannot drop active portal</quote>. </para> </listitem> @@ -120,7 +120,7 @@ CREATE OR REPLACE VIEW table_privileges AS </para> <para> - Certain <command>ALTER</> commands that change the definition of a + Certain <command>ALTER</command> commands that change the definition of a composite type or domain type are supposed to fail if there are any stored values of that type in the database, because they lack the infrastructure needed to update or check such values. Previously, @@ -132,7 +132,7 @@ CREATE OR REPLACE VIEW table_privileges AS <listitem> <para> - Fix crash in <application>pg_restore</> when using parallel mode and + Fix crash in <application>pg_restore</application> when using parallel mode and using a list file to select a subset of items to restore (Fabrízio de Royes Mello) </para> @@ -140,13 +140,13 @@ CREATE OR REPLACE VIEW table_privileges AS <listitem> <para> - Change <application>ecpg</>'s parser to allow <literal>RETURNING</> + Change <application>ecpg</application>'s parser to allow <literal>RETURNING</literal> clauses without attached C variables (Michael Meskes) </para> <para> - This allows <application>ecpg</> programs to contain SQL constructs - that use <literal>RETURNING</> internally (for example, inside a CTE) + This allows <application>ecpg</application> programs to contain SQL constructs + that use <literal>RETURNING</literal> internally (for example, inside a CTE) rather than using it to define values to be returned to the client. </para> </listitem> @@ -158,12 +158,12 @@ CREATE OR REPLACE VIEW table_privileges AS <para> This fix avoids possible crashes of PL/Perl due to inconsistent - assumptions about the width of <type>time_t</> values. + assumptions about the width of <type>time_t</type> values. A side-effect that may be visible to extension developers is - that <literal>_USE_32BIT_TIME_T</> is no longer defined globally - in <productname>PostgreSQL</> Windows builds. This is not expected - to cause problems, because type <type>time_t</> is not used - in any <productname>PostgreSQL</> API definitions. + that <literal>_USE_32BIT_TIME_T</literal> is no longer defined globally + in <productname>PostgreSQL</productname> Windows builds. This is not expected + to cause problems, because type <type>time_t</type> is not used + in any <productname>PostgreSQL</productname> API definitions. </para> </listitem> @@ -213,7 +213,7 @@ CREATE OR REPLACE VIEW table_privileges AS <listitem> <para> Further restrict visibility - of <structname>pg_user_mappings</>.<structfield>umoptions</>, to + of <structname>pg_user_mappings</structname>.<structfield>umoptions</structfield>, to protect passwords stored as user mapping options (Noah Misch) </para> @@ -221,11 +221,11 @@ CREATE OR REPLACE VIEW table_privileges AS <para> The fix for CVE-2017-7486 was incorrect: it allowed a user to see the options in her own user mapping, even if she did not - have <literal>USAGE</> permission on the associated foreign server. + have <literal>USAGE</literal> permission on the associated foreign server. Such options might include a password that had been provided by the server owner rather than the user herself. - Since <structname>information_schema.user_mapping_options</> does not - show the options in such cases, <structname>pg_user_mappings</> + Since <structname>information_schema.user_mapping_options</structname> does not + show the options in such cases, <structname>pg_user_mappings</structname> should not either. (CVE-2017-7547) </para> @@ -240,15 +240,15 @@ CREATE OR REPLACE VIEW table_privileges AS <step> <para> Restart the postmaster after adding <literal>allow_system_table_mods - = true</> to <filename>postgresql.conf</>. (In versions - supporting <command>ALTER SYSTEM</>, you can use that to make the + = true</literal> to <filename>postgresql.conf</filename>. (In versions + supporting <command>ALTER SYSTEM</command>, you can use that to make the configuration change, but you'll still need a restart.) </para> </step> <step> <para> - In <emphasis>each</> database of the cluster, + In <emphasis>each</emphasis> database of the cluster, run the following commands as superuser: <programlisting> SET search_path = pg_catalog; @@ -279,15 +279,15 @@ CREATE OR REPLACE VIEW pg_user_mappings AS <step> <para> - Do not forget to include the <literal>template0</> - and <literal>template1</> databases, or the vulnerability will still - exist in databases you create later. To fix <literal>template0</>, + Do not forget to include the <literal>template0</literal> + and <literal>template1</literal> databases, or the vulnerability will still + exist in databases you create later. To fix <literal>template0</literal>, you'll need to temporarily make it accept connections. - In <productname>PostgreSQL</> 9.5 and later, you can use + In <productname>PostgreSQL</productname> 9.5 and later, you can use <programlisting> ALTER DATABASE template0 WITH ALLOW_CONNECTIONS true; </programlisting> - and then after fixing <literal>template0</>, undo that with + and then after fixing <literal>template0</literal>, undo that with <programlisting> ALTER DATABASE template0 WITH ALLOW_CONNECTIONS false; </programlisting> @@ -301,7 +301,7 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <step> <para> - Finally, remove the <literal>allow_system_table_mods</> configuration + Finally, remove the <literal>allow_system_table_mods</literal> configuration setting, and again restart the postmaster. </para> </step> @@ -315,16 +315,16 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; </para> <para> - <application>libpq</> ignores empty password specifications, and does + <application>libpq</application> ignores empty password specifications, and does not transmit them to the server. So, if a user's password has been set to the empty string, it's impossible to log in with that password - via <application>psql</> or other <application>libpq</>-based + via <application>psql</application> or other <application>libpq</application>-based clients. An administrator might therefore believe that setting the password to empty is equivalent to disabling password login. - However, with a modified or non-<application>libpq</>-based client, + However, with a modified or non-<application>libpq</application>-based client, logging in could be possible, depending on which authentication method is configured. In particular the most common - method, <literal>md5</>, accepted empty passwords. + method, <literal>md5</literal>, accepted empty passwords. Change the server to reject empty passwords in all cases. (CVE-2017-7546) </para> @@ -424,28 +424,28 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> Fix possible creation of an invalid WAL segment when a standby is - promoted just after it processes an <literal>XLOG_SWITCH</> WAL + promoted just after it processes an <literal>XLOG_SWITCH</literal> WAL record (Andres Freund) </para> </listitem> <listitem> <para> - Fix <systemitem>SIGHUP</> and <systemitem>SIGUSR1</> handling in + Fix <systemitem>SIGHUP</systemitem> and <systemitem>SIGUSR1</systemitem> handling in walsender processes (Petr Jelinek, Andres Freund) </para> </listitem> <listitem> <para> - Fix unnecessarily slow restarts of <application>walreceiver</> + Fix unnecessarily slow restarts of <application>walreceiver</application> processes due to race condition in postmaster (Tom Lane) </para> </listitem> <listitem> <para> - Fix cases where an <command>INSERT</> or <command>UPDATE</> assigns + Fix cases where an <command>INSERT</command> or <command>UPDATE</command> assigns to more than one element of a column that is of domain-over-array type (Tom Lane) </para> @@ -453,7 +453,7 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Allow window functions to be used in sub-<literal>SELECT</>s that + Allow window functions to be used in sub-<literal>SELECT</literal>s that are within the arguments of an aggregate function (Tom Lane) </para> </listitem> @@ -461,56 +461,56 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> Move autogenerated array types out of the way during - <command>ALTER ... RENAME</> (Vik Fearing) + <command>ALTER ... RENAME</command> (Vik Fearing) </para> <para> Previously, we would rename a conflicting autogenerated array type - out of the way during <command>CREATE</>; this fix extends that + out of the way during <command>CREATE</command>; this fix extends that behavior to renaming operations. </para> </listitem> <listitem> <para> - Ensure that <command>ALTER USER ... SET</> accepts all the syntax - variants that <command>ALTER ROLE ... SET</> does (Peter Eisentraut) + Ensure that <command>ALTER USER ... SET</command> accepts all the syntax + variants that <command>ALTER ROLE ... SET</command> does (Peter Eisentraut) </para> </listitem> <listitem> <para> Properly update dependency info when changing a datatype I/O - function's argument or return type from <type>opaque</> to the + function's argument or return type from <type>opaque</type> to the correct type (Heikki Linnakangas) </para> <para> - <command>CREATE TYPE</> updates I/O functions declared in this + <command>CREATE TYPE</command> updates I/O functions declared in this long-obsolete style, but it forgot to record a dependency on the - type, allowing a subsequent <command>DROP TYPE</> to leave broken + type, allowing a subsequent <command>DROP TYPE</command> to leave broken function definitions behind. </para> </listitem> <listitem> <para> - Reduce memory usage when <command>ANALYZE</> processes - a <type>tsvector</> column (Heikki Linnakangas) + Reduce memory usage when <command>ANALYZE</command> processes + a <type>tsvector</type> column (Heikki Linnakangas) </para> </listitem> <listitem> <para> Fix unnecessary precision loss and sloppy rounding when multiplying - or dividing <type>money</> values by integers or floats (Tom Lane) + or dividing <type>money</type> values by integers or floats (Tom Lane) </para> </listitem> <listitem> <para> Tighten checks for whitespace in functions that parse identifiers, - such as <function>regprocedurein()</> (Tom Lane) + such as <function>regprocedurein()</function> (Tom Lane) </para> <para> @@ -521,20 +521,20 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Use relevant <literal>#define</> symbols from Perl while - compiling <application>PL/Perl</> (Ashutosh Sharma, Tom Lane) + Use relevant <literal>#define</literal> symbols from Perl while + compiling <application>PL/Perl</application> (Ashutosh Sharma, Tom Lane) </para> <para> This avoids portability problems, typically manifesting as - a <quote>handshake</> mismatch during library load, when working with + a <quote>handshake</quote> mismatch during library load, when working with recent Perl versions. </para> </listitem> <listitem> <para> - In <application>libpq</>, reset GSS/SASL and SSPI authentication + In <application>libpq</application>, reset GSS/SASL and SSPI authentication state properly after a failed connection attempt (Michael Paquier) </para> @@ -547,9 +547,9 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - In <application>psql</>, fix failure when <command>COPY FROM STDIN</> + In <application>psql</application>, fix failure when <command>COPY FROM STDIN</command> is ended with a keyboard EOF signal and then another <command>COPY - FROM STDIN</> is attempted (Thomas Munro) + FROM STDIN</command> is attempted (Thomas Munro) </para> <para> @@ -560,8 +560,8 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Fix <application>pg_dump</> and <application>pg_restore</> to - emit <command>REFRESH MATERIALIZED VIEW</> commands last (Tom Lane) + Fix <application>pg_dump</application> and <application>pg_restore</application> to + emit <command>REFRESH MATERIALIZED VIEW</command> commands last (Tom Lane) </para> <para> @@ -572,7 +572,7 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Fix <application>pg_dump</> with the <option>--clean</> option to + Fix <application>pg_dump</application> with the <option>--clean</option> option to drop event triggers as expected (Tom Lane) </para> @@ -585,14 +585,14 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Fix <application>pg_dump</> to not emit invalid SQL for an empty + Fix <application>pg_dump</application> to not emit invalid SQL for an empty operator class (Daniel Gustafsson) </para> </listitem> <listitem> <para> - Fix <application>pg_dump</> output to stdout on Windows (Kuntal Ghosh) + Fix <application>pg_dump</application> output to stdout on Windows (Kuntal Ghosh) </para> <para> @@ -603,14 +603,14 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Fix <function>pg_get_ruledef()</> to print correct output for - the <literal>ON SELECT</> rule of a view whose columns have been + Fix <function>pg_get_ruledef()</function> to print correct output for + the <literal>ON SELECT</literal> rule of a view whose columns have been renamed (Tom Lane) </para> <para> - In some corner cases, <application>pg_dump</> relies - on <function>pg_get_ruledef()</> to dump views, so that this error + In some corner cases, <application>pg_dump</application> relies + on <function>pg_get_ruledef()</function> to dump views, so that this error could result in dump/reload failures. </para> </listitem> @@ -618,13 +618,13 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> Fix dumping of outer joins with empty constraints, such as the result - of a <literal>NATURAL LEFT JOIN</> with no common columns (Tom Lane) + of a <literal>NATURAL LEFT JOIN</literal> with no common columns (Tom Lane) </para> </listitem> <listitem> <para> - Fix dumping of function expressions in the <literal>FROM</> clause in + Fix dumping of function expressions in the <literal>FROM</literal> clause in cases where the expression does not deparse into something that looks like a function call (Tom Lane) </para> @@ -632,7 +632,7 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Fix <application>pg_basebackup</> output to stdout on Windows + Fix <application>pg_basebackup</application> output to stdout on Windows (Haribabu Kommi) </para> @@ -644,8 +644,8 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Fix <application>pg_upgrade</> to ensure that the ending WAL record - does not have <xref linkend="guc-wal-level"> = <literal>minimum</> + Fix <application>pg_upgrade</application> to ensure that the ending WAL record + does not have <xref linkend="guc-wal-level"> = <literal>minimum</literal> (Bruce Momjian) </para> @@ -657,9 +657,9 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - In <filename>postgres_fdw</>, re-establish connections to remote - servers after <command>ALTER SERVER</> or <command>ALTER USER - MAPPING</> commands (Kyotaro Horiguchi) + In <filename>postgres_fdw</filename>, re-establish connections to remote + servers after <command>ALTER SERVER</command> or <command>ALTER USER + MAPPING</command> commands (Kyotaro Horiguchi) </para> <para> @@ -670,7 +670,7 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - In <filename>postgres_fdw</>, allow cancellation of remote + In <filename>postgres_fdw</filename>, allow cancellation of remote transaction control commands (Robert Haas, Rafia Sabih) </para> @@ -682,7 +682,7 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Always use <option>-fPIC</>, not <option>-fpic</>, when building + Always use <option>-fPIC</option>, not <option>-fpic</option>, when building shared libraries with gcc (Tom Lane) </para> @@ -702,27 +702,27 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - In MSVC builds, handle the case where the <application>openssl</> - library is not within a <filename>VC</> subdirectory (Andrew Dunstan) + In MSVC builds, handle the case where the <application>openssl</application> + library is not within a <filename>VC</filename> subdirectory (Andrew Dunstan) </para> </listitem> <listitem> <para> - In MSVC builds, add proper include path for <application>libxml2</> + In MSVC builds, add proper include path for <application>libxml2</application> header files (Andrew Dunstan) </para> <para> This fixes a former need to move things around in standard Windows - installations of <application>libxml2</>. + installations of <application>libxml2</application>. </para> </listitem> <listitem> <para> In MSVC builds, recognize a Tcl library that is - named <filename>tcl86.lib</> (Noah Misch) + named <filename>tcl86.lib</filename> (Noah Misch) </para> </listitem> @@ -772,18 +772,18 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> Restrict visibility - of <structname>pg_user_mappings</>.<structfield>umoptions</>, to + of <structname>pg_user_mappings</structname>.<structfield>umoptions</structfield>, to protect passwords stored as user mapping options (Michael Paquier, Feike Steenbergen) </para> <para> The previous coding allowed the owner of a foreign server object, - or anyone he has granted server <literal>USAGE</> permission to, + or anyone he has granted server <literal>USAGE</literal> permission to, to see the options for all user mappings associated with that server. This might well include passwords for other users. Adjust the view definition to match the behavior of - <structname>information_schema.user_mapping_options</>, namely that + <structname>information_schema.user_mapping_options</structname>, namely that these options are visible to the user being mapped, or if the mapping is for <literal>PUBLIC</literal> and the current user is the server owner, or if the current user is a superuser. @@ -807,7 +807,7 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <para> Some selectivity estimation functions in the planner will apply user-defined operators to values obtained - from <structname>pg_statistic</>, such as most common values and + from <structname>pg_statistic</structname>, such as most common values and histogram entries. This occurs before table permissions are checked, so a nefarious user could exploit the behavior to obtain these values for table columns he does not have permission to read. To fix, @@ -821,17 +821,17 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Restore <application>libpq</>'s recognition of - the <envar>PGREQUIRESSL</> environment variable (Daniel Gustafsson) + Restore <application>libpq</application>'s recognition of + the <envar>PGREQUIRESSL</envar> environment variable (Daniel Gustafsson) </para> <para> Processing of this environment variable was unintentionally dropped - in <productname>PostgreSQL</> 9.3, but its documentation remained. + in <productname>PostgreSQL</productname> 9.3, but its documentation remained. This creates a security hazard, since users might be relying on the environment variable to force SSL-encrypted connections, but that would no longer be guaranteed. Restore handling of the variable, - but give it lower priority than <envar>PGSSLMODE</>, to avoid + but give it lower priority than <envar>PGSSLMODE</envar>, to avoid breaking configurations that work correctly with post-9.3 code. (CVE-2017-7485) </para> @@ -839,7 +839,7 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Fix possible corruption of <quote>init forks</> of unlogged indexes + Fix possible corruption of <quote>init forks</quote> of unlogged indexes (Robert Haas, Michael Paquier) </para> @@ -852,7 +852,7 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Fix incorrect reconstruction of <structname>pg_subtrans</> entries + Fix incorrect reconstruction of <structname>pg_subtrans</structname> entries when a standby server replays a prepared but uncommitted two-phase transaction (Tom Lane) </para> @@ -860,7 +860,7 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <para> In most cases this turned out to have no visible ill effects, but in corner cases it could result in circular references - in <structname>pg_subtrans</>, potentially causing infinite loops + in <structname>pg_subtrans</structname>, potentially causing infinite loops in queries that examine rows modified by the two-phase transaction. </para> </listitem> @@ -875,19 +875,19 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; Due to lack of a cache flush step between commands in an extension script file, non-utility queries might not see the effects of an immediately preceding catalog change, such as <command>ALTER TABLE - ... RENAME</>. + ... RENAME</command>. </para> </listitem> <listitem> <para> Skip tablespace privilege checks when <command>ALTER TABLE ... ALTER - COLUMN TYPE</> rebuilds an existing index (Noah Misch) + COLUMN TYPE</command> rebuilds an existing index (Noah Misch) </para> <para> The command failed if the calling user did not currently have - <literal>CREATE</> privilege for the tablespace containing the index. + <literal>CREATE</literal> privilege for the tablespace containing the index. That behavior seems unhelpful, so skip the check, allowing the index to be rebuilt where it is. </para> @@ -895,27 +895,27 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Fix <command>ALTER TABLE ... VALIDATE CONSTRAINT</> to not recurse - to child tables when the constraint is marked <literal>NO INHERIT</> + Fix <command>ALTER TABLE ... VALIDATE CONSTRAINT</command> to not recurse + to child tables when the constraint is marked <literal>NO INHERIT</literal> (Amit Langote) </para> <para> - This fix prevents unwanted <quote>constraint does not exist</> failures + This fix prevents unwanted <quote>constraint does not exist</quote> failures when no matching constraint is present in the child tables. </para> </listitem> <listitem> <para> - Fix <command>VACUUM</> to account properly for pages that could not + Fix <command>VACUUM</command> to account properly for pages that could not be scanned due to conflicting page pins (Andrew Gierth) </para> <para> This tended to lead to underestimation of the number of tuples in the table. In the worst case of a small heavily-contended - table, <command>VACUUM</> could incorrectly report that the table + table, <command>VACUUM</command> could incorrectly report that the table contained no tuples, leading to very bad planning choices. </para> </listitem> @@ -929,33 +929,33 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Fix <function>cursor_to_xml()</> to produce valid output - with <replaceable>tableforest</> = false + Fix <function>cursor_to_xml()</function> to produce valid output + with <replaceable>tableforest</replaceable> = false (Thomas Munro, Peter Eisentraut) </para> <para> - Previously it failed to produce a wrapping <literal><table></> + Previously it failed to produce a wrapping <literal><table></literal> element. </para> </listitem> <listitem> <para> - Improve performance of <structname>pg_timezone_names</> view + Improve performance of <structname>pg_timezone_names</structname> view (Tom Lane, David Rowley) </para> </listitem> <listitem> <para> - Fix sloppy handling of corner-case errors from <function>lseek()</> - and <function>close()</> (Tom Lane) + Fix sloppy handling of corner-case errors from <function>lseek()</function> + and <function>close()</function> (Tom Lane) </para> <para> Neither of these system calls are likely to fail in typical situations, - but if they did, <filename>fd.c</> could get quite confused. + but if they did, <filename>fd.c</filename> could get quite confused. </para> </listitem> @@ -973,21 +973,21 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Fix <application>ecpg</> to support <command>COMMIT PREPARED</> - and <command>ROLLBACK PREPARED</> (Masahiko Sawada) + Fix <application>ecpg</application> to support <command>COMMIT PREPARED</command> + and <command>ROLLBACK PREPARED</command> (Masahiko Sawada) </para> </listitem> <listitem> <para> Fix a double-free error when processing dollar-quoted string literals - in <application>ecpg</> (Michael Meskes) + in <application>ecpg</application> (Michael Meskes) </para> </listitem> <listitem> <para> - In <application>pg_dump</>, fix incorrect schema and owner marking for + In <application>pg_dump</application>, fix incorrect schema and owner marking for comments and security labels of some types of database objects (Giuseppe Broccolo, Tom Lane) </para> @@ -1002,20 +1002,20 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Avoid emitting an invalid list file in <literal>pg_restore -l</> + Avoid emitting an invalid list file in <literal>pg_restore -l</literal> when SQL object names contain newlines (Tom Lane) </para> <para> Replace newlines by spaces, which is sufficient to make the output - valid for <literal>pg_restore -L</>'s purposes. + valid for <literal>pg_restore -L</literal>'s purposes. </para> </listitem> <listitem> <para> - Fix <application>pg_upgrade</> to transfer comments and security labels - attached to <quote>large objects</> (blobs) (Stephen Frost) + Fix <application>pg_upgrade</application> to transfer comments and security labels + attached to <quote>large objects</quote> (blobs) (Stephen Frost) </para> <para> @@ -1027,26 +1027,26 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> Improve error handling - in <filename>contrib/adminpack</>'s <function>pg_file_write()</> + in <filename>contrib/adminpack</filename>'s <function>pg_file_write()</function> function (Noah Misch) </para> <para> Notably, it failed to detect errors reported - by <function>fclose()</>. + by <function>fclose()</function>. </para> </listitem> <listitem> <para> - In <filename>contrib/dblink</>, avoid leaking the previous unnamed + In <filename>contrib/dblink</filename>, avoid leaking the previous unnamed connection when establishing a new unnamed connection (Joe Conway) </para> </listitem> <listitem> <para> - Fix <filename>contrib/pg_trgm</>'s extraction of trigrams from regular + Fix <filename>contrib/pg_trgm</filename>'s extraction of trigrams from regular expressions (Tom Lane) </para> @@ -1059,7 +1059,7 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - In <filename>contrib/postgres_fdw</>, + In <filename>contrib/postgres_fdw</filename>, transmit query cancellation requests to the remote server (Michael Paquier, Etsuro Fujita) </para> @@ -1101,7 +1101,7 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Update time zone data files to <application>tzdata</> release 2017b + Update time zone data files to <application>tzdata</application> release 2017b for DST law changes in Chile, Haiti, and Mongolia, plus historical corrections for Ecuador, Kazakhstan, Liberia, and Spain. Switch to numeric abbreviations for numerous time zones in South @@ -1115,9 +1115,9 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; or no currency among the local population. They are in process of reversing that policy in favor of using numeric UTC offsets in zones where there is no evidence of real-world use of an English - abbreviation. At least for the time being, <productname>PostgreSQL</> + abbreviation. At least for the time being, <productname>PostgreSQL</productname> will continue to accept such removed abbreviations for timestamp input. - But they will not be shown in the <structname>pg_timezone_names</> + But they will not be shown in the <structname>pg_timezone_names</structname> view nor used for output. </para> </listitem> @@ -1130,15 +1130,15 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <para> The Microsoft MSVC build scripts neglected to install - the <filename>posixrules</> file in the timezone directory tree. + the <filename>posixrules</filename> file in the timezone directory tree. This resulted in the timezone code falling back to its built-in rule about what DST behavior to assume for a POSIX-style time zone name. For historical reasons that still corresponds to the DST rules the USA was using before 2007 (i.e., change on first Sunday in April and last Sunday in October). With this fix, a POSIX-style zone name will use the current and historical DST transition dates of - the <literal>US/Eastern</> zone. If you don't want that, remove - the <filename>posixrules</> file, or replace it with a copy of some + the <literal>US/Eastern</literal> zone. If you don't want that, remove + the <filename>posixrules</filename> file, or replace it with a copy of some other zone file (see <xref linkend="datatype-timezones">). Note that due to caching, you may need to restart the server to get such changes to take effect. @@ -1192,15 +1192,15 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> Fix a race condition that could cause indexes built - with <command>CREATE INDEX CONCURRENTLY</> to be corrupt + with <command>CREATE INDEX CONCURRENTLY</command> to be corrupt (Pavan Deolasee, Tom Lane) </para> <para> - If <command>CREATE INDEX CONCURRENTLY</> was used to build an index + If <command>CREATE INDEX CONCURRENTLY</command> was used to build an index that depends on a column not previously indexed, then rows updated by transactions that ran concurrently with - the <command>CREATE INDEX</> command could have received incorrect + the <command>CREATE INDEX</command> command could have received incorrect index entries. If you suspect this may have happened, the most reliable solution is to rebuild affected indexes after installing this update. @@ -1209,13 +1209,13 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Unconditionally WAL-log creation of the <quote>init fork</> for an + Unconditionally WAL-log creation of the <quote>init fork</quote> for an unlogged table (Michael Paquier) </para> <para> Previously, this was skipped when <xref linkend="guc-wal-level"> - = <literal>minimal</>, but actually it's necessary even in that case + = <literal>minimal</literal>, but actually it's necessary even in that case to ensure that the unlogged table is properly reset to empty after a crash. </para> @@ -1269,7 +1269,7 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Make sure <command>ALTER TABLE</> preserves index tablespace + Make sure <command>ALTER TABLE</command> preserves index tablespace assignments when rebuilding indexes (Tom Lane, Michael Paquier) </para> @@ -1287,15 +1287,15 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; </para> <para> - This avoids <quote>could not find trigger <replaceable>NNN</></quote> - or <quote>relation <replaceable>NNN</> has no triggers</quote> errors. + This avoids <quote>could not find trigger <replaceable>NNN</replaceable></quote> + or <quote>relation <replaceable>NNN</replaceable> has no triggers</quote> errors. </para> </listitem> <listitem> <para> Fix processing of OID column when a table with OIDs is associated to - a parent with OIDs via <command>ALTER TABLE ... INHERIT</> (Amit + a parent with OIDs via <command>ALTER TABLE ... INHERIT</command> (Amit Langote) </para> @@ -1309,7 +1309,7 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> Report correct object identity during <command>ALTER TEXT SEARCH - CONFIGURATION</> (Artur Zakirov) + CONFIGURATION</command> (Artur Zakirov) </para> <para> @@ -1339,13 +1339,13 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Prevent multicolumn expansion of <replaceable>foo</><literal>.*</> in - an <command>UPDATE</> source expression (Tom Lane) + Prevent multicolumn expansion of <replaceable>foo</replaceable><literal>.*</literal> in + an <command>UPDATE</command> source expression (Tom Lane) </para> <para> This led to <quote>UPDATE target count mismatch --- internal - error</>. Now the syntax is understood as a whole-row variable, + error</quote>. Now the syntax is understood as a whole-row variable, as it would be in other contexts. </para> </listitem> @@ -1353,12 +1353,12 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> Ensure that column typmods are determined accurately for - multi-row <literal>VALUES</> constructs (Tom Lane) + multi-row <literal>VALUES</literal> constructs (Tom Lane) </para> <para> This fixes problems occurring when the first value in a column has a - determinable typmod (e.g., length for a <type>varchar</> value) but + determinable typmod (e.g., length for a <type>varchar</type> value) but later values don't share the same limit. </para> </listitem> @@ -1373,15 +1373,15 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; Normally, a Unicode surrogate leading character must be followed by a Unicode surrogate trailing character, but the check for this was missed if the leading character was the last character in a Unicode - string literal (<literal>U&'...'</>) or Unicode identifier - (<literal>U&"..."</>). + string literal (<literal>U&'...'</literal>) or Unicode identifier + (<literal>U&"..."</literal>). </para> </listitem> <listitem> <para> Ensure that a purely negative text search query, such - as <literal>!foo</>, matches empty <type>tsvector</>s (Tom Dunstan) + as <literal>!foo</literal>, matches empty <type>tsvector</type>s (Tom Dunstan) </para> <para> @@ -1392,33 +1392,33 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Prevent crash when <function>ts_rewrite()</> replaces a non-top-level + Prevent crash when <function>ts_rewrite()</function> replaces a non-top-level subtree with an empty query (Artur Zakirov) </para> </listitem> <listitem> <para> - Fix performance problems in <function>ts_rewrite()</> (Tom Lane) + Fix performance problems in <function>ts_rewrite()</function> (Tom Lane) </para> </listitem> <listitem> <para> - Fix <function>ts_rewrite()</>'s handling of nested NOT operators + Fix <function>ts_rewrite()</function>'s handling of nested NOT operators (Tom Lane) </para> </listitem> <listitem> <para> - Fix <function>array_fill()</> to handle empty arrays properly (Tom Lane) + Fix <function>array_fill()</function> to handle empty arrays properly (Tom Lane) </para> </listitem> <listitem> <para> - Fix one-byte buffer overrun in <function>quote_literal_cstr()</> + Fix one-byte buffer overrun in <function>quote_literal_cstr()</function> (Heikki Linnakangas) </para> @@ -1430,8 +1430,8 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Prevent multiple calls of <function>pg_start_backup()</> - and <function>pg_stop_backup()</> from running concurrently (Michael + Prevent multiple calls of <function>pg_start_backup()</function> + and <function>pg_stop_backup()</function> from running concurrently (Michael Paquier) </para> @@ -1443,15 +1443,15 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Avoid discarding <type>interval</>-to-<type>interval</> casts + Avoid discarding <type>interval</type>-to-<type>interval</type> casts that aren't really no-ops (Tom Lane) </para> <para> In some cases, a cast that should result in zeroing out - low-order <type>interval</> fields was mistakenly deemed to be a + low-order <type>interval</type> fields was mistakenly deemed to be a no-op and discarded. An example is that casting from <type>INTERVAL - MONTH</> to <type>INTERVAL YEAR</> failed to clear the months field. + MONTH</type> to <type>INTERVAL YEAR</type> failed to clear the months field. </para> </listitem> @@ -1464,14 +1464,14 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Fix <application>pg_dump</> to dump user-defined casts and transforms + Fix <application>pg_dump</application> to dump user-defined casts and transforms that use built-in functions (Stephen Frost) </para> </listitem> <listitem> <para> - Fix possible <application>pg_basebackup</> failure on standby + Fix possible <application>pg_basebackup</application> failure on standby server when including WAL files (Amit Kapila, Robert Haas) </para> </listitem> @@ -1490,21 +1490,21 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Fix PL/Tcl to support triggers on tables that have <literal>.tupno</> + Fix PL/Tcl to support triggers on tables that have <literal>.tupno</literal> as a column name (Tom Lane) </para> <para> This matches the (previously undocumented) behavior of - PL/Tcl's <command>spi_exec</> and <command>spi_execp</> commands, - namely that a magic <literal>.tupno</> column is inserted only if + PL/Tcl's <command>spi_exec</command> and <command>spi_execp</command> commands, + namely that a magic <literal>.tupno</literal> column is inserted only if there isn't a real column named that. </para> </listitem> <listitem> <para> - Allow DOS-style line endings in <filename>~/.pgpass</> files, + Allow DOS-style line endings in <filename>~/.pgpass</filename> files, even on Unix (Vik Fearing) </para> @@ -1516,23 +1516,23 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Fix one-byte buffer overrun if <application>ecpg</> is given a file + Fix one-byte buffer overrun if <application>ecpg</application> is given a file name that ends with a dot (Takayuki Tsunakawa) </para> </listitem> <listitem> <para> - Fix <application>psql</>'s tab completion for <command>ALTER DEFAULT - PRIVILEGES</> (Gilles Darold, Stephen Frost) + Fix <application>psql</application>'s tab completion for <command>ALTER DEFAULT + PRIVILEGES</command> (Gilles Darold, Stephen Frost) </para> </listitem> <listitem> <para> - In <application>psql</>, treat an empty or all-blank setting of - the <envar>PAGER</> environment variable as meaning <quote>no - pager</> (Tom Lane) + In <application>psql</application>, treat an empty or all-blank setting of + the <envar>PAGER</envar> environment variable as meaning <quote>no + pager</quote> (Tom Lane) </para> <para> @@ -1543,22 +1543,22 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Improve <filename>contrib/dblink</>'s reporting of - low-level <application>libpq</> errors, such as out-of-memory + Improve <filename>contrib/dblink</filename>'s reporting of + low-level <application>libpq</application> errors, such as out-of-memory (Joe Conway) </para> </listitem> <listitem> <para> - Teach <filename>contrib/dblink</> to ignore irrelevant server options - when it uses a <filename>contrib/postgres_fdw</> foreign server as + Teach <filename>contrib/dblink</filename> to ignore irrelevant server options + when it uses a <filename>contrib/postgres_fdw</filename> foreign server as the source of connection options (Corey Huinker) </para> <para> Previously, if the foreign server object had options that were not - also <application>libpq</> connection options, an error occurred. + also <application>libpq</application> connection options, an error occurred. </para> </listitem> @@ -1584,7 +1584,7 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Update time zone data files to <application>tzdata</> release 2016j + Update time zone data files to <application>tzdata</application> release 2016j for DST law changes in northern Cyprus (adding a new zone Asia/Famagusta), Russia (adding a new zone Europe/Saratov), Tonga, and Antarctica/Casey. @@ -1648,7 +1648,7 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; crash recovery, or to be written incorrectly on a standby server. Bogus entries in a free space map could lead to attempts to access pages that have been truncated away from the relation itself, typically - producing errors like <quote>could not read block <replaceable>XXX</>: + producing errors like <quote>could not read block <replaceable>XXX</replaceable>: read only 0 of 8192 bytes</quote>. Checksum failures in the visibility map are also possible, if checksumming is enabled. </para> @@ -1656,19 +1656,19 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <para> Procedures for determining whether there is a problem and repairing it if so are discussed at - <ulink url="https://wiki.postgresql.org/wiki/Free_Space_Map_Problems"></>. + <ulink url="https://wiki.postgresql.org/wiki/Free_Space_Map_Problems"></ulink>. </para> </listitem> <listitem> <para> - Fix <command>SELECT FOR UPDATE/SHARE</> to correctly lock tuples that + Fix <command>SELECT FOR UPDATE/SHARE</command> to correctly lock tuples that have been updated by a subsequently-aborted transaction (Álvaro Herrera) </para> <para> - In 9.5 and later, the <command>SELECT</> would sometimes fail to + In 9.5 and later, the <command>SELECT</command> would sometimes fail to return such tuples at all. A failure has not been proven to occur in earlier releases, but might be possible with concurrent updates. </para> @@ -1702,71 +1702,71 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Fix <command>EXPLAIN</> to emit valid XML when + Fix <command>EXPLAIN</command> to emit valid XML when <xref linkend="guc-track-io-timing"> is on (Markus Winand) </para> <para> Previously the XML output-format option produced syntactically invalid - tags such as <literal><I/O-Read-Time></>. That is now - rendered as <literal><I-O-Read-Time></>. + tags such as <literal><I/O-Read-Time></literal>. That is now + rendered as <literal><I-O-Read-Time></literal>. </para> </listitem> <listitem> <para> Suppress printing of zeroes for unmeasured times - in <command>EXPLAIN</> (Maksim Milyutin) + in <command>EXPLAIN</command> (Maksim Milyutin) </para> <para> Certain option combinations resulted in printing zero values for times that actually aren't ever measured in that combination. Our general - policy in <command>EXPLAIN</> is not to print such fields at all, so + policy in <command>EXPLAIN</command> is not to print such fields at all, so do that consistently in all cases. </para> </listitem> <listitem> <para> - Fix timeout length when <command>VACUUM</> is waiting for exclusive + Fix timeout length when <command>VACUUM</command> is waiting for exclusive table lock so that it can truncate the table (Simon Riggs) </para> <para> The timeout was meant to be 50 milliseconds, but it was actually only - 50 microseconds, causing <command>VACUUM</> to give up on truncation + 50 microseconds, causing <command>VACUUM</command> to give up on truncation much more easily than intended. Set it to the intended value. </para> </listitem> <listitem> <para> - Fix bugs in merging inherited <literal>CHECK</> constraints while + Fix bugs in merging inherited <literal>CHECK</literal> constraints while creating or altering a table (Tom Lane, Amit Langote) </para> <para> - Allow identical <literal>CHECK</> constraints to be added to a parent + Allow identical <literal>CHECK</literal> constraints to be added to a parent and child table in either order. Prevent merging of a valid - constraint from the parent table with a <literal>NOT VALID</> + constraint from the parent table with a <literal>NOT VALID</literal> constraint on the child. Likewise, prevent merging of a <literal>NO - INHERIT</> child constraint with an inherited constraint. + INHERIT</literal> child constraint with an inherited constraint. </para> </listitem> <listitem> <para> Remove artificial restrictions on the values accepted - by <function>numeric_in()</> and <function>numeric_recv()</> + by <function>numeric_in()</function> and <function>numeric_recv()</function> (Tom Lane) </para> <para> We allow numeric values up to the limit of the storage format (more - than <literal>1e100000</>), so it seems fairly pointless - that <function>numeric_in()</> rejected scientific-notation exponents - above 1000. Likewise, it was silly for <function>numeric_recv()</> to + than <literal>1e100000</literal>), so it seems fairly pointless + that <function>numeric_in()</function> rejected scientific-notation exponents + above 1000. Likewise, it was silly for <function>numeric_recv()</function> to reject more than 1000 digits in an input value. </para> </listitem> @@ -1788,7 +1788,7 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Disallow starting a standalone backend with <literal>standby_mode</> + Disallow starting a standalone backend with <literal>standby_mode</literal> turned on (Michael Paquier) </para> @@ -1802,7 +1802,7 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> Don't try to share SSL contexts across multiple connections - in <application>libpq</> (Heikki Linnakangas) + in <application>libpq</application> (Heikki Linnakangas) </para> <para> @@ -1813,30 +1813,30 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Avoid corner-case memory leak in <application>libpq</> (Tom Lane) + Avoid corner-case memory leak in <application>libpq</application> (Tom Lane) </para> <para> The reported problem involved leaking an error report - during <function>PQreset()</>, but there might be related cases. + during <function>PQreset()</function>, but there might be related cases. </para> </listitem> <listitem> <para> - Make <application>ecpg</>'s <option>--help</> and <option>--version</> + Make <application>ecpg</application>'s <option>--help</option> and <option>--version</option> options work consistently with our other executables (Haribabu Kommi) </para> </listitem> <listitem> <para> - In <application>pg_dump</>, never dump range constructor functions + In <application>pg_dump</application>, never dump range constructor functions (Tom Lane) </para> <para> - This oversight led to <application>pg_upgrade</> failures with + This oversight led to <application>pg_upgrade</application> failures with extensions containing range types, due to duplicate creation of the constructor functions. </para> @@ -1844,8 +1844,8 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - In <application>pg_xlogdump</>, retry opening new WAL segments when - using <option>--follow</> option (Magnus Hagander) + In <application>pg_xlogdump</application>, retry opening new WAL segments when + using <option>--follow</option> option (Magnus Hagander) </para> <para> @@ -1856,7 +1856,7 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Fix <application>pg_xlogdump</> to cope with a WAL file that begins + Fix <application>pg_xlogdump</application> to cope with a WAL file that begins with a continuation record spanning more than one page (Pavan Deolasee) </para> @@ -1864,8 +1864,8 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Fix <filename>contrib/intarray/bench/bench.pl</> to print the results - of the <command>EXPLAIN</> it does when given the <option>-e</> option + Fix <filename>contrib/intarray/bench/bench.pl</filename> to print the results + of the <command>EXPLAIN</command> it does when given the <option>-e</option> option (Daniel Gustafsson) </para> </listitem> @@ -1886,17 +1886,17 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; If a dynamic time zone abbreviation does not match any entry in the referenced time zone, treat it as equivalent to the time zone name. This avoids unexpected failures when IANA removes abbreviations from - their time zone database, as they did in <application>tzdata</> + their time zone database, as they did in <application>tzdata</application> release 2016f and seem likely to do again in the future. The consequences were not limited to not recognizing the individual abbreviation; any mismatch caused - the <structname>pg_timezone_abbrevs</> view to fail altogether. + the <structname>pg_timezone_abbrevs</structname> view to fail altogether. </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2016h + Update time zone data files to <application>tzdata</application> release 2016h for DST law changes in Palestine and Turkey, plus historical corrections for Turkey and some regions of Russia. Switch to numeric abbreviations for some time zones in Antarctica, @@ -1909,15 +1909,15 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; or no currency among the local population. They are in process of reversing that policy in favor of using numeric UTC offsets in zones where there is no evidence of real-world use of an English - abbreviation. At least for the time being, <productname>PostgreSQL</> + abbreviation. At least for the time being, <productname>PostgreSQL</productname> will continue to accept such removed abbreviations for timestamp input. - But they will not be shown in the <structname>pg_timezone_names</> + But they will not be shown in the <structname>pg_timezone_names</structname> view nor used for output. </para> <para> - In this update, <literal>AMT</> is no longer shown as being in use to - mean Armenia Time. Therefore, we have changed the <literal>Default</> + In this update, <literal>AMT</literal> is no longer shown as being in use to + mean Armenia Time. Therefore, we have changed the <literal>Default</literal> abbreviation set to interpret it as Amazon Time, thus UTC-4 not UTC+4. </para> </listitem> @@ -1963,17 +1963,17 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> Fix possible mis-evaluation of - nested <literal>CASE</>-<literal>WHEN</> expressions (Heikki + nested <literal>CASE</literal>-<literal>WHEN</literal> expressions (Heikki Linnakangas, Michael Paquier, Tom Lane) </para> <para> - A <literal>CASE</> expression appearing within the test value - subexpression of another <literal>CASE</> could become confused about + A <literal>CASE</literal> expression appearing within the test value + subexpression of another <literal>CASE</literal> could become confused about whether its own test value was null or not. Also, inlining of a SQL function implementing the equality operator used by - a <literal>CASE</> expression could result in passing the wrong test - value to functions called within a <literal>CASE</> expression in the + a <literal>CASE</literal> expression could result in passing the wrong test + value to functions called within a <literal>CASE</literal> expression in the SQL function's body. If the test values were of different data types, a crash might result; moreover such situations could be abused to allow disclosure of portions of server memory. (CVE-2016-5423) @@ -1987,7 +1987,7 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; </para> <para> - Numerous places in <application>vacuumdb</> and other client programs + Numerous places in <application>vacuumdb</application> and other client programs could become confused by database and role names containing double quotes or backslashes. Tighten up quoting rules to make that safe. Also, ensure that when a conninfo string is used as a database name @@ -1996,22 +1996,22 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <para> Fix handling of paired double quotes - in <application>psql</>'s <command>\connect</> - and <command>\password</> commands to match the documentation. + in <application>psql</application>'s <command>\connect</command> + and <command>\password</command> commands to match the documentation. </para> <para> - Introduce a new <option>-reuse-previous</> option - in <application>psql</>'s <command>\connect</> command to allow + Introduce a new <option>-reuse-previous</option> option + in <application>psql</application>'s <command>\connect</command> command to allow explicit control of whether to re-use connection parameters from a previous connection. (Without this, the choice is based on whether the database name looks like a conninfo string, as before.) This allows secure handling of database names containing special - characters in <application>pg_dumpall</> scripts. + characters in <application>pg_dumpall</application> scripts. </para> <para> - <application>pg_dumpall</> now refuses to deal with database and role + <application>pg_dumpall</application> now refuses to deal with database and role names containing carriage returns or newlines, as it seems impractical to quote those characters safely on Windows. In future we may reject such names on the server side, but that step has not been taken yet. @@ -2021,40 +2021,40 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; These are considered security fixes because crafted object names containing special characters could have been used to execute commands with superuser privileges the next time a superuser - executes <application>pg_dumpall</> or other routine maintenance + executes <application>pg_dumpall</application> or other routine maintenance operations. (CVE-2016-5424) </para> </listitem> <listitem> <para> - Fix corner-case misbehaviors for <literal>IS NULL</>/<literal>IS NOT - NULL</> applied to nested composite values (Andrew Gierth, Tom Lane) + Fix corner-case misbehaviors for <literal>IS NULL</literal>/<literal>IS NOT + NULL</literal> applied to nested composite values (Andrew Gierth, Tom Lane) </para> <para> - The SQL standard specifies that <literal>IS NULL</> should return + The SQL standard specifies that <literal>IS NULL</literal> should return TRUE for a row of all null values (thus <literal>ROW(NULL,NULL) IS - NULL</> yields TRUE), but this is not meant to apply recursively - (thus <literal>ROW(NULL, ROW(NULL,NULL)) IS NULL</> yields FALSE). + NULL</literal> yields TRUE), but this is not meant to apply recursively + (thus <literal>ROW(NULL, ROW(NULL,NULL)) IS NULL</literal> yields FALSE). The core executor got this right, but certain planner optimizations treated the test as recursive (thus producing TRUE in both cases), - and <filename>contrib/postgres_fdw</> could produce remote queries + and <filename>contrib/postgres_fdw</filename> could produce remote queries that misbehaved similarly. </para> </listitem> <listitem> <para> - Make the <type>inet</> and <type>cidr</> data types properly reject + Make the <type>inet</type> and <type>cidr</type> data types properly reject IPv6 addresses with too many colon-separated fields (Tom Lane) </para> </listitem> <listitem> <para> - Prevent crash in <function>close_ps()</> - (the <type>point</> <literal>##</> <type>lseg</> operator) + Prevent crash in <function>close_ps()</function> + (the <type>point</type> <literal>##</literal> <type>lseg</type> operator) for NaN input coordinates (Tom Lane) </para> @@ -2065,19 +2065,19 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Avoid possible crash in <function>pg_get_expr()</> when inconsistent + Avoid possible crash in <function>pg_get_expr()</function> when inconsistent values are passed to it (Michael Paquier, Thomas Munro) </para> </listitem> <listitem> <para> - Fix several one-byte buffer over-reads in <function>to_number()</> + Fix several one-byte buffer over-reads in <function>to_number()</function> (Peter Eisentraut) </para> <para> - In several cases the <function>to_number()</> function would read one + In several cases the <function>to_number()</function> function would read one more character than it should from the input string. There is a small chance of a crash, if the input happens to be adjacent to the end of memory. @@ -2087,8 +2087,8 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> Do not run the planner on the query contained in <literal>CREATE - MATERIALIZED VIEW</> or <literal>CREATE TABLE AS</> - when <literal>WITH NO DATA</> is specified (Michael Paquier, + MATERIALIZED VIEW</literal> or <literal>CREATE TABLE AS</literal> + when <literal>WITH NO DATA</literal> is specified (Michael Paquier, Tom Lane) </para> @@ -2102,7 +2102,7 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> Avoid unsafe intermediate state during expensive paths - through <function>heap_update()</> (Masahiko Sawada, Andres Freund) + through <function>heap_update()</function> (Masahiko Sawada, Andres Freund) </para> <para> @@ -2128,15 +2128,15 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Avoid unnecessary <quote>could not serialize access</> errors when - acquiring <literal>FOR KEY SHARE</> row locks in serializable mode + Avoid unnecessary <quote>could not serialize access</quote> errors when + acquiring <literal>FOR KEY SHARE</literal> row locks in serializable mode (Álvaro Herrera) </para> </listitem> <listitem> <para> - Avoid crash in <literal>postgres -C</> when the specified variable + Avoid crash in <literal>postgres -C</literal> when the specified variable has a null string value (Michael Paquier) </para> </listitem> @@ -2165,12 +2165,12 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Avoid consuming a transaction ID during <command>VACUUM</> + Avoid consuming a transaction ID during <command>VACUUM</command> (Alexander Korotkov) </para> <para> - Some cases in <command>VACUUM</> unnecessarily caused an XID to be + Some cases in <command>VACUUM</command> unnecessarily caused an XID to be assigned to the current transaction. Normally this is negligible, but if one is up against the XID wraparound limit, consuming more XIDs during anti-wraparound vacuums is a very bad thing. @@ -2179,12 +2179,12 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Avoid canceling hot-standby queries during <command>VACUUM FREEZE</> + Avoid canceling hot-standby queries during <command>VACUUM FREEZE</command> (Simon Riggs, Álvaro Herrera) </para> <para> - <command>VACUUM FREEZE</> on an otherwise-idle master server could + <command>VACUUM FREEZE</command> on an otherwise-idle master server could result in unnecessary cancellations of queries on its standby servers. </para> @@ -2199,15 +2199,15 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <para> The usual symptom of this bug is errors - like <quote>MultiXactId <replaceable>NNN</> has not been created + like <quote>MultiXactId <replaceable>NNN</replaceable> has not been created yet -- apparent wraparound</quote>. </para> </listitem> <listitem> <para> - When a manual <command>ANALYZE</> specifies a column list, don't - reset the table's <literal>changes_since_analyze</> counter + When a manual <command>ANALYZE</command> specifies a column list, don't + reset the table's <literal>changes_since_analyze</literal> counter (Tom Lane) </para> @@ -2219,7 +2219,7 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Fix <command>ANALYZE</>'s overestimation of <literal>n_distinct</> + Fix <command>ANALYZE</command>'s overestimation of <literal>n_distinct</literal> for a unique or nearly-unique column with many null entries (Tom Lane) </para> @@ -2254,8 +2254,8 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Fix <filename>contrib/btree_gin</> to handle the smallest - possible <type>bigint</> value correctly (Peter Eisentraut) + Fix <filename>contrib/btree_gin</filename> to handle the smallest + possible <type>bigint</type> value correctly (Peter Eisentraut) </para> </listitem> @@ -2268,53 +2268,53 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <para> It's planned to switch to two-part instead of three-part server version numbers for releases after 9.6. Make sure - that <function>PQserverVersion()</> returns the correct value for + that <function>PQserverVersion()</function> returns the correct value for such cases. </para> </listitem> <listitem> <para> - Fix <application>ecpg</>'s code for <literal>unsigned long long</> + Fix <application>ecpg</application>'s code for <literal>unsigned long long</literal> array elements (Michael Meskes) </para> </listitem> <listitem> <para> - In <application>pg_dump</> with both <option>-c</> and <option>-C</> - options, avoid emitting an unwanted <literal>CREATE SCHEMA public</> + In <application>pg_dump</application> with both <option>-c</option> and <option>-C</option> + options, avoid emitting an unwanted <literal>CREATE SCHEMA public</literal> command (David Johnston, Tom Lane) </para> </listitem> <listitem> <para> - Improve handling of <systemitem>SIGTERM</>/control-C in - parallel <application>pg_dump</> and <application>pg_restore</> (Tom + Improve handling of <systemitem>SIGTERM</systemitem>/control-C in + parallel <application>pg_dump</application> and <application>pg_restore</application> (Tom Lane) </para> <para> Make sure that the worker processes will exit promptly, and also arrange to send query-cancel requests to the connected backends, in case they - are doing something long-running such as a <command>CREATE INDEX</>. + are doing something long-running such as a <command>CREATE INDEX</command>. </para> </listitem> <listitem> <para> - Fix error reporting in parallel <application>pg_dump</> - and <application>pg_restore</> (Tom Lane) + Fix error reporting in parallel <application>pg_dump</application> + and <application>pg_restore</application> (Tom Lane) </para> <para> - Previously, errors reported by <application>pg_dump</> - or <application>pg_restore</> worker processes might never make it to + Previously, errors reported by <application>pg_dump</application> + or <application>pg_restore</application> worker processes might never make it to the user's console, because the messages went through the master process, and there were various deadlock scenarios that would prevent the master process from passing on the messages. Instead, just print - everything to <literal>stderr</>. In some cases this will result in + everything to <literal>stderr</literal>. In some cases this will result in duplicate messages (for instance, if all the workers report a server shutdown), but that seems better than no message. </para> @@ -2322,8 +2322,8 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Ensure that parallel <application>pg_dump</> - or <application>pg_restore</> on Windows will shut down properly + Ensure that parallel <application>pg_dump</application> + or <application>pg_restore</application> on Windows will shut down properly after an error (Kyotaro Horiguchi) </para> @@ -2335,7 +2335,7 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Make <application>pg_dump</> behave better when built without zlib + Make <application>pg_dump</application> behave better when built without zlib support (Kyotaro Horiguchi) </para> @@ -2347,7 +2347,7 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Make <application>pg_basebackup</> accept <literal>-Z 0</> as + Make <application>pg_basebackup</application> accept <literal>-Z 0</literal> as specifying no compression (Fujii Masao) </para> </listitem> @@ -2368,13 +2368,13 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Be more predictable about reporting <quote>statement timeout</> - versus <quote>lock timeout</> (Tom Lane) + Be more predictable about reporting <quote>statement timeout</quote> + versus <quote>lock timeout</quote> (Tom Lane) </para> <para> On heavily loaded machines, the regression tests sometimes failed due - to reporting <quote>lock timeout</> even though the statement timeout + to reporting <quote>lock timeout</quote> even though the statement timeout should have occurred first. </para> </listitem> @@ -2394,7 +2394,7 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> Update our copy of the timezone code to match - IANA's <application>tzcode</> release 2016c (Tom Lane) + IANA's <application>tzcode</application> release 2016c (Tom Lane) </para> <para> @@ -2406,7 +2406,7 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Update time zone data files to <application>tzdata</> release 2016f + Update time zone data files to <application>tzdata</application> release 2016f for DST law changes in Kemerovo and Novosibirsk, plus historical corrections for Azerbaijan, Belarus, and Morocco. </para> @@ -2462,7 +2462,7 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; using OpenSSL within a single process and not all the code involved follows the same rules for when to clear the error queue. Failures have been reported specifically when a client application - uses SSL connections in <application>libpq</> concurrently with + uses SSL connections in <application>libpq</application> concurrently with SSL connections using the PHP, Python, or Ruby wrappers for OpenSSL. It's possible for similar problems to arise within the server as well, if an extension module establishes an outgoing SSL connection. @@ -2471,7 +2471,7 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Fix <quote>failed to build any <replaceable>N</>-way joins</quote> + Fix <quote>failed to build any <replaceable>N</replaceable>-way joins</quote> planner error with a full join enclosed in the right-hand side of a left join (Tom Lane) </para> @@ -2485,10 +2485,10 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <para> Given a three-or-more-way equivalence class of variables, such - as <literal>X.X = Y.Y = Z.Z</>, it was possible for the planner to omit + as <literal>X.X = Y.Y = Z.Z</literal>, it was possible for the planner to omit some of the tests needed to enforce that all the variables are actually equal, leading to join rows being output that didn't satisfy - the <literal>WHERE</> clauses. For various reasons, erroneous plans + the <literal>WHERE</literal> clauses. For various reasons, erroneous plans were seldom selected in practice, so that this bug has gone undetected for a long time. </para> @@ -2496,8 +2496,8 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Fix possible misbehavior of <literal>TH</>, <literal>th</>, - and <literal>Y,YYY</> format codes in <function>to_timestamp()</> + Fix possible misbehavior of <literal>TH</literal>, <literal>th</literal>, + and <literal>Y,YYY</literal> format codes in <function>to_timestamp()</function> (Tom Lane) </para> @@ -2509,28 +2509,28 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Fix dumping of rules and views in which the <replaceable>array</> - argument of a <literal><replaceable>value</> <replaceable>operator</> - ANY (<replaceable>array</>)</literal> construct is a sub-SELECT + Fix dumping of rules and views in which the <replaceable>array</replaceable> + argument of a <literal><replaceable>value</replaceable> <replaceable>operator</replaceable> + ANY (<replaceable>array</replaceable>)</literal> construct is a sub-SELECT (Tom Lane) </para> </listitem> <listitem> <para> - Make <application>pg_regress</> use a startup timeout from the - <envar>PGCTLTIMEOUT</> environment variable, if that's set (Tom Lane) + Make <application>pg_regress</application> use a startup timeout from the + <envar>PGCTLTIMEOUT</envar> environment variable, if that's set (Tom Lane) </para> <para> This is for consistency with a behavior recently added - to <application>pg_ctl</>; it eases automated testing on slow machines. + to <application>pg_ctl</application>; it eases automated testing on slow machines. </para> </listitem> <listitem> <para> - Fix <application>pg_upgrade</> to correctly restore extension + Fix <application>pg_upgrade</application> to correctly restore extension membership for operator families containing only one operator class (Tom Lane) </para> @@ -2538,20 +2538,20 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <para> In such a case, the operator family was restored into the new database, but it was no longer marked as part of the extension. This had no - immediate ill effects, but would cause later <application>pg_dump</> + immediate ill effects, but would cause later <application>pg_dump</application> runs to emit output that would cause (harmless) errors on restore. </para> </listitem> <listitem> <para> - Fix <application>pg_upgrade</> to not fail when new-cluster TOAST rules + Fix <application>pg_upgrade</application> to not fail when new-cluster TOAST rules differ from old (Tom Lane) </para> <para> - <application>pg_upgrade</> had special-case code to handle the - situation where the new <productname>PostgreSQL</> version thinks that + <application>pg_upgrade</application> had special-case code to handle the + situation where the new <productname>PostgreSQL</productname> version thinks that a table should have a TOAST table while the old version did not. That code was broken, so remove it, and instead do nothing in such cases; there seems no reason to believe that we can't get along fine without @@ -2586,22 +2586,22 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <listitem> <para> Reduce the number of SysV semaphores used by a build configured with - <option>--disable-spinlocks</> (Tom Lane) + <option>--disable-spinlocks</option> (Tom Lane) </para> </listitem> <listitem> <para> - Rename internal function <function>strtoi()</> - to <function>strtoint()</> to avoid conflict with a NetBSD library + Rename internal function <function>strtoi()</function> + to <function>strtoint()</function> to avoid conflict with a NetBSD library function (Thomas Munro) </para> </listitem> <listitem> <para> - Fix reporting of errors from <function>bind()</> - and <function>listen()</> system calls on Windows (Tom Lane) + Fix reporting of errors from <function>bind()</function> + and <function>listen()</function> system calls on Windows (Tom Lane) </para> </listitem> @@ -2614,19 +2614,19 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <listitem> <para> - Fix <function>putenv()</> to work properly with Visual Studio 2013 + Fix <function>putenv()</function> to work properly with Visual Studio 2013 (Michael Paquier) </para> </listitem> <listitem> <para> - Avoid possibly-unsafe use of Windows' <function>FormatMessage()</> + Avoid possibly-unsafe use of Windows' <function>FormatMessage()</function> function (Christian Ullrich) </para> <para> - Use the <literal>FORMAT_MESSAGE_IGNORE_INSERTS</> flag where + Use the <literal>FORMAT_MESSAGE_IGNORE_INSERTS</literal> flag where appropriate. No live bug is known to exist here, but it seems like a good idea to be careful. </para> @@ -2634,9 +2634,9 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <listitem> <para> - Update time zone data files to <application>tzdata</> release 2016d + Update time zone data files to <application>tzdata</application> release 2016d for DST law changes in Russia and Venezuela. There are new zone - names <literal>Europe/Kirov</> and <literal>Asia/Tomsk</> to reflect + names <literal>Europe/Kirov</literal> and <literal>Asia/Tomsk</literal> to reflect the fact that these regions now have different time zone histories from adjacent regions. </para> @@ -2683,56 +2683,56 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <listitem> <para> Fix incorrect handling of NULL index entries in - indexed <literal>ROW()</> comparisons (Tom Lane) + indexed <literal>ROW()</literal> comparisons (Tom Lane) </para> <para> An index search using a row comparison such as <literal>ROW(a, b) > - ROW('x', 'y')</> would stop upon reaching a NULL entry in - the <structfield>b</> column, ignoring the fact that there might be - non-NULL <structfield>b</> values associated with later values - of <structfield>a</>. + ROW('x', 'y')</literal> would stop upon reaching a NULL entry in + the <structfield>b</structfield> column, ignoring the fact that there might be + non-NULL <structfield>b</structfield> values associated with later values + of <structfield>a</structfield>. </para> </listitem> <listitem> <para> Avoid unlikely data-loss scenarios due to renaming files without - adequate <function>fsync()</> calls before and after (Michael Paquier, + adequate <function>fsync()</function> calls before and after (Michael Paquier, Tomas Vondra, Andres Freund) </para> </listitem> <listitem> <para> - Correctly handle cases where <literal>pg_subtrans</> is close to XID + Correctly handle cases where <literal>pg_subtrans</literal> is close to XID wraparound during server startup (Jeff Janes) </para> </listitem> <listitem> <para> - Fix corner-case crash due to trying to free <function>localeconv()</> + Fix corner-case crash due to trying to free <function>localeconv()</function> output strings more than once (Tom Lane) </para> </listitem> <listitem> <para> - Fix parsing of affix files for <literal>ispell</> dictionaries + Fix parsing of affix files for <literal>ispell</literal> dictionaries (Tom Lane) </para> <para> The code could go wrong if the affix file contained any characters whose byte length changes during case-folding, for - example <literal>I</> in Turkish UTF8 locales. + example <literal>I</literal> in Turkish UTF8 locales. </para> </listitem> <listitem> <para> - Avoid use of <function>sscanf()</> to parse <literal>ispell</> + Avoid use of <function>sscanf()</function> to parse <literal>ispell</literal> dictionary files (Artur Zakirov) </para> @@ -2758,27 +2758,27 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <listitem> <para> - Fix <application>psql</>'s tab completion logic to handle multibyte + Fix <application>psql</application>'s tab completion logic to handle multibyte characters properly (Kyotaro Horiguchi, Robert Haas) </para> </listitem> <listitem> <para> - Fix <application>psql</>'s tab completion for - <literal>SECURITY LABEL</> (Tom Lane) + Fix <application>psql</application>'s tab completion for + <literal>SECURITY LABEL</literal> (Tom Lane) </para> <para> - Pressing TAB after <literal>SECURITY LABEL</> might cause a crash + Pressing TAB after <literal>SECURITY LABEL</literal> might cause a crash or offering of inappropriate keywords. </para> </listitem> <listitem> <para> - Make <application>pg_ctl</> accept a wait timeout from the - <envar>PGCTLTIMEOUT</> environment variable, if none is specified on + Make <application>pg_ctl</application> accept a wait timeout from the + <envar>PGCTLTIMEOUT</envar> environment variable, if none is specified on the command line (Noah Misch) </para> @@ -2792,26 +2792,26 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <listitem> <para> Fix incorrect test for Windows service status - in <application>pg_ctl</> (Manuel Mathar) + in <application>pg_ctl</application> (Manuel Mathar) </para> <para> The previous set of minor releases attempted to - fix <application>pg_ctl</> to properly determine whether to send log + fix <application>pg_ctl</application> to properly determine whether to send log messages to Window's Event Log, but got the test backwards. </para> </listitem> <listitem> <para> - Fix <application>pgbench</> to correctly handle the combination - of <literal>-C</> and <literal>-M prepared</> options (Tom Lane) + Fix <application>pgbench</application> to correctly handle the combination + of <literal>-C</literal> and <literal>-M prepared</literal> options (Tom Lane) </para> </listitem> <listitem> <para> - In <application>pg_upgrade</>, skip creating a deletion script when + In <application>pg_upgrade</application>, skip creating a deletion script when the new data directory is inside the old data directory (Bruce Momjian) </para> @@ -2839,21 +2839,21 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <listitem> <para> Fix multiple mistakes in the statistics returned - by <filename>contrib/pgstattuple</>'s <function>pgstatindex()</> + by <filename>contrib/pgstattuple</filename>'s <function>pgstatindex()</function> function (Tom Lane) </para> </listitem> <listitem> <para> - Remove dependency on <literal>psed</> in MSVC builds, since it's no + Remove dependency on <literal>psed</literal> in MSVC builds, since it's no longer provided by core Perl (Michael Paquier, Andrew Dunstan) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2016c + Update time zone data files to <application>tzdata</application> release 2016c for DST law changes in Azerbaijan, Chile, Haiti, Palestine, and Russia (Altai, Astrakhan, Kirov, Sakhalin, Ulyanovsk regions), plus historical corrections for Lithuania, Moldova, and Russia @@ -2914,25 +2914,25 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <listitem> <para> - Perform an immediate shutdown if the <filename>postmaster.pid</> file + Perform an immediate shutdown if the <filename>postmaster.pid</filename> file is removed (Tom Lane) </para> <para> The postmaster now checks every minute or so - that <filename>postmaster.pid</> is still there and still contains its + that <filename>postmaster.pid</filename> is still there and still contains its own PID. If not, it performs an immediate shutdown, as though it had - received <systemitem>SIGQUIT</>. The main motivation for this change + received <systemitem>SIGQUIT</systemitem>. The main motivation for this change is to ensure that failed buildfarm runs will get cleaned up without manual intervention; but it also serves to limit the bad effects if a - DBA forcibly removes <filename>postmaster.pid</> and then starts a new + DBA forcibly removes <filename>postmaster.pid</filename> and then starts a new postmaster. </para> </listitem> <listitem> <para> - In <literal>SERIALIZABLE</> transaction isolation mode, serialization + In <literal>SERIALIZABLE</literal> transaction isolation mode, serialization anomalies could be missed due to race conditions during insertions (Kevin Grittner, Thomas Munro) </para> @@ -2941,7 +2941,7 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <listitem> <para> Fix failure to emit appropriate WAL records when doing <literal>ALTER - TABLE ... SET TABLESPACE</> for unlogged relations (Michael Paquier, + TABLE ... SET TABLESPACE</literal> for unlogged relations (Michael Paquier, Andres Freund) </para> @@ -2967,21 +2967,21 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <listitem> <para> - Fix <command>ALTER COLUMN TYPE</> to reconstruct inherited check + Fix <command>ALTER COLUMN TYPE</command> to reconstruct inherited check constraints properly (Tom Lane) </para> </listitem> <listitem> <para> - Fix <command>REASSIGN OWNED</> to change ownership of composite types + Fix <command>REASSIGN OWNED</command> to change ownership of composite types properly (Álvaro Herrera) </para> </listitem> <listitem> <para> - Fix <command>REASSIGN OWNED</> and <command>ALTER OWNER</> to correctly + Fix <command>REASSIGN OWNED</command> and <command>ALTER OWNER</command> to correctly update granted-permissions lists when changing owners of data types, foreign data wrappers, or foreign servers (Bruce Momjian, Álvaro Herrera) @@ -2990,7 +2990,7 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <listitem> <para> - Fix <command>REASSIGN OWNED</> to ignore foreign user mappings, + Fix <command>REASSIGN OWNED</command> to ignore foreign user mappings, rather than fail (Álvaro Herrera) </para> </listitem> @@ -3004,13 +3004,13 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <listitem> <para> - Fix planner's handling of <literal>LATERAL</> references (Tom + Fix planner's handling of <literal>LATERAL</literal> references (Tom Lane) </para> <para> This fixes some corner cases that led to <quote>failed to build any - N-way joins</> or <quote>could not devise a query plan</> planner + N-way joins</quote> or <quote>could not devise a query plan</quote> planner failures. </para> </listitem> @@ -3032,22 +3032,22 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <listitem> <para> - Speed up generation of unique table aliases in <command>EXPLAIN</> and + Speed up generation of unique table aliases in <command>EXPLAIN</command> and rule dumping, and ensure that generated aliases do not - exceed <literal>NAMEDATALEN</> (Tom Lane) + exceed <literal>NAMEDATALEN</literal> (Tom Lane) </para> </listitem> <listitem> <para> - Fix dumping of whole-row Vars in <literal>ROW()</> - and <literal>VALUES()</> lists (Tom Lane) + Fix dumping of whole-row Vars in <literal>ROW()</literal> + and <literal>VALUES()</literal> lists (Tom Lane) </para> </listitem> <listitem> <para> - Fix possible internal overflow in <type>numeric</> division + Fix possible internal overflow in <type>numeric</type> division (Dean Rasheed) </para> </listitem> @@ -3099,7 +3099,7 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <para> This causes the code to emit <quote>regular expression is too - complex</> errors in some cases that previously used unreasonable + complex</quote> errors in some cases that previously used unreasonable amounts of time and memory. </para> </listitem> @@ -3112,14 +3112,14 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <listitem> <para> - Make <literal>%h</> and <literal>%r</> escapes - in <varname>log_line_prefix</> work for messages emitted due - to <varname>log_connections</> (Tom Lane) + Make <literal>%h</literal> and <literal>%r</literal> escapes + in <varname>log_line_prefix</varname> work for messages emitted due + to <varname>log_connections</varname> (Tom Lane) </para> <para> - Previously, <literal>%h</>/<literal>%r</> started to work just after a - new session had emitted the <quote>connection received</> log message; + Previously, <literal>%h</literal>/<literal>%r</literal> started to work just after a + new session had emitted the <quote>connection received</quote> log message; now they work for that message too. </para> </listitem> @@ -3132,7 +3132,7 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <para> This oversight resulted in failure to recover from crashes - whenever <varname>logging_collector</> is turned on. + whenever <varname>logging_collector</varname> is turned on. </para> </listitem> @@ -3158,13 +3158,13 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <listitem> <para> - In <application>psql</>, ensure that <application>libreadline</>'s idea + In <application>psql</application>, ensure that <application>libreadline</application>'s idea of the screen size is updated when the terminal window size changes (Merlin Moncure) </para> <para> - Previously, <application>libreadline</> did not notice if the window + Previously, <application>libreadline</application> did not notice if the window was resized during query output, leading to strange behavior during later input of multiline queries. </para> @@ -3172,15 +3172,15 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <listitem> <para> - Fix <application>psql</>'s <literal>\det</> command to interpret its - pattern argument the same way as other <literal>\d</> commands with + Fix <application>psql</application>'s <literal>\det</literal> command to interpret its + pattern argument the same way as other <literal>\d</literal> commands with potentially schema-qualified patterns do (Reece Hart) </para> </listitem> <listitem> <para> - Avoid possible crash in <application>psql</>'s <literal>\c</> command + Avoid possible crash in <application>psql</application>'s <literal>\c</literal> command when previous connection was via Unix socket and command specifies a new hostname and same username (Tom Lane) </para> @@ -3188,21 +3188,21 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <listitem> <para> - In <literal>pg_ctl start -w</>, test child process status directly + In <literal>pg_ctl start -w</literal>, test child process status directly rather than relying on heuristics (Tom Lane, Michael Paquier) </para> <para> - Previously, <application>pg_ctl</> relied on an assumption that the new - postmaster would always create <filename>postmaster.pid</> within five + Previously, <application>pg_ctl</application> relied on an assumption that the new + postmaster would always create <filename>postmaster.pid</filename> within five seconds. But that can fail on heavily-loaded systems, - causing <application>pg_ctl</> to report incorrectly that the + causing <application>pg_ctl</application> to report incorrectly that the postmaster failed to start. </para> <para> Except on Windows, this change also means that a <literal>pg_ctl start - -w</> done immediately after another such command will now reliably + -w</literal> done immediately after another such command will now reliably fail, whereas previously it would report success if done within two seconds of the first command. </para> @@ -3210,23 +3210,23 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <listitem> <para> - In <literal>pg_ctl start -w</>, don't attempt to use a wildcard listen + In <literal>pg_ctl start -w</literal>, don't attempt to use a wildcard listen address to connect to the postmaster (Kondo Yuta) </para> <para> - On Windows, <application>pg_ctl</> would fail to detect postmaster - startup if <varname>listen_addresses</> is set to <literal>0.0.0.0</> - or <literal>::</>, because it would try to use that value verbatim as + On Windows, <application>pg_ctl</application> would fail to detect postmaster + startup if <varname>listen_addresses</varname> is set to <literal>0.0.0.0</literal> + or <literal>::</literal>, because it would try to use that value verbatim as the address to connect to, which doesn't work. Instead assume - that <literal>127.0.0.1</> or <literal>::1</>, respectively, is the + that <literal>127.0.0.1</literal> or <literal>::1</literal>, respectively, is the right thing to use. </para> </listitem> <listitem> <para> - In <application>pg_ctl</> on Windows, check service status to decide + In <application>pg_ctl</application> on Windows, check service status to decide where to send output, rather than checking if standard output is a terminal (Michael Paquier) </para> @@ -3234,18 +3234,18 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <listitem> <para> - In <application>pg_dump</> and <application>pg_basebackup</>, adopt + In <application>pg_dump</application> and <application>pg_basebackup</application>, adopt the GNU convention for handling tar-archive members exceeding 8GB (Tom Lane) </para> <para> - The POSIX standard for <literal>tar</> file format does not allow + The POSIX standard for <literal>tar</literal> file format does not allow archive member files to exceed 8GB, but most modern implementations - of <application>tar</> support an extension that fixes that. Adopt - this extension so that <application>pg_dump</> with <option>-Ft</> no + of <application>tar</application> support an extension that fixes that. Adopt + this extension so that <application>pg_dump</application> with <option>-Ft</option> no longer fails on tables with more than 8GB of data, and so - that <application>pg_basebackup</> can handle files larger than 8GB. + that <application>pg_basebackup</application> can handle files larger than 8GB. In addition, fix some portability issues that could cause failures for members between 4GB and 8GB on some platforms. Potentially these problems could cause unrecoverable data loss due to unreadable backup @@ -3255,51 +3255,51 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <listitem> <para> - Fix assorted corner-case bugs in <application>pg_dump</>'s processing + Fix assorted corner-case bugs in <application>pg_dump</application>'s processing of extension member objects (Tom Lane) </para> </listitem> <listitem> <para> - Make <application>pg_dump</> mark a view's triggers as needing to be + Make <application>pg_dump</application> mark a view's triggers as needing to be processed after its rule, to prevent possible failure during - parallel <application>pg_restore</> (Tom Lane) + parallel <application>pg_restore</application> (Tom Lane) </para> </listitem> <listitem> <para> Ensure that relation option values are properly quoted - in <application>pg_dump</> (Kouhei Sutou, Tom Lane) + in <application>pg_dump</application> (Kouhei Sutou, Tom Lane) </para> <para> A reloption value that isn't a simple identifier or number could lead to dump/reload failures due to syntax errors in CREATE statements - issued by <application>pg_dump</>. This is not an issue with any - reloption currently supported by core <productname>PostgreSQL</>, but + issued by <application>pg_dump</application>. This is not an issue with any + reloption currently supported by core <productname>PostgreSQL</productname>, but extensions could allow reloptions that cause the problem. </para> </listitem> <listitem> <para> - Avoid repeated password prompts during parallel <application>pg_dump</> + Avoid repeated password prompts during parallel <application>pg_dump</application> (Zeus Kronion) </para> </listitem> <listitem> <para> - Fix <application>pg_upgrade</>'s file-copying code to handle errors + Fix <application>pg_upgrade</application>'s file-copying code to handle errors properly on Windows (Bruce Momjian) </para> </listitem> <listitem> <para> - Install guards in <application>pgbench</> against corner-case overflow + Install guards in <application>pgbench</application> against corner-case overflow conditions during evaluation of script-specified division or modulo operators (Fabien Coelho, Michael Paquier) </para> @@ -3308,22 +3308,22 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <listitem> <para> Fix failure to localize messages emitted - by <application>pg_receivexlog</> and <application>pg_recvlogical</> + by <application>pg_receivexlog</application> and <application>pg_recvlogical</application> (Ioseph Kim) </para> </listitem> <listitem> <para> - Avoid dump/reload problems when using both <application>plpython2</> - and <application>plpython3</> (Tom Lane) + Avoid dump/reload problems when using both <application>plpython2</application> + and <application>plpython3</application> (Tom Lane) </para> <para> - In principle, both versions of <application>PL/Python</> can be used in + In principle, both versions of <application>PL/Python</application> can be used in the same database, though not in the same session (because the two - versions of <application>libpython</> cannot safely be used concurrently). - However, <application>pg_restore</> and <application>pg_upgrade</> both + versions of <application>libpython</application> cannot safely be used concurrently). + However, <application>pg_restore</application> and <application>pg_upgrade</application> both do things that can fall foul of the same-session restriction. Work around that by changing the timing of the check. </para> @@ -3331,42 +3331,42 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <listitem> <para> - Fix <application>PL/Python</> regression tests to pass with Python 3.5 + Fix <application>PL/Python</application> regression tests to pass with Python 3.5 (Peter Eisentraut) </para> </listitem> <listitem> <para> - Fix premature clearing of <application>libpq</>'s input buffer when + Fix premature clearing of <application>libpq</application>'s input buffer when socket EOF is seen (Tom Lane) </para> <para> - This mistake caused <application>libpq</> to sometimes not report the + This mistake caused <application>libpq</application> to sometimes not report the backend's final error message before reporting <quote>server closed the - connection unexpectedly</>. + connection unexpectedly</quote>. </para> </listitem> <listitem> <para> - Prevent certain <application>PL/Java</> parameters from being set by + Prevent certain <application>PL/Java</application> parameters from being set by non-superusers (Noah Misch) </para> <para> - This change mitigates a <application>PL/Java</> security bug - (CVE-2016-0766), which was fixed in <application>PL/Java</> by marking + This change mitigates a <application>PL/Java</application> security bug + (CVE-2016-0766), which was fixed in <application>PL/Java</application> by marking these parameters as superuser-only. To fix the security hazard for - sites that update <productname>PostgreSQL</> more frequently - than <application>PL/Java</>, make the core code aware of them also. + sites that update <productname>PostgreSQL</productname> more frequently + than <application>PL/Java</application>, make the core code aware of them also. </para> </listitem> <listitem> <para> - Improve <application>libpq</>'s handling of out-of-memory situations + Improve <application>libpq</application>'s handling of out-of-memory situations (Michael Paquier, Amit Kapila, Heikki Linnakangas) </para> </listitem> @@ -3374,36 +3374,36 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <listitem> <para> Fix order of arguments - in <application>ecpg</>-generated <literal>typedef</> statements + in <application>ecpg</application>-generated <literal>typedef</literal> statements (Michael Meskes) </para> </listitem> <listitem> <para> - Use <literal>%g</> not <literal>%f</> format - in <application>ecpg</>'s <function>PGTYPESnumeric_from_double()</> + Use <literal>%g</literal> not <literal>%f</literal> format + in <application>ecpg</application>'s <function>PGTYPESnumeric_from_double()</function> (Tom Lane) </para> </listitem> <listitem> <para> - Fix <application>ecpg</>-supplied header files to not contain comments + Fix <application>ecpg</application>-supplied header files to not contain comments continued from a preprocessor directive line onto the next line (Michael Meskes) </para> <para> - Such a comment is rejected by <application>ecpg</>. It's not yet clear - whether <application>ecpg</> itself should be changed. + Such a comment is rejected by <application>ecpg</application>. It's not yet clear + whether <application>ecpg</application> itself should be changed. </para> </listitem> <listitem> <para> - Fix <function>hstore_to_json_loose()</>'s test for whether - an <type>hstore</> value can be converted to a JSON number (Tom Lane) + Fix <function>hstore_to_json_loose()</function>'s test for whether + an <type>hstore</type> value can be converted to a JSON number (Tom Lane) </para> <para> @@ -3414,14 +3414,14 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <listitem> <para> - Ensure that <filename>contrib/pgcrypto</>'s <function>crypt()</> + Ensure that <filename>contrib/pgcrypto</filename>'s <function>crypt()</function> function can be interrupted by query cancel (Andreas Karlsson) </para> </listitem> <listitem> <para> - Accept <application>flex</> versions later than 2.5.x + Accept <application>flex</application> versions later than 2.5.x (Tom Lane, Michael Paquier) </para> @@ -3445,19 +3445,19 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <listitem> <para> - Install our <filename>missing</> script where PGXS builds can find it + Install our <filename>missing</filename> script where PGXS builds can find it (Jim Nasby) </para> <para> This allows sane behavior in a PGXS build done on a machine where build - tools such as <application>bison</> are missing. + tools such as <application>bison</application> are missing. </para> </listitem> <listitem> <para> - Ensure that <filename>dynloader.h</> is included in the installed + Ensure that <filename>dynloader.h</filename> is included in the installed header files in MSVC builds (Bruce Momjian, Michael Paquier) </para> </listitem> @@ -3465,11 +3465,11 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <listitem> <para> Add variant regression test expected-output file to match behavior of - current <application>libxml2</> (Tom Lane) + current <application>libxml2</application> (Tom Lane) </para> <para> - The fix for <application>libxml2</>'s CVE-2015-7499 causes it not to + The fix for <application>libxml2</application>'s CVE-2015-7499 causes it not to output error context reports in some cases where it used to do so. This seems to be a bug, but we'll probably have to live with it for some time, so work around it. @@ -3478,7 +3478,7 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <listitem> <para> - Update time zone data files to <application>tzdata</> release 2016a for + Update time zone data files to <application>tzdata</application> release 2016a for DST law changes in Cayman Islands, Metlakatla, and Trans-Baikal Territory (Zabaykalsky Krai), plus historical corrections for Pakistan. </para> @@ -3524,13 +3524,13 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <listitem> <para> - Guard against stack overflows in <type>json</> parsing + Guard against stack overflows in <type>json</type> parsing (Oskari Saarenmaa) </para> <para> - If an application constructs PostgreSQL <type>json</> - or <type>jsonb</> values from arbitrary user input, the application's + If an application constructs PostgreSQL <type>json</type> + or <type>jsonb</type> values from arbitrary user input, the application's users can reliably crash the PostgreSQL server, causing momentary denial of service. (CVE-2015-5289) </para> @@ -3538,8 +3538,8 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <listitem> <para> - Fix <filename>contrib/pgcrypto</> to detect and report - too-short <function>crypt()</> salts (Josh Kupershmidt) + Fix <filename>contrib/pgcrypto</filename> to detect and report + too-short <function>crypt()</function> salts (Josh Kupershmidt) </para> <para> @@ -3572,13 +3572,13 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <listitem> <para> - Fix insertion of relations into the relation cache <quote>init file</> + Fix insertion of relations into the relation cache <quote>init file</quote> (Tom Lane) </para> <para> An oversight in a patch in the most recent minor releases - caused <structname>pg_trigger_tgrelid_tgname_index</> to be omitted + caused <structname>pg_trigger_tgrelid_tgname_index</structname> to be omitted from the init file. Subsequent sessions detected this, then deemed the init file to be broken and silently ignored it, resulting in a significant degradation in session startup time. In addition to fixing @@ -3596,7 +3596,7 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <listitem> <para> - Improve <command>LISTEN</> startup time when there are many unread + Improve <command>LISTEN</command> startup time when there are many unread notifications (Matt Newell) </para> </listitem> @@ -3608,7 +3608,7 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 </para> <para> - This was seen primarily when restoring <application>pg_dump</> output + This was seen primarily when restoring <application>pg_dump</application> output for databases with many thousands of tables. </para> </listitem> @@ -3623,13 +3623,13 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 too many bugs in practice, both in the underlying OpenSSL library and in our usage of it. Renegotiation will be removed entirely in 9.5 and later. In the older branches, just change the default value - of <varname>ssl_renegotiation_limit</> to zero (disabled). + of <varname>ssl_renegotiation_limit</varname> to zero (disabled). </para> </listitem> <listitem> <para> - Lower the minimum values of the <literal>*_freeze_max_age</> parameters + Lower the minimum values of the <literal>*_freeze_max_age</literal> parameters (Andres Freund) </para> @@ -3641,7 +3641,7 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <listitem> <para> - Limit the maximum value of <varname>wal_buffers</> to 2GB to avoid + Limit the maximum value of <varname>wal_buffers</varname> to 2GB to avoid server crashes (Josh Berkus) </para> </listitem> @@ -3649,15 +3649,15 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <listitem> <para> Avoid logging complaints when a parameter that can only be set at - server start appears multiple times in <filename>postgresql.conf</>, - and fix counting of line numbers after an <literal>include_dir</> + server start appears multiple times in <filename>postgresql.conf</filename>, + and fix counting of line numbers after an <literal>include_dir</literal> directive (Tom Lane) </para> </listitem> <listitem> <para> - Fix rare internal overflow in multiplication of <type>numeric</> values + Fix rare internal overflow in multiplication of <type>numeric</type> values (Dean Rasheed) </para> </listitem> @@ -3665,21 +3665,21 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <listitem> <para> Guard against hard-to-reach stack overflows involving record types, - range types, <type>json</>, <type>jsonb</>, <type>tsquery</>, - <type>ltxtquery</> and <type>query_int</> (Noah Misch) + range types, <type>json</type>, <type>jsonb</type>, <type>tsquery</type>, + <type>ltxtquery</type> and <type>query_int</type> (Noah Misch) </para> </listitem> <listitem> <para> - Fix handling of <literal>DOW</> and <literal>DOY</> in datetime input + Fix handling of <literal>DOW</literal> and <literal>DOY</literal> in datetime input (Greg Stark) </para> <para> These tokens aren't meant to be used in datetime values, but previously they resulted in opaque internal error messages rather - than <quote>invalid input syntax</>. + than <quote>invalid input syntax</quote>. </para> </listitem> @@ -3692,7 +3692,7 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <listitem> <para> Add recursion depth protections to regular expression, <literal>SIMILAR - TO</>, and <literal>LIKE</> matching (Tom Lane) + TO</literal>, and <literal>LIKE</literal> matching (Tom Lane) </para> <para> @@ -3744,22 +3744,22 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <listitem> <para> - Fix <quote>unexpected out-of-memory situation during sort</> errors - when using tuplestores with small <varname>work_mem</> settings (Tom + Fix <quote>unexpected out-of-memory situation during sort</quote> errors + when using tuplestores with small <varname>work_mem</varname> settings (Tom Lane) </para> </listitem> <listitem> <para> - Fix very-low-probability stack overrun in <function>qsort</> (Tom Lane) + Fix very-low-probability stack overrun in <function>qsort</function> (Tom Lane) </para> </listitem> <listitem> <para> - Fix <quote>invalid memory alloc request size</> failure in hash joins - with large <varname>work_mem</> settings (Tomas Vondra, Tom Lane) + Fix <quote>invalid memory alloc request size</quote> failure in hash joins + with large <varname>work_mem</varname> settings (Tomas Vondra, Tom Lane) </para> </listitem> @@ -3772,9 +3772,9 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 These mistakes could lead to incorrect query plans that would give wrong answers, or to assertion failures in assert-enabled builds, or to odd planner errors such as <quote>could not devise a query plan for the - given query</>, <quote>could not find pathkey item to - sort</>, <quote>plan should not reference subplan's variable</>, - or <quote>failed to assign all NestLoopParams to plan nodes</>. + given query</quote>, <quote>could not find pathkey item to + sort</quote>, <quote>plan should not reference subplan's variable</quote>, + or <quote>failed to assign all NestLoopParams to plan nodes</quote>. Thanks are due to Andreas Seltenreich and Piotr Stefaniak for fuzz testing that exposed these problems. </para> @@ -3782,7 +3782,7 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <listitem> <para> - Improve planner's performance for <command>UPDATE</>/<command>DELETE</> + Improve planner's performance for <command>UPDATE</command>/<command>DELETE</command> on large inheritance sets (Tom Lane, Dean Rasheed) </para> </listitem> @@ -3803,12 +3803,12 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <para> During postmaster shutdown, ensure that per-socket lock files are removed and listen sockets are closed before we remove - the <filename>postmaster.pid</> file (Tom Lane) + the <filename>postmaster.pid</filename> file (Tom Lane) </para> <para> This avoids race-condition failures if an external script attempts to - start a new postmaster as soon as <literal>pg_ctl stop</> returns. + start a new postmaster as soon as <literal>pg_ctl stop</literal> returns. </para> </listitem> @@ -3835,7 +3835,7 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <listitem> <para> - Do not print a <literal>WARNING</> when an autovacuum worker is already + Do not print a <literal>WARNING</literal> when an autovacuum worker is already gone when we attempt to signal it, and reduce log verbosity for such signals (Tom Lane) </para> @@ -3872,7 +3872,7 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 </para> <para> - <command>VACUUM</> attempted to recycle such pages, but did so in a + <command>VACUUM</command> attempted to recycle such pages, but did so in a way that wasn't crash-safe. </para> </listitem> @@ -3880,44 +3880,44 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <listitem> <para> Fix off-by-one error that led to otherwise-harmless warnings - about <quote>apparent wraparound</> in subtrans/multixact truncation + about <quote>apparent wraparound</quote> in subtrans/multixact truncation (Thomas Munro) </para> </listitem> <listitem> <para> - Fix misreporting of <command>CONTINUE</> and <command>MOVE</> statement - types in <application>PL/pgSQL</>'s error context messages + Fix misreporting of <command>CONTINUE</command> and <command>MOVE</command> statement + types in <application>PL/pgSQL</application>'s error context messages (Pavel Stehule, Tom Lane) </para> </listitem> <listitem> <para> - Fix <application>PL/Perl</> to handle non-<acronym>ASCII</> error + Fix <application>PL/Perl</application> to handle non-<acronym>ASCII</acronym> error message texts correctly (Alex Hunsaker) </para> </listitem> <listitem> <para> - Fix <application>PL/Python</> crash when returning the string - representation of a <type>record</> result (Tom Lane) + Fix <application>PL/Python</application> crash when returning the string + representation of a <type>record</type> result (Tom Lane) </para> </listitem> <listitem> <para> - Fix some places in <application>PL/Tcl</> that neglected to check for - failure of <function>malloc()</> calls (Michael Paquier, Álvaro + Fix some places in <application>PL/Tcl</application> that neglected to check for + failure of <function>malloc()</function> calls (Michael Paquier, Álvaro Herrera) </para> </listitem> <listitem> <para> - In <filename>contrib/isn</>, fix output of ISBN-13 numbers that begin + In <filename>contrib/isn</filename>, fix output of ISBN-13 numbers that begin with 979 (Fabien Coelho) </para> @@ -3929,20 +3929,20 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <listitem> <para> - Improve <filename>contrib/postgres_fdw</>'s handling of + Improve <filename>contrib/postgres_fdw</filename>'s handling of collation-related decisions (Tom Lane) </para> <para> The main user-visible effect is expected to be that comparisons - involving <type>varchar</> columns will be sent to the remote server + involving <type>varchar</type> columns will be sent to the remote server for execution in more cases than before. </para> </listitem> <listitem> <para> - Improve <application>libpq</>'s handling of out-of-memory conditions + Improve <application>libpq</application>'s handling of out-of-memory conditions (Michael Paquier, Heikki Linnakangas) </para> </listitem> @@ -3950,64 +3950,64 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <listitem> <para> Fix memory leaks and missing out-of-memory checks - in <application>ecpg</> (Michael Paquier) + in <application>ecpg</application> (Michael Paquier) </para> </listitem> <listitem> <para> - Fix <application>psql</>'s code for locale-aware formatting of numeric + Fix <application>psql</application>'s code for locale-aware formatting of numeric output (Tom Lane) </para> <para> - The formatting code invoked by <literal>\pset numericlocale on</> + The formatting code invoked by <literal>\pset numericlocale on</literal> did the wrong thing for some uncommon cases such as numbers with an exponent but no decimal point. It could also mangle already-localized - output from the <type>money</> data type. + output from the <type>money</type> data type. </para> </listitem> <listitem> <para> - Prevent crash in <application>psql</>'s <command>\c</> command when + Prevent crash in <application>psql</application>'s <command>\c</command> command when there is no current connection (Noah Misch) </para> </listitem> <listitem> <para> - Make <application>pg_dump</> handle inherited <literal>NOT VALID</> + Make <application>pg_dump</application> handle inherited <literal>NOT VALID</literal> check constraints correctly (Tom Lane) </para> </listitem> <listitem> <para> - Fix selection of default <application>zlib</> compression level - in <application>pg_dump</>'s directory output format (Andrew Dunstan) + Fix selection of default <application>zlib</application> compression level + in <application>pg_dump</application>'s directory output format (Andrew Dunstan) </para> </listitem> <listitem> <para> - Ensure that temporary files created during a <application>pg_dump</> - run with <acronym>tar</>-format output are not world-readable (Michael + Ensure that temporary files created during a <application>pg_dump</application> + run with <acronym>tar</acronym>-format output are not world-readable (Michael Paquier) </para> </listitem> <listitem> <para> - Fix <application>pg_dump</> and <application>pg_upgrade</> to support - cases where the <literal>postgres</> or <literal>template1</> database + Fix <application>pg_dump</application> and <application>pg_upgrade</application> to support + cases where the <literal>postgres</literal> or <literal>template1</literal> database is in a non-default tablespace (Marti Raudsepp, Bruce Momjian) </para> </listitem> <listitem> <para> - Fix <application>pg_dump</> to handle object privileges sanely when + Fix <application>pg_dump</application> to handle object privileges sanely when dumping from a server too old to have a particular privilege type (Tom Lane) </para> @@ -4015,11 +4015,11 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <para> When dumping data types from pre-9.2 servers, and when dumping functions or procedural languages from pre-7.3 - servers, <application>pg_dump</> would - produce <command>GRANT</>/<command>REVOKE</> commands that revoked the + servers, <application>pg_dump</application> would + produce <command>GRANT</command>/<command>REVOKE</command> commands that revoked the owner's grantable privileges and instead granted all privileges - to <literal>PUBLIC</>. Since the privileges involved are - just <literal>USAGE</> and <literal>EXECUTE</>, this isn't a security + to <literal>PUBLIC</literal>. Since the privileges involved are + just <literal>USAGE</literal> and <literal>EXECUTE</literal>, this isn't a security problem, but it's certainly a surprising representation of the older systems' behavior. Fix it to leave the default privilege state alone in these cases. @@ -4028,18 +4028,18 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <listitem> <para> - Fix <application>pg_dump</> to dump shell types (Tom Lane) + Fix <application>pg_dump</application> to dump shell types (Tom Lane) </para> <para> Shell types (that is, not-yet-fully-defined types) aren't useful for - much, but nonetheless <application>pg_dump</> should dump them. + much, but nonetheless <application>pg_dump</application> should dump them. </para> </listitem> <listitem> <para> - Fix assorted minor memory leaks in <application>pg_dump</> and other + Fix assorted minor memory leaks in <application>pg_dump</application> and other client-side programs (Michael Paquier) </para> </listitem> @@ -4047,11 +4047,11 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <listitem> <para> Fix spinlock assembly code for PPC hardware to be compatible - with <acronym>AIX</>'s native assembler (Tom Lane) + with <acronym>AIX</acronym>'s native assembler (Tom Lane) </para> <para> - Building with <application>gcc</> didn't work if <application>gcc</> + Building with <application>gcc</application> didn't work if <application>gcc</application> had been configured to use the native assembler, which is becoming more common. </para> @@ -4059,14 +4059,14 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <listitem> <para> - On <acronym>AIX</>, test the <literal>-qlonglong</> compiler option + On <acronym>AIX</acronym>, test the <literal>-qlonglong</literal> compiler option rather than just assuming it's safe to use (Noah Misch) </para> </listitem> <listitem> <para> - On <acronym>AIX</>, use <literal>-Wl,-brtllib</> link option to allow + On <acronym>AIX</acronym>, use <literal>-Wl,-brtllib</literal> link option to allow symbols to be resolved at runtime (Noah Misch) </para> @@ -4078,38 +4078,38 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <listitem> <para> Avoid use of inline functions when compiling with - 32-bit <application>xlc</>, due to compiler bugs (Noah Misch) + 32-bit <application>xlc</application>, due to compiler bugs (Noah Misch) </para> </listitem> <listitem> <para> - Use <filename>librt</> for <function>sched_yield()</> when necessary, + Use <filename>librt</filename> for <function>sched_yield()</function> when necessary, which it is on some Solaris versions (Oskari Saarenmaa) </para> </listitem> <listitem> <para> - Fix Windows <filename>install.bat</> script to handle target directory + Fix Windows <filename>install.bat</filename> script to handle target directory names that contain spaces (Heikki Linnakangas) </para> </listitem> <listitem> <para> - Make the numeric form of the <productname>PostgreSQL</> version number - (e.g., <literal>90405</>) readily available to extension Makefiles, - as a variable named <varname>VERSION_NUM</> (Michael Paquier) + Make the numeric form of the <productname>PostgreSQL</productname> version number + (e.g., <literal>90405</literal>) readily available to extension Makefiles, + as a variable named <varname>VERSION_NUM</varname> (Michael Paquier) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2015g for + Update time zone data files to <application>tzdata</application> release 2015g for DST law changes in Cayman Islands, Fiji, Moldova, Morocco, Norfolk Island, North Korea, Turkey, and Uruguay. There is a new zone name - <literal>America/Fort_Nelson</> for the Canadian Northern Rockies. + <literal>America/Fort_Nelson</literal> for the Canadian Northern Rockies. </para> </listitem> @@ -4141,7 +4141,7 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <para> However, if you are upgrading an installation that was previously - upgraded using a <application>pg_upgrade</> version between 9.3.0 and + upgraded using a <application>pg_upgrade</application> version between 9.3.0 and 9.3.4 inclusive, see the first changelog entry below. </para> @@ -4164,52 +4164,52 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 </para> <para> - Recent <productname>PostgreSQL</> releases introduced mechanisms to + Recent <productname>PostgreSQL</productname> releases introduced mechanisms to protect against multixact wraparound, but some of that code did not account for the possibility that it would need to run during crash recovery, when the database may not be in a consistent state. This could result in failure to restart after a crash, or failure to start up a secondary server. The lingering effects of a previously-fixed - bug in <application>pg_upgrade</> could also cause such a failure, in - installations that had used <application>pg_upgrade</> versions + bug in <application>pg_upgrade</application> could also cause such a failure, in + installations that had used <application>pg_upgrade</application> versions between 9.3.0 and 9.3.4. </para> <para> - The <application>pg_upgrade</> bug in question was that it would - set <literal>oldestMultiXid</> to 1 in <filename>pg_control</> even + The <application>pg_upgrade</application> bug in question was that it would + set <literal>oldestMultiXid</literal> to 1 in <filename>pg_control</filename> even if the true value should be higher. With the fixes introduced in this release, such a situation will result in immediate emergency - autovacuuming until a correct <literal>oldestMultiXid</> value can be + autovacuuming until a correct <literal>oldestMultiXid</literal> value can be determined. If that would pose a hardship, users can avoid it by - doing manual vacuuming <emphasis>before</> upgrading to this release. + doing manual vacuuming <emphasis>before</emphasis> upgrading to this release. In detail: <orderedlist> <listitem> <para> - Check whether <application>pg_controldata</> reports <quote>Latest - checkpoint's oldestMultiXid</> to be 1. If not, there's nothing + Check whether <application>pg_controldata</application> reports <quote>Latest + checkpoint's oldestMultiXid</quote> to be 1. If not, there's nothing to do. </para> </listitem> <listitem> <para> - Look in <filename>PGDATA/pg_multixact/offsets</> to see if there's a - file named <filename>0000</>. If there is, there's nothing to do. + Look in <filename>PGDATA/pg_multixact/offsets</filename> to see if there's a + file named <filename>0000</filename>. If there is, there's nothing to do. </para> </listitem> <listitem> <para> Otherwise, for each table that has - <structname>pg_class</>.<structfield>relminmxid</> equal to 1, - <command>VACUUM</> that table with + <structname>pg_class</structname>.<structfield>relminmxid</structfield> equal to 1, + <command>VACUUM</command> that table with both <xref linkend="guc-vacuum-multixact-freeze-min-age"> and <xref linkend="guc-vacuum-multixact-freeze-table-age"> set to zero. (You can use the vacuum cost delay parameters described in <xref linkend="runtime-config-resource-vacuum-cost"> to reduce the performance consequences for concurrent sessions.) You must - use <productname>PostgreSQL</> 9.3.5 or later to perform this step. + use <productname>PostgreSQL</productname> 9.3.5 or later to perform this step. </para> </listitem> </orderedlist> @@ -4223,7 +4223,7 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <para> With just the wrong timing of concurrent activity, a <command>VACUUM - FULL</> on a system catalog might fail to update the <quote>init file</> + FULL</command> on a system catalog might fail to update the <quote>init file</quote> that's used to avoid cache-loading work for new sessions. This would result in later sessions being unable to access that catalog at all. This is a very ancient bug, but it's so hard to trigger that no @@ -4234,13 +4234,13 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <listitem> <para> Avoid deadlock between incoming sessions and <literal>CREATE/DROP - DATABASE</> (Tom Lane) + DATABASE</literal> (Tom Lane) </para> <para> A new session starting in a database that is the target of - a <command>DROP DATABASE</> command, or is the template for - a <command>CREATE DATABASE</> command, could cause the command to wait + a <command>DROP DATABASE</command> command, or is the template for + a <command>CREATE DATABASE</command> command, could cause the command to wait for five seconds and then fail, even if the new session would have exited before that. </para> @@ -4302,12 +4302,12 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 <listitem> <para> - Avoid failures while <function>fsync</>'ing data directory during + Avoid failures while <function>fsync</function>'ing data directory during crash restart (Abhijit Menon-Sen, Tom Lane) </para> <para> - In the previous minor releases we added a patch to <function>fsync</> + In the previous minor releases we added a patch to <function>fsync</function> everything in the data directory after a crash. Unfortunately its response to any error condition was to fail, thereby preventing the server from starting up, even when the problem was quite harmless. @@ -4319,28 +4319,28 @@ Branch: REL9_2_STABLE [37f30b251] 2016-04-18 13:19:52 -0400 </para> <para> - Also apply the same rules in <literal>initdb --sync-only</>. + Also apply the same rules in <literal>initdb --sync-only</literal>. This case is less critical but it should act similarly. </para> </listitem> <listitem> <para> - Fix <function>pg_get_functiondef()</> to show - functions' <literal>LEAKPROOF</> property, if set (Jeevan Chalke) + Fix <function>pg_get_functiondef()</function> to show + functions' <literal>LEAKPROOF</literal> property, if set (Jeevan Chalke) </para> </listitem> <listitem> <para> - Remove <application>configure</>'s check prohibiting linking to a - threaded <application>libpython</> - on <systemitem class="osname">OpenBSD</> (Tom Lane) + Remove <application>configure</application>'s check prohibiting linking to a + threaded <application>libpython</application> + on <systemitem class="osname">OpenBSD</systemitem> (Tom Lane) </para> <para> The failure this restriction was meant to prevent seems to not be a - problem anymore on current <systemitem class="osname">OpenBSD</> + problem anymore on current <systemitem class="osname">OpenBSD</systemitem> versions. </para> </listitem> @@ -4355,15 +4355,15 @@ Branch: REL9_0_STABLE [4dddf8552] 2015-05-21 20:41:55 -0400 <listitem> <para> - Allow <application>libpq</> to use TLS protocol versions beyond v1 + Allow <application>libpq</application> to use TLS protocol versions beyond v1 (Noah Misch) </para> <para> - For a long time, <application>libpq</> was coded so that the only SSL + For a long time, <application>libpq</application> was coded so that the only SSL protocol it would allow was TLS v1. Now that newer TLS versions are becoming popular, allow it to negotiate the highest commonly-supported - TLS version with the server. (<productname>PostgreSQL</> servers were + TLS version with the server. (<productname>PostgreSQL</productname> servers were already capable of such negotiation, so no change is needed on the server side.) This is a back-patch of a change already released in 9.4.0. @@ -4397,8 +4397,8 @@ Branch: REL9_0_STABLE [4dddf8552] 2015-05-21 20:41:55 -0400 </para> <para> - However, if you use <filename>contrib/citext</>'s - <function>regexp_matches()</> functions, see the changelog entry below + However, if you use <filename>contrib/citext</filename>'s + <function>regexp_matches()</function> functions, see the changelog entry below about that. </para> @@ -4436,7 +4436,7 @@ Branch: REL9_0_STABLE [4dddf8552] 2015-05-21 20:41:55 -0400 </para> <para> - Our replacement implementation of <function>snprintf()</> failed to + Our replacement implementation of <function>snprintf()</function> failed to check for errors reported by the underlying system library calls; the main case that might be missed is out-of-memory situations. In the worst case this might lead to information exposure, due to our @@ -4446,7 +4446,7 @@ Branch: REL9_0_STABLE [4dddf8552] 2015-05-21 20:41:55 -0400 </para> <para> - It remains possible that some calls of the <function>*printf()</> + It remains possible that some calls of the <function>*printf()</function> family of functions are vulnerable to information disclosure if an out-of-memory error occurs at just the wrong time. We judge the risk to not be large, but will continue analysis in this area. @@ -4456,15 +4456,15 @@ Branch: REL9_0_STABLE [4dddf8552] 2015-05-21 20:41:55 -0400 <listitem> <para> - In <filename>contrib/pgcrypto</>, uniformly report decryption failures - as <quote>Wrong key or corrupt data</> (Noah Misch) + In <filename>contrib/pgcrypto</filename>, uniformly report decryption failures + as <quote>Wrong key or corrupt data</quote> (Noah Misch) </para> <para> Previously, some cases of decryption with an incorrect key could report other error message texts. It has been shown that such variance in error reports can aid attackers in recovering keys from other systems. - While it's unknown whether <filename>pgcrypto</>'s specific behaviors + While it's unknown whether <filename>pgcrypto</filename>'s specific behaviors are likewise exploitable, it seems better to avoid the risk by using a one-size-fits-all message. (CVE-2015-3167) @@ -4479,7 +4479,7 @@ Branch: REL9_0_STABLE [4dddf8552] 2015-05-21 20:41:55 -0400 <para> Under certain usage patterns, the existing defenses against this might - be insufficient, allowing <filename>pg_multixact/members</> files to be + be insufficient, allowing <filename>pg_multixact/members</filename> files to be removed too early, resulting in data loss. The fix for this includes modifying the server to fail transactions that would result in overwriting old multixact member ID data, and @@ -4491,16 +4491,16 @@ Branch: REL9_0_STABLE [4dddf8552] 2015-05-21 20:41:55 -0400 <listitem> <para> - Fix incorrect declaration of <filename>contrib/citext</>'s - <function>regexp_matches()</> functions (Tom Lane) + Fix incorrect declaration of <filename>contrib/citext</filename>'s + <function>regexp_matches()</function> functions (Tom Lane) </para> <para> - These functions should return <type>setof text[]</>, like the core + These functions should return <type>setof text[]</type>, like the core functions they are wrappers for; but they were incorrectly declared as - returning just <type>text[]</>. This mistake had two results: first, + returning just <type>text[]</type>. This mistake had two results: first, if there was no match you got a scalar null result, whereas what you - should get is an empty set (zero rows). Second, the <literal>g</> flag + should get is an empty set (zero rows). Second, the <literal>g</literal> flag was effectively ignored, since you would get only one result array even if there were multiple matches. </para> @@ -4508,16 +4508,16 @@ Branch: REL9_0_STABLE [4dddf8552] 2015-05-21 20:41:55 -0400 <para> While the latter behavior is clearly a bug, there might be applications depending on the former behavior; therefore the function declarations - will not be changed by default until <productname>PostgreSQL</> 9.5. + will not be changed by default until <productname>PostgreSQL</productname> 9.5. In pre-9.5 branches, the old behavior exists in version 1.0 of - the <literal>citext</> extension, while we have provided corrected - declarations in version 1.1 (which is <emphasis>not</> installed by + the <literal>citext</literal> extension, while we have provided corrected + declarations in version 1.1 (which is <emphasis>not</emphasis> installed by default). To adopt the fix in pre-9.5 branches, execute - <literal>ALTER EXTENSION citext UPDATE TO '1.1'</> in each database in - which <literal>citext</> is installed. (You can also <quote>update</> + <literal>ALTER EXTENSION citext UPDATE TO '1.1'</literal> in each database in + which <literal>citext</literal> is installed. (You can also <quote>update</quote> back to 1.0 if you need to undo that.) Be aware that either update direction will require dropping and recreating any views or rules that - use <filename>citext</>'s <function>regexp_matches()</> functions. + use <filename>citext</filename>'s <function>regexp_matches()</function> functions. </para> </listitem> @@ -4559,7 +4559,7 @@ Branch: REL9_0_STABLE [4dddf8552] 2015-05-21 20:41:55 -0400 <para> This oversight in the planner has been observed to cause <quote>could - not find RelOptInfo for given relids</> errors, but it seems possible + not find RelOptInfo for given relids</quote> errors, but it seems possible that sometimes an incorrect query plan might get past that consistency check and result in silently-wrong query output. </para> @@ -4587,7 +4587,7 @@ Branch: REL9_0_STABLE [4dddf8552] 2015-05-21 20:41:55 -0400 <para> This oversight has been seen to lead to <quote>failed to join all - relations together</> errors in queries involving <literal>LATERAL</>, + relations together</quote> errors in queries involving <literal>LATERAL</literal>, and that might happen in other cases as well. </para> </listitem> @@ -4595,7 +4595,7 @@ Branch: REL9_0_STABLE [4dddf8552] 2015-05-21 20:41:55 -0400 <listitem> <para> Fix possible deadlock at startup - when <literal>max_prepared_transactions</> is too small + when <literal>max_prepared_transactions</literal> is too small (Heikki Linnakangas) </para> </listitem> @@ -4609,7 +4609,7 @@ Branch: REL9_0_STABLE [4dddf8552] 2015-05-21 20:41:55 -0400 <listitem> <para> - Recursively <function>fsync()</> the data directory after a crash + Recursively <function>fsync()</function> the data directory after a crash (Abhijit Menon-Sen, Robert Haas) </para> @@ -4629,19 +4629,19 @@ Branch: REL9_0_STABLE [4dddf8552] 2015-05-21 20:41:55 -0400 <listitem> <para> - Cope with unexpected signals in <function>LockBufferForCleanup()</> + Cope with unexpected signals in <function>LockBufferForCleanup()</function> (Andres Freund) </para> <para> This oversight could result in spurious errors about <quote>multiple - backends attempting to wait for pincount 1</>. + backends attempting to wait for pincount 1</quote>. </para> </listitem> <listitem> <para> - Fix crash when doing <literal>COPY IN</> to a table with check + Fix crash when doing <literal>COPY IN</literal> to a table with check constraints that contain whole-row references (Tom Lane) </para> @@ -4688,18 +4688,18 @@ Branch: REL9_0_STABLE [4dddf8552] 2015-05-21 20:41:55 -0400 </para> <para> - <command>ANALYZE</> executes index expressions many times; if there are + <command>ANALYZE</command> executes index expressions many times; if there are slow functions in such an expression, it's desirable to be able to - cancel the <command>ANALYZE</> before that loop finishes. + cancel the <command>ANALYZE</command> before that loop finishes. </para> </listitem> <listitem> <para> - Ensure <structfield>tableoid</> of a foreign table is reported - correctly when a <literal>READ COMMITTED</> recheck occurs after - locking rows in <command>SELECT FOR UPDATE</>, <command>UPDATE</>, - or <command>DELETE</> (Etsuro Fujita) + Ensure <structfield>tableoid</structfield> of a foreign table is reported + correctly when a <literal>READ COMMITTED</literal> recheck occurs after + locking rows in <command>SELECT FOR UPDATE</command>, <command>UPDATE</command>, + or <command>DELETE</command> (Etsuro Fujita) </para> </listitem> @@ -4719,20 +4719,20 @@ Branch: REL9_0_STABLE [4dddf8552] 2015-05-21 20:41:55 -0400 <listitem> <para> - Recommend setting <literal>include_realm</> to 1 when using + Recommend setting <literal>include_realm</literal> to 1 when using Kerberos/GSSAPI/SSPI authentication (Stephen Frost) </para> <para> Without this, identically-named users from different realms cannot be distinguished. For the moment this is only a documentation change, but - it will become the default setting in <productname>PostgreSQL</> 9.5. + it will become the default setting in <productname>PostgreSQL</productname> 9.5. </para> </listitem> <listitem> <para> - Remove code for matching IPv4 <filename>pg_hba.conf</> entries to + Remove code for matching IPv4 <filename>pg_hba.conf</filename> entries to IPv4-in-IPv6 addresses (Tom Lane) </para> @@ -4745,20 +4745,20 @@ Branch: REL9_0_STABLE [4dddf8552] 2015-05-21 20:41:55 -0400 crashes on some systems, so let's just remove it rather than fix it. (Had we chosen to fix it, that would make for a subtle and potentially security-sensitive change in the effective meaning of - IPv4 <filename>pg_hba.conf</> entries, which does not seem like a good + IPv4 <filename>pg_hba.conf</filename> entries, which does not seem like a good thing to do in minor releases.) </para> </listitem> <listitem> <para> - Report WAL flush, not insert, position in <literal>IDENTIFY_SYSTEM</> + Report WAL flush, not insert, position in <literal>IDENTIFY_SYSTEM</literal> replication command (Heikki Linnakangas) </para> <para> This avoids a possible startup failure - in <application>pg_receivexlog</>. + in <application>pg_receivexlog</application>. </para> </listitem> @@ -4766,14 +4766,14 @@ Branch: REL9_0_STABLE [4dddf8552] 2015-05-21 20:41:55 -0400 <para> While shutting down service on Windows, periodically send status updates to the Service Control Manager to prevent it from killing the - service too soon; and ensure that <application>pg_ctl</> will wait for + service too soon; and ensure that <application>pg_ctl</application> will wait for shutdown (Krystian Bigaj) </para> </listitem> <listitem> <para> - Reduce risk of network deadlock when using <application>libpq</>'s + Reduce risk of network deadlock when using <application>libpq</application>'s non-blocking mode (Heikki Linnakangas) </para> @@ -4782,32 +4782,32 @@ Branch: REL9_0_STABLE [4dddf8552] 2015-05-21 20:41:55 -0400 buffer every so often, in case the server has sent enough response data to cause it to block on output. (A typical scenario is that the server is sending a stream of NOTICE messages during <literal>COPY FROM - STDIN</>.) This worked properly in the normal blocking mode, but not - so much in non-blocking mode. We've modified <application>libpq</> + STDIN</literal>.) This worked properly in the normal blocking mode, but not + so much in non-blocking mode. We've modified <application>libpq</application> to opportunistically drain input when it can, but a full defense against this problem requires application cooperation: the application should watch for socket read-ready as well as write-ready conditions, - and be sure to call <function>PQconsumeInput()</> upon read-ready. + and be sure to call <function>PQconsumeInput()</function> upon read-ready. </para> </listitem> <listitem> <para> - In <application>libpq</>, fix misparsing of empty values in URI + In <application>libpq</application>, fix misparsing of empty values in URI connection strings (Thomas Fanghaenel) </para> </listitem> <listitem> <para> - Fix array handling in <application>ecpg</> (Michael Meskes) + Fix array handling in <application>ecpg</application> (Michael Meskes) </para> </listitem> <listitem> <para> - Fix <application>psql</> to sanely handle URIs and conninfo strings as - the first parameter to <command>\connect</> + Fix <application>psql</application> to sanely handle URIs and conninfo strings as + the first parameter to <command>\connect</command> (David Fetter, Andrew Dunstan, Álvaro Herrera) </para> @@ -4820,38 +4820,38 @@ Branch: REL9_0_STABLE [4dddf8552] 2015-05-21 20:41:55 -0400 <listitem> <para> - Suppress incorrect complaints from <application>psql</> on some - platforms that it failed to write <filename>~/.psql_history</> at exit + Suppress incorrect complaints from <application>psql</application> on some + platforms that it failed to write <filename>~/.psql_history</filename> at exit (Tom Lane) </para> <para> This misbehavior was caused by a workaround for a bug in very old - (pre-2006) versions of <application>libedit</>. We fixed it by + (pre-2006) versions of <application>libedit</application>. We fixed it by removing the workaround, which will cause a similar failure to appear - for anyone still using such versions of <application>libedit</>. - Recommendation: upgrade that library, or use <application>libreadline</>. + for anyone still using such versions of <application>libedit</application>. + Recommendation: upgrade that library, or use <application>libreadline</application>. </para> </listitem> <listitem> <para> - Fix <application>pg_dump</>'s rule for deciding which casts are + Fix <application>pg_dump</application>'s rule for deciding which casts are system-provided casts that should not be dumped (Tom Lane) </para> </listitem> <listitem> <para> - In <application>pg_dump</>, fix failure to honor <literal>-Z</> - compression level option together with <literal>-Fd</> + In <application>pg_dump</application>, fix failure to honor <literal>-Z</literal> + compression level option together with <literal>-Fd</literal> (Michael Paquier) </para> </listitem> <listitem> <para> - Make <application>pg_dump</> consider foreign key relationships + Make <application>pg_dump</application> consider foreign key relationships between extension configuration tables while choosing dump order (Gilles Darold, Michael Paquier, Stephen Frost) </para> @@ -4864,21 +4864,21 @@ Branch: REL9_0_STABLE [4dddf8552] 2015-05-21 20:41:55 -0400 <listitem> <para> - Avoid possible <application>pg_dump</> failure when concurrent sessions + Avoid possible <application>pg_dump</application> failure when concurrent sessions are creating and dropping temporary functions (Tom Lane) </para> </listitem> <listitem> <para> - Fix dumping of views that are just <literal>VALUES(...)</> but have + Fix dumping of views that are just <literal>VALUES(...)</literal> but have column aliases (Tom Lane) </para> </listitem> <listitem> <para> - In <application>pg_upgrade</>, force timeline 1 in the new cluster + In <application>pg_upgrade</application>, force timeline 1 in the new cluster (Bruce Momjian) </para> @@ -4890,7 +4890,7 @@ Branch: REL9_0_STABLE [4dddf8552] 2015-05-21 20:41:55 -0400 <listitem> <para> - In <application>pg_upgrade</>, check for improperly non-connectable + In <application>pg_upgrade</application>, check for improperly non-connectable databases before proceeding (Bruce Momjian) </para> @@ -4898,28 +4898,28 @@ Branch: REL9_0_STABLE [4dddf8552] 2015-05-21 20:41:55 -0400 <listitem> <para> - In <application>pg_upgrade</>, quote directory paths - properly in the generated <literal>delete_old_cluster</> script + In <application>pg_upgrade</application>, quote directory paths + properly in the generated <literal>delete_old_cluster</literal> script (Bruce Momjian) </para> </listitem> <listitem> <para> - In <application>pg_upgrade</>, preserve database-level freezing info + In <application>pg_upgrade</application>, preserve database-level freezing info properly (Bruce Momjian) </para> <para> This oversight could cause missing-clog-file errors for tables within - the <literal>postgres</> and <literal>template1</> databases. + the <literal>postgres</literal> and <literal>template1</literal> databases. </para> </listitem> <listitem> <para> - Run <application>pg_upgrade</> and <application>pg_resetxlog</> with + Run <application>pg_upgrade</application> and <application>pg_resetxlog</application> with restricted privileges on Windows, so that they don't fail when run by an administrator (Muhammad Asif Naeem) </para> @@ -4927,15 +4927,15 @@ Branch: REL9_0_STABLE [4dddf8552] 2015-05-21 20:41:55 -0400 <listitem> <para> - Improve handling of <function>readdir()</> failures when scanning - directories in <application>initdb</> and <application>pg_basebackup</> + Improve handling of <function>readdir()</function> failures when scanning + directories in <application>initdb</application> and <application>pg_basebackup</application> (Marco Nenciarini) </para> </listitem> <listitem> <para> - Fix slow sorting algorithm in <filename>contrib/intarray</> (Tom Lane) + Fix slow sorting algorithm in <filename>contrib/intarray</filename> (Tom Lane) </para> </listitem> @@ -4953,7 +4953,7 @@ Branch: REL9_0_STABLE [4dddf8552] 2015-05-21 20:41:55 -0400 <listitem> <para> - Update time zone data files to <application>tzdata</> release 2015d + Update time zone data files to <application>tzdata</application> release 2015d for DST law changes in Egypt, Mongolia, and Palestine, plus historical changes in Canada and Chile. Also adopt revised zone abbreviations for the America/Adak zone (HST/HDT not HAST/HADT). @@ -4988,11 +4988,11 @@ Branch: REL9_0_STABLE [4dddf8552] 2015-05-21 20:41:55 -0400 <para> However, if you are a Windows user and are using the <quote>Norwegian - (Bokmål)</> locale, manual action is needed after the upgrade to - replace any <quote>Norwegian (Bokmål)_Norway</> locale names stored - in <productname>PostgreSQL</> system catalogs with the plain-ASCII - alias <quote>Norwegian_Norway</>. For details see - <ulink url="http://wiki.postgresql.org/wiki/Changes_To_Norwegian_Locale"></> + (Bokmål)</quote> locale, manual action is needed after the upgrade to + replace any <quote>Norwegian (Bokmål)_Norway</quote> locale names stored + in <productname>PostgreSQL</productname> system catalogs with the plain-ASCII + alias <quote>Norwegian_Norway</quote>. For details see + <ulink url="http://wiki.postgresql.org/wiki/Changes_To_Norwegian_Locale"></ulink> </para> <para> @@ -5026,15 +5026,15 @@ Branch: REL9_0_STABLE [56b970f2e] 2015-02-02 10:00:52 -0500 <listitem> <para> - Fix buffer overruns in <function>to_char()</> + Fix buffer overruns in <function>to_char()</function> (Bruce Momjian) </para> <para> - When <function>to_char()</> processes a numeric formatting template - calling for a large number of digits, <productname>PostgreSQL</> + When <function>to_char()</function> processes a numeric formatting template + calling for a large number of digits, <productname>PostgreSQL</productname> would read past the end of a buffer. When processing a crafted - timestamp formatting template, <productname>PostgreSQL</> would write + timestamp formatting template, <productname>PostgreSQL</productname> would write past the end of a buffer. Either case could crash the server. We have not ruled out the possibility of attacks that lead to privilege escalation, though they seem unlikely. @@ -5054,27 +5054,27 @@ Branch: REL9_0_STABLE [9e05c5063] 2015-02-02 10:00:52 -0500 <listitem> <para> - Fix buffer overrun in replacement <function>*printf()</> functions + Fix buffer overrun in replacement <function>*printf()</function> functions (Tom Lane) </para> <para> - <productname>PostgreSQL</> includes a replacement implementation - of <function>printf</> and related functions. This code will overrun + <productname>PostgreSQL</productname> includes a replacement implementation + of <function>printf</function> and related functions. This code will overrun a stack buffer when formatting a floating point number (conversion - specifiers <literal>e</>, <literal>E</>, <literal>f</>, <literal>F</>, - <literal>g</> or <literal>G</>) with requested precision greater than + specifiers <literal>e</literal>, <literal>E</literal>, <literal>f</literal>, <literal>F</literal>, + <literal>g</literal> or <literal>G</literal>) with requested precision greater than about 500. This will crash the server, and we have not ruled out the possibility of attacks that lead to privilege escalation. A database user can trigger such a buffer overrun through - the <function>to_char()</> SQL function. While that is the only - affected core <productname>PostgreSQL</> functionality, extension + the <function>to_char()</function> SQL function. While that is the only + affected core <productname>PostgreSQL</productname> functionality, extension modules that use printf-family functions may be at risk as well. </para> <para> - This issue primarily affects <productname>PostgreSQL</> on Windows. - <productname>PostgreSQL</> uses the system implementation of these + This issue primarily affects <productname>PostgreSQL</productname> on Windows. + <productname>PostgreSQL</productname> uses the system implementation of these functions where adequate, which it is on other modern platforms. (CVE-2015-0242) </para> @@ -5099,12 +5099,12 @@ Branch: REL9_0_STABLE [0a3ee8a5f] 2015-02-02 10:00:52 -0500 <listitem> <para> - Fix buffer overruns in <filename>contrib/pgcrypto</> + Fix buffer overruns in <filename>contrib/pgcrypto</filename> (Marko Tiikkaja, Noah Misch) </para> <para> - Errors in memory size tracking within the <filename>pgcrypto</> + Errors in memory size tracking within the <filename>pgcrypto</filename> module permitted stack buffer overruns and improper dependence on the contents of uninitialized memory. The buffer overrun cases can crash the server, and we have not ruled out the possibility of @@ -5165,7 +5165,7 @@ Branch: REL9_0_STABLE [3a2063369] 2015-01-28 12:33:29 -0500 <para> Some server error messages show the values of columns that violate a constraint, such as a unique constraint. If the user does not have - <literal>SELECT</> privilege on all columns of the table, this could + <literal>SELECT</literal> privilege on all columns of the table, this could mean exposing values that the user should not be able to see. Adjust the code so that values are displayed only when they came from the SQL command or could be selected by the user. @@ -5214,14 +5214,14 @@ Branch: REL9_2_STABLE [6bf343c6e] 2015-01-16 13:10:23 +0200 <listitem> <para> - Cope with the Windows locale named <quote>Norwegian (Bokmål)</> + Cope with the Windows locale named <quote>Norwegian (Bokmål)</quote> (Heikki Linnakangas) </para> <para> Non-ASCII locale names are problematic since it's not clear what encoding they should be represented in. Map the troublesome locale - name to a plain-ASCII alias, <quote>Norwegian_Norway</>. + name to a plain-ASCII alias, <quote>Norwegian_Norway</quote>. </para> </listitem> @@ -5236,7 +5236,7 @@ Branch: REL9_0_STABLE [45a607d5c] 2014-11-04 13:24:26 -0500 <listitem> <para> Avoid possible data corruption if <command>ALTER DATABASE SET - TABLESPACE</> is used to move a database to a new tablespace and then + TABLESPACE</command> is used to move a database to a new tablespace and then shortly later move it back to its original tablespace (Tom Lane) </para> </listitem> @@ -5256,14 +5256,14 @@ Branch: REL9_0_STABLE [73f950fc8] 2014-10-30 13:03:39 -0400 <listitem> <para> - Avoid corrupting tables when <command>ANALYZE</> inside a transaction + Avoid corrupting tables when <command>ANALYZE</command> inside a transaction is rolled back (Andres Freund, Tom Lane, Michael Paquier) </para> <para> If the failing transaction had earlier removed the last index, rule, or trigger from the table, the table would be left in a corrupted state - with the relevant <structname>pg_class</> flags not set though they + with the relevant <structname>pg_class</structname> flags not set though they should be. </para> </listitem> @@ -5278,8 +5278,8 @@ Branch: REL9_1_STABLE [d5fef87e9] 2014-10-20 23:47:45 +0200 <listitem> <para> Ensure that unlogged tables are copied correctly - during <command>CREATE DATABASE</> or <command>ALTER DATABASE SET - TABLESPACE</> (Pavan Deolasee, Andres Freund) + during <command>CREATE DATABASE</command> or <command>ALTER DATABASE SET + TABLESPACE</command> (Pavan Deolasee, Andres Freund) </para> </listitem> @@ -5291,12 +5291,12 @@ Branch: REL9_3_STABLE [e35db342a] 2014-09-22 16:19:59 -0400 <listitem> <para> Fix incorrect processing - of <structname>CreateEventTrigStmt</>.<structfield>eventname</> (Petr + of <structname>CreateEventTrigStmt</structname>.<structfield>eventname</structfield> (Petr Jelinek) </para> <para> - This could result in misbehavior if <command>CREATE EVENT TRIGGER</> + This could result in misbehavior if <command>CREATE EVENT TRIGGER</command> were executed as a prepared query, or via extended query protocol. </para> </listitem> @@ -5310,7 +5310,7 @@ Branch: REL9_1_STABLE [94d5d57d5] 2014-11-11 17:00:28 -0500 <listitem> <para> - Fix <command>DROP</>'s dependency searching to correctly handle the + Fix <command>DROP</command>'s dependency searching to correctly handle the case where a table column is recursively visited before its table (Petr Jelinek, Tom Lane) </para> @@ -5318,7 +5318,7 @@ Branch: REL9_1_STABLE [94d5d57d5] 2014-11-11 17:00:28 -0500 <para> This case is only known to arise when an extension creates both a datatype and a table using that datatype. The faulty code might - refuse a <command>DROP EXTENSION</> unless <literal>CASCADE</> is + refuse a <command>DROP EXTENSION</command> unless <literal>CASCADE</literal> is specified, which should not be required. </para> </listitem> @@ -5340,7 +5340,7 @@ Branch: REL9_0_STABLE [5308e085b] 2015-01-15 18:52:38 -0500 </para> <para> - In <literal>READ COMMITTED</> mode, queries that lock or update + In <literal>READ COMMITTED</literal> mode, queries that lock or update recently-updated rows could crash as a result of this bug. </para> </listitem> @@ -5369,8 +5369,8 @@ Branch: REL9_3_STABLE [54a8abc2b] 2015-01-04 15:48:29 -0300 <listitem> <para> Fix failure to wait when a transaction tries to acquire a <literal>FOR - NO KEY EXCLUSIVE</> tuple lock, while multiple other transactions - currently hold <literal>FOR SHARE</> locks (Álvaro Herrera) + NO KEY EXCLUSIVE</literal> tuple lock, while multiple other transactions + currently hold <literal>FOR SHARE</literal> locks (Álvaro Herrera) </para> </listitem> @@ -5384,15 +5384,15 @@ Branch: REL9_0_STABLE [662eebdc6] 2014-12-11 21:02:41 -0500 <listitem> <para> - Fix planning of <command>SELECT FOR UPDATE</> when using a partial + Fix planning of <command>SELECT FOR UPDATE</command> when using a partial index on a child table (Kyotaro Horiguchi) </para> <para> - In <literal>READ COMMITTED</> mode, <command>SELECT FOR UPDATE</> must - also recheck the partial index's <literal>WHERE</> condition when + In <literal>READ COMMITTED</literal> mode, <command>SELECT FOR UPDATE</command> must + also recheck the partial index's <literal>WHERE</literal> condition when rechecking a recently-updated row to see if it still satisfies the - query's <literal>WHERE</> condition. This requirement was missed if the + query's <literal>WHERE</literal> condition. This requirement was missed if the index belonged to an inheritance child table, so that it was possible to incorrectly return rows that no longer satisfy the query condition. </para> @@ -5408,12 +5408,12 @@ Branch: REL9_0_STABLE [f5e4e92fb] 2014-12-11 19:37:17 -0500 <listitem> <para> - Fix corner case wherein <command>SELECT FOR UPDATE</> could return a row + Fix corner case wherein <command>SELECT FOR UPDATE</command> could return a row twice, and possibly miss returning other rows (Tom Lane) </para> <para> - In <literal>READ COMMITTED</> mode, a <command>SELECT FOR UPDATE</> + In <literal>READ COMMITTED</literal> mode, a <command>SELECT FOR UPDATE</command> that is scanning an inheritance tree could incorrectly return a row from a prior child table instead of the one it should return from a later child table. @@ -5429,7 +5429,7 @@ Branch: REL9_3_STABLE [939f0fb67] 2015-01-15 13:18:19 -0500 <listitem> <para> - Improve performance of <command>EXPLAIN</> with large range tables + Improve performance of <command>EXPLAIN</command> with large range tables (Tom Lane) </para> </listitem> @@ -5445,7 +5445,7 @@ Branch: REL9_0_STABLE [4ff49746e] 2014-08-09 13:46:52 -0400 <listitem> <para> Reject duplicate column names in the referenced-columns list of - a <literal>FOREIGN KEY</> declaration (David Rowley) + a <literal>FOREIGN KEY</literal> declaration (David Rowley) </para> <para> @@ -5462,7 +5462,7 @@ Branch: REL9_3_STABLE [6306d0712] 2014-07-22 13:30:14 -0400 <listitem> <para> - Re-enable error for <literal>SELECT ... OFFSET -1</> (Tom Lane) + Re-enable error for <literal>SELECT ... OFFSET -1</literal> (Tom Lane) </para> <para> @@ -5499,7 +5499,7 @@ Branch: REL9_3_STABLE [8571ecb24] 2014-12-02 15:02:43 -0500 <listitem> <para> - Fix <function>json_agg()</> to not return extra trailing right + Fix <function>json_agg()</function> to not return extra trailing right brackets in its result (Tom Lane) </para> </listitem> @@ -5514,7 +5514,7 @@ Branch: REL9_0_STABLE [26f8a4691] 2014-09-11 23:31:06 -0400 <listitem> <para> - Fix bugs in raising a <type>numeric</> value to a large integral power + Fix bugs in raising a <type>numeric</type> value to a large integral power (Tom Lane) </para> @@ -5535,19 +5535,19 @@ Branch: REL9_0_STABLE [e6550626c] 2014-12-01 15:25:18 -0500 <listitem> <para> - In <function>numeric_recv()</>, truncate away any fractional digits - that would be hidden according to the value's <literal>dscale</> field + In <function>numeric_recv()</function>, truncate away any fractional digits + that would be hidden according to the value's <literal>dscale</literal> field (Tom Lane) </para> <para> - A <type>numeric</> value's display scale (<literal>dscale</>) should + A <type>numeric</type> value's display scale (<literal>dscale</literal>) should never be less than the number of nonzero fractional digits; but apparently there's at least one broken client application that - transmits binary <type>numeric</> values in which that's true. + transmits binary <type>numeric</type> values in which that's true. This leads to strange behavior since the extra digits are taken into account by arithmetic operations even though they aren't printed. - The least risky fix seems to be to truncate away such <quote>hidden</> + The least risky fix seems to be to truncate away such <quote>hidden</quote> digits on receipt, so that the value is indeed what it prints as. </para> </listitem> @@ -5566,7 +5566,7 @@ Branch: REL9_2_STABLE [3359a818c] 2014-09-23 20:25:39 -0400 <para> Matching would often fail when the number of allowed iterations is - limited by a <literal>?</> quantifier or a bound expression. + limited by a <literal>?</literal> quantifier or a bound expression. </para> </listitem> @@ -5601,7 +5601,7 @@ Branch: REL9_0_STABLE [10059c2da] 2014-10-27 10:51:38 +0200 <listitem> <para> - Fix bugs in <type>tsquery</> <literal>@></> <type>tsquery</> + Fix bugs in <type>tsquery</type> <literal>@></literal> <type>tsquery</type> operator (Heikki Linnakangas) </para> @@ -5658,14 +5658,14 @@ Branch: REL9_0_STABLE [cebb3f032] 2015-01-17 22:37:32 -0500 <listitem> <para> - Fix namespace handling in <function>xpath()</> (Ali Akbar) + Fix namespace handling in <function>xpath()</function> (Ali Akbar) </para> <para> - Previously, the <type>xml</> value resulting from - an <function>xpath()</> call would not have namespace declarations if + Previously, the <type>xml</type> value resulting from + an <function>xpath()</function> call would not have namespace declarations if the namespace declarations were attached to an ancestor element in the - input <type>xml</> value, rather than to the specific element being + input <type>xml</type> value, rather than to the specific element being returned. Propagate the ancestral declaration so that the result is correct when considered in isolation. </para> @@ -5685,7 +5685,7 @@ Branch: REL9_2_STABLE [19ccaf9d4] 2014-11-10 15:21:26 -0500 </para> <para> - In some contexts, constructs like <literal>row_to_json(tab.*)</> may + In some contexts, constructs like <literal>row_to_json(tab.*)</literal> may not produce the expected column names. This is fixed properly as of 9.4; in older branches, just ensure that we produce some nonempty name. (In some cases this will be the underlying table's column name @@ -5703,7 +5703,7 @@ Branch: REL9_2_STABLE [906599f65] 2014-11-22 16:01:15 -0500 <listitem> <para> Fix mishandling of system columns, - particularly <structfield>tableoid</>, in FDW queries (Etsuro Fujita) + particularly <structfield>tableoid</structfield>, in FDW queries (Etsuro Fujita) </para> </listitem> @@ -5721,7 +5721,7 @@ Branch: REL9_3_STABLE [527ff8baf] 2015-01-30 12:30:43 -0500 </para> <para> - This patch fixes corner-case <quote>unexpected operator NNNN</> planner + This patch fixes corner-case <quote>unexpected operator NNNN</quote> planner errors, and improves the selectivity estimates for some other cases. </para> </listitem> @@ -5734,13 +5734,13 @@ Branch: REL9_2_STABLE [4586572d7] 2014-10-26 16:12:32 -0400 <listitem> <para> - Avoid doing <literal><replaceable>indexed_column</> = ANY - (<replaceable>array</>)</literal> as an index qualifier if that leads + Avoid doing <literal><replaceable>indexed_column</replaceable> = ANY + (<replaceable>array</replaceable>)</literal> as an index qualifier if that leads to an inferior plan (Andrew Gierth) </para> <para> - In some cases, <literal>= ANY</> conditions applied to non-first index + In some cases, <literal>= ANY</literal> conditions applied to non-first index columns would be done as index conditions even though it would be better to use them as simple filter conditions. </para> @@ -5753,9 +5753,9 @@ Branch: REL9_3_STABLE [4e54685d0] 2014-10-20 12:23:48 -0400 <listitem> <para> - Fix <quote>variable not found in subplan target list</> planner + Fix <quote>variable not found in subplan target list</quote> planner failure when an inline-able SQL function taking a composite argument - is used in a <literal>LATERAL</> subselect and the composite argument + is used in a <literal>LATERAL</literal> subselect and the composite argument is a lateral reference (Tom Lane) </para> </listitem> @@ -5771,7 +5771,7 @@ Branch: REL9_0_STABLE [288f15b7c] 2014-10-01 19:30:41 -0400 <listitem> <para> Fix planner problems with nested append relations, such as inherited - tables within <literal>UNION ALL</> subqueries (Tom Lane) + tables within <literal>UNION ALL</literal> subqueries (Tom Lane) </para> </listitem> @@ -5800,8 +5800,8 @@ Branch: REL9_0_STABLE [50a757698] 2014-10-03 13:01:27 -0300 <listitem> <para> - Exempt tables that have per-table <varname>cost_limit</> - and/or <varname>cost_delay</> settings from autovacuum's global cost + Exempt tables that have per-table <varname>cost_limit</varname> + and/or <varname>cost_delay</varname> settings from autovacuum's global cost balancing rules (Álvaro Herrera) </para> @@ -5835,7 +5835,7 @@ Branch: REL9_0_STABLE [91b4a881c] 2014-07-30 14:42:12 -0400 the target database, if they met the usual thresholds for autovacuuming. This is at best pretty unexpected; at worst it delays response to the wraparound threat. Fix it so that if autovacuum is - turned off, workers <emphasis>only</> do anti-wraparound vacuums and + turned off, workers <emphasis>only</emphasis> do anti-wraparound vacuums and not any other work. </para> </listitem> @@ -5899,12 +5899,12 @@ Branch: REL9_0_STABLE [804983961] 2014-07-29 11:58:17 +0300 <listitem> <para> Fix several cases where recovery logic improperly ignored WAL records - for <literal>COMMIT/ABORT PREPARED</> (Heikki Linnakangas) + for <literal>COMMIT/ABORT PREPARED</literal> (Heikki Linnakangas) </para> <para> The most notable oversight was - that <varname>recovery_target_xid</> could not be used to stop at + that <varname>recovery_target_xid</varname> could not be used to stop at a two-phase commit. </para> </listitem> @@ -5932,7 +5932,7 @@ Branch: REL9_0_STABLE [83c7bfb9a] 2014-11-06 21:26:21 +0900 <listitem> <para> - Avoid creating unnecessary <filename>.ready</> marker files for + Avoid creating unnecessary <filename>.ready</filename> marker files for timeline history files (Fujii Masao) </para> </listitem> @@ -5948,8 +5948,8 @@ Branch: REL9_0_STABLE [857a5d6b5] 2014-09-05 02:19:57 +0900 <listitem> <para> Fix possible null pointer dereference when an empty prepared statement - is used and the <varname>log_statement</> setting is <literal>mod</> - or <literal>ddl</> (Fujii Masao) + is used and the <varname>log_statement</varname> setting is <literal>mod</literal> + or <literal>ddl</literal> (Fujii Masao) </para> </listitem> @@ -5965,7 +5965,7 @@ Branch: REL9_0_STABLE [a1a8d0249] 2015-01-19 23:01:46 -0500 <listitem> <para> - Change <quote>pgstat wait timeout</> warning message to be LOG level, + Change <quote>pgstat wait timeout</quote> warning message to be LOG level, and rephrase it to be more understandable (Tom Lane) </para> @@ -5974,7 +5974,7 @@ Branch: REL9_0_STABLE [a1a8d0249] 2015-01-19 23:01:46 -0500 case, but it occurs often enough on our slower buildfarm members to be a nuisance. Reduce it to LOG level, and expend a bit more effort on the wording: it now reads <quote>using stale statistics instead of - current ones because stats collector is not responding</>. + current ones because stats collector is not responding</quote>. </para> </listitem> @@ -6018,7 +6018,7 @@ Branch: REL9_0_STABLE [2e4946169] 2015-01-07 22:46:20 -0500 <listitem> <para> - Warn if macOS's <function>setlocale()</> starts an unwanted extra + Warn if macOS's <function>setlocale()</function> starts an unwanted extra thread inside the postmaster (Noah Misch) </para> </listitem> @@ -6033,13 +6033,13 @@ Branch: REL9_0_STABLE [9880fea4f] 2014-11-25 17:39:09 +0200 <listitem> <para> - Fix processing of repeated <literal>dbname</> parameters - in <function>PQconnectdbParams()</> (Alex Shulgin) + Fix processing of repeated <literal>dbname</literal> parameters + in <function>PQconnectdbParams()</function> (Alex Shulgin) </para> <para> Unexpected behavior ensued if the first occurrence - of <literal>dbname</> contained a connection string or URI to be + of <literal>dbname</literal> contained a connection string or URI to be expanded. </para> </listitem> @@ -6054,12 +6054,12 @@ Branch: REL9_0_STABLE [ac6e87537] 2014-10-22 18:42:01 -0400 <listitem> <para> - Ensure that <application>libpq</> reports a suitable error message on + Ensure that <application>libpq</application> reports a suitable error message on unexpected socket EOF (Marko Tiikkaja, Tom Lane) </para> <para> - Depending on kernel behavior, <application>libpq</> might return an + Depending on kernel behavior, <application>libpq</application> might return an empty error string rather than something useful when the server unexpectedly closed the socket. </para> @@ -6075,14 +6075,14 @@ Branch: REL9_0_STABLE [49ef4eba2] 2014-10-29 14:35:39 +0200 <listitem> <para> - Clear any old error message during <function>PQreset()</> + Clear any old error message during <function>PQreset()</function> (Heikki Linnakangas) </para> <para> - If <function>PQreset()</> is called repeatedly, and the connection + If <function>PQreset()</function> is called repeatedly, and the connection cannot be re-established, error messages from the failed connection - attempts kept accumulating in the <structname>PGconn</>'s error + attempts kept accumulating in the <structname>PGconn</structname>'s error string. </para> </listitem> @@ -6098,7 +6098,7 @@ Branch: REL9_0_STABLE [1f3517039] 2014-11-25 14:10:54 +0200 <listitem> <para> Properly handle out-of-memory conditions while parsing connection - options in <application>libpq</> (Alex Shulgin, Heikki Linnakangas) + options in <application>libpq</application> (Alex Shulgin, Heikki Linnakangas) </para> </listitem> @@ -6112,8 +6112,8 @@ Branch: REL9_0_STABLE [d9a1e9de5] 2014-10-06 21:23:50 -0400 <listitem> <para> - Fix array overrun in <application>ecpg</>'s version - of <function>ParseDateTime()</> (Michael Paquier) + Fix array overrun in <application>ecpg</application>'s version + of <function>ParseDateTime()</function> (Michael Paquier) </para> </listitem> @@ -6127,7 +6127,7 @@ Branch: REL9_0_STABLE [d67be559e] 2014-12-05 14:30:55 +0200 <listitem> <para> - In <application>initdb</>, give a clearer error message if a password + In <application>initdb</application>, give a clearer error message if a password file is specified but is empty (Mats Erik Andersson) </para> </listitem> @@ -6142,12 +6142,12 @@ Branch: REL9_0_STABLE [44c518328] 2014-09-08 16:10:05 -0400 <listitem> <para> - Fix <application>psql</>'s <command>\s</> command to work nicely with + Fix <application>psql</application>'s <command>\s</command> command to work nicely with libedit, and add pager support (Stepan Rutz, Tom Lane) </para> <para> - When using libedit rather than readline, <command>\s</> printed the + When using libedit rather than readline, <command>\s</command> printed the command history in a fairly unreadable encoded format, and on recent libedit versions might fail altogether. Fix that by printing the history ourselves rather than having the library do it. A pleasant @@ -6157,7 +6157,7 @@ Branch: REL9_0_STABLE [44c518328] 2014-09-08 16:10:05 -0400 <para> This patch also fixes a bug that caused newline encoding to be applied inconsistently when saving the command history with libedit. - Multiline history entries written by older <application>psql</> + Multiline history entries written by older <application>psql</application> versions will be read cleanly with this patch, but perhaps not vice versa, depending on the exact libedit versions involved. </para> @@ -6175,17 +6175,17 @@ Branch: REL9_0_STABLE [2600e4436] 2014-12-31 12:17:12 -0500 <listitem> <para> - Improve consistency of parsing of <application>psql</>'s special + Improve consistency of parsing of <application>psql</application>'s special variables (Tom Lane) </para> <para> - Allow variant spellings of <literal>on</> and <literal>off</> (such - as <literal>1</>/<literal>0</>) for <literal>ECHO_HIDDEN</> - and <literal>ON_ERROR_ROLLBACK</>. Report a warning for unrecognized - values for <literal>COMP_KEYWORD_CASE</>, <literal>ECHO</>, - <literal>ECHO_HIDDEN</>, <literal>HISTCONTROL</>, - <literal>ON_ERROR_ROLLBACK</>, and <literal>VERBOSITY</>. Recognize + Allow variant spellings of <literal>on</literal> and <literal>off</literal> (such + as <literal>1</literal>/<literal>0</literal>) for <literal>ECHO_HIDDEN</literal> + and <literal>ON_ERROR_ROLLBACK</literal>. Report a warning for unrecognized + values for <literal>COMP_KEYWORD_CASE</literal>, <literal>ECHO</literal>, + <literal>ECHO_HIDDEN</literal>, <literal>HISTCONTROL</literal>, + <literal>ON_ERROR_ROLLBACK</literal>, and <literal>VERBOSITY</literal>. Recognize all values for all these variables case-insensitively; previously there was a mishmash of case-sensitive and case-insensitive behaviors. </para> @@ -6198,8 +6198,8 @@ Branch: REL9_3_STABLE [4b1953079] 2014-11-28 02:44:40 +0900 <listitem> <para> - Make <application>psql</>'s <command>\watch</> command display - nulls as specified by <command>\pset null</> (Fujii Masao) + Make <application>psql</application>'s <command>\watch</command> command display + nulls as specified by <command>\pset null</command> (Fujii Masao) </para> </listitem> @@ -6213,9 +6213,9 @@ Branch: REL9_0_STABLE [1f89fc218] 2014-09-12 11:24:39 -0400 <listitem> <para> - Fix <application>psql</>'s expanded-mode display to work - consistently when using <literal>border</> = 3 - and <literal>linestyle</> = <literal>ascii</> or <literal>unicode</> + Fix <application>psql</application>'s expanded-mode display to work + consistently when using <literal>border</literal> = 3 + and <literal>linestyle</literal> = <literal>ascii</literal> or <literal>unicode</literal> (Stephen Frost) </para> </listitem> @@ -6229,7 +6229,7 @@ Branch: REL9_3_STABLE [bb1e2426b] 2015-01-05 19:27:09 -0500 <listitem> <para> - Fix <application>pg_dump</> to handle comments on event triggers + Fix <application>pg_dump</application> to handle comments on event triggers without failing (Tom Lane) </para> </listitem> @@ -6243,8 +6243,8 @@ Branch: REL9_3_STABLE [cc609c46f] 2015-01-30 09:01:36 -0600 <listitem> <para> - Allow parallel <application>pg_dump</> to - use <option>--serializable-deferrable</> (Kevin Grittner) + Allow parallel <application>pg_dump</application> to + use <option>--serializable-deferrable</option> (Kevin Grittner) </para> </listitem> @@ -6257,7 +6257,7 @@ Branch: REL9_1_STABLE [40c333c39] 2014-07-25 19:48:54 -0400 <listitem> <para> - Improve performance of <application>pg_dump</> when the database + Improve performance of <application>pg_dump</application> when the database contains many instances of multiple dependency paths between the same two objects (Tom Lane) </para> @@ -6271,7 +6271,7 @@ Branch: REL9_2_STABLE [3c5ce5102] 2014-11-13 18:19:35 -0500 <listitem> <para> - Fix <application>pg_dumpall</> to restore its ability to dump from + Fix <application>pg_dumpall</application> to restore its ability to dump from pre-8.1 servers (Gilles Darold) </para> </listitem> @@ -6301,7 +6301,7 @@ Branch: REL9_0_STABLE [31021e7ba] 2014-10-17 12:49:15 -0400 <listitem> <para> - Fix core dump in <literal>pg_dump --binary-upgrade</> on zero-column + Fix core dump in <literal>pg_dump --binary-upgrade</literal> on zero-column composite type (Rushabh Lathia) </para> </listitem> @@ -6314,7 +6314,7 @@ Branch: REL9_3_STABLE [26a4e0ed7] 2014-11-15 01:21:11 +0100 <listitem> <para> Fix failure to fsync tables in nondefault tablespaces - during <application>pg_upgrade</> (Abhijit Menon-Sen, Andres Freund) + during <application>pg_upgrade</application> (Abhijit Menon-Sen, Andres Freund) </para> <para> @@ -6330,7 +6330,7 @@ Branch: REL9_3_STABLE [fca9f349b] 2014-08-07 14:56:13 -0400 <listitem> <para> - In <application>pg_upgrade</>, cope with cases where the new cluster + In <application>pg_upgrade</application>, cope with cases where the new cluster creates a TOAST table for a table that didn't previously have one (Bruce Momjian) </para> @@ -6347,8 +6347,8 @@ Branch: REL9_3_STABLE [24ae44914] 2014-08-04 11:45:45 -0400 <listitem> <para> - In <application>pg_upgrade</>, don't try to - set <literal>autovacuum_multixact_freeze_max_age</> for the old cluster + In <application>pg_upgrade</application>, don't try to + set <literal>autovacuum_multixact_freeze_max_age</literal> for the old cluster (Bruce Momjian) </para> @@ -6365,12 +6365,12 @@ Branch: REL9_3_STABLE [5724f491d] 2014-09-11 18:39:46 -0400 <listitem> <para> - In <application>pg_upgrade</>, preserve the transaction ID epoch + In <application>pg_upgrade</application>, preserve the transaction ID epoch (Bruce Momjian) </para> <para> - This oversight did not bother <productname>PostgreSQL</> proper, + This oversight did not bother <productname>PostgreSQL</productname> proper, but could confuse some external replication tools. </para> </listitem> @@ -6386,7 +6386,7 @@ Branch: REL9_1_STABLE [2a0bfa4d6] 2015-01-03 20:54:13 +0100 <listitem> <para> - Prevent WAL files created by <literal>pg_basebackup -x/-X</> from + Prevent WAL files created by <literal>pg_basebackup -x/-X</literal> from being archived again when the standby is promoted (Andres Freund) </para> </listitem> @@ -6398,7 +6398,7 @@ Branch: REL9_3_STABLE [9747a9898] 2014-08-02 15:19:45 +0900 <listitem> <para> - Fix memory leak in <application>pg_receivexlog</> (Fujii Masao) + Fix memory leak in <application>pg_receivexlog</application> (Fujii Masao) </para> </listitem> @@ -6409,7 +6409,7 @@ Branch: REL9_3_STABLE [39217ce41] 2014-08-02 14:59:10 +0900 <listitem> <para> - Fix unintended suppression of <application>pg_receivexlog</> verbose + Fix unintended suppression of <application>pg_receivexlog</application> verbose messages (Fujii Masao) </para> </listitem> @@ -6422,8 +6422,8 @@ Branch: REL9_2_STABLE [5ff8c2d7d] 2014-09-19 13:19:05 -0400 <listitem> <para> - Fix failure of <filename>contrib/auto_explain</> to print per-node - timing information when doing <command>EXPLAIN ANALYZE</> (Tom Lane) + Fix failure of <filename>contrib/auto_explain</filename> to print per-node + timing information when doing <command>EXPLAIN ANALYZE</command> (Tom Lane) </para> </listitem> @@ -6436,7 +6436,7 @@ Branch: REL9_1_STABLE [9807c8220] 2014-08-28 18:21:20 -0400 <listitem> <para> - Fix upgrade-from-unpackaged script for <filename>contrib/citext</> + Fix upgrade-from-unpackaged script for <filename>contrib/citext</filename> (Tom Lane) </para> </listitem> @@ -6449,7 +6449,7 @@ Branch: REL9_3_STABLE [f44290b7b] 2014-11-04 16:54:59 -0500 <listitem> <para> Avoid integer overflow and buffer overrun - in <filename>contrib/hstore</>'s <function>hstore_to_json()</> + in <filename>contrib/hstore</filename>'s <function>hstore_to_json()</function> (Heikki Linnakangas) </para> </listitem> @@ -6461,7 +6461,7 @@ Branch: REL9_3_STABLE [55c880797] 2014-12-01 11:44:48 -0500 <listitem> <para> - Fix recognition of numbers in <function>hstore_to_json_loose()</>, + Fix recognition of numbers in <function>hstore_to_json_loose()</function>, so that JSON numbers and strings are correctly distinguished (Andrew Dunstan) </para> @@ -6478,7 +6478,7 @@ Branch: REL9_0_STABLE [9dc2a3fd0] 2014-07-22 11:46:04 -0400 <listitem> <para> Fix block number checking - in <filename>contrib/pageinspect</>'s <function>get_raw_page()</> + in <filename>contrib/pageinspect</filename>'s <function>get_raw_page()</function> (Tom Lane) </para> @@ -6498,7 +6498,7 @@ Branch: REL9_0_STABLE [ef5a3b957] 2014-11-11 17:22:58 -0500 <listitem> <para> - Fix <filename>contrib/pgcrypto</>'s <function>pgp_sym_decrypt()</> + Fix <filename>contrib/pgcrypto</filename>'s <function>pgp_sym_decrypt()</function> to not fail on messages whose length is 6 less than a power of 2 (Marko Tiikkaja) </para> @@ -6513,7 +6513,7 @@ Branch: REL9_1_STABLE [a855c90a7] 2014-11-19 12:26:06 -0500 <listitem> <para> - Fix file descriptor leak in <filename>contrib/pg_test_fsync</> + Fix file descriptor leak in <filename>contrib/pg_test_fsync</filename> (Jeff Janes) </para> @@ -6535,12 +6535,12 @@ Branch: REL9_0_STABLE [dc9a506e6] 2015-01-29 20:18:46 -0500 <listitem> <para> Handle unexpected query results, especially NULLs, safely in - <filename>contrib/tablefunc</>'s <function>connectby()</> + <filename>contrib/tablefunc</filename>'s <function>connectby()</function> (Michael Paquier) </para> <para> - <function>connectby()</> previously crashed if it encountered a NULL + <function>connectby()</function> previously crashed if it encountered a NULL key value. It now prints that row but doesn't recurse further. </para> </listitem> @@ -6555,12 +6555,12 @@ Branch: REL9_0_STABLE [6a694bbab] 2014-11-27 11:13:03 -0500 <listitem> <para> - Avoid a possible crash in <filename>contrib/xml2</>'s - <function>xslt_process()</> (Mark Simonetti) + Avoid a possible crash in <filename>contrib/xml2</filename>'s + <function>xslt_process()</function> (Mark Simonetti) </para> <para> - <application>libxslt</> seems to have an undocumented dependency on + <application>libxslt</application> seems to have an undocumented dependency on the order in which resources are freed; reorder our calls to avoid a crash. </para> @@ -6575,7 +6575,7 @@ Branch: REL9_1_STABLE [7225abf00] 2014-11-05 11:34:25 -0500 <listitem> <para> - Mark some <filename>contrib</> I/O functions with correct volatility + Mark some <filename>contrib</filename> I/O functions with correct volatility properties (Tom Lane) </para> @@ -6696,10 +6696,10 @@ Branch: REL9_0_STABLE [4c6d0abde] 2014-07-22 11:02:25 -0400 <para> With OpenLDAP versions 2.4.24 through 2.4.31, - inclusive, <productname>PostgreSQL</> backends can crash at exit. - Raise a warning during <application>configure</> based on the + inclusive, <productname>PostgreSQL</productname> backends can crash at exit. + Raise a warning during <application>configure</application> based on the compile-time OpenLDAP version number, and test the crashing scenario - in the <filename>contrib/dblink</> regression test. + in the <filename>contrib/dblink</filename> regression test. </para> </listitem> @@ -6713,7 +6713,7 @@ Branch: REL9_0_STABLE [e6841c4d6] 2014-08-18 23:01:23 -0400 <listitem> <para> - In non-MSVC Windows builds, ensure <filename>libpq.dll</> is installed + In non-MSVC Windows builds, ensure <filename>libpq.dll</filename> is installed with execute permissions (Noah Misch) </para> </listitem> @@ -6730,13 +6730,13 @@ Branch: REL9_0_STABLE [338ff75fc] 2015-01-19 23:44:33 -0500 <listitem> <para> - Make <application>pg_regress</> remove any temporary installation it + Make <application>pg_regress</application> remove any temporary installation it created upon successful exit (Tom Lane) </para> <para> This results in a very substantial reduction in disk space usage - during <literal>make check-world</>, since that sequence involves + during <literal>make check-world</literal>, since that sequence involves creation of numerous temporary installations. </para> </listitem> @@ -6756,15 +6756,15 @@ Branch: REL9_0_STABLE [870a980aa] 2014-10-16 15:22:26 -0400 </para> <para> - Previously, <productname>PostgreSQL</> assumed that the UTC offset - associated with a time zone abbreviation (such as <literal>EST</>) + Previously, <productname>PostgreSQL</productname> assumed that the UTC offset + associated with a time zone abbreviation (such as <literal>EST</literal>) never changes in the usage of any particular locale. However this assumption fails in the real world, so introduce the ability for a zone abbreviation to represent a UTC offset that sometimes changes. Update the zone abbreviation definition files to make use of this feature in timezone locales that have changed the UTC offset of their abbreviations since 1970 (according to the IANA timezone database). - In such timezones, <productname>PostgreSQL</> will now associate the + In such timezones, <productname>PostgreSQL</productname> will now associate the correct UTC offset with the abbreviation depending on the given date. </para> </listitem> @@ -6789,9 +6789,9 @@ Branch: REL9_0_STABLE [8b70023af] 2014-12-24 16:35:54 -0500 <para> Add CST (China Standard Time) to our lists. - Remove references to ADT as <quote>Arabia Daylight Time</>, an + Remove references to ADT as <quote>Arabia Daylight Time</quote>, an abbreviation that's been out of use since 2007; therefore, claiming - there is a conflict with <quote>Atlantic Daylight Time</> doesn't seem + there is a conflict with <quote>Atlantic Daylight Time</quote> doesn't seem especially helpful. Fix entirely incorrect GMT offsets for CKT (Cook Islands), FJT, and FJST (Fiji); we didn't even have them on the proper side of the date line. @@ -6818,21 +6818,21 @@ Branch: REL9_0_STABLE [b6391f587] 2014-10-04 14:18:43 -0400 <listitem> <para> - Update time zone data files to <application>tzdata</> release 2015a. + Update time zone data files to <application>tzdata</application> release 2015a. </para> <para> The IANA timezone database has adopted abbreviations of the form - <literal>A<replaceable>x</>ST</literal>/<literal>A<replaceable>x</>DT</literal> + <literal>A<replaceable>x</replaceable>ST</literal>/<literal>A<replaceable>x</replaceable>DT</literal> for all Australian time zones, reflecting what they believe to be current majority practice Down Under. These names do not conflict with usage elsewhere (other than ACST for Acre Summer Time, which has been in disuse since 1994). Accordingly, adopt these names into - our <quote>Default</> timezone abbreviation set. - The <quote>Australia</> abbreviation set now contains only CST, EAST, + our <quote>Default</quote> timezone abbreviation set. + The <quote>Australia</quote> abbreviation set now contains only CST, EAST, EST, SAST, SAT, and WST, all of which are thought to be mostly historical usage. Note that SAST has also been changed to be South - Africa Standard Time in the <quote>Default</> abbreviation set. + Africa Standard Time in the <quote>Default</quote> abbreviation set. </para> <para> @@ -6873,7 +6873,7 @@ Branch: REL9_0_STABLE [b6391f587] 2014-10-04 14:18:43 -0400 <para> However, this release corrects a logic error - in <application>pg_upgrade</>, as well as an index corruption problem in + in <application>pg_upgrade</application>, as well as an index corruption problem in some GiST indexes. See the first two changelog entries below to find out whether your installation has been affected and what steps you should take if so. @@ -6900,15 +6900,15 @@ Branch: REL9_3_STABLE [cc5841809] 2014-06-24 16:11:06 -0400 <listitem> <para> - In <application>pg_upgrade</>, remove <filename>pg_multixact</> files - left behind by <application>initdb</> (Bruce Momjian) + In <application>pg_upgrade</application>, remove <filename>pg_multixact</filename> files + left behind by <application>initdb</application> (Bruce Momjian) </para> <para> - If you used a pre-9.3.5 version of <application>pg_upgrade</> to + If you used a pre-9.3.5 version of <application>pg_upgrade</application> to upgrade a database cluster to 9.3, it might have left behind a file - <filename>$PGDATA/pg_multixact/offsets/0000</> that should not be - there and will eventually cause problems in <command>VACUUM</>. + <filename>$PGDATA/pg_multixact/offsets/0000</filename> that should not be + there and will eventually cause problems in <command>VACUUM</command>. <emphasis>However, in common cases this file is actually valid and must not be removed.</emphasis> To determine whether your installation has this problem, run this @@ -6921,9 +6921,9 @@ SELECT EXISTS (SELECT * FROM list WHERE file = '0000') AND EXISTS (SELECT * FROM list WHERE file != '0000') AS file_0000_removal_required; </programlisting> - If this query returns <literal>t</>, manually remove the file - <filename>$PGDATA/pg_multixact/offsets/0000</>. - Do nothing if the query returns <literal>f</>. + If this query returns <literal>t</literal>, manually remove the file + <filename>$PGDATA/pg_multixact/offsets/0000</filename>. + Do nothing if the query returns <literal>f</literal>. </para> </listitem> @@ -6939,15 +6939,15 @@ Branch: REL8_4_STABLE [e31d77c96] 2014-05-13 15:27:43 +0300 <listitem> <para> - Correctly initialize padding bytes in <filename>contrib/btree_gist</> - indexes on <type>bit</> columns (Heikki Linnakangas) + Correctly initialize padding bytes in <filename>contrib/btree_gist</filename> + indexes on <type>bit</type> columns (Heikki Linnakangas) </para> <para> This error could result in incorrect query results due to values that should compare equal not being seen as equal. - Users with GiST indexes on <type>bit</> or <type>bit varying</> - columns should <command>REINDEX</> those indexes after installing this + Users with GiST indexes on <type>bit</type> or <type>bit varying</type> + columns should <command>REINDEX</command> those indexes after installing this update. </para> </listitem> @@ -7032,7 +7032,7 @@ Branch: REL9_3_STABLE [167a2535f] 2014-06-09 15:17:23 -0400 <listitem> <para> - Fix wraparound handling for <filename>pg_multixact/members</> + Fix wraparound handling for <filename>pg_multixact/members</filename> (Álvaro Herrera) </para> </listitem> @@ -7046,12 +7046,12 @@ Branch: REL9_3_STABLE [9a28c3752] 2014-06-27 14:43:52 -0400 <listitem> <para> - Truncate <structname>pg_multixact</> during checkpoints, not - during <command>VACUUM</> (Álvaro Herrera) + Truncate <structname>pg_multixact</structname> during checkpoints, not + during <command>VACUUM</command> (Álvaro Herrera) </para> <para> - This change ensures that <structname>pg_multixact</> segments can't be + This change ensures that <structname>pg_multixact</structname> segments can't be removed if they'd still be needed during WAL replay after a crash. </para> </listitem> @@ -7082,7 +7082,7 @@ Branch: REL8_4_STABLE [3ada1fab8] 2014-05-05 14:43:55 -0400 <listitem> <para> Fix possibly-incorrect cache invalidation during nested calls - to <function>ReceiveSharedInvalidMessages</> (Andres Freund) + to <function>ReceiveSharedInvalidMessages</function> (Andres Freund) </para> </listitem> @@ -7108,8 +7108,8 @@ Branch: REL9_1_STABLE [555d0b200] 2014-06-26 10:42:08 -0700 <listitem> <para> - Fix <quote>could not find pathkey item to sort</> planner failures - with <literal>UNION ALL</> over subqueries reading from tables with + Fix <quote>could not find pathkey item to sort</quote> planner failures + with <literal>UNION ALL</literal> over subqueries reading from tables with inheritance children (Tom Lane) </para> </listitem> @@ -7148,7 +7148,7 @@ Branch: REL9_2_STABLE [0901dbab3] 2014-04-29 13:12:33 -0400 <listitem> <para> Improve planner to drop constant-NULL inputs - of <literal>AND</>/<literal>OR</> when possible (Tom Lane) + of <literal>AND</literal>/<literal>OR</literal> when possible (Tom Lane) </para> <para> @@ -7166,8 +7166,8 @@ Branch: REL9_3_STABLE [d359f71ac] 2014-04-03 22:02:27 -0400 <listitem> <para> - Ensure that the planner sees equivalent <literal>VARIADIC</> and - non-<literal>VARIADIC</> function calls as equivalent (Tom Lane) + Ensure that the planner sees equivalent <literal>VARIADIC</literal> and + non-<literal>VARIADIC</literal> function calls as equivalent (Tom Lane) </para> <para> @@ -7188,13 +7188,13 @@ Branch: REL9_3_STABLE [a1fc36495] 2014-06-24 21:22:47 -0700 <listitem> <para> - Fix handling of nested <type>JSON</> objects - in <function>json_populate_recordset()</> and friends + Fix handling of nested <type>JSON</type> objects + in <function>json_populate_recordset()</function> and friends (Michael Paquier, Tom Lane) </para> <para> - A nested <type>JSON</> object could result in previous fields of the + A nested <type>JSON</type> object could result in previous fields of the parent object not being shown in the output. </para> </listitem> @@ -7208,13 +7208,13 @@ Branch: REL9_2_STABLE [25c933c5c] 2014-05-09 12:55:06 -0400 <listitem> <para> - Fix identification of input type category in <function>to_json()</> + Fix identification of input type category in <function>to_json()</function> and friends (Tom Lane) </para> <para> - This is known to have led to inadequate quoting of <type>money</> - fields in the <type>JSON</> result, and there may have been wrong + This is known to have led to inadequate quoting of <type>money</type> + fields in the <type>JSON</type> result, and there may have been wrong results for other data types as well. </para> </listitem> @@ -7239,7 +7239,7 @@ Branch: REL8_4_STABLE [70debcf09] 2014-05-01 15:19:23 -0400 This corrects cases where TOAST pointers could be copied into other tables without being dereferenced. If the original data is later deleted, it would lead to errors like <quote>missing chunk number 0 - for toast value ...</> when the now-dangling pointer is used. + for toast value ...</quote> when the now-dangling pointer is used. </para> </listitem> @@ -7256,7 +7256,7 @@ Branch: REL8_4_STABLE [a81fbcfb3] 2014-07-11 19:12:56 -0400 <listitem> <para> - Fix <quote>record type has not been registered</> failures with + Fix <quote>record type has not been registered</quote> failures with whole-row references to the output of Append plan nodes (Tom Lane) </para> </listitem> @@ -7292,7 +7292,7 @@ Branch: REL8_4_STABLE [d297c91d4] 2014-06-19 22:14:00 -0400 <listitem> <para> Fix query-lifespan memory leak while evaluating the arguments for a - function in <literal>FROM</> (Tom Lane) + function in <literal>FROM</literal> (Tom Lane) </para> </listitem> @@ -7327,7 +7327,7 @@ Branch: REL8_4_STABLE [f3f40434b] 2014-06-10 22:49:08 -0400 <listitem> <para> - Fix data encoding error in <filename>hungarian.stop</> (Tom Lane) + Fix data encoding error in <filename>hungarian.stop</filename> (Tom Lane) </para> </listitem> @@ -7367,7 +7367,7 @@ Branch: REL8_4_STABLE [80d45ae4e] 2014-06-04 23:27:38 +0200 <para> This could cause problems (at least spurious warnings, and at worst an - infinite loop) if <command>CREATE INDEX</> or <command>CLUSTER</> were + infinite loop) if <command>CREATE INDEX</command> or <command>CLUSTER</command> were done later in the same transaction. </para> </listitem> @@ -7384,12 +7384,12 @@ Branch: REL8_4_STABLE [82fbd88a7] 2014-04-24 13:30:14 -0400 <listitem> <para> - Clear <structname>pg_stat_activity</>.<structfield>xact_start</> - during <command>PREPARE TRANSACTION</> (Andres Freund) + Clear <structname>pg_stat_activity</structname>.<structfield>xact_start</structfield> + during <command>PREPARE TRANSACTION</command> (Andres Freund) </para> <para> - After the <command>PREPARE</>, the originating session is no longer in + After the <command>PREPARE</command>, the originating session is no longer in a transaction, so it should not continue to display a transaction start time. </para> @@ -7408,7 +7408,7 @@ Branch: REL8_4_STABLE [4b767789d] 2014-07-15 13:24:07 -0400 <listitem> <para> - Fix <command>REASSIGN OWNED</> to not fail for text search objects + Fix <command>REASSIGN OWNED</command> to not fail for text search objects (Álvaro Herrera) </para> </listitem> @@ -7422,8 +7422,8 @@ Branch: REL9_3_STABLE [e86cfc4bb] 2014-06-27 14:43:45 -0400 <listitem> <para> - Prevent <structname>pg_class</>.<structfield>relminmxid</> values from - going backwards during <command>VACUUM FULL</> (Álvaro Herrera) + Prevent <structname>pg_class</structname>.<structfield>relminmxid</structfield> values from + going backwards during <command>VACUUM FULL</command> (Álvaro Herrera) </para> </listitem> @@ -7461,7 +7461,7 @@ Branch: REL9_3_STABLE [e31193d49] 2014-05-01 20:22:39 -0400 <listitem> <para> Fix dumping of rules/views when subsequent addition of a column has - resulted in multiple input columns matching a <literal>USING</> + resulted in multiple input columns matching a <literal>USING</literal> specification (Tom Lane) </para> </listitem> @@ -7476,7 +7476,7 @@ Branch: REL9_3_STABLE [b978ab5f6] 2014-07-19 14:29:05 -0400 <listitem> <para> Repair view printing for some cases involving functions - in <literal>FROM</> that return a composite type containing dropped + in <literal>FROM</literal> that return a composite type containing dropped columns (Tom Lane) </para> </listitem> @@ -7498,7 +7498,7 @@ Branch: REL8_4_STABLE [969735cf1] 2014-04-05 18:16:24 -0400 <para> This ensures that the postmaster will properly clean up after itself - if, for example, it receives <systemitem>SIGINT</> while still + if, for example, it receives <systemitem>SIGINT</systemitem> while still starting up. </para> </listitem> @@ -7513,7 +7513,7 @@ Branch: REL9_1_STABLE [b7a424371] 2014-04-02 17:11:34 -0400 <listitem> <para> - Fix client host name lookup when processing <filename>pg_hba.conf</> + Fix client host name lookup when processing <filename>pg_hba.conf</filename> entries that specify host names instead of IP addresses (Tom Lane) </para> @@ -7534,14 +7534,14 @@ Branch: REL9_2_STABLE [6d25eb314] 2014-04-04 22:03:42 -0400 <listitem> <para> - Allow the root user to use <literal>postgres -C variable</> and - <literal>postgres --describe-config</> (MauMau) + Allow the root user to use <literal>postgres -C variable</literal> and + <literal>postgres --describe-config</literal> (MauMau) </para> <para> The prohibition on starting the server as root does not need to extend to these operations, and relaxing it prevents failure - of <application>pg_ctl</> in some scenarios. + of <application>pg_ctl</application> in some scenarios. </para> </listitem> @@ -7559,7 +7559,7 @@ Branch: REL8_4_STABLE [95cefd30e] 2014-06-14 09:41:18 -0400 <listitem> <para> Secure Unix-domain sockets of temporary postmasters started during - <literal>make check</> (Noah Misch) + <literal>make check</literal> (Noah Misch) </para> <para> @@ -7568,16 +7568,16 @@ Branch: REL8_4_STABLE [95cefd30e] 2014-06-14 09:41:18 -0400 the operating-system user running the test, as we previously noted in CVE-2014-0067. This change defends against that risk by placing the server's socket in a temporary, mode 0700 subdirectory - of <filename>/tmp</>. The hazard remains however on platforms where + of <filename>/tmp</filename>. The hazard remains however on platforms where Unix sockets are not supported, notably Windows, because then the temporary postmaster must accept local TCP connections. </para> <para> A useful side effect of this change is to simplify - <literal>make check</> testing in builds that - override <literal>DEFAULT_PGSOCKET_DIR</>. Popular non-default values - like <filename>/var/run/postgresql</> are often not writable by the + <literal>make check</literal> testing in builds that + override <literal>DEFAULT_PGSOCKET_DIR</literal>. Popular non-default values + like <filename>/var/run/postgresql</filename> are often not writable by the build user, requiring workarounds that will no longer be necessary. </para> </listitem> @@ -7651,9 +7651,9 @@ Branch: REL8_4_STABLE [e3f273ff6] 2014-04-30 10:39:03 +0300 </para> <para> - This oversight could cause <application>initdb</> - and <application>pg_upgrade</> to fail on Windows, if the installation - path contained both spaces and <literal>@</> signs. + This oversight could cause <application>initdb</application> + and <application>pg_upgrade</application> to fail on Windows, if the installation + path contained both spaces and <literal>@</literal> signs. </para> </listitem> @@ -7669,7 +7669,7 @@ Branch: REL8_4_STABLE [ae41bb4be] 2014-05-30 18:18:32 -0400 <listitem> <para> - Fix linking of <application>libpython</> on macOS (Tom Lane) + Fix linking of <application>libpython</application> on macOS (Tom Lane) </para> <para> @@ -7690,17 +7690,17 @@ Branch: REL8_4_STABLE [664ac3de7] 2014-05-07 21:38:50 -0400 <listitem> <para> - Avoid buffer bloat in <application>libpq</> when the server + Avoid buffer bloat in <application>libpq</application> when the server consistently sends data faster than the client can absorb it (Shin-ichi Morita, Tom Lane) </para> <para> - <application>libpq</> could be coerced into enlarging its input buffer + <application>libpq</application> could be coerced into enlarging its input buffer until it runs out of memory (which would be reported misleadingly - as <quote>lost synchronization with server</>). Under ordinary + as <quote>lost synchronization with server</quote>). Under ordinary circumstances it's quite far-fetched that data could be continuously - transmitted more quickly than the <function>recv()</> loop can + transmitted more quickly than the <function>recv()</function> loop can absorb it, but this has been observed when the client is artificially slowed by scheduler constraints. </para> @@ -7718,7 +7718,7 @@ Branch: REL8_4_STABLE [b4ae2e37d] 2014-04-16 18:59:48 +0200 <listitem> <para> - Ensure that LDAP lookup attempts in <application>libpq</> time out as + Ensure that LDAP lookup attempts in <application>libpq</application> time out as intended (Laurenz Albe) </para> </listitem> @@ -7741,8 +7741,8 @@ Branch: REL9_0_STABLE [0c2eb989e] 2014-04-09 12:12:32 +0200 <listitem> <para> - Fix <application>ecpg</> to do the right thing when an array - of <type>char *</> is the target for a FETCH statement returning more + Fix <application>ecpg</application> to do the right thing when an array + of <type>char *</type> is the target for a FETCH statement returning more than one row, as well as some other array-handling fixes (Ashutosh Bapat) </para> @@ -7756,13 +7756,13 @@ Branch: REL9_3_STABLE [3080bbaa9] 2014-03-29 17:34:03 -0400 <listitem> <para> - Fix <application>pg_dump</> to cope with a materialized view that + Fix <application>pg_dump</application> to cope with a materialized view that depends on a table's primary key (Tom Lane) </para> <para> This occurs if the view's query relies on functional dependency to - abbreviate a <literal>GROUP BY</> list. <application>pg_dump</> got + abbreviate a <literal>GROUP BY</literal> list. <application>pg_dump</application> got sufficiently confused that it dumped the materialized view as a regular view. </para> @@ -7776,7 +7776,7 @@ Branch: REL9_3_STABLE [63817f86b] 2014-03-18 10:38:38 -0400 <listitem> <para> - Fix parsing of <application>pg_dumpall</>'s <option>-i</> switch + Fix parsing of <application>pg_dumpall</application>'s <option>-i</option> switch (Tom Lane) </para> </listitem> @@ -7794,13 +7794,13 @@ Branch: REL8_4_STABLE [6adddac8a] 2014-06-12 20:14:55 -0400 <listitem> <para> - Fix <application>pg_restore</>'s processing of old-style large object + Fix <application>pg_restore</application>'s processing of old-style large object comments (Tom Lane) </para> <para> A direct-to-database restore from an archive file generated by a - pre-9.0 version of <application>pg_dump</> would usually fail if the + pre-9.0 version of <application>pg_dump</application> would usually fail if the archive contained more than a few comments for large objects. </para> </listitem> @@ -7815,12 +7815,12 @@ Branch: REL9_2_STABLE [759c9fb63] 2014-07-07 13:24:08 -0400 <listitem> <para> - Fix <application>pg_upgrade</> for cases where the new server creates + Fix <application>pg_upgrade</application> for cases where the new server creates a TOAST table but the old version did not (Bruce Momjian) </para> <para> - This rare situation would manifest as <quote>relation OID mismatch</> + This rare situation would manifest as <quote>relation OID mismatch</quote> errors. </para> </listitem> @@ -7839,9 +7839,9 @@ Branch: REL9_3_STABLE [e7984cca0] 2014-07-21 11:42:05 -0400 <listitem> <para> - In <application>pg_upgrade</>, - preserve <structname>pg_database</>.<structfield>datminmxid</> - and <structname>pg_class</>.<structfield>relminmxid</> values from the + In <application>pg_upgrade</application>, + preserve <structname>pg_database</structname>.<structfield>datminmxid</structfield> + and <structname>pg_class</structname>.<structfield>relminmxid</structfield> values from the old cluster, or insert reasonable values when upgrading from pre-9.3; also defend against unreasonable values in the core server (Bruce Momjian, Álvaro Herrera, Tom Lane) @@ -7864,13 +7864,13 @@ Branch: REL9_2_STABLE [31f579f09] 2014-05-20 12:20:57 -0400 <listitem> <para> - Prevent <filename>contrib/auto_explain</> from changing the output of - a user's <command>EXPLAIN</> (Tom Lane) + Prevent <filename>contrib/auto_explain</filename> from changing the output of + a user's <command>EXPLAIN</command> (Tom Lane) </para> <para> - If <filename>auto_explain</> is active, it could cause - an <literal>EXPLAIN (ANALYZE, TIMING OFF)</> command to nonetheless + If <filename>auto_explain</filename> is active, it could cause + an <literal>EXPLAIN (ANALYZE, TIMING OFF)</literal> command to nonetheless print timing information. </para> </listitem> @@ -7885,7 +7885,7 @@ Branch: REL9_2_STABLE [3e2cfa42f] 2014-06-20 12:27:04 -0700 <listitem> <para> - Fix query-lifespan memory leak in <filename>contrib/dblink</> + Fix query-lifespan memory leak in <filename>contrib/dblink</filename> (MauMau, Joe Conway) </para> </listitem> @@ -7902,7 +7902,7 @@ Branch: REL8_4_STABLE [df2e62603] 2014-04-17 12:37:53 -0400 <listitem> <para> - In <filename>contrib/pgcrypto</> functions, ensure sensitive + In <filename>contrib/pgcrypto</filename> functions, ensure sensitive information is cleared from stack variables before returning (Marko Kreen) </para> @@ -7919,7 +7919,7 @@ Branch: REL9_2_STABLE [f6d6b7b1e] 2014-06-30 17:00:40 -0400 <listitem> <para> Prevent use of already-freed memory in - <filename>contrib/pgstattuple</>'s <function>pgstat_heap()</> + <filename>contrib/pgstattuple</filename>'s <function>pgstat_heap()</function> (Noah Misch) </para> </listitem> @@ -7936,13 +7936,13 @@ Branch: REL8_4_STABLE [fd785441f] 2014-05-29 13:51:18 -0400 <listitem> <para> - In <filename>contrib/uuid-ossp</>, cache the state of the OSSP UUID + In <filename>contrib/uuid-ossp</filename>, cache the state of the OSSP UUID library across calls (Tom Lane) </para> <para> This improves the efficiency of UUID generation and reduces the amount - of entropy drawn from <filename>/dev/urandom</>, on platforms that + of entropy drawn from <filename>/dev/urandom</filename>, on platforms that have that. </para> </listitem> @@ -7960,7 +7960,7 @@ Branch: REL8_4_STABLE [c51da696b] 2014-07-19 15:01:45 -0400 <listitem> <para> - Update time zone data files to <application>tzdata</> release 2014e + Update time zone data files to <application>tzdata</application> release 2014e for DST law changes in Crimea, Egypt, and Morocco. </para> </listitem> @@ -8071,7 +8071,7 @@ Branch: REL9_0_STABLE [7aea1050e] 2014-03-13 12:03:07 -0400 <listitem> <para> Avoid race condition in checking transaction commit status during - receipt of a <command>NOTIFY</> message (Marko Tiikkaja) + receipt of a <command>NOTIFY</command> message (Marko Tiikkaja) </para> <para> @@ -8089,8 +8089,8 @@ Branch: REL9_3_STABLE [3973034e6] 2014-03-06 11:37:04 -0500 <listitem> <para> - Allow materialized views to be referenced in <command>UPDATE</> - and <command>DELETE</> commands (Michael Paquier) + Allow materialized views to be referenced in <command>UPDATE</command> + and <command>DELETE</command> commands (Michael Paquier) </para> <para> @@ -8133,7 +8133,7 @@ Branch: REL8_4_STABLE [dd378dd1e] 2014-02-18 12:44:36 -0500 <listitem> <para> - Remove incorrect code that tried to allow <literal>OVERLAPS</> with + Remove incorrect code that tried to allow <literal>OVERLAPS</literal> with single-element row arguments (Joshua Yanovski) </para> @@ -8156,17 +8156,17 @@ Branch: REL8_4_STABLE [f043bddfe] 2014-03-06 19:31:22 -0500 <listitem> <para> - Avoid getting more than <literal>AccessShareLock</> when de-parsing a + Avoid getting more than <literal>AccessShareLock</literal> when de-parsing a rule or view (Dean Rasheed) </para> <para> - This oversight resulted in <application>pg_dump</> unexpectedly - acquiring <literal>RowExclusiveLock</> locks on tables mentioned as - the targets of <literal>INSERT</>/<literal>UPDATE</>/<literal>DELETE</> + This oversight resulted in <application>pg_dump</application> unexpectedly + acquiring <literal>RowExclusiveLock</literal> locks on tables mentioned as + the targets of <literal>INSERT</literal>/<literal>UPDATE</literal>/<literal>DELETE</literal> commands in rules. While usually harmless, that could interfere with concurrent transactions that tried to acquire, for example, - <literal>ShareLock</> on those tables. + <literal>ShareLock</literal> on those tables. </para> </listitem> @@ -8201,9 +8201,9 @@ Branch: REL9_3_STABLE [e8655a77f] 2014-02-21 17:10:49 -0500 <listitem> <para> Use non-default selectivity estimates for - <literal><replaceable>value</> IN (<replaceable>list</>)</literal> and - <literal><replaceable>value</> <replaceable>operator</> ANY - (<replaceable>array</>)</literal> + <literal><replaceable>value</replaceable> IN (<replaceable>list</replaceable>)</literal> and + <literal><replaceable>value</replaceable> <replaceable>operator</replaceable> ANY + (<replaceable>array</replaceable>)</literal> expressions when the righthand side is a stable expression (Tom Lane) </para> </listitem> @@ -8217,16 +8217,16 @@ Branch: REL9_3_STABLE [13ea43ab8] 2014-03-05 13:03:29 -0300 <listitem> <para> Remove the correct per-database statistics file during <command>DROP - DATABASE</> (Tomas Vondra) + DATABASE</command> (Tomas Vondra) </para> <para> This fix prevents a permanent leak of statistics file space. - Users who have done many <command>DROP DATABASE</> commands since - upgrading to <productname>PostgreSQL</> 9.3 may wish to check their + Users who have done many <command>DROP DATABASE</command> commands since + upgrading to <productname>PostgreSQL</productname> 9.3 may wish to check their statistics directory and delete statistics files that do not correspond to any existing database. Please note - that <filename>db_0.stat</> should not be removed. + that <filename>db_0.stat</filename> should not be removed. </para> </listitem> @@ -8238,12 +8238,12 @@ Branch: REL9_3_STABLE [dcd1131c8] 2014-03-06 21:40:50 +0200 <listitem> <para> - Fix <application>walsender</> ping logic to avoid inappropriate + Fix <application>walsender</application> ping logic to avoid inappropriate disconnects under continuous load (Andres Freund, Heikki Linnakangas) </para> <para> - <application>walsender</> failed to send ping messages to the client + <application>walsender</application> failed to send ping messages to the client if it was constantly busy sending WAL data; but it expected to see ping responses despite that, and would therefore disconnect once <xref linkend="guc-wal-sender-timeout"> elapsed. @@ -8260,8 +8260,8 @@ Branch: REL9_1_STABLE [65e8dbb18] 2014-03-17 20:42:35 +0900 <listitem> <para> - Fix <application>walsender</>'s failure to shut down cleanly when client - is <application>pg_receivexlog</> (Fujii Masao) + Fix <application>walsender</application>'s failure to shut down cleanly when client + is <application>pg_receivexlog</application> (Fujii Masao) </para> </listitem> @@ -8324,13 +8324,13 @@ Branch: REL8_4_STABLE [172c53e92] 2014-03-13 20:59:57 -0400 <listitem> <para> - Prevent interrupts while reporting non-<literal>ERROR</> messages + Prevent interrupts while reporting non-<literal>ERROR</literal> messages (Tom Lane) </para> <para> This guards against rare server-process freezeups due to recursive - entry to <function>syslog()</>, and perhaps other related problems. + entry to <function>syslog()</function>, and perhaps other related problems. </para> </listitem> @@ -8358,13 +8358,13 @@ Branch: REL9_2_STABLE [b315b767f] 2014-03-10 15:47:13 -0400 <listitem> <para> - Fix tracking of <application>psql</> script line numbers - during <literal>\copy</> from out-of-line data + Fix tracking of <application>psql</application> script line numbers + during <literal>\copy</literal> from out-of-line data (Kumar Rajeev Rastogi, Amit Khandekar) </para> <para> - <literal>\copy ... from</> incremented the script file line number + <literal>\copy ... from</literal> incremented the script file line number for each data line, even if the data was not coming from the script file. This mistake resulted in wrong line numbers being reported for any errors occurring later in the same script file. @@ -8379,12 +8379,12 @@ Branch: REL9_3_STABLE [73f0483fd] 2014-03-07 16:36:50 -0500 <listitem> <para> - Fix <application>contrib/postgres_fdw</> to handle multiple join + Fix <application>contrib/postgres_fdw</application> to handle multiple join conditions properly (Tom Lane) </para> <para> - This oversight could result in sending <literal>WHERE</> clauses to + This oversight could result in sending <literal>WHERE</literal> clauses to the remote server for execution even though the clauses are not known to have the same semantics on the remote server (for example, clauses that use non-built-in operators). The query might succeed anyway, @@ -8404,7 +8404,7 @@ Branch: REL9_0_STABLE [665515539] 2014-03-16 11:47:37 +0100 <listitem> <para> - Prevent intermittent <quote>could not reserve shared memory region</> + Prevent intermittent <quote>could not reserve shared memory region</quote> failures on recent Windows versions (MauMau) </para> </listitem> @@ -8421,7 +8421,7 @@ Branch: REL8_4_STABLE [6e6c2c2e1] 2014-03-15 13:36:57 -0400 <listitem> <para> - Update time zone data files to <application>tzdata</> release 2014a + Update time zone data files to <application>tzdata</application> release 2014a for DST law changes in Fiji and Turkey, plus historical changes in Israel and Ukraine. </para> @@ -8494,19 +8494,19 @@ Branch: REL8_4_STABLE [ff35425c8] 2014-02-17 09:33:38 -0500 <listitem> <para> - Shore up <literal>GRANT ... WITH ADMIN OPTION</> restrictions + Shore up <literal>GRANT ... WITH ADMIN OPTION</literal> restrictions (Noah Misch) </para> <para> - Granting a role without <literal>ADMIN OPTION</> is supposed to + Granting a role without <literal>ADMIN OPTION</literal> is supposed to prevent the grantee from adding or removing members from the granted role, but this restriction was easily bypassed by doing <literal>SET - ROLE</> first. The security impact is mostly that a role member can + ROLE</literal> first. The security impact is mostly that a role member can revoke the access of others, contrary to the wishes of his grantor. Unapproved role member additions are a lesser concern, since an uncooperative role member could provide most of his rights to others - anyway by creating views or <literal>SECURITY DEFINER</> functions. + anyway by creating views or <literal>SECURITY DEFINER</literal> functions. (CVE-2014-0060) </para> </listitem> @@ -8529,7 +8529,7 @@ Branch: REL8_4_STABLE [823b9dc25] 2014-02-17 09:33:38 -0500 <para> The primary role of PL validator functions is to be called implicitly - during <command>CREATE FUNCTION</>, but they are also normal SQL + during <command>CREATE FUNCTION</command>, but they are also normal SQL functions that a user can call explicitly. Calling a validator on a function actually written in some other language was not checked for and could be exploited for privilege-escalation purposes. @@ -8559,7 +8559,7 @@ Branch: REL8_4_STABLE [e46476133] 2014-02-17 09:33:38 -0500 <para> If the name lookups come to different conclusions due to concurrent activity, we might perform some parts of the DDL on a different table - than other parts. At least in the case of <command>CREATE INDEX</>, + than other parts. At least in the case of <command>CREATE INDEX</command>, this can be used to cause the permissions checks to be performed against a different table than the index creation, allowing for a privilege escalation attack. @@ -8583,12 +8583,12 @@ Branch: REL8_4_STABLE [d0ed1a6c0] 2014-02-17 09:33:39 -0500 </para> <para> - The <literal>MAXDATELEN</> constant was too small for the longest - possible value of type <type>interval</>, allowing a buffer overrun - in <function>interval_out()</>. Although the datetime input + The <literal>MAXDATELEN</literal> constant was too small for the longest + possible value of type <type>interval</type>, allowing a buffer overrun + in <function>interval_out()</function>. Although the datetime input functions were more careful about avoiding buffer overrun, the limit was short enough to cause them to reject some valid inputs, such as - input containing a very long timezone name. The <application>ecpg</> + input containing a very long timezone name. The <application>ecpg</application> library contained these vulnerabilities along with some of its own. (CVE-2014-0063) </para> @@ -8635,7 +8635,7 @@ Branch: REL8_4_STABLE [69d2bc14a] 2014-02-17 11:20:38 -0500 </para> <para> - Use <function>strlcpy()</> and related functions to provide a clear + Use <function>strlcpy()</function> and related functions to provide a clear guarantee that fixed-size buffers are not overrun. Unlike the preceding items, it is unclear whether these cases really represent live issues, since in most cases there appear to be previous @@ -8657,16 +8657,16 @@ Branch: REL8_4_STABLE [69d2bc14a] 2014-02-17 11:20:38 -0500 <listitem> <para> - Avoid crashing if <function>crypt()</> returns NULL (Honza Horak, + Avoid crashing if <function>crypt()</function> returns NULL (Honza Horak, Bruce Momjian) </para> <para> - There are relatively few scenarios in which <function>crypt()</> - could return NULL, but <filename>contrib/chkpass</> would crash + There are relatively few scenarios in which <function>crypt()</function> + could return NULL, but <filename>contrib/chkpass</filename> would crash if it did. One practical case in which this could be an issue is - if <application>libc</> is configured to refuse to execute unapproved - hashing algorithms (e.g., <quote>FIPS mode</>). + if <application>libc</application> is configured to refuse to execute unapproved + hashing algorithms (e.g., <quote>FIPS mode</quote>). (CVE-2014-0066) </para> </listitem> @@ -8683,19 +8683,19 @@ Branch: REL8_4_STABLE [f58663ab1] 2014-02-17 11:24:51 -0500 <listitem> <para> - Document risks of <literal>make check</> in the regression testing + Document risks of <literal>make check</literal> in the regression testing instructions (Noah Misch, Tom Lane) </para> <para> - Since the temporary server started by <literal>make check</> - uses <quote>trust</> authentication, another user on the same machine + Since the temporary server started by <literal>make check</literal> + uses <quote>trust</quote> authentication, another user on the same machine could connect to it as database superuser, and then potentially exploit the privileges of the operating-system user who started the tests. A future release will probably incorporate changes in the testing procedure to prevent this risk, but some public discussion is needed first. So for the moment, just warn people against using - <literal>make check</> when there are untrusted users on the + <literal>make check</literal> when there are untrusted users on the same machine. (CVE-2014-0067) </para> @@ -8716,7 +8716,7 @@ Branch: REL9_3_STABLE [8e9a16ab8] 2013-12-16 11:29:51 -0300 <para> The logic for tuple freezing was unable to handle some cases involving freezing of - <link linkend="vacuum-for-multixact-wraparound"><firstterm>multixact</> + <link linkend="vacuum-for-multixact-wraparound"><firstterm>multixact</firstterm> IDs</link>, with the practical effect that shared row-level locks might be forgotten once old enough. </para> @@ -8725,7 +8725,7 @@ Branch: REL9_3_STABLE [8e9a16ab8] 2013-12-16 11:29:51 -0300 Fixing this required changing the WAL record format for tuple freezing. While this is no issue for standalone servers, when using replication it means that <emphasis>standby servers must be upgraded - to 9.3.3 or later before their masters are</>. An older standby will + to 9.3.3 or later before their masters are</emphasis>. An older standby will be unable to interpret freeze records generated by a newer master, and will fail with a PANIC message. (In such a case, upgrading the standby should be sufficient to let it resume execution.) @@ -8783,8 +8783,8 @@ Branch: REL9_3_STABLE [db1014bc4] 2013-12-18 13:31:27 -0300 <para> This oversight could allow referential integrity checks to give false positives (for instance, allow deletes that should have been rejected). - Applications using the new commands <literal>SELECT FOR KEY SHARE</> - and <literal>SELECT FOR NO KEY UPDATE</> might also have suffered + Applications using the new commands <literal>SELECT FOR KEY SHARE</literal> + and <literal>SELECT FOR NO KEY UPDATE</literal> might also have suffered locking failures of this kind. </para> </listitem> @@ -8797,7 +8797,7 @@ Branch: REL9_3_STABLE [c6cd27e36] 2013-12-05 12:21:55 -0300 <listitem> <para> - Prevent <quote>forgetting</> valid row locks when one of several + Prevent <quote>forgetting</quote> valid row locks when one of several holders of a row lock aborts (Álvaro Herrera) </para> @@ -8822,8 +8822,8 @@ Branch: REL9_3_STABLE [2dcc48c35] 2013-12-05 17:47:51 -0300 <para> This mistake could result in spurious <quote>could not serialize access - due to concurrent update</> errors in <literal>REPEATABLE READ</> - and <literal>SERIALIZABLE</> transaction isolation modes. + due to concurrent update</quote> errors in <literal>REPEATABLE READ</literal> + and <literal>SERIALIZABLE</literal> transaction isolation modes. </para> </listitem> @@ -8836,7 +8836,7 @@ Branch: REL9_3_STABLE [03db79459] 2014-01-02 18:17:07 -0300 <listitem> <para> Handle wraparound correctly during extension or truncation - of <filename>pg_multixact/members</> + of <filename>pg_multixact/members</filename> (Andres Freund, Álvaro Herrera) </para> </listitem> @@ -8849,7 +8849,7 @@ Branch: REL9_3_STABLE [948a3dfbb] 2014-01-02 18:17:29 -0300 <listitem> <para> - Fix handling of 5-digit filenames in <filename>pg_multixact/members</> + Fix handling of 5-digit filenames in <filename>pg_multixact/members</filename> (Álvaro Herrera) </para> @@ -8886,7 +8886,7 @@ Branch: REL9_3_STABLE [85d3b3c3a] 2013-12-19 16:39:59 -0300 <para> This fixes a performance regression from pre-9.3 versions when doing - <literal>SELECT FOR UPDATE</> followed by <literal>UPDATE/DELETE</>. + <literal>SELECT FOR UPDATE</literal> followed by <literal>UPDATE/DELETE</literal>. </para> </listitem> @@ -8900,7 +8900,7 @@ Branch: REL9_3_STABLE [762bd379a] 2014-02-14 15:18:34 +0200 <para> During archive recovery, prefer highest timeline number when WAL segments with the same ID are present in both the archive - and <filename>pg_xlog/</> (Kyotaro Horiguchi) + and <filename>pg_xlog/</filename> (Kyotaro Horiguchi) </para> <para> @@ -8929,7 +8929,7 @@ Branch: REL8_4_STABLE [9620fede9] 2014-02-12 14:52:32 -0500 <para> The WAL update could be applied to the wrong page, potentially many pages past where it should have been. Aside from corrupting data, - this error has been observed to result in significant <quote>bloat</> + this error has been observed to result in significant <quote>bloat</quote> of standby servers compared to their masters, due to updates being applied far beyond where the end-of-file should have been. This failure mode does not appear to be a significant risk during crash @@ -8958,7 +8958,7 @@ Branch: REL9_0_STABLE [5301c8395] 2014-01-08 14:34:21 +0200 was already consistent at the start of replay, thus possibly allowing hot-standby queries before the database was really consistent. Other symptoms such as <quote>PANIC: WAL contains references to invalid - pages</> were also possible. + pages</quote> were also possible. </para> </listitem> @@ -8986,13 +8986,13 @@ Branch: REL9_0_STABLE [5d742b9ce] 2014-01-14 17:35:00 -0500 <listitem> <para> Fix improper locking of btree index pages while replaying - a <literal>VACUUM</> operation in hot-standby mode (Andres Freund, + a <literal>VACUUM</literal> operation in hot-standby mode (Andres Freund, Heikki Linnakangas, Tom Lane) </para> <para> This error could result in <quote>PANIC: WAL contains references to - invalid pages</> failures. + invalid pages</quote> failures. </para> </listitem> @@ -9028,8 +9028,8 @@ Branch: REL9_1_STABLE [0402f2441] 2014-01-08 23:31:01 +0200 <listitem> <para> - When <literal>pause_at_recovery_target</> - and <literal>recovery_target_inclusive</> are both set, ensure the + When <literal>pause_at_recovery_target</literal> + and <literal>recovery_target_inclusive</literal> are both set, ensure the target record is applied before pausing, not after (Heikki Linnakangas) </para> @@ -9058,14 +9058,14 @@ Branch: REL9_3_STABLE [478af9b79] 2013-12-13 11:50:25 -0500 <listitem> <para> Prevent timeout interrupts from taking control away from mainline - code unless <varname>ImmediateInterruptOK</> is set + code unless <varname>ImmediateInterruptOK</varname> is set (Andres Freund, Tom Lane) </para> <para> This is a serious issue for any application making use of statement timeouts, as it could cause all manner of strange failures after a - timeout occurred. We have seen reports of <quote>stuck</> spinlocks, + timeout occurred. We have seen reports of <quote>stuck</quote> spinlocks, ERRORs being unexpectedly promoted to PANICs, unkillable backends, and other misbehaviors. </para> @@ -9088,7 +9088,7 @@ Branch: REL8_4_STABLE [458b20f2d] 2014-01-31 21:41:09 -0500 <para> Ensure that signal handlers don't attempt to use the - process's <varname>MyProc</> pointer after it's no longer valid. + process's <varname>MyProc</varname> pointer after it's no longer valid. </para> </listitem> @@ -9119,13 +9119,13 @@ Branch: REL8_4_STABLE [01b882fd8] 2014-01-29 20:04:14 -0500 <listitem> <para> - Fix unsafe references to <varname>errno</> within error reporting + Fix unsafe references to <varname>errno</varname> within error reporting logic (Christian Kruse) </para> <para> This would typically lead to odd behaviors such as missing or - inappropriate <literal>HINT</> fields. + inappropriate <literal>HINT</literal> fields. </para> </listitem> @@ -9141,7 +9141,7 @@ Branch: REL8_4_STABLE [d0070ac81] 2014-01-11 16:35:44 -0500 <listitem> <para> - Fix possible crashes from using <function>ereport()</> too early + Fix possible crashes from using <function>ereport()</function> too early during server startup (Tom Lane) </para> @@ -9185,7 +9185,7 @@ Branch: REL8_4_STABLE [a8a46d846] 2014-02-13 14:24:58 -0500 <listitem> <para> - Fix length checking for Unicode identifiers (<literal>U&"..."</> + Fix length checking for Unicode identifiers (<literal>U&"..."</literal> syntax) containing escapes (Tom Lane) </para> @@ -9227,7 +9227,7 @@ Branch: REL9_0_STABLE [f2eede9b5] 2014-01-21 23:01:40 -0500 <para> A previous patch allowed such keywords to be used without quoting in places such as role identifiers; but it missed cases where a - list of role identifiers was permitted, such as <literal>DROP ROLE</>. + list of role identifiers was permitted, such as <literal>DROP ROLE</literal>. </para> </listitem> @@ -9259,7 +9259,7 @@ Branch: REL8_4_STABLE [884c6384a] 2013-12-10 16:10:36 -0500 <listitem> <para> Fix possible crash due to invalid plan for nested sub-selects, such - as <literal>WHERE (... x IN (SELECT ...) ...) IN (SELECT ...)</> + as <literal>WHERE (... x IN (SELECT ...) ...) IN (SELECT ...)</literal> (Tom Lane) </para> </listitem> @@ -9272,13 +9272,13 @@ Branch: REL9_3_STABLE [a4aa854ca] 2014-01-30 14:51:19 -0500 <listitem> <para> - Fix mishandling of <literal>WHERE</> conditions pulled up from - a <literal>LATERAL</> subquery (Tom Lane) + Fix mishandling of <literal>WHERE</literal> conditions pulled up from + a <literal>LATERAL</literal> subquery (Tom Lane) </para> <para> The typical symptom of this bug was a <quote>JOIN qualification - cannot refer to other relations</> error, though subtle logic + cannot refer to other relations</quote> error, though subtle logic errors in created plans seem possible as well. </para> </listitem> @@ -9291,8 +9291,8 @@ Branch: REL9_3_STABLE [27ff4cfe7] 2014-01-11 19:03:15 -0500 <listitem> <para> - Disallow <literal>LATERAL</> references to the target table of - an <literal>UPDATE/DELETE</> (Tom Lane) + Disallow <literal>LATERAL</literal> references to the target table of + an <literal>UPDATE/DELETE</literal> (Tom Lane) </para> <para> @@ -9310,12 +9310,12 @@ Branch: REL9_2_STABLE [5d545b7ed] 2013-12-14 17:34:00 -0500 <listitem> <para> - Fix <literal>UPDATE/DELETE</> of an inherited target table - that has <literal>UNION ALL</> subqueries (Tom Lane) + Fix <literal>UPDATE/DELETE</literal> of an inherited target table + that has <literal>UNION ALL</literal> subqueries (Tom Lane) </para> <para> - Without this fix, <literal>UNION ALL</> subqueries aren't correctly + Without this fix, <literal>UNION ALL</literal> subqueries aren't correctly inserted into the update plans for inheritance child tables after the first one, typically resulting in no update happening for those child table(s). @@ -9330,7 +9330,7 @@ Branch: REL9_3_STABLE [663f8419b] 2013-12-23 22:18:23 -0500 <listitem> <para> - Fix <command>ANALYZE</> to not fail on a column that's a domain over + Fix <command>ANALYZE</command> to not fail on a column that's a domain over a range type (Tom Lane) </para> </listitem> @@ -9347,12 +9347,12 @@ Branch: REL8_4_STABLE [00b77771a] 2014-01-11 13:42:11 -0500 <listitem> <para> - Ensure that <command>ANALYZE</> creates statistics for a table column - even when all the values in it are <quote>too wide</> (Tom Lane) + Ensure that <command>ANALYZE</command> creates statistics for a table column + even when all the values in it are <quote>too wide</quote> (Tom Lane) </para> <para> - <command>ANALYZE</> intentionally omits very wide values from its + <command>ANALYZE</command> intentionally omits very wide values from its histogram and most-common-values calculations, but it neglected to do something sane in the case that all the sampled entries are too wide. </para> @@ -9370,14 +9370,14 @@ Branch: REL8_4_STABLE [0fb4e3ceb] 2014-01-18 18:50:47 -0500 <listitem> <para> - In <literal>ALTER TABLE ... SET TABLESPACE</>, allow the database's + In <literal>ALTER TABLE ... SET TABLESPACE</literal>, allow the database's default tablespace to be used without a permissions check (Stephen Frost) </para> <para> - <literal>CREATE TABLE</> has always allowed such usage, - but <literal>ALTER TABLE</> didn't get the memo. + <literal>CREATE TABLE</literal> has always allowed such usage, + but <literal>ALTER TABLE</literal> didn't get the memo. </para> </listitem> @@ -9405,8 +9405,8 @@ Branch: REL8_4_STABLE [57ac7d8a7] 2014-01-08 20:18:24 -0500 <listitem> <para> - Fix <quote>cannot accept a set</> error when some arms of - a <literal>CASE</> return a set and others don't (Tom Lane) + Fix <quote>cannot accept a set</quote> error when some arms of + a <literal>CASE</literal> return a set and others don't (Tom Lane) </para> </listitem> @@ -9487,12 +9487,12 @@ Branch: REL8_4_STABLE [6141983fb] 2014-02-10 10:00:50 +0200 <listitem> <para> - Fix possible misbehavior in <function>plainto_tsquery()</> + Fix possible misbehavior in <function>plainto_tsquery()</function> (Heikki Linnakangas) </para> <para> - Use <function>memmove()</> not <function>memcpy()</> for copying + Use <function>memmove()</function> not <function>memcpy()</function> for copying overlapping memory regions. There have been no field reports of this actually causing trouble, but it's certainly risky. </para> @@ -9508,8 +9508,8 @@ Branch: REL9_1_STABLE [026a91f86] 2014-01-07 18:00:36 +0100 <listitem> <para> - Fix placement of permissions checks in <function>pg_start_backup()</> - and <function>pg_stop_backup()</> (Andres Freund, Magnus Hagander) + Fix placement of permissions checks in <function>pg_start_backup()</function> + and <function>pg_stop_backup()</function> (Andres Freund, Magnus Hagander) </para> <para> @@ -9530,7 +9530,7 @@ Branch: REL8_4_STABLE [69f77d756] 2013-12-15 11:11:11 +0900 <listitem> <para> - Accept <literal>SHIFT_JIS</> as an encoding name for locale checking + Accept <literal>SHIFT_JIS</literal> as an encoding name for locale checking purposes (Tatsuo Ishii) </para> </listitem> @@ -9544,14 +9544,14 @@ Branch: REL9_2_STABLE [888b56570] 2014-02-03 14:46:57 -0500 <listitem> <para> - Fix <literal>*</>-qualification of named parameters in SQL-language + Fix <literal>*</literal>-qualification of named parameters in SQL-language functions (Tom Lane) </para> <para> Given a composite-type parameter - named <literal>foo</>, <literal>$1.*</> worked fine, - but <literal>foo.*</> not so much. + named <literal>foo</literal>, <literal>$1.*</literal> worked fine, + but <literal>foo.*</literal> not so much. </para> </listitem> @@ -9567,11 +9567,11 @@ Branch: REL8_4_STABLE [5525529db] 2014-01-23 23:02:30 +0900 <listitem> <para> - Fix misbehavior of <function>PQhost()</> on Windows (Fujii Masao) + Fix misbehavior of <function>PQhost()</function> on Windows (Fujii Masao) </para> <para> - It should return <literal>localhost</> if no host has been specified. + It should return <literal>localhost</literal> if no host has been specified. </para> </listitem> @@ -9587,14 +9587,14 @@ Branch: REL8_4_STABLE [7644a7bd8] 2014-02-13 18:45:32 -0500 <listitem> <para> - Improve error handling in <application>libpq</> and <application>psql</> - for failures during <literal>COPY TO STDOUT/FROM STDIN</> (Tom Lane) + Improve error handling in <application>libpq</application> and <application>psql</application> + for failures during <literal>COPY TO STDOUT/FROM STDIN</literal> (Tom Lane) </para> <para> In particular this fixes an infinite loop that could occur in 9.2 and up if the server connection was lost during <literal>COPY FROM - STDIN</>. Variants of that scenario might be possible in older + STDIN</literal>. Variants of that scenario might be possible in older versions, or with other client applications. </para> </listitem> @@ -9609,7 +9609,7 @@ Branch: REL9_2_STABLE [fa28f9cba] 2014-01-04 16:05:23 -0500 <listitem> <para> Fix incorrect translation handling in - some <application>psql</> <literal>\d</> commands + some <application>psql</application> <literal>\d</literal> commands (Peter Eisentraut, Tom Lane) </para> </listitem> @@ -9623,7 +9623,7 @@ Branch: REL9_2_STABLE [0ae288d2d] 2014-02-12 14:51:00 +0100 <listitem> <para> - Ensure <application>pg_basebackup</>'s background process is killed + Ensure <application>pg_basebackup</application>'s background process is killed when exiting its foreground process (Magnus Hagander) </para> </listitem> @@ -9639,7 +9639,7 @@ Branch: REL9_1_STABLE [c6e5c4dd1] 2014-02-09 12:09:55 +0100 <listitem> <para> Fix possible incorrect printing of filenames - in <application>pg_basebackup</>'s verbose mode (Magnus Hagander) + in <application>pg_basebackup</application>'s verbose mode (Magnus Hagander) </para> </listitem> @@ -9670,7 +9670,7 @@ Branch: REL8_4_STABLE [d68a65b01] 2014-01-09 15:58:37 +0100 <listitem> <para> - Fix misaligned descriptors in <application>ecpg</> (MauMau) + Fix misaligned descriptors in <application>ecpg</application> (MauMau) </para> </listitem> @@ -9686,7 +9686,7 @@ Branch: REL8_4_STABLE [96de4939c] 2014-01-01 12:44:58 +0100 <listitem> <para> - In <application>ecpg</>, handle lack of a hostname in the connection + In <application>ecpg</application>, handle lack of a hostname in the connection parameters properly (Michael Meskes) </para> </listitem> @@ -9703,7 +9703,7 @@ Branch: REL8_4_STABLE [6c8b16e30] 2013-12-07 16:56:34 -0800 <listitem> <para> - Fix performance regression in <filename>contrib/dblink</> connection + Fix performance regression in <filename>contrib/dblink</filename> connection startup (Joe Conway) </para> @@ -9724,7 +9724,7 @@ Branch: REL8_4_STABLE [492b68541] 2014-01-13 15:44:14 +0200 <listitem> <para> - In <filename>contrib/isn</>, fix incorrect calculation of the check + In <filename>contrib/isn</filename>, fix incorrect calculation of the check digit for ISMN values (Fabien Coelho) </para> </listitem> @@ -9737,7 +9737,7 @@ Branch: REL9_3_STABLE [27902bc91] 2013-12-12 19:07:53 +0900 <listitem> <para> - Fix <filename>contrib/pgbench</>'s progress logging to avoid overflow + Fix <filename>contrib/pgbench</filename>'s progress logging to avoid overflow when the scale factor is large (Tatsuo Ishii) </para> </listitem> @@ -9751,8 +9751,8 @@ Branch: REL9_2_STABLE [27ab1eb7e] 2014-01-21 16:34:35 -0500 <listitem> <para> - Fix <filename>contrib/pg_stat_statement</>'s handling - of <literal>CURRENT_DATE</> and related constructs (Kyotaro + Fix <filename>contrib/pg_stat_statement</filename>'s handling + of <literal>CURRENT_DATE</literal> and related constructs (Kyotaro Horiguchi) </para> </listitem> @@ -9766,7 +9766,7 @@ Branch: REL9_3_STABLE [eb3d350db] 2014-02-03 21:30:28 -0500 <listitem> <para> Improve lost-connection error handling - in <filename>contrib/postgres_fdw</> (Tom Lane) + in <filename>contrib/postgres_fdw</filename> (Tom Lane) </para> </listitem> @@ -9799,13 +9799,13 @@ Branch: REL8_4_STABLE [ae3c98b9b] 2014-02-01 15:16:52 -0500 <listitem> <para> - In Mingw and Cygwin builds, install the <application>libpq</> DLL - in the <filename>bin</> directory (Andrew Dunstan) + In Mingw and Cygwin builds, install the <application>libpq</application> DLL + in the <filename>bin</filename> directory (Andrew Dunstan) </para> <para> This duplicates what the MSVC build has long done. It should fix - problems with programs like <application>psql</> failing to start + problems with programs like <application>psql</application> failing to start because they can't find the DLL. </para> </listitem> @@ -9821,7 +9821,7 @@ Branch: REL9_0_STABLE [1c0bf372f] 2014-02-01 16:14:15 -0500 <listitem> <para> - Avoid using the deprecated <literal>dllwrap</> tool in Cygwin builds + Avoid using the deprecated <literal>dllwrap</literal> tool in Cygwin builds (Marco Atzeri) </para> </listitem> @@ -9850,8 +9850,8 @@ Branch: REL8_4_STABLE [432735cbf] 2014-02-10 20:48:30 -0500 <listitem> <para> - Don't generate plain-text <filename>HISTORY</> - and <filename>src/test/regress/README</> files anymore (Tom Lane) + Don't generate plain-text <filename>HISTORY</filename> + and <filename>src/test/regress/README</filename> files anymore (Tom Lane) </para> <para> @@ -9860,7 +9860,7 @@ Branch: REL8_4_STABLE [432735cbf] 2014-02-10 20:48:30 -0500 the likely audience for plain-text format. Distribution tarballs will still contain files by these names, but they'll just be stubs directing the reader to consult the main documentation. - The plain-text <filename>INSTALL</> file will still be maintained, as + The plain-text <filename>INSTALL</filename> file will still be maintained, as there is arguably a use-case for that. </para> </listitem> @@ -9877,13 +9877,13 @@ Branch: REL8_4_STABLE [c0c2d62ac] 2014-02-14 21:59:56 -0500 <listitem> <para> - Update time zone data files to <application>tzdata</> release 2013i + Update time zone data files to <application>tzdata</application> release 2013i for DST law changes in Jordan and historical changes in Cuba. </para> <para> - In addition, the zones <literal>Asia/Riyadh87</>, - <literal>Asia/Riyadh88</>, and <literal>Asia/Riyadh89</> have been + In addition, the zones <literal>Asia/Riyadh87</literal>, + <literal>Asia/Riyadh88</literal>, and <literal>Asia/Riyadh89</literal> have been removed, as they are no longer maintained by IANA, and never represented actual civil timekeeping practice. </para> @@ -9935,19 +9935,19 @@ Branch: REL8_4_STABLE [c0c2d62ac] 2014-02-14 21:59:56 -0500 <listitem> <para> - Fix <command>VACUUM</>'s tests to see whether it can - update <structfield>relfrozenxid</> (Andres Freund) + Fix <command>VACUUM</command>'s tests to see whether it can + update <structfield>relfrozenxid</structfield> (Andres Freund) </para> <para> - In some cases <command>VACUUM</> (either manual or autovacuum) could - incorrectly advance a table's <structfield>relfrozenxid</> value, + In some cases <command>VACUUM</command> (either manual or autovacuum) could + incorrectly advance a table's <structfield>relfrozenxid</structfield> value, allowing tuples to escape freezing, causing those rows to become invisible once 2^31 transactions have elapsed. The probability of data loss is fairly low since multiple incorrect advancements would need to happen before actual loss occurs, but it's not zero. In 9.2.0 and later, the probability of loss is higher, and it's also possible - to get <quote>could not access status of transaction</> errors as a + to get <quote>could not access status of transaction</quote> errors as a consequence of this bug. Users upgrading from releases 9.0.4 or 8.4.8 or earlier are not affected, but all later versions contain the bug. </para> @@ -9955,12 +9955,12 @@ Branch: REL8_4_STABLE [c0c2d62ac] 2014-02-14 21:59:56 -0500 <para> The issue can be ameliorated by, after upgrading, vacuuming all tables in all databases while having <link - linkend="guc-vacuum-freeze-table-age"><varname>vacuum_freeze_table_age</></link> + linkend="guc-vacuum-freeze-table-age"><varname>vacuum_freeze_table_age</varname></link> set to zero. This will fix any latent corruption but will not be able to fix all pre-existing data errors. However, an installation can be presumed safe after performing this vacuuming if it has executed fewer than 2^31 update transactions in its lifetime (check this with - <literal>SELECT txid_current() < 2^31</>). + <literal>SELECT txid_current() < 2^31</literal>). </para> </listitem> @@ -9972,14 +9972,14 @@ Branch: REL8_4_STABLE [c0c2d62ac] 2014-02-14 21:59:56 -0500 <para> These bugs could lead to <quote>could not access status of - transaction</> errors, or to duplicate or vanishing rows. + transaction</quote> errors, or to duplicate or vanishing rows. Users upgrading from releases prior to 9.3.0 are not affected. </para> <para> The issue can be ameliorated by, after upgrading, vacuuming all tables in all databases while having <link - linkend="guc-vacuum-freeze-table-age"><varname>vacuum_freeze_table_age</></link> + linkend="guc-vacuum-freeze-table-age"><varname>vacuum_freeze_table_age</varname></link> set to zero. This will fix latent corruption but will not be able to fix all pre-existing data errors. </para> @@ -9995,7 +9995,7 @@ Branch: REL8_4_STABLE [c0c2d62ac] 2014-02-14 21:59:56 -0500 <listitem> <para> - Fix initialization of <filename>pg_clog</> and <filename>pg_subtrans</> + Fix initialization of <filename>pg_clog</filename> and <filename>pg_subtrans</filename> during hot standby startup (Andres Freund, Heikki Linnakangas) </para> @@ -10028,7 +10028,7 @@ Branch: REL8_4_STABLE [c0c2d62ac] 2014-02-14 21:59:56 -0500 <para> These bugs could result in incorrect behavior, such as locking or even updating the wrong row, in the presence of concurrent updates. - Spurious <quote>unable to fetch updated version of tuple</> errors + Spurious <quote>unable to fetch updated version of tuple</quote> errors were also possible. </para> </listitem> @@ -10040,7 +10040,7 @@ Branch: REL8_4_STABLE [c0c2d62ac] 2014-02-14 21:59:56 -0500 <para> This could lead to corruption of the lock data structures in shared - memory, causing <quote>lock already held</> and other odd errors. + memory, causing <quote>lock already held</quote> and other odd errors. </para> </listitem> @@ -10057,7 +10057,7 @@ Branch: REL8_4_STABLE [c0c2d62ac] 2014-02-14 21:59:56 -0500 <listitem> <para> - Truncate <filename>pg_multixact</> contents during WAL replay + Truncate <filename>pg_multixact</filename> contents during WAL replay (Andres Freund) </para> @@ -10068,14 +10068,14 @@ Branch: REL8_4_STABLE [c0c2d62ac] 2014-02-14 21:59:56 -0500 <listitem> <para> - Ensure an anti-wraparound <command>VACUUM</> counts a page as scanned + Ensure an anti-wraparound <command>VACUUM</command> counts a page as scanned when it's only verified that no tuples need freezing (Sergey Burladyan, Jeff Janes) </para> <para> This bug could result in failing to - advance <structfield>relfrozenxid</>, so that the table would still be + advance <structfield>relfrozenxid</structfield>, so that the table would still be thought to need another anti-wraparound vacuum. In the worst case the database might even shut down to prevent wraparound. </para> @@ -10104,7 +10104,7 @@ Branch: REL8_4_STABLE [c0c2d62ac] 2014-02-14 21:59:56 -0500 <listitem> <para> - Fix <quote>unexpected spgdoinsert() failure</> error during SP-GiST + Fix <quote>unexpected spgdoinsert() failure</quote> error during SP-GiST index creation (Teodor Sigaev) </para> </listitem> @@ -10122,12 +10122,12 @@ Branch: REL8_4_STABLE [c0c2d62ac] 2014-02-14 21:59:56 -0500 </para> <para> - Historically <productname>PostgreSQL</> has accepted queries like + Historically <productname>PostgreSQL</productname> has accepted queries like <programlisting> SELECT ... FROM tab1 x CROSS JOIN (tab2 x CROSS JOIN tab3 y) z </programlisting> although a strict reading of the SQL standard would forbid the - duplicate usage of table alias <literal>x</>. A misguided change in + duplicate usage of table alias <literal>x</literal>. A misguided change in 9.3.0 caused it to reject some such cases that were formerly accepted. Restore the previous behavior. </para> @@ -10135,8 +10135,8 @@ SELECT ... FROM tab1 x CROSS JOIN (tab2 x CROSS JOIN tab3 y) z <listitem> <para> - Avoid flattening a subquery whose <literal>SELECT</> list contains a - volatile function wrapped inside a sub-<literal>SELECT</> (Tom Lane) + Avoid flattening a subquery whose <literal>SELECT</literal> list contains a + volatile function wrapped inside a sub-<literal>SELECT</literal> (Tom Lane) </para> <para> @@ -10153,14 +10153,14 @@ SELECT ... FROM tab1 x CROSS JOIN (tab2 x CROSS JOIN tab3 y) z <para> This error could lead to incorrect plans for queries involving - multiple levels of subqueries within <literal>JOIN</> syntax. + multiple levels of subqueries within <literal>JOIN</literal> syntax. </para> </listitem> <listitem> <para> Fix incorrect planning in cases where the same non-strict expression - appears in multiple <literal>WHERE</> and outer <literal>JOIN</> + appears in multiple <literal>WHERE</literal> and outer <literal>JOIN</literal> equality clauses (Tom Lane) </para> </listitem> @@ -10248,20 +10248,20 @@ SELECT ... FROM tab1 x CROSS JOIN (tab2 x CROSS JOIN tab3 y) z <listitem> <para> - Fix array slicing of <type>int2vector</> and <type>oidvector</> values + Fix array slicing of <type>int2vector</type> and <type>oidvector</type> values (Tom Lane) </para> <para> Expressions of this kind are now implicitly promoted to - regular <type>int2</> or <type>oid</> arrays. + regular <type>int2</type> or <type>oid</type> arrays. </para> </listitem> <listitem> <para> - Return a valid JSON value when converting an empty <type>hstore</> value - to <type>json</> + Return a valid JSON value when converting an empty <type>hstore</type> value + to <type>json</type> (Oskari Saarenmaa) </para> </listitem> @@ -10276,7 +10276,7 @@ SELECT ... FROM tab1 x CROSS JOIN (tab2 x CROSS JOIN tab3 y) z In some cases, the system would use the simple GMT offset value when it should have used the regular timezone setting that had prevailed before the simple offset was selected. This change also causes - the <function>timeofday</> function to honor the simple GMT offset + the <function>timeofday</function> function to honor the simple GMT offset zone. </para> </listitem> @@ -10290,7 +10290,7 @@ SELECT ... FROM tab1 x CROSS JOIN (tab2 x CROSS JOIN tab3 y) z <listitem> <para> - Properly quote generated command lines in <application>pg_ctl</> + Properly quote generated command lines in <application>pg_ctl</application> (Naoya Anzai and Tom Lane) </para> @@ -10301,10 +10301,10 @@ SELECT ... FROM tab1 x CROSS JOIN (tab2 x CROSS JOIN tab3 y) z <listitem> <para> - Fix <application>pg_dumpall</> to work when a source database + Fix <application>pg_dumpall</application> to work when a source database sets <link - linkend="guc-default-transaction-read-only"><varname>default_transaction_read_only</></link> - via <command>ALTER DATABASE SET</> (Kevin Grittner) + linkend="guc-default-transaction-read-only"><varname>default_transaction_read_only</varname></link> + via <command>ALTER DATABASE SET</command> (Kevin Grittner) </para> <para> @@ -10314,19 +10314,19 @@ SELECT ... FROM tab1 x CROSS JOIN (tab2 x CROSS JOIN tab3 y) z <listitem> <para> - Fix <application>pg_isready</> to handle its <option>-d</> option + Fix <application>pg_isready</application> to handle its <option>-d</option> option properly (Fabrízio de Royes Mello and Fujii Masao) </para> </listitem> <listitem> <para> - Fix parsing of WAL file names in <application>pg_receivexlog</> + Fix parsing of WAL file names in <application>pg_receivexlog</application> (Heikki Linnakangas) </para> <para> - This error made <application>pg_receivexlog</> unable to restart + This error made <application>pg_receivexlog</application> unable to restart streaming after stopping, once at least 4 GB of WAL had been written. </para> </listitem> @@ -10334,34 +10334,34 @@ SELECT ... FROM tab1 x CROSS JOIN (tab2 x CROSS JOIN tab3 y) z <listitem> <para> Report out-of-disk-space failures properly - in <application>pg_upgrade</> (Peter Eisentraut) + in <application>pg_upgrade</application> (Peter Eisentraut) </para> </listitem> <listitem> <para> - Make <application>ecpg</> search for quoted cursor names + Make <application>ecpg</application> search for quoted cursor names case-sensitively (Zoltán Böszörményi) </para> </listitem> <listitem> <para> - Fix <application>ecpg</>'s processing of lists of variables - declared <type>varchar</> (Zoltán Böszörményi) + Fix <application>ecpg</application>'s processing of lists of variables + declared <type>varchar</type> (Zoltán Böszörményi) </para> </listitem> <listitem> <para> - Make <filename>contrib/lo</> defend against incorrect trigger definitions + Make <filename>contrib/lo</filename> defend against incorrect trigger definitions (Marc Cousin) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2013h + Update time zone data files to <application>tzdata</application> release 2013h for DST law changes in Argentina, Brazil, Jordan, Libya, Liechtenstein, Morocco, and Palestine. Also, new timezone abbreviations WIB, WIT, WITA for Indonesia. @@ -10395,7 +10395,7 @@ SELECT ... FROM tab1 x CROSS JOIN (tab2 x CROSS JOIN tab3 y) z </para> <para> - However, if you use the <literal>hstore</> extension, see the + However, if you use the <literal>hstore</literal> extension, see the first changelog entry. </para> @@ -10408,18 +10408,18 @@ SELECT ... FROM tab1 x CROSS JOIN (tab2 x CROSS JOIN tab3 y) z <listitem> <para> - Ensure new-in-9.3 JSON functionality is added to the <literal>hstore</> + Ensure new-in-9.3 JSON functionality is added to the <literal>hstore</literal> extension during an update (Andrew Dunstan) </para> <para> - Users who upgraded a pre-9.3 database containing <literal>hstore</> + Users who upgraded a pre-9.3 database containing <literal>hstore</literal> should execute <programlisting> ALTER EXTENSION hstore UPDATE; </programlisting> after installing 9.3.1, to add two new JSON functions and a cast. - (If <literal>hstore</> is already up to date, this command does + (If <literal>hstore</literal> is already up to date, this command does nothing.) </para> </listitem> @@ -10452,14 +10452,14 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> - Fix timeline handling bugs in <application>pg_receivexlog</> + Fix timeline handling bugs in <application>pg_receivexlog</application> (Heikki Linnakangas, Andrew Gierth) </para> </listitem> <listitem> <para> - Prevent <command>CREATE FUNCTION</> from checking <command>SET</> + Prevent <command>CREATE FUNCTION</command> from checking <command>SET</command> variables unless function body checking is enabled (Tom Lane) </para> </listitem> @@ -10488,7 +10488,7 @@ ALTER EXTENSION hstore UPDATE; <title>Overview</title> <para> - Major enhancements in <productname>PostgreSQL</> 9.3 include: + Major enhancements in <productname>PostgreSQL</productname> 9.3 include: </para> <!-- This list duplicates items below, but without authors or details--> @@ -10511,17 +10511,17 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> - Add many features for the <type>JSON</> data type, + Add many features for the <type>JSON</type> data type, including <link linkend="functions-json">operators and functions</link> - to extract elements from <type>JSON</> values + to extract elements from <type>JSON</type> values </para> </listitem> <listitem> <para> - Implement <acronym>SQL</>-standard <link - linkend="queries-lateral"><literal>LATERAL</></link> option for - <literal>FROM</>-clause subqueries and function calls + Implement <acronym>SQL</acronym>-standard <link + linkend="queries-lateral"><literal>LATERAL</literal></link> option for + <literal>FROM</literal>-clause subqueries and function calls </para> </listitem> @@ -10535,9 +10535,9 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> - Add a <link linkend="postgres-fdw"><productname>Postgres</> foreign + Add a <link linkend="postgres-fdw"><productname>Postgres</productname> foreign data wrapper</link> to allow access to - other <productname>Postgres</> servers + other <productname>Postgres</productname> servers </para> </listitem> @@ -10582,8 +10582,8 @@ ALTER EXTENSION hstore UPDATE; <para> A dump/restore using <link - linkend="APP-PG-DUMPALL"><application>pg_dumpall</></link>, or use - of <link linkend="pgupgrade"><application>pg_upgrade</></link>, is + linkend="APP-PG-DUMPALL"><application>pg_dumpall</application></link>, or use + of <link linkend="pgupgrade"><application>pg_upgrade</application></link>, is required for those wishing to migrate data from any previous release. </para> @@ -10599,21 +10599,21 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> - Rename <varname>replication_timeout</> to <link - linkend="guc-wal-sender-timeout"><varname>wal_sender_timeout</></link> + Rename <varname>replication_timeout</varname> to <link + linkend="guc-wal-sender-timeout"><varname>wal_sender_timeout</varname></link> (Amit Kapila) </para> <para> This setting controls the <link - linkend="wal"><acronym>WAL</></link> sender timeout. + linkend="wal"><acronym>WAL</acronym></link> sender timeout. </para> </listitem> <listitem> <para> Require superuser privileges to set <link - linkend="guc-commit-delay"><varname>commit_delay</></link> + linkend="guc-commit-delay"><varname>commit_delay</varname></link> because it can now potentially delay other sessions (Simon Riggs) </para> </listitem> @@ -10625,7 +10625,7 @@ ALTER EXTENSION hstore UPDATE; <para> Users who have set <link - linkend="guc-work-mem"><varname>work_mem</></link> based on the + linkend="guc-work-mem"><varname>work_mem</varname></link> based on the previous behavior may need to revisit that setting. </para> </listitem> @@ -10642,7 +10642,7 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> Throw an error if a tuple to be updated or deleted has already been - updated or deleted by a <literal>BEFORE</> trigger (Kevin Grittner) + updated or deleted by a <literal>BEFORE</literal> trigger (Kevin Grittner) </para> <para> @@ -10652,7 +10652,7 @@ ALTER EXTENSION hstore UPDATE; Now an error is thrown to prevent the inconsistent results from being committed. If this change affects your application, the best solution is usually to move the data-propagation actions to - an <literal>AFTER</> trigger. + an <literal>AFTER</literal> trigger. </para> <para> @@ -10665,15 +10665,15 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> Change multicolumn <link linkend="SQL-CREATETABLE"><literal>ON UPDATE - SET NULL/SET DEFAULT</></link> foreign key actions to affect + SET NULL/SET DEFAULT</literal></link> foreign key actions to affect all columns of the constraint, not just those changed in the - <command>UPDATE</> (Tom Lane) + <command>UPDATE</command> (Tom Lane) </para> <para> Previously, we would set only those referencing columns that correspond to referenced columns that were changed by - the <command>UPDATE</>. This was what was required by SQL-92, + the <command>UPDATE</command>. This was what was required by SQL-92, but more recent editions of the SQL standard specify the new behavior. </para> </listitem> @@ -10681,35 +10681,35 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> Force cached plans to be replanned if the <link - linkend="guc-search-path"><varname>search_path</></link> changes + linkend="guc-search-path"><varname>search_path</varname></link> changes (Tom Lane) </para> <para> Previously, cached plans already generated in the current session were not redone if the query was re-executed with a - new <varname>search_path</> setting, resulting in surprising behavior. + new <varname>search_path</varname> setting, resulting in surprising behavior. </para> </listitem> <listitem> <para> Fix <link - linkend="functions-formatting-table"><function>to_number()</></link> + linkend="functions-formatting-table"><function>to_number()</function></link> to properly handle a period used as a thousands separator (Tom Lane) </para> <para> Previously, a period was considered to be a decimal point even when - the locale says it isn't and the <literal>D</> format code is used to + the locale says it isn't and the <literal>D</literal> format code is used to specify use of the locale-specific decimal point. This resulted in - wrong answers if <literal>FM</> format was also used. + wrong answers if <literal>FM</literal> format was also used. </para> </listitem> <listitem> <para> - Fix <literal>STRICT</> non-set-returning functions that have + Fix <literal>STRICT</literal> non-set-returning functions that have set-returning functions in their arguments to properly return null rows (Tom Lane) </para> @@ -10722,14 +10722,14 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> - Store <link linkend="wal"><acronym>WAL</></link> in a continuous + Store <link linkend="wal"><acronym>WAL</acronym></link> in a continuous stream, rather than skipping the last 16MB segment every 4GB (Heikki Linnakangas) </para> <para> - Previously, <acronym>WAL</> files with names ending in <literal>FF</> - were not used because of this skipping. If you have <acronym>WAL</> + Previously, <acronym>WAL</acronym> files with names ending in <literal>FF</literal> + were not used because of this skipping. If you have <acronym>WAL</acronym> backup or restore scripts that took this behavior into account, they will need to be adjusted. </para> @@ -10738,15 +10738,15 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> In <link - linkend="catalog-pg-constraint"><structname>pg_constraint.confmatchtype</></link>, - store the default foreign key match type (non-<literal>FULL</>, - non-<literal>PARTIAL</>) as <literal>s</> for <quote>simple</> + linkend="catalog-pg-constraint"><structname>pg_constraint.confmatchtype</structname></link>, + store the default foreign key match type (non-<literal>FULL</literal>, + non-<literal>PARTIAL</literal>) as <literal>s</literal> for <quote>simple</quote> (Tom Lane) </para> <para> - Previously this case was represented by <literal>u</> - for <quote>unspecified</>. + Previously this case was represented by <literal>u</literal> + for <quote>unspecified</quote>. </para> </listitem> @@ -10783,10 +10783,10 @@ ALTER EXTENSION hstore UPDATE; <para> This change improves concurrency and reduces the probability of deadlocks when updating tables involved in a foreign-key constraint. - <command>UPDATE</>s that do not change any columns referenced in a - foreign key now take the new <literal>NO KEY UPDATE</> lock mode on - the row, while foreign key checks use the new <literal>KEY SHARE</> - lock mode, which does not conflict with <literal>NO KEY UPDATE</>. + <command>UPDATE</command>s that do not change any columns referenced in a + foreign key now take the new <literal>NO KEY UPDATE</literal> lock mode on + the row, while foreign key checks use the new <literal>KEY SHARE</literal> + lock mode, which does not conflict with <literal>NO KEY UPDATE</literal>. So there is no blocking unless a foreign-key column is changed. </para> </listitem> @@ -10794,7 +10794,7 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> Add configuration variable <link - linkend="guc-lock-timeout"><varname>lock_timeout</></link> to + linkend="guc-lock-timeout"><varname>lock_timeout</varname></link> to allow limiting how long a session will wait to acquire any one lock (Zoltán Böszörményi) </para> @@ -10811,21 +10811,21 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> - Add <link linkend="rangetypes-indexing"><acronym>SP-GiST</></link> + Add <link linkend="rangetypes-indexing"><acronym>SP-GiST</acronym></link> support for range data types (Alexander Korotkov) </para> </listitem> <listitem> <para> - Allow <link linkend="GiST"><acronym>GiST</></link> indexes to be + Allow <link linkend="GiST"><acronym>GiST</acronym></link> indexes to be unlogged (Jeevan Chalke) </para> </listitem> <listitem> <para> - Improve performance of <acronym>GiST</> index insertion by randomizing + Improve performance of <acronym>GiST</acronym> index insertion by randomizing the choice of which page to descend to when there are multiple equally good alternatives (Heikki Linnakangas) </para> @@ -10863,7 +10863,7 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> Improve optimizer's hash table size estimate for - doing <literal>DISTINCT</> via hash aggregation (Tom Lane) + doing <literal>DISTINCT</literal> via hash aggregation (Tom Lane) </para> </listitem> @@ -10893,7 +10893,7 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> - Add <link linkend="SQL-COPY"><command>COPY FREEZE</></link> + Add <link linkend="SQL-COPY"><command>COPY FREEZE</command></link> option to avoid the overhead of marking tuples as frozen later (Simon Riggs, Jeff Davis) </para> @@ -10902,7 +10902,7 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> Improve performance of <link - linkend="datatype-numeric"><type>NUMERIC</></link> calculations + linkend="datatype-numeric"><type>NUMERIC</type></link> calculations (Kyotaro Horiguchi) </para> </listitem> @@ -10910,12 +10910,12 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> Improve synchronization of sessions waiting for <link - linkend="guc-commit-delay"><varname>commit_delay</></link> + linkend="guc-commit-delay"><varname>commit_delay</varname></link> (Peter Geoghegan) </para> <para> - This greatly improves the usefulness of <varname>commit_delay</>. + This greatly improves the usefulness of <varname>commit_delay</varname>. </para> </listitem> @@ -10923,7 +10923,7 @@ ALTER EXTENSION hstore UPDATE; <para> Improve performance of the <link linkend="SQL-CREATETABLE"><command>CREATE TEMPORARY TABLE ... ON - COMMIT DELETE ROWS</></link> option by not truncating such temporary + COMMIT DELETE ROWS</command></link> option by not truncating such temporary tables in transactions that haven't touched any temporary tables (Heikki Linnakangas) </para> @@ -10948,7 +10948,7 @@ ALTER EXTENSION hstore UPDATE; <para> This speeds up lock bookkeeping at statement completion in multi-statement transactions that hold many locks; it is particularly - useful for <application>pg_dump</>. + useful for <application>pg_dump</application>. </para> </listitem> @@ -10960,7 +10960,7 @@ ALTER EXTENSION hstore UPDATE; <para> This speeds up sessions that create many tables in successive - small transactions, such as a <application>pg_restore</> run. + small transactions, such as a <application>pg_restore</application> run. </para> </listitem> @@ -11042,7 +11042,7 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> When an authentication failure occurs, log the relevant - <link linkend="auth-pg-hba-conf"><filename>pg_hba.conf</></link> + <link linkend="auth-pg-hba-conf"><filename>pg_hba.conf</filename></link> line, to ease debugging of unintended failures (Magnus Hagander) </para> @@ -11050,23 +11050,23 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> - Improve <link linkend="auth-ldap"><acronym>LDAP</></link> error + Improve <link linkend="auth-ldap"><acronym>LDAP</acronym></link> error reporting and documentation (Peter Eisentraut) </para> </listitem> <listitem> <para> - Add support for specifying <acronym>LDAP</> authentication parameters - in <acronym>URL</> format, per RFC 4516 (Peter Eisentraut) + Add support for specifying <acronym>LDAP</acronym> authentication parameters + in <acronym>URL</acronym> format, per RFC 4516 (Peter Eisentraut) </para> </listitem> <listitem> <para> Change the <link - linkend="guc-ssl-ciphers"><varname>ssl_ciphers</></link> parameter - to start with <literal>DEFAULT</>, rather than <literal>ALL</>, + linkend="guc-ssl-ciphers"><varname>ssl_ciphers</varname></link> parameter + to start with <literal>DEFAULT</literal>, rather than <literal>ALL</literal>, then remove insecure ciphers (Magnus Hagander) </para> @@ -11078,12 +11078,12 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> Parse and load <link - linkend="auth-username-maps"><filename>pg_ident.conf</></link> + linkend="auth-username-maps"><filename>pg_ident.conf</filename></link> once, not during each connection (Amit Kapila) </para> <para> - This is similar to how <filename>pg_hba.conf</> is processed. + This is similar to how <filename>pg_hba.conf</filename> is processed. </para> </listitem> @@ -11103,8 +11103,8 @@ ALTER EXTENSION hstore UPDATE; </para> <para> - On Unix-like systems, <function>mmap()</> is now used for most - of <productname>PostgreSQL</>'s shared memory. For most users, this + On Unix-like systems, <function>mmap()</function> is now used for most + of <productname>PostgreSQL</productname>'s shared memory. For most users, this will eliminate any need to adjust kernel parameters for shared memory. </para> </listitem> @@ -11117,8 +11117,8 @@ ALTER EXTENSION hstore UPDATE; <para> The configuration parameter - <varname>unix_socket_directory</> is replaced by <link - linkend="guc-unix-socket-directories"><varname>unix_socket_directories</></link>, + <varname>unix_socket_directory</varname> is replaced by <link + linkend="guc-unix-socket-directories"><varname>unix_socket_directories</varname></link>, which accepts a list of directories. </para> </listitem> @@ -11131,7 +11131,7 @@ ALTER EXTENSION hstore UPDATE; <para> Such a directory is specified with <link - linkend="config-includes"><varname>include_dir</></link> in the server + linkend="config-includes"><varname>include_dir</varname></link> in the server configuration file. </para> </listitem> @@ -11140,13 +11140,13 @@ ALTER EXTENSION hstore UPDATE; <para> Increase the maximum <link linkend="APP-INITDB">initdb</link>-configured value for <link - linkend="guc-shared-buffers"><varname>shared_buffers</></link> + linkend="guc-shared-buffers"><varname>shared_buffers</varname></link> to 128MB (Robert Haas) </para> <para> This is the maximum value that initdb will attempt to set in <link - linkend="config-setting-configuration-file"><filename>postgresql.conf</></link>; + linkend="config-setting-configuration-file"><filename>postgresql.conf</filename></link>; the previous maximum was 32MB. </para> </listitem> @@ -11154,7 +11154,7 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> Remove the <link linkend="guc-external-pid-file">external - <acronym>PID</> file</link>, if any, on postmaster exit + <acronym>PID</acronym> file</link>, if any, on postmaster exit (Peter Eisentraut) </para> </listitem> @@ -11186,10 +11186,10 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> - Add <acronym>SQL</> functions <link - linkend="functions-admin-backup"><function>pg_is_in_backup()</></link> + Add <acronym>SQL</acronym> functions <link + linkend="functions-admin-backup"><function>pg_is_in_backup()</function></link> and <link - linkend="functions-admin-backup"><function>pg_backup_start_time()</></link> + linkend="functions-admin-backup"><function>pg_backup_start_time()</function></link> (Gilles Darold) </para> @@ -11201,7 +11201,7 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> Improve performance of streaming log shipping with <link - linkend="guc-synchronous-commit"><varname>synchronous_commit</></link> + linkend="guc-synchronous-commit"><varname>synchronous_commit</varname></link> disabled (Andres Freund) </para> </listitem> @@ -11216,12 +11216,12 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> Add the last checkpoint's redo location to <link - linkend="APP-PGCONTROLDATA"><application>pg_controldata</></link>'s + linkend="APP-PGCONTROLDATA"><application>pg_controldata</application></link>'s output (Fujii Masao) </para> <para> - This information is useful for determining which <acronym>WAL</> + This information is useful for determining which <acronym>WAL</acronym> files are needed for restore. </para> </listitem> @@ -11229,7 +11229,7 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> Allow tools like <link - linkend="app-pgreceivewal"><application>pg_receivexlog</></link> + linkend="app-pgreceivewal"><application>pg_receivexlog</application></link> to run on computers with different architectures (Heikki Linnakangas) </para> @@ -11245,9 +11245,9 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> Make <link - linkend="app-pgbasebackup"><application>pg_basebackup</></link> - <option>--write-recovery-conf</> output a - minimal <filename>recovery.conf</> file (Zoltán + linkend="app-pgbasebackup"><application>pg_basebackup</application></link> + <option>--write-recovery-conf</option> output a + minimal <filename>recovery.conf</filename> file (Zoltán Böszörményi, Magnus Hagander) </para> @@ -11259,10 +11259,10 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> Allow <link - linkend="app-pgreceivewal"><application>pg_receivexlog</></link> + linkend="app-pgreceivewal"><application>pg_receivexlog</application></link> and <link - linkend="app-pgbasebackup"><application>pg_basebackup</></link> - <option>--xlog-method</> to handle streaming timeline switches + linkend="app-pgbasebackup"><application>pg_basebackup</application></link> + <option>--xlog-method</option> to handle streaming timeline switches (Heikki Linnakangas) </para> </listitem> @@ -11270,8 +11270,8 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> Add <link - linkend="guc-wal-receiver-timeout"><varname>wal_receiver_timeout</></link> - parameter to control the <acronym>WAL</> receiver's timeout + linkend="guc-wal-receiver-timeout"><varname>wal_receiver_timeout</varname></link> + parameter to control the <acronym>WAL</acronym> receiver's timeout (Amit Kapila) </para> @@ -11282,7 +11282,7 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> - Change the <link linkend="wal"><acronym>WAL</></link> record format to + Change the <link linkend="wal"><acronym>WAL</acronym></link> record format to allow splitting the record header across pages (Heikki Linnakangas) </para> @@ -11303,23 +11303,23 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> - Implement <acronym>SQL</>-standard <link - linkend="queries-lateral"><literal>LATERAL</></link> option for - <literal>FROM</>-clause subqueries and function calls (Tom Lane) + Implement <acronym>SQL</acronym>-standard <link + linkend="queries-lateral"><literal>LATERAL</literal></link> option for + <literal>FROM</literal>-clause subqueries and function calls (Tom Lane) </para> <para> - This feature allows subqueries and functions in <literal>FROM</> to - reference columns from other tables in the <literal>FROM</> - clause. The <literal>LATERAL</> keyword is optional for functions. + This feature allows subqueries and functions in <literal>FROM</literal> to + reference columns from other tables in the <literal>FROM</literal> + clause. The <literal>LATERAL</literal> keyword is optional for functions. </para> </listitem> <listitem> <para> Add support for piping <link - linkend="SQL-COPY"><command>COPY</></link> and <link - linkend="APP-PSQL"><application>psql</></link> <command>\copy</> + linkend="SQL-COPY"><command>COPY</command></link> and <link + linkend="APP-PSQL"><application>psql</application></link> <command>\copy</command> data to/from an external program (Etsuro Fujita) </para> </listitem> @@ -11327,8 +11327,8 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> Allow a multirow <link - linkend="SQL-VALUES"><literal>VALUES</></link> clause in a rule - to reference <literal>OLD</>/<literal>NEW</> (Tom Lane) + linkend="SQL-VALUES"><literal>VALUES</literal></link> clause in a rule + to reference <literal>OLD</literal>/<literal>NEW</literal> (Tom Lane) </para> </listitem> @@ -11364,14 +11364,14 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> Add <link linkend="SQL-CREATESCHEMA"><command>CREATE SCHEMA ... IF - NOT EXISTS</></link> clause (Fabrízio de Royes Mello) + NOT EXISTS</command></link> clause (Fabrízio de Royes Mello) </para> </listitem> <listitem> <para> Make <link linkend="SQL-REASSIGN-OWNED"><command>REASSIGN - OWNED</></link> also change ownership of shared objects + OWNED</command></link> also change ownership of shared objects (Álvaro Herrera) </para> </listitem> @@ -11379,7 +11379,7 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> Make <link linkend="sql-createaggregate"><command>CREATE - AGGREGATE</></link> complain if the given initial value string is not + AGGREGATE</command></link> complain if the given initial value string is not valid input for the transition datatype (Tom Lane) </para> </listitem> @@ -11387,12 +11387,12 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> Suppress <link linkend="SQL-CREATETABLE"><command>CREATE - TABLE</></link>'s messages about implicit index and sequence creation + TABLE</command></link>'s messages about implicit index and sequence creation (Robert Haas) </para> <para> - These messages now appear at <literal>DEBUG1</> verbosity, so that + These messages now appear at <literal>DEBUG1</literal> verbosity, so that they will not be shown by default. </para> </listitem> @@ -11400,7 +11400,7 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> Allow <link linkend="SQL-DROPTABLE"><command>DROP TABLE IF - EXISTS</></link> to succeed when a non-existent schema is specified + EXISTS</command></link> to succeed when a non-existent schema is specified in the table name (Bruce Momjian) </para> @@ -11427,14 +11427,14 @@ ALTER EXTENSION hstore UPDATE; </itemizedlist> <sect4> - <title><command>ALTER</></title> + <title><command>ALTER</command></title> <itemizedlist> <listitem> <para> - Support <literal>IF NOT EXISTS</> option in <link - linkend="SQL-ALTERTYPE"><command>ALTER TYPE ... ADD VALUE</></link> + Support <literal>IF NOT EXISTS</literal> option in <link + linkend="SQL-ALTERTYPE"><command>ALTER TYPE ... ADD VALUE</command></link> (Andrew Dunstan) </para> @@ -11446,21 +11446,21 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> Add <link linkend="SQL-ALTERROLE"><command>ALTER ROLE ALL - SET</></link> to establish settings for all users (Peter Eisentraut) + SET</command></link> to establish settings for all users (Peter Eisentraut) </para> <para> This allows settings to apply to all users in all databases. <link - linkend="SQL-ALTERDATABASE"><command>ALTER DATABASE SET</></link> + linkend="SQL-ALTERDATABASE"><command>ALTER DATABASE SET</command></link> already allowed addition of settings for all users in a single - database. <filename>postgresql.conf</> has a similar effect. + database. <filename>postgresql.conf</filename> has a similar effect. </para> </listitem> <listitem> <para> Add support for <link linkend="SQL-ALTERRULE"><command>ALTER RULE - ... RENAME</></link> (Ali Dar) + ... RENAME</command></link> (Ali Dar) </para> </listitem> @@ -11469,7 +11469,7 @@ ALTER EXTENSION hstore UPDATE; </sect4> <sect4> - <title><link linkend="rules-views"><command>VIEWs</></link></title> + <title><link linkend="rules-views"><command>VIEWs</command></link></title> <itemizedlist> @@ -11499,20 +11499,20 @@ ALTER EXTENSION hstore UPDATE; Simple views that reference some or all columns from a single base table are now updatable by default. More complex views can be made updatable using <link - linkend="SQL-CREATETRIGGER"><literal>INSTEAD OF</></link> triggers - or <link linkend="SQL-CREATERULE"><literal>INSTEAD</></link> rules. + linkend="SQL-CREATETRIGGER"><literal>INSTEAD OF</literal></link> triggers + or <link linkend="SQL-CREATERULE"><literal>INSTEAD</literal></link> rules. </para> </listitem> <listitem> <para> Add <link linkend="SQL-CREATEVIEW"><command>CREATE RECURSIVE - VIEW</></link> syntax (Peter Eisentraut) + VIEW</command></link> syntax (Peter Eisentraut) </para> <para> Internally this is translated into <command>CREATE VIEW ... WITH - RECURSIVE ...</>. + RECURSIVE ...</command>. </para> </listitem> @@ -11558,8 +11558,8 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> Allow text <link linkend="datatype-timezones">timezone - designations</link>, e.g. <quote>America/Chicago</>, in the - <quote>T</> field of <acronym>ISO</>-format <type>timestamptz</type> + designations</link>, e.g. <quote>America/Chicago</quote>, in the + <quote>T</quote> field of <acronym>ISO</acronym>-format <type>timestamptz</type> input (Bruce Momjian) </para> </listitem> @@ -11567,20 +11567,20 @@ ALTER EXTENSION hstore UPDATE; </itemizedlist> <sect4> - <title><link linkend="datatype-json"><type>JSON</></link></title> + <title><link linkend="datatype-json"><type>JSON</type></link></title> <itemizedlist> <listitem> <para> Add <link linkend="functions-json">operators and functions</link> - to extract elements from <type>JSON</> values (Andrew Dunstan) + to extract elements from <type>JSON</type> values (Andrew Dunstan) </para> </listitem> <listitem> <para> - Allow <type>JSON</> values to be <link + Allow <type>JSON</type> values to be <link linkend="functions-json">converted into records</link> (Andrew Dunstan) </para> @@ -11589,7 +11589,7 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> Add <link linkend="functions-json">functions</link> to convert - scalars, records, and <type>hstore</> values to <type>JSON</> (Andrew + scalars, records, and <type>hstore</type> values to <type>JSON</type> (Andrew Dunstan) </para> </listitem> @@ -11609,9 +11609,9 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> Add <link - linkend="array-functions-table"><function>array_remove()</></link> + linkend="array-functions-table"><function>array_remove()</function></link> and <link - linkend="array-functions-table"><function>array_replace()</></link> + linkend="array-functions-table"><function>array_replace()</function></link> functions (Marco Nenciarini, Gabriele Bartolini) </para> </listitem> @@ -11619,10 +11619,10 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> Allow <link - linkend="functions-string-other"><function>concat()</></link> + linkend="functions-string-other"><function>concat()</function></link> and <link - linkend="functions-string-format"><function>format()</></link> - to properly expand <literal>VARIADIC</>-labeled arguments + linkend="functions-string-format"><function>format()</function></link> + to properly expand <literal>VARIADIC</literal>-labeled arguments (Pavel Stehule) </para> </listitem> @@ -11630,7 +11630,7 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> Improve <link - linkend="functions-string-format"><function>format()</></link> + linkend="functions-string-format"><function>format()</function></link> to provide field width and left/right alignment options (Pavel Stehule) </para> </listitem> @@ -11638,29 +11638,29 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> Make <link - linkend="functions-formatting-table"><function>to_char()</></link>, + linkend="functions-formatting-table"><function>to_char()</function></link>, <link - linkend="functions-formatting-table"><function>to_date()</></link>, + linkend="functions-formatting-table"><function>to_date()</function></link>, and <link - linkend="functions-formatting-table"><function>to_timestamp()</></link> + linkend="functions-formatting-table"><function>to_timestamp()</function></link> handle negative (BC) century values properly (Bruce Momjian) </para> <para> Previously the behavior was either wrong or inconsistent - with positive/<acronym>AD</> handling, e.g. with the format mask - <quote>IYYY-IW-DY</>. + with positive/<acronym>AD</acronym> handling, e.g. with the format mask + <quote>IYYY-IW-DY</quote>. </para> </listitem> <listitem> <para> Make <link - linkend="functions-formatting-table"><function>to_date()</></link> + linkend="functions-formatting-table"><function>to_date()</function></link> and <link - linkend="functions-formatting-table"><function>to_timestamp()</></link> - return proper results when mixing <acronym>ISO</> and Gregorian + linkend="functions-formatting-table"><function>to_timestamp()</function></link> + return proper results when mixing <acronym>ISO</acronym> and Gregorian week/day designations (Bruce Momjian) </para> </listitem> @@ -11668,27 +11668,27 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> Cause <link - linkend="functions-info-catalog-table"><function>pg_get_viewdef()</></link> - to start a new line by default after each <literal>SELECT</> target - list entry and <literal>FROM</> entry (Marko Tiikkaja) + linkend="functions-info-catalog-table"><function>pg_get_viewdef()</function></link> + to start a new line by default after each <literal>SELECT</literal> target + list entry and <literal>FROM</literal> entry (Marko Tiikkaja) </para> <para> This reduces line length in view printing, for instance in <link - linkend="APP-PGDUMP"><application>pg_dump</></link> output. + linkend="APP-PGDUMP"><application>pg_dump</application></link> output. </para> </listitem> <listitem> <para> - Fix <function>map_sql_value_to_xml_value()</> to print values of + Fix <function>map_sql_value_to_xml_value()</function> to print values of domain types the same way their base type would be printed (Pavel Stehule) </para> <para> There are special formatting rules for certain built-in types such as - <type>boolean</>; these rules now also apply to domains over these + <type>boolean</type>; these rules now also apply to domains over these types. </para> </listitem> @@ -11707,13 +11707,13 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> - Allow PL/pgSQL to use <literal>RETURN</> with a composite-type + Allow PL/pgSQL to use <literal>RETURN</literal> with a composite-type expression (Asif Rehman) </para> <para> Previously, in a function returning a composite type, - <literal>RETURN</> could only reference a variable of that type. + <literal>RETURN</literal> could only reference a variable of that type. </para> </listitem> @@ -11728,14 +11728,14 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> Allow PL/pgSQL to access the number of rows processed by - <link linkend="SQL-COPY"><command>COPY</></link> (Pavel Stehule) + <link linkend="SQL-COPY"><command>COPY</command></link> (Pavel Stehule) </para> <para> - A <command>COPY</> executed in a PL/pgSQL function now updates the + A <command>COPY</command> executed in a PL/pgSQL function now updates the value retrieved by <link linkend="plpgsql-statements-diagnostics"><command>GET DIAGNOSTICS - x = ROW_COUNT</></link>. + x = ROW_COUNT</command></link>. </para> </listitem> @@ -11779,9 +11779,9 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> - Handle <link linkend="spi"><acronym>SPI</></link> errors raised - explicitly (with PL/Python's <literal>RAISE</>) the same as - internal <acronym>SPI</> errors (Oskari Saarenmaa and Jan Urbanski) + Handle <link linkend="spi"><acronym>SPI</acronym></link> errors raised + explicitly (with PL/Python's <literal>RAISE</literal>) the same as + internal <acronym>SPI</acronym> errors (Oskari Saarenmaa and Jan Urbanski) </para> </listitem> @@ -11798,7 +11798,7 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> - Prevent leakage of <acronym>SPI</> tuple tables during subtransaction + Prevent leakage of <acronym>SPI</acronym> tuple tables during subtransaction abort (Tom Lane) </para> @@ -11809,7 +11809,7 @@ ALTER EXTENSION hstore UPDATE; of such tuple tables and release them manually in error-recovery code. Failure to do so caused a number of transaction-lifespan memory leakage issues in PL/pgSQL and perhaps other SPI clients. <link - linkend="spi-spi-freetupletable"><function>SPI_freetuptable()</></link> + linkend="spi-spi-freetupletable"><function>SPI_freetuptable()</function></link> now protects itself against multiple freeing requests, so any existing code that did take care to clean up shouldn't be broken by this change. </para> @@ -11817,8 +11817,8 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> - Allow <acronym>SPI</> functions to access the number of rows processed - by <link linkend="SQL-COPY"><command>COPY</></link> (Pavel Stehule) + Allow <acronym>SPI</acronym> functions to access the number of rows processed + by <link linkend="SQL-COPY"><command>COPY</command></link> (Pavel Stehule) </para> </listitem> @@ -11834,35 +11834,35 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> Add command-line utility <link - linkend="app-pg-isready"><application>pg_isready</></link> to + linkend="app-pg-isready"><application>pg_isready</application></link> to check if the server is ready to accept connections (Phil Sorber) </para> </listitem> <listitem> <para> - Support multiple <option>--table</> arguments for <link - linkend="APP-PGRESTORE"><application>pg_restore</></link>, - <link linkend="APP-CLUSTERDB"><application>clusterdb</></link>, - <link linkend="APP-REINDEXDB"><application>reindexdb</></link>, - and <link linkend="APP-VACUUMDB"><application>vacuumdb</></link> + Support multiple <option>--table</option> arguments for <link + linkend="APP-PGRESTORE"><application>pg_restore</application></link>, + <link linkend="APP-CLUSTERDB"><application>clusterdb</application></link>, + <link linkend="APP-REINDEXDB"><application>reindexdb</application></link>, + and <link linkend="APP-VACUUMDB"><application>vacuumdb</application></link> (Josh Kupershmidt) </para> <para> This is similar to the way <link - linkend="APP-PGDUMP"><application>pg_dump</></link>'s - <option>--table</> option works. + linkend="APP-PGDUMP"><application>pg_dump</application></link>'s + <option>--table</option> option works. </para> </listitem> <listitem> <para> - Add <option>--dbname</> option to <link - linkend="APP-PG-DUMPALL"><application>pg_dumpall</></link>, <link - linkend="app-pgbasebackup"><application>pg_basebackup</></link>, and + Add <option>--dbname</option> option to <link + linkend="APP-PG-DUMPALL"><application>pg_dumpall</application></link>, <link + linkend="app-pgbasebackup"><application>pg_basebackup</application></link>, and <link - linkend="app-pgreceivewal"><application>pg_receivexlog</></link> + linkend="app-pgreceivewal"><application>pg_receivexlog</application></link> to allow specifying a connection string (Amit Kapila) </para> </listitem> @@ -11870,7 +11870,7 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> Add libpq function <link - linkend="libpq-pqconninfo"><function>PQconninfo()</></link> + linkend="libpq-pqconninfo"><function>PQconninfo()</function></link> to return connection information (Zoltán Böszörményi, Magnus Hagander) </para> @@ -11879,27 +11879,27 @@ ALTER EXTENSION hstore UPDATE; </itemizedlist> <sect4> - <title><link linkend="APP-PSQL"><application>psql</></link></title> + <title><link linkend="APP-PSQL"><application>psql</application></link></title> <itemizedlist> <listitem> <para> - Adjust function cost settings so <application>psql</> tab + Adjust function cost settings so <application>psql</application> tab completion and pattern searching are more efficient (Tom Lane) </para> </listitem> <listitem> <para> - Improve <application>psql</>'s tab completion coverage (Jeff Janes, + Improve <application>psql</application>'s tab completion coverage (Jeff Janes, Dean Rasheed, Peter Eisentraut, Magnus Hagander) </para> </listitem> <listitem> <para> - Allow the <application>psql</> <option>--single-transaction</> + Allow the <application>psql</application> <option>--single-transaction</option> mode to work when reading from standard input (Fabien Coelho, Robert Haas) </para> @@ -11911,13 +11911,13 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> - Remove <application>psql</> warning when connecting to an older + Remove <application>psql</application> warning when connecting to an older server (Peter Eisentraut) </para> <para> A warning is still issued when connecting to a server of a newer major - version than <application>psql</>'s. + version than <application>psql</application>'s. </para> </listitem> @@ -11930,42 +11930,42 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> - Add <application>psql</> command <command>\watch</> to repeatedly + Add <application>psql</application> command <command>\watch</command> to repeatedly execute a SQL command (Will Leinweber) </para> </listitem> <listitem> <para> - Add <application>psql</> command <command>\gset</> to store query - results in <application>psql</> variables (Pavel Stehule) + Add <application>psql</application> command <command>\gset</command> to store query + results in <application>psql</application> variables (Pavel Stehule) </para> </listitem> <listitem> <para> - Add <acronym>SSL</> information to <application>psql</>'s - <command>\conninfo</> command (Alastair Turner) + Add <acronym>SSL</acronym> information to <application>psql</application>'s + <command>\conninfo</command> command (Alastair Turner) </para> </listitem> <listitem> <para> - Add <quote>Security</> column to <application>psql</>'s - <command>\df+</> output (Jon Erdman) + Add <quote>Security</quote> column to <application>psql</application>'s + <command>\df+</command> output (Jon Erdman) </para> </listitem> <listitem> <para> - Allow <application>psql</> command <command>\l</> to accept a database + Allow <application>psql</application> command <command>\l</command> to accept a database name pattern (Peter Eisentraut) </para> </listitem> <listitem> <para> - In <application>psql</>, do not allow <command>\connect</> to + In <application>psql</application>, do not allow <command>\connect</command> to use defaults if there is no active connection (Bruce Momjian) </para> @@ -11977,7 +11977,7 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> Properly reset state after failure of a SQL command executed with - <application>psql</>'s <literal>\g</> <replaceable>file</> + <application>psql</application>'s <literal>\g</literal> <replaceable>file</replaceable> (Tom Lane) </para> @@ -11998,8 +11998,8 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> - Add a <literal>latex-longtable</> output format to - <application>psql</> (Bruce Momjian) + Add a <literal>latex-longtable</literal> output format to + <application>psql</application> (Bruce Momjian) </para> <para> @@ -12009,21 +12009,21 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> - Add a <literal>border=3</> output mode to the <application>psql</> - <literal>latex</> format (Bruce Momjian) + Add a <literal>border=3</literal> output mode to the <application>psql</application> + <literal>latex</literal> format (Bruce Momjian) </para> </listitem> <listitem> <para> - In <application>psql</>'s tuples-only and expanded output modes, no - longer emit <quote>(No rows)</> for zero rows (Peter Eisentraut) + In <application>psql</application>'s tuples-only and expanded output modes, no + longer emit <quote>(No rows)</quote> for zero rows (Peter Eisentraut) </para> </listitem> <listitem> <para> - In <application>psql</>'s unaligned, expanded output mode, no longer + In <application>psql</application>'s unaligned, expanded output mode, no longer print an empty line for zero rows (Peter Eisentraut) </para> </listitem> @@ -12035,34 +12035,34 @@ ALTER EXTENSION hstore UPDATE; </sect4> <sect4> - <title><link linkend="APP-PGDUMP"><application>pg_dump</></link></title> + <title><link linkend="APP-PGDUMP"><application>pg_dump</application></link></title> <itemizedlist> <listitem> <para> - Add <application>pg_dump</> <option>--jobs</> option to dump tables in + Add <application>pg_dump</application> <option>--jobs</option> option to dump tables in parallel (Joachim Wieland) </para> </listitem> <listitem> <para> - Make <application>pg_dump</> output functions in a more predictable + Make <application>pg_dump</application> output functions in a more predictable order (Joel Jacobson) </para> </listitem> <listitem> <para> - Fix tar files emitted by <application>pg_dump</> - to be <acronym>POSIX</> conformant (Brian Weaver, Tom Lane) + Fix tar files emitted by <application>pg_dump</application> + to be <acronym>POSIX</acronym> conformant (Brian Weaver, Tom Lane) </para> </listitem> <listitem> <para> - Add <option>--dbname</> option to <application>pg_dump</>, for + Add <option>--dbname</option> option to <application>pg_dump</application>, for consistency with other client commands (Heikki Linnakangas) </para> @@ -12076,7 +12076,7 @@ ALTER EXTENSION hstore UPDATE; </sect4> <sect4> - <title><link linkend="APP-INITDB"><application>initdb</></link></title> + <title><link linkend="APP-INITDB"><application>initdb</application></link></title> <itemizedlist> @@ -12087,19 +12087,19 @@ ALTER EXTENSION hstore UPDATE; <para> This insures data integrity in event of a system crash shortly after - initdb. This can be disabled by using <option>--nosync</>. + initdb. This can be disabled by using <option>--nosync</option>. </para> </listitem> <listitem> <para> - Add initdb <option>--sync-only</> option to sync the data directory to durable + Add initdb <option>--sync-only</option> option to sync the data directory to durable storage (Bruce Momjian) </para> <para> This is used by <link - linkend="pgupgrade"><application>pg_upgrade</></link>. + linkend="pgupgrade"><application>pg_upgrade</application></link>. </para> </listitem> @@ -12131,14 +12131,14 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> - Create a centralized timeout <acronym>API</> (Zoltán + Create a centralized timeout <acronym>API</acronym> (Zoltán Böszörményi) </para> </listitem> <listitem> <para> - Create libpgcommon and move <function>pg_malloc()</> and other + Create libpgcommon and move <function>pg_malloc()</function> and other functions there (Álvaro Herrera, Andres Freund) </para> @@ -12155,15 +12155,15 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> - Use <literal>SA_RESTART</> for all signals, - including <literal>SIGALRM</> (Tom Lane) + Use <literal>SA_RESTART</literal> for all signals, + including <literal>SIGALRM</literal> (Tom Lane) </para> </listitem> <listitem> <para> Ensure that the correct text domain is used when - translating <function>errcontext()</> messages + translating <function>errcontext()</function> messages (Heikki Linnakangas) </para> </listitem> @@ -12176,7 +12176,7 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> - Provide support for <quote>static assertions</> that will fail at + Provide support for <quote>static assertions</quote> that will fail at compile time if some compile-time-constant condition is not met (Andres Freund, Tom Lane) </para> @@ -12184,14 +12184,14 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> - Support <function>Assert()</> in client-side code (Andrew Dunstan) + Support <function>Assert()</function> in client-side code (Andrew Dunstan) </para> </listitem> <listitem> <para> - Add decoration to inform the C compiler that some <function>ereport()</> - and <function>elog()</> calls do not return (Peter Eisentraut, + Add decoration to inform the C compiler that some <function>ereport()</function> + and <function>elog()</function> calls do not return (Peter Eisentraut, Andres Freund, Tom Lane, Heikki Linnakangas) </para> </listitem> @@ -12200,7 +12200,7 @@ ALTER EXTENSION hstore UPDATE; <para> Allow options to be passed to the regression test output comparison utility via <link - linkend="regress-evaluation"><envar>PG_REGRESS_DIFF_OPTS</></link> + linkend="regress-evaluation"><envar>PG_REGRESS_DIFF_OPTS</envar></link> (Peter Eisentraut) </para> </listitem> @@ -12209,42 +12209,42 @@ ALTER EXTENSION hstore UPDATE; <para> Add isolation tests for <link linkend="SQL-CREATEINDEX"><command>CREATE INDEX - CONCURRENTLY</></link> (Abhijit Menon-Sen) + CONCURRENTLY</command></link> (Abhijit Menon-Sen) </para> </listitem> <listitem> <para> - Remove typedefs for <type>int2</>/<type>int4</> as they are better - represented as <type>int16</>/<type>int32</> (Peter Eisentraut) + Remove typedefs for <type>int2</type>/<type>int4</type> as they are better + represented as <type>int16</type>/<type>int32</type> (Peter Eisentraut) </para> </listitem> <listitem> <para> Fix <link linkend="install">install-strip</link> on Mac <productname>OS - X</> (Peter Eisentraut) + X</productname> (Peter Eisentraut) </para> </listitem> <listitem> <para> Remove <link linkend="configure">configure</link> flag - <option>--disable-shared</>, as it is no longer supported + <option>--disable-shared</option>, as it is no longer supported (Bruce Momjian) </para> </listitem> <listitem> <para> - Rewrite pgindent in <application>Perl</> (Andrew Dunstan) + Rewrite pgindent in <application>Perl</application> (Andrew Dunstan) </para> </listitem> <listitem> <para> Provide Emacs macro to set Perl formatting to - match <productname>PostgreSQL</>'s perltidy settings (Peter Eisentraut) + match <productname>PostgreSQL</productname>'s perltidy settings (Peter Eisentraut) </para> </listitem> @@ -12257,25 +12257,25 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> - Change the way <literal>UESCAPE</> is lexed, to significantly reduce + Change the way <literal>UESCAPE</literal> is lexed, to significantly reduce the size of the lexer tables (Heikki Linnakangas) </para> </listitem> <listitem> <para> - Centralize <application>flex</> and <application>bison</> - <application>make</> rules (Peter Eisentraut) + Centralize <application>flex</application> and <application>bison</application> + <application>make</application> rules (Peter Eisentraut) </para> <para> - This is useful for <application>pgxs</> authors. + This is useful for <application>pgxs</application> authors. </para> </listitem> <listitem> <para> - Change many internal backend functions to return object <type>OID</>s + Change many internal backend functions to return object <type>OID</type>s rather than void (Dimitri Fontaine) </para> @@ -12299,7 +12299,7 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> Add function <link - linkend="functions-info-catalog-table"><function>pg_identify_object()</></link> + linkend="functions-info-catalog-table"><function>pg_identify_object()</function></link> to produce a machine-readable description of a database object (Álvaro Herrera) </para> @@ -12307,7 +12307,7 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> - Add post-<command>ALTER</>-object server hooks (KaiGai Kohei) + Add post-<command>ALTER</command>-object server hooks (KaiGai Kohei) </para> </listitem> @@ -12321,28 +12321,28 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> Provide a tool to help detect timezone abbreviation changes when - updating the <filename>src/timezone/data</> files + updating the <filename>src/timezone/data</filename> files (Tom Lane) </para> </listitem> <listitem> <para> - Add <application>pkg-config</> support for <application>libpq</> - and <application>ecpg</> libraries (Peter Eisentraut) + Add <application>pkg-config</application> support for <application>libpq</application> + and <application>ecpg</application> libraries (Peter Eisentraut) </para> </listitem> <listitem> <para> - Remove <filename>src/tools/backend</>, now that the content is on - the <productname>PostgreSQL</> wiki (Bruce Momjian) + Remove <filename>src/tools/backend</filename>, now that the content is on + the <productname>PostgreSQL</productname> wiki (Bruce Momjian) </para> </listitem> <listitem> <para> - Split out <link linkend="wal"><acronym>WAL</></link> reading as + Split out <link linkend="wal"><acronym>WAL</acronym></link> reading as an independent facility (Heikki Linnakangas, Andres Freund) </para> </listitem> @@ -12350,13 +12350,13 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> Use a 64-bit integer to represent <link - linkend="wal"><acronym>WAL</></link> positions - (<structname>XLogRecPtr</>) instead of two 32-bit integers + linkend="wal"><acronym>WAL</acronym></link> positions + (<structname>XLogRecPtr</structname>) instead of two 32-bit integers (Heikki Linnakangas) </para> <para> - Generally, tools that need to read the <acronym>WAL</> format + Generally, tools that need to read the <acronym>WAL</acronym> format will need to be adjusted. </para> </listitem> @@ -12371,7 +12371,7 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> Allow <link linkend="plpython">PL/Python</link> on <productname>OS - X</> to build against custom versions of <application>Python</> + X</productname> to build against custom versions of <application>Python</application> (Peter Eisentraut) </para> </listitem> @@ -12387,9 +12387,9 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> - Add a <link linkend="postgres-fdw"><productname>Postgres</> foreign + Add a <link linkend="postgres-fdw"><productname>Postgres</productname> foreign data wrapper</link> contrib module to allow access to - other <productname>Postgres</> servers (Shigeru Hanada) + other <productname>Postgres</productname> servers (Shigeru Hanada) </para> <para> @@ -12399,7 +12399,7 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> - Add <link linkend="pgwaldump"><application>pg_xlogdump</></link> + Add <link linkend="pgwaldump"><application>pg_xlogdump</application></link> contrib program (Andres Freund) </para> </listitem> @@ -12407,46 +12407,46 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> Add support for indexing of regular-expression searches in - <link linkend="pgtrgm"><productname>pg_trgm</></link> + <link linkend="pgtrgm"><productname>pg_trgm</productname></link> (Alexander Korotkov) </para> </listitem> <listitem> <para> - Improve <link linkend="pgtrgm"><productname>pg_trgm</></link>'s + Improve <link linkend="pgtrgm"><productname>pg_trgm</productname></link>'s handling of multibyte characters (Tom Lane) </para> <para> On a platform that does not have the wcstombs() or towlower() library functions, this could result in an incompatible change in the contents - of <productname>pg_trgm</> indexes for non-ASCII data. In such cases, - <command>REINDEX</> those indexes to ensure correct search results. + of <productname>pg_trgm</productname> indexes for non-ASCII data. In such cases, + <command>REINDEX</command> those indexes to ensure correct search results. </para> </listitem> <listitem> <para> Add a <link linkend="pgstattuple">pgstattuple</link> function to report - the size of the pending-insertions list of a <acronym>GIN</> index + the size of the pending-insertions list of a <acronym>GIN</acronym> index (Fujii Masao) </para> </listitem> <listitem> <para> - Make <link linkend="oid2name"><application>oid2name</></link>, - <link linkend="pgbench"><application>pgbench</></link>, and - <link linkend="vacuumlo"><application>vacuumlo</></link> set - <varname>fallback_application_name</> (Amit Kapila) + Make <link linkend="oid2name"><application>oid2name</application></link>, + <link linkend="pgbench"><application>pgbench</application></link>, and + <link linkend="vacuumlo"><application>vacuumlo</application></link> set + <varname>fallback_application_name</varname> (Amit Kapila) </para> </listitem> <listitem> <para> Improve output of <link - linkend="pgtesttiming"><application>pg_test_timing</></link> + linkend="pgtesttiming"><application>pg_test_timing</application></link> (Bruce Momjian) </para> </listitem> @@ -12454,7 +12454,7 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> Improve output of <link - linkend="pgtestfsync"><application>pg_test_fsync</></link> + linkend="pgtestfsync"><application>pg_test_fsync</application></link> (Peter Geoghegan) </para> </listitem> @@ -12466,9 +12466,9 @@ ALTER EXTENSION hstore UPDATE; </para> <para> - When using this FDW to define the target of a <application>dblink</> + When using this FDW to define the target of a <application>dblink</application> connection, instead of using a hard-wired list of connection options, - the underlying <application>libpq</> library is consulted to see what + the underlying <application>libpq</application> library is consulted to see what connection options it supports. </para> </listitem> @@ -12476,26 +12476,26 @@ ALTER EXTENSION hstore UPDATE; </itemizedlist> <sect4> - <title><link linkend="pgupgrade"><application>pg_upgrade</></link></title> + <title><link linkend="pgupgrade"><application>pg_upgrade</application></link></title> <itemizedlist> <listitem> <para> - Allow <application>pg_upgrade</> to do dumps and restores in + Allow <application>pg_upgrade</application> to do dumps and restores in parallel (Bruce Momjian, Andrew Dunstan) </para> <para> This allows parallel schema dump/restore of databases, as well as parallel copy/link of data files per tablespace. Use the - <option>--jobs</> option to specify the level of parallelism. + <option>--jobs</option> option to specify the level of parallelism. </para> </listitem> <listitem> <para> - Make <application>pg_upgrade</> create Unix-domain sockets in + Make <application>pg_upgrade</application> create Unix-domain sockets in the current directory (Bruce Momjian, Tom Lane) </para> @@ -12507,7 +12507,7 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> - Make <application>pg_upgrade</> <option>--check</> mode properly + Make <application>pg_upgrade</application> <option>--check</option> mode properly detect the location of non-default socket directories (Bruce Momjian, Tom Lane) </para> @@ -12515,21 +12515,21 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> - Improve performance of <application>pg_upgrade</> for databases + Improve performance of <application>pg_upgrade</application> for databases with many tables (Bruce Momjian) </para> </listitem> <listitem> <para> - Improve <application>pg_upgrade</>'s logs by showing + Improve <application>pg_upgrade</application>'s logs by showing executed commands (Álvaro Herrera) </para> </listitem> <listitem> <para> - Improve <application>pg_upgrade</>'s status display during + Improve <application>pg_upgrade</application>'s status display during copy/link (Bruce Momjian) </para> </listitem> @@ -12539,33 +12539,33 @@ ALTER EXTENSION hstore UPDATE; </sect4> <sect4> - <title><link linkend="pgbench"><application>pgbench</></link></title> + <title><link linkend="pgbench"><application>pgbench</application></link></title> <itemizedlist> <listitem> <para> - Add <option>--foreign-keys</> option to <application>pgbench</> + Add <option>--foreign-keys</option> option to <application>pgbench</application> (Jeff Janes) </para> <para> This adds foreign key constraints to the standard tables created by - <application>pgbench</>, for use in foreign key performance testing. + <application>pgbench</application>, for use in foreign key performance testing. </para> </listitem> <listitem> <para> - Allow <application>pgbench</> to aggregate performance statistics - and produce output every <option>--aggregate-interval</> + Allow <application>pgbench</application> to aggregate performance statistics + and produce output every <option>--aggregate-interval</option> seconds (Tomas Vondra) </para> </listitem> <listitem> <para> - Add <application>pgbench</> <option>--sampling-rate</> option + Add <application>pgbench</application> <option>--sampling-rate</option> option to control the percentage of transactions logged (Tomas Vondra) </para> </listitem> @@ -12573,29 +12573,29 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> Reduce and improve the status message output of - <application>pgbench</>'s initialization mode (Robert Haas, + <application>pgbench</application>'s initialization mode (Robert Haas, Peter Eisentraut) </para> </listitem> <listitem> <para> - Add <application>pgbench</> <option>-q</> mode to print one output + Add <application>pgbench</application> <option>-q</option> mode to print one output line every five seconds (Tomas Vondra) </para> </listitem> <listitem> <para> - Output <application>pgbench</> elapsed and estimated remaining + Output <application>pgbench</application> elapsed and estimated remaining time during initialization (Tomas Vondra) </para> </listitem> <listitem> <para> - Allow <application>pgbench</> to use much larger scale factors, - by changing relevant columns from <type>integer</> to <type>bigint</> + Allow <application>pgbench</application> to use much larger scale factors, + by changing relevant columns from <type>integer</type> to <type>bigint</type> when the requested scale factor exceeds 20000 (Greg Smith) </para> @@ -12614,21 +12614,21 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> - Allow <productname>EPUB</>-format documentation to be created + Allow <productname>EPUB</productname>-format documentation to be created (Peter Eisentraut) </para> </listitem> <listitem> <para> - Update <productname>FreeBSD</> kernel configuration documentation + Update <productname>FreeBSD</productname> kernel configuration documentation (Brad Davis) </para> </listitem> <listitem> <para> - Improve <link linkend="tutorial-window"><literal>WINDOW</> + Improve <link linkend="tutorial-window"><literal>WINDOW</literal> function</link> documentation (Bruce Momjian, Florian Pflug) </para> </listitem> @@ -12636,7 +12636,7 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> Add <link linkend="docguide-toolsets">instructions</link> for setting - up the documentation tool chain on <productname>macOS</> + up the documentation tool chain on <productname>macOS</productname> (Peter Eisentraut) </para> </listitem> @@ -12644,7 +12644,7 @@ ALTER EXTENSION hstore UPDATE; <listitem> <para> Improve <link - linkend="guc-commit-delay"><varname>commit_delay</></link> + linkend="guc-commit-delay"><varname>commit_delay</varname></link> documentation (Peter Geoghegan) </para> </listitem> diff --git a/doc/src/sgml/release-9.4.sgml b/doc/src/sgml/release-9.4.sgml index c665f90ca10..deb74b4e1c2 100644 --- a/doc/src/sgml/release-9.4.sgml +++ b/doc/src/sgml/release-9.4.sgml @@ -53,20 +53,20 @@ Branch: REL9_4_STABLE [b51c8efc6] 2017-08-24 15:21:32 -0700 <listitem> <para> Show foreign tables - in <structname>information_schema</>.<structname>table_privileges</> + in <structname>information_schema</structname>.<structname>table_privileges</structname> view (Peter Eisentraut) </para> <para> - All other relevant <structname>information_schema</> views include + All other relevant <structname>information_schema</structname> views include foreign tables, but this one ignored them. </para> <para> - Since this view definition is installed by <application>initdb</>, + Since this view definition is installed by <application>initdb</application>, merely upgrading will not fix the problem. If you need to fix this in an existing installation, you can, as a superuser, do this - in <application>psql</>: + in <application>psql</application>: <programlisting> SET search_path TO information_schema; CREATE OR REPLACE VIEW table_privileges AS @@ -105,21 +105,21 @@ CREATE OR REPLACE VIEW table_privileges AS OR grantee.rolname = 'PUBLIC'); </programlisting> This must be repeated in each database to be fixed, - including <literal>template0</>. + including <literal>template0</literal>. </para> </listitem> <listitem> <para> Clean up handling of a fatal exit (e.g., due to receipt - of <systemitem>SIGTERM</>) that occurs while trying to execute - a <command>ROLLBACK</> of a failed transaction (Tom Lane) + of <systemitem>SIGTERM</systemitem>) that occurs while trying to execute + a <command>ROLLBACK</command> of a failed transaction (Tom Lane) </para> <para> This situation could result in an assertion failure. In production builds, the exit would still occur, but it would log an unexpected - message about <quote>cannot drop active portal</>. + message about <quote>cannot drop active portal</quote>. </para> </listitem> @@ -136,7 +136,7 @@ CREATE OR REPLACE VIEW table_privileges AS </para> <para> - Certain <command>ALTER</> commands that change the definition of a + Certain <command>ALTER</command> commands that change the definition of a composite type or domain type are supposed to fail if there are any stored values of that type in the database, because they lack the infrastructure needed to update or check such values. Previously, @@ -148,7 +148,7 @@ CREATE OR REPLACE VIEW table_privileges AS <listitem> <para> - Fix crash in <application>pg_restore</> when using parallel mode and + Fix crash in <application>pg_restore</application> when using parallel mode and using a list file to select a subset of items to restore (Fabrízio de Royes Mello) </para> @@ -156,13 +156,13 @@ CREATE OR REPLACE VIEW table_privileges AS <listitem> <para> - Change <application>ecpg</>'s parser to allow <literal>RETURNING</> + Change <application>ecpg</application>'s parser to allow <literal>RETURNING</literal> clauses without attached C variables (Michael Meskes) </para> <para> - This allows <application>ecpg</> programs to contain SQL constructs - that use <literal>RETURNING</> internally (for example, inside a CTE) + This allows <application>ecpg</application> programs to contain SQL constructs + that use <literal>RETURNING</literal> internally (for example, inside a CTE) rather than using it to define values to be returned to the client. </para> </listitem> @@ -174,12 +174,12 @@ CREATE OR REPLACE VIEW table_privileges AS <para> This fix avoids possible crashes of PL/Perl due to inconsistent - assumptions about the width of <type>time_t</> values. + assumptions about the width of <type>time_t</type> values. A side-effect that may be visible to extension developers is - that <literal>_USE_32BIT_TIME_T</> is no longer defined globally - in <productname>PostgreSQL</> Windows builds. This is not expected - to cause problems, because type <type>time_t</> is not used - in any <productname>PostgreSQL</> API definitions. + that <literal>_USE_32BIT_TIME_T</literal> is no longer defined globally + in <productname>PostgreSQL</productname> Windows builds. This is not expected + to cause problems, because type <type>time_t</type> is not used + in any <productname>PostgreSQL</productname> API definitions. </para> </listitem> @@ -228,7 +228,7 @@ CREATE OR REPLACE VIEW table_privileges AS <listitem> <para> Further restrict visibility - of <structname>pg_user_mappings</>.<structfield>umoptions</>, to + of <structname>pg_user_mappings</structname>.<structfield>umoptions</structfield>, to protect passwords stored as user mapping options (Noah Misch) </para> @@ -236,11 +236,11 @@ CREATE OR REPLACE VIEW table_privileges AS <para> The fix for CVE-2017-7486 was incorrect: it allowed a user to see the options in her own user mapping, even if she did not - have <literal>USAGE</> permission on the associated foreign server. + have <literal>USAGE</literal> permission on the associated foreign server. Such options might include a password that had been provided by the server owner rather than the user herself. - Since <structname>information_schema.user_mapping_options</> does not - show the options in such cases, <structname>pg_user_mappings</> + Since <structname>information_schema.user_mapping_options</structname> does not + show the options in such cases, <structname>pg_user_mappings</structname> should not either. (CVE-2017-7547) </para> @@ -255,15 +255,15 @@ CREATE OR REPLACE VIEW table_privileges AS <step> <para> Restart the postmaster after adding <literal>allow_system_table_mods - = true</> to <filename>postgresql.conf</>. (In versions - supporting <command>ALTER SYSTEM</>, you can use that to make the + = true</literal> to <filename>postgresql.conf</filename>. (In versions + supporting <command>ALTER SYSTEM</command>, you can use that to make the configuration change, but you'll still need a restart.) </para> </step> <step> <para> - In <emphasis>each</> database of the cluster, + In <emphasis>each</emphasis> database of the cluster, run the following commands as superuser: <programlisting> SET search_path = pg_catalog; @@ -294,15 +294,15 @@ CREATE OR REPLACE VIEW pg_user_mappings AS <step> <para> - Do not forget to include the <literal>template0</> - and <literal>template1</> databases, or the vulnerability will still - exist in databases you create later. To fix <literal>template0</>, + Do not forget to include the <literal>template0</literal> + and <literal>template1</literal> databases, or the vulnerability will still + exist in databases you create later. To fix <literal>template0</literal>, you'll need to temporarily make it accept connections. - In <productname>PostgreSQL</> 9.5 and later, you can use + In <productname>PostgreSQL</productname> 9.5 and later, you can use <programlisting> ALTER DATABASE template0 WITH ALLOW_CONNECTIONS true; </programlisting> - and then after fixing <literal>template0</>, undo that with + and then after fixing <literal>template0</literal>, undo that with <programlisting> ALTER DATABASE template0 WITH ALLOW_CONNECTIONS false; </programlisting> @@ -316,7 +316,7 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <step> <para> - Finally, remove the <literal>allow_system_table_mods</> configuration + Finally, remove the <literal>allow_system_table_mods</literal> configuration setting, and again restart the postmaster. </para> </step> @@ -330,16 +330,16 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; </para> <para> - <application>libpq</> ignores empty password specifications, and does + <application>libpq</application> ignores empty password specifications, and does not transmit them to the server. So, if a user's password has been set to the empty string, it's impossible to log in with that password - via <application>psql</> or other <application>libpq</>-based + via <application>psql</application> or other <application>libpq</application>-based clients. An administrator might therefore believe that setting the password to empty is equivalent to disabling password login. - However, with a modified or non-<application>libpq</>-based client, + However, with a modified or non-<application>libpq</application>-based client, logging in could be possible, depending on which authentication method is configured. In particular the most common - method, <literal>md5</>, accepted empty passwords. + method, <literal>md5</literal>, accepted empty passwords. Change the server to reject empty passwords in all cases. (CVE-2017-7546) </para> @@ -347,13 +347,13 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Make <function>lo_put()</> check for <literal>UPDATE</> privilege on + Make <function>lo_put()</function> check for <literal>UPDATE</literal> privilege on the target large object (Tom Lane, Michael Paquier) </para> <para> - <function>lo_put()</> should surely require the same permissions - as <function>lowrite()</>, but the check was missing, allowing any + <function>lo_put()</function> should surely require the same permissions + as <function>lowrite()</function>, but the check was missing, allowing any user to change the data in a large object. (CVE-2017-7548) </para> @@ -460,21 +460,21 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> Fix possible creation of an invalid WAL segment when a standby is - promoted just after it processes an <literal>XLOG_SWITCH</> WAL + promoted just after it processes an <literal>XLOG_SWITCH</literal> WAL record (Andres Freund) </para> </listitem> <listitem> <para> - Fix <application>walsender</> to exit promptly when client requests + Fix <application>walsender</application> to exit promptly when client requests shutdown (Tom Lane) </para> </listitem> <listitem> <para> - Fix <systemitem>SIGHUP</> and <systemitem>SIGUSR1</> handling in + Fix <systemitem>SIGHUP</systemitem> and <systemitem>SIGUSR1</systemitem> handling in walsender processes (Petr Jelinek, Andres Freund) </para> </listitem> @@ -488,7 +488,7 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Fix unnecessarily slow restarts of <application>walreceiver</> + Fix unnecessarily slow restarts of <application>walreceiver</application> processes due to race condition in postmaster (Tom Lane) </para> </listitem> @@ -505,7 +505,7 @@ Branch: REL9_4_STABLE [23a2b818f] 2017-08-05 14:56:40 -0700 <para> Logical decoding crashed on tuples that are wider than 64KB (after compression, but with all data in-line). The case arises only - when <literal>REPLICA IDENTITY FULL</> is enabled for a table + when <literal>REPLICA IDENTITY FULL</literal> is enabled for a table containing such tuples. </para> </listitem> @@ -553,7 +553,7 @@ Branch: REL9_4_STABLE [23a2b818f] 2017-08-05 14:56:40 -0700 <listitem> <para> - Fix cases where an <command>INSERT</> or <command>UPDATE</> assigns + Fix cases where an <command>INSERT</command> or <command>UPDATE</command> assigns to more than one element of a column that is of domain-over-array type (Tom Lane) </para> @@ -561,7 +561,7 @@ Branch: REL9_4_STABLE [23a2b818f] 2017-08-05 14:56:40 -0700 <listitem> <para> - Allow window functions to be used in sub-<literal>SELECT</>s that + Allow window functions to be used in sub-<literal>SELECT</literal>s that are within the arguments of an aggregate function (Tom Lane) </para> </listitem> @@ -569,56 +569,56 @@ Branch: REL9_4_STABLE [23a2b818f] 2017-08-05 14:56:40 -0700 <listitem> <para> Move autogenerated array types out of the way during - <command>ALTER ... RENAME</> (Vik Fearing) + <command>ALTER ... RENAME</command> (Vik Fearing) </para> <para> Previously, we would rename a conflicting autogenerated array type - out of the way during <command>CREATE</>; this fix extends that + out of the way during <command>CREATE</command>; this fix extends that behavior to renaming operations. </para> </listitem> <listitem> <para> - Ensure that <command>ALTER USER ... SET</> accepts all the syntax - variants that <command>ALTER ROLE ... SET</> does (Peter Eisentraut) + Ensure that <command>ALTER USER ... SET</command> accepts all the syntax + variants that <command>ALTER ROLE ... SET</command> does (Peter Eisentraut) </para> </listitem> <listitem> <para> Properly update dependency info when changing a datatype I/O - function's argument or return type from <type>opaque</> to the + function's argument or return type from <type>opaque</type> to the correct type (Heikki Linnakangas) </para> <para> - <command>CREATE TYPE</> updates I/O functions declared in this + <command>CREATE TYPE</command> updates I/O functions declared in this long-obsolete style, but it forgot to record a dependency on the - type, allowing a subsequent <command>DROP TYPE</> to leave broken + type, allowing a subsequent <command>DROP TYPE</command> to leave broken function definitions behind. </para> </listitem> <listitem> <para> - Reduce memory usage when <command>ANALYZE</> processes - a <type>tsvector</> column (Heikki Linnakangas) + Reduce memory usage when <command>ANALYZE</command> processes + a <type>tsvector</type> column (Heikki Linnakangas) </para> </listitem> <listitem> <para> Fix unnecessary precision loss and sloppy rounding when multiplying - or dividing <type>money</> values by integers or floats (Tom Lane) + or dividing <type>money</type> values by integers or floats (Tom Lane) </para> </listitem> <listitem> <para> Tighten checks for whitespace in functions that parse identifiers, - such as <function>regprocedurein()</> (Tom Lane) + such as <function>regprocedurein()</function> (Tom Lane) </para> <para> @@ -629,20 +629,20 @@ Branch: REL9_4_STABLE [23a2b818f] 2017-08-05 14:56:40 -0700 <listitem> <para> - Use relevant <literal>#define</> symbols from Perl while - compiling <application>PL/Perl</> (Ashutosh Sharma, Tom Lane) + Use relevant <literal>#define</literal> symbols from Perl while + compiling <application>PL/Perl</application> (Ashutosh Sharma, Tom Lane) </para> <para> This avoids portability problems, typically manifesting as - a <quote>handshake</> mismatch during library load, when working with + a <quote>handshake</quote> mismatch during library load, when working with recent Perl versions. </para> </listitem> <listitem> <para> - In <application>libpq</>, reset GSS/SASL and SSPI authentication + In <application>libpq</application>, reset GSS/SASL and SSPI authentication state properly after a failed connection attempt (Michael Paquier) </para> @@ -655,9 +655,9 @@ Branch: REL9_4_STABLE [23a2b818f] 2017-08-05 14:56:40 -0700 <listitem> <para> - In <application>psql</>, fix failure when <command>COPY FROM STDIN</> + In <application>psql</application>, fix failure when <command>COPY FROM STDIN</command> is ended with a keyboard EOF signal and then another <command>COPY - FROM STDIN</> is attempted (Thomas Munro) + FROM STDIN</command> is attempted (Thomas Munro) </para> <para> @@ -668,8 +668,8 @@ Branch: REL9_4_STABLE [23a2b818f] 2017-08-05 14:56:40 -0700 <listitem> <para> - Fix <application>pg_dump</> and <application>pg_restore</> to - emit <command>REFRESH MATERIALIZED VIEW</> commands last (Tom Lane) + Fix <application>pg_dump</application> and <application>pg_restore</application> to + emit <command>REFRESH MATERIALIZED VIEW</command> commands last (Tom Lane) </para> <para> @@ -680,15 +680,15 @@ Branch: REL9_4_STABLE [23a2b818f] 2017-08-05 14:56:40 -0700 <listitem> <para> - Improve <application>pg_dump</>/<application>pg_restore</>'s - reporting of error conditions originating in <application>zlib</> + Improve <application>pg_dump</application>/<application>pg_restore</application>'s + reporting of error conditions originating in <application>zlib</application> (Vladimir Kunschikov, Álvaro Herrera) </para> </listitem> <listitem> <para> - Fix <application>pg_dump</> with the <option>--clean</> option to + Fix <application>pg_dump</application> with the <option>--clean</option> option to drop event triggers as expected (Tom Lane) </para> @@ -701,14 +701,14 @@ Branch: REL9_4_STABLE [23a2b818f] 2017-08-05 14:56:40 -0700 <listitem> <para> - Fix <application>pg_dump</> to not emit invalid SQL for an empty + Fix <application>pg_dump</application> to not emit invalid SQL for an empty operator class (Daniel Gustafsson) </para> </listitem> <listitem> <para> - Fix <application>pg_dump</> output to stdout on Windows (Kuntal Ghosh) + Fix <application>pg_dump</application> output to stdout on Windows (Kuntal Ghosh) </para> <para> @@ -719,14 +719,14 @@ Branch: REL9_4_STABLE [23a2b818f] 2017-08-05 14:56:40 -0700 <listitem> <para> - Fix <function>pg_get_ruledef()</> to print correct output for - the <literal>ON SELECT</> rule of a view whose columns have been + Fix <function>pg_get_ruledef()</function> to print correct output for + the <literal>ON SELECT</literal> rule of a view whose columns have been renamed (Tom Lane) </para> <para> - In some corner cases, <application>pg_dump</> relies - on <function>pg_get_ruledef()</> to dump views, so that this error + In some corner cases, <application>pg_dump</application> relies + on <function>pg_get_ruledef()</function> to dump views, so that this error could result in dump/reload failures. </para> </listitem> @@ -734,13 +734,13 @@ Branch: REL9_4_STABLE [23a2b818f] 2017-08-05 14:56:40 -0700 <listitem> <para> Fix dumping of outer joins with empty constraints, such as the result - of a <literal>NATURAL LEFT JOIN</> with no common columns (Tom Lane) + of a <literal>NATURAL LEFT JOIN</literal> with no common columns (Tom Lane) </para> </listitem> <listitem> <para> - Fix dumping of function expressions in the <literal>FROM</> clause in + Fix dumping of function expressions in the <literal>FROM</literal> clause in cases where the expression does not deparse into something that looks like a function call (Tom Lane) </para> @@ -748,7 +748,7 @@ Branch: REL9_4_STABLE [23a2b818f] 2017-08-05 14:56:40 -0700 <listitem> <para> - Fix <application>pg_basebackup</> output to stdout on Windows + Fix <application>pg_basebackup</application> output to stdout on Windows (Haribabu Kommi) </para> @@ -760,8 +760,8 @@ Branch: REL9_4_STABLE [23a2b818f] 2017-08-05 14:56:40 -0700 <listitem> <para> - Fix <application>pg_upgrade</> to ensure that the ending WAL record - does not have <xref linkend="guc-wal-level"> = <literal>minimum</> + Fix <application>pg_upgrade</application> to ensure that the ending WAL record + does not have <xref linkend="guc-wal-level"> = <literal>minimum</literal> (Bruce Momjian) </para> @@ -773,9 +773,9 @@ Branch: REL9_4_STABLE [23a2b818f] 2017-08-05 14:56:40 -0700 <listitem> <para> - In <filename>postgres_fdw</>, re-establish connections to remote - servers after <command>ALTER SERVER</> or <command>ALTER USER - MAPPING</> commands (Kyotaro Horiguchi) + In <filename>postgres_fdw</filename>, re-establish connections to remote + servers after <command>ALTER SERVER</command> or <command>ALTER USER + MAPPING</command> commands (Kyotaro Horiguchi) </para> <para> @@ -786,7 +786,7 @@ Branch: REL9_4_STABLE [23a2b818f] 2017-08-05 14:56:40 -0700 <listitem> <para> - In <filename>postgres_fdw</>, allow cancellation of remote + In <filename>postgres_fdw</filename>, allow cancellation of remote transaction control commands (Robert Haas, Rafia Sabih) </para> @@ -798,14 +798,14 @@ Branch: REL9_4_STABLE [23a2b818f] 2017-08-05 14:56:40 -0700 <listitem> <para> - Increase <literal>MAX_SYSCACHE_CALLBACKS</> to provide more room for + Increase <literal>MAX_SYSCACHE_CALLBACKS</literal> to provide more room for extensions (Tom Lane) </para> </listitem> <listitem> <para> - Always use <option>-fPIC</>, not <option>-fpic</>, when building + Always use <option>-fPIC</option>, not <option>-fpic</option>, when building shared libraries with gcc (Tom Lane) </para> @@ -825,34 +825,34 @@ Branch: REL9_4_STABLE [23a2b818f] 2017-08-05 14:56:40 -0700 <listitem> <para> - In MSVC builds, handle the case where the <application>openssl</> - library is not within a <filename>VC</> subdirectory (Andrew Dunstan) + In MSVC builds, handle the case where the <application>openssl</application> + library is not within a <filename>VC</filename> subdirectory (Andrew Dunstan) </para> </listitem> <listitem> <para> - In MSVC builds, add proper include path for <application>libxml2</> + In MSVC builds, add proper include path for <application>libxml2</application> header files (Andrew Dunstan) </para> <para> This fixes a former need to move things around in standard Windows - installations of <application>libxml2</>. + installations of <application>libxml2</application>. </para> </listitem> <listitem> <para> In MSVC builds, recognize a Tcl library that is - named <filename>tcl86.lib</> (Noah Misch) + named <filename>tcl86.lib</filename> (Noah Misch) </para> </listitem> <listitem> <para> - In MSVC builds, honor <literal>PROVE_FLAGS</> settings - on <filename>vcregress.pl</>'s command line (Andrew Dunstan) + In MSVC builds, honor <literal>PROVE_FLAGS</literal> settings + on <filename>vcregress.pl</filename>'s command line (Andrew Dunstan) </para> </listitem> @@ -889,7 +889,7 @@ Branch: REL9_4_STABLE [23a2b818f] 2017-08-05 14:56:40 -0700 <para> Also, if you are using third-party replication tools that depend - on <quote>logical decoding</>, see the fourth changelog entry below. + on <quote>logical decoding</quote>, see the fourth changelog entry below. </para> <para> @@ -906,18 +906,18 @@ Branch: REL9_4_STABLE [23a2b818f] 2017-08-05 14:56:40 -0700 <listitem> <para> Restrict visibility - of <structname>pg_user_mappings</>.<structfield>umoptions</>, to + of <structname>pg_user_mappings</structname>.<structfield>umoptions</structfield>, to protect passwords stored as user mapping options (Michael Paquier, Feike Steenbergen) </para> <para> The previous coding allowed the owner of a foreign server object, - or anyone he has granted server <literal>USAGE</> permission to, + or anyone he has granted server <literal>USAGE</literal> permission to, to see the options for all user mappings associated with that server. This might well include passwords for other users. Adjust the view definition to match the behavior of - <structname>information_schema.user_mapping_options</>, namely that + <structname>information_schema.user_mapping_options</structname>, namely that these options are visible to the user being mapped, or if the mapping is for <literal>PUBLIC</literal> and the current user is the server owner, or if the current user is a superuser. @@ -941,7 +941,7 @@ Branch: REL9_4_STABLE [23a2b818f] 2017-08-05 14:56:40 -0700 <para> Some selectivity estimation functions in the planner will apply user-defined operators to values obtained - from <structname>pg_statistic</>, such as most common values and + from <structname>pg_statistic</structname>, such as most common values and histogram entries. This occurs before table permissions are checked, so a nefarious user could exploit the behavior to obtain these values for table columns he does not have permission to read. To fix, @@ -955,17 +955,17 @@ Branch: REL9_4_STABLE [23a2b818f] 2017-08-05 14:56:40 -0700 <listitem> <para> - Restore <application>libpq</>'s recognition of - the <envar>PGREQUIRESSL</> environment variable (Daniel Gustafsson) + Restore <application>libpq</application>'s recognition of + the <envar>PGREQUIRESSL</envar> environment variable (Daniel Gustafsson) </para> <para> Processing of this environment variable was unintentionally dropped - in <productname>PostgreSQL</> 9.3, but its documentation remained. + in <productname>PostgreSQL</productname> 9.3, but its documentation remained. This creates a security hazard, since users might be relying on the environment variable to force SSL-encrypted connections, but that would no longer be guaranteed. Restore handling of the variable, - but give it lower priority than <envar>PGSSLMODE</>, to avoid + but give it lower priority than <envar>PGSSLMODE</envar>, to avoid breaking configurations that work correctly with post-9.3 code. (CVE-2017-7485) </para> @@ -996,7 +996,7 @@ Branch: REL9_4_STABLE [23a2b818f] 2017-08-05 14:56:40 -0700 <listitem> <para> - Fix possible corruption of <quote>init forks</> of unlogged indexes + Fix possible corruption of <quote>init forks</quote> of unlogged indexes (Robert Haas, Michael Paquier) </para> @@ -1009,7 +1009,7 @@ Branch: REL9_4_STABLE [23a2b818f] 2017-08-05 14:56:40 -0700 <listitem> <para> - Fix incorrect reconstruction of <structname>pg_subtrans</> entries + Fix incorrect reconstruction of <structname>pg_subtrans</structname> entries when a standby server replays a prepared but uncommitted two-phase transaction (Tom Lane) </para> @@ -1017,21 +1017,21 @@ Branch: REL9_4_STABLE [23a2b818f] 2017-08-05 14:56:40 -0700 <para> In most cases this turned out to have no visible ill effects, but in corner cases it could result in circular references - in <structname>pg_subtrans</>, potentially causing infinite loops + in <structname>pg_subtrans</structname>, potentially causing infinite loops in queries that examine rows modified by the two-phase transaction. </para> </listitem> <listitem> <para> - Avoid possible crash in <application>walsender</> due to failure + Avoid possible crash in <application>walsender</application> due to failure to initialize a string buffer (Stas Kelvich, Fujii Masao) </para> </listitem> <listitem> <para> - Fix postmaster's handling of <function>fork()</> failure for a + Fix postmaster's handling of <function>fork()</function> failure for a background worker process (Tom Lane) </para> @@ -1052,19 +1052,19 @@ Branch: REL9_4_STABLE [23a2b818f] 2017-08-05 14:56:40 -0700 Due to lack of a cache flush step between commands in an extension script file, non-utility queries might not see the effects of an immediately preceding catalog change, such as <command>ALTER TABLE - ... RENAME</>. + ... RENAME</command>. </para> </listitem> <listitem> <para> Skip tablespace privilege checks when <command>ALTER TABLE ... ALTER - COLUMN TYPE</> rebuilds an existing index (Noah Misch) + COLUMN TYPE</command> rebuilds an existing index (Noah Misch) </para> <para> The command failed if the calling user did not currently have - <literal>CREATE</> privilege for the tablespace containing the index. + <literal>CREATE</literal> privilege for the tablespace containing the index. That behavior seems unhelpful, so skip the check, allowing the index to be rebuilt where it is. </para> @@ -1072,27 +1072,27 @@ Branch: REL9_4_STABLE [23a2b818f] 2017-08-05 14:56:40 -0700 <listitem> <para> - Fix <command>ALTER TABLE ... VALIDATE CONSTRAINT</> to not recurse - to child tables when the constraint is marked <literal>NO INHERIT</> + Fix <command>ALTER TABLE ... VALIDATE CONSTRAINT</command> to not recurse + to child tables when the constraint is marked <literal>NO INHERIT</literal> (Amit Langote) </para> <para> - This fix prevents unwanted <quote>constraint does not exist</> failures + This fix prevents unwanted <quote>constraint does not exist</quote> failures when no matching constraint is present in the child tables. </para> </listitem> <listitem> <para> - Fix <command>VACUUM</> to account properly for pages that could not + Fix <command>VACUUM</command> to account properly for pages that could not be scanned due to conflicting page pins (Andrew Gierth) </para> <para> This tended to lead to underestimation of the number of tuples in the table. In the worst case of a small heavily-contended - table, <command>VACUUM</> could incorrectly report that the table + table, <command>VACUUM</command> could incorrectly report that the table contained no tuples, leading to very bad planning choices. </para> </listitem> @@ -1106,12 +1106,12 @@ Branch: REL9_4_STABLE [23a2b818f] 2017-08-05 14:56:40 -0700 <listitem> <para> - Fix integer-overflow problems in <type>interval</> comparison (Kyotaro + Fix integer-overflow problems in <type>interval</type> comparison (Kyotaro Horiguchi, Tom Lane) </para> <para> - The comparison operators for type <type>interval</> could yield wrong + The comparison operators for type <type>interval</type> could yield wrong answers for intervals larger than about 296000 years. Indexes on columns containing such large values should be reindexed, since they may be corrupt. @@ -1120,21 +1120,21 @@ Branch: REL9_4_STABLE [23a2b818f] 2017-08-05 14:56:40 -0700 <listitem> <para> - Fix <function>cursor_to_xml()</> to produce valid output - with <replaceable>tableforest</> = false + Fix <function>cursor_to_xml()</function> to produce valid output + with <replaceable>tableforest</replaceable> = false (Thomas Munro, Peter Eisentraut) </para> <para> - Previously it failed to produce a wrapping <literal><table></> + Previously it failed to produce a wrapping <literal><table></literal> element. </para> </listitem> <listitem> <para> - Fix roundoff problems in <function>float8_timestamptz()</> - and <function>make_interval()</> (Tom Lane) + Fix roundoff problems in <function>float8_timestamptz()</function> + and <function>make_interval()</function> (Tom Lane) </para> <para> @@ -1146,7 +1146,7 @@ Branch: REL9_4_STABLE [23a2b818f] 2017-08-05 14:56:40 -0700 <listitem> <para> - Improve performance of <structname>pg_timezone_names</> view + Improve performance of <structname>pg_timezone_names</structname> view (Tom Lane, David Rowley) </para> </listitem> @@ -1160,13 +1160,13 @@ Branch: REL9_4_STABLE [23a2b818f] 2017-08-05 14:56:40 -0700 <listitem> <para> - Fix sloppy handling of corner-case errors from <function>lseek()</> - and <function>close()</> (Tom Lane) + Fix sloppy handling of corner-case errors from <function>lseek()</function> + and <function>close()</function> (Tom Lane) </para> <para> Neither of these system calls are likely to fail in typical situations, - but if they did, <filename>fd.c</> could get quite confused. + but if they did, <filename>fd.c</filename> could get quite confused. </para> </listitem> @@ -1184,21 +1184,21 @@ Branch: REL9_4_STABLE [23a2b818f] 2017-08-05 14:56:40 -0700 <listitem> <para> - Fix <application>ecpg</> to support <command>COMMIT PREPARED</> - and <command>ROLLBACK PREPARED</> (Masahiko Sawada) + Fix <application>ecpg</application> to support <command>COMMIT PREPARED</command> + and <command>ROLLBACK PREPARED</command> (Masahiko Sawada) </para> </listitem> <listitem> <para> Fix a double-free error when processing dollar-quoted string literals - in <application>ecpg</> (Michael Meskes) + in <application>ecpg</application> (Michael Meskes) </para> </listitem> <listitem> <para> - In <application>pg_dump</>, fix incorrect schema and owner marking for + In <application>pg_dump</application>, fix incorrect schema and owner marking for comments and security labels of some types of database objects (Giuseppe Broccolo, Tom Lane) </para> @@ -1213,20 +1213,20 @@ Branch: REL9_4_STABLE [23a2b818f] 2017-08-05 14:56:40 -0700 <listitem> <para> - Avoid emitting an invalid list file in <literal>pg_restore -l</> + Avoid emitting an invalid list file in <literal>pg_restore -l</literal> when SQL object names contain newlines (Tom Lane) </para> <para> Replace newlines by spaces, which is sufficient to make the output - valid for <literal>pg_restore -L</>'s purposes. + valid for <literal>pg_restore -L</literal>'s purposes. </para> </listitem> <listitem> <para> - Fix <application>pg_upgrade</> to transfer comments and security labels - attached to <quote>large objects</> (blobs) (Stephen Frost) + Fix <application>pg_upgrade</application> to transfer comments and security labels + attached to <quote>large objects</quote> (blobs) (Stephen Frost) </para> <para> @@ -1238,26 +1238,26 @@ Branch: REL9_4_STABLE [23a2b818f] 2017-08-05 14:56:40 -0700 <listitem> <para> Improve error handling - in <filename>contrib/adminpack</>'s <function>pg_file_write()</> + in <filename>contrib/adminpack</filename>'s <function>pg_file_write()</function> function (Noah Misch) </para> <para> Notably, it failed to detect errors reported - by <function>fclose()</>. + by <function>fclose()</function>. </para> </listitem> <listitem> <para> - In <filename>contrib/dblink</>, avoid leaking the previous unnamed + In <filename>contrib/dblink</filename>, avoid leaking the previous unnamed connection when establishing a new unnamed connection (Joe Conway) </para> </listitem> <listitem> <para> - Fix <filename>contrib/pg_trgm</>'s extraction of trigrams from regular + Fix <filename>contrib/pg_trgm</filename>'s extraction of trigrams from regular expressions (Tom Lane) </para> @@ -1270,7 +1270,7 @@ Branch: REL9_4_STABLE [23a2b818f] 2017-08-05 14:56:40 -0700 <listitem> <para> - In <filename>contrib/postgres_fdw</>, + In <filename>contrib/postgres_fdw</filename>, transmit query cancellation requests to the remote server (Michael Paquier, Etsuro Fujita) </para> @@ -1320,7 +1320,7 @@ Branch: REL9_2_STABLE [fb50c38e9] 2017-04-17 13:52:42 -0400 <listitem> <para> - Update time zone data files to <application>tzdata</> release 2017b + Update time zone data files to <application>tzdata</application> release 2017b for DST law changes in Chile, Haiti, and Mongolia, plus historical corrections for Ecuador, Kazakhstan, Liberia, and Spain. Switch to numeric abbreviations for numerous time zones in South @@ -1334,9 +1334,9 @@ Branch: REL9_2_STABLE [fb50c38e9] 2017-04-17 13:52:42 -0400 or no currency among the local population. They are in process of reversing that policy in favor of using numeric UTC offsets in zones where there is no evidence of real-world use of an English - abbreviation. At least for the time being, <productname>PostgreSQL</> + abbreviation. At least for the time being, <productname>PostgreSQL</productname> will continue to accept such removed abbreviations for timestamp input. - But they will not be shown in the <structname>pg_timezone_names</> + But they will not be shown in the <structname>pg_timezone_names</structname> view nor used for output. </para> </listitem> @@ -1349,15 +1349,15 @@ Branch: REL9_2_STABLE [fb50c38e9] 2017-04-17 13:52:42 -0400 <para> The Microsoft MSVC build scripts neglected to install - the <filename>posixrules</> file in the timezone directory tree. + the <filename>posixrules</filename> file in the timezone directory tree. This resulted in the timezone code falling back to its built-in rule about what DST behavior to assume for a POSIX-style time zone name. For historical reasons that still corresponds to the DST rules the USA was using before 2007 (i.e., change on first Sunday in April and last Sunday in October). With this fix, a POSIX-style zone name will use the current and historical DST transition dates of - the <literal>US/Eastern</> zone. If you don't want that, remove - the <filename>posixrules</> file, or replace it with a copy of some + the <literal>US/Eastern</literal> zone. If you don't want that, remove + the <filename>posixrules</filename> file, or replace it with a copy of some other zone file (see <xref linkend="datatype-timezones">). Note that due to caching, you may need to restart the server to get such changes to take effect. @@ -1410,15 +1410,15 @@ Branch: REL9_2_STABLE [fb50c38e9] 2017-04-17 13:52:42 -0400 <listitem> <para> Fix a race condition that could cause indexes built - with <command>CREATE INDEX CONCURRENTLY</> to be corrupt + with <command>CREATE INDEX CONCURRENTLY</command> to be corrupt (Pavan Deolasee, Tom Lane) </para> <para> - If <command>CREATE INDEX CONCURRENTLY</> was used to build an index + If <command>CREATE INDEX CONCURRENTLY</command> was used to build an index that depends on a column not previously indexed, then rows updated by transactions that ran concurrently with - the <command>CREATE INDEX</> command could have received incorrect + the <command>CREATE INDEX</command> command could have received incorrect index entries. If you suspect this may have happened, the most reliable solution is to rebuild affected indexes after installing this update. @@ -1435,19 +1435,19 @@ Branch: REL9_2_STABLE [fb50c38e9] 2017-04-17 13:52:42 -0400 Backends failed to account for this snapshot when advertising their oldest xmin, potentially allowing concurrent vacuuming operations to remove data that was still needed. This led to transient failures - along the lines of <quote>cache lookup failed for relation 1255</>. + along the lines of <quote>cache lookup failed for relation 1255</quote>. </para> </listitem> <listitem> <para> - Unconditionally WAL-log creation of the <quote>init fork</> for an + Unconditionally WAL-log creation of the <quote>init fork</quote> for an unlogged table (Michael Paquier) </para> <para> Previously, this was skipped when <xref linkend="guc-wal-level"> - = <literal>minimal</>, but actually it's necessary even in that case + = <literal>minimal</literal>, but actually it's necessary even in that case to ensure that the unlogged table is properly reset to empty after a crash. </para> @@ -1513,7 +1513,7 @@ Branch: REL9_2_STABLE [fb50c38e9] 2017-04-17 13:52:42 -0400 <listitem> <para> - Make sure <command>ALTER TABLE</> preserves index tablespace + Make sure <command>ALTER TABLE</command> preserves index tablespace assignments when rebuilding indexes (Tom Lane, Michael Paquier) </para> @@ -1528,7 +1528,7 @@ Branch: REL9_2_STABLE [fb50c38e9] 2017-04-17 13:52:42 -0400 <para> Fix incorrect updating of trigger function properties when changing a foreign-key constraint's deferrability properties with <command>ALTER - TABLE ... ALTER CONSTRAINT</> (Tom Lane) + TABLE ... ALTER CONSTRAINT</command> (Tom Lane) </para> <para> @@ -1544,15 +1544,15 @@ Branch: REL9_2_STABLE [fb50c38e9] 2017-04-17 13:52:42 -0400 </para> <para> - This avoids <quote>could not find trigger <replaceable>NNN</></quote> - or <quote>relation <replaceable>NNN</> has no triggers</quote> errors. + This avoids <quote>could not find trigger <replaceable>NNN</replaceable></quote> + or <quote>relation <replaceable>NNN</replaceable> has no triggers</quote> errors. </para> </listitem> <listitem> <para> Fix processing of OID column when a table with OIDs is associated to - a parent with OIDs via <command>ALTER TABLE ... INHERIT</> (Amit + a parent with OIDs via <command>ALTER TABLE ... INHERIT</command> (Amit Langote) </para> @@ -1565,7 +1565,7 @@ Branch: REL9_2_STABLE [fb50c38e9] 2017-04-17 13:52:42 -0400 <listitem> <para> - Fix <command>CREATE OR REPLACE VIEW</> to update the view query + Fix <command>CREATE OR REPLACE VIEW</command> to update the view query before attempting to apply the new view options (Dean Rasheed) </para> @@ -1578,7 +1578,7 @@ Branch: REL9_2_STABLE [fb50c38e9] 2017-04-17 13:52:42 -0400 <listitem> <para> Report correct object identity during <command>ALTER TEXT SEARCH - CONFIGURATION</> (Artur Zakirov) + CONFIGURATION</command> (Artur Zakirov) </para> <para> @@ -1608,13 +1608,13 @@ Branch: REL9_2_STABLE [fb50c38e9] 2017-04-17 13:52:42 -0400 <listitem> <para> - Prevent multicolumn expansion of <replaceable>foo</><literal>.*</> in - an <command>UPDATE</> source expression (Tom Lane) + Prevent multicolumn expansion of <replaceable>foo</replaceable><literal>.*</literal> in + an <command>UPDATE</command> source expression (Tom Lane) </para> <para> This led to <quote>UPDATE target count mismatch --- internal - error</>. Now the syntax is understood as a whole-row variable, + error</quote>. Now the syntax is understood as a whole-row variable, as it would be in other contexts. </para> </listitem> @@ -1622,12 +1622,12 @@ Branch: REL9_2_STABLE [fb50c38e9] 2017-04-17 13:52:42 -0400 <listitem> <para> Ensure that column typmods are determined accurately for - multi-row <literal>VALUES</> constructs (Tom Lane) + multi-row <literal>VALUES</literal> constructs (Tom Lane) </para> <para> This fixes problems occurring when the first value in a column has a - determinable typmod (e.g., length for a <type>varchar</> value) but + determinable typmod (e.g., length for a <type>varchar</type> value) but later values don't share the same limit. </para> </listitem> @@ -1642,15 +1642,15 @@ Branch: REL9_2_STABLE [fb50c38e9] 2017-04-17 13:52:42 -0400 Normally, a Unicode surrogate leading character must be followed by a Unicode surrogate trailing character, but the check for this was missed if the leading character was the last character in a Unicode - string literal (<literal>U&'...'</>) or Unicode identifier - (<literal>U&"..."</>). + string literal (<literal>U&'...'</literal>) or Unicode identifier + (<literal>U&"..."</literal>). </para> </listitem> <listitem> <para> Ensure that a purely negative text search query, such - as <literal>!foo</>, matches empty <type>tsvector</>s (Tom Dunstan) + as <literal>!foo</literal>, matches empty <type>tsvector</type>s (Tom Dunstan) </para> <para> @@ -1661,33 +1661,33 @@ Branch: REL9_2_STABLE [fb50c38e9] 2017-04-17 13:52:42 -0400 <listitem> <para> - Prevent crash when <function>ts_rewrite()</> replaces a non-top-level + Prevent crash when <function>ts_rewrite()</function> replaces a non-top-level subtree with an empty query (Artur Zakirov) </para> </listitem> <listitem> <para> - Fix performance problems in <function>ts_rewrite()</> (Tom Lane) + Fix performance problems in <function>ts_rewrite()</function> (Tom Lane) </para> </listitem> <listitem> <para> - Fix <function>ts_rewrite()</>'s handling of nested NOT operators + Fix <function>ts_rewrite()</function>'s handling of nested NOT operators (Tom Lane) </para> </listitem> <listitem> <para> - Fix <function>array_fill()</> to handle empty arrays properly (Tom Lane) + Fix <function>array_fill()</function> to handle empty arrays properly (Tom Lane) </para> </listitem> <listitem> <para> - Fix one-byte buffer overrun in <function>quote_literal_cstr()</> + Fix one-byte buffer overrun in <function>quote_literal_cstr()</function> (Heikki Linnakangas) </para> @@ -1699,8 +1699,8 @@ Branch: REL9_2_STABLE [fb50c38e9] 2017-04-17 13:52:42 -0400 <listitem> <para> - Prevent multiple calls of <function>pg_start_backup()</> - and <function>pg_stop_backup()</> from running concurrently (Michael + Prevent multiple calls of <function>pg_start_backup()</function> + and <function>pg_stop_backup()</function> from running concurrently (Michael Paquier) </para> @@ -1712,15 +1712,15 @@ Branch: REL9_2_STABLE [fb50c38e9] 2017-04-17 13:52:42 -0400 <listitem> <para> - Avoid discarding <type>interval</>-to-<type>interval</> casts + Avoid discarding <type>interval</type>-to-<type>interval</type> casts that aren't really no-ops (Tom Lane) </para> <para> In some cases, a cast that should result in zeroing out - low-order <type>interval</> fields was mistakenly deemed to be a + low-order <type>interval</type> fields was mistakenly deemed to be a no-op and discarded. An example is that casting from <type>INTERVAL - MONTH</> to <type>INTERVAL YEAR</> failed to clear the months field. + MONTH</type> to <type>INTERVAL YEAR</type> failed to clear the months field. </para> </listitem> @@ -1733,28 +1733,28 @@ Branch: REL9_2_STABLE [fb50c38e9] 2017-04-17 13:52:42 -0400 <listitem> <para> - Fix <application>pg_dump</> to dump user-defined casts and transforms + Fix <application>pg_dump</application> to dump user-defined casts and transforms that use built-in functions (Stephen Frost) </para> </listitem> <listitem> <para> - Fix <application>pg_restore</> with <option>--create --if-exists</> + Fix <application>pg_restore</application> with <option>--create --if-exists</option> to behave more sanely if an archive contains - unrecognized <command>DROP</> commands (Tom Lane) + unrecognized <command>DROP</command> commands (Tom Lane) </para> <para> This doesn't fix any live bug, but it may improve the behavior in - future if <application>pg_restore</> is used with an archive - generated by a later <application>pg_dump</> version. + future if <application>pg_restore</application> is used with an archive + generated by a later <application>pg_dump</application> version. </para> </listitem> <listitem> <para> - Fix <application>pg_basebackup</>'s rate limiting in the presence of + Fix <application>pg_basebackup</application>'s rate limiting in the presence of slow I/O (Antonin Houska) </para> @@ -1767,15 +1767,15 @@ Branch: REL9_2_STABLE [fb50c38e9] 2017-04-17 13:52:42 -0400 <listitem> <para> - Fix <application>pg_basebackup</>'s handling of - symlinked <filename>pg_stat_tmp</> and <filename>pg_replslot</> + Fix <application>pg_basebackup</application>'s handling of + symlinked <filename>pg_stat_tmp</filename> and <filename>pg_replslot</filename> subdirectories (Magnus Hagander, Michael Paquier) </para> </listitem> <listitem> <para> - Fix possible <application>pg_basebackup</> failure on standby + Fix possible <application>pg_basebackup</application> failure on standby server when including WAL files (Amit Kapila, Robert Haas) </para> </listitem> @@ -1794,21 +1794,21 @@ Branch: REL9_2_STABLE [fb50c38e9] 2017-04-17 13:52:42 -0400 <listitem> <para> - Fix PL/Tcl to support triggers on tables that have <literal>.tupno</> + Fix PL/Tcl to support triggers on tables that have <literal>.tupno</literal> as a column name (Tom Lane) </para> <para> This matches the (previously undocumented) behavior of - PL/Tcl's <command>spi_exec</> and <command>spi_execp</> commands, - namely that a magic <literal>.tupno</> column is inserted only if + PL/Tcl's <command>spi_exec</command> and <command>spi_execp</command> commands, + namely that a magic <literal>.tupno</literal> column is inserted only if there isn't a real column named that. </para> </listitem> <listitem> <para> - Allow DOS-style line endings in <filename>~/.pgpass</> files, + Allow DOS-style line endings in <filename>~/.pgpass</filename> files, even on Unix (Vik Fearing) </para> @@ -1820,23 +1820,23 @@ Branch: REL9_2_STABLE [fb50c38e9] 2017-04-17 13:52:42 -0400 <listitem> <para> - Fix one-byte buffer overrun if <application>ecpg</> is given a file + Fix one-byte buffer overrun if <application>ecpg</application> is given a file name that ends with a dot (Takayuki Tsunakawa) </para> </listitem> <listitem> <para> - Fix <application>psql</>'s tab completion for <command>ALTER DEFAULT - PRIVILEGES</> (Gilles Darold, Stephen Frost) + Fix <application>psql</application>'s tab completion for <command>ALTER DEFAULT + PRIVILEGES</command> (Gilles Darold, Stephen Frost) </para> </listitem> <listitem> <para> - In <application>psql</>, treat an empty or all-blank setting of - the <envar>PAGER</> environment variable as meaning <quote>no - pager</> (Tom Lane) + In <application>psql</application>, treat an empty or all-blank setting of + the <envar>PAGER</envar> environment variable as meaning <quote>no + pager</quote> (Tom Lane) </para> <para> @@ -1847,22 +1847,22 @@ Branch: REL9_2_STABLE [fb50c38e9] 2017-04-17 13:52:42 -0400 <listitem> <para> - Improve <filename>contrib/dblink</>'s reporting of - low-level <application>libpq</> errors, such as out-of-memory + Improve <filename>contrib/dblink</filename>'s reporting of + low-level <application>libpq</application> errors, such as out-of-memory (Joe Conway) </para> </listitem> <listitem> <para> - Teach <filename>contrib/dblink</> to ignore irrelevant server options - when it uses a <filename>contrib/postgres_fdw</> foreign server as + Teach <filename>contrib/dblink</filename> to ignore irrelevant server options + when it uses a <filename>contrib/postgres_fdw</filename> foreign server as the source of connection options (Corey Huinker) </para> <para> Previously, if the foreign server object had options that were not - also <application>libpq</> connection options, an error occurred. + also <application>libpq</application> connection options, an error occurred. </para> </listitem> @@ -1888,7 +1888,7 @@ Branch: REL9_2_STABLE [fb50c38e9] 2017-04-17 13:52:42 -0400 <listitem> <para> - Update time zone data files to <application>tzdata</> release 2016j + Update time zone data files to <application>tzdata</application> release 2016j for DST law changes in northern Cyprus (adding a new zone Asia/Famagusta), Russia (adding a new zone Europe/Saratov), Tonga, and Antarctica/Casey. @@ -1951,7 +1951,7 @@ Branch: REL9_2_STABLE [fb50c38e9] 2017-04-17 13:52:42 -0400 crash recovery, or to be written incorrectly on a standby server. Bogus entries in a free space map could lead to attempts to access pages that have been truncated away from the relation itself, typically - producing errors like <quote>could not read block <replaceable>XXX</>: + producing errors like <quote>could not read block <replaceable>XXX</replaceable>: read only 0 of 8192 bytes</quote>. Checksum failures in the visibility map are also possible, if checksumming is enabled. </para> @@ -1959,7 +1959,7 @@ Branch: REL9_2_STABLE [fb50c38e9] 2017-04-17 13:52:42 -0400 <para> Procedures for determining whether there is a problem and repairing it if so are discussed at - <ulink url="https://wiki.postgresql.org/wiki/Free_Space_Map_Problems"></>. + <ulink url="https://wiki.postgresql.org/wiki/Free_Space_Map_Problems"></ulink>. </para> </listitem> @@ -1970,20 +1970,20 @@ Branch: REL9_2_STABLE [fb50c38e9] 2017-04-17 13:52:42 -0400 </para> <para> - The typical symptom was <quote>unexpected GIN leaf action</> errors + The typical symptom was <quote>unexpected GIN leaf action</quote> errors during WAL replay. </para> </listitem> <listitem> <para> - Fix <command>SELECT FOR UPDATE/SHARE</> to correctly lock tuples that + Fix <command>SELECT FOR UPDATE/SHARE</command> to correctly lock tuples that have been updated by a subsequently-aborted transaction (Álvaro Herrera) </para> <para> - In 9.5 and later, the <command>SELECT</> would sometimes fail to + In 9.5 and later, the <command>SELECT</command> would sometimes fail to return such tuples at all. A failure has not been proven to occur in earlier releases, but might be possible with concurrent updates. </para> @@ -2017,79 +2017,79 @@ Branch: REL9_2_STABLE [fb50c38e9] 2017-04-17 13:52:42 -0400 <listitem> <para> - Fix query-lifespan memory leak in a bulk <command>UPDATE</> on a table - with a <literal>PRIMARY KEY</> or <literal>REPLICA IDENTITY</> index + Fix query-lifespan memory leak in a bulk <command>UPDATE</command> on a table + with a <literal>PRIMARY KEY</literal> or <literal>REPLICA IDENTITY</literal> index (Tom Lane) </para> </listitem> <listitem> <para> - Fix <command>EXPLAIN</> to emit valid XML when + Fix <command>EXPLAIN</command> to emit valid XML when <xref linkend="guc-track-io-timing"> is on (Markus Winand) </para> <para> Previously the XML output-format option produced syntactically invalid - tags such as <literal><I/O-Read-Time></>. That is now - rendered as <literal><I-O-Read-Time></>. + tags such as <literal><I/O-Read-Time></literal>. That is now + rendered as <literal><I-O-Read-Time></literal>. </para> </listitem> <listitem> <para> Suppress printing of zeroes for unmeasured times - in <command>EXPLAIN</> (Maksim Milyutin) + in <command>EXPLAIN</command> (Maksim Milyutin) </para> <para> Certain option combinations resulted in printing zero values for times that actually aren't ever measured in that combination. Our general - policy in <command>EXPLAIN</> is not to print such fields at all, so + policy in <command>EXPLAIN</command> is not to print such fields at all, so do that consistently in all cases. </para> </listitem> <listitem> <para> - Fix timeout length when <command>VACUUM</> is waiting for exclusive + Fix timeout length when <command>VACUUM</command> is waiting for exclusive table lock so that it can truncate the table (Simon Riggs) </para> <para> The timeout was meant to be 50 milliseconds, but it was actually only - 50 microseconds, causing <command>VACUUM</> to give up on truncation + 50 microseconds, causing <command>VACUUM</command> to give up on truncation much more easily than intended. Set it to the intended value. </para> </listitem> <listitem> <para> - Fix bugs in merging inherited <literal>CHECK</> constraints while + Fix bugs in merging inherited <literal>CHECK</literal> constraints while creating or altering a table (Tom Lane, Amit Langote) </para> <para> - Allow identical <literal>CHECK</> constraints to be added to a parent + Allow identical <literal>CHECK</literal> constraints to be added to a parent and child table in either order. Prevent merging of a valid - constraint from the parent table with a <literal>NOT VALID</> + constraint from the parent table with a <literal>NOT VALID</literal> constraint on the child. Likewise, prevent merging of a <literal>NO - INHERIT</> child constraint with an inherited constraint. + INHERIT</literal> child constraint with an inherited constraint. </para> </listitem> <listitem> <para> Remove artificial restrictions on the values accepted - by <function>numeric_in()</> and <function>numeric_recv()</> + by <function>numeric_in()</function> and <function>numeric_recv()</function> (Tom Lane) </para> <para> We allow numeric values up to the limit of the storage format (more - than <literal>1e100000</>), so it seems fairly pointless - that <function>numeric_in()</> rejected scientific-notation exponents - above 1000. Likewise, it was silly for <function>numeric_recv()</> to + than <literal>1e100000</literal>), so it seems fairly pointless + that <function>numeric_in()</function> rejected scientific-notation exponents + above 1000. Likewise, it was silly for <function>numeric_recv()</function> to reject more than 1000 digits in an input value. </para> </listitem> @@ -2134,7 +2134,7 @@ Branch: REL9_4_STABLE [10ad15f48] 2016-09-01 11:45:16 -0400 <listitem> <para> - Disallow starting a standalone backend with <literal>standby_mode</> + Disallow starting a standalone backend with <literal>standby_mode</literal> turned on (Michael Paquier) </para> @@ -2153,7 +2153,7 @@ Branch: REL9_4_STABLE [10ad15f48] 2016-09-01 11:45:16 -0400 <para> This failure to reset all of the fields of the slot could - prevent <command>VACUUM</> from removing dead tuples. + prevent <command>VACUUM</command> from removing dead tuples. </para> </listitem> @@ -2164,7 +2164,7 @@ Branch: REL9_4_STABLE [10ad15f48] 2016-09-01 11:45:16 -0400 </para> <para> - This avoids possible failures during <function>munmap()</> on systems + This avoids possible failures during <function>munmap()</function> on systems with atypical default huge page sizes. Except in crash-recovery cases, there were no ill effects other than a log message. </para> @@ -2178,7 +2178,7 @@ Branch: REL9_4_STABLE [10ad15f48] 2016-09-01 11:45:16 -0400 <para> Previously, the same value would be chosen every time, because it was - derived from <function>random()</> but <function>srandom()</> had not + derived from <function>random()</function> but <function>srandom()</function> had not yet been called. While relatively harmless, this was not the intended behavior. </para> @@ -2191,8 +2191,8 @@ Branch: REL9_4_STABLE [10ad15f48] 2016-09-01 11:45:16 -0400 </para> <para> - Windows sometimes returns <literal>ERROR_ACCESS_DENIED</> rather - than <literal>ERROR_ALREADY_EXISTS</> when there is an existing + Windows sometimes returns <literal>ERROR_ACCESS_DENIED</literal> rather + than <literal>ERROR_ALREADY_EXISTS</literal> when there is an existing segment. This led to postmaster startup failure due to believing that the former was an unrecoverable error. </para> @@ -2201,7 +2201,7 @@ Branch: REL9_4_STABLE [10ad15f48] 2016-09-01 11:45:16 -0400 <listitem> <para> Don't try to share SSL contexts across multiple connections - in <application>libpq</> (Heikki Linnakangas) + in <application>libpq</application> (Heikki Linnakangas) </para> <para> @@ -2212,30 +2212,30 @@ Branch: REL9_4_STABLE [10ad15f48] 2016-09-01 11:45:16 -0400 <listitem> <para> - Avoid corner-case memory leak in <application>libpq</> (Tom Lane) + Avoid corner-case memory leak in <application>libpq</application> (Tom Lane) </para> <para> The reported problem involved leaking an error report - during <function>PQreset()</>, but there might be related cases. + during <function>PQreset()</function>, but there might be related cases. </para> </listitem> <listitem> <para> - Make <application>ecpg</>'s <option>--help</> and <option>--version</> + Make <application>ecpg</application>'s <option>--help</option> and <option>--version</option> options work consistently with our other executables (Haribabu Kommi) </para> </listitem> <listitem> <para> - Fix <application>pgbench</>'s calculation of average latency + Fix <application>pgbench</application>'s calculation of average latency (Fabien Coelho) </para> <para> - The calculation was incorrect when there were <literal>\sleep</> + The calculation was incorrect when there were <literal>\sleep</literal> commands in the script, or when the test duration was specified in number of transactions rather than total time. </para> @@ -2243,12 +2243,12 @@ Branch: REL9_4_STABLE [10ad15f48] 2016-09-01 11:45:16 -0400 <listitem> <para> - In <application>pg_dump</>, never dump range constructor functions + In <application>pg_dump</application>, never dump range constructor functions (Tom Lane) </para> <para> - This oversight led to <application>pg_upgrade</> failures with + This oversight led to <application>pg_upgrade</application> failures with extensions containing range types, due to duplicate creation of the constructor functions. </para> @@ -2256,8 +2256,8 @@ Branch: REL9_4_STABLE [10ad15f48] 2016-09-01 11:45:16 -0400 <listitem> <para> - In <application>pg_xlogdump</>, retry opening new WAL segments when - using <option>--follow</> option (Magnus Hagander) + In <application>pg_xlogdump</application>, retry opening new WAL segments when + using <option>--follow</option> option (Magnus Hagander) </para> <para> @@ -2268,7 +2268,7 @@ Branch: REL9_4_STABLE [10ad15f48] 2016-09-01 11:45:16 -0400 <listitem> <para> - Fix <application>pg_xlogdump</> to cope with a WAL file that begins + Fix <application>pg_xlogdump</application> to cope with a WAL file that begins with a continuation record spanning more than one page (Pavan Deolasee) </para> @@ -2276,15 +2276,15 @@ Branch: REL9_4_STABLE [10ad15f48] 2016-09-01 11:45:16 -0400 <listitem> <para> - Fix <filename>contrib/pg_buffercache</> to work - when <varname>shared_buffers</> exceeds 256GB (KaiGai Kohei) + Fix <filename>contrib/pg_buffercache</filename> to work + when <varname>shared_buffers</varname> exceeds 256GB (KaiGai Kohei) </para> </listitem> <listitem> <para> - Fix <filename>contrib/intarray/bench/bench.pl</> to print the results - of the <command>EXPLAIN</> it does when given the <option>-e</> option + Fix <filename>contrib/intarray/bench/bench.pl</filename> to print the results + of the <command>EXPLAIN</command> it does when given the <option>-e</option> option (Daniel Gustafsson) </para> </listitem> @@ -2296,17 +2296,17 @@ Branch: REL9_4_STABLE [10ad15f48] 2016-09-01 11:45:16 -0400 </para> <para> - When <productname>PostgreSQL</> has been configured - with <option>--enable-tap-tests</>, <quote>make install</> will now + When <productname>PostgreSQL</productname> has been configured + with <option>--enable-tap-tests</option>, <quote>make install</quote> will now install the Perl support files for TAP testing where PGXS can find them. This allows non-core extensions to - use <literal>$(prove_check)</> without extra tests. + use <literal>$(prove_check)</literal> without extra tests. </para> </listitem> <listitem> <para> - In MSVC builds, include <application>pg_recvlogical</> in a + In MSVC builds, include <application>pg_recvlogical</application> in a client-only installation (MauMau) </para> </listitem> @@ -2327,17 +2327,17 @@ Branch: REL9_4_STABLE [10ad15f48] 2016-09-01 11:45:16 -0400 If a dynamic time zone abbreviation does not match any entry in the referenced time zone, treat it as equivalent to the time zone name. This avoids unexpected failures when IANA removes abbreviations from - their time zone database, as they did in <application>tzdata</> + their time zone database, as they did in <application>tzdata</application> release 2016f and seem likely to do again in the future. The consequences were not limited to not recognizing the individual abbreviation; any mismatch caused - the <structname>pg_timezone_abbrevs</> view to fail altogether. + the <structname>pg_timezone_abbrevs</structname> view to fail altogether. </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2016h + Update time zone data files to <application>tzdata</application> release 2016h for DST law changes in Palestine and Turkey, plus historical corrections for Turkey and some regions of Russia. Switch to numeric abbreviations for some time zones in Antarctica, @@ -2350,15 +2350,15 @@ Branch: REL9_4_STABLE [10ad15f48] 2016-09-01 11:45:16 -0400 or no currency among the local population. They are in process of reversing that policy in favor of using numeric UTC offsets in zones where there is no evidence of real-world use of an English - abbreviation. At least for the time being, <productname>PostgreSQL</> + abbreviation. At least for the time being, <productname>PostgreSQL</productname> will continue to accept such removed abbreviations for timestamp input. - But they will not be shown in the <structname>pg_timezone_names</> + But they will not be shown in the <structname>pg_timezone_names</structname> view nor used for output. </para> <para> - In this update, <literal>AMT</> is no longer shown as being in use to - mean Armenia Time. Therefore, we have changed the <literal>Default</> + In this update, <literal>AMT</literal> is no longer shown as being in use to + mean Armenia Time. Therefore, we have changed the <literal>Default</literal> abbreviation set to interpret it as Amazon Time, thus UTC-4 not UTC+4. </para> </listitem> @@ -2403,17 +2403,17 @@ Branch: REL9_4_STABLE [10ad15f48] 2016-09-01 11:45:16 -0400 <listitem> <para> Fix possible mis-evaluation of - nested <literal>CASE</>-<literal>WHEN</> expressions (Heikki + nested <literal>CASE</literal>-<literal>WHEN</literal> expressions (Heikki Linnakangas, Michael Paquier, Tom Lane) </para> <para> - A <literal>CASE</> expression appearing within the test value - subexpression of another <literal>CASE</> could become confused about + A <literal>CASE</literal> expression appearing within the test value + subexpression of another <literal>CASE</literal> could become confused about whether its own test value was null or not. Also, inlining of a SQL function implementing the equality operator used by - a <literal>CASE</> expression could result in passing the wrong test - value to functions called within a <literal>CASE</> expression in the + a <literal>CASE</literal> expression could result in passing the wrong test + value to functions called within a <literal>CASE</literal> expression in the SQL function's body. If the test values were of different data types, a crash might result; moreover such situations could be abused to allow disclosure of portions of server memory. (CVE-2016-5423) @@ -2427,7 +2427,7 @@ Branch: REL9_4_STABLE [10ad15f48] 2016-09-01 11:45:16 -0400 </para> <para> - Numerous places in <application>vacuumdb</> and other client programs + Numerous places in <application>vacuumdb</application> and other client programs could become confused by database and role names containing double quotes or backslashes. Tighten up quoting rules to make that safe. Also, ensure that when a conninfo string is used as a database name @@ -2436,22 +2436,22 @@ Branch: REL9_4_STABLE [10ad15f48] 2016-09-01 11:45:16 -0400 <para> Fix handling of paired double quotes - in <application>psql</>'s <command>\connect</> - and <command>\password</> commands to match the documentation. + in <application>psql</application>'s <command>\connect</command> + and <command>\password</command> commands to match the documentation. </para> <para> - Introduce a new <option>-reuse-previous</> option - in <application>psql</>'s <command>\connect</> command to allow + Introduce a new <option>-reuse-previous</option> option + in <application>psql</application>'s <command>\connect</command> command to allow explicit control of whether to re-use connection parameters from a previous connection. (Without this, the choice is based on whether the database name looks like a conninfo string, as before.) This allows secure handling of database names containing special - characters in <application>pg_dumpall</> scripts. + characters in <application>pg_dumpall</application> scripts. </para> <para> - <application>pg_dumpall</> now refuses to deal with database and role + <application>pg_dumpall</application> now refuses to deal with database and role names containing carriage returns or newlines, as it seems impractical to quote those characters safely on Windows. In future we may reject such names on the server side, but that step has not been taken yet. @@ -2461,40 +2461,40 @@ Branch: REL9_4_STABLE [10ad15f48] 2016-09-01 11:45:16 -0400 These are considered security fixes because crafted object names containing special characters could have been used to execute commands with superuser privileges the next time a superuser - executes <application>pg_dumpall</> or other routine maintenance + executes <application>pg_dumpall</application> or other routine maintenance operations. (CVE-2016-5424) </para> </listitem> <listitem> <para> - Fix corner-case misbehaviors for <literal>IS NULL</>/<literal>IS NOT - NULL</> applied to nested composite values (Andrew Gierth, Tom Lane) + Fix corner-case misbehaviors for <literal>IS NULL</literal>/<literal>IS NOT + NULL</literal> applied to nested composite values (Andrew Gierth, Tom Lane) </para> <para> - The SQL standard specifies that <literal>IS NULL</> should return + The SQL standard specifies that <literal>IS NULL</literal> should return TRUE for a row of all null values (thus <literal>ROW(NULL,NULL) IS - NULL</> yields TRUE), but this is not meant to apply recursively - (thus <literal>ROW(NULL, ROW(NULL,NULL)) IS NULL</> yields FALSE). + NULL</literal> yields TRUE), but this is not meant to apply recursively + (thus <literal>ROW(NULL, ROW(NULL,NULL)) IS NULL</literal> yields FALSE). The core executor got this right, but certain planner optimizations treated the test as recursive (thus producing TRUE in both cases), - and <filename>contrib/postgres_fdw</> could produce remote queries + and <filename>contrib/postgres_fdw</filename> could produce remote queries that misbehaved similarly. </para> </listitem> <listitem> <para> - Make the <type>inet</> and <type>cidr</> data types properly reject + Make the <type>inet</type> and <type>cidr</type> data types properly reject IPv6 addresses with too many colon-separated fields (Tom Lane) </para> </listitem> <listitem> <para> - Prevent crash in <function>close_ps()</> - (the <type>point</> <literal>##</> <type>lseg</> operator) + Prevent crash in <function>close_ps()</function> + (the <type>point</type> <literal>##</literal> <type>lseg</type> operator) for NaN input coordinates (Tom Lane) </para> @@ -2505,19 +2505,19 @@ Branch: REL9_4_STABLE [10ad15f48] 2016-09-01 11:45:16 -0400 <listitem> <para> - Avoid possible crash in <function>pg_get_expr()</> when inconsistent + Avoid possible crash in <function>pg_get_expr()</function> when inconsistent values are passed to it (Michael Paquier, Thomas Munro) </para> </listitem> <listitem> <para> - Fix several one-byte buffer over-reads in <function>to_number()</> + Fix several one-byte buffer over-reads in <function>to_number()</function> (Peter Eisentraut) </para> <para> - In several cases the <function>to_number()</> function would read one + In several cases the <function>to_number()</function> function would read one more character than it should from the input string. There is a small chance of a crash, if the input happens to be adjacent to the end of memory. @@ -2527,8 +2527,8 @@ Branch: REL9_4_STABLE [10ad15f48] 2016-09-01 11:45:16 -0400 <listitem> <para> Do not run the planner on the query contained in <literal>CREATE - MATERIALIZED VIEW</> or <literal>CREATE TABLE AS</> - when <literal>WITH NO DATA</> is specified (Michael Paquier, + MATERIALIZED VIEW</literal> or <literal>CREATE TABLE AS</literal> + when <literal>WITH NO DATA</literal> is specified (Michael Paquier, Tom Lane) </para> @@ -2542,7 +2542,7 @@ Branch: REL9_4_STABLE [10ad15f48] 2016-09-01 11:45:16 -0400 <listitem> <para> Avoid unsafe intermediate state during expensive paths - through <function>heap_update()</> (Masahiko Sawada, Andres Freund) + through <function>heap_update()</function> (Masahiko Sawada, Andres Freund) </para> <para> @@ -2568,15 +2568,15 @@ Branch: REL9_4_STABLE [10ad15f48] 2016-09-01 11:45:16 -0400 <listitem> <para> - Avoid unnecessary <quote>could not serialize access</> errors when - acquiring <literal>FOR KEY SHARE</> row locks in serializable mode + Avoid unnecessary <quote>could not serialize access</quote> errors when + acquiring <literal>FOR KEY SHARE</literal> row locks in serializable mode (Álvaro Herrera) </para> </listitem> <listitem> <para> - Avoid crash in <literal>postgres -C</> when the specified variable + Avoid crash in <literal>postgres -C</literal> when the specified variable has a null string value (Michael Paquier) </para> </listitem> @@ -2619,12 +2619,12 @@ Branch: REL9_4_STABLE [10ad15f48] 2016-09-01 11:45:16 -0400 <listitem> <para> - Avoid consuming a transaction ID during <command>VACUUM</> + Avoid consuming a transaction ID during <command>VACUUM</command> (Alexander Korotkov) </para> <para> - Some cases in <command>VACUUM</> unnecessarily caused an XID to be + Some cases in <command>VACUUM</command> unnecessarily caused an XID to be assigned to the current transaction. Normally this is negligible, but if one is up against the XID wraparound limit, consuming more XIDs during anti-wraparound vacuums is a very bad thing. @@ -2640,12 +2640,12 @@ Branch: REL9_2_STABLE [294509ea9] 2016-05-25 19:39:49 -0400 Branch: REL9_1_STABLE [de887cc8a] 2016-05-25 19:39:49 -0400 --> <para> - Avoid canceling hot-standby queries during <command>VACUUM FREEZE</> + Avoid canceling hot-standby queries during <command>VACUUM FREEZE</command> (Simon Riggs, Álvaro Herrera) </para> <para> - <command>VACUUM FREEZE</> on an otherwise-idle master server could + <command>VACUUM FREEZE</command> on an otherwise-idle master server could result in unnecessary cancellations of queries on its standby servers. </para> @@ -2660,15 +2660,15 @@ Branch: REL9_1_STABLE [de887cc8a] 2016-05-25 19:39:49 -0400 <para> The usual symptom of this bug is errors - like <quote>MultiXactId <replaceable>NNN</> has not been created + like <quote>MultiXactId <replaceable>NNN</replaceable> has not been created yet -- apparent wraparound</quote>. </para> </listitem> <listitem> <para> - When a manual <command>ANALYZE</> specifies a column list, don't - reset the table's <literal>changes_since_analyze</> counter + When a manual <command>ANALYZE</command> specifies a column list, don't + reset the table's <literal>changes_since_analyze</literal> counter (Tom Lane) </para> @@ -2680,7 +2680,7 @@ Branch: REL9_1_STABLE [de887cc8a] 2016-05-25 19:39:49 -0400 <listitem> <para> - Fix <command>ANALYZE</>'s overestimation of <literal>n_distinct</> + Fix <command>ANALYZE</command>'s overestimation of <literal>n_distinct</literal> for a unique or nearly-unique column with many null entries (Tom Lane) </para> @@ -2713,7 +2713,7 @@ Branch: REL9_1_STABLE [de887cc8a] 2016-05-25 19:39:49 -0400 </para> <para> - This mistake prevented <command>VACUUM</> from completing in some + This mistake prevented <command>VACUUM</command> from completing in some cases involving corrupt b-tree indexes. </para> </listitem> @@ -2727,8 +2727,8 @@ Branch: REL9_1_STABLE [de887cc8a] 2016-05-25 19:39:49 -0400 <listitem> <para> - Fix <filename>contrib/btree_gin</> to handle the smallest - possible <type>bigint</> value correctly (Peter Eisentraut) + Fix <filename>contrib/btree_gin</filename> to handle the smallest + possible <type>bigint</type> value correctly (Peter Eisentraut) </para> </listitem> @@ -2741,53 +2741,53 @@ Branch: REL9_1_STABLE [de887cc8a] 2016-05-25 19:39:49 -0400 <para> It's planned to switch to two-part instead of three-part server version numbers for releases after 9.6. Make sure - that <function>PQserverVersion()</> returns the correct value for + that <function>PQserverVersion()</function> returns the correct value for such cases. </para> </listitem> <listitem> <para> - Fix <application>ecpg</>'s code for <literal>unsigned long long</> + Fix <application>ecpg</application>'s code for <literal>unsigned long long</literal> array elements (Michael Meskes) </para> </listitem> <listitem> <para> - In <application>pg_dump</> with both <option>-c</> and <option>-C</> - options, avoid emitting an unwanted <literal>CREATE SCHEMA public</> + In <application>pg_dump</application> with both <option>-c</option> and <option>-C</option> + options, avoid emitting an unwanted <literal>CREATE SCHEMA public</literal> command (David Johnston, Tom Lane) </para> </listitem> <listitem> <para> - Improve handling of <systemitem>SIGTERM</>/control-C in - parallel <application>pg_dump</> and <application>pg_restore</> (Tom + Improve handling of <systemitem>SIGTERM</systemitem>/control-C in + parallel <application>pg_dump</application> and <application>pg_restore</application> (Tom Lane) </para> <para> Make sure that the worker processes will exit promptly, and also arrange to send query-cancel requests to the connected backends, in case they - are doing something long-running such as a <command>CREATE INDEX</>. + are doing something long-running such as a <command>CREATE INDEX</command>. </para> </listitem> <listitem> <para> - Fix error reporting in parallel <application>pg_dump</> - and <application>pg_restore</> (Tom Lane) + Fix error reporting in parallel <application>pg_dump</application> + and <application>pg_restore</application> (Tom Lane) </para> <para> - Previously, errors reported by <application>pg_dump</> - or <application>pg_restore</> worker processes might never make it to + Previously, errors reported by <application>pg_dump</application> + or <application>pg_restore</application> worker processes might never make it to the user's console, because the messages went through the master process, and there were various deadlock scenarios that would prevent the master process from passing on the messages. Instead, just print - everything to <literal>stderr</>. In some cases this will result in + everything to <literal>stderr</literal>. In some cases this will result in duplicate messages (for instance, if all the workers report a server shutdown), but that seems better than no message. </para> @@ -2795,8 +2795,8 @@ Branch: REL9_1_STABLE [de887cc8a] 2016-05-25 19:39:49 -0400 <listitem> <para> - Ensure that parallel <application>pg_dump</> - or <application>pg_restore</> on Windows will shut down properly + Ensure that parallel <application>pg_dump</application> + or <application>pg_restore</application> on Windows will shut down properly after an error (Kyotaro Horiguchi) </para> @@ -2808,7 +2808,7 @@ Branch: REL9_1_STABLE [de887cc8a] 2016-05-25 19:39:49 -0400 <listitem> <para> - Make <application>pg_dump</> behave better when built without zlib + Make <application>pg_dump</application> behave better when built without zlib support (Kyotaro Horiguchi) </para> @@ -2820,7 +2820,7 @@ Branch: REL9_1_STABLE [de887cc8a] 2016-05-25 19:39:49 -0400 <listitem> <para> - Make <application>pg_basebackup</> accept <literal>-Z 0</> as + Make <application>pg_basebackup</application> accept <literal>-Z 0</literal> as specifying no compression (Fujii Masao) </para> </listitem> @@ -2841,13 +2841,13 @@ Branch: REL9_1_STABLE [de887cc8a] 2016-05-25 19:39:49 -0400 <listitem> <para> - Be more predictable about reporting <quote>statement timeout</> - versus <quote>lock timeout</> (Tom Lane) + Be more predictable about reporting <quote>statement timeout</quote> + versus <quote>lock timeout</quote> (Tom Lane) </para> <para> On heavily loaded machines, the regression tests sometimes failed due - to reporting <quote>lock timeout</> even though the statement timeout + to reporting <quote>lock timeout</quote> even though the statement timeout should have occurred first. </para> </listitem> @@ -2867,7 +2867,7 @@ Branch: REL9_1_STABLE [de887cc8a] 2016-05-25 19:39:49 -0400 <listitem> <para> Update our copy of the timezone code to match - IANA's <application>tzcode</> release 2016c (Tom Lane) + IANA's <application>tzcode</application> release 2016c (Tom Lane) </para> <para> @@ -2879,7 +2879,7 @@ Branch: REL9_1_STABLE [de887cc8a] 2016-05-25 19:39:49 -0400 <listitem> <para> - Update time zone data files to <application>tzdata</> release 2016f + Update time zone data files to <application>tzdata</application> release 2016f for DST law changes in Kemerovo and Novosibirsk, plus historical corrections for Azerbaijan, Belarus, and Morocco. </para> @@ -2934,7 +2934,7 @@ Branch: REL9_1_STABLE [de887cc8a] 2016-05-25 19:39:49 -0400 using OpenSSL within a single process and not all the code involved follows the same rules for when to clear the error queue. Failures have been reported specifically when a client application - uses SSL connections in <application>libpq</> concurrently with + uses SSL connections in <application>libpq</application> concurrently with SSL connections using the PHP, Python, or Ruby wrappers for OpenSSL. It's possible for similar problems to arise within the server as well, if an extension module establishes an outgoing SSL connection. @@ -2943,7 +2943,7 @@ Branch: REL9_1_STABLE [de887cc8a] 2016-05-25 19:39:49 -0400 <listitem> <para> - Fix <quote>failed to build any <replaceable>N</>-way joins</quote> + Fix <quote>failed to build any <replaceable>N</replaceable>-way joins</quote> planner error with a full join enclosed in the right-hand side of a left join (Tom Lane) </para> @@ -2957,10 +2957,10 @@ Branch: REL9_1_STABLE [de887cc8a] 2016-05-25 19:39:49 -0400 <para> Given a three-or-more-way equivalence class of variables, such - as <literal>X.X = Y.Y = Z.Z</>, it was possible for the planner to omit + as <literal>X.X = Y.Y = Z.Z</literal>, it was possible for the planner to omit some of the tests needed to enforce that all the variables are actually equal, leading to join rows being output that didn't satisfy - the <literal>WHERE</> clauses. For various reasons, erroneous plans + the <literal>WHERE</literal> clauses. For various reasons, erroneous plans were seldom selected in practice, so that this bug has gone undetected for a long time. </para> @@ -2981,14 +2981,14 @@ Branch: REL9_1_STABLE [de887cc8a] 2016-05-25 19:39:49 -0400 <para> The memory leak would typically not amount to much in simple queries, but it could be very substantial during a large GIN index build with - high <varname>maintenance_work_mem</>. + high <varname>maintenance_work_mem</varname>. </para> </listitem> <listitem> <para> - Fix possible misbehavior of <literal>TH</>, <literal>th</>, - and <literal>Y,YYY</> format codes in <function>to_timestamp()</> + Fix possible misbehavior of <literal>TH</literal>, <literal>th</literal>, + and <literal>Y,YYY</literal> format codes in <function>to_timestamp()</function> (Tom Lane) </para> @@ -3000,29 +3000,29 @@ Branch: REL9_1_STABLE [de887cc8a] 2016-05-25 19:39:49 -0400 <listitem> <para> - Fix dumping of rules and views in which the <replaceable>array</> - argument of a <literal><replaceable>value</> <replaceable>operator</> - ANY (<replaceable>array</>)</literal> construct is a sub-SELECT + Fix dumping of rules and views in which the <replaceable>array</replaceable> + argument of a <literal><replaceable>value</replaceable> <replaceable>operator</replaceable> + ANY (<replaceable>array</replaceable>)</literal> construct is a sub-SELECT (Tom Lane) </para> </listitem> <listitem> <para> - Disallow newlines in <command>ALTER SYSTEM</> parameter values + Disallow newlines in <command>ALTER SYSTEM</command> parameter values (Tom Lane) </para> <para> The configuration-file parser doesn't support embedded newlines in string literals, so we mustn't allow them in values to be inserted - by <command>ALTER SYSTEM</>. + by <command>ALTER SYSTEM</command>. </para> </listitem> <listitem> <para> - Fix <command>ALTER TABLE ... REPLICA IDENTITY USING INDEX</> to + Fix <command>ALTER TABLE ... REPLICA IDENTITY USING INDEX</command> to work properly if an index on OID is selected (David Rowley) </para> </listitem> @@ -3048,19 +3048,19 @@ Branch: REL9_1_STABLE [de887cc8a] 2016-05-25 19:39:49 -0400 <listitem> <para> - Make <application>pg_regress</> use a startup timeout from the - <envar>PGCTLTIMEOUT</> environment variable, if that's set (Tom Lane) + Make <application>pg_regress</application> use a startup timeout from the + <envar>PGCTLTIMEOUT</envar> environment variable, if that's set (Tom Lane) </para> <para> This is for consistency with a behavior recently added - to <application>pg_ctl</>; it eases automated testing on slow machines. + to <application>pg_ctl</application>; it eases automated testing on slow machines. </para> </listitem> <listitem> <para> - Fix <application>pg_upgrade</> to correctly restore extension + Fix <application>pg_upgrade</application> to correctly restore extension membership for operator families containing only one operator class (Tom Lane) </para> @@ -3068,20 +3068,20 @@ Branch: REL9_1_STABLE [de887cc8a] 2016-05-25 19:39:49 -0400 <para> In such a case, the operator family was restored into the new database, but it was no longer marked as part of the extension. This had no - immediate ill effects, but would cause later <application>pg_dump</> + immediate ill effects, but would cause later <application>pg_dump</application> runs to emit output that would cause (harmless) errors on restore. </para> </listitem> <listitem> <para> - Fix <application>pg_upgrade</> to not fail when new-cluster TOAST rules + Fix <application>pg_upgrade</application> to not fail when new-cluster TOAST rules differ from old (Tom Lane) </para> <para> - <application>pg_upgrade</> had special-case code to handle the - situation where the new <productname>PostgreSQL</> version thinks that + <application>pg_upgrade</application> had special-case code to handle the + situation where the new <productname>PostgreSQL</productname> version thinks that a table should have a TOAST table while the old version did not. That code was broken, so remove it, and instead do nothing in such cases; there seems no reason to believe that we can't get along fine without @@ -3092,22 +3092,22 @@ Branch: REL9_1_STABLE [de887cc8a] 2016-05-25 19:39:49 -0400 <listitem> <para> Reduce the number of SysV semaphores used by a build configured with - <option>--disable-spinlocks</> (Tom Lane) + <option>--disable-spinlocks</option> (Tom Lane) </para> </listitem> <listitem> <para> - Rename internal function <function>strtoi()</> - to <function>strtoint()</> to avoid conflict with a NetBSD library + Rename internal function <function>strtoi()</function> + to <function>strtoint()</function> to avoid conflict with a NetBSD library function (Thomas Munro) </para> </listitem> <listitem> <para> - Fix reporting of errors from <function>bind()</> - and <function>listen()</> system calls on Windows (Tom Lane) + Fix reporting of errors from <function>bind()</function> + and <function>listen()</function> system calls on Windows (Tom Lane) </para> </listitem> @@ -3120,19 +3120,19 @@ Branch: REL9_1_STABLE [de887cc8a] 2016-05-25 19:39:49 -0400 <listitem> <para> - Fix <function>putenv()</> to work properly with Visual Studio 2013 + Fix <function>putenv()</function> to work properly with Visual Studio 2013 (Michael Paquier) </para> </listitem> <listitem> <para> - Avoid possibly-unsafe use of Windows' <function>FormatMessage()</> + Avoid possibly-unsafe use of Windows' <function>FormatMessage()</function> function (Christian Ullrich) </para> <para> - Use the <literal>FORMAT_MESSAGE_IGNORE_INSERTS</> flag where + Use the <literal>FORMAT_MESSAGE_IGNORE_INSERTS</literal> flag where appropriate. No live bug is known to exist here, but it seems like a good idea to be careful. </para> @@ -3140,9 +3140,9 @@ Branch: REL9_1_STABLE [de887cc8a] 2016-05-25 19:39:49 -0400 <listitem> <para> - Update time zone data files to <application>tzdata</> release 2016d + Update time zone data files to <application>tzdata</application> release 2016d for DST law changes in Russia and Venezuela. There are new zone - names <literal>Europe/Kirov</> and <literal>Asia/Tomsk</> to reflect + names <literal>Europe/Kirov</literal> and <literal>Asia/Tomsk</literal> to reflect the fact that these regions now have different time zone histories from adjacent regions. </para> @@ -3188,29 +3188,29 @@ Branch: REL9_1_STABLE [de887cc8a] 2016-05-25 19:39:49 -0400 <listitem> <para> Fix incorrect handling of NULL index entries in - indexed <literal>ROW()</> comparisons (Tom Lane) + indexed <literal>ROW()</literal> comparisons (Tom Lane) </para> <para> An index search using a row comparison such as <literal>ROW(a, b) > - ROW('x', 'y')</> would stop upon reaching a NULL entry in - the <structfield>b</> column, ignoring the fact that there might be - non-NULL <structfield>b</> values associated with later values - of <structfield>a</>. + ROW('x', 'y')</literal> would stop upon reaching a NULL entry in + the <structfield>b</structfield> column, ignoring the fact that there might be + non-NULL <structfield>b</structfield> values associated with later values + of <structfield>a</structfield>. </para> </listitem> <listitem> <para> Avoid unlikely data-loss scenarios due to renaming files without - adequate <function>fsync()</> calls before and after (Michael Paquier, + adequate <function>fsync()</function> calls before and after (Michael Paquier, Tomas Vondra, Andres Freund) </para> </listitem> <listitem> <para> - Fix bug in <function>json_to_record()</> when a field of its input + Fix bug in <function>json_to_record()</function> when a field of its input object contains a sub-object with a field name matching one of the requested output column names (Tom Lane) </para> @@ -3219,7 +3219,7 @@ Branch: REL9_1_STABLE [de887cc8a] 2016-05-25 19:39:49 -0400 <listitem> <para> Fix misformatting of negative time zone offsets - by <function>to_char()</>'s <literal>OF</> format code + by <function>to_char()</function>'s <literal>OF</literal> format code (Thomas Munro, Tom Lane) </para> </listitem> @@ -3232,7 +3232,7 @@ Branch: REL9_1_STABLE [de887cc8a] 2016-05-25 19:39:49 -0400 <para> Previously, standby servers would delay application of WAL records in - response to <varname>recovery_min_apply_delay</> even while replaying + response to <varname>recovery_min_apply_delay</varname> even while replaying the initial portion of WAL needed to make their database state valid. Since the standby is useless until it's reached a consistent database state, this was deemed unhelpful. @@ -3241,7 +3241,7 @@ Branch: REL9_1_STABLE [de887cc8a] 2016-05-25 19:39:49 -0400 <listitem> <para> - Correctly handle cases where <literal>pg_subtrans</> is close to XID + Correctly handle cases where <literal>pg_subtrans</literal> is close to XID wraparound during server startup (Jeff Janes) </para> </listitem> @@ -3253,44 +3253,44 @@ Branch: REL9_1_STABLE [de887cc8a] 2016-05-25 19:39:49 -0400 <para> Trouble cases included tuples larger than one page when replica - identity is <literal>FULL</>, <command>UPDATE</>s that change a + identity is <literal>FULL</literal>, <command>UPDATE</command>s that change a primary key within a transaction large enough to be spooled to disk, incorrect reports of <quote>subxact logged without previous toplevel - record</>, and incorrect reporting of a transaction's commit time. + record</quote>, and incorrect reporting of a transaction's commit time. </para> </listitem> <listitem> <para> Fix planner error with nested security barrier views when the outer - view has a <literal>WHERE</> clause containing a correlated subquery + view has a <literal>WHERE</literal> clause containing a correlated subquery (Dean Rasheed) </para> </listitem> <listitem> <para> - Fix corner-case crash due to trying to free <function>localeconv()</> + Fix corner-case crash due to trying to free <function>localeconv()</function> output strings more than once (Tom Lane) </para> </listitem> <listitem> <para> - Fix parsing of affix files for <literal>ispell</> dictionaries + Fix parsing of affix files for <literal>ispell</literal> dictionaries (Tom Lane) </para> <para> The code could go wrong if the affix file contained any characters whose byte length changes during case-folding, for - example <literal>I</> in Turkish UTF8 locales. + example <literal>I</literal> in Turkish UTF8 locales. </para> </listitem> <listitem> <para> - Avoid use of <function>sscanf()</> to parse <literal>ispell</> + Avoid use of <function>sscanf()</function> to parse <literal>ispell</literal> dictionary files (Artur Zakirov) </para> @@ -3316,27 +3316,27 @@ Branch: REL9_1_STABLE [de887cc8a] 2016-05-25 19:39:49 -0400 <listitem> <para> - Fix <application>psql</>'s tab completion logic to handle multibyte + Fix <application>psql</application>'s tab completion logic to handle multibyte characters properly (Kyotaro Horiguchi, Robert Haas) </para> </listitem> <listitem> <para> - Fix <application>psql</>'s tab completion for - <literal>SECURITY LABEL</> (Tom Lane) + Fix <application>psql</application>'s tab completion for + <literal>SECURITY LABEL</literal> (Tom Lane) </para> <para> - Pressing TAB after <literal>SECURITY LABEL</> might cause a crash + Pressing TAB after <literal>SECURITY LABEL</literal> might cause a crash or offering of inappropriate keywords. </para> </listitem> <listitem> <para> - Make <application>pg_ctl</> accept a wait timeout from the - <envar>PGCTLTIMEOUT</> environment variable, if none is specified on + Make <application>pg_ctl</application> accept a wait timeout from the + <envar>PGCTLTIMEOUT</envar> environment variable, if none is specified on the command line (Noah Misch) </para> @@ -3350,26 +3350,26 @@ Branch: REL9_1_STABLE [de887cc8a] 2016-05-25 19:39:49 -0400 <listitem> <para> Fix incorrect test for Windows service status - in <application>pg_ctl</> (Manuel Mathar) + in <application>pg_ctl</application> (Manuel Mathar) </para> <para> The previous set of minor releases attempted to - fix <application>pg_ctl</> to properly determine whether to send log + fix <application>pg_ctl</application> to properly determine whether to send log messages to Window's Event Log, but got the test backwards. </para> </listitem> <listitem> <para> - Fix <application>pgbench</> to correctly handle the combination - of <literal>-C</> and <literal>-M prepared</> options (Tom Lane) + Fix <application>pgbench</application> to correctly handle the combination + of <literal>-C</literal> and <literal>-M prepared</literal> options (Tom Lane) </para> </listitem> <listitem> <para> - In <application>pg_upgrade</>, skip creating a deletion script when + In <application>pg_upgrade</application>, skip creating a deletion script when the new data directory is inside the old data directory (Bruce Momjian) </para> @@ -3397,21 +3397,21 @@ Branch: REL9_1_STABLE [de887cc8a] 2016-05-25 19:39:49 -0400 <listitem> <para> Fix multiple mistakes in the statistics returned - by <filename>contrib/pgstattuple</>'s <function>pgstatindex()</> + by <filename>contrib/pgstattuple</filename>'s <function>pgstatindex()</function> function (Tom Lane) </para> </listitem> <listitem> <para> - Remove dependency on <literal>psed</> in MSVC builds, since it's no + Remove dependency on <literal>psed</literal> in MSVC builds, since it's no longer provided by core Perl (Michael Paquier, Andrew Dunstan) </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2016c + Update time zone data files to <application>tzdata</application> release 2016c for DST law changes in Azerbaijan, Chile, Haiti, Palestine, and Russia (Altai, Astrakhan, Kirov, Sakhalin, Ulyanovsk regions), plus historical corrections for Lithuania, Moldova, and Russia @@ -3447,7 +3447,7 @@ Branch: REL9_1_STABLE [de887cc8a] 2016-05-25 19:39:49 -0400 <para> However, if you are upgrading an installation that contains any GIN - indexes that use the (non-default) <literal>jsonb_path_ops</> operator + indexes that use the (non-default) <literal>jsonb_path_ops</literal> operator class, see the first changelog entry below. </para> @@ -3471,19 +3471,19 @@ Branch: REL9_4_STABLE [788e35ac0] 2015-11-05 18:15:48 -0500 <listitem> <para> - Fix inconsistent hash calculations in <literal>jsonb_path_ops</> GIN + Fix inconsistent hash calculations in <literal>jsonb_path_ops</literal> GIN indexes (Tom Lane) </para> <para> - When processing <type>jsonb</> values that contain both scalars and + When processing <type>jsonb</type> values that contain both scalars and sub-objects at the same nesting level, for example an array containing both scalars and sub-arrays, key hash values could be calculated differently than they would be for the same key in a different context. This could result in queries not finding entries that they should find. Fixing this means that existing indexes may now be inconsistent with the new hash calculation code. Users - should <command>REINDEX</> <literal>jsonb_path_ops</> GIN indexes after + should <command>REINDEX</command> <literal>jsonb_path_ops</literal> GIN indexes after installing this update to make sure that all searches work as expected. </para> </listitem> @@ -3513,18 +3513,18 @@ Branch: REL9_1_STABLE [dea6da132] 2015-10-06 17:15:27 -0400 <listitem> <para> - Perform an immediate shutdown if the <filename>postmaster.pid</> file + Perform an immediate shutdown if the <filename>postmaster.pid</filename> file is removed (Tom Lane) </para> <para> The postmaster now checks every minute or so - that <filename>postmaster.pid</> is still there and still contains its + that <filename>postmaster.pid</filename> is still there and still contains its own PID. If not, it performs an immediate shutdown, as though it had - received <systemitem>SIGQUIT</>. The main motivation for this change + received <systemitem>SIGQUIT</systemitem>. The main motivation for this change is to ensure that failed buildfarm runs will get cleaned up without manual intervention; but it also serves to limit the bad effects if a - DBA forcibly removes <filename>postmaster.pid</> and then starts a new + DBA forcibly removes <filename>postmaster.pid</filename> and then starts a new postmaster. </para> </listitem> @@ -3541,7 +3541,7 @@ Branch: REL9_1_STABLE [08322daed] 2015-10-31 14:36:58 -0500 <listitem> <para> - In <literal>SERIALIZABLE</> transaction isolation mode, serialization + In <literal>SERIALIZABLE</literal> transaction isolation mode, serialization anomalies could be missed due to race conditions during insertions (Kevin Grittner, Thomas Munro) </para> @@ -3560,7 +3560,7 @@ Branch: REL9_1_STABLE [5f9a86b35] 2015-12-12 14:19:29 +0100 <listitem> <para> Fix failure to emit appropriate WAL records when doing <literal>ALTER - TABLE ... SET TABLESPACE</> for unlogged relations (Michael Paquier, + TABLE ... SET TABLESPACE</literal> for unlogged relations (Michael Paquier, Andres Freund) </para> @@ -3614,7 +3614,7 @@ Branch: REL9_1_STABLE [60ba32cb5] 2015-11-20 14:55:29 -0500 <listitem> <para> - Fix <command>ALTER COLUMN TYPE</> to reconstruct inherited check + Fix <command>ALTER COLUMN TYPE</command> to reconstruct inherited check constraints properly (Tom Lane) </para> </listitem> @@ -3629,7 +3629,7 @@ Branch: REL9_1_STABLE [7e29e7f55] 2015-12-21 19:49:15 -0300 <listitem> <para> - Fix <command>REASSIGN OWNED</> to change ownership of composite types + Fix <command>REASSIGN OWNED</command> to change ownership of composite types properly (Álvaro Herrera) </para> </listitem> @@ -3644,7 +3644,7 @@ Branch: REL9_1_STABLE [ab14c1383] 2015-12-21 19:16:15 -0300 <listitem> <para> - Fix <command>REASSIGN OWNED</> and <command>ALTER OWNER</> to correctly + Fix <command>REASSIGN OWNED</command> and <command>ALTER OWNER</command> to correctly update granted-permissions lists when changing owners of data types, foreign data wrappers, or foreign servers (Bruce Momjian, Álvaro Herrera) @@ -3663,7 +3663,7 @@ Branch: REL9_1_STABLE [f44c5203b] 2015-12-11 18:39:09 -0300 <listitem> <para> - Fix <command>REASSIGN OWNED</> to ignore foreign user mappings, + Fix <command>REASSIGN OWNED</command> to ignore foreign user mappings, rather than fail (Álvaro Herrera) </para> </listitem> @@ -3697,13 +3697,13 @@ Branch: REL9_3_STABLE [0a34ff7e9] 2015-12-07 17:41:45 -0500 <listitem> <para> - Fix planner's handling of <literal>LATERAL</> references (Tom + Fix planner's handling of <literal>LATERAL</literal> references (Tom Lane) </para> <para> This fixes some corner cases that led to <quote>failed to build any - N-way joins</> or <quote>could not devise a query plan</> planner + N-way joins</quote> or <quote>could not devise a query plan</quote> planner failures. </para> </listitem> @@ -3753,9 +3753,9 @@ Branch: REL9_3_STABLE [faf18a905] 2015-11-16 13:45:17 -0500 <listitem> <para> - Speed up generation of unique table aliases in <command>EXPLAIN</> and + Speed up generation of unique table aliases in <command>EXPLAIN</command> and rule dumping, and ensure that generated aliases do not - exceed <literal>NAMEDATALEN</> (Tom Lane) + exceed <literal>NAMEDATALEN</literal> (Tom Lane) </para> </listitem> @@ -3771,8 +3771,8 @@ Branch: REL9_1_STABLE [7b21d1bca] 2015-11-15 14:41:09 -0500 <listitem> <para> - Fix dumping of whole-row Vars in <literal>ROW()</> - and <literal>VALUES()</> lists (Tom Lane) + Fix dumping of whole-row Vars in <literal>ROW()</literal> + and <literal>VALUES()</literal> lists (Tom Lane) </para> </listitem> @@ -3785,8 +3785,8 @@ Branch: REL9_4_STABLE [4f33572ee] 2015-10-20 11:06:24 -0700 <listitem> <para> - Translation of minus-infinity dates and timestamps to <type>json</> - or <type>jsonb</> incorrectly rendered them as plus-infinity (Tom Lane) + Translation of minus-infinity dates and timestamps to <type>json</type> + or <type>jsonb</type> incorrectly rendered them as plus-infinity (Tom Lane) </para> </listitem> @@ -3802,7 +3802,7 @@ Branch: REL9_1_STABLE [728a2ac21] 2015-11-17 15:47:12 -0500 <listitem> <para> - Fix possible internal overflow in <type>numeric</> division + Fix possible internal overflow in <type>numeric</type> division (Dean Rasheed) </para> </listitem> @@ -3894,7 +3894,7 @@ Branch: REL9_1_STABLE [b94c2b6a6] 2015-10-16 15:36:17 -0400 <para> This causes the code to emit <quote>regular expression is too - complex</> errors in some cases that previously used unreasonable + complex</quote> errors in some cases that previously used unreasonable amounts of time and memory. </para> </listitem> @@ -3929,14 +3929,14 @@ Branch: REL9_1_STABLE [b00c79b5b] 2015-10-16 14:43:18 -0400 <listitem> <para> - Make <literal>%h</> and <literal>%r</> escapes - in <varname>log_line_prefix</> work for messages emitted due - to <varname>log_connections</> (Tom Lane) + Make <literal>%h</literal> and <literal>%r</literal> escapes + in <varname>log_line_prefix</varname> work for messages emitted due + to <varname>log_connections</varname> (Tom Lane) </para> <para> - Previously, <literal>%h</>/<literal>%r</> started to work just after a - new session had emitted the <quote>connection received</> log message; + Previously, <literal>%h</literal>/<literal>%r</literal> started to work just after a + new session had emitted the <quote>connection received</quote> log message; now they work for that message too. </para> </listitem> @@ -3959,7 +3959,7 @@ Branch: REL9_1_STABLE [b0d858359] 2015-10-13 11:21:33 -0400 <para> This oversight resulted in failure to recover from crashes - whenever <varname>logging_collector</> is turned on. + whenever <varname>logging_collector</varname> is turned on. </para> </listitem> @@ -4009,13 +4009,13 @@ Branch: REL9_1_STABLE [db462a44e] 2015-12-17 16:55:51 -0500 <listitem> <para> - In <application>psql</>, ensure that <application>libreadline</>'s idea + In <application>psql</application>, ensure that <application>libreadline</application>'s idea of the screen size is updated when the terminal window size changes (Merlin Moncure) </para> <para> - Previously, <application>libreadline</> did not notice if the window + Previously, <application>libreadline</application> did not notice if the window was resized during query output, leading to strange behavior during later input of multiline queries. </para> @@ -4023,8 +4023,8 @@ Branch: REL9_1_STABLE [db462a44e] 2015-12-17 16:55:51 -0500 <listitem> <para> - Fix <application>psql</>'s <literal>\det</> command to interpret its - pattern argument the same way as other <literal>\d</> commands with + Fix <application>psql</application>'s <literal>\det</literal> command to interpret its + pattern argument the same way as other <literal>\d</literal> commands with potentially schema-qualified patterns do (Reece Hart) </para> </listitem> @@ -4041,7 +4041,7 @@ Branch: REL9_1_STABLE [6430a11fa] 2015-11-25 17:31:54 -0500 <listitem> <para> - Avoid possible crash in <application>psql</>'s <literal>\c</> command + Avoid possible crash in <application>psql</application>'s <literal>\c</literal> command when previous connection was via Unix socket and command specifies a new hostname and same username (Tom Lane) </para> @@ -4059,21 +4059,21 @@ Branch: REL9_1_STABLE [c869a7d5b] 2015-10-12 18:30:37 -0400 <listitem> <para> - In <literal>pg_ctl start -w</>, test child process status directly + In <literal>pg_ctl start -w</literal>, test child process status directly rather than relying on heuristics (Tom Lane, Michael Paquier) </para> <para> - Previously, <application>pg_ctl</> relied on an assumption that the new - postmaster would always create <filename>postmaster.pid</> within five + Previously, <application>pg_ctl</application> relied on an assumption that the new + postmaster would always create <filename>postmaster.pid</filename> within five seconds. But that can fail on heavily-loaded systems, - causing <application>pg_ctl</> to report incorrectly that the + causing <application>pg_ctl</application> to report incorrectly that the postmaster failed to start. </para> <para> Except on Windows, this change also means that a <literal>pg_ctl start - -w</> done immediately after another such command will now reliably + -w</literal> done immediately after another such command will now reliably fail, whereas previously it would report success if done within two seconds of the first command. </para> @@ -4091,23 +4091,23 @@ Branch: REL9_1_STABLE [87deb55a4] 2015-11-08 17:31:24 -0500 <listitem> <para> - In <literal>pg_ctl start -w</>, don't attempt to use a wildcard listen + In <literal>pg_ctl start -w</literal>, don't attempt to use a wildcard listen address to connect to the postmaster (Kondo Yuta) </para> <para> - On Windows, <application>pg_ctl</> would fail to detect postmaster - startup if <varname>listen_addresses</> is set to <literal>0.0.0.0</> - or <literal>::</>, because it would try to use that value verbatim as + On Windows, <application>pg_ctl</application> would fail to detect postmaster + startup if <varname>listen_addresses</varname> is set to <literal>0.0.0.0</literal> + or <literal>::</literal>, because it would try to use that value verbatim as the address to connect to, which doesn't work. Instead assume - that <literal>127.0.0.1</> or <literal>::1</>, respectively, is the + that <literal>127.0.0.1</literal> or <literal>::1</literal>, respectively, is the right thing to use. </para> </listitem> <listitem> <para> - In <application>pg_ctl</> on Windows, check service status to decide + In <application>pg_ctl</application> on Windows, check service status to decide where to send output, rather than checking if standard output is a terminal (Michael Paquier) </para> @@ -4127,18 +4127,18 @@ Branch: REL9_1_STABLE [6df62ef43] 2015-11-23 00:32:01 -0500 <listitem> <para> - In <application>pg_dump</> and <application>pg_basebackup</>, adopt + In <application>pg_dump</application> and <application>pg_basebackup</application>, adopt the GNU convention for handling tar-archive members exceeding 8GB (Tom Lane) </para> <para> - The POSIX standard for <literal>tar</> file format does not allow + The POSIX standard for <literal>tar</literal> file format does not allow archive member files to exceed 8GB, but most modern implementations - of <application>tar</> support an extension that fixes that. Adopt - this extension so that <application>pg_dump</> with <option>-Ft</> no + of <application>tar</application> support an extension that fixes that. Adopt + this extension so that <application>pg_dump</application> with <option>-Ft</option> no longer fails on tables with more than 8GB of data, and so - that <application>pg_basebackup</> can handle files larger than 8GB. + that <application>pg_basebackup</application> can handle files larger than 8GB. In addition, fix some portability issues that could cause failures for members between 4GB and 8GB on some platforms. Potentially these problems could cause unrecoverable data loss due to unreadable backup @@ -4148,16 +4148,16 @@ Branch: REL9_1_STABLE [6df62ef43] 2015-11-23 00:32:01 -0500 <listitem> <para> - Fix assorted corner-case bugs in <application>pg_dump</>'s processing + Fix assorted corner-case bugs in <application>pg_dump</application>'s processing of extension member objects (Tom Lane) </para> </listitem> <listitem> <para> - Make <application>pg_dump</> mark a view's triggers as needing to be + Make <application>pg_dump</application> mark a view's triggers as needing to be processed after its rule, to prevent possible failure during - parallel <application>pg_restore</> (Tom Lane) + parallel <application>pg_restore</application> (Tom Lane) </para> </listitem> @@ -4180,14 +4180,14 @@ Branch: REL9_1_STABLE [e4959fb5c] 2016-01-02 19:04:45 -0500 <listitem> <para> Ensure that relation option values are properly quoted - in <application>pg_dump</> (Kouhei Sutou, Tom Lane) + in <application>pg_dump</application> (Kouhei Sutou, Tom Lane) </para> <para> A reloption value that isn't a simple identifier or number could lead to dump/reload failures due to syntax errors in CREATE statements - issued by <application>pg_dump</>. This is not an issue with any - reloption currently supported by core <productname>PostgreSQL</>, but + issued by <application>pg_dump</application>. This is not an issue with any + reloption currently supported by core <productname>PostgreSQL</productname>, but extensions could allow reloptions that cause the problem. </para> </listitem> @@ -4202,7 +4202,7 @@ Branch: REL9_3_STABLE [534a4159c] 2015-12-23 14:25:31 -0500 <listitem> <para> - Avoid repeated password prompts during parallel <application>pg_dump</> + Avoid repeated password prompts during parallel <application>pg_dump</application> (Zeus Kronion) </para> </listitem> @@ -4225,14 +4225,14 @@ Branch: REL9_1_STABLE [c36064e43] 2015-11-24 17:18:27 -0500 <listitem> <para> - Fix <application>pg_upgrade</>'s file-copying code to handle errors + Fix <application>pg_upgrade</application>'s file-copying code to handle errors properly on Windows (Bruce Momjian) </para> </listitem> <listitem> <para> - Install guards in <application>pgbench</> against corner-case overflow + Install guards in <application>pgbench</application> against corner-case overflow conditions during evaluation of script-specified division or modulo operators (Fabien Coelho, Michael Paquier) </para> @@ -4250,22 +4250,22 @@ Branch: REL9_2_STABLE [4fb9e6109] 2015-12-28 10:50:35 -0300 <listitem> <para> Fix failure to localize messages emitted - by <application>pg_receivexlog</> and <application>pg_recvlogical</> + by <application>pg_receivexlog</application> and <application>pg_recvlogical</application> (Ioseph Kim) </para> </listitem> <listitem> <para> - Avoid dump/reload problems when using both <application>plpython2</> - and <application>plpython3</> (Tom Lane) + Avoid dump/reload problems when using both <application>plpython2</application> + and <application>plpython3</application> (Tom Lane) </para> <para> - In principle, both versions of <application>PL/Python</> can be used in + In principle, both versions of <application>PL/Python</application> can be used in the same database, though not in the same session (because the two - versions of <application>libpython</> cannot safely be used concurrently). - However, <application>pg_restore</> and <application>pg_upgrade</> both + versions of <application>libpython</application> cannot safely be used concurrently). + However, <application>pg_restore</application> and <application>pg_upgrade</application> both do things that can fall foul of the same-session restriction. Work around that by changing the timing of the check. </para> @@ -4273,7 +4273,7 @@ Branch: REL9_2_STABLE [4fb9e6109] 2015-12-28 10:50:35 -0300 <listitem> <para> - Fix <application>PL/Python</> regression tests to pass with Python 3.5 + Fix <application>PL/Python</application> regression tests to pass with Python 3.5 (Peter Eisentraut) </para> </listitem> @@ -4288,29 +4288,29 @@ Branch: REL9_3_STABLE [db6e8e162] 2015-11-12 13:03:53 -0500 <listitem> <para> - Fix premature clearing of <application>libpq</>'s input buffer when + Fix premature clearing of <application>libpq</application>'s input buffer when socket EOF is seen (Tom Lane) </para> <para> - This mistake caused <application>libpq</> to sometimes not report the + This mistake caused <application>libpq</application> to sometimes not report the backend's final error message before reporting <quote>server closed the - connection unexpectedly</>. + connection unexpectedly</quote>. </para> </listitem> <listitem> <para> - Prevent certain <application>PL/Java</> parameters from being set by + Prevent certain <application>PL/Java</application> parameters from being set by non-superusers (Noah Misch) </para> <para> - This change mitigates a <application>PL/Java</> security bug - (CVE-2016-0766), which was fixed in <application>PL/Java</> by marking + This change mitigates a <application>PL/Java</application> security bug + (CVE-2016-0766), which was fixed in <application>PL/Java</application> by marking these parameters as superuser-only. To fix the security hazard for - sites that update <productname>PostgreSQL</> more frequently - than <application>PL/Java</>, make the core code aware of them also. + sites that update <productname>PostgreSQL</productname> more frequently + than <application>PL/Java</application>, make the core code aware of them also. </para> </listitem> @@ -4326,7 +4326,7 @@ Branch: REL9_1_STABLE [4b58ded74] 2015-12-14 18:48:49 +0200 <listitem> <para> - Improve <application>libpq</>'s handling of out-of-memory situations + Improve <application>libpq</application>'s handling of out-of-memory situations (Michael Paquier, Amit Kapila, Heikki Linnakangas) </para> </listitem> @@ -4343,7 +4343,7 @@ Branch: REL9_1_STABLE [a9bcd8370] 2015-10-18 10:17:12 +0200 <listitem> <para> Fix order of arguments - in <application>ecpg</>-generated <literal>typedef</> statements + in <application>ecpg</application>-generated <literal>typedef</literal> statements (Michael Meskes) </para> </listitem> @@ -4360,29 +4360,29 @@ Branch: REL9_1_STABLE [84387496f] 2015-12-01 11:42:52 -0500 <listitem> <para> - Use <literal>%g</> not <literal>%f</> format - in <application>ecpg</>'s <function>PGTYPESnumeric_from_double()</> + Use <literal>%g</literal> not <literal>%f</literal> format + in <application>ecpg</application>'s <function>PGTYPESnumeric_from_double()</function> (Tom Lane) </para> </listitem> <listitem> <para> - Fix <application>ecpg</>-supplied header files to not contain comments + Fix <application>ecpg</application>-supplied header files to not contain comments continued from a preprocessor directive line onto the next line (Michael Meskes) </para> <para> - Such a comment is rejected by <application>ecpg</>. It's not yet clear - whether <application>ecpg</> itself should be changed. + Such a comment is rejected by <application>ecpg</application>. It's not yet clear + whether <application>ecpg</application> itself should be changed. </para> </listitem> <listitem> <para> - Fix <function>hstore_to_json_loose()</>'s test for whether - an <type>hstore</> value can be converted to a JSON number (Tom Lane) + Fix <function>hstore_to_json_loose()</function>'s test for whether + an <type>hstore</type> value can be converted to a JSON number (Tom Lane) </para> <para> @@ -4403,15 +4403,15 @@ Branch: REL9_1_STABLE [1b6102eb7] 2015-12-27 13:03:19 -0300 <listitem> <para> - Ensure that <filename>contrib/pgcrypto</>'s <function>crypt()</> + Ensure that <filename>contrib/pgcrypto</filename>'s <function>crypt()</function> function can be interrupted by query cancel (Andreas Karlsson) </para> </listitem> <listitem> <para> - In <filename>contrib/postgres_fdw</>, fix bugs triggered by use - of <literal>tableoid</> in data-modifying commands (Etsuro Fujita, + In <filename>contrib/postgres_fdw</filename>, fix bugs triggered by use + of <literal>tableoid</literal> in data-modifying commands (Etsuro Fujita, Robert Haas) </para> </listitem> @@ -4433,7 +4433,7 @@ Branch: REL9_2_STABLE [7f94a5c10] 2015-12-10 10:19:31 -0500 <listitem> <para> - Accept <application>flex</> versions later than 2.5.x + Accept <application>flex</application> versions later than 2.5.x (Tom Lane, Michael Paquier) </para> @@ -4467,19 +4467,19 @@ Branch: REL9_1_STABLE [2a37a103b] 2015-12-11 16:14:48 -0500 <listitem> <para> - Install our <filename>missing</> script where PGXS builds can find it + Install our <filename>missing</filename> script where PGXS builds can find it (Jim Nasby) </para> <para> This allows sane behavior in a PGXS build done on a machine where build - tools such as <application>bison</> are missing. + tools such as <application>bison</application> are missing. </para> </listitem> <listitem> <para> - Ensure that <filename>dynloader.h</> is included in the installed + Ensure that <filename>dynloader.h</filename> is included in the installed header files in MSVC builds (Bruce Momjian, Michael Paquier) </para> </listitem> @@ -4497,11 +4497,11 @@ Branch: REL9_1_STABLE [386dcd539] 2015-12-11 19:08:40 -0500 <listitem> <para> Add variant regression test expected-output file to match behavior of - current <application>libxml2</> (Tom Lane) + current <application>libxml2</application> (Tom Lane) </para> <para> - The fix for <application>libxml2</>'s CVE-2015-7499 causes it not to + The fix for <application>libxml2</application>'s CVE-2015-7499 causes it not to output error context reports in some cases where it used to do so. This seems to be a bug, but we'll probably have to live with it for some time, so work around it. @@ -4510,7 +4510,7 @@ Branch: REL9_1_STABLE [386dcd539] 2015-12-11 19:08:40 -0500 <listitem> <para> - Update time zone data files to <application>tzdata</> release 2016a for + Update time zone data files to <application>tzdata</application> release 2016a for DST law changes in Cayman Islands, Metlakatla, and Trans-Baikal Territory (Zabaykalsky Krai), plus historical corrections for Pakistan. </para> @@ -4563,13 +4563,13 @@ Branch: REL9_3_STABLE [f8862172e] 2015-10-05 10:06:34 -0400 <listitem> <para> - Guard against stack overflows in <type>json</> parsing + Guard against stack overflows in <type>json</type> parsing (Oskari Saarenmaa) </para> <para> - If an application constructs PostgreSQL <type>json</> - or <type>jsonb</> values from arbitrary user input, the application's + If an application constructs PostgreSQL <type>json</type> + or <type>jsonb</type> values from arbitrary user input, the application's users can reliably crash the PostgreSQL server, causing momentary denial of service. (CVE-2015-5289) </para> @@ -4588,8 +4588,8 @@ Branch: REL9_0_STABLE [188e081ef] 2015-10-05 10:06:36 -0400 <listitem> <para> - Fix <filename>contrib/pgcrypto</> to detect and report - too-short <function>crypt()</> salts (Josh Kupershmidt) + Fix <filename>contrib/pgcrypto</filename> to detect and report + too-short <function>crypt()</function> salts (Josh Kupershmidt) </para> <para> @@ -4634,7 +4634,7 @@ Branch: REL9_4_STABLE [bab959906] 2015-08-02 20:09:05 +0300 <listitem> <para> Fix possible deadlock during WAL insertion - when <varname>commit_delay</> is set (Heikki Linnakangas) + when <varname>commit_delay</varname> is set (Heikki Linnakangas) </para> </listitem> @@ -4665,13 +4665,13 @@ Branch: REL9_0_STABLE [45c69178b] 2015-06-25 14:39:06 -0400 <listitem> <para> - Fix insertion of relations into the relation cache <quote>init file</> + Fix insertion of relations into the relation cache <quote>init file</quote> (Tom Lane) </para> <para> An oversight in a patch in the most recent minor releases - caused <structname>pg_trigger_tgrelid_tgname_index</> to be omitted + caused <structname>pg_trigger_tgrelid_tgname_index</structname> to be omitted from the init file. Subsequent sessions detected this, then deemed the init file to be broken and silently ignored it, resulting in a significant degradation in session startup time. In addition to fixing @@ -4711,7 +4711,7 @@ Branch: REL9_0_STABLE [2d4336cf8] 2015-09-30 23:32:23 -0400 <listitem> <para> - Improve <command>LISTEN</> startup time when there are many unread + Improve <command>LISTEN</command> startup time when there are many unread notifications (Matt Newell) </para> </listitem> @@ -4731,7 +4731,7 @@ Branch: REL9_3_STABLE [1bcc9e60a] 2015-09-25 13:16:31 -0400 </para> <para> - This was seen primarily when restoring <application>pg_dump</> output + This was seen primarily when restoring <application>pg_dump</application> output for databases with many thousands of tables. </para> </listitem> @@ -4755,7 +4755,7 @@ Branch: REL9_0_STABLE [444b2ebee] 2015-07-28 22:06:32 +0200 too many bugs in practice, both in the underlying OpenSSL library and in our usage of it. Renegotiation will be removed entirely in 9.5 and later. In the older branches, just change the default value - of <varname>ssl_renegotiation_limit</> to zero (disabled). + of <varname>ssl_renegotiation_limit</varname> to zero (disabled). </para> </listitem> @@ -4779,7 +4779,7 @@ Branch: REL9_0_STABLE [eeb0b7830] 2015-10-05 11:57:25 +0200 <listitem> <para> - Lower the minimum values of the <literal>*_freeze_max_age</> parameters + Lower the minimum values of the <literal>*_freeze_max_age</literal> parameters (Andres Freund) </para> @@ -4802,7 +4802,7 @@ Branch: REL9_0_STABLE [b09446ed7] 2015-08-04 13:12:03 -0400 <listitem> <para> - Limit the maximum value of <varname>wal_buffers</> to 2GB to avoid + Limit the maximum value of <varname>wal_buffers</varname> to 2GB to avoid server crashes (Josh Berkus) </para> </listitem> @@ -4816,8 +4816,8 @@ Branch: REL9_3_STABLE [5a56c2545] 2015-06-28 18:38:06 -0400 <listitem> <para> Avoid logging complaints when a parameter that can only be set at - server start appears multiple times in <filename>postgresql.conf</>, - and fix counting of line numbers after an <literal>include_dir</> + server start appears multiple times in <filename>postgresql.conf</filename>, + and fix counting of line numbers after an <literal>include_dir</literal> directive (Tom Lane) </para> </listitem> @@ -4835,7 +4835,7 @@ Branch: REL9_0_STABLE [a89781e34] 2015-09-21 12:12:16 -0400 <listitem> <para> - Fix rare internal overflow in multiplication of <type>numeric</> values + Fix rare internal overflow in multiplication of <type>numeric</type> values (Dean Rasheed) </para> </listitem> @@ -4862,8 +4862,8 @@ Branch: REL9_2_STABLE [8dacb29ca] 2015-10-05 10:06:35 -0400 <listitem> <para> Guard against hard-to-reach stack overflows involving record types, - range types, <type>json</>, <type>jsonb</>, <type>tsquery</>, - <type>ltxtquery</> and <type>query_int</> (Noah Misch) + range types, <type>json</type>, <type>jsonb</type>, <type>tsquery</type>, + <type>ltxtquery</type> and <type>query_int</type> (Noah Misch) </para> </listitem> @@ -4887,14 +4887,14 @@ Branch: REL9_0_STABLE [92d956f51] 2015-09-07 20:47:06 +0100 <listitem> <para> - Fix handling of <literal>DOW</> and <literal>DOY</> in datetime input + Fix handling of <literal>DOW</literal> and <literal>DOY</literal> in datetime input (Greg Stark) </para> <para> These tokens aren't meant to be used in datetime values, but previously they resulted in opaque internal error messages rather - than <quote>invalid input syntax</>. + than <quote>invalid input syntax</quote>. </para> </listitem> @@ -4936,7 +4936,7 @@ Branch: REL9_0_STABLE [b875ca09f] 2015-10-02 15:00:52 -0400 <listitem> <para> Add recursion depth protections to regular expression, <literal>SIMILAR - TO</>, and <literal>LIKE</> matching (Tom Lane) + TO</literal>, and <literal>LIKE</literal> matching (Tom Lane) </para> <para> @@ -5052,8 +5052,8 @@ Branch: REL9_0_STABLE [bd327627f] 2015-08-04 18:18:47 -0400 <listitem> <para> - Fix <quote>unexpected out-of-memory situation during sort</> errors - when using tuplestores with small <varname>work_mem</> settings (Tom + Fix <quote>unexpected out-of-memory situation during sort</quote> errors + when using tuplestores with small <varname>work_mem</varname> settings (Tom Lane) </para> </listitem> @@ -5071,7 +5071,7 @@ Branch: REL9_0_STABLE [36522d627] 2015-07-16 22:57:46 -0400 <listitem> <para> - Fix very-low-probability stack overrun in <function>qsort</> (Tom Lane) + Fix very-low-probability stack overrun in <function>qsort</function> (Tom Lane) </para> </listitem> @@ -5093,8 +5093,8 @@ Branch: REL9_0_STABLE [d637a899c] 2015-10-04 15:55:07 -0400 <listitem> <para> - Fix <quote>invalid memory alloc request size</> failure in hash joins - with large <varname>work_mem</> settings (Tomas Vondra, Tom Lane) + Fix <quote>invalid memory alloc request size</quote> failure in hash joins + with large <varname>work_mem</varname> settings (Tomas Vondra, Tom Lane) </para> </listitem> @@ -5172,9 +5172,9 @@ Branch: REL9_0_STABLE [7b4b57fc4] 2015-08-12 21:19:10 -0400 These mistakes could lead to incorrect query plans that would give wrong answers, or to assertion failures in assert-enabled builds, or to odd planner errors such as <quote>could not devise a query plan for the - given query</>, <quote>could not find pathkey item to - sort</>, <quote>plan should not reference subplan's variable</>, - or <quote>failed to assign all NestLoopParams to plan nodes</>. + given query</quote>, <quote>could not find pathkey item to + sort</quote>, <quote>plan should not reference subplan's variable</quote>, + or <quote>failed to assign all NestLoopParams to plan nodes</quote>. Thanks are due to Andreas Seltenreich and Piotr Stefaniak for fuzz testing that exposed these problems. </para> @@ -5190,7 +5190,7 @@ Branch: REL9_2_STABLE [e538e510e] 2015-06-22 18:53:27 -0400 <listitem> <para> - Improve planner's performance for <command>UPDATE</>/<command>DELETE</> + Improve planner's performance for <command>UPDATE</command>/<command>DELETE</command> on large inheritance sets (Tom Lane, Dean Rasheed) </para> </listitem> @@ -5232,12 +5232,12 @@ Branch: REL9_0_STABLE [8b53c087d] 2015-08-02 14:54:44 -0400 <para> During postmaster shutdown, ensure that per-socket lock files are removed and listen sockets are closed before we remove - the <filename>postmaster.pid</> file (Tom Lane) + the <filename>postmaster.pid</filename> file (Tom Lane) </para> <para> This avoids race-condition failures if an external script attempts to - start a new postmaster as soon as <literal>pg_ctl stop</> returns. + start a new postmaster as soon as <literal>pg_ctl stop</literal> returns. </para> </listitem> @@ -5311,7 +5311,7 @@ Branch: REL9_0_STABLE [f527c0a2a] 2015-07-28 17:34:00 -0400 <listitem> <para> - Do not print a <literal>WARNING</> when an autovacuum worker is already + Do not print a <literal>WARNING</literal> when an autovacuum worker is already gone when we attempt to signal it, and reduce log verbosity for such signals (Tom Lane) </para> @@ -5389,7 +5389,7 @@ Branch: REL9_2_STABLE [f4297f8c5] 2015-07-27 12:32:48 +0300 </para> <para> - <command>VACUUM</> attempted to recycle such pages, but did so in a + <command>VACUUM</command> attempted to recycle such pages, but did so in a way that wasn't crash-safe. </para> </listitem> @@ -5408,7 +5408,7 @@ Branch: REL9_0_STABLE [40ad78220] 2015-07-23 01:30:19 +0300 <listitem> <para> Fix off-by-one error that led to otherwise-harmless warnings - about <quote>apparent wraparound</> in subtrans/multixact truncation + about <quote>apparent wraparound</quote> in subtrans/multixact truncation (Thomas Munro) </para> </listitem> @@ -5426,8 +5426,8 @@ Branch: REL9_0_STABLE [e41718fa1] 2015-08-18 19:22:38 -0400 <listitem> <para> - Fix misreporting of <command>CONTINUE</> and <command>MOVE</> statement - types in <application>PL/pgSQL</>'s error context messages + Fix misreporting of <command>CONTINUE</command> and <command>MOVE</command> statement + types in <application>PL/pgSQL</application>'s error context messages (Pavel Stehule, Tom Lane) </para> </listitem> @@ -5444,7 +5444,7 @@ Branch: REL9_1_STABLE [ca6c2f863] 2015-09-29 10:52:22 -0400 <listitem> <para> - Fix <application>PL/Perl</> to handle non-<acronym>ASCII</> error + Fix <application>PL/Perl</application> to handle non-<acronym>ASCII</acronym> error message texts correctly (Alex Hunsaker) </para> </listitem> @@ -5467,8 +5467,8 @@ Branch: REL9_1_STABLE [1d190d095] 2015-08-21 12:21:37 -0400 <listitem> <para> - Fix <application>PL/Python</> crash when returning the string - representation of a <type>record</> result (Tom Lane) + Fix <application>PL/Python</application> crash when returning the string + representation of a <type>record</type> result (Tom Lane) </para> </listitem> @@ -5485,8 +5485,8 @@ Branch: REL9_0_STABLE [4c11967e7] 2015-07-20 14:18:08 +0200 <listitem> <para> - Fix some places in <application>PL/Tcl</> that neglected to check for - failure of <function>malloc()</> calls (Michael Paquier, Álvaro + Fix some places in <application>PL/Tcl</application> that neglected to check for + failure of <function>malloc()</function> calls (Michael Paquier, Álvaro Herrera) </para> </listitem> @@ -5503,7 +5503,7 @@ Branch: REL9_1_STABLE [2d19a0e97] 2015-08-02 22:12:51 +0300 <listitem> <para> - In <filename>contrib/isn</>, fix output of ISBN-13 numbers that begin + In <filename>contrib/isn</filename>, fix output of ISBN-13 numbers that begin with 979 (Fabien Coelho) </para> @@ -5522,7 +5522,7 @@ Branch: REL9_4_STABLE [93840f96c] 2015-10-04 17:58:30 -0400 <listitem> <para> - Improve <filename>contrib/pg_stat_statements</>' handling of + Improve <filename>contrib/pg_stat_statements</filename>' handling of query-text garbage collection (Peter Geoghegan) </para> @@ -5543,13 +5543,13 @@ Branch: REL9_3_STABLE [b7dcb2dd4] 2015-09-24 12:47:30 -0400 <listitem> <para> - Improve <filename>contrib/postgres_fdw</>'s handling of + Improve <filename>contrib/postgres_fdw</filename>'s handling of collation-related decisions (Tom Lane) </para> <para> The main user-visible effect is expected to be that comparisons - involving <type>varchar</> columns will be sent to the remote server + involving <type>varchar</type> columns will be sent to the remote server for execution in more cases than before. </para> </listitem> @@ -5567,7 +5567,7 @@ Branch: REL9_0_STABLE [2b189c7ec] 2015-07-07 18:45:31 +0300 <listitem> <para> - Improve <application>libpq</>'s handling of out-of-memory conditions + Improve <application>libpq</application>'s handling of out-of-memory conditions (Michael Paquier, Heikki Linnakangas) </para> </listitem> @@ -5603,7 +5603,7 @@ Branch: REL9_0_STABLE [d278ff3b2] 2015-06-15 14:27:39 +0200 <listitem> <para> Fix memory leaks and missing out-of-memory checks - in <application>ecpg</> (Michael Paquier) + in <application>ecpg</application> (Michael Paquier) </para> </listitem> @@ -5634,15 +5634,15 @@ Branch: REL9_0_STABLE [98d8c75f9] 2015-09-25 12:20:46 -0400 <listitem> <para> - Fix <application>psql</>'s code for locale-aware formatting of numeric + Fix <application>psql</application>'s code for locale-aware formatting of numeric output (Tom Lane) </para> <para> - The formatting code invoked by <literal>\pset numericlocale on</> + The formatting code invoked by <literal>\pset numericlocale on</literal> did the wrong thing for some uncommon cases such as numbers with an exponent but no decimal point. It could also mangle already-localized - output from the <type>money</> data type. + output from the <type>money</type> data type. </para> </listitem> @@ -5659,7 +5659,7 @@ Branch: REL9_0_STABLE [6087bf1a1] 2015-07-08 20:44:27 -0400 <listitem> <para> - Prevent crash in <application>psql</>'s <command>\c</> command when + Prevent crash in <application>psql</application>'s <command>\c</command> command when there is no current connection (Noah Misch) </para> </listitem> @@ -5675,7 +5675,7 @@ Branch: REL9_2_STABLE [3756c65a0] 2015-10-01 16:19:49 -0400 <listitem> <para> - Make <application>pg_dump</> handle inherited <literal>NOT VALID</> + Make <application>pg_dump</application> handle inherited <literal>NOT VALID</literal> check constraints correctly (Tom Lane) </para> </listitem> @@ -5692,8 +5692,8 @@ Branch: REL9_1_STABLE [af225551e] 2015-07-25 17:16:39 -0400 <listitem> <para> - Fix selection of default <application>zlib</> compression level - in <application>pg_dump</>'s directory output format (Andrew Dunstan) + Fix selection of default <application>zlib</application> compression level + in <application>pg_dump</application>'s directory output format (Andrew Dunstan) </para> </listitem> @@ -5710,8 +5710,8 @@ Branch: REL9_0_STABLE [24aed2124] 2015-09-20 20:44:34 -0400 <listitem> <para> - Ensure that temporary files created during a <application>pg_dump</> - run with <acronym>tar</>-format output are not world-readable (Michael + Ensure that temporary files created during a <application>pg_dump</application> + run with <acronym>tar</acronym>-format output are not world-readable (Michael Paquier) </para> </listitem> @@ -5729,8 +5729,8 @@ Branch: REL9_0_STABLE [52b07779d] 2015-09-11 15:51:10 -0400 <listitem> <para> - Fix <application>pg_dump</> and <application>pg_upgrade</> to support - cases where the <literal>postgres</> or <literal>template1</> database + Fix <application>pg_dump</application> and <application>pg_upgrade</application> to support + cases where the <literal>postgres</literal> or <literal>template1</literal> database is in a non-default tablespace (Marti Raudsepp, Bruce Momjian) </para> </listitem> @@ -5748,7 +5748,7 @@ Branch: REL9_0_STABLE [298d1f808] 2015-08-10 20:10:16 -0400 <listitem> <para> - Fix <application>pg_dump</> to handle object privileges sanely when + Fix <application>pg_dump</application> to handle object privileges sanely when dumping from a server too old to have a particular privilege type (Tom Lane) </para> @@ -5756,11 +5756,11 @@ Branch: REL9_0_STABLE [298d1f808] 2015-08-10 20:10:16 -0400 <para> When dumping data types from pre-9.2 servers, and when dumping functions or procedural languages from pre-7.3 - servers, <application>pg_dump</> would - produce <command>GRANT</>/<command>REVOKE</> commands that revoked the + servers, <application>pg_dump</application> would + produce <command>GRANT</command>/<command>REVOKE</command> commands that revoked the owner's grantable privileges and instead granted all privileges - to <literal>PUBLIC</>. Since the privileges involved are - just <literal>USAGE</> and <literal>EXECUTE</>, this isn't a security + to <literal>PUBLIC</literal>. Since the privileges involved are + just <literal>USAGE</literal> and <literal>EXECUTE</literal>, this isn't a security problem, but it's certainly a surprising representation of the older systems' behavior. Fix it to leave the default privilege state alone in these cases. @@ -5780,12 +5780,12 @@ Branch: REL9_0_STABLE [5d175be17] 2015-08-04 19:34:12 -0400 <listitem> <para> - Fix <application>pg_dump</> to dump shell types (Tom Lane) + Fix <application>pg_dump</application> to dump shell types (Tom Lane) </para> <para> Shell types (that is, not-yet-fully-defined types) aren't useful for - much, but nonetheless <application>pg_dump</> should dump them. + much, but nonetheless <application>pg_dump</application> should dump them. </para> </listitem> @@ -5801,7 +5801,7 @@ Branch: REL9_1_STABLE [e9a859b54] 2015-07-12 16:25:52 -0400 <listitem> <para> - Fix assorted minor memory leaks in <application>pg_dump</> and other + Fix assorted minor memory leaks in <application>pg_dump</application> and other client-side programs (Michael Paquier) </para> </listitem> @@ -5815,8 +5815,8 @@ Branch: REL9_4_STABLE [9d6352aaa] 2015-07-03 11:15:27 +0300 <listitem> <para> - Fix <application>pgbench</>'s progress-report behavior when a query, - or <application>pgbench</> itself, gets stuck (Fabien Coelho) + Fix <application>pgbench</application>'s progress-report behavior when a query, + or <application>pgbench</application> itself, gets stuck (Fabien Coelho) </para> </listitem> @@ -5845,11 +5845,11 @@ Branch: REL9_0_STABLE [b5a22d8bb] 2015-08-29 16:09:25 -0400 <listitem> <para> Fix spinlock assembly code for PPC hardware to be compatible - with <acronym>AIX</>'s native assembler (Tom Lane) + with <acronym>AIX</acronym>'s native assembler (Tom Lane) </para> <para> - Building with <application>gcc</> didn't work if <application>gcc</> + Building with <application>gcc</application> didn't work if <application>gcc</application> had been configured to use the native assembler, which is becoming more common. </para> @@ -5868,7 +5868,7 @@ Branch: REL9_0_STABLE [cdf596b1c] 2015-07-17 03:02:46 -0400 <listitem> <para> - On <acronym>AIX</>, test the <literal>-qlonglong</> compiler option + On <acronym>AIX</acronym>, test the <literal>-qlonglong</literal> compiler option rather than just assuming it's safe to use (Noah Misch) </para> </listitem> @@ -5886,7 +5886,7 @@ Branch: REL9_0_STABLE [7803d5720] 2015-07-15 21:00:31 -0400 <listitem> <para> - On <acronym>AIX</>, use <literal>-Wl,-brtllib</> link option to allow + On <acronym>AIX</acronym>, use <literal>-Wl,-brtllib</literal> link option to allow symbols to be resolved at runtime (Noah Misch) </para> @@ -5909,7 +5909,7 @@ Branch: REL9_0_STABLE [2d8c136e7] 2015-07-29 22:54:08 -0400 <listitem> <para> Avoid use of inline functions when compiling with - 32-bit <application>xlc</>, due to compiler bugs (Noah Misch) + 32-bit <application>xlc</application>, due to compiler bugs (Noah Misch) </para> </listitem> @@ -5925,7 +5925,7 @@ Branch: REL9_0_STABLE [b185c42c1] 2015-06-30 14:20:37 -0300 <listitem> <para> - Use <filename>librt</> for <function>sched_yield()</> when necessary, + Use <filename>librt</filename> for <function>sched_yield()</function> when necessary, which it is on some Solaris versions (Oskari Saarenmaa) </para> </listitem> @@ -5939,7 +5939,7 @@ Branch: REL9_4_STABLE [a0104e080] 2015-08-14 20:23:42 -0400 <listitem> <para> - Translate encoding <literal>UHC</> as Windows code page 949 + Translate encoding <literal>UHC</literal> as Windows code page 949 (Noah Misch) </para> @@ -5972,12 +5972,12 @@ Branch: REL9_4_STABLE [b2ed1682d] 2015-06-20 12:10:56 -0400 <listitem> <para> Fix postmaster startup failure due to not - copying <function>setlocale()</>'s return value (Noah Misch) + copying <function>setlocale()</function>'s return value (Noah Misch) </para> <para> This has been reported on Windows systems with the ANSI code page set - to CP936 (<quote>Chinese (Simplified, PRC)</>), and may occur with + to CP936 (<quote>Chinese (Simplified, PRC)</quote>), and may occur with other multibyte code pages. </para> </listitem> @@ -5995,7 +5995,7 @@ Branch: REL9_0_STABLE [341b877d3] 2015-07-07 16:39:25 +0300 <listitem> <para> - Fix Windows <filename>install.bat</> script to handle target directory + Fix Windows <filename>install.bat</filename> script to handle target directory names that contain spaces (Heikki Linnakangas) </para> </listitem> @@ -6013,9 +6013,9 @@ Branch: REL9_0_STABLE [29ff43adf] 2015-07-05 12:01:02 -0400 <listitem> <para> - Make the numeric form of the <productname>PostgreSQL</> version number - (e.g., <literal>90405</>) readily available to extension Makefiles, - as a variable named <varname>VERSION_NUM</> (Michael Paquier) + Make the numeric form of the <productname>PostgreSQL</productname> version number + (e.g., <literal>90405</literal>) readily available to extension Makefiles, + as a variable named <varname>VERSION_NUM</varname> (Michael Paquier) </para> </listitem> @@ -6032,10 +6032,10 @@ Branch: REL9_0_STABLE [47ac95f37] 2015-10-02 19:16:37 -0400 <listitem> <para> - Update time zone data files to <application>tzdata</> release 2015g for + Update time zone data files to <application>tzdata</application> release 2015g for DST law changes in Cayman Islands, Fiji, Moldova, Morocco, Norfolk Island, North Korea, Turkey, and Uruguay. There is a new zone name - <literal>America/Fort_Nelson</> for the Canadian Northern Rockies. + <literal>America/Fort_Nelson</literal> for the Canadian Northern Rockies. </para> </listitem> @@ -6067,7 +6067,7 @@ Branch: REL9_0_STABLE [47ac95f37] 2015-10-02 19:16:37 -0400 <para> However, if you are upgrading an installation that was previously - upgraded using a <application>pg_upgrade</> version between 9.3.0 and + upgraded using a <application>pg_upgrade</application> version between 9.3.0 and 9.3.4 inclusive, see the first changelog entry below. </para> @@ -6096,46 +6096,46 @@ Branch: REL9_3_STABLE [2a9b01928] 2015-06-05 09:34:15 -0400 </para> <para> - Recent <productname>PostgreSQL</> releases introduced mechanisms to + Recent <productname>PostgreSQL</productname> releases introduced mechanisms to protect against multixact wraparound, but some of that code did not account for the possibility that it would need to run during crash recovery, when the database may not be in a consistent state. This could result in failure to restart after a crash, or failure to start up a secondary server. The lingering effects of a previously-fixed - bug in <application>pg_upgrade</> could also cause such a failure, in - installations that had used <application>pg_upgrade</> versions + bug in <application>pg_upgrade</application> could also cause such a failure, in + installations that had used <application>pg_upgrade</application> versions between 9.3.0 and 9.3.4. </para> <para> - The <application>pg_upgrade</> bug in question was that it would - set <literal>oldestMultiXid</> to 1 in <filename>pg_control</> even + The <application>pg_upgrade</application> bug in question was that it would + set <literal>oldestMultiXid</literal> to 1 in <filename>pg_control</filename> even if the true value should be higher. With the fixes introduced in this release, such a situation will result in immediate emergency - autovacuuming until a correct <literal>oldestMultiXid</> value can + autovacuuming until a correct <literal>oldestMultiXid</literal> value can be determined. If that would pose a hardship, users can avoid it by - doing manual vacuuming <emphasis>before</> upgrading to this release. + doing manual vacuuming <emphasis>before</emphasis> upgrading to this release. In detail: <orderedlist> <listitem> <para> - Check whether <application>pg_controldata</> reports <quote>Latest - checkpoint's oldestMultiXid</> to be 1. If not, there's nothing + Check whether <application>pg_controldata</application> reports <quote>Latest + checkpoint's oldestMultiXid</quote> to be 1. If not, there's nothing to do. </para> </listitem> <listitem> <para> - Look in <filename>PGDATA/pg_multixact/offsets</> to see if there's a - file named <filename>0000</>. If there is, there's nothing to do. + Look in <filename>PGDATA/pg_multixact/offsets</filename> to see if there's a + file named <filename>0000</filename>. If there is, there's nothing to do. </para> </listitem> <listitem> <para> Otherwise, for each table that has - <structname>pg_class</>.<structfield>relminmxid</> equal to 1, - <command>VACUUM</> that table with + <structname>pg_class</structname>.<structfield>relminmxid</structfield> equal to 1, + <command>VACUUM</command> that table with both <xref linkend="guc-vacuum-multixact-freeze-min-age"> and <xref linkend="guc-vacuum-multixact-freeze-table-age"> set to zero. (You can use the vacuum cost delay parameters described @@ -6164,7 +6164,7 @@ Branch: REL9_0_STABLE [2fe1939b0] 2015-06-07 15:32:09 -0400 <para> With just the wrong timing of concurrent activity, a <command>VACUUM - FULL</> on a system catalog might fail to update the <quote>init file</> + FULL</command> on a system catalog might fail to update the <quote>init file</quote> that's used to avoid cache-loading work for new sessions. This would result in later sessions being unable to access that catalog at all. This is a very ancient bug, but it's so hard to trigger that no @@ -6185,13 +6185,13 @@ Branch: REL9_0_STABLE [dbd99c7f0] 2015-06-05 13:22:27 -0400 <listitem> <para> Avoid deadlock between incoming sessions and <literal>CREATE/DROP - DATABASE</> (Tom Lane) + DATABASE</literal> (Tom Lane) </para> <para> A new session starting in a database that is the target of - a <command>DROP DATABASE</> command, or is the template for - a <command>CREATE DATABASE</> command, could cause the command to wait + a <command>DROP DATABASE</command> command, or is the template for + a <command>CREATE DATABASE</command> command, could cause the command to wait for five seconds and then fail, even if the new session would have exited before that. </para> @@ -6284,12 +6284,12 @@ Branch: REL9_3_STABLE [c2b68b1f7] 2015-05-29 17:02:58 -0400 <listitem> <para> - Avoid failures while <function>fsync</>'ing data directory during + Avoid failures while <function>fsync</function>'ing data directory during crash restart (Abhijit Menon-Sen, Tom Lane) </para> <para> - In the previous minor releases we added a patch to <function>fsync</> + In the previous minor releases we added a patch to <function>fsync</function> everything in the data directory after a crash. Unfortunately its response to any error condition was to fail, thereby preventing the server from starting up, even when the problem was quite harmless. @@ -6301,7 +6301,7 @@ Branch: REL9_3_STABLE [c2b68b1f7] 2015-05-29 17:02:58 -0400 </para> <para> - Also apply the same rules in <literal>initdb --sync-only</>. + Also apply the same rules in <literal>initdb --sync-only</literal>. This case is less critical but it should act similarly. </para> </listitem> @@ -6316,8 +6316,8 @@ Branch: REL9_2_STABLE [f3c67aad4] 2015-05-28 11:24:37 -0400 <listitem> <para> - Fix <function>pg_get_functiondef()</> to show - functions' <literal>LEAKPROOF</> property, if set (Jeevan Chalke) + Fix <function>pg_get_functiondef()</function> to show + functions' <literal>LEAKPROOF</literal> property, if set (Jeevan Chalke) </para> </listitem> @@ -6329,7 +6329,7 @@ Branch: REL9_4_STABLE [9b74f32cd] 2015-05-22 10:31:29 -0400 <listitem> <para> - Fix <function>pushJsonbValue()</> to unpack <type>jbvBinary</> + Fix <function>pushJsonbValue()</function> to unpack <type>jbvBinary</type> objects (Andrew Dunstan) </para> @@ -6351,14 +6351,14 @@ Branch: REL9_0_STABLE [b06649b7f] 2015-05-26 22:15:00 -0400 <listitem> <para> - Remove <application>configure</>'s check prohibiting linking to a - threaded <application>libpython</> - on <systemitem class="osname">OpenBSD</> (Tom Lane) + Remove <application>configure</application>'s check prohibiting linking to a + threaded <application>libpython</application> + on <systemitem class="osname">OpenBSD</systemitem> (Tom Lane) </para> <para> The failure this restriction was meant to prevent seems to not be a - problem anymore on current <systemitem class="osname">OpenBSD</> + problem anymore on current <systemitem class="osname">OpenBSD</systemitem> versions. </para> </listitem> @@ -6390,8 +6390,8 @@ Branch: REL9_0_STABLE [b06649b7f] 2015-05-26 22:15:00 -0400 </para> <para> - However, if you use <filename>contrib/citext</>'s - <function>regexp_matches()</> functions, see the changelog entry below + However, if you use <filename>contrib/citext</filename>'s + <function>regexp_matches()</function> functions, see the changelog entry below about that. </para> @@ -6469,7 +6469,7 @@ Branch: REL9_0_STABLE [cf893530a] 2015-05-19 18:18:56 -0400 </para> <para> - Our replacement implementation of <function>snprintf()</> failed to + Our replacement implementation of <function>snprintf()</function> failed to check for errors reported by the underlying system library calls; the main case that might be missed is out-of-memory situations. In the worst case this might lead to information exposure, due to our @@ -6479,7 +6479,7 @@ Branch: REL9_0_STABLE [cf893530a] 2015-05-19 18:18:56 -0400 </para> <para> - It remains possible that some calls of the <function>*printf()</> + It remains possible that some calls of the <function>*printf()</function> family of functions are vulnerable to information disclosure if an out-of-memory error occurs at just the wrong time. We judge the risk to not be large, but will continue analysis in this area. @@ -6499,15 +6499,15 @@ Branch: REL9_0_STABLE [b84e5c017] 2015-05-18 10:02:39 -0400 <listitem> <para> - In <filename>contrib/pgcrypto</>, uniformly report decryption failures - as <quote>Wrong key or corrupt data</> (Noah Misch) + In <filename>contrib/pgcrypto</filename>, uniformly report decryption failures + as <quote>Wrong key or corrupt data</quote> (Noah Misch) </para> <para> Previously, some cases of decryption with an incorrect key could report other error message texts. It has been shown that such variance in error reports can aid attackers in recovering keys from other systems. - While it's unknown whether <filename>pgcrypto</>'s specific behaviors + While it's unknown whether <filename>pgcrypto</filename>'s specific behaviors are likewise exploitable, it seems better to avoid the risk by using a one-size-fits-all message. (CVE-2015-3167) @@ -6557,7 +6557,7 @@ Branch: REL9_3_STABLE [ddebd2119] 2015-05-11 12:16:51 -0400 <para> Under certain usage patterns, the existing defenses against this might - be insufficient, allowing <filename>pg_multixact/members</> files to be + be insufficient, allowing <filename>pg_multixact/members</filename> files to be removed too early, resulting in data loss. The fix for this includes modifying the server to fail transactions that would result in overwriting old multixact member ID data, and @@ -6578,16 +6578,16 @@ Branch: REL9_1_STABLE [801e250a8] 2015-05-05 15:50:53 -0400 <listitem> <para> - Fix incorrect declaration of <filename>contrib/citext</>'s - <function>regexp_matches()</> functions (Tom Lane) + Fix incorrect declaration of <filename>contrib/citext</filename>'s + <function>regexp_matches()</function> functions (Tom Lane) </para> <para> - These functions should return <type>setof text[]</>, like the core + These functions should return <type>setof text[]</type>, like the core functions they are wrappers for; but they were incorrectly declared as - returning just <type>text[]</>. This mistake had two results: first, + returning just <type>text[]</type>. This mistake had two results: first, if there was no match you got a scalar null result, whereas what you - should get is an empty set (zero rows). Second, the <literal>g</> flag + should get is an empty set (zero rows). Second, the <literal>g</literal> flag was effectively ignored, since you would get only one result array even if there were multiple matches. </para> @@ -6595,16 +6595,16 @@ Branch: REL9_1_STABLE [801e250a8] 2015-05-05 15:50:53 -0400 <para> While the latter behavior is clearly a bug, there might be applications depending on the former behavior; therefore the function declarations - will not be changed by default until <productname>PostgreSQL</> 9.5. + will not be changed by default until <productname>PostgreSQL</productname> 9.5. In pre-9.5 branches, the old behavior exists in version 1.0 of - the <literal>citext</> extension, while we have provided corrected - declarations in version 1.1 (which is <emphasis>not</> installed by + the <literal>citext</literal> extension, while we have provided corrected + declarations in version 1.1 (which is <emphasis>not</emphasis> installed by default). To adopt the fix in pre-9.5 branches, execute - <literal>ALTER EXTENSION citext UPDATE TO '1.1'</> in each database in - which <literal>citext</> is installed. (You can also <quote>update</> + <literal>ALTER EXTENSION citext UPDATE TO '1.1'</literal> in each database in + which <literal>citext</literal> is installed. (You can also <quote>update</quote> back to 1.0 if you need to undo that.) Be aware that either update direction will require dropping and recreating any views or rules that - use <filename>citext</>'s <function>regexp_matches()</> functions. + use <filename>citext</filename>'s <function>regexp_matches()</function> functions. </para> </listitem> @@ -6616,8 +6616,8 @@ Branch: REL9_4_STABLE [79afe6e66] 2015-02-26 12:34:43 -0500 <listitem> <para> - Render infinite dates and timestamps as <literal>infinity</> when - converting to <type>json</>, rather than throwing an error + Render infinite dates and timestamps as <literal>infinity</literal> when + converting to <type>json</type>, rather than throwing an error (Andrew Dunstan) </para> </listitem> @@ -6630,8 +6630,8 @@ Branch: REL9_4_STABLE [997066f44] 2015-05-04 12:43:16 -0400 <listitem> <para> - Fix <type>json</>/<type>jsonb</>'s <function>populate_record()</> - and <function>to_record()</> functions to handle empty input properly + Fix <type>json</type>/<type>jsonb</type>'s <function>populate_record()</function> + and <function>to_record()</function> functions to handle empty input properly (Andrew Dunstan) </para> </listitem> @@ -6671,7 +6671,7 @@ Branch: REL9_4_STABLE [79edb2981] 2015-05-03 11:30:24 -0400 <listitem> <para> Fix behavior when changing foreign key constraint deferrability status - with <literal>ALTER TABLE ... ALTER CONSTRAINT</> (Tom Lane) + with <literal>ALTER TABLE ... ALTER CONSTRAINT</literal> (Tom Lane) </para> <para> @@ -6720,7 +6720,7 @@ Branch: REL9_0_STABLE [985da346e] 2015-04-25 16:44:27 -0400 <para> This oversight in the planner has been observed to cause <quote>could - not find RelOptInfo for given relids</> errors, but it seems possible + not find RelOptInfo for given relids</quote> errors, but it seems possible that sometimes an incorrect query plan might get past that consistency check and result in silently-wrong query output. </para> @@ -6768,7 +6768,7 @@ Branch: REL9_0_STABLE [72bbca27e] 2015-02-10 20:37:31 -0500 <para> This oversight has been seen to lead to <quote>failed to join all - relations together</> errors in queries involving <literal>LATERAL</>, + relations together</quote> errors in queries involving <literal>LATERAL</literal>, and that might happen in other cases as well. </para> </listitem> @@ -6782,7 +6782,7 @@ Branch: REL9_4_STABLE [f16270ade] 2015-02-25 21:36:40 -0500 <listitem> <para> Ensure that row locking occurs properly when the target of - an <command>UPDATE</> or <command>DELETE</> is a security-barrier view + an <command>UPDATE</command> or <command>DELETE</command> is a security-barrier view (Stephen Frost) </para> </listitem> @@ -6801,7 +6801,7 @@ Branch: REL9_4_STABLE [fd3dfc236] 2015-04-28 00:18:04 +0200 <para> On some platforms, the previous coding could result in errors like - <quote>could not fsync file "pg_replslot/...": Bad file descriptor</>. + <quote>could not fsync file "pg_replslot/...": Bad file descriptor</quote>. </para> </listitem> @@ -6818,7 +6818,7 @@ Branch: REL9_0_STABLE [223a94680] 2015-04-23 21:37:09 +0300 <listitem> <para> Fix possible deadlock at startup - when <literal>max_prepared_transactions</> is too small + when <literal>max_prepared_transactions</literal> is too small (Heikki Linnakangas) </para> </listitem> @@ -6859,7 +6859,7 @@ Branch: REL9_0_STABLE [262fbcb9d] 2015-05-05 09:30:07 -0400 <listitem> <para> - Recursively <function>fsync()</> the data directory after a crash + Recursively <function>fsync()</function> the data directory after a crash (Abhijit Menon-Sen, Robert Haas) </para> @@ -6901,7 +6901,7 @@ Branch: REL9_4_STABLE [ee0d06c0b] 2015-04-03 00:07:29 -0400 <para> This oversight could result in failures in sessions that start - concurrently with a <command>VACUUM FULL</> on a system catalog. + concurrently with a <command>VACUUM FULL</command> on a system catalog. </para> </listitem> @@ -6913,7 +6913,7 @@ Branch: REL9_4_STABLE [2897e069c] 2015-03-30 13:05:35 -0400 <listitem> <para> - Fix crash in <function>BackendIdGetTransactionIds()</> when trying + Fix crash in <function>BackendIdGetTransactionIds()</function> when trying to get status for a backend process that just exited (Tom Lane) </para> </listitem> @@ -6930,13 +6930,13 @@ Branch: REL9_0_STABLE [87b7fcc87] 2015-02-23 16:14:16 +0100 <listitem> <para> - Cope with unexpected signals in <function>LockBufferForCleanup()</> + Cope with unexpected signals in <function>LockBufferForCleanup()</function> (Andres Freund) </para> <para> This oversight could result in spurious errors about <quote>multiple - backends attempting to wait for pincount 1</>. + backends attempting to wait for pincount 1</quote>. </para> </listitem> @@ -6950,7 +6950,7 @@ Branch: REL9_2_STABLE [effcaa4c2] 2015-02-15 23:26:46 -0500 <listitem> <para> - Fix crash when doing <literal>COPY IN</> to a table with check + Fix crash when doing <literal>COPY IN</literal> to a table with check constraints that contain whole-row references (Tom Lane) </para> @@ -6995,7 +6995,7 @@ Branch: REL9_4_STABLE [16be9737c] 2015-03-23 16:52:17 +0100 <listitem> <para> - Avoid busy-waiting with short <literal>recovery_min_apply_delay</> + Avoid busy-waiting with short <literal>recovery_min_apply_delay</literal> values (Andres Freund) </para> </listitem> @@ -7061,9 +7061,9 @@ Branch: REL9_0_STABLE [152c94632] 2015-03-29 15:04:38 -0400 </para> <para> - <command>ANALYZE</> executes index expressions many times; if there are + <command>ANALYZE</command> executes index expressions many times; if there are slow functions in such an expression, it's desirable to be able to - cancel the <command>ANALYZE</> before that loop finishes. + cancel the <command>ANALYZE</command> before that loop finishes. </para> </listitem> @@ -7078,10 +7078,10 @@ Branch: REL9_1_STABLE [4a4fd2b0c] 2015-03-12 13:38:49 -0400 <listitem> <para> - Ensure <structfield>tableoid</> of a foreign table is reported - correctly when a <literal>READ COMMITTED</> recheck occurs after - locking rows in <command>SELECT FOR UPDATE</>, <command>UPDATE</>, - or <command>DELETE</> (Etsuro Fujita) + Ensure <structfield>tableoid</structfield> of a foreign table is reported + correctly when a <literal>READ COMMITTED</literal> recheck occurs after + locking rows in <command>SELECT FOR UPDATE</command>, <command>UPDATE</command>, + or <command>DELETE</command> (Etsuro Fujita) </para> </listitem> @@ -7127,14 +7127,14 @@ Branch: REL9_0_STABLE [c981e5999] 2015-05-08 19:40:15 -0400 <listitem> <para> - Recommend setting <literal>include_realm</> to 1 when using + Recommend setting <literal>include_realm</literal> to 1 when using Kerberos/GSSAPI/SSPI authentication (Stephen Frost) </para> <para> Without this, identically-named users from different realms cannot be distinguished. For the moment this is only a documentation change, but - it will become the default setting in <productname>PostgreSQL</> 9.5. + it will become the default setting in <productname>PostgreSQL</productname> 9.5. </para> </listitem> @@ -7157,7 +7157,7 @@ Branch: REL9_0_STABLE [e48ce4f33] 2015-02-17 12:49:18 -0500 <listitem> <para> - Remove code for matching IPv4 <filename>pg_hba.conf</> entries to + Remove code for matching IPv4 <filename>pg_hba.conf</filename> entries to IPv4-in-IPv6 addresses (Tom Lane) </para> @@ -7170,7 +7170,7 @@ Branch: REL9_0_STABLE [e48ce4f33] 2015-02-17 12:49:18 -0500 crashes on some systems, so let's just remove it rather than fix it. (Had we chosen to fix it, that would make for a subtle and potentially security-sensitive change in the effective meaning of - IPv4 <filename>pg_hba.conf</> entries, which does not seem like a good + IPv4 <filename>pg_hba.conf</filename> entries, which does not seem like a good thing to do in minor releases.) </para> </listitem> @@ -7197,7 +7197,7 @@ Branch: REL9_4_STABLE [a1f4ade01] 2015-04-02 14:39:18 -0400 <listitem> <para> After a database crash, don't restart background workers that are - marked <literal>BGW_NEVER_RESTART</> (Amit Khandekar) + marked <literal>BGW_NEVER_RESTART</literal> (Amit Khandekar) </para> </listitem> @@ -7212,13 +7212,13 @@ Branch: REL9_1_STABLE [0d36d9f2b] 2015-02-06 11:32:42 +0200 <listitem> <para> - Report WAL flush, not insert, position in <literal>IDENTIFY_SYSTEM</> + Report WAL flush, not insert, position in <literal>IDENTIFY_SYSTEM</literal> replication command (Heikki Linnakangas) </para> <para> This avoids a possible startup failure - in <application>pg_receivexlog</>. + in <application>pg_receivexlog</application>. </para> </listitem> @@ -7236,7 +7236,7 @@ Branch: REL9_0_STABLE [78ce2dc8e] 2015-05-07 15:10:01 +0200 <para> While shutting down service on Windows, periodically send status updates to the Service Control Manager to prevent it from killing the - service too soon; and ensure that <application>pg_ctl</> will wait for + service too soon; and ensure that <application>pg_ctl</application> will wait for shutdown (Krystian Bigaj) </para> </listitem> @@ -7253,7 +7253,7 @@ Branch: REL9_0_STABLE [8878eaaa8] 2015-02-23 13:32:53 +0200 <listitem> <para> - Reduce risk of network deadlock when using <application>libpq</>'s + Reduce risk of network deadlock when using <application>libpq</application>'s non-blocking mode (Heikki Linnakangas) </para> @@ -7262,12 +7262,12 @@ Branch: REL9_0_STABLE [8878eaaa8] 2015-02-23 13:32:53 +0200 buffer every so often, in case the server has sent enough response data to cause it to block on output. (A typical scenario is that the server is sending a stream of NOTICE messages during <literal>COPY FROM - STDIN</>.) This worked properly in the normal blocking mode, but not - so much in non-blocking mode. We've modified <application>libpq</> + STDIN</literal>.) This worked properly in the normal blocking mode, but not + so much in non-blocking mode. We've modified <application>libpq</application> to opportunistically drain input when it can, but a full defense against this problem requires application cooperation: the application should watch for socket read-ready as well as write-ready conditions, - and be sure to call <function>PQconsumeInput()</> upon read-ready. + and be sure to call <function>PQconsumeInput()</function> upon read-ready. </para> </listitem> @@ -7281,7 +7281,7 @@ Branch: REL9_2_STABLE [83c3115dd] 2015-02-21 12:59:43 -0500 <listitem> <para> - In <application>libpq</>, fix misparsing of empty values in URI + In <application>libpq</application>, fix misparsing of empty values in URI connection strings (Thomas Fanghaenel) </para> </listitem> @@ -7298,7 +7298,7 @@ Branch: REL9_0_STABLE [ce2fcc58e] 2015-02-11 11:30:11 +0100 <listitem> <para> - Fix array handling in <application>ecpg</> (Michael Meskes) + Fix array handling in <application>ecpg</application> (Michael Meskes) </para> </listitem> @@ -7314,8 +7314,8 @@ Branch: REL9_0_STABLE [557fcfae3] 2015-04-01 20:00:07 -0300 <listitem> <para> - Fix <application>psql</> to sanely handle URIs and conninfo strings as - the first parameter to <command>\connect</> + Fix <application>psql</application> to sanely handle URIs and conninfo strings as + the first parameter to <command>\connect</command> (David Fetter, Andrew Dunstan, Álvaro Herrera) </para> @@ -7338,17 +7338,17 @@ Branch: REL9_0_STABLE [396ef6fd8] 2015-03-14 13:43:26 -0400 <listitem> <para> - Suppress incorrect complaints from <application>psql</> on some - platforms that it failed to write <filename>~/.psql_history</> at exit + Suppress incorrect complaints from <application>psql</application> on some + platforms that it failed to write <filename>~/.psql_history</filename> at exit (Tom Lane) </para> <para> This misbehavior was caused by a workaround for a bug in very old - (pre-2006) versions of <application>libedit</>. We fixed it by + (pre-2006) versions of <application>libedit</application>. We fixed it by removing the workaround, which will cause a similar failure to appear - for anyone still using such versions of <application>libedit</>. - Recommendation: upgrade that library, or use <application>libreadline</>. + for anyone still using such versions of <application>libedit</application>. + Recommendation: upgrade that library, or use <application>libreadline</application>. </para> </listitem> @@ -7364,7 +7364,7 @@ Branch: REL9_0_STABLE [8e70f3c40] 2015-02-10 22:38:29 -0500 <listitem> <para> - Fix <application>pg_dump</>'s rule for deciding which casts are + Fix <application>pg_dump</application>'s rule for deciding which casts are system-provided casts that should not be dumped (Tom Lane) </para> </listitem> @@ -7380,8 +7380,8 @@ Branch: REL9_1_STABLE [b0d53b2e3] 2015-02-18 11:43:00 -0500 <listitem> <para> - In <application>pg_dump</>, fix failure to honor <literal>-Z</> - compression level option together with <literal>-Fd</> + In <application>pg_dump</application>, fix failure to honor <literal>-Z</literal> + compression level option together with <literal>-Fd</literal> (Michael Paquier) </para> </listitem> @@ -7397,7 +7397,7 @@ Branch: REL9_1_STABLE [dcb467b8e] 2015-03-02 14:12:43 -0500 <listitem> <para> - Make <application>pg_dump</> consider foreign key relationships + Make <application>pg_dump</application> consider foreign key relationships between extension configuration tables while choosing dump order (Gilles Darold, Michael Paquier, Stephen Frost) </para> @@ -7417,7 +7417,7 @@ Branch: REL9_3_STABLE [d645273cf] 2015-03-06 13:27:46 -0500 <listitem> <para> - Avoid possible <application>pg_dump</> failure when concurrent sessions + Avoid possible <application>pg_dump</application> failure when concurrent sessions are creating and dropping temporary functions (Tom Lane) </para> </listitem> @@ -7434,7 +7434,7 @@ Branch: REL9_0_STABLE [7a501bcbf] 2015-02-25 12:01:12 -0500 <listitem> <para> - Fix dumping of views that are just <literal>VALUES(...)</> but have + Fix dumping of views that are just <literal>VALUES(...)</literal> but have column aliases (Tom Lane) </para> </listitem> @@ -7448,7 +7448,7 @@ Branch: REL9_4_STABLE [70fac4844] 2015-05-01 13:03:23 -0400 <listitem> <para> Ensure that a view's replication identity is correctly set - to <literal>nothing</> during dump/restore (Marko Tiikkaja) + to <literal>nothing</literal> during dump/restore (Marko Tiikkaja) </para> <para> @@ -7472,7 +7472,7 @@ Branch: REL9_3_STABLE [4e9935979] 2015-05-16 15:16:28 -0400 <listitem> <para> - In <application>pg_upgrade</>, force timeline 1 in the new cluster + In <application>pg_upgrade</application>, force timeline 1 in the new cluster (Bruce Momjian) </para> @@ -7494,7 +7494,7 @@ Branch: REL9_0_STABLE [2194aa92b] 2015-05-16 00:10:03 -0400 <listitem> <para> - In <application>pg_upgrade</>, check for improperly non-connectable + In <application>pg_upgrade</application>, check for improperly non-connectable databases before proceeding (Bruce Momjian) </para> @@ -7512,8 +7512,8 @@ Branch: REL9_0_STABLE [4ae178f60] 2015-02-11 22:06:04 -0500 <listitem> <para> - In <application>pg_upgrade</>, quote directory paths - properly in the generated <literal>delete_old_cluster</> script + In <application>pg_upgrade</application>, quote directory paths + properly in the generated <literal>delete_old_cluster</literal> script (Bruce Momjian) </para> </listitem> @@ -7530,14 +7530,14 @@ Branch: REL9_0_STABLE [85dac37ee] 2015-02-11 21:02:06 -0500 <listitem> <para> - In <application>pg_upgrade</>, preserve database-level freezing info + In <application>pg_upgrade</application>, preserve database-level freezing info properly (Bruce Momjian) </para> <para> This oversight could cause missing-clog-file errors for tables within - the <literal>postgres</> and <literal>template1</> databases. + the <literal>postgres</literal> and <literal>template1</literal> databases. </para> </listitem> @@ -7553,7 +7553,7 @@ Branch: REL9_0_STABLE [bf22a8e58] 2015-03-30 17:18:10 -0400 <listitem> <para> - Run <application>pg_upgrade</> and <application>pg_resetxlog</> with + Run <application>pg_upgrade</application> and <application>pg_resetxlog</application> with restricted privileges on Windows, so that they don't fail when run by an administrator (Muhammad Asif Naeem) </para> @@ -7571,8 +7571,8 @@ Branch: REL9_1_STABLE [d7d294f59] 2015-02-17 11:08:40 -0500 <listitem> <para> - Improve handling of <function>readdir()</> failures when scanning - directories in <application>initdb</> and <application>pg_basebackup</> + Improve handling of <function>readdir()</function> failures when scanning + directories in <application>initdb</application> and <application>pg_basebackup</application> (Marco Nenciarini) </para> </listitem> @@ -7589,7 +7589,7 @@ Branch: REL9_0_STABLE [40b0c10b7] 2015-03-15 23:22:03 -0400 <listitem> <para> - Fix slow sorting algorithm in <filename>contrib/intarray</> (Tom Lane) + Fix slow sorting algorithm in <filename>contrib/intarray</filename> (Tom Lane) </para> </listitem> @@ -7637,7 +7637,7 @@ Branch: REL9_0_STABLE [3c3749a3b] 2015-05-15 19:36:20 -0400 <listitem> <para> - Update time zone data files to <application>tzdata</> release 2015d + Update time zone data files to <application>tzdata</application> release 2015d for DST law changes in Egypt, Mongolia, and Palestine, plus historical changes in Canada and Chile. Also adopt revised zone abbreviations for the America/Adak zone (HST/HDT not HAST/HADT). @@ -7672,12 +7672,12 @@ Branch: REL9_0_STABLE [3c3749a3b] 2015-05-15 19:36:20 -0400 <para> However, if you are a Windows user and are using the <quote>Norwegian - (Bokmål)</> locale, manual action is needed after the upgrade to - replace any <quote>Norwegian (Bokmål)_Norway</> - or <quote>norwegian-bokmal</> locale names stored - in <productname>PostgreSQL</> system catalogs with the plain-ASCII - alias <quote>Norwegian_Norway</>. For details see - <ulink url="http://wiki.postgresql.org/wiki/Changes_To_Norwegian_Locale"></> + (Bokmål)</quote> locale, manual action is needed after the upgrade to + replace any <quote>Norwegian (Bokmål)_Norway</quote> + or <quote>norwegian-bokmal</quote> locale names stored + in <productname>PostgreSQL</productname> system catalogs with the plain-ASCII + alias <quote>Norwegian_Norway</quote>. For details see + <ulink url="http://wiki.postgresql.org/wiki/Changes_To_Norwegian_Locale"></ulink> </para> </sect2> @@ -7705,15 +7705,15 @@ Branch: REL9_0_STABLE [56b970f2e] 2015-02-02 10:00:52 -0500 <listitem> <para> - Fix buffer overruns in <function>to_char()</> + Fix buffer overruns in <function>to_char()</function> (Bruce Momjian) </para> <para> - When <function>to_char()</> processes a numeric formatting template - calling for a large number of digits, <productname>PostgreSQL</> + When <function>to_char()</function> processes a numeric formatting template + calling for a large number of digits, <productname>PostgreSQL</productname> would read past the end of a buffer. When processing a crafted - timestamp formatting template, <productname>PostgreSQL</> would write + timestamp formatting template, <productname>PostgreSQL</productname> would write past the end of a buffer. Either case could crash the server. We have not ruled out the possibility of attacks that lead to privilege escalation, though they seem unlikely. @@ -7733,27 +7733,27 @@ Branch: REL9_0_STABLE [9e05c5063] 2015-02-02 10:00:52 -0500 <listitem> <para> - Fix buffer overrun in replacement <function>*printf()</> functions + Fix buffer overrun in replacement <function>*printf()</function> functions (Tom Lane) </para> <para> - <productname>PostgreSQL</> includes a replacement implementation - of <function>printf</> and related functions. This code will overrun + <productname>PostgreSQL</productname> includes a replacement implementation + of <function>printf</function> and related functions. This code will overrun a stack buffer when formatting a floating point number (conversion - specifiers <literal>e</>, <literal>E</>, <literal>f</>, <literal>F</>, - <literal>g</> or <literal>G</>) with requested precision greater than + specifiers <literal>e</literal>, <literal>E</literal>, <literal>f</literal>, <literal>F</literal>, + <literal>g</literal> or <literal>G</literal>) with requested precision greater than about 500. This will crash the server, and we have not ruled out the possibility of attacks that lead to privilege escalation. A database user can trigger such a buffer overrun through - the <function>to_char()</> SQL function. While that is the only - affected core <productname>PostgreSQL</> functionality, extension + the <function>to_char()</function> SQL function. While that is the only + affected core <productname>PostgreSQL</productname> functionality, extension modules that use printf-family functions may be at risk as well. </para> <para> - This issue primarily affects <productname>PostgreSQL</> on Windows. - <productname>PostgreSQL</> uses the system implementation of these + This issue primarily affects <productname>PostgreSQL</productname> on Windows. + <productname>PostgreSQL</productname> uses the system implementation of these functions where adequate, which it is on other modern platforms. (CVE-2015-0242) </para> @@ -7778,12 +7778,12 @@ Branch: REL9_0_STABLE [0a3ee8a5f] 2015-02-02 10:00:52 -0500 <listitem> <para> - Fix buffer overruns in <filename>contrib/pgcrypto</> + Fix buffer overruns in <filename>contrib/pgcrypto</filename> (Marko Tiikkaja, Noah Misch) </para> <para> - Errors in memory size tracking within the <filename>pgcrypto</> + Errors in memory size tracking within the <filename>pgcrypto</filename> module permitted stack buffer overruns and improper dependence on the contents of uninitialized memory. The buffer overrun cases can crash the server, and we have not ruled out the possibility of @@ -7844,7 +7844,7 @@ Branch: REL9_0_STABLE [3a2063369] 2015-01-28 12:33:29 -0500 <para> Some server error messages show the values of columns that violate a constraint, such as a unique constraint. If the user does not have - <literal>SELECT</> privilege on all columns of the table, this could + <literal>SELECT</literal> privilege on all columns of the table, this could mean exposing values that the user should not be able to see. Adjust the code so that values are displayed only when they came from the SQL command or could be selected by the user. @@ -7893,20 +7893,20 @@ Branch: REL9_2_STABLE [6bf343c6e] 2015-01-16 13:10:23 +0200 <listitem> <para> - Cope with the Windows locale named <quote>Norwegian (Bokmål)</> + Cope with the Windows locale named <quote>Norwegian (Bokmål)</quote> (Heikki Linnakangas) </para> <para> Non-ASCII locale names are problematic since it's not clear what encoding they should be represented in. Map the troublesome locale - name to a plain-ASCII alias, <quote>Norwegian_Norway</>. + name to a plain-ASCII alias, <quote>Norwegian_Norway</quote>. </para> <para> - 9.4.0 mapped the troublesome name to <quote>norwegian-bokmal</>, + 9.4.0 mapped the troublesome name to <quote>norwegian-bokmal</quote>, but that turns out not to work on all Windows configurations. - <quote>Norwegian_Norway</> is now recommended instead. + <quote>Norwegian_Norway</quote> is now recommended instead. </para> </listitem> @@ -7927,7 +7927,7 @@ Branch: REL9_0_STABLE [5308e085b] 2015-01-15 18:52:38 -0500 </para> <para> - In <literal>READ COMMITTED</> mode, queries that lock or update + In <literal>READ COMMITTED</literal> mode, queries that lock or update recently-updated rows could crash as a result of this bug. </para> </listitem> @@ -7956,8 +7956,8 @@ Branch: REL9_3_STABLE [54a8abc2b] 2015-01-04 15:48:29 -0300 <listitem> <para> Fix failure to wait when a transaction tries to acquire a <literal>FOR - NO KEY EXCLUSIVE</> tuple lock, while multiple other transactions - currently hold <literal>FOR SHARE</> locks (Álvaro Herrera) + NO KEY EXCLUSIVE</literal> tuple lock, while multiple other transactions + currently hold <literal>FOR SHARE</literal> locks (Álvaro Herrera) </para> </listitem> @@ -7970,7 +7970,7 @@ Branch: REL9_3_STABLE [939f0fb67] 2015-01-15 13:18:19 -0500 <listitem> <para> - Improve performance of <command>EXPLAIN</> with large range tables + Improve performance of <command>EXPLAIN</command> with large range tables (Tom Lane) </para> </listitem> @@ -7983,41 +7983,41 @@ Branch: REL9_4_STABLE [4cbf390d5] 2015-01-30 14:44:49 -0500 <listitem> <para> - Fix <type>jsonb</> Unicode escape processing, and in consequence - disallow <literal>\u0000</> (Tom Lane) + Fix <type>jsonb</type> Unicode escape processing, and in consequence + disallow <literal>\u0000</literal> (Tom Lane) </para> <para> - Previously, the JSON Unicode escape <literal>\u0000</> was accepted + Previously, the JSON Unicode escape <literal>\u0000</literal> was accepted and was stored as those six characters; but that is indistinguishable - from what is stored for the input <literal>\\u0000</>, resulting in + from what is stored for the input <literal>\\u0000</literal>, resulting in ambiguity. Moreover, in cases where de-escaped textual output is - expected, such as the <literal>->></> operator, the sequence was - printed as <literal>\u0000</>, which does not meet the expectation + expected, such as the <literal>->></literal> operator, the sequence was + printed as <literal>\u0000</literal>, which does not meet the expectation that JSON escaping would be removed. (Consistent behavior would - require emitting a zero byte, but <productname>PostgreSQL</> does not + require emitting a zero byte, but <productname>PostgreSQL</productname> does not support zero bytes embedded in text strings.) 9.4.0 included an ill-advised attempt to improve this situation by adjusting JSON output conversion rules; but of course that could not fix the fundamental ambiguity, and it turned out to break other usages of Unicode escape sequences. Revert that, and to avoid the core problem, - reject <literal>\u0000</> in <type>jsonb</> input. + reject <literal>\u0000</literal> in <type>jsonb</type> input. </para> <para> - If a <type>jsonb</> column contains a <literal>\u0000</> value stored + If a <type>jsonb</type> column contains a <literal>\u0000</literal> value stored with 9.4.0, it will henceforth read out as though it - were <literal>\\u0000</>, which is the other valid interpretation of + were <literal>\\u0000</literal>, which is the other valid interpretation of the data stored by 9.4.0 for this case. </para> <para> - The <type>json</> type did not have the storage-ambiguity problem, but + The <type>json</type> type did not have the storage-ambiguity problem, but it did have the problem of inconsistent de-escaped textual output. - Therefore <literal>\u0000</> will now also be rejected - in <type>json</> values when conversion to de-escaped form is + Therefore <literal>\u0000</literal> will now also be rejected + in <type>json</type> values when conversion to de-escaped form is required. This change does not break the ability to - store <literal>\u0000</> in <type>json</> columns so long as no + store <literal>\u0000</literal> in <type>json</type> columns so long as no processing is done on the values. This is exactly parallel to the cases in which non-ASCII Unicode escapes are allowed when the database encoding is not UTF8. @@ -8036,14 +8036,14 @@ Branch: REL9_0_STABLE [cebb3f032] 2015-01-17 22:37:32 -0500 <listitem> <para> - Fix namespace handling in <function>xpath()</> (Ali Akbar) + Fix namespace handling in <function>xpath()</function> (Ali Akbar) </para> <para> - Previously, the <type>xml</> value resulting from - an <function>xpath()</> call would not have namespace declarations if + Previously, the <type>xml</type> value resulting from + an <function>xpath()</function> call would not have namespace declarations if the namespace declarations were attached to an ancestor element in the - input <type>xml</> value, rather than to the specific element being + input <type>xml</type> value, rather than to the specific element being returned. Propagate the ancestral declaration so that the result is correct when considered in isolation. </para> @@ -8063,7 +8063,7 @@ Branch: REL9_3_STABLE [527ff8baf] 2015-01-30 12:30:43 -0500 </para> <para> - This patch fixes corner-case <quote>unexpected operator NNNN</> planner + This patch fixes corner-case <quote>unexpected operator NNNN</quote> planner errors, and improves the selectivity estimates for some other cases. </para> </listitem> @@ -8081,7 +8081,7 @@ Branch: REL9_4_STABLE [4e241f7cd] 2014-12-30 14:53:03 +0200 </para> <para> - 9.4.0 could fail with <quote>index row size exceeds maximum</> errors + 9.4.0 could fail with <quote>index row size exceeds maximum</quote> errors for data that previous versions would accept. </para> </listitem> @@ -8111,7 +8111,7 @@ Branch: REL9_1_STABLE [37e0f13f2] 2015-01-29 19:37:22 +0200 <listitem> <para> Fix possible crash when using - nonzero <varname>gin_fuzzy_search_limit</> (Heikki Linnakangas) + nonzero <varname>gin_fuzzy_search_limit</varname> (Heikki Linnakangas) </para> </listitem> @@ -8139,7 +8139,7 @@ Branch: REL9_4_STABLE [b337d9657] 2015-01-15 20:52:18 +0200 <listitem> <para> Fix incorrect replay of WAL parameter change records that report - changes in the <varname>wal_log_hints</> setting (Petr Jelinek) + changes in the <varname>wal_log_hints</varname> setting (Petr Jelinek) </para> </listitem> @@ -8155,7 +8155,7 @@ Branch: REL9_0_STABLE [a1a8d0249] 2015-01-19 23:01:46 -0500 <listitem> <para> - Change <quote>pgstat wait timeout</> warning message to be LOG level, + Change <quote>pgstat wait timeout</quote> warning message to be LOG level, and rephrase it to be more understandable (Tom Lane) </para> @@ -8164,7 +8164,7 @@ Branch: REL9_0_STABLE [a1a8d0249] 2015-01-19 23:01:46 -0500 case, but it occurs often enough on our slower buildfarm members to be a nuisance. Reduce it to LOG level, and expend a bit more effort on the wording: it now reads <quote>using stale statistics instead of - current ones because stats collector is not responding</>. + current ones because stats collector is not responding</quote>. </para> </listitem> @@ -8180,7 +8180,7 @@ Branch: REL9_0_STABLE [2e4946169] 2015-01-07 22:46:20 -0500 <listitem> <para> - Warn if macOS's <function>setlocale()</> starts an unwanted extra + Warn if macOS's <function>setlocale()</function> starts an unwanted extra thread inside the postmaster (Noah Misch) </para> </listitem> @@ -8193,18 +8193,18 @@ Branch: REL9_4_STABLE [733728ff3] 2015-01-11 12:35:47 -0500 <listitem> <para> - Fix <application>libpq</>'s behavior when <filename>/etc/passwd</> + Fix <application>libpq</application>'s behavior when <filename>/etc/passwd</filename> isn't readable (Tom Lane) </para> <para> - While doing <function>PQsetdbLogin()</>, <application>libpq</> + While doing <function>PQsetdbLogin()</function>, <application>libpq</application> attempts to ascertain the user's operating system name, which on most - Unix platforms involves reading <filename>/etc/passwd</>. As of 9.4, + Unix platforms involves reading <filename>/etc/passwd</filename>. As of 9.4, failure to do that was treated as a hard error. Restore the previous behavior, which was to fail only if the application does not provide a database role name to connect as. This supports operation in chroot - environments that lack an <filename>/etc/passwd</> file. + environments that lack an <filename>/etc/passwd</filename> file. </para> </listitem> @@ -8220,17 +8220,17 @@ Branch: REL9_0_STABLE [2600e4436] 2014-12-31 12:17:12 -0500 <listitem> <para> - Improve consistency of parsing of <application>psql</>'s special + Improve consistency of parsing of <application>psql</application>'s special variables (Tom Lane) </para> <para> - Allow variant spellings of <literal>on</> and <literal>off</> (such - as <literal>1</>/<literal>0</>) for <literal>ECHO_HIDDEN</> - and <literal>ON_ERROR_ROLLBACK</>. Report a warning for unrecognized - values for <literal>COMP_KEYWORD_CASE</>, <literal>ECHO</>, - <literal>ECHO_HIDDEN</>, <literal>HISTCONTROL</>, - <literal>ON_ERROR_ROLLBACK</>, and <literal>VERBOSITY</>. Recognize + Allow variant spellings of <literal>on</literal> and <literal>off</literal> (such + as <literal>1</literal>/<literal>0</literal>) for <literal>ECHO_HIDDEN</literal> + and <literal>ON_ERROR_ROLLBACK</literal>. Report a warning for unrecognized + values for <literal>COMP_KEYWORD_CASE</literal>, <literal>ECHO</literal>, + <literal>ECHO_HIDDEN</literal>, <literal>HISTCONTROL</literal>, + <literal>ON_ERROR_ROLLBACK</literal>, and <literal>VERBOSITY</literal>. Recognize all values for all these variables case-insensitively; previously there was a mishmash of case-sensitive and case-insensitive behaviors. </para> @@ -8245,7 +8245,7 @@ Branch: REL9_3_STABLE [bb1e2426b] 2015-01-05 19:27:09 -0500 <listitem> <para> - Fix <application>pg_dump</> to handle comments on event triggers + Fix <application>pg_dump</application> to handle comments on event triggers without failing (Tom Lane) </para> </listitem> @@ -8259,8 +8259,8 @@ Branch: REL9_3_STABLE [cc609c46f] 2015-01-30 09:01:36 -0600 <listitem> <para> - Allow parallel <application>pg_dump</> to - use <option>--serializable-deferrable</> (Kevin Grittner) + Allow parallel <application>pg_dump</application> to + use <option>--serializable-deferrable</option> (Kevin Grittner) </para> </listitem> @@ -8275,7 +8275,7 @@ Branch: REL9_1_STABLE [2a0bfa4d6] 2015-01-03 20:54:13 +0100 <listitem> <para> - Prevent WAL files created by <literal>pg_basebackup -x/-X</> from + Prevent WAL files created by <literal>pg_basebackup -x/-X</literal> from being archived again when the standby is promoted (Andres Freund) </para> </listitem> @@ -8293,12 +8293,12 @@ Branch: REL9_0_STABLE [dc9a506e6] 2015-01-29 20:18:46 -0500 <listitem> <para> Handle unexpected query results, especially NULLs, safely in - <filename>contrib/tablefunc</>'s <function>connectby()</> + <filename>contrib/tablefunc</filename>'s <function>connectby()</function> (Michael Paquier) </para> <para> - <function>connectby()</> previously crashed if it encountered a NULL + <function>connectby()</function> previously crashed if it encountered a NULL key value. It now prints that row but doesn't recurse further. </para> </listitem> @@ -8392,14 +8392,14 @@ Branch: REL9_4_STABLE [adb355106] 2015-01-14 11:08:17 -0500 <listitem> <para> - Allow <varname>CFLAGS</> from <application>configure</>'s environment - to override automatically-supplied <varname>CFLAGS</> (Tom Lane) + Allow <varname>CFLAGS</varname> from <application>configure</application>'s environment + to override automatically-supplied <varname>CFLAGS</varname> (Tom Lane) </para> <para> - Previously, <application>configure</> would add any switches that it + Previously, <application>configure</application> would add any switches that it chose of its own accord to the end of the - user-specified <varname>CFLAGS</> string. Since most compilers + user-specified <varname>CFLAGS</varname> string. Since most compilers process switches left-to-right, this meant that configure's choices would override the user-specified flags in case of conflicts. That should work the other way around, so adjust the logic to put the @@ -8419,13 +8419,13 @@ Branch: REL9_0_STABLE [338ff75fc] 2015-01-19 23:44:33 -0500 <listitem> <para> - Make <application>pg_regress</> remove any temporary installation it + Make <application>pg_regress</application> remove any temporary installation it created upon successful exit (Tom Lane) </para> <para> This results in a very substantial reduction in disk space usage - during <literal>make check-world</>, since that sequence involves + during <literal>make check-world</literal>, since that sequence involves creation of numerous temporary installations. </para> </listitem> @@ -8451,7 +8451,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> - Update time zone data files to <application>tzdata</> release 2015a + Update time zone data files to <application>tzdata</application> release 2015a for DST law changes in Chile and Mexico, plus historical changes in Iceland. </para> @@ -8474,7 +8474,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <title>Overview</title> <para> - Major enhancements in <productname>PostgreSQL</> 9.4 include: + Major enhancements in <productname>PostgreSQL</productname> 9.4 include: </para> <!-- This list duplicates items below, but without authors or details--> @@ -8483,15 +8483,15 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> - Add <link linkend="datatype-json"><type>jsonb</></link>, a more - capable and efficient data type for storing <acronym>JSON</> data + Add <link linkend="datatype-json"><type>jsonb</type></link>, a more + capable and efficient data type for storing <acronym>JSON</acronym> data </para> </listitem> <listitem> <para> - Add new <acronym>SQL</> command <xref linkend="SQL-ALTERSYSTEM"> - for changing <filename>postgresql.conf</> configuration file entries + Add new <acronym>SQL</acronym> command <xref linkend="SQL-ALTERSYSTEM"> + for changing <filename>postgresql.conf</filename> configuration file entries </para> </listitem> @@ -8504,14 +8504,14 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> - Allow <link linkend="rules-materializedviews">materialized views</> + Allow <link linkend="rules-materializedviews">materialized views</link> to be refreshed without blocking concurrent reads </para> </listitem> <listitem> <para> - Add support for <link linkend="logicaldecoding">logical decoding</> + Add support for <link linkend="logicaldecoding">logical decoding</link> of WAL data, to allow database changes to be streamed out in a customizable format </para> @@ -8519,7 +8519,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> - Allow <link linkend="bgworker">background worker processes</> + Allow <link linkend="bgworker">background worker processes</link> to be dynamically registered, started and terminated </para> </listitem> @@ -8558,14 +8558,14 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <para> Previously, an input array string that started with a single-element sub-array could later contain multi-element sub-arrays, - e.g. <literal>'{{1}, {2,3}}'::int[]</> would be accepted. + e.g. <literal>'{{1}, {2,3}}'::int[]</literal> would be accepted. </para> </listitem> <listitem> <para> - When converting values of type <type>date</>, <type>timestamp</> - or <type>timestamptz</> + When converting values of type <type>date</type>, <type>timestamp</type> + or <type>timestamptz</type> to <link linkend="datatype-json"><type>JSON</type></link>, render the values in a format compliant with ISO 8601 (Andrew Dunstan) </para> @@ -8575,7 +8575,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <xref linkend="guc-datestyle"> setting; but many JSON processors require timestamps to be in ISO 8601 format. If necessary, the previous behavior can be obtained by explicitly casting the datetime - value to <type>text</> before passing it to the JSON conversion + value to <type>text</type> before passing it to the JSON conversion function. </para> </listitem> @@ -8583,15 +8583,15 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> The <link linkend="functions-json-op-table"><type>json</type> - <literal>#></> <type>text[]</></link> path extraction operator now + <literal>#></literal> <type>text[]</type></link> path extraction operator now returns its lefthand input, not NULL, if the array is empty (Tom Lane) </para> <para> This is consistent with the notion that this represents zero applications of the simple field/element extraction - operator <literal>-></>. Similarly, <type>json</type> - <literal>#>></> <type>text[]</> with an empty array merely + operator <literal>-></literal>. Similarly, <type>json</type> + <literal>#>></literal> <type>text[]</type> with an empty array merely coerces its lefthand input to text. </para> </listitem> @@ -8616,26 +8616,26 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> Cause consecutive whitespace in <link - linkend="functions-formatting-table"><function>to_timestamp()</></link> - and <function>to_date()</> format strings to consume a corresponding + linkend="functions-formatting-table"><function>to_timestamp()</function></link> + and <function>to_date()</function> format strings to consume a corresponding number of characters in the input string (whitespace or not), then - conditionally consume adjacent whitespace, if not in <literal>FX</> + conditionally consume adjacent whitespace, if not in <literal>FX</literal> mode (Jeevan Chalke) </para> <para> - Previously, consecutive whitespace characters in a non-<literal>FX</> + Previously, consecutive whitespace characters in a non-<literal>FX</literal> format string behaved like a single whitespace character and consumed all adjacent whitespace in the input string. For example, previously a format string of three spaces would consume only the first space in - <literal>' 12'</>, but it will now consume all three characters. + <literal>' 12'</literal>, but it will now consume all three characters. </para> </listitem> <listitem> <para> Fix <link - linkend="textsearch-functions-table"><function>ts_rank_cd()</></link> + linkend="textsearch-functions-table"><function>ts_rank_cd()</function></link> to ignore stripped lexemes (Alex Hill) </para> @@ -8649,15 +8649,15 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <para> For functions declared to take <link linkend="xfunc-sql-variadic-functions"><literal>VARIADIC - "any"</></link>, an actual parameter marked as <literal>VARIADIC</> + "any"</literal></link>, an actual parameter marked as <literal>VARIADIC</literal> must be of a determinable array type (Pavel Stehule) </para> <para> Such parameters can no longer be written as an undecorated string - literal or <literal>NULL</>; a cast to an appropriate array data type + literal or <literal>NULL</literal>; a cast to an appropriate array data type will now be required. Note that this does not affect parameters not - marked <literal>VARIADIC</>. + marked <literal>VARIADIC</literal>. </para> </listitem> @@ -8669,8 +8669,8 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 </para> <para> - Constructs like <literal>row_to_json(tab.*)</> now always emit column - names that match the column aliases visible for table <literal>tab</> + Constructs like <literal>row_to_json(tab.*)</literal> now always emit column + names that match the column aliases visible for table <literal>tab</literal> at the point of the call. In previous releases the emitted column names would sometimes be the table's actual column names regardless of any aliases assigned in the query. @@ -8687,7 +8687,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> Rename <link linkend="SQL-EXPLAIN"><command>EXPLAIN - ANALYZE</></link>'s <quote>total runtime</quote> output + ANALYZE</command></link>'s <quote>total runtime</quote> output to <quote>execution time</quote> (Tom Lane) </para> @@ -8699,15 +8699,15 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> - <link linkend="SQL-SHOW"><command>SHOW TIME ZONE</></link> now - outputs simple numeric UTC offsets in <acronym>POSIX</> timezone + <link linkend="SQL-SHOW"><command>SHOW TIME ZONE</command></link> now + outputs simple numeric UTC offsets in <acronym>POSIX</acronym> timezone format (Tom Lane) </para> <para> Previously, such timezone settings were displayed as <link - linkend="datatype-interval-output"><type>interval</></link> values. - The new output is properly interpreted by <command>SET TIME ZONE</> + linkend="datatype-interval-output"><type>interval</type></link> values. + The new output is properly interpreted by <command>SET TIME ZONE</command> when passed as a simple string, whereas the old output required special treatment to be re-parsed correctly. </para> @@ -8716,25 +8716,25 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> Foreign data wrappers that support updating foreign tables must - consider the possible presence of <literal>AFTER ROW</> triggers + consider the possible presence of <literal>AFTER ROW</literal> triggers (Noah Misch) </para> <para> - When an <literal>AFTER ROW</> trigger is present, all columns of the + When an <literal>AFTER ROW</literal> trigger is present, all columns of the table must be returned by updating actions, since the trigger might inspect any or all of them. Previously, foreign tables never had triggers, so the FDW might optimize away fetching columns not mentioned - in the <literal>RETURNING</> clause (if any). + in the <literal>RETURNING</literal> clause (if any). </para> </listitem> <listitem> <para> Prevent <link - linkend="ddl-constraints-check-constraints"><literal>CHECK</></link> + linkend="ddl-constraints-check-constraints"><literal>CHECK</literal></link> constraints from referencing system columns, except - <structfield>tableoid</> (Amit Kapila) + <structfield>tableoid</structfield> (Amit Kapila) </para> <para> @@ -8752,7 +8752,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <para> Previously, there was an undocumented precedence order among - the <literal>recovery_target_<replaceable>xxx</></literal> parameters. + the <literal>recovery_target_<replaceable>xxx</replaceable></literal> parameters. </para> </listitem> @@ -8766,14 +8766,14 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 User commands that did their own quote preservation might need adjustment. This is likely to be an issue for commands used in <xref linkend="guc-archive-command">, <xref linkend="restore-command">, - and <link linkend="sql-copy"><command>COPY TO/FROM PROGRAM</></link>. + and <link linkend="sql-copy"><command>COPY TO/FROM PROGRAM</command></link>. </para> </listitem> <listitem> <para> Remove catalog column <link - linkend="catalog-pg-class"><structfield>pg_class.reltoastidxid</></link> + linkend="catalog-pg-class"><structfield>pg_class.reltoastidxid</structfield></link> (Michael Paquier) </para> </listitem> @@ -8781,33 +8781,33 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> Remove catalog column <link - linkend="catalog-pg-rewrite"><structfield>pg_rewrite.ev_attr</></link> + linkend="catalog-pg-rewrite"><structfield>pg_rewrite.ev_attr</structfield></link> (Kevin Grittner) </para> <para> Per-column rules have not been supported since - <application>PostgreSQL</> 7.3. + <application>PostgreSQL</application> 7.3. </para> </listitem> <listitem> <para> - Remove native support for <application>Kerberos</> authentication - (<option>--with-krb5</>, etc) + Remove native support for <application>Kerberos</application> authentication + (<option>--with-krb5</option>, etc) (Magnus Hagander) </para> <para> - The supported way to use <application>Kerberos</> authentication is - with <acronym>GSSAPI</>. The native code has been deprecated since - <productname>PostgreSQL</> 8.3. + The supported way to use <application>Kerberos</application> authentication is + with <acronym>GSSAPI</acronym>. The native code has been deprecated since + <productname>PostgreSQL</productname> 8.3. </para> </listitem> <listitem> <para> - In <application>PL/Python</>, handle domains over arrays like the + In <application>PL/Python</application>, handle domains over arrays like the underlying array type (Rodolfo Campero) </para> @@ -8819,9 +8819,9 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> Make libpq's <link - linkend="libpq-pqconnectdbparams"><function>PQconnectdbParams()</></link> + linkend="libpq-pqconnectdbparams"><function>PQconnectdbParams()</function></link> and <link - linkend="libpq-pqpingparams"><function>PQpingParams()</></link> + linkend="libpq-pqpingparams"><function>PQpingParams()</function></link> functions process zero-length strings as defaults (Adrian Vondendriesch) </para> @@ -8841,20 +8841,20 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <para> Previously, empty arrays were returned as zero-length one-dimensional arrays, whose text representation looked the same as zero-dimensional - arrays (<literal>{}</>), but they acted differently in array - operations. <application>intarray</>'s behavior in this area now + arrays (<literal>{}</literal>), but they acted differently in array + operations. <application>intarray</application>'s behavior in this area now matches the built-in array operators. </para> </listitem> <listitem> <para> - <xref linkend="pgupgrade"> now uses <option>-U</> - or <option>--username</> to specify the user name (Bruce Momjian) + <xref linkend="pgupgrade"> now uses <option>-U</option> + or <option>--username</option> to specify the user name (Bruce Momjian) </para> <para> - Previously this option was spelled <option>-u</> or <option>--user</>, + Previously this option was spelled <option>-u</option> or <option>--user</option>, but that was inconsistent with other tools. </para> </listitem> @@ -8884,7 +8884,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 </para> <para> - The new <filename>worker_spi</> module shows an example of use + The new <filename>worker_spi</filename> module shows an example of use of this feature. </para> </listitem> @@ -8904,7 +8904,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> During crash recovery or immediate shutdown, send uncatchable - termination signals (<systemitem>SIGKILL</>) to child processes + termination signals (<systemitem>SIGKILL</systemitem>) to child processes that do not shut down promptly (MauMau, Álvaro Herrera) </para> @@ -8912,7 +8912,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 This reduces the likelihood of leaving orphaned child processes behind after <xref linkend="app-postmaster"> shutdown, as well as ensuring that crash recovery can proceed if some child processes - have become <quote>stuck</>. + have become <quote>stuck</quote>. </para> </listitem> @@ -8942,13 +8942,13 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> - Reduce <link linkend="GIN"><acronym>GIN</></link> index size + Reduce <link linkend="GIN"><acronym>GIN</acronym></link> index size (Alexander Korotkov, Heikki Linnakangas) </para> <para> Indexes upgraded via <xref linkend="pgupgrade"> will work fine - but will still be in the old, larger <acronym>GIN</> format. + but will still be in the old, larger <acronym>GIN</acronym> format. Use <xref linkend="SQL-REINDEX"> to recreate old GIN indexes in the new format. </para> @@ -8957,16 +8957,16 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> Improve speed of multi-key <link - linkend="GIN"><acronym>GIN</></link> lookups (Alexander Korotkov, + linkend="GIN"><acronym>GIN</acronym></link> lookups (Alexander Korotkov, Heikki Linnakangas) </para> </listitem> <listitem> <para> - Add <link linkend="GiST"><acronym>GiST</></link> index support - for <link linkend="datatype-inet"><type>inet</></link> and - <link linkend="datatype-cidr"><type>cidr</></link> data types + Add <link linkend="GiST"><acronym>GiST</acronym></link> index support + for <link linkend="datatype-inet"><type>inet</type></link> and + <link linkend="datatype-cidr"><type>cidr</type></link> data types (Emre Hasegeli) </para> @@ -9002,7 +9002,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> Allow multiple backends to insert - into <link linkend="wal"><acronym>WAL</></link> buffers + into <link linkend="wal"><acronym>WAL</acronym></link> buffers concurrently (Heikki Linnakangas) </para> @@ -9014,7 +9014,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> Conditionally write only the modified portion of updated rows to - <link linkend="wal"><acronym>WAL</></link> (Amit Kapila) + <link linkend="wal"><acronym>WAL</acronym></link> (Amit Kapila) </para> </listitem> @@ -9029,7 +9029,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> Improve speed of aggregates that - use <link linkend="datatype-numeric"><type>numeric</></link> state + use <link linkend="datatype-numeric"><type>numeric</type></link> state values (Hadi Moshayedi) </para> </listitem> @@ -9039,7 +9039,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 Attempt to <link linkend="vacuum-for-wraparound">freeze</link> tuples when tables are rewritten with <xref linkend="SQL-CLUSTER"> or <link - linkend="SQL-VACUUM"><command>VACUUM FULL</></link> (Robert Haas, + linkend="SQL-VACUUM"><command>VACUUM FULL</command></link> (Robert Haas, Andres Freund) </para> @@ -9051,7 +9051,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> Improve speed of <xref linkend="SQL-COPY"> with default <link - linkend="functions-sequence-table"><function>nextval()</></link> + linkend="functions-sequence-table"><function>nextval()</function></link> columns (Simon Riggs) </para> </listitem> @@ -9073,7 +9073,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> - Reduce memory allocated by <application>PL/pgSQL</> + Reduce memory allocated by <application>PL/pgSQL</application> <xref linkend="SQL-DO"> blocks (Tom Lane) </para> </listitem> @@ -9081,18 +9081,18 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> Make the planner more aggressive about extracting restriction clauses - from mixed <literal>AND</>/<literal>OR</> clauses (Tom Lane) + from mixed <literal>AND</literal>/<literal>OR</literal> clauses (Tom Lane) </para> </listitem> <listitem> <para> - Disallow pushing volatile <literal>WHERE</> clauses down - into <literal>DISTINCT</> subqueries (Tom Lane) + Disallow pushing volatile <literal>WHERE</literal> clauses down + into <literal>DISTINCT</literal> subqueries (Tom Lane) </para> <para> - Pushing down a <literal>WHERE</> clause can produce a more + Pushing down a <literal>WHERE</literal> clause can produce a more efficient plan overall, but at the cost of evaluating the clause more often than is implied by the text of the query; so don't do it if the clause contains any volatile functions. @@ -9122,14 +9122,14 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> Add <xref linkend="pg-stat-archiver-view"> system view to - report <link linkend="wal"><acronym>WAL</></link> archiver activity + report <link linkend="wal"><acronym>WAL</acronym></link> archiver activity (Gabriele Bartolini) </para> </listitem> <listitem> <para> - Add <structfield>n_mod_since_analyze</> columns to + Add <structfield>n_mod_since_analyze</structfield> columns to <xref linkend="pg-stat-all-tables-view"> and related system views (Mark Kirkwood) </para> @@ -9143,9 +9143,9 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> - Add <structfield>backend_xid</> and <structfield>backend_xmin</> + Add <structfield>backend_xid</structfield> and <structfield>backend_xmin</structfield> columns to the system view <xref linkend="pg-stat-activity-view">, - and a <structfield>backend_xmin</> column to + and a <structfield>backend_xmin</structfield> column to <xref linkend="pg-stat-replication-view"> (Christian Kruse) </para> </listitem> @@ -9155,22 +9155,22 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 </sect4> <sect4> - <title><acronym>SSL</></title> + <title><acronym>SSL</acronym></title> <itemizedlist> <listitem> <para> - Add support for <acronym>SSL</> <acronym>ECDH</> key exchange + Add support for <acronym>SSL</acronym> <acronym>ECDH</acronym> key exchange (Marko Kreen) </para> <para> This allows use of Elliptic Curve keys for server authentication. - Such keys are faster and have better security than <acronym>RSA</> + Such keys are faster and have better security than <acronym>RSA</acronym> keys. The new configuration parameter <xref linkend="guc-ssl-ecdh-curve"> - controls which curve is used for <acronym>ECDH</>. + controls which curve is used for <acronym>ECDH</acronym>. </para> </listitem> @@ -9184,14 +9184,14 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> By default, the server not the client now controls the preference - order of <acronym>SSL</> ciphers + order of <acronym>SSL</acronym> ciphers (Marko Kreen) </para> <para> Previously, the order specified by <xref linkend="guc-ssl-ciphers"> was usually ignored in favor of client-side defaults, which are not - configurable in most <productname>PostgreSQL</> clients. If + configurable in most <productname>PostgreSQL</productname> clients. If desired, the old behavior can be restored via the new configuration parameter <xref linkend="guc-ssl-prefer-server-ciphers">. </para> @@ -9199,14 +9199,14 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> - Make <xref linkend="guc-log-connections"> show <acronym>SSL</> + Make <xref linkend="guc-log-connections"> show <acronym>SSL</acronym> encryption information (Andreas Kunert) </para> </listitem> <listitem> <para> - Improve <acronym>SSL</> renegotiation handling (Álvaro + Improve <acronym>SSL</acronym> renegotiation handling (Álvaro Herrera) </para> </listitem> @@ -9222,14 +9222,14 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> - Add new <acronym>SQL</> command <xref linkend="SQL-ALTERSYSTEM"> - for changing <filename>postgresql.conf</> configuration file entries + Add new <acronym>SQL</acronym> command <xref linkend="SQL-ALTERSYSTEM"> + for changing <filename>postgresql.conf</filename> configuration file entries (Amit Kapila) </para> <para> Previously such settings could only be changed by manually - editing <filename>postgresql.conf</>. + editing <filename>postgresql.conf</filename>. </para> </listitem> @@ -9274,7 +9274,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <para> In contrast to <xref linkend="guc-local-preload-libraries">, this parameter can load any shared library, not just those in - the <filename>$libdir/plugins</> directory. + the <filename>$libdir/plugins</filename> directory. </para> </listitem> @@ -9287,7 +9287,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <para> Hint bit changes are not normally logged, except when checksums are enabled. This is useful for external tools - like <application>pg_rewind</>. + like <application>pg_rewind</application>. </para> </listitem> @@ -9320,14 +9320,14 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> - Allow terabyte units (<literal>TB</>) to be used when specifying + Allow terabyte units (<literal>TB</literal>) to be used when specifying configuration variable values (Simon Riggs) </para> </listitem> <listitem> <para> - Show <acronym>PID</>s of lock holders and waiters and improve + Show <acronym>PID</acronym>s of lock holders and waiters and improve information about relations in <xref linkend="guc-log-lock-waits"> log messages (Christian Kruse) </para> @@ -9340,14 +9340,14 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 </para> <para> - The previous level was <literal>LOG</>, which was too verbose + The previous level was <literal>LOG</literal>, which was too verbose for libraries loaded per-session. </para> </listitem> <listitem> <para> - On Windows, make <literal>SQL_ASCII</>-encoded databases and server + On Windows, make <literal>SQL_ASCII</literal>-encoded databases and server processes (e.g., <xref linkend="app-postmaster">) emit messages in the character encoding of the server's Windows user locale (Alexander Law, Noah Misch) @@ -9355,7 +9355,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <para> Previously these messages were output in the Windows - <acronym>ANSI</> code page. + <acronym>ANSI</acronym> code page. </para> </listitem> @@ -9379,7 +9379,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <para> Replication slots allow preservation of resources like - <acronym>WAL</> files on the primary until they are no longer + <acronym>WAL</acronym> files on the primary until they are no longer needed by standby servers. </para> </listitem> @@ -9400,8 +9400,8 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> Add <xref linkend="recovery-target"> - option <option>immediate</> to stop <link - linkend="wal"><acronym>WAL</></link> recovery as soon as a + option <option>immediate</option> to stop <link + linkend="wal"><acronym>WAL</acronym></link> recovery as soon as a consistent state is reached (MauMau, Heikki Linnakangas) </para> </listitem> @@ -9413,7 +9413,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <para> The timestamp reported - by <link linkend="functions-recovery-info-table"><function>pg_last_xact_replay_timestamp()</></link> + by <link linkend="functions-recovery-info-table"><function>pg_last_xact_replay_timestamp()</function></link> now reflects already-committed records, not transactions about to be committed. Recovering to a restore point now replays the restore point, rather than stopping just before the restore point. @@ -9423,34 +9423,34 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> <link - linkend="functions-admin-backup-table"><function>pg_switch_xlog()</></link> - now clears any unused trailing space in the old <acronym>WAL</> file + linkend="functions-admin-backup-table"><function>pg_switch_xlog()</function></link> + now clears any unused trailing space in the old <acronym>WAL</acronym> file (Heikki Linnakangas) </para> <para> - This improves the compression ratio for <acronym>WAL</> files. + This improves the compression ratio for <acronym>WAL</acronym> files. </para> </listitem> <listitem> <para> Report failure return codes from <link - linkend="archive-recovery-settings">external recovery commands</> + linkend="archive-recovery-settings">external recovery commands</link> (Peter Eisentraut) </para> </listitem> <listitem> <para> - Reduce spinlock contention during <acronym>WAL</> replay (Heikki + Reduce spinlock contention during <acronym>WAL</acronym> replay (Heikki Linnakangas) </para> </listitem> <listitem> <para> - Write <acronym>WAL</> records of running transactions more + Write <acronym>WAL</acronym> records of running transactions more frequently (Andres Freund) </para> @@ -9463,12 +9463,12 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 </itemizedlist> <sect4> - <title><link linkend="logicaldecoding">Logical Decoding</></title> + <title><link linkend="logicaldecoding">Logical Decoding</link></title> <para> Logical decoding allows database changes to be streamed in a configurable format. The data is read from - the <link linkend="wal"><acronym>WAL</></link> and transformed into the + the <link linkend="wal"><acronym>WAL</acronym></link> and transformed into the desired target format. To implement this feature, the following changes were made: </para> @@ -9477,7 +9477,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> - Add support for <link linkend="logicaldecoding">logical decoding</> + Add support for <link linkend="logicaldecoding">logical decoding</link> of WAL data, to allow database changes to be streamed out in a customizable format (Andres Freund) @@ -9486,8 +9486,8 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> - Add new <xref linkend="guc-wal-level"> setting <option>logical</> - to enable logical change-set encoding in <acronym>WAL</> (Andres + Add new <xref linkend="guc-wal-level"> setting <option>logical</option> + to enable logical change-set encoding in <acronym>WAL</acronym> (Andres Freund) </para> </listitem> @@ -9495,7 +9495,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> Add table-level parameter <link - linkend="catalog-pg-class"><literal>REPLICA IDENTITY</></link> + linkend="catalog-pg-class"><literal>REPLICA IDENTITY</literal></link> to control logical replication (Andres Freund) </para> </listitem> @@ -9503,7 +9503,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> Add relation option <link - linkend="SQL-CREATETABLE-storage-parameters"><option>user_catalog_table</></link> + linkend="SQL-CREATETABLE-storage-parameters"><option>user_catalog_table</option></link> to identify user-created tables involved in logical change-set encoding (Andres Freund) </para> @@ -9519,7 +9519,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> Add <xref linkend="test-decoding"> module to illustrate logical - decoding at the <acronym>SQL</> level (Andres Freund) + decoding at the <acronym>SQL</acronym> level (Andres Freund) </para> </listitem> @@ -9537,22 +9537,22 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> Add <link linkend="queries-tablefunctions"><literal>WITH - ORDINALITY</></link> syntax to number the rows returned from a - set-returning function in the <literal>FROM</> clause + ORDINALITY</literal></link> syntax to number the rows returned from a + set-returning function in the <literal>FROM</literal> clause (Andrew Gierth, David Fetter) </para> <para> This is particularly useful for functions like - <function>unnest()</>. + <function>unnest()</function>. </para> </listitem> <listitem> <para> Add <link linkend="queries-tablefunctions"><literal>ROWS - FROM()</></link> syntax to allow horizontal concatenation of - set-returning functions in the <literal>FROM</> clause (Andrew Gierth) + FROM()</literal></link> syntax to allow horizontal concatenation of + set-returning functions in the <literal>FROM</literal> clause (Andrew Gierth) </para> </listitem> @@ -9571,7 +9571,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> Ensure that <link linkend="SQL-SELECT"><literal>SELECT ... FOR UPDATE - NOWAIT</></link> does not wait in corner cases involving + NOWAIT</literal></link> does not wait in corner cases involving already-concurrently-updated tuples (Craig Ringer and Thomas Munro) </para> </listitem> @@ -9588,21 +9588,21 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> Add <link linkend="SQL-DISCARD"><command>DISCARD - SEQUENCES</></link> command to discard cached sequence-related state + SEQUENCES</command></link> command to discard cached sequence-related state (Fabrízio de Royes Mello, Robert Haas) </para> <para> - <command>DISCARD ALL</> will now also discard such information. + <command>DISCARD ALL</command> will now also discard such information. </para> </listitem> <listitem> <para> - Add <literal>FORCE NULL</> option - to <link linkend="SQL-COPY"><command>COPY FROM</></link>, which + Add <literal>FORCE NULL</literal> option + to <link linkend="SQL-COPY"><command>COPY FROM</command></link>, which causes quoted strings matching the specified null string to be - converted to NULLs in <literal>CSV</> mode (Ian Barwick, Michael + converted to NULLs in <literal>CSV</literal> mode (Ian Barwick, Michael Paquier) </para> @@ -9620,8 +9620,8 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <para> New warnings are issued for <command>SET - LOCAL</>, <command>SET CONSTRAINTS</>, <command>SET TRANSACTION</> and - <command>ABORT</> when used outside a transaction block. + LOCAL</command>, <command>SET CONSTRAINTS</command>, <command>SET TRANSACTION</command> and + <command>ABORT</command> when used outside a transaction block. </para> </listitem> @@ -9634,21 +9634,21 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> - Make <command>EXPLAIN ANALYZE</> show planning time (Andreas + Make <command>EXPLAIN ANALYZE</command> show planning time (Andreas Karlsson) </para> </listitem> <listitem> <para> - Make <command>EXPLAIN</> show the grouping columns in Agg and + Make <command>EXPLAIN</command> show the grouping columns in Agg and Group nodes (Tom Lane) </para> </listitem> <listitem> <para> - Make <command>EXPLAIN ANALYZE</> show exact and lossy + Make <command>EXPLAIN ANALYZE</command> show exact and lossy block counts in bitmap heap scans (Etsuro Fujita) </para> </listitem> @@ -9664,7 +9664,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> - Allow a <link linkend="rules-materializedviews">materialized view</> + Allow a <link linkend="rules-materializedviews">materialized view</link> to be refreshed without blocking other sessions from reading the view meanwhile (Kevin Grittner) </para> @@ -9672,7 +9672,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <para> This is done with <link linkend="SQL-REFRESHMATERIALIZEDVIEW"><command>REFRESH MATERIALIZED - VIEW CONCURRENTLY</></link>. + VIEW CONCURRENTLY</command></link>. </para> </listitem> @@ -9687,28 +9687,28 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <para> Previously the presence of non-updatable output columns such as expressions, literals, and function calls prevented automatic - updates. Now <command>INSERT</>s, <command>UPDATE</>s and - <command>DELETE</>s are supported, provided that they do not + updates. Now <command>INSERT</command>s, <command>UPDATE</command>s and + <command>DELETE</command>s are supported, provided that they do not attempt to assign new values to any of the non-updatable columns. </para> </listitem> <listitem> <para> - Allow control over whether <command>INSERT</>s and - <command>UPDATE</>s can add rows to an auto-updatable view that + Allow control over whether <command>INSERT</command>s and + <command>UPDATE</command>s can add rows to an auto-updatable view that would not appear in the view (Dean Rasheed) </para> <para> This is controlled with the new <xref linkend="SQL-CREATEVIEW"> - clause <literal>WITH CHECK OPTION</>. + clause <literal>WITH CHECK OPTION</literal>. </para> </listitem> <listitem> <para> - Allow <link linkend="rules-privileges">security barrier views</> + Allow <link linkend="rules-privileges">security barrier views</link> to be automatically updatable (Dean Rasheed) </para> </listitem> @@ -9727,14 +9727,14 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> Support triggers on <link linkend="SQL-CREATEFOREIGNTABLE">foreign - tables</> (Ronan Dunklau) + tables</link> (Ronan Dunklau) </para> </listitem> <listitem> <para> Allow moving groups of objects from one tablespace to another - using the <literal>ALL IN TABLESPACE ... SET TABLESPACE</> form of + using the <literal>ALL IN TABLESPACE ... SET TABLESPACE</literal> form of <xref linkend="SQL-ALTERTABLE">, <xref linkend="SQL-ALTERINDEX">, or <xref linkend="SQL-ALTERMATERIALIZEDVIEW"> (Stephen Frost) </para> @@ -9744,7 +9744,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <para> Allow changing foreign key constraint deferrability via <xref linkend="SQL-ALTERTABLE"> ... <literal>ALTER - CONSTRAINT</> (Simon Riggs) + CONSTRAINT</literal> (Simon Riggs) </para> </listitem> @@ -9756,12 +9756,12 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 </para> <para> - Specifically, <literal>VALIDATE CONSTRAINT</>, <literal>CLUSTER - ON</>, <literal>SET WITHOUT CLUSTER</>, <literal>ALTER COLUMN - SET STATISTICS</>, <literal>ALTER COLUMN</> <literal>SET</> - <option>(attribute_option)</>, <literal>ALTER COLUMN RESET</> - <option>(attribute_option)</> no longer require <literal>ACCESS - EXCLUSIVE</> locks. + Specifically, <literal>VALIDATE CONSTRAINT</literal>, <literal>CLUSTER + ON</literal>, <literal>SET WITHOUT CLUSTER</literal>, <literal>ALTER COLUMN + SET STATISTICS</literal>, <literal>ALTER COLUMN</literal> <literal>SET</literal> + <option>(attribute_option)</option>, <literal>ALTER COLUMN RESET</literal> + <option>(attribute_option)</option> no longer require <literal>ACCESS + EXCLUSIVE</literal> locks. </para> </listitem> @@ -9791,7 +9791,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> - Fix <command>DROP IF EXISTS</> to avoid errors for non-existent + Fix <command>DROP IF EXISTS</command> to avoid errors for non-existent objects in more cases (Pavel Stehule, Dean Rasheed) </para> </listitem> @@ -9803,7 +9803,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 </para> <para> - Previously, relations once moved into the <literal>pg_catalog</> + Previously, relations once moved into the <literal>pg_catalog</literal> schema could no longer be modified or dropped. </para> </listitem> @@ -9820,14 +9820,14 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> Fully implement the <link - linkend="datatype-line"><type>line</></link> data type (Peter + linkend="datatype-line"><type>line</type></link> data type (Peter Eisentraut) </para> <para> - The line <emphasis>segment</> data type (<link - linkend="datatype-lseg"><type>lseg</></link>) has always been - fully supported. The previous <type>line</> data type (which was + The line <emphasis>segment</emphasis> data type (<link + linkend="datatype-lseg"><type>lseg</type></link>) has always been + fully supported. The previous <type>line</type> data type (which was enabled only via a compile-time option) is not binary or dump-compatible with the new implementation. </para> @@ -9835,17 +9835,17 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> - Add <link linkend="datatype-pg-lsn"><type>pg_lsn</></link> - data type to represent a <acronym>WAL</> log sequence number - (<acronym>LSN</>) (Robert Haas, Michael Paquier) + Add <link linkend="datatype-pg-lsn"><type>pg_lsn</type></link> + data type to represent a <acronym>WAL</acronym> log sequence number + (<acronym>LSN</acronym>) (Robert Haas, Michael Paquier) </para> </listitem> <listitem> <para> Allow single-point <link - linkend="datatype-polygon"><type>polygon</></link>s to be converted - to <link linkend="datatype-circle"><type>circle</></link>s + linkend="datatype-polygon"><type>polygon</type></link>s to be converted + to <link linkend="datatype-circle"><type>circle</type></link>s (Bruce Momjian) </para> </listitem> @@ -9857,31 +9857,31 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 </para> <para> - Previously, <productname>PostgreSQL</> assumed that the UTC offset - associated with a time zone abbreviation (such as <literal>EST</>) + Previously, <productname>PostgreSQL</productname> assumed that the UTC offset + associated with a time zone abbreviation (such as <literal>EST</literal>) never changes in the usage of any particular locale. However this assumption fails in the real world, so introduce the ability for a zone abbreviation to represent a UTC offset that sometimes changes. Update the zone abbreviation definition files to make use of this feature in timezone locales that have changed the UTC offset of their abbreviations since 1970 (according to the IANA timezone database). - In such timezones, <productname>PostgreSQL</> will now associate the + In such timezones, <productname>PostgreSQL</productname> will now associate the correct UTC offset with the abbreviation depending on the given date. </para> </listitem> <listitem> <para> - Allow 5+ digit years for non-<acronym>ISO</> <link - linkend="datatype-datetime"><type>timestamp</></link> and - <type>date</> strings, where appropriate (Bruce Momjian) + Allow 5+ digit years for non-<acronym>ISO</acronym> <link + linkend="datatype-datetime"><type>timestamp</type></link> and + <type>date</type> strings, where appropriate (Bruce Momjian) </para> </listitem> <listitem> <para> Add checks for overflow/underflow of <link - linkend="datatype-datetime"><type>interval</></link> values + linkend="datatype-datetime"><type>interval</type></link> values (Bruce Momjian) </para> </listitem> @@ -9889,14 +9889,14 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 </itemizedlist> <sect4> - <title><link linkend="datatype-json"><acronym>JSON</></link></title> + <title><link linkend="datatype-json"><acronym>JSON</acronym></link></title> <itemizedlist> <listitem> <para> - Add <link linkend="datatype-json"><type>jsonb</></link>, a more - capable and efficient data type for storing <acronym>JSON</> data + Add <link linkend="datatype-json"><type>jsonb</type></link>, a more + capable and efficient data type for storing <acronym>JSON</acronym> data (Oleg Bartunov, Teodor Sigaev, Alexander Korotkov, Peter Geoghegan, Andrew Dunstan) </para> @@ -9904,9 +9904,9 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <para> This new type allows faster access to values within a JSON document, and faster and more useful indexing of JSON columns. - Scalar values in <type>jsonb</> documents are stored as appropriate + Scalar values in <type>jsonb</type> documents are stored as appropriate scalar SQL types, and the JSON document structure is pre-parsed - rather than being stored as text as in the original <type>json</> + rather than being stored as text as in the original <type>json</type> data type. </para> </listitem> @@ -9919,18 +9919,18 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <para> New functions include <link - linkend="functions-json-processing-table"><function>json_array_elements_text()</></link>, - <function>json_build_array()</>, <function>json_object()</>, - <function>json_object_agg()</>, <function>json_to_record()</>, - and <function>json_to_recordset()</>. + linkend="functions-json-processing-table"><function>json_array_elements_text()</function></link>, + <function>json_build_array()</function>, <function>json_object()</function>, + <function>json_object_agg()</function>, <function>json_to_record()</function>, + and <function>json_to_recordset()</function>. </para> </listitem> <listitem> <para> Add <link - linkend="functions-json-processing-table"><function>json_typeof()</></link> - to return the data type of a <type>json</> value (Andrew Tipton) + linkend="functions-json-processing-table"><function>json_typeof()</function></link> + to return the data type of a <type>json</type> value (Andrew Tipton) </para> </listitem> @@ -9948,13 +9948,13 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> Add <link - linkend="functions-datetime-delay"><function>pg_sleep_for(interval)</></link> - and <function>pg_sleep_until(timestamp)</> to specify + linkend="functions-datetime-delay"><function>pg_sleep_for(interval)</function></link> + and <function>pg_sleep_until(timestamp)</function> to specify delays more flexibly (Vik Fearing, Julien Rouhaud) </para> <para> - The existing <function>pg_sleep()</> function only supports delays + The existing <function>pg_sleep()</function> function only supports delays specified in seconds. </para> </listitem> @@ -9962,7 +9962,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> Add <link - linkend="array-functions-table"><function>cardinality()</></link> + linkend="array-functions-table"><function>cardinality()</function></link> function for arrays (Marko Tiikkaja) </para> @@ -9974,7 +9974,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> - Add <acronym>SQL</> functions to allow <link linkend="lo-funcs">large + Add <acronym>SQL</acronym> functions to allow <link linkend="lo-funcs">large object reads/writes</link> at arbitrary offsets (Pavel Stehule) </para> </listitem> @@ -9982,7 +9982,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> Allow <link - linkend="array-functions-table"><function>unnest()</></link> + linkend="array-functions-table"><function>unnest()</function></link> to take multiple arguments, which are individually unnested then horizontally concatenated (Andrew Gierth) </para> @@ -9990,36 +9990,36 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> - Add functions to construct <type>time</>s, <type>date</>s, - <type>timestamp</>s, <type>timestamptz</>s, and <type>interval</>s + Add functions to construct <type>time</type>s, <type>date</type>s, + <type>timestamp</type>s, <type>timestamptz</type>s, and <type>interval</type>s from individual values, rather than strings (Pavel Stehule) </para> <para> - These functions' names are prefixed with <literal>make_</>, - e.g. <link linkend="functions-datetime-table"><function>make_date()</></link>. + These functions' names are prefixed with <literal>make_</literal>, + e.g. <link linkend="functions-datetime-table"><function>make_date()</function></link>. </para> </listitem> <listitem> <para> Make <link - linkend="functions-formatting-table"><function>to_char()</></link>'s - <literal>TZ</> format specifier return a useful value for simple + linkend="functions-formatting-table"><function>to_char()</function></link>'s + <literal>TZ</literal> format specifier return a useful value for simple numeric time zone offsets (Tom Lane) </para> <para> - Previously, <literal>to_char(CURRENT_TIMESTAMP, 'TZ')</> returned - an empty string if the <literal>timezone</> was set to a constant - like <literal>-4</>. + Previously, <literal>to_char(CURRENT_TIMESTAMP, 'TZ')</literal> returned + an empty string if the <literal>timezone</literal> was set to a constant + like <literal>-4</literal>. </para> </listitem> <listitem> <para> - Add timezone offset format specifier <literal>OF</> to <link - linkend="functions-formatting-table"><function>to_char()</></link> + Add timezone offset format specifier <literal>OF</literal> to <link + linkend="functions-formatting-table"><function>to_char()</function></link> (Bruce Momjian) </para> </listitem> @@ -10027,7 +10027,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> Improve the random seed used for <link - linkend="functions-math-random-table"><function>random()</></link> + linkend="functions-math-random-table"><function>random()</function></link> (Honza Horak) </para> </listitem> @@ -10035,7 +10035,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> Tighten validity checking for Unicode code points in <link - linkend="functions-string-other"><function>chr(int)</></link> + linkend="functions-string-other"><function>chr(int)</function></link> (Tom Lane) </para> @@ -10054,18 +10054,18 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> - Add functions for looking up objects in <structname>pg_class</>, - <structname>pg_proc</>, <structname>pg_type</>, and - <structname>pg_operator</> that do not generate errors for + Add functions for looking up objects in <structname>pg_class</structname>, + <structname>pg_proc</structname>, <structname>pg_type</structname>, and + <structname>pg_operator</structname> that do not generate errors for non-existent objects (Yugo Nagata, Nozomi Anzai, Robert Haas) </para> <para> For example, <link - linkend="functions-info-catalog-table"><function>to_regclass()</></link> - does a lookup in <structname>pg_class</> similarly to - the <type>regclass</> input function, but it returns NULL for a + linkend="functions-info-catalog-table"><function>to_regclass()</function></link> + does a lookup in <structname>pg_class</structname> similarly to + the <type>regclass</type> input function, but it returns NULL for a non-existent object instead of failing. </para> </listitem> @@ -10073,7 +10073,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> Add function <link - linkend="functions-admin-dblocation"><function>pg_filenode_relation()</></link> + linkend="functions-admin-dblocation"><function>pg_filenode_relation()</function></link> to allow for more efficient lookup of relation names from filenodes (Andres Freund) </para> @@ -10081,8 +10081,8 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> - Add <structfield>parameter_default</> column to <link - linkend="infoschema-parameters"><structname>information_schema.parameters</></link> + Add <structfield>parameter_default</structfield> column to <link + linkend="infoschema-parameters"><structname>information_schema.parameters</structname></link> view (Peter Eisentraut) </para> </listitem> @@ -10090,7 +10090,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> Make <link - linkend="infoschema-schemata"><structname>information_schema.schemata</></link> + linkend="infoschema-schemata"><structname>information_schema.schemata</structname></link> show all accessible schemas (Peter Eisentraut) </para> @@ -10112,7 +10112,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <para> Add control over which rows are passed into aggregate functions via the <link - linkend="syntax-aggregates"><literal>FILTER</></link> clause + linkend="syntax-aggregates"><literal>FILTER</literal></link> clause (David Fetter) </para> </listitem> @@ -10120,7 +10120,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> Support ordered-set (<link - linkend="syntax-aggregates"><literal>WITHIN GROUP</></link>) + linkend="syntax-aggregates"><literal>WITHIN GROUP</literal></link>) aggregates (Atri Sharma, Andrew Gierth, Tom Lane) </para> </listitem> @@ -10128,11 +10128,11 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> Add standard ordered-set aggregates <link - linkend="functions-orderedset-table"><function>percentile_cont()</></link>, - <function>percentile_disc()</>, <function>mode()</>, <link - linkend="functions-hypothetical-table"><function>rank()</></link>, - <function>dense_rank()</>, <function>percent_rank()</>, and - <function>cume_dist()</> + linkend="functions-orderedset-table"><function>percentile_cont()</function></link>, + <function>percentile_disc()</function>, <function>mode()</function>, <link + linkend="functions-hypothetical-table"><function>rank()</function></link>, + <function>dense_rank()</function>, <function>percent_rank()</function>, and + <function>cume_dist()</function> (Atri Sharma, Andrew Gierth) </para> </listitem> @@ -10140,7 +10140,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> Support <link - linkend="xfunc-sql-variadic-functions"><literal>VARIADIC</></link> + linkend="xfunc-sql-variadic-functions"><literal>VARIADIC</literal></link> aggregate functions (Tom Lane) </para> </listitem> @@ -10152,7 +10152,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 </para> <para> This allows proper declaration in SQL of aggregates like the built-in - aggregate <function>array_agg()</>. + aggregate <function>array_agg()</function>. </para> </listitem> @@ -10169,20 +10169,20 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> - Add event trigger support to <link linkend="plperl">PL/Perl</> - and <link linkend="pltcl">PL/Tcl</> (Dimitri Fontaine) + Add event trigger support to <link linkend="plperl">PL/Perl</link> + and <link linkend="pltcl">PL/Tcl</link> (Dimitri Fontaine) </para> </listitem> <listitem> <para> - Convert <link linkend="datatype-numeric"><type>numeric</></link> - values to <type>decimal</> in <link linkend="plpython">PL/Python</link> + Convert <link linkend="datatype-numeric"><type>numeric</type></link> + values to <type>decimal</type> in <link linkend="plpython">PL/Python</link> (Szymon Guz, Ronan Dunklau) </para> <para> - Previously such values were converted to Python <type>float</> values, + Previously such values were converted to Python <type>float</type> values, risking loss of precision. </para> </listitem> @@ -10198,7 +10198,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <para> Add ability to retrieve the current PL/pgSQL call stack using <link linkend="plpgsql-call-stack"><command>GET - DIAGNOSTICS</></link> + DIAGNOSTICS</command></link> (Pavel Stehule, Stephen Frost) </para> </listitem> @@ -10206,17 +10206,17 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> Add option <link - linkend="plpgsql-statements-sql-onerow"><option>print_strict_params</></link> + linkend="plpgsql-statements-sql-onerow"><option>print_strict_params</option></link> to display the parameters passed to a query that violated a - <literal>STRICT</> constraint (Marko Tiikkaja) + <literal>STRICT</literal> constraint (Marko Tiikkaja) </para> </listitem> <listitem> <para> Add variables <link - linkend="plpgsql-extra-checks"><varname>plpgsql.extra_warnings</></link> - and <varname>plpgsql.extra_errors</> to enable additional PL/pgSQL + linkend="plpgsql-extra-checks"><varname>plpgsql.extra_warnings</varname></link> + and <varname>plpgsql.extra_errors</varname> to enable additional PL/pgSQL warnings and errors (Marko Tiikkaja, Petr Jelinek) </para> @@ -10232,13 +10232,13 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 </sect3> <sect3> - <title><link linkend="libpq"><application>libpq</></link></title> + <title><link linkend="libpq"><application>libpq</application></link></title> <itemizedlist> <listitem> <para> Make libpq's <link - linkend="libpq-pqconndefaults"><function>PQconndefaults()</></link> + linkend="libpq-pqconndefaults"><function>PQconndefaults()</function></link> function ignore invalid service files (Steve Singer, Bruce Momjian) </para> @@ -10250,7 +10250,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> - Accept <acronym>TLS</> protocol versions beyond <literal>TLSv1</> + Accept <acronym>TLS</acronym> protocol versions beyond <literal>TLSv1</literal> in libpq (Marko Kreen) </para> </listitem> @@ -10266,7 +10266,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> - Add <xref linkend="APP-CREATEUSER"> option <option>-g</> + Add <xref linkend="APP-CREATEUSER"> option <option>-g</option> to specify role membership (Christopher Browne) </para> </listitem> @@ -10274,7 +10274,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> Add <xref linkend="APP-VACUUMDB"> - option <option>--analyze-in-stages</> to analyze in stages of + option <option>--analyze-in-stages</option> to analyze in stages of increasing granularity (Peter Eisentraut) </para> @@ -10285,8 +10285,8 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> - Make <link linkend="app-pgresetwal"><application>pg_resetxlog</></> - with option <option>-n</> output current and potentially changed + Make <link linkend="app-pgresetwal"><application>pg_resetxlog</application></link> + with option <option>-n</option> output current and potentially changed values (Rajeev Rastogi) </para> </listitem> @@ -10301,19 +10301,19 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> - Make <xref linkend="app-pg-ctl"> return exit code <literal>4</> for + Make <xref linkend="app-pg-ctl"> return exit code <literal>4</literal> for an inaccessible data directory (Amit Kapila, Bruce Momjian) </para> <para> This behavior more closely matches the Linux Standard Base - (<acronym>LSB</>) Core Specification. + (<acronym>LSB</acronym>) Core Specification. </para> </listitem> <listitem> <para> - On Windows, ensure that a non-absolute <option>-D</> path + On Windows, ensure that a non-absolute <option>-D</option> path specification is interpreted relative to <xref linkend="app-pg-ctl">'s current directory (Kumar Rajeev Rastogi) @@ -10327,7 +10327,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> - Allow <function>sizeof()</> in <link linkend="ecpg">ECPG</link> + Allow <function>sizeof()</function> in <link linkend="ecpg">ECPG</link> C array definitions (Michael Meskes) </para> </listitem> @@ -10335,7 +10335,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> Make <link linkend="ecpg">ECPG</link> properly handle nesting - of C-style comments in both C and <acronym>SQL</> text + of C-style comments in both C and <acronym>SQL</acronym> text (Michael Meskes) </para> </listitem> @@ -10349,15 +10349,15 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> - Suppress <quote>No rows</quote> output in <application>psql</> <link - linkend="APP-PSQL-meta-commands"><option>expanded</></link> + Suppress <quote>No rows</quote> output in <application>psql</application> <link + linkend="APP-PSQL-meta-commands"><option>expanded</option></link> mode when the footer is disabled (Bruce Momjian) </para> </listitem> <listitem> <para> - Allow Control-C to abort <application>psql</> when it's hung at + Allow Control-C to abort <application>psql</application> when it's hung at connection startup (Peter Eisentraut) </para> </listitem> @@ -10371,22 +10371,22 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> - Make <application>psql</>'s <command>\db+</> show tablespace options + Make <application>psql</application>'s <command>\db+</command> show tablespace options (Magnus Hagander) </para> </listitem> <listitem> <para> - Make <command>\do+</> display the functions + Make <command>\do+</command> display the functions that implement the operators (Marko Tiikkaja) </para> </listitem> <listitem> <para> - Make <command>\d+</> output an - <literal>OID</> line only if an <literal>oid</literal> column + Make <command>\d+</command> output an + <literal>OID</literal> line only if an <literal>oid</literal> column exists in the table (Bruce Momjian) </para> @@ -10398,7 +10398,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> - Make <command>\d</> show disabled system triggers (Bruce + Make <command>\d</command> show disabled system triggers (Bruce Momjian) </para> @@ -10410,55 +10410,55 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> - Fix <command>\copy</> to no longer require - a space between <literal>stdin</> and a semicolon (Etsuro Fujita) + Fix <command>\copy</command> to no longer require + a space between <literal>stdin</literal> and a semicolon (Etsuro Fujita) </para> </listitem> <listitem> <para> - Output the row count at the end of <command>\copy</>, just - like <command>COPY</> already did (Kumar Rajeev Rastogi) + Output the row count at the end of <command>\copy</command>, just + like <command>COPY</command> already did (Kumar Rajeev Rastogi) </para> </listitem> <listitem> <para> - Fix <command>\conninfo</> to display the - server's <acronym>IP</> address for connections using - <literal>hostaddr</> (Fujii Masao) + Fix <command>\conninfo</command> to display the + server's <acronym>IP</acronym> address for connections using + <literal>hostaddr</literal> (Fujii Masao) </para> <para> - Previously <command>\conninfo</> could not display the server's - <acronym>IP</> address in such cases. + Previously <command>\conninfo</command> could not display the server's + <acronym>IP</acronym> address in such cases. </para> </listitem> <listitem> <para> - Show the <acronym>SSL</> protocol version in - <command>\conninfo</> (Marko Kreen) + Show the <acronym>SSL</acronym> protocol version in + <command>\conninfo</command> (Marko Kreen) </para> </listitem> <listitem> <para> - Add tab completion for <command>\pset</> + Add tab completion for <command>\pset</command> (Pavel Stehule) </para> </listitem> <listitem> <para> - Allow <command>\pset</> with no arguments + Allow <command>\pset</command> with no arguments to show all settings (Gilles Darold) </para> </listitem> <listitem> <para> - Make <command>\s</> display the name of the history file it wrote + Make <command>\s</command> display the name of the history file it wrote without converting it to an absolute path (Tom Lane) </para> @@ -10482,7 +10482,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> Allow <xref linkend="APP-PGRESTORE"> options - <option>-I</>, <option>-P</>, <option>-T</> and <option>-n</> + <option>-I</option>, <option>-P</option>, <option>-T</option> and <option>-n</option> to be specified multiple times (Heikki Linnakangas) </para> @@ -10493,17 +10493,17 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> - Optionally add <literal>IF EXISTS</> clauses to the <command>DROP</> + Optionally add <literal>IF EXISTS</literal> clauses to the <command>DROP</command> commands emitted when removing old objects during a restore (Pavel Stehule) </para> <para> This change prevents unnecessary errors when removing old objects. - The new <option>--if-exists</> option + The new <option>--if-exists</option> option for <xref linkend="APP-PGDUMP">, <xref linkend="APP-PG-DUMPALL">, and <xref linkend="APP-PGRESTORE"> is only available - when <option>--clean</> is also specified. + when <option>--clean</option> is also specified. </para> </listitem> @@ -10518,20 +10518,20 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> - Add <application>pg_basebackup</> option <option>--xlogdir</> - to specify the <filename>pg_xlog</> directory location (Haribabu + Add <application>pg_basebackup</application> option <option>--xlogdir</option> + to specify the <filename>pg_xlog</filename> directory location (Haribabu Kommi) </para> </listitem> <listitem> <para> - Allow <application>pg_basebackup</> to relocate tablespaces in + Allow <application>pg_basebackup</application> to relocate tablespaces in the backup copy (Steeve Lennmark) </para> <para> - This is particularly useful for using <application>pg_basebackup</> + This is particularly useful for using <application>pg_basebackup</application> on the same machine as the primary. </para> </listitem> @@ -10542,8 +10542,8 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 </para> <para> - This can be controlled with the <application>pg_basebackup</> - <option>--max-rate</> parameter. + This can be controlled with the <application>pg_basebackup</application> + <option>--max-rate</option> parameter. </para> </listitem> @@ -10574,13 +10574,13 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> No longer require function prototypes for functions marked with the - <link linkend="xfunc-c"><function>PG_FUNCTION_INFO_V1</></link> + <link linkend="xfunc-c"><function>PG_FUNCTION_INFO_V1</function></link> macro (Peter Eisentraut) </para> <para> This change eliminates the need to write boilerplate prototypes. - Note that the <function>PG_FUNCTION_INFO_V1</> macro must appear + Note that the <function>PG_FUNCTION_INFO_V1</function> macro must appear before the corresponding function definition to avoid compiler warnings. </para> @@ -10588,41 +10588,41 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> - Remove <varname>SnapshotNow</> and - <function>HeapTupleSatisfiesNow()</> (Robert Haas) + Remove <varname>SnapshotNow</varname> and + <function>HeapTupleSatisfiesNow()</function> (Robert Haas) </para> <para> All existing uses have been switched to more appropriate snapshot - types. Catalog scans now use <acronym>MVCC</> snapshots. + types. Catalog scans now use <acronym>MVCC</acronym> snapshots. </para> </listitem> <listitem> <para> - Add an <acronym>API</> to allow memory allocations over one gigabyte + Add an <acronym>API</acronym> to allow memory allocations over one gigabyte (Noah Misch) </para> </listitem> <listitem> <para> - Add <function>psprintf()</> to simplify memory allocation during + Add <function>psprintf()</function> to simplify memory allocation during string composition (Peter Eisentraut, Tom Lane) </para> </listitem> <listitem> <para> - Support <function>printf()</> size modifier <literal>z</> to - print <type>size_t</> values (Andres Freund) + Support <function>printf()</function> size modifier <literal>z</literal> to + print <type>size_t</type> values (Andres Freund) </para> </listitem> <listitem> <para> - Change <acronym>API</> of <function>appendStringInfoVA()</> - to better use <function>vsnprintf()</> (David Rowley, Tom Lane) + Change <acronym>API</acronym> of <function>appendStringInfoVA()</function> + to better use <function>vsnprintf()</function> (David Rowley, Tom Lane) </para> </listitem> @@ -10642,7 +10642,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> - Improve spinlock speed on x86_64 <acronym>CPU</>s (Heikki + Improve spinlock speed on x86_64 <acronym>CPU</acronym>s (Heikki Linnakangas) </para> </listitem> @@ -10650,56 +10650,56 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> Remove spinlock support for unsupported platforms - <productname>SINIX</>, <productname>Sun3</>, and - <productname>NS32K</> (Robert Haas) + <productname>SINIX</productname>, <productname>Sun3</productname>, and + <productname>NS32K</productname> (Robert Haas) </para> </listitem> <listitem> <para> - Remove <acronym>IRIX</> port (Robert Haas) + Remove <acronym>IRIX</acronym> port (Robert Haas) </para> </listitem> <listitem> <para> Reduce the number of semaphores required by - <option>--disable-spinlocks</> builds (Robert Haas) + <option>--disable-spinlocks</option> builds (Robert Haas) </para> </listitem> <listitem> <para> - Rewrite <application>duplicate_oids</> Unix shell script in - <application>Perl</> (Andrew Dunstan) + Rewrite <application>duplicate_oids</application> Unix shell script in + <application>Perl</application> (Andrew Dunstan) </para> </listitem> <listitem> <para> - Add Test Anything Protocol (<acronym>TAP</>) tests for client + Add Test Anything Protocol (<acronym>TAP</acronym>) tests for client programs (Peter Eisentraut) </para> <para> - Currently, these tests are run by <literal>make check-world</> - only if the <option>--enable-tap-tests</> option was given - to <application>configure</>. + Currently, these tests are run by <literal>make check-world</literal> + only if the <option>--enable-tap-tests</option> option was given + to <application>configure</application>. This might become the default behavior in some future release. </para> </listitem> <listitem> <para> - Add make targets <option>check-tests</> and - <option>installcheck-tests</>, which allow selection of individual + Add make targets <option>check-tests</option> and + <option>installcheck-tests</option>, which allow selection of individual tests to be run (Andrew Dunstan) </para> </listitem> <listitem> <para> - Remove <option>maintainer-check</> makefile rule (Peter Eisentraut) + Remove <option>maintainer-check</option> makefile rule (Peter Eisentraut) </para> <para> @@ -10709,7 +10709,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> - Improve support for <envar>VPATH</> builds of <acronym>PGXS</> + Improve support for <envar>VPATH</envar> builds of <acronym>PGXS</acronym> modules (Cédric Villemain, Andrew Dunstan, Peter Eisentraut) </para> </listitem> @@ -10722,8 +10722,8 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> - Add a <application>configure</> flag that appends custom text to the - <envar>PG_VERSION</> string (Oskari Saarenmaa) + Add a <application>configure</application> flag that appends custom text to the + <envar>PG_VERSION</envar> string (Oskari Saarenmaa) </para> <para> @@ -10733,46 +10733,46 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> - Improve DocBook <acronym>XML</> validity (Peter Eisentraut) + Improve DocBook <acronym>XML</acronym> validity (Peter Eisentraut) </para> </listitem> <listitem> <para> Fix various minor security and sanity issues reported by the - <productname>Coverity</> scanner (Stephen Frost) + <productname>Coverity</productname> scanner (Stephen Frost) </para> </listitem> <listitem> <para> Improve detection of invalid memory usage when testing - <productname>PostgreSQL</> with <application>Valgrind</> + <productname>PostgreSQL</productname> with <application>Valgrind</application> (Noah Misch) </para> </listitem> <listitem> <para> - Improve sample <application>Emacs</> configuration file - <filename>emacs.samples</> (Peter Eisentraut) + Improve sample <application>Emacs</application> configuration file + <filename>emacs.samples</filename> (Peter Eisentraut) </para> <para> - Also add <filename>.dir-locals.el</> to the top of the source tree. + Also add <filename>.dir-locals.el</filename> to the top of the source tree. </para> </listitem> <listitem> <para> - Allow <application>pgindent</> to accept a command-line list + Allow <application>pgindent</application> to accept a command-line list of typedefs (Bruce Momjian) </para> </listitem> <listitem> <para> - Make <application>pgindent</> smarter about blank lines + Make <application>pgindent</application> smarter about blank lines around preprocessor conditionals (Bruce Momjian) </para> </listitem> @@ -10780,14 +10780,14 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> Avoid most uses of <command>dlltool</command> - in <productname>Cygwin</> and - <productname>Mingw</> builds (Marco Atzeri, Hiroshi Inoue) + in <productname>Cygwin</productname> and + <productname>Mingw</productname> builds (Marco Atzeri, Hiroshi Inoue) </para> </listitem> <listitem> <para> - Support client-only installs in <acronym>MSVC</> (Windows) builds + Support client-only installs in <acronym>MSVC</acronym> (Windows) builds (MauMau) </para> </listitem> @@ -10814,13 +10814,13 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> - Add <acronym>UUID</> random number generator - <function>gen_random_uuid()</> to <xref linkend="pgcrypto"> + Add <acronym>UUID</acronym> random number generator + <function>gen_random_uuid()</function> to <xref linkend="pgcrypto"> (Oskari Saarenmaa) </para> <para> - This allows creation of version 4 <acronym>UUID</>s without + This allows creation of version 4 <acronym>UUID</acronym>s without requiring installation of <xref linkend="uuid-ossp">. </para> </listitem> @@ -10828,12 +10828,12 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> Allow <xref linkend="uuid-ossp"> to work with - the <systemitem>BSD</> or <systemitem>e2fsprogs</> UUID libraries, - not only the <systemitem>OSSP</> UUID library (Matteo Beccati) + the <systemitem>BSD</systemitem> or <systemitem>e2fsprogs</systemitem> UUID libraries, + not only the <systemitem>OSSP</systemitem> UUID library (Matteo Beccati) </para> <para> - This improves the <application>uuid-ossp</> module's portability + This improves the <application>uuid-ossp</application> module's portability since it no longer has to have the increasingly-obsolete OSSP library. The module's name is now rather a misnomer, but we won't change it. @@ -10887,8 +10887,8 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> - Allow <link linkend="pgwaldump"><application>pg_xlogdump</></> - to report a live log stream with <option>--follow</> + Allow <link linkend="pgwaldump"><application>pg_xlogdump</application></link> + to report a live log stream with <option>--follow</option> (Heikki Linnakangas) </para> </listitem> @@ -10920,7 +10920,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> - Pass <xref linkend="pgupgrade">'s user name (<option>-U</>) option to + Pass <xref linkend="pgupgrade">'s user name (<option>-U</option>) option to generated analyze scripts (Bruce Momjian) </para> </listitem> @@ -10934,31 +10934,31 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> - Remove line length limit for <application>pgbench</> scripts (Sawada + Remove line length limit for <application>pgbench</application> scripts (Sawada Masahiko) </para> <para> - The previous line limit was <envar>BUFSIZ</>. + The previous line limit was <envar>BUFSIZ</envar>. </para> </listitem> <listitem> <para> - Add long option names to <application>pgbench</> (Fabien Coelho) + Add long option names to <application>pgbench</application> (Fabien Coelho) </para> </listitem> <listitem> <para> - Add <application>pgbench</> option <option>--rate</> to control + Add <application>pgbench</application> option <option>--rate</option> to control the transaction rate (Fabien Coelho) </para> </listitem> <listitem> <para> - Add <application>pgbench</> option <option>--progress</> to + Add <application>pgbench</application> option <option>--progress</option> to print periodic progress reports (Fabien Coelho) </para> @@ -10975,7 +10975,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> - Make <application>pg_stat_statements</> use a file, rather than + Make <application>pg_stat_statements</application> use a file, rather than shared memory, for query text storage (Peter Geoghegan) </para> @@ -10987,7 +10987,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> - Allow reporting of <application>pg_stat_statements</>'s internal + Allow reporting of <application>pg_stat_statements</application>'s internal query hash identifier (Daniel Farina, Sameer Thakur, Peter Geoghegan) </para> @@ -10995,7 +10995,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> - Add the ability to retrieve all <application>pg_stat_statements</> + Add the ability to retrieve all <application>pg_stat_statements</application> information except the query text (Peter Geoghegan) </para> @@ -11008,20 +11008,20 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 <listitem> <para> - Make <application>pg_stat_statements</> ignore <command>DEALLOCATE</> + Make <application>pg_stat_statements</application> ignore <command>DEALLOCATE</command> commands (Fabien Coelho) </para> <para> - It already ignored <command>PREPARE</>, as well as planning time in + It already ignored <command>PREPARE</command>, as well as planning time in general, so this seems more consistent. </para> </listitem> <listitem> <para> - Save the statistics file into <filename>$PGDATA/pg_stat</> at server - shutdown, rather than <filename>$PGDATA/global</> (Fujii Masao) + Save the statistics file into <filename>$PGDATA/pg_stat</filename> at server + shutdown, rather than <filename>$PGDATA/global</filename> (Fujii Masao) </para> </listitem> diff --git a/doc/src/sgml/release-9.5.sgml b/doc/src/sgml/release-9.5.sgml index 0f700dd5d31..2f23abe3295 100644 --- a/doc/src/sgml/release-9.5.sgml +++ b/doc/src/sgml/release-9.5.sgml @@ -36,20 +36,20 @@ <listitem> <para> Show foreign tables - in <structname>information_schema</>.<structname>table_privileges</> + in <structname>information_schema</structname>.<structname>table_privileges</structname> view (Peter Eisentraut) </para> <para> - All other relevant <structname>information_schema</> views include + All other relevant <structname>information_schema</structname> views include foreign tables, but this one ignored them. </para> <para> - Since this view definition is installed by <application>initdb</>, + Since this view definition is installed by <application>initdb</application>, merely upgrading will not fix the problem. If you need to fix this in an existing installation, you can, as a superuser, do this - in <application>psql</>: + in <application>psql</application>: <programlisting> SET search_path TO information_schema; CREATE OR REPLACE VIEW table_privileges AS @@ -88,21 +88,21 @@ CREATE OR REPLACE VIEW table_privileges AS OR grantee.rolname = 'PUBLIC'); </programlisting> This must be repeated in each database to be fixed, - including <literal>template0</>. + including <literal>template0</literal>. </para> </listitem> <listitem> <para> Clean up handling of a fatal exit (e.g., due to receipt - of <systemitem>SIGTERM</>) that occurs while trying to execute - a <command>ROLLBACK</> of a failed transaction (Tom Lane) + of <systemitem>SIGTERM</systemitem>) that occurs while trying to execute + a <command>ROLLBACK</command> of a failed transaction (Tom Lane) </para> <para> This situation could result in an assertion failure. In production builds, the exit would still occur, but it would log an unexpected - message about <quote>cannot drop active portal</>. + message about <quote>cannot drop active portal</quote>. </para> </listitem> @@ -119,7 +119,7 @@ CREATE OR REPLACE VIEW table_privileges AS </para> <para> - Certain <command>ALTER</> commands that change the definition of a + Certain <command>ALTER</command> commands that change the definition of a composite type or domain type are supposed to fail if there are any stored values of that type in the database, because they lack the infrastructure needed to update or check such values. Previously, @@ -131,7 +131,7 @@ CREATE OR REPLACE VIEW table_privileges AS <listitem> <para> - Fix crash in <application>pg_restore</> when using parallel mode and + Fix crash in <application>pg_restore</application> when using parallel mode and using a list file to select a subset of items to restore (Fabrízio de Royes Mello) </para> @@ -139,13 +139,13 @@ CREATE OR REPLACE VIEW table_privileges AS <listitem> <para> - Change <application>ecpg</>'s parser to allow <literal>RETURNING</> + Change <application>ecpg</application>'s parser to allow <literal>RETURNING</literal> clauses without attached C variables (Michael Meskes) </para> <para> - This allows <application>ecpg</> programs to contain SQL constructs - that use <literal>RETURNING</> internally (for example, inside a CTE) + This allows <application>ecpg</application> programs to contain SQL constructs + that use <literal>RETURNING</literal> internally (for example, inside a CTE) rather than using it to define values to be returned to the client. </para> </listitem> @@ -157,18 +157,18 @@ CREATE OR REPLACE VIEW table_privileges AS <para> This fix avoids possible crashes of PL/Perl due to inconsistent - assumptions about the width of <type>time_t</> values. + assumptions about the width of <type>time_t</type> values. A side-effect that may be visible to extension developers is - that <literal>_USE_32BIT_TIME_T</> is no longer defined globally - in <productname>PostgreSQL</> Windows builds. This is not expected - to cause problems, because type <type>time_t</> is not used - in any <productname>PostgreSQL</> API definitions. + that <literal>_USE_32BIT_TIME_T</literal> is no longer defined globally + in <productname>PostgreSQL</productname> Windows builds. This is not expected + to cause problems, because type <type>time_t</type> is not used + in any <productname>PostgreSQL</productname> API definitions. </para> </listitem> <listitem> <para> - Fix <literal>make check</> to behave correctly when invoked via a + Fix <literal>make check</literal> to behave correctly when invoked via a non-GNU make program (Thomas Munro) </para> </listitem> @@ -218,7 +218,7 @@ CREATE OR REPLACE VIEW table_privileges AS <listitem> <para> Further restrict visibility - of <structname>pg_user_mappings</>.<structfield>umoptions</>, to + of <structname>pg_user_mappings</structname>.<structfield>umoptions</structfield>, to protect passwords stored as user mapping options (Noah Misch) </para> @@ -226,11 +226,11 @@ CREATE OR REPLACE VIEW table_privileges AS <para> The fix for CVE-2017-7486 was incorrect: it allowed a user to see the options in her own user mapping, even if she did not - have <literal>USAGE</> permission on the associated foreign server. + have <literal>USAGE</literal> permission on the associated foreign server. Such options might include a password that had been provided by the server owner rather than the user herself. - Since <structname>information_schema.user_mapping_options</> does not - show the options in such cases, <structname>pg_user_mappings</> + Since <structname>information_schema.user_mapping_options</structname> does not + show the options in such cases, <structname>pg_user_mappings</structname> should not either. (CVE-2017-7547) </para> @@ -245,15 +245,15 @@ CREATE OR REPLACE VIEW table_privileges AS <step> <para> Restart the postmaster after adding <literal>allow_system_table_mods - = true</> to <filename>postgresql.conf</>. (In versions - supporting <command>ALTER SYSTEM</>, you can use that to make the + = true</literal> to <filename>postgresql.conf</filename>. (In versions + supporting <command>ALTER SYSTEM</command>, you can use that to make the configuration change, but you'll still need a restart.) </para> </step> <step> <para> - In <emphasis>each</> database of the cluster, + In <emphasis>each</emphasis> database of the cluster, run the following commands as superuser: <programlisting> SET search_path = pg_catalog; @@ -284,15 +284,15 @@ CREATE OR REPLACE VIEW pg_user_mappings AS <step> <para> - Do not forget to include the <literal>template0</> - and <literal>template1</> databases, or the vulnerability will still - exist in databases you create later. To fix <literal>template0</>, + Do not forget to include the <literal>template0</literal> + and <literal>template1</literal> databases, or the vulnerability will still + exist in databases you create later. To fix <literal>template0</literal>, you'll need to temporarily make it accept connections. - In <productname>PostgreSQL</> 9.5 and later, you can use + In <productname>PostgreSQL</productname> 9.5 and later, you can use <programlisting> ALTER DATABASE template0 WITH ALLOW_CONNECTIONS true; </programlisting> - and then after fixing <literal>template0</>, undo that with + and then after fixing <literal>template0</literal>, undo that with <programlisting> ALTER DATABASE template0 WITH ALLOW_CONNECTIONS false; </programlisting> @@ -306,7 +306,7 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <step> <para> - Finally, remove the <literal>allow_system_table_mods</> configuration + Finally, remove the <literal>allow_system_table_mods</literal> configuration setting, and again restart the postmaster. </para> </step> @@ -320,16 +320,16 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; </para> <para> - <application>libpq</> ignores empty password specifications, and does + <application>libpq</application> ignores empty password specifications, and does not transmit them to the server. So, if a user's password has been set to the empty string, it's impossible to log in with that password - via <application>psql</> or other <application>libpq</>-based + via <application>psql</application> or other <application>libpq</application>-based clients. An administrator might therefore believe that setting the password to empty is equivalent to disabling password login. - However, with a modified or non-<application>libpq</>-based client, + However, with a modified or non-<application>libpq</application>-based client, logging in could be possible, depending on which authentication method is configured. In particular the most common - method, <literal>md5</>, accepted empty passwords. + method, <literal>md5</literal>, accepted empty passwords. Change the server to reject empty passwords in all cases. (CVE-2017-7546) </para> @@ -337,13 +337,13 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Make <function>lo_put()</> check for <literal>UPDATE</> privilege on + Make <function>lo_put()</function> check for <literal>UPDATE</literal> privilege on the target large object (Tom Lane, Michael Paquier) </para> <para> - <function>lo_put()</> should surely require the same permissions - as <function>lowrite()</>, but the check was missing, allowing any + <function>lo_put()</function> should surely require the same permissions + as <function>lowrite()</function>, but the check was missing, allowing any user to change the data in a large object. (CVE-2017-7548) </para> @@ -352,12 +352,12 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> Correct the documentation about the process for upgrading standby - servers with <application>pg_upgrade</> (Bruce Momjian) + servers with <application>pg_upgrade</application> (Bruce Momjian) </para> <para> The previous documentation instructed users to start/stop the primary - server after running <application>pg_upgrade</> but before syncing + server after running <application>pg_upgrade</application> but before syncing the standby servers. This sequence is unsafe. </para> </listitem> @@ -463,21 +463,21 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> Fix possible creation of an invalid WAL segment when a standby is - promoted just after it processes an <literal>XLOG_SWITCH</> WAL + promoted just after it processes an <literal>XLOG_SWITCH</literal> WAL record (Andres Freund) </para> </listitem> <listitem> <para> - Fix <application>walsender</> to exit promptly when client requests + Fix <application>walsender</application> to exit promptly when client requests shutdown (Tom Lane) </para> </listitem> <listitem> <para> - Fix <systemitem>SIGHUP</> and <systemitem>SIGUSR1</> handling in + Fix <systemitem>SIGHUP</systemitem> and <systemitem>SIGUSR1</systemitem> handling in walsender processes (Petr Jelinek, Andres Freund) </para> </listitem> @@ -491,7 +491,7 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Fix unnecessarily slow restarts of <application>walreceiver</> + Fix unnecessarily slow restarts of <application>walreceiver</application> processes due to race condition in postmaster (Tom Lane) </para> </listitem> @@ -539,7 +539,7 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Fix cases where an <command>INSERT</> or <command>UPDATE</> assigns + Fix cases where an <command>INSERT</command> or <command>UPDATE</command> assigns to more than one element of a column that is of domain-over-array type (Tom Lane) </para> @@ -547,7 +547,7 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Allow window functions to be used in sub-<literal>SELECT</>s that + Allow window functions to be used in sub-<literal>SELECT</literal>s that are within the arguments of an aggregate function (Tom Lane) </para> </listitem> @@ -555,19 +555,19 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> Move autogenerated array types out of the way during - <command>ALTER ... RENAME</> (Vik Fearing) + <command>ALTER ... RENAME</command> (Vik Fearing) </para> <para> Previously, we would rename a conflicting autogenerated array type - out of the way during <command>CREATE</>; this fix extends that + out of the way during <command>CREATE</command>; this fix extends that behavior to renaming operations. </para> </listitem> <listitem> <para> - Fix dangling pointer in <command>ALTER TABLE</> when there is a + Fix dangling pointer in <command>ALTER TABLE</command> when there is a comment on a constraint belonging to the table (David Rowley) </para> @@ -579,44 +579,44 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Ensure that <command>ALTER USER ... SET</> accepts all the syntax - variants that <command>ALTER ROLE ... SET</> does (Peter Eisentraut) + Ensure that <command>ALTER USER ... SET</command> accepts all the syntax + variants that <command>ALTER ROLE ... SET</command> does (Peter Eisentraut) </para> </listitem> <listitem> <para> Properly update dependency info when changing a datatype I/O - function's argument or return type from <type>opaque</> to the + function's argument or return type from <type>opaque</type> to the correct type (Heikki Linnakangas) </para> <para> - <command>CREATE TYPE</> updates I/O functions declared in this + <command>CREATE TYPE</command> updates I/O functions declared in this long-obsolete style, but it forgot to record a dependency on the - type, allowing a subsequent <command>DROP TYPE</> to leave broken + type, allowing a subsequent <command>DROP TYPE</command> to leave broken function definitions behind. </para> </listitem> <listitem> <para> - Reduce memory usage when <command>ANALYZE</> processes - a <type>tsvector</> column (Heikki Linnakangas) + Reduce memory usage when <command>ANALYZE</command> processes + a <type>tsvector</type> column (Heikki Linnakangas) </para> </listitem> <listitem> <para> Fix unnecessary precision loss and sloppy rounding when multiplying - or dividing <type>money</> values by integers or floats (Tom Lane) + or dividing <type>money</type> values by integers or floats (Tom Lane) </para> </listitem> <listitem> <para> Tighten checks for whitespace in functions that parse identifiers, - such as <function>regprocedurein()</> (Tom Lane) + such as <function>regprocedurein()</function> (Tom Lane) </para> <para> @@ -627,20 +627,20 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Use relevant <literal>#define</> symbols from Perl while - compiling <application>PL/Perl</> (Ashutosh Sharma, Tom Lane) + Use relevant <literal>#define</literal> symbols from Perl while + compiling <application>PL/Perl</application> (Ashutosh Sharma, Tom Lane) </para> <para> This avoids portability problems, typically manifesting as - a <quote>handshake</> mismatch during library load, when working with + a <quote>handshake</quote> mismatch during library load, when working with recent Perl versions. </para> </listitem> <listitem> <para> - In <application>libpq</>, reset GSS/SASL and SSPI authentication + In <application>libpq</application>, reset GSS/SASL and SSPI authentication state properly after a failed connection attempt (Michael Paquier) </para> @@ -653,9 +653,9 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - In <application>psql</>, fix failure when <command>COPY FROM STDIN</> + In <application>psql</application>, fix failure when <command>COPY FROM STDIN</command> is ended with a keyboard EOF signal and then another <command>COPY - FROM STDIN</> is attempted (Thomas Munro) + FROM STDIN</command> is attempted (Thomas Munro) </para> <para> @@ -666,8 +666,8 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Fix <application>pg_dump</> and <application>pg_restore</> to - emit <command>REFRESH MATERIALIZED VIEW</> commands last (Tom Lane) + Fix <application>pg_dump</application> and <application>pg_restore</application> to + emit <command>REFRESH MATERIALIZED VIEW</command> commands last (Tom Lane) </para> <para> @@ -678,15 +678,15 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Improve <application>pg_dump</>/<application>pg_restore</>'s - reporting of error conditions originating in <application>zlib</> + Improve <application>pg_dump</application>/<application>pg_restore</application>'s + reporting of error conditions originating in <application>zlib</application> (Vladimir Kunschikov, Álvaro Herrera) </para> </listitem> <listitem> <para> - Fix <application>pg_dump</> with the <option>--clean</> option to + Fix <application>pg_dump</application> with the <option>--clean</option> option to drop event triggers as expected (Tom Lane) </para> @@ -699,14 +699,14 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Fix <application>pg_dump</> to not emit invalid SQL for an empty + Fix <application>pg_dump</application> to not emit invalid SQL for an empty operator class (Daniel Gustafsson) </para> </listitem> <listitem> <para> - Fix <application>pg_dump</> output to stdout on Windows (Kuntal Ghosh) + Fix <application>pg_dump</application> output to stdout on Windows (Kuntal Ghosh) </para> <para> @@ -717,14 +717,14 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Fix <function>pg_get_ruledef()</> to print correct output for - the <literal>ON SELECT</> rule of a view whose columns have been + Fix <function>pg_get_ruledef()</function> to print correct output for + the <literal>ON SELECT</literal> rule of a view whose columns have been renamed (Tom Lane) </para> <para> - In some corner cases, <application>pg_dump</> relies - on <function>pg_get_ruledef()</> to dump views, so that this error + In some corner cases, <application>pg_dump</application> relies + on <function>pg_get_ruledef()</function> to dump views, so that this error could result in dump/reload failures. </para> </listitem> @@ -732,13 +732,13 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> Fix dumping of outer joins with empty constraints, such as the result - of a <literal>NATURAL LEFT JOIN</> with no common columns (Tom Lane) + of a <literal>NATURAL LEFT JOIN</literal> with no common columns (Tom Lane) </para> </listitem> <listitem> <para> - Fix dumping of function expressions in the <literal>FROM</> clause in + Fix dumping of function expressions in the <literal>FROM</literal> clause in cases where the expression does not deparse into something that looks like a function call (Tom Lane) </para> @@ -746,7 +746,7 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Fix <application>pg_basebackup</> output to stdout on Windows + Fix <application>pg_basebackup</application> output to stdout on Windows (Haribabu Kommi) </para> @@ -758,20 +758,20 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Fix <application>pg_rewind</> to correctly handle files exceeding 2GB + Fix <application>pg_rewind</application> to correctly handle files exceeding 2GB (Kuntal Ghosh, Michael Paquier) </para> <para> - Ordinarily such files won't appear in <productname>PostgreSQL</> data + Ordinarily such files won't appear in <productname>PostgreSQL</productname> data directories, but they could be present in some cases. </para> </listitem> <listitem> <para> - Fix <application>pg_upgrade</> to ensure that the ending WAL record - does not have <xref linkend="guc-wal-level"> = <literal>minimum</> + Fix <application>pg_upgrade</application> to ensure that the ending WAL record + does not have <xref linkend="guc-wal-level"> = <literal>minimum</literal> (Bruce Momjian) </para> @@ -783,16 +783,16 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Fix <application>pg_xlogdump</>'s computation of WAL record length + Fix <application>pg_xlogdump</application>'s computation of WAL record length (Andres Freund) </para> </listitem> <listitem> <para> - In <filename>postgres_fdw</>, re-establish connections to remote - servers after <command>ALTER SERVER</> or <command>ALTER USER - MAPPING</> commands (Kyotaro Horiguchi) + In <filename>postgres_fdw</filename>, re-establish connections to remote + servers after <command>ALTER SERVER</command> or <command>ALTER USER + MAPPING</command> commands (Kyotaro Horiguchi) </para> <para> @@ -803,7 +803,7 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - In <filename>postgres_fdw</>, allow cancellation of remote + In <filename>postgres_fdw</filename>, allow cancellation of remote transaction control commands (Robert Haas, Rafia Sabih) </para> @@ -815,14 +815,14 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <listitem> <para> - Increase <literal>MAX_SYSCACHE_CALLBACKS</> to provide more room for + Increase <literal>MAX_SYSCACHE_CALLBACKS</literal> to provide more room for extensions (Tom Lane) </para> </listitem> <listitem> <para> - Always use <option>-fPIC</>, not <option>-fpic</>, when building + Always use <option>-fPIC</option>, not <option>-fpic</option>, when building shared libraries with gcc (Tom Lane) </para> @@ -849,34 +849,34 @@ Branch: REL9_2_STABLE [1188b9b2c] 2017-08-02 15:07:21 -0400 <listitem> <para> - In MSVC builds, handle the case where the <application>openssl</> - library is not within a <filename>VC</> subdirectory (Andrew Dunstan) + In MSVC builds, handle the case where the <application>openssl</application> + library is not within a <filename>VC</filename> subdirectory (Andrew Dunstan) </para> </listitem> <listitem> <para> - In MSVC builds, add proper include path for <application>libxml2</> + In MSVC builds, add proper include path for <application>libxml2</application> header files (Andrew Dunstan) </para> <para> This fixes a former need to move things around in standard Windows - installations of <application>libxml2</>. + installations of <application>libxml2</application>. </para> </listitem> <listitem> <para> In MSVC builds, recognize a Tcl library that is - named <filename>tcl86.lib</> (Noah Misch) + named <filename>tcl86.lib</filename> (Noah Misch) </para> </listitem> <listitem> <para> - In MSVC builds, honor <literal>PROVE_FLAGS</> settings - on <filename>vcregress.pl</>'s command line (Andrew Dunstan) + In MSVC builds, honor <literal>PROVE_FLAGS</literal> settings + on <filename>vcregress.pl</filename>'s command line (Andrew Dunstan) </para> </listitem> @@ -913,7 +913,7 @@ Branch: REL9_2_STABLE [1188b9b2c] 2017-08-02 15:07:21 -0400 <para> Also, if you are using third-party replication tools that depend - on <quote>logical decoding</>, see the fourth changelog entry below. + on <quote>logical decoding</quote>, see the fourth changelog entry below. </para> <para> @@ -930,18 +930,18 @@ Branch: REL9_2_STABLE [1188b9b2c] 2017-08-02 15:07:21 -0400 <listitem> <para> Restrict visibility - of <structname>pg_user_mappings</>.<structfield>umoptions</>, to + of <structname>pg_user_mappings</structname>.<structfield>umoptions</structfield>, to protect passwords stored as user mapping options (Michael Paquier, Feike Steenbergen) </para> <para> The previous coding allowed the owner of a foreign server object, - or anyone he has granted server <literal>USAGE</> permission to, + or anyone he has granted server <literal>USAGE</literal> permission to, to see the options for all user mappings associated with that server. This might well include passwords for other users. Adjust the view definition to match the behavior of - <structname>information_schema.user_mapping_options</>, namely that + <structname>information_schema.user_mapping_options</structname>, namely that these options are visible to the user being mapped, or if the mapping is for <literal>PUBLIC</literal> and the current user is the server owner, or if the current user is a superuser. @@ -965,7 +965,7 @@ Branch: REL9_2_STABLE [1188b9b2c] 2017-08-02 15:07:21 -0400 <para> Some selectivity estimation functions in the planner will apply user-defined operators to values obtained - from <structname>pg_statistic</>, such as most common values and + from <structname>pg_statistic</structname>, such as most common values and histogram entries. This occurs before table permissions are checked, so a nefarious user could exploit the behavior to obtain these values for table columns he does not have permission to read. To fix, @@ -979,17 +979,17 @@ Branch: REL9_2_STABLE [1188b9b2c] 2017-08-02 15:07:21 -0400 <listitem> <para> - Restore <application>libpq</>'s recognition of - the <envar>PGREQUIRESSL</> environment variable (Daniel Gustafsson) + Restore <application>libpq</application>'s recognition of + the <envar>PGREQUIRESSL</envar> environment variable (Daniel Gustafsson) </para> <para> Processing of this environment variable was unintentionally dropped - in <productname>PostgreSQL</> 9.3, but its documentation remained. + in <productname>PostgreSQL</productname> 9.3, but its documentation remained. This creates a security hazard, since users might be relying on the environment variable to force SSL-encrypted connections, but that would no longer be guaranteed. Restore handling of the variable, - but give it lower priority than <envar>PGSSLMODE</>, to avoid + but give it lower priority than <envar>PGSSLMODE</envar>, to avoid breaking configurations that work correctly with post-9.3 code. (CVE-2017-7485) </para> @@ -1020,7 +1020,7 @@ Branch: REL9_2_STABLE [1188b9b2c] 2017-08-02 15:07:21 -0400 <listitem> <para> - Fix possible corruption of <quote>init forks</> of unlogged indexes + Fix possible corruption of <quote>init forks</quote> of unlogged indexes (Robert Haas, Michael Paquier) </para> @@ -1033,7 +1033,7 @@ Branch: REL9_2_STABLE [1188b9b2c] 2017-08-02 15:07:21 -0400 <listitem> <para> - Fix incorrect reconstruction of <structname>pg_subtrans</> entries + Fix incorrect reconstruction of <structname>pg_subtrans</structname> entries when a standby server replays a prepared but uncommitted two-phase transaction (Tom Lane) </para> @@ -1041,14 +1041,14 @@ Branch: REL9_2_STABLE [1188b9b2c] 2017-08-02 15:07:21 -0400 <para> In most cases this turned out to have no visible ill effects, but in corner cases it could result in circular references - in <structname>pg_subtrans</>, potentially causing infinite loops + in <structname>pg_subtrans</structname>, potentially causing infinite loops in queries that examine rows modified by the two-phase transaction. </para> </listitem> <listitem> <para> - Avoid possible crash in <application>walsender</> due to failure + Avoid possible crash in <application>walsender</application> due to failure to initialize a string buffer (Stas Kelvich, Fujii Masao) </para> </listitem> @@ -1062,7 +1062,7 @@ Branch: REL9_2_STABLE [1188b9b2c] 2017-08-02 15:07:21 -0400 <listitem> <para> - Fix postmaster's handling of <function>fork()</> failure for a + Fix postmaster's handling of <function>fork()</function> failure for a background worker process (Tom Lane) </para> @@ -1079,14 +1079,14 @@ Author: Andrew Gierth <rhodiumtoad@postgresql.org> Branch: REL9_5_STABLE [7be3678a8] 2017-04-24 07:53:05 +0100 --> <para> - Fix crash or wrong answers when a <literal>GROUPING SETS</> column's + Fix crash or wrong answers when a <literal>GROUPING SETS</literal> column's data type is hashable but not sortable (Pavan Deolasee) </para> </listitem> <listitem> <para> - Avoid applying <quote>physical targetlist</> optimization to custom + Avoid applying <quote>physical targetlist</quote> optimization to custom scans (Dmitry Ivanov, Tom Lane) </para> @@ -1099,13 +1099,13 @@ Branch: REL9_5_STABLE [7be3678a8] 2017-04-24 07:53:05 +0100 <listitem> <para> - Use the correct sub-expression when applying a <literal>FOR ALL</> + Use the correct sub-expression when applying a <literal>FOR ALL</literal> row-level-security policy (Stephen Frost) </para> <para> - In some cases the <literal>WITH CHECK</> restriction would be applied - when the <literal>USING</> restriction is more appropriate. + In some cases the <literal>WITH CHECK</literal> restriction would be applied + when the <literal>USING</literal> restriction is more appropriate. </para> </listitem> @@ -1119,19 +1119,19 @@ Branch: REL9_5_STABLE [7be3678a8] 2017-04-24 07:53:05 +0100 Due to lack of a cache flush step between commands in an extension script file, non-utility queries might not see the effects of an immediately preceding catalog change, such as <command>ALTER TABLE - ... RENAME</>. + ... RENAME</command>. </para> </listitem> <listitem> <para> Skip tablespace privilege checks when <command>ALTER TABLE ... ALTER - COLUMN TYPE</> rebuilds an existing index (Noah Misch) + COLUMN TYPE</command> rebuilds an existing index (Noah Misch) </para> <para> The command failed if the calling user did not currently have - <literal>CREATE</> privilege for the tablespace containing the index. + <literal>CREATE</literal> privilege for the tablespace containing the index. That behavior seems unhelpful, so skip the check, allowing the index to be rebuilt where it is. </para> @@ -1139,20 +1139,20 @@ Branch: REL9_5_STABLE [7be3678a8] 2017-04-24 07:53:05 +0100 <listitem> <para> - Fix <command>ALTER TABLE ... VALIDATE CONSTRAINT</> to not recurse - to child tables when the constraint is marked <literal>NO INHERIT</> + Fix <command>ALTER TABLE ... VALIDATE CONSTRAINT</command> to not recurse + to child tables when the constraint is marked <literal>NO INHERIT</literal> (Amit Langote) </para> <para> - This fix prevents unwanted <quote>constraint does not exist</> failures + This fix prevents unwanted <quote>constraint does not exist</quote> failures when no matching constraint is present in the child tables. </para> </listitem> <listitem> <para> - Avoid dangling pointer in <command>COPY ... TO</> when row-level + Avoid dangling pointer in <command>COPY ... TO</command> when row-level security is active for the source table (Tom Lane) </para> @@ -1164,8 +1164,8 @@ Branch: REL9_5_STABLE [7be3678a8] 2017-04-24 07:53:05 +0100 <listitem> <para> - Avoid accessing an already-closed relcache entry in <command>CLUSTER</> - and <command>VACUUM FULL</> (Tom Lane) + Avoid accessing an already-closed relcache entry in <command>CLUSTER</command> + and <command>VACUUM FULL</command> (Tom Lane) </para> <para> @@ -1176,14 +1176,14 @@ Branch: REL9_5_STABLE [7be3678a8] 2017-04-24 07:53:05 +0100 <listitem> <para> - Fix <command>VACUUM</> to account properly for pages that could not + Fix <command>VACUUM</command> to account properly for pages that could not be scanned due to conflicting page pins (Andrew Gierth) </para> <para> This tended to lead to underestimation of the number of tuples in the table. In the worst case of a small heavily-contended - table, <command>VACUUM</> could incorrectly report that the table + table, <command>VACUUM</command> could incorrectly report that the table contained no tuples, leading to very bad planning choices. </para> </listitem> @@ -1197,12 +1197,12 @@ Branch: REL9_5_STABLE [7be3678a8] 2017-04-24 07:53:05 +0100 <listitem> <para> - Fix integer-overflow problems in <type>interval</> comparison (Kyotaro + Fix integer-overflow problems in <type>interval</type> comparison (Kyotaro Horiguchi, Tom Lane) </para> <para> - The comparison operators for type <type>interval</> could yield wrong + The comparison operators for type <type>interval</type> could yield wrong answers for intervals larger than about 296000 years. Indexes on columns containing such large values should be reindexed, since they may be corrupt. @@ -1211,21 +1211,21 @@ Branch: REL9_5_STABLE [7be3678a8] 2017-04-24 07:53:05 +0100 <listitem> <para> - Fix <function>cursor_to_xml()</> to produce valid output - with <replaceable>tableforest</> = false + Fix <function>cursor_to_xml()</function> to produce valid output + with <replaceable>tableforest</replaceable> = false (Thomas Munro, Peter Eisentraut) </para> <para> - Previously it failed to produce a wrapping <literal><table></> + Previously it failed to produce a wrapping <literal><table></literal> element. </para> </listitem> <listitem> <para> - Fix roundoff problems in <function>float8_timestamptz()</> - and <function>make_interval()</> (Tom Lane) + Fix roundoff problems in <function>float8_timestamptz()</function> + and <function>make_interval()</function> (Tom Lane) </para> <para> @@ -1237,14 +1237,14 @@ Branch: REL9_5_STABLE [7be3678a8] 2017-04-24 07:53:05 +0100 <listitem> <para> - Fix <function>pg_get_object_address()</> to handle members of operator + Fix <function>pg_get_object_address()</function> to handle members of operator families correctly (Álvaro Herrera) </para> </listitem> <listitem> <para> - Improve performance of <structname>pg_timezone_names</> view + Improve performance of <structname>pg_timezone_names</structname> view (Tom Lane, David Rowley) </para> </listitem> @@ -1258,13 +1258,13 @@ Branch: REL9_5_STABLE [7be3678a8] 2017-04-24 07:53:05 +0100 <listitem> <para> - Fix sloppy handling of corner-case errors from <function>lseek()</> - and <function>close()</> (Tom Lane) + Fix sloppy handling of corner-case errors from <function>lseek()</function> + and <function>close()</function> (Tom Lane) </para> <para> Neither of these system calls are likely to fail in typical situations, - but if they did, <filename>fd.c</> could get quite confused. + but if they did, <filename>fd.c</filename> could get quite confused. </para> </listitem> @@ -1282,21 +1282,21 @@ Branch: REL9_5_STABLE [7be3678a8] 2017-04-24 07:53:05 +0100 <listitem> <para> - Fix <application>ecpg</> to support <command>COMMIT PREPARED</> - and <command>ROLLBACK PREPARED</> (Masahiko Sawada) + Fix <application>ecpg</application> to support <command>COMMIT PREPARED</command> + and <command>ROLLBACK PREPARED</command> (Masahiko Sawada) </para> </listitem> <listitem> <para> Fix a double-free error when processing dollar-quoted string literals - in <application>ecpg</> (Michael Meskes) + in <application>ecpg</application> (Michael Meskes) </para> </listitem> <listitem> <para> - In <application>pg_dump</>, fix incorrect schema and owner marking for + In <application>pg_dump</application>, fix incorrect schema and owner marking for comments and security labels of some types of database objects (Giuseppe Broccolo, Tom Lane) </para> @@ -1311,20 +1311,20 @@ Branch: REL9_5_STABLE [7be3678a8] 2017-04-24 07:53:05 +0100 <listitem> <para> - Avoid emitting an invalid list file in <literal>pg_restore -l</> + Avoid emitting an invalid list file in <literal>pg_restore -l</literal> when SQL object names contain newlines (Tom Lane) </para> <para> Replace newlines by spaces, which is sufficient to make the output - valid for <literal>pg_restore -L</>'s purposes. + valid for <literal>pg_restore -L</literal>'s purposes. </para> </listitem> <listitem> <para> - Fix <application>pg_upgrade</> to transfer comments and security labels - attached to <quote>large objects</> (blobs) (Stephen Frost) + Fix <application>pg_upgrade</application> to transfer comments and security labels + attached to <quote>large objects</quote> (blobs) (Stephen Frost) </para> <para> @@ -1336,26 +1336,26 @@ Branch: REL9_5_STABLE [7be3678a8] 2017-04-24 07:53:05 +0100 <listitem> <para> Improve error handling - in <filename>contrib/adminpack</>'s <function>pg_file_write()</> + in <filename>contrib/adminpack</filename>'s <function>pg_file_write()</function> function (Noah Misch) </para> <para> Notably, it failed to detect errors reported - by <function>fclose()</>. + by <function>fclose()</function>. </para> </listitem> <listitem> <para> - In <filename>contrib/dblink</>, avoid leaking the previous unnamed + In <filename>contrib/dblink</filename>, avoid leaking the previous unnamed connection when establishing a new unnamed connection (Joe Conway) </para> </listitem> <listitem> <para> - Fix <filename>contrib/pg_trgm</>'s extraction of trigrams from regular + Fix <filename>contrib/pg_trgm</filename>'s extraction of trigrams from regular expressions (Tom Lane) </para> @@ -1374,7 +1374,7 @@ Branch: REL9_4_STABLE [f14bf0a8f] 2017-05-06 22:19:56 -0400 Branch: REL9_3_STABLE [3aa16b117] 2017-05-06 22:17:35 -0400 --> <para> - In <filename>contrib/postgres_fdw</>, + In <filename>contrib/postgres_fdw</filename>, transmit query cancellation requests to the remote server (Michael Paquier, Etsuro Fujita) </para> @@ -1405,7 +1405,7 @@ Branch: REL9_3_STABLE [3aa16b117] 2017-05-06 22:17:35 -0400 <listitem> <para> - Update time zone data files to <application>tzdata</> release 2017b + Update time zone data files to <application>tzdata</application> release 2017b for DST law changes in Chile, Haiti, and Mongolia, plus historical corrections for Ecuador, Kazakhstan, Liberia, and Spain. Switch to numeric abbreviations for numerous time zones in South @@ -1419,9 +1419,9 @@ Branch: REL9_3_STABLE [3aa16b117] 2017-05-06 22:17:35 -0400 or no currency among the local population. They are in process of reversing that policy in favor of using numeric UTC offsets in zones where there is no evidence of real-world use of an English - abbreviation. At least for the time being, <productname>PostgreSQL</> + abbreviation. At least for the time being, <productname>PostgreSQL</productname> will continue to accept such removed abbreviations for timestamp input. - But they will not be shown in the <structname>pg_timezone_names</> + But they will not be shown in the <structname>pg_timezone_names</structname> view nor used for output. </para> </listitem> @@ -1434,15 +1434,15 @@ Branch: REL9_3_STABLE [3aa16b117] 2017-05-06 22:17:35 -0400 <para> The Microsoft MSVC build scripts neglected to install - the <filename>posixrules</> file in the timezone directory tree. + the <filename>posixrules</filename> file in the timezone directory tree. This resulted in the timezone code falling back to its built-in rule about what DST behavior to assume for a POSIX-style time zone name. For historical reasons that still corresponds to the DST rules the USA was using before 2007 (i.e., change on first Sunday in April and last Sunday in October). With this fix, a POSIX-style zone name will use the current and historical DST transition dates of - the <literal>US/Eastern</> zone. If you don't want that, remove - the <filename>posixrules</> file, or replace it with a copy of some + the <literal>US/Eastern</literal> zone. If you don't want that, remove + the <filename>posixrules</filename> file, or replace it with a copy of some other zone file (see <xref linkend="datatype-timezones">). Note that due to caching, you may need to restart the server to get such changes to take effect. @@ -1495,15 +1495,15 @@ Branch: REL9_3_STABLE [3aa16b117] 2017-05-06 22:17:35 -0400 <listitem> <para> Fix a race condition that could cause indexes built - with <command>CREATE INDEX CONCURRENTLY</> to be corrupt + with <command>CREATE INDEX CONCURRENTLY</command> to be corrupt (Pavan Deolasee, Tom Lane) </para> <para> - If <command>CREATE INDEX CONCURRENTLY</> was used to build an index + If <command>CREATE INDEX CONCURRENTLY</command> was used to build an index that depends on a column not previously indexed, then rows updated by transactions that ran concurrently with - the <command>CREATE INDEX</> command could have received incorrect + the <command>CREATE INDEX</command> command could have received incorrect index entries. If you suspect this may have happened, the most reliable solution is to rebuild affected indexes after installing this update. @@ -1520,7 +1520,7 @@ Branch: REL9_3_STABLE [3aa16b117] 2017-05-06 22:17:35 -0400 Backends failed to account for this snapshot when advertising their oldest xmin, potentially allowing concurrent vacuuming operations to remove data that was still needed. This led to transient failures - along the lines of <quote>cache lookup failed for relation 1255</>. + along the lines of <quote>cache lookup failed for relation 1255</quote>. </para> </listitem> @@ -1530,7 +1530,7 @@ Branch: REL9_3_STABLE [3aa16b117] 2017-05-06 22:17:35 -0400 </para> <para> - The WAL record emitted for a BRIN <quote>revmap</> page when moving an + The WAL record emitted for a BRIN <quote>revmap</quote> page when moving an index tuple to a different page was incorrect. Replay would make the related portion of the index useless, forcing it to be recomputed. </para> @@ -1538,13 +1538,13 @@ Branch: REL9_3_STABLE [3aa16b117] 2017-05-06 22:17:35 -0400 <listitem> <para> - Unconditionally WAL-log creation of the <quote>init fork</> for an + Unconditionally WAL-log creation of the <quote>init fork</quote> for an unlogged table (Michael Paquier) </para> <para> Previously, this was skipped when <xref linkend="guc-wal-level"> - = <literal>minimal</>, but actually it's necessary even in that case + = <literal>minimal</literal>, but actually it's necessary even in that case to ensure that the unlogged table is properly reset to empty after a crash. </para> @@ -1615,7 +1615,7 @@ Branch: REL9_4_STABLE [30e3cb307] 2016-11-17 13:31:30 -0300 <listitem> <para> - Make sure <command>ALTER TABLE</> preserves index tablespace + Make sure <command>ALTER TABLE</command> preserves index tablespace assignments when rebuilding indexes (Tom Lane, Michael Paquier) </para> @@ -1630,7 +1630,7 @@ Branch: REL9_4_STABLE [30e3cb307] 2016-11-17 13:31:30 -0300 <para> Fix incorrect updating of trigger function properties when changing a foreign-key constraint's deferrability properties with <command>ALTER - TABLE ... ALTER CONSTRAINT</> (Tom Lane) + TABLE ... ALTER CONSTRAINT</command> (Tom Lane) </para> <para> @@ -1646,29 +1646,29 @@ Branch: REL9_4_STABLE [30e3cb307] 2016-11-17 13:31:30 -0300 </para> <para> - This avoids <quote>could not find trigger <replaceable>NNN</></quote> - or <quote>relation <replaceable>NNN</> has no triggers</quote> errors. + This avoids <quote>could not find trigger <replaceable>NNN</replaceable></quote> + or <quote>relation <replaceable>NNN</replaceable> has no triggers</quote> errors. </para> </listitem> <listitem> <para> - Fix <command>ALTER TABLE ... SET DATA TYPE ... USING</> when child + Fix <command>ALTER TABLE ... SET DATA TYPE ... USING</command> when child table has different column ordering than the parent (Álvaro Herrera) </para> <para> - Failure to adjust the column numbering in the <literal>USING</> + Failure to adjust the column numbering in the <literal>USING</literal> expression led to errors, - typically <quote>attribute <replaceable>N</> has wrong type</quote>. + typically <quote>attribute <replaceable>N</replaceable> has wrong type</quote>. </para> </listitem> <listitem> <para> Fix processing of OID column when a table with OIDs is associated to - a parent with OIDs via <command>ALTER TABLE ... INHERIT</> (Amit + a parent with OIDs via <command>ALTER TABLE ... INHERIT</command> (Amit Langote) </para> @@ -1681,7 +1681,7 @@ Branch: REL9_4_STABLE [30e3cb307] 2016-11-17 13:31:30 -0300 <listitem> <para> - Fix <command>CREATE OR REPLACE VIEW</> to update the view query + Fix <command>CREATE OR REPLACE VIEW</command> to update the view query before attempting to apply the new view options (Dean Rasheed) </para> @@ -1694,7 +1694,7 @@ Branch: REL9_4_STABLE [30e3cb307] 2016-11-17 13:31:30 -0300 <listitem> <para> Report correct object identity during <command>ALTER TEXT SEARCH - CONFIGURATION</> (Artur Zakirov) + CONFIGURATION</command> (Artur Zakirov) </para> <para> @@ -1706,8 +1706,8 @@ Branch: REL9_4_STABLE [30e3cb307] 2016-11-17 13:31:30 -0300 <listitem> <para> Fix commit timestamp mechanism to not fail when queried about - the special XIDs <literal>FrozenTransactionId</> - and <literal>BootstrapTransactionId</> (Craig Ringer) + the special XIDs <literal>FrozenTransactionId</literal> + and <literal>BootstrapTransactionId</literal> (Craig Ringer) </para> </listitem> @@ -1745,28 +1745,28 @@ Branch: REL9_2_STABLE [60314e28e] 2016-12-13 19:08:09 -0600 <para> The symptom was spurious <quote>ON CONFLICT is not supported on table - ... used as a catalog table</> errors when the target - of <command>INSERT ... ON CONFLICT</> is a view with cascade option. + ... used as a catalog table</quote> errors when the target + of <command>INSERT ... ON CONFLICT</command> is a view with cascade option. </para> </listitem> <listitem> <para> - Fix incorrect <quote>target lists can have at most <replaceable>N</> - entries</quote> complaint when using <literal>ON CONFLICT</> with + Fix incorrect <quote>target lists can have at most <replaceable>N</replaceable> + entries</quote> complaint when using <literal>ON CONFLICT</literal> with wide tables (Tom Lane) </para> </listitem> <listitem> <para> - Prevent multicolumn expansion of <replaceable>foo</><literal>.*</> in - an <command>UPDATE</> source expression (Tom Lane) + Prevent multicolumn expansion of <replaceable>foo</replaceable><literal>.*</literal> in + an <command>UPDATE</command> source expression (Tom Lane) </para> <para> This led to <quote>UPDATE target count mismatch --- internal - error</>. Now the syntax is understood as a whole-row variable, + error</quote>. Now the syntax is understood as a whole-row variable, as it would be in other contexts. </para> </listitem> @@ -1774,12 +1774,12 @@ Branch: REL9_2_STABLE [60314e28e] 2016-12-13 19:08:09 -0600 <listitem> <para> Ensure that column typmods are determined accurately for - multi-row <literal>VALUES</> constructs (Tom Lane) + multi-row <literal>VALUES</literal> constructs (Tom Lane) </para> <para> This fixes problems occurring when the first value in a column has a - determinable typmod (e.g., length for a <type>varchar</> value) but + determinable typmod (e.g., length for a <type>varchar</type> value) but later values don't share the same limit. </para> </listitem> @@ -1794,15 +1794,15 @@ Branch: REL9_2_STABLE [60314e28e] 2016-12-13 19:08:09 -0600 Normally, a Unicode surrogate leading character must be followed by a Unicode surrogate trailing character, but the check for this was missed if the leading character was the last character in a Unicode - string literal (<literal>U&'...'</>) or Unicode identifier - (<literal>U&"..."</>). + string literal (<literal>U&'...'</literal>) or Unicode identifier + (<literal>U&"..."</literal>). </para> </listitem> <listitem> <para> Ensure that a purely negative text search query, such - as <literal>!foo</>, matches empty <type>tsvector</>s (Tom Dunstan) + as <literal>!foo</literal>, matches empty <type>tsvector</type>s (Tom Dunstan) </para> <para> @@ -1813,20 +1813,20 @@ Branch: REL9_2_STABLE [60314e28e] 2016-12-13 19:08:09 -0600 <listitem> <para> - Prevent crash when <function>ts_rewrite()</> replaces a non-top-level + Prevent crash when <function>ts_rewrite()</function> replaces a non-top-level subtree with an empty query (Artur Zakirov) </para> </listitem> <listitem> <para> - Fix performance problems in <function>ts_rewrite()</> (Tom Lane) + Fix performance problems in <function>ts_rewrite()</function> (Tom Lane) </para> </listitem> <listitem> <para> - Fix <function>ts_rewrite()</>'s handling of nested NOT operators + Fix <function>ts_rewrite()</function>'s handling of nested NOT operators (Tom Lane) </para> </listitem> @@ -1834,27 +1834,27 @@ Branch: REL9_2_STABLE [60314e28e] 2016-12-13 19:08:09 -0600 <listitem> <para> Improve speed of user-defined aggregates that - use <function>array_append()</> as transition function (Tom Lane) + use <function>array_append()</function> as transition function (Tom Lane) </para> </listitem> <listitem> <para> - Fix <function>array_fill()</> to handle empty arrays properly (Tom Lane) + Fix <function>array_fill()</function> to handle empty arrays properly (Tom Lane) </para> </listitem> <listitem> <para> - Fix possible crash in <function>array_position()</> - or <function>array_positions()</> when processing arrays of records + Fix possible crash in <function>array_position()</function> + or <function>array_positions()</function> when processing arrays of records (Junseok Yang) </para> </listitem> <listitem> <para> - Fix one-byte buffer overrun in <function>quote_literal_cstr()</> + Fix one-byte buffer overrun in <function>quote_literal_cstr()</function> (Heikki Linnakangas) </para> @@ -1866,8 +1866,8 @@ Branch: REL9_2_STABLE [60314e28e] 2016-12-13 19:08:09 -0600 <listitem> <para> - Prevent multiple calls of <function>pg_start_backup()</> - and <function>pg_stop_backup()</> from running concurrently (Michael + Prevent multiple calls of <function>pg_start_backup()</function> + and <function>pg_stop_backup()</function> from running concurrently (Michael Paquier) </para> @@ -1880,7 +1880,7 @@ Branch: REL9_2_STABLE [60314e28e] 2016-12-13 19:08:09 -0600 <listitem> <para> Disable transform that attempted to remove no-op <literal>AT TIME - ZONE</> conversions (Tom Lane) + ZONE</literal> conversions (Tom Lane) </para> <para> @@ -1891,15 +1891,15 @@ Branch: REL9_2_STABLE [60314e28e] 2016-12-13 19:08:09 -0600 <listitem> <para> - Avoid discarding <type>interval</>-to-<type>interval</> casts + Avoid discarding <type>interval</type>-to-<type>interval</type> casts that aren't really no-ops (Tom Lane) </para> <para> In some cases, a cast that should result in zeroing out - low-order <type>interval</> fields was mistakenly deemed to be a + low-order <type>interval</type> fields was mistakenly deemed to be a no-op and discarded. An example is that casting from <type>INTERVAL - MONTH</> to <type>INTERVAL YEAR</> failed to clear the months field. + MONTH</type> to <type>INTERVAL YEAR</type> failed to clear the months field. </para> </listitem> @@ -1919,28 +1919,28 @@ Branch: REL9_2_STABLE [60314e28e] 2016-12-13 19:08:09 -0600 <listitem> <para> - Fix <application>pg_dump</> to dump user-defined casts and transforms + Fix <application>pg_dump</application> to dump user-defined casts and transforms that use built-in functions (Stephen Frost) </para> </listitem> <listitem> <para> - Fix <application>pg_restore</> with <option>--create --if-exists</> + Fix <application>pg_restore</application> with <option>--create --if-exists</option> to behave more sanely if an archive contains - unrecognized <command>DROP</> commands (Tom Lane) + unrecognized <command>DROP</command> commands (Tom Lane) </para> <para> This doesn't fix any live bug, but it may improve the behavior in - future if <application>pg_restore</> is used with an archive - generated by a later <application>pg_dump</> version. + future if <application>pg_restore</application> is used with an archive + generated by a later <application>pg_dump</application> version. </para> </listitem> <listitem> <para> - Fix <application>pg_basebackup</>'s rate limiting in the presence of + Fix <application>pg_basebackup</application>'s rate limiting in the presence of slow I/O (Antonin Houska) </para> @@ -1953,15 +1953,15 @@ Branch: REL9_2_STABLE [60314e28e] 2016-12-13 19:08:09 -0600 <listitem> <para> - Fix <application>pg_basebackup</>'s handling of - symlinked <filename>pg_stat_tmp</> and <filename>pg_replslot</> + Fix <application>pg_basebackup</application>'s handling of + symlinked <filename>pg_stat_tmp</filename> and <filename>pg_replslot</filename> subdirectories (Magnus Hagander, Michael Paquier) </para> </listitem> <listitem> <para> - Fix possible <application>pg_basebackup</> failure on standby + Fix possible <application>pg_basebackup</application> failure on standby server when including WAL files (Amit Kapila, Robert Haas) </para> </listitem> @@ -1969,7 +1969,7 @@ Branch: REL9_2_STABLE [60314e28e] 2016-12-13 19:08:09 -0600 <listitem> <para> Fix possible mishandling of expanded arrays in domain check - constraints and <literal>CASE</> execution (Tom Lane) + constraints and <literal>CASE</literal> execution (Tom Lane) </para> <para> @@ -2001,21 +2001,21 @@ Branch: REL9_2_STABLE [60314e28e] 2016-12-13 19:08:09 -0600 <listitem> <para> - Fix PL/Tcl to support triggers on tables that have <literal>.tupno</> + Fix PL/Tcl to support triggers on tables that have <literal>.tupno</literal> as a column name (Tom Lane) </para> <para> This matches the (previously undocumented) behavior of - PL/Tcl's <command>spi_exec</> and <command>spi_execp</> commands, - namely that a magic <literal>.tupno</> column is inserted only if + PL/Tcl's <command>spi_exec</command> and <command>spi_execp</command> commands, + namely that a magic <literal>.tupno</literal> column is inserted only if there isn't a real column named that. </para> </listitem> <listitem> <para> - Allow DOS-style line endings in <filename>~/.pgpass</> files, + Allow DOS-style line endings in <filename>~/.pgpass</filename> files, even on Unix (Vik Fearing) </para> @@ -2027,23 +2027,23 @@ Branch: REL9_2_STABLE [60314e28e] 2016-12-13 19:08:09 -0600 <listitem> <para> - Fix one-byte buffer overrun if <application>ecpg</> is given a file + Fix one-byte buffer overrun if <application>ecpg</application> is given a file name that ends with a dot (Takayuki Tsunakawa) </para> </listitem> <listitem> <para> - Fix <application>psql</>'s tab completion for <command>ALTER DEFAULT - PRIVILEGES</> (Gilles Darold, Stephen Frost) + Fix <application>psql</application>'s tab completion for <command>ALTER DEFAULT + PRIVILEGES</command> (Gilles Darold, Stephen Frost) </para> </listitem> <listitem> <para> - In <application>psql</>, treat an empty or all-blank setting of - the <envar>PAGER</> environment variable as meaning <quote>no - pager</> (Tom Lane) + In <application>psql</application>, treat an empty or all-blank setting of + the <envar>PAGER</envar> environment variable as meaning <quote>no + pager</quote> (Tom Lane) </para> <para> @@ -2054,28 +2054,28 @@ Branch: REL9_2_STABLE [60314e28e] 2016-12-13 19:08:09 -0600 <listitem> <para> - Improve <filename>contrib/dblink</>'s reporting of - low-level <application>libpq</> errors, such as out-of-memory + Improve <filename>contrib/dblink</filename>'s reporting of + low-level <application>libpq</application> errors, such as out-of-memory (Joe Conway) </para> </listitem> <listitem> <para> - Teach <filename>contrib/dblink</> to ignore irrelevant server options - when it uses a <filename>contrib/postgres_fdw</> foreign server as + Teach <filename>contrib/dblink</filename> to ignore irrelevant server options + when it uses a <filename>contrib/postgres_fdw</filename> foreign server as the source of connection options (Corey Huinker) </para> <para> Previously, if the foreign server object had options that were not - also <application>libpq</> connection options, an error occurred. + also <application>libpq</application> connection options, an error occurred. </para> </listitem> <listitem> <para> - Fix portability problems in <filename>contrib/pageinspect</>'s + Fix portability problems in <filename>contrib/pageinspect</filename>'s functions for GIN indexes (Peter Eisentraut, Tom Lane) </para> </listitem> @@ -2102,7 +2102,7 @@ Branch: REL9_2_STABLE [60314e28e] 2016-12-13 19:08:09 -0600 <listitem> <para> - Update time zone data files to <application>tzdata</> release 2016j + Update time zone data files to <application>tzdata</application> release 2016j for DST law changes in northern Cyprus (adding a new zone Asia/Famagusta), Russia (adding a new zone Europe/Saratov), Tonga, and Antarctica/Casey. @@ -2165,7 +2165,7 @@ Branch: REL9_2_STABLE [60314e28e] 2016-12-13 19:08:09 -0600 crash recovery, or to be written incorrectly on a standby server. Bogus entries in a free space map could lead to attempts to access pages that have been truncated away from the relation itself, typically - producing errors like <quote>could not read block <replaceable>XXX</>: + producing errors like <quote>could not read block <replaceable>XXX</replaceable>: read only 0 of 8192 bytes</quote>. Checksum failures in the visibility map are also possible, if checksumming is enabled. </para> @@ -2173,7 +2173,7 @@ Branch: REL9_2_STABLE [60314e28e] 2016-12-13 19:08:09 -0600 <para> Procedures for determining whether there is a problem and repairing it if so are discussed at - <ulink url="https://wiki.postgresql.org/wiki/Free_Space_Map_Problems"></>. + <ulink url="https://wiki.postgresql.org/wiki/Free_Space_Map_Problems"></ulink>. </para> </listitem> @@ -2191,7 +2191,7 @@ Branch: REL9_4_STABLE [a69443564] 2016-09-03 13:28:53 -0400 </para> <para> - The typical symptom was <quote>unexpected GIN leaf action</> errors + The typical symptom was <quote>unexpected GIN leaf action</quote> errors during WAL replay. </para> </listitem> @@ -2206,13 +2206,13 @@ Branch: REL9_4_STABLE [8778da2af] 2016-09-09 15:54:29 -0300 Branch: REL9_3_STABLE [dfe7121df] 2016-09-09 15:54:29 -0300 --> <para> - Fix <command>SELECT FOR UPDATE/SHARE</> to correctly lock tuples that + Fix <command>SELECT FOR UPDATE/SHARE</command> to correctly lock tuples that have been updated by a subsequently-aborted transaction (Álvaro Herrera) </para> <para> - In 9.5 and later, the <command>SELECT</> would sometimes fail to + In 9.5 and later, the <command>SELECT</command> would sometimes fail to return such tuples at all. A failure has not been proven to occur in earlier releases, but might be possible with concurrent updates. </para> @@ -2248,13 +2248,13 @@ Branch: REL9_5_STABLE [94bc30725] 2016-08-17 17:03:36 -0700 --> <para> Fix deletion of speculatively inserted TOAST tuples when backing out - of <command>INSERT ... ON CONFLICT</> (Oskari Saarenmaa) + of <command>INSERT ... ON CONFLICT</command> (Oskari Saarenmaa) </para> <para> In the race condition where two transactions try to insert conflicting tuples at about the same time, the loser would fail with - an <quote>attempted to delete invisible tuple</> error if its + an <quote>attempted to delete invisible tuple</quote> error if its insertion included any TOAST'ed fields. </para> </listitem> @@ -2262,7 +2262,7 @@ Branch: REL9_5_STABLE [94bc30725] 2016-08-17 17:03:36 -0700 <listitem> <para> Don't throw serialization errors for self-conflicting insertions - in <command>INSERT ... ON CONFLICT</> (Thomas Munro, Peter Geoghegan) + in <command>INSERT ... ON CONFLICT</command> (Thomas Munro, Peter Geoghegan) </para> </listitem> @@ -2300,29 +2300,29 @@ Branch: REL9_5_STABLE [46bd14a10] 2016-08-24 22:20:01 -0400 Branch: REL9_4_STABLE [566afa15c] 2016-08-24 22:20:01 -0400 --> <para> - Fix query-lifespan memory leak in a bulk <command>UPDATE</> on a table - with a <literal>PRIMARY KEY</> or <literal>REPLICA IDENTITY</> index + Fix query-lifespan memory leak in a bulk <command>UPDATE</command> on a table + with a <literal>PRIMARY KEY</literal> or <literal>REPLICA IDENTITY</literal> index (Tom Lane) </para> </listitem> <listitem> <para> - Fix <command>COPY</> with a column name list from a table that has + Fix <command>COPY</command> with a column name list from a table that has row-level security enabled (Adam Brightwell) </para> </listitem> <listitem> <para> - Fix <command>EXPLAIN</> to emit valid XML when + Fix <command>EXPLAIN</command> to emit valid XML when <xref linkend="guc-track-io-timing"> is on (Markus Winand) </para> <para> Previously the XML output-format option produced syntactically invalid - tags such as <literal><I/O-Read-Time></>. That is now - rendered as <literal><I-O-Read-Time></>. + tags such as <literal><I/O-Read-Time></literal>. That is now + rendered as <literal><I-O-Read-Time></literal>. </para> </listitem> @@ -2337,20 +2337,20 @@ Branch: REL9_2_STABLE [ceb005319] 2016-08-12 12:13:04 -0400 --> <para> Suppress printing of zeroes for unmeasured times - in <command>EXPLAIN</> (Maksim Milyutin) + in <command>EXPLAIN</command> (Maksim Milyutin) </para> <para> Certain option combinations resulted in printing zero values for times that actually aren't ever measured in that combination. Our general - policy in <command>EXPLAIN</> is not to print such fields at all, so + policy in <command>EXPLAIN</command> is not to print such fields at all, so do that consistently in all cases. </para> </listitem> <listitem> <para> - Fix statistics update for <command>TRUNCATE</> in a prepared + Fix statistics update for <command>TRUNCATE</command> in a prepared transaction (Stas Kelvich) </para> </listitem> @@ -2367,37 +2367,37 @@ Branch: REL9_2_STABLE [eaf6fe7fa] 2016-09-09 11:45:40 +0100 Branch: REL9_1_STABLE [3ed7f54bc] 2016-09-09 11:46:03 +0100 --> <para> - Fix timeout length when <command>VACUUM</> is waiting for exclusive + Fix timeout length when <command>VACUUM</command> is waiting for exclusive table lock so that it can truncate the table (Simon Riggs) </para> <para> The timeout was meant to be 50 milliseconds, but it was actually only - 50 microseconds, causing <command>VACUUM</> to give up on truncation + 50 microseconds, causing <command>VACUUM</command> to give up on truncation much more easily than intended. Set it to the intended value. </para> </listitem> <listitem> <para> - Fix bugs in merging inherited <literal>CHECK</> constraints while + Fix bugs in merging inherited <literal>CHECK</literal> constraints while creating or altering a table (Tom Lane, Amit Langote) </para> <para> - Allow identical <literal>CHECK</> constraints to be added to a parent + Allow identical <literal>CHECK</literal> constraints to be added to a parent and child table in either order. Prevent merging of a valid - constraint from the parent table with a <literal>NOT VALID</> + constraint from the parent table with a <literal>NOT VALID</literal> constraint on the child. Likewise, prevent merging of a <literal>NO - INHERIT</> child constraint with an inherited constraint. + INHERIT</literal> child constraint with an inherited constraint. </para> </listitem> <listitem> <para> Show a sensible value - in <structname>pg_settings</>.<structfield>unit</> - for <varname>min_wal_size</> and <varname>max_wal_size</> (Tom Lane) + in <structname>pg_settings</structname>.<structfield>unit</structfield> + for <varname>min_wal_size</varname> and <varname>max_wal_size</varname> (Tom Lane) </para> </listitem> @@ -2413,15 +2413,15 @@ Branch: REL9_1_STABLE [7e01c8ef3] 2016-08-14 15:06:02 -0400 --> <para> Remove artificial restrictions on the values accepted - by <function>numeric_in()</> and <function>numeric_recv()</> + by <function>numeric_in()</function> and <function>numeric_recv()</function> (Tom Lane) </para> <para> We allow numeric values up to the limit of the storage format (more - than <literal>1e100000</>), so it seems fairly pointless - that <function>numeric_in()</> rejected scientific-notation exponents - above 1000. Likewise, it was silly for <function>numeric_recv()</> to + than <literal>1e100000</literal>), so it seems fairly pointless + that <function>numeric_in()</function> rejected scientific-notation exponents + above 1000. Likewise, it was silly for <function>numeric_recv()</function> to reject more than 1000 digits in an input value. </para> </listitem> @@ -2467,7 +2467,7 @@ Branch: REL9_5_STABLE [da9659f87] 2016-08-22 15:30:37 -0400 <para> In the worst case, this could result in a corrupt btree index, which - would need to be rebuilt using <command>REINDEX</>. However, the + would need to be rebuilt using <command>REINDEX</command>. However, the situation is believed to be rare. </para> </listitem> @@ -2501,7 +2501,7 @@ Branch: REL9_2_STABLE [823df401d] 2016-08-31 08:52:13 -0400 Branch: REL9_1_STABLE [e3439a455] 2016-08-31 08:52:13 -0400 --> <para> - Disallow starting a standalone backend with <literal>standby_mode</> + Disallow starting a standalone backend with <literal>standby_mode</literal> turned on (Michael Paquier) </para> @@ -2527,7 +2527,7 @@ Branch: REL9_4_STABLE [690a2fb90] 2016-08-17 13:15:04 -0700 <para> This failure to reset all of the fields of the slot could - prevent <command>VACUUM</> from removing dead tuples. + prevent <command>VACUUM</command> from removing dead tuples. </para> </listitem> @@ -2538,7 +2538,7 @@ Branch: REL9_4_STABLE [690a2fb90] 2016-08-17 13:15:04 -0700 </para> <para> - This avoids possible failures during <function>munmap()</> on systems + This avoids possible failures during <function>munmap()</function> on systems with atypical default huge page sizes. Except in crash-recovery cases, there were no ill effects other than a log message. </para> @@ -2564,7 +2564,7 @@ Branch: REL9_4_STABLE [32cdf680f] 2016-09-23 09:54:11 -0400 <para> Previously, the same value would be chosen every time, because it was - derived from <function>random()</> but <function>srandom()</> had not + derived from <function>random()</function> but <function>srandom()</function> had not yet been called. While relatively harmless, this was not the intended behavior. </para> @@ -2584,8 +2584,8 @@ Branch: REL9_4_STABLE [c23b2523d] 2016-09-20 12:12:36 -0400 </para> <para> - Windows sometimes returns <literal>ERROR_ACCESS_DENIED</> rather - than <literal>ERROR_ALREADY_EXISTS</> when there is an existing + Windows sometimes returns <literal>ERROR_ACCESS_DENIED</literal> rather + than <literal>ERROR_ALREADY_EXISTS</literal> when there is an existing segment. This led to postmaster startup failure due to believing that the former was an unrecoverable error. </para> @@ -2599,8 +2599,8 @@ Branch: REL9_6_STABLE Release: REL9_6_0 [c81c71d88] 2016-08-18 14:48:51 -0400 Branch: REL9_5_STABLE [a8fc19505] 2016-08-18 14:48:51 -0400 --> <para> - Fix <application>PL/pgSQL</> to not misbehave with parameters and - local variables of type <type>int2vector</> or <type>oidvector</> + Fix <application>PL/pgSQL</application> to not misbehave with parameters and + local variables of type <type>int2vector</type> or <type>oidvector</type> (Tom Lane) </para> </listitem> @@ -2608,7 +2608,7 @@ Branch: REL9_5_STABLE [a8fc19505] 2016-08-18 14:48:51 -0400 <listitem> <para> Don't try to share SSL contexts across multiple connections - in <application>libpq</> (Heikki Linnakangas) + in <application>libpq</application> (Heikki Linnakangas) </para> <para> @@ -2619,12 +2619,12 @@ Branch: REL9_5_STABLE [a8fc19505] 2016-08-18 14:48:51 -0400 <listitem> <para> - Avoid corner-case memory leak in <application>libpq</> (Tom Lane) + Avoid corner-case memory leak in <application>libpq</application> (Tom Lane) </para> <para> The reported problem involved leaking an error report - during <function>PQreset()</>, but there might be related cases. + during <function>PQreset()</function>, but there might be related cases. </para> </listitem> @@ -2640,7 +2640,7 @@ Branch: REL9_2_STABLE [a4a3fac16] 2016-09-18 14:00:13 +0300 Branch: REL9_1_STABLE [ed29d2de2] 2016-09-18 14:07:30 +0300 --> <para> - Make <application>ecpg</>'s <option>--help</> and <option>--version</> + Make <application>ecpg</application>'s <option>--help</option> and <option>--version</option> options work consistently with our other executables (Haribabu Kommi) </para> </listitem> @@ -2658,12 +2658,12 @@ Branch: REL9_5_STABLE [b93d37474] 2016-09-21 13:16:20 +0300 Branch: REL9_4_STABLE [f16d4a241] 2016-09-21 13:16:24 +0300 --> <para> - Fix <application>pgbench</>'s calculation of average latency + Fix <application>pgbench</application>'s calculation of average latency (Fabien Coelho) </para> <para> - The calculation was incorrect when there were <literal>\sleep</> + The calculation was incorrect when there were <literal>\sleep</literal> commands in the script, or when the test duration was specified in number of transactions rather than total time. </para> @@ -2671,7 +2671,7 @@ Branch: REL9_4_STABLE [f16d4a241] 2016-09-21 13:16:24 +0300 <listitem> <para> - In <application>pg_upgrade</>, check library loadability in name order + In <application>pg_upgrade</application>, check library loadability in name order (Tom Lane) </para> @@ -2693,12 +2693,12 @@ Branch: REL9_3_STABLE [f39bb487d] 2016-09-23 13:49:27 -0400 Branch: REL9_2_STABLE [53b29d986] 2016-09-23 13:49:27 -0400 --> <para> - In <application>pg_dump</>, never dump range constructor functions + In <application>pg_dump</application>, never dump range constructor functions (Tom Lane) </para> <para> - This oversight led to <application>pg_upgrade</> failures with + This oversight led to <application>pg_upgrade</application> failures with extensions containing range types, due to duplicate creation of the constructor functions. </para> @@ -2712,9 +2712,9 @@ Branch: REL9_6_STABLE Release: REL9_6_0 [a88cee90f] 2016-09-08 10:48:03 -0400 Branch: REL9_5_STABLE [142a110b3] 2016-09-08 10:48:03 -0400 --> <para> - In <application>pg_dump</> with <option>-C</>, - suppress <literal>TABLESPACE</> clause of <command>CREATE DATABASE</> - if <option>--no-tablespaces</> is specified (Tom Lane) + In <application>pg_dump</application> with <option>-C</option>, + suppress <literal>TABLESPACE</literal> clause of <command>CREATE DATABASE</command> + if <option>--no-tablespaces</option> is specified (Tom Lane) </para> </listitem> @@ -2727,27 +2727,27 @@ Branch: REL9_5_STABLE [9050e5c89] 2016-08-29 12:18:57 +0100 Branch: REL9_5_STABLE [3aa233f82] 2016-08-29 18:12:04 -0300 --> <para> - Make <application>pg_receivexlog</> work correctly - with <option>--synchronous</> without slots (Gabriele Bartolini) + Make <application>pg_receivexlog</application> work correctly + with <option>--synchronous</option> without slots (Gabriele Bartolini) </para> </listitem> <listitem> <para> - Disallow specifying both <option>--source-server</> - and <option>--source-target</> options to <application>pg_rewind</> + Disallow specifying both <option>--source-server</option> + and <option>--source-target</option> options to <application>pg_rewind</application> (Michael Banck) </para> </listitem> <listitem> <para> - Make <application>pg_rewind</> turn off <varname>synchronous_commit</> + Make <application>pg_rewind</application> turn off <varname>synchronous_commit</varname> in its session on the source server (Michael Banck, Michael Paquier) </para> <para> - This allows <application>pg_rewind</> to work even when the source + This allows <application>pg_rewind</application> to work even when the source server is using synchronous replication that is not working for some reason. </para> @@ -2755,8 +2755,8 @@ Branch: REL9_5_STABLE [3aa233f82] 2016-08-29 18:12:04 -0300 <listitem> <para> - In <application>pg_xlogdump</>, retry opening new WAL segments when - using <option>--follow</> option (Magnus Hagander) + In <application>pg_xlogdump</application>, retry opening new WAL segments when + using <option>--follow</option> option (Magnus Hagander) </para> <para> @@ -2775,7 +2775,7 @@ Branch: REL9_4_STABLE [314a25fb3] 2016-08-29 14:38:17 +0900 Branch: REL9_3_STABLE [5833306dd] 2016-08-29 15:51:30 +0900 --> <para> - Fix <application>pg_xlogdump</> to cope with a WAL file that begins + Fix <application>pg_xlogdump</application> to cope with a WAL file that begins with a continuation record spanning more than one page (Pavan Deolasee) </para> @@ -2790,8 +2790,8 @@ Branch: REL9_5_STABLE [60b6d99da] 2016-09-15 09:30:36 -0400 Branch: REL9_4_STABLE [1336bd986] 2016-09-15 09:22:52 -0400 --> <para> - Fix <filename>contrib/pg_buffercache</> to work - when <varname>shared_buffers</> exceeds 256GB (KaiGai Kohei) + Fix <filename>contrib/pg_buffercache</filename> to work + when <varname>shared_buffers</varname> exceeds 256GB (KaiGai Kohei) </para> </listitem> @@ -2807,8 +2807,8 @@ Branch: REL9_2_STABLE [60bb1bb12] 2016-08-17 15:51:11 -0400 Branch: REL9_1_STABLE [9942376a5] 2016-08-17 15:51:11 -0400 --> <para> - Fix <filename>contrib/intarray/bench/bench.pl</> to print the results - of the <command>EXPLAIN</> it does when given the <option>-e</> option + Fix <filename>contrib/intarray/bench/bench.pl</filename> to print the results + of the <command>EXPLAIN</command> it does when given the <option>-e</option> option (Daniel Gustafsson) </para> </listitem> @@ -2842,11 +2842,11 @@ Branch: REL9_4_STABLE [5d41f27a9] 2016-09-23 15:50:00 -0400 </para> <para> - When <productname>PostgreSQL</> has been configured - with <option>--enable-tap-tests</>, <quote>make install</> will now + When <productname>PostgreSQL</productname> has been configured + with <option>--enable-tap-tests</option>, <quote>make install</quote> will now install the Perl support files for TAP testing where PGXS can find them. This allows non-core extensions to - use <literal>$(prove_check)</> without extra tests. + use <literal>$(prove_check)</literal> without extra tests. </para> </listitem> @@ -2859,7 +2859,7 @@ Branch: REL9_5_STABLE [52acf020a] 2016-09-19 14:27:08 -0400 Branch: REL9_4_STABLE [ca93b816f] 2016-09-19 14:27:13 -0400 --> <para> - In MSVC builds, include <application>pg_recvlogical</> in a + In MSVC builds, include <application>pg_recvlogical</application> in a client-only installation (MauMau) </para> </listitem> @@ -2899,17 +2899,17 @@ Branch: REL9_1_STABLE [380dad29d] 2016-09-02 17:29:32 -0400 If a dynamic time zone abbreviation does not match any entry in the referenced time zone, treat it as equivalent to the time zone name. This avoids unexpected failures when IANA removes abbreviations from - their time zone database, as they did in <application>tzdata</> + their time zone database, as they did in <application>tzdata</application> release 2016f and seem likely to do again in the future. The consequences were not limited to not recognizing the individual abbreviation; any mismatch caused - the <structname>pg_timezone_abbrevs</> view to fail altogether. + the <structname>pg_timezone_abbrevs</structname> view to fail altogether. </para> </listitem> <listitem> <para> - Update time zone data files to <application>tzdata</> release 2016h + Update time zone data files to <application>tzdata</application> release 2016h for DST law changes in Palestine and Turkey, plus historical corrections for Turkey and some regions of Russia. Switch to numeric abbreviations for some time zones in Antarctica, @@ -2922,15 +2922,15 @@ Branch: REL9_1_STABLE [380dad29d] 2016-09-02 17:29:32 -0400 or no currency among the local population. They are in process of reversing that policy in favor of using numeric UTC offsets in zones where there is no evidence of real-world use of an English - abbreviation. At least for the time being, <productname>PostgreSQL</> + abbreviation. At least for the time being, <productname>PostgreSQL</productname> will continue to accept such removed abbreviations for timestamp input. - But they will not be shown in the <structname>pg_timezone_names</> + But they will not be shown in the <structname>pg_timezone_names</structname> view nor used for output. </para> <para> - In this update, <literal>AMT</> is no longer shown as being in use to - mean Armenia Time. Therefore, we have changed the <literal>Default</> + In this update, <literal>AMT</literal> is no longer shown as being in use to + mean Armenia Time. Therefore, we have changed the <literal>Default</literal> abbreviation set to interpret it as Amazon Time, thus UTC-4 not UTC+4. </para> </listitem> @@ -2984,17 +2984,17 @@ Branch: REL9_1_STABLE [5327b764a] 2016-08-08 10:33:47 -0400 --> <para> Fix possible mis-evaluation of - nested <literal>CASE</>-<literal>WHEN</> expressions (Heikki + nested <literal>CASE</literal>-<literal>WHEN</literal> expressions (Heikki Linnakangas, Michael Paquier, Tom Lane) </para> <para> - A <literal>CASE</> expression appearing within the test value - subexpression of another <literal>CASE</> could become confused about + A <literal>CASE</literal> expression appearing within the test value + subexpression of another <literal>CASE</literal> could become confused about whether its own test value was null or not. Also, inlining of a SQL function implementing the equality operator used by - a <literal>CASE</> expression could result in passing the wrong test - value to functions called within a <literal>CASE</> expression in the + a <literal>CASE</literal> expression could result in passing the wrong test + value to functions called within a <literal>CASE</literal> expression in the SQL function's body. If the test values were of different data types, a crash might result; moreover such situations could be abused to allow disclosure of portions of server memory. (CVE-2016-5423) @@ -3055,7 +3055,7 @@ Branch: REL9_1_STABLE [aed766ab5] 2016-08-08 10:07:53 -0400 </para> <para> - Numerous places in <application>vacuumdb</> and other client programs + Numerous places in <application>vacuumdb</application> and other client programs could become confused by database and role names containing double quotes or backslashes. Tighten up quoting rules to make that safe. Also, ensure that when a conninfo string is used as a database name @@ -3064,22 +3064,22 @@ Branch: REL9_1_STABLE [aed766ab5] 2016-08-08 10:07:53 -0400 <para> Fix handling of paired double quotes - in <application>psql</>'s <command>\connect</> - and <command>\password</> commands to match the documentation. + in <application>psql</application>'s <command>\connect</command> + and <command>\password</command> commands to match the documentation. </para> <para> - Introduce a new <option>-reuse-previous</> option - in <application>psql</>'s <command>\connect</> command to allow + Introduce a new <option>-reuse-previous</option> option + in <application>psql</application>'s <command>\connect</command> command to allow explicit control of whether to re-use connection parameters from a previous connection. (Without this, the choice is based on whether the database name looks like a conninfo string, as before.) This allows secure handling of database names containing special - characters in <application>pg_dumpall</> scripts. + characters in <application>pg_dumpall</application> scripts. </para> <para> - <application>pg_dumpall</> now refuses to deal with database and role + <application>pg_dumpall</application> now refuses to deal with database and role names containing carriage returns or newlines, as it seems impractical to quote those characters safely on Windows. In future we may reject such names on the server side, but that step has not been taken yet. @@ -3089,7 +3089,7 @@ Branch: REL9_1_STABLE [aed766ab5] 2016-08-08 10:07:53 -0400 These are considered security fixes because crafted object names containing special characters could have been used to execute commands with superuser privileges the next time a superuser - executes <application>pg_dumpall</> or other routine maintenance + executes <application>pg_dumpall</application> or other routine maintenance operations. (CVE-2016-5424) </para> </listitem> @@ -3111,18 +3111,18 @@ Branch: REL9_2_STABLE [7b8526e5d] 2016-07-28 16:09:15 -0400 Branch: REL9_1_STABLE [c0e5096fc] 2016-07-28 16:09:15 -0400 --> <para> - Fix corner-case misbehaviors for <literal>IS NULL</>/<literal>IS NOT - NULL</> applied to nested composite values (Andrew Gierth, Tom Lane) + Fix corner-case misbehaviors for <literal>IS NULL</literal>/<literal>IS NOT + NULL</literal> applied to nested composite values (Andrew Gierth, Tom Lane) </para> <para> - The SQL standard specifies that <literal>IS NULL</> should return + The SQL standard specifies that <literal>IS NULL</literal> should return TRUE for a row of all null values (thus <literal>ROW(NULL,NULL) IS - NULL</> yields TRUE), but this is not meant to apply recursively - (thus <literal>ROW(NULL, ROW(NULL,NULL)) IS NULL</> yields FALSE). + NULL</literal> yields TRUE), but this is not meant to apply recursively + (thus <literal>ROW(NULL, ROW(NULL,NULL)) IS NULL</literal> yields FALSE). The core executor got this right, but certain planner optimizations treated the test as recursive (thus producing TRUE in both cases), - and <filename>contrib/postgres_fdw</> could produce remote queries + and <filename>contrib/postgres_fdw</filename> could produce remote queries that misbehaved similarly. </para> </listitem> @@ -3134,8 +3134,8 @@ Branch: master [eae1ad9b6] 2016-05-23 19:23:36 -0400 Branch: REL9_5_STABLE [e504d915b] 2016-05-23 19:23:36 -0400 --> <para> - Fix <quote>unrecognized node type</> error for <command>INSERT ... ON - CONFLICT</> within a recursive CTE (a <literal>WITH</> item) (Peter + Fix <quote>unrecognized node type</quote> error for <command>INSERT ... ON + CONFLICT</command> within a recursive CTE (a <literal>WITH</literal> item) (Peter Geoghegan) </para> </listitem> @@ -3147,7 +3147,7 @@ Branch: master [26e66184d] 2016-05-11 16:20:23 -0400 Branch: REL9_5_STABLE [58d802410] 2016-05-11 16:20:03 -0400 --> <para> - Fix <command>INSERT ... ON CONFLICT</> to successfully match index + Fix <command>INSERT ... ON CONFLICT</command> to successfully match index expressions or index predicates that are simplified during the planner's expression preprocessing phase (Tom Lane) </para> @@ -3161,7 +3161,7 @@ Branch: REL9_5_STABLE [31ce32ade] 2016-07-04 16:09:11 -0400 --> <para> Correctly handle violations of exclusion constraints that apply to - the target table of an <literal>INSERT ... ON CONFLICT</> command, + the target table of an <literal>INSERT ... ON CONFLICT</literal> command, but are not one of the selected arbiter indexes (Tom Lane) </para> @@ -3178,7 +3178,7 @@ Branch: master [8a13d5e6d] 2016-05-11 17:06:53 -0400 Branch: REL9_5_STABLE [428484ce1] 2016-05-11 17:06:53 -0400 --> <para> - Fix <command>INSERT ... ON CONFLICT</> to not fail if the target + Fix <command>INSERT ... ON CONFLICT</command> to not fail if the target table has a unique index on OID (Tom Lane) </para> </listitem> @@ -3194,7 +3194,7 @@ Branch: REL9_2_STABLE [f66e0fec3] 2016-06-16 17:16:53 -0400 Branch: REL9_1_STABLE [7b97dafa2] 2016-06-16 17:16:58 -0400 --> <para> - Make the <type>inet</> and <type>cidr</> data types properly reject + Make the <type>inet</type> and <type>cidr</type> data types properly reject IPv6 addresses with too many colon-separated fields (Tom Lane) </para> </listitem> @@ -3210,8 +3210,8 @@ Branch: REL9_2_STABLE [89b301104] 2016-07-16 14:42:37 -0400 Branch: REL9_1_STABLE [608cc0c41] 2016-07-16 14:42:37 -0400 --> <para> - Prevent crash in <function>close_ps()</> - (the <type>point</> <literal>##</> <type>lseg</> operator) + Prevent crash in <function>close_ps()</function> + (the <type>point</type> <literal>##</literal> <type>lseg</type> operator) for NaN input coordinates (Tom Lane) </para> @@ -3229,7 +3229,7 @@ Branch: REL9_4_STABLE [b25d87f91] 2016-07-01 11:40:22 -0400 Branch: REL9_3_STABLE [b0f20c2ea] 2016-07-01 11:40:22 -0400 --> <para> - Avoid possible crash in <function>pg_get_expr()</> when inconsistent + Avoid possible crash in <function>pg_get_expr()</function> when inconsistent values are passed to it (Michael Paquier, Thomas Munro) </para> </listitem> @@ -3245,12 +3245,12 @@ Branch: REL9_2_STABLE [b0134fe84] 2016-08-08 11:13:45 -0400 Branch: REL9_1_STABLE [d555d2642] 2016-08-08 11:13:51 -0400 --> <para> - Fix several one-byte buffer over-reads in <function>to_number()</> + Fix several one-byte buffer over-reads in <function>to_number()</function> (Peter Eisentraut) </para> <para> - In several cases the <function>to_number()</> function would read one + In several cases the <function>to_number()</function> function would read one more character than it should from the input string. There is a small chance of a crash, if the input happens to be adjacent to the end of memory. @@ -3267,8 +3267,8 @@ Branch: REL9_3_STABLE [17bfef80e] 2016-06-27 15:57:21 -0400 --> <para> Do not run the planner on the query contained in <literal>CREATE - MATERIALIZED VIEW</> or <literal>CREATE TABLE AS</> - when <literal>WITH NO DATA</> is specified (Michael Paquier, + MATERIALIZED VIEW</literal> or <literal>CREATE TABLE AS</literal> + when <literal>WITH NO DATA</literal> is specified (Michael Paquier, Tom Lane) </para> @@ -3291,7 +3291,7 @@ Branch: REL9_1_STABLE [37276017f] 2016-07-15 17:49:49 -0700 --> <para> Avoid unsafe intermediate state during expensive paths - through <function>heap_update()</> (Masahiko Sawada, Andres Freund) + through <function>heap_update()</function> (Masahiko Sawada, Andres Freund) </para> <para> @@ -3331,8 +3331,8 @@ Branch: REL9_4_STABLE [166873dd0] 2016-07-15 14:17:20 -0400 Branch: REL9_3_STABLE [6c243f90a] 2016-07-15 14:17:20 -0400 --> <para> - Avoid unnecessary <quote>could not serialize access</> errors when - acquiring <literal>FOR KEY SHARE</> row locks in serializable mode + Avoid unnecessary <quote>could not serialize access</quote> errors when + acquiring <literal>FOR KEY SHARE</literal> row locks in serializable mode (Álvaro Herrera) </para> </listitem> @@ -3346,14 +3346,14 @@ Branch: master [9eaf5be50] 2016-06-03 18:07:14 -0400 Branch: REL9_5_STABLE [8355897ff] 2016-06-03 18:07:14 -0400 --> <para> - Make sure <quote>expanded</> datums returned by a plan node are + Make sure <quote>expanded</quote> datums returned by a plan node are read-only (Tom Lane) </para> <para> This avoids failures in some cases where the result of a lower plan node is referenced in multiple places in upper nodes. So far as - core <productname>PostgreSQL</> is concerned, only array values + core <productname>PostgreSQL</productname> is concerned, only array values returned by PL/pgSQL functions are at risk; but extensions might use expanded datums for other things. </para> @@ -3374,7 +3374,7 @@ Branch: REL9_3_STABLE [dafdcbb6c] 2016-06-22 11:55:32 -0400 Branch: REL9_2_STABLE [dd41661d2] 2016-06-22 11:55:35 -0400 --> <para> - Avoid crash in <literal>postgres -C</> when the specified variable + Avoid crash in <literal>postgres -C</literal> when the specified variable has a null string value (Michael Paquier) </para> </listitem> @@ -3470,12 +3470,12 @@ Branch: REL9_2_STABLE [4cf0978ea] 2016-05-24 15:47:51 -0400 Branch: REL9_1_STABLE [5551dac59] 2016-05-24 15:47:51 -0400 --> <para> - Avoid consuming a transaction ID during <command>VACUUM</> + Avoid consuming a transaction ID during <command>VACUUM</command> (Alexander Korotkov) </para> <para> - Some cases in <command>VACUUM</> unnecessarily caused an XID to be + Some cases in <command>VACUUM</command> unnecessarily caused an XID to be assigned to the current transaction. Normally this is negligible, but if one is up against the XID wraparound limit, consuming more XIDs during anti-wraparound vacuums is a very bad thing. @@ -3498,7 +3498,7 @@ Branch: REL9_3_STABLE [28f294afd] 2016-06-24 18:29:28 -0400 <para> The usual symptom of this bug is errors - like <quote>MultiXactId <replaceable>NNN</> has not been created + like <quote>MultiXactId <replaceable>NNN</replaceable> has not been created yet -- apparent wraparound</quote>. </para> </listitem> @@ -3514,8 +3514,8 @@ Branch: REL9_2_STABLE [3201709de] 2016-06-06 17:44:18 -0400 Branch: REL9_1_STABLE [32ceb8dfb] 2016-06-06 17:44:18 -0400 --> <para> - When a manual <command>ANALYZE</> specifies a column list, don't - reset the table's <literal>changes_since_analyze</> counter + When a manual <command>ANALYZE</command> specifies a column list, don't + reset the table's <literal>changes_since_analyze</literal> counter (Tom Lane) </para> @@ -3536,7 +3536,7 @@ Branch: REL9_2_STABLE [127d73009] 2016-08-07 18:52:02 -0400 Branch: REL9_1_STABLE [a449ad095] 2016-08-07 18:52:02 -0400 --> <para> - Fix <command>ANALYZE</>'s overestimation of <literal>n_distinct</> + Fix <command>ANALYZE</command>'s overestimation of <literal>n_distinct</literal> for a unique or nearly-unique column with many null entries (Tom Lane) </para> @@ -3600,7 +3600,7 @@ Branch: REL9_4_STABLE [98d5f366b] 2016-08-06 14:28:38 -0400 </para> <para> - This mistake prevented <command>VACUUM</> from completing in some + This mistake prevented <command>VACUUM</command> from completing in some cases involving corrupt b-tree indexes. </para> </listitem> @@ -3612,7 +3612,7 @@ Branch: master [8cf739de8] 2016-06-24 16:57:36 -0400 Branch: REL9_5_STABLE [07f69137b] 2016-06-24 16:57:36 -0400 --> <para> - Fix building of large (bigger than <varname>shared_buffers</>) + Fix building of large (bigger than <varname>shared_buffers</varname>) hash indexes (Tom Lane) </para> @@ -3646,9 +3646,9 @@ Branch: master [8a859691d] 2016-06-05 11:53:06 -0400 Branch: REL9_5_STABLE [a7aa61ffe] 2016-06-05 11:53:06 -0400 --> <para> - Fix possible crash during a nearest-neighbor (<literal>ORDER BY</> - distance) indexscan on a <filename>contrib/btree_gist</> index on - an <type>interval</> column (Peter Geoghegan) + Fix possible crash during a nearest-neighbor (<literal>ORDER BY</literal> + distance) indexscan on a <filename>contrib/btree_gist</filename> index on + an <type>interval</type> column (Peter Geoghegan) </para> </listitem> @@ -3659,7 +3659,7 @@ Branch: master [975ad4e60] 2016-05-30 14:47:22 -0400 Branch: REL9_5_STABLE [2973d7d02] 2016-05-30 14:47:22 -0400 --> <para> - Fix <quote>PANIC: failed to add BRIN tuple</> error when attempting + Fix <quote>PANIC: failed to add BRIN tuple</quote> error when attempting to update a BRIN index entry (Álvaro Herrera) </para> </listitem> @@ -3682,8 +3682,8 @@ Branch: master [baebab3ac] 2016-07-12 18:07:03 -0400 Branch: REL9_5_STABLE [a0943dbbe] 2016-07-12 18:06:50 -0400 --> <para> - Fix PL/pgSQL's handling of the <literal>INTO</> clause - within <command>IMPORT FOREIGN SCHEMA</> commands (Tom Lane) + Fix PL/pgSQL's handling of the <literal>INTO</literal> clause + within <command>IMPORT FOREIGN SCHEMA</command> commands (Tom Lane) </para> </listitem> @@ -3698,8 +3698,8 @@ Branch: REL9_2_STABLE [6c0be49b2] 2016-07-17 09:39:51 -0400 Branch: REL9_1_STABLE [84d679204] 2016-07-17 09:41:08 -0400 --> <para> - Fix <filename>contrib/btree_gin</> to handle the smallest - possible <type>bigint</> value correctly (Peter Eisentraut) + Fix <filename>contrib/btree_gin</filename> to handle the smallest + possible <type>bigint</type> value correctly (Peter Eisentraut) </para> </listitem> @@ -3721,7 +3721,7 @@ Branch: REL9_1_STABLE [1f63b0e09] 2016-08-05 18:58:36 -0400 <para> It's planned to switch to two-part instead of three-part server version numbers for releases after 9.6. Make sure - that <function>PQserverVersion()</> returns the correct value for + that <function>PQserverVersion()</function> returns the correct value for such cases. </para> </listitem> @@ -3737,7 +3737,7 @@ Branch: REL9_2_STABLE [295edbecf] 2016-08-01 15:08:48 +0200 Branch: REL9_1_STABLE [c15f502b6] 2016-08-01 15:08:36 +0200 --> <para> - Fix <application>ecpg</>'s code for <literal>unsigned long long</> + Fix <application>ecpg</application>'s code for <literal>unsigned long long</literal> array elements (Michael Meskes) </para> </listitem> @@ -3752,8 +3752,8 @@ Branch: REL9_3_STABLE [6693c9d7b] 2016-08-02 12:49:09 -0400 Branch: REL9_2_STABLE [a5a7caaa1] 2016-08-02 12:49:15 -0400 --> <para> - In <application>pg_dump</> with both <option>-c</> and <option>-C</> - options, avoid emitting an unwanted <literal>CREATE SCHEMA public</> + In <application>pg_dump</application> with both <option>-c</option> and <option>-C</option> + options, avoid emitting an unwanted <literal>CREATE SCHEMA public</literal> command (David Johnston, Tom Lane) </para> </listitem> @@ -3771,15 +3771,15 @@ Branch: REL9_4_STABLE [53c2601a5] 2016-06-03 11:29:20 -0400 Branch: REL9_3_STABLE [4a21c6fd7] 2016-06-03 11:29:20 -0400 --> <para> - Improve handling of <systemitem>SIGTERM</>/control-C in - parallel <application>pg_dump</> and <application>pg_restore</> (Tom + Improve handling of <systemitem>SIGTERM</systemitem>/control-C in + parallel <application>pg_dump</application> and <application>pg_restore</application> (Tom Lane) </para> <para> Make sure that the worker processes will exit promptly, and also arrange to send query-cancel requests to the connected backends, in case they - are doing something long-running such as a <command>CREATE INDEX</>. + are doing something long-running such as a <command>CREATE INDEX</command>. </para> </listitem> @@ -3792,17 +3792,17 @@ Branch: REL9_4_STABLE [ea274b2f4] 2016-05-25 12:39:57 -0400 Branch: REL9_3_STABLE [1c8205159] 2016-05-25 12:39:57 -0400 --> <para> - Fix error reporting in parallel <application>pg_dump</> - and <application>pg_restore</> (Tom Lane) + Fix error reporting in parallel <application>pg_dump</application> + and <application>pg_restore</application> (Tom Lane) </para> <para> - Previously, errors reported by <application>pg_dump</> - or <application>pg_restore</> worker processes might never make it to + Previously, errors reported by <application>pg_dump</application> + or <application>pg_restore</application> worker processes might never make it to the user's console, because the messages went through the master process, and there were various deadlock scenarios that would prevent the master process from passing on the messages. Instead, just print - everything to <literal>stderr</>. In some cases this will result in + everything to <literal>stderr</literal>. In some cases this will result in duplicate messages (for instance, if all the workers report a server shutdown), but that seems better than no message. </para> @@ -3817,8 +3817,8 @@ Branch: REL9_4_STABLE [d32bc204c] 2016-05-26 10:50:42 -0400 Branch: REL9_3_STABLE [b9784e1f7] 2016-05-26 10:50:46 -0400 --> <para> - Ensure that parallel <application>pg_dump</> - or <application>pg_restore</> on Windows will shut down properly + Ensure that parallel <application>pg_dump</application> + or <application>pg_restore</application> on Windows will shut down properly after an error (Kyotaro Horiguchi) </para> @@ -3835,13 +3835,13 @@ Branch: master [d74048def] 2016-05-26 22:14:23 +0200 Branch: REL9_5_STABLE [47e596976] 2016-05-26 22:18:04 +0200 --> <para> - Make parallel <application>pg_dump</> fail cleanly when run against a + Make parallel <application>pg_dump</application> fail cleanly when run against a standby server (Magnus Hagander) </para> <para> This usage is not supported - unless <option>--no-synchronized-snapshots</> is specified, but the + unless <option>--no-synchronized-snapshots</option> is specified, but the error was not handled very well. </para> </listitem> @@ -3855,7 +3855,7 @@ Branch: REL9_4_STABLE [f2f18a37c] 2016-05-26 11:51:16 -0400 Branch: REL9_3_STABLE [99565a1ef] 2016-05-26 11:51:20 -0400 --> <para> - Make <application>pg_dump</> behave better when built without zlib + Make <application>pg_dump</application> behave better when built without zlib support (Kyotaro Horiguchi) </para> @@ -3876,7 +3876,7 @@ Branch: REL9_2_STABLE [a21617759] 2016-08-01 17:38:00 +0900 Branch: REL9_1_STABLE [366f4a962] 2016-08-01 17:38:05 +0900 --> <para> - Make <application>pg_basebackup</> accept <literal>-Z 0</> as + Make <application>pg_basebackup</application> accept <literal>-Z 0</literal> as specifying no compression (Fujii Masao) </para> </listitem> @@ -3922,13 +3922,13 @@ Branch: REL9_4_STABLE [c2651cd24] 2016-05-27 10:40:20 -0400 Branch: REL9_3_STABLE [1f1e70a87] 2016-05-27 10:40:20 -0400 --> <para> - Be more predictable about reporting <quote>statement timeout</> - versus <quote>lock timeout</> (Tom Lane) + Be more predictable about reporting <quote>statement timeout</quote> + versus <quote>lock timeout</quote> (Tom Lane) </para> <para> On heavily loaded machines, the regression tests sometimes failed due - to reporting <quote>lock timeout</> even though the statement timeout + to reporting <quote>lock timeout</quote> even though the statement timeout should have occurred first. </para> </listitem> @@ -3981,7 +3981,7 @@ Branch: REL9_1_STABLE [d70df7867] 2016-07-19 17:53:31 -0400 --> <para> Update our copy of the timezone code to match - IANA's <application>tzcode</> release 2016c (Tom Lane) + IANA's <application>tzcode</application> release 2016c (Tom Lane) </para> <para> @@ -4002,7 +4002,7 @@ Branch: REL9_2_STABLE [7822792f7] 2016-08-05 12:58:58 -0400 Branch: REL9_1_STABLE [a44388ffe] 2016-08-05 12:59:02 -0400 --> <para> - Update time zone data files to <application>tzdata</> release 2016f + Update time zone data files to <application>tzdata</application> release 2016f for DST law changes in Kemerovo and Novosibirsk, plus historical corrections for Azerbaijan, Belarus, and Morocco. </para> @@ -4066,7 +4066,7 @@ Branch: REL9_1_STABLE [9b676fd49] 2016-05-07 00:09:37 -0400 using OpenSSL within a single process and not all the code involved follows the same rules for when to clear the error queue. Failures have been reported specifically when a client application - uses SSL connections in <application>libpq</> concurrently with + uses SSL connections in <application>libpq</application> concurrently with SSL connections using the PHP, Python, or Ruby wrappers for OpenSSL. It's possible for similar problems to arise within the server as well, if an extension module establishes an outgoing SSL connection. @@ -4084,7 +4084,7 @@ Branch: REL9_2_STABLE [ad2d32b57] 2016-04-21 20:05:58 -0400 Branch: REL9_1_STABLE [6882dbd34] 2016-04-21 20:05:58 -0400 --> <para> - Fix <quote>failed to build any <replaceable>N</>-way joins</quote> + Fix <quote>failed to build any <replaceable>N</replaceable>-way joins</quote> planner error with a full join enclosed in the right-hand side of a left join (Tom Lane) </para> @@ -4106,10 +4106,10 @@ Branch: REL9_2_STABLE [f02cb8c9a] 2016-04-29 20:19:38 -0400 <para> Given a three-or-more-way equivalence class of variables, such - as <literal>X.X = Y.Y = Z.Z</>, it was possible for the planner to omit + as <literal>X.X = Y.Y = Z.Z</literal>, it was possible for the planner to omit some of the tests needed to enforce that all the variables are actually equal, leading to join rows being output that didn't satisfy - the <literal>WHERE</> clauses. For various reasons, erroneous plans + the <literal>WHERE</literal> clauses. For various reasons, erroneous plans were seldom selected in practice, so that this bug has gone undetected for a long time. </para> @@ -4128,7 +4128,7 @@ Branch: REL9_5_STABLE [81deadd31] 2016-04-21 23:17:36 -0400 </para> <para> - An example is that <literal>SELECT (ARRAY[])::text[]</> gave an error, + An example is that <literal>SELECT (ARRAY[])::text[]</literal> gave an error, though it worked without the parentheses. </para> </listitem> @@ -4160,7 +4160,7 @@ Branch: REL9_4_STABLE [ef35afa35] 2016-04-20 14:25:15 -0400 <para> The memory leak would typically not amount to much in simple queries, but it could be very substantial during a large GIN index build with - high <varname>maintenance_work_mem</>. + high <varname>maintenance_work_mem</varname>. </para> </listitem> @@ -4175,8 +4175,8 @@ Branch: REL9_2_STABLE [11247dd99] 2016-05-06 12:09:20 -0400 Branch: REL9_1_STABLE [7bad282c3] 2016-05-06 12:09:20 -0400 --> <para> - Fix possible misbehavior of <literal>TH</>, <literal>th</>, - and <literal>Y,YYY</> format codes in <function>to_timestamp()</> + Fix possible misbehavior of <literal>TH</literal>, <literal>th</literal>, + and <literal>Y,YYY</literal> format codes in <function>to_timestamp()</function> (Tom Lane) </para> @@ -4197,9 +4197,9 @@ Branch: REL9_2_STABLE [c7c145e4f] 2016-04-21 14:20:18 -0400 Branch: REL9_1_STABLE [663624e60] 2016-04-21 14:20:18 -0400 --> <para> - Fix dumping of rules and views in which the <replaceable>array</> - argument of a <literal><replaceable>value</> <replaceable>operator</> - ANY (<replaceable>array</>)</literal> construct is a sub-SELECT + Fix dumping of rules and views in which the <replaceable>array</replaceable> + argument of a <literal><replaceable>value</replaceable> <replaceable>operator</replaceable> + ANY (<replaceable>array</replaceable>)</literal> construct is a sub-SELECT (Tom Lane) </para> </listitem> @@ -4212,14 +4212,14 @@ Branch: REL9_5_STABLE [f3d17491c] 2016-04-04 18:05:23 -0400 Branch: REL9_4_STABLE [28148e258] 2016-04-04 18:05:24 -0400 --> <para> - Disallow newlines in <command>ALTER SYSTEM</> parameter values + Disallow newlines in <command>ALTER SYSTEM</command> parameter values (Tom Lane) </para> <para> The configuration-file parser doesn't support embedded newlines in string literals, so we mustn't allow them in values to be inserted - by <command>ALTER SYSTEM</>. + by <command>ALTER SYSTEM</command>. </para> </listitem> @@ -4231,7 +4231,7 @@ Branch: REL9_5_STABLE [8f8e65d34] 2016-04-15 12:11:27 -0400 Branch: REL9_4_STABLE [8eed31ffb] 2016-04-15 12:11:27 -0400 --> <para> - Fix <command>ALTER TABLE ... REPLICA IDENTITY USING INDEX</> to + Fix <command>ALTER TABLE ... REPLICA IDENTITY USING INDEX</command> to work properly if an index on OID is selected (David Rowley) </para> </listitem> @@ -4290,13 +4290,13 @@ Branch: REL9_2_STABLE [1b22368ff] 2016-04-20 23:48:13 -0400 Branch: REL9_1_STABLE [4c1c9f80b] 2016-04-20 23:48:13 -0400 --> <para> - Make <application>pg_regress</> use a startup timeout from the - <envar>PGCTLTIMEOUT</> environment variable, if that's set (Tom Lane) + Make <application>pg_regress</application> use a startup timeout from the + <envar>PGCTLTIMEOUT</envar> environment variable, if that's set (Tom Lane) </para> <para> This is for consistency with a behavior recently added - to <application>pg_ctl</>; it eases automated testing on slow machines. + to <application>pg_ctl</application>; it eases automated testing on slow machines. </para> </listitem> @@ -4311,7 +4311,7 @@ Branch: REL9_2_STABLE [6bb42d520] 2016-04-13 18:57:52 -0400 Branch: REL9_1_STABLE [3ef1f3a3e] 2016-04-13 18:57:52 -0400 --> <para> - Fix <application>pg_upgrade</> to correctly restore extension + Fix <application>pg_upgrade</application> to correctly restore extension membership for operator families containing only one operator class (Tom Lane) </para> @@ -4319,7 +4319,7 @@ Branch: REL9_1_STABLE [3ef1f3a3e] 2016-04-13 18:57:52 -0400 <para> In such a case, the operator family was restored into the new database, but it was no longer marked as part of the extension. This had no - immediate ill effects, but would cause later <application>pg_dump</> + immediate ill effects, but would cause later <application>pg_dump</application> runs to emit output that would cause (harmless) errors on restore. </para> </listitem> @@ -4333,13 +4333,13 @@ Branch: REL9_4_STABLE [e1aecebc0] 2016-05-06 22:05:51 -0400 Branch: REL9_3_STABLE [e1d88f983] 2016-05-06 22:05:51 -0400 --> <para> - Fix <application>pg_upgrade</> to not fail when new-cluster TOAST rules + Fix <application>pg_upgrade</application> to not fail when new-cluster TOAST rules differ from old (Tom Lane) </para> <para> - <application>pg_upgrade</> had special-case code to handle the - situation where the new <productname>PostgreSQL</> version thinks that + <application>pg_upgrade</application> had special-case code to handle the + situation where the new <productname>PostgreSQL</productname> version thinks that a table should have a TOAST table while the old version did not. That code was broken, so remove it, and instead do nothing in such cases; there seems no reason to believe that we can't get along fine without @@ -4369,7 +4369,7 @@ Branch: REL9_2_STABLE [b24f7e280] 2016-04-18 13:33:07 -0400 --> <para> Reduce the number of SysV semaphores used by a build configured with - <option>--disable-spinlocks</> (Tom Lane) + <option>--disable-spinlocks</option> (Tom Lane) </para> </listitem> @@ -4384,8 +4384,8 @@ Branch: REL9_2_STABLE [0f5491283] 2016-04-23 16:53:15 -0400 Branch: REL9_1_STABLE [cbff4b708] 2016-04-23 16:53:15 -0400 --> <para> - Rename internal function <function>strtoi()</> - to <function>strtoint()</> to avoid conflict with a NetBSD library + Rename internal function <function>strtoi()</function> + to <function>strtoint()</function> to avoid conflict with a NetBSD library function (Thomas Munro) </para> </listitem> @@ -4407,8 +4407,8 @@ Branch: REL9_2_STABLE [b5ebc513d] 2016-04-21 16:59:13 -0400 Branch: REL9_1_STABLE [9028f404e] 2016-04-21 16:59:17 -0400 --> <para> - Fix reporting of errors from <function>bind()</> - and <function>listen()</> system calls on Windows (Tom Lane) + Fix reporting of errors from <function>bind()</function> + and <function>listen()</function> system calls on Windows (Tom Lane) </para> </listitem> @@ -4463,7 +4463,7 @@ Branch: REL9_4_STABLE [c238a4101] 2016-04-22 05:20:07 -0400 Branch: REL9_3_STABLE [ab5c6d01f] 2016-04-22 05:20:18 -0400 --> <para> - Fix <function>putenv()</> to work properly with Visual Studio 2013 + Fix <function>putenv()</function> to work properly with Visual Studio 2013 (Michael Paquier) </para> </listitem> @@ -4479,12 +4479,12 @@ Branch: REL9_2_STABLE [b4b06931e] 2016-03-29 11:54:58 -0400 Branch: REL9_1_STABLE [6cd30292b] 2016-03-29 11:54:58 -0400 --> <para> - Avoid possibly-unsafe use of Windows' <function>FormatMessage()</> + Avoid possibly-unsafe use of Windows' <function>FormatMessage()</function> function (Christian Ullrich) </para> <para> - Use the <literal>FORMAT_MESSAGE_IGNORE_INSERTS</> flag where + Use the <literal>FORMAT_MESSAGE_IGNORE_INSERTS</literal> flag where appropriate. No live bug is known to exist here, but it seems like a good idea to be careful. </para> @@ -4501,9 +4501,9 @@ Branch: REL9_2_STABLE [29d154e36] 2016-05-05 20:09:27 -0400 Branch: REL9_1_STABLE [bfc39da64] 2016-05-05 20:09:32 -0400 --> <para> - Update time zone data files to <application>tzdata</> release 2016d + Update time zone data files to <application>tzdata</application> release 2016d for DST law changes in Russia and Venezuela. There are new zone - names <literal>Europe/Kirov</> and <literal>Asia/Tomsk</> to reflect + names <literal>Europe/Kirov</literal> and <literal>Asia/Tomsk</literal> to reflect the fact that these regions now have different time zone histories from adjacent regions. </para> @@ -4536,7 +4536,7 @@ Branch: REL9_1_STABLE [bfc39da64] 2016-05-05 20:09:32 -0400 </para> <para> - However, you may need to <command>REINDEX</> some indexes after applying + However, you may need to <command>REINDEX</command> some indexes after applying the update, as per the first changelog entry below. </para> </sect2> @@ -4554,39 +4554,39 @@ Branch: REL9_5_STABLE [8aa6e9780] 2016-03-23 16:04:35 -0400 <listitem> <para> - Disable abbreviated keys for string sorting in non-<literal>C</> + Disable abbreviated keys for string sorting in non-<literal>C</literal> locales (Robert Haas) </para> <para> - <productname>PostgreSQL</> 9.5 introduced logic for speeding up + <productname>PostgreSQL</productname> 9.5 introduced logic for speeding up comparisons of string data types by using the standard C library - function <function>strxfrm()</> as a substitute - for <function>strcoll()</>. It now emerges that most versions of + function <function>strxfrm()</function> as a substitute + for <function>strcoll()</function>. It now emerges that most versions of glibc (Linux's implementation of the C library) have buggy - implementations of <function>strxfrm()</> that, in some locales, + implementations of <function>strxfrm()</function> that, in some locales, can produce string comparison results that do not - match <function>strcoll()</>. Until this problem can be better - characterized, disable the optimization in all non-<literal>C</> - locales. (<literal>C</> locale is safe since it uses - neither <function>strcoll()</> nor <function>strxfrm()</>.) + match <function>strcoll()</function>. Until this problem can be better + characterized, disable the optimization in all non-<literal>C</literal> + locales. (<literal>C</literal> locale is safe since it uses + neither <function>strcoll()</function> nor <function>strxfrm()</function>.) </para> <para> Unfortunately, this problem affects not only sorting but also entry ordering in B-tree indexes, which means that B-tree indexes - on <type>text</>, <type>varchar</>, or <type>char</> columns may now + on <type>text</type>, <type>varchar</type>, or <type>char</type> columns may now be corrupt if they sort according to an affected locale and were - built or modified under <productname>PostgreSQL</> 9.5.0 or 9.5.1. - Users should <command>REINDEX</> indexes that might be affected. + built or modified under <productname>PostgreSQL</productname> 9.5.0 or 9.5.1. + Users should <command>REINDEX</command> indexes that might be affected. </para> <para> It is not possible at this time to give an exhaustive list of - known-affected locales. <literal>C</> locale is known safe, and + known-affected locales. <literal>C</literal> locale is known safe, and there is no evidence of trouble in English-based locales such - as <literal>en_US</>, but some other popular locales such - as <literal>de_DE</> are affected in most glibc versions. + as <literal>en_US</literal>, but some other popular locales such + as <literal>de_DE</literal> are affected in most glibc versions. </para> </listitem> @@ -4619,14 +4619,14 @@ Branch: REL9_5_STABLE [bf78a6f10] 2016-03-28 10:57:46 -0300 <listitem> <para> Add must-be-superuser checks to some - new <filename>contrib/pageinspect</> functions (Andreas Seltenreich) + new <filename>contrib/pageinspect</filename> functions (Andreas Seltenreich) </para> <para> - Most functions in the <filename>pageinspect</> extension that - inspect <type>bytea</> values disallow calls by non-superusers, - but <function>brin_page_type()</> and <function>brin_metapage_info()</> - failed to do so. Passing contrived <type>bytea</> values to them might + Most functions in the <filename>pageinspect</filename> extension that + inspect <type>bytea</type> values disallow calls by non-superusers, + but <function>brin_page_type()</function> and <function>brin_metapage_info()</function> + failed to do so. Passing contrived <type>bytea</type> values to them might crash the server or disclose a few bytes of server memory. Add the missing permissions checks to prevent misuse. (CVE-2016-3065) @@ -4641,15 +4641,15 @@ Branch: REL9_5_STABLE [bf7ced5e2] 2016-03-03 09:50:38 +0000 <listitem> <para> - Fix incorrect handling of indexed <literal>ROW()</> comparisons + Fix incorrect handling of indexed <literal>ROW()</literal> comparisons (Simon Riggs) </para> <para> Flaws in a minor optimization introduced in 9.5 caused incorrect - results if the <literal>ROW()</> comparison matches the index ordering + results if the <literal>ROW()</literal> comparison matches the index ordering partially but not exactly (for example, differing column order, or the - index contains both <literal>ASC</> and <literal>DESC</> columns). + index contains both <literal>ASC</literal> and <literal>DESC</literal> columns). Pending a better solution, the optimization has been removed. </para> </listitem> @@ -4667,15 +4667,15 @@ Branch: REL9_1_STABLE [d485d9581] 2016-03-09 14:51:02 -0500 <listitem> <para> Fix incorrect handling of NULL index entries in - indexed <literal>ROW()</> comparisons (Tom Lane) + indexed <literal>ROW()</literal> comparisons (Tom Lane) </para> <para> An index search using a row comparison such as <literal>ROW(a, b) > - ROW('x', 'y')</> would stop upon reaching a NULL entry in - the <structfield>b</> column, ignoring the fact that there might be - non-NULL <structfield>b</> values associated with later values - of <structfield>a</>. + ROW('x', 'y')</literal> would stop upon reaching a NULL entry in + the <structfield>b</structfield> column, ignoring the fact that there might be + non-NULL <structfield>b</structfield> values associated with later values + of <structfield>a</structfield>. </para> </listitem> @@ -4698,7 +4698,7 @@ Branch: REL9_1_STABLE [d0e47bcd4] 2016-03-09 18:53:54 -0800 <listitem> <para> Avoid unlikely data-loss scenarios due to renaming files without - adequate <function>fsync()</> calls before and after (Michael Paquier, + adequate <function>fsync()</function> calls before and after (Michael Paquier, Tomas Vondra, Andres Freund) </para> </listitem> @@ -4712,14 +4712,14 @@ Branch: REL9_5_STABLE [d8d5a00b1] 2016-03-22 17:56:06 -0400 <listitem> <para> Fix incorrect behavior when rechecking a just-modified row in a query - that does <command>SELECT FOR UPDATE/SHARE</> and contains some + that does <command>SELECT FOR UPDATE/SHARE</command> and contains some relations that need not be locked (Tom Lane) </para> <para> Rows from non-locked relations were incorrectly treated as containing all NULLs during the recheck, which could result in incorrectly - deciding that the updated row no longer passes the <literal>WHERE</> + deciding that the updated row no longer passes the <literal>WHERE</literal> condition, or in incorrectly outputting NULLs. </para> </listitem> @@ -4733,7 +4733,7 @@ Branch: REL9_4_STABLE [597e41e45] 2016-03-02 23:31:39 -0500 <listitem> <para> - Fix bug in <function>json_to_record()</> when a field of its input + Fix bug in <function>json_to_record()</function> when a field of its input object contains a sub-object with a field name matching one of the requested output column names (Tom Lane) </para> @@ -4748,7 +4748,7 @@ Branch: REL9_5_STABLE [68d68ff83] 2016-02-21 10:40:39 -0500 <listitem> <para> Fix nonsense result from two-argument form - of <function>jsonb_object()</> when called with empty arrays + of <function>jsonb_object()</function> when called with empty arrays (Michael Paquier, Andrew Dunstan) </para> </listitem> @@ -4761,7 +4761,7 @@ Branch: REL9_5_STABLE [5f95521b3] 2016-03-23 10:43:24 -0400 <listitem> <para> - Fix misbehavior in <function>jsonb_set()</> when converting a path + Fix misbehavior in <function>jsonb_set()</function> when converting a path array element into an integer for use as an array subscript (Michael Paquier) </para> @@ -4777,7 +4777,7 @@ Branch: REL9_4_STABLE [17a250b18] 2016-03-17 15:50:33 -0400 <listitem> <para> Fix misformatting of negative time zone offsets - by <function>to_char()</>'s <literal>OF</> format code + by <function>to_char()</function>'s <literal>OF</literal> format code (Thomas Munro, Tom Lane) </para> </listitem> @@ -4791,7 +4791,7 @@ Branch: REL9_5_STABLE [3f14d8d59] 2016-03-15 18:04:48 -0400 <listitem> <para> Fix possible incorrect logging of waits done by - <command>INSERT ... ON CONFLICT</> (Peter Geoghegan) + <command>INSERT ... ON CONFLICT</command> (Peter Geoghegan) </para> <para> @@ -4815,7 +4815,7 @@ Branch: REL9_4_STABLE [a9613ee69] 2016-03-06 02:43:26 +0900 <para> Previously, standby servers would delay application of WAL records in - response to <varname>recovery_min_apply_delay</> even while replaying + response to <varname>recovery_min_apply_delay</varname> even while replaying the initial portion of WAL needed to make their database state valid. Since the standby is useless until it's reached a consistent database state, this was deemed unhelpful. @@ -4834,7 +4834,7 @@ Branch: REL9_1_STABLE [ca32f125b] 2016-02-19 08:35:02 +0000 <listitem> <para> - Correctly handle cases where <literal>pg_subtrans</> is close to XID + Correctly handle cases where <literal>pg_subtrans</literal> is close to XID wraparound during server startup (Jeff Janes) </para> </listitem> @@ -4870,10 +4870,10 @@ Branch: REL9_5_STABLE [f8a75881f] 2016-03-02 23:43:42 -0800 <para> Trouble cases included tuples larger than one page when replica - identity is <literal>FULL</>, <command>UPDATE</>s that change a + identity is <literal>FULL</literal>, <command>UPDATE</command>s that change a primary key within a transaction large enough to be spooled to disk, incorrect reports of <quote>subxact logged without previous toplevel - record</>, and incorrect reporting of a transaction's commit time. + record</quote>, and incorrect reporting of a transaction's commit time. </para> </listitem> @@ -4887,7 +4887,7 @@ Branch: REL9_4_STABLE [9b69d5c1d] 2016-02-29 12:34:33 +0000 <listitem> <para> Fix planner error with nested security barrier views when the outer - view has a <literal>WHERE</> clause containing a correlated subquery + view has a <literal>WHERE</literal> clause containing a correlated subquery (Dean Rasheed) </para> </listitem> @@ -4916,7 +4916,7 @@ Branch: REL9_1_STABLE [7d6c58aa1] 2016-02-28 23:40:35 -0500 <listitem> <para> - Fix corner-case crash due to trying to free <function>localeconv()</> + Fix corner-case crash due to trying to free <function>localeconv()</function> output strings more than once (Tom Lane) </para> </listitem> @@ -4933,14 +4933,14 @@ Branch: REL9_1_STABLE [fe747b741] 2016-03-06 19:21:03 -0500 <listitem> <para> - Fix parsing of affix files for <literal>ispell</> dictionaries + Fix parsing of affix files for <literal>ispell</literal> dictionaries (Tom Lane) </para> <para> The code could go wrong if the affix file contained any characters whose byte length changes during case-folding, for - example <literal>I</> in Turkish UTF8 locales. + example <literal>I</literal> in Turkish UTF8 locales. </para> </listitem> @@ -4956,7 +4956,7 @@ Branch: REL9_1_STABLE [e56acbe2a] 2016-02-10 19:30:12 -0500 <listitem> <para> - Avoid use of <function>sscanf()</> to parse <literal>ispell</> + Avoid use of <function>sscanf()</function> to parse <literal>ispell</literal> dictionary files (Artur Zakirov) </para> @@ -5020,7 +5020,7 @@ Branch: REL9_1_STABLE [b4895bf79] 2016-03-04 11:57:40 -0500 <listitem> <para> - Fix <application>psql</>'s tab completion logic to handle multibyte + Fix <application>psql</application>'s tab completion logic to handle multibyte characters properly (Kyotaro Horiguchi, Robert Haas) </para> </listitem> @@ -5036,12 +5036,12 @@ Branch: REL9_1_STABLE [2d61d88d8] 2016-03-14 11:31:49 -0400 <listitem> <para> - Fix <application>psql</>'s tab completion for - <literal>SECURITY LABEL</> (Tom Lane) + Fix <application>psql</application>'s tab completion for + <literal>SECURITY LABEL</literal> (Tom Lane) </para> <para> - Pressing TAB after <literal>SECURITY LABEL</> might cause a crash + Pressing TAB after <literal>SECURITY LABEL</literal> might cause a crash or offering of inappropriate keywords. </para> </listitem> @@ -5058,8 +5058,8 @@ Branch: REL9_1_STABLE [f97664cf5] 2016-02-10 20:34:48 -0500 <listitem> <para> - Make <application>pg_ctl</> accept a wait timeout from the - <envar>PGCTLTIMEOUT</> environment variable, if none is specified on + Make <application>pg_ctl</application> accept a wait timeout from the + <envar>PGCTLTIMEOUT</envar> environment variable, if none is specified on the command line (Noah Misch) </para> @@ -5083,12 +5083,12 @@ Branch: REL9_1_STABLE [5a39c7395] 2016-03-07 10:41:11 -0500 <listitem> <para> Fix incorrect test for Windows service status - in <application>pg_ctl</> (Manuel Mathar) + in <application>pg_ctl</application> (Manuel Mathar) </para> <para> The previous set of minor releases attempted to - fix <application>pg_ctl</> to properly determine whether to send log + fix <application>pg_ctl</application> to properly determine whether to send log messages to Window's Event Log, but got the test backwards. </para> </listitem> @@ -5105,8 +5105,8 @@ Branch: REL9_1_STABLE [1965a8ce1] 2016-03-16 23:18:08 -0400 <listitem> <para> - Fix <application>pgbench</> to correctly handle the combination - of <literal>-C</> and <literal>-M prepared</> options (Tom Lane) + Fix <application>pgbench</application> to correctly handle the combination + of <literal>-C</literal> and <literal>-M prepared</literal> options (Tom Lane) </para> </listitem> @@ -5120,7 +5120,7 @@ Branch: REL9_3_STABLE [bf26c4f44] 2016-02-18 18:32:26 -0500 <listitem> <para> - In <application>pg_upgrade</>, skip creating a deletion script when + In <application>pg_upgrade</application>, skip creating a deletion script when the new data directory is inside the old data directory (Bruce Momjian) </para> @@ -5178,7 +5178,7 @@ Branch: REL9_1_STABLE [0f359c7de] 2016-02-18 15:40:36 -0500 <listitem> <para> Fix multiple mistakes in the statistics returned - by <filename>contrib/pgstattuple</>'s <function>pgstatindex()</> + by <filename>contrib/pgstattuple</filename>'s <function>pgstatindex()</function> function (Tom Lane) </para> </listitem> @@ -5195,7 +5195,7 @@ Branch: REL9_1_STABLE [2aa9fd963] 2016-03-19 18:59:41 -0400 <listitem> <para> - Remove dependency on <literal>psed</> in MSVC builds, since it's no + Remove dependency on <literal>psed</literal> in MSVC builds, since it's no longer provided by core Perl (Michael Paquier, Andrew Dunstan) </para> </listitem> @@ -5212,7 +5212,7 @@ Branch: REL9_1_STABLE [e5fd35cc5] 2016-03-25 19:03:54 -0400 <listitem> <para> - Update time zone data files to <application>tzdata</> release 2016c + Update time zone data files to <application>tzdata</application> release 2016c for DST law changes in Azerbaijan, Chile, Haiti, Palestine, and Russia (Altai, Astrakhan, Kirov, Sakhalin, Ulyanovsk regions), plus historical corrections for Lithuania, Moldova, and Russia @@ -5296,7 +5296,7 @@ Branch: REL9_5_STABLE [87dbc72a7] 2016-02-08 11:03:37 +0100 <listitem> <para> - Avoid pushdown of <literal>HAVING</> clauses when grouping sets are + Avoid pushdown of <literal>HAVING</literal> clauses when grouping sets are used (Andrew Gierth) </para> </listitem> @@ -5309,7 +5309,7 @@ Branch: REL9_5_STABLE [82406d6ff] 2016-02-07 14:57:24 -0500 <listitem> <para> - Fix deparsing of <literal>ON CONFLICT</> arbiter <literal>WHERE</> + Fix deparsing of <literal>ON CONFLICT</literal> arbiter <literal>WHERE</literal> clauses (Peter Geoghegan) </para> </listitem> @@ -5326,14 +5326,14 @@ Branch: REL9_1_STABLE [b043df093] 2016-01-26 15:38:33 -0500 <listitem> <para> - Make <literal>%h</> and <literal>%r</> escapes - in <varname>log_line_prefix</> work for messages emitted due - to <varname>log_connections</> (Tom Lane) + Make <literal>%h</literal> and <literal>%r</literal> escapes + in <varname>log_line_prefix</varname> work for messages emitted due + to <varname>log_connections</varname> (Tom Lane) </para> <para> - Previously, <literal>%h</>/<literal>%r</> started to work just after a - new session had emitted the <quote>connection received</> log message; + Previously, <literal>%h</literal>/<literal>%r</literal> started to work just after a + new session had emitted the <quote>connection received</quote> log message; now they work for that message too. </para> </listitem> @@ -5367,8 +5367,8 @@ Branch: REL9_1_STABLE [ed5f57218] 2016-01-29 10:28:03 +0100 <listitem> <para> - Fix <application>psql</>'s <literal>\det</> command to interpret its - pattern argument the same way as other <literal>\d</> commands with + Fix <application>psql</application>'s <literal>\det</literal> command to interpret its + pattern argument the same way as other <literal>\d</literal> commands with potentially schema-qualified patterns do (Reece Hart) </para> </listitem> @@ -5385,7 +5385,7 @@ Branch: REL9_1_STABLE [b96f6f444] 2016-01-07 11:59:08 -0300 <listitem> <para> - In <application>pg_ctl</> on Windows, check service status to decide + In <application>pg_ctl</application> on Windows, check service status to decide where to send output, rather than checking if standard output is a terminal (Michael Paquier) </para> @@ -5403,7 +5403,7 @@ Branch: REL9_1_STABLE [5108013db] 2016-01-13 18:55:27 -0500 <listitem> <para> - Fix assorted corner-case bugs in <application>pg_dump</>'s processing + Fix assorted corner-case bugs in <application>pg_dump</application>'s processing of extension member objects (Tom Lane) </para> </listitem> @@ -5417,7 +5417,7 @@ Branch: REL9_5_STABLE [1e910cf5b] 2016-01-22 20:04:35 -0300 <listitem> <para> Fix improper quoting of domain constraint names - in <application>pg_dump</> (Elvis Pranskevichus) + in <application>pg_dump</application> (Elvis Pranskevichus) </para> </listitem> @@ -5433,9 +5433,9 @@ Branch: REL9_1_STABLE [9c704632c] 2016-02-04 00:26:10 -0500 <listitem> <para> - Make <application>pg_dump</> mark a view's triggers as needing to be + Make <application>pg_dump</application> mark a view's triggers as needing to be processed after its rule, to prevent possible failure during - parallel <application>pg_restore</> (Tom Lane) + parallel <application>pg_restore</application> (Tom Lane) </para> </listitem> @@ -5451,7 +5451,7 @@ Branch: REL9_1_STABLE [4c8b07d3c] 2016-02-03 09:25:34 -0500 <listitem> <para> - Install guards in <application>pgbench</> against corner-case overflow + Install guards in <application>pgbench</application> against corner-case overflow conditions during evaluation of script-specified division or modulo operators (Fabien Coelho, Michael Paquier) </para> @@ -5465,7 +5465,7 @@ Branch: REL9_5_STABLE [7ef311eb4] 2016-01-05 17:25:12 -0300 <listitem> <para> - Suppress useless warning message when <application>pg_receivexlog</> + Suppress useless warning message when <application>pg_receivexlog</application> connects to a pre-9.4 server (Marco Nenciarini) </para> </listitem> @@ -5483,15 +5483,15 @@ Branch: REL9_5_STABLE [5ef26b8de] 2016-01-11 20:06:47 -0500 <listitem> <para> - Avoid dump/reload problems when using both <application>plpython2</> - and <application>plpython3</> (Tom Lane) + Avoid dump/reload problems when using both <application>plpython2</application> + and <application>plpython3</application> (Tom Lane) </para> <para> - In principle, both versions of <application>PL/Python</> can be used in + In principle, both versions of <application>PL/Python</application> can be used in the same database, though not in the same session (because the two - versions of <application>libpython</> cannot safely be used concurrently). - However, <application>pg_restore</> and <application>pg_upgrade</> both + versions of <application>libpython</application> cannot safely be used concurrently). + However, <application>pg_restore</application> and <application>pg_upgrade</application> both do things that can fall foul of the same-session restriction. Work around that by changing the timing of the check. </para> @@ -5508,7 +5508,7 @@ Branch: REL9_5_STABLE [a66c1fcdd] 2016-01-08 11:39:28 -0500 <listitem> <para> - Fix <application>PL/Python</> regression tests to pass with Python 3.5 + Fix <application>PL/Python</application> regression tests to pass with Python 3.5 (Peter Eisentraut) </para> </listitem> @@ -5525,16 +5525,16 @@ Branch: REL9_1_STABLE [b1f591c50] 2016-02-05 20:23:19 -0500 <listitem> <para> - Prevent certain <application>PL/Java</> parameters from being set by + Prevent certain <application>PL/Java</application> parameters from being set by non-superusers (Noah Misch) </para> <para> - This change mitigates a <application>PL/Java</> security bug - (CVE-2016-0766), which was fixed in <application>PL/Java</> by marking + This change mitigates a <application>PL/Java</application> security bug + (CVE-2016-0766), which was fixed in <application>PL/Java</application> by marking these parameters as superuser-only. To fix the security hazard for - sites that update <productname>PostgreSQL</> more frequently - than <application>PL/Java</>, make the core code aware of them also. + sites that update <productname>PostgreSQL</productname> more frequently + than <application>PL/Java</application>, make the core code aware of them also. </para> </listitem> @@ -5551,14 +5551,14 @@ Branch: REL9_4_STABLE [33b26426e] 2016-02-08 11:10:14 +0100 <listitem> <para> - Fix <application>ecpg</>-supplied header files to not contain comments + Fix <application>ecpg</application>-supplied header files to not contain comments continued from a preprocessor directive line onto the next line (Michael Meskes) </para> <para> - Such a comment is rejected by <application>ecpg</>. It's not yet clear - whether <application>ecpg</> itself should be changed. + Such a comment is rejected by <application>ecpg</application>. It's not yet clear + whether <application>ecpg</application> itself should be changed. </para> </listitem> @@ -5572,8 +5572,8 @@ Branch: REL9_3_STABLE [1f2b195eb] 2016-02-03 01:39:08 -0500 <listitem> <para> - Fix <function>hstore_to_json_loose()</>'s test for whether - an <type>hstore</> value can be converted to a JSON number (Tom Lane) + Fix <function>hstore_to_json_loose()</function>'s test for whether + an <type>hstore</type> value can be converted to a JSON number (Tom Lane) </para> <para> @@ -5594,8 +5594,8 @@ Branch: REL9_4_STABLE [2099b911d] 2016-02-04 22:27:47 -0500 <listitem> <para> - In <filename>contrib/postgres_fdw</>, fix bugs triggered by use - of <literal>tableoid</> in data-modifying commands (Etsuro Fujita, + In <filename>contrib/postgres_fdw</filename>, fix bugs triggered by use + of <literal>tableoid</literal> in data-modifying commands (Etsuro Fujita, Robert Haas) </para> </listitem> @@ -5608,7 +5608,7 @@ Branch: REL9_5_STABLE [47acf3add] 2016-01-22 11:53:06 -0500 <listitem> <para> - Fix ill-advised restriction of <literal>NAMEDATALEN</> to be less + Fix ill-advised restriction of <literal>NAMEDATALEN</literal> to be less than 256 (Robert Haas, Tom Lane) </para> </listitem> @@ -5645,7 +5645,7 @@ Branch: REL9_1_STABLE [b1bc38144] 2016-01-19 23:30:28 -0500 <listitem> <para> - Ensure that <filename>dynloader.h</> is included in the installed + Ensure that <filename>dynloader.h</filename> is included in the installed header files in MSVC builds (Bruce Momjian, Michael Paquier) </para> </listitem> @@ -5662,7 +5662,7 @@ Branch: REL9_1_STABLE [6887d72d0] 2016-02-05 10:59:39 -0500 <listitem> <para> - Update time zone data files to <application>tzdata</> release 2016a for + Update time zone data files to <application>tzdata</application> release 2016a for DST law changes in Cayman Islands, Metlakatla, and Trans-Baikal Territory (Zabaykalsky Krai), plus historical corrections for Pakistan. </para> @@ -5685,7 +5685,7 @@ Branch: REL9_1_STABLE [6887d72d0] 2016-02-05 10:59:39 -0500 <title>Overview</title> <para> - Major enhancements in <productname>PostgreSQL</> 9.5 include: + Major enhancements in <productname>PostgreSQL</productname> 9.5 include: </para> <!-- This list duplicates items below, but without authors or details--> @@ -5694,31 +5694,31 @@ Branch: REL9_1_STABLE [6887d72d0] 2016-02-05 10:59:39 -0500 <listitem> <para> - Allow <link linkend="sql-on-conflict"><command>INSERT</></>s + Allow <link linkend="sql-on-conflict"><command>INSERT</command></link>s that would generate constraint conflicts to be turned into - <command>UPDATE</>s or ignored + <command>UPDATE</command>s or ignored </para> </listitem> <listitem> <para> - Add <literal>GROUP BY</> analysis features <link - linkend="queries-grouping-sets"><literal>GROUPING SETS</></>, - <link linkend="queries-grouping-sets"><literal>CUBE</></> and - <link linkend="queries-grouping-sets"><literal>ROLLUP</></> + Add <literal>GROUP BY</literal> analysis features <link + linkend="queries-grouping-sets"><literal>GROUPING SETS</literal></link>, + <link linkend="queries-grouping-sets"><literal>CUBE</literal></link> and + <link linkend="queries-grouping-sets"><literal>ROLLUP</literal></link> </para> </listitem> <listitem> <para> - Add <link linkend="ddl-rowsecurity">row-level security control</> + Add <link linkend="ddl-rowsecurity">row-level security control</link> </para> </listitem> <listitem> <para> Create mechanisms for tracking - the <link linkend="replication-origins">progress of replication</>, + the <link linkend="replication-origins">progress of replication</link>, including methods for identifying the origin of individual changes during logical replication </para> @@ -5726,7 +5726,7 @@ Branch: REL9_1_STABLE [6887d72d0] 2016-02-05 10:59:39 -0500 <listitem> <para> - Add <link linkend="BRIN">Block Range Indexes</> (<acronym>BRIN</>) + Add <link linkend="BRIN">Block Range Indexes</link> (<acronym>BRIN</acronym>) </para> </listitem> @@ -5772,21 +5772,21 @@ Branch: REL9_1_STABLE [6887d72d0] 2016-02-05 10:59:39 -0500 2015-03-11 [c6b3c93] Tom Lane: Make operator precedence follow the SQL standar.. --> <para> - Adjust <link linkend="sql-precedence">operator precedence</> - to match the <acronym>SQL</> standard (Tom Lane) + Adjust <link linkend="sql-precedence">operator precedence</link> + to match the <acronym>SQL</acronym> standard (Tom Lane) </para> <para> The precedence of <literal><=</literal>, <literal>>=</literal> and <literal><></literal> has been reduced to match that of <literal><</literal>, <literal>></literal> - and <literal>=</literal>. The precedence of <literal>IS</> tests - (e.g., <replaceable>x</> <literal>IS NULL</>) has been reduced to be + and <literal>=</literal>. The precedence of <literal>IS</literal> tests + (e.g., <replaceable>x</replaceable> <literal>IS NULL</literal>) has been reduced to be just below these six comparison operators. - Also, multi-keyword operators beginning with <literal>NOT</> now have + Also, multi-keyword operators beginning with <literal>NOT</literal> now have the precedence of their base operator (for example, <literal>NOT - BETWEEN</> now has the same precedence as <literal>BETWEEN</>) whereas - before they had inconsistent precedence, behaving like <literal>NOT</> + BETWEEN</literal> now has the same precedence as <literal>BETWEEN</literal>) whereas + before they had inconsistent precedence, behaving like <literal>NOT</literal> with respect to their left operand but like their base operator with respect to their right operand. The new configuration parameter <xref linkend="guc-operator-precedence-warning"> can be @@ -5801,7 +5801,7 @@ Branch: REL9_1_STABLE [6887d72d0] 2016-02-05 10:59:39 -0500 --> <para> Change <xref linkend="app-pg-ctl">'s default shutdown mode from - <literal>smart</> to <literal>fast</> (Bruce Momjian) + <literal>smart</literal> to <literal>fast</literal> (Bruce Momjian) </para> <para> @@ -5816,18 +5816,18 @@ Branch: REL9_1_STABLE [6887d72d0] 2016-02-05 10:59:39 -0500 --> <para> Use assignment cast behavior for data type conversions - in <application>PL/pgSQL</> assignments, rather than converting to and + in <application>PL/pgSQL</application> assignments, rather than converting to and from text (Tom Lane) </para> <para> This change causes conversions of Booleans to strings to - produce <literal>true</> or <literal>false</>, not <literal>t</> - or <literal>f</>. Other type conversions may succeed in more cases - than before; for example, assigning a numeric value <literal>3.9</> to + produce <literal>true</literal> or <literal>false</literal>, not <literal>t</literal> + or <literal>f</literal>. Other type conversions may succeed in more cases + than before; for example, assigning a numeric value <literal>3.9</literal> to an integer variable will now assign 4 rather than failing. If no assignment-grade cast is defined for the particular source and - destination types, <application>PL/pgSQL</> will fall back to its old + destination types, <application>PL/pgSQL</application> will fall back to its old I/O conversion behavior. </para> </listitem> @@ -5838,13 +5838,13 @@ Branch: REL9_1_STABLE [6887d72d0] 2016-02-05 10:59:39 -0500 --> <para> Allow characters in <link linkend="libpq-connect-options">server - command-line options</> to be escaped with a backslash (Andres Freund) + command-line options</link> to be escaped with a backslash (Andres Freund) </para> <para> Formerly, spaces in the options string always separated options, so there was no way to include a space in an option value. Including - a backslash in an option value now requires writing <literal>\\</>. + a backslash in an option value now requires writing <literal>\\</literal>. </para> </listitem> @@ -5854,9 +5854,9 @@ Branch: REL9_1_STABLE [6887d72d0] 2016-02-05 10:59:39 -0500 --> <para> Change the default value of the GSSAPI <link - linkend="gssapi-auth"><varname>include_realm</></> parameter to 1, so - that by default the realm is not removed from a <acronym>GSS</> - or <acronym>SSPI</> principal name (Stephen Frost) + linkend="gssapi-auth"><varname>include_realm</varname></link> parameter to 1, so + that by default the realm is not removed from a <acronym>GSS</acronym> + or <acronym>SSPI</acronym> principal name (Stephen Frost) </para> </listitem> @@ -5867,7 +5867,7 @@ Branch: REL9_1_STABLE [6887d72d0] 2016-02-05 10:59:39 -0500 2015-06-29 [d661532] Heikki..: Also trigger restartpoints based on max_wal_siz.. --> <para> - Replace configuration parameter <varname>checkpoint_segments</> + Replace configuration parameter <varname>checkpoint_segments</varname> with <xref linkend="guc-min-wal-size"> and <xref linkend="guc-max-wal-size"> (Heikki Linnakangas) </para> @@ -5889,13 +5889,13 @@ max_wal_size = (3 * checkpoint_segments) * 16MB 2014-06-18 [df8b7bc] Tom Lane: Improve our mechanism for controlling the Linux.. --> <para> - Control the Linux <acronym>OOM</> killer via new environment + Control the Linux <acronym>OOM</acronym> killer via new environment variables <link - linkend="linux-memory-overcommit"><envar>PG_OOM_ADJUST_FILE</></> + linkend="linux-memory-overcommit"><envar>PG_OOM_ADJUST_FILE</envar></link> and <link - linkend="linux-memory-overcommit"><envar>PG_OOM_ADJUST_VALUE</></>, - instead of compile-time options <literal>LINUX_OOM_SCORE_ADJ</> and - <literal>LINUX_OOM_ADJ</> + linkend="linux-memory-overcommit"><envar>PG_OOM_ADJUST_VALUE</envar></link>, + instead of compile-time options <literal>LINUX_OOM_SCORE_ADJ</literal> and + <literal>LINUX_OOM_ADJ</literal> (Gurjeet Singh) </para> </listitem> @@ -5907,7 +5907,7 @@ max_wal_size = (3 * checkpoint_segments) * 16MB --> <para> Decommission server configuration - parameter <varname>ssl_renegotiation_limit</>, which was deprecated + parameter <varname>ssl_renegotiation_limit</varname>, which was deprecated in earlier releases (Andres Freund) </para> @@ -5915,8 +5915,8 @@ max_wal_size = (3 * checkpoint_segments) * 16MB While SSL renegotiation is a good idea in theory, it has caused enough bugs to be considered a net negative in practice, and it is due to be removed from future versions of the relevant standards. We have - therefore removed support for it from <productname>PostgreSQL</>. - The <varname>ssl_renegotiation_limit</> parameter still exists, but + therefore removed support for it from <productname>PostgreSQL</productname>. + The <varname>ssl_renegotiation_limit</varname> parameter still exists, but cannot be set to anything but zero (disabled). It's not documented anymore, either. </para> @@ -5927,7 +5927,7 @@ max_wal_size = (3 * checkpoint_segments) * 16MB 2014-11-05 [525a489] Tom Lane: Remove the last vestige of server-side autocomm.. --> <para> - Remove server configuration parameter <varname>autocommit</>, which + Remove server configuration parameter <varname>autocommit</varname>, which was already deprecated and non-operational (Tom Lane) </para> </listitem> @@ -5937,8 +5937,8 @@ max_wal_size = (3 * checkpoint_segments) * 16MB 2015-03-06 [bb8582a] Peter ..: Remove rolcatupdate --> <para> - Remove the <link linkend="catalog-pg-authid"><structname>pg_authid</></> - catalog's <structfield>rolcatupdate</> field, as it had no usefulness + Remove the <link linkend="catalog-pg-authid"><structname>pg_authid</structname></link> + catalog's <structfield>rolcatupdate</structfield> field, as it had no usefulness (Adam Brightwell) </para> </listitem> @@ -5949,8 +5949,8 @@ max_wal_size = (3 * checkpoint_segments) * 16MB --> <para> The <link - linkend="monitoring-stats-views-table"><structname>pg_stat_replication</></link> - system view's <structfield>sent</> field is now NULL, not zero, when + linkend="monitoring-stats-views-table"><structname>pg_stat_replication</structname></link> + system view's <structfield>sent</structfield> field is now NULL, not zero, when it has no valid value (Magnus Hagander) </para> </listitem> @@ -5960,13 +5960,13 @@ max_wal_size = (3 * checkpoint_segments) * 16MB 2015-07-17 [89ddd29] Andrew..: Support JSON negative array subscripts everywh.. --> <para> - Allow <type>json</> and <type>jsonb</> array extraction operators to + Allow <type>json</type> and <type>jsonb</type> array extraction operators to accept negative subscripts, which count from the end of JSON arrays (Peter Geoghegan, Andrew Dunstan) </para> <para> - Previously, these operators returned <literal>NULL</> for negative + Previously, these operators returned <literal>NULL</literal> for negative subscripts. </para> </listitem> @@ -5999,12 +5999,12 @@ max_wal_size = (3 * checkpoint_segments) * 16MB 2015-05-15 [b0b7be6] Alvaro..: Add BRIN infrastructure for "inclusion" opclasses --> <para> - Add <link linkend="BRIN">Block Range Indexes</> (<acronym>BRIN</>) + Add <link linkend="BRIN">Block Range Indexes</link> (<acronym>BRIN</acronym>) (Álvaro Herrera) </para> <para> - <acronym>BRIN</> indexes store only summary data (such as minimum + <acronym>BRIN</acronym> indexes store only summary data (such as minimum and maximum values) for ranges of heap blocks. They are therefore very compact and cheap to update; but if the data is naturally clustered, they can still provide substantial speedup of searches. @@ -6018,7 +6018,7 @@ max_wal_size = (3 * checkpoint_segments) * 16MB <para> Allow queries to perform accurate distance filtering of bounding-box-indexed objects (polygons, circles) using <link - linkend="GiST">GiST</> indexes (Alexander Korotkov, Heikki + linkend="GiST">GiST</link> indexes (Alexander Korotkov, Heikki Linnakangas) </para> @@ -6038,7 +6038,7 @@ max_wal_size = (3 * checkpoint_segments) * 16MB 2015-03-30 [0633a60] Heikki..: Add index-only scan support to range type GiST .. --> <para> - Allow <link linkend="GiST">GiST</> indexes to perform index-only + Allow <link linkend="GiST">GiST</link> indexes to perform index-only scans (Anastasia Lubennikova, Heikki Linnakangas, Andreas Karlsson) </para> </listitem> @@ -6049,14 +6049,14 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Add configuration parameter <xref linkend="guc-gin-pending-list-limit"> - to control the size of <acronym>GIN</> pending lists (Fujii Masao) + to control the size of <acronym>GIN</acronym> pending lists (Fujii Masao) </para> <para> This value can also be set on a per-index basis as an index storage parameter. Previously the pending-list size was controlled by <xref linkend="guc-work-mem">, which was awkward because - appropriate values for <varname>work_mem</> are often much too large + appropriate values for <varname>work_mem</varname> are often much too large for this purpose. </para> </listitem> @@ -6067,7 +6067,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Issue a warning during the creation of <link - linkend="indexes-types">hash</> indexes because they are not + linkend="indexes-types">hash</link> indexes because they are not crash-safe (Bruce Momjian) </para> </listitem> @@ -6088,8 +6088,8 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2015-05-13 [78efd5c] Robert..: Extend abbreviated key infrastructure to datum .. --> <para> - Improve the speed of sorting of <type>varchar</>, <type>text</>, - and <type>numeric</> fields via <quote>abbreviated</> keys + Improve the speed of sorting of <type>varchar</type>, <type>text</type>, + and <type>numeric</type> fields via <quote>abbreviated</quote> keys (Peter Geoghegan, Andrew Gierth, Robert Haas) </para> </listitem> @@ -6101,8 +6101,8 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. <para> Extend the infrastructure that allows sorting to be performed by inlined, non-<acronym>SQL</acronym>-callable comparison functions to - cover <command>CREATE INDEX</>, <command>REINDEX</>, and - <command>CLUSTER</> (Peter Geoghegan) + cover <command>CREATE INDEX</command>, <command>REINDEX</command>, and + <command>CLUSTER</command> (Peter Geoghegan) </para> </listitem> @@ -6163,7 +6163,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. <para> This particularly addresses scalability problems when running on - systems with multiple <acronym>CPU</> sockets. + systems with multiple <acronym>CPU</acronym> sockets. </para> </listitem> @@ -6183,7 +6183,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Allow pushdown of query restrictions into subqueries with <link - linkend="tutorial-window">window functions</>, where appropriate + linkend="tutorial-window">window functions</link>, where appropriate (David Rowley) </para> </listitem> @@ -6206,7 +6206,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. <para> Teach the planner to use statistics obtained from an expression index on a boolean-returning function, when a matching function call - appears in <literal>WHERE</> (Tom Lane) + appears in <literal>WHERE</literal> (Tom Lane) </para> </listitem> @@ -6215,7 +6215,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2015-09-23 [cfb2024] Tom Lane: Make ANALYZE compute basic statistics even for.. --> <para> - Make <command>ANALYZE</> compute basic statistics (null fraction and + Make <command>ANALYZE</command> compute basic statistics (null fraction and average column width) even for columns whose data type lacks an equality function (Oleksandr Shulgin) </para> @@ -6229,7 +6229,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> - Speed up <acronym>CRC</> (cyclic redundancy check) computations + Speed up <acronym>CRC</acronym> (cyclic redundancy check) computations and switch to CRC-32C (Abhijit Menon-Sen, Heikki Linnakangas) </para> </listitem> @@ -6249,7 +6249,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2014-07-01 [9f03ca9] Robert..: Avoid copying index tuples when building an ind.. --> <para> - Speed up <command>CREATE INDEX</> by avoiding unnecessary memory + Speed up <command>CREATE INDEX</command> by avoiding unnecessary memory copies (Robert Haas) </para> </listitem> @@ -6283,7 +6283,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Add per-table autovacuum logging control via new - <varname>log_autovacuum_min_duration</> storage parameter + <varname>log_autovacuum_min_duration</varname> storage parameter (Michael Paquier) </para> </listitem> @@ -6299,7 +6299,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. <para> This string, typically set in <link - linkend="config-setting-configuration-file"><filename>postgresql.conf</></>, + linkend="config-setting-configuration-file"><filename>postgresql.conf</filename></link>, allows clients to identify the cluster. This name also appears in the process title of all server processes, allowing for easier identification of processes belonging to the same cluster. @@ -6321,7 +6321,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. </sect4> <sect4> - <title><acronym>SSL</></title> + <title><acronym>SSL</acronym></title> <itemizedlist> @@ -6331,13 +6331,13 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Check <link linkend="libpq-ssl"><quote>Subject Alternative - Names</></> in <acronym>SSL</> server certificates, if present + Names</quote></link> in <acronym>SSL</acronym> server certificates, if present (Alexey Klyukin) </para> <para> When they are present, this replaces checks against the certificate's - <quote>Common Name</>. + <quote>Common Name</quote>. </para> </listitem> @@ -6347,8 +6347,8 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Add system view <link - linkend="pg-stat-ssl-view"><structname>pg_stat_ssl</></> to report - <acronym>SSL</> connection information (Magnus Hagander) + linkend="pg-stat-ssl-view"><structname>pg_stat_ssl</structname></link> to report + <acronym>SSL</acronym> connection information (Magnus Hagander) </para> </listitem> @@ -6357,22 +6357,22 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2015-02-03 [91fa7b4] Heikki..: Add API functions to libpq to interrogate SSL .. --> <para> - Add <application>libpq</> functions to return <acronym>SSL</> + Add <application>libpq</application> functions to return <acronym>SSL</acronym> information in an implementation-independent way (Heikki Linnakangas) </para> <para> - While <link linkend="libpq-pqgetssl"><function>PQgetssl()</></> can - still be used to call <productname>OpenSSL</> functions, it is now + While <link linkend="libpq-pqgetssl"><function>PQgetssl()</function></link> can + still be used to call <productname>OpenSSL</productname> functions, it is now considered deprecated because future versions - of <application>libpq</> might support other <acronym>SSL</> + of <application>libpq</application> might support other <acronym>SSL</acronym> implementations. When possible, use the new functions <link - linkend="libpq-pqsslattribute"><function>PQsslAttribute()</></>, <link - linkend="libpq-pqsslattributenames"><function>PQsslAttributeNames()</></>, - and <link linkend="libpq-pqsslinuse"><function>PQsslInUse()</></> - to obtain <acronym>SSL</> information in - an <acronym>SSL</>-implementation-independent way. + linkend="libpq-pqsslattribute"><function>PQsslAttribute()</function></link>, <link + linkend="libpq-pqsslattributenames"><function>PQsslAttributeNames()</function></link>, + and <link linkend="libpq-pqsslinuse"><function>PQsslInUse()</function></link> + to obtain <acronym>SSL</acronym> information in + an <acronym>SSL</acronym>-implementation-independent way. </para> </listitem> @@ -6381,7 +6381,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2015-04-09 [8a0d34e4] Peter ..: libpq: Don't overwrite existing OpenSSL thread.. --> <para> - Make <application>libpq</> honor any <productname>OpenSSL</> + Make <application>libpq</application> honor any <productname>OpenSSL</productname> thread callbacks (Jan Urbanski) </para> @@ -6406,20 +6406,20 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2015-06-29 [d661532] Heikki..: Also trigger restartpoints based on max_wal_siz.. --> <para> - Replace configuration parameter <varname>checkpoint_segments</> + Replace configuration parameter <varname>checkpoint_segments</varname> with <xref linkend="guc-min-wal-size"> and <xref linkend="guc-max-wal-size"> (Heikki Linnakangas) </para> <para> - This change allows the allocation of a large number of <acronym>WAL</> + This change allows the allocation of a large number of <acronym>WAL</acronym> files without keeping them after they are no longer needed. - Therefore the default for <varname>max_wal_size</> has been set - to <literal>1GB</>, much larger than the old default - for <varname>checkpoint_segments</>. + Therefore the default for <varname>max_wal_size</varname> has been set + to <literal>1GB</literal>, much larger than the old default + for <varname>checkpoint_segments</varname>. Also note that standby servers perform restartpoints to try to limit - their WAL space consumption to <varname>max_wal_size</>; previously - they did not pay any attention to <varname>checkpoint_segments</>. + their WAL space consumption to <varname>max_wal_size</varname>; previously + they did not pay any attention to <varname>checkpoint_segments</varname>. </para> </listitem> @@ -6428,18 +6428,18 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2014-06-18 [df8b7bc] Tom Lane: Improve our mechanism for controlling the Linux.. --> <para> - Control the Linux <acronym>OOM</> killer via new environment + Control the Linux <acronym>OOM</acronym> killer via new environment variables <link - linkend="linux-memory-overcommit"><envar>PG_OOM_ADJUST_FILE</></> + linkend="linux-memory-overcommit"><envar>PG_OOM_ADJUST_FILE</envar></link> and <link - linkend="linux-memory-overcommit"><envar>PG_OOM_ADJUST_VALUE</></> + linkend="linux-memory-overcommit"><envar>PG_OOM_ADJUST_VALUE</envar></link> (Gurjeet Singh) </para> <para> - The previous <acronym>OOM</> control infrastructure involved - compile-time options <literal>LINUX_OOM_SCORE_ADJ</> and - <literal>LINUX_OOM_ADJ</>, which are no longer supported. + The previous <acronym>OOM</acronym> control infrastructure involved + compile-time options <literal>LINUX_OOM_SCORE_ADJ</literal> and + <literal>LINUX_OOM_ADJ</literal>, which are no longer supported. The new behavior is available in all builds. </para> </listitem> @@ -6457,8 +6457,8 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. <para> Time stamp information can be accessed using functions <link - linkend="functions-commit-timestamp"><function>pg_xact_commit_timestamp()</></> - and <function>pg_last_committed_xact()</>. + linkend="functions-commit-timestamp"><function>pg_xact_commit_timestamp()</function></link> + and <function>pg_last_committed_xact()</function>. </para> </listitem> @@ -6468,7 +6468,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Allow <xref linkend="guc-local-preload-libraries"> to be set - by <command>ALTER ROLE SET</> (Peter Eisentraut, Kyotaro Horiguchi) + by <command>ALTER ROLE SET</command> (Peter Eisentraut, Kyotaro Horiguchi) </para> </listitem> @@ -6477,7 +6477,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2015-04-03 [a75fb9b] Alvaro..: Have autovacuum workers listen to SIGHUP, too --> <para> - Allow <link linkend="autovacuum">autovacuum workers</> + Allow <link linkend="autovacuum">autovacuum workers</link> to respond to configuration parameter changes during a run (Michael Paquier) </para> @@ -6496,7 +6496,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. This means that assertions can no longer be turned off if they were enabled at compile time, allowing for more efficient code optimization. This change also removes the <link - linkend="app-postgres-options">postgres</> <option>-A</> option. + linkend="app-postgres-options">postgres</link> <option>-A</option> option. </para> </listitem> @@ -6517,7 +6517,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Add system view <link - linkend="view-pg-file-settings"><structname>pg_file_settings</></> + linkend="view-pg-file-settings"><structname>pg_file_settings</structname></link> to show the contents of the server's configuration files (Sawada Masahiko) </para> @@ -6528,8 +6528,8 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2015-05-14 [a486e35] Peter ..: Add pg_settings.pending_restart column --> <para> - Add <structname>pending_restart</> to the system view <link - linkend="view-pg-settings"><structname>pg_settings</></> to + Add <structname>pending_restart</structname> to the system view <link + linkend="view-pg-settings"><structname>pg_settings</structname></link> to indicate a change has been made but will not take effect until a database restart (Peter Eisentraut) </para> @@ -6540,14 +6540,14 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2014-09-02 [bd3b7a9] Fujii ..: Support ALTER SYSTEM RESET command. --> <para> - Allow <link linkend="SQL-ALTERSYSTEM"><command>ALTER SYSTEM</></> - values to be reset with <command>ALTER SYSTEM RESET</> (Vik + Allow <link linkend="SQL-ALTERSYSTEM"><command>ALTER SYSTEM</command></link> + values to be reset with <command>ALTER SYSTEM RESET</command> (Vik Fearing) </para> <para> This command removes the specified setting - from <filename>postgresql.auto.conf</>. + from <filename>postgresql.auto.conf</filename>. </para> </listitem> @@ -6568,7 +6568,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Create mechanisms for tracking - the <link linkend="replication-origins">progress of replication</>, + the <link linkend="replication-origins">progress of replication</link>, including methods for identifying the origin of individual changes during logical replication (Andres Freund) </para> @@ -6600,14 +6600,14 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2015-03-15 [51c11a7] Andres..: Remove pause_at_recovery_target recovery.conf s.. --> <para> - Add <link linkend="recovery-config"><filename>recovery.conf</></> + Add <link linkend="recovery-config"><filename>recovery.conf</filename></link> parameter <link - linkend="recovery-target-action"><varname>recovery_target_action</></> + linkend="recovery-target-action"><varname>recovery_target_action</varname></link> to control post-recovery activity (Petr Jelínek) </para> <para> - This replaces the old parameter <varname>pause_at_recovery_target</>. + This replaces the old parameter <varname>pause_at_recovery_target</varname>. </para> </listitem> @@ -6617,8 +6617,8 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Add new <xref linkend="guc-archive-mode"> value - <literal>always</> to allow standbys to always archive received - <acronym>WAL</> files (Fujii Masao) + <literal>always</literal> to allow standbys to always archive received + <acronym>WAL</acronym> files (Fujii Masao) </para> </listitem> @@ -6629,7 +6629,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. <para> Add configuration parameter <xref linkend="guc-wal-retrieve-retry-interval"> to - control <acronym>WAL</> read retry after failure + control <acronym>WAL</acronym> read retry after failure (Alexey Vasiliev, Michael Paquier) </para> @@ -6643,7 +6643,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2015-03-11 [57aa5b2] Fujii ..: Add GUC to enable compression of full page imag.. --> <para> - Allow compression of full-page images stored in <acronym>WAL</> + Allow compression of full-page images stored in <acronym>WAL</acronym> (Rahila Syed, Michael Paquier) </para> @@ -6660,7 +6660,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2015-05-08 [de76884] Heikki..: At promotion, archive last segment from old tim.. --> <para> - Archive <acronym>WAL</> files with suffix <literal>.partial</> + Archive <acronym>WAL</acronym> files with suffix <literal>.partial</literal> during standby promotion (Heikki Linnakangas) </para> </listitem> @@ -6677,9 +6677,9 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. <para> By default, replication commands, e.g. <link - linkend="protocol-replication"><literal>IDENTIFY_SYSTEM</></>, + linkend="protocol-replication"><literal>IDENTIFY_SYSTEM</literal></link>, are not logged, even when <xref linkend="guc-log-statement"> is set - to <literal>all</>. + to <literal>all</literal>. </para> </listitem> @@ -6689,12 +6689,12 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Report the processes holding replication slots in <link - linkend="view-pg-replication-slots"><structname>pg_replication_slots</></> + linkend="view-pg-replication-slots"><structname>pg_replication_slots</structname></link> (Craig Ringer) </para> <para> - The new output column is <structname>active_pid</>. + The new output column is <structname>active_pid</structname>. </para> </listitem> @@ -6703,9 +6703,9 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2014-11-25 [b3fc672] Heikki..: Allow using connection URI in primary_conninfo. --> <para> - Allow <filename>recovery.conf</>'s <link - linkend="primary-conninfo"><varname>primary_conninfo</></> setting to - use connection <acronym>URI</>s, e.g. <literal>postgres://</> + Allow <filename>recovery.conf</filename>'s <link + linkend="primary-conninfo"><varname>primary_conninfo</varname></link> setting to + use connection <acronym>URI</acronym>s, e.g. <literal>postgres://</literal> (Alexander Shulgin) </para> </listitem> @@ -6725,16 +6725,16 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2015-05-08 [2c8f483] Andres..: Represent columns requiring insert and update p.. --> <para> - Allow <link linkend="sql-on-conflict"><command>INSERT</></>s + Allow <link linkend="sql-on-conflict"><command>INSERT</command></link>s that would generate constraint conflicts to be turned into - <command>UPDATE</>s or ignored (Peter Geoghegan, Heikki + <command>UPDATE</command>s or ignored (Peter Geoghegan, Heikki Linnakangas, Andres Freund) </para> <para> - The syntax is <command>INSERT ... ON CONFLICT DO NOTHING/UPDATE</>. + The syntax is <command>INSERT ... ON CONFLICT DO NOTHING/UPDATE</command>. This is the Postgres implementation of the popular - <command>UPSERT</> command. + <command>UPSERT</command> command. </para> </listitem> @@ -6743,10 +6743,10 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2015-05-16 [f3d3118] Andres..: Support GROUPING SETS, CUBE and ROLLUP. --> <para> - Add <literal>GROUP BY</> analysis features <link - linkend="queries-grouping-sets"><literal>GROUPING SETS</></>, - <link linkend="queries-grouping-sets"><literal>CUBE</></> and - <link linkend="queries-grouping-sets"><literal>ROLLUP</></> + Add <literal>GROUP BY</literal> analysis features <link + linkend="queries-grouping-sets"><literal>GROUPING SETS</literal></link>, + <link linkend="queries-grouping-sets"><literal>CUBE</literal></link> and + <link linkend="queries-grouping-sets"><literal>ROLLUP</literal></link> (Andrew Gierth, Atri Sharma) </para> </listitem> @@ -6757,13 +6757,13 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Allow setting multiple target columns in - an <link linkend="SQL-UPDATE"><command>UPDATE</></> from the result of + an <link linkend="SQL-UPDATE"><command>UPDATE</command></link> from the result of a single sub-SELECT (Tom Lane) </para> <para> This is accomplished using the syntax <command>UPDATE tab SET - (col1, col2, ...) = (SELECT ...)</>. + (col1, col2, ...) = (SELECT ...)</command>. </para> </listitem> @@ -6772,13 +6772,13 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2014-10-07 [df630b0] Alvaro..: Implement SKIP LOCKED for row-level locks --> <para> - Add <link linkend="SQL-SELECT"><command>SELECT</></> option - <literal>SKIP LOCKED</> to skip locked rows (Thomas Munro) + Add <link linkend="SQL-SELECT"><command>SELECT</command></link> option + <literal>SKIP LOCKED</literal> to skip locked rows (Thomas Munro) </para> <para> This does not throw an error for locked rows like - <literal>NOWAIT</> does. + <literal>NOWAIT</literal> does. </para> </listitem> @@ -6787,8 +6787,8 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2015-05-15 [f6d208d] Simon ..: TABLESAMPLE, SQL Standard and extensible --> <para> - Add <link linkend="SQL-SELECT"><command>SELECT</></> option - <literal>TABLESAMPLE</> to return a subset of a table (Petr + Add <link linkend="SQL-SELECT"><command>SELECT</command></link> option + <literal>TABLESAMPLE</literal> to return a subset of a table (Petr Jelínek) </para> @@ -6796,7 +6796,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. This feature supports the SQL-standard table sampling methods. In addition, there are provisions for <link linkend="tablesample-method">user-defined - table sampling methods</>. + table sampling methods</link>. </para> </listitem> @@ -6825,13 +6825,13 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Add more details about sort ordering in <link - linkend="SQL-EXPLAIN"><command>EXPLAIN</></> output (Marius Timmer, + linkend="SQL-EXPLAIN"><command>EXPLAIN</command></link> output (Marius Timmer, Lukas Kreft, Arne Scheffer) </para> <para> - Details include <literal>COLLATE</>, <literal>DESC</>, - <literal>USING</>, and <literal>NULLS FIRST</><literal>/LAST</>. + Details include <literal>COLLATE</literal>, <literal>DESC</literal>, + <literal>USING</literal>, and <literal>NULLS FIRST</literal><literal>/LAST</literal>. </para> </listitem> @@ -6840,7 +6840,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2014-12-18 [35192f0] Alvaro..: Have VACUUM log number of skipped pages due to .. --> <para> - Make <link linkend="SQL-VACUUM"><command>VACUUM</></> log the + Make <link linkend="SQL-VACUUM"><command>VACUUM</command></link> log the number of pages skipped due to pins (Jim Nasby) </para> </listitem> @@ -6850,8 +6850,8 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2015-02-20 [d42358e] Alvaro..: Have TRUNCATE update pgstat tuple counters --> <para> - Make <link linkend="SQL-TRUNCATE"><command>TRUNCATE</></> properly - update the <literal>pg_stat</>* tuple counters (Alexander Shulgin) + Make <link linkend="SQL-TRUNCATE"><command>TRUNCATE</command></link> properly + update the <literal>pg_stat</literal>* tuple counters (Alexander Shulgin) </para> </listitem> @@ -6867,8 +6867,8 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2014-12-09 [fe263d1] Simon ..: REINDEX SCHEMA --> <para> - Allow <command>REINDEX</> to reindex an entire schema using the - <literal>SCHEMA</> option (Sawada Masahiko) + Allow <command>REINDEX</command> to reindex an entire schema using the + <literal>SCHEMA</literal> option (Sawada Masahiko) </para> </listitem> @@ -6877,7 +6877,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2015-05-15 [ecd222e] Fujii ..: Support VERBOSE option in REINDEX command. --> <para> - Add <literal>VERBOSE</> option to <command>REINDEX</> (Sawada + Add <literal>VERBOSE</literal> option to <command>REINDEX</command> (Sawada Masahiko) </para> </listitem> @@ -6887,8 +6887,8 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2014-12-09 [ae4e688] Simon ..: Silence REINDEX --> <para> - Prevent <command>REINDEX DATABASE</> and <command>SCHEMA</> - from outputting object names, unless <literal>VERBOSE</> is used + Prevent <command>REINDEX DATABASE</command> and <command>SCHEMA</command> + from outputting object names, unless <literal>VERBOSE</literal> is used (Simon Riggs) </para> </listitem> @@ -6898,7 +6898,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2015-04-09 [17d436d] Fujii ..: Remove obsolete FORCE option from REINDEX. --> <para> - Remove obsolete <literal>FORCE</> option from <command>REINDEX</> + Remove obsolete <literal>FORCE</literal> option from <command>REINDEX</command> (Fujii Masao) </para> </listitem> @@ -6918,7 +6918,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2014-09-19 [491c029] Stephe..: Row-Level Security Policies (RLS) --> <para> - Add <link linkend="ddl-rowsecurity">row-level security control</> + Add <link linkend="ddl-rowsecurity">row-level security control</link> (Craig Ringer, KaiGai Kohei, Adam Brightwell, Dean Rasheed, Stephen Frost) </para> @@ -6926,11 +6926,11 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. <para> This feature allows row-by-row control over which users can add, modify, or even see rows in a table. This is controlled by new - commands <link linkend="SQL-CREATEPOLICY"><command>CREATE</></>/<link - linkend="SQL-ALTERPOLICY"><command>ALTER</></>/<link - linkend="SQL-DROPPOLICY"><command>DROP POLICY</></> and <link + commands <link linkend="SQL-CREATEPOLICY"><command>CREATE</command></link>/<link + linkend="SQL-ALTERPOLICY"><command>ALTER</command></link>/<link + linkend="SQL-DROPPOLICY"><command>DROP POLICY</command></link> and <link linkend="SQL-ALTERTABLE"><command>ALTER TABLE ... ENABLE/DISABLE - ROW SECURITY</></>. + ROW SECURITY</command></link>. </para> </listitem> @@ -6942,7 +6942,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. Allow changing of the <acronym>WAL</acronym> logging status of a table after creation with <link linkend="SQL-ALTERTABLE"><command>ALTER TABLE ... SET LOGGED / - UNLOGGED</></> (Fabrízio de Royes Mello) + UNLOGGED</command></link> (Fabrízio de Royes Mello) </para> </listitem> @@ -6953,12 +6953,12 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2014-12-13 [e39b6f9] Andrew..: Add CINE option for CREATE TABLE AS and CREATE .. --> <para> - Add <literal>IF NOT EXISTS</> clause to <link - linkend="SQL-CREATETABLEAS"><command>CREATE TABLE AS</></>, - <link linkend="SQL-CREATEINDEX"><command>CREATE INDEX</></>, - <link linkend="SQL-CREATESEQUENCE"><command>CREATE SEQUENCE</></>, + Add <literal>IF NOT EXISTS</literal> clause to <link + linkend="SQL-CREATETABLEAS"><command>CREATE TABLE AS</command></link>, + <link linkend="SQL-CREATEINDEX"><command>CREATE INDEX</command></link>, + <link linkend="SQL-CREATESEQUENCE"><command>CREATE SEQUENCE</command></link>, and <link linkend="SQL-CREATEMATERIALIZEDVIEW"><command>CREATE - MATERIALIZED VIEW</></> (Fabrízio de Royes Mello) + MATERIALIZED VIEW</command></link> (Fabrízio de Royes Mello) </para> </listitem> @@ -6967,9 +6967,9 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2015-03-24 [1d8198b] Bruce ..: Add support for ALTER TABLE IF EXISTS ... RENAM.. --> <para> - Add support for <literal>IF EXISTS</> to <link + Add support for <literal>IF EXISTS</literal> to <link linkend="SQL-ALTERTABLE"><command>ALTER TABLE ... RENAME - CONSTRAINT</></> (Bruce Momjian) + CONSTRAINT</command></link> (Bruce Momjian) </para> </listitem> @@ -6978,8 +6978,8 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2015-03-09 [31eae60] Alvaro..: Allow CURRENT/SESSION_USER to be used in certai.. --> <para> - Allow some DDL commands to accept <literal>CURRENT_USER</> - or <literal>SESSION_USER</>, meaning the current user or session + Allow some DDL commands to accept <literal>CURRENT_USER</literal> + or <literal>SESSION_USER</literal>, meaning the current user or session user, in place of a specific user name (Kyotaro Horiguchi, Álvaro Herrera) </para> @@ -6988,7 +6988,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. This feature is now supported in <xref linkend="SQL-ALTERUSER">, <xref linkend="SQL-ALTERGROUP">, <xref linkend="SQL-ALTERROLE">, <xref linkend="SQL-GRANT">, - and <command>ALTER <replaceable>object</> OWNER TO</> commands. + and <command>ALTER <replaceable>object</replaceable> OWNER TO</command> commands. </para> </listitem> @@ -6998,7 +6998,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Support comments on <link linkend="SQL-CREATEDOMAIN">domain - constraints</> (Álvaro Herrera) + constraints</link> (Álvaro Herrera) </para> </listitem> @@ -7018,13 +7018,13 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Allow <link linkend="SQL-LOCK"><command>LOCK TABLE ... ROW EXCLUSIVE - MODE</></> for those with <command>INSERT</> privileges on the + MODE</command></link> for those with <command>INSERT</command> privileges on the target table (Stephen Frost) </para> <para> - Previously this command required <command>UPDATE</>, <command>DELETE</>, - or <command>TRUNCATE</> privileges. + Previously this command required <command>UPDATE</command>, <command>DELETE</command>, + or <command>TRUNCATE</command> privileges. </para> </listitem> @@ -7033,7 +7033,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2015-03-23 [e5f455f] Tom Lane: Apply table and domain CHECK constraints in nam. --> <para> - Apply table and domain <literal>CHECK</> constraints in order by name + Apply table and domain <literal>CHECK</literal> constraints in order by name (Tom Lane) </para> @@ -7049,16 +7049,16 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Allow <link - linkend="SQL-CREATEDATABASE"><command>CREATE</></>/<link - linkend="SQL-ALTERDATABASE"><command>ALTER DATABASE</></> - to manipulate <structname>datistemplate</> and - <structname>datallowconn</> (Vik Fearing) + linkend="SQL-CREATEDATABASE"><command>CREATE</command></link>/<link + linkend="SQL-ALTERDATABASE"><command>ALTER DATABASE</command></link> + to manipulate <structname>datistemplate</structname> and + <structname>datallowconn</structname> (Vik Fearing) </para> <para> This allows these per-database settings to be changed without manually modifying the <link - linkend="catalog-pg-database"><structname>pg_database</></> + linkend="catalog-pg-database"><structname>pg_database</structname></link> system catalog. </para> </listitem> @@ -7090,7 +7090,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2014-12-17 [fc2ac1f] Tom Lane: Allow CHECK constraints to be placed on foreign.. --> <para> - Allow <literal>CHECK</> constraints to be placed on foreign tables + Allow <literal>CHECK</literal> constraints to be placed on foreign tables (Shigeru Hanada, Etsuro Fujita) </para> @@ -7099,7 +7099,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. and are not enforced locally. However, they are assumed to hold for purposes of query optimization, such as <link linkend="ddl-partitioning-constraint-exclusion">constraint - exclusion</>. + exclusion</link>. </para> </listitem> @@ -7115,7 +7115,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. <para> To let this work naturally, foreign tables are now allowed to have check constraints marked as not valid, and to set storage - and <type>OID</> characteristics, even though these operations are + and <type>OID</type> characteristics, even though these operations are effectively no-ops for a foreign table. </para> </listitem> @@ -7145,14 +7145,14 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2015-05-11 [b488c58] Alvaro..: Allow on-the-fly capture of DDL event details --> <para> - Whenever a <literal>ddl_command_end</> event trigger is installed, - capture details of <acronym>DDL</> activity for it to inspect + Whenever a <literal>ddl_command_end</literal> event trigger is installed, + capture details of <acronym>DDL</acronym> activity for it to inspect (Álvaro Herrera) </para> <para> This information is available through a set-returning function <link - linkend="pg-event-trigger-ddl-command-end-functions"><function>pg_event_trigger_ddl_commands()</></link>, + linkend="pg-event-trigger-ddl-command-end-functions"><function>pg_event_trigger_ddl_commands()</function></link>, or by inspection of C data structures if that function doesn't provide enough detail. </para> @@ -7164,7 +7164,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Allow event triggers on table rewrites caused by <link - linkend="SQL-ALTERTABLE"><command>ALTER TABLE</></> (Dimitri + linkend="SQL-ALTERTABLE"><command>ALTER TABLE</command></link> (Dimitri Fontaine) </para> </listitem> @@ -7175,10 +7175,10 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Add event trigger support for database-level <link - linkend="SQL-COMMENT"><command>COMMENT</></>, <link - linkend="SQL-SECURITY-LABEL"><command>SECURITY LABEL</></>, - and <link linkend="SQL-GRANT"><command>GRANT</></>/<link - linkend="SQL-REVOKE"><command>REVOKE</></> (Álvaro Herrera) + linkend="SQL-COMMENT"><command>COMMENT</command></link>, <link + linkend="SQL-SECURITY-LABEL"><command>SECURITY LABEL</command></link>, + and <link linkend="SQL-GRANT"><command>GRANT</command></link>/<link + linkend="SQL-REVOKE"><command>REVOKE</command></link> (Álvaro Herrera) </para> </listitem> @@ -7189,7 +7189,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Add columns to the output of <link - linkend="pg-event-trigger-sql-drop-functions"><function>pg_event_trigger_dropped_objects</></> + linkend="pg-event-trigger-sql-drop-functions"><function>pg_event_trigger_dropped_objects</function></link> (Álvaro Herrera) </para> @@ -7214,12 +7214,12 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2014-09-09 [57b1085] Peter ..: Allow empty content in xml type --> <para> - Allow the <link linkend="datatype-xml"><type>xml</></> data type + Allow the <link linkend="datatype-xml"><type>xml</type></link> data type to accept empty or all-whitespace content values (Peter Eisentraut) </para> <para> - This is required by the <acronym>SQL</>/<acronym>XML</> + This is required by the <acronym>SQL</acronym>/<acronym>XML</acronym> specification. </para> </listitem> @@ -7229,8 +7229,8 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2014-10-21 [6f04368] Peter ..: Allow input format xxxx-xxxx-xxxx for macaddr .. --> <para> - Allow <link linkend="datatype-macaddr"><type>macaddr</></> input - using the format <literal>xxxx-xxxx-xxxx</> (Herwin Weststrate) + Allow <link linkend="datatype-macaddr"><type>macaddr</type></link> input + using the format <literal>xxxx-xxxx-xxxx</literal> (Herwin Weststrate) </para> </listitem> @@ -7240,15 +7240,15 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Disallow non-SQL-standard syntax for <link - linkend="datatype-interval-input"><type>interval</></link> with + linkend="datatype-interval-input"><type>interval</type></link> with both precision and field specifications (Bruce Momjian) </para> <para> Per the standard, such type specifications should be written as, - for example, <literal>INTERVAL MINUTE TO SECOND(2)</>. - <productname>PostgreSQL</> formerly allowed this to be written as - <literal>INTERVAL(2) MINUTE TO SECOND</>, but it must now be + for example, <literal>INTERVAL MINUTE TO SECOND(2)</literal>. + <productname>PostgreSQL</productname> formerly allowed this to be written as + <literal>INTERVAL(2) MINUTE TO SECOND</literal>, but it must now be written in the standard way. </para> </listitem> @@ -7259,8 +7259,8 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Add selectivity estimators for <link - linkend="datatype-inet"><type>inet</></>/<link - linkend="datatype-cidr"><type>cidr</></> operators and improve + linkend="datatype-inet"><type>inet</type></link>/<link + linkend="datatype-cidr"><type>cidr</type></link> operators and improve estimators for text search functions (Emre Hasegeli, Tom Lane) </para> </listitem> @@ -7272,9 +7272,9 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Add data - types <link linkend="datatype-oid-table"><type>regrole</></link> - and <link linkend="datatype-oid-table"><type>regnamespace</></link> - to simplify entering and pretty-printing the <type>OID</> of a role + types <link linkend="datatype-oid-table"><type>regrole</type></link> + and <link linkend="datatype-oid-table"><type>regnamespace</type></link> + to simplify entering and pretty-printing the <type>OID</type> of a role or namespace (Kyotaro Horiguchi) </para> </listitem> @@ -7282,7 +7282,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. </itemizedlist> <sect4> - <title><link linkend="datatype-json"><acronym>JSON</></link></title> + <title><link linkend="datatype-json"><acronym>JSON</acronym></link></title> <itemizedlist> @@ -7292,10 +7292,10 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2015-05-31 [37def42] Andrew..: Rename jsonb_replace to jsonb_set and allow it .. --> <para> - Add <type>jsonb</> functions <link - linkend="functions-json-processing-table"><function>jsonb_set()</></> + Add <type>jsonb</type> functions <link + linkend="functions-json-processing-table"><function>jsonb_set()</function></link> and <link - linkend="functions-json-processing-table"><function>jsonb_pretty()</></> + linkend="functions-json-processing-table"><function>jsonb_pretty()</function></link> (Dmitry Dolgov, Andrew Dunstan, Petr Jelínek) </para> </listitem> @@ -7305,23 +7305,23 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2014-12-12 [7e354ab] Andrew..: Add several generator functions for jsonb that .. --> <para> - Add <type>jsonb</> generator functions <link - linkend="functions-json-creation-table"><function>to_jsonb()</></>, + Add <type>jsonb</type> generator functions <link + linkend="functions-json-creation-table"><function>to_jsonb()</function></link>, <link - linkend="functions-json-creation-table"><function>jsonb_object()</></>, + linkend="functions-json-creation-table"><function>jsonb_object()</function></link>, <link - linkend="functions-json-creation-table"><function>jsonb_build_object()</></>, + linkend="functions-json-creation-table"><function>jsonb_build_object()</function></link>, <link - linkend="functions-json-creation-table"><function>jsonb_build_array()</></>, + linkend="functions-json-creation-table"><function>jsonb_build_array()</function></link>, <link - linkend="functions-aggregate-table"><function>jsonb_agg()</></>, + linkend="functions-aggregate-table"><function>jsonb_agg()</function></link>, and <link - linkend="functions-aggregate-table"><function>jsonb_object_agg()</></> + linkend="functions-aggregate-table"><function>jsonb_object_agg()</function></link> (Andrew Dunstan) </para> <para> - Equivalent functions already existed for type <type>json</>. + Equivalent functions already existed for type <type>json</type>. </para> </listitem> @@ -7331,8 +7331,8 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Reduce casting requirements to/from <link - linkend="datatype-json"><type>json</></> and <link - linkend="datatype-json"><type>jsonb</></> (Tom Lane) + linkend="datatype-json"><type>json</type></link> and <link + linkend="datatype-json"><type>jsonb</type></link> (Tom Lane) </para> </listitem> @@ -7341,9 +7341,9 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2015-06-11 [908e234] Andrew..: Rename jsonb - text[] operator to #- to avoid a.. --> <para> - Allow <type>text</>, <type>text</> array, and <type>integer</> - values to be <link linkend="functions-jsonb-op-table">subtracted</> - from <type>jsonb</> documents (Dmitry Dolgov, Andrew Dunstan) + Allow <type>text</type>, <type>text</type> array, and <type>integer</type> + values to be <link linkend="functions-jsonb-op-table">subtracted</link> + from <type>jsonb</type> documents (Dmitry Dolgov, Andrew Dunstan) </para> </listitem> @@ -7352,8 +7352,8 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2015-05-12 [c694701] Andrew..: Additional functions and operators for jsonb --> <para> - Add <type>jsonb</> <link - linkend="functions-jsonb-op-table"><literal>||</></> operator + Add <type>jsonb</type> <link + linkend="functions-jsonb-op-table"><literal>||</literal></link> operator (Dmitry Dolgov, Andrew Dunstan) </para> </listitem> @@ -7364,9 +7364,9 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Add <link - linkend="functions-json-processing-table"><function>json_strip_nulls()</></> + linkend="functions-json-processing-table"><function>json_strip_nulls()</function></link> and <link - linkend="functions-json-processing-table"><function>jsonb_strip_nulls()</></> + linkend="functions-json-processing-table"><function>jsonb_strip_nulls()</function></link> functions to remove JSON null values from documents (Andrew Dunstan) </para> @@ -7388,8 +7388,8 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2014-11-11 [1871c89] Fujii ..: Add generate_series(numeric, numeric). --> <para> - Add <link linkend="functions-srf"><function>generate_series()</></> - for <type>numeric</> values (Plato Malugin) + Add <link linkend="functions-srf"><function>generate_series()</function></link> + for <type>numeric</type> values (Plato Malugin) </para> </listitem> @@ -7399,8 +7399,8 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Allow <link - linkend="functions-aggregate-table"><function>array_agg()</></> and - <function>ARRAY()</> to take arrays as inputs (Ali Akbar, Tom Lane) + linkend="functions-aggregate-table"><function>array_agg()</function></link> and + <function>ARRAY()</function> to take arrays as inputs (Ali Akbar, Tom Lane) </para> </listitem> @@ -7411,9 +7411,9 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Add functions <link - linkend="array-functions-table"><function>array_position()</></> + linkend="array-functions-table"><function>array_position()</function></link> and <link - linkend="array-functions-table"><function>array_positions()</></> + linkend="array-functions-table"><function>array_positions()</function></link> to return subscripts of array values (Pavel Stehule) </para> </listitem> @@ -7423,8 +7423,8 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2014-12-15 [4520ba6] Heikki..: Add point <-> polygon distance operator. --> <para> - Add a <type>point</>-to-<type>polygon</> distance operator - <link linkend="functions-geometry-op-table"><-></> + Add a <type>point</type>-to-<type>polygon</type> distance operator + <link linkend="functions-geometry-op-table"><-></link> (Alexander Korotkov) </para> </listitem> @@ -7435,8 +7435,8 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Allow multibyte characters as escapes in <link - linkend="functions-similarto-regexp"><literal>SIMILAR TO</></> - and <link linkend="functions-string-sql"><literal>SUBSTRING</></> + linkend="functions-similarto-regexp"><literal>SIMILAR TO</literal></link> + and <link linkend="functions-string-sql"><literal>SUBSTRING</literal></link> (Jeff Davis) </para> @@ -7451,7 +7451,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Add a <link - linkend="functions-math-func-table"><function>width_bucket()</></> + linkend="functions-math-func-table"><function>width_bucket()</function></link> variant that supports any sortable data type and non-uniform bucket widths (Petr Jelínek) </para> @@ -7462,8 +7462,8 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2015-06-28 [cb2acb1] Heikki..: Add missing_ok option to the SQL functions for.. --> <para> - Add an optional <replaceable>missing_ok</> argument to <link - linkend="functions-admin-genfile-table"><function>pg_read_file()</></> + Add an optional <replaceable>missing_ok</replaceable> argument to <link + linkend="functions-admin-genfile-table"><function>pg_read_file()</function></link> and related functions (Michael Paquier, Heikki Linnakangas) </para> </listitem> @@ -7473,14 +7473,14 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2015-03-10 [865f14a] Robert..: Allow named parameters to be specified using =>.. --> <para> - Allow <link linkend="sql-syntax-calling-funcs"><literal>=></></> + Allow <link linkend="sql-syntax-calling-funcs"><literal>=></literal></link> to specify named parameters in function calls (Pavel Stehule) </para> <para> - Previously only <literal>:=</> could be used. This requires removing - the possibility for <literal>=></> to be a user-defined operator. - Creation of user-defined <literal>=></> operators has been issuing + Previously only <literal>:=</literal> could be used. This requires removing + the possibility for <literal>=></literal> to be a user-defined operator. + Creation of user-defined <literal>=></literal> operators has been issuing warnings since PostgreSQL 9.0. </para> </listitem> @@ -7490,7 +7490,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2015-03-25 [06bf0dd] Tom Lane: Upgrade src/port/rint.c to be POSIX-compliant. --> <para> - Add <acronym>POSIX</>-compliant rounding for platforms that use + Add <acronym>POSIX</acronym>-compliant rounding for platforms that use PostgreSQL-supplied rounding functions (Pedro Gimeno Fortea) </para> </listitem> @@ -7509,11 +7509,11 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Add function <link - linkend="functions-info-object-table"><function>pg_get_object_address()</></> - to return <type>OID</>s that uniquely + linkend="functions-info-object-table"><function>pg_get_object_address()</function></link> + to return <type>OID</type>s that uniquely identify an object, and function <link - linkend="functions-info-object-table"><function>pg_identify_object_as_address()</></> - to return object information based on <type>OID</>s (Álvaro + linkend="functions-info-object-table"><function>pg_identify_object_as_address()</function></link> + to return object information based on <type>OID</type>s (Álvaro Herrera) </para> </listitem> @@ -7524,11 +7524,11 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Loosen security checks for viewing queries in <link - linkend="pg-stat-activity-view"><structname>pg_stat_activity</></>, + linkend="pg-stat-activity-view"><structname>pg_stat_activity</structname></link>, executing <link - linkend="functions-admin-signal-table"><function>pg_cancel_backend()</></>, + linkend="functions-admin-signal-table"><function>pg_cancel_backend()</function></link>, and executing <link - linkend="functions-admin-signal-table"><function>pg_terminate_backend()</></> + linkend="functions-admin-signal-table"><function>pg_terminate_backend()</function></link> (Stephen Frost) </para> @@ -7544,7 +7544,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Add <link - linkend="monitoring-stats-funcs-table"><function>pg_stat_get_snapshot_timestamp()</></> + linkend="monitoring-stats-funcs-table"><function>pg_stat_get_snapshot_timestamp()</function></link> to output the time stamp of the statistics snapshot (Matt Kelly) </para> @@ -7560,7 +7560,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Add <link - linkend="vacuum-for-multixact-wraparound"><function>mxid_age()</></> + linkend="vacuum-for-multixact-wraparound"><function>mxid_age()</function></link> to compute multi-xid age (Bruce Momjian) </para> </listitem> @@ -7578,9 +7578,9 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2014-08-28 [6c40f83] Tom Lane: Add min and max aggregates for inet/cidr data t.. --> <para> - Add <function>min()</>/<function>max()</> aggregates - for <link linkend="datatype-inet"><type>inet</></>/<link - linkend="datatype-cidr"><type>cidr</></> data types (Haribabu + Add <function>min()</function>/<function>max()</function> aggregates + for <link linkend="datatype-inet"><type>inet</type></link>/<link + linkend="datatype-cidr"><type>cidr</type></link> data types (Haribabu Kommi) </para> </listitem> @@ -7613,12 +7613,12 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Improve support for composite types in <link - linkend="plpython"><application>PL/Python</></> (Ed Behn, Ronan + linkend="plpython"><application>PL/Python</application></link> (Ed Behn, Ronan Dunklau) </para> <para> - This allows <application>PL/Python</> functions to return arrays + This allows <application>PL/Python</application> functions to return arrays of composite types. </para> </listitem> @@ -7629,7 +7629,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Reduce lossiness of <link - linkend="plpython"><application>PL/Python</></> floating-point value + linkend="plpython"><application>PL/Python</application></link> floating-point value conversions (Marko Kreen) </para> </listitem> @@ -7639,19 +7639,19 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2015-04-26 [cac7658] Peter ..: Add transforms feature --> <para> - Allow specification of conversion routines between <acronym>SQL</> + Allow specification of conversion routines between <acronym>SQL</acronym> data types and data types of procedural languages (Peter Eisentraut) </para> <para> This change adds new commands <link - linkend="SQL-CREATETRANSFORM"><command>CREATE</></>/<link - linkend="SQL-DROPTRANSFORM"><command>DROP TRANSFORM</></>. + linkend="SQL-CREATETRANSFORM"><command>CREATE</command></link>/<link + linkend="SQL-DROPTRANSFORM"><command>DROP TRANSFORM</command></link>. This also adds optional transformations between the <link - linkend="hstore"><application>hstore</></> and <link - linkend="ltree"><application>ltree</></> types to/from <link - linkend="plperl"><application>PL/Perl</></> and <link - linkend="plpython"><application>PL/Python</></>. + linkend="hstore"><application>hstore</application></link> and <link + linkend="ltree"><application>ltree</application></link> types to/from <link + linkend="plperl"><application>PL/Perl</application></link> and <link + linkend="plpython"><application>PL/Python</application></link>. </para> </listitem> @@ -7670,7 +7670,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2015-02-16 [9e3ad1a] Tom Lane: Use fast path in plpgsql's RETURN/RETURN NEXT i.. --> <para> - Improve <link linkend="plpgsql"><application>PL/pgSQL</></> array + Improve <link linkend="plpgsql"><application>PL/pgSQL</application></link> array performance (Tom Lane) </para> </listitem> @@ -7680,8 +7680,8 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2015-03-25 [a4847fc] Tom Lane: Add an ASSERT statement in plpgsql. --> <para> - Add an <link linkend="plpgsql-statements-assert"><command>ASSERT</></> - statement in <application>PL/pgSQL</> (Pavel Stehule) + Add an <link linkend="plpgsql-statements-assert"><command>ASSERT</command></link> + statement in <application>PL/pgSQL</application> (Pavel Stehule) </para> </listitem> @@ -7690,7 +7690,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2014-11-25 [bb1b8f6] Tom Lane: De-reserve most statement-introducing keywords .. --> <para> - Allow more <link linkend="plpgsql"><application>PL/pgSQL</></> + Allow more <link linkend="plpgsql"><application>PL/pgSQL</application></link> keywords to be used as identifiers (Tom Lane) </para> </listitem> @@ -7715,11 +7715,11 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Move <link - linkend="pgarchivecleanup"><application>pg_archivecleanup</></>, - <link linkend="pgtestfsync"><application>pg_test_fsync</></>, - <link linkend="pgtesttiming"><application>pg_test_timing</></>, - and <link linkend="pgwaldump"><application>pg_xlogdump</></> - from <filename>contrib</> to <filename>src/bin</> (Peter Eisentraut) + linkend="pgarchivecleanup"><application>pg_archivecleanup</application></link>, + <link linkend="pgtestfsync"><application>pg_test_fsync</application></link>, + <link linkend="pgtesttiming"><application>pg_test_timing</application></link>, + and <link linkend="pgwaldump"><application>pg_xlogdump</application></link> + from <filename>contrib</filename> to <filename>src/bin</filename> (Peter Eisentraut) </para> <para> @@ -7733,7 +7733,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2015-03-23 [61081e7] Heikki..: Add pg_rewind, for re-synchronizing a master se.. --> <para> - Add <link linkend="app-pgrewind"><application>pg_rewind</></>, + Add <link linkend="app-pgrewind"><application>pg_rewind</application></link>, which allows re-synchronizing a master server after failback (Heikki Linnakangas) </para> @@ -7745,13 +7745,13 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Allow <link - linkend="app-pgreceivewal"><application>pg_receivexlog</></> + linkend="app-pgreceivewal"><application>pg_receivexlog</application></link> to manage physical replication slots (Michael Paquier) </para> <para> - This is controlled via new <option>--create-slot</> and - <option>--drop-slot</> options. + This is controlled via new <option>--create-slot</option> and + <option>--drop-slot</option> options. </para> </listitem> @@ -7761,13 +7761,13 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Allow <link - linkend="app-pgreceivewal"><application>pg_receivexlog</></> - to synchronously flush <acronym>WAL</> to storage using new - <option>--synchronous</> option (Furuya Osamu, Fujii Masao) + linkend="app-pgreceivewal"><application>pg_receivexlog</application></link> + to synchronously flush <acronym>WAL</acronym> to storage using new + <option>--synchronous</option> option (Furuya Osamu, Fujii Masao) </para> <para> - Without this, <acronym>WAL</> files are fsync'ed only on close. + Without this, <acronym>WAL</acronym> files are fsync'ed only on close. </para> </listitem> @@ -7776,8 +7776,8 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2015-01-23 [a179232] Alvaro..: vacuumdb: enable parallel mode --> <para> - Allow <link linkend="APP-VACUUMDB"><application>vacuumdb</></> to - vacuum in parallel using new <option>--jobs</> option (Dilip Kumar) + Allow <link linkend="APP-VACUUMDB"><application>vacuumdb</application></link> to + vacuum in parallel using new <option>--jobs</option> option (Dilip Kumar) </para> </listitem> @@ -7786,7 +7786,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2015-11-12 [5094da9] Alvaro..: vacuumdb: don't prompt for passwords over and .. --> <para> - In <link linkend="APP-VACUUMDB"><application>vacuumdb</></>, do not + In <link linkend="APP-VACUUMDB"><application>vacuumdb</application></link>, do not prompt for the same password repeatedly when multiple connections are necessary (Haribabu Kommi, Michael Paquier) </para> @@ -7797,8 +7797,8 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2015-05-15 [458a077] Fujii ..: Support ––verbose option in reindexdb. --> <para> - Add <option>--verbose</> option to <link - linkend="APP-REINDEXDB"><application>reindexdb</></> (Sawada + Add <option>--verbose</option> option to <link + linkend="APP-REINDEXDB"><application>reindexdb</application></link> (Sawada Masahiko) </para> </listitem> @@ -7808,10 +7808,10 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2015-05-12 [72d422a] Andrew..: Map basebackup tablespaces using a tablespace_.. --> <para> - Make <link linkend="app-pgbasebackup"><application>pg_basebackup</></> - use a tablespace mapping file when using <application>tar</> format, + Make <link linkend="app-pgbasebackup"><application>pg_basebackup</application></link> + use a tablespace mapping file when using <application>tar</application> format, to support symbolic links and file paths of 100+ characters in length - on <systemitem class="osname">MS Windows</> (Amit Kapila) + on <systemitem class="osname">MS Windows</systemitem> (Amit Kapila) </para> </listitem> @@ -7821,8 +7821,8 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2014-09-19 [bdd5726] Andres..: Add the capability to display summary statistic.. --> <para> - Add <link linkend="pgwaldump"><application>pg_xlogdump</></> option - <option>--stats</> to display summary statistics (Abhijit Menon-Sen) + Add <link linkend="pgwaldump"><application>pg_xlogdump</application></link> option + <option>--stats</option> to display summary statistics (Abhijit Menon-Sen) </para> </listitem> @@ -7838,7 +7838,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2015-03-31 [9d9991c] Bruce ..: psql: add asciidoc output format --> <para> - Allow <application>psql</> to produce AsciiDoc output (Szymon Guz) + Allow <application>psql</application> to produce AsciiDoc output (Szymon Guz) </para> </listitem> @@ -7847,14 +7847,14 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2014-07-10 [5b214c5] Fujii ..: Add new ECHO mode 'errors' that displays only .. --> <para> - Add an <literal>errors</> mode that displays only failed commands - to <application>psql</>'s <varname>ECHO</> variable + Add an <literal>errors</literal> mode that displays only failed commands + to <application>psql</application>'s <varname>ECHO</varname> variable (Pavel Stehule) </para> <para> - This behavior can also be selected with <application>psql</>'s - <option>-b</> option. + This behavior can also be selected with <application>psql</application>'s + <option>-b</option> option. </para> </listitem> @@ -7864,12 +7864,12 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Provide separate column, header, and border linestyle control - in <application>psql</>'s unicode linestyle (Pavel Stehule) + in <application>psql</application>'s unicode linestyle (Pavel Stehule) </para> <para> Single or double lines are supported; the default is - <literal>single</>. + <literal>single</literal>. </para> </listitem> @@ -7878,8 +7878,8 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2014-09-02 [51bb795] Andres..: Add psql PROMPT variable showing which line of .. --> <para> - Add new option <literal>%l</> in <application>psql</>'s <link - linkend="APP-PSQL-variables"><envar>PROMPT</></> variables + Add new option <literal>%l</literal> in <application>psql</application>'s <link + linkend="APP-PSQL-variables"><envar>PROMPT</envar></link> variables to display the current multiline statement line number (Sawada Masahiko) </para> @@ -7890,8 +7890,8 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2015-03-28 [7655f4c] Andrew..: Add a pager_min_lines setting to psql --> <para> - Add <literal>\pset</> option <link - linkend="APP-PSQL-meta-commands"><varname>pager_min_lines</></> + Add <literal>\pset</literal> option <link + linkend="APP-PSQL-meta-commands"><varname>pager_min_lines</varname></link> to control pager invocation (Andrew Dunstan) </para> </listitem> @@ -7901,7 +7901,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2014-11-21 [4077fb4] Andrew..: Fix an error in psql that overcounted output l.. --> <para> - Improve <application>psql</> line counting used when deciding + Improve <application>psql</application> line counting used when deciding to invoke the pager (Andrew Dunstan) </para> </listitem> @@ -7912,8 +7912,8 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2015-12-08 [e90371d] Tom Lane: Make failure to open psql log-file fatal. --> <para> - <application>psql</> now fails if the file specified by - an <option>--output</> or <option>--log-file</> switch cannot be + <application>psql</application> now fails if the file specified by + an <option>--output</option> or <option>--log-file</option> switch cannot be written (Tom Lane, Daniel Vérité) </para> @@ -7927,7 +7927,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2014-07-12 [bd40951] Andres..: Minimal psql tab completion support for SET se.. --> <para> - Add <application>psql</> tab completion when setting the + Add <application>psql</application> tab completion when setting the <xref linkend="guc-search-path"> variable (Jeff Janes) </para> @@ -7941,7 +7941,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2014-06-23 [631e7f6] Heikki..: Improve tab-completion of DROP and ALTER ENABLE.. --> <para> - Improve <application>psql</>'s tab completion for triggers and rules + Improve <application>psql</application>'s tab completion for triggers and rules (Andreas Karlsson) </para> </listitem> @@ -7958,17 +7958,17 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2014-09-10 [07c8651] Andres..: Add new psql help topics, accessible to both.. --> <para> - Add <application>psql</> <command>\?</> help sections - <literal>variables</> and <literal>options</> (Pavel Stehule) + Add <application>psql</application> <command>\?</command> help sections + <literal>variables</literal> and <literal>options</literal> (Pavel Stehule) </para> <para> - <literal>\? variables</> shows <application>psql</>'s special - variables and <literal>\? options</> shows the command-line options. - <command>\? commands</> shows the meta-commands, which is the + <literal>\? variables</literal> shows <application>psql</application>'s special + variables and <literal>\? options</literal> shows the command-line options. + <command>\? commands</command> shows the meta-commands, which is the traditional output and remains the default. These help displays can also be obtained with the command-line - option <literal>--help=<replaceable>section</></literal>. + option <literal>--help=<replaceable>section</replaceable></literal>. </para> </listitem> @@ -7977,7 +7977,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2014-07-14 [ee80f04] Alvaro..: psql: Show tablespace size in \db+ --> <para> - Show tablespace size in <application>psql</>'s <literal>\db+</> + Show tablespace size in <application>psql</application>'s <literal>\db+</literal> (Fabrízio de Royes Mello) </para> </listitem> @@ -7987,7 +7987,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2015-04-09 [a6f3c1f] Magnus..: Show owner of types in psql \dT+ --> <para> - Show data type owners in <application>psql</>'s <literal>\dT+</> + Show data type owners in <application>psql</application>'s <literal>\dT+</literal> (Magnus Hagander) </para> </listitem> @@ -7997,13 +7997,13 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2014-09-04 [f6f654f] Fujii ..: Allow \watch to display query execution time if.. --> <para> - Allow <application>psql</>'s <command>\watch</> to output - <command>\timing</> information (Fujii Masao) + Allow <application>psql</application>'s <command>\watch</command> to output + <command>\timing</command> information (Fujii Masao) </para> <para> - Also prevent <option>--echo-hidden</> from echoing - <command>\watch</> queries, since that is generally unwanted. + Also prevent <option>--echo-hidden</option> from echoing + <command>\watch</command> queries, since that is generally unwanted. </para> </listitem> @@ -8012,8 +8012,8 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2014-11-22 [eca2b9b] Andrew..: Rework echo_hidden for \sf and \ef from commit .. --> <para> - Make <application>psql</>'s <literal>\sf</> and <literal>\ef</> - commands honor <envar>ECHO_HIDDEN</> (Andrew Dunstan) + Make <application>psql</application>'s <literal>\sf</literal> and <literal>\ef</literal> + commands honor <envar>ECHO_HIDDEN</envar> (Andrew Dunstan) </para> </listitem> @@ -8022,8 +8022,8 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2014-08-12 [e15c4ab] Fujii ..: Add tab-completion for \unset and valid setting.. --> <para> - Improve <application>psql</> tab completion for <command>\set</>, - <command>\unset</>, and <literal>:variable</> names (Pavel + Improve <application>psql</application> tab completion for <command>\set</command>, + <command>\unset</command>, and <literal>:variable</literal> names (Pavel Stehule) </para> </listitem> @@ -8034,7 +8034,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Allow tab completion of role names - in <application>psql</> <literal>\c</> commands (Ian Barwick) + in <application>psql</application> <literal>\c</literal> commands (Ian Barwick) </para> </listitem> @@ -8054,15 +8054,15 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2014-11-17 [be1cc8f] Simon ..: Add pg_dump ––snapshot option --> <para> - Allow <application>pg_dump</> to share a snapshot taken by another - session using <option>--snapshot</> (Simon Riggs, Michael Paquier) + Allow <application>pg_dump</application> to share a snapshot taken by another + session using <option>--snapshot</option> (Simon Riggs, Michael Paquier) </para> <para> The remote snapshot must have been exported by - <function>pg_export_snapshot()</> or logical replication slot + <function>pg_export_snapshot()</function> or logical replication slot creation. This can be used to share a consistent snapshot - across multiple <application>pg_dump</> processes. + across multiple <application>pg_dump</application> processes. </para> </listitem> @@ -8087,13 +8087,13 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2014-07-07 [7700597] Tom Lane: In pg_dump, show server and pg_dump versions w.. --> <para> - Make <application>pg_dump</> always print the server and - <application>pg_dump</> versions (Jing Wang) + Make <application>pg_dump</application> always print the server and + <application>pg_dump</application> versions (Jing Wang) </para> <para> Previously, version information was only printed in - <option>--verbose</> mode. + <option>--verbose</option> mode. </para> </listitem> @@ -8102,9 +8102,9 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2015-06-04 [232cd63] Fujii ..: Remove -i/-ignore-version option from pg_dump.. --> <para> - Remove the long-ignored <option>-i</>/<option>--ignore-version</> - option from <application>pg_dump</>, <application>pg_dumpall</>, - and <application>pg_restore</> (Fujii Masao) + Remove the long-ignored <option>-i</option>/<option>--ignore-version</option> + option from <application>pg_dump</application>, <application>pg_dumpall</application>, + and <application>pg_restore</application> (Fujii Masao) </para> </listitem> @@ -8122,7 +8122,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2014-08-25 [ebe30ad] Bruce ..: pg_ctl, pg_upgrade: allow multiple -o/-O opti.. --> <para> - Support multiple <application>pg_ctl</> <option>-o</> options, + Support multiple <application>pg_ctl</application> <option>-o</option> options, concatenating their values (Bruce Momjian) </para> </listitem> @@ -8132,13 +8132,13 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2014-07-17 [c0e4520] Magnus..: Add option to pg_ctl to choose event source for.. --> <para> - Allow control of <application>pg_ctl</>'s event source logging - on <systemitem class="osname">MS Windows</> (MauMau) + Allow control of <application>pg_ctl</application>'s event source logging + on <systemitem class="osname">MS Windows</systemitem> (MauMau) </para> <para> - This only controls <application>pg_ctl</>, not the server, which - has separate settings in <filename>postgresql.conf</>. + This only controls <application>pg_ctl</application>, not the server, which + has separate settings in <filename>postgresql.conf</filename>. </para> </listitem> @@ -8148,14 +8148,14 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> If the server's listen address is set to a wildcard value - (<literal>0.0.0.0</> in IPv4 or <literal>::</> in IPv6), connect via + (<literal>0.0.0.0</literal> in IPv4 or <literal>::</literal> in IPv6), connect via the loopback address rather than trying to use the wildcard address literally (Kondo Yuta) </para> <para> This fix primarily affects Windows, since on other platforms - <application>pg_ctl</> will prefer to use a Unix-domain socket. + <application>pg_ctl</application> will prefer to use a Unix-domain socket. </para> </listitem> @@ -8173,13 +8173,13 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2015-04-14 [9fa8b0e] Peter ..: Move pg_upgrade from contrib/ to src/bin/ --> <para> - Move <application>pg_upgrade</> from <filename>contrib</> to - <filename>src/bin</> (Peter Eisentraut) + Move <application>pg_upgrade</application> from <filename>contrib</filename> to + <filename>src/bin</filename> (Peter Eisentraut) </para> <para> In connection with this change, the functionality previously - provided by the <application>pg_upgrade_support</> module has been + provided by the <application>pg_upgrade_support</application> module has been moved into the core server. </para> </listitem> @@ -8189,8 +8189,8 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2014-08-25 [ebe30ad] Bruce ..: pg_ctl, pg_upgrade: allow multiple -o/-O optio.. --> <para> - Support multiple <application>pg_upgrade</> - <option>-o</>/<option>-O</> options, + Support multiple <application>pg_upgrade</application> + <option>-o</option>/<option>-O</option> options, concatenating their values (Bruce Momjian) </para> </listitem> @@ -8201,7 +8201,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Improve database collation comparisons in - <application>pg_upgrade</> (Heikki Linnakangas) + <application>pg_upgrade</application> (Heikki Linnakangas) </para> </listitem> @@ -8228,7 +8228,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2015-04-13 [81134af] Peter ..: Move pgbench from contrib/ to src/bin/ --> <para> - Move pgbench from <filename>contrib</> to <filename>src/bin</> + Move pgbench from <filename>contrib</filename> to <filename>src/bin</filename> (Peter Eisentraut) </para> </listitem> @@ -8239,7 +8239,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Fix calculation of TPS number <quote>excluding connections - establishing</> (Tatsuo Ishii, Fabien Coelho) + establishing</quote> (Tatsuo Ishii, Fabien Coelho) </para> <para> @@ -8261,7 +8261,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. </para> <para> - This is controlled by a new <option>--latency-limit</> option. + This is controlled by a new <option>--latency-limit</option> option. </para> </listitem> @@ -8271,7 +8271,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Allow pgbench to generate Gaussian/exponential distributions - using <command>\setrandom</> (Kondo Mitsumasa, Fabien Coelho) + using <command>\setrandom</command> (Kondo Mitsumasa, Fabien Coelho) </para> </listitem> @@ -8280,9 +8280,9 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2015-03-02 [878fdcb] Robert..: pgbench: Add a real expression syntax to \set --> <para> - Allow <application>pgbench</>'s <command>\set</> command to handle + Allow <application>pgbench</application>'s <command>\set</command> command to handle arithmetic expressions containing more than one operator, and add - <literal>%</> (modulo) to the set of operators it supports + <literal>%</literal> (modulo) to the set of operators it supports (Robert Haas, Fabien Coelho) </para> </listitem> @@ -8303,7 +8303,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2014-11-20 [2c03216] Heikki..: Revamp the WAL record format. --> <para> - Simplify <link linkend="wal"><acronym>WAL</></> record format + Simplify <link linkend="wal"><acronym>WAL</acronym></link> record format (Heikki Linnakangas) </para> @@ -8328,7 +8328,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2014-09-25 [b64d92f] Andres..: Add a basic atomic ops API abstracting away pla.. --> <para> - Add atomic memory operations <acronym>API</> (Andres Freund) + Add atomic memory operations <acronym>API</acronym> (Andres Freund) </para> </listitem> @@ -8366,13 +8366,13 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Foreign tables can now take part in <command>INSERT ... ON CONFLICT - DO NOTHING</> queries (Peter Geoghegan, Heikki Linnakangas, + DO NOTHING</command> queries (Peter Geoghegan, Heikki Linnakangas, Andres Freund) </para> <para> Foreign data wrappers must be modified to handle this. - <command>INSERT ... ON CONFLICT DO UPDATE</> is not supported on + <command>INSERT ... ON CONFLICT DO UPDATE</command> is not supported on foreign tables. </para> </listitem> @@ -8382,7 +8382,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2014-12-18 [4a14f13] Tom Lane: Improve hash_create's API for selecting simple-.. --> <para> - Improve <function>hash_create()</>'s API for selecting + Improve <function>hash_create()</function>'s API for selecting simple-binary-key hash functions (Teodor Sigaev, Tom Lane) </para> </listitem> @@ -8403,8 +8403,8 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2014-06-28 [a6d488c] Andres..: Remove Alpha and Tru64 support. --> <para> - Remove <productname>Alpha</> (<acronym>CPU</>) and <systemitem - class="osname">Tru64</> (OS) ports (Andres Freund) + Remove <productname>Alpha</productname> (<acronym>CPU</acronym>) and <systemitem + class="osname">Tru64</systemitem> (OS) ports (Andres Freund) </para> </listitem> @@ -8414,11 +8414,11 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Remove swap-byte-based spinlock implementation for - <acronym>ARM</>v5 and earlier <acronym>CPU</>s (Robert Haas) + <acronym>ARM</acronym>v5 and earlier <acronym>CPU</acronym>s (Robert Haas) </para> <para> - <acronym>ARM</>v5's weak memory ordering made this locking + <acronym>ARM</acronym>v5's weak memory ordering made this locking implementation unsafe. Spinlock support is still possible on newer gcc implementations with atomics support. </para> @@ -8444,10 +8444,10 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Change index operator class for columns <link - linkend="catalog-pg-seclabel"><structname>pg_seclabel</></>.<structname>provider</> + linkend="catalog-pg-seclabel"><structname>pg_seclabel</structname></link>.<structname>provider</structname> and <link - linkend="catalog-pg-shseclabel"><structname>pg_shseclabel</></>.<structname>provider</> - to be <literal>text_pattern_ops</> (Tom Lane) + linkend="catalog-pg-shseclabel"><structname>pg_shseclabel</structname></link>.<structname>provider</structname> + to be <literal>text_pattern_ops</literal> (Tom Lane) </para> <para> @@ -8480,8 +8480,8 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Allow higher-precision time stamp resolution on <systemitem - class="osname">Windows 8</>, <systemitem class="osname">Windows - Server 2012</>, and later Windows systems (Craig Ringer) + class="osname">Windows 8</systemitem>, <systemitem class="osname">Windows + Server 2012</systemitem>, and later Windows systems (Craig Ringer) </para> </listitem> @@ -8490,8 +8490,8 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2015-03-18 [f9dead5] Alvaro..: Install shared libraries to bin/ in Windows un.. --> <para> - Install shared libraries to <filename>bin</> in <systemitem - class="osname">MS Windows</> (Peter Eisentraut, Michael Paquier) + Install shared libraries to <filename>bin</filename> in <systemitem + class="osname">MS Windows</systemitem> (Peter Eisentraut, Michael Paquier) </para> </listitem> @@ -8500,8 +8500,8 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2015-04-16 [22d0053] Alvaro..: MSVC: install src/test/modules together with c.. --> <para> - Install <filename>src/test/modules</> together with - <filename>contrib</> on <productname>MSVC</> builds (Michael + Install <filename>src/test/modules</filename> together with + <filename>contrib</filename> on <productname>MSVC</productname> builds (Michael Paquier) </para> </listitem> @@ -8511,9 +8511,9 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2014-07-12 [8d9a0e8] Magnus..: Support ––with-extra-version equivalent functi.. --> <para> - Allow <link linkend="install-procedure">configure</>'s - <option>--with-extra-version</> option to be honored by the - <productname>MSVC</> build (Michael Paquier) + Allow <link linkend="install-procedure">configure</link>'s + <option>--with-extra-version</option> option to be honored by the + <productname>MSVC</productname> build (Michael Paquier) </para> </listitem> @@ -8522,7 +8522,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2014-07-14 [91f03ba] Noah M..: MSVC: Recognize PGFILEDESC in contrib and conv.. --> <para> - Pass <envar>PGFILEDESC</> into <productname>MSVC</> contrib builds + Pass <envar>PGFILEDESC</envar> into <productname>MSVC</productname> contrib builds (Michael Paquier) </para> </listitem> @@ -8532,8 +8532,8 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2014-07-14 [c4a448e] Noah M..: MSVC: Apply icons to all binaries having them .. --> <para> - Add icons to all <productname>MSVC</>-built binaries and version - information to all <systemitem class="osname">MS Windows</> + Add icons to all <productname>MSVC</productname>-built binaries and version + information to all <systemitem class="osname">MS Windows</systemitem> binaries (Noah Misch) </para> @@ -8548,12 +8548,12 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Add optional-argument support to the internal - <function>getopt_long()</> implementation (Michael Paquier, + <function>getopt_long()</function> implementation (Michael Paquier, Andres Freund) </para> <para> - This is used by the <productname>MSVC</> build. + This is used by the <productname>MSVC</productname> build. </para> </listitem> @@ -8575,7 +8575,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. <para> Add statistics for minimum, maximum, mean, and standard deviation times to <link - linkend="pgstatstatements-columns"><application>pg_stat_statements</></> + linkend="pgstatstatements-columns"><application>pg_stat_statements</application></link> (Mitsumasa Kondo, Andrew Dunstan) </para> </listitem> @@ -8585,8 +8585,8 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2014-10-01 [32984d8] Heikki..: Add functions for dealing with PGP armor heade.. --> <para> - Add <link linkend="pgcrypto"><application>pgcrypto</></> function - <function>pgp_armor_headers()</> to extract <productname>PGP</> + Add <link linkend="pgcrypto"><application>pgcrypto</application></link> function + <function>pgp_armor_headers()</function> to extract <productname>PGP</productname> armor headers (Marko Tiikkaja, Heikki Linnakangas) </para> </listitem> @@ -8597,7 +8597,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Allow empty replacement strings in <link - linkend="unaccent"><application>unaccent</></> (Mohammad Alhashash) + linkend="unaccent"><application>unaccent</application></link> (Mohammad Alhashash) </para> <para> @@ -8612,7 +8612,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Allow multicharacter source strings in <link - linkend="unaccent"><application>unaccent</></> (Tom Lane) + linkend="unaccent"><application>unaccent</application></link> (Tom Lane) </para> <para> @@ -8628,9 +8628,9 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2015-05-15 [149f6f1] Simon ..: TABLESAMPLE system_time(limit) --> <para> - Add <filename>contrib</> modules <link - linkend="tsm-system-rows"><application>tsm_system_rows</></> and - <link linkend="tsm-system-time"><application>tsm_system_time</></> + Add <filename>contrib</filename> modules <link + linkend="tsm-system-rows"><application>tsm_system_rows</application></link> and + <link linkend="tsm-system-time"><application>tsm_system_time</application></link> to allow additional table sampling methods (Petr Jelínek) </para> </listitem> @@ -8640,9 +8640,9 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2014-11-21 [3a82bc6] Heikki..: Add pageinspect functions for inspecting GIN in.. --> <para> - Add <link linkend="GIN"><acronym>GIN</></> + Add <link linkend="GIN"><acronym>GIN</acronym></link> index inspection functions to <link - linkend="pageinspect"><application>pageinspect</></> (Heikki + linkend="pageinspect"><application>pageinspect</application></link> (Heikki Linnakangas, Peter Geoghegan, Michael Paquier) </para> </listitem> @@ -8653,7 +8653,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Add information about buffer pins to <link - linkend="pgbuffercache"><application>pg_buffercache</></> display + linkend="pgbuffercache"><application>pg_buffercache</application></link> display (Andres Freund) </para> </listitem> @@ -8663,9 +8663,9 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2015-05-13 [5850b20] Andres..: Add pgstattuple_approx() to the pgstattuple ext.. --> <para> - Allow <link linkend="pgstattuple"><application>pgstattuple</></> + Allow <link linkend="pgstattuple"><application>pgstattuple</application></link> to report approximate answers with less overhead using - <function>pgstattuple_approx()</> (Abhijit Menon-Sen) + <function>pgstattuple_approx()</function> (Abhijit Menon-Sen) </para> </listitem> @@ -8675,15 +8675,15 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. 2014-12-01 [df761e3] Alvaro..: Move security_label test --> <para> - Move <application>dummy_seclabel</>, <application>test_shm_mq</>, - <application>test_parser</>, and <application>worker_spi</> - from <filename>contrib</> to <filename>src/test/modules</> + Move <application>dummy_seclabel</application>, <application>test_shm_mq</application>, + <application>test_parser</application>, and <application>worker_spi</application> + from <filename>contrib</filename> to <filename>src/test/modules</filename> (Álvaro Herrera) </para> <para> These modules are only meant for server testing, so they do not need - to be built or installed when packaging <productname>PostgreSQL</>. + to be built or installed when packaging <productname>PostgreSQL</productname>. </para> </listitem> diff --git a/doc/src/sgml/release-9.6.sgml b/doc/src/sgml/release-9.6.sgml index 09b6b902547..a89b1b58796 100644 --- a/doc/src/sgml/release-9.6.sgml +++ b/doc/src/sgml/release-9.6.sgml @@ -46,20 +46,20 @@ Branch: REL9_2_STABLE [98e6784aa] 2017-08-15 19:33:04 -0400 --> <para> Show foreign tables - in <structname>information_schema</>.<structname>table_privileges</> + in <structname>information_schema</structname>.<structname>table_privileges</structname> view (Peter Eisentraut) </para> <para> - All other relevant <structname>information_schema</> views include + All other relevant <structname>information_schema</structname> views include foreign tables, but this one ignored them. </para> <para> - Since this view definition is installed by <application>initdb</>, + Since this view definition is installed by <application>initdb</application>, merely upgrading will not fix the problem. If you need to fix this in an existing installation, you can, as a superuser, do this - in <application>psql</>: + in <application>psql</application>: <programlisting> SET search_path TO information_schema; CREATE OR REPLACE VIEW table_privileges AS @@ -98,7 +98,7 @@ CREATE OR REPLACE VIEW table_privileges AS OR grantee.rolname = 'PUBLIC'); </programlisting> This must be repeated in each database to be fixed, - including <literal>template0</>. + including <literal>template0</literal>. </para> </listitem> @@ -114,14 +114,14 @@ Branch: REL9_2_STABLE [8ae41ceae] 2017-08-14 15:43:20 -0400 --> <para> Clean up handling of a fatal exit (e.g., due to receipt - of <systemitem>SIGTERM</>) that occurs while trying to execute - a <command>ROLLBACK</> of a failed transaction (Tom Lane) + of <systemitem>SIGTERM</systemitem>) that occurs while trying to execute + a <command>ROLLBACK</command> of a failed transaction (Tom Lane) </para> <para> This situation could result in an assertion failure. In production builds, the exit would still occur, but it would log an unexpected - message about <quote>cannot drop active portal</>. + message about <quote>cannot drop active portal</quote>. </para> </listitem> @@ -156,7 +156,7 @@ Branch: REL9_2_STABLE [4e704aac1] 2017-08-09 17:03:10 -0400 </para> <para> - Certain <command>ALTER</> commands that change the definition of a + Certain <command>ALTER</command> commands that change the definition of a composite type or domain type are supposed to fail if there are any stored values of that type in the database, because they lack the infrastructure needed to update or check such values. Previously, @@ -189,7 +189,7 @@ Branch: REL9_4_STABLE [59dde9fed] 2017-08-19 13:39:38 -0400 Branch: REL9_3_STABLE [ece4bd901] 2017-08-19 13:39:38 -0400 --> <para> - Fix crash in <application>pg_restore</> when using parallel mode and + Fix crash in <application>pg_restore</application> when using parallel mode and using a list file to select a subset of items to restore (Fabrízio de Royes Mello) </para> @@ -206,13 +206,13 @@ Branch: REL9_3_STABLE [f8bc6b2f6] 2017-08-16 13:30:09 +0200 Branch: REL9_2_STABLE [60b135c82] 2017-08-16 13:30:20 +0200 --> <para> - Change <application>ecpg</>'s parser to allow <literal>RETURNING</> + Change <application>ecpg</application>'s parser to allow <literal>RETURNING</literal> clauses without attached C variables (Michael Meskes) </para> <para> - This allows <application>ecpg</> programs to contain SQL constructs - that use <literal>RETURNING</> internally (for example, inside a CTE) + This allows <application>ecpg</application> programs to contain SQL constructs + that use <literal>RETURNING</literal> internally (for example, inside a CTE) rather than using it to define values to be returned to the client. </para> </listitem> @@ -225,7 +225,7 @@ Branch: REL_10_STABLE [a6b174f55] 2017-08-16 13:27:21 +0200 Branch: REL9_6_STABLE [954490fec] 2017-08-16 13:28:10 +0200 --> <para> - Change <application>ecpg</>'s parser to recognize backslash + Change <application>ecpg</application>'s parser to recognize backslash continuation of C preprocessor command lines (Michael Meskes) </para> </listitem> @@ -253,12 +253,12 @@ Branch: REL9_2_STABLE [f7e4783dd] 2017-08-17 13:15:46 -0400 <para> This fix avoids possible crashes of PL/Perl due to inconsistent - assumptions about the width of <type>time_t</> values. + assumptions about the width of <type>time_t</type> values. A side-effect that may be visible to extension developers is - that <literal>_USE_32BIT_TIME_T</> is no longer defined globally - in <productname>PostgreSQL</> Windows builds. This is not expected - to cause problems, because type <type>time_t</> is not used - in any <productname>PostgreSQL</> API definitions. + that <literal>_USE_32BIT_TIME_T</literal> is no longer defined globally + in <productname>PostgreSQL</productname> Windows builds. This is not expected + to cause problems, because type <type>time_t</type> is not used + in any <productname>PostgreSQL</productname> API definitions. </para> </listitem> @@ -270,7 +270,7 @@ Branch: REL9_6_STABLE [fc2aafe4a] 2017-08-09 12:06:08 -0400 Branch: REL9_5_STABLE [a784d5f21] 2017-08-09 12:06:14 -0400 --> <para> - Fix <literal>make check</> to behave correctly when invoked via a + Fix <literal>make check</literal> to behave correctly when invoked via a non-GNU make program (Thomas Munro) </para> </listitem> @@ -329,7 +329,7 @@ Branch: REL9_2_STABLE [e255e97a2] 2017-08-07 07:09:32 -0700 --> <para> Further restrict visibility - of <structname>pg_user_mappings</>.<structfield>umoptions</>, to + of <structname>pg_user_mappings</structname>.<structfield>umoptions</structfield>, to protect passwords stored as user mapping options (Noah Misch) </para> @@ -337,11 +337,11 @@ Branch: REL9_2_STABLE [e255e97a2] 2017-08-07 07:09:32 -0700 <para> The fix for CVE-2017-7486 was incorrect: it allowed a user to see the options in her own user mapping, even if she did not - have <literal>USAGE</> permission on the associated foreign server. + have <literal>USAGE</literal> permission on the associated foreign server. Such options might include a password that had been provided by the server owner rather than the user herself. - Since <structname>information_schema.user_mapping_options</> does not - show the options in such cases, <structname>pg_user_mappings</> + Since <structname>information_schema.user_mapping_options</structname> does not + show the options in such cases, <structname>pg_user_mappings</structname> should not either. (CVE-2017-7547) </para> @@ -356,15 +356,15 @@ Branch: REL9_2_STABLE [e255e97a2] 2017-08-07 07:09:32 -0700 <step> <para> Restart the postmaster after adding <literal>allow_system_table_mods - = true</> to <filename>postgresql.conf</>. (In versions - supporting <command>ALTER SYSTEM</>, you can use that to make the + = true</literal> to <filename>postgresql.conf</filename>. (In versions + supporting <command>ALTER SYSTEM</command>, you can use that to make the configuration change, but you'll still need a restart.) </para> </step> <step> <para> - In <emphasis>each</> database of the cluster, + In <emphasis>each</emphasis> database of the cluster, run the following commands as superuser: <programlisting> SET search_path = pg_catalog; @@ -395,15 +395,15 @@ CREATE OR REPLACE VIEW pg_user_mappings AS <step> <para> - Do not forget to include the <literal>template0</> - and <literal>template1</> databases, or the vulnerability will still - exist in databases you create later. To fix <literal>template0</>, + Do not forget to include the <literal>template0</literal> + and <literal>template1</literal> databases, or the vulnerability will still + exist in databases you create later. To fix <literal>template0</literal>, you'll need to temporarily make it accept connections. - In <productname>PostgreSQL</> 9.5 and later, you can use + In <productname>PostgreSQL</productname> 9.5 and later, you can use <programlisting> ALTER DATABASE template0 WITH ALLOW_CONNECTIONS true; </programlisting> - and then after fixing <literal>template0</>, undo that with + and then after fixing <literal>template0</literal>, undo that with <programlisting> ALTER DATABASE template0 WITH ALLOW_CONNECTIONS false; </programlisting> @@ -417,7 +417,7 @@ UPDATE pg_database SET datallowconn = false WHERE datname = 'template0'; <step> <para> - Finally, remove the <literal>allow_system_table_mods</> configuration + Finally, remove the <literal>allow_system_table_mods</literal> configuration setting, and again restart the postmaster. </para> </step> @@ -440,16 +440,16 @@ Branch: REL9_2_STABLE [06651648a] 2017-08-07 17:04:17 +0300 </para> <para> - <application>libpq</> ignores empty password specifications, and does + <application>libpq</application> ignores empty password specifications, and does not transmit them to the server. So, if a user's password has been set to the empty string, it's impossible to log in with that password - via <application>psql</> or other <application>libpq</>-based + via <application>psql</application> or other <application>libpq</application>-based clients. An administrator might therefore believe that setting the password to empty is equivalent to disabling password login. - However, with a modified or non-<application>libpq</>-based client, + However, with a modified or non-<application>libpq</application>-based client, logging in could be possible, depending on which authentication method is configured. In particular the most common - method, <literal>md5</>, accepted empty passwords. + method, <literal>md5</literal>, accepted empty passwords. Change the server to reject empty passwords in all cases. (CVE-2017-7546) </para> @@ -464,13 +464,13 @@ Branch: REL9_5_STABLE [873741c68] 2017-08-07 10:19:21 -0400 Branch: REL9_4_STABLE [f1cda6d6c] 2017-08-07 10:19:22 -0400 --> <para> - Make <function>lo_put()</> check for <literal>UPDATE</> privilege on + Make <function>lo_put()</function> check for <literal>UPDATE</literal> privilege on the target large object (Tom Lane, Michael Paquier) </para> <para> - <function>lo_put()</> should surely require the same permissions - as <function>lowrite()</>, but the check was missing, allowing any + <function>lo_put()</function> should surely require the same permissions + as <function>lowrite()</function>, but the check was missing, allowing any user to change the data in a large object. (CVE-2017-7548) </para> @@ -485,12 +485,12 @@ Branch: REL9_5_STABLE [fd376afc9] 2017-06-15 12:30:02 -0400 --> <para> Correct the documentation about the process for upgrading standby - servers with <application>pg_upgrade</> (Bruce Momjian) + servers with <application>pg_upgrade</application> (Bruce Momjian) </para> <para> The previous documentation instructed users to start/stop the primary - server after running <application>pg_upgrade</> but before syncing + server after running <application>pg_upgrade</application> but before syncing the standby servers. This sequence is unsafe. </para> </listitem> @@ -697,7 +697,7 @@ Branch: REL9_2_STABLE [81bf7b5b1] 2017-06-21 14:13:58 -0700 --> <para> Fix possible creation of an invalid WAL segment when a standby is - promoted just after it processes an <literal>XLOG_SWITCH</> WAL + promoted just after it processes an <literal>XLOG_SWITCH</literal> WAL record (Andres Freund) </para> </listitem> @@ -711,7 +711,7 @@ Branch: REL9_5_STABLE [446914f6b] 2017-06-30 12:00:03 -0400 Branch: REL9_4_STABLE [5aa8db014] 2017-06-30 12:00:03 -0400 --> <para> - Fix <application>walsender</> to exit promptly when client requests + Fix <application>walsender</application> to exit promptly when client requests shutdown (Tom Lane) </para> </listitem> @@ -731,7 +731,7 @@ Branch: REL9_3_STABLE [45d067d50] 2017-06-05 19:18:16 -0700 Branch: REL9_2_STABLE [133b1920c] 2017-06-05 19:18:16 -0700 --> <para> - Fix <systemitem>SIGHUP</> and <systemitem>SIGUSR1</> handling in + Fix <systemitem>SIGHUP</systemitem> and <systemitem>SIGUSR1</systemitem> handling in walsender processes (Petr Jelinek, Andres Freund) </para> </listitem> @@ -761,7 +761,7 @@ Branch: REL9_3_STABLE [cb59949f6] 2017-06-26 17:31:56 -0400 Branch: REL9_2_STABLE [e96adaacd] 2017-06-26 17:31:56 -0400 --> <para> - Fix unnecessarily slow restarts of <application>walreceiver</> + Fix unnecessarily slow restarts of <application>walreceiver</application> processes due to race condition in postmaster (Tom Lane) </para> </listitem> @@ -880,7 +880,7 @@ Branch: REL9_3_STABLE [aea1a3f0e] 2017-07-12 18:00:04 -0400 Branch: REL9_2_STABLE [75670ec37] 2017-07-12 18:00:04 -0400 --> <para> - Fix cases where an <command>INSERT</> or <command>UPDATE</> assigns + Fix cases where an <command>INSERT</command> or <command>UPDATE</command> assigns to more than one element of a column that is of domain-over-array type (Tom Lane) </para> @@ -896,7 +896,7 @@ Branch: REL9_4_STABLE [dc777f9db] 2017-06-27 17:51:11 -0400 Branch: REL9_3_STABLE [66dee28b4] 2017-06-27 17:51:11 -0400 --> <para> - Allow window functions to be used in sub-<literal>SELECT</>s that + Allow window functions to be used in sub-<literal>SELECT</literal>s that are within the arguments of an aggregate function (Tom Lane) </para> </listitem> @@ -908,7 +908,7 @@ Branch: master [7086be6e3] 2017-07-24 15:57:24 -0400 Branch: REL9_6_STABLE [971faefc2] 2017-07-24 16:24:42 -0400 --> <para> - Ensure that a view's <literal>CHECK OPTIONS</> clause is enforced + Ensure that a view's <literal>CHECK OPTIONS</literal> clause is enforced properly when the underlying table is a foreign table (Etsuro Fujita) </para> @@ -930,12 +930,12 @@ Branch: REL9_2_STABLE [da9165686] 2017-05-26 15:16:59 -0400 --> <para> Move autogenerated array types out of the way during - <command>ALTER ... RENAME</> (Vik Fearing) + <command>ALTER ... RENAME</command> (Vik Fearing) </para> <para> Previously, we would rename a conflicting autogenerated array type - out of the way during <command>CREATE</>; this fix extends that + out of the way during <command>CREATE</command>; this fix extends that behavior to renaming operations. </para> </listitem> @@ -948,7 +948,7 @@ Branch: REL9_6_STABLE [b35cce914] 2017-05-15 11:33:44 -0400 Branch: REL9_5_STABLE [53a1aa9f9] 2017-05-15 11:33:45 -0400 --> <para> - Fix dangling pointer in <command>ALTER TABLE</> when there is a + Fix dangling pointer in <command>ALTER TABLE</command> when there is a comment on a constraint belonging to the table (David Rowley) </para> @@ -969,8 +969,8 @@ Branch: REL9_3_STABLE [b7d1bc820] 2017-08-03 21:29:36 -0400 Branch: REL9_2_STABLE [22eb38caa] 2017-08-03 21:42:46 -0400 --> <para> - Ensure that <command>ALTER USER ... SET</> accepts all the syntax - variants that <command>ALTER ROLE ... SET</> does (Peter Eisentraut) + Ensure that <command>ALTER USER ... SET</command> accepts all the syntax + variants that <command>ALTER ROLE ... SET</command> does (Peter Eisentraut) </para> </listitem> @@ -981,18 +981,18 @@ Branch: master [86705aa8c] 2017-08-03 13:24:48 -0400 Branch: REL9_6_STABLE [1f220c390] 2017-08-03 13:25:32 -0400 --> <para> - Allow a foreign table's <literal>CHECK</> constraints to be - initially <literal>NOT VALID</> (Amit Langote) + Allow a foreign table's <literal>CHECK</literal> constraints to be + initially <literal>NOT VALID</literal> (Amit Langote) </para> <para> - <command>CREATE TABLE</> silently drops <literal>NOT VALID</> - specifiers for <literal>CHECK</> constraints, reasoning that the + <command>CREATE TABLE</command> silently drops <literal>NOT VALID</literal> + specifiers for <literal>CHECK</literal> constraints, reasoning that the table must be empty so the constraint can be validated immediately. - But this is wrong for <command>CREATE FOREIGN TABLE</>, where there's + But this is wrong for <command>CREATE FOREIGN TABLE</command>, where there's no reason to suppose that the underlying table is empty, and even if it is it's no business of ours to decide that the constraint can be - treated as valid going forward. Skip this <quote>optimization</> for + treated as valid going forward. Skip this <quote>optimization</quote> for foreign tables. </para> </listitem> @@ -1009,14 +1009,14 @@ Branch: REL9_2_STABLE [ac93a78b0] 2017-06-16 11:46:26 +0300 --> <para> Properly update dependency info when changing a datatype I/O - function's argument or return type from <type>opaque</> to the + function's argument or return type from <type>opaque</type> to the correct type (Heikki Linnakangas) </para> <para> - <command>CREATE TYPE</> updates I/O functions declared in this + <command>CREATE TYPE</command> updates I/O functions declared in this long-obsolete style, but it forgot to record a dependency on the - type, allowing a subsequent <command>DROP TYPE</> to leave broken + type, allowing a subsequent <command>DROP TYPE</command> to leave broken function definitions behind. </para> </listitem> @@ -1028,7 +1028,7 @@ Branch: master [34aebcf42] 2017-06-02 19:11:15 -0700 Branch: REL9_6_STABLE [8a7cd781e] 2017-06-02 19:11:23 -0700 --> <para> - Allow parallelism in the query plan when <command>COPY</> copies from + Allow parallelism in the query plan when <command>COPY</command> copies from a query's result (Andres Freund) </para> </listitem> @@ -1044,8 +1044,8 @@ Branch: REL9_3_STABLE [11854dee0] 2017-07-12 22:04:08 +0300 Branch: REL9_2_STABLE [40ba61b44] 2017-07-12 22:04:15 +0300 --> <para> - Reduce memory usage when <command>ANALYZE</> processes - a <type>tsvector</> column (Heikki Linnakangas) + Reduce memory usage when <command>ANALYZE</command> processes + a <type>tsvector</type> column (Heikki Linnakangas) </para> </listitem> @@ -1061,7 +1061,7 @@ Branch: REL9_2_STABLE [798d2321e] 2017-05-21 13:05:17 -0400 --> <para> Fix unnecessary precision loss and sloppy rounding when multiplying - or dividing <type>money</> values by integers or floats (Tom Lane) + or dividing <type>money</type> values by integers or floats (Tom Lane) </para> </listitem> @@ -1077,7 +1077,7 @@ Branch: REL9_2_STABLE [a047270d5] 2017-05-24 15:28:35 -0400 --> <para> Tighten checks for whitespace in functions that parse identifiers, - such as <function>regprocedurein()</> (Tom Lane) + such as <function>regprocedurein()</function> (Tom Lane) </para> <para> @@ -1103,13 +1103,13 @@ Branch: REL9_3_STABLE [0d8f015e7] 2017-07-31 12:38:35 -0400 Branch: REL9_2_STABLE [456c7dff2] 2017-07-31 12:38:35 -0400 --> <para> - Use relevant <literal>#define</> symbols from Perl while - compiling <application>PL/Perl</> (Ashutosh Sharma, Tom Lane) + Use relevant <literal>#define</literal> symbols from Perl while + compiling <application>PL/Perl</application> (Ashutosh Sharma, Tom Lane) </para> <para> This avoids portability problems, typically manifesting as - a <quote>handshake</> mismatch during library load, when working with + a <quote>handshake</quote> mismatch during library load, when working with recent Perl versions. </para> </listitem> @@ -1124,7 +1124,7 @@ Branch: REL9_4_STABLE [1fe1fc449] 2017-06-07 14:04:49 +0300 Branch: REL9_3_STABLE [f2fa0c651] 2017-06-07 14:04:44 +0300 --> <para> - In <application>libpq</>, reset GSS/SASL and SSPI authentication + In <application>libpq</application>, reset GSS/SASL and SSPI authentication state properly after a failed connection attempt (Michael Paquier) </para> @@ -1146,9 +1146,9 @@ Branch: REL9_3_STABLE [6bc710f6d] 2017-05-17 12:24:19 -0400 Branch: REL9_2_STABLE [07477130e] 2017-05-17 12:24:19 -0400 --> <para> - In <application>psql</>, fix failure when <command>COPY FROM STDIN</> + In <application>psql</application>, fix failure when <command>COPY FROM STDIN</command> is ended with a keyboard EOF signal and then another <command>COPY - FROM STDIN</> is attempted (Thomas Munro) + FROM STDIN</command> is attempted (Thomas Munro) </para> <para> @@ -1167,8 +1167,8 @@ Branch: REL9_4_STABLE [b93217653] 2017-08-03 17:36:43 -0400 Branch: REL9_3_STABLE [035bb8222] 2017-08-03 17:36:23 -0400 --> <para> - Fix <application>pg_dump</> and <application>pg_restore</> to - emit <command>REFRESH MATERIALIZED VIEW</> commands last (Tom Lane) + Fix <application>pg_dump</application> and <application>pg_restore</application> to + emit <command>REFRESH MATERIALIZED VIEW</command> commands last (Tom Lane) </para> <para> @@ -1190,8 +1190,8 @@ Branch: REL9_5_STABLE [12f1e523a] 2017-08-03 14:55:17 -0400 Branch: REL9_4_STABLE [69ad12b58] 2017-08-03 14:55:17 -0400 --> <para> - Improve <application>pg_dump</>/<application>pg_restore</>'s - reporting of error conditions originating in <application>zlib</> + Improve <application>pg_dump</application>/<application>pg_restore</application>'s + reporting of error conditions originating in <application>zlib</application> (Vladimir Kunschikov, Álvaro Herrera) </para> </listitem> @@ -1206,7 +1206,7 @@ Branch: REL9_4_STABLE [502ead3d6] 2017-07-22 20:20:10 -0400 Branch: REL9_3_STABLE [68a22bc69] 2017-07-22 20:20:10 -0400 --> <para> - Fix <application>pg_dump</> with the <option>--clean</> option to + Fix <application>pg_dump</application> with the <option>--clean</option> option to drop event triggers as expected (Tom Lane) </para> @@ -1224,8 +1224,8 @@ Branch: master [4500edc7e] 2017-06-28 10:33:57 -0400 Branch: REL9_6_STABLE [a2de017b3] 2017-06-28 10:34:01 -0400 --> <para> - Fix <application>pg_dump</> with the <option>--clean</> option to not - fail when the <literal>public</> schema doesn't exist (Stephen Frost) + Fix <application>pg_dump</application> with the <option>--clean</option> option to not + fail when the <literal>public</literal> schema doesn't exist (Stephen Frost) </para> </listitem> @@ -1240,7 +1240,7 @@ Branch: REL9_3_STABLE [a561254e4] 2017-05-26 12:51:05 -0400 Branch: REL9_2_STABLE [f62e1eff5] 2017-05-26 12:51:06 -0400 --> <para> - Fix <application>pg_dump</> to not emit invalid SQL for an empty + Fix <application>pg_dump</application> to not emit invalid SQL for an empty operator class (Daniel Gustafsson) </para> </listitem> @@ -1256,7 +1256,7 @@ Branch: REL9_3_STABLE [2943c04f7] 2017-06-19 11:03:16 -0400 Branch: REL9_2_STABLE [c10cbf77a] 2017-06-19 11:03:21 -0400 --> <para> - Fix <application>pg_dump</> output to stdout on Windows (Kuntal Ghosh) + Fix <application>pg_dump</application> output to stdout on Windows (Kuntal Ghosh) </para> <para> @@ -1276,14 +1276,14 @@ Branch: REL9_3_STABLE [b6d640047] 2017-07-24 15:16:31 -0400 Branch: REL9_2_STABLE [d9874fde8] 2017-07-24 15:16:31 -0400 --> <para> - Fix <function>pg_get_ruledef()</> to print correct output for - the <literal>ON SELECT</> rule of a view whose columns have been + Fix <function>pg_get_ruledef()</function> to print correct output for + the <literal>ON SELECT</literal> rule of a view whose columns have been renamed (Tom Lane) </para> <para> - In some corner cases, <application>pg_dump</> relies - on <function>pg_get_ruledef()</> to dump views, so that this error + In some corner cases, <application>pg_dump</application> relies + on <function>pg_get_ruledef()</function> to dump views, so that this error could result in dump/reload failures. </para> </listitem> @@ -1299,7 +1299,7 @@ Branch: REL9_3_STABLE [e947838ae] 2017-07-20 11:29:36 -0400 --> <para> Fix dumping of outer joins with empty constraints, such as the result - of a <literal>NATURAL LEFT JOIN</> with no common columns (Tom Lane) + of a <literal>NATURAL LEFT JOIN</literal> with no common columns (Tom Lane) </para> </listitem> @@ -1314,7 +1314,7 @@ Branch: REL9_3_STABLE [0ecc407d9] 2017-07-13 19:24:44 -0400 Branch: REL9_2_STABLE [bccfb1776] 2017-07-13 19:24:44 -0400 --> <para> - Fix dumping of function expressions in the <literal>FROM</> clause in + Fix dumping of function expressions in the <literal>FROM</literal> clause in cases where the expression does not deparse into something that looks like a function call (Tom Lane) </para> @@ -1331,7 +1331,7 @@ Branch: REL9_3_STABLE [f3633689f] 2017-07-14 16:03:23 +0300 Branch: REL9_2_STABLE [4b994a96c] 2017-07-14 16:03:27 +0300 --> <para> - Fix <application>pg_basebackup</> output to stdout on Windows + Fix <application>pg_basebackup</application> output to stdout on Windows (Haribabu Kommi) </para> @@ -1349,12 +1349,12 @@ Branch: REL9_6_STABLE [73fbf3d3d] 2017-07-21 22:04:55 -0400 Branch: REL9_5_STABLE [ed367be64] 2017-07-21 22:05:07 -0400 --> <para> - Fix <application>pg_rewind</> to correctly handle files exceeding 2GB + Fix <application>pg_rewind</application> to correctly handle files exceeding 2GB (Kuntal Ghosh, Michael Paquier) </para> <para> - Ordinarily such files won't appear in <productname>PostgreSQL</> data + Ordinarily such files won't appear in <productname>PostgreSQL</productname> data directories, but they could be present in some cases. </para> </listitem> @@ -1370,8 +1370,8 @@ Branch: REL9_3_STABLE [5c890645d] 2017-06-20 13:20:02 -0400 Branch: REL9_2_STABLE [65beccae5] 2017-06-20 13:20:02 -0400 --> <para> - Fix <application>pg_upgrade</> to ensure that the ending WAL record - does not have <xref linkend="guc-wal-level"> = <literal>minimum</> + Fix <application>pg_upgrade</application> to ensure that the ending WAL record + does not have <xref linkend="guc-wal-level"> = <literal>minimum</literal> (Bruce Momjian) </para> @@ -1389,7 +1389,7 @@ Branch: REL9_6_STABLE [d3ca4b4b4] 2017-06-05 16:10:07 -0700 Branch: REL9_5_STABLE [25653c171] 2017-06-05 16:10:07 -0700 --> <para> - Fix <application>pg_xlogdump</>'s computation of WAL record length + Fix <application>pg_xlogdump</application>'s computation of WAL record length (Andres Freund) </para> </listitem> @@ -1409,9 +1409,9 @@ Branch: REL9_4_STABLE [a648fc70a] 2017-07-21 14:20:43 -0400 Branch: REL9_3_STABLE [6d9de660d] 2017-07-21 14:20:43 -0400 --> <para> - In <filename>postgres_fdw</>, re-establish connections to remote - servers after <command>ALTER SERVER</> or <command>ALTER USER - MAPPING</> commands (Kyotaro Horiguchi) + In <filename>postgres_fdw</filename>, re-establish connections to remote + servers after <command>ALTER SERVER</command> or <command>ALTER USER + MAPPING</command> commands (Kyotaro Horiguchi) </para> <para> @@ -1430,7 +1430,7 @@ Branch: REL9_4_STABLE [c02c450cf] 2017-06-07 15:40:35 -0400 Branch: REL9_3_STABLE [fc267a0c3] 2017-06-07 15:41:05 -0400 --> <para> - In <filename>postgres_fdw</>, allow cancellation of remote + In <filename>postgres_fdw</filename>, allow cancellation of remote transaction control commands (Robert Haas, Rafia Sabih) </para> @@ -1449,7 +1449,7 @@ Branch: REL9_5_STABLE [6f2fe2468] 2017-05-11 14:51:38 -0400 Branch: REL9_4_STABLE [5c633f76b] 2017-05-11 14:51:46 -0400 --> <para> - Increase <literal>MAX_SYSCACHE_CALLBACKS</> to provide more room for + Increase <literal>MAX_SYSCACHE_CALLBACKS</literal> to provide more room for extensions (Tom Lane) </para> </listitem> @@ -1465,7 +1465,7 @@ Branch: REL9_3_STABLE [cee7238de] 2017-06-01 13:32:56 -0400 Branch: REL9_2_STABLE [a378b9bc2] 2017-06-01 13:32:56 -0400 --> <para> - Always use <option>-fPIC</>, not <option>-fpic</>, when building + Always use <option>-fPIC</option>, not <option>-fpic</option>, when building shared libraries with gcc (Tom Lane) </para> @@ -1492,8 +1492,8 @@ Branch: REL9_3_STABLE [da30fa603] 2017-06-05 20:40:47 -0400 Branch: REL9_2_STABLE [f964a7c5a] 2017-06-05 20:41:01 -0400 --> <para> - In MSVC builds, handle the case where the <application>openssl</> - library is not within a <filename>VC</> subdirectory (Andrew Dunstan) + In MSVC builds, handle the case where the <application>openssl</application> + library is not within a <filename>VC</filename> subdirectory (Andrew Dunstan) </para> </listitem> @@ -1508,13 +1508,13 @@ Branch: REL9_3_STABLE [2c7d2114b] 2017-05-12 10:24:16 -0400 Branch: REL9_2_STABLE [614f83c12] 2017-05-12 10:24:36 -0400 --> <para> - In MSVC builds, add proper include path for <application>libxml2</> + In MSVC builds, add proper include path for <application>libxml2</application> header files (Andrew Dunstan) </para> <para> This fixes a former need to move things around in standard Windows - installations of <application>libxml2</>. + installations of <application>libxml2</application>. </para> </listitem> @@ -1530,7 +1530,7 @@ Branch: REL9_2_STABLE [4885e5c88] 2017-07-23 23:53:55 -0700 --> <para> In MSVC builds, recognize a Tcl library that is - named <filename>tcl86.lib</> (Noah Misch) + named <filename>tcl86.lib</filename> (Noah Misch) </para> </listitem> @@ -1551,8 +1551,8 @@ Branch: REL9_5_STABLE [7eb4124da] 2017-07-16 11:27:07 -0400 Branch: REL9_4_STABLE [9c3f502b4] 2017-07-16 11:27:15 -0400 --> <para> - In MSVC builds, honor <literal>PROVE_FLAGS</> settings - on <filename>vcregress.pl</>'s command line (Andrew Dunstan) + In MSVC builds, honor <literal>PROVE_FLAGS</literal> settings + on <filename>vcregress.pl</filename>'s command line (Andrew Dunstan) </para> </listitem> @@ -1589,7 +1589,7 @@ Branch: REL9_4_STABLE [9c3f502b4] 2017-07-16 11:27:15 -0400 <para> Also, if you are using third-party replication tools that depend - on <quote>logical decoding</>, see the fourth changelog entry below. + on <quote>logical decoding</quote>, see the fourth changelog entry below. </para> <para> @@ -1615,18 +1615,18 @@ Branch: REL9_2_STABLE [99cbb0bd9] 2017-05-08 07:24:28 -0700 --> <para> Restrict visibility - of <structname>pg_user_mappings</>.<structfield>umoptions</>, to + of <structname>pg_user_mappings</structname>.<structfield>umoptions</structfield>, to protect passwords stored as user mapping options (Michael Paquier, Feike Steenbergen) </para> <para> The previous coding allowed the owner of a foreign server object, - or anyone he has granted server <literal>USAGE</> permission to, + or anyone he has granted server <literal>USAGE</literal> permission to, to see the options for all user mappings associated with that server. This might well include passwords for other users. Adjust the view definition to match the behavior of - <structname>information_schema.user_mapping_options</>, namely that + <structname>information_schema.user_mapping_options</structname>, namely that these options are visible to the user being mapped, or if the mapping is for <literal>PUBLIC</literal> and the current user is the server owner, or if the current user is a superuser. @@ -1665,7 +1665,7 @@ Branch: REL9_3_STABLE [703da1795] 2017-05-08 11:19:08 -0400 <para> Some selectivity estimation functions in the planner will apply user-defined operators to values obtained - from <structname>pg_statistic</>, such as most common values and + from <structname>pg_statistic</structname>, such as most common values and histogram entries. This occurs before table permissions are checked, so a nefarious user could exploit the behavior to obtain these values for table columns he does not have permission to read. To fix, @@ -1687,17 +1687,17 @@ Branch: REL9_4_STABLE [ed36c1fe1] 2017-05-08 07:24:27 -0700 Branch: REL9_3_STABLE [3eab81127] 2017-05-08 07:24:28 -0700 --> <para> - Restore <application>libpq</>'s recognition of - the <envar>PGREQUIRESSL</> environment variable (Daniel Gustafsson) + Restore <application>libpq</application>'s recognition of + the <envar>PGREQUIRESSL</envar> environment variable (Daniel Gustafsson) </para> <para> Processing of this environment variable was unintentionally dropped - in <productname>PostgreSQL</> 9.3, but its documentation remained. + in <productname>PostgreSQL</productname> 9.3, but its documentation remained. This creates a security hazard, since users might be relying on the environment variable to force SSL-encrypted connections, but that would no longer be guaranteed. Restore handling of the variable, - but give it lower priority than <envar>PGSSLMODE</>, to avoid + but give it lower priority than <envar>PGSSLMODE</envar>, to avoid breaking configurations that work correctly with post-9.3 code. (CVE-2017-7485) </para> @@ -1748,7 +1748,7 @@ Branch: REL9_3_STABLE [6bd7816e7] 2017-03-14 12:08:14 -0400 Branch: REL9_2_STABLE [b2ae1d6c4] 2017-03-14 12:10:36 -0400 --> <para> - Fix possible corruption of <quote>init forks</> of unlogged indexes + Fix possible corruption of <quote>init forks</quote> of unlogged indexes (Robert Haas, Michael Paquier) </para> @@ -1770,7 +1770,7 @@ Branch: REL9_3_STABLE [856580873] 2017-04-23 13:10:57 -0400 Branch: REL9_2_STABLE [952e33b05] 2017-04-23 13:10:58 -0400 --> <para> - Fix incorrect reconstruction of <structname>pg_subtrans</> entries + Fix incorrect reconstruction of <structname>pg_subtrans</structname> entries when a standby server replays a prepared but uncommitted two-phase transaction (Tom Lane) </para> @@ -1778,7 +1778,7 @@ Branch: REL9_2_STABLE [952e33b05] 2017-04-23 13:10:58 -0400 <para> In most cases this turned out to have no visible ill effects, but in corner cases it could result in circular references - in <structname>pg_subtrans</>, potentially causing infinite loops + in <structname>pg_subtrans</structname>, potentially causing infinite loops in queries that examine rows modified by the two-phase transaction. </para> </listitem> @@ -1792,7 +1792,7 @@ Branch: REL9_5_STABLE [feb659cce] 2017-02-22 08:29:44 +0900 Branch: REL9_4_STABLE [a3eb715a3] 2017-02-22 08:29:57 +0900 --> <para> - Avoid possible crash in <application>walsender</> due to failure + Avoid possible crash in <application>walsender</application> due to failure to initialize a string buffer (Stas Kelvich, Fujii Masao) </para> </listitem> @@ -1840,7 +1840,7 @@ Branch: REL9_5_STABLE [dba1f310a] 2017-04-24 12:16:58 -0400 Branch: REL9_4_STABLE [436b560b8] 2017-04-24 12:16:58 -0400 --> <para> - Fix postmaster's handling of <function>fork()</> failure for a + Fix postmaster's handling of <function>fork()</function> failure for a background worker process (Tom Lane) </para> @@ -1858,7 +1858,7 @@ Branch: master [89deca582] 2017-04-07 12:18:38 -0400 Branch: REL9_6_STABLE [c0a493e17] 2017-04-07 12:18:38 -0400 --> <para> - Fix possible <quote>no relation entry for relid 0</> error when + Fix possible <quote>no relation entry for relid 0</quote> error when planning nested set operations (Tom Lane) </para> </listitem> @@ -1886,7 +1886,7 @@ Branch: REL9_6_STABLE [6c73b390b] 2017-04-17 15:29:00 -0400 Branch: REL9_5_STABLE [6f0f98bb0] 2017-04-17 15:29:00 -0400 --> <para> - Avoid applying <quote>physical targetlist</> optimization to custom + Avoid applying <quote>physical targetlist</quote> optimization to custom scans (Dmitry Ivanov, Tom Lane) </para> @@ -1905,13 +1905,13 @@ Branch: REL9_6_STABLE [92b15224b] 2017-05-06 21:46:41 -0400 Branch: REL9_5_STABLE [d617c7629] 2017-05-06 21:46:56 -0400 --> <para> - Use the correct sub-expression when applying a <literal>FOR ALL</> + Use the correct sub-expression when applying a <literal>FOR ALL</literal> row-level-security policy (Stephen Frost) </para> <para> - In some cases the <literal>WITH CHECK</> restriction would be applied - when the <literal>USING</> restriction is more appropriate. + In some cases the <literal>WITH CHECK</literal> restriction would be applied + when the <literal>USING</literal> restriction is more appropriate. </para> </listitem> @@ -1934,7 +1934,7 @@ Branch: REL9_2_STABLE [c9d6c564f] 2017-05-02 18:05:54 -0400 Due to lack of a cache flush step between commands in an extension script file, non-utility queries might not see the effects of an immediately preceding catalog change, such as <command>ALTER TABLE - ... RENAME</>. + ... RENAME</command>. </para> </listitem> @@ -1950,12 +1950,12 @@ Branch: REL9_2_STABLE [27a8c8033] 2017-02-12 16:05:23 -0500 --> <para> Skip tablespace privilege checks when <command>ALTER TABLE ... ALTER - COLUMN TYPE</> rebuilds an existing index (Noah Misch) + COLUMN TYPE</command> rebuilds an existing index (Noah Misch) </para> <para> The command failed if the calling user did not currently have - <literal>CREATE</> privilege for the tablespace containing the index. + <literal>CREATE</literal> privilege for the tablespace containing the index. That behavior seems unhelpful, so skip the check, allowing the index to be rebuilt where it is. </para> @@ -1972,13 +1972,13 @@ Branch: REL9_3_STABLE [954744f7a] 2017-04-28 14:53:56 -0400 Branch: REL9_2_STABLE [f60f0c8fe] 2017-04-28 14:55:42 -0400 --> <para> - Fix <command>ALTER TABLE ... VALIDATE CONSTRAINT</> to not recurse - to child tables when the constraint is marked <literal>NO INHERIT</> + Fix <command>ALTER TABLE ... VALIDATE CONSTRAINT</command> to not recurse + to child tables when the constraint is marked <literal>NO INHERIT</literal> (Amit Langote) </para> <para> - This fix prevents unwanted <quote>constraint does not exist</> failures + This fix prevents unwanted <quote>constraint does not exist</quote> failures when no matching constraint is present in the child tables. </para> </listitem> @@ -1991,7 +1991,7 @@ Branch: REL9_6_STABLE [943140d57] 2017-03-06 16:50:47 -0500 Branch: REL9_5_STABLE [420d9ec0a] 2017-03-06 16:50:47 -0500 --> <para> - Avoid dangling pointer in <command>COPY ... TO</> when row-level + Avoid dangling pointer in <command>COPY ... TO</command> when row-level security is active for the source table (Tom Lane) </para> @@ -2009,8 +2009,8 @@ Branch: REL9_6_STABLE [68f7b91e5] 2017-03-04 16:09:33 -0500 Branch: REL9_5_STABLE [807df31d1] 2017-03-04 16:09:33 -0500 --> <para> - Avoid accessing an already-closed relcache entry in <command>CLUSTER</> - and <command>VACUUM FULL</> (Tom Lane) + Avoid accessing an already-closed relcache entry in <command>CLUSTER</command> + and <command>VACUUM FULL</command> (Tom Lane) </para> <para> @@ -2032,14 +2032,14 @@ Branch: master [64ae420b2] 2017-03-17 14:35:54 +0000 Branch: REL9_6_STABLE [733488dc6] 2017-03-17 14:46:15 +0000 --> <para> - Fix <command>VACUUM</> to account properly for pages that could not + Fix <command>VACUUM</command> to account properly for pages that could not be scanned due to conflicting page pins (Andrew Gierth) </para> <para> This tended to lead to underestimation of the number of tuples in the table. In the worst case of a small heavily-contended - table, <command>VACUUM</> could incorrectly report that the table + table, <command>VACUUM</command> could incorrectly report that the table contained no tuples, leading to very bad planning choices. </para> </listitem> @@ -2067,13 +2067,13 @@ Branch: master [d5286aa90] 2017-03-21 16:23:10 +0300 Branch: REL9_6_STABLE [a4d07d2e9] 2017-03-21 16:24:10 +0300 --> <para> - Fix incorrect support for certain <type>box</> operators in SP-GiST + Fix incorrect support for certain <type>box</type> operators in SP-GiST (Nikita Glukhov) </para> <para> - SP-GiST index scans using the operators <literal>&<</> - <literal>&></> <literal>&<|</> and <literal>|&></> + SP-GiST index scans using the operators <literal>&<</literal> + <literal>&></literal> <literal>&<|</literal> and <literal>|&></literal> would yield incorrect answers. </para> </listitem> @@ -2087,12 +2087,12 @@ Branch: REL9_5_STABLE [d68a2b20a] 2017-04-05 23:51:28 -0400 Branch: REL9_4_STABLE [8851bcf88] 2017-04-05 23:51:28 -0400 --> <para> - Fix integer-overflow problems in <type>interval</> comparison (Kyotaro + Fix integer-overflow problems in <type>interval</type> comparison (Kyotaro Horiguchi, Tom Lane) </para> <para> - The comparison operators for type <type>interval</> could yield wrong + The comparison operators for type <type>interval</type> could yield wrong answers for intervals larger than about 296000 years. Indexes on columns containing such large values should be reindexed, since they may be corrupt. @@ -2110,13 +2110,13 @@ Branch: REL9_3_STABLE [6e86b448f] 2017-05-04 21:31:12 -0400 Branch: REL9_2_STABLE [a48d47908] 2017-05-04 22:39:23 -0400 --> <para> - Fix <function>cursor_to_xml()</> to produce valid output - with <replaceable>tableforest</> = false + Fix <function>cursor_to_xml()</function> to produce valid output + with <replaceable>tableforest</replaceable> = false (Thomas Munro, Peter Eisentraut) </para> <para> - Previously it failed to produce a wrapping <literal><table></> + Previously it failed to produce a wrapping <literal><table></literal> element. </para> </listitem> @@ -2134,8 +2134,8 @@ Branch: REL9_5_STABLE [cf73c6bfc] 2017-02-09 15:49:57 -0500 Branch: REL9_4_STABLE [86ef376bb] 2017-02-09 15:49:58 -0500 --> <para> - Fix roundoff problems in <function>float8_timestamptz()</> - and <function>make_interval()</> (Tom Lane) + Fix roundoff problems in <function>float8_timestamptz()</function> + and <function>make_interval()</function> (Tom Lane) </para> <para> @@ -2155,7 +2155,7 @@ Branch: REL9_6_STABLE [1ec36a9eb] 2017-04-16 20:49:40 -0400 Branch: REL9_5_STABLE [b6e6ae1dc] 2017-04-16 20:50:31 -0400 --> <para> - Fix <function>pg_get_object_address()</> to handle members of operator + Fix <function>pg_get_object_address()</function> to handle members of operator families correctly (Álvaro Herrera) </para> </listitem> @@ -2167,12 +2167,12 @@ Branch: master [78874531b] 2017-03-24 13:53:40 +0300 Branch: REL9_6_STABLE [8de6278d3] 2017-03-24 13:55:02 +0300 --> <para> - Fix cancelling of <function>pg_stop_backup()</> when attempting to stop + Fix cancelling of <function>pg_stop_backup()</function> when attempting to stop a non-exclusive backup (Michael Paquier, David Steele) </para> <para> - If <function>pg_stop_backup()</> was cancelled while waiting for a + If <function>pg_stop_backup()</function> was cancelled while waiting for a non-exclusive backup to end, related state was left inconsistent; a new exclusive backup could not be started, and there were other minor problems. @@ -2196,7 +2196,7 @@ Branch: REL9_3_STABLE [07987304d] 2017-05-07 11:35:05 -0400 Branch: REL9_2_STABLE [9061680f0] 2017-05-07 11:35:11 -0400 --> <para> - Improve performance of <structname>pg_timezone_names</> view + Improve performance of <structname>pg_timezone_names</structname> view (Tom Lane, David Rowley) </para> </listitem> @@ -2226,13 +2226,13 @@ Branch: REL9_3_STABLE [3f613c6a4] 2017-02-21 17:51:28 -0500 Branch: REL9_2_STABLE [775227590] 2017-02-21 17:51:28 -0500 --> <para> - Fix sloppy handling of corner-case errors from <function>lseek()</> - and <function>close()</> (Tom Lane) + Fix sloppy handling of corner-case errors from <function>lseek()</function> + and <function>close()</function> (Tom Lane) </para> <para> Neither of these system calls are likely to fail in typical situations, - but if they did, <filename>fd.c</> could get quite confused. + but if they did, <filename>fd.c</filename> could get quite confused. </para> </listitem> @@ -2273,8 +2273,8 @@ Branch: REL9_3_STABLE [04207ef76] 2017-03-13 20:52:05 +0100 Branch: REL9_2_STABLE [d8c207437] 2017-03-13 20:52:16 +0100 --> <para> - Fix <application>ecpg</> to support <command>COMMIT PREPARED</> - and <command>ROLLBACK PREPARED</> (Masahiko Sawada) + Fix <application>ecpg</application> to support <command>COMMIT PREPARED</command> + and <command>ROLLBACK PREPARED</command> (Masahiko Sawada) </para> </listitem> @@ -2290,7 +2290,7 @@ Branch: REL9_2_STABLE [731afc91f] 2017-03-10 10:52:01 +0100 --> <para> Fix a double-free error when processing dollar-quoted string literals - in <application>ecpg</> (Michael Meskes) + in <application>ecpg</application> (Michael Meskes) </para> </listitem> @@ -2300,8 +2300,8 @@ Author: Teodor Sigaev <teodor@sigaev.ru> Branch: REL9_6_STABLE [2ed391f95] 2017-03-24 19:23:13 +0300 --> <para> - Fix <application>pgbench</> to handle the combination - of <option>--connect</> and <option>--rate</> options correctly + Fix <application>pgbench</application> to handle the combination + of <option>--connect</option> and <option>--rate</option> options correctly (Fabien Coelho) </para> </listitem> @@ -2313,8 +2313,8 @@ Branch: master [ef2662394] 2017-03-07 11:36:42 -0500 Branch: REL9_6_STABLE [0e2c85d13] 2017-03-07 11:36:35 -0500 --> <para> - Fix <application>pgbench</> to honor the long-form option - spelling <option>--builtin</>, as per its documentation (Tom Lane) + Fix <application>pgbench</application> to honor the long-form option + spelling <option>--builtin</option>, as per its documentation (Tom Lane) </para> </listitem> @@ -2325,15 +2325,15 @@ Branch: master [330b84d8c] 2017-03-06 23:29:02 -0500 Branch: REL9_6_STABLE [e961341cc] 2017-03-06 23:29:08 -0500 --> <para> - Fix <application>pg_dump</>/<application>pg_restore</> to correctly - handle privileges for the <literal>public</> schema when - using <option>--clean</> option (Stephen Frost) + Fix <application>pg_dump</application>/<application>pg_restore</application> to correctly + handle privileges for the <literal>public</literal> schema when + using <option>--clean</option> option (Stephen Frost) </para> <para> Other schemas start out with no privileges granted, - but <literal>public</> does not; this requires special-case treatment - when it is dropped and restored due to the <option>--clean</> option. + but <literal>public</literal> does not; this requires special-case treatment + when it is dropped and restored due to the <option>--clean</option> option. </para> </listitem> @@ -2348,7 +2348,7 @@ Branch: REL9_3_STABLE [783acfd4d] 2017-03-06 19:33:59 -0500 Branch: REL9_2_STABLE [0ab75448e] 2017-03-06 19:33:59 -0500 --> <para> - In <application>pg_dump</>, fix incorrect schema and owner marking for + In <application>pg_dump</application>, fix incorrect schema and owner marking for comments and security labels of some types of database objects (Giuseppe Broccolo, Tom Lane) </para> @@ -2368,12 +2368,12 @@ Branch: master [39370e6a0] 2017-02-17 15:06:28 -0500 Branch: REL9_6_STABLE [4e8b2fd33] 2017-02-17 15:06:34 -0500 --> <para> - Fix typo in <application>pg_dump</>'s query for initial privileges + Fix typo in <application>pg_dump</application>'s query for initial privileges of a procedural language (Peter Eisentraut) </para> <para> - This resulted in <application>pg_dump</> always believing that the + This resulted in <application>pg_dump</application> always believing that the language had no initial privileges. Since that's true for most procedural languages, ill effects from this bug are probably rare. </para> @@ -2390,13 +2390,13 @@ Branch: REL9_3_STABLE [0c0a95c2f] 2017-03-10 14:15:09 -0500 Branch: REL9_2_STABLE [e6d2ba419] 2017-03-10 14:15:09 -0500 --> <para> - Avoid emitting an invalid list file in <literal>pg_restore -l</> + Avoid emitting an invalid list file in <literal>pg_restore -l</literal> when SQL object names contain newlines (Tom Lane) </para> <para> Replace newlines by spaces, which is sufficient to make the output - valid for <literal>pg_restore -L</>'s purposes. + valid for <literal>pg_restore -L</literal>'s purposes. </para> </listitem> @@ -2411,8 +2411,8 @@ Branch: REL9_3_STABLE [7f831f09b] 2017-03-06 17:04:29 -0500 Branch: REL9_2_STABLE [e864cd25b] 2017-03-06 17:04:55 -0500 --> <para> - Fix <application>pg_upgrade</> to transfer comments and security labels - attached to <quote>large objects</> (blobs) (Stephen Frost) + Fix <application>pg_upgrade</application> to transfer comments and security labels + attached to <quote>large objects</quote> (blobs) (Stephen Frost) </para> <para> @@ -2433,13 +2433,13 @@ Branch: REL9_2_STABLE [0276da5eb] 2017-03-12 19:36:28 -0400 --> <para> Improve error handling - in <filename>contrib/adminpack</>'s <function>pg_file_write()</> + in <filename>contrib/adminpack</filename>'s <function>pg_file_write()</function> function (Noah Misch) </para> <para> Notably, it failed to detect errors reported - by <function>fclose()</>. + by <function>fclose()</function>. </para> </listitem> @@ -2454,7 +2454,7 @@ Branch: REL9_3_STABLE [f6cfc14e5] 2017-03-11 13:33:22 -0800 Branch: REL9_2_STABLE [c4613c3f4] 2017-03-11 13:33:30 -0800 --> <para> - In <filename>contrib/dblink</>, avoid leaking the previous unnamed + In <filename>contrib/dblink</filename>, avoid leaking the previous unnamed connection when establishing a new unnamed connection (Joe Conway) </para> </listitem> @@ -2479,7 +2479,7 @@ Branch: REL9_4_STABLE [b179684c7] 2017-04-13 17:18:35 -0400 Branch: REL9_3_STABLE [5be58cc89] 2017-04-13 17:18:35 -0400 --> <para> - Fix <filename>contrib/pg_trgm</>'s extraction of trigrams from regular + Fix <filename>contrib/pg_trgm</filename>'s extraction of trigrams from regular expressions (Tom Lane) </para> @@ -2497,7 +2497,7 @@ Branch: master [332bec1e6] 2017-04-24 22:50:07 -0400 Branch: REL9_6_STABLE [86e640a69] 2017-04-26 09:14:21 -0400 --> <para> - In <filename>contrib/postgres_fdw</>, allow join conditions that + In <filename>contrib/postgres_fdw</filename>, allow join conditions that contain shippable extension-provided functions to be pushed to the remote server (David Rowley, Ashutosh Bapat) </para> @@ -2555,7 +2555,7 @@ Branch: REL9_3_STABLE [dc93cafca] 2017-05-01 11:54:02 -0400 Branch: REL9_2_STABLE [c96ccc40e] 2017-05-01 11:54:08 -0400 --> <para> - Update time zone data files to <application>tzdata</> release 2017b + Update time zone data files to <application>tzdata</application> release 2017b for DST law changes in Chile, Haiti, and Mongolia, plus historical corrections for Ecuador, Kazakhstan, Liberia, and Spain. Switch to numeric abbreviations for numerous time zones in South @@ -2569,9 +2569,9 @@ Branch: REL9_2_STABLE [c96ccc40e] 2017-05-01 11:54:08 -0400 or no currency among the local population. They are in process of reversing that policy in favor of using numeric UTC offsets in zones where there is no evidence of real-world use of an English - abbreviation. At least for the time being, <productname>PostgreSQL</> + abbreviation. At least for the time being, <productname>PostgreSQL</productname> will continue to accept such removed abbreviations for timestamp input. - But they will not be shown in the <structname>pg_timezone_names</> + But they will not be shown in the <structname>pg_timezone_names</structname> view nor used for output. </para> </listitem> @@ -2593,15 +2593,15 @@ Branch: REL9_2_STABLE [82e7d3dfd] 2017-05-07 11:57:41 -0400 <para> The Microsoft MSVC build scripts neglected to install - the <filename>posixrules</> file in the timezone directory tree. + the <filename>posixrules</filename> file in the timezone directory tree. This resulted in the timezone code falling back to its built-in rule about what DST behavior to assume for a POSIX-style time zone name. For historical reasons that still corresponds to the DST rules the USA was using before 2007 (i.e., change on first Sunday in April and last Sunday in October). With this fix, a POSIX-style zone name will use the current and historical DST transition dates of - the <literal>US/Eastern</> zone. If you don't want that, remove - the <filename>posixrules</> file, or replace it with a copy of some + the <literal>US/Eastern</literal> zone. If you don't want that, remove + the <filename>posixrules</filename> file, or replace it with a copy of some other zone file (see <xref linkend="datatype-timezones">). Note that due to caching, you may need to restart the server to get such changes to take effect. @@ -2663,15 +2663,15 @@ Branch: REL9_2_STABLE [bcd7b47c2] 2017-02-06 13:20:25 -0500 --> <para> Fix a race condition that could cause indexes built - with <command>CREATE INDEX CONCURRENTLY</> to be corrupt + with <command>CREATE INDEX CONCURRENTLY</command> to be corrupt (Pavan Deolasee, Tom Lane) </para> <para> - If <command>CREATE INDEX CONCURRENTLY</> was used to build an index + If <command>CREATE INDEX CONCURRENTLY</command> was used to build an index that depends on a column not previously indexed, then rows updated by transactions that ran concurrently with - the <command>CREATE INDEX</> command could have received incorrect + the <command>CREATE INDEX</command> command could have received incorrect index entries. If you suspect this may have happened, the most reliable solution is to rebuild affected indexes after installing this update. @@ -2695,7 +2695,7 @@ Branch: REL9_4_STABLE [3e844a34b] 2016-11-15 15:55:36 -0500 Backends failed to account for this snapshot when advertising their oldest xmin, potentially allowing concurrent vacuuming operations to remove data that was still needed. This led to transient failures - along the lines of <quote>cache lookup failed for relation 1255</>. + along the lines of <quote>cache lookup failed for relation 1255</quote>. </para> </listitem> @@ -2711,7 +2711,7 @@ Branch: REL9_5_STABLE [ed8e8b814] 2017-01-09 18:19:29 -0300 </para> <para> - The WAL record emitted for a BRIN <quote>revmap</> page when moving an + The WAL record emitted for a BRIN <quote>revmap</quote> page when moving an index tuple to a different page was incorrect. Replay would make the related portion of the index useless, forcing it to be recomputed. </para> @@ -2728,13 +2728,13 @@ Branch: REL9_3_STABLE [8e403f215] 2016-12-08 14:16:47 -0500 Branch: REL9_2_STABLE [a00ac6299] 2016-12-08 14:19:25 -0500 --> <para> - Unconditionally WAL-log creation of the <quote>init fork</> for an + Unconditionally WAL-log creation of the <quote>init fork</quote> for an unlogged table (Michael Paquier) </para> <para> Previously, this was skipped when <xref linkend="guc-wal-level"> - = <literal>minimal</>, but actually it's necessary even in that case + = <literal>minimal</literal>, but actually it's necessary even in that case to ensure that the unlogged table is properly reset to empty after a crash. </para> @@ -2816,7 +2816,7 @@ Branch: master [93eb619cd] 2016-12-17 02:22:15 +0900 Branch: REL9_6_STABLE [6c75fb6b3] 2016-12-17 02:25:47 +0900 --> <para> - Disallow setting the <replaceable>num_sync</> field to zero in + Disallow setting the <replaceable>num_sync</replaceable> field to zero in <xref linkend="guc-synchronous-standby-names"> (Fujii Masao) </para> @@ -2867,7 +2867,7 @@ Branch: REL9_6_STABLE [20064c0ec] 2017-01-29 23:05:09 -0500 --> <para> Fix tracking of initial privileges for extension member objects so - that it works correctly with <command>ALTER EXTENSION ... ADD/DROP</> + that it works correctly with <command>ALTER EXTENSION ... ADD/DROP</command> (Stephen Frost) </para> @@ -2875,7 +2875,7 @@ Branch: REL9_6_STABLE [20064c0ec] 2017-01-29 23:05:09 -0500 An object's current privileges at the time it is added to the extension will now be considered its default privileges; only later changes in its privileges will be dumped by - subsequent <application>pg_dump</> runs. + subsequent <application>pg_dump</application> runs. </para> </listitem> @@ -2890,7 +2890,7 @@ Branch: REL9_3_STABLE [8f67a6c22] 2016-11-23 13:45:56 -0500 Branch: REL9_2_STABLE [05975ab0a] 2016-11-23 13:45:56 -0500 --> <para> - Make sure <command>ALTER TABLE</> preserves index tablespace + Make sure <command>ALTER TABLE</command> preserves index tablespace assignments when rebuilding indexes (Tom Lane, Michael Paquier) </para> @@ -2912,7 +2912,7 @@ Branch: REL9_4_STABLE [3a9a8c408] 2016-10-26 17:05:06 -0400 <para> Fix incorrect updating of trigger function properties when changing a foreign-key constraint's deferrability properties with <command>ALTER - TABLE ... ALTER CONSTRAINT</> (Tom Lane) + TABLE ... ALTER CONSTRAINT</command> (Tom Lane) </para> <para> @@ -2937,8 +2937,8 @@ Branch: REL9_2_STABLE [6a363a4c2] 2016-11-25 13:44:48 -0500 </para> <para> - This avoids <quote>could not find trigger <replaceable>NNN</></quote> - or <quote>relation <replaceable>NNN</> has no triggers</quote> errors. + This avoids <quote>could not find trigger <replaceable>NNN</replaceable></quote> + or <quote>relation <replaceable>NNN</replaceable> has no triggers</quote> errors. </para> </listitem> @@ -2950,15 +2950,15 @@ Branch: REL9_6_STABLE [4e563a1f6] 2017-01-09 19:26:58 -0300 Branch: REL9_5_STABLE [4d4ab6ccd] 2017-01-09 19:26:58 -0300 --> <para> - Fix <command>ALTER TABLE ... SET DATA TYPE ... USING</> when child + Fix <command>ALTER TABLE ... SET DATA TYPE ... USING</command> when child table has different column ordering than the parent (Álvaro Herrera) </para> <para> - Failure to adjust the column numbering in the <literal>USING</> + Failure to adjust the column numbering in the <literal>USING</literal> expression led to errors, - typically <quote>attribute <replaceable>N</> has wrong type</quote>. + typically <quote>attribute <replaceable>N</replaceable> has wrong type</quote>. </para> </listitem> @@ -2974,7 +2974,7 @@ Branch: REL9_2_STABLE [6c4cf2be8] 2017-01-04 18:00:12 -0500 --> <para> Fix processing of OID column when a table with OIDs is associated to - a parent with OIDs via <command>ALTER TABLE ... INHERIT</> (Amit + a parent with OIDs via <command>ALTER TABLE ... INHERIT</command> (Amit Langote) </para> @@ -2992,8 +2992,8 @@ Branch: master [1ead0208b] 2016-12-22 16:23:38 -0500 Branch: REL9_6_STABLE [68330c8b4] 2016-12-22 16:23:34 -0500 --> <para> - Ensure that <command>CREATE TABLE ... LIKE ... WITH OIDS</> creates - a table with OIDs, whether or not the <literal>LIKE</>-referenced + Ensure that <command>CREATE TABLE ... LIKE ... WITH OIDS</command> creates + a table with OIDs, whether or not the <literal>LIKE</literal>-referenced table(s) have OIDs (Tom Lane) </para> </listitem> @@ -3007,7 +3007,7 @@ Branch: REL9_5_STABLE [78a98b767] 2016-12-21 17:02:47 +0000 Branch: REL9_4_STABLE [cad24980e] 2016-12-21 17:03:54 +0000 --> <para> - Fix <command>CREATE OR REPLACE VIEW</> to update the view query + Fix <command>CREATE OR REPLACE VIEW</command> to update the view query before attempting to apply the new view options (Dean Rasheed) </para> @@ -3028,7 +3028,7 @@ Branch: REL9_3_STABLE [0e3aadb68] 2016-12-22 17:09:00 -0500 --> <para> Report correct object identity during <command>ALTER TEXT SEARCH - CONFIGURATION</> (Artur Zakirov) + CONFIGURATION</command> (Artur Zakirov) </para> <para> @@ -3046,8 +3046,8 @@ Branch: REL9_5_STABLE [7816d1356] 2016-11-24 15:39:55 -0300 --> <para> Fix commit timestamp mechanism to not fail when queried about - the special XIDs <literal>FrozenTransactionId</> - and <literal>BootstrapTransactionId</> (Craig Ringer) + the special XIDs <literal>FrozenTransactionId</literal> + and <literal>BootstrapTransactionId</literal> (Craig Ringer) </para> </listitem> @@ -3068,8 +3068,8 @@ Branch: REL9_5_STABLE [6e00ba1e1] 2016-11-10 15:00:58 -0500 <para> The symptom was spurious <quote>ON CONFLICT is not supported on table - ... used as a catalog table</> errors when the target - of <command>INSERT ... ON CONFLICT</> is a view with cascade option. + ... used as a catalog table</quote> errors when the target + of <command>INSERT ... ON CONFLICT</command> is a view with cascade option. </para> </listitem> @@ -3081,8 +3081,8 @@ Branch: REL9_6_STABLE [da05d0ebc] 2016-12-04 15:02:46 -0500 Branch: REL9_5_STABLE [25c06a1ed] 2016-12-04 15:02:48 -0500 --> <para> - Fix incorrect <quote>target lists can have at most <replaceable>N</> - entries</quote> complaint when using <literal>ON CONFLICT</> with + Fix incorrect <quote>target lists can have at most <replaceable>N</replaceable> + entries</quote> complaint when using <literal>ON CONFLICT</literal> with wide tables (Tom Lane) </para> </listitem> @@ -3094,8 +3094,8 @@ Branch: master [da8f3ebf3] 2016-11-02 14:32:13 -0400 Branch: REL9_6_STABLE [f4d865f22] 2016-11-02 14:32:13 -0400 --> <para> - Fix spurious <quote>query provides a value for a dropped column</> - errors during <command>INSERT</> or <command>UPDATE</> on a table + Fix spurious <quote>query provides a value for a dropped column</quote> + errors during <command>INSERT</command> or <command>UPDATE</command> on a table with a dropped column (Tom Lane) </para> </listitem> @@ -3110,13 +3110,13 @@ Branch: REL9_4_STABLE [44c8b4fcd] 2016-11-20 14:26:19 -0500 Branch: REL9_3_STABLE [71db302ec] 2016-11-20 14:26:19 -0500 --> <para> - Prevent multicolumn expansion of <replaceable>foo</><literal>.*</> in - an <command>UPDATE</> source expression (Tom Lane) + Prevent multicolumn expansion of <replaceable>foo</replaceable><literal>.*</literal> in + an <command>UPDATE</command> source expression (Tom Lane) </para> <para> This led to <quote>UPDATE target count mismatch --- internal - error</>. Now the syntax is understood as a whole-row variable, + error</quote>. Now the syntax is understood as a whole-row variable, as it would be in other contexts. </para> </listitem> @@ -3133,12 +3133,12 @@ Branch: REL9_2_STABLE [082d1fb9e] 2016-12-09 12:01:14 -0500 --> <para> Ensure that column typmods are determined accurately for - multi-row <literal>VALUES</> constructs (Tom Lane) + multi-row <literal>VALUES</literal> constructs (Tom Lane) </para> <para> This fixes problems occurring when the first value in a column has a - determinable typmod (e.g., length for a <type>varchar</> value) but + determinable typmod (e.g., length for a <type>varchar</type> value) but later values don't share the same limit. </para> </listitem> @@ -3162,8 +3162,8 @@ Branch: REL9_2_STABLE [6e2c21ec5] 2016-12-21 17:39:33 -0500 Normally, a Unicode surrogate leading character must be followed by a Unicode surrogate trailing character, but the check for this was missed if the leading character was the last character in a Unicode - string literal (<literal>U&'...'</>) or Unicode identifier - (<literal>U&"..."</>). + string literal (<literal>U&'...'</literal>) or Unicode identifier + (<literal>U&"..."</literal>). </para> </listitem> @@ -3174,7 +3174,7 @@ Branch: master [db80acfc9] 2016-12-20 09:20:17 +0200 Branch: REL9_6_STABLE [ce92fc4e2] 2016-12-20 09:20:30 +0200 --> <para> - Fix execution of <literal>DISTINCT</> and ordered aggregates when + Fix execution of <literal>DISTINCT</literal> and ordered aggregates when multiple such aggregates are able to share the same transition state (Heikki Linnakangas) </para> @@ -3189,7 +3189,7 @@ Branch: master [260443847] 2016-12-19 13:49:50 -0500 Branch: REL9_6_STABLE [3f07eff10] 2016-12-19 13:49:45 -0500 --> <para> - Fix implementation of phrase search operators in <type>tsquery</> + Fix implementation of phrase search operators in <type>tsquery</type> (Tom Lane) </para> @@ -3218,7 +3218,7 @@ Branch: REL9_2_STABLE [fe6120f9b] 2017-01-26 12:17:47 -0500 --> <para> Ensure that a purely negative text search query, such - as <literal>!foo</>, matches empty <type>tsvector</>s (Tom Dunstan) + as <literal>!foo</literal>, matches empty <type>tsvector</type>s (Tom Dunstan) </para> <para> @@ -3238,7 +3238,7 @@ Branch: REL9_3_STABLE [79e1a9efa] 2016-12-11 13:09:57 -0500 Branch: REL9_2_STABLE [f4ccee408] 2016-12-11 13:09:57 -0500 --> <para> - Prevent crash when <function>ts_rewrite()</> replaces a non-top-level + Prevent crash when <function>ts_rewrite()</function> replaces a non-top-level subtree with an empty query (Artur Zakirov) </para> </listitem> @@ -3254,7 +3254,7 @@ Branch: REL9_3_STABLE [407d513df] 2016-10-30 17:35:43 -0400 Branch: REL9_2_STABLE [606e16a7f] 2016-10-30 17:35:43 -0400 --> <para> - Fix performance problems in <function>ts_rewrite()</> (Tom Lane) + Fix performance problems in <function>ts_rewrite()</function> (Tom Lane) </para> </listitem> @@ -3269,7 +3269,7 @@ Branch: REL9_3_STABLE [77a22f898] 2016-10-30 15:24:40 -0400 Branch: REL9_2_STABLE [b0f8a273e] 2016-10-30 15:24:40 -0400 --> <para> - Fix <function>ts_rewrite()</>'s handling of nested NOT operators + Fix <function>ts_rewrite()</function>'s handling of nested NOT operators (Tom Lane) </para> </listitem> @@ -3283,7 +3283,7 @@ Branch: REL9_5_STABLE [7151e72d7] 2016-10-30 12:27:41 -0400 --> <para> Improve speed of user-defined aggregates that - use <function>array_append()</> as transition function (Tom Lane) + use <function>array_append()</function> as transition function (Tom Lane) </para> </listitem> @@ -3298,7 +3298,7 @@ Branch: REL9_3_STABLE [ee9cb284a] 2017-01-05 11:33:51 -0500 Branch: REL9_2_STABLE [e0d59c6ef] 2017-01-05 11:33:51 -0500 --> <para> - Fix <function>array_fill()</> to handle empty arrays properly (Tom Lane) + Fix <function>array_fill()</function> to handle empty arrays properly (Tom Lane) </para> </listitem> @@ -3310,8 +3310,8 @@ Branch: REL9_6_STABLE [79c89f1f4] 2016-12-09 12:42:17 -0300 Branch: REL9_5_STABLE [581b09c72] 2016-12-09 12:42:17 -0300 --> <para> - Fix possible crash in <function>array_position()</> - or <function>array_positions()</> when processing arrays of records + Fix possible crash in <function>array_position()</function> + or <function>array_positions()</function> when processing arrays of records (Junseok Yang) </para> </listitem> @@ -3327,7 +3327,7 @@ Branch: REL9_3_STABLE [e71fe8470] 2016-12-16 12:53:22 +0200 Branch: REL9_2_STABLE [c8f8ed5c2] 2016-12-16 12:53:27 +0200 --> <para> - Fix one-byte buffer overrun in <function>quote_literal_cstr()</> + Fix one-byte buffer overrun in <function>quote_literal_cstr()</function> (Heikki Linnakangas) </para> @@ -3348,8 +3348,8 @@ Branch: REL9_3_STABLE [f64b11fa0] 2017-01-17 17:32:20 +0900 Branch: REL9_2_STABLE [c73157ca0] 2017-01-17 17:32:45 +0900 --> <para> - Prevent multiple calls of <function>pg_start_backup()</> - and <function>pg_stop_backup()</> from running concurrently (Michael + Prevent multiple calls of <function>pg_start_backup()</function> + and <function>pg_stop_backup()</function> from running concurrently (Michael Paquier) </para> @@ -3368,7 +3368,7 @@ Branch: REL9_5_STABLE [74e67bbad] 2017-01-18 15:21:52 -0500 --> <para> Disable transform that attempted to remove no-op <literal>AT TIME - ZONE</> conversions (Tom Lane) + ZONE</literal> conversions (Tom Lane) </para> <para> @@ -3388,15 +3388,15 @@ Branch: REL9_3_STABLE [583599839] 2016-12-27 15:43:54 -0500 Branch: REL9_2_STABLE [beae7d5f0] 2016-12-27 15:43:55 -0500 --> <para> - Avoid discarding <type>interval</>-to-<type>interval</> casts + Avoid discarding <type>interval</type>-to-<type>interval</type> casts that aren't really no-ops (Tom Lane) </para> <para> In some cases, a cast that should result in zeroing out - low-order <type>interval</> fields was mistakenly deemed to be a + low-order <type>interval</type> fields was mistakenly deemed to be a no-op and discarded. An example is that casting from <type>INTERVAL - MONTH</> to <type>INTERVAL YEAR</> failed to clear the months field. + MONTH</type> to <type>INTERVAL YEAR</type> failed to clear the months field. </para> </listitem> @@ -3432,7 +3432,7 @@ Branch: master [4212cb732] 2016-12-06 11:11:54 -0500 Branch: REL9_6_STABLE [ebe5dc9e0] 2016-12-06 11:43:12 -0500 --> <para> - Allow statements prepared with <command>PREPARE</> to be given + Allow statements prepared with <command>PREPARE</command> to be given parallel plans (Amit Kapila, Tobias Bussmann) </para> </listitem> @@ -3501,7 +3501,7 @@ Branch: REL9_6_STABLE [7defc3b97] 2016-11-10 11:31:56 -0500 --> <para> Fix the plan generated for sorted partial aggregation with a constant - <literal>GROUP BY</> clause (Tom Lane) + <literal>GROUP BY</literal> clause (Tom Lane) </para> </listitem> @@ -3512,8 +3512,8 @@ Branch: master [1f542a2ea] 2016-12-13 13:20:37 -0500 Branch: REL9_6_STABLE [997a2994e] 2016-12-13 13:20:16 -0500 --> <para> - Fix <quote>could not find plan for CTE</> planner error when dealing - with a <literal>UNION ALL</> containing CTE references (Tom Lane) + Fix <quote>could not find plan for CTE</quote> planner error when dealing + with a <literal>UNION ALL</literal> containing CTE references (Tom Lane) </para> </listitem> @@ -3530,7 +3530,7 @@ Branch: REL9_6_STABLE [b971a98ce] 2017-02-02 19:11:27 -0500 <para> The typical consequence of this mistake was a <quote>plan should not - reference subplan's variable</> error. + reference subplan's variable</quote> error. </para> </listitem> @@ -3561,7 +3561,7 @@ Branch: master [bec96c82f] 2017-01-19 12:06:21 -0500 Branch: REL9_6_STABLE [fd081cabf] 2017-01-19 12:06:27 -0500 --> <para> - Fix <application>pg_dump</> to emit the data of a sequence that is + Fix <application>pg_dump</application> to emit the data of a sequence that is marked as an extension configuration table (Michael Paquier) </para> </listitem> @@ -3573,14 +3573,14 @@ Branch: master [e2090d9d2] 2017-01-31 16:24:11 -0500 Branch: REL9_6_STABLE [eb5e9d90d] 2017-01-31 16:24:14 -0500 --> <para> - Fix mishandling of <command>ALTER DEFAULT PRIVILEGES ... REVOKE</> - in <application>pg_dump</> (Stephen Frost) + Fix mishandling of <command>ALTER DEFAULT PRIVILEGES ... REVOKE</command> + in <application>pg_dump</application> (Stephen Frost) </para> <para> - <application>pg_dump</> missed issuing the - required <literal>REVOKE</> commands in cases where <command>ALTER - DEFAULT PRIVILEGES</> had been used to reduce privileges to less than + <application>pg_dump</application> missed issuing the + required <literal>REVOKE</literal> commands in cases where <command>ALTER + DEFAULT PRIVILEGES</command> had been used to reduce privileges to less than they would normally be. </para> </listitem> @@ -3602,7 +3602,7 @@ Branch: REL9_3_STABLE [fc03f7dd1] 2016-12-21 13:47:28 -0500 Branch: REL9_2_STABLE [59a389891] 2016-12-21 13:47:32 -0500 --> <para> - Fix <application>pg_dump</> to dump user-defined casts and transforms + Fix <application>pg_dump</application> to dump user-defined casts and transforms that use built-in functions (Stephen Frost) </para> </listitem> @@ -3616,15 +3616,15 @@ Branch: REL9_5_STABLE [a7864037d] 2016-11-17 14:59:23 -0500 Branch: REL9_4_STABLE [e69b532be] 2016-11-17 14:59:26 -0500 --> <para> - Fix <application>pg_restore</> with <option>--create --if-exists</> + Fix <application>pg_restore</application> with <option>--create --if-exists</option> to behave more sanely if an archive contains - unrecognized <command>DROP</> commands (Tom Lane) + unrecognized <command>DROP</command> commands (Tom Lane) </para> <para> This doesn't fix any live bug, but it may improve the behavior in - future if <application>pg_restore</> is used with an archive - generated by a later <application>pg_dump</> version. + future if <application>pg_restore</application> is used with an archive + generated by a later <application>pg_dump</application> version. </para> </listitem> @@ -3637,7 +3637,7 @@ Branch: REL9_5_STABLE [bc53d7130] 2016-12-19 10:16:02 +0100 Branch: REL9_4_STABLE [f6508827a] 2016-12-19 10:16:12 +0100 --> <para> - Fix <application>pg_basebackup</>'s rate limiting in the presence of + Fix <application>pg_basebackup</application>'s rate limiting in the presence of slow I/O (Antonin Houska) </para> @@ -3656,8 +3656,8 @@ Branch: REL9_5_STABLE [6d779e05a] 2016-11-07 15:03:56 +0100 Branch: REL9_4_STABLE [5556420d4] 2016-11-07 15:04:23 +0100 --> <para> - Fix <application>pg_basebackup</>'s handling of - symlinked <filename>pg_stat_tmp</> and <filename>pg_replslot</> + Fix <application>pg_basebackup</application>'s handling of + symlinked <filename>pg_stat_tmp</filename> and <filename>pg_replslot</filename> subdirectories (Magnus Hagander, Michael Paquier) </para> </listitem> @@ -3673,7 +3673,7 @@ Branch: REL9_3_STABLE [92929a3e3] 2016-10-27 12:00:05 -0400 Branch: REL9_2_STABLE [629575fa2] 2016-10-27 12:14:07 -0400 --> <para> - Fix possible <application>pg_basebackup</> failure on standby + Fix possible <application>pg_basebackup</application> failure on standby server when including WAL files (Amit Kapila, Robert Haas) </para> </listitem> @@ -3685,10 +3685,10 @@ Branch: master [dbdfd114f] 2016-11-25 18:36:10 -0500 Branch: REL9_6_STABLE [255bcd27f] 2016-11-25 18:36:10 -0500 --> <para> - Improve <application>initdb</> to insert the correct + Improve <application>initdb</application> to insert the correct platform-specific default values for - the <replaceable>xxx</><literal>_flush_after</> parameters - into <filename>postgresql.conf</> (Fabien Coelho, Tom Lane) + the <replaceable>xxx</replaceable><literal>_flush_after</literal> parameters + into <filename>postgresql.conf</filename> (Fabien Coelho, Tom Lane) </para> <para> @@ -3706,7 +3706,7 @@ Branch: REL9_5_STABLE [c472f2a33] 2016-12-22 15:01:39 -0500 --> <para> Fix possible mishandling of expanded arrays in domain check - constraints and <literal>CASE</> execution (Tom Lane) + constraints and <literal>CASE</literal> execution (Tom Lane) </para> <para> @@ -3762,14 +3762,14 @@ Branch: REL9_3_STABLE [9c0b04f18] 2016-11-06 14:43:14 -0500 Branch: REL9_2_STABLE [92b7b1058] 2016-11-06 14:43:14 -0500 --> <para> - Fix PL/Tcl to support triggers on tables that have <literal>.tupno</> + Fix PL/Tcl to support triggers on tables that have <literal>.tupno</literal> as a column name (Tom Lane) </para> <para> This matches the (previously undocumented) behavior of - PL/Tcl's <command>spi_exec</> and <command>spi_execp</> commands, - namely that a magic <literal>.tupno</> column is inserted only if + PL/Tcl's <command>spi_exec</command> and <command>spi_execp</command> commands, + namely that a magic <literal>.tupno</literal> column is inserted only if there isn't a real column named that. </para> </listitem> @@ -3785,7 +3785,7 @@ Branch: REL9_3_STABLE [46b6f3fff] 2016-11-15 16:17:19 -0500 Branch: REL9_2_STABLE [13aa9af37] 2016-11-15 16:17:19 -0500 --> <para> - Allow DOS-style line endings in <filename>~/.pgpass</> files, + Allow DOS-style line endings in <filename>~/.pgpass</filename> files, even on Unix (Vik Fearing) </para> @@ -3806,7 +3806,7 @@ Branch: REL9_3_STABLE [1df8b3fe8] 2016-12-22 08:32:25 +0100 Branch: REL9_2_STABLE [501c91074] 2016-12-22 08:34:07 +0100 --> <para> - Fix one-byte buffer overrun if <application>ecpg</> is given a file + Fix one-byte buffer overrun if <application>ecpg</application> is given a file name that ends with a dot (Takayuki Tsunakawa) </para> </listitem> @@ -3819,11 +3819,11 @@ Branch: REL9_6_STABLE [6a8c67f50] 2016-12-25 16:04:47 -0500 --> <para> Fix incorrect error reporting for duplicate data - in <application>psql</>'s <command>\crosstabview</> (Tom Lane) + in <application>psql</application>'s <command>\crosstabview</command> (Tom Lane) </para> <para> - <application>psql</> sometimes quoted the wrong row and/or column + <application>psql</application> sometimes quoted the wrong row and/or column values when complaining about multiple entries for the same crosstab cell. </para> @@ -3840,8 +3840,8 @@ Branch: REL9_3_STABLE [2022d594d] 2016-12-23 21:01:48 -0500 Branch: REL9_2_STABLE [26b55d669] 2016-12-23 21:01:51 -0500 --> <para> - Fix <application>psql</>'s tab completion for <command>ALTER DEFAULT - PRIVILEGES</> (Gilles Darold, Stephen Frost) + Fix <application>psql</application>'s tab completion for <command>ALTER DEFAULT + PRIVILEGES</command> (Gilles Darold, Stephen Frost) </para> </listitem> @@ -3852,8 +3852,8 @@ Branch: master [404e66758] 2016-11-28 11:51:30 -0500 Branch: REL9_6_STABLE [28735cc72] 2016-11-28 11:51:35 -0500 --> <para> - Fix <application>psql</>'s tab completion for <command>ALTER TABLE t - ALTER c DROP ...</> (Kyotaro Horiguchi) + Fix <application>psql</application>'s tab completion for <command>ALTER TABLE t + ALTER c DROP ...</command> (Kyotaro Horiguchi) </para> </listitem> @@ -3868,9 +3868,9 @@ Branch: REL9_3_STABLE [82eb5c514] 2016-12-07 12:19:56 -0500 Branch: REL9_2_STABLE [1ec5cc025] 2016-12-07 12:19:57 -0500 --> <para> - In <application>psql</>, treat an empty or all-blank setting of - the <envar>PAGER</> environment variable as meaning <quote>no - pager</> (Tom Lane) + In <application>psql</application>, treat an empty or all-blank setting of + the <envar>PAGER</envar> environment variable as meaning <quote>no + pager</quote> (Tom Lane) </para> <para> @@ -3890,8 +3890,8 @@ Branch: REL9_3_STABLE [9b8507bfa] 2016-12-22 09:47:25 -0800 Branch: REL9_2_STABLE [44de099f8] 2016-12-22 09:46:46 -0800 --> <para> - Improve <filename>contrib/dblink</>'s reporting of - low-level <application>libpq</> errors, such as out-of-memory + Improve <filename>contrib/dblink</filename>'s reporting of + low-level <application>libpq</application> errors, such as out-of-memory (Joe Conway) </para> </listitem> @@ -3906,14 +3906,14 @@ Branch: REL9_4_STABLE [cb687e0ac] 2016-12-22 09:19:08 -0800 Branch: REL9_3_STABLE [bd46cce21] 2016-12-22 09:18:50 -0800 --> <para> - Teach <filename>contrib/dblink</> to ignore irrelevant server options - when it uses a <filename>contrib/postgres_fdw</> foreign server as + Teach <filename>contrib/dblink</filename> to ignore irrelevant server options + when it uses a <filename>contrib/postgres_fdw</filename> foreign server as the source of connection options (Corey Huinker) </para> <para> Previously, if the foreign server object had options that were not - also <application>libpq</> connection options, an error occurred. + also <application>libpq</application> connection options, an error occurred. </para> </listitem> @@ -3927,7 +3927,7 @@ Branch: REL9_6_STABLE [2a8783e44] 2016-11-02 00:09:28 -0400 Branch: REL9_5_STABLE [af636d7b5] 2016-11-02 00:09:28 -0400 --> <para> - Fix portability problems in <filename>contrib/pageinspect</>'s + Fix portability problems in <filename>contrib/pageinspect</filename>'s functions for GIN indexes (Peter Eisentraut, Tom Lane) </para> </listitem> @@ -4016,7 +4016,7 @@ Branch: REL9_3_STABLE [2b133be04] 2017-01-30 11:41:02 -0500 Branch: REL9_2_STABLE [ef878cc2c] 2017-01-30 11:41:09 -0500 --> <para> - Update time zone data files to <application>tzdata</> release 2016j + Update time zone data files to <application>tzdata</application> release 2016j for DST law changes in northern Cyprus (adding a new zone Asia/Famagusta), Russia (adding a new zone Europe/Saratov), Tonga, and Antarctica/Casey. @@ -4083,7 +4083,7 @@ Branch: REL9_3_STABLE [1c02ee314] 2016-10-19 15:00:34 +0300 crash recovery, or to be written incorrectly on a standby server. Bogus entries in a free space map could lead to attempts to access pages that have been truncated away from the relation itself, typically - producing errors like <quote>could not read block <replaceable>XXX</>: + producing errors like <quote>could not read block <replaceable>XXX</replaceable>: read only 0 of 8192 bytes</quote>. Checksum failures in the visibility map are also possible, if checksumming is enabled. </para> @@ -4091,7 +4091,7 @@ Branch: REL9_3_STABLE [1c02ee314] 2016-10-19 15:00:34 +0300 <para> Procedures for determining whether there is a problem and repairing it if so are discussed at - <ulink url="https://wiki.postgresql.org/wiki/Free_Space_Map_Problems"></>. + <ulink url="https://wiki.postgresql.org/wiki/Free_Space_Map_Problems"></ulink>. </para> </listitem> @@ -4102,7 +4102,7 @@ Branch: master [5afcd2aa7] 2016-09-30 20:40:55 -0400 Branch: REL9_6_STABLE [b6d906073] 2016-09-30 20:39:06 -0400 --> <para> - Fix possible data corruption when <application>pg_upgrade</> rewrites + Fix possible data corruption when <application>pg_upgrade</application> rewrites a relation visibility map into 9.6 format (Tom Lane) </para> @@ -4112,20 +4112,20 @@ Branch: REL9_6_STABLE [b6d906073] 2016-09-30 20:39:06 -0400 Windows, the old map was read using text mode, leading to incorrect results if the map happened to contain consecutive bytes that matched a carriage return/line feed sequence. The latter error would almost - always lead to a <application>pg_upgrade</> failure due to the map + always lead to a <application>pg_upgrade</application> failure due to the map file appearing to be the wrong length. </para> <para> If you are using a big-endian machine (many non-Intel architectures - are big-endian) and have used <application>pg_upgrade</> to upgrade + are big-endian) and have used <application>pg_upgrade</application> to upgrade from a pre-9.6 release, you should assume that all visibility maps are incorrect and need to be regenerated. It is sufficient to truncate each relation's visibility map - with <filename>contrib/pg_visibility</>'s - <function>pg_truncate_visibility_map()</> function. + with <filename>contrib/pg_visibility</filename>'s + <function>pg_truncate_visibility_map()</function> function. For more information see - <ulink url="https://wiki.postgresql.org/wiki/Visibility_Map_Problems"></>. + <ulink url="https://wiki.postgresql.org/wiki/Visibility_Map_Problems"></ulink>. </para> </listitem> @@ -4138,7 +4138,7 @@ Branch: REL9_5_STABLE [65d85b8f9] 2016-10-23 18:36:13 -0400 --> <para> Don't throw serialization errors for self-conflicting insertions - in <command>INSERT ... ON CONFLICT</> (Thomas Munro, Peter Geoghegan) + in <command>INSERT ... ON CONFLICT</command> (Thomas Munro, Peter Geoghegan) </para> </listitem> @@ -4150,7 +4150,7 @@ Branch: REL9_6_STABLE [a5f0bd77a] 2016-10-17 12:13:35 +0300 --> <para> Fix use-after-free hazard in execution of aggregate functions - using <literal>DISTINCT</> (Peter Geoghegan) + using <literal>DISTINCT</literal> (Peter Geoghegan) </para> <para> @@ -4185,7 +4185,7 @@ Branch: REL9_6_STABLE [190765a05] 2016-10-03 16:23:02 -0400 Branch: REL9_5_STABLE [647a86e37] 2016-10-03 16:23:12 -0400 --> <para> - Fix <command>COPY</> with a column name list from a table that has + Fix <command>COPY</command> with a column name list from a table that has row-level security enabled (Adam Brightwell) </para> </listitem> @@ -4201,14 +4201,14 @@ Branch: REL9_3_STABLE [edb514306] 2016-10-20 17:18:09 -0400 Branch: REL9_2_STABLE [f17c26dbd] 2016-10-20 17:18:14 -0400 --> <para> - Fix <command>EXPLAIN</> to emit valid XML when + Fix <command>EXPLAIN</command> to emit valid XML when <xref linkend="guc-track-io-timing"> is on (Markus Winand) </para> <para> Previously the XML output-format option produced syntactically invalid - tags such as <literal><I/O-Read-Time></>. That is now - rendered as <literal><I-O-Read-Time></>. + tags such as <literal><I/O-Read-Time></literal>. That is now + rendered as <literal><I-O-Read-Time></literal>. </para> </listitem> @@ -4220,7 +4220,7 @@ Branch: REL9_6_STABLE [03f2bf70a] 2016-10-13 19:46:06 -0400 Branch: REL9_5_STABLE [3cd504254] 2016-10-13 19:45:58 -0400 --> <para> - Fix statistics update for <command>TRUNCATE</> in a prepared + Fix statistics update for <command>TRUNCATE</command> in a prepared transaction (Stas Kelvich) </para> </listitem> @@ -4242,16 +4242,16 @@ Branch: REL9_3_STABLE [f0bf0f233] 2016-10-13 17:05:15 -0400 Branch: REL9_2_STABLE [6f2db29ec] 2016-10-13 17:05:15 -0400 --> <para> - Fix bugs in merging inherited <literal>CHECK</> constraints while + Fix bugs in merging inherited <literal>CHECK</literal> constraints while creating or altering a table (Tom Lane, Amit Langote) </para> <para> - Allow identical <literal>CHECK</> constraints to be added to a parent + Allow identical <literal>CHECK</literal> constraints to be added to a parent and child table in either order. Prevent merging of a valid - constraint from the parent table with a <literal>NOT VALID</> + constraint from the parent table with a <literal>NOT VALID</literal> constraint on the child. Likewise, prevent merging of a <literal>NO - INHERIT</> child constraint with an inherited constraint. + INHERIT</literal> child constraint with an inherited constraint. </para> </listitem> @@ -4264,8 +4264,8 @@ Branch: REL9_5_STABLE [f50fa46cc] 2016-10-03 16:40:27 -0400 --> <para> Show a sensible value - in <structname>pg_settings</>.<structfield>unit</> - for <varname>min_wal_size</> and <varname>max_wal_size</> (Tom Lane) + in <structname>pg_settings</structname>.<structfield>unit</structfield> + for <varname>min_wal_size</varname> and <varname>max_wal_size</varname> (Tom Lane) </para> </listitem> @@ -4276,7 +4276,7 @@ Branch: master [9c4cc9e2c] 2016-10-13 00:25:48 -0400 Branch: REL9_6_STABLE [0e9e64c07] 2016-10-13 00:25:28 -0400 --> <para> - Fix replacement of array elements in <function>jsonb_set()</> + Fix replacement of array elements in <function>jsonb_set()</function> (Tom Lane) </para> @@ -4364,7 +4364,7 @@ Branch: REL9_4_STABLE [6d3cbbf59] 2016-10-13 15:07:11 -0400 </para> <para> - This avoids possible failures during <function>munmap()</> on systems + This avoids possible failures during <function>munmap()</function> on systems with atypical default huge page sizes. Except in crash-recovery cases, there were no ill effects other than a log message. </para> @@ -4390,7 +4390,7 @@ Branch: REL9_1_STABLE [e84e4761f] 2016-10-07 12:53:51 +0300 --> <para> Don't try to share SSL contexts across multiple connections - in <application>libpq</> (Heikki Linnakangas) + in <application>libpq</application> (Heikki Linnakangas) </para> <para> @@ -4411,12 +4411,12 @@ Branch: REL9_2_STABLE [7397f62e7] 2016-10-10 10:35:58 -0400 Branch: REL9_1_STABLE [fb6825fe5] 2016-10-10 10:35:58 -0400 --> <para> - Avoid corner-case memory leak in <application>libpq</> (Tom Lane) + Avoid corner-case memory leak in <application>libpq</application> (Tom Lane) </para> <para> The reported problem involved leaking an error report - during <function>PQreset()</>, but there might be related cases. + during <function>PQreset()</function>, but there might be related cases. </para> </listitem> @@ -4428,7 +4428,7 @@ Branch: REL9_6_STABLE [bac56dbe0] 2016-10-03 10:07:39 -0400 Branch: REL9_5_STABLE [0f259bd17] 2016-10-03 10:07:39 -0400 --> <para> - In <application>pg_upgrade</>, check library loadability in name order + In <application>pg_upgrade</application>, check library loadability in name order (Tom Lane) </para> @@ -4446,13 +4446,13 @@ Branch: master [e8bdee277] 2016-10-02 14:31:28 -0400 Branch: REL9_6_STABLE [f40334b85] 2016-10-02 14:31:28 -0400 --> <para> - Fix <application>pg_upgrade</> to work correctly for extensions + Fix <application>pg_upgrade</application> to work correctly for extensions containing index access methods (Tom Lane) </para> <para> To allow this, the server has been extended to support <command>ALTER - EXTENSION ADD/DROP ACCESS METHOD</>. That functionality should have + EXTENSION ADD/DROP ACCESS METHOD</command>. That functionality should have been included in the original patch to support dynamic creation of access methods, but it was overlooked. </para> @@ -4465,7 +4465,7 @@ Branch: master [f002ed2b8] 2016-09-30 20:40:56 -0400 Branch: REL9_6_STABLE [53fbeed40] 2016-09-30 20:40:27 -0400 --> <para> - Improve error reporting in <application>pg_upgrade</>'s file + Improve error reporting in <application>pg_upgrade</application>'s file copying/linking/rewriting steps (Tom Lane, Álvaro Herrera) </para> </listitem> @@ -4477,7 +4477,7 @@ Branch: master [4806f26f9] 2016-10-07 09:51:18 -0400 Branch: REL9_6_STABLE [1749332ec] 2016-10-07 09:51:28 -0400 --> <para> - Fix <application>pg_dump</> to work against pre-7.4 servers + Fix <application>pg_dump</application> to work against pre-7.4 servers (Amit Langote, Tom Lane) </para> </listitem> @@ -4490,8 +4490,8 @@ Branch: REL9_6_STABLE [2933ed036] 2016-10-07 14:35:41 +0300 Branch: REL9_5_STABLE [010a1b561] 2016-10-07 14:35:45 +0300 --> <para> - Disallow specifying both <option>--source-server</> - and <option>--source-target</> options to <application>pg_rewind</> + Disallow specifying both <option>--source-server</option> + and <option>--source-target</option> options to <application>pg_rewind</application> (Michael Banck) </para> </listitem> @@ -4504,12 +4504,12 @@ Branch: REL9_6_STABLE [aab809664] 2016-10-06 13:34:38 +0300 Branch: REL9_5_STABLE [69da71254] 2016-10-06 13:34:32 +0300 --> <para> - Make <application>pg_rewind</> turn off <varname>synchronous_commit</> + Make <application>pg_rewind</application> turn off <varname>synchronous_commit</varname> in its session on the source server (Michael Banck, Michael Paquier) </para> <para> - This allows <application>pg_rewind</> to work even when the source + This allows <application>pg_rewind</application> to work even when the source server is using synchronous replication that is not working for some reason. </para> @@ -4525,8 +4525,8 @@ Branch: REL9_4_STABLE [da3f71a08] 2016-09-30 11:22:49 +0200 Branch: REL9_3_STABLE [4bff35cca] 2016-09-30 11:23:25 +0200 --> <para> - In <application>pg_xlogdump</>, retry opening new WAL segments when - using <option>--follow</> option (Magnus Hagander) + In <application>pg_xlogdump</application>, retry opening new WAL segments when + using <option>--follow</option> option (Magnus Hagander) </para> <para> @@ -4542,7 +4542,7 @@ Branch: master [9a109452d] 2016-10-01 16:32:54 -0400 Branch: REL9_6_STABLE [f4e787c82] 2016-10-01 16:32:55 -0400 --> <para> - Fix <filename>contrib/pg_visibility</> to report the correct TID for + Fix <filename>contrib/pg_visibility</filename> to report the correct TID for a corrupt tuple that has been the subject of a rolled-back update (Tom Lane) </para> @@ -4556,7 +4556,7 @@ Branch: REL9_6_STABLE [68fb75e10] 2016-10-01 13:35:20 -0400 --> <para> Fix makefile dependencies so that parallel make - of <application>PL/Python</> by itself will succeed reliably + of <application>PL/Python</application> by itself will succeed reliably (Pavel Raiskup) </para> </listitem> @@ -4594,7 +4594,7 @@ Branch: REL9_2_STABLE [a03339aef] 2016-10-19 17:57:01 -0400 Branch: REL9_1_STABLE [22cf97635] 2016-10-19 17:57:06 -0400 --> <para> - Update time zone data files to <application>tzdata</> release 2016h + Update time zone data files to <application>tzdata</application> release 2016h for DST law changes in Palestine and Turkey, plus historical corrections for Turkey and some regions of Russia. Switch to numeric abbreviations for some time zones in Antarctica, @@ -4607,15 +4607,15 @@ Branch: REL9_1_STABLE [22cf97635] 2016-10-19 17:57:06 -0400 or no currency among the local population. They are in process of reversing that policy in favor of using numeric UTC offsets in zones where there is no evidence of real-world use of an English - abbreviation. At least for the time being, <productname>PostgreSQL</> + abbreviation. At least for the time being, <productname>PostgreSQL</productname> will continue to accept such removed abbreviations for timestamp input. - But they will not be shown in the <structname>pg_timezone_names</> + But they will not be shown in the <structname>pg_timezone_names</structname> view nor used for output. </para> <para> - In this update, <literal>AMT</> is no longer shown as being in use to - mean Armenia Time. Therefore, we have changed the <literal>Default</> + In this update, <literal>AMT</literal> is no longer shown as being in use to + mean Armenia Time. Therefore, we have changed the <literal>Default</literal> abbreviation set to interpret it as Amazon Time, thus UTC-4 not UTC+4. </para> </listitem> @@ -4637,7 +4637,7 @@ Branch: REL9_1_STABLE [22cf97635] 2016-10-19 17:57:06 -0400 <title>Overview</title> <para> - Major enhancements in <productname>PostgreSQL</> 9.6 include: + Major enhancements in <productname>PostgreSQL</productname> 9.6 include: </para> <!-- Items in this list summarize one or more items below --> @@ -4671,15 +4671,15 @@ Branch: REL9_1_STABLE [22cf97635] 2016-10-19 17:57:06 -0400 <listitem> <para> - <filename>postgres_fdw</> now supports remote joins, sorts, - <command>UPDATE</>s, and <command>DELETE</>s + <filename>postgres_fdw</filename> now supports remote joins, sorts, + <command>UPDATE</command>s, and <command>DELETE</command>s </para> </listitem> <listitem> <para> Substantial performance improvements, especially in the area of - scalability on multi-<acronym>CPU</>-socket servers + scalability on multi-<acronym>CPU</acronym>-socket servers </para> </listitem> @@ -4714,7 +4714,7 @@ Branch: REL9_1_STABLE [22cf97635] 2016-10-19 17:57:06 -0400 --> <para> Improve the <link - linkend="pg-stat-activity-view"><structname>pg_stat_activity</></link> + linkend="pg-stat-activity-view"><structname>pg_stat_activity</structname></link> view's information about what a process is waiting for (Amit Kapila, Ildus Kurbangaliev) </para> @@ -4722,10 +4722,10 @@ Branch: REL9_1_STABLE [22cf97635] 2016-10-19 17:57:06 -0400 <para> Historically a process has only been shown as waiting if it was waiting for a heavyweight lock. Now waits for lightweight locks - and buffer pins are also shown in <structname>pg_stat_activity</>. + and buffer pins are also shown in <structname>pg_stat_activity</structname>. Also, the type of lock being waited for is now visible. - These changes replace the <structfield>waiting</> column with - <structfield>wait_event_type</> and <structfield>wait_event</>. + These changes replace the <structfield>waiting</structfield> column with + <structfield>wait_event_type</structfield> and <structfield>wait_event</structfield>. </para> </listitem> @@ -4735,14 +4735,14 @@ Branch: REL9_1_STABLE [22cf97635] 2016-10-19 17:57:06 -0400 --> <para> In <link - linkend="functions-formatting-table"><function>to_char()</></>, + linkend="functions-formatting-table"><function>to_char()</function></link>, do not count a minus sign (when needed) as part of the field width for time-related fields (Bruce Momjian) </para> <para> - For example, <literal>to_char('-4 years'::interval, 'YY')</> - now returns <literal>-04</>, rather than <literal>-4</>. + For example, <literal>to_char('-4 years'::interval, 'YY')</literal> + now returns <literal>-04</literal>, rather than <literal>-4</literal>. </para> </listitem> @@ -4752,18 +4752,18 @@ Branch: REL9_1_STABLE [22cf97635] 2016-10-19 17:57:06 -0400 --> <para> Make <link - linkend="functions-datetime-table"><function>extract()</></> behave + linkend="functions-datetime-table"><function>extract()</function></link> behave more reasonably with infinite inputs (Vitaly Burovoy) </para> <para> - Historically the <function>extract()</> function just returned + Historically the <function>extract()</function> function just returned zero given an infinite timestamp, regardless of the given field name. Make it return <literal>infinity</literal> or <literal>-infinity</literal> as appropriate when the requested field is one that is monotonically increasing (e.g, - <literal>year</>, <literal>epoch</>), or <literal>NULL</> when - it is not (e.g., <literal>day</>, <literal>hour</>). Also, + <literal>year</literal>, <literal>epoch</literal>), or <literal>NULL</literal> when + it is not (e.g., <literal>day</literal>, <literal>hour</literal>). Also, throw the expected error for bad field names. </para> </listitem> @@ -4774,9 +4774,9 @@ Branch: REL9_1_STABLE [22cf97635] 2016-10-19 17:57:06 -0400 This commit is also listed under libpq and psql --> <para> - Remove PL/pgSQL's <quote>feature</> that suppressed the - innermost line of <literal>CONTEXT</> for messages emitted by - <command>RAISE</> commands (Pavel Stehule) + Remove PL/pgSQL's <quote>feature</quote> that suppressed the + innermost line of <literal>CONTEXT</literal> for messages emitted by + <command>RAISE</command> commands (Pavel Stehule) </para> <para> @@ -4791,13 +4791,13 @@ This commit is also listed under libpq and psql --> <para> Fix the default text search parser to allow leading digits - in <literal>email</> and <literal>host</> tokens (Artur Zakirov) + in <literal>email</literal> and <literal>host</literal> tokens (Artur Zakirov) </para> <para> In most cases this will result in few changes in the parsing of text. But if you have data where such addresses occur frequently, - it may be worth rebuilding dependent <type>tsvector</> columns + it may be worth rebuilding dependent <type>tsvector</type> columns and indexes so that addresses of this form will be found properly by text searches. </para> @@ -4809,8 +4809,8 @@ This commit is also listed under libpq and psql 2016-03-16 [9a206d063] Improve script generating unaccent rules --> <para> - Extend <link linkend="unaccent"><filename>contrib/unaccent</></>'s - standard <filename>unaccent.rules</> file to handle all diacritics + Extend <link linkend="unaccent"><filename>contrib/unaccent</filename></link>'s + standard <filename>unaccent.rules</filename> file to handle all diacritics known to Unicode, and to expand ligatures correctly (Thomas Munro, Léonard Benedetti) </para> @@ -4819,7 +4819,7 @@ This commit is also listed under libpq and psql The previous version neglected to convert some less-common letters with diacritic marks. Also, ligatures are now expanded into separate letters. Installations that use this rules file may wish - to rebuild <type>tsvector</> columns and indexes that depend on the + to rebuild <type>tsvector</type> columns and indexes that depend on the result. </para> </listitem> @@ -4830,15 +4830,15 @@ This commit is also listed under libpq and psql --> <para> Remove the long-deprecated - <literal>CREATEUSER</>/<literal>NOCREATEUSER</> options from - <command>CREATE ROLE</> and allied commands (Tom Lane) + <literal>CREATEUSER</literal>/<literal>NOCREATEUSER</literal> options from + <command>CREATE ROLE</command> and allied commands (Tom Lane) </para> <para> - <literal>CREATEUSER</> actually meant <literal>SUPERUSER</>, + <literal>CREATEUSER</literal> actually meant <literal>SUPERUSER</literal>, for ancient backwards-compatibility reasons. This has been a constant source of confusion for people who (reasonably) expect - it to mean <literal>CREATEROLE</>. It has been deprecated for + it to mean <literal>CREATEROLE</literal>. It has been deprecated for ten years now, so fix the problem by removing it. </para> </listitem> @@ -4850,13 +4850,13 @@ This commit is also listed under libpq and psql 2016-05-08 [7df974ee0] Disallow superuser names starting with 'pg_' in initdb --> <para> - Treat role names beginning with <literal>pg_</> as reserved + Treat role names beginning with <literal>pg_</literal> as reserved (Stephen Frost) </para> <para> User creation of such role names is now disallowed. This prevents - conflicts with built-in roles created by <application>initdb</>. + conflicts with built-in roles created by <application>initdb</application>. </para> </listitem> @@ -4866,16 +4866,16 @@ This commit is also listed under libpq and psql --> <para> Change a column name in the - <structname>information_schema</>.<structname>routines</> - view from <structfield>result_cast_character_set_name</> - to <structfield>result_cast_char_set_name</> (Clément + <structname>information_schema</structname>.<structname>routines</structname> + view from <structfield>result_cast_character_set_name</structfield> + to <structfield>result_cast_char_set_name</structfield> (Clément Prévost) </para> <para> The SQL:2011 standard specifies the longer name, but that appears to be a mistake, because adjacent column names use the shorter - style, as do other <structname>information_schema</> views. + style, as do other <structname>information_schema</structname> views. </para> </listitem> @@ -4884,7 +4884,7 @@ This commit is also listed under libpq and psql 2015-12-08 [d5563d7df] psql: Support multiple -c and -f options, and allow mixi --> <para> - <application>psql</>'s <option>-c</option> option no longer implies + <application>psql</application>'s <option>-c</option> option no longer implies <option>--no-psqlrc</option> (Pavel Stehule, Catalin Iacob) </para> @@ -4893,7 +4893,7 @@ This commit is also listed under libpq and psql Write <option>--no-psqlrc</option> (or its abbreviation <option>-X</option>) explicitly to obtain the old behavior. Scripts so modified will still work with old - versions of <application>psql</>. + versions of <application>psql</application>. </para> </listitem> @@ -4902,7 +4902,7 @@ This commit is also listed under libpq and psql 2015-07-02 [5671aaca8] Improve pg_restore's -t switch to match all types of rel --> <para> - Improve <application>pg_restore</>'s <option>-t</option> option to + Improve <application>pg_restore</application>'s <option>-t</option> option to match all types of relations, not only plain tables (Craig Ringer) </para> </listitem> @@ -4912,17 +4912,17 @@ This commit is also listed under libpq and psql 2016-02-12 [59a884e98] Change delimiter used for display of NextXID --> <para> - Change the display format used for <literal>NextXID</> in - <application>pg_controldata</> and related places (Joe Conway, + Change the display format used for <literal>NextXID</literal> in + <application>pg_controldata</application> and related places (Joe Conway, Bruce Momjian) </para> <para> Display epoch-and-transaction-ID values in the format - <replaceable>number</><literal>:</><replaceable>number</>. + <replaceable>number</replaceable><literal>:</literal><replaceable>number</replaceable>. The previous format - <replaceable>number</><literal>/</><replaceable>number</> was - confusingly similar to that used for <acronym>LSN</>s. + <replaceable>number</replaceable><literal>/</literal><replaceable>number</replaceable> was + confusingly similar to that used for <acronym>LSN</acronym>s. </para> </listitem> @@ -4940,8 +4940,8 @@ and many others in the same vein Many of the standard extensions have been updated to allow their functions to be executed within parallel query worker processes. These changes will not take effect in - databases <application>pg_upgrade</>'d from prior versions unless - you apply <command>ALTER EXTENSION UPDATE</> to each such extension + databases <application>pg_upgrade</application>'d from prior versions unless + you apply <command>ALTER EXTENSION UPDATE</command> to each such extension (in each database of a cluster). </para> </listitem> @@ -5002,7 +5002,7 @@ and many others in the same vein </para> <para> - With 9.6, <productname>PostgreSQL</> introduces initial support + With 9.6, <productname>PostgreSQL</productname> introduces initial support for parallel execution of large queries. Only strictly read-only queries where the driving table is accessed via a sequential scan can be parallelized. Hash joins and nested loops can be performed @@ -5048,7 +5048,7 @@ and many others in the same vein 2015-09-02 [30bb26b5e] Allow usage of huge maintenance_work_mem for GIN build. --> <para> - Allow <link linkend="GIN"><acronym>GIN</></> index builds to + Allow <link linkend="GIN"><acronym>GIN</acronym></link> index builds to make effective use of <xref linkend="guc-maintenance-work-mem"> settings larger than 1 GB (Robert Abraham, Teodor Sigaev) </para> @@ -5076,7 +5076,7 @@ and many others in the same vein --> <para> Add <link - linkend="functions-admin-index"><function>gin_clean_pending_list()</></> + linkend="functions-admin-index"><function>gin_clean_pending_list()</function></link> function to allow manual invocation of pending-list cleanup for a GIN index (Jeff Janes) </para> @@ -5094,7 +5094,7 @@ and many others in the same vein --> <para> Improve handling of dead index tuples in <link - linkend="GiST">GiST</> indexes (Anastasia Lubennikova) + linkend="GiST">GiST</link> indexes (Anastasia Lubennikova) </para> <para> @@ -5111,7 +5111,7 @@ and many others in the same vein --> <para> Add an <link linkend="SPGiST">SP-GiST</link> operator class for - type <type>box</> (Alexander Lebedev) + type <type>box</type> (Alexander Lebedev) </para> </listitem> @@ -5137,7 +5137,7 @@ and many others in the same vein </para> <para> - The new approach makes better use of the <acronym>CPU</> cache + The new approach makes better use of the <acronym>CPU</acronym> cache for typical cache sizes and data volumes. Where necessary, the behavior can be adjusted via the new configuration parameter <literal>replacement_sort_tuples</literal>. @@ -5162,17 +5162,17 @@ and many others in the same vein 2016-02-17 [f1f5ec1ef] Reuse abbreviated keys in ordered [set] aggregates. --> <para> - Speed up sorting of <type>uuid</>, <type>bytea</>, and - <type>char(n)</> fields by using <quote>abbreviated</> keys + Speed up sorting of <type>uuid</type>, <type>bytea</type>, and + <type>char(n)</type> fields by using <quote>abbreviated</quote> keys (Peter Geoghegan) </para> <para> Support for abbreviated keys has also been added to the non-default operator classes <link - linkend="indexes-opclass"><literal>text_pattern_ops</></>, - <literal>varchar_pattern_ops</>, and - <literal>bpchar_pattern_ops</>. Processing of ordered-set + linkend="indexes-opclass"><literal>text_pattern_ops</literal></link>, + <literal>varchar_pattern_ops</literal>, and + <literal>bpchar_pattern_ops</literal>. Processing of ordered-set aggregates can also now exploit abbreviated keys. </para> </listitem> @@ -5182,8 +5182,8 @@ and many others in the same vein 2015-12-16 [b648b7034] Speed up CREATE INDEX CONCURRENTLY's TID sort. --> <para> - Speed up <command>CREATE INDEX CONCURRENTLY</> by treating - <acronym>TID</>s as 64-bit integers during sorting (Peter + Speed up <command>CREATE INDEX CONCURRENTLY</command> by treating + <acronym>TID</acronym>s as 64-bit integers during sorting (Peter Geoghegan) </para> </listitem> @@ -5203,7 +5203,7 @@ and many others in the same vein 2015-09-03 [4aec49899] Assorted code review for recent ProcArrayLock patch. --> <para> - Reduce contention for the <literal>ProcArrayLock</> (Amit Kapila, + Reduce contention for the <literal>ProcArrayLock</literal> (Amit Kapila, Robert Haas) </para> </listitem> @@ -5234,7 +5234,7 @@ and many others in the same vein --> <para> Use atomic operations, rather than a spinlock, to protect an - <literal>LWLock</>'s wait queue (Andres Freund) + <literal>LWLock</literal>'s wait queue (Andres Freund) </para> </listitem> @@ -5244,7 +5244,7 @@ and many others in the same vein --> <para> Partition the shared hash table freelist to reduce contention on - multi-<acronym>CPU</>-socket servers (Aleksander Alekseev) + multi-<acronym>CPU</acronym>-socket servers (Aleksander Alekseev) </para> </listitem> @@ -5280,14 +5280,14 @@ and many others in the same vein 2016-04-04 [391159e03] Partially revert commit 3d3bf62f30200500637b24fdb7b992a9 --> <para> - Improve <command>ANALYZE</>'s estimates for columns with many nulls + Improve <command>ANALYZE</command>'s estimates for columns with many nulls (Tomas Vondra, Alex Shulgin) </para> <para> - Previously <command>ANALYZE</> tended to underestimate the number - of non-<literal>NULL</> distinct values in a column with many - <literal>NULL</>s, and was also inaccurate in computing the + Previously <command>ANALYZE</command> tended to underestimate the number + of non-<literal>NULL</literal> distinct values in a column with many + <literal>NULL</literal>s, and was also inaccurate in computing the most-common values. </para> </listitem> @@ -5314,13 +5314,13 @@ and many others in the same vein </para> <para> - If a table <literal>t</> has a foreign key restriction, say - <literal>(a,b) REFERENCES r (x,y)</>, then a <literal>WHERE</> - condition such as <literal>t.a = r.x AND t.b = r.y</> cannot - select more than one <literal>r</> row per <literal>t</> row. - The planner formerly considered these <literal>AND</> conditions + If a table <literal>t</literal> has a foreign key restriction, say + <literal>(a,b) REFERENCES r (x,y)</literal>, then a <literal>WHERE</literal> + condition such as <literal>t.a = r.x AND t.b = r.y</literal> cannot + select more than one <literal>r</literal> row per <literal>t</literal> row. + The planner formerly considered these <literal>AND</literal> conditions to be independent and would often drastically misestimate - selectivity as a result. Now it compares the <literal>WHERE</> + selectivity as a result. Now it compares the <literal>WHERE</literal> conditions to applicable foreign key constraints and produces better estimates. </para> @@ -5331,7 +5331,7 @@ and many others in the same vein </sect4> <sect4> - <title><command>VACUUM</></title> + <title><command>VACUUM</command></title> <itemizedlist> @@ -5361,7 +5361,7 @@ and many others in the same vein <para> If necessary, vacuum can be forced to process all-frozen - pages using the new <literal>DISABLE_PAGE_SKIPPING</> option. + pages using the new <literal>DISABLE_PAGE_SKIPPING</literal> option. Normally this should never be needed, but it might help in recovering from visibility-map corruption. </para> @@ -5372,7 +5372,7 @@ and many others in the same vein 2015-12-30 [e84290823] Avoid useless truncation attempts during VACUUM. --> <para> - Avoid useless heap-truncation attempts during <command>VACUUM</> + Avoid useless heap-truncation attempts during <command>VACUUM</command> (Jeff Janes, Tom Lane) </para> @@ -5401,19 +5401,19 @@ and many others in the same vein 2016-08-07 [9ee1cf04a] Fix TOAST access failure in RETURNING queries. --> <para> - Allow old <acronym>MVCC</> snapshots to be invalidated after a + Allow old <acronym>MVCC</acronym> snapshots to be invalidated after a configurable timeout (Kevin Grittner) </para> <para> Normally, deleted tuples cannot be physically removed by - vacuuming until the last transaction that could <quote>see</> + vacuuming until the last transaction that could <quote>see</quote> them is gone. A transaction that stays open for a long time can thus cause considerable table bloat because space cannot be recycled. This feature allows setting a time-based limit, via the new configuration parameter <xref linkend="guc-old-snapshot-threshold">, on how long an - <acronym>MVCC</> snapshot is guaranteed to be valid. After that, + <acronym>MVCC</acronym> snapshot is guaranteed to be valid. After that, dead tuples are candidates for removal. A transaction using an outdated snapshot will get an error if it attempts to read a page that potentially could have contained such data. @@ -5425,12 +5425,12 @@ and many others in the same vein 2016-02-11 [d4c3a156c] Remove GROUP BY columns that are functionally dependent --> <para> - Ignore <literal>GROUP BY</> columns that are + Ignore <literal>GROUP BY</literal> columns that are functionally dependent on other columns (David Rowley) </para> <para> - If a <literal>GROUP BY</> clause includes all columns of a + If a <literal>GROUP BY</literal> clause includes all columns of a non-deferred primary key, as well as other columns of the same table, those other columns are redundant and can be dropped from the grouping. This saves computation in many common cases. @@ -5443,17 +5443,17 @@ and many others in the same vein --> <para> Allow use of an <link linkend="indexes-index-only-scans">index-only - scan</link> on a partial index when the index's <literal>WHERE</> + scan</link> on a partial index when the index's <literal>WHERE</literal> clause references columns that are not indexed (Tomas Vondra, Kyotaro Horiguchi) </para> <para> For example, an index defined by <command>CREATE INDEX tidx_partial - ON t(b) WHERE a > 0</> can now be used for an index-only scan by - a query that specifies <literal>WHERE a > 0</> and does not - otherwise use <literal>a</>. Previously this was disallowed - because <literal>a</> is not listed as an index column. + ON t(b) WHERE a > 0</command> can now be used for an index-only scan by + a query that specifies <literal>WHERE a > 0</literal> and does not + otherwise use <literal>a</literal>. Previously this was disallowed + because <literal>a</literal> is not listed as an index column. </para> </listitem> @@ -5493,7 +5493,7 @@ and many others in the same vein </para> <para> - <productname>PostgreSQL</> writes data to the kernel's disk cache, + <productname>PostgreSQL</productname> writes data to the kernel's disk cache, from where it will be flushed to physical storage in due time. Many operating systems are not smart about managing this and allow large amounts of dirty data to accumulate before deciding to flush @@ -5504,11 +5504,11 @@ and many others in the same vein </para> <para> - On Linux, <function>sync_file_range()</> is used for this purpose, + On Linux, <function>sync_file_range()</function> is used for this purpose, and the feature is on by default on Linux because that function has few downsides. This flushing capability is also available on other - platforms if they have <function>msync()</> - or <function>posix_fadvise()</>, but those interfaces have some + platforms if they have <function>msync()</function> + or <function>posix_fadvise()</function>, but those interfaces have some undesirable side-effects so the feature is disabled by default on non-Linux platforms. </para> @@ -5533,7 +5533,7 @@ and many others in the same vein </para> <para> - For example, <command>SELECT AVG(x), VARIANCE(x) FROM tab</> can use + For example, <command>SELECT AVG(x), VARIANCE(x) FROM tab</command> can use a single per-row computation for both aggregates. </para> </listitem> @@ -5544,7 +5544,7 @@ and many others in the same vein --> <para> Speed up visibility tests for recently-created tuples by checking - the current transaction's snapshot, not <structname>pg_clog</>, to + the current transaction's snapshot, not <structname>pg_clog</structname>, to decide if the source transaction should be considered committed (Jeff Janes, Tom Lane) </para> @@ -5570,9 +5570,9 @@ and many others in the same vein </para> <para> - Two-phase commit information is now written only to <acronym>WAL</> - during <command>PREPARE TRANSACTION</>, and will be read back from - <acronym>WAL</> during <command>COMMIT PREPARED</> if that happens + Two-phase commit information is now written only to <acronym>WAL</acronym> + during <command>PREPARE TRANSACTION</command>, and will be read back from + <acronym>WAL</acronym> during <command>COMMIT PREPARED</command> if that happens soon thereafter. A separate state file is created only if the pending transaction does not get committed or aborted by the time of the next checkpoint. @@ -5603,8 +5603,8 @@ and many others in the same vein 2016-02-06 [aa2387e2f] Improve speed of timestamp/time/date output functions. --> <para> - Improve speed of the output functions for <type>timestamp</>, - <type>time</>, and <type>date</> data types (David Rowley, + Improve speed of the output functions for <type>timestamp</type>, + <type>time</type>, and <type>date</type> data types (David Rowley, Andres Freund) </para> </listitem> @@ -5615,7 +5615,7 @@ and many others in the same vein --> <para> Avoid some unnecessary cancellations of hot-standby queries - during replay of actions that take <literal>AccessExclusive</> + during replay of actions that take <literal>AccessExclusive</literal> locks (Jeff Janes) </para> </listitem> @@ -5649,8 +5649,8 @@ and many others in the same vein 2015-07-05 [6c82d8d1f] Further reduce overhead for passing plpgsql variables to --> <para> - Speed up expression evaluation in <application>PL/pgSQL</> by - keeping <literal>ParamListInfo</> entries for simple variables + Speed up expression evaluation in <application>PL/pgSQL</application> by + keeping <literal>ParamListInfo</literal> entries for simple variables valid at all times (Tom Lane) </para> </listitem> @@ -5660,7 +5660,7 @@ and many others in the same vein 2015-07-06 [4f33621f3] Don't set SO_SNDBUF on recent Windows versions that have --> <para> - Avoid reducing the <literal>SO_SNDBUF</> setting below its default + Avoid reducing the <literal>SO_SNDBUF</literal> setting below its default on recent Windows versions (Chen Huajun) </para> </listitem> @@ -5696,8 +5696,8 @@ and many others in the same vein --> <para> Add <link - linkend="pg-stat-progress-vacuum-view"><structname>pg_stat_progress_vacuum</></link> - system view to provide progress reporting for <command>VACUUM</> + linkend="pg-stat-progress-vacuum-view"><structname>pg_stat_progress_vacuum</structname></link> + system view to provide progress reporting for <command>VACUUM</command> operations (Amit Langote, Robert Haas, Vinayak Pokale, Rahila Syed) </para> </listitem> @@ -5708,11 +5708,11 @@ and many others in the same vein --> <para> Add <link - linkend="functions-controldata"><function>pg_control_system()</></>, - <function>pg_control_checkpoint()</>, - <function>pg_control_recovery()</>, and - <function>pg_control_init()</> functions to expose fields of - <filename>pg_control</> to <acronym>SQL</> (Joe Conway, Michael + linkend="functions-controldata"><function>pg_control_system()</function></link>, + <function>pg_control_checkpoint()</function>, + <function>pg_control_recovery()</function>, and + <function>pg_control_init()</function> functions to expose fields of + <filename>pg_control</filename> to <acronym>SQL</acronym> (Joe Conway, Michael Paquier) </para> </listitem> @@ -5722,15 +5722,15 @@ and many others in the same vein 2016-02-17 [a5c43b886] Add new system view, pg_config --> <para> - Add <link linkend="view-pg-config"><structname>pg_config</></link> + Add <link linkend="view-pg-config"><structname>pg_config</structname></link> system view (Joe Conway) </para> <para> This view exposes the same information available from - the <application>pg_config</> command-line utility, + the <application>pg_config</application> command-line utility, namely assorted compile-time configuration information for - <productname>PostgreSQL</>. + <productname>PostgreSQL</productname>. </para> </listitem> @@ -5739,8 +5739,8 @@ and many others in the same vein 2015-08-10 [3f811c2d6] Add confirmed_flush column to pg_replication_slots. --> <para> - Add a <structfield>confirmed_flush_lsn</> column to the <link - linkend="view-pg-replication-slots"><structname>pg_replication_slots</></link> + Add a <structfield>confirmed_flush_lsn</structfield> column to the <link + linkend="view-pg-replication-slots"><structname>pg_replication_slots</structname></link> system view (Marko Tiikkaja) </para> </listitem> @@ -5753,9 +5753,9 @@ and many others in the same vein --> <para> Add <link - linkend="pg-stat-wal-receiver-view"><structname>pg_stat_wal_receiver</></link> + linkend="pg-stat-wal-receiver-view"><structname>pg_stat_wal_receiver</structname></link> system view to provide information about the state of a hot-standby - server's <acronym>WAL</> receiver process (Michael Paquier) + server's <acronym>WAL</acronym> receiver process (Michael Paquier) </para> </listitem> @@ -5765,7 +5765,7 @@ and many others in the same vein --> <para> Add <link - linkend="functions-info-session-table"><function>pg_blocking_pids()</></> + linkend="functions-info-session-table"><function>pg_blocking_pids()</function></link> function to reliably identify which sessions block which others (Tom Lane) </para> @@ -5774,7 +5774,7 @@ and many others in the same vein This function returns an array of the process IDs of any sessions that are blocking the session with the given process ID. Historically users have obtained such information using a self-join - on the <structname>pg_locks</> view. However, it is unreasonably + on the <structname>pg_locks</structname> view. However, it is unreasonably tedious to do it that way with any modicum of correctness, and the addition of parallel queries has made the old approach entirely impractical, since locks might be held or awaited by child worker @@ -5788,7 +5788,7 @@ and many others in the same vein --> <para> Add function <link - linkend="functions-admin-backup-table"><function>pg_current_xlog_flush_location()</></> + linkend="functions-admin-backup-table"><function>pg_current_xlog_flush_location()</function></link> to expose the current transaction log flush location (Tomas Vondra) </para> </listitem> @@ -5799,8 +5799,8 @@ and many others in the same vein --> <para> Add function <link - linkend="functions-info-session-table"><function>pg_notification_queue_usage()</></> - to report how full the <command>NOTIFY</> queue is (Brendan Jurd) + linkend="functions-info-session-table"><function>pg_notification_queue_usage()</function></link> + to report how full the <command>NOTIFY</command> queue is (Brendan Jurd) </para> </listitem> @@ -5816,7 +5816,7 @@ and many others in the same vein The memory usage dump that is output to the postmaster log during an out-of-memory failure now summarizes statistics when there are a large number of memory contexts, rather than possibly generating - a very large report. There is also a <quote>grand total</> + a very large report. There is also a <quote>grand total</quote> summary line now. </para> </listitem> @@ -5826,7 +5826,7 @@ and many others in the same vein </sect4> <sect4> - <title><acronym>Authentication</></title> + <title><acronym>Authentication</acronym></title> <itemizedlist> @@ -5835,15 +5835,15 @@ and many others in the same vein 2016-04-08 [34c33a1f0] Add BSD authentication method. --> <para> - Add a <link linkend="auth-bsd"><acronym>BSD</> authentication + Add a <link linkend="auth-bsd"><acronym>BSD</acronym> authentication method</link> to allow use of - the <systemitem class="osname">BSD</> Authentication service for - <productname>PostgreSQL</> client authentication (Marisa Emerson) + the <systemitem class="osname">BSD</systemitem> Authentication service for + <productname>PostgreSQL</productname> client authentication (Marisa Emerson) </para> <para> BSD Authentication is currently only available on <systemitem - class="osname">OpenBSD</>. + class="osname">OpenBSD</systemitem>. </para> </listitem> @@ -5852,9 +5852,9 @@ and many others in the same vein 2016-04-08 [2f1d2b7a7] Set PAM_RHOST item for PAM authentication --> <para> - When using <link linkend="auth-pam"><acronym>PAM</> + When using <link linkend="auth-pam"><acronym>PAM</acronym> authentication</link>, provide the client IP address or host name - to <acronym>PAM</> modules via the <literal>PAM_RHOST</> item + to <acronym>PAM</acronym> modules via the <literal>PAM_RHOST</literal> item (Grzegorz Sampolski) </para> </listitem> @@ -5870,7 +5870,7 @@ and many others in the same vein <para> All ordinarily-reachable password authentication failure cases - should now provide specific <literal>DETAIL</> fields in the log. + should now provide specific <literal>DETAIL</literal> fields in the log. </para> </listitem> @@ -5879,7 +5879,7 @@ and many others in the same vein 2015-09-06 [643beffe8] Support RADIUS passwords up to 128 characters --> <para> - Support <link linkend="auth-radius"><acronym>RADIUS</> passwords</> + Support <link linkend="auth-radius"><acronym>RADIUS</acronym> passwords</link> up to 128 characters long (Marko Tiikkaja) </para> </listitem> @@ -5889,11 +5889,11 @@ and many others in the same vein 2016-04-08 [35e2e357c] Add authentication parameters compat_realm and upn_usena --> <para> - Add new <link linkend="sspi-auth"><acronym>SSPI</> + Add new <link linkend="sspi-auth"><acronym>SSPI</acronym> authentication</link> parameters - <varname>compat_realm</> and <varname>upn_username</> to control - whether <productname>NetBIOS</> or <productname>Kerberos</> - realm names and user names are used during <acronym>SSPI</> + <varname>compat_realm</varname> and <varname>upn_username</varname> to control + whether <productname>NetBIOS</productname> or <productname>Kerberos</productname> + realm names and user names are used during <acronym>SSPI</acronym> authentication (Christian Ullrich) </para> </listitem> @@ -5939,7 +5939,7 @@ and many others in the same vein 2015-09-08 [1aba62ec6] Allow per-tablespace effective_io_concurrency --> <para> - Allow <varname>effective_io_concurrency</> to be set per-tablespace + Allow <varname>effective_io_concurrency</varname> to be set per-tablespace to support cases where different tablespaces have different I/O characteristics (Julien Rouhaud) </para> @@ -5951,7 +5951,7 @@ and many others in the same vein 2015-09-07 [b1e1862a1] Coordinate log_line_prefix options 'm' and 'n' to share --> <para> - Add <xref linkend="guc-log-line-prefix"> option <literal>%n</> to + Add <xref linkend="guc-log-line-prefix"> option <literal>%n</literal> to print the current time in Unix epoch form, with milliseconds (Tomas Vondra, Jeff Davis) </para> @@ -5966,7 +5966,7 @@ and many others in the same vein Add <xref linkend="guc-syslog-sequence-numbers"> and <xref linkend="guc-syslog-split-messages"> configuration parameters to provide more control over the message format when logging to - <systemitem>syslog</> (Peter Eisentraut) + <systemitem>syslog</systemitem> (Peter Eisentraut) </para> </listitem> @@ -5975,16 +5975,16 @@ and many others in the same vein 2016-03-18 [b555ed810] Merge wal_level "archive" and "hot_standby" into new nam --> <para> - Merge the <literal>archive</> and <literal>hot_standby</> values + Merge the <literal>archive</literal> and <literal>hot_standby</literal> values of the <xref linkend="guc-wal-level"> configuration parameter - into a single new value <literal>replica</> (Peter Eisentraut) + into a single new value <literal>replica</literal> (Peter Eisentraut) </para> <para> Making a distinction between these settings is no longer useful, and merging them is a step towards a planned future simplification of replication setup. The old names are still accepted but are - converted to <literal>replica</> internally. + converted to <literal>replica</literal> internally. </para> </listitem> @@ -5993,15 +5993,15 @@ and many others in the same vein 2016-02-02 [7d17e683f] Add support for systemd service notifications --> <para> - Add configure option <option>--with-systemd</> to enable - calling <function>sd_notify()</> at server start and stop (Peter + Add configure option <option>--with-systemd</option> to enable + calling <function>sd_notify()</function> at server start and stop (Peter Eisentraut) </para> <para> - This allows the use of <application>systemd</> service units of - type <literal>notify</>, which greatly simplifies the management - of <productname>PostgreSQL</> under <application>systemd</>. + This allows the use of <application>systemd</application> service units of + type <literal>notify</literal>, which greatly simplifies the management + of <productname>PostgreSQL</productname> under <application>systemd</application>. </para> </listitem> @@ -6010,17 +6010,17 @@ and many others in the same vein 2016-03-19 [9a83564c5] Allow SSL server key file to have group read access if o --> <para> - Allow the server's <acronym>SSL</> key file to have group read - access if it is owned by <literal>root</> (Christoph Berg) + Allow the server's <acronym>SSL</acronym> key file to have group read + access if it is owned by <literal>root</literal> (Christoph Berg) </para> <para> Formerly, we insisted the key file be owned by the - user running the <productname>PostgreSQL</> server, but + user running the <productname>PostgreSQL</productname> server, but that is inconvenient on some systems (such as <systemitem - class="osname">Debian</>) that are configured to manage + class="osname">Debian</systemitem>) that are configured to manage certificates centrally. Therefore, allow the case where the key - file is owned by <literal>root</> and has group read access. + file is owned by <literal>root</literal> and has group read access. It is up to the operating system administrator to ensure that the group does not include any untrusted users. </para> @@ -6085,8 +6085,8 @@ XXX this is pending backpatch, may need to remove 2016-04-26 [c6ff84b06] Emit invalidations to standby for transactions without x --> <para> - Ensure that invalidation messages are recorded in <acronym>WAL</> - even when issued by a transaction that has no <acronym>XID</> + Ensure that invalidation messages are recorded in <acronym>WAL</acronym> + even when issued by a transaction that has no <acronym>XID</acronym> assigned (Andres Freund) </para> @@ -6102,7 +6102,7 @@ XXX this is pending backpatch, may need to remove 2016-04-28 [e2c79e14d] Prevent multiple cleanup process for pending list in GIN --> <para> - Prevent multiple processes from trying to clean a <acronym>GIN</> + Prevent multiple processes from trying to clean a <acronym>GIN</acronym> index's pending list concurrently (Teodor Sigaev, Jeff Janes) </para> @@ -6147,13 +6147,13 @@ XXX this is pending backpatch, may need to remove 2016-03-29 [314cbfc5d] Add new replication mode synchronous_commit = 'remote_ap --> <para> - Add new setting <literal>remote_apply</> for configuration + Add new setting <literal>remote_apply</literal> for configuration parameter <xref linkend="guc-synchronous-commit"> (Thomas Munro) </para> <para> In this mode, the master waits for the transaction to be - <emphasis>applied</> on the standby server, not just written + <emphasis>applied</emphasis> on the standby server, not just written to disk. That means that you can count on a transaction started on the standby to see all commits previously acknowledged by the master. @@ -6168,14 +6168,14 @@ XXX this is pending backpatch, may need to remove <para> Add a feature to the replication protocol, and a corresponding option to <link - linkend="functions-replication-table"><function>pg_create_physical_replication_slot()</></>, - to allow reserving <acronym>WAL</> immediately when creating a + linkend="functions-replication-table"><function>pg_create_physical_replication_slot()</function></link>, + to allow reserving <acronym>WAL</acronym> immediately when creating a replication slot (Gurjeet Singh, Michael Paquier) </para> <para> This allows the creation of a replication slot to guarantee - that all the <acronym>WAL</> needed for a base backup will be + that all the <acronym>WAL</acronym> needed for a base backup will be available. </para> </listitem> @@ -6186,13 +6186,13 @@ XXX this is pending backpatch, may need to remove --> <para> Add a <option>--slot</option> option to - <link linkend="app-pgbasebackup"><application>pg_basebackup</></> + <link linkend="app-pgbasebackup"><application>pg_basebackup</application></link> (Peter Eisentraut) </para> <para> - This lets <application>pg_basebackup</> use a replication - slot defined for <acronym>WAL</> streaming. After the base + This lets <application>pg_basebackup</application> use a replication + slot defined for <acronym>WAL</acronym> streaming. After the base backup completes, selecting the same slot for regular streaming replication allows seamless startup of the new standby server. </para> @@ -6205,8 +6205,8 @@ XXX this is pending backpatch, may need to remove --> <para> Extend <link - linkend="functions-admin-backup-table"><function>pg_start_backup()</></> - and <function>pg_stop_backup()</> to support non-exclusive backups + linkend="functions-admin-backup-table"><function>pg_start_backup()</function></link> + and <function>pg_stop_backup()</function> to support non-exclusive backups (Magnus Hagander) </para> </listitem> @@ -6226,14 +6226,14 @@ XXX this is pending backpatch, may need to remove --> <para> Allow functions that return sets of tuples to return simple - <literal>NULL</>s (Andrew Gierth, Tom Lane) + <literal>NULL</literal>s (Andrew Gierth, Tom Lane) </para> <para> - In the context of <literal>SELECT FROM function(...)</>, a function + In the context of <literal>SELECT FROM function(...)</literal>, a function that returned a set of composite values was previously not allowed - to return a plain <literal>NULL</> value as part of the set. - Now that is allowed and interpreted as a row of <literal>NULL</>s. + to return a plain <literal>NULL</literal> value as part of the set. + Now that is allowed and interpreted as a row of <literal>NULL</literal>s. This avoids corner-case errors with, for example, unnesting an array of composite values. </para> @@ -6245,14 +6245,14 @@ XXX this is pending backpatch, may need to remove --> <para> Fully support array subscripts and field selections in the - target column list of an <command>INSERT</> with multiple - <literal>VALUES</> rows (Tom Lane) + target column list of an <command>INSERT</command> with multiple + <literal>VALUES</literal> rows (Tom Lane) </para> <para> Previously, such cases failed if the same target column was mentioned more than once, e.g., <literal>INSERT INTO tab (x[1], - x[2]) VALUES (...)</>. + x[2]) VALUES (...)</literal>. </para> </listitem> @@ -6262,16 +6262,16 @@ XXX this is pending backpatch, may need to remove 2016-03-25 [d543170f2] Don't split up SRFs when choosing to postpone SELECT out --> <para> - When appropriate, postpone evaluation of <command>SELECT</> - output expressions until after an <literal>ORDER BY</> sort + When appropriate, postpone evaluation of <command>SELECT</command> + output expressions until after an <literal>ORDER BY</literal> sort (Konstantin Knizhnik) </para> <para> This change ensures that volatile or expensive functions in the output list are executed in the order suggested by <literal>ORDER - BY</>, and that they are not evaluated more times than required - when there is a <literal>LIMIT</> clause. Previously, these + BY</literal>, and that they are not evaluated more times than required + when there is a <literal>LIMIT</literal> clause. Previously, these properties held if the ordering was performed by an index scan or pre-merge-join sort, but not if it was performed by a top-level sort. @@ -6289,9 +6289,9 @@ XXX this is pending backpatch, may need to remove </para> <para> - This change allows command tags, e.g. <command>SELECT</>, to + This change allows command tags, e.g. <command>SELECT</command>, to correctly report tuple counts larger than 4 billion. This also - applies to PL/pgSQL's <command>GET DIAGNOSTICS ... ROW_COUNT</> + applies to PL/pgSQL's <command>GET DIAGNOSTICS ... ROW_COUNT</command> command. </para> </listitem> @@ -6302,17 +6302,17 @@ XXX this is pending backpatch, may need to remove --> <para> Avoid doing encoding conversions by converting through the - <literal>MULE_INTERNAL</> encoding (Tom Lane) + <literal>MULE_INTERNAL</literal> encoding (Tom Lane) </para> <para> Previously, many conversions for Cyrillic and Central European single-byte encodings were done by converting to a - related <literal>MULE_INTERNAL</> coding scheme and then to the + related <literal>MULE_INTERNAL</literal> coding scheme and then to the destination encoding. Aside from being inefficient, this meant that when the conversion encountered an untranslatable character, the error message would confusingly complain about failure to - convert to or from <literal>MULE_INTERNAL</>, rather than the + convert to or from <literal>MULE_INTERNAL</literal>, rather than the user-visible encoding. </para> </listitem> @@ -6331,7 +6331,7 @@ XXX this is pending backpatch, may need to remove <para> Previously, the foreign join pushdown infrastructure left the question of security entirely up to individual foreign data - wrappers, but that made it too easy for an <acronym>FDW</> to + wrappers, but that made it too easy for an <acronym>FDW</acronym> to inadvertently create subtle security holes. So, make it the core code's job to determine which role ID will access each table, and do not attempt join pushdown unless the role is the same for @@ -6353,13 +6353,13 @@ XXX this is pending backpatch, may need to remove 2015-11-27 [92e38182d] COPY (INSERT/UPDATE/DELETE .. RETURNING ..) --> <para> - Allow <command>COPY</> to copy the output of an - <literal>INSERT</>/<literal>UPDATE</>/<literal>DELETE</> - ... <literal>RETURNING</> query (Marko Tiikkaja) + Allow <command>COPY</command> to copy the output of an + <literal>INSERT</literal>/<literal>UPDATE</literal>/<literal>DELETE</literal> + ... <literal>RETURNING</literal> query (Marko Tiikkaja) </para> <para> - Previously, an intermediate <acronym>CTE</> had to be written to + Previously, an intermediate <acronym>CTE</acronym> had to be written to get this result. </para> </listitem> @@ -6369,16 +6369,16 @@ XXX this is pending backpatch, may need to remove 2016-04-05 [f2fcad27d] Support ALTER THING .. DEPENDS ON EXTENSION --> <para> - Introduce <command>ALTER <replaceable>object</> DEPENDS ON + Introduce <command>ALTER <replaceable>object</replaceable> DEPENDS ON EXTENSION</command> (Abhijit Menon-Sen) </para> <para> This command allows a database object to be marked as depending on an extension, so that it will be dropped automatically if - the extension is dropped (without needing <literal>CASCADE</>). + the extension is dropped (without needing <literal>CASCADE</literal>). However, the object is not part of the extension, and thus will - be dumped separately by <application>pg_dump</>. + be dumped separately by <application>pg_dump</application>. </para> </listitem> @@ -6387,7 +6387,7 @@ XXX this is pending backpatch, may need to remove 2015-11-19 [bc4996e61] Make ALTER .. SET SCHEMA do nothing, instead of throwing --> <para> - Make <command>ALTER <replaceable>object</> SET SCHEMA</> do nothing + Make <command>ALTER <replaceable>object</replaceable> SET SCHEMA</command> do nothing when the object is already in the requested schema, rather than throwing an error as it historically has for most object types (Marti Raudsepp) @@ -6411,8 +6411,8 @@ XXX this is pending backpatch, may need to remove 2015-07-29 [2cd40adb8] Add IF NOT EXISTS processing to ALTER TABLE ADD COLUMN --> <para> - Add an <option>IF NOT EXISTS</> option to <command>ALTER TABLE - ADD COLUMN</> (Fabrízio de Royes Mello) + Add an <option>IF NOT EXISTS</option> option to <command>ALTER TABLE + ADD COLUMN</command> (Fabrízio de Royes Mello) </para> </listitem> @@ -6422,7 +6422,7 @@ XXX this is pending backpatch, may need to remove 2016-03-10 [fcb4bfddb] Reduce lock level for altering fillfactor --> <para> - Reduce the lock strength needed by <command>ALTER TABLE</> + Reduce the lock strength needed by <command>ALTER TABLE</command> when setting fillfactor and autovacuum-related relation options (Fabrízio de Royes Mello, Simon Riggs) </para> @@ -6434,7 +6434,7 @@ XXX this is pending backpatch, may need to remove --> <para> Introduce <link linkend="sql-create-access-method"><command>CREATE - ACCESS METHOD</></> to allow extensions to create index access + ACCESS METHOD</command></link> to allow extensions to create index access methods (Alexander Korotkov, Petr Jelínek) </para> </listitem> @@ -6444,7 +6444,7 @@ XXX this is pending backpatch, may need to remove 2015-10-03 [b67aaf21e] Add CASCADE support for CREATE EXTENSION. --> <para> - Add a <literal>CASCADE</> option to <command>CREATE + Add a <literal>CASCADE</literal> option to <command>CREATE EXTENSION</command> to automatically create any extensions the requested one depends on (Petr Jelínek) </para> @@ -6455,7 +6455,7 @@ XXX this is pending backpatch, may need to remove 2015-10-05 [b943f502b] Have CREATE TABLE LIKE add OID column if any LIKEd table --> <para> - Make <command>CREATE TABLE ... LIKE</> include an <type>OID</> + Make <command>CREATE TABLE ... LIKE</command> include an <type>OID</type> column if any source table has one (Bruce Momjian) </para> </listitem> @@ -6465,14 +6465,14 @@ XXX this is pending backpatch, may need to remove 2015-12-16 [f27a6b15e] Mark CHECK constraints declared NOT VALID valid if creat --> <para> - If a <literal>CHECK</> constraint is declared <literal>NOT VALID</> + If a <literal>CHECK</literal> constraint is declared <literal>NOT VALID</literal> in a table creation command, automatically mark it as valid (Amit Langote, Amul Sul) </para> <para> This is safe because the table has no existing rows. This matches - the longstanding behavior of <literal>FOREIGN KEY</> constraints. + the longstanding behavior of <literal>FOREIGN KEY</literal> constraints. </para> </listitem> @@ -6481,16 +6481,16 @@ XXX this is pending backpatch, may need to remove 2016-03-25 [c94959d41] Fix DROP OPERATOR to reset oprcom/oprnegate links to the --> <para> - Fix <command>DROP OPERATOR</> to clear - <structname>pg_operator</>.<structfield>oprcom</> and - <structname>pg_operator</>.<structfield>oprnegate</> links to + Fix <command>DROP OPERATOR</command> to clear + <structname>pg_operator</structname>.<structfield>oprcom</structfield> and + <structname>pg_operator</structname>.<structfield>oprnegate</structfield> links to the dropped operator (Roma Sokolov) </para> <para> Formerly such links were left as-is, which could pose a problem in the somewhat unlikely event that the dropped operator's - <type>OID</> was reused for another operator. + <type>OID</type> was reused for another operator. </para> </listitem> @@ -6499,13 +6499,13 @@ XXX this is pending backpatch, may need to remove 2016-07-11 [4d042999f] Print a given subplan only once in EXPLAIN. --> <para> - Do not show the same subplan twice in <command>EXPLAIN</> output + Do not show the same subplan twice in <command>EXPLAIN</command> output (Tom Lane) </para> <para> In certain cases, typically involving SubPlan nodes in index - conditions, <command>EXPLAIN</> would print data for the same + conditions, <command>EXPLAIN</command> would print data for the same subplan twice. </para> </listitem> @@ -6516,7 +6516,7 @@ XXX this is pending backpatch, may need to remove --> <para> Disallow creation of indexes on system columns, except for - <type>OID</> columns (David Rowley) + <type>OID</type> columns (David Rowley) </para> <para> @@ -6550,8 +6550,8 @@ XXX this is pending backpatch, may need to remove checks that would throw an error if they were called by a non-superuser. This forced the use of superuser roles for some relatively pedestrian tasks. The hard-wired error checks - are now gone in favor of making <application>initdb</> revoke the - default public <literal>EXECUTE</> privilege on these functions. + are now gone in favor of making <application>initdb</application> revoke the + default public <literal>EXECUTE</literal> privilege on these functions. This allows installations to choose to grant usage of such functions to trusted roles that do not need all superuser privileges. @@ -6569,7 +6569,7 @@ XXX this is pending backpatch, may need to remove </para> <para> - Currently the only such role is <literal>pg_signal_backend</>, + Currently the only such role is <literal>pg_signal_backend</literal>, but more are expected to be added in future. </para> </listitem> @@ -6591,19 +6591,19 @@ XXX this is pending backpatch, may need to remove 2016-06-27 [6734a1cac] Change predecence of phrase operator. --> <para> - Improve <link linkend="textsearch">full-text search</> to support + Improve <link linkend="textsearch">full-text search</link> to support searching for phrases, that is, lexemes appearing adjacent to each other in a specific order, or with a specified distance between them (Teodor Sigaev, Oleg Bartunov, Dmitry Ivanov) </para> <para> - A phrase-search query can be specified in <type>tsquery</> - input using the new operators <literal><-></> and - <literal><<replaceable>N</>></literal>. The former means + A phrase-search query can be specified in <type>tsquery</type> + input using the new operators <literal><-></literal> and + <literal><<replaceable>N</replaceable>></literal>. The former means that the lexemes before and after it must appear adjacent to each other in that order. The latter means they must be exactly - <replaceable>N</> lexemes apart. + <replaceable>N</replaceable> lexemes apart. </para> </listitem> @@ -6613,7 +6613,7 @@ XXX this is pending backpatch, may need to remove --> <para> Allow omitting one or both boundaries in an array slice specifier, - e.g. <literal>array_col[3:]</> (Yury Zhuravlev) + e.g. <literal>array_col[3:]</literal> (Yury Zhuravlev) </para> <para> @@ -6634,19 +6634,19 @@ XXX this is pending backpatch, may need to remove <para> This change prevents unexpected out-of-range errors for - <type>timestamp with time zone</> values very close to the - implementation limits. Previously, the <quote>same</> value might - be accepted or not depending on the <varname>timezone</> setting, + <type>timestamp with time zone</type> values very close to the + implementation limits. Previously, the <quote>same</quote> value might + be accepted or not depending on the <varname>timezone</varname> setting, meaning that a dump and reload could fail on a value that had been accepted when presented. Now the limits are enforced according - to the equivalent <acronym>UTC</> time, not local time, so as to - be independent of <varname>timezone</>. + to the equivalent <acronym>UTC</acronym> time, not local time, so as to + be independent of <varname>timezone</varname>. </para> <para> - Also, <productname>PostgreSQL</> is now more careful to detect + Also, <productname>PostgreSQL</productname> is now more careful to detect overflow in operations that compute new date or timestamp values, - such as <type>date</> <literal>+</> <type>integer</>. + such as <type>date</type> <literal>+</literal> <type>integer</type>. </para> </listitem> @@ -6655,14 +6655,14 @@ XXX this is pending backpatch, may need to remove 2016-03-30 [50861cd68] Improve portability of I/O behavior for the geometric ty --> <para> - For geometric data types, make sure <literal>infinity</> and - <literal>NaN</> component values are treated consistently during + For geometric data types, make sure <literal>infinity</literal> and + <literal>NaN</literal> component values are treated consistently during input and output (Tom Lane) </para> <para> Such values will now always print the same as they would in - a simple <type>float8</> column, and be accepted the same way + a simple <type>float8</type> column, and be accepted the same way on input. Previously the behavior was platform-dependent. </para> </listitem> @@ -6675,8 +6675,8 @@ XXX this is pending backpatch, may need to remove --> <para> Upgrade - the <link linkend="textsearch-ispell-dictionary"><literal>ispell</></> - dictionary type to handle modern <productname>Hunspell</> files and + the <link linkend="textsearch-ispell-dictionary"><literal>ispell</literal></link> + dictionary type to handle modern <productname>Hunspell</productname> files and support more languages (Artur Zakirov) </para> </listitem> @@ -6687,7 +6687,7 @@ XXX this is pending backpatch, may need to remove --> <para> Implement look-behind constraints - in <link linkend="functions-posix-regexp">regular expressions</> + in <link linkend="functions-posix-regexp">regular expressions</link> (Tom Lane) </para> @@ -6706,12 +6706,12 @@ XXX this is pending backpatch, may need to remove --> <para> In regular expressions, if an apparent three-digit octal escape - <literal>\</><replaceable>nnn</> would exceed 377 (255 decimal), + <literal>\</literal><replaceable>nnn</replaceable> would exceed 377 (255 decimal), assume it is a two-digit octal escape instead (Tom Lane) </para> <para> - This makes the behavior match current <application>Tcl</> releases. + This makes the behavior match current <application>Tcl</application> releases. </para> </listitem> @@ -6720,8 +6720,8 @@ XXX this is pending backpatch, may need to remove 2015-11-07 [c5e86ea93] Add "xid <> xid" and "xid <> int4" operators. --> <para> - Add transaction ID operators <type>xid</> <literal><></> - <type>xid</> and <type>xid</> <literal><></> <type>int4</>, + Add transaction ID operators <type>xid</type> <literal><></literal> + <type>xid</type> and <type>xid</type> <literal><></literal> <type>int4</type>, for consistency with the corresponding equality operators (Michael Paquier) </para> @@ -6742,9 +6742,9 @@ XXX this is pending backpatch, may need to remove --> <para> Add <link - linkend="functions-json-processing-table"><function>jsonb_insert()</></> - function to insert a new element into a <type>jsonb</> array, - or a not-previously-existing key into a <type>jsonb</> object + linkend="functions-json-processing-table"><function>jsonb_insert()</function></link> + function to insert a new element into a <type>jsonb</type> array, + or a not-previously-existing key into a <type>jsonb</type> object (Dmitry Dolgov) </para> </listitem> @@ -6755,9 +6755,9 @@ XXX this is pending backpatch, may need to remove 2016-05-05 [18a02ad2a] Fix corner-case loss of precision in numeric pow() calcu --> <para> - Improve the accuracy of the <function>ln()</>, <function>log()</>, - <function>exp()</>, and <function>pow()</> functions for type - <type>numeric</> (Dean Rasheed) + Improve the accuracy of the <function>ln()</function>, <function>log()</function>, + <function>exp()</function>, and <function>pow()</function> functions for type + <type>numeric</type> (Dean Rasheed) </para> </listitem> @@ -6767,8 +6767,8 @@ XXX this is pending backpatch, may need to remove --> <para> Add a <link - linkend="functions-math-func-table"><function>scale(numeric)</></> - function to extract the display scale of a <type>numeric</> value + linkend="functions-math-func-table"><function>scale(numeric)</function></link> + function to extract the display scale of a <type>numeric</type> value (Marko Tiikkaja) </para> </listitem> @@ -6783,8 +6783,8 @@ XXX this is pending backpatch, may need to remove <para> For example, <link - linkend="functions-math-trig-table"><function>sind()</></> - measures its argument in degrees, whereas <function>sin()</> + linkend="functions-math-trig-table"><function>sind()</function></link> + measures its argument in degrees, whereas <function>sin()</function> measures in radians. These functions go to some lengths to deliver exact results for values where an exact result can be expected, for instance <literal>sind(30) = 0.5</literal>. @@ -6796,15 +6796,15 @@ XXX this is pending backpatch, may need to remove 2016-01-22 [fd5200c3d] Improve cross-platform consistency of Inf/NaN handling i --> <para> - Ensure that trigonometric functions handle <literal>infinity</> - and <literal>NaN</> inputs per the <acronym>POSIX</> standard + Ensure that trigonometric functions handle <literal>infinity</literal> + and <literal>NaN</literal> inputs per the <acronym>POSIX</acronym> standard (Dean Rasheed) </para> <para> - The <acronym>POSIX</> standard says that these functions should - return <literal>NaN</> for <literal>NaN</> input, and should throw - an error for out-of-range inputs including <literal>infinity</>. + The <acronym>POSIX</acronym> standard says that these functions should + return <literal>NaN</literal> for <literal>NaN</literal> input, and should throw + an error for out-of-range inputs including <literal>infinity</literal>. Previously our behavior varied across platforms. </para> </listitem> @@ -6815,9 +6815,9 @@ XXX this is pending backpatch, may need to remove --> <para> Make <link - linkend="functions-datetime-table"><function>to_timestamp(float8)</></> - convert float <literal>infinity</> to - timestamp <literal>infinity</> (Vitaly Burovoy) + linkend="functions-datetime-table"><function>to_timestamp(float8)</function></link> + convert float <literal>infinity</literal> to + timestamp <literal>infinity</literal> (Vitaly Burovoy) </para> <para> @@ -6831,15 +6831,15 @@ XXX this is pending backpatch, may need to remove 2016-05-05 [0b9a23443] Rename tsvector delete() to ts_delete(), and filter() to --> <para> - Add new functions for <type>tsvector</> data (Stas Kelvich) + Add new functions for <type>tsvector</type> data (Stas Kelvich) </para> <para> The new functions are <link - linkend="textsearch-functions-table"><function>ts_delete()</></>, - <function>ts_filter()</>, <function>unnest()</>, - <function>tsvector_to_array()</>, <function>array_to_tsvector()</>, - and a variant of <function>setweight()</> that sets the weight + linkend="textsearch-functions-table"><function>ts_delete()</function></link>, + <function>ts_filter()</function>, <function>unnest()</function>, + <function>tsvector_to_array()</function>, <function>array_to_tsvector()</function>, + and a variant of <function>setweight()</function> that sets the weight only for specified lexeme(s). </para> </listitem> @@ -6849,11 +6849,11 @@ XXX this is pending backpatch, may need to remove 2015-09-17 [9acb9007d] Fix oversight in tsearch type check --> <para> - Allow <link linkend="textsearch-statistics"><function>ts_stat()</></> - and <link linkend="textsearch-update-triggers"><function>tsvector_update_trigger()</></> + Allow <link linkend="textsearch-statistics"><function>ts_stat()</function></link> + and <link linkend="textsearch-update-triggers"><function>tsvector_update_trigger()</function></link> to operate on values that are of types binary-compatible with the expected argument type, not just exactly that type; for example - allow <type>citext</> where <type>text</> is expected (Teodor + allow <type>citext</type> where <type>text</type> is expected (Teodor Sigaev) </para> </listitem> @@ -6864,14 +6864,14 @@ XXX this is pending backpatch, may need to remove --> <para> Add variadic functions <link - linkend="functions-comparison-func-table"><function>num_nulls()</></> - and <function>num_nonnulls()</> that count the number of their + linkend="functions-comparison-func-table"><function>num_nulls()</function></link> + and <function>num_nonnulls()</function> that count the number of their arguments that are null or non-null (Marko Tiikkaja) </para> <para> - An example usage is <literal>CHECK(num_nonnulls(a,b,c) = 1)</> - which asserts that exactly one of a,b,c is not <literal>NULL</>. + An example usage is <literal>CHECK(num_nonnulls(a,b,c) = 1)</literal> + which asserts that exactly one of a,b,c is not <literal>NULL</literal>. These functions can also be used to count the number of null or nonnull elements in an array. </para> @@ -6883,8 +6883,8 @@ XXX this is pending backpatch, may need to remove --> <para> Add function <link - linkend="functions-string-other"><function>parse_ident()</></> - to split a qualified, possibly quoted <acronym>SQL</> identifier + linkend="functions-string-other"><function>parse_ident()</function></link> + to split a qualified, possibly quoted <acronym>SQL</acronym> identifier into its parts (Pavel Stehule) </para> </listitem> @@ -6895,15 +6895,15 @@ XXX this is pending backpatch, may need to remove --> <para> In <link - linkend="functions-formatting-table"><function>to_number()</></>, - interpret a <literal>V</> format code as dividing by 10 to the - power of the number of digits following <literal>V</> (Bruce + linkend="functions-formatting-table"><function>to_number()</function></link>, + interpret a <literal>V</literal> format code as dividing by 10 to the + power of the number of digits following <literal>V</literal> (Bruce Momjian) </para> <para> This makes it operate in an inverse fashion to - <function>to_char()</>. + <function>to_char()</function>. </para> </listitem> @@ -6913,8 +6913,8 @@ XXX this is pending backpatch, may need to remove --> <para> Make the <link - linkend="functions-info-catalog-table"><function>to_reg*()</></> - functions accept type <type>text</> not <type>cstring</> + linkend="functions-info-catalog-table"><function>to_reg*()</function></link> + functions accept type <type>text</type> not <type>cstring</type> (Petr Korobeinikov) </para> @@ -6930,16 +6930,16 @@ XXX this is pending backpatch, may need to remove --> <para> Add <link - linkend="functions-admin-dbsize"><function>pg_size_bytes()</></> + linkend="functions-admin-dbsize"><function>pg_size_bytes()</function></link> function to convert human-readable size strings to numbers (Pavel Stehule, Vitaly Burovoy, Dean Rasheed) </para> <para> This function converts strings like those produced by - <function>pg_size_pretty()</> into bytes. An example + <function>pg_size_pretty()</function> into bytes. An example usage is <literal>SELECT oid::regclass FROM pg_class WHERE - pg_total_relation_size(oid) > pg_size_bytes('10 GB')</>. + pg_total_relation_size(oid) > pg_size_bytes('10 GB')</literal>. </para> </listitem> @@ -6949,7 +6949,7 @@ XXX this is pending backpatch, may need to remove --> <para> In <link - linkend="functions-admin-dbsize"><function>pg_size_pretty()</></>, + linkend="functions-admin-dbsize"><function>pg_size_pretty()</function></link>, format negative numbers similarly to positive ones (Adrian Vondendriesch) </para> @@ -6965,14 +6965,14 @@ XXX this is pending backpatch, may need to remove 2015-07-02 [10fb48d66] Add an optional missing_ok argument to SQL function curr --> <para> - Add an optional <replaceable>missing_ok</> argument to the <link - linkend="functions-admin-set-table"><function>current_setting()</></> + Add an optional <replaceable>missing_ok</replaceable> argument to the <link + linkend="functions-admin-set-table"><function>current_setting()</function></link> function (David Christensen) </para> <para> This allows avoiding an error for an unrecognized parameter - name, instead returning a <literal>NULL</>. + name, instead returning a <literal>NULL</literal>. </para> </listitem> @@ -6984,16 +6984,16 @@ XXX this is pending backpatch, may need to remove --> <para> Change various catalog-inspection functions to return - <literal>NULL</> for invalid input (Michael Paquier) + <literal>NULL</literal> for invalid input (Michael Paquier) </para> <para> <link - linkend="functions-info-catalog-table"><function>pg_get_viewdef()</></> - now returns <literal>NULL</> if given an invalid view <type>OID</>, - and several similar functions likewise return <literal>NULL</> for + linkend="functions-info-catalog-table"><function>pg_get_viewdef()</function></link> + now returns <literal>NULL</literal> if given an invalid view <type>OID</type>, + and several similar functions likewise return <literal>NULL</literal> for bad input. Previously, such cases usually led to <quote>cache - lookup failed</> errors, which are not meant to occur in + lookup failed</quote> errors, which are not meant to occur in user-facing cases. </para> </listitem> @@ -7004,13 +7004,13 @@ XXX this is pending backpatch, may need to remove --> <para> Fix <link - linkend="pg-replication-origin-xact-reset"><function>pg_replication_origin_xact_reset()</></> + linkend="pg-replication-origin-xact-reset"><function>pg_replication_origin_xact_reset()</function></link> to not have any arguments (Fujii Masao) </para> <para> The documentation said that it has no arguments, and the C code did - not expect any arguments, but the entry in <structname>pg_proc</> + not expect any arguments, but the entry in <structname>pg_proc</structname> mistakenly specified two arguments. </para> </listitem> @@ -7030,7 +7030,7 @@ XXX this is pending backpatch, may need to remove --> <para> In <link linkend="plpgsql">PL/pgSQL</link>, detect mismatched - <command>CONTINUE</> and <command>EXIT</> statements while + <command>CONTINUE</command> and <command>EXIT</command> statements while compiling a function, rather than at execution time (Jim Nasby) </para> @@ -7043,7 +7043,7 @@ XXX this is pending backpatch, may need to remove 2016-07-02 [3a4a33ad4] PL/Python: Report argument parsing errors using exceptio --> <para> - Extend <application>PL/Python</>'s error-reporting and + Extend <application>PL/Python</application>'s error-reporting and message-reporting functions to allow specifying additional message fields besides the primary error message (Pavel Stehule) </para> @@ -7055,7 +7055,7 @@ XXX this is pending backpatch, may need to remove --> <para> Allow PL/Python functions to call themselves recursively - via <application>SPI</>, and fix the behavior when multiple + via <application>SPI</application>, and fix the behavior when multiple set-returning PL/Python functions are called within one query (Alexey Grishchenko, Tom Lane) </para> @@ -7077,14 +7077,14 @@ XXX this is pending backpatch, may need to remove 2016-03-02 [e2609323e] Make PL/Tcl require Tcl 8.4 or later. --> <para> - Modernize <application>PL/Tcl</> to use Tcl's <quote>object</> - <acronym>API</>s instead of simple strings (Jim Nasby, Karl + Modernize <application>PL/Tcl</application> to use Tcl's <quote>object</quote> + <acronym>API</acronym>s instead of simple strings (Jim Nasby, Karl Lehenbauer) </para> <para> This can improve performance substantially in some cases. - Note that <application>PL/Tcl</> now requires Tcl 8.4 or later. + Note that <application>PL/Tcl</application> now requires Tcl 8.4 or later. </para> </listitem> @@ -7094,8 +7094,8 @@ XXX this is pending backpatch, may need to remove 2016-03-25 [cd37bb785] Improve PL/Tcl errorCode facility by providing decoded n --> <para> - In <application>PL/Tcl</>, make database-reported errors return - additional information in Tcl's <varname>errorCode</> global + In <application>PL/Tcl</application>, make database-reported errors return + additional information in Tcl's <varname>errorCode</varname> global variable (Jim Nasby, Tom Lane) </para> @@ -7110,15 +7110,15 @@ XXX this is pending backpatch, may need to remove 2016-03-02 [c8c7c93de] Fix PL/Tcl's encoding conversion logic. --> <para> - Fix <application>PL/Tcl</> to perform encoding conversion between - the database encoding and <literal>UTF-8</>, which is what Tcl + Fix <application>PL/Tcl</application> to perform encoding conversion between + the database encoding and <literal>UTF-8</literal>, which is what Tcl expects (Tom Lane) </para> <para> Previously, strings were passed through without conversion, - leading to misbehavior with non-<literal>ASCII</> characters when - the database encoding was not <literal>UTF-8</>. + leading to misbehavior with non-<literal>ASCII</literal> characters when + the database encoding was not <literal>UTF-8</literal>. </para> </listitem> @@ -7137,7 +7137,7 @@ XXX this is pending backpatch, may need to remove --> <para> Add a nonlocalized version of - the <link linkend="protocol-error-fields">severity field</> in + the <link linkend="protocol-error-fields">severity field</link> in error and notice messages (Tom Lane) </para> @@ -7154,17 +7154,17 @@ XXX this is pending backpatch, may need to remove This commit is also listed under psql and PL/pgSQL --> <para> - Introduce a feature in <application>libpq</> whereby the - <literal>CONTEXT</> field of messages can be suppressed, either + Introduce a feature in <application>libpq</application> whereby the + <literal>CONTEXT</literal> field of messages can be suppressed, either always or only for non-error messages (Pavel Stehule) </para> <para> The default behavior of <link - linkend="libpq-pqerrormessage"><function>PQerrorMessage()</></> - is now to print <literal>CONTEXT</> + linkend="libpq-pqerrormessage"><function>PQerrorMessage()</function></link> + is now to print <literal>CONTEXT</literal> only for errors. The new function <link - linkend="libpq-pqseterrorcontextvisibility"><function>PQsetErrorContextVisibility()</></> + linkend="libpq-pqseterrorcontextvisibility"><function>PQsetErrorContextVisibility()</function></link> can be used to adjust this. </para> </listitem> @@ -7174,14 +7174,14 @@ This commit is also listed under psql and PL/pgSQL 2016-04-03 [e3161b231] Add libpq support for recreating an error message with d --> <para> - Add support in <application>libpq</> for regenerating an error + Add support in <application>libpq</application> for regenerating an error message with a different verbosity level (Alex Shulgin) </para> <para> This is done with the new function <link - linkend="libpq-pqresultverboseerrormessage"><function>PQresultVerboseErrorMessage()</></>. - This supports <application>psql</>'s new <literal>\errverbose</> + linkend="libpq-pqresultverboseerrormessage"><function>PQresultVerboseErrorMessage()</function></link>. + This supports <application>psql</application>'s new <literal>\errverbose</literal> feature, and may be useful for other clients as well. </para> </listitem> @@ -7191,13 +7191,13 @@ This commit is also listed under psql and PL/pgSQL 2015-11-27 [40cb21f70] Improve PQhost() to return useful data for default Unix- --> <para> - Improve <application>libpq</>'s <link - linkend="libpq-pqhost"><function>PQhost()</></> function to return + Improve <application>libpq</application>'s <link + linkend="libpq-pqhost"><function>PQhost()</function></link> function to return useful data for default Unix-socket connections (Tom Lane) </para> <para> - Previously it would return <literal>NULL</> if no explicit host + Previously it would return <literal>NULL</literal> if no explicit host specification had been given; now it returns the default socket directory path. </para> @@ -7208,7 +7208,7 @@ This commit is also listed under psql and PL/pgSQL 2016-02-16 [fc1ae7d2e] Change ecpg lexer to accept comments with line breaks in --> <para> - Fix <application>ecpg</>'s lexer to handle line breaks within + Fix <application>ecpg</application>'s lexer to handle line breaks within comments starting on preprocessor directive lines (Michael Meskes) </para> </listitem> @@ -7227,9 +7227,9 @@ This commit is also listed under psql and PL/pgSQL 2015-09-14 [d02426029] Check existency of table/schema for -t/-n option (pg_dum --> <para> - Add a <option>--strict-names</> option - to <link linkend="APP-PGDUMP"><application>pg_dump</></> - and <link linkend="APP-PGRESTORE"><application>pg_restore</></> + Add a <option>--strict-names</option> option + to <link linkend="APP-PGDUMP"><application>pg_dump</application></link> + and <link linkend="APP-PGRESTORE"><application>pg_restore</application></link> (Pavel Stehule) </para> @@ -7249,7 +7249,7 @@ This commit is also listed under psql and PL/pgSQL 2016-05-06 [e1b120a8c] Only issue LOCK TABLE commands when necessary --> <para> - In <application>pg_dump</>, dump locally-made changes of privilege + In <application>pg_dump</application>, dump locally-made changes of privilege assignments for system objects (Stephen Frost) </para> @@ -7257,7 +7257,7 @@ This commit is also listed under psql and PL/pgSQL While it has always been possible for a superuser to change the privilege assignments for built-in or extension-created objects, such changes were formerly lost in a dump and reload. - Now, <application>pg_dump</> recognizes and dumps such changes. + Now, <application>pg_dump</application> recognizes and dumps such changes. (This works only when dumping from a 9.6 or later server, however.) </para> </listitem> @@ -7267,7 +7267,7 @@ This commit is also listed under psql and PL/pgSQL 2016-09-08 [31eb14504] Allow pg_dump to dump non-extension members of an extens --> <para> - Allow <application>pg_dump</> to dump non-extension-owned objects + Allow <application>pg_dump</application> to dump non-extension-owned objects that are within an extension-owned schema (Martín Marqués) </para> @@ -7283,7 +7283,7 @@ This commit is also listed under psql and PL/pgSQL 2016-04-06 [3b3fcc4ee] pg_dump: Add table qualifications to some tags --> <para> - In <application>pg_dump</> output, include the table name in object + In <application>pg_dump</application> output, include the table name in object tags for object types that are only uniquely named per-table (for example, triggers) (Peter Eisentraut) </para> @@ -7308,7 +7308,7 @@ this commit is also listed in the compatibility section <para> The specified operations are carried out in the order in which the - options are given, and then <application>psql</> terminates. + options are given, and then <application>psql</application> terminates. </para> </listitem> @@ -7317,7 +7317,7 @@ this commit is also listed in the compatibility section 2016-04-08 [c09b18f21] Support \crosstabview in psql --> <para> - Add a <command>\crosstabview</> command that prints the results of + Add a <command>\crosstabview</command> command that prints the results of a query in a cross-tabulated display (Daniel Vérité) </para> @@ -7333,13 +7333,13 @@ this commit is also listed in the compatibility section 2016-04-03 [3cc38ca7d] Add psql \errverbose command to see last server error at --> <para> - Add an <literal>\errverbose</> command that shows the last server + Add an <literal>\errverbose</literal> command that shows the last server error at full verbosity (Alex Shulgin) </para> <para> This is useful after getting an unexpected error — you - no longer need to adjust the <varname>VERBOSITY</> variable and + no longer need to adjust the <varname>VERBOSITY</varname> variable and recreate the failure in order to see error fields that are not shown by default. </para> @@ -7351,13 +7351,13 @@ this commit is also listed in the compatibility section 2016-05-06 [9b66aa006] Fix psql's \ev and \sv commands so that they handle view --> <para> - Add <literal>\ev</> and <literal>\sv</> commands for editing and + Add <literal>\ev</literal> and <literal>\sv</literal> commands for editing and showing view definitions (Petr Korobeinikov) </para> <para> - These are parallel to the existing <literal>\ef</> and - <literal>\sf</> commands for functions. + These are parallel to the existing <literal>\ef</literal> and + <literal>\sf</literal> commands for functions. </para> </listitem> @@ -7366,7 +7366,7 @@ this commit is also listed in the compatibility section 2016-04-04 [2bbe9112a] Add a \gexec command to psql for evaluation of computed --> <para> - Add a <command>\gexec</> command that executes a query and + Add a <command>\gexec</command> command that executes a query and re-submits the result(s) as new queries (Corey Huinker) </para> </listitem> @@ -7376,9 +7376,9 @@ this commit is also listed in the compatibility section 2015-10-05 [2145a7660] psql: allow \pset C in setting the title, matches \C --> <para> - Allow <literal>\pset C <replaceable>string</></literal> + Allow <literal>\pset C <replaceable>string</replaceable></literal> to set the table title, for consistency with <literal>\C - <replaceable>string</></literal> (Bruce Momjian) + <replaceable>string</replaceable></literal> (Bruce Momjian) </para> </listitem> @@ -7387,7 +7387,7 @@ this commit is also listed in the compatibility section 2016-03-11 [69ab7b9d6] psql: Don't automatically use expanded format when there --> <para> - In <literal>\pset expanded auto</> mode, do not use expanded + In <literal>\pset expanded auto</literal> mode, do not use expanded format for query results with only one column (Andreas Karlsson, Robert Haas) </para> @@ -7399,16 +7399,16 @@ this commit is also listed in the compatibility section 2016-06-15 [9901d8ac2] Use strftime("%c") to format timestamps in psql's \watch --> <para> - Improve the headers output by the <command>\watch</> command + Improve the headers output by the <command>\watch</command> command (Michael Paquier, Tom Lane) </para> <para> - Include the <command>\pset title</> string if one has + Include the <command>\pset title</command> string if one has been set, and shorten the prefabricated part of the - header to be <literal><replaceable>timestamp</> (every - <replaceable>N</>s)</literal>. Also, the timestamp format now - obeys <application>psql</>'s locale environment. + header to be <literal><replaceable>timestamp</replaceable> (every + <replaceable>N</replaceable>s)</literal>. Also, the timestamp format now + obeys <application>psql</application>'s locale environment. </para> </listitem> @@ -7456,7 +7456,7 @@ this commit is also listed in the compatibility section 2015-07-07 [275f05c99] Add psql PROMPT variable showing the pid of the connecte --> <para> - Add a <literal>PROMPT</> option <literal>%p</> to insert the + Add a <literal>PROMPT</literal> option <literal>%p</literal> to insert the process ID of the connected backend (Julien Rouhaud) </para> </listitem> @@ -7467,13 +7467,13 @@ this commit is also listed in the compatibility section This commit is also listed under libpq and PL/pgSQL --> <para> - Introduce a feature whereby the <literal>CONTEXT</> field of + Introduce a feature whereby the <literal>CONTEXT</literal> field of messages can be suppressed, either always or only for non-error messages (Pavel Stehule) </para> <para> - Printing <literal>CONTEXT</> only for errors is now the default + Printing <literal>CONTEXT</literal> only for errors is now the default behavior. This can be changed by setting the special variable <varname>SHOW_CONTEXT</varname>. </para> @@ -7484,7 +7484,7 @@ This commit is also listed under libpq and PL/pgSQL 2016-07-11 [a670c24c3] Improve output of psql's \df+ command. --> <para> - Make <command>\df+</> show function access privileges and + Make <command>\df+</command> show function access privileges and parallel-safety attributes (Michael Paquier) </para> </listitem> @@ -7503,7 +7503,7 @@ This commit is also listed under libpq and PL/pgSQL 2016-03-20 [68ab8e8ba] SQL commands in pgbench scripts are now ended by semicol --> <para> - SQL commands in <application>pgbench</> scripts are now ended by + SQL commands in <application>pgbench</application> scripts are now ended by semicolons, not newlines (Kyotaro Horiguchi, Tom Lane) </para> @@ -7512,7 +7512,7 @@ This commit is also listed under libpq and PL/pgSQL Existing custom scripts will need to be modified to add a semicolon at the end of each line that does not have one already. (Doing so does not break the script for use with older versions - of <application>pgbench</>.) + of <application>pgbench</application>.) </para> </listitem> @@ -7525,7 +7525,7 @@ This commit is also listed under libpq and PL/pgSQL --> <para> Support floating-point arithmetic, as well as some <link - linkend="pgbench-builtin-functions">built-in functions</>, in + linkend="pgbench-builtin-functions">built-in functions</link>, in expressions in backslash commands (Fabien Coelho) </para> </listitem> @@ -7535,18 +7535,18 @@ This commit is also listed under libpq and PL/pgSQL 2016-03-29 [ad9566470] pgbench: Remove \setrandom. --> <para> - Replace <command>\setrandom</> with built-in functions (Fabien + Replace <command>\setrandom</command> with built-in functions (Fabien Coelho) </para> <para> The new built-in functions include <link - linkend="pgbench-functions"><function>random()</></>, - <function>random_exponential()</>, and - <function>random_gaussian()</>, which perform the same work as - <command>\setrandom</>, but are easier to use since they can be + linkend="pgbench-functions"><function>random()</function></link>, + <function>random_exponential()</function>, and + <function>random_gaussian()</function>, which perform the same work as + <command>\setrandom</command>, but are easier to use since they can be embedded in larger expressions. Since these additions have made - <command>\setrandom</> obsolete, remove it. + <command>\setrandom</command> obsolete, remove it. </para> </listitem> @@ -7561,8 +7561,8 @@ This commit is also listed under libpq and PL/pgSQL </para> <para> - This is done with the new <option>-b</> switch, which works - similarly to <option>-f</> for custom scripts. + This is done with the new <option>-b</option> switch, which works + similarly to <option>-f</option> for custom scripts. </para> </listitem> @@ -7577,7 +7577,7 @@ This commit is also listed under libpq and PL/pgSQL </para> <para> - When multiple scripts are specified, each <application>pgbench</> + When multiple scripts are specified, each <application>pgbench</application> transaction randomly chooses one to execute. Formerly this was always done with uniform probability, but now different selection probabilities can be specified for different scripts. @@ -7604,7 +7604,7 @@ This commit is also listed under libpq and PL/pgSQL 2015-09-16 [1def9063c] pgbench progress with timestamp --> <para> - Add a <option>--progress-timestamp</> option to report progress + Add a <option>--progress-timestamp</option> option to report progress with Unix epoch timestamps, instead of time since the run started (Fabien Coelho) </para> @@ -7615,8 +7615,8 @@ This commit is also listed under libpq and PL/pgSQL 2015-07-03 [ba3deeefb] Lift the limitation that # of clients must be a multiple --> <para> - Allow the number of client connections (<option>-c</>) to not - be an exact multiple of the number of threads (<option>-j</>) + Allow the number of client connections (<option>-c</option>) to not + be an exact multiple of the number of threads (<option>-j</option>) (Fabien Coelho) </para> </listitem> @@ -7626,13 +7626,13 @@ This commit is also listed under libpq and PL/pgSQL 2016-03-09 [accf7616f] pgbench: When -T is used, don't wait for transactions be --> <para> - When the <option>-T</> option is used, stop promptly at the end + When the <option>-T</option> option is used, stop promptly at the end of the specified time (Fabien Coelho) </para> <para> Previously, specifying a low transaction rate could cause - <application>pgbench</> to wait significantly longer than + <application>pgbench</application> to wait significantly longer than specified. </para> </listitem> @@ -7653,15 +7653,15 @@ This commit is also listed under libpq and PL/pgSQL 2015-12-17 [66d947b9d] Adjust behavior of single-user -j mode for better initdb --> <para> - Improve error reporting during <application>initdb</>'s + Improve error reporting during <application>initdb</application>'s post-bootstrap phase (Tom Lane) </para> <para> Previously, an error here led to reporting the entire input - file as the <quote>failing query</>; now just the current + file as the <quote>failing query</quote>; now just the current query is reported. To get the desired behavior, queries in - <application>initdb</>'s input files must be separated by blank + <application>initdb</application>'s input files must be separated by blank lines. </para> </listitem> @@ -7672,7 +7672,7 @@ This commit is also listed under libpq and PL/pgSQL 2016-08-30 [d9720e437] Fix initdb misbehavior when user mis-enters superuser pa --> <para> - Speed up <application>initdb</> by using just one + Speed up <application>initdb</application> by using just one standalone-backend session for all the post-bootstrap steps (Tom Lane) </para> @@ -7683,7 +7683,7 @@ This commit is also listed under libpq and PL/pgSQL 2015-12-01 [e50cda784] Use pg_rewind when target timeline was switched --> <para> - Improve <link linkend="app-pgrewind"><application>pg_rewind</></> + Improve <link linkend="app-pgrewind"><application>pg_rewind</application></link> so that it can work when the target timeline changes (Alexander Korotkov) </para> @@ -7709,7 +7709,7 @@ This commit is also listed under libpq and PL/pgSQL --> <para> Remove obsolete - <function>heap_formtuple</>/<function>heap_modifytuple</>/<function>heap_deformtuple</> + <function>heap_formtuple</function>/<function>heap_modifytuple</function>/<function>heap_deformtuple</function> functions (Peter Geoghegan) </para> </listitem> @@ -7719,16 +7719,16 @@ This commit is also listed under libpq and PL/pgSQL 2016-08-27 [b9fe6cbc8] Add macros to make AllocSetContextCreate() calls simpler --> <para> - Add macros to make <function>AllocSetContextCreate()</> calls simpler + Add macros to make <function>AllocSetContextCreate()</function> calls simpler and safer (Tom Lane) </para> <para> Writing out the individual sizing parameters for a memory context is now deprecated in favor of using one of the new - macros <symbol>ALLOCSET_DEFAULT_SIZES</>, - <symbol>ALLOCSET_SMALL_SIZES</>, - or <symbol>ALLOCSET_START_SMALL_SIZES</>. + macros <symbol>ALLOCSET_DEFAULT_SIZES</symbol>, + <symbol>ALLOCSET_SMALL_SIZES</symbol>, + or <symbol>ALLOCSET_START_SMALL_SIZES</symbol>. Existing code continues to work, however. </para> </listitem> @@ -7738,7 +7738,7 @@ This commit is also listed under libpq and PL/pgSQL 2015-08-05 [de6fd1c89] Rely on inline functions even if that causes warnings in --> <para> - Unconditionally use <literal>static inline</> functions in header + Unconditionally use <literal>static inline</literal> functions in header files (Andres Freund) </para> @@ -7759,7 +7759,7 @@ This commit is also listed under libpq and PL/pgSQL 2016-05-06 [6bd356c33] Add TAP tests for pg_dump --> <para> - Improve <application>TAP</> testing infrastructure (Michael + Improve <application>TAP</application> testing infrastructure (Michael Paquier, Craig Ringer, Álvaro Herrera, Stephen Frost) </para> @@ -7774,7 +7774,7 @@ This commit is also listed under libpq and PL/pgSQL 2015-09-11 [aa65de042] When trace_lwlocks is used, identify individual lwlocks --> <para> - Make <varname>trace_lwlocks</> identify individual locks by name + Make <varname>trace_lwlocks</varname> identify individual locks by name (Robert Haas) </para> </listitem> @@ -7786,7 +7786,7 @@ This commit is also listed under libpq and PL/pgSQL 2016-01-05 [4f18010af] Convert psql's tab completion for backslash commands to --> <para> - Improve <application>psql</>'s tab-completion code infrastructure + Improve <application>psql</application>'s tab-completion code infrastructure (Thomas Munro, Michael Paquier) </para> @@ -7801,7 +7801,7 @@ This commit is also listed under libpq and PL/pgSQL 2016-01-05 [efa318bcf] Make pg_shseclabel available in early backend startup --> <para> - Nail the <structname>pg_shseclabel</> system catalog into cache, + Nail the <structname>pg_shseclabel</structname> system catalog into cache, so that it is available for access during connection authentication (Adam Brightwell) </para> @@ -7820,21 +7820,21 @@ This commit is also listed under libpq and PL/pgSQL --> <para> Restructure <link linkend="indexam">index access - method <acronym>API</></> to hide most of it at - the <application>C</> level (Alexander Korotkov, Andrew Gierth) + method <acronym>API</acronym></link> to hide most of it at + the <application>C</application> level (Alexander Korotkov, Andrew Gierth) </para> <para> - This change modernizes the index <acronym>AM API</> to look more + This change modernizes the index <acronym>AM API</acronym> to look more like the designs we have adopted for foreign data wrappers and - tablesample handlers. This simplifies the <application>C</> code + tablesample handlers. This simplifies the <application>C</application> code and makes it much more practical to define index access methods in installable extensions. A consequence is that most of the columns - of the <structname>pg_am</> system catalog have disappeared. + of the <structname>pg_am</structname> system catalog have disappeared. New <link linkend="functions-info-catalog-table">inspection functions</link> have been added to allow SQL queries to determine index AM properties that used to be discoverable - from <structname>pg_am</>. + from <structname>pg_am</structname>. </para> </listitem> @@ -7844,14 +7844,14 @@ This commit is also listed under libpq and PL/pgSQL --> <para> Add <link - linkend="catalog-pg-init-privs"><structname>pg_init_privs</></> + linkend="catalog-pg-init-privs"><structname>pg_init_privs</structname></link> system catalog to hold original privileges - of <application>initdb</>-created and extension-created objects + of <application>initdb</application>-created and extension-created objects (Stephen Frost) </para> <para> - This infrastructure allows <application>pg_dump</> to dump changes + This infrastructure allows <application>pg_dump</application> to dump changes that an installation may have made in privileges attached to system objects. Formerly, such changes would be lost in a dump and reload, but now they are preserved. @@ -7863,14 +7863,14 @@ This commit is also listed under libpq and PL/pgSQL 2016-02-04 [c1772ad92] Change the way that LWLocks for extensions are allocated --> <para> - Change the way that extensions allocate custom <literal>LWLocks</> + Change the way that extensions allocate custom <literal>LWLocks</literal> (Amit Kapila, Robert Haas) </para> <para> - The <function>RequestAddinLWLocks()</> function is removed, - and replaced by <function>RequestNamedLWLockTranche()</>. - This allows better identification of custom <literal>LWLocks</>, + The <function>RequestAddinLWLocks()</function> function is removed, + and replaced by <function>RequestNamedLWLockTranche()</function>. + This allows better identification of custom <literal>LWLocks</literal>, and is less error-prone. </para> </listitem> @@ -7894,7 +7894,7 @@ This commit is also listed under libpq and PL/pgSQL </para> <para> - This change allows <application>FDW</>s or custom scan providers + This change allows <application>FDW</application>s or custom scan providers to store data in a plan tree in a more convenient format than was previously possible. </para> @@ -7911,7 +7911,7 @@ This commit is also listed under libpq and PL/pgSQL --> <para> Make the planner deal with post-scan/join query steps by generating - and comparing <literal>Paths</>, replacing a lot of ad-hoc logic + and comparing <literal>Paths</literal>, replacing a lot of ad-hoc logic (Tom Lane) </para> @@ -7961,7 +7961,7 @@ This commit is also listed under libpq and PL/pgSQL 2016-03-24 [c1156411a] Move psql's psqlscan.l into src/fe_utils. --> <para> - Separate out <application>psql</>'s <application>flex</> lexer to + Separate out <application>psql</application>'s <application>flex</application> lexer to make it usable by other client programs (Tom Lane, Kyotaro Horiguchi) </para> @@ -7970,12 +7970,12 @@ This commit is also listed under libpq and PL/pgSQL This eliminates code duplication for programs that need to be able to parse SQL commands well enough to identify command boundaries. Doing that in full generality is more painful than one could - wish, and up to now only <application>psql</> has really gotten + wish, and up to now only <application>psql</application> has really gotten it right among our supported client programs. </para> <para> - A new source-code subdirectory <filename>src/fe_utils/</> has + A new source-code subdirectory <filename>src/fe_utils/</filename> has been created to hold this and other code that is shared across our client programs. Formerly such sharing was accomplished by symbolic linking or copying source files at build time, which @@ -7988,7 +7988,7 @@ This commit is also listed under libpq and PL/pgSQL 2016-03-21 [98a64d0bd] Introduce WaitEventSet API. --> <para> - Introduce <literal>WaitEventSet</> <acronym>API</> to allow + Introduce <literal>WaitEventSet</literal> <acronym>API</acronym> to allow efficient waiting for event sets that usually do not change from one wait to the next (Andres Freund, Amit Kapila) </para> @@ -7999,16 +7999,16 @@ This commit is also listed under libpq and PL/pgSQL 2016-04-01 [65578341a] Add Generic WAL interface --> <para> - Add a generic interface for writing <acronym>WAL</> records + Add a generic interface for writing <acronym>WAL</acronym> records (Alexander Korotkov, Petr Jelínek, Markus Nullmeier) </para> <para> - This change allows extensions to write <acronym>WAL</> records for + This change allows extensions to write <acronym>WAL</acronym> records for changes to pages using a standard layout. The problem of needing to - replay <acronym>WAL</> without access to the extension is solved by + replay <acronym>WAL</acronym> without access to the extension is solved by having generic replay code. This allows extensions to implement, - for example, index access methods and have <acronym>WAL</> + for example, index access methods and have <acronym>WAL</acronym> support for them. </para> </listitem> @@ -8018,13 +8018,13 @@ This commit is also listed under libpq and PL/pgSQL 2016-04-06 [3fe3511d0] Generic Messages for Logical Decoding --> <para> - Support generic <acronym>WAL</> messages for logical decoding + Support generic <acronym>WAL</acronym> messages for logical decoding (Petr Jelínek, Andres Freund) </para> <para> This feature allows extensions to insert data into the - <acronym>WAL</> stream that can be read by logical-decoding + <acronym>WAL</acronym> stream that can be read by logical-decoding plugins, but is not connected to physical data restoration. </para> </listitem> @@ -8036,12 +8036,12 @@ This commit is also listed under libpq and PL/pgSQL --> <para> Allow SP-GiST operator classes to store an arbitrary - <quote>traversal value</> while descending the index (Alexander + <quote>traversal value</quote> while descending the index (Alexander Lebedev, Teodor Sigaev) </para> <para> - This is somewhat like the <quote>reconstructed value</>, but it + This is somewhat like the <quote>reconstructed value</quote>, but it could be any arbitrary chunk of data, not necessarily of the same data type as the indexed column. </para> @@ -8052,12 +8052,12 @@ This commit is also listed under libpq and PL/pgSQL 2016-04-04 [66229ac00] Introduce a LOG_SERVER_ONLY ereport level, which is neve --> <para> - Introduce a <literal>LOG_SERVER_ONLY</> message level for - <function>ereport()</> (David Steele) + Introduce a <literal>LOG_SERVER_ONLY</literal> message level for + <function>ereport()</function> (David Steele) </para> <para> - This level acts like <literal>LOG</> except that the message is + This level acts like <literal>LOG</literal> except that the message is never sent to the client. It is meant for use in auditing and similar applications. </para> @@ -8068,14 +8068,14 @@ This commit is also listed under libpq and PL/pgSQL 2016-07-01 [548af97fc] Provide and use a makefile target to build all generated --> <para> - Provide a <filename>Makefile</> target to build all generated + Provide a <filename>Makefile</filename> target to build all generated headers (Michael Paquier, Tom Lane) </para> <para> - <literal>submake-generated-headers</> can now be invoked to ensure + <literal>submake-generated-headers</literal> can now be invoked to ensure that generated backend header files are up-to-date. This is - useful in subdirectories that might be built <quote>standalone</>. + useful in subdirectories that might be built <quote>standalone</quote>. </para> </listitem> @@ -8104,8 +8104,8 @@ This commit is also listed under libpq and PL/pgSQL 2016-03-13 [7a8d87483] Rename auto_explain.sample_ratio to sample_rate --> <para> - Add configuration parameter <literal>auto_explain.sample_rate</> to - allow <link linkend="auto-explain"><filename>contrib/auto_explain</></> + Add configuration parameter <literal>auto_explain.sample_rate</literal> to + allow <link linkend="auto-explain"><filename>contrib/auto_explain</filename></link> to capture just a configurable fraction of all queries (Craig Ringer, Julien Rouhaud) </para> @@ -8121,7 +8121,7 @@ This commit is also listed under libpq and PL/pgSQL 2016-04-01 [9ee014fc8] Bloom index contrib module --> <para> - Add <link linkend="bloom"><filename>contrib/bloom</></> module that + Add <link linkend="bloom"><filename>contrib/bloom</filename></link> module that implements an index access method based on Bloom filtering (Teodor Sigaev, Alexander Korotkov) </para> @@ -8139,7 +8139,7 @@ This commit is also listed under libpq and PL/pgSQL 2015-12-28 [81ee726d8] Code and docs review for cube kNN support. --> <para> - In <link linkend="cube"><filename>contrib/cube</></>, introduce + In <link linkend="cube"><filename>contrib/cube</filename></link>, introduce distance operators for cubes, and support kNN-style searches in GiST indexes on cube columns (Stas Kelvich) </para> @@ -8150,19 +8150,19 @@ This commit is also listed under libpq and PL/pgSQL 2016-02-03 [41d2c081c] Make hstore_to_jsonb_loose match hstore_to_json_loose on --> <para> - Make <filename>contrib/hstore</>'s <link - linkend="hstore-func-table"><function>hstore_to_jsonb_loose()</></> - and <function>hstore_to_json_loose()</> functions agree on what + Make <filename>contrib/hstore</filename>'s <link + linkend="hstore-func-table"><function>hstore_to_jsonb_loose()</function></link> + and <function>hstore_to_json_loose()</function> functions agree on what is a number (Tom Lane) </para> <para> - Previously, <function>hstore_to_jsonb_loose()</> would convert - numeric-looking strings to <acronym>JSON</> numbers, rather than - strings, even if they did not exactly match the <acronym>JSON</> + Previously, <function>hstore_to_jsonb_loose()</function> would convert + numeric-looking strings to <acronym>JSON</acronym> numbers, rather than + strings, even if they did not exactly match the <acronym>JSON</acronym> syntax specification for numbers. This was inconsistent with - <function>hstore_to_json_loose()</>, so tighten the test to match - the <acronym>JSON</> syntax. + <function>hstore_to_json_loose()</function>, so tighten the test to match + the <acronym>JSON</acronym> syntax. </para> </listitem> @@ -8172,7 +8172,7 @@ This commit is also listed under libpq and PL/pgSQL --> <para> Add selectivity estimation functions for - <link linkend="intarray"><filename>contrib/intarray</></> operators + <link linkend="intarray"><filename>contrib/intarray</filename></link> operators to improve plans for queries using those operators (Yury Zhuravlev, Alexander Korotkov) </para> @@ -8184,10 +8184,10 @@ This commit is also listed under libpq and PL/pgSQL --> <para> Make <link - linkend="pageinspect"><filename>contrib/pageinspect</></>'s - <function>heap_page_items()</> function show the raw data in each - tuple, and add new functions <function>tuple_data_split()</> and - <function>heap_page_item_attrs()</> for inspection of individual + linkend="pageinspect"><filename>contrib/pageinspect</filename></link>'s + <function>heap_page_items()</function> function show the raw data in each + tuple, and add new functions <function>tuple_data_split()</function> and + <function>heap_page_item_attrs()</function> for inspection of individual tuple fields (Nikolay Shaplov) </para> </listitem> @@ -8197,9 +8197,9 @@ This commit is also listed under libpq and PL/pgSQL 2016-03-09 [188f359d3] pgcrypto: support changing S2K iteration count --> <para> - Add an optional <literal>S2K</> iteration count parameter to - <link linkend="pgcrypto"><filename>contrib/pgcrypto</></>'s - <function>pgp_sym_encrypt()</> function (Jeff Janes) + Add an optional <literal>S2K</literal> iteration count parameter to + <link linkend="pgcrypto"><filename>contrib/pgcrypto</filename></link>'s + <function>pgp_sym_encrypt()</function> function (Jeff Janes) </para> </listitem> @@ -8208,8 +8208,8 @@ This commit is also listed under libpq and PL/pgSQL 2016-03-16 [f576b17cd] Add word_similarity to pg_trgm contrib module. --> <para> - Add support for <quote>word similarity</> to - <link linkend="pgtrgm"><filename>contrib/pg_trgm</></> + Add support for <quote>word similarity</quote> to + <link linkend="pgtrgm"><filename>contrib/pg_trgm</filename></link> (Alexander Korotkov, Artur Zakirov) </para> @@ -8226,14 +8226,14 @@ This commit is also listed under libpq and PL/pgSQL --> <para> Add configuration parameter - <varname>pg_trgm.similarity_threshold</> for - <filename>contrib/pg_trgm</>'s similarity threshold (Artur Zakirov) + <varname>pg_trgm.similarity_threshold</varname> for + <filename>contrib/pg_trgm</filename>'s similarity threshold (Artur Zakirov) </para> <para> This threshold has always been configurable, but formerly it was - controlled by special-purpose functions <function>set_limit()</> - and <function>show_limit()</>. Those are now deprecated. + controlled by special-purpose functions <function>set_limit()</function> + and <function>show_limit()</function>. Those are now deprecated. </para> </listitem> @@ -8242,7 +8242,7 @@ This commit is also listed under libpq and PL/pgSQL 2015-07-20 [97f301464] This supports the triconsistent function for pg_trgm GIN --> <para> - Improve <filename>contrib/pg_trgm</>'s GIN operator class to + Improve <filename>contrib/pg_trgm</filename>'s GIN operator class to speed up index searches in which both common and rare keys appear (Jeff Janes) </para> @@ -8254,7 +8254,7 @@ This commit is also listed under libpq and PL/pgSQL --> <para> Improve performance of similarity searches in - <filename>contrib/pg_trgm</> GIN indexes (Christophe Fornaroli) + <filename>contrib/pg_trgm</filename> GIN indexes (Christophe Fornaroli) </para> </listitem> @@ -8265,7 +8265,7 @@ This commit is also listed under libpq and PL/pgSQL --> <para> Add <link - linkend="pgvisibility"><filename>contrib/pg_visibility</></> module + linkend="pgvisibility"><filename>contrib/pg_visibility</filename></link> module to allow examining table visibility maps (Robert Haas) </para> </listitem> @@ -8275,9 +8275,9 @@ This commit is also listed under libpq and PL/pgSQL 2015-09-07 [49124613f] contrib/sslinfo: add ssl_extension_info SRF --> <para> - Add <link linkend="sslinfo"><function>ssl_extension_info()</></> - function to <filename>contrib/sslinfo</>, to print information - about <acronym>SSL</> extensions present in the <literal>X509</> + Add <link linkend="sslinfo"><function>ssl_extension_info()</function></link> + function to <filename>contrib/sslinfo</filename>, to print information + about <acronym>SSL</acronym> extensions present in the <literal>X509</literal> certificate used for the current connection (Dmitry Voronin) </para> </listitem> @@ -8285,7 +8285,7 @@ This commit is also listed under libpq and PL/pgSQL </itemizedlist> <sect4> - <title><link linkend="postgres-fdw"><filename>postgres_fdw</></></title> + <title><link linkend="postgres-fdw"><filename>postgres_fdw</filename></link></title> <itemizedlist> @@ -8332,12 +8332,12 @@ This commit is also listed under libpq and PL/pgSQL 2016-03-18 [0bf3ae88a] Directly modify foreign tables. --> <para> - When feasible, perform <command>UPDATE</> or <command>DELETE</> + When feasible, perform <command>UPDATE</command> or <command>DELETE</command> entirely on the remote server (Etsuro Fujita) </para> <para> - Formerly, remote updates involved sending a <command>SELECT FOR UPDATE</> + Formerly, remote updates involved sending a <command>SELECT FOR UPDATE</command> command and then updating or deleting the selected rows one-by-one. While that is still necessary if the operation requires any local processing, it can now be done remotely if all elements of the @@ -8355,7 +8355,7 @@ This commit is also listed under libpq and PL/pgSQL </para> <para> - Formerly, <filename>postgres_fdw</> always fetched 100 rows at + Formerly, <filename>postgres_fdw</filename> always fetched 100 rows at a time from remote queries; now that behavior is configurable. </para> </listitem> diff --git a/doc/src/sgml/release-old.sgml b/doc/src/sgml/release-old.sgml index 24a72333787..e95e5cac24b 100644 --- a/doc/src/sgml/release-old.sgml +++ b/doc/src/sgml/release-old.sgml @@ -15,7 +15,7 @@ </para> <para> - This is expected to be the last <productname>PostgreSQL</> release + This is expected to be the last <productname>PostgreSQL</productname> release in the 7.3.X series. Users are encouraged to update to a newer release branch soon. </para> @@ -39,7 +39,7 @@ <listitem> <para> Prevent functions in indexes from executing with the privileges of - the user running <command>VACUUM</>, <command>ANALYZE</>, etc (Tom) + the user running <command>VACUUM</command>, <command>ANALYZE</command>, etc (Tom) </para> <para> @@ -50,60 +50,60 @@ (Note that triggers, defaults, check constraints, etc. pose the same type of risk.) But functions in indexes pose extra danger because they will be executed by routine maintenance operations - such as <command>VACUUM FULL</>, which are commonly performed + such as <command>VACUUM FULL</command>, which are commonly performed automatically under a superuser account. For example, a nefarious user can execute code with superuser privileges by setting up a trojan-horse index definition and waiting for the next routine vacuum. The fix arranges for standard maintenance operations - (including <command>VACUUM</>, <command>ANALYZE</>, <command>REINDEX</>, - and <command>CLUSTER</>) to execute as the table owner rather than + (including <command>VACUUM</command>, <command>ANALYZE</command>, <command>REINDEX</command>, + and <command>CLUSTER</command>) to execute as the table owner rather than the calling user, using the same privilege-switching mechanism already - used for <literal>SECURITY DEFINER</> functions. To prevent bypassing + used for <literal>SECURITY DEFINER</literal> functions. To prevent bypassing this security measure, execution of <command>SET SESSION - AUTHORIZATION</> and <command>SET ROLE</> is now forbidden within a - <literal>SECURITY DEFINER</> context. (CVE-2007-6600) + AUTHORIZATION</command> and <command>SET ROLE</command> is now forbidden within a + <literal>SECURITY DEFINER</literal> context. (CVE-2007-6600) </para> </listitem> <listitem> <para> - Require non-superusers who use <filename>/contrib/dblink</> to use only + Require non-superusers who use <filename>/contrib/dblink</filename> to use only password authentication, as a security measure (Joe) </para> <para> The fix that appeared for this in 7.3.20 was incomplete, as it plugged - the hole for only some <filename>dblink</> functions. (CVE-2007-6601, + the hole for only some <filename>dblink</filename> functions. (CVE-2007-6601, CVE-2007-3278) </para> </listitem> <listitem> <para> - Fix potential crash in <function>translate()</> when using a multibyte + Fix potential crash in <function>translate()</function> when using a multibyte database encoding (Tom) </para> </listitem> <listitem> <para> - Make <filename>contrib/tablefunc</>'s <function>crosstab()</> handle + Make <filename>contrib/tablefunc</filename>'s <function>crosstab()</function> handle NULL rowid as a category in its own right, rather than crashing (Joe) </para> </listitem> <listitem> <para> - Require a specific version of <productname>Autoconf</> to be used - when re-generating the <command>configure</> script (Peter) + Require a specific version of <productname>Autoconf</productname> to be used + when re-generating the <command>configure</command> script (Peter) </para> <para> This affects developers and packagers only. The change was made to prevent accidental use of untested combinations of - <productname>Autoconf</> and <productname>PostgreSQL</> versions. + <productname>Autoconf</productname> and <productname>PostgreSQL</productname> versions. You can remove the version check if you really want to use a - different <productname>Autoconf</> version, but it's + different <productname>Autoconf</productname> version, but it's your responsibility whether the result works or not. </para> </listitem> @@ -144,27 +144,27 @@ <listitem> <para> Prevent index corruption when a transaction inserts rows and - then aborts close to the end of a concurrent <command>VACUUM</> + then aborts close to the end of a concurrent <command>VACUUM</command> on the same table (Tom) </para> </listitem> <listitem> <para> - Make <command>CREATE DOMAIN ... DEFAULT NULL</> work properly (Tom) + Make <command>CREATE DOMAIN ... DEFAULT NULL</command> work properly (Tom) </para> </listitem> <listitem> <para> - Fix crash when <varname>log_min_error_statement</> logging runs out + Fix crash when <varname>log_min_error_statement</varname> logging runs out of memory (Tom) </para> </listitem> <listitem> <para> - Require non-superusers who use <filename>/contrib/dblink</> to use only + Require non-superusers who use <filename>/contrib/dblink</filename> to use only password authentication, as a security measure (Joe) </para> </listitem> @@ -206,22 +206,22 @@ <listitem> <para> Support explicit placement of the temporary-table schema within - <varname>search_path</>, and disable searching it for functions + <varname>search_path</varname>, and disable searching it for functions and operators (Tom) </para> <para> This is needed to allow a security-definer function to set a - truly secure value of <varname>search_path</>. Without it, + truly secure value of <varname>search_path</varname>. Without it, an unprivileged SQL user can use temporary objects to execute code with the privileges of the security-definer function (CVE-2007-2138). - See <command>CREATE FUNCTION</> for more information. + See <command>CREATE FUNCTION</command> for more information. </para> </listitem> <listitem> <para> - Fix potential-data-corruption bug in how <command>VACUUM FULL</> handles - <command>UPDATE</> chains (Tom, Pavan Deolasee) + Fix potential-data-corruption bug in how <command>VACUUM FULL</command> handles + <command>UPDATE</command> chains (Tom, Pavan Deolasee) </para> </listitem> @@ -322,13 +322,13 @@ <listitem> <para> - <function>to_number()</> and <function>to_char(numeric)</> - are now <literal>STABLE</>, not <literal>IMMUTABLE</>, for - new <application>initdb</> installs (Tom) + <function>to_number()</function> and <function>to_char(numeric)</function> + are now <literal>STABLE</literal>, not <literal>IMMUTABLE</literal>, for + new <application>initdb</application> installs (Tom) </para> <para> - This is because <varname>lc_numeric</> can potentially + This is because <varname>lc_numeric</varname> can potentially change the output of these functions. </para> </listitem> @@ -339,7 +339,7 @@ </para> <para> - This improves <application>psql</> <literal>\d</> performance also. + This improves <application>psql</application> <literal>\d</literal> performance also. </para> </listitem> @@ -376,7 +376,7 @@ <itemizedlist> <listitem><para>Fix corner cases in pattern matching for - <application>psql</>'s <literal>\d</> commands</para></listitem> + <application>psql</application>'s <literal>\d</literal> commands</para></listitem> <listitem><para>Fix index-corrupting bugs in /contrib/ltree (Teodor)</para></listitem> <listitem><para>Back-port 7.4 spinlock code to improve performance and support @@ -419,9 +419,9 @@ into SQL commands, you should examine them as soon as possible to ensure that they are using recommended escaping techniques. In most cases, applications should be using subroutines provided by - libraries or drivers (such as <application>libpq</>'s - <function>PQescapeStringConn()</>) to perform string escaping, - rather than relying on <foreignphrase>ad hoc</> code to do it. + libraries or drivers (such as <application>libpq</application>'s + <function>PQescapeStringConn()</function>) to perform string escaping, + rather than relying on <foreignphrase>ad hoc</foreignphrase> code to do it. </para> </sect2> @@ -431,46 +431,46 @@ <itemizedlist> <listitem><para>Change the server to reject invalidly-encoded multibyte characters in all cases (Tatsuo, Tom)</para> -<para>While <productname>PostgreSQL</> has been moving in this direction for +<para>While <productname>PostgreSQL</productname> has been moving in this direction for some time, the checks are now applied uniformly to all encodings and all textual input, and are now always errors not merely warnings. This change defends against SQL-injection attacks of the type described in CVE-2006-2313. </para></listitem> -<listitem><para>Reject unsafe uses of <literal>\'</> in string literals</para> +<listitem><para>Reject unsafe uses of <literal>\'</literal> in string literals</para> <para>As a server-side defense against SQL-injection attacks of the type -described in CVE-2006-2314, the server now only accepts <literal>''</> and not -<literal>\'</> as a representation of ASCII single quote in SQL string -literals. By default, <literal>\'</> is rejected only when -<varname>client_encoding</> is set to a client-only encoding (SJIS, BIG5, GBK, +described in CVE-2006-2314, the server now only accepts <literal>''</literal> and not +<literal>\'</literal> as a representation of ASCII single quote in SQL string +literals. By default, <literal>\'</literal> is rejected only when +<varname>client_encoding</varname> is set to a client-only encoding (SJIS, BIG5, GBK, GB18030, or UHC), which is the scenario in which SQL injection is possible. -A new configuration parameter <varname>backslash_quote</> is available to +A new configuration parameter <varname>backslash_quote</varname> is available to adjust this behavior when needed. Note that full security against CVE-2006-2314 might require client-side changes; the purpose of -<varname>backslash_quote</> is in part to make it obvious that insecure +<varname>backslash_quote</varname> is in part to make it obvious that insecure clients are insecure. </para></listitem> -<listitem><para>Modify <application>libpq</>'s string-escaping routines to be +<listitem><para>Modify <application>libpq</application>'s string-escaping routines to be aware of encoding considerations</para> -<para>This fixes <application>libpq</>-using applications for the security +<para>This fixes <application>libpq</application>-using applications for the security issues described in CVE-2006-2313 and CVE-2006-2314. -Applications that use multiple <productname>PostgreSQL</> connections -concurrently should migrate to <function>PQescapeStringConn()</> and -<function>PQescapeByteaConn()</> to ensure that escaping is done correctly +Applications that use multiple <productname>PostgreSQL</productname> connections +concurrently should migrate to <function>PQescapeStringConn()</function> and +<function>PQescapeByteaConn()</function> to ensure that escaping is done correctly for the settings in use in each database connection. Applications that -do string escaping <quote>by hand</> should be modified to rely on library +do string escaping <quote>by hand</quote> should be modified to rely on library routines instead. </para></listitem> <listitem><para>Fix some incorrect encoding conversion functions</para> -<para><function>win1251_to_iso</>, <function>alt_to_iso</>, -<function>euc_tw_to_big5</>, <function>euc_tw_to_mic</>, -<function>mic_to_euc_tw</> were all broken to varying +<para><function>win1251_to_iso</function>, <function>alt_to_iso</function>, +<function>euc_tw_to_big5</function>, <function>euc_tw_to_mic</function>, +<function>mic_to_euc_tw</function> were all broken to varying extents. </para></listitem> -<listitem><para>Clean up stray remaining uses of <literal>\'</> in strings +<listitem><para>Clean up stray remaining uses of <literal>\'</literal> in strings (Bruce, Jan)</para></listitem> <listitem><para>Fix server to use custom DH SSL parameters correctly (Michael @@ -510,7 +510,7 @@ Fuhr)</para></listitem> <itemizedlist> <listitem><para>Fix potential crash in <command>SET -SESSION AUTHORIZATION</> (CVE-2006-0553)</para> +SESSION AUTHORIZATION</command> (CVE-2006-0553)</para> <para>An unprivileged user could crash the server process, resulting in momentary denial of service to other users, if the server has been compiled with Asserts enabled (which is not the default). @@ -525,14 +525,14 @@ created in 7.3.11 release. </para></listitem> <listitem><para>Fix race condition that could lead to <quote>file already -exists</> errors during pg_clog file creation +exists</quote> errors during pg_clog file creation (Tom)</para></listitem> <listitem><para>Fix to allow restoring dumps that have cross-schema references to custom operators (Tom)</para></listitem> -<listitem><para>Portability fix for testing presence of <function>finite</> -and <function>isinf</> during configure (Tom)</para></listitem> +<listitem><para>Portability fix for testing presence of <function>finite</function> +and <function>isinf</function> during configure (Tom)</para></listitem> </itemizedlist> @@ -558,9 +558,9 @@ and <function>isinf</> during configure (Tom)</para></listitem> A dump/restore is not required for those running 7.3.X. However, if you are upgrading from a version earlier than 7.3.10, see <xref linkend="release-7-3-10">. - Also, you might need to <command>REINDEX</> indexes on textual + Also, you might need to <command>REINDEX</command> indexes on textual columns after updating, if you are affected by the locale or - <application>plperl</> issues described below. + <application>plperl</application> issues described below. </para> </sect2> @@ -571,28 +571,28 @@ and <function>isinf</> during configure (Tom)</para></listitem> <listitem><para>Fix character string comparison for locales that consider different character combinations as equal, such as Hungarian (Tom)</para> -<para>This might require <command>REINDEX</> to fix existing indexes on +<para>This might require <command>REINDEX</command> to fix existing indexes on textual columns.</para></listitem> <listitem><para>Set locale environment variables during postmaster startup -to ensure that <application>plperl</> won't change the locale later</para> -<para>This fixes a problem that occurred if the <application>postmaster</> was +to ensure that <application>plperl</application> won't change the locale later</para> +<para>This fixes a problem that occurred if the <application>postmaster</application> was started with environment variables specifying a different locale than what -<application>initdb</> had been told. Under these conditions, any use of -<application>plperl</> was likely to lead to corrupt indexes. You might need -<command>REINDEX</> to fix existing indexes on +<application>initdb</application> had been told. Under these conditions, any use of +<application>plperl</application> was likely to lead to corrupt indexes. You might need +<command>REINDEX</command> to fix existing indexes on textual columns if this has happened to you.</para></listitem> <listitem><para>Fix longstanding bug in strpos() and regular expression handling in certain rarely used Asian multi-byte character sets (Tatsuo) </para></listitem> -<listitem><para>Fix bug in <filename>/contrib/pgcrypto</> gen_salt, +<listitem><para>Fix bug in <filename>/contrib/pgcrypto</filename> gen_salt, which caused it not to use all available salt space for MD5 and XDES algorithms (Marko Kreen, Solar Designer)</para> <para>Salts for Blowfish and standard DES are unaffected.</para></listitem> -<listitem><para>Fix <filename>/contrib/dblink</> to throw an error, +<listitem><para>Fix <filename>/contrib/dblink</filename> to throw an error, rather than crashing, when the number of columns specified is different from what's actually returned by the query (Joe)</para></listitem> @@ -634,13 +634,13 @@ for the wrong page, leading to an Assert failure or data corruption.</para> </listitem> -<listitem><para><filename>/contrib/ltree</> fixes (Teodor)</para></listitem> +<listitem><para><filename>/contrib/ltree</filename> fixes (Teodor)</para></listitem> <listitem><para>Fix longstanding planning error for outer joins</para> <para>This bug sometimes caused a bogus error <quote>RIGHT JOIN is -only supported with merge-joinable join conditions</>.</para></listitem> +only supported with merge-joinable join conditions</quote>.</para></listitem> -<listitem><para>Prevent core dump in <application>pg_autovacuum</> when a +<listitem><para>Prevent core dump in <application>pg_autovacuum</application> when a table has been dropped</para></listitem> </itemizedlist> @@ -674,25 +674,25 @@ table has been dropped</para></listitem> <title>Changes</title> <itemizedlist> -<listitem><para>Fix error that allowed <command>VACUUM</> to remove -<literal>ctid</> chains too soon, and add more checking in code that follows -<literal>ctid</> links</para> +<listitem><para>Fix error that allowed <command>VACUUM</command> to remove +<literal>ctid</literal> chains too soon, and add more checking in code that follows +<literal>ctid</literal> links</para> <para>This fixes a long-standing problem that could cause crashes in very rare circumstances.</para></listitem> -<listitem><para>Fix <type>CHAR()</> to properly pad spaces to the specified +<listitem><para>Fix <type>CHAR()</type> to properly pad spaces to the specified length when using a multiple-byte character set (Yoshiyuki Asaba)</para> -<para>In prior releases, the padding of <type>CHAR()</> was incorrect +<para>In prior releases, the padding of <type>CHAR()</type> was incorrect because it only padded to the specified number of bytes without considering how many characters were stored.</para></listitem> <listitem><para>Fix missing rows in queries like <literal>UPDATE a=... WHERE -a...</> with GiST index on column <literal>a</></para></listitem> +a...</literal> with GiST index on column <literal>a</literal></para></listitem> <listitem><para>Improve checking for partially-written WAL pages</para></listitem> <listitem><para>Improve robustness of signal handling when SSL is enabled</para></listitem> <listitem><para>Various memory leakage fixes</para></listitem> <listitem><para>Various portability improvements</para></listitem> -<listitem><para>Fix PL/pgSQL to handle <literal>var := var</> correctly when +<listitem><para>Fix PL/pgSQL to handle <literal>var := var</literal> correctly when the variable is of pass-by-reference type</para></listitem> </itemizedlist> @@ -754,17 +754,17 @@ COMMIT; </para> <para> - The above procedure must be carried out in <emphasis>each</> database - of an installation, including <literal>template1</>, and ideally - including <literal>template0</> as well. If you do not fix the + The above procedure must be carried out in <emphasis>each</emphasis> database + of an installation, including <literal>template1</literal>, and ideally + including <literal>template0</literal> as well. If you do not fix the template databases then any subsequently created databases will contain - the same error. <literal>template1</> can be fixed in the same way - as any other database, but fixing <literal>template0</> requires + the same error. <literal>template1</literal> can be fixed in the same way + as any other database, but fixing <literal>template0</literal> requires additional steps. First, from any database issue: <programlisting> UPDATE pg_database SET datallowconn = true WHERE datname = 'template0'; </programlisting> - Next connect to <literal>template0</> and perform the above repair + Next connect to <literal>template0</literal> and perform the above repair procedure. Finally, do: <programlisting> -- re-freeze template0: @@ -792,34 +792,34 @@ VACUUM</para> freshly-inserted data, although the scenario seems of very low probability. There are no known cases of it having caused more than an Assert failure. </para></listitem> -<listitem><para>Fix comparisons of <type>TIME WITH TIME ZONE</> values</para> +<listitem><para>Fix comparisons of <type>TIME WITH TIME ZONE</type> values</para> <para> The comparison code was wrong in the case where the -<literal>--enable-integer-datetimes</> configuration switch had been used. -NOTE: if you have an index on a <type>TIME WITH TIME ZONE</> column, -it will need to be <command>REINDEX</>ed after installing this update, because +<literal>--enable-integer-datetimes</literal> configuration switch had been used. +NOTE: if you have an index on a <type>TIME WITH TIME ZONE</type> column, +it will need to be <command>REINDEX</command>ed after installing this update, because the fix corrects the sort order of column values. </para></listitem> -<listitem><para>Fix <function>EXTRACT(EPOCH)</> for -<type>TIME WITH TIME ZONE</> values</para></listitem> +<listitem><para>Fix <function>EXTRACT(EPOCH)</function> for +<type>TIME WITH TIME ZONE</type> values</para></listitem> <listitem><para>Fix mis-display of negative fractional seconds in -<type>INTERVAL</> values</para> +<type>INTERVAL</type> values</para> <para> This error only occurred when the -<literal>--enable-integer-datetimes</> configuration switch had been used. +<literal>--enable-integer-datetimes</literal> configuration switch had been used. </para></listitem> <listitem><para>Additional buffer overrun checks in plpgsql (Neil)</para></listitem> -<listitem><para>Fix pg_dump to dump trigger names containing <literal>%</> +<listitem><para>Fix pg_dump to dump trigger names containing <literal>%</literal> correctly (Neil)</para></listitem> -<listitem><para>Prevent <function>to_char(interval)</> from dumping core for +<listitem><para>Prevent <function>to_char(interval)</function> from dumping core for month-related formats</para></listitem> -<listitem><para>Fix <filename>contrib/pgcrypto</> for newer OpenSSL builds +<listitem><para>Fix <filename>contrib/pgcrypto</filename> for newer OpenSSL builds (Marko Kreen)</para></listitem> <listitem><para>Still more 64-bit fixes for -<filename>contrib/intagg</></para></listitem> +<filename>contrib/intagg</filename></para></listitem> <listitem><para>Prevent incorrect optimization of functions returning -<type>RECORD</></para></listitem> +<type>RECORD</type></para></listitem> </itemizedlist> </sect2> @@ -850,11 +850,11 @@ month-related formats</para></listitem> <title>Changes</title> <itemizedlist> -<listitem><para>Disallow <command>LOAD</> to non-superusers</para> +<listitem><para>Disallow <command>LOAD</command> to non-superusers</para> <para> On platforms that will automatically execute initialization functions of a shared library (this includes at least Windows and ELF-based Unixen), -<command>LOAD</> can be used to make the server execute arbitrary code. +<command>LOAD</command> can be used to make the server execute arbitrary code. Thanks to NGS Software for reporting this.</para></listitem> <listitem><para>Check that creator of an aggregate function has the right to execute the specified transition functions</para> @@ -909,7 +909,7 @@ datestyles</para></listitem> <listitem><para>Repair possible failure to update hint bits on disk</para> <para> Under rare circumstances this oversight could lead to -<quote>could not access transaction status</> failures, which qualifies +<quote>could not access transaction status</quote> failures, which qualifies it as a potential-data-loss bug. </para></listitem> <listitem><para>Ensure that hashed outer join does not miss tuples</para> @@ -1264,13 +1264,13 @@ operations on bytea columns (Joe)</para></listitem> <itemizedlist> <listitem><para>Restore creation of OID column in CREATE TABLE AS / SELECT INTO</para></listitem> -<listitem><para>Fix <application>pg_dump</> core dump when dumping views having comments</para></listitem> +<listitem><para>Fix <application>pg_dump</application> core dump when dumping views having comments</para></listitem> <listitem><para>Dump DEFERRABLE/INITIALLY DEFERRED constraints properly</para></listitem> <listitem><para>Fix UPDATE when child table's column numbering differs from parent</para></listitem> <listitem><para>Increase default value of max_fsm_relations</para></listitem> <listitem><para>Fix problem when fetching backwards in a cursor for a single-row query</para></listitem> <listitem><para>Make backward fetch work properly with cursor on SELECT DISTINCT query</para></listitem> -<listitem><para>Fix problems with loading <application>pg_dump</> files containing contrib/lo usage</para></listitem> +<listitem><para>Fix problems with loading <application>pg_dump</application> files containing contrib/lo usage</para></listitem> <listitem><para>Fix problem with all-numeric user names</para></listitem> <listitem><para>Fix possible memory leak and core dump during disconnect in libpgtcl</para></listitem> <listitem><para>Make plpython's spi_execute command handle nulls properly (Andrew Bosma)</para></listitem> @@ -1328,7 +1328,7 @@ operations on bytea columns (Joe)</para></listitem> <itemizedlist> <listitem><para>Fix a core dump of COPY TO when client/server encodings don't match (Tom)</para></listitem> -<listitem><para>Allow <application>pg_dump</> to work with pre-7.2 servers (Philip)</para></listitem> +<listitem><para>Allow <application>pg_dump</application> to work with pre-7.2 servers (Philip)</para></listitem> <listitem><para>contrib/adddepend fixes (Tom)</para></listitem> <listitem><para>Fix problem with deletion of per-user/per-database config settings (Tom)</para></listitem> <listitem><para>contrib/vacuumlo fix (Tom)</para></listitem> @@ -1418,7 +1418,7 @@ operations on bytea columns (Joe)</para></listitem> <productname>PostgreSQL</productname> now records object dependencies, which allows improvements in many areas. <command>DROP</command> statements now take either - <literal>CASCADE</> or <literal>RESTRICT</> to control whether + <literal>CASCADE</literal> or <literal>RESTRICT</literal> to control whether dependent objects are also dropped. </para> </listitem> @@ -1458,7 +1458,7 @@ operations on bytea columns (Joe)</para></listitem> <listitem> <para> A large number of interfaces have been moved to <ulink - url="http://gborg.postgresql.org">http://gborg.postgresql.org</> + url="http://gborg.postgresql.org">http://gborg.postgresql.org</ulink> where they can be developed and released independently. </para> </listitem> @@ -1469,9 +1469,9 @@ operations on bytea columns (Joe)</para></listitem> <listitem> <para> By default, functions can now take up to 32 parameters, and - identifiers can be up to 63 bytes long. Also, <literal>OPAQUE</> - is now deprecated: there are specific <quote>pseudo-datatypes</> - to represent each of the former meanings of <literal>OPAQUE</> + identifiers can be up to 63 bytes long. Also, <literal>OPAQUE</literal> + is now deprecated: there are specific <quote>pseudo-datatypes</quote> + to represent each of the former meanings of <literal>OPAQUE</literal> in function argument and result types. </para> </listitem> @@ -1484,12 +1484,12 @@ operations on bytea columns (Joe)</para></listitem> <title>Migration to Version 7.3</title> <para> - A dump/restore using <application>pg_dump</> is required for those + A dump/restore using <application>pg_dump</application> is required for those wishing to migrate data from any previous release. If your application examines the system catalogs, additional changes will be required due to the introduction of schemas in 7.3; for more information, see: <ulink - url="http://developer.postgresql.org/~momjian/upgrade_tips_7.3"></>. + url="http://developer.postgresql.org/~momjian/upgrade_tips_7.3"></ulink>. </para> <para> @@ -1538,7 +1538,7 @@ operations on bytea columns (Joe)</para></listitem> <listitem> <para> <type>serial</type> columns are no longer automatically - <literal>UNIQUE</>; thus, an index will not automatically be + <literal>UNIQUE</literal>; thus, an index will not automatically be created. </para> </listitem> @@ -1724,7 +1724,7 @@ operations on bytea columns (Joe)</para></listitem> <itemizedlist> <listitem><para>Have COPY TO output embedded carriage returns and newlines as \r and \n (Tom)</para></listitem> <listitem><para>Allow DELIMITER in COPY FROM to be 8-bit clean (Tatsuo)</para></listitem> -<listitem><para>Make <application>pg_dump</> use ALTER TABLE ADD PRIMARY KEY, for performance (Neil)</para></listitem> +<listitem><para>Make <application>pg_dump</application> use ALTER TABLE ADD PRIMARY KEY, for performance (Neil)</para></listitem> <listitem><para>Disable brackets in multistatement rules (Bruce)</para></listitem> <listitem><para>Disable VACUUM from being called inside a function (Bruce)</para></listitem> <listitem><para>Allow dropdb and other scripts to use identifiers with spaces (Bruce)</para></listitem> @@ -1736,7 +1736,7 @@ operations on bytea columns (Joe)</para></listitem> <listitem><para>Add 'SET LOCAL var = value' to set configuration variables for a single transaction (Tom)</para></listitem> <listitem><para>Allow ANALYZE to run in a transaction (Bruce)</para></listitem> <listitem><para>Improve COPY syntax using new WITH clauses, keep backward compatibility (Bruce)</para></listitem> -<listitem><para>Fix <application>pg_dump</> to consistently output tags in non-ASCII dumps (Bruce)</para></listitem> +<listitem><para>Fix <application>pg_dump</application> to consistently output tags in non-ASCII dumps (Bruce)</para></listitem> <listitem><para>Make foreign key constraints clearer in dump file (Rod)</para></listitem> <listitem><para>Add COMMENT ON CONSTRAINT (Rod)</para></listitem> <listitem><para>Allow COPY TO/FROM to specify column names (Brent Verner)</para></listitem> @@ -1745,9 +1745,9 @@ operations on bytea columns (Joe)</para></listitem> <listitem><para>Generate failure on short COPY lines rather than pad NULLs (Neil)</para></listitem> <listitem><para>Fix CLUSTER to preserve all table attributes (Alvaro Herrera)</para></listitem> <listitem><para>New pg_settings table to view/modify GUC settings (Joe)</para></listitem> -<listitem><para>Add smart quoting, portability improvements to <application>pg_dump</> output (Peter)</para></listitem> +<listitem><para>Add smart quoting, portability improvements to <application>pg_dump</application> output (Peter)</para></listitem> <listitem><para>Dump serial columns out as SERIAL (Tom)</para></listitem> -<listitem><para>Enable large file support, >2G for <application>pg_dump</> (Peter, Philip Warner, Bruce)</para></listitem> +<listitem><para>Enable large file support, >2G for <application>pg_dump</application> (Peter, Philip Warner, Bruce)</para></listitem> <listitem><para>Disallow TRUNCATE on tables that are involved in referential constraints (Rod)</para></listitem> <listitem><para>Have TRUNCATE also auto-truncate the toast table of the relation (Tom)</para></listitem> <listitem><para>Add clusterdb utility that will auto-cluster an entire database based on previous CLUSTER operations (Alvaro Herrera)</para></listitem> @@ -2020,15 +2020,15 @@ VACUUM</para> freshly-inserted data, although the scenario seems of very low probability. There are no known cases of it having caused more than an Assert failure. </para></listitem> -<listitem><para>Fix <function>EXTRACT(EPOCH)</> for -<type>TIME WITH TIME ZONE</> values</para></listitem> +<listitem><para>Fix <function>EXTRACT(EPOCH)</function> for +<type>TIME WITH TIME ZONE</type> values</para></listitem> <listitem><para>Additional buffer overrun checks in plpgsql (Neil)</para></listitem> <listitem><para>Fix pg_dump to dump index names and trigger names containing -<literal>%</> correctly (Neil)</para></listitem> -<listitem><para>Prevent <function>to_char(interval)</> from dumping core for +<literal>%</literal> correctly (Neil)</para></listitem> +<listitem><para>Prevent <function>to_char(interval)</function> from dumping core for month-related formats</para></listitem> -<listitem><para>Fix <filename>contrib/pgcrypto</> for newer OpenSSL builds +<listitem><para>Fix <filename>contrib/pgcrypto</filename> for newer OpenSSL builds (Marko Kreen)</para></listitem> </itemizedlist> @@ -2060,11 +2060,11 @@ month-related formats</para></listitem> <title>Changes</title> <itemizedlist> -<listitem><para>Disallow <command>LOAD</> to non-superusers</para> +<listitem><para>Disallow <command>LOAD</command> to non-superusers</para> <para> On platforms that will automatically execute initialization functions of a shared library (this includes at least Windows and ELF-based Unixen), -<command>LOAD</> can be used to make the server execute arbitrary code. +<command>LOAD</command> can be used to make the server execute arbitrary code. Thanks to NGS Software for reporting this.</para></listitem> <listitem><para>Add needed STRICT marking to some contrib functions (Kris Jurka)</para></listitem> @@ -2111,7 +2111,7 @@ datestyles</para></listitem> <listitem><para>Repair possible failure to update hint bits on disk</para> <para> Under rare circumstances this oversight could lead to -<quote>could not access transaction status</> failures, which qualifies +<quote>could not access transaction status</quote> failures, which qualifies it as a potential-data-loss bug. </para></listitem> <listitem><para>Ensure that hashed outer join does not miss tuples</para> @@ -2247,7 +2247,7 @@ since <productname>PostgreSQL</productname> 7.1. <listitem><para>Handle pre-1970 date values in newer versions of glibc (Tom)</para></listitem> <listitem><para>Fix possible hang during server shutdown</para></listitem> <listitem><para>Prevent spinlock hangs on SMP PPC machines (Tomoyuki Niijima)</para></listitem> -<listitem><para>Fix <application>pg_dump</> to properly dump FULL JOIN USING (Tom)</para></listitem> +<listitem><para>Fix <application>pg_dump</application> to properly dump FULL JOIN USING (Tom)</para></listitem> </itemizedlist> </sect2> </sect1> @@ -2281,7 +2281,7 @@ since <productname>PostgreSQL</productname> 7.1. <listitem><para>Allow EXECUTE of "CREATE TABLE AS ... SELECT" in PL/pgSQL (Tom)</para></listitem> <listitem><para>Fix for compressed transaction log id wraparound (Tom)</para></listitem> <listitem><para>Fix PQescapeBytea/PQunescapeBytea so that they handle bytes > 0x7f (Tatsuo)</para></listitem> -<listitem><para>Fix for psql and <application>pg_dump</> crashing when invoked with non-existent long options (Tatsuo)</para></listitem> +<listitem><para>Fix for psql and <application>pg_dump</application> crashing when invoked with non-existent long options (Tatsuo)</para></listitem> <listitem><para>Fix crash when invoking geometric operators (Tom)</para></listitem> <listitem><para>Allow OPEN cursor(args) (Tom)</para></listitem> <listitem><para>Fix for rtree_gist index build (Teodor)</para></listitem> @@ -2354,7 +2354,7 @@ since <productname>PostgreSQL</productname> 7.1. <title>Overview</title> <para> - This release improves <productname>PostgreSQL</> for use in + This release improves <productname>PostgreSQL</productname> for use in high-volume applications. </para> @@ -2368,7 +2368,7 @@ since <productname>PostgreSQL</productname> 7.1. <listitem> <para> Vacuuming no longer locks tables, thus allowing normal user - access during the vacuum. A new <command>VACUUM FULL</> + access during the vacuum. A new <command>VACUUM FULL</command> command does old-style vacuum by locking the table and shrinking the on-disk copy of the table. </para> @@ -2400,7 +2400,7 @@ since <productname>PostgreSQL</productname> 7.1. <listitem> <para> The system now computes histogram column statistics during - <command>ANALYZE</>, allowing much better optimizer choices. + <command>ANALYZE</command>, allowing much better optimizer choices. </para> </listitem> </varlistentry> @@ -2472,15 +2472,15 @@ since <productname>PostgreSQL</productname> 7.1. <listitem> <para> - The <filename>pg_hba.conf</> and <filename>pg_ident.conf</> + The <filename>pg_hba.conf</filename> and <filename>pg_ident.conf</filename> configuration is now only reloaded after receiving a - <systemitem>SIGHUP</> signal, not with each connection. + <systemitem>SIGHUP</systemitem> signal, not with each connection. </para> </listitem> <listitem> <para> - The function <filename>octet_length()</> now returns the uncompressed data length. + The function <filename>octet_length()</filename> now returns the uncompressed data length. </para> </listitem> @@ -2693,7 +2693,7 @@ since <productname>PostgreSQL</productname> 7.1. <sect3> <title>Internationalization</title> <itemizedlist> -<listitem><para>National language support in psql, <application>pg_dump</>, libpq, and server (Peter E)</para></listitem> +<listitem><para>National language support in psql, <application>pg_dump</application>, libpq, and server (Peter E)</para></listitem> <listitem><para>Message translations in Chinese (simplified, traditional), Czech, French, German, Hungarian, Russian, Swedish (Peter E, Serguei A. Mokhov, Karel Zak, Weiping He, Zhenbang Wei, Kovacs Zoltan)</para></listitem> <listitem><para>Make trim, ltrim, rtrim, btrim, lpad, rpad, translate multibyte aware (Tatsuo)</para></listitem> <listitem><para>Add LATIN5,6,7,8,9,10 support (Tatsuo)</para></listitem> @@ -2705,7 +2705,7 @@ since <productname>PostgreSQL</productname> 7.1. </sect3> <sect3> - <title><application>PL/pgSQL</></title> + <title><application>PL/pgSQL</application></title> <itemizedlist> <listitem><para>Now uses portals for SELECT loops, allowing huge result sets (Jan)</para></listitem> <listitem><para>CURSOR and REFCURSOR support (Jan)</para></listitem> @@ -2745,7 +2745,7 @@ since <productname>PostgreSQL</productname> 7.1. </sect3> <sect3> - <title><application>psql</></title> + <title><application>psql</application></title> <itemizedlist> <listitem><para>\d displays indexes in unique, primary groupings (Christopher Kings-Lynne)</para></listitem> <listitem><para>Allow trailing semicolons in backslash commands (Greg Sabino Mullane)</para></listitem> @@ -2756,7 +2756,7 @@ since <productname>PostgreSQL</productname> 7.1. </sect3> <sect3> - <title><application>libpq</></title> + <title><application>libpq</application></title> <itemizedlist> <listitem><para>New function PQescapeString() to escape quotes in command strings (Florian Weimer)</para></listitem> <listitem><para>New function PQescapeBytea() escapes binary strings for use as SQL string literals</para></listitem> @@ -2818,7 +2818,7 @@ since <productname>PostgreSQL</productname> 7.1. </sect3> <sect3> - <title><application>ECPG</></title> + <title><application>ECPG</application></title> <itemizedlist> <listitem><para>EXECUTE ... INTO implemented (Christof Petig)</para></listitem> <listitem><para>Multiple row descriptor support (e.g. CARDINALITY) (Christof Petig)</para></listitem> @@ -2839,7 +2839,7 @@ since <productname>PostgreSQL</productname> 7.1. <listitem><para>Python fix fetchone() (Gerhard Haring)</para></listitem> <listitem><para>Use UTF, Unicode in Tcl where appropriate (Vsevolod Lobko, Reinhard Max)</para></listitem> <listitem><para>Add Tcl COPY TO/FROM (ljb)</para></listitem> -<listitem><para>Prevent output of default index op class in <application>pg_dump</> (Tom)</para></listitem> +<listitem><para>Prevent output of default index op class in <application>pg_dump</application> (Tom)</para></listitem> <listitem><para>Fix libpgeasy memory leak (Bruce)</para></listitem> </itemizedlist> </sect3> @@ -3547,9 +3547,9 @@ ecpg changes (Michael) <listitem> <para> SQL92 join syntax is now supported, though only as - <literal>INNER JOIN</> for this release. <literal>JOIN</>, - <literal>NATURAL JOIN</>, <literal>JOIN</>/<literal>USING</>, - and <literal>JOIN</>/<literal>ON</> are available, as are + <literal>INNER JOIN</literal> for this release. <literal>JOIN</literal>, + <literal>NATURAL JOIN</literal>, <literal>JOIN</literal>/<literal>USING</literal>, + and <literal>JOIN</literal>/<literal>ON</literal> are available, as are column correlation names. </para> </listitem> @@ -3959,7 +3959,7 @@ New multibyte encodings <para> This is basically a cleanup release for 6.5.2. We have added a new - <application>PgAccess</> that was missing in 6.5.2, and installed an NT-specific fix. + <application>PgAccess</application> that was missing in 6.5.2, and installed an NT-specific fix. </para> @@ -4209,7 +4209,7 @@ Add Win1250 (Czech) support (Pavel Behal) <listitem> <para> We continue to expand our port list, this time including - <systemitem class="osname">Windows NT</>/<systemitem>ix86</> and <systemitem class="osname">NetBSD</>/<systemitem>arm32</>. + <systemitem class="osname">Windows NT</systemitem>/<systemitem>ix86</systemitem> and <systemitem class="osname">NetBSD</systemitem>/<systemitem>arm32</systemitem>. </para> </listitem> </varlistentry> @@ -4234,7 +4234,7 @@ Add Win1250 (Czech) support (Pavel Behal) <para> New and updated material is present throughout the documentation. New <acronym>FAQ</acronym>s have been - contributed for <systemitem class="osname">SGI</> and <systemitem class="osname">AIX</> platforms. + contributed for <systemitem class="osname">SGI</systemitem> and <systemitem class="osname">AIX</systemitem> platforms. The <citetitle>Tutorial</citetitle> has introductory information on <acronym>SQL</acronym> from Stefan Simkovics. For the <citetitle>User's Guide</citetitle>, there are @@ -4926,7 +4926,7 @@ Correctly handles function calls on the left side of BETWEEN and LIKE clauses. </para> <para> A dump/restore is NOT required for those running 6.3 or 6.3.1. A -<literal>make distclean</>, <literal>make</>, and <literal>make install</> is all that is required. +<literal>make distclean</literal>, <literal>make</literal>, and <literal>make install</literal> is all that is required. This last step should be performed while the postmaster is not running. You should re-link any custom applications that use <productname>PostgreSQL</productname> libraries. </para> @@ -5003,7 +5003,7 @@ Improvements to the configuration autodetection for installation. </para> <para> A dump/restore is NOT required for those running 6.3. A -<literal>make distclean</>, <literal>make</>, and <literal>make install</> is all that is required. +<literal>make distclean</literal>, <literal>make</literal>, and <literal>make install</literal> is all that is required. This last step should be performed while the postmaster is not running. You should re-link any custom applications that use <productname>PostgreSQL</productname> libraries. </para> @@ -5128,7 +5128,7 @@ Better identify tcl and tk libs and includes(Bruce) </para> <para> Third, <type>char()</type> fields will now allow faster access than <type>varchar()</type> or - <type>text</type>. Specifically, the <type>text</> and <type>varchar()</type> have a penalty for access to + <type>text</type>. Specifically, the <type>text</type> and <type>varchar()</type> have a penalty for access to any columns after the first column of this type. <type>char()</type> used to also have this access penalty, but it no longer does. This might suggest that you redesign some of your tables, especially if you have short character @@ -5470,7 +5470,7 @@ to dump the 6.1 database. </sect2> <sect2> -<title>Migration from version 1.<replaceable>x</> to version 6.2</title> +<title>Migration from version 1.<replaceable>x</replaceable> to version 6.2</title> <para> Those migrating from earlier 1.* releases should first upgrade to 1.09 @@ -5689,11 +5689,11 @@ optimizer which uses <firstterm>genetic</firstterm> </para> <para> - The <quote>random</> results in the random test should cause the + The <quote>random</quote> results in the random test should cause the <quote>random</quote> test to be <quote>failed</quote>, since the regression tests are evaluated using a simple diff. However, - <quote>random</> does not seem to produce random results on my test - machine (Linux/<application>gcc</>/i686). + <quote>random</quote> does not seem to produce random results on my test + machine (Linux/<application>gcc</application>/i686). </para> <sect2> @@ -5990,16 +5990,16 @@ and a script to convert old <acronym>ASCII</acronym> files. <note> <para> The following notes are for the benefit of users who want to migrate -databases from <productname>Postgres95</> 1.01 and 1.02 to <productname>Postgres95</> 1.02.1. +databases from <productname>Postgres95</productname> 1.01 and 1.02 to <productname>Postgres95</productname> 1.02.1. </para> <para> -If you are starting afresh with <productname>Postgres95</> 1.02.1 and do not need +If you are starting afresh with <productname>Postgres95</productname> 1.02.1 and do not need to migrate old databases, you do not need to read any further. </para> </note> <para> -In order to upgrade older <productname>Postgres95</> version 1.01 or 1.02 databases to +In order to upgrade older <productname>Postgres95</productname> version 1.01 or 1.02 databases to version 1.02.1, the following steps are required: </para> <procedure> @@ -6013,7 +6013,7 @@ Start up a new 1.02.1 postmaster Add the new built-in functions and operators of 1.02.1 to 1.01 or 1.02 databases. This is done by running the new 1.02.1 server against your own 1.01 or 1.02 database and applying the queries attached at - the end of the file. This can be done easily through <command>psql</>. If your + the end of the file. This can be done easily through <command>psql</command>. If your 1.01 or 1.02 database is named <literal>testdb</literal> and you have cut the commands from the end of this file and saved them in <filename>addfunc.sql</filename>: <programlisting> @@ -6044,7 +6044,7 @@ sed 's/^\.$/\\./g' <in_file >out_file </programlisting> </para> <para> -If you are loading an older binary copy or non-<systemitem>stdout</> copy, there is no +If you are loading an older binary copy or non-<systemitem>stdout</systemitem> copy, there is no end-of-data character, and hence no conversion necessary. <programlisting> @@ -6135,15 +6135,15 @@ Contributors (apologies to any missed) <para> The following notes are for the benefit of users who want to migrate -databases from <productname>Postgres95</> 1.0 to <productname>Postgres95</> 1.01. +databases from <productname>Postgres95</productname> 1.0 to <productname>Postgres95</productname> 1.01. </para> <para> -If you are starting afresh with <productname>Postgres95</> 1.01 and do not need +If you are starting afresh with <productname>Postgres95</productname> 1.01 and do not need to migrate old databases, you do not need to read any further. </para> <para> -In order to <productname>Postgres95</> version 1.01 with databases created with -<productname>Postgres95</> version 1.0, the following steps are required: +In order to <productname>Postgres95</productname> version 1.01 with databases created with +<productname>Postgres95</productname> version 1.0, the following steps are required: </para> <procedure> <step> diff --git a/doc/src/sgml/release.sgml b/doc/src/sgml/release.sgml index f1f4e91252e..a815a48b8d0 100644 --- a/doc/src/sgml/release.sgml +++ b/doc/src/sgml/release.sgml @@ -44,7 +44,7 @@ For new features, add links to the documentation sections. <para> The release notes contain the significant changes in each - <productname>PostgreSQL</> release, with major features and migration + <productname>PostgreSQL</productname> release, with major features and migration issues listed at the top. The release notes do not contain changes that affect only a few users or changes that are internal and therefore not user-visible. For example, the optimizer is improved in almost every diff --git a/doc/src/sgml/rowtypes.sgml b/doc/src/sgml/rowtypes.sgml index 9d6768e0062..bc2fc9b8850 100644 --- a/doc/src/sgml/rowtypes.sgml +++ b/doc/src/sgml/rowtypes.sgml @@ -12,7 +12,7 @@ </indexterm> <para> - A <firstterm>composite type</> represents the structure of a row or record; + A <firstterm>composite type</firstterm> represents the structure of a row or record; it is essentially just a list of field names and their data types. <productname>PostgreSQL</productname> allows composite types to be used in many of the same ways that simple types can be used. For example, a @@ -36,11 +36,11 @@ CREATE TYPE inventory_item AS ( price numeric ); </programlisting> - The syntax is comparable to <command>CREATE TABLE</>, except that only + The syntax is comparable to <command>CREATE TABLE</command>, except that only field names and types can be specified; no constraints (such as <literal>NOT - NULL</>) can presently be included. Note that the <literal>AS</> keyword + NULL</literal>) can presently be included. Note that the <literal>AS</literal> keyword is essential; without it, the system will think a different kind - of <command>CREATE TYPE</> command is meant, and you will get odd syntax + of <command>CREATE TYPE</command> command is meant, and you will get odd syntax errors. </para> @@ -78,12 +78,12 @@ CREATE TABLE inventory_item ( price numeric CHECK (price > 0) ); </programlisting> - then the same <literal>inventory_item</> composite type shown above would + then the same <literal>inventory_item</literal> composite type shown above would come into being as a byproduct, and could be used just as above. Note however an important restriction of the current implementation: since no constraints are associated with a composite type, the constraints shown in the table - definition <emphasis>do not apply</> to values of the composite type + definition <emphasis>do not apply</emphasis> to values of the composite type outside the table. (A partial workaround is to use domain types as members of composite types.) </para> @@ -111,7 +111,7 @@ CREATE TABLE inventory_item ( <programlisting> '("fuzzy dice",42,1.99)' </programlisting> - which would be a valid value of the <literal>inventory_item</> type + which would be a valid value of the <literal>inventory_item</literal> type defined above. To make a field be NULL, write no characters at all in its position in the list. For example, this constant specifies a NULL third field: @@ -150,7 +150,7 @@ ROW('', 42, NULL) ('fuzzy dice', 42, 1.99) ('', 42, NULL) </programlisting> - The <literal>ROW</> expression syntax is discussed in more detail in <xref + The <literal>ROW</literal> expression syntax is discussed in more detail in <xref linkend="sql-syntax-row-constructors">. </para> </sect2> @@ -163,15 +163,15 @@ ROW('', 42, NULL) name, much like selecting a field from a table name. In fact, it's so much like selecting from a table name that you often have to use parentheses to keep from confusing the parser. For example, you might try to select - some subfields from our <literal>on_hand</> example table with something + some subfields from our <literal>on_hand</literal> example table with something like: <programlisting> SELECT item.name FROM on_hand WHERE item.price > 9.99; </programlisting> - This will not work since the name <literal>item</> is taken to be a table - name, not a column name of <literal>on_hand</>, per SQL syntax rules. + This will not work since the name <literal>item</literal> is taken to be a table + name, not a column name of <literal>on_hand</literal>, per SQL syntax rules. You must write it like this: <programlisting> @@ -186,7 +186,7 @@ SELECT (on_hand.item).name FROM on_hand WHERE (on_hand.item).price > 9.99; </programlisting> Now the parenthesized object is correctly interpreted as a reference to - the <literal>item</> column, and then the subfield can be selected from it. + the <literal>item</literal> column, and then the subfield can be selected from it. </para> <para> @@ -202,7 +202,7 @@ SELECT (my_func(...)).field FROM ... </para> <para> - The special field name <literal>*</> means <quote>all fields</>, as + The special field name <literal>*</literal> means <quote>all fields</quote>, as further explained in <xref linkend="rowtypes-usage">. </para> </sect2> @@ -221,7 +221,7 @@ INSERT INTO mytab (complex_col) VALUES((1.1,2.2)); UPDATE mytab SET complex_col = ROW(1.1,2.2) WHERE ...; </programlisting> - The first example omits <literal>ROW</>, the second uses it; we + The first example omits <literal>ROW</literal>, the second uses it; we could have done it either way. </para> @@ -234,12 +234,12 @@ UPDATE mytab SET complex_col.r = (complex_col).r + 1 WHERE ...; Notice here that we don't need to (and indeed cannot) put parentheses around the column name appearing just after - <literal>SET</>, but we do need parentheses when referencing the same + <literal>SET</literal>, but we do need parentheses when referencing the same column in the expression to the right of the equal sign. </para> <para> - And we can specify subfields as targets for <command>INSERT</>, too: + And we can specify subfields as targets for <command>INSERT</command>, too: <programlisting> INSERT INTO mytab (complex_col.r, complex_col.i) VALUES(1.1, 2.2); @@ -260,10 +260,10 @@ INSERT INTO mytab (complex_col.r, complex_col.i) VALUES(1.1, 2.2); </para> <para> - In <productname>PostgreSQL</>, a reference to a table name (or alias) + In <productname>PostgreSQL</productname>, a reference to a table name (or alias) in a query is effectively a reference to the composite value of the table's current row. For example, if we had a table - <structname>inventory_item</> as shown + <structname>inventory_item</structname> as shown <link linkend="rowtypes-declaring">above</link>, we could write: <programlisting> SELECT c FROM inventory_item c; @@ -278,12 +278,12 @@ SELECT c FROM inventory_item c; </programlisting> Note however that simple names are matched to column names before table names, so this example works only because there is no column - named <structfield>c</> in the query's tables. + named <structfield>c</structfield> in the query's tables. </para> <para> The ordinary qualified-column-name - syntax <replaceable>table_name</><literal>.</><replaceable>column_name</> + syntax <replaceable>table_name</replaceable><literal>.</literal><replaceable>column_name</replaceable> can be understood as applying <link linkend="field-selection">field selection</link> to the composite value of the table's current row. (For efficiency reasons, it's not actually implemented that way.) @@ -306,13 +306,13 @@ SELECT c.* FROM inventory_item c; <programlisting> SELECT c.name, c.supplier_id, c.price FROM inventory_item c; </programlisting> - <productname>PostgreSQL</> will apply this expansion behavior to + <productname>PostgreSQL</productname> will apply this expansion behavior to any composite-valued expression, although as shown <link linkend="rowtypes-accessing">above</link>, you need to write parentheses - around the value that <literal>.*</> is applied to whenever it's not a - simple table name. For example, if <function>myfunc()</> is a function - returning a composite type with columns <structfield>a</>, - <structfield>b</>, and <structfield>c</>, then these two queries have the + around the value that <literal>.*</literal> is applied to whenever it's not a + simple table name. For example, if <function>myfunc()</function> is a function + returning a composite type with columns <structfield>a</structfield>, + <structfield>b</structfield>, and <structfield>c</structfield>, then these two queries have the same result: <programlisting> SELECT (myfunc(x)).* FROM some_table; @@ -322,33 +322,33 @@ SELECT (myfunc(x)).a, (myfunc(x)).b, (myfunc(x)).c FROM some_table; <tip> <para> - <productname>PostgreSQL</> handles column expansion by + <productname>PostgreSQL</productname> handles column expansion by actually transforming the first form into the second. So, in this - example, <function>myfunc()</> would get invoked three times per row + example, <function>myfunc()</function> would get invoked three times per row with either syntax. If it's an expensive function you may wish to avoid that, which you can do with a query like: <programlisting> SELECT (m).* FROM (SELECT myfunc(x) AS m FROM some_table OFFSET 0) ss; </programlisting> - The <literal>OFFSET 0</> clause keeps the optimizer - from <quote>flattening</> the sub-select to arrive at the form with - multiple calls of <function>myfunc()</>. + The <literal>OFFSET 0</literal> clause keeps the optimizer + from <quote>flattening</quote> the sub-select to arrive at the form with + multiple calls of <function>myfunc()</function>. </para> </tip> <para> - The <replaceable>composite_value</><literal>.*</> syntax results in + The <replaceable>composite_value</replaceable><literal>.*</literal> syntax results in column expansion of this kind when it appears at the top level of - a <link linkend="queries-select-lists"><command>SELECT</> output - list</link>, a <link linkend="dml-returning"><literal>RETURNING</> - list</link> in <command>INSERT</>/<command>UPDATE</>/<command>DELETE</>, - a <link linkend="queries-values"><literal>VALUES</> clause</link>, or + a <link linkend="queries-select-lists"><command>SELECT</command> output + list</link>, a <link linkend="dml-returning"><literal>RETURNING</literal> + list</link> in <command>INSERT</command>/<command>UPDATE</command>/<command>DELETE</command>, + a <link linkend="queries-values"><literal>VALUES</literal> clause</link>, or a <link linkend="sql-syntax-row-constructors">row constructor</link>. In all other contexts (including when nested inside one of those - constructs), attaching <literal>.*</> to a composite value does not - change the value, since it means <quote>all columns</> and so the + constructs), attaching <literal>.*</literal> to a composite value does not + change the value, since it means <quote>all columns</quote> and so the same composite value is produced again. For example, - if <function>somefunc()</> accepts a composite-valued argument, + if <function>somefunc()</function> accepts a composite-valued argument, these queries are the same: <programlisting> @@ -356,16 +356,16 @@ SELECT somefunc(c.*) FROM inventory_item c; SELECT somefunc(c) FROM inventory_item c; </programlisting> - In both cases, the current row of <structname>inventory_item</> is + In both cases, the current row of <structname>inventory_item</structname> is passed to the function as a single composite-valued argument. - Even though <literal>.*</> does nothing in such cases, using it is good + Even though <literal>.*</literal> does nothing in such cases, using it is good style, since it makes clear that a composite value is intended. In - particular, the parser will consider <literal>c</> in <literal>c.*</> to + particular, the parser will consider <literal>c</literal> in <literal>c.*</literal> to refer to a table name or alias, not to a column name, so that there is - no ambiguity; whereas without <literal>.*</>, it is not clear - whether <literal>c</> means a table name or a column name, and in fact + no ambiguity; whereas without <literal>.*</literal>, it is not clear + whether <literal>c</literal> means a table name or a column name, and in fact the column-name interpretation will be preferred if there is a column - named <literal>c</>. + named <literal>c</literal>. </para> <para> @@ -376,27 +376,27 @@ SELECT * FROM inventory_item c ORDER BY c; SELECT * FROM inventory_item c ORDER BY c.*; SELECT * FROM inventory_item c ORDER BY ROW(c.*); </programlisting> - All of these <literal>ORDER BY</> clauses specify the row's composite + All of these <literal>ORDER BY</literal> clauses specify the row's composite value, resulting in sorting the rows according to the rules described in <xref linkend="composite-type-comparison">. However, - if <structname>inventory_item</> contained a column - named <structfield>c</>, the first case would be different from the + if <structname>inventory_item</structname> contained a column + named <structfield>c</structfield>, the first case would be different from the others, as it would mean to sort by that column only. Given the column names previously shown, these queries are also equivalent to those above: <programlisting> SELECT * FROM inventory_item c ORDER BY ROW(c.name, c.supplier_id, c.price); SELECT * FROM inventory_item c ORDER BY (c.name, c.supplier_id, c.price); </programlisting> - (The last case uses a row constructor with the key word <literal>ROW</> + (The last case uses a row constructor with the key word <literal>ROW</literal> omitted.) </para> <para> Another special syntactical behavior associated with composite values is - that we can use <firstterm>functional notation</> for extracting a field + that we can use <firstterm>functional notation</firstterm> for extracting a field of a composite value. The simple way to explain this is that - the notations <literal><replaceable>field</>(<replaceable>table</>)</> - and <literal><replaceable>table</>.<replaceable>field</></> + the notations <literal><replaceable>field</replaceable>(<replaceable>table</replaceable>)</literal> + and <literal><replaceable>table</replaceable>.<replaceable>field</replaceable></literal> are interchangeable. For example, these queries are equivalent: <programlisting> @@ -418,7 +418,7 @@ SELECT c.somefunc FROM inventory_item c; <para> This equivalence between functional notation and field notation makes it possible to use functions on composite types to implement - <quote>computed fields</>. + <quote>computed fields</quote>. <indexterm> <primary>computed field</primary> </indexterm> @@ -427,7 +427,7 @@ SELECT c.somefunc FROM inventory_item c; <secondary>computed</secondary> </indexterm> An application using the last query above wouldn't need to be directly - aware that <literal>somefunc</> isn't a real column of the table. + aware that <literal>somefunc</literal> isn't a real column of the table. </para> <tip> @@ -438,7 +438,7 @@ SELECT c.somefunc FROM inventory_item c; interpretation will be preferred, so that such a function could not be called without tricks. One way to force the function interpretation is to schema-qualify the function name, that is, write - <literal><replaceable>schema</>.<replaceable>func</>(<replaceable>compositevalue</>)</literal>. + <literal><replaceable>schema</replaceable>.<replaceable>func</replaceable>(<replaceable>compositevalue</replaceable>)</literal>. </para> </tip> </sect2> @@ -450,8 +450,8 @@ SELECT c.somefunc FROM inventory_item c; The external text representation of a composite value consists of items that are interpreted according to the I/O conversion rules for the individual field types, plus decoration that indicates the composite structure. - The decoration consists of parentheses (<literal>(</> and <literal>)</>) - around the whole value, plus commas (<literal>,</>) between adjacent + The decoration consists of parentheses (<literal>(</literal> and <literal>)</literal>) + around the whole value, plus commas (<literal>,</literal>) between adjacent items. Whitespace outside the parentheses is ignored, but within the parentheses it is considered part of the field value, and might or might not be significant depending on the input conversion rules for the field data type. @@ -466,7 +466,7 @@ SELECT c.somefunc FROM inventory_item c; <para> As shown previously, when writing a composite value you can write double quotes around any individual field value. - You <emphasis>must</> do so if the field value would otherwise + You <emphasis>must</emphasis> do so if the field value would otherwise confuse the composite-value parser. In particular, fields containing parentheses, commas, double quotes, or backslashes must be double-quoted. To put a double quote or backslash in a quoted composite field value, @@ -481,7 +481,7 @@ SELECT c.somefunc FROM inventory_item c; <para> A completely empty field value (no characters at all between the commas or parentheses) represents a NULL. To write a value that is an empty - string rather than NULL, write <literal>""</>. + string rather than NULL, write <literal>""</literal>. </para> <para> @@ -497,7 +497,7 @@ SELECT c.somefunc FROM inventory_item c; Remember that what you write in an SQL command will first be interpreted as a string literal, and then as a composite. This doubles the number of backslashes you need (assuming escape string syntax is used). - For example, to insert a <type>text</> field + For example, to insert a <type>text</type> field containing a double quote and a backslash in a composite value, you'd need to write: <programlisting> @@ -505,11 +505,11 @@ INSERT ... VALUES (E'("\\"\\\\")'); </programlisting> The string-literal processor removes one level of backslashes, so that what arrives at the composite-value parser looks like - <literal>("\"\\")</>. In turn, the string - fed to the <type>text</> data type's input routine - becomes <literal>"\</>. (If we were working + <literal>("\"\\")</literal>. In turn, the string + fed to the <type>text</type> data type's input routine + becomes <literal>"\</literal>. (If we were working with a data type whose input routine also treated backslashes specially, - <type>bytea</> for example, we might need as many as eight backslashes + <type>bytea</type> for example, we might need as many as eight backslashes in the command to get one backslash into the stored composite field.) Dollar quoting (see <xref linkend="sql-syntax-dollar-quoting">) can be used to avoid the need to double backslashes. @@ -518,10 +518,10 @@ INSERT ... VALUES (E'("\\"\\\\")'); <tip> <para> - The <literal>ROW</> constructor syntax is usually easier to work with + The <literal>ROW</literal> constructor syntax is usually easier to work with than the composite-literal syntax when writing composite values in SQL commands. - In <literal>ROW</>, individual field values are written the same way + In <literal>ROW</literal>, individual field values are written the same way they would be written when not members of a composite. </para> </tip> diff --git a/doc/src/sgml/rules.sgml b/doc/src/sgml/rules.sgml index 61c801a693d..095bf6459c6 100644 --- a/doc/src/sgml/rules.sgml +++ b/doc/src/sgml/rules.sgml @@ -99,7 +99,7 @@ <varlistentry> <term> the range table - <indexterm><primary>range table</></> + <indexterm><primary>range table</primary></indexterm> </term> <listitem> <para> @@ -150,7 +150,7 @@ <varlistentry> <term> the target list - <indexterm><primary>target list</></> + <indexterm><primary>target list</primary></indexterm> </term> <listitem> <para> @@ -168,9 +168,9 @@ <para> <command>DELETE</command> commands don't need a normal target list because they don't produce any result. Instead, the rule system - adds a special <acronym>CTID</> entry to the empty target list, + adds a special <acronym>CTID</acronym> entry to the empty target list, to allow the executor to find the row to be deleted. - (<acronym>CTID</> is added when the result relation is an ordinary + (<acronym>CTID</acronym> is added when the result relation is an ordinary table. If it is a view, a whole-row variable is added instead, as described in <xref linkend="rules-views-update">.) </para> @@ -178,7 +178,7 @@ <para> For <command>INSERT</command> commands, the target list describes the new rows that should go into the result relation. It consists of the - expressions in the <literal>VALUES</> clause or the ones from the + expressions in the <literal>VALUES</literal> clause or the ones from the <command>SELECT</command> clause in <literal>INSERT ... SELECT</literal>. The first step of the rewrite process adds target list entries for any columns that were not assigned to by @@ -193,8 +193,8 @@ rule system, it contains just the expressions from the <literal>SET column = expression</literal> part of the command. The planner will handle missing columns by inserting expressions that copy the values - from the old row into the new one. Just as for <command>DELETE</>, - the rule system adds a <acronym>CTID</> or whole-row variable so that + from the old row into the new one. Just as for <command>DELETE</command>, + the rule system adds a <acronym>CTID</acronym> or whole-row variable so that the executor can identify the old row to be updated. </para> @@ -218,7 +218,7 @@ this expression is a Boolean that tells whether the operation (<command>INSERT</command>, <command>UPDATE</command>, <command>DELETE</command>, or <command>SELECT</command>) for the - final result row should be executed or not. It corresponds to the <literal>WHERE</> clause + final result row should be executed or not. It corresponds to the <literal>WHERE</literal> clause of an <acronym>SQL</acronym> statement. </para> </listitem> @@ -230,18 +230,18 @@ </term> <listitem> <para> - The query's join tree shows the structure of the <literal>FROM</> clause. + The query's join tree shows the structure of the <literal>FROM</literal> clause. For a simple query like <literal>SELECT ... FROM a, b, c</literal>, the join tree is just - a list of the <literal>FROM</> items, because we are allowed to join them in - any order. But when <literal>JOIN</> expressions, particularly outer joins, + a list of the <literal>FROM</literal> items, because we are allowed to join them in + any order. But when <literal>JOIN</literal> expressions, particularly outer joins, are used, we have to join in the order shown by the joins. - In that case, the join tree shows the structure of the <literal>JOIN</> expressions. The - restrictions associated with particular <literal>JOIN</> clauses (from <literal>ON</> or - <literal>USING</> expressions) are stored as qualification expressions attached + In that case, the join tree shows the structure of the <literal>JOIN</literal> expressions. The + restrictions associated with particular <literal>JOIN</literal> clauses (from <literal>ON</literal> or + <literal>USING</literal> expressions) are stored as qualification expressions attached to those join-tree nodes. It turns out to be convenient to store - the top-level <literal>WHERE</> expression as a qualification attached to the + the top-level <literal>WHERE</literal> expression as a qualification attached to the top-level join-tree item, too. So really the join tree represents - both the <literal>FROM</> and <literal>WHERE</> clauses of a <command>SELECT</command>. + both the <literal>FROM</literal> and <literal>WHERE</literal> clauses of a <command>SELECT</command>. </para> </listitem> </varlistentry> @@ -252,7 +252,7 @@ </term> <listitem> <para> - The other parts of the query tree like the <literal>ORDER BY</> + The other parts of the query tree like the <literal>ORDER BY</literal> clause aren't of interest here. The rule system substitutes some entries there while applying rules, but that doesn't have much to do with the fundamentals of the rule @@ -274,8 +274,8 @@ </indexterm> <indexterm zone="rules-views"> - <primary>view</> - <secondary>implementation through rules</> + <primary>view</primary> + <secondary>implementation through rules</secondary> </indexterm> <para> @@ -313,7 +313,7 @@ CREATE RULE "_RETURN" AS ON SELECT TO myview DO INSTEAD </indexterm> <para> - Rules <literal>ON SELECT</> are applied to all queries as the last step, even + Rules <literal>ON SELECT</literal> are applied to all queries as the last step, even if the command given is an <command>INSERT</command>, <command>UPDATE</command> or <command>DELETE</command>. And they have different semantics from rules on the other command types in that they modify the @@ -322,10 +322,10 @@ CREATE RULE "_RETURN" AS ON SELECT TO myview DO INSTEAD </para> <para> - Currently, there can be only one action in an <literal>ON SELECT</> rule, and it must - be an unconditional <command>SELECT</> action that is <literal>INSTEAD</>. This restriction was + Currently, there can be only one action in an <literal>ON SELECT</literal> rule, and it must + be an unconditional <command>SELECT</command> action that is <literal>INSTEAD</literal>. This restriction was required to make rules safe enough to open them for ordinary users, and - it restricts <literal>ON SELECT</> rules to act like views. + it restricts <literal>ON SELECT</literal> rules to act like views. </para> <para> @@ -423,12 +423,12 @@ CREATE VIEW shoe_ready AS The <command>CREATE VIEW</command> command for the <literal>shoelace</literal> view (which is the simplest one we - have) will create a relation <literal>shoelace</> and an entry in + have) will create a relation <literal>shoelace</literal> and an entry in <structname>pg_rewrite</structname> that tells that there is a - rewrite rule that must be applied whenever the relation <literal>shoelace</> + rewrite rule that must be applied whenever the relation <literal>shoelace</literal> is referenced in a query's range table. The rule has no rule - qualification (discussed later, with the non-<command>SELECT</> rules, since - <command>SELECT</> rules currently cannot have them) and it is <literal>INSTEAD</>. Note + qualification (discussed later, with the non-<command>SELECT</command> rules, since + <command>SELECT</command> rules currently cannot have them) and it is <literal>INSTEAD</literal>. Note that rule qualifications are not the same as query qualifications. The action of our rule has a query qualification. The action of the rule is one query tree that is a copy of the @@ -438,7 +438,7 @@ CREATE VIEW shoe_ready AS <note> <para> The two extra range - table entries for <literal>NEW</> and <literal>OLD</> that you can see in + table entries for <literal>NEW</literal> and <literal>OLD</literal> that you can see in the <structname>pg_rewrite</structname> entry aren't of interest for <command>SELECT</command> rules. </para> @@ -533,7 +533,7 @@ SELECT shoelace.sl_name, shoelace.sl_avail, </programlisting> There is one difference however: the subquery's range table has two - extra entries <literal>shoelace old</> and <literal>shoelace new</>. These entries don't + extra entries <literal>shoelace old</literal> and <literal>shoelace new</literal>. These entries don't participate directly in the query, since they aren't referenced by the subquery's join tree or target list. The rewriter uses them to store the access privilege check information that was originally present @@ -548,8 +548,8 @@ SELECT shoelace.sl_name, shoelace.sl_avail, the remaining range-table entries in the top query (in this example there are no more), and it will recursively check the range-table entries in the added subquery to see if any of them reference views. (But it - won't expand <literal>old</> or <literal>new</> — otherwise we'd have infinite recursion!) - In this example, there are no rewrite rules for <literal>shoelace_data</> or <literal>unit</>, + won't expand <literal>old</literal> or <literal>new</literal> — otherwise we'd have infinite recursion!) + In this example, there are no rewrite rules for <literal>shoelace_data</literal> or <literal>unit</literal>, so rewriting is complete and the above is the final result given to the planner. </para> @@ -671,8 +671,8 @@ SELECT shoe_ready.shoename, shoe_ready.sh_avail, command other than a <command>SELECT</command>, the result relation points to the range-table entry where the result should go. Everything else is absolutely the same. So having two tables - <literal>t1</> and <literal>t2</> with columns <literal>a</> and - <literal>b</>, the query trees for the two statements: + <literal>t1</literal> and <literal>t2</literal> with columns <literal>a</literal> and + <literal>b</literal>, the query trees for the two statements: <programlisting> SELECT t2.b FROM t1, t2 WHERE t1.a = t2.a; @@ -685,27 +685,27 @@ UPDATE t1 SET b = t2.b FROM t2 WHERE t1.a = t2.a; <itemizedlist> <listitem> <para> - The range tables contain entries for the tables <literal>t1</> and <literal>t2</>. + The range tables contain entries for the tables <literal>t1</literal> and <literal>t2</literal>. </para> </listitem> <listitem> <para> The target lists contain one variable that points to column - <literal>b</> of the range table entry for table <literal>t2</>. + <literal>b</literal> of the range table entry for table <literal>t2</literal>. </para> </listitem> <listitem> <para> - The qualification expressions compare the columns <literal>a</> of both + The qualification expressions compare the columns <literal>a</literal> of both range-table entries for equality. </para> </listitem> <listitem> <para> - The join trees show a simple join between <literal>t1</> and <literal>t2</>. + The join trees show a simple join between <literal>t1</literal> and <literal>t2</literal>. </para> </listitem> </itemizedlist> @@ -714,7 +714,7 @@ UPDATE t1 SET b = t2.b FROM t2 WHERE t1.a = t2.a; <para> The consequence is, that both query trees result in similar execution plans: They are both joins over the two tables. For the - <command>UPDATE</command> the missing columns from <literal>t1</> are added to + <command>UPDATE</command> the missing columns from <literal>t1</literal> are added to the target list by the planner and the final query tree will read as: @@ -736,7 +736,7 @@ SELECT t1.a, t2.b FROM t1, t2 WHERE t1.a = t2.a; one is a <command>SELECT</command> command and the other is an <command>UPDATE</command> is handled higher up in the executor, where it knows that this is an <command>UPDATE</command>, and it knows that - this result should go into table <literal>t1</>. But which of the rows + this result should go into table <literal>t1</literal>. But which of the rows that are there has to be replaced by the new row? </para> @@ -744,12 +744,12 @@ SELECT t1.a, t2.b FROM t1, t2 WHERE t1.a = t2.a; To resolve this problem, another entry is added to the target list in <command>UPDATE</command> (and also in <command>DELETE</command>) statements: the current tuple ID - (<acronym>CTID</>).<indexterm><primary>CTID</></> + (<acronym>CTID</acronym>).<indexterm><primary>CTID</primary></indexterm> This is a system column containing the file block number and position in the block for the row. Knowing - the table, the <acronym>CTID</> can be used to retrieve the - original row of <literal>t1</> to be updated. After adding the - <acronym>CTID</> to the target list, the query actually looks like: + the table, the <acronym>CTID</acronym> can be used to retrieve the + original row of <literal>t1</literal> to be updated. After adding the + <acronym>CTID</acronym> to the target list, the query actually looks like: <programlisting> SELECT t1.a, t2.b, t1.ctid FROM t1, t2 WHERE t1.a = t2.a; @@ -759,9 +759,9 @@ SELECT t1.a, t2.b, t1.ctid FROM t1, t2 WHERE t1.a = t2.a; the stage. Old table rows aren't overwritten, and this is why <command>ROLLBACK</command> is fast. In an <command>UPDATE</command>, the new result row is inserted into the table (after stripping the - <acronym>CTID</>) and in the row header of the old row, which the - <acronym>CTID</> pointed to, the <literal>cmax</> and - <literal>xmax</> entries are set to the current command counter + <acronym>CTID</acronym>) and in the row header of the old row, which the + <acronym>CTID</acronym> pointed to, the <literal>cmax</literal> and + <literal>xmax</literal> entries are set to the current command counter and current transaction ID. Thus the old row is hidden, and after the transaction commits the vacuum cleaner can eventually remove the dead row. @@ -780,7 +780,7 @@ SELECT t1.a, t2.b, t1.ctid FROM t1, t2 WHERE t1.a = t2.a; The above demonstrates how the rule system incorporates view definitions into the original query tree. In the second example, a simple <command>SELECT</command> from one view created a final - query tree that is a join of 4 tables (<literal>unit</> was used twice with + query tree that is a join of 4 tables (<literal>unit</literal> was used twice with different names). </para> @@ -811,7 +811,7 @@ SELECT t1.a, t2.b, t1.ctid FROM t1, t2 WHERE t1.a = t2.a; <command>DELETE</command>? Doing the substitutions described above would give a query tree in which the result relation points at a subquery range-table entry, which will not - work. There are several ways in which <productname>PostgreSQL</> + work. There are several ways in which <productname>PostgreSQL</productname> can support the appearance of updating a view, however. </para> @@ -821,20 +821,20 @@ SELECT t1.a, t2.b, t1.ctid FROM t1, t2 WHERE t1.a = t2.a; underlying base relation so that the <command>INSERT</command>, <command>UPDATE</command>, or <command>DELETE</command> is applied to the base relation in the appropriate way. Views that are - <quote>simple enough</> for this are called <firstterm>automatically - updatable</>. For detailed information on the kinds of view that can + <quote>simple enough</quote> for this are called <firstterm>automatically + updatable</firstterm>. For detailed information on the kinds of view that can be automatically updated, see <xref linkend="sql-createview">. </para> <para> Alternatively, the operation may be handled by a user-provided - <literal>INSTEAD OF</> trigger on the view. + <literal>INSTEAD OF</literal> trigger on the view. Rewriting works slightly differently in this case. For <command>INSERT</command>, the rewriter does nothing at all with the view, leaving it as the result relation for the query. For <command>UPDATE</command> and <command>DELETE</command>, it's still necessary to expand the - view query to produce the <quote>old</> rows that the command will + view query to produce the <quote>old</quote> rows that the command will attempt to update or delete. So the view is expanded as normal, but another unexpanded range-table entry is added to the query to represent the view in its capacity as the result relation. @@ -843,21 +843,21 @@ SELECT t1.a, t2.b, t1.ctid FROM t1, t2 WHERE t1.a = t2.a; <para> The problem that now arises is how to identify the rows to be updated in the view. Recall that when the result relation - is a table, a special <acronym>CTID</> entry is added to the target + is a table, a special <acronym>CTID</acronym> entry is added to the target list to identify the physical locations of the rows to be updated. This does not work if the result relation is a view, because a view - does not have any <acronym>CTID</>, since its rows do not have + does not have any <acronym>CTID</acronym>, since its rows do not have actual physical locations. Instead, for an <command>UPDATE</command> - or <command>DELETE</command> operation, a special <literal>wholerow</> + or <command>DELETE</command> operation, a special <literal>wholerow</literal> entry is added to the target list, which expands to include all columns from the view. The executor uses this value to supply the - <quote>old</> row to the <literal>INSTEAD OF</> trigger. It is + <quote>old</quote> row to the <literal>INSTEAD OF</literal> trigger. It is up to the trigger to work out what to update based on the old and new row values. </para> <para> - Another possibility is for the user to define <literal>INSTEAD</> + Another possibility is for the user to define <literal>INSTEAD</literal> rules that specify substitute actions for <command>INSERT</command>, <command>UPDATE</command>, and <command>DELETE</command> commands on a view. These rules will rewrite the command, typically into a command @@ -868,8 +868,8 @@ SELECT t1.a, t2.b, t1.ctid FROM t1, t2 WHERE t1.a = t2.a; <para> Note that rules are evaluated first, rewriting the original query before it is planned and executed. Therefore, if a view has - <literal>INSTEAD OF</> triggers as well as rules on <command>INSERT</>, - <command>UPDATE</>, or <command>DELETE</>, then the rules will be + <literal>INSTEAD OF</literal> triggers as well as rules on <command>INSERT</command>, + <command>UPDATE</command>, or <command>DELETE</command>, then the rules will be evaluated first, and depending on the result, the triggers may not be used at all. </para> @@ -883,7 +883,7 @@ SELECT t1.a, t2.b, t1.ctid FROM t1, t2 WHERE t1.a = t2.a; </para> <para> - If there are no <literal>INSTEAD</> rules or <literal>INSTEAD OF</> + If there are no <literal>INSTEAD</literal> rules or <literal>INSTEAD OF</literal> triggers for the view, and the rewriter cannot automatically rewrite the query as an update on the underlying base relation, an error will be thrown because the executor cannot update a view as such. @@ -902,13 +902,13 @@ SELECT t1.a, t2.b, t1.ctid FROM t1, t2 WHERE t1.a = t2.a; </indexterm> <indexterm zone="rules-materializedviews"> - <primary>materialized view</> - <secondary>implementation through rules</> + <primary>materialized view</primary> + <secondary>implementation through rules</secondary> </indexterm> <indexterm zone="rules-materializedviews"> - <primary>view</> - <secondary>materialized</> + <primary>view</primary> + <secondary>materialized</secondary> </indexterm> <para> @@ -1030,7 +1030,7 @@ SELECT count(*) FROM words WHERE word = 'caterpiler'; (1 row) </programlisting> - With <command>EXPLAIN ANALYZE</>, we see: + With <command>EXPLAIN ANALYZE</command>, we see: <programlisting> Aggregate (cost=21763.99..21764.00 rows=1 width=0) (actual time=188.180..188.181 rows=1 loops=1) @@ -1104,7 +1104,7 @@ SELECT word FROM words ORDER BY word <-> 'caterpiler' LIMIT 10; </sect1> <sect1 id="rules-update"> -<title>Rules on <command>INSERT</>, <command>UPDATE</>, and <command>DELETE</></title> +<title>Rules on <command>INSERT</command>, <command>UPDATE</command>, and <command>DELETE</command></title> <indexterm zone="rules-update"> <primary>rule</primary> @@ -1122,8 +1122,8 @@ SELECT word FROM words ORDER BY word <-> 'caterpiler' LIMIT 10; </indexterm> <para> - Rules that are defined on <command>INSERT</>, <command>UPDATE</>, - and <command>DELETE</> are significantly different from the view rules + Rules that are defined on <command>INSERT</command>, <command>UPDATE</command>, + and <command>DELETE</command> are significantly different from the view rules described in the previous section. First, their <command>CREATE RULE</command> command allows more: @@ -1142,13 +1142,13 @@ SELECT word FROM words ORDER BY word <-> 'caterpiler' LIMIT 10; <listitem> <para> - They can be <literal>INSTEAD</> or <literal>ALSO</> (the default). + They can be <literal>INSTEAD</literal> or <literal>ALSO</literal> (the default). </para> </listitem> <listitem> <para> - The pseudorelations <literal>NEW</> and <literal>OLD</> become useful. + The pseudorelations <literal>NEW</literal> and <literal>OLD</literal> become useful. </para> </listitem> @@ -1167,7 +1167,7 @@ SELECT word FROM words ORDER BY word <-> 'caterpiler' LIMIT 10; <caution> <para> In many cases, tasks that could be performed by rules - on <command>INSERT</>/<command>UPDATE</>/<command>DELETE</> are better done + on <command>INSERT</command>/<command>UPDATE</command>/<command>DELETE</command> are better done with triggers. Triggers are notationally a bit more complicated, but their semantics are much simpler to understand. Rules tend to have surprising results when the original query contains volatile functions: volatile @@ -1177,9 +1177,9 @@ SELECT word FROM words ORDER BY word <-> 'caterpiler' LIMIT 10; <para> Also, there are some cases that are not supported by these types of rules at - all, notably including <literal>WITH</> clauses in the original query and - multiple-assignment sub-<literal>SELECT</>s in the <literal>SET</> list - of <command>UPDATE</> queries. This is because copying these constructs + all, notably including <literal>WITH</literal> clauses in the original query and + multiple-assignment sub-<literal>SELECT</literal>s in the <literal>SET</literal> list + of <command>UPDATE</command> queries. This is because copying these constructs into a rule query would result in multiple evaluations of the sub-query, contrary to the express intent of the query's author. </para> @@ -1198,8 +1198,8 @@ CREATE [ OR REPLACE ] RULE <replaceable class="parameter">name</replaceable> AS </programlisting> in mind. - In the following, <firstterm>update rules</> means rules that are defined - on <command>INSERT</>, <command>UPDATE</>, or <command>DELETE</>. + In the following, <firstterm>update rules</firstterm> means rules that are defined + on <command>INSERT</command>, <command>UPDATE</command>, or <command>DELETE</command>. </para> <para> @@ -1208,16 +1208,16 @@ CREATE [ OR REPLACE ] RULE <replaceable class="parameter">name</replaceable> AS object and event given in the <command>CREATE RULE</command> command. For update rules, the rule system creates a list of query trees. Initially the query-tree list is empty. - There can be zero (<literal>NOTHING</> key word), one, or multiple actions. + There can be zero (<literal>NOTHING</literal> key word), one, or multiple actions. To simplify, we will look at a rule with one action. This rule - can have a qualification or not and it can be <literal>INSTEAD</> or - <literal>ALSO</> (the default). + can have a qualification or not and it can be <literal>INSTEAD</literal> or + <literal>ALSO</literal> (the default). </para> <para> What is a rule qualification? It is a restriction that tells when the actions of the rule should be done and when not. This - qualification can only reference the pseudorelations <literal>NEW</> and/or <literal>OLD</>, + qualification can only reference the pseudorelations <literal>NEW</literal> and/or <literal>OLD</literal>, which basically represent the relation that was given as object (but with a special meaning). </para> @@ -1228,8 +1228,8 @@ CREATE [ OR REPLACE ] RULE <replaceable class="parameter">name</replaceable> AS <variablelist> <varlistentry> - <term>No qualification, with either <literal>ALSO</> or - <literal>INSTEAD</></term> + <term>No qualification, with either <literal>ALSO</literal> or + <literal>INSTEAD</literal></term> <listitem> <para> the query tree from the rule action with the original query @@ -1239,7 +1239,7 @@ CREATE [ OR REPLACE ] RULE <replaceable class="parameter">name</replaceable> AS </varlistentry> <varlistentry> - <term>Qualification given and <literal>ALSO</></term> + <term>Qualification given and <literal>ALSO</literal></term> <listitem> <para> the query tree from the rule action with the rule @@ -1250,7 +1250,7 @@ CREATE [ OR REPLACE ] RULE <replaceable class="parameter">name</replaceable> AS </varlistentry> <varlistentry> - <term>Qualification given and <literal>INSTEAD</></term> + <term>Qualification given and <literal>INSTEAD</literal></term> <listitem> <para> the query tree from the rule action with the rule @@ -1262,17 +1262,17 @@ CREATE [ OR REPLACE ] RULE <replaceable class="parameter">name</replaceable> AS </varlistentry> </variablelist> - Finally, if the rule is <literal>ALSO</>, the unchanged original query tree is - added to the list. Since only qualified <literal>INSTEAD</> rules already add the + Finally, if the rule is <literal>ALSO</literal>, the unchanged original query tree is + added to the list. Since only qualified <literal>INSTEAD</literal> rules already add the original query tree, we end up with either one or two output query trees for a rule with one action. </para> <para> - For <literal>ON INSERT</> rules, the original query (if not suppressed by <literal>INSTEAD</>) + For <literal>ON INSERT</literal> rules, the original query (if not suppressed by <literal>INSTEAD</literal>) is done before any actions added by rules. This allows the actions to - see the inserted row(s). But for <literal>ON UPDATE</> and <literal>ON - DELETE</> rules, the original query is done after the actions added by rules. + see the inserted row(s). But for <literal>ON UPDATE</literal> and <literal>ON + DELETE</literal> rules, the original query is done after the actions added by rules. This ensures that the actions can see the to-be-updated or to-be-deleted rows; otherwise, the actions might do nothing because they find no rows matching their qualifications. @@ -1293,12 +1293,12 @@ CREATE [ OR REPLACE ] RULE <replaceable class="parameter">name</replaceable> AS The query trees found in the actions of the <structname>pg_rewrite</structname> system catalog are only templates. Since they can reference the range-table entries for - <literal>NEW</> and <literal>OLD</>, some substitutions have to be made before they can be - used. For any reference to <literal>NEW</>, the target list of the original + <literal>NEW</literal> and <literal>OLD</literal>, some substitutions have to be made before they can be + used. For any reference to <literal>NEW</literal>, the target list of the original query is searched for a corresponding entry. If found, that - entry's expression replaces the reference. Otherwise, <literal>NEW</> means the - same as <literal>OLD</> (for an <command>UPDATE</command>) or is replaced by - a null value (for an <command>INSERT</command>). Any reference to <literal>OLD</> is + entry's expression replaces the reference. Otherwise, <literal>NEW</literal> means the + same as <literal>OLD</literal> (for an <command>UPDATE</command>) or is replaced by + a null value (for an <command>INSERT</command>). Any reference to <literal>OLD</literal> is replaced by a reference to the range-table entry that is the result relation. </para> @@ -1313,7 +1313,7 @@ CREATE [ OR REPLACE ] RULE <replaceable class="parameter">name</replaceable> AS <title>A First Rule Step by Step</title> <para> - Say we want to trace changes to the <literal>sl_avail</> column in the + Say we want to trace changes to the <literal>sl_avail</literal> column in the <literal>shoelace_data</literal> relation. So we set up a log table and a rule that conditionally writes a log entry when an <command>UPDATE</command> is performed on @@ -1367,7 +1367,7 @@ UPDATE shoelace_data SET sl_avail = 6 WHERE shoelace_data.sl_name = 'sl7'; </programlisting> - There is a rule <literal>log_shoelace</literal> that is <literal>ON UPDATE</> with the rule + There is a rule <literal>log_shoelace</literal> that is <literal>ON UPDATE</literal> with the rule qualification expression: <programlisting> @@ -1384,15 +1384,15 @@ INSERT INTO shoelace_log VALUES ( </programlisting> (This looks a little strange since you cannot normally write - <literal>INSERT ... VALUES ... FROM</>. The <literal>FROM</> + <literal>INSERT ... VALUES ... FROM</literal>. The <literal>FROM</literal> clause here is just to indicate that there are range-table entries - in the query tree for <literal>new</> and <literal>old</>. + in the query tree for <literal>new</literal> and <literal>old</literal>. These are needed so that they can be referenced by variables in the <command>INSERT</command> command's query tree.) </para> <para> - The rule is a qualified <literal>ALSO</> rule, so the rule system + The rule is a qualified <literal>ALSO</literal> rule, so the rule system has to return two query trees: the modified rule action and the original query tree. In step 1, the range table of the original query is incorporated into the rule's action query tree. This results in: @@ -1406,7 +1406,7 @@ INSERT INTO shoelace_log VALUES ( </programlisting> In step 2, the rule qualification is added to it, so the result set - is restricted to rows where <literal>sl_avail</> changes: + is restricted to rows where <literal>sl_avail</literal> changes: <programlisting> INSERT INTO shoelace_log VALUES ( @@ -1417,10 +1417,10 @@ INSERT INTO shoelace_log VALUES ( <emphasis>WHERE new.sl_avail <> old.sl_avail</emphasis>; </programlisting> - (This looks even stranger, since <literal>INSERT ... VALUES</> doesn't have - a <literal>WHERE</> clause either, but the planner and executor will have no + (This looks even stranger, since <literal>INSERT ... VALUES</literal> doesn't have + a <literal>WHERE</literal> clause either, but the planner and executor will have no difficulty with it. They need to support this same functionality - anyway for <literal>INSERT ... SELECT</>.) + anyway for <literal>INSERT ... SELECT</literal>.) </para> <para> @@ -1440,7 +1440,7 @@ INSERT INTO shoelace_log VALUES ( </para> <para> - Step 4 replaces references to <literal>NEW</> by the target list entries from the + Step 4 replaces references to <literal>NEW</literal> by the target list entries from the original query tree or by the matching variable references from the result relation: @@ -1457,7 +1457,7 @@ INSERT INTO shoelace_log VALUES ( </para> <para> - Step 5 changes <literal>OLD</> references into result relation references: + Step 5 changes <literal>OLD</literal> references into result relation references: <programlisting> INSERT INTO shoelace_log VALUES ( @@ -1471,7 +1471,7 @@ INSERT INTO shoelace_log VALUES ( </para> <para> - That's it. Since the rule is <literal>ALSO</>, we also output the + That's it. Since the rule is <literal>ALSO</literal>, we also output the original query tree. In short, the output from the rule system is a list of two query trees that correspond to these statements: @@ -1502,8 +1502,8 @@ UPDATE shoelace_data SET sl_color = 'green' no log entry would get written. In that case, the original query tree does not contain a target list entry for - <literal>sl_avail</>, so <literal>NEW.sl_avail</> will get - replaced by <literal>shoelace_data.sl_avail</>. Thus, the extra + <literal>sl_avail</literal>, so <literal>NEW.sl_avail</literal> will get + replaced by <literal>shoelace_data.sl_avail</literal>. Thus, the extra command generated by the rule is: <programlisting> @@ -1527,8 +1527,8 @@ UPDATE shoelace_data SET sl_avail = 0 WHERE sl_color = 'black'; </programlisting> - four rows in fact get updated (<literal>sl1</>, <literal>sl2</>, <literal>sl3</>, and <literal>sl4</>). - But <literal>sl3</> already has <literal>sl_avail = 0</>. In this case, the original + four rows in fact get updated (<literal>sl1</literal>, <literal>sl2</literal>, <literal>sl3</literal>, and <literal>sl4</literal>). + But <literal>sl3</literal> already has <literal>sl_avail = 0</literal>. In this case, the original query trees qualification is different and that results in the extra query tree: @@ -1559,7 +1559,7 @@ SELECT shoelace_data.sl_name, 0, <sect2 id="rules-update-views"> <title>Cooperation with Views</title> -<indexterm zone="rules-update-views"><primary>view</><secondary>updating</></> +<indexterm zone="rules-update-views"><primary>view</primary><secondary>updating</secondary></indexterm> <para> A simple way to protect view relations from the mentioned @@ -1579,7 +1579,7 @@ CREATE RULE shoe_del_protect AS ON DELETE TO shoe If someone now tries to do any of these operations on the view relation <literal>shoe</literal>, the rule system will apply these rules. Since the rules have - no actions and are <literal>INSTEAD</>, the resulting list of + no actions and are <literal>INSTEAD</literal>, the resulting list of query trees will be empty and the whole query will become nothing because there is nothing left to be optimized or executed after the rule system is done with it. @@ -1621,8 +1621,8 @@ CREATE RULE shoelace_del AS ON DELETE TO shoelace </para> <para> - If you want to support <literal>RETURNING</> queries on the view, - you need to make the rules include <literal>RETURNING</> clauses that + If you want to support <literal>RETURNING</literal> queries on the view, + you need to make the rules include <literal>RETURNING</literal> clauses that compute the view rows. This is usually pretty trivial for views on a single table, but it's a bit tedious for join views such as <literal>shoelace</literal>. An example for the insert case is: @@ -1643,9 +1643,9 @@ CREATE RULE shoelace_ins AS ON INSERT TO shoelace FROM unit u WHERE shoelace_data.sl_unit = u.un_name); </programlisting> - Note that this one rule supports both <command>INSERT</> and - <command>INSERT RETURNING</> queries on the view — the - <literal>RETURNING</> clause is simply ignored for <command>INSERT</>. + Note that this one rule supports both <command>INSERT</command> and + <command>INSERT RETURNING</command> queries on the view — the + <literal>RETURNING</literal> clause is simply ignored for <command>INSERT</command>. </para> <para> @@ -1785,7 +1785,7 @@ UPDATE shoelace_data AND shoelace_data.sl_name = shoelace.sl_name; </programlisting> - Again it's an <literal>INSTEAD</> rule and the previous query tree is trashed. + Again it's an <literal>INSTEAD</literal> rule and the previous query tree is trashed. Note that this query still uses the view <literal>shoelace</literal>. But the rule system isn't finished with this step, so it continues and applies the <literal>_RETURN</literal> rule on it, and we get: @@ -2041,16 +2041,16 @@ GRANT SELECT ON phone_number TO assistant; </programlisting> Nobody except that user (and the database superusers) can access the - <literal>phone_data</> table. But because of the <command>GRANT</>, + <literal>phone_data</literal> table. But because of the <command>GRANT</command>, the assistant can run a <command>SELECT</command> on the - <literal>phone_number</> view. The rule system will rewrite the - <command>SELECT</command> from <literal>phone_number</> into a - <command>SELECT</command> from <literal>phone_data</>. + <literal>phone_number</literal> view. The rule system will rewrite the + <command>SELECT</command> from <literal>phone_number</literal> into a + <command>SELECT</command> from <literal>phone_data</literal>. Since the user is the owner of - <literal>phone_number</> and therefore the owner of the rule, the - read access to <literal>phone_data</> is now checked against the user's + <literal>phone_number</literal> and therefore the owner of the rule, the + read access to <literal>phone_data</literal> is now checked against the user's privileges and the query is permitted. The check for accessing - <literal>phone_number</> is also performed, but this is done + <literal>phone_number</literal> is also performed, but this is done against the invoking user, so nobody but the user and the assistant can use it. </para> @@ -2059,19 +2059,19 @@ GRANT SELECT ON phone_number TO assistant; The privileges are checked rule by rule. So the assistant is for now the only one who can see the public phone numbers. But the assistant can set up another view and grant access to that to the public. Then, anyone - can see the <literal>phone_number</> data through the assistant's view. + can see the <literal>phone_number</literal> data through the assistant's view. What the assistant cannot do is to create a view that directly - accesses <literal>phone_data</>. (Actually the assistant can, but it will not work since + accesses <literal>phone_data</literal>. (Actually the assistant can, but it will not work since every access will be denied during the permission checks.) And as soon as the user notices that the assistant opened - their <literal>phone_number</> view, the user can revoke the assistant's access. Immediately, any + their <literal>phone_number</literal> view, the user can revoke the assistant's access. Immediately, any access to the assistant's view would fail. </para> <para> One might think that this rule-by-rule checking is a security hole, but in fact it isn't. But if it did not work this way, the assistant - could set up a table with the same columns as <literal>phone_number</> and + could set up a table with the same columns as <literal>phone_number</literal> and copy the data to there once per day. Then it's the assistant's own data and the assistant can grant access to everyone they want. A <command>GRANT</command> command means, <quote>I trust you</quote>. @@ -2090,9 +2090,9 @@ CREATE VIEW phone_number AS SELECT person, phone FROM phone_data WHERE phone NOT LIKE '412%'; </programlisting> This view might seem secure, since the rule system will rewrite any - <command>SELECT</command> from <literal>phone_number</> into a - <command>SELECT</command> from <literal>phone_data</> and add the - qualification that only entries where <literal>phone</> does not begin + <command>SELECT</command> from <literal>phone_number</literal> into a + <command>SELECT</command> from <literal>phone_data</literal> and add the + qualification that only entries where <literal>phone</literal> does not begin with 412 are wanted. But if the user can create their own functions, it is not difficult to convince the planner to execute the user-defined function prior to the <function>NOT LIKE</function> expression. @@ -2107,7 +2107,7 @@ $$ LANGUAGE plpgsql COST 0.0000000000000000000001; SELECT * FROM phone_number WHERE tricky(person, phone); </programlisting> - Every person and phone number in the <literal>phone_data</> table will be + Every person and phone number in the <literal>phone_data</literal> table will be printed as a <literal>NOTICE</literal>, because the planner will choose to execute the inexpensive <function>tricky</function> function before the more expensive <function>NOT LIKE</function>. Even if the user is @@ -2119,17 +2119,17 @@ SELECT * FROM phone_number WHERE tricky(person, phone); <para> Similar considerations apply to update rules. In the examples of the previous section, the owner of the tables in the example - database could grant the privileges <literal>SELECT</>, - <literal>INSERT</>, <literal>UPDATE</>, and <literal>DELETE</> on - the <literal>shoelace</> view to someone else, but only - <literal>SELECT</> on <literal>shoelace_log</>. The rule action to + database could grant the privileges <literal>SELECT</literal>, + <literal>INSERT</literal>, <literal>UPDATE</literal>, and <literal>DELETE</literal> on + the <literal>shoelace</literal> view to someone else, but only + <literal>SELECT</literal> on <literal>shoelace_log</literal>. The rule action to write log entries will still be executed successfully, and that other user could see the log entries. But they could not create fake entries, nor could they manipulate or remove existing ones. In this case, there is no possibility of subverting the rules by convincing the planner to alter the order of operations, because the only rule - which references <literal>shoelace_log</> is an unqualified - <literal>INSERT</>. This might not be true in more complex scenarios. + which references <literal>shoelace_log</literal> is an unqualified + <literal>INSERT</literal>. This might not be true in more complex scenarios. </para> <para> @@ -2189,7 +2189,7 @@ CREATE VIEW phone_number WITH (security_barrier) AS <para> The <productname>PostgreSQL</productname> server returns a command - status string, such as <literal>INSERT 149592 1</>, for each + status string, such as <literal>INSERT 149592 1</literal>, for each command it receives. This is simple enough when there are no rules involved, but what happens when the query is rewritten by rules? </para> @@ -2200,10 +2200,10 @@ CREATE VIEW phone_number WITH (security_barrier) AS <itemizedlist> <listitem> <para> - If there is no unconditional <literal>INSTEAD</> rule for the query, then + If there is no unconditional <literal>INSTEAD</literal> rule for the query, then the originally given query will be executed, and its command status will be returned as usual. (But note that if there were - any conditional <literal>INSTEAD</> rules, the negation of their qualifications + any conditional <literal>INSTEAD</literal> rules, the negation of their qualifications will have been added to the original query. This might reduce the number of rows it processes, and if so the reported status will be affected.) @@ -2212,10 +2212,10 @@ CREATE VIEW phone_number WITH (security_barrier) AS <listitem> <para> - If there is any unconditional <literal>INSTEAD</> rule for the query, then + If there is any unconditional <literal>INSTEAD</literal> rule for the query, then the original query will not be executed at all. In this case, the server will return the command status for the last query - that was inserted by an <literal>INSTEAD</> rule (conditional or + that was inserted by an <literal>INSTEAD</literal> rule (conditional or unconditional) and is of the same command type (<command>INSERT</command>, <command>UPDATE</command>, or <command>DELETE</command>) as the original query. If no query @@ -2228,7 +2228,7 @@ CREATE VIEW phone_number WITH (security_barrier) AS </para> <para> - The programmer can ensure that any desired <literal>INSTEAD</> rule is the one + The programmer can ensure that any desired <literal>INSTEAD</literal> rule is the one that sets the command status in the second case, by giving it the alphabetically last rule name among the active rules, so that it gets applied last. @@ -2253,7 +2253,7 @@ CREATE VIEW phone_number WITH (security_barrier) AS implemented using the <productname>PostgreSQL</productname> rule system. One of the things that cannot be implemented by rules are some kinds of constraints, especially foreign keys. It is possible - to place a qualified rule that rewrites a command to <literal>NOTHING</> + to place a qualified rule that rewrites a command to <literal>NOTHING</literal> if the value of a column does not appear in another table. But then the data is silently thrown away and that's not a good idea. If checks for valid values are required, @@ -2264,7 +2264,7 @@ CREATE VIEW phone_number WITH (security_barrier) AS <para> In this chapter, we focused on using rules to update views. All of the update rule examples in this chapter can also be implemented - using <literal>INSTEAD OF</> triggers on the views. Writing such + using <literal>INSTEAD OF</literal> triggers on the views. Writing such triggers is often easier than writing rules, particularly if complex logic is required to perform the update. </para> @@ -2298,8 +2298,8 @@ CREATE TABLE software ( </programlisting> Both tables have many thousands of rows and the indexes on - <structfield>hostname</> are unique. The rule or trigger should - implement a constraint that deletes rows from <literal>software</> + <structfield>hostname</structfield> are unique. The rule or trigger should + implement a constraint that deletes rows from <literal>software</literal> that reference a deleted computer. The trigger would use this command: <programlisting> @@ -2307,8 +2307,8 @@ DELETE FROM software WHERE hostname = $1; </programlisting> Since the trigger is called for each individual row deleted from - <literal>computer</>, it can prepare and save the plan for this - command and pass the <structfield>hostname</> value in the + <literal>computer</literal>, it can prepare and save the plan for this + command and pass the <structfield>hostname</structfield> value in the parameter. The rule would be written as: <programlisting> @@ -2324,7 +2324,7 @@ CREATE RULE computer_del AS ON DELETE TO computer DELETE FROM computer WHERE hostname = 'mypc.local.net'; </programlisting> - the table <literal>computer</> is scanned by index (fast), and the + the table <literal>computer</literal> is scanned by index (fast), and the command issued by the trigger would also use an index scan (also fast). The extra command from the rule would be: @@ -2348,8 +2348,8 @@ Nestloop <para> With the next delete we want to get rid of all the 2000 computers - where the <structfield>hostname</> starts with - <literal>old</>. There are two possible commands to do that. One + where the <structfield>hostname</structfield> starts with + <literal>old</literal>. There are two possible commands to do that. One is: <programlisting> @@ -2389,17 +2389,17 @@ Nestloop </literallayout> This shows, that the planner does not realize that the - qualification for <structfield>hostname</> in - <literal>computer</> could also be used for an index scan on - <literal>software</> when there are multiple qualification - expressions combined with <literal>AND</>, which is what it does + qualification for <structfield>hostname</structfield> in + <literal>computer</literal> could also be used for an index scan on + <literal>software</literal> when there are multiple qualification + expressions combined with <literal>AND</literal>, which is what it does in the regular-expression version of the command. The trigger will get invoked once for each of the 2000 old computers that have to be deleted, and that will result in one index scan over - <literal>computer</> and 2000 index scans over - <literal>software</>. The rule implementation will do it with two + <literal>computer</literal> and 2000 index scans over + <literal>software</literal>. The rule implementation will do it with two commands that use indexes. And it depends on the overall size of - the table <literal>software</> whether the rule will still be faster in the + the table <literal>software</literal> whether the rule will still be faster in the sequential scan situation. 2000 command executions from the trigger over the SPI manager take some time, even if all the index blocks will soon be in the cache. </para> @@ -2412,7 +2412,7 @@ DELETE FROM computer WHERE manufacturer = 'bim'; </programlisting> Again this could result in many rows to be deleted from - <literal>computer</>. So the trigger will again run many commands + <literal>computer</literal>. So the trigger will again run many commands through the executor. The command generated by the rule will be: <programlisting> @@ -2421,7 +2421,7 @@ DELETE FROM software WHERE computer.manufacturer = 'bim' </programlisting> The plan for that command will again be the nested loop over two - index scans, only using a different index on <literal>computer</>: + index scans, only using a different index on <literal>computer</literal>: <programlisting> Nestloop diff --git a/doc/src/sgml/runtime.sgml b/doc/src/sgml/runtime.sgml index 6c4c7f4a8e1..c8bc684c0e3 100644 --- a/doc/src/sgml/runtime.sgml +++ b/doc/src/sgml/runtime.sgml @@ -73,12 +73,12 @@ <filename>/usr/local/pgsql/data</filename> or <filename>/var/lib/pgsql/data</filename> are popular. To initialize a database cluster, use the command <xref - linkend="app-initdb">,<indexterm><primary>initdb</></> which is + linkend="app-initdb">,<indexterm><primary>initdb</primary></indexterm> which is installed with <productname>PostgreSQL</productname>. The desired file system location of your database cluster is indicated by the <option>-D</option> option, for example: <screen> -<prompt>$</> <userinput>initdb -D /usr/local/pgsql/data</userinput> +<prompt>$</prompt> <userinput>initdb -D /usr/local/pgsql/data</userinput> </screen> Note that you must execute this command while logged into the <productname>PostgreSQL</productname> user account, which is @@ -96,9 +96,9 @@ <para> Alternatively, you can run <command>initdb</command> via the <xref linkend="app-pg-ctl"> - program<indexterm><primary>pg_ctl</></> like so: + program<indexterm><primary>pg_ctl</primary></indexterm> like so: <screen> -<prompt>$</> <userinput>pg_ctl -D /usr/local/pgsql/data initdb</userinput> +<prompt>$</prompt> <userinput>pg_ctl -D /usr/local/pgsql/data initdb</userinput> </screen> This may be more intuitive if you are using <command>pg_ctl</command> for starting and stopping the @@ -148,14 +148,14 @@ postgres$ <userinput>initdb -D /usr/local/pgsql/data</userinput> <command>initdb</command>'s <option>-W</option>, <option>--pwprompt</option> or <option>--pwfile</option> options to assign a password to the database superuser.<indexterm> - <primary>password</> - <secondary>of the superuser</> + <primary>password</primary> + <secondary>of the superuser</secondary> </indexterm> - Also, specify <option>-A md5</> or - <option>-A password</> so that the default <literal>trust</> authentication + Also, specify <option>-A md5</option> or + <option>-A password</option> so that the default <literal>trust</literal> authentication mode is not used; or modify the generated <filename>pg_hba.conf</filename> file after running <command>initdb</command>, but - <emphasis>before</> you start the server for the first time. (Other + <emphasis>before</emphasis> you start the server for the first time. (Other reasonable approaches include using <literal>peer</literal> authentication or file system permissions to restrict connections. See <xref linkend="client-authentication"> for more information.) @@ -163,7 +163,7 @@ postgres$ <userinput>initdb -D /usr/local/pgsql/data</userinput> <para> <command>initdb</command> also initializes the default - locale<indexterm><primary>locale</></> for the database cluster. + locale<indexterm><primary>locale</primary></indexterm> for the database cluster. Normally, it will just take the locale settings in the environment and apply them to the initialized database. It is possible to specify a different locale for the database; more information about @@ -173,7 +173,7 @@ postgres$ <userinput>initdb -D /usr/local/pgsql/data</userinput> different sort order, the order used in the template databases that initdb creates cannot be changed without dropping and recreating them. There is also a performance impact for using locales - other than <literal>C</> or <literal>POSIX</>. Therefore, it is + other than <literal>C</literal> or <literal>POSIX</literal>. Therefore, it is important to make this choice correctly the first time. </para> @@ -184,7 +184,7 @@ postgres$ <userinput>initdb -D /usr/local/pgsql/data</userinput> </para> <para> - Non-<literal>C</> and non-<literal>POSIX</> locales rely on the + Non-<literal>C</literal> and non-<literal>POSIX</literal> locales rely on the operating system's collation library for character set ordering. This controls the ordering of keys stored in indexes. For this reason, a cluster cannot switch to an incompatible collation library version, @@ -201,14 +201,14 @@ postgres$ <userinput>initdb -D /usr/local/pgsql/data</userinput> <para> Many installations create their database clusters on file systems - (volumes) other than the machine's <quote>root</> volume. If you + (volumes) other than the machine's <quote>root</quote> volume. If you choose to do this, it is not advisable to try to use the secondary volume's topmost directory (mount point) as the data directory. Best practice is to create a directory within the mount-point directory that is owned by the <productname>PostgreSQL</productname> user, and then create the data directory within that. This avoids permissions problems, particularly for operations such - as <application>pg_upgrade</>, and it also ensures clean failures if + as <application>pg_upgrade</application>, and it also ensures clean failures if the secondary volume is taken offline. </para> @@ -220,30 +220,30 @@ postgres$ <userinput>initdb -D /usr/local/pgsql/data</userinput> <indexterm zone="creating-cluster-nfs"> <primary>Network File Systems</primary> </indexterm> - <indexterm><primary><acronym>NFS</></><see>Network File Systems</></> - <indexterm><primary>Network Attached Storage (<acronym>NAS</>)</><see>Network File Systems</></> + <indexterm><primary><acronym>NFS</acronym></primary><see>Network File Systems</see></indexterm> + <indexterm><primary>Network Attached Storage (<acronym>NAS</acronym>)</primary><see>Network File Systems</see></indexterm> <para> Many installations create their database clusters on network file - systems. Sometimes this is done via <acronym>NFS</>, or by using a - Network Attached Storage (<acronym>NAS</>) device that uses - <acronym>NFS</> internally. <productname>PostgreSQL</> does nothing - special for <acronym>NFS</> file systems, meaning it assumes - <acronym>NFS</> behaves exactly like locally-connected drives. - If the client or server <acronym>NFS</> implementation does not + systems. Sometimes this is done via <acronym>NFS</acronym>, or by using a + Network Attached Storage (<acronym>NAS</acronym>) device that uses + <acronym>NFS</acronym> internally. <productname>PostgreSQL</productname> does nothing + special for <acronym>NFS</acronym> file systems, meaning it assumes + <acronym>NFS</acronym> behaves exactly like locally-connected drives. + If the client or server <acronym>NFS</acronym> implementation does not provide standard file system semantics, this can cause reliability problems (see <ulink url="http://www.time-travellers.org/shane/papers/NFS_considered_harmful.html"></ulink>). - Specifically, delayed (asynchronous) writes to the <acronym>NFS</> + Specifically, delayed (asynchronous) writes to the <acronym>NFS</acronym> server can cause data corruption problems. If possible, mount the - <acronym>NFS</> file system synchronously (without caching) to avoid - this hazard. Also, soft-mounting the <acronym>NFS</> file system is + <acronym>NFS</acronym> file system synchronously (without caching) to avoid + this hazard. Also, soft-mounting the <acronym>NFS</acronym> file system is not recommended. </para> <para> - Storage Area Networks (<acronym>SAN</>) typically use communication - protocols other than <acronym>NFS</>, and may or may not be subject + Storage Area Networks (<acronym>SAN</acronym>) typically use communication + protocols other than <acronym>NFS</acronym>, and may or may not be subject to hazards of this sort. It's advisable to consult the vendor's documentation concerning data consistency guarantees. <productname>PostgreSQL</productname> cannot be more reliable than @@ -260,7 +260,7 @@ postgres$ <userinput>initdb -D /usr/local/pgsql/data</userinput> <para> Before anyone can access the database, you must start the database server. The database server program is called - <command>postgres</command>.<indexterm><primary>postgres</></> + <command>postgres</command>.<indexterm><primary>postgres</primary></indexterm> The <command>postgres</command> program must know where to find the data it is supposed to use. This is done with the <option>-D</option> option. Thus, the simplest way to start the @@ -281,8 +281,8 @@ $ <userinput>postgres -D /usr/local/pgsql/data</userinput> <screen> $ <userinput>postgres -D /usr/local/pgsql/data >logfile 2>&1 &</userinput> </screen> - It is important to store the server's <systemitem>stdout</> and - <systemitem>stderr</> output somewhere, as shown above. It will help + It is important to store the server's <systemitem>stdout</systemitem> and + <systemitem>stderr</systemitem> output somewhere, as shown above. It will help for auditing purposes and to diagnose problems. (See <xref linkend="logfile-maintenance"> for a more thorough discussion of log file handling.) @@ -312,13 +312,13 @@ pg_ctl start -l logfile <para> Normally, you will want to start the database server when the computer boots.<indexterm> - <primary>booting</> - <secondary>starting the server during</> + <primary>booting</primary> + <secondary>starting the server during</secondary> </indexterm> Autostart scripts are operating-system-specific. There are a few distributed with <productname>PostgreSQL</productname> in the - <filename>contrib/start-scripts</> directory. Installing one will require + <filename>contrib/start-scripts</filename> directory. Installing one will require root privileges. </para> @@ -327,7 +327,7 @@ pg_ctl start -l logfile at boot time. Many systems have a file <filename>/etc/rc.local</filename> or <filename>/etc/rc.d/rc.local</filename>. Others use <filename>init.d</filename> or - <filename>rc.d</> directories. Whatever you do, the server must be + <filename>rc.d</filename> directories. Whatever you do, the server must be run by the <productname>PostgreSQL</productname> user account <emphasis>and not by root</emphasis> or any other user. Therefore you probably should form your commands using @@ -348,7 +348,7 @@ su postgres -c 'pg_ctl start -D /usr/local/pgsql/data -l serverlog' For <productname>FreeBSD</productname>, look at the file <filename>contrib/start-scripts/freebsd</filename> in the <productname>PostgreSQL</productname> source distribution. - <indexterm><primary>FreeBSD</><secondary>start script</secondary></> + <indexterm><primary>FreeBSD</primary><secondary>start script</secondary></indexterm> </para> </listitem> @@ -356,7 +356,7 @@ su postgres -c 'pg_ctl start -D /usr/local/pgsql/data -l serverlog' <para> On <productname>OpenBSD</productname>, add the following lines to the file <filename>/etc/rc.local</filename>: - <indexterm><primary>OpenBSD</><secondary>start script</secondary></> + <indexterm><primary>OpenBSD</primary><secondary>start script</secondary></indexterm> <programlisting> if [ -x /usr/local/pgsql/bin/pg_ctl -a -x /usr/local/pgsql/bin/postgres ]; then su -l postgres -c '/usr/local/pgsql/bin/pg_ctl start -s -l /var/postgresql/log -D /usr/local/pgsql/data' @@ -369,7 +369,7 @@ fi <listitem> <para> On <productname>Linux</productname> systems either add - <indexterm><primary>Linux</><secondary>start script</secondary></> + <indexterm><primary>Linux</primary><secondary>start script</secondary></indexterm> <programlisting> /usr/local/pgsql/bin/pg_ctl start -l logfile -D /usr/local/pgsql/data </programlisting> @@ -421,7 +421,7 @@ WantedBy=multi-user.target <productname>FreeBSD</productname> or <productname>Linux</productname> start scripts, depending on preference. - <indexterm><primary>NetBSD</><secondary>start script</secondary></> + <indexterm><primary>NetBSD</primary><secondary>start script</secondary></indexterm> </para> </listitem> @@ -430,12 +430,12 @@ WantedBy=multi-user.target On <productname>Solaris</productname>, create a file called <filename>/etc/init.d/postgresql</filename> that contains the following line: - <indexterm><primary>Solaris</><secondary>start script</secondary></> + <indexterm><primary>Solaris</primary><secondary>start script</secondary></indexterm> <programlisting> su - postgres -c "/usr/local/pgsql/bin/pg_ctl start -l logfile -D /usr/local/pgsql/data" </programlisting> - Then, create a symbolic link to it in <filename>/etc/rc3.d</> as - <filename>S99postgresql</>. + Then, create a symbolic link to it in <filename>/etc/rc3.d</filename> as + <filename>S99postgresql</filename>. </para> </listitem> </itemizedlist> @@ -509,7 +509,7 @@ DETAIL: Failed system call was semget(5440126, 17, 03600). </screen> does <emphasis>not</emphasis> mean you've run out of disk space. It means your kernel's limit on the number of <systemitem - class="osname">System V</> semaphores is smaller than the number + class="osname">System V</systemitem> semaphores is smaller than the number <productname>PostgreSQL</productname> wants to create. As above, you might be able to work around the problem by starting the server with a reduced number of allowed connections @@ -518,15 +518,15 @@ DETAIL: Failed system call was semget(5440126, 17, 03600). </para> <para> - If you get an <quote>illegal system call</> error, it is likely that + If you get an <quote>illegal system call</quote> error, it is likely that shared memory or semaphores are not supported in your kernel at all. In that case your only option is to reconfigure the kernel to enable these features. </para> <para> - Details about configuring <systemitem class="osname">System V</> - <acronym>IPC</> facilities are given in <xref linkend="sysvipc">. + Details about configuring <systemitem class="osname">System V</systemitem> + <acronym>IPC</acronym> facilities are given in <xref linkend="sysvipc">. </para> </sect2> @@ -586,10 +586,10 @@ psql: could not connect to server: No such file or directory <title>Managing Kernel Resources</title> <para> - <productname>PostgreSQL</> can sometimes exhaust various operating system + <productname>PostgreSQL</productname> can sometimes exhaust various operating system resource limits, especially when multiple copies of the server are running on the same system, or in very large installations. This section explains - the kernel resources used by <productname>PostgreSQL</> and the steps you + the kernel resources used by <productname>PostgreSQL</productname> and the steps you can take to resolve problems related to kernel resource consumption. </para> @@ -605,27 +605,27 @@ psql: could not connect to server: No such file or directory </indexterm> <para> - <productname>PostgreSQL</> requires the operating system to provide - inter-process communication (<acronym>IPC</>) features, specifically + <productname>PostgreSQL</productname> requires the operating system to provide + inter-process communication (<acronym>IPC</acronym>) features, specifically shared memory and semaphores. Unix-derived systems typically provide - <quote><systemitem class="osname">System V</></> <acronym>IPC</>, - <quote><systemitem class="osname">POSIX</></> <acronym>IPC</>, or both. - <systemitem class="osname">Windows</> has its own implementation of + <quote><systemitem class="osname">System V</systemitem></quote> <acronym>IPC</acronym>, + <quote><systemitem class="osname">POSIX</systemitem></quote> <acronym>IPC</acronym>, or both. + <systemitem class="osname">Windows</systemitem> has its own implementation of these features and is not discussed here. </para> <para> The complete lack of these facilities is usually manifested by an - <quote><errorname>Illegal system call</></quote> error upon server + <quote><errorname>Illegal system call</errorname></quote> error upon server start. In that case there is no alternative but to reconfigure your - kernel. <productname>PostgreSQL</> won't work without them. + kernel. <productname>PostgreSQL</productname> won't work without them. This situation is rare, however, among modern operating systems. </para> <para> - Upon starting the server, <productname>PostgreSQL</> normally allocates + Upon starting the server, <productname>PostgreSQL</productname> normally allocates a very small amount of System V shared memory, as well as a much larger - amount of POSIX (<function>mmap</>) shared memory. + amount of POSIX (<function>mmap</function>) shared memory. In addition a significant number of semaphores, which can be either System V or POSIX style, are created at server startup. Currently, POSIX semaphores are used on Linux and FreeBSD systems while other @@ -634,7 +634,7 @@ psql: could not connect to server: No such file or directory <note> <para> - Prior to <productname>PostgreSQL</> 9.3, only System V shared memory + Prior to <productname>PostgreSQL</productname> 9.3, only System V shared memory was used, so the amount of System V shared memory required to start the server was much larger. If you are running an older version of the server, please consult the documentation for your server version. @@ -642,9 +642,9 @@ psql: could not connect to server: No such file or directory </note> <para> - System V <acronym>IPC</> features are typically constrained by + System V <acronym>IPC</acronym> features are typically constrained by system-wide allocation limits. - When <productname>PostgreSQL</> exceeds one of these limits, + When <productname>PostgreSQL</productname> exceeds one of these limits, the server will refuse to start and should leave an instructive error message describing the problem and what to do about it. (See also <xref @@ -655,78 +655,78 @@ psql: could not connect to server: No such file or directory </para> <table id="sysvipc-parameters"> - <title><systemitem class="osname">System V</> <acronym>IPC</> Parameters</title> + <title><systemitem class="osname">System V</systemitem> <acronym>IPC</acronym> Parameters</title> <tgroup cols="3"> <thead> <row> - <entry>Name</> - <entry>Description</> - <entry>Values needed to run one <productname>PostgreSQL</> instance</> + <entry>Name</entry> + <entry>Description</entry> + <entry>Values needed to run one <productname>PostgreSQL</productname> instance</entry> </row> </thead> <tbody> <row> - <entry><varname>SHMMAX</></> - <entry>Maximum size of shared memory segment (bytes)</> + <entry><varname>SHMMAX</varname></entry> + <entry>Maximum size of shared memory segment (bytes)</entry> <entry>at least 1kB, but the default is usually much higher</entry> </row> <row> - <entry><varname>SHMMIN</></> - <entry>Minimum size of shared memory segment (bytes)</> - <entry>1</> + <entry><varname>SHMMIN</varname></entry> + <entry>Minimum size of shared memory segment (bytes)</entry> + <entry>1</entry> </row> <row> - <entry><varname>SHMALL</></> - <entry>Total amount of shared memory available (bytes or pages)</> + <entry><varname>SHMALL</varname></entry> + <entry>Total amount of shared memory available (bytes or pages)</entry> <entry>same as <varname>SHMMAX</varname> if bytes, or <literal>ceil(SHMMAX/PAGE_SIZE)</literal> if pages, - plus room for other applications</> + plus room for other applications</entry> </row> <row> - <entry><varname>SHMSEG</></> - <entry>Maximum number of shared memory segments per process</> - <entry>only 1 segment is needed, but the default is much higher</> + <entry><varname>SHMSEG</varname></entry> + <entry>Maximum number of shared memory segments per process</entry> + <entry>only 1 segment is needed, but the default is much higher</entry> </row> <row> - <entry><varname>SHMMNI</></> - <entry>Maximum number of shared memory segments system-wide</> - <entry>like <varname>SHMSEG</> plus room for other applications</> + <entry><varname>SHMMNI</varname></entry> + <entry>Maximum number of shared memory segments system-wide</entry> + <entry>like <varname>SHMSEG</varname> plus room for other applications</entry> </row> <row> - <entry><varname>SEMMNI</></> - <entry>Maximum number of semaphore identifiers (i.e., sets)</> - <entry>at least <literal>ceil((max_connections + autovacuum_max_workers + max_worker_processes + 5) / 16)</literal> plus room for other applications</> + <entry><varname>SEMMNI</varname></entry> + <entry>Maximum number of semaphore identifiers (i.e., sets)</entry> + <entry>at least <literal>ceil((max_connections + autovacuum_max_workers + max_worker_processes + 5) / 16)</literal> plus room for other applications</entry> </row> <row> - <entry><varname>SEMMNS</></> - <entry>Maximum number of semaphores system-wide</> - <entry><literal>ceil((max_connections + autovacuum_max_workers + max_worker_processes + 5) / 16) * 17</literal> plus room for other applications</> + <entry><varname>SEMMNS</varname></entry> + <entry>Maximum number of semaphores system-wide</entry> + <entry><literal>ceil((max_connections + autovacuum_max_workers + max_worker_processes + 5) / 16) * 17</literal> plus room for other applications</entry> </row> <row> - <entry><varname>SEMMSL</></> - <entry>Maximum number of semaphores per set</> - <entry>at least 17</> + <entry><varname>SEMMSL</varname></entry> + <entry>Maximum number of semaphores per set</entry> + <entry>at least 17</entry> </row> <row> - <entry><varname>SEMMAP</></> - <entry>Number of entries in semaphore map</> - <entry>see text</> + <entry><varname>SEMMAP</varname></entry> + <entry>Number of entries in semaphore map</entry> + <entry>see text</entry> </row> <row> - <entry><varname>SEMVMX</></> - <entry>Maximum value of semaphore</> - <entry>at least 1000 (The default is often 32767; do not change unless necessary)</> + <entry><varname>SEMVMX</varname></entry> + <entry>Maximum value of semaphore</entry> + <entry>at least 1000 (The default is often 32767; do not change unless necessary)</entry> </row> </tbody> @@ -734,28 +734,28 @@ psql: could not connect to server: No such file or directory </table> <para> - <productname>PostgreSQL</> requires a few bytes of System V shared memory + <productname>PostgreSQL</productname> requires a few bytes of System V shared memory (typically 48 bytes, on 64-bit platforms) for each copy of the server. On most modern operating systems, this amount can easily be allocated. However, if you are running many copies of the server, or if other applications are also using System V shared memory, it may be necessary to - increase <varname>SHMALL</>, which is the total amount of System V shared - memory system-wide. Note that <varname>SHMALL</> is measured in pages + increase <varname>SHMALL</varname>, which is the total amount of System V shared + memory system-wide. Note that <varname>SHMALL</varname> is measured in pages rather than bytes on many systems. </para> <para> Less likely to cause problems is the minimum size for shared - memory segments (<varname>SHMMIN</>), which should be at most - approximately 32 bytes for <productname>PostgreSQL</> (it is + memory segments (<varname>SHMMIN</varname>), which should be at most + approximately 32 bytes for <productname>PostgreSQL</productname> (it is usually just 1). The maximum number of segments system-wide - (<varname>SHMMNI</>) or per-process (<varname>SHMSEG</>) are unlikely + (<varname>SHMMNI</varname>) or per-process (<varname>SHMSEG</varname>) are unlikely to cause a problem unless your system has them set to zero. </para> <para> When using System V semaphores, - <productname>PostgreSQL</> uses one semaphore per allowed connection + <productname>PostgreSQL</productname> uses one semaphore per allowed connection (<xref linkend="guc-max-connections">), allowed autovacuum worker process (<xref linkend="guc-autovacuum-max-workers">) and allowed background process (<xref linkend="guc-max-worker-processes">), in sets of 16. @@ -763,25 +763,25 @@ psql: could not connect to server: No such file or directory also contain a 17th semaphore which contains a <quote>magic number</quote>, to detect collision with semaphore sets used by other applications. The maximum number of semaphores in the system - is set by <varname>SEMMNS</>, which consequently must be at least - as high as <varname>max_connections</> plus - <varname>autovacuum_max_workers</> plus <varname>max_worker_processes</>, + is set by <varname>SEMMNS</varname>, which consequently must be at least + as high as <varname>max_connections</varname> plus + <varname>autovacuum_max_workers</varname> plus <varname>max_worker_processes</varname>, plus one extra for each 16 allowed connections plus workers (see the formula in <xref - linkend="sysvipc-parameters">). The parameter <varname>SEMMNI</> + linkend="sysvipc-parameters">). The parameter <varname>SEMMNI</varname> determines the limit on the number of semaphore sets that can exist on the system at one time. Hence this parameter must be at - least <literal>ceil((max_connections + autovacuum_max_workers + max_worker_processes + 5) / 16)</>. + least <literal>ceil((max_connections + autovacuum_max_workers + max_worker_processes + 5) / 16)</literal>. Lowering the number of allowed connections is a temporary workaround for failures, which are usually confusingly worded <quote>No space - left on device</>, from the function <function>semget</>. + left on device</quote>, from the function <function>semget</function>. </para> <para> In some cases it might also be necessary to increase - <varname>SEMMAP</> to be at least on the order of - <varname>SEMMNS</>. This parameter defines the size of the semaphore + <varname>SEMMAP</varname> to be at least on the order of + <varname>SEMMNS</varname>. This parameter defines the size of the semaphore resource map, in which each contiguous block of available semaphores needs an entry. When a semaphore set is freed it is either added to an existing entry that is adjacent to the freed block or it is @@ -792,9 +792,9 @@ psql: could not connect to server: No such file or directory </para> <para> - Various other settings related to <quote>semaphore undo</>, such as - <varname>SEMMNU</> and <varname>SEMUME</>, do not affect - <productname>PostgreSQL</>. + Various other settings related to <quote>semaphore undo</quote>, such as + <varname>SEMMNU</varname> and <varname>SEMUME</varname>, do not affect + <productname>PostgreSQL</productname>. </para> <para> @@ -810,8 +810,8 @@ psql: could not connect to server: No such file or directory <variablelist> <varlistentry> - <term><systemitem class="osname">AIX</> - <indexterm><primary>AIX</><secondary>IPC configuration</></> + <term><systemitem class="osname">AIX</systemitem> + <indexterm><primary>AIX</primary><secondary>IPC configuration</secondary></indexterm> </term> <listitem> <para> @@ -833,8 +833,8 @@ psql: could not connect to server: No such file or directory <varlistentry> - <term><systemitem class="osname">FreeBSD</> - <indexterm><primary>FreeBSD</><secondary>IPC configuration</></> + <term><systemitem class="osname">FreeBSD</systemitem> + <indexterm><primary>FreeBSD</primary><secondary>IPC configuration</secondary></indexterm> </term> <listitem> <para> @@ -861,8 +861,8 @@ kern.ipc.semmnu=256 </programlisting> After modifying these values a reboot is required for the new settings to take effect. - (Note: FreeBSD does not use <varname>SEMMAP</>. Older versions - would accept but ignore a setting for <literal>kern.ipc.semmap</>; + (Note: FreeBSD does not use <varname>SEMMAP</varname>. Older versions + would accept but ignore a setting for <literal>kern.ipc.semmap</literal>; newer versions reject it altogether.) </para> @@ -874,8 +874,8 @@ kern.ipc.semmnu=256 </para> <para> - If running in FreeBSD jails by enabling <application>sysctl</>'s - <literal>security.jail.sysvipc_allowed</>, <application>postmaster</>s + If running in FreeBSD jails by enabling <application>sysctl</application>'s + <literal>security.jail.sysvipc_allowed</literal>, <application>postmaster</application>s running in different jails should be run by different operating system users. This improves security because it prevents non-root users from interfering with shared memory or semaphores in different jails, @@ -886,19 +886,19 @@ kern.ipc.semmnu=256 </para> <para> - <systemitem class="osname">FreeBSD</> versions before 4.0 work like - <systemitem class="osname">OpenBSD</> (see below). + <systemitem class="osname">FreeBSD</systemitem> versions before 4.0 work like + <systemitem class="osname">OpenBSD</systemitem> (see below). </para> </listitem> </varlistentry> <varlistentry> - <term><systemitem class="osname">NetBSD</> - <indexterm><primary>NetBSD</><secondary>IPC configuration</></> + <term><systemitem class="osname">NetBSD</systemitem> + <indexterm><primary>NetBSD</primary><secondary>IPC configuration</secondary></indexterm> </term> <listitem> <para> - In <systemitem class="osname">NetBSD</> 5.0 and later, + In <systemitem class="osname">NetBSD</systemitem> 5.0 and later, IPC parameters can be adjusted using <command>sysctl</command>, for example: <screen> @@ -916,24 +916,24 @@ kern.ipc.semmnu=256 </para> <para> - <systemitem class="osname">NetBSD</> versions before 5.0 work like - <systemitem class="osname">OpenBSD</> (see below), except that - parameters should be set with the keyword <literal>options</> not - <literal>option</>. + <systemitem class="osname">NetBSD</systemitem> versions before 5.0 work like + <systemitem class="osname">OpenBSD</systemitem> (see below), except that + parameters should be set with the keyword <literal>options</literal> not + <literal>option</literal>. </para> </listitem> </varlistentry> <varlistentry> - <term><systemitem class="osname">OpenBSD</> - <indexterm><primary>OpenBSD</><secondary>IPC configuration</></> + <term><systemitem class="osname">OpenBSD</systemitem> + <indexterm><primary>OpenBSD</primary><secondary>IPC configuration</secondary></indexterm> </term> <listitem> <para> - The options <varname>SYSVSHM</> and <varname>SYSVSEM</> need + The options <varname>SYSVSHM</varname> and <varname>SYSVSEM</varname> need to be enabled when the kernel is compiled. (They are by default.) The maximum size of shared memory is determined by - the option <varname>SHMMAXPGS</> (in pages). The following + the option <varname>SHMMAXPGS</varname> (in pages). The following shows an example of how to set the various parameters: <programlisting> option SYSVSHM @@ -958,30 +958,30 @@ option SEMMAP=256 </varlistentry> <varlistentry> - <term><systemitem class="osname">HP-UX</> - <indexterm><primary>HP-UX</><secondary>IPC configuration</></> + <term><systemitem class="osname">HP-UX</systemitem> + <indexterm><primary>HP-UX</primary><secondary>IPC configuration</secondary></indexterm> </term> <listitem> <para> The default settings tend to suffice for normal installations. - On <productname>HP-UX</> 10, the factory default for - <varname>SEMMNS</> is 128, which might be too low for larger + On <productname>HP-UX</productname> 10, the factory default for + <varname>SEMMNS</varname> is 128, which might be too low for larger database sites. </para> <para> - <acronym>IPC</> parameters can be set in the <application>System - Administration Manager</> (<acronym>SAM</>) under + <acronym>IPC</acronym> parameters can be set in the <application>System + Administration Manager</application> (<acronym>SAM</acronym>) under <menuchoice><guimenu>Kernel - Configuration</><guimenuitem>Configurable Parameters</></>. Choose - <guibutton>Create A New Kernel</> when you're done. + Configuration</guimenu><guimenuitem>Configurable Parameters</guimenuitem></menuchoice>. Choose + <guibutton>Create A New Kernel</guibutton> when you're done. </para> </listitem> </varlistentry> <varlistentry> - <term><systemitem class="osname">Linux</> - <indexterm><primary>Linux</><secondary>IPC configuration</></> + <term><systemitem class="osname">Linux</systemitem> + <indexterm><primary>Linux</primary><secondary>IPC configuration</secondary></indexterm> </term> <listitem> <para> @@ -1023,13 +1023,13 @@ option SEMMAP=256 <varlistentry> - <term><systemitem class="osname">macOS</> - <indexterm><primary>macOS</><secondary>IPC configuration</></> + <term><systemitem class="osname">macOS</systemitem> + <indexterm><primary>macOS</primary><secondary>IPC configuration</secondary></indexterm> </term> <listitem> <para> The recommended method for configuring shared memory in macOS - is to create a file named <filename>/etc/sysctl.conf</>, + is to create a file named <filename>/etc/sysctl.conf</filename>, containing variable assignments such as: <programlisting> kern.sysv.shmmax=4194304 @@ -1039,32 +1039,32 @@ kern.sysv.shmseg=8 kern.sysv.shmall=1024 </programlisting> Note that in some macOS versions, - <emphasis>all five</> shared-memory parameters must be set in - <filename>/etc/sysctl.conf</>, else the values will be ignored. + <emphasis>all five</emphasis> shared-memory parameters must be set in + <filename>/etc/sysctl.conf</filename>, else the values will be ignored. </para> <para> Beware that recent releases of macOS ignore attempts to set - <varname>SHMMAX</> to a value that isn't an exact multiple of 4096. + <varname>SHMMAX</varname> to a value that isn't an exact multiple of 4096. </para> <para> - <varname>SHMALL</> is measured in 4 kB pages on this platform. + <varname>SHMALL</varname> is measured in 4 kB pages on this platform. </para> <para> In older macOS versions, you will need to reboot to have changes in the shared memory parameters take effect. As of 10.5 it is possible to - change all but <varname>SHMMNI</> on the fly, using - <application>sysctl</>. But it's still best to set up your preferred - values via <filename>/etc/sysctl.conf</>, so that the values will be + change all but <varname>SHMMNI</varname> on the fly, using + <application>sysctl</application>. But it's still best to set up your preferred + values via <filename>/etc/sysctl.conf</filename>, so that the values will be kept across reboots. </para> <para> - The file <filename>/etc/sysctl.conf</> is only honored in macOS + The file <filename>/etc/sysctl.conf</filename> is only honored in macOS 10.3.9 and later. If you are running a previous 10.3.x release, - you must edit the file <filename>/etc/rc</> + you must edit the file <filename>/etc/rc</filename> and change the values in the following commands: <programlisting> sysctl -w kern.sysv.shmmax @@ -1074,27 +1074,27 @@ sysctl -w kern.sysv.shmseg sysctl -w kern.sysv.shmall </programlisting> Note that - <filename>/etc/rc</> is usually overwritten by macOS system updates, + <filename>/etc/rc</filename> is usually overwritten by macOS system updates, so you should expect to have to redo these edits after each update. </para> <para> In macOS 10.2 and earlier, instead edit these commands in the file - <filename>/System/Library/StartupItems/SystemTuning/SystemTuning</>. + <filename>/System/Library/StartupItems/SystemTuning/SystemTuning</filename>. </para> </listitem> </varlistentry> <varlistentry> - <term><systemitem class="osname">Solaris</> 2.6 to 2.9 (Solaris + <term><systemitem class="osname">Solaris</systemitem> 2.6 to 2.9 (Solaris 6 to Solaris 9) - <indexterm><primary>Solaris</><secondary>IPC configuration</></> + <indexterm><primary>Solaris</primary><secondary>IPC configuration</secondary></indexterm> </term> <listitem> <para> The relevant settings can be changed in - <filename>/etc/system</>, for example: + <filename>/etc/system</filename>, for example: <programlisting> set shmsys:shminfo_shmmax=0x2000000 set shmsys:shminfo_shmmin=1 @@ -1114,30 +1114,30 @@ set semsys:seminfo_semmsl=32 </varlistentry> <varlistentry> - <term><systemitem class="osname">Solaris</> 2.10 (Solaris + <term><systemitem class="osname">Solaris</systemitem> 2.10 (Solaris 10) and later</term> - <term><systemitem class="osname">OpenSolaris</></term> + <term><systemitem class="osname">OpenSolaris</systemitem></term> <listitem> <para> In Solaris 10 and later, and OpenSolaris, the default shared memory and semaphore settings are good enough for most - <productname>PostgreSQL</> applications. Solaris now defaults - to a <varname>SHMMAX</> of one-quarter of system <acronym>RAM</>. + <productname>PostgreSQL</productname> applications. Solaris now defaults + to a <varname>SHMMAX</varname> of one-quarter of system <acronym>RAM</acronym>. To further adjust this setting, use a project setting associated - with the <literal>postgres</> user. For example, run the - following as <literal>root</>: + with the <literal>postgres</literal> user. For example, run the + following as <literal>root</literal>: <programlisting> projadd -c "PostgreSQL DB User" -K "project.max-shm-memory=(privileged,8GB,deny)" -U postgres -G postgres user.postgres </programlisting> </para> <para> - This command adds the <literal>user.postgres</> project and - sets the shared memory maximum for the <literal>postgres</> + This command adds the <literal>user.postgres</literal> project and + sets the shared memory maximum for the <literal>postgres</literal> user to 8GB, and takes effect the next time that user logs - in, or when you restart <productname>PostgreSQL</> (not reload). - The above assumes that <productname>PostgreSQL</> is run by - the <literal>postgres</> user in the <literal>postgres</> + in, or when you restart <productname>PostgreSQL</productname> (not reload). + The above assumes that <productname>PostgreSQL</productname> is run by + the <literal>postgres</literal> user in the <literal>postgres</literal> group. No server reboot is required. </para> @@ -1152,11 +1152,11 @@ project.max-msg-ids=(priv,4096,deny) </para> <para> - Additionally, if you are running <productname>PostgreSQL</> + Additionally, if you are running <productname>PostgreSQL</productname> inside a zone, you may need to raise the zone resource usage limits as well. See "Chapter2: Projects and Tasks" in the - <citetitle>System Administrator's Guide</> for more - information on <literal>projects</> and <command>prctl</>. + <citetitle>System Administrator's Guide</citetitle> for more + information on <literal>projects</literal> and <command>prctl</command>. </para> </listitem> </varlistentry> @@ -1259,7 +1259,7 @@ RemoveIPC=no limit can only be changed by the root user. The system call <function>setrlimit</function> is responsible for setting these parameters. The shell's built-in command <command>ulimit</command> - (Bourne shells) or <command>limit</command> (<application>csh</>) is + (Bourne shells) or <command>limit</command> (<application>csh</application>) is used to control the resource limits from the command line. On BSD-derived systems the file <filename>/etc/login.conf</filename> controls the various resource limits set during login. See the @@ -1320,7 +1320,7 @@ default:\ processes to open large numbers of files; if more than a few processes do so then the system-wide limit can easily be exceeded. If you find this happening, and you do not want to alter the - system-wide limit, you can set <productname>PostgreSQL</>'s <xref + system-wide limit, you can set <productname>PostgreSQL</productname>'s <xref linkend="guc-max-files-per-process"> configuration parameter to limit the consumption of open files. </para> @@ -1380,36 +1380,36 @@ Out of Memory: Killed process 12345 (postgres). system running out of memory, you can avoid the problem by changing your configuration. In some cases, it may help to lower memory-related configuration parameters, particularly - <link linkend="guc-shared-buffers"><varname>shared_buffers</></link> - and <link linkend="guc-work-mem"><varname>work_mem</></link>. In + <link linkend="guc-shared-buffers"><varname>shared_buffers</varname></link> + and <link linkend="guc-work-mem"><varname>work_mem</varname></link>. In other cases, the problem may be caused by allowing too many connections to the database server itself. In many cases, it may be better to reduce - <link linkend="guc-max-connections"><varname>max_connections</></link> + <link linkend="guc-max-connections"><varname>max_connections</varname></link> and instead make use of external connection-pooling software. </para> <para> On Linux 2.6 and later, it is possible to modify the - kernel's behavior so that it will not <quote>overcommit</> memory. + kernel's behavior so that it will not <quote>overcommit</quote> memory. Although this setting will not prevent the <ulink - url="http://lwn.net/Articles/104179/">OOM killer</> from being invoked + url="http://lwn.net/Articles/104179/">OOM killer</ulink> from being invoked altogether, it will lower the chances significantly and will therefore lead to more robust system behavior. This is done by selecting strict overcommit mode via <command>sysctl</command>: <programlisting> sysctl -w vm.overcommit_memory=2 </programlisting> - or placing an equivalent entry in <filename>/etc/sysctl.conf</>. + or placing an equivalent entry in <filename>/etc/sysctl.conf</filename>. You might also wish to modify the related setting - <varname>vm.overcommit_ratio</>. For details see the kernel documentation + <varname>vm.overcommit_ratio</varname>. For details see the kernel documentation file <ulink url="https://www.kernel.org/doc/Documentation/vm/overcommit-accounting"></ulink>. </para> <para> Another approach, which can be used with or without altering - <varname>vm.overcommit_memory</>, is to set the process-specific - <firstterm>OOM score adjustment</> value for the postmaster process to - <literal>-1000</>, thereby guaranteeing it will not be targeted by the OOM + <varname>vm.overcommit_memory</varname>, is to set the process-specific + <firstterm>OOM score adjustment</firstterm> value for the postmaster process to + <literal>-1000</literal>, thereby guaranteeing it will not be targeted by the OOM killer. The simplest way to do this is to execute <programlisting> echo -1000 > /proc/self/oom_score_adj @@ -1426,33 +1426,33 @@ export PG_OOM_ADJUST_VALUE=0 These settings will cause postmaster child processes to run with the normal OOM score adjustment of zero, so that the OOM killer can still target them at need. You could use some other value for - <envar>PG_OOM_ADJUST_VALUE</> if you want the child processes to run - with some other OOM score adjustment. (<envar>PG_OOM_ADJUST_VALUE</> + <envar>PG_OOM_ADJUST_VALUE</envar> if you want the child processes to run + with some other OOM score adjustment. (<envar>PG_OOM_ADJUST_VALUE</envar> can also be omitted, in which case it defaults to zero.) If you do not - set <envar>PG_OOM_ADJUST_FILE</>, the child processes will run with the + set <envar>PG_OOM_ADJUST_FILE</envar>, the child processes will run with the same OOM score adjustment as the postmaster, which is unwise since the whole point is to ensure that the postmaster has a preferential setting. </para> <para> - Older Linux kernels do not offer <filename>/proc/self/oom_score_adj</>, + Older Linux kernels do not offer <filename>/proc/self/oom_score_adj</filename>, but may have a previous version of the same functionality called - <filename>/proc/self/oom_adj</>. This works the same except the disable - value is <literal>-17</> not <literal>-1000</>. + <filename>/proc/self/oom_adj</filename>. This works the same except the disable + value is <literal>-17</literal> not <literal>-1000</literal>. </para> <note> <para> Some vendors' Linux 2.4 kernels are reported to have early versions of the 2.6 overcommit <command>sysctl</command> parameter. However, setting - <literal>vm.overcommit_memory</> to 2 + <literal>vm.overcommit_memory</literal> to 2 on a 2.4 kernel that does not have the relevant code will make things worse, not better. It is recommended that you inspect the actual kernel source code (see the function - <function>vm_enough_memory</> in the file <filename>mm/mmap.c</>) + <function>vm_enough_memory</function> in the file <filename>mm/mmap.c</filename>) to verify what is supported in your kernel before you try this in a 2.4 - installation. The presence of the <filename>overcommit-accounting</> - documentation file should <emphasis>not</> be taken as evidence that the + installation. The presence of the <filename>overcommit-accounting</filename> + documentation file should <emphasis>not</emphasis> be taken as evidence that the feature is there. If in any doubt, consult a kernel expert or your kernel vendor. </para> @@ -1473,7 +1473,7 @@ export PG_OOM_ADJUST_VALUE=0 number of huge pages needed, start <productname>PostgreSQL</productname> without huge pages enabled and check the postmaster's <varname>VmPeak</varname> value, as well as the system's - huge page size, using the <filename>/proc</> file system. This might + huge page size, using the <filename>/proc</filename> file system. This might look like: <programlisting> $ <userinput>head -1 $PGDATA/postmaster.pid</userinput> @@ -1509,8 +1509,8 @@ $ <userinput>grep Huge /proc/meminfo</userinput> <para> It may also be necessary to give the database server's operating system user permission to use huge pages by setting - <varname>vm.hugetlb_shm_group</> via <application>sysctl</>, and/or - give permission to lock memory with <command>ulimit -l</>. + <varname>vm.hugetlb_shm_group</varname> via <application>sysctl</application>, and/or + give permission to lock memory with <command>ulimit -l</command>. </para> <para> @@ -1518,8 +1518,8 @@ $ <userinput>grep Huge /proc/meminfo</userinput> <productname>PostgreSQL</productname> is to use them when possible and to fall back to normal pages when failing. To enforce the use of huge pages, you can set <xref linkend="guc-huge-pages"> - to <literal>on</literal> in <filename>postgresql.conf</>. - Note that with this setting <productname>PostgreSQL</> will fail to + to <literal>on</literal> in <filename>postgresql.conf</filename>. + Note that with this setting <productname>PostgreSQL</productname> will fail to start if not enough huge pages are available. </para> @@ -1537,7 +1537,7 @@ $ <userinput>grep Huge /proc/meminfo</userinput> <title>Shutting Down the Server</title> <indexterm zone="server-shutdown"> - <primary>shutdown</> + <primary>shutdown</primary> </indexterm> <para> @@ -1547,7 +1547,7 @@ $ <userinput>grep Huge /proc/meminfo</userinput> <variablelist> <varlistentry> - <term><systemitem>SIGTERM</systemitem><indexterm><primary>SIGTERM</></></term> + <term><systemitem>SIGTERM</systemitem><indexterm><primary>SIGTERM</primary></indexterm></term> <listitem> <para> This is the <firstterm>Smart Shutdown</firstterm> mode. @@ -1566,7 +1566,7 @@ $ <userinput>grep Huge /proc/meminfo</userinput> </varlistentry> <varlistentry> - <term><systemitem>SIGINT</systemitem><indexterm><primary>SIGINT</></></term> + <term><systemitem>SIGINT</systemitem><indexterm><primary>SIGINT</primary></indexterm></term> <listitem> <para> This is the <firstterm>Fast Shutdown</firstterm> mode. @@ -1581,7 +1581,7 @@ $ <userinput>grep Huge /proc/meminfo</userinput> </varlistentry> <varlistentry> - <term><systemitem>SIGQUIT</systemitem><indexterm><primary>SIGQUIT</></></term> + <term><systemitem>SIGQUIT</systemitem><indexterm><primary>SIGQUIT</primary></indexterm></term> <listitem> <para> This is the <firstterm>Immediate Shutdown</firstterm> mode. @@ -1602,9 +1602,9 @@ $ <userinput>grep Huge /proc/meminfo</userinput> <para> The <xref linkend="app-pg-ctl"> program provides a convenient interface for sending these signals to shut down the server. - Alternatively, you can send the signal directly using <command>kill</> + Alternatively, you can send the signal directly using <command>kill</command> on non-Windows systems. - The <acronym>PID</> of the <command>postgres</command> process can be + The <acronym>PID</acronym> of the <command>postgres</command> process can be found using the <command>ps</command> program, or from the file <filename>postmaster.pid</filename> in the data directory. For example, to do a fast shutdown: @@ -1628,15 +1628,15 @@ $ <userinput>kill -INT `head -1 /usr/local/pgsql/data/postmaster.pid`</userinput <para> To terminate an individual session while allowing other sessions to - continue, use <function>pg_terminate_backend()</> (see <xref + continue, use <function>pg_terminate_backend()</function> (see <xref linkend="functions-admin-signal-table">) or send a - <systemitem>SIGTERM</> signal to the child process associated with + <systemitem>SIGTERM</systemitem> signal to the child process associated with the session. </para> </sect1> <sect1 id="upgrading"> - <title>Upgrading a <productname>PostgreSQL</> Cluster</title> + <title>Upgrading a <productname>PostgreSQL</productname> Cluster</title> <indexterm zone="upgrading"> <primary>upgrading</primary> @@ -1649,7 +1649,7 @@ $ <userinput>kill -INT `head -1 /usr/local/pgsql/data/postmaster.pid`</userinput <para> This section discusses how to upgrade your database data from one - <productname>PostgreSQL</> release to a newer one. + <productname>PostgreSQL</productname> release to a newer one. </para> <para> @@ -1676,7 +1676,7 @@ $ <userinput>kill -INT `head -1 /usr/local/pgsql/data/postmaster.pid`</userinput </para> <para> - For <emphasis>major</> releases of <productname>PostgreSQL</>, the + For <emphasis>major</emphasis> releases of <productname>PostgreSQL</productname>, the internal data storage format is subject to change, thus complicating upgrades. The traditional method for moving data to a new major version is to dump and reload the database, though this can be slow. A @@ -1698,7 +1698,7 @@ $ <userinput>kill -INT `head -1 /usr/local/pgsql/data/postmaster.pid`</userinput Cautious users will want to test their client applications on the new version before switching over fully; therefore, it's often a good idea to set up concurrent installations of old and new versions. When - testing a <productname>PostgreSQL</> major upgrade, consider the + testing a <productname>PostgreSQL</productname> major upgrade, consider the following categories of possible changes: </para> @@ -1728,7 +1728,7 @@ $ <userinput>kill -INT `head -1 /usr/local/pgsql/data/postmaster.pid`</userinput <term>Library API</term> <listitem> <para> - Typically libraries like <application>libpq</> only add new + Typically libraries like <application>libpq</application> only add new functionality, again unless mentioned in the release notes. </para> </listitem> @@ -1757,13 +1757,13 @@ $ <userinput>kill -INT `head -1 /usr/local/pgsql/data/postmaster.pid`</userinput </variablelist> <sect2 id="upgrading-via-pgdumpall"> - <title>Upgrading Data via <application>pg_dumpall</></title> + <title>Upgrading Data via <application>pg_dumpall</application></title> <para> One upgrade method is to dump data from one major version of - <productname>PostgreSQL</> and reload it in another — to do - this, you must use a <emphasis>logical</> backup tool like - <application>pg_dumpall</>; file system + <productname>PostgreSQL</productname> and reload it in another — to do + this, you must use a <emphasis>logical</emphasis> backup tool like + <application>pg_dumpall</application>; file system level backup methods will not work. (There are checks in place that prevent you from using a data directory with an incompatible version of <productname>PostgreSQL</productname>, so no great harm can be done by @@ -1771,18 +1771,18 @@ $ <userinput>kill -INT `head -1 /usr/local/pgsql/data/postmaster.pid`</userinput </para> <para> - It is recommended that you use the <application>pg_dump</> and - <application>pg_dumpall</> programs from the <emphasis>newer</> + It is recommended that you use the <application>pg_dump</application> and + <application>pg_dumpall</application> programs from the <emphasis>newer</emphasis> version of - <productname>PostgreSQL</>, to take advantage of enhancements + <productname>PostgreSQL</productname>, to take advantage of enhancements that might have been made in these programs. Current releases of the dump programs can read data from any server version back to 7.0. </para> <para> These instructions assume that your existing installation is under the - <filename>/usr/local/pgsql</> directory, and that the data area is in - <filename>/usr/local/pgsql/data</>. Substitute your paths + <filename>/usr/local/pgsql</filename> directory, and that the data area is in + <filename>/usr/local/pgsql/data</filename>. Substitute your paths appropriately. </para> @@ -1792,7 +1792,7 @@ $ <userinput>kill -INT `head -1 /usr/local/pgsql/data/postmaster.pid`</userinput If making a backup, make sure that your database is not being updated. This does not affect the integrity of the backup, but the changed data would of course not be included. If necessary, edit the - permissions in the file <filename>/usr/local/pgsql/data/pg_hba.conf</> + permissions in the file <filename>/usr/local/pgsql/data/pg_hba.conf</filename> (or equivalent) to disallow access from everyone except you. See <xref linkend="client-authentication"> for additional information on access control. @@ -1806,7 +1806,7 @@ $ <userinput>kill -INT `head -1 /usr/local/pgsql/data/postmaster.pid`</userinput To back up your database installation, type: <screen> -<userinput>pg_dumpall > <replaceable>outputfile</></userinput> +<userinput>pg_dumpall > <replaceable>outputfile</replaceable></userinput> </screen> </para> @@ -1830,11 +1830,11 @@ $ <userinput>kill -INT `head -1 /usr/local/pgsql/data/postmaster.pid`</userinput <para> Shut down the old server: <screen> -<userinput>pg_ctl stop</> +<userinput>pg_ctl stop</userinput> </screen> - On systems that have <productname>PostgreSQL</> started at boot time, + On systems that have <productname>PostgreSQL</productname> started at boot time, there is probably a start-up file that will accomplish the same thing. For - example, on a <systemitem class="osname">Red Hat Linux</> system one + example, on a <systemitem class="osname">Red Hat Linux</systemitem> system one might find that this works: <screen> <userinput>/etc/rc.d/init.d/postgresql stop</userinput> @@ -1853,7 +1853,7 @@ $ <userinput>kill -INT `head -1 /usr/local/pgsql/data/postmaster.pid`</userinput in mind the directory might consume significant disk space. To rename the directory, use a command like this: <screen> -<userinput>mv /usr/local/pgsql /usr/local/pgsql.old</> +<userinput>mv /usr/local/pgsql /usr/local/pgsql.old</userinput> </screen> (Be sure to move the directory as a single unit so relative paths remain unchanged.) @@ -1873,15 +1873,15 @@ $ <userinput>kill -INT `head -1 /usr/local/pgsql/data/postmaster.pid`</userinput execute these commands while logged in to the special database user account (which you already have if you are upgrading). <programlisting> -<userinput>/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data</> +<userinput>/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data</userinput> </programlisting> </para> </step> <step> <para> - Restore your previous <filename>pg_hba.conf</> and any - <filename>postgresql.conf</> modifications. + Restore your previous <filename>pg_hba.conf</filename> and any + <filename>postgresql.conf</filename> modifications. </para> </step> @@ -1890,7 +1890,7 @@ $ <userinput>kill -INT `head -1 /usr/local/pgsql/data/postmaster.pid`</userinput Start the database server, again using the special database user account: <programlisting> -<userinput>/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data</> +<userinput>/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data</userinput> </programlisting> </para> </step> @@ -1899,9 +1899,9 @@ $ <userinput>kill -INT `head -1 /usr/local/pgsql/data/postmaster.pid`</userinput <para> Finally, restore your data from backup with: <screen> -<userinput>/usr/local/pgsql/bin/psql -d postgres -f <replaceable>outputfile</></userinput> +<userinput>/usr/local/pgsql/bin/psql -d postgres -f <replaceable>outputfile</replaceable></userinput> </screen> - using the <emphasis>new</> <application>psql</>. + using the <emphasis>new</emphasis> <application>psql</application>. </para> </step> </procedure> @@ -1920,16 +1920,16 @@ pg_dumpall -p 5432 | psql -d postgres -p 5433 </sect2> <sect2 id="upgrading-via-pg-upgrade"> - <title>Upgrading Data via <application>pg_upgrade</></title> + <title>Upgrading Data via <application>pg_upgrade</application></title> <para> The <xref linkend="pgupgrade"> module allows an installation to - be migrated in-place from one major <productname>PostgreSQL</> + be migrated in-place from one major <productname>PostgreSQL</productname> version to another. Upgrades can be performed in minutes, - particularly with <option>--link</> mode. It requires steps similar to - <application>pg_dumpall</> above, e.g. starting/stopping the server, - running <application>initdb</>. The <application>pg_upgrade</> <link - linkend="pgupgrade">documentation</> outlines the necessary steps. + particularly with <option>--link</option> mode. It requires steps similar to + <application>pg_dumpall</application> above, e.g. starting/stopping the server, + running <application>initdb</application>. The <application>pg_upgrade</application> <link + linkend="pgupgrade">documentation</link> outlines the necessary steps. </para> </sect2> @@ -1939,12 +1939,12 @@ pg_dumpall -p 5432 | psql -d postgres -p 5433 <para> It is also possible to use certain replication methods, such as - <productname>Slony</>, to create a standby server with the updated version of - <productname>PostgreSQL</>. This is possible because Slony supports + <productname>Slony</productname>, to create a standby server with the updated version of + <productname>PostgreSQL</productname>. This is possible because Slony supports replication between different major versions of - <productname>PostgreSQL</>. The standby can be on the same computer or + <productname>PostgreSQL</productname>. The standby can be on the same computer or a different computer. Once it has synced up with the master server - (running the older version of <productname>PostgreSQL</>), you can + (running the older version of <productname>PostgreSQL</productname>), you can switch masters and make the standby the master and shut down the older database instance. Such a switch-over results in only several seconds of downtime for an upgrade. @@ -1966,28 +1966,28 @@ pg_dumpall -p 5432 | psql -d postgres -p 5433 server is down, it is possible for a local user to spoof the normal server by starting their own server. The spoof server could read passwords and queries sent by clients, but could not return any data - because the <varname>PGDATA</> directory would still be secure because + because the <varname>PGDATA</varname> directory would still be secure because of directory permissions. Spoofing is possible because any user can start a database server; a client cannot identify an invalid server unless it is specially configured. </para> <para> - One way to prevent spoofing of <literal>local</> + One way to prevent spoofing of <literal>local</literal> connections is to use a Unix domain socket directory (<xref linkend="guc-unix-socket-directories">) that has write permission only for a trusted local user. This prevents a malicious user from creating their own socket file in that directory. If you are concerned that - some applications might still reference <filename>/tmp</> for the + some applications might still reference <filename>/tmp</filename> for the socket file and hence be vulnerable to spoofing, during operating system - startup create a symbolic link <filename>/tmp/.s.PGSQL.5432</> that points + startup create a symbolic link <filename>/tmp/.s.PGSQL.5432</filename> that points to the relocated socket file. You also might need to modify your - <filename>/tmp</> cleanup script to prevent removal of the symbolic link. + <filename>/tmp</filename> cleanup script to prevent removal of the symbolic link. </para> <para> - Another option for <literal>local</> connections is for clients to use - <link linkend="libpq-connect-requirepeer"><literal>requirepeer</></> + Another option for <literal>local</literal> connections is for clients to use + <link linkend="libpq-connect-requirepeer"><literal>requirepeer</literal></link> to specify the required owner of the server process connected to the socket. </para> @@ -1996,11 +1996,11 @@ pg_dumpall -p 5432 | psql -d postgres -p 5433 To prevent spoofing on TCP connections, the best solution is to use SSL certificates and make sure that clients check the server's certificate. To do that, the server - must be configured to accept only <literal>hostssl</> connections (<xref + must be configured to accept only <literal>hostssl</literal> connections (<xref linkend="auth-pg-hba-conf">) and have SSL key and certificate files (<xref linkend="ssl-tcp">). The TCP client must connect using - <literal>sslmode=verify-ca</> or - <literal>verify-full</> and have the appropriate root certificate + <literal>sslmode=verify-ca</literal> or + <literal>verify-full</literal> and have the appropriate root certificate file installed (<xref linkend="libq-ssl-certificates">). </para> </sect1> @@ -2091,7 +2091,7 @@ pg_dumpall -p 5432 | psql -d postgres -p 5433 <listitem> <para> - The <literal>MD5</> authentication method double-encrypts the + The <literal>MD5</literal> authentication method double-encrypts the password on the client before sending it to the server. It first MD5-encrypts it based on the user name, and then encrypts it based on a random salt sent by the server when the database @@ -2111,12 +2111,12 @@ pg_dumpall -p 5432 | psql -d postgres -p 5433 <para> SSL connections encrypt all data sent across the network: the password, the queries, and the data returned. The - <filename>pg_hba.conf</> file allows administrators to specify - which hosts can use non-encrypted connections (<literal>host</>) + <filename>pg_hba.conf</filename> file allows administrators to specify + which hosts can use non-encrypted connections (<literal>host</literal>) and which require SSL-encrypted connections - (<literal>hostssl</>). Also, clients can specify that they - connect to servers only via SSL. <application>Stunnel</> or - <application>SSH</> can also be used to encrypt transmissions. + (<literal>hostssl</literal>). Also, clients can specify that they + connect to servers only via SSL. <application>Stunnel</application> or + <application>SSH</application> can also be used to encrypt transmissions. </para> </listitem> </varlistentry> @@ -2131,7 +2131,7 @@ pg_dumpall -p 5432 | psql -d postgres -p 5433 on each side, but this provides stronger verification of identity than the mere use of passwords. It prevents a computer from pretending to be the server just long enough to read the password - sent by the client. It also helps prevent <quote>man in the middle</> + sent by the client. It also helps prevent <quote>man in the middle</quote> attacks where a computer between the client and server pretends to be the server and reads and passes all data between the client and server. @@ -2166,32 +2166,32 @@ pg_dumpall -p 5432 | psql -d postgres -p 5433 </indexterm> <para> - <productname>PostgreSQL</> has native support for using - <acronym>SSL</> connections to encrypt client/server communications + <productname>PostgreSQL</productname> has native support for using + <acronym>SSL</acronym> connections to encrypt client/server communications for increased security. This requires that <productname>OpenSSL</productname> is installed on both client and - server systems and that support in <productname>PostgreSQL</> is + server systems and that support in <productname>PostgreSQL</productname> is enabled at build time (see <xref linkend="installation">). </para> <para> - With <acronym>SSL</> support compiled in, the - <productname>PostgreSQL</> server can be started with - <acronym>SSL</> enabled by setting the parameter - <xref linkend="guc-ssl"> to <literal>on</> in - <filename>postgresql.conf</>. The server will listen for both normal - and <acronym>SSL</> connections on the same TCP port, and will negotiate - with any connecting client on whether to use <acronym>SSL</>. By + With <acronym>SSL</acronym> support compiled in, the + <productname>PostgreSQL</productname> server can be started with + <acronym>SSL</acronym> enabled by setting the parameter + <xref linkend="guc-ssl"> to <literal>on</literal> in + <filename>postgresql.conf</filename>. The server will listen for both normal + and <acronym>SSL</acronym> connections on the same TCP port, and will negotiate + with any connecting client on whether to use <acronym>SSL</acronym>. By default, this is at the client's option; see <xref linkend="auth-pg-hba-conf"> about how to set up the server to require - use of <acronym>SSL</> for some or all connections. + use of <acronym>SSL</acronym> for some or all connections. </para> <para> <productname>PostgreSQL</productname> reads the system-wide <productname>OpenSSL</productname> configuration file. By default, this file is named <filename>openssl.cnf</filename> and is located in the - directory reported by <literal>openssl version -d</>. + directory reported by <literal>openssl version -d</literal>. This default can be overridden by setting environment variable <envar>OPENSSL_CONF</envar> to the name of the desired configuration file. </para> @@ -2202,13 +2202,13 @@ pg_dumpall -p 5432 | psql -d postgres -p 5433 ciphers can be specified in the <productname>OpenSSL</productname> configuration file, you can specify ciphers specifically for use by the database server by modifying <xref linkend="guc-ssl-ciphers"> in - <filename>postgresql.conf</>. + <filename>postgresql.conf</filename>. </para> <note> <para> It is possible to have authentication without encryption overhead by - using <literal>NULL-SHA</> or <literal>NULL-MD5</> ciphers. However, + using <literal>NULL-SHA</literal> or <literal>NULL-MD5</literal> ciphers. However, a man-in-the-middle could read and pass communications between client and server. Also, encryption overhead is minimal compared to the overhead of authentication. For these reasons NULL ciphers are not @@ -2217,9 +2217,9 @@ pg_dumpall -p 5432 | psql -d postgres -p 5433 </note> <para> - To start in <acronym>SSL</> mode, files containing the server certificate + To start in <acronym>SSL</acronym> mode, files containing the server certificate and private key must exist. By default, these files are expected to be - named <filename>server.crt</> and <filename>server.key</>, respectively, in + named <filename>server.crt</filename> and <filename>server.key</filename>, respectively, in the server's data directory, but other names and locations can be specified using the configuration parameters <xref linkend="guc-ssl-cert-file"> and <xref linkend="guc-ssl-key-file">. @@ -2248,11 +2248,11 @@ pg_dumpall -p 5432 | psql -d postgres -p 5433 <para> In some cases, the server certificate might be signed by an - <quote>intermediate</> certificate authority, rather than one that is + <quote>intermediate</quote> certificate authority, rather than one that is directly trusted by clients. To use such a certificate, append the - certificate of the signing authority to the <filename>server.crt</> file, + certificate of the signing authority to the <filename>server.crt</filename> file, then its parent authority's certificate, and so on up to a certificate - authority, <quote>root</> or <quote>intermediate</>, that is trusted by + authority, <quote>root</quote> or <quote>intermediate</quote>, that is trusted by clients, i.e. signed by a certificate in the clients' <filename>root.crt</filename> files. </para> @@ -2267,7 +2267,7 @@ pg_dumpall -p 5432 | psql -d postgres -p 5433 directory, set the parameter <xref linkend="guc-ssl-ca-file"> in <filename>postgresql.conf</filename> to <literal>root.crt</literal>, and add the authentication option <literal>clientcert=1</literal> to the - appropriate <literal>hostssl</> line(s) in <filename>pg_hba.conf</>. + appropriate <literal>hostssl</literal> line(s) in <filename>pg_hba.conf</filename>. A certificate will then be requested from the client during SSL connection startup. (See <xref linkend="libpq-ssl"> for a description of how to set up certificates on the client.) The server will @@ -2276,21 +2276,21 @@ pg_dumpall -p 5432 | psql -d postgres -p 5433 </para> <para> - If intermediate <acronym>CA</>s appear in + If intermediate <acronym>CA</acronym>s appear in <filename>root.crt</filename>, the file must also contain certificate - chains to their root <acronym>CA</>s. Certificate Revocation List + chains to their root <acronym>CA</acronym>s. Certificate Revocation List (CRL) entries are also checked if the parameter <xref linkend="guc-ssl-crl-file"> is set. <!-- If this URL changes replace it with a URL to www.archive.org. --> (See <ulink - url="http://h71000.www7.hp.com/doc/83final/ba554_90007/ch04s02.html"></> + url="http://h71000.www7.hp.com/doc/83final/ba554_90007/ch04s02.html"></ulink> for diagrams showing SSL certificate usage.) </para> <para> The <literal>clientcert</literal> authentication option is available for - all authentication methods, but only in <filename>pg_hba.conf</> lines - specified as <literal>hostssl</>. When <literal>clientcert</literal> is + all authentication methods, but only in <filename>pg_hba.conf</filename> lines + specified as <literal>hostssl</literal>. When <literal>clientcert</literal> is not specified or is set to 0, the server will still verify any presented client certificates against its CA file, if one is configured — but it will not insist that a client certificate be presented. @@ -2306,11 +2306,11 @@ pg_dumpall -p 5432 | psql -d postgres -p 5433 <para> If you are setting up client certificates, you may wish to use - the <literal>cert</> authentication method, so that the certificates + the <literal>cert</literal> authentication method, so that the certificates control user authentication as well as providing connection security. See <xref linkend="auth-cert"> for details. (It is not necessary to specify <literal>clientcert=1</literal> explicitly when using - the <literal>cert</> authentication method.) + the <literal>cert</literal> authentication method.) </para> </sect2> @@ -2337,13 +2337,13 @@ pg_dumpall -p 5432 | psql -d postgres -p 5433 <tbody> <row> - <entry><xref linkend="guc-ssl-cert-file"> (<filename>$PGDATA/server.crt</>)</entry> + <entry><xref linkend="guc-ssl-cert-file"> (<filename>$PGDATA/server.crt</filename>)</entry> <entry>server certificate</entry> <entry>sent to client to indicate server's identity</entry> </row> <row> - <entry><xref linkend="guc-ssl-key-file"> (<filename>$PGDATA/server.key</>)</entry> + <entry><xref linkend="guc-ssl-key-file"> (<filename>$PGDATA/server.key</filename>)</entry> <entry>server private key</entry> <entry>proves server certificate was sent by the owner; does not indicate certificate owner is trustworthy</entry> @@ -2368,7 +2368,7 @@ pg_dumpall -p 5432 | psql -d postgres -p 5433 <para> The server reads these files at server start and whenever the server - configuration is reloaded. On <systemitem class="osname">Windows</> + configuration is reloaded. On <systemitem class="osname">Windows</systemitem> systems, they are also re-read whenever a new backend process is spawned for a new client connection. </para> @@ -2377,7 +2377,7 @@ pg_dumpall -p 5432 | psql -d postgres -p 5433 If an error in these files is detected at server start, the server will refuse to start. But if an error is detected during a configuration reload, the files are ignored and the old SSL configuration continues to - be used. On <systemitem class="osname">Windows</> systems, if an error in + be used. On <systemitem class="osname">Windows</systemitem> systems, if an error in these files is detected at backend start, that backend will be unable to establish an SSL connection. In all these cases, the error condition is reported in the server log. @@ -2390,10 +2390,10 @@ pg_dumpall -p 5432 | psql -d postgres -p 5433 <para> To create a quick self-signed certificate for the server, valid for 365 days, use the following <productname>OpenSSL</productname> command, - replacing <replaceable>yourdomain.com</> with the server's host name: + replacing <replaceable>yourdomain.com</replaceable> with the server's host name: <programlisting> openssl req -new -x509 -days 365 -nodes -text -out server.crt \ - -keyout server.key -subj "/CN=<replaceable>yourdomain.com</>" + -keyout server.key -subj "/CN=<replaceable>yourdomain.com</replaceable>" </programlisting> Then do: <programlisting> @@ -2402,15 +2402,15 @@ chmod og-rwx server.key because the server will reject the file if its permissions are more liberal than this. For more details on how to create your server private key and - certificate, refer to the <productname>OpenSSL</> documentation. + certificate, refer to the <productname>OpenSSL</productname> documentation. </para> <para> A self-signed certificate can be used for testing, but a certificate - signed by a certificate authority (<acronym>CA</>) (either one of the - global <acronym>CAs</> or a local one) should be used in production + signed by a certificate authority (<acronym>CA</acronym>) (either one of the + global <acronym>CAs</acronym> or a local one) should be used in production so that clients can verify the server's identity. If all the clients - are local to the organization, using a local <acronym>CA</> is + are local to the organization, using a local <acronym>CA</acronym> is recommended. </para> @@ -2511,8 +2511,8 @@ ssh -L 63333:db.foo.com:5432 joe@shell.foo.com </sect1> <sect1 id="event-log-registration"> - <title>Registering <application>Event Log</> on <systemitem - class="osname">Windows</></title> + <title>Registering <application>Event Log</application> on <systemitem + class="osname">Windows</systemitem></title> <indexterm zone="event-log-registration"> <primary>event log</primary> @@ -2520,11 +2520,11 @@ ssh -L 63333:db.foo.com:5432 joe@shell.foo.com </indexterm> <para> - To register a <systemitem class="osname">Windows</> - <application>event log</> library with the operating system, + To register a <systemitem class="osname">Windows</systemitem> + <application>event log</application> library with the operating system, issue this command: <screen> -<userinput>regsvr32 <replaceable>pgsql_library_directory</>/pgevent.dll</> +<userinput>regsvr32 <replaceable>pgsql_library_directory</replaceable>/pgevent.dll</userinput> </screen> This creates registry entries used by the event viewer, under the default event source named <literal>PostgreSQL</literal>. @@ -2535,15 +2535,15 @@ ssh -L 63333:db.foo.com:5432 joe@shell.foo.com <xref linkend="guc-event-source">), use the <literal>/n</literal> and <literal>/i</literal> options: <screen> -<userinput>regsvr32 /n /i:<replaceable>event_source_name</> <replaceable>pgsql_library_directory</>/pgevent.dll</> +<userinput>regsvr32 /n /i:<replaceable>event_source_name</replaceable> <replaceable>pgsql_library_directory</replaceable>/pgevent.dll</userinput> </screen> </para> <para> - To unregister the <application>event log</> library from + To unregister the <application>event log</application> library from the operating system, issue this command: <screen> -<userinput>regsvr32 /u [/i:<replaceable>event_source_name</>] <replaceable>pgsql_library_directory</>/pgevent.dll</> +<userinput>regsvr32 /u [/i:<replaceable>event_source_name</replaceable>] <replaceable>pgsql_library_directory</replaceable>/pgevent.dll</userinput> </screen> </para> diff --git a/doc/src/sgml/seg.sgml b/doc/src/sgml/seg.sgml index 5d1f546b536..c7e9b5f4aff 100644 --- a/doc/src/sgml/seg.sgml +++ b/doc/src/sgml/seg.sgml @@ -8,9 +8,9 @@ </indexterm> <para> - This module implements a data type <type>seg</> for + This module implements a data type <type>seg</type> for representing line segments, or floating point intervals. - <type>seg</> can represent uncertainty in the interval endpoints, + <type>seg</type> can represent uncertainty in the interval endpoints, making it especially useful for representing laboratory measurements. </para> @@ -92,40 +92,40 @@ test=> select '6.25 .. 6.50'::seg as "pH"; </para> <para> - In <xref linkend="seg-repr-table">, <replaceable>x</>, <replaceable>y</>, and - <replaceable>delta</> denote - floating-point numbers. <replaceable>x</> and <replaceable>y</>, but - not <replaceable>delta</>, can be preceded by a certainty indicator. + In <xref linkend="seg-repr-table">, <replaceable>x</replaceable>, <replaceable>y</replaceable>, and + <replaceable>delta</replaceable> denote + floating-point numbers. <replaceable>x</replaceable> and <replaceable>y</replaceable>, but + not <replaceable>delta</replaceable>, can be preceded by a certainty indicator. </para> <table id="seg-repr-table"> - <title><type>seg</> External Representations</title> + <title><type>seg</type> External Representations</title> <tgroup cols="2"> <tbody> <row> - <entry><literal><replaceable>x</></literal></entry> + <entry><literal><replaceable>x</replaceable></literal></entry> <entry>Single value (zero-length interval) </entry> </row> <row> - <entry><literal><replaceable>x</> .. <replaceable>y</></literal></entry> - <entry>Interval from <replaceable>x</> to <replaceable>y</> + <entry><literal><replaceable>x</replaceable> .. <replaceable>y</replaceable></literal></entry> + <entry>Interval from <replaceable>x</replaceable> to <replaceable>y</replaceable> </entry> </row> <row> - <entry><literal><replaceable>x</> (+-) <replaceable>delta</></literal></entry> - <entry>Interval from <replaceable>x</> - <replaceable>delta</> to - <replaceable>x</> + <replaceable>delta</> + <entry><literal><replaceable>x</replaceable> (+-) <replaceable>delta</replaceable></literal></entry> + <entry>Interval from <replaceable>x</replaceable> - <replaceable>delta</replaceable> to + <replaceable>x</replaceable> + <replaceable>delta</replaceable> </entry> </row> <row> - <entry><literal><replaceable>x</> ..</literal></entry> - <entry>Open interval with lower bound <replaceable>x</> + <entry><literal><replaceable>x</replaceable> ..</literal></entry> + <entry>Open interval with lower bound <replaceable>x</replaceable> </entry> </row> <row> - <entry><literal>.. <replaceable>x</></literal></entry> - <entry>Open interval with upper bound <replaceable>x</> + <entry><literal>.. <replaceable>x</replaceable></literal></entry> + <entry>Open interval with upper bound <replaceable>x</replaceable> </entry> </row> </tbody> @@ -133,7 +133,7 @@ test=> select '6.25 .. 6.50'::seg as "pH"; </table> <table id="seg-input-examples"> - <title>Examples of Valid <type>seg</> Input</title> + <title>Examples of Valid <type>seg</type> Input</title> <tgroup cols="2"> <tbody> <row> @@ -146,8 +146,8 @@ test=> select '6.25 .. 6.50'::seg as "pH"; <entry><literal>~5.0</literal></entry> <entry> Creates a zero-length segment and records - <literal>~</> in the data. <literal>~</literal> is ignored - by <type>seg</> operations, but + <literal>~</literal> in the data. <literal>~</literal> is ignored + by <type>seg</type> operations, but is preserved as a comment. </entry> </row> @@ -169,7 +169,7 @@ test=> select '6.25 .. 6.50'::seg as "pH"; <entry><literal>5(+-)0.3</literal></entry> <entry> Creates an interval <literal>4.7 .. 5.3</literal>. - Note that the <literal>(+-)</> notation isn't preserved. + Note that the <literal>(+-)</literal> notation isn't preserved. </entry> </row> <row> @@ -197,17 +197,17 @@ test=> select '6.25 .. 6.50'::seg as "pH"; </table> <para> - Because <literal>...</> is widely used in data sources, it is allowed - as an alternative spelling of <literal>..</>. Unfortunately, this + Because <literal>...</literal> is widely used in data sources, it is allowed + as an alternative spelling of <literal>..</literal>. Unfortunately, this creates a parsing ambiguity: it is not clear whether the upper bound - in <literal>0...23</> is meant to be <literal>23</> or <literal>0.23</>. + in <literal>0...23</literal> is meant to be <literal>23</literal> or <literal>0.23</literal>. This is resolved by requiring at least one digit before the decimal - point in all numbers in <type>seg</> input. + point in all numbers in <type>seg</type> input. </para> <para> - As a sanity check, <type>seg</> rejects intervals with the lower bound - greater than the upper, for example <literal>5 .. 2</>. + As a sanity check, <type>seg</type> rejects intervals with the lower bound + greater than the upper, for example <literal>5 .. 2</literal>. </para> </sect2> @@ -216,7 +216,7 @@ test=> select '6.25 .. 6.50'::seg as "pH"; <title>Precision</title> <para> - <type>seg</> values are stored internally as pairs of 32-bit floating point + <type>seg</type> values are stored internally as pairs of 32-bit floating point numbers. This means that numbers with more than 7 significant digits will be truncated. </para> @@ -235,8 +235,8 @@ test=> select '6.25 .. 6.50'::seg as "pH"; <title>Usage</title> <para> - The <filename>seg</> module includes a GiST index operator class for - <type>seg</> values. + The <filename>seg</filename> module includes a GiST index operator class for + <type>seg</type> values. The operators supported by the GiST operator class are shown in <xref linkend="seg-gist-operators">. </para> @@ -304,8 +304,8 @@ test=> select '6.25 .. 6.50'::seg as "pH"; </table> <para> - (Before PostgreSQL 8.2, the containment operators <literal>@></> and <literal><@</> were - respectively called <literal>@</> and <literal>~</>. These names are still available, but are + (Before PostgreSQL 8.2, the containment operators <literal>@></literal> and <literal><@</literal> were + respectively called <literal>@</literal> and <literal>~</literal>. These names are still available, but are deprecated and will eventually be retired. Notice that the old names are reversed from the convention formerly followed by the core geometric data types!) @@ -349,11 +349,11 @@ test=> select '6.25 .. 6.50'::seg as "pH"; <title>Notes</title> <para> - For examples of usage, see the regression test <filename>sql/seg.sql</>. + For examples of usage, see the regression test <filename>sql/seg.sql</filename>. </para> <para> - The mechanism that converts <literal>(+-)</> to regular ranges + The mechanism that converts <literal>(+-)</literal> to regular ranges isn't completely accurate in determining the number of significant digits for the boundaries. For example, it adds an extra digit to the lower boundary if the resulting interval includes a power of ten: @@ -369,7 +369,7 @@ postgres=> select '10(+-)1'::seg as seg; <para> The performance of an R-tree index can largely depend on the initial order of input values. It may be very helpful to sort the input table - on the <type>seg</> column; see the script <filename>sort-segments.pl</> + on the <type>seg</type> column; see the script <filename>sort-segments.pl</filename> for an example. </para> </sect2> diff --git a/doc/src/sgml/sepgsql.sgml b/doc/src/sgml/sepgsql.sgml index 6a8d3765a24..c6c89a389db 100644 --- a/doc/src/sgml/sepgsql.sgml +++ b/doc/src/sgml/sepgsql.sgml @@ -8,8 +8,8 @@ </indexterm> <para> - <filename>sepgsql</> is a loadable module that supports label-based - mandatory access control (MAC) based on <productname>SELinux</> security + <filename>sepgsql</filename> is a loadable module that supports label-based + mandatory access control (MAC) based on <productname>SELinux</productname> security policy. </para> @@ -25,10 +25,10 @@ <title>Overview</title> <para> - This module integrates with <productname>SELinux</> to provide an + This module integrates with <productname>SELinux</productname> to provide an additional layer of security checking above and beyond what is normally provided by <productname>PostgreSQL</productname>. From the perspective of - <productname>SELinux</>, this module allows + <productname>SELinux</productname>, this module allows <productname>PostgreSQL</productname> to function as a user-space object manager. Each table or function access initiated by a DML query will be checked against the system security policy. This check is in addition to @@ -39,7 +39,7 @@ <para> <productname>SELinux</productname> access control decisions are made using security labels, which are represented by strings such as - <literal>system_u:object_r:sepgsql_table_t:s0</>. Each access control + <literal>system_u:object_r:sepgsql_table_t:s0</literal>. Each access control decision involves two labels: the label of the subject attempting to perform the action, and the label of the object on which the operation is to be performed. Since these labels can be applied to any sort of object, @@ -60,17 +60,17 @@ <title>Installation</title> <para> - <filename>sepgsql</> can only be used on <productname>Linux</productname> + <filename>sepgsql</filename> can only be used on <productname>Linux</productname> 2.6.28 or higher with <productname>SELinux</productname> enabled. It is not available on any other platform. You will also need - <productname>libselinux</> 2.1.10 or higher and - <productname>selinux-policy</> 3.9.13 or higher (although some + <productname>libselinux</productname> 2.1.10 or higher and + <productname>selinux-policy</productname> 3.9.13 or higher (although some distributions may backport the necessary rules into older policy versions). </para> <para> - The <command>sestatus</> command allows you to check the status of + The <command>sestatus</command> command allows you to check the status of <productname>SELinux</productname>. A typical display is: <screen> $ sestatus @@ -81,20 +81,20 @@ Mode from config file: enforcing Policy version: 24 Policy from config file: targeted </screen> - If <productname>SELinux</> is disabled or not installed, you must set + If <productname>SELinux</productname> is disabled or not installed, you must set that product up first before installing this module. </para> <para> - To build this module, include the option <literal>--with-selinux</> in - your PostgreSQL <literal>configure</> command. Be sure that the - <filename>libselinux-devel</> RPM is installed at build time. + To build this module, include the option <literal>--with-selinux</literal> in + your PostgreSQL <literal>configure</literal> command. Be sure that the + <filename>libselinux-devel</filename> RPM is installed at build time. </para> <para> - To use this module, you must include <literal>sepgsql</> + To use this module, you must include <literal>sepgsql</literal> in the <xref linkend="guc-shared-preload-libraries"> parameter in - <filename>postgresql.conf</>. The module will not function correctly + <filename>postgresql.conf</filename>. The module will not function correctly if loaded in any other manner. Once the module is loaded, you should execute <filename>sepgsql.sql</filename> in each database. This will install functions needed for security label management, and @@ -103,7 +103,7 @@ Policy from config file: targeted <para> Here is an example showing how to initialize a fresh database cluster - with <filename>sepgsql</> functions and security labels installed. + with <filename>sepgsql</filename> functions and security labels installed. Adjust the paths shown as appropriate for your installation: </para> @@ -124,7 +124,7 @@ $ for DBNAME in template0 template1 postgres; do <para> Please note that you may see some or all of the following notifications depending on the particular versions you have of - <productname>libselinux</> and <productname>selinux-policy</>: + <productname>libselinux</productname> and <productname>selinux-policy</productname>: <screen> /etc/selinux/targeted/contexts/sepgsql_contexts: line 33 has invalid object type db_blobs /etc/selinux/targeted/contexts/sepgsql_contexts: line 36 has invalid object type db_language @@ -147,16 +147,16 @@ $ for DBNAME in template0 template1 postgres; do <para> Due to the nature of <productname>SELinux</productname>, running the - regression tests for <filename>sepgsql</> requires several extra + regression tests for <filename>sepgsql</filename> requires several extra configuration steps, some of which must be done as root. The regression tests will not be run by an ordinary - <literal>make check</> or <literal>make installcheck</> command; you must + <literal>make check</literal> or <literal>make installcheck</literal> command; you must set up the configuration and then invoke the test script manually. - The tests must be run in the <filename>contrib/sepgsql</> directory + The tests must be run in the <filename>contrib/sepgsql</filename> directory of a configured PostgreSQL build tree. Although they require a build tree, the tests are designed to be executed against an installed server, - that is they are comparable to <literal>make installcheck</> not - <literal>make check</>. + that is they are comparable to <literal>make installcheck</literal> not + <literal>make check</literal>. </para> <para> @@ -168,17 +168,17 @@ $ for DBNAME in template0 template1 postgres; do <para> Second, build and install the policy package for the regression test. - The <filename>sepgsql-regtest</> policy is a special purpose policy package + The <filename>sepgsql-regtest</filename> policy is a special purpose policy package which provides a set of rules to be allowed during the regression tests. It should be built from the policy source file - <filename>sepgsql-regtest.te</>, which is done using + <filename>sepgsql-regtest.te</filename>, which is done using <command>make</command> with a Makefile supplied by SELinux. You will need to locate the appropriate Makefile on your system; the path shown below is only an example. Once built, install this policy package using the - <command>semodule</> command, which loads supplied policy packages + <command>semodule</command> command, which loads supplied policy packages into the kernel. If the package is correctly installed, - <literal><command>semodule</> -l</> should list <literal>sepgsql-regtest</literal> as an + <literal><command>semodule</command> -l</literal> should list <literal>sepgsql-regtest</literal> as an available policy package: </para> @@ -191,12 +191,12 @@ sepgsql-regtest 1.07 </screen> <para> - Third, turn on <literal>sepgsql_regression_test_mode</>. - For security reasons, the rules in <filename>sepgsql-regtest</> + Third, turn on <literal>sepgsql_regression_test_mode</literal>. + For security reasons, the rules in <filename>sepgsql-regtest</filename> are not enabled by default; the <literal>sepgsql_regression_test_mode</literal> parameter enables the rules needed to launch the regression tests. - It can be turned on using the <command>setsebool</> command: + It can be turned on using the <command>setsebool</command> command: </para> <screen> @@ -206,7 +206,7 @@ sepgsql_regression_test_mode --> on </screen> <para> - Fourth, verify your shell is operating in the <literal>unconfined_t</> + Fourth, verify your shell is operating in the <literal>unconfined_t</literal> domain: </para> <screen> @@ -229,7 +229,7 @@ $ ./test_sepgsql <para> This script will attempt to verify that you have done all the configuration steps correctly, and then it will run the regression tests for the - <filename>sepgsql</> module. + <filename>sepgsql</filename> module. </para> <para> @@ -242,7 +242,7 @@ $ sudo setsebool sepgsql_regression_test_mode off </screen> <para> - You might prefer to remove the <filename>sepgsql-regtest</> policy + You might prefer to remove the <filename>sepgsql-regtest</filename> policy entirely: </para> @@ -257,22 +257,22 @@ $ sudo semodule -r sepgsql-regtest <variablelist> <varlistentry id="guc-sepgsql-permissive" xreflabel="sepgsql.permissive"> <term> - <varname>sepgsql.permissive</> (<type>boolean</type>) + <varname>sepgsql.permissive</varname> (<type>boolean</type>) <indexterm> - <primary><varname>sepgsql.permissive</> configuration parameter</primary> + <primary><varname>sepgsql.permissive</varname> configuration parameter</primary> </indexterm> </term> <listitem> <para> - This parameter enables <filename>sepgsql</> to function + This parameter enables <filename>sepgsql</filename> to function in permissive mode, regardless of the system setting. The default is off. - This parameter can only be set in the <filename>postgresql.conf</> + This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. </para> <para> - When this parameter is on, <filename>sepgsql</> functions + When this parameter is on, <filename>sepgsql</filename> functions in permissive mode, even if SELinux in general is working in enforcing mode. This parameter is primarily useful for testing purposes. </para> @@ -281,9 +281,9 @@ $ sudo semodule -r sepgsql-regtest </varlistentry> <varlistentry id="guc-sepgsql-debug-audit" xreflabel="sepgsql.debug_audit"> <term> - <varname>sepgsql.debug_audit</> (<type>boolean</>) + <varname>sepgsql.debug_audit</varname> (<type>boolean</type>) <indexterm> - <primary><varname>sepgsql.debug_audit</> configuration parameter</> + <primary><varname>sepgsql.debug_audit</varname> configuration parameter</primary> </indexterm> </term> <listitem> @@ -295,7 +295,7 @@ $ sudo semodule -r sepgsql-regtest </para> <para> - The security policy of <productname>SELinux</> also has rules to + The security policy of <productname>SELinux</productname> also has rules to control whether or not particular accesses are logged. By default, access violations are logged, but allowed accesses are not. @@ -315,13 +315,13 @@ $ sudo semodule -r sepgsql-regtest <sect3> <title>Controlled Object Classes</title> <para> - The security model of <productname>SELinux</> describes all the access + The security model of <productname>SELinux</productname> describes all the access control rules as relationships between a subject entity (typically, a client of the database) and an object entity (such as a database object), each of which is identified by a security label. If access to an unlabeled object is attempted, the object is treated as if it were assigned the label - <literal>unlabeled_t</>. + <literal>unlabeled_t</literal>. </para> <para> @@ -349,22 +349,22 @@ $ sudo semodule -r sepgsql-regtest <title>DML Permissions</title> <para> - For tables, <literal>db_table:select</>, <literal>db_table:insert</>, - <literal>db_table:update</> or <literal>db_table:delete</> are + For tables, <literal>db_table:select</literal>, <literal>db_table:insert</literal>, + <literal>db_table:update</literal> or <literal>db_table:delete</literal> are checked for all the referenced target tables depending on the kind of - statement; in addition, <literal>db_table:select</> is also checked for + statement; in addition, <literal>db_table:select</literal> is also checked for all the tables that contain columns referenced in the - <literal>WHERE</> or <literal>RETURNING</> clause, as a data source - for <literal>UPDATE</>, and so on. + <literal>WHERE</literal> or <literal>RETURNING</literal> clause, as a data source + for <literal>UPDATE</literal>, and so on. </para> <para> Column-level permissions will also be checked for each referenced column. - <literal>db_column:select</> is checked on not only the columns being - read using <literal>SELECT</>, but those being referenced in other DML - statements; <literal>db_column:update</> or <literal>db_column:insert</> - will also be checked for columns being modified by <literal>UPDATE</> or - <literal>INSERT</>. + <literal>db_column:select</literal> is checked on not only the columns being + read using <literal>SELECT</literal>, but those being referenced in other DML + statements; <literal>db_column:update</literal> or <literal>db_column:insert</literal> + will also be checked for columns being modified by <literal>UPDATE</literal> or + <literal>INSERT</literal>. </para> <para> @@ -373,43 +373,43 @@ $ sudo semodule -r sepgsql-regtest UPDATE t1 SET x = 2, y = md5sum(y) WHERE z = 100; </synopsis> - Here, <literal>db_column:update</> will be checked for - <literal>t1.x</>, since it is being updated, - <literal>db_column:{select update}</> will be checked for - <literal>t1.y</>, since it is both updated and referenced, and - <literal>db_column:select</> will be checked for <literal>t1.z</>, since + Here, <literal>db_column:update</literal> will be checked for + <literal>t1.x</literal>, since it is being updated, + <literal>db_column:{select update}</literal> will be checked for + <literal>t1.y</literal>, since it is both updated and referenced, and + <literal>db_column:select</literal> will be checked for <literal>t1.z</literal>, since it is only referenced. - <literal>db_table:{select update}</> will also be checked + <literal>db_table:{select update}</literal> will also be checked at the table level. </para> <para> - For sequences, <literal>db_sequence:get_value</> is checked when we - reference a sequence object using <literal>SELECT</>; however, note that we + For sequences, <literal>db_sequence:get_value</literal> is checked when we + reference a sequence object using <literal>SELECT</literal>; however, note that we do not currently check permissions on execution of corresponding functions - such as <literal>lastval()</>. + such as <literal>lastval()</literal>. </para> <para> - For views, <literal>db_view:expand</> will be checked, then any other + For views, <literal>db_view:expand</literal> will be checked, then any other required permissions will be checked on the objects being expanded from the view, individually. </para> <para> - For functions, <literal>db_procedure:{execute}</> will be checked when + For functions, <literal>db_procedure:{execute}</literal> will be checked when user tries to execute a function as a part of query, or using fast-path invocation. If this function is a trusted procedure, it also checks - <literal>db_procedure:{entrypoint}</> permission to check whether it + <literal>db_procedure:{entrypoint}</literal> permission to check whether it can perform as entry point of trusted procedure. </para> <para> - In order to access any schema object, <literal>db_schema:search</> + In order to access any schema object, <literal>db_schema:search</literal> permission is required on the containing schema. When an object is referenced without schema qualification, schemas on which this permission is not present will not be searched (just as if the user did - not have <literal>USAGE</> privilege on the schema). If an explicit schema + not have <literal>USAGE</literal> privilege on the schema). If an explicit schema qualification is present, an error will occur if the user does not have the requisite permission on the named schema. </para> @@ -425,22 +425,22 @@ UPDATE t1 SET x = 2, y = md5sum(y) WHERE z = 100; The default database privilege system allows database superusers to modify system catalogs using DML commands, and reference or modify toast tables. These operations are prohibited when - <filename>sepgsql</> is enabled. + <filename>sepgsql</filename> is enabled. </para> </sect3> <sect3> <title>DDL Permissions</title> <para> - <productname>SELinux</> defines several permissions to control common + <productname>SELinux</productname> defines several permissions to control common operations for each object type; such as creation, alter, drop and relabel of security label. In addition, several object types have special permissions to control their characteristic operations; such as addition or deletion of name entries within a particular schema. </para> <para> - Creating a new database object requires <literal>create</> permission. - <productname>SELinux</> will grant or deny this permission based on the + Creating a new database object requires <literal>create</literal> permission. + <productname>SELinux</productname> will grant or deny this permission based on the client's security label and the proposed security label for the new object. In some cases, additional privileges are required: </para> @@ -449,12 +449,12 @@ UPDATE t1 SET x = 2, y = md5sum(y) WHERE z = 100; <listitem> <para> <xref linkend="sql-createdatabase"> additionally requires - <literal>getattr</> permission for the source or template database. + <literal>getattr</literal> permission for the source or template database. </para> </listitem> <listitem> <para> - Creating a schema object additionally requires <literal>add_name</> + Creating a schema object additionally requires <literal>add_name</literal> permission on the parent schema. </para> </listitem> @@ -467,23 +467,23 @@ UPDATE t1 SET x = 2, y = md5sum(y) WHERE z = 100; </listitem> <listitem> <para> - Creating a function marked as <literal>LEAKPROOF</> additionally - requires <literal>install</> permission. (This permission is also - checked when <literal>LEAKPROOF</> is set for an existing function.) + Creating a function marked as <literal>LEAKPROOF</literal> additionally + requires <literal>install</literal> permission. (This permission is also + checked when <literal>LEAKPROOF</literal> is set for an existing function.) </para> </listitem> </itemizedlist> <para> - When <literal>DROP</> command is executed, <literal>drop</> will be + When <literal>DROP</literal> command is executed, <literal>drop</literal> will be checked on the object being removed. Permissions will be also checked for - objects dropped indirectly via <literal>CASCADE</>. Deletion of objects + objects dropped indirectly via <literal>CASCADE</literal>. Deletion of objects contained within a particular schema (tables, views, sequences and - procedures) additionally requires <literal>remove_name</> on the schema. + procedures) additionally requires <literal>remove_name</literal> on the schema. </para> <para> - When <literal>ALTER</> command is executed, <literal>setattr</> will be + When <literal>ALTER</literal> command is executed, <literal>setattr</literal> will be checked on the object being modified for each object types, except for subsidiary objects such as the indexes or triggers of a table, where permissions are instead checked on the parent object. In some cases, @@ -494,25 +494,25 @@ UPDATE t1 SET x = 2, y = md5sum(y) WHERE z = 100; <listitem> <para> Moving an object to a new schema additionally requires - <literal>remove_name</> permission on the old schema and - <literal>add_name</> permission on the new one. + <literal>remove_name</literal> permission on the old schema and + <literal>add_name</literal> permission on the new one. </para> </listitem> <listitem> <para> - Setting the <literal>LEAKPROOF</> attribute on a function requires - <literal>install</> permission. + Setting the <literal>LEAKPROOF</literal> attribute on a function requires + <literal>install</literal> permission. </para> </listitem> <listitem> <para> Using <xref linkend="sql-security-label"> on an object additionally - requires <literal>relabelfrom</> permission for the object in - conjunction with its old security label and <literal>relabelto</> + requires <literal>relabelfrom</literal> permission for the object in + conjunction with its old security label and <literal>relabelto</literal> permission for the object in conjunction with its new security label. (In cases where multiple label providers are installed and the user tries to set a security label, but it is not managed by - <productname>SELinux</>, only <literal>setattr</> should be checked here. + <productname>SELinux</productname>, only <literal>setattr</literal> should be checked here. This is currently not done due to implementation restrictions.) </para> </listitem> @@ -524,7 +524,7 @@ UPDATE t1 SET x = 2, y = md5sum(y) WHERE z = 100; <title>Trusted Procedures</title> <para> Trusted procedures are similar to security definer functions or setuid - commands. <productname>SELinux</> provides a feature to allow trusted + commands. <productname>SELinux</productname> provides a feature to allow trusted code to run using a security label different from that of the client, generally for the purpose of providing highly controlled access to sensitive data (e.g. rows might be omitted, or the precision of stored @@ -569,8 +569,8 @@ postgres=# SELECT cid, cname, show_credit(cid) FROM customer; </screen> <para> - In this case, a regular user cannot reference <literal>customer.credit</> - directly, but a trusted procedure <literal>show_credit</> allows the user + In this case, a regular user cannot reference <literal>customer.credit</literal> + directly, but a trusted procedure <literal>show_credit</literal> allows the user to print the credit card numbers of customers with some of the digits masked out. </para> @@ -582,8 +582,8 @@ postgres=# SELECT cid, cname, show_credit(cid) FROM customer; It is possible to use SELinux's dynamic domain transition feature to switch the security label of the client process, the client domain, to a new context, if that is allowed by the security policy. - The client domain needs the <literal>setcurrent</> permission and also - <literal>dyntransition</> from the old to the new domain. + The client domain needs the <literal>setcurrent</literal> permission and also + <literal>dyntransition</literal> from the old to the new domain. </para> <para> Dynamic domain transitions should be considered carefully, because they @@ -612,7 +612,7 @@ ERROR: SELinux: security policy violation </screen> <para> In this example above we were allowed to switch from the larger MCS - range <literal>c1.c1023</> to the smaller range <literal>c1.c4</>, but + range <literal>c1.c1023</literal> to the smaller range <literal>c1.c4</literal>, but switching back was denied. </para> <para> @@ -726,7 +726,7 @@ ERROR: SELinux: security policy violation <term>Row-level access control</term> <listitem> <para> - <productname>PostgreSQL</> supports row-level access, but + <productname>PostgreSQL</productname> supports row-level access, but <filename>sepgsql</filename> does not. </para> </listitem> @@ -736,7 +736,7 @@ ERROR: SELinux: security policy violation <term>Covert channels</term> <listitem> <para> - <filename>sepgsql</> does not try to hide the existence of + <filename>sepgsql</filename> does not try to hide the existence of a certain object, even if the user is not allowed to reference it. For example, we can infer the existence of an invisible object as a result of primary key conflicts, foreign key violations, and so on, @@ -766,7 +766,7 @@ ERROR: SELinux: security policy violation <listitem> <para> This document provides a wide spectrum of knowledge to administer - <productname>SELinux</> on your systems. + <productname>SELinux</productname> on your systems. It focuses primarily on Red Hat operating systems, but is not limited to them. </para> </listitem> diff --git a/doc/src/sgml/sourcerepo.sgml b/doc/src/sgml/sourcerepo.sgml index dd9da5a7b0b..b5618d7166b 100644 --- a/doc/src/sgml/sourcerepo.sgml +++ b/doc/src/sgml/sourcerepo.sgml @@ -18,18 +18,18 @@ <para> Note that building <productname>PostgreSQL</productname> from the source - repository requires reasonably up-to-date versions of <application>bison</>, - <application>flex</>, and <application>Perl</>. These tools are not needed + repository requires reasonably up-to-date versions of <application>bison</application>, + <application>flex</application>, and <application>Perl</application>. These tools are not needed to build from a distribution tarball, because the files that these tools are used to build are included in the tarball. Other tool requirements are the same as shown in <xref linkend="install-requirements">. </para> <sect1 id="git"> - <title>Getting The Source via <productname>Git</></title> + <title>Getting The Source via <productname>Git</productname></title> <para> - With <productname>Git</> you will make a copy of the entire code repository + With <productname>Git</productname> you will make a copy of the entire code repository on your local machine, so you will have access to all history and branches offline. This is the fastest and most flexible way to develop or test patches. @@ -40,9 +40,9 @@ <step> <para> - You will need an installed version of <productname>Git</>, which you can + You will need an installed version of <productname>Git</productname>, which you can get from <ulink url="http://git-scm.com"></ulink>. Many systems already - have a recent version of <application>Git</> installed by default, or + have a recent version of <application>Git</application> installed by default, or available in their package distribution system. </para> </step> @@ -57,14 +57,14 @@ git clone git://git.postgresql.org/git/postgresql.git This will copy the full repository to your local machine, so it may take a while to complete, especially if you have a slow Internet connection. - The files will be placed in a new subdirectory <filename>postgresql</> of + The files will be placed in a new subdirectory <filename>postgresql</filename> of your current directory. </para> <para> The Git mirror can also be reached via the HTTP protocol, if for example a firewall is blocking access to the Git protocol. Just change the URL - prefix to <literal>https</>, as in: + prefix to <literal>https</literal>, as in: <programlisting> git clone https://git.postgresql.org/git/postgresql.git @@ -77,7 +77,7 @@ git clone https://git.postgresql.org/git/postgresql.git <step> <para> - Whenever you want to get the latest updates in the system, <command>cd</> + Whenever you want to get the latest updates in the system, <command>cd</command> into the repository, and run: <programlisting> @@ -88,9 +88,9 @@ git fetch </procedure> <para> - <productname>Git</> can do a lot more things than just fetch the source. For - more information, consult the <productname>Git</> man pages, or see the - website at <ulink url="http://git-scm.com"></>. + <productname>Git</productname> can do a lot more things than just fetch the source. For + more information, consult the <productname>Git</productname> man pages, or see the + website at <ulink url="http://git-scm.com"></ulink>. </para> </sect1> diff --git a/doc/src/sgml/sources.sgml b/doc/src/sgml/sources.sgml index 7777bf51995..4c777de16f7 100644 --- a/doc/src/sgml/sources.sgml +++ b/doc/src/sgml/sources.sgml @@ -14,8 +14,8 @@ <para> Layout rules (brace positioning, etc) follow BSD conventions. In - particular, curly braces for the controlled blocks of <literal>if</>, - <literal>while</>, <literal>switch</>, etc go on their own lines. + particular, curly braces for the controlled blocks of <literal>if</literal>, + <literal>while</literal>, <literal>switch</literal>, etc go on their own lines. </para> <para> @@ -26,7 +26,7 @@ </para> <para> - Do not use C++ style comments (<literal>//</> comments). Strict ANSI C + Do not use C++ style comments (<literal>//</literal> comments). Strict ANSI C compilers do not accept them. For the same reason, do not use C++ extensions such as declaring new variables mid-block. </para> @@ -40,7 +40,7 @@ */ </programlisting> Note that comment blocks that begin in column 1 will be preserved as-is - by <application>pgindent</>, but it will re-flow indented comment blocks + by <application>pgindent</application>, but it will re-flow indented comment blocks as though they were plain text. If you want to preserve the line breaks in an indented block, add dashes like this: <programlisting> @@ -55,10 +55,10 @@ <para> While submitted patches do not absolutely have to follow these formatting rules, it's a good idea to do so. Your code will get run through - <application>pgindent</> before the next release, so there's no point in + <application>pgindent</application> before the next release, so there's no point in making it look nice under some other set of formatting conventions. A good rule of thumb for patches is <quote>make the new code look like - the existing code around it</>. + the existing code around it</quote>. </para> <para> @@ -92,37 +92,37 @@ less -x4 <para> Error, warning, and log messages generated within the server code - should be created using <function>ereport</>, or its older cousin - <function>elog</>. The use of this function is complex enough to + should be created using <function>ereport</function>, or its older cousin + <function>elog</function>. The use of this function is complex enough to require some explanation. </para> <para> There are two required elements for every message: a severity level - (ranging from <literal>DEBUG</> to <literal>PANIC</>) and a primary + (ranging from <literal>DEBUG</literal> to <literal>PANIC</literal>) and a primary message text. In addition there are optional elements, the most common of which is an error identifier code that follows the SQL spec's SQLSTATE conventions. - <function>ereport</> itself is just a shell function, that exists + <function>ereport</function> itself is just a shell function, that exists mainly for the syntactic convenience of making message generation look like a function call in the C source code. The only parameter - accepted directly by <function>ereport</> is the severity level. + accepted directly by <function>ereport</function> is the severity level. The primary message text and any optional message elements are - generated by calling auxiliary functions, such as <function>errmsg</>, - within the <function>ereport</> call. + generated by calling auxiliary functions, such as <function>errmsg</function>, + within the <function>ereport</function> call. </para> <para> - A typical call to <function>ereport</> might look like this: + A typical call to <function>ereport</function> might look like this: <programlisting> ereport(ERROR, (errcode(ERRCODE_DIVISION_BY_ZERO), errmsg("division by zero"))); </programlisting> - This specifies error severity level <literal>ERROR</> (a run-of-the-mill - error). The <function>errcode</> call specifies the SQLSTATE error code - using a macro defined in <filename>src/include/utils/errcodes.h</>. The - <function>errmsg</> call provides the primary message text. Notice the + This specifies error severity level <literal>ERROR</literal> (a run-of-the-mill + error). The <function>errcode</function> call specifies the SQLSTATE error code + using a macro defined in <filename>src/include/utils/errcodes.h</filename>. The + <function>errmsg</function> call provides the primary message text. Notice the extra set of parentheses surrounding the auxiliary function calls — these are annoying but syntactically necessary. </para> @@ -139,72 +139,72 @@ ereport(ERROR, "You might need to add explicit typecasts."))); </programlisting> This illustrates the use of format codes to embed run-time values into - a message text. Also, an optional <quote>hint</> message is provided. + a message text. Also, an optional <quote>hint</quote> message is provided. </para> <para> - If the severity level is <literal>ERROR</> or higher, - <function>ereport</> aborts the execution of the user-defined + If the severity level is <literal>ERROR</literal> or higher, + <function>ereport</function> aborts the execution of the user-defined function and does not return to the caller. If the severity level is - lower than <literal>ERROR</>, <function>ereport</> returns normally. + lower than <literal>ERROR</literal>, <function>ereport</function> returns normally. </para> <para> - The available auxiliary routines for <function>ereport</> are: + The available auxiliary routines for <function>ereport</function> are: <itemizedlist> <listitem> <para> <function>errcode(sqlerrcode)</function> specifies the SQLSTATE error identifier code for the condition. If this routine is not called, the error identifier defaults to - <literal>ERRCODE_INTERNAL_ERROR</> when the error severity level is - <literal>ERROR</> or higher, <literal>ERRCODE_WARNING</> when the - error level is <literal>WARNING</>, otherwise (for <literal>NOTICE</> - and below) <literal>ERRCODE_SUCCESSFUL_COMPLETION</>. + <literal>ERRCODE_INTERNAL_ERROR</literal> when the error severity level is + <literal>ERROR</literal> or higher, <literal>ERRCODE_WARNING</literal> when the + error level is <literal>WARNING</literal>, otherwise (for <literal>NOTICE</literal> + and below) <literal>ERRCODE_SUCCESSFUL_COMPLETION</literal>. While these defaults are often convenient, always think whether they - are appropriate before omitting the <function>errcode()</> call. + are appropriate before omitting the <function>errcode()</function> call. </para> </listitem> <listitem> <para> <function>errmsg(const char *msg, ...)</function> specifies the primary error message text, and possibly run-time values to insert into it. Insertions - are specified by <function>sprintf</>-style format codes. In addition to - the standard format codes accepted by <function>sprintf</>, the format - code <literal>%m</> can be used to insert the error message returned - by <function>strerror</> for the current value of <literal>errno</>. + are specified by <function>sprintf</function>-style format codes. In addition to + the standard format codes accepted by <function>sprintf</function>, the format + code <literal>%m</literal> can be used to insert the error message returned + by <function>strerror</function> for the current value of <literal>errno</literal>. <footnote> <para> - That is, the value that was current when the <function>ereport</> call - was reached; changes of <literal>errno</> within the auxiliary reporting + That is, the value that was current when the <function>ereport</function> call + was reached; changes of <literal>errno</literal> within the auxiliary reporting routines will not affect it. That would not be true if you were to - write <literal>strerror(errno)</> explicitly in <function>errmsg</>'s + write <literal>strerror(errno)</literal> explicitly in <function>errmsg</function>'s parameter list; accordingly, do not do so. </para> </footnote> - <literal>%m</> does not require any - corresponding entry in the parameter list for <function>errmsg</>. - Note that the message string will be run through <function>gettext</> + <literal>%m</literal> does not require any + corresponding entry in the parameter list for <function>errmsg</function>. + Note that the message string will be run through <function>gettext</function> for possible localization before format codes are processed. </para> </listitem> <listitem> <para> <function>errmsg_internal(const char *msg, ...)</function> is the same as - <function>errmsg</>, except that the message string will not be + <function>errmsg</function>, except that the message string will not be translated nor included in the internationalization message dictionary. - This should be used for <quote>cannot happen</> cases that are probably + This should be used for <quote>cannot happen</quote> cases that are probably not worth expending translation effort on. </para> </listitem> <listitem> <para> <function>errmsg_plural(const char *fmt_singular, const char *fmt_plural, - unsigned long n, ...)</function> is like <function>errmsg</>, but with + unsigned long n, ...)</function> is like <function>errmsg</function>, but with support for various plural forms of the message. - <replaceable>fmt_singular</> is the English singular format, - <replaceable>fmt_plural</> is the English plural format, - <replaceable>n</> is the integer value that determines which plural + <replaceable>fmt_singular</replaceable> is the English singular format, + <replaceable>fmt_plural</replaceable> is the English plural format, + <replaceable>n</replaceable> is the integer value that determines which plural form is needed, and the remaining arguments are formatted according to the selected format string. For more information see <xref linkend="nls-guidelines">. @@ -213,16 +213,16 @@ ereport(ERROR, <listitem> <para> <function>errdetail(const char *msg, ...)</function> supplies an optional - <quote>detail</> message; this is to be used when there is additional + <quote>detail</quote> message; this is to be used when there is additional information that seems inappropriate to put in the primary message. The message string is processed in just the same way as for - <function>errmsg</>. + <function>errmsg</function>. </para> </listitem> <listitem> <para> <function>errdetail_internal(const char *msg, ...)</function> is the same - as <function>errdetail</>, except that the message string will not be + as <function>errdetail</function>, except that the message string will not be translated nor included in the internationalization message dictionary. This should be used for detail messages that are not worth expending translation effort on, for instance because they are too technical to be @@ -232,7 +232,7 @@ ereport(ERROR, <listitem> <para> <function>errdetail_plural(const char *fmt_singular, const char *fmt_plural, - unsigned long n, ...)</function> is like <function>errdetail</>, but with + unsigned long n, ...)</function> is like <function>errdetail</function>, but with support for various plural forms of the message. For more information see <xref linkend="nls-guidelines">. </para> @@ -240,10 +240,10 @@ ereport(ERROR, <listitem> <para> <function>errdetail_log(const char *msg, ...)</function> is the same as - <function>errdetail</> except that this string goes only to the server - log, never to the client. If both <function>errdetail</> (or one of + <function>errdetail</function> except that this string goes only to the server + log, never to the client. If both <function>errdetail</function> (or one of its equivalents above) and - <function>errdetail_log</> are used then one string goes to the client + <function>errdetail_log</function> are used then one string goes to the client and the other to the log. This is useful for error details that are too security-sensitive or too bulky to include in the report sent to the client. @@ -253,7 +253,7 @@ ereport(ERROR, <para> <function>errdetail_log_plural(const char *fmt_singular, const char *fmt_plural, unsigned long n, ...)</function> is like - <function>errdetail_log</>, but with support for various plural forms of + <function>errdetail_log</function>, but with support for various plural forms of the message. For more information see <xref linkend="nls-guidelines">. </para> @@ -261,23 +261,23 @@ ereport(ERROR, <listitem> <para> <function>errhint(const char *msg, ...)</function> supplies an optional - <quote>hint</> message; this is to be used when offering suggestions + <quote>hint</quote> message; this is to be used when offering suggestions about how to fix the problem, as opposed to factual details about what went wrong. The message string is processed in just the same way as for - <function>errmsg</>. + <function>errmsg</function>. </para> </listitem> <listitem> <para> <function>errcontext(const char *msg, ...)</function> is not normally called - directly from an <function>ereport</> message site; rather it is used - in <literal>error_context_stack</> callback functions to provide + directly from an <function>ereport</function> message site; rather it is used + in <literal>error_context_stack</literal> callback functions to provide information about the context in which an error occurred, such as the current location in a PL function. The message string is processed in just the same way as for - <function>errmsg</>. Unlike the other auxiliary functions, this can - be called more than once per <function>ereport</> call; the successive + <function>errmsg</function>. Unlike the other auxiliary functions, this can + be called more than once per <function>ereport</function> call; the successive strings thus supplied are concatenated with separating newlines. </para> </listitem> @@ -309,9 +309,9 @@ ereport(ERROR, specifies a table constraint whose name, table name, and schema name should be included as auxiliary fields in the error report. Indexes should be considered to be constraints for this purpose, whether or - not they have an associated <structname>pg_constraint</> entry. Be + not they have an associated <structname>pg_constraint</structname> entry. Be careful to pass the underlying heap relation, not the index itself, as - <literal>rel</>. + <literal>rel</literal>. </para> </listitem> <listitem> @@ -330,17 +330,17 @@ ereport(ERROR, </listitem> <listitem> <para> - <function>errcode_for_file_access()</> is a convenience function that + <function>errcode_for_file_access()</function> is a convenience function that selects an appropriate SQLSTATE error identifier for a failure in a file-access-related system call. It uses the saved - <literal>errno</> to determine which error code to generate. - Usually this should be used in combination with <literal>%m</> in the + <literal>errno</literal> to determine which error code to generate. + Usually this should be used in combination with <literal>%m</literal> in the primary error message text. </para> </listitem> <listitem> <para> - <function>errcode_for_socket_access()</> is a convenience function that + <function>errcode_for_socket_access()</function> is a convenience function that selects an appropriate SQLSTATE error identifier for a failure in a socket-related system call. </para> @@ -348,7 +348,7 @@ ereport(ERROR, <listitem> <para> <function>errhidestmt(bool hide_stmt)</function> can be called to specify - suppression of the <literal>STATEMENT:</> portion of a message in the + suppression of the <literal>STATEMENT:</literal> portion of a message in the postmaster log. Generally this is appropriate if the message text includes the current statement already. </para> @@ -356,7 +356,7 @@ ereport(ERROR, <listitem> <para> <function>errhidecontext(bool hide_ctx)</function> can be called to - specify suppression of the <literal>CONTEXT:</> portion of a message in + specify suppression of the <literal>CONTEXT:</literal> portion of a message in the postmaster log. This should only be used for verbose debugging messages where the repeated inclusion of context would bloat the log volume too much. @@ -367,24 +367,24 @@ ereport(ERROR, <note> <para> - At most one of the functions <function>errtable</>, - <function>errtablecol</>, <function>errtableconstraint</>, - <function>errdatatype</>, or <function>errdomainconstraint</> should - be used in an <function>ereport</> call. These functions exist to + At most one of the functions <function>errtable</function>, + <function>errtablecol</function>, <function>errtableconstraint</function>, + <function>errdatatype</function>, or <function>errdomainconstraint</function> should + be used in an <function>ereport</function> call. These functions exist to allow applications to extract the name of a database object associated with the error condition without having to examine the potentially-localized error message text. These functions should be used in error reports for which it's likely that applications would wish to have automatic error handling. As of - <productname>PostgreSQL</> 9.3, complete coverage exists only for + <productname>PostgreSQL</productname> 9.3, complete coverage exists only for errors in SQLSTATE class 23 (integrity constraint violation), but this is likely to be expanded in future. </para> </note> <para> - There is an older function <function>elog</> that is still heavily used. - An <function>elog</> call: + There is an older function <function>elog</function> that is still heavily used. + An <function>elog</function> call: <programlisting> elog(level, "format string", ...); </programlisting> @@ -394,11 +394,11 @@ ereport(level, (errmsg_internal("format string", ...))); </programlisting> Notice that the SQLSTATE error code is always defaulted, and the message string is not subject to translation. - Therefore, <function>elog</> should be used only for internal errors and + Therefore, <function>elog</function> should be used only for internal errors and low-level debug logging. Any message that is likely to be of interest to - ordinary users should go through <function>ereport</>. Nonetheless, - there are enough internal <quote>cannot happen</> error checks in the - system that <function>elog</> is still widely used; it is preferred for + ordinary users should go through <function>ereport</function>. Nonetheless, + there are enough internal <quote>cannot happen</quote> error checks in the + system that <function>elog</function> is still widely used; it is preferred for those messages for its notational simplicity. </para> @@ -414,7 +414,7 @@ ereport(level, (errmsg_internal("format string", ...))); <para> This style guide is offered in the hope of maintaining a consistent, user-friendly style throughout all the messages generated by - <productname>PostgreSQL</>. + <productname>PostgreSQL</productname>. </para> <simplesect> @@ -643,7 +643,7 @@ cannot open file "%s" </para> <para> - Rationale: Otherwise no one will know what <quote>foo.bar.baz</> + Rationale: Otherwise no one will know what <quote>foo.bar.baz</quote> refers to. </para> @@ -866,7 +866,7 @@ BETTER: unrecognized node type: 42 <simplesect> <title>C Standard</title> <para> - Code in <productname>PostgreSQL</> should only rely on language + Code in <productname>PostgreSQL</productname> should only rely on language features available in the C89 standard. That means a conforming C89 compiler has to be able to compile postgres, at least aside from a few platform dependent pieces. Features from later @@ -874,7 +874,7 @@ BETTER: unrecognized node type: 42 used, if a fallback is provided. </para> <para> - For example <literal>static inline</> and + For example <literal>static inline</literal> and <literal>_StaticAssert()</literal> are currently used, even though they are from newer revisions of the C standard. If not available we respectively fall back to defining the functions @@ -886,7 +886,7 @@ BETTER: unrecognized node type: 42 <simplesect> <title>Function-Like Macros and Inline Functions</title> <para> - Both, macros with arguments and <literal>static inline</> + Both, macros with arguments and <literal>static inline</literal> functions, may be used. The latter are preferable if there are multiple-evaluation hazards when written as a macro, as e.g. the case with @@ -914,7 +914,7 @@ MemoryContextSwitchTo(MemoryContext context) } #endif /* FRONTEND */ </programlisting> - In this example <literal>CurrentMemoryContext</>, which is only + In this example <literal>CurrentMemoryContext</literal>, which is only available in the backend, is referenced and the function thus hidden with a <literal>#ifndef FRONTEND</literal>. This rule exists because some compilers emit references to symbols @@ -957,8 +957,8 @@ handle_sighup(SIGNAL_ARGS) errno = save_errno; } </programlisting> - <varname>errno</> is saved and restored because - <function>SetLatch()</> might change it. If that were not done + <varname>errno</varname> is saved and restored because + <function>SetLatch()</function> might change it. If that were not done interrupted code that's currently inspecting <varname>errno</varname> might see the wrong value. </para> diff --git a/doc/src/sgml/spgist.sgml b/doc/src/sgml/spgist.sgml index cd4a8d07c4a..3f2d31b4c09 100644 --- a/doc/src/sgml/spgist.sgml +++ b/doc/src/sgml/spgist.sgml @@ -57,7 +57,7 @@ <title>Built-in Operator Classes</title> <para> - The core <productname>PostgreSQL</> distribution + The core <productname>PostgreSQL</productname> distribution includes the <acronym>SP-GiST</acronym> operator classes shown in <xref linkend="spgist-builtin-opclasses-table">. </para> @@ -74,92 +74,92 @@ </thead> <tbody> <row> - <entry><literal>kd_point_ops</></entry> - <entry><type>point</></entry> + <entry><literal>kd_point_ops</literal></entry> + <entry><type>point</type></entry> <entry> - <literal><<</> - <literal><@</> - <literal><^</> - <literal>>></> - <literal>>^</> - <literal>~=</> + <literal><<</literal> + <literal><@</literal> + <literal><^</literal> + <literal>>></literal> + <literal>>^</literal> + <literal>~=</literal> </entry> </row> <row> - <entry><literal>quad_point_ops</></entry> - <entry><type>point</></entry> + <entry><literal>quad_point_ops</literal></entry> + <entry><type>point</type></entry> <entry> - <literal><<</> - <literal><@</> - <literal><^</> - <literal>>></> - <literal>>^</> - <literal>~=</> + <literal><<</literal> + <literal><@</literal> + <literal><^</literal> + <literal>>></literal> + <literal>>^</literal> + <literal>~=</literal> </entry> </row> <row> - <entry><literal>range_ops</></entry> + <entry><literal>range_ops</literal></entry> <entry>any range type</entry> <entry> - <literal>&&</> - <literal>&<</> - <literal>&></> - <literal>-|-</> - <literal><<</> - <literal><@</> - <literal>=</> - <literal>>></> - <literal>@></> + <literal>&&</literal> + <literal>&<</literal> + <literal>&></literal> + <literal>-|-</literal> + <literal><<</literal> + <literal><@</literal> + <literal>=</literal> + <literal>>></literal> + <literal>@></literal> </entry> </row> <row> - <entry><literal>box_ops</></entry> - <entry><type>box</></entry> + <entry><literal>box_ops</literal></entry> + <entry><type>box</type></entry> <entry> - <literal><<</> - <literal>&<</> - <literal>&&</> - <literal>&></> - <literal>>></> - <literal>~=</> - <literal>@></> - <literal><@</> - <literal>&<|</> - <literal><<|</> + <literal><<</literal> + <literal>&<</literal> + <literal>&&</literal> + <literal>&></literal> + <literal>>></literal> + <literal>~=</literal> + <literal>@></literal> + <literal><@</literal> + <literal>&<|</literal> + <literal><<|</literal> <literal>|>></literal> - <literal>|&></> + <literal>|&></literal> </entry> </row> <row> - <entry><literal>text_ops</></entry> - <entry><type>text</></entry> + <entry><literal>text_ops</literal></entry> + <entry><type>text</type></entry> <entry> - <literal><</> - <literal><=</> - <literal>=</> - <literal>></> - <literal>>=</> - <literal>~<=~</> - <literal>~<~</> - <literal>~>=~</> - <literal>~>~</> + <literal><</literal> + <literal><=</literal> + <literal>=</literal> + <literal>></literal> + <literal>>=</literal> + <literal>~<=~</literal> + <literal>~<~</literal> + <literal>~>=~</literal> + <literal>~>~</literal> </entry> </row> <row> - <entry><literal>inet_ops</></entry> - <entry><type>inet</>, <type>cidr</></entry> + <entry><literal>inet_ops</literal></entry> + <entry><type>inet</type>, <type>cidr</type></entry> <entry> - <literal>&&</> - <literal>>></> - <literal>>>=</> - <literal>></> - <literal>>=</> - <literal><></> - <literal><<</> - <literal><<=</> - <literal><</> - <literal><=</> - <literal>=</> + <literal>&&</literal> + <literal>>></literal> + <literal>>>=</literal> + <literal>></literal> + <literal>>=</literal> + <literal><></literal> + <literal><<</literal> + <literal><<=</literal> + <literal><</literal> + <literal><=</literal> + <literal>=</literal> </entry> </row> </tbody> @@ -167,8 +167,8 @@ </table> <para> - Of the two operator classes for type <type>point</>, - <literal>quad_point_ops</> is the default. <literal>kd_point_ops</> + Of the two operator classes for type <type>point</type>, + <literal>quad_point_ops</literal> is the default. <literal>kd_point_ops</literal> supports the same operators but uses a different index data structure which may offer better performance in some applications. </para> @@ -199,15 +199,15 @@ <para> Inner tuples are more complex, since they are branching points in the search tree. Each inner tuple contains a set of one or more - <firstterm>nodes</>, which represent groups of similar leaf values. + <firstterm>nodes</firstterm>, which represent groups of similar leaf values. A node contains a downlink that leads either to another, lower-level inner tuple, or to a short list of leaf tuples that all lie on the same index page. - Each node normally has a <firstterm>label</> that describes it; for example, + Each node normally has a <firstterm>label</firstterm> that describes it; for example, in a radix tree the node label could be the next character of the string value. (Alternatively, an operator class can omit the node labels, if it works with a fixed set of nodes for all inner tuples; see <xref linkend="spgist-null-labels">.) - Optionally, an inner tuple can have a <firstterm>prefix</> value + Optionally, an inner tuple can have a <firstterm>prefix</firstterm> value that describes all its members. In a radix tree this could be the common prefix of the represented strings. The prefix value is not necessarily really a prefix, but can be any data needed by the operator class; @@ -223,7 +223,7 @@ operator classes to manage level counting while descending the tree. There is also support for incrementally reconstructing the represented value when that is needed, and for passing down additional data (called - <firstterm>traverse values</>) during a tree descent. + <firstterm>traverse values</firstterm>) during a tree descent. </para> <note> @@ -241,12 +241,12 @@ <para> There are five user-defined methods that an index operator class for <acronym>SP-GiST</acronym> must provide. All five follow the convention - of accepting two <type>internal</> arguments, the first of which is a + of accepting two <type>internal</type> arguments, the first of which is a pointer to a C struct containing input values for the support method, while the second argument is a pointer to a C struct where output values - must be placed. Four of the methods just return <type>void</>, since + must be placed. Four of the methods just return <type>void</type>, since all their results appear in the output struct; but - <function>leaf_consistent</> additionally returns a <type>boolean</> result. + <function>leaf_consistent</function> additionally returns a <type>boolean</type> result. The methods must not modify any fields of their input structs. In all cases, the output struct is initialized to zeroes before calling the user-defined method. @@ -258,20 +258,20 @@ <variablelist> <varlistentry> - <term><function>config</></term> + <term><function>config</function></term> <listitem> <para> Returns static information about the index implementation, including the data type OIDs of the prefix and node label data types. </para> <para> - The <acronym>SQL</> declaration of the function must look like this: + The <acronym>SQL</acronym> declaration of the function must look like this: <programlisting> CREATE FUNCTION my_config(internal, internal) RETURNS void ... </programlisting> - The first argument is a pointer to a <structname>spgConfigIn</> + The first argument is a pointer to a <structname>spgConfigIn</structname> C struct, containing input data for the function. - The second argument is a pointer to a <structname>spgConfigOut</> + The second argument is a pointer to a <structname>spgConfigOut</structname> C struct, which the function must fill with result data. <programlisting> typedef struct spgConfigIn @@ -288,20 +288,20 @@ typedef struct spgConfigOut } spgConfigOut; </programlisting> - <structfield>attType</> is passed in order to support polymorphic + <structfield>attType</structfield> is passed in order to support polymorphic index operator classes; for ordinary fixed-data-type operator classes, it will always have the same value and so can be ignored. </para> <para> For operator classes that do not use prefixes, - <structfield>prefixType</> can be set to <literal>VOIDOID</>. + <structfield>prefixType</structfield> can be set to <literal>VOIDOID</literal>. Likewise, for operator classes that do not use node labels, - <structfield>labelType</> can be set to <literal>VOIDOID</>. - <structfield>canReturnData</> should be set true if the operator class + <structfield>labelType</structfield> can be set to <literal>VOIDOID</literal>. + <structfield>canReturnData</structfield> should be set true if the operator class is capable of reconstructing the originally-supplied index value. - <structfield>longValuesOK</> should be set true only when the - <structfield>attType</> is of variable length and the operator + <structfield>longValuesOK</structfield> should be set true only when the + <structfield>attType</structfield> is of variable length and the operator class is capable of segmenting long values by repeated suffixing (see <xref linkend="spgist-limits">). </para> @@ -309,20 +309,20 @@ typedef struct spgConfigOut </varlistentry> <varlistentry> - <term><function>choose</></term> + <term><function>choose</function></term> <listitem> <para> Chooses a method for inserting a new value into an inner tuple. </para> <para> - The <acronym>SQL</> declaration of the function must look like this: + The <acronym>SQL</acronym> declaration of the function must look like this: <programlisting> CREATE FUNCTION my_choose(internal, internal) RETURNS void ... </programlisting> - The first argument is a pointer to a <structname>spgChooseIn</> + The first argument is a pointer to a <structname>spgChooseIn</structname> C struct, containing input data for the function. - The second argument is a pointer to a <structname>spgChooseOut</> + The second argument is a pointer to a <structname>spgChooseOut</structname> C struct, which the function must fill with result data. <programlisting> typedef struct spgChooseIn @@ -380,25 +380,25 @@ typedef struct spgChooseOut } spgChooseOut; </programlisting> - <structfield>datum</> is the original datum that was to be inserted + <structfield>datum</structfield> is the original datum that was to be inserted into the index. - <structfield>leafDatum</> is initially the same as - <structfield>datum</>, but can change at lower levels of the tree + <structfield>leafDatum</structfield> is initially the same as + <structfield>datum</structfield>, but can change at lower levels of the tree if the <function>choose</function> or <function>picksplit</function> methods change it. When the insertion search reaches a leaf page, - the current value of <structfield>leafDatum</> is what will be stored + the current value of <structfield>leafDatum</structfield> is what will be stored in the newly created leaf tuple. - <structfield>level</> is the current inner tuple's level, starting at + <structfield>level</structfield> is the current inner tuple's level, starting at zero for the root level. - <structfield>allTheSame</> is true if the current inner tuple is + <structfield>allTheSame</structfield> is true if the current inner tuple is marked as containing multiple equivalent nodes (see <xref linkend="spgist-all-the-same">). - <structfield>hasPrefix</> is true if the current inner tuple contains + <structfield>hasPrefix</structfield> is true if the current inner tuple contains a prefix; if so, - <structfield>prefixDatum</> is its value. - <structfield>nNodes</> is the number of child nodes contained in the + <structfield>prefixDatum</structfield> is its value. + <structfield>nNodes</structfield> is the number of child nodes contained in the inner tuple, and - <structfield>nodeLabels</> is an array of their label values, or + <structfield>nodeLabels</structfield> is an array of their label values, or NULL if there are no labels. </para> @@ -412,80 +412,80 @@ typedef struct spgChooseOut <para> If the new value matches one of the existing child nodes, - set <structfield>resultType</> to <literal>spgMatchNode</>. - Set <structfield>nodeN</> to the index (from zero) of that node in + set <structfield>resultType</structfield> to <literal>spgMatchNode</literal>. + Set <structfield>nodeN</structfield> to the index (from zero) of that node in the node array. - Set <structfield>levelAdd</> to the increment in - <structfield>level</> caused by descending through that node, + Set <structfield>levelAdd</structfield> to the increment in + <structfield>level</structfield> caused by descending through that node, or leave it as zero if the operator class does not use levels. - Set <structfield>restDatum</> to equal <structfield>datum</> + Set <structfield>restDatum</structfield> to equal <structfield>datum</structfield> if the operator class does not modify datums from one level to the next, or otherwise set it to the modified value to be used as - <structfield>leafDatum</> at the next level. + <structfield>leafDatum</structfield> at the next level. </para> <para> If a new child node must be added, - set <structfield>resultType</> to <literal>spgAddNode</>. - Set <structfield>nodeLabel</> to the label to be used for the new - node, and set <structfield>nodeN</> to the index (from zero) at which + set <structfield>resultType</structfield> to <literal>spgAddNode</literal>. + Set <structfield>nodeLabel</structfield> to the label to be used for the new + node, and set <structfield>nodeN</structfield> to the index (from zero) at which to insert the node in the node array. After the node has been added, the <function>choose</function> function will be called again with the modified inner tuple; - that call should result in an <literal>spgMatchNode</> result. + that call should result in an <literal>spgMatchNode</literal> result. </para> <para> If the new value is inconsistent with the tuple prefix, - set <structfield>resultType</> to <literal>spgSplitTuple</>. + set <structfield>resultType</structfield> to <literal>spgSplitTuple</literal>. This action moves all the existing nodes into a new lower-level inner tuple, and replaces the existing inner tuple with a tuple having a single downlink pointing to the new lower-level inner tuple. - Set <structfield>prefixHasPrefix</> to indicate whether the new + Set <structfield>prefixHasPrefix</structfield> to indicate whether the new upper tuple should have a prefix, and if so set - <structfield>prefixPrefixDatum</> to the prefix value. This new + <structfield>prefixPrefixDatum</structfield> to the prefix value. This new prefix value must be sufficiently less restrictive than the original to accept the new value to be indexed. - Set <structfield>prefixNNodes</> to the number of nodes needed in the - new tuple, and set <structfield>prefixNodeLabels</> to a palloc'd array + Set <structfield>prefixNNodes</structfield> to the number of nodes needed in the + new tuple, and set <structfield>prefixNodeLabels</structfield> to a palloc'd array holding their labels, or to NULL if node labels are not required. Note that the total size of the new upper tuple must be no more than the total size of the tuple it is replacing; this constrains the lengths of the new prefix and new labels. - Set <structfield>childNodeN</> to the index (from zero) of the node + Set <structfield>childNodeN</structfield> to the index (from zero) of the node that will downlink to the new lower-level inner tuple. - Set <structfield>postfixHasPrefix</> to indicate whether the new + Set <structfield>postfixHasPrefix</structfield> to indicate whether the new lower-level inner tuple should have a prefix, and if so set - <structfield>postfixPrefixDatum</> to the prefix value. The + <structfield>postfixPrefixDatum</structfield> to the prefix value. The combination of these two prefixes and the downlink node's label (if any) must have the same meaning as the original prefix, because there is no opportunity to alter the node labels that are moved to the new lower-level tuple, nor to change any child index entries. After the node has been split, the <function>choose</function> function will be called again with the replacement inner tuple. - That call may return an <literal>spgAddNode</> result, if no suitable - node was created by the <literal>spgSplitTuple</> action. Eventually - <function>choose</function> must return <literal>spgMatchNode</> to + That call may return an <literal>spgAddNode</literal> result, if no suitable + node was created by the <literal>spgSplitTuple</literal> action. Eventually + <function>choose</function> must return <literal>spgMatchNode</literal> to allow the insertion to descend to the next level. </para> </listitem> </varlistentry> <varlistentry> - <term><function>picksplit</></term> + <term><function>picksplit</function></term> <listitem> <para> Decides how to create a new inner tuple over a set of leaf tuples. </para> <para> - The <acronym>SQL</> declaration of the function must look like this: + The <acronym>SQL</acronym> declaration of the function must look like this: <programlisting> CREATE FUNCTION my_picksplit(internal, internal) RETURNS void ... </programlisting> - The first argument is a pointer to a <structname>spgPickSplitIn</> + The first argument is a pointer to a <structname>spgPickSplitIn</structname> C struct, containing input data for the function. - The second argument is a pointer to a <structname>spgPickSplitOut</> + The second argument is a pointer to a <structname>spgPickSplitOut</structname> C struct, which the function must fill with result data. <programlisting> typedef struct spgPickSplitIn @@ -508,52 +508,52 @@ typedef struct spgPickSplitOut } spgPickSplitOut; </programlisting> - <structfield>nTuples</> is the number of leaf tuples provided. - <structfield>datums</> is an array of their datum values. - <structfield>level</> is the current level that all the leaf tuples + <structfield>nTuples</structfield> is the number of leaf tuples provided. + <structfield>datums</structfield> is an array of their datum values. + <structfield>level</structfield> is the current level that all the leaf tuples share, which will become the level of the new inner tuple. </para> <para> - Set <structfield>hasPrefix</> to indicate whether the new inner + Set <structfield>hasPrefix</structfield> to indicate whether the new inner tuple should have a prefix, and if so set - <structfield>prefixDatum</> to the prefix value. - Set <structfield>nNodes</> to indicate the number of nodes that + <structfield>prefixDatum</structfield> to the prefix value. + Set <structfield>nNodes</structfield> to indicate the number of nodes that the new inner tuple will contain, and - set <structfield>nodeLabels</> to an array of their label values, + set <structfield>nodeLabels</structfield> to an array of their label values, or to NULL if node labels are not required. - Set <structfield>mapTuplesToNodes</> to an array that gives the index + Set <structfield>mapTuplesToNodes</structfield> to an array that gives the index (from zero) of the node that each leaf tuple should be assigned to. - Set <structfield>leafTupleDatums</> to an array of the values to + Set <structfield>leafTupleDatums</structfield> to an array of the values to be stored in the new leaf tuples (these will be the same as the - input <structfield>datums</> if the operator class does not modify + input <structfield>datums</structfield> if the operator class does not modify datums from one level to the next). - Note that the <function>picksplit</> function is + Note that the <function>picksplit</function> function is responsible for palloc'ing the - <structfield>nodeLabels</>, <structfield>mapTuplesToNodes</> and - <structfield>leafTupleDatums</> arrays. + <structfield>nodeLabels</structfield>, <structfield>mapTuplesToNodes</structfield> and + <structfield>leafTupleDatums</structfield> arrays. </para> <para> If more than one leaf tuple is supplied, it is expected that the - <function>picksplit</> function will classify them into more than + <function>picksplit</function> function will classify them into more than one node; otherwise it is not possible to split the leaf tuples across multiple pages, which is the ultimate purpose of this - operation. Therefore, if the <function>picksplit</> function + operation. Therefore, if the <function>picksplit</function> function ends up placing all the leaf tuples in the same node, the core SP-GiST code will override that decision and generate an inner tuple in which the leaf tuples are assigned at random to several identically-labeled nodes. Such a tuple is marked - <literal>allTheSame</> to signify that this has happened. The - <function>choose</> and <function>inner_consistent</> functions + <literal>allTheSame</literal> to signify that this has happened. The + <function>choose</function> and <function>inner_consistent</function> functions must take suitable care with such inner tuples. See <xref linkend="spgist-all-the-same"> for more information. </para> <para> - <function>picksplit</> can be applied to a single leaf tuple only - in the case that the <function>config</> function set - <structfield>longValuesOK</> to true and a larger-than-a-page input + <function>picksplit</function> can be applied to a single leaf tuple only + in the case that the <function>config</function> function set + <structfield>longValuesOK</structfield> to true and a larger-than-a-page input value has been supplied. In this case the point of the operation is to strip off a prefix and produce a new, shorter leaf datum value. The call will be repeated until a leaf datum short enough to fit on @@ -564,20 +564,20 @@ typedef struct spgPickSplitOut </varlistentry> <varlistentry> - <term><function>inner_consistent</></term> + <term><function>inner_consistent</function></term> <listitem> <para> Returns set of nodes (branches) to follow during tree search. </para> <para> - The <acronym>SQL</> declaration of the function must look like this: + The <acronym>SQL</acronym> declaration of the function must look like this: <programlisting> CREATE FUNCTION my_inner_consistent(internal, internal) RETURNS void ... </programlisting> - The first argument is a pointer to a <structname>spgInnerConsistentIn</> + The first argument is a pointer to a <structname>spgInnerConsistentIn</structname> C struct, containing input data for the function. - The second argument is a pointer to a <structname>spgInnerConsistentOut</> + The second argument is a pointer to a <structname>spgInnerConsistentOut</structname> C struct, which the function must fill with result data. <programlisting> @@ -610,90 +610,90 @@ typedef struct spgInnerConsistentOut } spgInnerConsistentOut; </programlisting> - The array <structfield>scankeys</>, of length <structfield>nkeys</>, + The array <structfield>scankeys</structfield>, of length <structfield>nkeys</structfield>, describes the index search condition(s). These conditions are combined with AND — only index entries that satisfy all of - them are interesting. (Note that <structfield>nkeys</> = 0 implies + them are interesting. (Note that <structfield>nkeys</structfield> = 0 implies that all index entries satisfy the query.) Usually the consistent - function only cares about the <structfield>sk_strategy</> and - <structfield>sk_argument</> fields of each array entry, which + function only cares about the <structfield>sk_strategy</structfield> and + <structfield>sk_argument</structfield> fields of each array entry, which respectively give the indexable operator and comparison value. - In particular it is not necessary to check <structfield>sk_flags</> to + In particular it is not necessary to check <structfield>sk_flags</structfield> to see if the comparison value is NULL, because the SP-GiST core code will filter out such conditions. - <structfield>reconstructedValue</> is the value reconstructed for the - parent tuple; it is <literal>(Datum) 0</> at the root level or if the - <function>inner_consistent</> function did not provide a value at the + <structfield>reconstructedValue</structfield> is the value reconstructed for the + parent tuple; it is <literal>(Datum) 0</literal> at the root level or if the + <function>inner_consistent</function> function did not provide a value at the parent level. - <structfield>traversalValue</> is a pointer to any traverse data - passed down from the previous call of <function>inner_consistent</> + <structfield>traversalValue</structfield> is a pointer to any traverse data + passed down from the previous call of <function>inner_consistent</function> on the parent index tuple, or NULL at the root level. - <structfield>traversalMemoryContext</> is the memory context in which + <structfield>traversalMemoryContext</structfield> is the memory context in which to store output traverse values (see below). - <structfield>level</> is the current inner tuple's level, starting at + <structfield>level</structfield> is the current inner tuple's level, starting at zero for the root level. - <structfield>returnData</> is <literal>true</> if reconstructed data is + <structfield>returnData</structfield> is <literal>true</literal> if reconstructed data is required for this query; this will only be so if the - <function>config</> function asserted <structfield>canReturnData</>. - <structfield>allTheSame</> is true if the current inner tuple is - marked <quote>all-the-same</>; in this case all the nodes have the + <function>config</function> function asserted <structfield>canReturnData</structfield>. + <structfield>allTheSame</structfield> is true if the current inner tuple is + marked <quote>all-the-same</quote>; in this case all the nodes have the same label (if any) and so either all or none of them match the query (see <xref linkend="spgist-all-the-same">). - <structfield>hasPrefix</> is true if the current inner tuple contains + <structfield>hasPrefix</structfield> is true if the current inner tuple contains a prefix; if so, - <structfield>prefixDatum</> is its value. - <structfield>nNodes</> is the number of child nodes contained in the + <structfield>prefixDatum</structfield> is its value. + <structfield>nNodes</structfield> is the number of child nodes contained in the inner tuple, and - <structfield>nodeLabels</> is an array of their label values, or + <structfield>nodeLabels</structfield> is an array of their label values, or NULL if the nodes do not have labels. </para> <para> - <structfield>nNodes</> must be set to the number of child nodes that + <structfield>nNodes</structfield> must be set to the number of child nodes that need to be visited by the search, and - <structfield>nodeNumbers</> must be set to an array of their indexes. + <structfield>nodeNumbers</structfield> must be set to an array of their indexes. If the operator class keeps track of levels, set - <structfield>levelAdds</> to an array of the level increments + <structfield>levelAdds</structfield> to an array of the level increments required when descending to each node to be visited. (Often these increments will be the same for all the nodes, but that's not necessarily so, so an array is used.) If value reconstruction is needed, set - <structfield>reconstructedValues</> to an array of the values + <structfield>reconstructedValues</structfield> to an array of the values reconstructed for each child node to be visited; otherwise, leave - <structfield>reconstructedValues</> as NULL. + <structfield>reconstructedValues</structfield> as NULL. If it is desired to pass down additional out-of-band information - (<quote>traverse values</>) to lower levels of the tree search, - set <structfield>traversalValues</> to an array of the appropriate + (<quote>traverse values</quote>) to lower levels of the tree search, + set <structfield>traversalValues</structfield> to an array of the appropriate traverse values, one for each child node to be visited; otherwise, - leave <structfield>traversalValues</> as NULL. - Note that the <function>inner_consistent</> function is + leave <structfield>traversalValues</structfield> as NULL. + Note that the <function>inner_consistent</function> function is responsible for palloc'ing the - <structfield>nodeNumbers</>, <structfield>levelAdds</>, - <structfield>reconstructedValues</>, and - <structfield>traversalValues</> arrays in the current memory context. + <structfield>nodeNumbers</structfield>, <structfield>levelAdds</structfield>, + <structfield>reconstructedValues</structfield>, and + <structfield>traversalValues</structfield> arrays in the current memory context. However, any output traverse values pointed to by - the <structfield>traversalValues</> array should be allocated - in <structfield>traversalMemoryContext</>. + the <structfield>traversalValues</structfield> array should be allocated + in <structfield>traversalMemoryContext</structfield>. Each traverse value must be a single palloc'd chunk. </para> </listitem> </varlistentry> <varlistentry> - <term><function>leaf_consistent</></term> + <term><function>leaf_consistent</function></term> <listitem> <para> Returns true if a leaf tuple satisfies a query. </para> <para> - The <acronym>SQL</> declaration of the function must look like this: + The <acronym>SQL</acronym> declaration of the function must look like this: <programlisting> CREATE FUNCTION my_leaf_consistent(internal, internal) RETURNS bool ... </programlisting> - The first argument is a pointer to a <structname>spgLeafConsistentIn</> + The first argument is a pointer to a <structname>spgLeafConsistentIn</structname> C struct, containing input data for the function. - The second argument is a pointer to a <structname>spgLeafConsistentOut</> + The second argument is a pointer to a <structname>spgLeafConsistentOut</structname> C struct, which the function must fill with result data. <programlisting> typedef struct spgLeafConsistentIn @@ -716,40 +716,40 @@ typedef struct spgLeafConsistentOut } spgLeafConsistentOut; </programlisting> - The array <structfield>scankeys</>, of length <structfield>nkeys</>, + The array <structfield>scankeys</structfield>, of length <structfield>nkeys</structfield>, describes the index search condition(s). These conditions are combined with AND — only index entries that satisfy all of - them satisfy the query. (Note that <structfield>nkeys</> = 0 implies + them satisfy the query. (Note that <structfield>nkeys</structfield> = 0 implies that all index entries satisfy the query.) Usually the consistent - function only cares about the <structfield>sk_strategy</> and - <structfield>sk_argument</> fields of each array entry, which + function only cares about the <structfield>sk_strategy</structfield> and + <structfield>sk_argument</structfield> fields of each array entry, which respectively give the indexable operator and comparison value. - In particular it is not necessary to check <structfield>sk_flags</> to + In particular it is not necessary to check <structfield>sk_flags</structfield> to see if the comparison value is NULL, because the SP-GiST core code will filter out such conditions. - <structfield>reconstructedValue</> is the value reconstructed for the - parent tuple; it is <literal>(Datum) 0</> at the root level or if the - <function>inner_consistent</> function did not provide a value at the + <structfield>reconstructedValue</structfield> is the value reconstructed for the + parent tuple; it is <literal>(Datum) 0</literal> at the root level or if the + <function>inner_consistent</function> function did not provide a value at the parent level. - <structfield>traversalValue</> is a pointer to any traverse data - passed down from the previous call of <function>inner_consistent</> + <structfield>traversalValue</structfield> is a pointer to any traverse data + passed down from the previous call of <function>inner_consistent</function> on the parent index tuple, or NULL at the root level. - <structfield>level</> is the current leaf tuple's level, starting at + <structfield>level</structfield> is the current leaf tuple's level, starting at zero for the root level. - <structfield>returnData</> is <literal>true</> if reconstructed data is + <structfield>returnData</structfield> is <literal>true</literal> if reconstructed data is required for this query; this will only be so if the - <function>config</> function asserted <structfield>canReturnData</>. - <structfield>leafDatum</> is the key value stored in the current + <function>config</function> function asserted <structfield>canReturnData</structfield>. + <structfield>leafDatum</structfield> is the key value stored in the current leaf tuple. </para> <para> - The function must return <literal>true</> if the leaf tuple matches the - query, or <literal>false</> if not. In the <literal>true</> case, - if <structfield>returnData</> is <literal>true</> then - <structfield>leafValue</> must be set to the value originally supplied + The function must return <literal>true</literal> if the leaf tuple matches the + query, or <literal>false</literal> if not. In the <literal>true</literal> case, + if <structfield>returnData</structfield> is <literal>true</literal> then + <structfield>leafValue</structfield> must be set to the value originally supplied to be indexed for this leaf tuple. Also, - <structfield>recheck</> may be set to <literal>true</> if the match + <structfield>recheck</structfield> may be set to <literal>true</literal> if the match is uncertain and so the operator(s) must be re-applied to the actual heap tuple to verify the match. </para> @@ -759,18 +759,18 @@ typedef struct spgLeafConsistentOut <para> All the SP-GiST support methods are normally called in a short-lived - memory context; that is, <varname>CurrentMemoryContext</> will be reset + memory context; that is, <varname>CurrentMemoryContext</varname> will be reset after processing of each tuple. It is therefore not very important to - worry about pfree'ing everything you palloc. (The <function>config</> + worry about pfree'ing everything you palloc. (The <function>config</function> method is an exception: it should try to avoid leaking memory. But - usually the <function>config</> method need do nothing but assign + usually the <function>config</function> method need do nothing but assign constants into the passed parameter struct.) </para> <para> If the indexed column is of a collatable data type, the index collation will be passed to all the support methods, using the standard - <function>PG_GET_COLLATION()</> mechanism. + <function>PG_GET_COLLATION()</function> mechanism. </para> </sect1> @@ -794,7 +794,7 @@ typedef struct spgLeafConsistentOut trees, in which each level of the tree includes a prefix that is short enough to fit on a page, and the final leaf level includes a suffix also short enough to fit on a page. The operator class should set - <structfield>longValuesOK</> to TRUE only if it is prepared to arrange for + <structfield>longValuesOK</structfield> to TRUE only if it is prepared to arrange for this to happen. Otherwise, the <acronym>SP-GiST</acronym> core will reject any request to index a value that is too large to fit on an index page. @@ -814,8 +814,8 @@ typedef struct spgLeafConsistentOut links that chain such tuples together.) If the set of leaf tuples grows too large for a page, a split is performed and an intermediate inner tuple is inserted. For this to fix the problem, the new inner - tuple <emphasis>must</> divide the set of leaf values into more than one - node group. If the operator class's <function>picksplit</> function + tuple <emphasis>must</emphasis> divide the set of leaf values into more than one + node group. If the operator class's <function>picksplit</function> function fails to do that, the <acronym>SP-GiST</acronym> core resorts to extraordinary measures described in <xref linkend="spgist-all-the-same">. </para> @@ -830,58 +830,58 @@ typedef struct spgLeafConsistentOut corresponding to the four quadrants around the inner tuple's centroid point. In such a case the code typically works with the nodes by number, and there is no need for explicit node labels. To suppress - node labels (and thereby save some space), the <function>picksplit</> - function can return NULL for the <structfield>nodeLabels</> array, - and likewise the <function>choose</> function can return NULL for - the <structfield>prefixNodeLabels</> array during - a <literal>spgSplitTuple</> action. - This will in turn result in <structfield>nodeLabels</> being NULL during - subsequent calls to <function>choose</> and <function>inner_consistent</>. + node labels (and thereby save some space), the <function>picksplit</function> + function can return NULL for the <structfield>nodeLabels</structfield> array, + and likewise the <function>choose</function> function can return NULL for + the <structfield>prefixNodeLabels</structfield> array during + a <literal>spgSplitTuple</literal> action. + This will in turn result in <structfield>nodeLabels</structfield> being NULL during + subsequent calls to <function>choose</function> and <function>inner_consistent</function>. In principle, node labels could be used for some inner tuples and omitted for others in the same index. </para> <para> When working with an inner tuple having unlabeled nodes, it is an error - for <function>choose</> to return <literal>spgAddNode</>, since the set + for <function>choose</function> to return <literal>spgAddNode</literal>, since the set of nodes is supposed to be fixed in such cases. </para> </sect2> <sect2 id="spgist-all-the-same"> - <title><quote>All-the-same</> Inner Tuples</title> + <title><quote>All-the-same</quote> Inner Tuples</title> <para> The <acronym>SP-GiST</acronym> core can override the results of the - operator class's <function>picksplit</> function when - <function>picksplit</> fails to divide the supplied leaf values into + operator class's <function>picksplit</function> function when + <function>picksplit</function> fails to divide the supplied leaf values into at least two node categories. When this happens, the new inner tuple is created with multiple nodes that each have the same label (if any) - that <function>picksplit</> gave to the one node it did use, and the + that <function>picksplit</function> gave to the one node it did use, and the leaf values are divided at random among these equivalent nodes. - The <literal>allTheSame</> flag is set on the inner tuple to warn the - <function>choose</> and <function>inner_consistent</> functions that the + The <literal>allTheSame</literal> flag is set on the inner tuple to warn the + <function>choose</function> and <function>inner_consistent</function> functions that the tuple does not have the node set that they might otherwise expect. </para> <para> - When dealing with an <literal>allTheSame</> tuple, a <function>choose</> - result of <literal>spgMatchNode</> is interpreted to mean that the new + When dealing with an <literal>allTheSame</literal> tuple, a <function>choose</function> + result of <literal>spgMatchNode</literal> is interpreted to mean that the new value can be assigned to any of the equivalent nodes; the core code will - ignore the supplied <structfield>nodeN</> value and descend into one + ignore the supplied <structfield>nodeN</structfield> value and descend into one of the nodes at random (so as to keep the tree balanced). It is an - error for <function>choose</> to return <literal>spgAddNode</>, since + error for <function>choose</function> to return <literal>spgAddNode</literal>, since that would make the nodes not all equivalent; the - <literal>spgSplitTuple</> action must be used if the value to be inserted + <literal>spgSplitTuple</literal> action must be used if the value to be inserted doesn't match the existing nodes. </para> <para> - When dealing with an <literal>allTheSame</> tuple, the - <function>inner_consistent</> function should return either all or none + When dealing with an <literal>allTheSame</literal> tuple, the + <function>inner_consistent</function> function should return either all or none of the nodes as targets for continuing the index search, since they are all equivalent. This may or may not require any special-case code, - depending on how much the <function>inner_consistent</> function normally + depending on how much the <function>inner_consistent</function> function normally assumes about the meaning of the nodes. </para> </sect2> @@ -895,8 +895,8 @@ typedef struct spgLeafConsistentOut The <productname>PostgreSQL</productname> source distribution includes several examples of index operator classes for <acronym>SP-GiST</acronym>, as described in <xref linkend="spgist-builtin-opclasses-table">. Look - into <filename>src/backend/access/spgist/</> - and <filename>src/backend/utils/adt/</> to see the code. + into <filename>src/backend/access/spgist/</filename> + and <filename>src/backend/utils/adt/</filename> to see the code. </para> </sect1> diff --git a/doc/src/sgml/spi.sgml b/doc/src/sgml/spi.sgml index 3594f9dce1d..e2b44c5fa1a 100644 --- a/doc/src/sgml/spi.sgml +++ b/doc/src/sgml/spi.sgml @@ -203,7 +203,7 @@ int SPI_execute(const char * <parameter>command</parameter>, bool <parameter>rea <para> <function>SPI_execute</function> executes the specified SQL command for <parameter>count</parameter> rows. If <parameter>read_only</parameter> - is <literal>true</>, the command must be read-only, and execution overhead + is <literal>true</literal>, the command must be read-only, and execution overhead is somewhat reduced. </para> @@ -225,13 +225,13 @@ SPI_execute("SELECT * FROM foo", true, 5); <programlisting> SPI_execute("INSERT INTO foo SELECT * FROM bar", false, 5); </programlisting> - inserts all rows from <structname>bar</>, ignoring the + inserts all rows from <structname>bar</structname>, ignoring the <parameter>count</parameter> parameter. However, with <programlisting> SPI_execute("INSERT INTO foo SELECT * FROM bar RETURNING *", false, 5); </programlisting> at most 5 rows would be inserted, since execution would stop after the - fifth <literal>RETURNING</> result row is retrieved. + fifth <literal>RETURNING</literal> result row is retrieved. </para> <para> @@ -244,26 +244,26 @@ SPI_execute("INSERT INTO foo SELECT * FROM bar RETURNING *", false, 5); </para> <para> - When <parameter>read_only</parameter> is <literal>false</>, + When <parameter>read_only</parameter> is <literal>false</literal>, <function>SPI_execute</function> increments the command - counter and computes a new <firstterm>snapshot</> before executing each + counter and computes a new <firstterm>snapshot</firstterm> before executing each command in the string. The snapshot does not actually change if the - current transaction isolation level is <literal>SERIALIZABLE</> or <literal>REPEATABLE READ</>, but in - <literal>READ COMMITTED</> mode the snapshot update allows each command to + current transaction isolation level is <literal>SERIALIZABLE</literal> or <literal>REPEATABLE READ</literal>, but in + <literal>READ COMMITTED</literal> mode the snapshot update allows each command to see the results of newly committed transactions from other sessions. This is essential for consistent behavior when the commands are modifying the database. </para> <para> - When <parameter>read_only</parameter> is <literal>true</>, + When <parameter>read_only</parameter> is <literal>true</literal>, <function>SPI_execute</function> does not update either the snapshot - or the command counter, and it allows only plain <command>SELECT</> + or the command counter, and it allows only plain <command>SELECT</command> commands to appear in the command string. The commands are executed using the snapshot previously established for the surrounding query. This execution mode is somewhat faster than the read/write mode due to eliminating per-command overhead. It also allows genuinely - <firstterm>stable</> functions to be built: since successive executions + <firstterm>stable</firstterm> functions to be built: since successive executions will all use the same snapshot, there will be no change in the results. </para> @@ -284,11 +284,11 @@ SPI_execute("INSERT INTO foo SELECT * FROM bar RETURNING *", false, 5); then you can use the global pointer <literal>SPITupleTable *SPI_tuptable</literal> to access the result rows. Some utility commands (such as - <command>EXPLAIN</>) also return row sets, and <literal>SPI_tuptable</> + <command>EXPLAIN</command>) also return row sets, and <literal>SPI_tuptable</literal> will contain the result in these cases too. Some utility commands - (<command>COPY</>, <command>CREATE TABLE AS</>) don't return a row set, so - <literal>SPI_tuptable</> is NULL, but they still return the number of - rows processed in <varname>SPI_processed</>. + (<command>COPY</command>, <command>CREATE TABLE AS</command>) don't return a row set, so + <literal>SPI_tuptable</literal> is NULL, but they still return the number of + rows processed in <varname>SPI_processed</varname>. </para> <para> @@ -304,17 +304,17 @@ typedef struct HeapTuple *vals; /* rows */ } SPITupleTable; </programlisting> - <structfield>vals</> is an array of pointers to rows. (The number + <structfield>vals</structfield> is an array of pointers to rows. (The number of valid entries is given by <varname>SPI_processed</varname>.) - <structfield>tupdesc</> is a row descriptor which you can pass to - SPI functions dealing with rows. <structfield>tuptabcxt</>, - <structfield>alloced</>, and <structfield>free</> are internal + <structfield>tupdesc</structfield> is a row descriptor which you can pass to + SPI functions dealing with rows. <structfield>tuptabcxt</structfield>, + <structfield>alloced</structfield>, and <structfield>free</structfield> are internal fields not intended for use by SPI callers. </para> <para> <function>SPI_finish</function> frees all - <structname>SPITupleTable</>s allocated during the current + <structname>SPITupleTable</structname>s allocated during the current procedure. You can free a particular result table earlier, if you are done with it, by calling <function>SPI_freetuptable</function>. </para> @@ -336,7 +336,7 @@ typedef struct <varlistentry> <term><literal>bool <parameter>read_only</parameter></literal></term> <listitem> - <para><literal>true</> for read-only execution</para> + <para><literal>true</literal> for read-only execution</para> </listitem> </varlistentry> @@ -345,7 +345,7 @@ typedef struct <listitem> <para> maximum number of rows to return, - or <literal>0</> for no limit + or <literal>0</literal> for no limit </para> </listitem> </varlistentry> @@ -365,7 +365,7 @@ typedef struct <listitem> <para> if a <command>SELECT</command> (but not <command>SELECT - INTO</>) was executed + INTO</command>) was executed </para> </listitem> </varlistentry> @@ -473,7 +473,7 @@ typedef struct <term><symbol>SPI_ERROR_COPY</symbol></term> <listitem> <para> - if <command>COPY TO stdout</> or <command>COPY FROM stdin</> + if <command>COPY TO stdout</command> or <command>COPY FROM stdin</command> was attempted </para> </listitem> @@ -484,13 +484,13 @@ typedef struct <listitem> <para> if a transaction manipulation command was attempted - (<command>BEGIN</>, - <command>COMMIT</>, - <command>ROLLBACK</>, - <command>SAVEPOINT</>, - <command>PREPARE TRANSACTION</>, - <command>COMMIT PREPARED</>, - <command>ROLLBACK PREPARED</>, + (<command>BEGIN</command>, + <command>COMMIT</command>, + <command>ROLLBACK</command>, + <command>SAVEPOINT</command>, + <command>PREPARE TRANSACTION</command>, + <command>COMMIT PREPARED</command>, + <command>ROLLBACK PREPARED</command>, or any variant thereof) </para> </listitem> @@ -560,7 +560,7 @@ int SPI_exec(const char * <parameter>command</parameter>, long <parameter>count< <function>SPI_exec</function> is the same as <function>SPI_execute</function>, with the latter's <parameter>read_only</parameter> parameter always taken as - <literal>false</>. + <literal>false</literal>. </para> </refsect1> @@ -582,7 +582,7 @@ int SPI_exec(const char * <parameter>command</parameter>, long <parameter>count< <listitem> <para> maximum number of rows to return, - or <literal>0</> for no limit + or <literal>0</literal> for no limit </para> </listitem> </varlistentry> @@ -628,7 +628,7 @@ int SPI_execute_with_args(const char *<parameter>command</parameter>, <para> <function>SPI_execute_with_args</function> executes a command that might include references to externally supplied parameters. The command text - refers to a parameter as <literal>$<replaceable>n</></literal>, and + refers to a parameter as <literal>$<replaceable>n</replaceable></literal>, and the call specifies data types and values for each such symbol. <parameter>read_only</parameter> and <parameter>count</parameter> have the same interpretation as in <function>SPI_execute</function>. @@ -642,7 +642,7 @@ int SPI_execute_with_args(const char *<parameter>command</parameter>, </para> <para> - Similar results can be achieved with <function>SPI_prepare</> followed by + Similar results can be achieved with <function>SPI_prepare</function> followed by <function>SPI_execute_plan</function>; however, when using this function the query plan is always customized to the specific parameter values provided. @@ -670,7 +670,7 @@ int SPI_execute_with_args(const char *<parameter>command</parameter>, <term><literal>int <parameter>nargs</parameter></literal></term> <listitem> <para> - number of input parameters (<literal>$1</>, <literal>$2</>, etc.) + number of input parameters (<literal>$1</literal>, <literal>$2</literal>, etc.) </para> </listitem> </varlistentry> @@ -707,12 +707,12 @@ int SPI_execute_with_args(const char *<parameter>command</parameter>, If <parameter>nulls</parameter> is <symbol>NULL</symbol> then <function>SPI_execute_with_args</function> assumes that no parameters are null. Otherwise, each entry of the <parameter>nulls</parameter> - array should be <literal>' '</> if the corresponding parameter - value is non-null, or <literal>'n'</> if the corresponding parameter + array should be <literal>' '</literal> if the corresponding parameter + value is non-null, or <literal>'n'</literal> if the corresponding parameter value is null. (In the latter case, the actual value in the corresponding <parameter>values</parameter> entry doesn't matter.) Note that <parameter>nulls</parameter> is not a text string, just an array: - it does not need a <literal>'\0'</> terminator. + it does not need a <literal>'\0'</literal> terminator. </para> </listitem> </varlistentry> @@ -720,7 +720,7 @@ int SPI_execute_with_args(const char *<parameter>command</parameter>, <varlistentry> <term><literal>bool <parameter>read_only</parameter></literal></term> <listitem> - <para><literal>true</> for read-only execution</para> + <para><literal>true</literal> for read-only execution</para> </listitem> </varlistentry> @@ -729,7 +729,7 @@ int SPI_execute_with_args(const char *<parameter>command</parameter>, <listitem> <para> maximum number of rows to return, - or <literal>0</> for no limit + or <literal>0</literal> for no limit </para> </listitem> </varlistentry> @@ -796,7 +796,7 @@ SPIPlanPtr SPI_prepare(const char * <parameter>command</parameter>, int <paramet <para> A prepared command can be generalized by writing parameters - (<literal>$1</>, <literal>$2</>, etc.) in place of what would be + (<literal>$1</literal>, <literal>$2</literal>, etc.) in place of what would be constants in a normal command. The actual values of the parameters are then specified when <function>SPI_execute_plan</function> is called. This allows the prepared command to be used over a wider range of @@ -829,7 +829,7 @@ SPIPlanPtr SPI_prepare(const char * <parameter>command</parameter>, int <paramet <term><literal>int <parameter>nargs</parameter></literal></term> <listitem> <para> - number of input parameters (<literal>$1</>, <literal>$2</>, etc.) + number of input parameters (<literal>$1</literal>, <literal>$2</literal>, etc.) </para> </listitem> </varlistentry> @@ -851,14 +851,14 @@ SPIPlanPtr SPI_prepare(const char * <parameter>command</parameter>, int <paramet <para> <function>SPI_prepare</function> returns a non-null pointer to an - <type>SPIPlan</>, which is an opaque struct representing a prepared + <type>SPIPlan</type>, which is an opaque struct representing a prepared statement. On error, <symbol>NULL</symbol> will be returned, and <varname>SPI_result</varname> will be set to one of the same error codes used by <function>SPI_execute</function>, except that it is set to <symbol>SPI_ERROR_ARGUMENT</symbol> if <parameter>command</parameter> is <symbol>NULL</symbol>, or if - <parameter>nargs</> is less than 0, or if <parameter>nargs</> is - greater than 0 and <parameter>argtypes</> is <symbol>NULL</symbol>. + <parameter>nargs</parameter> is less than 0, or if <parameter>nargs</parameter> is + greater than 0 and <parameter>argtypes</parameter> is <symbol>NULL</symbol>. </para> </refsect1> @@ -875,21 +875,21 @@ SPIPlanPtr SPI_prepare(const char * <parameter>command</parameter>, int <paramet build a generic plan, and if that is not too much more expensive than the custom plans, it will start using the generic plan instead of re-planning each time. If this default behavior is unsuitable, you can alter it by - passing the <literal>CURSOR_OPT_GENERIC_PLAN</> or - <literal>CURSOR_OPT_CUSTOM_PLAN</> flag to + passing the <literal>CURSOR_OPT_GENERIC_PLAN</literal> or + <literal>CURSOR_OPT_CUSTOM_PLAN</literal> flag to <function>SPI_prepare_cursor</function>, to force use of generic or custom plans respectively. </para> <para> Although the main point of a prepared statement is to avoid repeated parse - analysis and planning of the statement, <productname>PostgreSQL</> will + analysis and planning of the statement, <productname>PostgreSQL</productname> will force re-analysis and re-planning of the statement before using it whenever database objects used in the statement have undergone definitional (DDL) changes since the previous use of the prepared statement. Also, if the value of <xref linkend="guc-search-path"> changes from one use to the next, the statement will be re-parsed using the new - <varname>search_path</>. (This latter behavior is new as of + <varname>search_path</varname>. (This latter behavior is new as of <productname>PostgreSQL</productname> 9.3.) See <xref linkend="sql-prepare"> for more information about the behavior of prepared statements. @@ -900,14 +900,14 @@ SPIPlanPtr SPI_prepare(const char * <parameter>command</parameter>, int <paramet </para> <para> - <type>SPIPlanPtr</> is declared as a pointer to an opaque struct type in - <filename>spi.h</>. It is unwise to try to access its contents + <type>SPIPlanPtr</type> is declared as a pointer to an opaque struct type in + <filename>spi.h</filename>. It is unwise to try to access its contents directly, as that makes your code much more likely to break in future revisions of <productname>PostgreSQL</productname>. </para> <para> - The name <type>SPIPlanPtr</> is somewhat historical, since the data + The name <type>SPIPlanPtr</type> is somewhat historical, since the data structure no longer necessarily contains an execution plan. </para> </refsect1> @@ -941,9 +941,9 @@ SPIPlanPtr SPI_prepare_cursor(const char * <parameter>command</parameter>, int < <para> <function>SPI_prepare_cursor</function> is identical to <function>SPI_prepare</function>, except that it also allows specification - of the planner's <quote>cursor options</> parameter. This is a bit mask + of the planner's <quote>cursor options</quote> parameter. This is a bit mask having the values shown in <filename>nodes/parsenodes.h</filename> - for the <structfield>options</> field of <structname>DeclareCursorStmt</>. + for the <structfield>options</structfield> field of <structname>DeclareCursorStmt</structname>. <function>SPI_prepare</function> always takes the cursor options as zero. </para> </refsect1> @@ -965,7 +965,7 @@ SPIPlanPtr SPI_prepare_cursor(const char * <parameter>command</parameter>, int < <term><literal>int <parameter>nargs</parameter></literal></term> <listitem> <para> - number of input parameters (<literal>$1</>, <literal>$2</>, etc.) + number of input parameters (<literal>$1</literal>, <literal>$2</literal>, etc.) </para> </listitem> </varlistentry> @@ -1004,7 +1004,7 @@ SPIPlanPtr SPI_prepare_cursor(const char * <parameter>command</parameter>, int < <title>Notes</title> <para> - Useful bits to set in <parameter>cursorOptions</> include + Useful bits to set in <parameter>cursorOptions</parameter> include <symbol>CURSOR_OPT_SCROLL</symbol>, <symbol>CURSOR_OPT_NO_SCROLL</symbol>, <symbol>CURSOR_OPT_FAST_PLAN</symbol>, @@ -1262,9 +1262,9 @@ bool SPI_is_cursor_plan(SPIPlanPtr <parameter>plan</parameter>) as an argument to <function>SPI_cursor_open</function>, or <symbol>false</symbol> if that is not the case. The criteria are that the <parameter>plan</parameter> represents one single command and that this - command returns tuples to the caller; for example, <command>SELECT</> - is allowed unless it contains an <literal>INTO</> clause, and - <command>UPDATE</> is allowed only if it contains a <literal>RETURNING</> + command returns tuples to the caller; for example, <command>SELECT</command> + is allowed unless it contains an <literal>INTO</literal> clause, and + <command>UPDATE</command> is allowed only if it contains a <literal>RETURNING</literal> clause. </para> </refsect1> @@ -1368,12 +1368,12 @@ int SPI_execute_plan(SPIPlanPtr <parameter>plan</parameter>, Datum * <parameter> If <parameter>nulls</parameter> is <symbol>NULL</symbol> then <function>SPI_execute_plan</function> assumes that no parameters are null. Otherwise, each entry of the <parameter>nulls</parameter> - array should be <literal>' '</> if the corresponding parameter - value is non-null, or <literal>'n'</> if the corresponding parameter + array should be <literal>' '</literal> if the corresponding parameter + value is non-null, or <literal>'n'</literal> if the corresponding parameter value is null. (In the latter case, the actual value in the corresponding <parameter>values</parameter> entry doesn't matter.) Note that <parameter>nulls</parameter> is not a text string, just an array: - it does not need a <literal>'\0'</> terminator. + it does not need a <literal>'\0'</literal> terminator. </para> </listitem> </varlistentry> @@ -1381,7 +1381,7 @@ int SPI_execute_plan(SPIPlanPtr <parameter>plan</parameter>, Datum * <parameter> <varlistentry> <term><literal>bool <parameter>read_only</parameter></literal></term> <listitem> - <para><literal>true</> for read-only execution</para> + <para><literal>true</literal> for read-only execution</para> </listitem> </varlistentry> @@ -1390,7 +1390,7 @@ int SPI_execute_plan(SPIPlanPtr <parameter>plan</parameter>, Datum * <parameter> <listitem> <para> maximum number of rows to return, - or <literal>0</> for no limit + or <literal>0</literal> for no limit </para> </listitem> </varlistentry> @@ -1467,10 +1467,10 @@ int SPI_execute_plan_with_paramlist(SPIPlanPtr <parameter>plan</parameter>, prepared by <function>SPI_prepare</function>. This function is equivalent to <function>SPI_execute_plan</function> except that information about the parameter values to be passed to the - query is presented differently. The <literal>ParamListInfo</> + query is presented differently. The <literal>ParamListInfo</literal> representation can be convenient for passing down values that are already available in that format. It also supports use of dynamic - parameter sets via hook functions specified in <literal>ParamListInfo</>. + parameter sets via hook functions specified in <literal>ParamListInfo</literal>. </para> </refsect1> @@ -1499,7 +1499,7 @@ int SPI_execute_plan_with_paramlist(SPIPlanPtr <parameter>plan</parameter>, <varlistentry> <term><literal>bool <parameter>read_only</parameter></literal></term> <listitem> - <para><literal>true</> for read-only execution</para> + <para><literal>true</literal> for read-only execution</para> </listitem> </varlistentry> @@ -1508,7 +1508,7 @@ int SPI_execute_plan_with_paramlist(SPIPlanPtr <parameter>plan</parameter>, <listitem> <para> maximum number of rows to return, - or <literal>0</> for no limit + or <literal>0</literal> for no limit </para> </listitem> </varlistentry> @@ -1558,7 +1558,7 @@ int SPI_execp(SPIPlanPtr <parameter>plan</parameter>, Datum * <parameter>values< <function>SPI_execp</function> is the same as <function>SPI_execute_plan</function>, with the latter's <parameter>read_only</parameter> parameter always taken as - <literal>false</>. + <literal>false</literal>. </para> </refsect1> @@ -1597,12 +1597,12 @@ int SPI_execp(SPIPlanPtr <parameter>plan</parameter>, Datum * <parameter>values< If <parameter>nulls</parameter> is <symbol>NULL</symbol> then <function>SPI_execp</function> assumes that no parameters are null. Otherwise, each entry of the <parameter>nulls</parameter> - array should be <literal>' '</> if the corresponding parameter - value is non-null, or <literal>'n'</> if the corresponding parameter + array should be <literal>' '</literal> if the corresponding parameter + value is non-null, or <literal>'n'</literal> if the corresponding parameter value is null. (In the latter case, the actual value in the corresponding <parameter>values</parameter> entry doesn't matter.) Note that <parameter>nulls</parameter> is not a text string, just an array: - it does not need a <literal>'\0'</> terminator. + it does not need a <literal>'\0'</literal> terminator. </para> </listitem> </varlistentry> @@ -1612,7 +1612,7 @@ int SPI_execp(SPIPlanPtr <parameter>plan</parameter>, Datum * <parameter>values< <listitem> <para> maximum number of rows to return, - or <literal>0</> for no limit + or <literal>0</literal> for no limit </para> </listitem> </varlistentry> @@ -1729,12 +1729,12 @@ Portal SPI_cursor_open(const char * <parameter>name</parameter>, SPIPlanPtr <par If <parameter>nulls</parameter> is <symbol>NULL</symbol> then <function>SPI_cursor_open</function> assumes that no parameters are null. Otherwise, each entry of the <parameter>nulls</parameter> - array should be <literal>' '</> if the corresponding parameter - value is non-null, or <literal>'n'</> if the corresponding parameter + array should be <literal>' '</literal> if the corresponding parameter + value is non-null, or <literal>'n'</literal> if the corresponding parameter value is null. (In the latter case, the actual value in the corresponding <parameter>values</parameter> entry doesn't matter.) Note that <parameter>nulls</parameter> is not a text string, just an array: - it does not need a <literal>'\0'</> terminator. + it does not need a <literal>'\0'</literal> terminator. </para> </listitem> </varlistentry> @@ -1742,7 +1742,7 @@ Portal SPI_cursor_open(const char * <parameter>name</parameter>, SPIPlanPtr <par <varlistentry> <term><literal>bool <parameter>read_only</parameter></literal></term> <listitem> - <para><literal>true</> for read-only execution</para> + <para><literal>true</literal> for read-only execution</para> </listitem> </varlistentry> </variablelist> @@ -1753,7 +1753,7 @@ Portal SPI_cursor_open(const char * <parameter>name</parameter>, SPIPlanPtr <par <para> Pointer to portal containing the cursor. Note there is no error - return convention; any error will be reported via <function>elog</>. + return convention; any error will be reported via <function>elog</function>. </para> </refsect1> </refentry> @@ -1836,7 +1836,7 @@ Portal SPI_cursor_open_with_args(const char *<parameter>name</parameter>, <term><literal>int <parameter>nargs</parameter></literal></term> <listitem> <para> - number of input parameters (<literal>$1</>, <literal>$2</>, etc.) + number of input parameters (<literal>$1</literal>, <literal>$2</literal>, etc.) </para> </listitem> </varlistentry> @@ -1873,12 +1873,12 @@ Portal SPI_cursor_open_with_args(const char *<parameter>name</parameter>, If <parameter>nulls</parameter> is <symbol>NULL</symbol> then <function>SPI_cursor_open_with_args</function> assumes that no parameters are null. Otherwise, each entry of the <parameter>nulls</parameter> - array should be <literal>' '</> if the corresponding parameter - value is non-null, or <literal>'n'</> if the corresponding parameter + array should be <literal>' '</literal> if the corresponding parameter + value is non-null, or <literal>'n'</literal> if the corresponding parameter value is null. (In the latter case, the actual value in the corresponding <parameter>values</parameter> entry doesn't matter.) Note that <parameter>nulls</parameter> is not a text string, just an array: - it does not need a <literal>'\0'</> terminator. + it does not need a <literal>'\0'</literal> terminator. </para> </listitem> </varlistentry> @@ -1886,7 +1886,7 @@ Portal SPI_cursor_open_with_args(const char *<parameter>name</parameter>, <varlistentry> <term><literal>bool <parameter>read_only</parameter></literal></term> <listitem> - <para><literal>true</> for read-only execution</para> + <para><literal>true</literal> for read-only execution</para> </listitem> </varlistentry> @@ -1906,7 +1906,7 @@ Portal SPI_cursor_open_with_args(const char *<parameter>name</parameter>, <para> Pointer to portal containing the cursor. Note there is no error - return convention; any error will be reported via <function>elog</>. + return convention; any error will be reported via <function>elog</function>. </para> </refsect1> </refentry> @@ -1944,10 +1944,10 @@ Portal SPI_cursor_open_with_paramlist(const char *<parameter>name</parameter>, <function>SPI_prepare</function>. This function is equivalent to <function>SPI_cursor_open</function> except that information about the parameter values to be passed to the - query is presented differently. The <literal>ParamListInfo</> + query is presented differently. The <literal>ParamListInfo</literal> representation can be convenient for passing down values that are already available in that format. It also supports use of dynamic - parameter sets via hook functions specified in <literal>ParamListInfo</>. + parameter sets via hook functions specified in <literal>ParamListInfo</literal>. </para> <para> @@ -1991,7 +1991,7 @@ Portal SPI_cursor_open_with_paramlist(const char *<parameter>name</parameter>, <varlistentry> <term><literal>bool <parameter>read_only</parameter></literal></term> <listitem> - <para><literal>true</> for read-only execution</para> + <para><literal>true</literal> for read-only execution</para> </listitem> </varlistentry> </variablelist> @@ -2002,7 +2002,7 @@ Portal SPI_cursor_open_with_paramlist(const char *<parameter>name</parameter>, <para> Pointer to portal containing the cursor. Note there is no error - return convention; any error will be reported via <function>elog</>. + return convention; any error will be reported via <function>elog</function>. </para> </refsect1> </refentry> @@ -2090,7 +2090,7 @@ void SPI_cursor_fetch(Portal <parameter>portal</parameter>, bool <parameter>forw <para> <function>SPI_cursor_fetch</function> fetches some rows from a cursor. This is equivalent to a subset of the SQL command - <command>FETCH</> (see <function>SPI_scroll_cursor_fetch</function> + <command>FETCH</command> (see <function>SPI_scroll_cursor_fetch</function> for more functionality). </para> </refsect1> @@ -2175,7 +2175,7 @@ void SPI_cursor_move(Portal <parameter>portal</parameter>, bool <parameter>forwa <para> <function>SPI_cursor_move</function> skips over some number of rows in a cursor. This is equivalent to a subset of the SQL command - <command>MOVE</> (see <function>SPI_scroll_cursor_move</function> + <command>MOVE</command> (see <function>SPI_scroll_cursor_move</function> for more functionality). </para> </refsect1> @@ -2250,7 +2250,7 @@ void SPI_scroll_cursor_fetch(Portal <parameter>portal</parameter>, FetchDirectio <para> <function>SPI_scroll_cursor_fetch</function> fetches some rows from a - cursor. This is equivalent to the SQL command <command>FETCH</>. + cursor. This is equivalent to the SQL command <command>FETCH</command>. </para> </refsect1> @@ -2350,7 +2350,7 @@ void SPI_scroll_cursor_move(Portal <parameter>portal</parameter>, FetchDirection <para> <function>SPI_scroll_cursor_move</function> skips over some number of rows in a cursor. This is equivalent to the SQL command - <command>MOVE</>. + <command>MOVE</command>. </para> </refsect1> @@ -2400,7 +2400,7 @@ void SPI_scroll_cursor_move(Portal <parameter>portal</parameter>, FetchDirection <para> <varname>SPI_processed</varname> is set as in <function>SPI_execute</function> if successful. - <varname>SPI_tuptable</varname> is set to <symbol>NULL</>, since + <varname>SPI_tuptable</varname> is set to <symbol>NULL</symbol>, since no rows are returned by this function. </para> </refsect1> @@ -2628,7 +2628,7 @@ SPIPlanPtr SPI_saveplan(SPIPlanPtr <parameter>plan</parameter>) <para> The originally passed-in statement is not freed, so you might wish to do <function>SPI_freeplan</function> on it to avoid leaking memory - until <function>SPI_finish</>. + until <function>SPI_finish</function>. </para> <para> @@ -2975,7 +2975,7 @@ int SPI_register_trigger_data(TriggerData *<parameter>tdata</parameter>) <para> The functions described here provide an interface for extracting - information from result sets returned by <function>SPI_execute</> and + information from result sets returned by <function>SPI_execute</function> and other SPI functions. </para> @@ -3082,7 +3082,7 @@ int SPI_fnumber(TupleDesc <parameter>rowdesc</parameter>, const char * <paramete <para> If <parameter>colname</parameter> refers to a system column (e.g., - <literal>oid</>) then the appropriate negative column number will + <literal>oid</literal>) then the appropriate negative column number will be returned. The caller should be careful to test the return value for exact equality to <symbol>SPI_ERROR_NOATTRIBUTE</symbol> to detect an error; testing the result for less than or equal to 0 is @@ -3617,7 +3617,7 @@ const char * SPI_result_code_string(int <parameter>code</parameter>); to keep track of individual objects to avoid memory leaks; instead only a relatively small number of contexts have to be managed. <function>palloc</function> and related functions allocate memory - from the <quote>current</> context. + from the <quote>current</quote> context. </para> <para> @@ -3943,7 +3943,7 @@ HeapTupleHeader SPI_returntuple(HeapTuple <parameter>row</parameter>, TupleDesc <para> Note that this should be used for functions that are declared to return composite types. It is not used for triggers; use - <function>SPI_copytuple</> for returning a modified row in a trigger. + <function>SPI_copytuple</function> for returning a modified row in a trigger. </para> </refsect1> @@ -4087,12 +4087,12 @@ HeapTuple SPI_modifytuple(Relation <parameter>rel</parameter>, HeapTuple <parame If <parameter>nulls</parameter> is <symbol>NULL</symbol> then <function>SPI_modifytuple</function> assumes that no new values are null. Otherwise, each entry of the <parameter>nulls</parameter> - array should be <literal>' '</> if the corresponding new value is - non-null, or <literal>'n'</> if the corresponding new value is + array should be <literal>' '</literal> if the corresponding new value is + non-null, or <literal>'n'</literal> if the corresponding new value is null. (In the latter case, the actual value in the corresponding <parameter>values</parameter> entry doesn't matter.) Note that <parameter>nulls</parameter> is not a text string, just an array: it - does not need a <literal>'\0'</> terminator. + does not need a <literal>'\0'</literal> terminator. </para> </listitem> </varlistentry> @@ -4115,10 +4115,10 @@ HeapTuple SPI_modifytuple(Relation <parameter>rel</parameter>, HeapTuple <parame <term><symbol>SPI_ERROR_ARGUMENT</symbol></term> <listitem> <para> - if <parameter>rel</> is <symbol>NULL</>, or if - <parameter>row</> is <symbol>NULL</>, or if <parameter>ncols</> - is less than or equal to 0, or if <parameter>colnum</> is - <symbol>NULL</>, or if <parameter>values</> is <symbol>NULL</>. + if <parameter>rel</parameter> is <symbol>NULL</symbol>, or if + <parameter>row</parameter> is <symbol>NULL</symbol>, or if <parameter>ncols</parameter> + is less than or equal to 0, or if <parameter>colnum</parameter> is + <symbol>NULL</symbol>, or if <parameter>values</parameter> is <symbol>NULL</symbol>. </para> </listitem> </varlistentry> @@ -4127,9 +4127,9 @@ HeapTuple SPI_modifytuple(Relation <parameter>rel</parameter>, HeapTuple <parame <term><symbol>SPI_ERROR_NOATTRIBUTE</symbol></term> <listitem> <para> - if <parameter>colnum</> contains an invalid column number (less + if <parameter>colnum</parameter> contains an invalid column number (less than or equal to 0 or greater than the number of columns in - <parameter>row</>) + <parameter>row</parameter>) </para> </listitem> </varlistentry> @@ -4211,7 +4211,7 @@ void SPI_freetuple(HeapTuple <parameter>row</parameter>) <refnamediv> <refname>SPI_freetuptable</refname> - <refpurpose>free a row set created by <function>SPI_execute</> or a similar + <refpurpose>free a row set created by <function>SPI_execute</function> or a similar function</refpurpose> </refnamediv> @@ -4227,7 +4227,7 @@ void SPI_freetuptable(SPITupleTable * <parameter>tuptable</parameter>) <para> <function>SPI_freetuptable</function> frees a row set created by a prior SPI command execution function, such as - <function>SPI_execute</>. Therefore, this function is often called + <function>SPI_execute</function>. Therefore, this function is often called with the global variable <varname>SPI_tuptable</varname> as argument. </para> @@ -4236,14 +4236,14 @@ void SPI_freetuptable(SPITupleTable * <parameter>tuptable</parameter>) This function is useful if a SPI procedure needs to execute multiple commands and does not want to keep the results of earlier commands around until it ends. Note that any unfreed row sets will - be freed anyway at <function>SPI_finish</>. + be freed anyway at <function>SPI_finish</function>. Also, if a subtransaction is started and then aborted within execution of a SPI procedure, SPI automatically frees any row sets created while the subtransaction was running. </para> <para> - Beginning in <productname>PostgreSQL</> 9.3, + Beginning in <productname>PostgreSQL</productname> 9.3, <function>SPI_freetuptable</function> contains guard logic to protect against duplicate deletion requests for the same row set. In previous releases, duplicate deletions would lead to crashes. @@ -4370,8 +4370,8 @@ INSERT INTO a SELECT * FROM a; <para> All standard procedural languages set the SPI read-write mode depending on the volatility attribute of the function. Commands of - <literal>STABLE</> and <literal>IMMUTABLE</> functions are done in - read-only mode, while commands of <literal>VOLATILE</> functions are + <literal>STABLE</literal> and <literal>IMMUTABLE</literal> functions are done in + read-only mode, while commands of <literal>VOLATILE</literal> functions are done in read-write mode. While authors of C functions are able to violate this convention, it's unlikely to be a good idea to do so. </para> diff --git a/doc/src/sgml/sslinfo.sgml b/doc/src/sgml/sslinfo.sgml index 1fd323a0b64..308e3e03a48 100644 --- a/doc/src/sgml/sslinfo.sgml +++ b/doc/src/sgml/sslinfo.sgml @@ -8,15 +8,15 @@ </indexterm> <para> - The <filename>sslinfo</> module provides information about the SSL + The <filename>sslinfo</filename> module provides information about the SSL certificate that the current client provided when connecting to - <productname>PostgreSQL</>. The module is useless (most functions + <productname>PostgreSQL</productname>. The module is useless (most functions will return NULL) if the current connection does not use SSL. </para> <para> This extension won't build at all unless the installation was - configured with <literal>--with-openssl</>. + configured with <literal>--with-openssl</literal>. </para> <sect2> @@ -126,7 +126,7 @@ </para> <para> - The result looks like <literal>/CN=Somebody /C=Some country/O=Some organization</>. + The result looks like <literal>/CN=Somebody /C=Some country/O=Some organization</literal>. </para> </listitem> </varlistentry> @@ -142,7 +142,7 @@ <para> Returns the full issuer name of the current client certificate, converting character data into the current database encoding. Encoding conversions - are handled the same as for <function>ssl_client_dn</>. + are handled the same as for <function>ssl_client_dn</function>. </para> <para> The combination of the return value of this function with the @@ -195,7 +195,7 @@ role emailAddress </literallayout> <para> - All of these fields are optional, except <structfield>commonName</>. + All of these fields are optional, except <structfield>commonName</structfield>. It depends entirely on your CA's policy which of them would be included and which wouldn't. The meaning of these fields, however, is strictly defined by @@ -214,7 +214,7 @@ emailAddress </term> <listitem> <para> - Same as <function>ssl_client_dn_field</>, but for the certificate issuer + Same as <function>ssl_client_dn_field</function>, but for the certificate issuer rather than the certificate subject. </para> </listitem> diff --git a/doc/src/sgml/start.sgml b/doc/src/sgml/start.sgml index 1ce1a24e100..7a61b50579e 100644 --- a/doc/src/sgml/start.sgml +++ b/doc/src/sgml/start.sgml @@ -162,7 +162,7 @@ <screen> createdb: command not found </screen> - then <productname>PostgreSQL</> was not installed properly. Either it was not + then <productname>PostgreSQL</productname> was not installed properly. Either it was not installed at all or your shell's search path was not set to include it. Try calling the command with an absolute path instead: <screen> @@ -191,17 +191,17 @@ createdb: could not connect to database postgres: could not connect to server: N createdb: could not connect to database postgres: FATAL: role "joe" does not exist </screen> where your own login name is mentioned. This will happen if the - administrator has not created a <productname>PostgreSQL</> user account - for you. (<productname>PostgreSQL</> user accounts are distinct from + administrator has not created a <productname>PostgreSQL</productname> user account + for you. (<productname>PostgreSQL</productname> user accounts are distinct from operating system user accounts.) If you are the administrator, see <xref linkend="user-manag"> for help creating accounts. You will need to - become the operating system user under which <productname>PostgreSQL</> - was installed (usually <literal>postgres</>) to create the first user + become the operating system user under which <productname>PostgreSQL</productname> + was installed (usually <literal>postgres</literal>) to create the first user account. It could also be that you were assigned a - <productname>PostgreSQL</> user name that is different from your - operating system user name; in that case you need to use the <option>-U</> - switch or set the <envar>PGUSER</> environment variable to specify your - <productname>PostgreSQL</> user name. + <productname>PostgreSQL</productname> user name that is different from your + operating system user name; in that case you need to use the <option>-U</option> + switch or set the <envar>PGUSER</envar> environment variable to specify your + <productname>PostgreSQL</productname> user name. </para> <para> @@ -288,7 +288,7 @@ createdb: database creation failed: ERROR: permission denied to create database <listitem> <para> Running the <productname>PostgreSQL</productname> interactive - terminal program, called <application><firstterm>psql</></application>, which allows you + terminal program, called <application><firstterm>psql</firstterm></application>, which allows you to interactively enter, edit, and execute <acronym>SQL</acronym> commands. </para> @@ -298,7 +298,7 @@ createdb: database creation failed: ERROR: permission denied to create database <para> Using an existing graphical frontend tool like <application>pgAdmin</application> or an office suite with - <acronym>ODBC</> or <acronym>JDBC</> support to create and manipulate a + <acronym>ODBC</acronym> or <acronym>JDBC</acronym> support to create and manipulate a database. These possibilities are not covered in this tutorial. </para> diff --git a/doc/src/sgml/storage.sgml b/doc/src/sgml/storage.sgml index aed2cf8bcab..0f9bddf7ab8 100644 --- a/doc/src/sgml/storage.sgml +++ b/doc/src/sgml/storage.sgml @@ -21,23 +21,23 @@ directories. <para> Traditionally, the configuration and data files used by a database cluster are stored together within the cluster's data -directory, commonly referred to as <varname>PGDATA</> (after the name of the +directory, commonly referred to as <varname>PGDATA</varname> (after the name of the environment variable that can be used to define it). A common location for -<varname>PGDATA</> is <filename>/var/lib/pgsql/data</>. Multiple clusters, +<varname>PGDATA</varname> is <filename>/var/lib/pgsql/data</filename>. Multiple clusters, managed by different server instances, can exist on the same machine. </para> <para> -The <varname>PGDATA</> directory contains several subdirectories and control +The <varname>PGDATA</varname> directory contains several subdirectories and control files, as shown in <xref linkend="pgdata-contents-table">. In addition to these required items, the cluster configuration files <filename>postgresql.conf</filename>, <filename>pg_hba.conf</filename>, and <filename>pg_ident.conf</filename> are traditionally stored in -<varname>PGDATA</>, although it is possible to place them elsewhere. +<varname>PGDATA</varname>, although it is possible to place them elsewhere. </para> <table tocentry="1" id="pgdata-contents-table"> -<title>Contents of <varname>PGDATA</></title> +<title>Contents of <varname>PGDATA</varname></title> <tgroup cols="2"> <thead> <row> @@ -51,126 +51,126 @@ Item <tbody> <row> - <entry><filename>PG_VERSION</></entry> + <entry><filename>PG_VERSION</filename></entry> <entry>A file containing the major version number of <productname>PostgreSQL</productname></entry> </row> <row> - <entry><filename>base</></entry> + <entry><filename>base</filename></entry> <entry>Subdirectory containing per-database subdirectories</entry> </row> <row> - <entry><filename>current_logfiles</></entry> + <entry><filename>current_logfiles</filename></entry> <entry>File recording the log file(s) currently written to by the logging collector</entry> </row> <row> - <entry><filename>global</></entry> + <entry><filename>global</filename></entry> <entry>Subdirectory containing cluster-wide tables, such as - <structname>pg_database</></entry> + <structname>pg_database</structname></entry> </row> <row> - <entry><filename>pg_commit_ts</></entry> + <entry><filename>pg_commit_ts</filename></entry> <entry>Subdirectory containing transaction commit timestamp data</entry> </row> <row> - <entry><filename>pg_dynshmem</></entry> + <entry><filename>pg_dynshmem</filename></entry> <entry>Subdirectory containing files used by the dynamic shared memory subsystem</entry> </row> <row> - <entry><filename>pg_logical</></entry> + <entry><filename>pg_logical</filename></entry> <entry>Subdirectory containing status data for logical decoding</entry> </row> <row> - <entry><filename>pg_multixact</></entry> + <entry><filename>pg_multixact</filename></entry> <entry>Subdirectory containing multitransaction status data (used for shared row locks)</entry> </row> <row> - <entry><filename>pg_notify</></entry> + <entry><filename>pg_notify</filename></entry> <entry>Subdirectory containing LISTEN/NOTIFY status data</entry> </row> <row> - <entry><filename>pg_replslot</></entry> + <entry><filename>pg_replslot</filename></entry> <entry>Subdirectory containing replication slot data</entry> </row> <row> - <entry><filename>pg_serial</></entry> + <entry><filename>pg_serial</filename></entry> <entry>Subdirectory containing information about committed serializable transactions</entry> </row> <row> - <entry><filename>pg_snapshots</></entry> + <entry><filename>pg_snapshots</filename></entry> <entry>Subdirectory containing exported snapshots</entry> </row> <row> - <entry><filename>pg_stat</></entry> + <entry><filename>pg_stat</filename></entry> <entry>Subdirectory containing permanent files for the statistics subsystem</entry> </row> <row> - <entry><filename>pg_stat_tmp</></entry> + <entry><filename>pg_stat_tmp</filename></entry> <entry>Subdirectory containing temporary files for the statistics subsystem</entry> </row> <row> - <entry><filename>pg_subtrans</></entry> + <entry><filename>pg_subtrans</filename></entry> <entry>Subdirectory containing subtransaction status data</entry> </row> <row> - <entry><filename>pg_tblspc</></entry> + <entry><filename>pg_tblspc</filename></entry> <entry>Subdirectory containing symbolic links to tablespaces</entry> </row> <row> - <entry><filename>pg_twophase</></entry> + <entry><filename>pg_twophase</filename></entry> <entry>Subdirectory containing state files for prepared transactions</entry> </row> <row> - <entry><filename>pg_wal</></entry> + <entry><filename>pg_wal</filename></entry> <entry>Subdirectory containing WAL (Write Ahead Log) files</entry> </row> <row> - <entry><filename>pg_xact</></entry> + <entry><filename>pg_xact</filename></entry> <entry>Subdirectory containing transaction commit status data</entry> </row> <row> - <entry><filename>postgresql.auto.conf</></entry> + <entry><filename>postgresql.auto.conf</filename></entry> <entry>A file used for storing configuration parameters that are set by <command>ALTER SYSTEM</command></entry> </row> <row> - <entry><filename>postmaster.opts</></entry> + <entry><filename>postmaster.opts</filename></entry> <entry>A file recording the command-line options the server was last started with</entry> </row> <row> - <entry><filename>postmaster.pid</></entry> + <entry><filename>postmaster.pid</filename></entry> <entry>A lock file recording the current postmaster process ID (PID), cluster data directory path, postmaster start timestamp, port number, Unix-domain socket directory path (empty on Windows), - first valid listen_address (IP address or <literal>*</>, or empty if + first valid listen_address (IP address or <literal>*</literal>, or empty if not listening on TCP), and shared memory segment ID (this file is not present after server shutdown)</entry> @@ -182,25 +182,25 @@ last started with</entry> <para> For each database in the cluster there is a subdirectory within -<varname>PGDATA</><filename>/base</>, named after the database's OID in -<structname>pg_database</>. This subdirectory is the default location +<varname>PGDATA</varname><filename>/base</filename>, named after the database's OID in +<structname>pg_database</structname>. This subdirectory is the default location for the database's files; in particular, its system catalogs are stored there. </para> <para> Each table and index is stored in a separate file. For ordinary relations, -these files are named after the table or index's <firstterm>filenode</> number, -which can be found in <structname>pg_class</>.<structfield>relfilenode</>. But +these files are named after the table or index's <firstterm>filenode</firstterm> number, +which can be found in <structname>pg_class</structname>.<structfield>relfilenode</structfield>. But for temporary relations, the file name is of the form -<literal>t<replaceable>BBB</>_<replaceable>FFF</></>, where <replaceable>BBB</> -is the backend ID of the backend which created the file, and <replaceable>FFF</> +<literal>t<replaceable>BBB</replaceable>_<replaceable>FFF</replaceable></literal>, where <replaceable>BBB</replaceable> +is the backend ID of the backend which created the file, and <replaceable>FFF</replaceable> is the filenode number. In either case, in addition to the main file (a/k/a -main fork), each table and index has a <firstterm>free space map</> (see <xref +main fork), each table and index has a <firstterm>free space map</firstterm> (see <xref linkend="storage-fsm">), which stores information about free space available in the relation. The free space map is stored in a file named with the filenode -number plus the suffix <literal>_fsm</>. Tables also have a -<firstterm>visibility map</>, stored in a fork with the suffix <literal>_vm</>, +number plus the suffix <literal>_fsm</literal>. Tables also have a +<firstterm>visibility map</firstterm>, stored in a fork with the suffix <literal>_vm</literal>, to track which pages are known to have no dead tuples. The visibility map is described further in <xref linkend="storage-vm">. Unlogged tables and indexes have a third fork, known as the initialization fork, which is stored in a fork @@ -210,36 +210,36 @@ with the suffix <literal>_init</literal> (see <xref linkend="storage-init">). <caution> <para> Note that while a table's filenode often matches its OID, this is -<emphasis>not</> necessarily the case; some operations, like -<command>TRUNCATE</>, <command>REINDEX</>, <command>CLUSTER</> and some forms -of <command>ALTER TABLE</>, can change the filenode while preserving the OID. +<emphasis>not</emphasis> necessarily the case; some operations, like +<command>TRUNCATE</command>, <command>REINDEX</command>, <command>CLUSTER</command> and some forms +of <command>ALTER TABLE</command>, can change the filenode while preserving the OID. Avoid assuming that filenode and table OID are the same. -Also, for certain system catalogs including <structname>pg_class</> itself, -<structname>pg_class</>.<structfield>relfilenode</> contains zero. The +Also, for certain system catalogs including <structname>pg_class</structname> itself, +<structname>pg_class</structname>.<structfield>relfilenode</structfield> contains zero. The actual filenode number of these catalogs is stored in a lower-level data -structure, and can be obtained using the <function>pg_relation_filenode()</> +structure, and can be obtained using the <function>pg_relation_filenode()</function> function. </para> </caution> <para> When a table or index exceeds 1 GB, it is divided into gigabyte-sized -<firstterm>segments</>. The first segment's file name is the same as the +<firstterm>segments</firstterm>. The first segment's file name is the same as the filenode; subsequent segments are named filenode.1, filenode.2, etc. This arrangement avoids problems on platforms that have file size limitations. (Actually, 1 GB is just the default segment size. The segment size can be adjusted using the configuration option <option>--with-segsize</option> -when building <productname>PostgreSQL</>.) +when building <productname>PostgreSQL</productname>.) In principle, free space map and visibility map forks could require multiple segments as well, though this is unlikely to happen in practice. </para> <para> A table that has columns with potentially large entries will have an -associated <firstterm>TOAST</> table, which is used for out-of-line storage of +associated <firstterm>TOAST</firstterm> table, which is used for out-of-line storage of field values that are too large to keep in the table rows proper. -<structname>pg_class</>.<structfield>reltoastrelid</> links from a table to -its <acronym>TOAST</> table, if any. +<structname>pg_class</structname>.<structfield>reltoastrelid</structfield> links from a table to +its <acronym>TOAST</acronym> table, if any. See <xref linkend="storage-toast"> for more information. </para> @@ -250,45 +250,45 @@ The contents of tables and indexes are discussed further in <para> Tablespaces make the scenario more complicated. Each user-defined tablespace -has a symbolic link inside the <varname>PGDATA</><filename>/pg_tblspc</> +has a symbolic link inside the <varname>PGDATA</varname><filename>/pg_tblspc</filename> directory, which points to the physical tablespace directory (i.e., the -location specified in the tablespace's <command>CREATE TABLESPACE</> command). +location specified in the tablespace's <command>CREATE TABLESPACE</command> command). This symbolic link is named after the tablespace's OID. Inside the physical tablespace directory there is -a subdirectory with a name that depends on the <productname>PostgreSQL</> -server version, such as <literal>PG_9.0_201008051</>. (The reason for using +a subdirectory with a name that depends on the <productname>PostgreSQL</productname> +server version, such as <literal>PG_9.0_201008051</literal>. (The reason for using this subdirectory is so that successive versions of the database can use -the same <command>CREATE TABLESPACE</> location value without conflicts.) +the same <command>CREATE TABLESPACE</command> location value without conflicts.) Within the version-specific subdirectory, there is a subdirectory for each database that has elements in the tablespace, named after the database's OID. Tables and indexes are stored within that directory, using the filenode naming scheme. -The <literal>pg_default</> tablespace is not accessed through -<filename>pg_tblspc</>, but corresponds to -<varname>PGDATA</><filename>/base</>. Similarly, the <literal>pg_global</> -tablespace is not accessed through <filename>pg_tblspc</>, but corresponds to -<varname>PGDATA</><filename>/global</>. +The <literal>pg_default</literal> tablespace is not accessed through +<filename>pg_tblspc</filename>, but corresponds to +<varname>PGDATA</varname><filename>/base</filename>. Similarly, the <literal>pg_global</literal> +tablespace is not accessed through <filename>pg_tblspc</filename>, but corresponds to +<varname>PGDATA</varname><filename>/global</filename>. </para> <para> -The <function>pg_relation_filepath()</> function shows the entire path -(relative to <varname>PGDATA</>) of any relation. It is often useful +The <function>pg_relation_filepath()</function> function shows the entire path +(relative to <varname>PGDATA</varname>) of any relation. It is often useful as a substitute for remembering many of the above rules. But keep in mind that this function just gives the name of the first segment of the main fork of the relation — you may need to append a segment number -and/or <literal>_fsm</>, <literal>_vm</>, or <literal>_init</> to find all +and/or <literal>_fsm</literal>, <literal>_vm</literal>, or <literal>_init</literal> to find all the files associated with the relation. </para> <para> Temporary files (for operations such as sorting more data than can fit in -memory) are created within <varname>PGDATA</><filename>/base/pgsql_tmp</>, -or within a <filename>pgsql_tmp</> subdirectory of a tablespace directory -if a tablespace other than <literal>pg_default</> is specified for them. +memory) are created within <varname>PGDATA</varname><filename>/base/pgsql_tmp</filename>, +or within a <filename>pgsql_tmp</filename> subdirectory of a tablespace directory +if a tablespace other than <literal>pg_default</literal> is specified for them. The name of a temporary file has the form -<filename>pgsql_tmp<replaceable>PPP</>.<replaceable>NNN</></filename>, -where <replaceable>PPP</> is the PID of the owning backend and -<replaceable>NNN</> distinguishes different temporary files of that backend. +<filename>pgsql_tmp<replaceable>PPP</replaceable>.<replaceable>NNN</replaceable></filename>, +where <replaceable>PPP</replaceable> is the PID of the owning backend and +<replaceable>NNN</replaceable> distinguishes different temporary files of that backend. </para> </sect1> @@ -300,10 +300,10 @@ where <replaceable>PPP</> is the PID of the owning backend and <indexterm> <primary>TOAST</primary> </indexterm> - <indexterm><primary>sliced bread</><see>TOAST</></indexterm> + <indexterm><primary>sliced bread</primary><see>TOAST</see></indexterm> <para> -This section provides an overview of <acronym>TOAST</> (The +This section provides an overview of <acronym>TOAST</acronym> (The Oversized-Attribute Storage Technique). </para> @@ -314,36 +314,36 @@ not possible to store very large field values directly. To overcome this limitation, large field values are compressed and/or broken up into multiple physical rows. This happens transparently to the user, with only small impact on most of the backend code. The technique is affectionately -known as <acronym>TOAST</> (or <quote>the best thing since sliced bread</>). -The <acronym>TOAST</> infrastructure is also used to improve handling of +known as <acronym>TOAST</acronym> (or <quote>the best thing since sliced bread</quote>). +The <acronym>TOAST</acronym> infrastructure is also used to improve handling of large data values in-memory. </para> <para> -Only certain data types support <acronym>TOAST</> — there is no need to +Only certain data types support <acronym>TOAST</acronym> — there is no need to impose the overhead on data types that cannot produce large field values. -To support <acronym>TOAST</>, a data type must have a variable-length -(<firstterm>varlena</>) representation, in which, ordinarily, the first +To support <acronym>TOAST</acronym>, a data type must have a variable-length +(<firstterm>varlena</firstterm>) representation, in which, ordinarily, the first four-byte word of any stored value contains the total length of the value in -bytes (including itself). <acronym>TOAST</> does not constrain the rest +bytes (including itself). <acronym>TOAST</acronym> does not constrain the rest of the data type's representation. The special representations collectively -called <firstterm><acronym>TOAST</>ed values</firstterm> work by modifying or +called <firstterm><acronym>TOAST</acronym>ed values</firstterm> work by modifying or reinterpreting this initial length word. Therefore, the C-level functions -supporting a <acronym>TOAST</>-able data type must be careful about how they -handle potentially <acronym>TOAST</>ed input values: an input might not +supporting a <acronym>TOAST</acronym>-able data type must be careful about how they +handle potentially <acronym>TOAST</acronym>ed input values: an input might not actually consist of a four-byte length word and contents until after it's -been <firstterm>detoasted</>. (This is normally done by invoking -<function>PG_DETOAST_DATUM</> before doing anything with an input value, +been <firstterm>detoasted</firstterm>. (This is normally done by invoking +<function>PG_DETOAST_DATUM</function> before doing anything with an input value, but in some cases more efficient approaches are possible. See <xref linkend="xtypes-toast"> for more detail.) </para> <para> -<acronym>TOAST</> usurps two bits of the varlena length word (the high-order +<acronym>TOAST</acronym> usurps two bits of the varlena length word (the high-order bits on big-endian machines, the low-order bits on little-endian machines), -thereby limiting the logical size of any value of a <acronym>TOAST</>-able -data type to 1 GB (2<superscript>30</> - 1 bytes). When both bits are zero, -the value is an ordinary un-<acronym>TOAST</>ed value of the data type, and +thereby limiting the logical size of any value of a <acronym>TOAST</acronym>-able +data type to 1 GB (2<superscript>30</superscript> - 1 bytes). When both bits are zero, +the value is an ordinary un-<acronym>TOAST</acronym>ed value of the data type, and the remaining bits of the length word give the total datum size (including length word) in bytes. When the highest-order or lowest-order bit is set, the value has only a single-byte header instead of the normal four-byte @@ -357,7 +357,7 @@ additional space savings that is significant compared to short values. As a special case, if the remaining bits of a single-byte header are all zero (which would be impossible for a self-inclusive length), the value is a pointer to out-of-line data, with several possible alternatives as -described below. The type and size of such a <firstterm>TOAST pointer</> +described below. The type and size of such a <firstterm>TOAST pointer</firstterm> are determined by a code stored in the second byte of the datum. Lastly, when the highest-order or lowest-order bit is clear but the adjacent bit is set, the content of the datum has been compressed and must be @@ -365,19 +365,19 @@ decompressed before use. In this case the remaining bits of the four-byte length word give the total size of the compressed datum, not the original data. Note that compression is also possible for out-of-line data but the varlena header does not tell whether it has occurred — -the content of the <acronym>TOAST</> pointer tells that, instead. +the content of the <acronym>TOAST</acronym> pointer tells that, instead. </para> <para> -As mentioned, there are multiple types of <acronym>TOAST</> pointer datums. +As mentioned, there are multiple types of <acronym>TOAST</acronym> pointer datums. The oldest and most common type is a pointer to out-of-line data stored in -a <firstterm><acronym>TOAST</> table</firstterm> that is separate from, but -associated with, the table containing the <acronym>TOAST</> pointer datum -itself. These <firstterm>on-disk</> pointer datums are created by the -<acronym>TOAST</> management code (in <filename>access/heap/tuptoaster.c</>) +a <firstterm><acronym>TOAST</acronym> table</firstterm> that is separate from, but +associated with, the table containing the <acronym>TOAST</acronym> pointer datum +itself. These <firstterm>on-disk</firstterm> pointer datums are created by the +<acronym>TOAST</acronym> management code (in <filename>access/heap/tuptoaster.c</filename>) when a tuple to be stored on disk is too large to be stored as-is. Further details appear in <xref linkend="storage-toast-ondisk">. -Alternatively, a <acronym>TOAST</> pointer datum can contain a pointer to +Alternatively, a <acronym>TOAST</acronym> pointer datum can contain a pointer to out-of-line data that appears elsewhere in memory. Such datums are necessarily short-lived, and will never appear on-disk, but they are very useful for avoiding copying and redundant processing of large data values. @@ -388,57 +388,57 @@ Further details appear in <xref linkend="storage-toast-inmemory">. The compression technique used for either in-line or out-of-line compressed data is a fairly simple and very fast member of the LZ family of compression techniques. See -<filename>src/common/pg_lzcompress.c</> for the details. +<filename>src/common/pg_lzcompress.c</filename> for the details. </para> <sect2 id="storage-toast-ondisk"> <title>Out-of-line, on-disk TOAST storage</title> <para> -If any of the columns of a table are <acronym>TOAST</>-able, the table will -have an associated <acronym>TOAST</> table, whose OID is stored in the table's -<structname>pg_class</>.<structfield>reltoastrelid</> entry. On-disk -<acronym>TOAST</>ed values are kept in the <acronym>TOAST</> table, as +If any of the columns of a table are <acronym>TOAST</acronym>-able, the table will +have an associated <acronym>TOAST</acronym> table, whose OID is stored in the table's +<structname>pg_class</structname>.<structfield>reltoastrelid</structfield> entry. On-disk +<acronym>TOAST</acronym>ed values are kept in the <acronym>TOAST</acronym> table, as described in more detail below. </para> <para> Out-of-line values are divided (after compression if used) into chunks of at -most <symbol>TOAST_MAX_CHUNK_SIZE</> bytes (by default this value is chosen +most <symbol>TOAST_MAX_CHUNK_SIZE</symbol> bytes (by default this value is chosen so that four chunk rows will fit on a page, making it about 2000 bytes). -Each chunk is stored as a separate row in the <acronym>TOAST</> table +Each chunk is stored as a separate row in the <acronym>TOAST</acronym> table belonging to the owning table. Every -<acronym>TOAST</> table has the columns <structfield>chunk_id</> (an OID -identifying the particular <acronym>TOAST</>ed value), -<structfield>chunk_seq</> (a sequence number for the chunk within its value), -and <structfield>chunk_data</> (the actual data of the chunk). A unique index -on <structfield>chunk_id</> and <structfield>chunk_seq</> provides fast +<acronym>TOAST</acronym> table has the columns <structfield>chunk_id</structfield> (an OID +identifying the particular <acronym>TOAST</acronym>ed value), +<structfield>chunk_seq</structfield> (a sequence number for the chunk within its value), +and <structfield>chunk_data</structfield> (the actual data of the chunk). A unique index +on <structfield>chunk_id</structfield> and <structfield>chunk_seq</structfield> provides fast retrieval of the values. A pointer datum representing an out-of-line on-disk -<acronym>TOAST</>ed value therefore needs to store the OID of the -<acronym>TOAST</> table in which to look and the OID of the specific value -(its <structfield>chunk_id</>). For convenience, pointer datums also store the +<acronym>TOAST</acronym>ed value therefore needs to store the OID of the +<acronym>TOAST</acronym> table in which to look and the OID of the specific value +(its <structfield>chunk_id</structfield>). For convenience, pointer datums also store the logical datum size (original uncompressed data length) and physical stored size (different if compression was applied). Allowing for the varlena header bytes, -the total size of an on-disk <acronym>TOAST</> pointer datum is therefore 18 +the total size of an on-disk <acronym>TOAST</acronym> pointer datum is therefore 18 bytes regardless of the actual size of the represented value. </para> <para> -The <acronym>TOAST</> management code is triggered only +The <acronym>TOAST</acronym> management code is triggered only when a row value to be stored in a table is wider than -<symbol>TOAST_TUPLE_THRESHOLD</> bytes (normally 2 kB). -The <acronym>TOAST</> code will compress and/or move +<symbol>TOAST_TUPLE_THRESHOLD</symbol> bytes (normally 2 kB). +The <acronym>TOAST</acronym> code will compress and/or move field values out-of-line until the row value is shorter than -<symbol>TOAST_TUPLE_TARGET</> bytes (also normally 2 kB) +<symbol>TOAST_TUPLE_TARGET</symbol> bytes (also normally 2 kB) or no more gains can be had. During an UPDATE operation, values of unchanged fields are normally preserved as-is; so an -UPDATE of a row with out-of-line values incurs no <acronym>TOAST</> costs if +UPDATE of a row with out-of-line values incurs no <acronym>TOAST</acronym> costs if none of the out-of-line values change. </para> <para> -The <acronym>TOAST</> management code recognizes four different strategies -for storing <acronym>TOAST</>-able columns on disk: +The <acronym>TOAST</acronym> management code recognizes four different strategies +for storing <acronym>TOAST</acronym>-able columns on disk: <itemizedlist> <listitem> @@ -447,13 +447,13 @@ for storing <acronym>TOAST</>-able columns on disk: out-of-line storage; furthermore it disables use of single-byte headers for varlena types. This is the only possible strategy for - columns of non-<acronym>TOAST</>-able data types. + columns of non-<acronym>TOAST</acronym>-able data types. </para> </listitem> <listitem> <para> <literal>EXTENDED</literal> allows both compression and out-of-line - storage. This is the default for most <acronym>TOAST</>-able data types. + storage. This is the default for most <acronym>TOAST</acronym>-able data types. Compression will be attempted first, then out-of-line storage if the row is still too big. </para> @@ -478,9 +478,9 @@ for storing <acronym>TOAST</>-able columns on disk: </listitem> </itemizedlist> -Each <acronym>TOAST</>-able data type specifies a default strategy for columns +Each <acronym>TOAST</acronym>-able data type specifies a default strategy for columns of that data type, but the strategy for a given table column can be altered -with <link linkend="sql-altertable"><command>ALTER TABLE ... SET STORAGE</></link>. +with <link linkend="sql-altertable"><command>ALTER TABLE ... SET STORAGE</command></link>. </para> <para> @@ -488,15 +488,15 @@ This scheme has a number of advantages compared to a more straightforward approach such as allowing row values to span pages. Assuming that queries are usually qualified by comparisons against relatively small key values, most of the work of the executor will be done using the main row entry. The big values -of <acronym>TOAST</>ed attributes will only be pulled out (if selected at all) +of <acronym>TOAST</acronym>ed attributes will only be pulled out (if selected at all) at the time the result set is sent to the client. Thus, the main table is much smaller and more of its rows fit in the shared buffer cache than would be the case without any out-of-line storage. Sort sets shrink also, and sorts will more often be done entirely in memory. A little test showed that a table containing typical HTML pages and their URLs was stored in about half of the -raw data size including the <acronym>TOAST</> table, and that the main table +raw data size including the <acronym>TOAST</acronym> table, and that the main table contained only about 10% of the entire data (the URLs and some small HTML -pages). There was no run time difference compared to an un-<acronym>TOAST</>ed +pages). There was no run time difference compared to an un-<acronym>TOAST</acronym>ed comparison table, in which all the HTML pages were cut down to 7 kB to fit. </para> @@ -506,16 +506,16 @@ comparison table, in which all the HTML pages were cut down to 7 kB to fit. <title>Out-of-line, in-memory TOAST storage</title> <para> -<acronym>TOAST</> pointers can point to data that is not on disk, but is +<acronym>TOAST</acronym> pointers can point to data that is not on disk, but is elsewhere in the memory of the current server process. Such pointers obviously cannot be long-lived, but they are nonetheless useful. There are currently two sub-cases: -pointers to <firstterm>indirect</> data and -pointers to <firstterm>expanded</> data. +pointers to <firstterm>indirect</firstterm> data and +pointers to <firstterm>expanded</firstterm> data. </para> <para> -Indirect <acronym>TOAST</> pointers simply point at a non-indirect varlena +Indirect <acronym>TOAST</acronym> pointers simply point at a non-indirect varlena value stored somewhere in memory. This case was originally created merely as a proof of concept, but it is currently used during logical decoding to avoid possibly having to create physical tuples exceeding 1 GB (as pulling @@ -526,34 +526,34 @@ and there is no infrastructure to help with this. </para> <para> -Expanded <acronym>TOAST</> pointers are useful for complex data types +Expanded <acronym>TOAST</acronym> pointers are useful for complex data types whose on-disk representation is not especially suited for computational purposes. As an example, the standard varlena representation of a -<productname>PostgreSQL</> array includes dimensionality information, a +<productname>PostgreSQL</productname> array includes dimensionality information, a nulls bitmap if there are any null elements, then the values of all the elements in order. When the element type itself is variable-length, the -only way to find the <replaceable>N</>'th element is to scan through all the +only way to find the <replaceable>N</replaceable>'th element is to scan through all the preceding elements. This representation is appropriate for on-disk storage because of its compactness, but for computations with the array it's much -nicer to have an <quote>expanded</> or <quote>deconstructed</> +nicer to have an <quote>expanded</quote> or <quote>deconstructed</quote> representation in which all the element starting locations have been -identified. The <acronym>TOAST</> pointer mechanism supports this need by +identified. The <acronym>TOAST</acronym> pointer mechanism supports this need by allowing a pass-by-reference Datum to point to either a standard varlena -value (the on-disk representation) or a <acronym>TOAST</> pointer that +value (the on-disk representation) or a <acronym>TOAST</acronym> pointer that points to an expanded representation somewhere in memory. The details of this expanded representation are up to the data type, though it must have a standard header and meet the other API requirements given -in <filename>src/include/utils/expandeddatum.h</>. C-level functions +in <filename>src/include/utils/expandeddatum.h</filename>. C-level functions working with the data type can choose to handle either representation. Functions that do not know about the expanded representation, but simply -apply <function>PG_DETOAST_DATUM</> to their inputs, will automatically +apply <function>PG_DETOAST_DATUM</function> to their inputs, will automatically receive the traditional varlena representation; so support for an expanded representation can be introduced incrementally, one function at a time. </para> <para> -<acronym>TOAST</> pointers to expanded values are further broken down -into <firstterm>read-write</> and <firstterm>read-only</> pointers. +<acronym>TOAST</acronym> pointers to expanded values are further broken down +into <firstterm>read-write</firstterm> and <firstterm>read-only</firstterm> pointers. The pointed-to representation is the same either way, but a function that receives a read-write pointer is allowed to modify the referenced value in-place, whereas one that receives a read-only pointer must not; it must @@ -563,11 +563,11 @@ unnecessary copying of expanded values during query execution. </para> <para> -For all types of in-memory <acronym>TOAST</> pointer, the <acronym>TOAST</> +For all types of in-memory <acronym>TOAST</acronym> pointer, the <acronym>TOAST</acronym> management code ensures that no such pointer datum can accidentally get -stored on disk. In-memory <acronym>TOAST</> pointers are automatically +stored on disk. In-memory <acronym>TOAST</acronym> pointers are automatically expanded to normal in-line varlena values before storage — and then -possibly converted to on-disk <acronym>TOAST</> pointers, if the containing +possibly converted to on-disk <acronym>TOAST</acronym> pointers, if the containing tuple would otherwise be too big. </para> @@ -582,35 +582,35 @@ tuple would otherwise be too big. <indexterm> <primary>Free Space Map</primary> </indexterm> -<indexterm><primary>FSM</><see>Free Space Map</></indexterm> +<indexterm><primary>FSM</primary><see>Free Space Map</see></indexterm> <para> Each heap and index relation, except for hash indexes, has a Free Space Map (FSM) to keep track of available space in the relation. It's stored alongside the main relation data in a separate relation fork, named after the -filenode number of the relation, plus a <literal>_fsm</> suffix. For example, +filenode number of the relation, plus a <literal>_fsm</literal> suffix. For example, if the filenode of a relation is 12345, the FSM is stored in a file called -<filename>12345_fsm</>, in the same directory as the main relation file. +<filename>12345_fsm</filename>, in the same directory as the main relation file. </para> <para> -The Free Space Map is organized as a tree of <acronym>FSM</> pages. The -bottom level <acronym>FSM</> pages store the free space available on each +The Free Space Map is organized as a tree of <acronym>FSM</acronym> pages. The +bottom level <acronym>FSM</acronym> pages store the free space available on each heap (or index) page, using one byte to represent each such page. The upper levels aggregate information from the lower levels. </para> <para> -Within each <acronym>FSM</> page is a binary tree, stored in an array with +Within each <acronym>FSM</acronym> page is a binary tree, stored in an array with one byte per node. Each leaf node represents a heap page, or a lower level -<acronym>FSM</> page. In each non-leaf node, the higher of its children's +<acronym>FSM</acronym> page. In each non-leaf node, the higher of its children's values is stored. The maximum value in the leaf nodes is therefore stored at the root. </para> <para> -See <filename>src/backend/storage/freespace/README</> for more details on -how the <acronym>FSM</> is structured, and how it's updated and searched. +See <filename>src/backend/storage/freespace/README</filename> for more details on +how the <acronym>FSM</acronym> is structured, and how it's updated and searched. The <xref linkend="pgfreespacemap"> module can be used to examine the information stored in free space maps. </para> @@ -624,7 +624,7 @@ can be used to examine the information stored in free space maps. <indexterm> <primary>Visibility Map</primary> </indexterm> -<indexterm><primary>VM</><see>Visibility Map</></indexterm> +<indexterm><primary>VM</primary><see>Visibility Map</see></indexterm> <para> Each heap relation has a Visibility Map @@ -632,9 +632,9 @@ Each heap relation has a Visibility Map visible to all active transactions; it also keeps track of which pages contain only frozen tuples. It's stored alongside the main relation data in a separate relation fork, named after the -filenode number of the relation, plus a <literal>_vm</> suffix. For example, +filenode number of the relation, plus a <literal>_vm</literal> suffix. For example, if the filenode of a relation is 12345, the VM is stored in a file called -<filename>12345_vm</>, in the same directory as the main relation file. +<filename>12345_vm</filename>, in the same directory as the main relation file. Note that indexes do not have VMs. </para> @@ -644,7 +644,7 @@ indicates that the page is all-visible, or in other words that the page does not contain any tuples that need to be vacuumed. This information can also be used by <link linkend="indexes-index-only-scans"><firstterm>index-only -scans</></link> to answer queries using only the index tuple. +scans</firstterm></link> to answer queries using only the index tuple. The second bit, if set, means that all tuples on the page have been frozen. That means that even an anti-wraparound vacuum need not revisit the page. </para> @@ -695,7 +695,7 @@ This section provides an overview of the page format used within the item layout rules. </para> </footnote> -Sequences and <acronym>TOAST</> tables are formatted just like a regular table. +Sequences and <acronym>TOAST</acronym> tables are formatted just like a regular table. </para> <para> @@ -708,11 +708,11 @@ an item is a row; in an index, an item is an index entry. </para> <para> -Every table and index is stored as an array of <firstterm>pages</> of a +Every table and index is stored as an array of <firstterm>pages</firstterm> of a fixed size (usually 8 kB, although a different page size can be selected when compiling the server). In a table, all the pages are logically equivalent, so a particular item (row) can be stored in any page. In -indexes, the first page is generally reserved as a <firstterm>metapage</> +indexes, the first page is generally reserved as a <firstterm>metapage</firstterm> holding control information, and there can be different types of pages within the index, depending on the index access method. </para> @@ -773,7 +773,7 @@ data. Empty in ordinary tables.</entry> <para> The first 24 bytes of each page consists of a page header - (<structname>PageHeaderData</>). Its format is detailed in <xref + (<structname>PageHeaderData</structname>). Its format is detailed in <xref linkend="pageheaderdata-table">. The first field tracks the most recent WAL entry related to this page. The second field contains the page checksum if <xref linkend="app-initdb-data-checksums"> are @@ -880,7 +880,7 @@ data. Empty in ordinary tables.</entry> New item identifiers are allocated as needed from the beginning of the unallocated space. The number of item identifiers present can be determined by looking at - <structfield>pd_lower</>, which is increased to allocate a new identifier. + <structfield>pd_lower</structfield>, which is increased to allocate a new identifier. Because an item identifier is never moved until it is freed, its index can be used on a long-term basis to reference an item, even when the item itself is moved @@ -908,7 +908,7 @@ data. Empty in ordinary tables.</entry> b-tree indexes store links to the page's left and right siblings, as well as some other data relevant to the index structure. Ordinary tables do not use a special section at all (indicated by setting - <structfield>pd_special</> to equal the page size). + <structfield>pd_special</structfield> to equal the page size). </para> @@ -920,19 +920,19 @@ data. Empty in ordinary tables.</entry> detailed in <xref linkend="heaptupleheaderdata-table">. The actual user data (columns of the row) begins at the offset indicated by - <structfield>t_hoff</>, which must always be a multiple of the MAXALIGN + <structfield>t_hoff</structfield>, which must always be a multiple of the MAXALIGN distance for the platform. The null bitmap is only present if the <firstterm>HEAP_HASNULL</firstterm> bit is set in <structfield>t_infomask</structfield>. If it is present it begins just after the fixed header and occupies enough bytes to have one bit per data column - (that is, <structfield>t_natts</> bits altogether). In this list of bits, a + (that is, <structfield>t_natts</structfield> bits altogether). In this list of bits, a 1 bit indicates not-null, a 0 bit is a null. When the bitmap is not present, all columns are assumed not-null. The object ID is only present if the <firstterm>HEAP_HASOID</firstterm> bit is set in <structfield>t_infomask</structfield>. If present, it appears just - before the <structfield>t_hoff</> boundary. Any padding needed to make - <structfield>t_hoff</> a MAXALIGN multiple will appear between the null + before the <structfield>t_hoff</structfield> boundary. Any padding needed to make + <structfield>t_hoff</structfield> a MAXALIGN multiple will appear between the null bitmap and the object ID. (This in turn ensures that the object ID is suitably aligned.) @@ -1031,7 +1031,7 @@ data. Empty in ordinary tables.</entry> All variable-length data types share the common header structure <type>struct varlena</type>, which includes the total length of the stored value and some flag bits. Depending on the flags, the data can be either - inline or in a <acronym>TOAST</> table; + inline or in a <acronym>TOAST</acronym> table; it might be compressed, too (see <xref linkend="storage-toast">). </para> diff --git a/doc/src/sgml/syntax.sgml b/doc/src/sgml/syntax.sgml index 06f0f0b8e0c..e4012cc1820 100644 --- a/doc/src/sgml/syntax.sgml +++ b/doc/src/sgml/syntax.sgml @@ -119,7 +119,7 @@ INSERT INTO MY_TABLE VALUES (3, 'hi there'); (<literal>_</literal>). Subsequent characters in an identifier or key word can be letters, underscores, digits (<literal>0</literal>-<literal>9</literal>), or dollar signs - (<literal>$</>). Note that dollar signs are not allowed in identifiers + (<literal>$</literal>). Note that dollar signs are not allowed in identifiers according to the letter of the SQL standard, so their use might render applications less portable. The SQL standard will not define a key word that contains @@ -240,7 +240,7 @@ U&"d!0061t!+000061" UESCAPE '!' <para> The Unicode escape syntax works only when the server encoding is - <literal>UTF8</>. When other server encodings are used, only code + <literal>UTF8</literal>. When other server encodings are used, only code points in the ASCII range (up to <literal>\007F</literal>) can be specified. Both the 4-digit and the 6-digit form can be used to specify UTF-16 surrogate pairs to compose characters with code @@ -258,7 +258,7 @@ U&"d!0061t!+000061" UESCAPE '!' <productname>PostgreSQL</productname>, but <literal>"Foo"</literal> and <literal>"FOO"</literal> are different from these three and each other. (The folding of - unquoted names to lower case in <productname>PostgreSQL</> is + unquoted names to lower case in <productname>PostgreSQL</productname> is incompatible with the SQL standard, which says that unquoted names should be folded to upper case. Thus, <literal>foo</literal> should be equivalent to <literal>"FOO"</literal> not @@ -305,8 +305,8 @@ U&"d!0061t!+000061" UESCAPE '!' a single-quote character within a string constant, write two adjacent single quotes, e.g., <literal>'Dianne''s horse'</literal>. - Note that this is <emphasis>not</> the same as a double-quote - character (<literal>"</>). <!-- font-lock sanity: " --> + Note that this is <emphasis>not</emphasis> the same as a double-quote + character (<literal>"</literal>). <!-- font-lock sanity: " --> </para> <para> @@ -343,15 +343,15 @@ SELECT 'foo' 'bar'; </indexterm> <para> - <productname>PostgreSQL</productname> also accepts <quote>escape</> + <productname>PostgreSQL</productname> also accepts <quote>escape</quote> string constants, which are an extension to the SQL standard. An escape string constant is specified by writing the letter <literal>E</literal> (upper or lower case) just before the opening single - quote, e.g., <literal>E'foo'</>. (When continuing an escape string - constant across lines, write <literal>E</> only before the first opening + quote, e.g., <literal>E'foo'</literal>. (When continuing an escape string + constant across lines, write <literal>E</literal> only before the first opening quote.) - Within an escape string, a backslash character (<literal>\</>) begins a - C-like <firstterm>backslash escape</> sequence, in which the combination + Within an escape string, a backslash character (<literal>\</literal>) begins a + C-like <firstterm>backslash escape</firstterm> sequence, in which the combination of backslash and following character(s) represent a special byte value, as shown in <xref linkend="sql-backslash-table">. </para> @@ -361,7 +361,7 @@ SELECT 'foo' 'bar'; <tgroup cols="2"> <thead> <row> - <entry>Backslash Escape Sequence</> + <entry>Backslash Escape Sequence</entry> <entry>Interpretation</entry> </row> </thead> @@ -419,9 +419,9 @@ SELECT 'foo' 'bar'; <para> Any other character following a backslash is taken literally. Thus, to - include a backslash character, write two backslashes (<literal>\\</>). + include a backslash character, write two backslashes (<literal>\\</literal>). Also, a single quote can be included in an escape string by writing - <literal>\'</literal>, in addition to the normal way of <literal>''</>. + <literal>\'</literal>, in addition to the normal way of <literal>''</literal>. </para> <para> @@ -437,35 +437,35 @@ SELECT 'foo' 'bar'; <para> The Unicode escape syntax works fully only when the server - encoding is <literal>UTF8</>. When other server encodings are + encoding is <literal>UTF8</literal>. When other server encodings are used, only code points in the ASCII range (up - to <literal>\u007F</>) can be specified. Both the 4-digit and + to <literal>\u007F</literal>) can be specified. Both the 4-digit and the 8-digit form can be used to specify UTF-16 surrogate pairs to compose characters with code points larger than U+FFFF, although the availability of the 8-digit form technically makes this unnecessary. (When surrogate pairs are used when the server - encoding is <literal>UTF8</>, they are first combined into a + encoding is <literal>UTF8</literal>, they are first combined into a single code point that is then encoded in UTF-8.) </para> <caution> <para> If the configuration parameter - <xref linkend="guc-standard-conforming-strings"> is <literal>off</>, + <xref linkend="guc-standard-conforming-strings"> is <literal>off</literal>, then <productname>PostgreSQL</productname> recognizes backslash escapes in both regular and escape string constants. However, as of - <productname>PostgreSQL</> 9.1, the default is <literal>on</>, meaning + <productname>PostgreSQL</productname> 9.1, the default is <literal>on</literal>, meaning that backslash escapes are recognized only in escape string constants. This behavior is more standards-compliant, but might break applications which rely on the historical behavior, where backslash escapes were always recognized. As a workaround, you can set this parameter - to <literal>off</>, but it is better to migrate away from using backslash + to <literal>off</literal>, but it is better to migrate away from using backslash escapes. If you need to use a backslash escape to represent a special - character, write the string constant with an <literal>E</>. + character, write the string constant with an <literal>E</literal>. </para> <para> - In addition to <varname>standard_conforming_strings</>, the configuration + In addition to <varname>standard_conforming_strings</varname>, the configuration parameters <xref linkend="guc-escape-string-warning"> and <xref linkend="guc-backslash-quote"> govern treatment of backslashes in string constants. @@ -525,13 +525,13 @@ U&'d!0061t!+000061' UESCAPE '!' <para> The Unicode escape syntax works only when the server encoding is - <literal>UTF8</>. When other server encodings are used, only + <literal>UTF8</literal>. When other server encodings are used, only code points in the ASCII range (up to <literal>\007F</literal>) can be specified. Both the 4-digit and the 6-digit form can be used to specify UTF-16 surrogate pairs to compose characters with code points larger than U+FFFF, although the availability of the 6-digit form technically makes this unnecessary. (When surrogate - pairs are used when the server encoding is <literal>UTF8</>, they + pairs are used when the server encoding is <literal>UTF8</literal>, they are first combined into a single code point that is then encoded in UTF-8.) </para> @@ -573,7 +573,7 @@ U&'d!0061t!+000061' UESCAPE '!' sign, an arbitrary sequence of characters that makes up the string content, a dollar sign, the same tag that began this dollar quote, and a dollar sign. For example, here are two - different ways to specify the string <quote>Dianne's horse</> + different ways to specify the string <quote>Dianne's horse</quote> using dollar quoting: <programlisting> $$Dianne's horse$$ @@ -598,11 +598,11 @@ BEGIN END; $function$ </programlisting> - Here, the sequence <literal>$q$[\t\r\n\v\\]$q$</> represents a - dollar-quoted literal string <literal>[\t\r\n\v\\]</>, which will + Here, the sequence <literal>$q$[\t\r\n\v\\]$q$</literal> represents a + dollar-quoted literal string <literal>[\t\r\n\v\\]</literal>, which will be recognized when the function body is executed by - <productname>PostgreSQL</>. But since the sequence does not match - the outer dollar quoting delimiter <literal>$function$</>, it is + <productname>PostgreSQL</productname>. But since the sequence does not match + the outer dollar quoting delimiter <literal>$function$</literal>, it is just some more characters within the constant so far as the outer string is concerned. </para> @@ -707,13 +707,13 @@ $function$ <indexterm><primary>bigint</primary></indexterm> <indexterm><primary>numeric</primary></indexterm> A numeric constant that contains neither a decimal point nor an - exponent is initially presumed to be type <type>integer</> if its - value fits in type <type>integer</> (32 bits); otherwise it is - presumed to be type <type>bigint</> if its - value fits in type <type>bigint</> (64 bits); otherwise it is - taken to be type <type>numeric</>. Constants that contain decimal + exponent is initially presumed to be type <type>integer</type> if its + value fits in type <type>integer</type> (32 bits); otherwise it is + presumed to be type <type>bigint</type> if its + value fits in type <type>bigint</type> (64 bits); otherwise it is + taken to be type <type>numeric</type>. Constants that contain decimal points and/or exponents are always initially presumed to be type - <type>numeric</>. + <type>numeric</type>. </para> <para> @@ -724,7 +724,7 @@ $function$ force a numeric value to be interpreted as a specific data type by casting it.<indexterm><primary>type cast</primary></indexterm> For example, you can force a numeric value to be treated as type - <type>real</> (<type>float4</>) by writing: + <type>real</type> (<type>float4</type>) by writing: <programlisting> REAL '1.23' -- string style @@ -780,17 +780,17 @@ CAST ( '<replaceable>string</replaceable>' AS <replaceable>type</replaceable> ) function-call syntaxes can also be used to specify run-time type conversions of arbitrary expressions, as discussed in <xref linkend="sql-syntax-type-casts">. To avoid syntactic ambiguity, the - <literal><replaceable>type</> '<replaceable>string</>'</literal> + <literal><replaceable>type</replaceable> '<replaceable>string</replaceable>'</literal> syntax can only be used to specify the type of a simple literal constant. Another restriction on the - <literal><replaceable>type</> '<replaceable>string</>'</literal> + <literal><replaceable>type</replaceable> '<replaceable>string</replaceable>'</literal> syntax is that it does not work for array types; use <literal>::</literal> or <literal>CAST()</literal> to specify the type of an array constant. </para> <para> - The <literal>CAST()</> syntax conforms to SQL. The - <literal><replaceable>type</> '<replaceable>string</>'</literal> + The <literal>CAST()</literal> syntax conforms to SQL. The + <literal><replaceable>type</replaceable> '<replaceable>string</replaceable>'</literal> syntax is a generalization of the standard: SQL specifies this syntax only for a few data types, but <productname>PostgreSQL</productname> allows it for all types. The syntax with @@ -827,7 +827,7 @@ CAST ( '<replaceable>string</replaceable>' AS <replaceable>type</replaceable> ) <listitem> <para> - A multiple-character operator name cannot end in <literal>+</> or <literal>-</>, + A multiple-character operator name cannot end in <literal>+</literal> or <literal>-</literal>, unless the name also contains at least one of these characters: <literallayout> ~ ! @ # % ^ & | ` ? @@ -981,7 +981,7 @@ CAST ( '<replaceable>string</replaceable>' AS <replaceable>type</replaceable> ) <para> <xref linkend="sql-precedence-table"> shows the precedence and - associativity of the operators in <productname>PostgreSQL</>. + associativity of the operators in <productname>PostgreSQL</productname>. Most operators have the same precedence and are left-associative. The precedence and associativity of the operators is hard-wired into the parser. @@ -1085,8 +1085,8 @@ SELECT (5 !) - 6; <row> <entry><token>IS</token> <token>ISNULL</token> <token>NOTNULL</token></entry> <entry></entry> - <entry><literal>IS TRUE</>, <literal>IS FALSE</>, <literal>IS - NULL</>, <literal>IS DISTINCT FROM</>, etc</entry> + <entry><literal>IS TRUE</literal>, <literal>IS FALSE</literal>, <literal>IS + NULL</literal>, <literal>IS DISTINCT FROM</literal>, etc</entry> </row> <row> @@ -1121,29 +1121,29 @@ SELECT (5 !) - 6; <para> When a schema-qualified operator name is used in the - <literal>OPERATOR</> syntax, as for example in: + <literal>OPERATOR</literal> syntax, as for example in: <programlisting> SELECT 3 OPERATOR(pg_catalog.+) 4; </programlisting> - the <literal>OPERATOR</> construct is taken to have the default precedence + the <literal>OPERATOR</literal> construct is taken to have the default precedence shown in <xref linkend="sql-precedence-table"> for - <quote>any other operator</>. This is true no matter - which specific operator appears inside <literal>OPERATOR()</>. + <quote>any other operator</quote>. This is true no matter + which specific operator appears inside <literal>OPERATOR()</literal>. </para> <note> <para> - <productname>PostgreSQL</> versions before 9.5 used slightly different + <productname>PostgreSQL</productname> versions before 9.5 used slightly different operator precedence rules. In particular, <token><=</token> <token>>=</token> and <token><></token> used to be treated as - generic operators; <literal>IS</> tests used to have higher priority; - and <literal>NOT BETWEEN</> and related constructs acted inconsistently, - being taken in some cases as having the precedence of <literal>NOT</> - rather than <literal>BETWEEN</>. These rules were changed for better + generic operators; <literal>IS</literal> tests used to have higher priority; + and <literal>NOT BETWEEN</literal> and related constructs acted inconsistently, + being taken in some cases as having the precedence of <literal>NOT</literal> + rather than <literal>BETWEEN</literal>. These rules were changed for better compliance with the SQL standard and to reduce confusion from inconsistent treatment of logically equivalent constructs. In most cases, these changes will result in no behavioral change, or perhaps - in <quote>no such operator</> failures which can be resolved by adding + in <quote>no such operator</quote> failures which can be resolved by adding parentheses. However there are corner cases in which a query might change behavior without any parsing error being reported. If you are concerned about whether these changes have silently broken something, @@ -1279,7 +1279,7 @@ SELECT 3 OPERATOR(pg_catalog.+) 4; <para> Another value expression in parentheses (used to group subexpressions and override - precedence<indexterm><primary>parenthesis</></>) + precedence<indexterm><primary>parenthesis</primary></indexterm>) </para> </listitem> </itemizedlist> @@ -1376,7 +1376,7 @@ CREATE FUNCTION dept(text) RETURNS dept <synopsis> <replaceable>expression</replaceable>[<replaceable>subscript</replaceable>] </synopsis> - or multiple adjacent elements (an <quote>array slice</>) can be extracted + or multiple adjacent elements (an <quote>array slice</quote>) can be extracted by writing <synopsis> <replaceable>expression</replaceable>[<replaceable>lower_subscript</replaceable>:<replaceable>upper_subscript</replaceable>] @@ -1443,8 +1443,8 @@ $1.somecolumn </programlisting> The parentheses are required here to show that - <structfield>compositecol</> is a column name not a table name, - or that <structname>mytable</> is a table name not a schema name + <structfield>compositecol</structfield> is a column name not a table name, + or that <structname>mytable</structname> is a table name not a schema name in the second case. </para> @@ -1479,7 +1479,7 @@ $1.somecolumn key words <token>AND</token>, <token>OR</token>, and <token>NOT</token>, or is a qualified operator name in the form: <synopsis> -<literal>OPERATOR(</><replaceable>schema</><literal>.</><replaceable>operatorname</><literal>)</> +<literal>OPERATOR(</literal><replaceable>schema</replaceable><literal>.</literal><replaceable>operatorname</replaceable><literal>)</literal> </synopsis> Which particular operators exist and whether they are unary or binary depends on what operators have been @@ -1528,10 +1528,10 @@ sqrt(2) A function that takes a single argument of composite type can optionally be called using field-selection syntax, and conversely field selection can be written in functional style. That is, the - notations <literal>col(table)</> and <literal>table.col</> are + notations <literal>col(table)</literal> and <literal>table.col</literal> are interchangeable. This behavior is not SQL-standard but is provided - in <productname>PostgreSQL</> because it allows use of functions to - emulate <quote>computed fields</>. For more information see + in <productname>PostgreSQL</productname> because it allows use of functions to + emulate <quote>computed fields</quote>. For more information see <xref linkend="rowtypes-usage">. </para> </note> @@ -1592,7 +1592,7 @@ sqrt(2) The fourth form invokes the aggregate once for each input row; since no particular input value is specified, it is generally only useful for the <function>count(*)</function> aggregate function. - The last form is used with <firstterm>ordered-set</> aggregate + The last form is used with <firstterm>ordered-set</firstterm> aggregate functions, which are described below. </para> @@ -1607,7 +1607,7 @@ sqrt(2) For example, <literal>count(*)</literal> yields the total number of input rows; <literal>count(f1)</literal> yields the number of input rows in which <literal>f1</literal> is non-null, since - <function>count</> ignores nulls; and + <function>count</function> ignores nulls; and <literal>count(distinct f1)</literal> yields the number of distinct non-null values of <literal>f1</literal>. </para> @@ -1615,13 +1615,13 @@ sqrt(2) <para> Ordinarily, the input rows are fed to the aggregate function in an unspecified order. In many cases this does not matter; for example, - <function>min</> produces the same result no matter what order it + <function>min</function> produces the same result no matter what order it receives the inputs in. However, some aggregate functions - (such as <function>array_agg</> and <function>string_agg</>) produce + (such as <function>array_agg</function> and <function>string_agg</function>) produce results that depend on the ordering of the input rows. When using - such an aggregate, the optional <replaceable>order_by_clause</> can be - used to specify the desired ordering. The <replaceable>order_by_clause</> - has the same syntax as for a query-level <literal>ORDER BY</> clause, as + such an aggregate, the optional <replaceable>order_by_clause</replaceable> can be + used to specify the desired ordering. The <replaceable>order_by_clause</replaceable> + has the same syntax as for a query-level <literal>ORDER BY</literal> clause, as described in <xref linkend="queries-order">, except that its expressions are always just expressions and cannot be output-column names or numbers. For example: @@ -1632,7 +1632,7 @@ SELECT array_agg(a ORDER BY b DESC) FROM table; <para> When dealing with multiple-argument aggregate functions, note that the - <literal>ORDER BY</> clause goes after all the aggregate arguments. + <literal>ORDER BY</literal> clause goes after all the aggregate arguments. For example, write this: <programlisting> SELECT string_agg(a, ',' ORDER BY a) FROM table; @@ -1642,58 +1642,58 @@ SELECT string_agg(a, ',' ORDER BY a) FROM table; SELECT string_agg(a ORDER BY a, ',') FROM table; -- incorrect </programlisting> The latter is syntactically valid, but it represents a call of a - single-argument aggregate function with two <literal>ORDER BY</> keys + single-argument aggregate function with two <literal>ORDER BY</literal> keys (the second one being rather useless since it's a constant). </para> <para> - If <literal>DISTINCT</> is specified in addition to an - <replaceable>order_by_clause</>, then all the <literal>ORDER BY</> + If <literal>DISTINCT</literal> is specified in addition to an + <replaceable>order_by_clause</replaceable>, then all the <literal>ORDER BY</literal> expressions must match regular arguments of the aggregate; that is, you cannot sort on an expression that is not included in the - <literal>DISTINCT</> list. + <literal>DISTINCT</literal> list. </para> <note> <para> - The ability to specify both <literal>DISTINCT</> and <literal>ORDER BY</> - in an aggregate function is a <productname>PostgreSQL</> extension. + The ability to specify both <literal>DISTINCT</literal> and <literal>ORDER BY</literal> + in an aggregate function is a <productname>PostgreSQL</productname> extension. </para> </note> <para> - Placing <literal>ORDER BY</> within the aggregate's regular argument + Placing <literal>ORDER BY</literal> within the aggregate's regular argument list, as described so far, is used when ordering the input rows for general-purpose and statistical aggregates, for which ordering is optional. There is a subclass of aggregate functions called <firstterm>ordered-set - aggregates</> for which an <replaceable>order_by_clause</replaceable> - is <emphasis>required</>, usually because the aggregate's computation is + aggregates</firstterm> for which an <replaceable>order_by_clause</replaceable> + is <emphasis>required</emphasis>, usually because the aggregate's computation is only sensible in terms of a specific ordering of its input rows. Typical examples of ordered-set aggregates include rank and percentile calculations. For an ordered-set aggregate, the <replaceable>order_by_clause</replaceable> is written - inside <literal>WITHIN GROUP (...)</>, as shown in the final syntax + inside <literal>WITHIN GROUP (...)</literal>, as shown in the final syntax alternative above. The expressions in the <replaceable>order_by_clause</replaceable> are evaluated once per input row just like regular aggregate arguments, sorted as per the <replaceable>order_by_clause</replaceable>'s requirements, and fed to the aggregate function as input arguments. (This is unlike the case - for a non-<literal>WITHIN GROUP</> <replaceable>order_by_clause</>, + for a non-<literal>WITHIN GROUP</literal> <replaceable>order_by_clause</replaceable>, which is not treated as argument(s) to the aggregate function.) The - argument expressions preceding <literal>WITHIN GROUP</>, if any, are - called <firstterm>direct arguments</> to distinguish them from - the <firstterm>aggregated arguments</> listed in + argument expressions preceding <literal>WITHIN GROUP</literal>, if any, are + called <firstterm>direct arguments</firstterm> to distinguish them from + the <firstterm>aggregated arguments</firstterm> listed in the <replaceable>order_by_clause</replaceable>. Unlike regular aggregate arguments, direct arguments are evaluated only once per aggregate call, not once per input row. This means that they can contain variables only - if those variables are grouped by <literal>GROUP BY</>; this restriction + if those variables are grouped by <literal>GROUP BY</literal>; this restriction is the same as if the direct arguments were not inside an aggregate expression at all. Direct arguments are typically used for things like percentile fractions, which only make sense as a single value per aggregation calculation. The direct argument list can be empty; in this - case, write just <literal>()</> not <literal>(*)</>. - (<productname>PostgreSQL</> will actually accept either spelling, but + case, write just <literal>()</literal> not <literal>(*)</literal>. + (<productname>PostgreSQL</productname> will actually accept either spelling, but only the first way conforms to the SQL standard.) </para> @@ -1712,8 +1712,8 @@ SELECT percentile_cont(0.5) WITHIN GROUP (ORDER BY income) FROM households; </programlisting> which obtains the 50th percentile, or median, value of - the <structfield>income</> column from table <structname>households</>. - Here, <literal>0.5</> is a direct argument; it would make no sense + the <structfield>income</structfield> column from table <structname>households</structname>. + Here, <literal>0.5</literal> is a direct argument; it would make no sense for the percentile fraction to be a value varying across rows. </para> @@ -1742,8 +1742,8 @@ FROM generate_series(1,10) AS s(i); <para> An aggregate expression can only appear in the result list or - <literal>HAVING</> clause of a <command>SELECT</> command. - It is forbidden in other clauses, such as <literal>WHERE</>, + <literal>HAVING</literal> clause of a <command>SELECT</command> command. + It is forbidden in other clauses, such as <literal>WHERE</literal>, because those clauses are logically evaluated before the results of aggregates are formed. </para> @@ -1760,7 +1760,7 @@ FROM generate_series(1,10) AS s(i); as a whole is then an outer reference for the subquery it appears in, and acts as a constant over any one evaluation of that subquery. The restriction about - appearing only in the result list or <literal>HAVING</> clause + appearing only in the result list or <literal>HAVING</literal> clause applies with respect to the query level that the aggregate belongs to. </para> </sect2> @@ -1784,7 +1784,7 @@ FROM generate_series(1,10) AS s(i); to grouping of the selected rows into a single output row — each row remains separate in the query output. However the window function has access to all the rows that would be part of the current row's - group according to the grouping specification (<literal>PARTITION BY</> + group according to the grouping specification (<literal>PARTITION BY</literal> list) of the window function call. The syntax of a window function call is one of the following: @@ -1805,10 +1805,10 @@ FROM generate_series(1,10) AS s(i); and the optional <replaceable class="parameter">frame_clause</replaceable> can be one of <synopsis> -{ RANGE | ROWS } <replaceable>frame_start</> -{ RANGE | ROWS } BETWEEN <replaceable>frame_start</> AND <replaceable>frame_end</> +{ RANGE | ROWS } <replaceable>frame_start</replaceable> +{ RANGE | ROWS } BETWEEN <replaceable>frame_start</replaceable> AND <replaceable>frame_end</replaceable> </synopsis> - where <replaceable>frame_start</> and <replaceable>frame_end</> can be + where <replaceable>frame_start</replaceable> and <replaceable>frame_end</replaceable> can be one of <synopsis> UNBOUNDED PRECEDING @@ -1831,59 +1831,59 @@ UNBOUNDED FOLLOWING be given within parentheses, using the same syntax as for defining a named window in the <literal>WINDOW</literal> clause; see the <xref linkend="sql-select"> reference page for details. It's worth - pointing out that <literal>OVER wname</> is not exactly equivalent to - <literal>OVER (wname ...)</>; the latter implies copying and modifying the + pointing out that <literal>OVER wname</literal> is not exactly equivalent to + <literal>OVER (wname ...)</literal>; the latter implies copying and modifying the window definition, and will be rejected if the referenced window specification includes a frame clause. </para> <para> - The <literal>PARTITION BY</> clause groups the rows of the query into - <firstterm>partitions</>, which are processed separately by the window - function. <literal>PARTITION BY</> works similarly to a query-level - <literal>GROUP BY</> clause, except that its expressions are always just + The <literal>PARTITION BY</literal> clause groups the rows of the query into + <firstterm>partitions</firstterm>, which are processed separately by the window + function. <literal>PARTITION BY</literal> works similarly to a query-level + <literal>GROUP BY</literal> clause, except that its expressions are always just expressions and cannot be output-column names or numbers. - Without <literal>PARTITION BY</>, all rows produced by the query are + Without <literal>PARTITION BY</literal>, all rows produced by the query are treated as a single partition. - The <literal>ORDER BY</> clause determines the order in which the rows + The <literal>ORDER BY</literal> clause determines the order in which the rows of a partition are processed by the window function. It works similarly - to a query-level <literal>ORDER BY</> clause, but likewise cannot use - output-column names or numbers. Without <literal>ORDER BY</>, rows are + to a query-level <literal>ORDER BY</literal> clause, but likewise cannot use + output-column names or numbers. Without <literal>ORDER BY</literal>, rows are processed in an unspecified order. </para> <para> The <replaceable class="parameter">frame_clause</replaceable> specifies - the set of rows constituting the <firstterm>window frame</>, which is a + the set of rows constituting the <firstterm>window frame</firstterm>, which is a subset of the current partition, for those window functions that act on the frame instead of the whole partition. The frame can be specified in - either <literal>RANGE</> or <literal>ROWS</> mode; in either case, it - runs from the <replaceable>frame_start</> to the - <replaceable>frame_end</>. If <replaceable>frame_end</> is omitted, - it defaults to <literal>CURRENT ROW</>. + either <literal>RANGE</literal> or <literal>ROWS</literal> mode; in either case, it + runs from the <replaceable>frame_start</replaceable> to the + <replaceable>frame_end</replaceable>. If <replaceable>frame_end</replaceable> is omitted, + it defaults to <literal>CURRENT ROW</literal>. </para> <para> - A <replaceable>frame_start</> of <literal>UNBOUNDED PRECEDING</> means + A <replaceable>frame_start</replaceable> of <literal>UNBOUNDED PRECEDING</literal> means that the frame starts with the first row of the partition, and similarly - a <replaceable>frame_end</> of <literal>UNBOUNDED FOLLOWING</> means + a <replaceable>frame_end</replaceable> of <literal>UNBOUNDED FOLLOWING</literal> means that the frame ends with the last row of the partition. </para> <para> - In <literal>RANGE</> mode, a <replaceable>frame_start</> of - <literal>CURRENT ROW</> means the frame starts with the current row's - first <firstterm>peer</> row (a row that <literal>ORDER BY</> considers - equivalent to the current row), while a <replaceable>frame_end</> of - <literal>CURRENT ROW</> means the frame ends with the last equivalent - <literal>ORDER BY</> peer. In <literal>ROWS</> mode, <literal>CURRENT ROW</> simply means + In <literal>RANGE</literal> mode, a <replaceable>frame_start</replaceable> of + <literal>CURRENT ROW</literal> means the frame starts with the current row's + first <firstterm>peer</firstterm> row (a row that <literal>ORDER BY</literal> considers + equivalent to the current row), while a <replaceable>frame_end</replaceable> of + <literal>CURRENT ROW</literal> means the frame ends with the last equivalent + <literal>ORDER BY</literal> peer. In <literal>ROWS</literal> mode, <literal>CURRENT ROW</literal> simply means the current row. </para> <para> - The <replaceable>value</> <literal>PRECEDING</> and - <replaceable>value</> <literal>FOLLOWING</> cases are currently only - allowed in <literal>ROWS</> mode. They indicate that the frame starts + The <replaceable>value</replaceable> <literal>PRECEDING</literal> and + <replaceable>value</replaceable> <literal>FOLLOWING</literal> cases are currently only + allowed in <literal>ROWS</literal> mode. They indicate that the frame starts or ends the specified number of rows before or after the current row. <replaceable>value</replaceable> must be an integer expression not containing any variables, aggregate functions, or window functions. @@ -1892,22 +1892,22 @@ UNBOUNDED FOLLOWING </para> <para> - The default framing option is <literal>RANGE UNBOUNDED PRECEDING</>, + The default framing option is <literal>RANGE UNBOUNDED PRECEDING</literal>, which is the same as <literal>RANGE BETWEEN UNBOUNDED PRECEDING AND - CURRENT ROW</>. With <literal>ORDER BY</>, this sets the frame to be + CURRENT ROW</literal>. With <literal>ORDER BY</literal>, this sets the frame to be all rows from the partition start up through the current row's last - <literal>ORDER BY</> peer. Without <literal>ORDER BY</>, all rows of the partition are + <literal>ORDER BY</literal> peer. Without <literal>ORDER BY</literal>, all rows of the partition are included in the window frame, since all rows become peers of the current row. </para> <para> Restrictions are that - <replaceable>frame_start</> cannot be <literal>UNBOUNDED FOLLOWING</>, - <replaceable>frame_end</> cannot be <literal>UNBOUNDED PRECEDING</>, - and the <replaceable>frame_end</> choice cannot appear earlier in the - above list than the <replaceable>frame_start</> choice — for example - <literal>RANGE BETWEEN CURRENT ROW AND <replaceable>value</> + <replaceable>frame_start</replaceable> cannot be <literal>UNBOUNDED FOLLOWING</literal>, + <replaceable>frame_end</replaceable> cannot be <literal>UNBOUNDED PRECEDING</literal>, + and the <replaceable>frame_end</replaceable> choice cannot appear earlier in the + above list than the <replaceable>frame_start</replaceable> choice — for example + <literal>RANGE BETWEEN CURRENT ROW AND <replaceable>value</replaceable> PRECEDING</literal> is not allowed. </para> @@ -1928,18 +1928,18 @@ UNBOUNDED FOLLOWING </para> <para> - The syntaxes using <literal>*</> are used for calling parameter-less + The syntaxes using <literal>*</literal> are used for calling parameter-less aggregate functions as window functions, for example - <literal>count(*) OVER (PARTITION BY x ORDER BY y)</>. - The asterisk (<literal>*</>) is customarily not used for + <literal>count(*) OVER (PARTITION BY x ORDER BY y)</literal>. + The asterisk (<literal>*</literal>) is customarily not used for window-specific functions. Window-specific functions do not - allow <literal>DISTINCT</> or <literal>ORDER BY</> to be used within the + allow <literal>DISTINCT</literal> or <literal>ORDER BY</literal> to be used within the function argument list. </para> <para> Window function calls are permitted only in the <literal>SELECT</literal> - list and the <literal>ORDER BY</> clause of the query. + list and the <literal>ORDER BY</literal> clause of the query. </para> <para> @@ -1974,7 +1974,7 @@ UNBOUNDED FOLLOWING CAST ( <replaceable>expression</replaceable> AS <replaceable>type</replaceable> ) <replaceable>expression</replaceable>::<replaceable>type</replaceable> </synopsis> - The <literal>CAST</> syntax conforms to SQL; the syntax with + The <literal>CAST</literal> syntax conforms to SQL; the syntax with <literal>::</literal> is historical <productname>PostgreSQL</productname> usage. </para> @@ -1996,7 +1996,7 @@ CAST ( <replaceable>expression</replaceable> AS <replaceable>type</replaceable> to the type that a value expression must produce (for example, when it is assigned to a table column); the system will automatically apply a type cast in such cases. However, automatic casting is only done for - casts that are marked <quote>OK to apply implicitly</> + casts that are marked <quote>OK to apply implicitly</quote> in the system catalogs. Other casts must be invoked with explicit casting syntax. This restriction is intended to prevent surprising conversions from being applied silently. @@ -2011,8 +2011,8 @@ CAST ( <replaceable>expression</replaceable> AS <replaceable>type</replaceable> However, this only works for types whose names are also valid as function names. For example, <literal>double precision</literal> cannot be used this way, but the equivalent <literal>float8</literal> - can. Also, the names <literal>interval</>, <literal>time</>, and - <literal>timestamp</> can only be used in this fashion if they are + can. Also, the names <literal>interval</literal>, <literal>time</literal>, and + <literal>timestamp</literal> can only be used in this fashion if they are double-quoted, because of syntactic conflicts. Therefore, the use of the function-like cast syntax leads to inconsistencies and should probably be avoided. @@ -2025,7 +2025,7 @@ CAST ( <replaceable>expression</replaceable> AS <replaceable>type</replaceable> conversion, it will internally invoke a registered function to perform the conversion. By convention, these conversion functions have the same name as their output type, and thus the <quote>function-like - syntax</> is nothing more than a direct invocation of the underlying + syntax</quote> is nothing more than a direct invocation of the underlying conversion function. Obviously, this is not something that a portable application should rely on. For further details see <xref linkend="sql-createcast">. @@ -2061,7 +2061,7 @@ CAST ( <replaceable>expression</replaceable> AS <replaceable>type</replaceable> <para> The two common uses of the <literal>COLLATE</literal> clause are - overriding the sort order in an <literal>ORDER BY</> clause, for + overriding the sort order in an <literal>ORDER BY</literal> clause, for example: <programlisting> SELECT a, b, c FROM tbl WHERE ... ORDER BY a COLLATE "C"; @@ -2071,14 +2071,14 @@ SELECT a, b, c FROM tbl WHERE ... ORDER BY a COLLATE "C"; <programlisting> SELECT * FROM tbl WHERE a > 'foo' COLLATE "C"; </programlisting> - Note that in the latter case the <literal>COLLATE</> clause is + Note that in the latter case the <literal>COLLATE</literal> clause is attached to an input argument of the operator we wish to affect. It doesn't matter which argument of the operator or function call the - <literal>COLLATE</> clause is attached to, because the collation that is + <literal>COLLATE</literal> clause is attached to, because the collation that is applied by the operator or function is derived by considering all - arguments, and an explicit <literal>COLLATE</> clause will override the + arguments, and an explicit <literal>COLLATE</literal> clause will override the collations of all other arguments. (Attaching non-matching - <literal>COLLATE</> clauses to more than one argument, however, is an + <literal>COLLATE</literal> clauses to more than one argument, however, is an error. For more details see <xref linkend="collation">.) Thus, this gives the same result as the previous example: <programlisting> @@ -2089,8 +2089,8 @@ SELECT * FROM tbl WHERE a COLLATE "C" > 'foo'; SELECT * FROM tbl WHERE (a > 'foo') COLLATE "C"; </programlisting> because it attempts to apply a collation to the result of the - <literal>></> operator, which is of the non-collatable data type - <type>boolean</>. + <literal>></literal> operator, which is of the non-collatable data type + <type>boolean</type>. </para> </sect2> @@ -2143,8 +2143,8 @@ SELECT name, (SELECT max(pop) FROM cities WHERE cities.state = states.name) array value using values for its member elements. A simple array constructor consists of the key word <literal>ARRAY</literal>, a left square bracket - <literal>[</>, a list of expressions (separated by commas) for the - array element values, and finally a right square bracket <literal>]</>. + <literal>[</literal>, a list of expressions (separated by commas) for the + array element values, and finally a right square bracket <literal>]</literal>. For example: <programlisting> SELECT ARRAY[1,2,3+4]; @@ -2155,8 +2155,8 @@ SELECT ARRAY[1,2,3+4]; </programlisting> By default, the array element type is the common type of the member expressions, - determined using the same rules as for <literal>UNION</> or - <literal>CASE</> constructs (see <xref linkend="typeconv-union-case">). + determined using the same rules as for <literal>UNION</literal> or + <literal>CASE</literal> constructs (see <xref linkend="typeconv-union-case">). You can override this by explicitly casting the array constructor to the desired type, for example: <programlisting> @@ -2193,13 +2193,13 @@ SELECT ARRAY[[1,2],[3,4]]; Since multidimensional arrays must be rectangular, inner constructors at the same level must produce sub-arrays of identical dimensions. - Any cast applied to the outer <literal>ARRAY</> constructor propagates + Any cast applied to the outer <literal>ARRAY</literal> constructor propagates automatically to all the inner constructors. </para> <para> Multidimensional array constructor elements can be anything yielding - an array of the proper kind, not only a sub-<literal>ARRAY</> construct. + an array of the proper kind, not only a sub-<literal>ARRAY</literal> construct. For example: <programlisting> CREATE TABLE arr(f1 int[], f2 int[]); @@ -2291,7 +2291,7 @@ SELECT ARRAY(SELECT ARRAY[i, i*2] FROM generate_series(1,5) AS a(i)); <programlisting> SELECT ROW(1,2.5,'this is a test'); </programlisting> - The key word <literal>ROW</> is optional when there is more than one + The key word <literal>ROW</literal> is optional when there is more than one expression in the list. </para> @@ -2299,10 +2299,10 @@ SELECT ROW(1,2.5,'this is a test'); A row constructor can include the syntax <replaceable>rowvalue</replaceable><literal>.*</literal>, which will be expanded to a list of the elements of the row value, - just as occurs when the <literal>.*</> syntax is used at the top level - of a <command>SELECT</> list (see <xref linkend="rowtypes-usage">). - For example, if table <literal>t</> has - columns <literal>f1</> and <literal>f2</>, these are the same: + just as occurs when the <literal>.*</literal> syntax is used at the top level + of a <command>SELECT</command> list (see <xref linkend="rowtypes-usage">). + For example, if table <literal>t</literal> has + columns <literal>f1</literal> and <literal>f2</literal>, these are the same: <programlisting> SELECT ROW(t.*, 42) FROM t; SELECT ROW(t.f1, t.f2, 42) FROM t; @@ -2313,19 +2313,19 @@ SELECT ROW(t.f1, t.f2, 42) FROM t; <para> Before <productname>PostgreSQL</productname> 8.2, the <literal>.*</literal> syntax was not expanded in row constructors, so - that writing <literal>ROW(t.*, 42)</> created a two-field row whose first + that writing <literal>ROW(t.*, 42)</literal> created a two-field row whose first field was another row value. The new behavior is usually more useful. If you need the old behavior of nested row values, write the inner row value without <literal>.*</literal>, for instance - <literal>ROW(t, 42)</>. + <literal>ROW(t, 42)</literal>. </para> </note> <para> - By default, the value created by a <literal>ROW</> expression is of + By default, the value created by a <literal>ROW</literal> expression is of an anonymous record type. If necessary, it can be cast to a named composite type — either the row type of a table, or a composite type - created with <command>CREATE TYPE AS</>. An explicit cast might be needed + created with <command>CREATE TYPE AS</command>. An explicit cast might be needed to avoid ambiguity. For example: <programlisting> CREATE TABLE mytable(f1 int, f2 float, f3 text); @@ -2366,7 +2366,7 @@ SELECT getf1(CAST(ROW(11,'this is a test',2.5) AS myrowtype)); in a composite-type table column, or to be passed to a function that accepts a composite parameter. Also, it is possible to compare two row values or test a row with - <literal>IS NULL</> or <literal>IS NOT NULL</>, for example: + <literal>IS NULL</literal> or <literal>IS NOT NULL</literal>, for example: <programlisting> SELECT ROW(1,2.5,'this is a test') = ROW(1, 3, 'not the same'); @@ -2413,18 +2413,18 @@ SELECT somefunc() OR true; <para> As a consequence, it is unwise to use functions with side effects as part of complex expressions. It is particularly dangerous to - rely on side effects or evaluation order in <literal>WHERE</> and <literal>HAVING</> clauses, + rely on side effects or evaluation order in <literal>WHERE</literal> and <literal>HAVING</literal> clauses, since those clauses are extensively reprocessed as part of developing an execution plan. Boolean - expressions (<literal>AND</>/<literal>OR</>/<literal>NOT</> combinations) in those clauses can be reorganized + expressions (<literal>AND</literal>/<literal>OR</literal>/<literal>NOT</literal> combinations) in those clauses can be reorganized in any manner allowed by the laws of Boolean algebra. </para> <para> - When it is essential to force evaluation order, a <literal>CASE</> + When it is essential to force evaluation order, a <literal>CASE</literal> construct (see <xref linkend="functions-conditional">) can be used. For example, this is an untrustworthy way of trying to - avoid division by zero in a <literal>WHERE</> clause: + avoid division by zero in a <literal>WHERE</literal> clause: <programlisting> SELECT ... WHERE x > 0 AND y/x > 1.5; </programlisting> @@ -2432,14 +2432,14 @@ SELECT ... WHERE x > 0 AND y/x > 1.5; <programlisting> SELECT ... WHERE CASE WHEN x > 0 THEN y/x > 1.5 ELSE false END; </programlisting> - A <literal>CASE</> construct used in this fashion will defeat optimization + A <literal>CASE</literal> construct used in this fashion will defeat optimization attempts, so it should only be done when necessary. (In this particular example, it would be better to sidestep the problem by writing - <literal>y > 1.5*x</> instead.) + <literal>y > 1.5*x</literal> instead.) </para> <para> - <literal>CASE</> is not a cure-all for such issues, however. + <literal>CASE</literal> is not a cure-all for such issues, however. One limitation of the technique illustrated above is that it does not prevent early evaluation of constant subexpressions. As described in <xref linkend="xfunc-volatility">, functions and @@ -2450,8 +2450,8 @@ SELECT CASE WHEN x > 0 THEN x ELSE 1/0 END FROM tab; </programlisting> is likely to result in a division-by-zero failure due to the planner trying to simplify the constant subexpression, - even if every row in the table has <literal>x > 0</> so that the - <literal>ELSE</> arm would never be entered at run time. + even if every row in the table has <literal>x > 0</literal> so that the + <literal>ELSE</literal> arm would never be entered at run time. </para> <para> @@ -2459,17 +2459,17 @@ SELECT CASE WHEN x > 0 THEN x ELSE 1/0 END FROM tab; obviously involve constants can occur in queries executed within functions, since the values of function arguments and local variables can be inserted into queries as constants for planning purposes. - Within <application>PL/pgSQL</> functions, for example, using an - <literal>IF</>-<literal>THEN</>-<literal>ELSE</> statement to protect + Within <application>PL/pgSQL</application> functions, for example, using an + <literal>IF</literal>-<literal>THEN</literal>-<literal>ELSE</literal> statement to protect a risky computation is much safer than just nesting it in a - <literal>CASE</> expression. + <literal>CASE</literal> expression. </para> <para> - Another limitation of the same kind is that a <literal>CASE</> cannot + Another limitation of the same kind is that a <literal>CASE</literal> cannot prevent evaluation of an aggregate expression contained within it, because aggregate expressions are computed before other - expressions in a <literal>SELECT</> list or <literal>HAVING</> clause + expressions in a <literal>SELECT</literal> list or <literal>HAVING</literal> clause are considered. For example, the following query can cause a division-by-zero error despite seemingly having protected against it: <programlisting> @@ -2478,12 +2478,12 @@ SELECT CASE WHEN min(employees) > 0 END FROM departments; </programlisting> - The <function>min()</> and <function>avg()</> aggregates are computed + The <function>min()</function> and <function>avg()</function> aggregates are computed concurrently over all the input rows, so if any row - has <structfield>employees</> equal to zero, the division-by-zero error + has <structfield>employees</structfield> equal to zero, the division-by-zero error will occur before there is any opportunity to test the result of - <function>min()</>. Instead, use a <literal>WHERE</> - or <literal>FILTER</> clause to prevent problematic input rows from + <function>min()</function>. Instead, use a <literal>WHERE</literal> + or <literal>FILTER</literal> clause to prevent problematic input rows from reaching an aggregate function in the first place. </para> </sect2> @@ -2657,7 +2657,7 @@ SELECT concat_lower_or_upper('Hello', 'World', uppercase => true); </screen> In the above query, the arguments <literal>a</literal> and <literal>b</literal> are specified positionally, while - <literal>uppercase</> is specified by name. In this example, + <literal>uppercase</literal> is specified by name. In this example, that adds little except documentation. With a more complex function having numerous parameters that have default values, named or mixed notation can save a great deal of writing and reduce chances for error. diff --git a/doc/src/sgml/tablefunc.sgml b/doc/src/sgml/tablefunc.sgml index 90f6df9545b..7cfae4d3169 100644 --- a/doc/src/sgml/tablefunc.sgml +++ b/doc/src/sgml/tablefunc.sgml @@ -8,7 +8,7 @@ </indexterm> <para> - The <filename>tablefunc</> module includes various functions that return + The <filename>tablefunc</filename> module includes various functions that return tables (that is, multiple rows). These functions are useful both in their own right and as examples of how to write C functions that return multiple rows. @@ -23,7 +23,7 @@ </para> <table id="tablefunc-functions"> - <title><filename>tablefunc</> Functions</title> + <title><filename>tablefunc</filename> Functions</title> <tgroup cols="3"> <thead> <row> @@ -35,46 +35,46 @@ <tbody> <row> <entry><function>normal_rand(int numvals, float8 mean, float8 stddev)</function></entry> - <entry><type>setof float8</></entry> + <entry><type>setof float8</type></entry> <entry> Produces a set of normally distributed random values </entry> </row> <row> <entry><function>crosstab(text sql)</function></entry> - <entry><type>setof record</></entry> + <entry><type>setof record</type></entry> <entry> - Produces a <quote>pivot table</> containing - row names plus <replaceable>N</> value columns, where - <replaceable>N</> is determined by the row type specified in the calling + Produces a <quote>pivot table</quote> containing + row names plus <replaceable>N</replaceable> value columns, where + <replaceable>N</replaceable> is determined by the row type specified in the calling query </entry> </row> <row> - <entry><function>crosstab<replaceable>N</>(text sql)</function></entry> - <entry><type>setof table_crosstab_<replaceable>N</></></entry> + <entry><function>crosstab<replaceable>N</replaceable>(text sql)</function></entry> + <entry><type>setof table_crosstab_<replaceable>N</replaceable></type></entry> <entry> - Produces a <quote>pivot table</> containing - row names plus <replaceable>N</> value columns. - <function>crosstab2</>, <function>crosstab3</>, and - <function>crosstab4</> are predefined, but you can create additional - <function>crosstab<replaceable>N</></> functions as described below + Produces a <quote>pivot table</quote> containing + row names plus <replaceable>N</replaceable> value columns. + <function>crosstab2</function>, <function>crosstab3</function>, and + <function>crosstab4</function> are predefined, but you can create additional + <function>crosstab<replaceable>N</replaceable></function> functions as described below </entry> </row> <row> <entry><function>crosstab(text source_sql, text category_sql)</function></entry> - <entry><type>setof record</></entry> + <entry><type>setof record</type></entry> <entry> - Produces a <quote>pivot table</> + Produces a <quote>pivot table</quote> with the value columns specified by a second query </entry> </row> <row> <entry><function>crosstab(text sql, int N)</function></entry> - <entry><type>setof record</></entry> + <entry><type>setof record</type></entry> <entry> - <para>Obsolete version of <function>crosstab(text)</>. - The parameter <replaceable>N</> is now ignored, since the number of + <para>Obsolete version of <function>crosstab(text)</function>. + The parameter <replaceable>N</replaceable> is now ignored, since the number of value columns is always determined by the calling query </para> </entry> @@ -88,7 +88,7 @@ </function> <indexterm><primary>connectby</primary></indexterm> </entry> - <entry><type>setof record</></entry> + <entry><type>setof record</type></entry> <entry> Produces a representation of a hierarchical tree structure </entry> @@ -109,7 +109,7 @@ normal_rand(int numvals, float8 mean, float8 stddev) returns setof float8 </synopsis> <para> - <function>normal_rand</> produces a set of normally distributed random + <function>normal_rand</function> produces a set of normally distributed random values (Gaussian distribution). </para> @@ -157,7 +157,7 @@ crosstab(text sql, int N) </synopsis> <para> - The <function>crosstab</> function is used to produce <quote>pivot</> + The <function>crosstab</function> function is used to produce <quote>pivot</quote> displays, wherein data is listed across the page rather than down. For example, we might have data like <programlisting> @@ -176,7 +176,7 @@ row1 val11 val12 val13 ... row2 val21 val22 val23 ... ... </programlisting> - The <function>crosstab</> function takes a text parameter that is a SQL + The <function>crosstab</function> function takes a text parameter that is a SQL query producing raw data formatted in the first way, and produces a table formatted in the second way. </para> @@ -209,9 +209,9 @@ row2 val21 val22 val23 ... </para> <para> - The <function>crosstab</> function is declared to return <type>setof + The <function>crosstab</function> function is declared to return <type>setof record</type>, so the actual names and types of the output columns must be - defined in the <literal>FROM</> clause of the calling <command>SELECT</> + defined in the <literal>FROM</literal> clause of the calling <command>SELECT</command> statement, for example: <programlisting> SELECT * FROM crosstab('...') AS ct(row_name text, category_1 text, category_2 text); @@ -227,30 +227,30 @@ SELECT * FROM crosstab('...') AS ct(row_name text, category_1 text, category_2 t </para> <para> - The <literal>FROM</> clause must define the output as one - <structfield>row_name</> column (of the same data type as the first result - column of the SQL query) followed by N <structfield>value</> columns + The <literal>FROM</literal> clause must define the output as one + <structfield>row_name</structfield> column (of the same data type as the first result + column of the SQL query) followed by N <structfield>value</structfield> columns (all of the same data type as the third result column of the SQL query). You can set up as many output value columns as you wish. The names of the output columns are up to you. </para> <para> - The <function>crosstab</> function produces one output row for each + The <function>crosstab</function> function produces one output row for each consecutive group of input rows with the same <structfield>row_name</structfield> value. It fills the output - <structfield>value</> columns, left to right, with the + <structfield>value</structfield> columns, left to right, with the <structfield>value</structfield> fields from these rows. If there - are fewer rows in a group than there are output <structfield>value</> + are fewer rows in a group than there are output <structfield>value</structfield> columns, the extra output columns are filled with nulls; if there are more rows, the extra input rows are skipped. </para> <para> - In practice the SQL query should always specify <literal>ORDER BY 1,2</> + In practice the SQL query should always specify <literal>ORDER BY 1,2</literal> to ensure that the input rows are properly ordered, that is, values with the same <structfield>row_name</structfield> are brought together and - correctly ordered within the row. Notice that <function>crosstab</> + correctly ordered within the row. Notice that <function>crosstab</function> itself does not pay any attention to the second column of the query result; it's just there to be ordered by, to control the order in which the third-column values appear across the page. @@ -286,41 +286,41 @@ AS ct(row_name text, category_1 text, category_2 text, category_3 text); </para> <para> - You can avoid always having to write out a <literal>FROM</> clause to + You can avoid always having to write out a <literal>FROM</literal> clause to define the output columns, by setting up a custom crosstab function that has the desired output row type wired into its definition. This is described in the next section. Another possibility is to embed the - required <literal>FROM</> clause in a view definition. + required <literal>FROM</literal> clause in a view definition. </para> <note> <para> See also the <command><link linkend="APP-PSQL-meta-commands-crosstabview">\crosstabview</link></command> - command in <application>psql</>, which provides functionality similar - to <function>crosstab()</>. + command in <application>psql</application>, which provides functionality similar + to <function>crosstab()</function>. </para> </note> </sect3> <sect3> - <title><function>crosstab<replaceable>N</>(text)</function></title> + <title><function>crosstab<replaceable>N</replaceable>(text)</function></title> <indexterm> <primary>crosstab</primary> </indexterm> <synopsis> -crosstab<replaceable>N</>(text sql) +crosstab<replaceable>N</replaceable>(text sql) </synopsis> <para> - The <function>crosstab<replaceable>N</></> functions are examples of how - to set up custom wrappers for the general <function>crosstab</> function, + The <function>crosstab<replaceable>N</replaceable></function> functions are examples of how + to set up custom wrappers for the general <function>crosstab</function> function, so that you need not write out column names and types in the calling - <command>SELECT</> query. The <filename>tablefunc</> module includes - <function>crosstab2</>, <function>crosstab3</>, and - <function>crosstab4</>, whose output row types are defined as + <command>SELECT</command> query. The <filename>tablefunc</filename> module includes + <function>crosstab2</function>, <function>crosstab3</function>, and + <function>crosstab4</function>, whose output row types are defined as </para> <programlisting> @@ -337,10 +337,10 @@ CREATE TYPE tablefunc_crosstab_N AS ( <para> Thus, these functions can be used directly when the input query produces - <structfield>row_name</> and <structfield>value</> columns of type - <type>text</>, and you want 2, 3, or 4 output values columns. + <structfield>row_name</structfield> and <structfield>value</structfield> columns of type + <type>text</type>, and you want 2, 3, or 4 output values columns. In all other ways they behave exactly as described above for the - general <function>crosstab</> function. + general <function>crosstab</function> function. </para> <para> @@ -359,7 +359,7 @@ FROM crosstab3( <para> These functions are provided mostly for illustration purposes. You can create your own return types and functions based on the - underlying <function>crosstab()</> function. There are two ways + underlying <function>crosstab()</function> function. There are two ways to do it: <itemizedlist> @@ -367,13 +367,13 @@ FROM crosstab3( <para> Create a composite type describing the desired output columns, similar to the examples in - <filename>contrib/tablefunc/tablefunc--1.0.sql</>. + <filename>contrib/tablefunc/tablefunc--1.0.sql</filename>. Then define a - unique function name accepting one <type>text</> parameter and returning - <type>setof your_type_name</>, but linking to the same underlying - <function>crosstab</> C function. For example, if your source data - produces row names that are <type>text</>, and values that are - <type>float8</>, and you want 5 value columns: + unique function name accepting one <type>text</type> parameter and returning + <type>setof your_type_name</type>, but linking to the same underlying + <function>crosstab</function> C function. For example, if your source data + produces row names that are <type>text</type>, and values that are + <type>float8</type>, and you want 5 value columns: <programlisting> CREATE TYPE my_crosstab_float8_5_cols AS ( my_row_name text, @@ -393,7 +393,7 @@ CREATE OR REPLACE FUNCTION crosstab_float8_5_cols(text) <listitem> <para> - Use <literal>OUT</> parameters to define the return type implicitly. + Use <literal>OUT</literal> parameters to define the return type implicitly. The same example could also be done this way: <programlisting> CREATE OR REPLACE FUNCTION crosstab_float8_5_cols( @@ -426,12 +426,12 @@ crosstab(text source_sql, text category_sql) </synopsis> <para> - The main limitation of the single-parameter form of <function>crosstab</> + The main limitation of the single-parameter form of <function>crosstab</function> is that it treats all values in a group alike, inserting each value into the first available column. If you want the value columns to correspond to specific categories of data, and some groups might not have data for some of the categories, that doesn't work well. - The two-parameter form of <function>crosstab</> handles this case by + The two-parameter form of <function>crosstab</function> handles this case by providing an explicit list of the categories corresponding to the output columns. </para> @@ -447,7 +447,7 @@ crosstab(text source_sql, text category_sql) <structfield>category</structfield> and <structfield>value</structfield> columns must be the last two columns, in that order. Any columns between <structfield>row_name</structfield> and - <structfield>category</structfield> are treated as <quote>extra</>. + <structfield>category</structfield> are treated as <quote>extra</quote>. The <quote>extra</quote> columns are expected to be the same for all rows with the same <structfield>row_name</structfield> value. </para> @@ -489,9 +489,9 @@ SELECT DISTINCT cat FROM foo ORDER BY 1; </para> <para> - The <function>crosstab</> function is declared to return <type>setof + The <function>crosstab</function> function is declared to return <type>setof record</type>, so the actual names and types of the output columns must be - defined in the <literal>FROM</> clause of the calling <command>SELECT</> + defined in the <literal>FROM</literal> clause of the calling <command>SELECT</command> statement, for example: <programlisting> @@ -512,25 +512,25 @@ row_name extra cat1 cat2 cat3 cat4 </para> <para> - The <literal>FROM</> clause must define the proper number of output - columns of the proper data types. If there are <replaceable>N</> - columns in the <parameter>source_sql</> query's result, the first - <replaceable>N</>-2 of them must match up with the first - <replaceable>N</>-2 output columns. The remaining output columns - must have the type of the last column of the <parameter>source_sql</> + The <literal>FROM</literal> clause must define the proper number of output + columns of the proper data types. If there are <replaceable>N</replaceable> + columns in the <parameter>source_sql</parameter> query's result, the first + <replaceable>N</replaceable>-2 of them must match up with the first + <replaceable>N</replaceable>-2 output columns. The remaining output columns + must have the type of the last column of the <parameter>source_sql</parameter> query's result, and there must be exactly as many of them as there are rows in the <parameter>category_sql</parameter> query's result. </para> <para> - The <function>crosstab</> function produces one output row for each + The <function>crosstab</function> function produces one output row for each consecutive group of input rows with the same <structfield>row_name</structfield> value. The output - <structfield>row_name</structfield> column, plus any <quote>extra</> + <structfield>row_name</structfield> column, plus any <quote>extra</quote> columns, are copied from the first row of the group. The output - <structfield>value</> columns are filled with the + <structfield>value</structfield> columns are filled with the <structfield>value</structfield> fields from rows having matching - <structfield>category</> values. If a row's <structfield>category</> + <structfield>category</structfield> values. If a row's <structfield>category</structfield> does not match any output of the <parameter>category_sql</parameter> query, its <structfield>value</structfield> is ignored. Output columns whose matching category is not present in any input row @@ -539,7 +539,7 @@ row_name extra cat1 cat2 cat3 cat4 <para> In practice the <parameter>source_sql</parameter> query should always - specify <literal>ORDER BY 1</> to ensure that values with the same + specify <literal>ORDER BY 1</literal> to ensure that values with the same <structfield>row_name</structfield> are brought together. However, ordering of the categories within a group is not important. Also, it is essential to be sure that the order of the @@ -619,7 +619,7 @@ AS You can create predefined functions to avoid having to write out the result column names and types in each query. See the examples in the previous section. The underlying C function for this form - of <function>crosstab</> is named <literal>crosstab_hash</>. + of <function>crosstab</function> is named <literal>crosstab_hash</literal>. </para> </sect3> @@ -638,10 +638,10 @@ connectby(text relname, text keyid_fld, text parent_keyid_fld </synopsis> <para> - The <function>connectby</> function produces a display of hierarchical + The <function>connectby</function> function produces a display of hierarchical data that is stored in a table. The table must have a key field that uniquely identifies rows, and a parent-key field that references the - parent (if any) of each row. <function>connectby</> can display the + parent (if any) of each row. <function>connectby</function> can display the sub-tree descending from any row. </para> @@ -694,14 +694,14 @@ connectby(text relname, text keyid_fld, text parent_keyid_fld <para> The key and parent-key fields can be any data type, but they must be - the same type. Note that the <parameter>start_with</> value must be + the same type. Note that the <parameter>start_with</parameter> value must be entered as a text string, regardless of the type of the key field. </para> <para> - The <function>connectby</> function is declared to return <type>setof + The <function>connectby</function> function is declared to return <type>setof record</type>, so the actual names and types of the output columns must be - defined in the <literal>FROM</> clause of the calling <command>SELECT</> + defined in the <literal>FROM</literal> clause of the calling <command>SELECT</command> statement, for example: </para> @@ -714,15 +714,15 @@ SELECT * FROM connectby('connectby_tree', 'keyid', 'parent_keyid', 'pos', 'row2' The first two output columns are used for the current row's key and its parent row's key; they must match the type of the table's key field. The third output column is the depth in the tree and must be of type - <type>integer</>. If a <parameter>branch_delim</parameter> parameter was + <type>integer</type>. If a <parameter>branch_delim</parameter> parameter was given, the next output column is the branch display and must be of type - <type>text</>. Finally, if an <parameter>orderby_fld</parameter> + <type>text</type>. Finally, if an <parameter>orderby_fld</parameter> parameter was given, the last output column is a serial number, and must - be of type <type>integer</>. + be of type <type>integer</type>. </para> <para> - The <quote>branch</> output column shows the path of keys taken to + The <quote>branch</quote> output column shows the path of keys taken to reach the current row. The keys are separated by the specified <parameter>branch_delim</parameter> string. If no branch display is wanted, omit both the <parameter>branch_delim</parameter> parameter @@ -740,7 +740,7 @@ SELECT * FROM connectby('connectby_tree', 'keyid', 'parent_keyid', 'pos', 'row2' <para> The parameters representing table and field names are copied as-is - into the SQL queries that <function>connectby</> generates internally. + into the SQL queries that <function>connectby</function> generates internally. Therefore, include double quotes if the names are mixed-case or contain special characters. You may also need to schema-qualify the table name. </para> @@ -752,10 +752,10 @@ SELECT * FROM connectby('connectby_tree', 'keyid', 'parent_keyid', 'pos', 'row2' <para> It is important that the <parameter>branch_delim</parameter> string - not appear in any key values, else <function>connectby</> may incorrectly + not appear in any key values, else <function>connectby</function> may incorrectly report an infinite-recursion error. Note that if <parameter>branch_delim</parameter> is not provided, a default value - of <literal>~</> is used for recursion detection purposes. + of <literal>~</literal> is used for recursion detection purposes. <!-- That pretty well sucks. FIXME --> </para> diff --git a/doc/src/sgml/tablesample-method.sgml b/doc/src/sgml/tablesample-method.sgml index 22f8bbe19aa..9ac28ceb4c3 100644 --- a/doc/src/sgml/tablesample-method.sgml +++ b/doc/src/sgml/tablesample-method.sgml @@ -12,11 +12,11 @@ </indexterm> <para> - <productname>PostgreSQL</>'s implementation of the <literal>TABLESAMPLE</> + <productname>PostgreSQL</productname>'s implementation of the <literal>TABLESAMPLE</literal> clause supports custom table sampling methods, in addition to - the <literal>BERNOULLI</> and <literal>SYSTEM</> methods that are required + the <literal>BERNOULLI</literal> and <literal>SYSTEM</literal> methods that are required by the SQL standard. The sampling method determines which rows of the - table will be selected when the <literal>TABLESAMPLE</> clause is used. + table will be selected when the <literal>TABLESAMPLE</literal> clause is used. </para> <para> @@ -26,18 +26,18 @@ method_name(internal) RETURNS tsm_handler </programlisting> The name of the function is the same method name appearing in the - <literal>TABLESAMPLE</> clause. The <type>internal</> argument is a dummy + <literal>TABLESAMPLE</literal> clause. The <type>internal</type> argument is a dummy (always having value zero) that simply serves to prevent this function from being called directly from a SQL command. The result of the function must be a palloc'd struct of - type <type>TsmRoutine</>, which contains pointers to support functions for + type <type>TsmRoutine</type>, which contains pointers to support functions for the sampling method. These support functions are plain C functions and are not visible or callable at the SQL level. The support functions are described in <xref linkend="tablesample-support-functions">. </para> <para> - In addition to function pointers, the <type>TsmRoutine</> struct must + In addition to function pointers, the <type>TsmRoutine</type> struct must provide these additional fields: </para> @@ -47,9 +47,9 @@ method_name(internal) RETURNS tsm_handler <listitem> <para> This is an OID list containing the data type OIDs of the parameter(s) - that will be accepted by the <literal>TABLESAMPLE</> clause when this + that will be accepted by the <literal>TABLESAMPLE</literal> clause when this sampling method is used. For example, for the built-in methods, this - list contains a single item with value <literal>FLOAT4OID</>, which + list contains a single item with value <literal>FLOAT4OID</literal>, which represents the sampling percentage. Custom sampling methods can have more or different parameters. </para> @@ -60,11 +60,11 @@ method_name(internal) RETURNS tsm_handler <term><literal>bool repeatable_across_queries</literal></term> <listitem> <para> - If <literal>true</>, the sampling method can deliver identical samples + If <literal>true</literal>, the sampling method can deliver identical samples across successive queries, if the same parameters - and <literal>REPEATABLE</> seed value are supplied each time and the - table contents have not changed. When this is <literal>false</>, - the <literal>REPEATABLE</> clause is not accepted for use with the + and <literal>REPEATABLE</literal> seed value are supplied each time and the + table contents have not changed. When this is <literal>false</literal>, + the <literal>REPEATABLE</literal> clause is not accepted for use with the sampling method. </para> </listitem> @@ -74,10 +74,10 @@ method_name(internal) RETURNS tsm_handler <term><literal>bool repeatable_across_scans</literal></term> <listitem> <para> - If <literal>true</>, the sampling method can deliver identical samples + If <literal>true</literal>, the sampling method can deliver identical samples across successive scans in the same query (assuming unchanging parameters, seed value, and snapshot). - When this is <literal>false</>, the planner will not select plans that + When this is <literal>false</literal>, the planner will not select plans that would require scanning the sampled table more than once, since that might result in inconsistent query output. </para> @@ -86,16 +86,16 @@ method_name(internal) RETURNS tsm_handler </variablelist> <para> - The <type>TsmRoutine</> struct type is declared - in <filename>src/include/access/tsmapi.h</>, which see for additional + The <type>TsmRoutine</type> struct type is declared + in <filename>src/include/access/tsmapi.h</filename>, which see for additional details. </para> <para> The table sampling methods included in the standard distribution are good references when trying to write your own. Look into - the <filename>src/backend/access/tablesample</> subdirectory of the source - tree for the built-in sampling methods, and into the <filename>contrib</> + the <filename>src/backend/access/tablesample</filename> subdirectory of the source + tree for the built-in sampling methods, and into the <filename>contrib</filename> subdirectory for add-on methods. </para> @@ -103,7 +103,7 @@ method_name(internal) RETURNS tsm_handler <title>Sampling Method Support Functions</title> <para> - The TSM handler function returns a palloc'd <type>TsmRoutine</> struct + The TSM handler function returns a palloc'd <type>TsmRoutine</type> struct containing pointers to the support functions described below. Most of the functions are required, but some are optional, and those pointers can be NULL. @@ -123,16 +123,16 @@ SampleScanGetSampleSize (PlannerInfo *root, relation pages that will be read during a sample scan, and the number of tuples that will be selected by the scan. (For example, these might be determined by estimating the sampling fraction, and then multiplying - the <literal>baserel->pages</> and <literal>baserel->tuples</> + the <literal>baserel->pages</literal> and <literal>baserel->tuples</literal> numbers by that, being sure to round the results to integral values.) - The <literal>paramexprs</> list holds the expression(s) that are - parameters to the <literal>TABLESAMPLE</> clause. It is recommended to - use <function>estimate_expression_value()</> to try to reduce these + The <literal>paramexprs</literal> list holds the expression(s) that are + parameters to the <literal>TABLESAMPLE</literal> clause. It is recommended to + use <function>estimate_expression_value()</function> to try to reduce these expressions to constants, if their values are needed for estimation purposes; but the function must provide size estimates even if they cannot be reduced, and it should not fail even if the values appear invalid (remember that they're only estimates of what the run-time values will be). - The <literal>pages</> and <literal>tuples</> parameters are outputs. + The <literal>pages</literal> and <literal>tuples</literal> parameters are outputs. </para> <para> @@ -145,29 +145,29 @@ InitSampleScan (SampleScanState *node, Initialize for execution of a SampleScan plan node. This is called during executor startup. It should perform any initialization needed before processing can start. - The <structname>SampleScanState</> node has already been created, but - its <structfield>tsm_state</> field is NULL. - The <function>InitSampleScan</> function can palloc whatever internal + The <structname>SampleScanState</structname> node has already been created, but + its <structfield>tsm_state</structfield> field is NULL. + The <function>InitSampleScan</function> function can palloc whatever internal state data is needed by the sampling method, and store a pointer to - it in <literal>node->tsm_state</>. + it in <literal>node->tsm_state</literal>. Information about the table to scan is accessible through other fields - of the <structname>SampleScanState</> node (but note that the - <literal>node->ss.ss_currentScanDesc</> scan descriptor is not set + of the <structname>SampleScanState</structname> node (but note that the + <literal>node->ss.ss_currentScanDesc</literal> scan descriptor is not set up yet). - <literal>eflags</> contains flag bits describing the executor's + <literal>eflags</literal> contains flag bits describing the executor's operating mode for this plan node. </para> <para> - When <literal>(eflags & EXEC_FLAG_EXPLAIN_ONLY)</> is true, + When <literal>(eflags & EXEC_FLAG_EXPLAIN_ONLY)</literal> is true, the scan will not actually be performed, so this function should only do - the minimum required to make the node state valid for <command>EXPLAIN</> - and <function>EndSampleScan</>. + the minimum required to make the node state valid for <command>EXPLAIN</command> + and <function>EndSampleScan</function>. </para> <para> This function can be omitted (set the pointer to NULL), in which case - <function>BeginSampleScan</> must perform all initialization needed + <function>BeginSampleScan</function> must perform all initialization needed by the sampling method. </para> @@ -184,32 +184,32 @@ BeginSampleScan (SampleScanState *node, This is called just before the first attempt to fetch a tuple, and may be called again if the scan needs to be restarted. Information about the table to scan is accessible through fields - of the <structname>SampleScanState</> node (but note that the - <literal>node->ss.ss_currentScanDesc</> scan descriptor is not set + of the <structname>SampleScanState</structname> node (but note that the + <literal>node->ss.ss_currentScanDesc</literal> scan descriptor is not set up yet). - The <literal>params</> array, of length <literal>nparams</>, contains the - values of the parameters supplied in the <literal>TABLESAMPLE</> clause. + The <literal>params</literal> array, of length <literal>nparams</literal>, contains the + values of the parameters supplied in the <literal>TABLESAMPLE</literal> clause. These will have the number and types specified in the sampling method's <literal>parameterTypes</literal> list, and have been checked to not be null. - <literal>seed</> contains a seed to use for any random numbers generated + <literal>seed</literal> contains a seed to use for any random numbers generated within the sampling method; it is either a hash derived from the - <literal>REPEATABLE</> value if one was given, or the result - of <literal>random()</> if not. + <literal>REPEATABLE</literal> value if one was given, or the result + of <literal>random()</literal> if not. </para> <para> - This function may adjust the fields <literal>node->use_bulkread</> - and <literal>node->use_pagemode</>. - If <literal>node->use_bulkread</> is <literal>true</>, which it is by + This function may adjust the fields <literal>node->use_bulkread</literal> + and <literal>node->use_pagemode</literal>. + If <literal>node->use_bulkread</literal> is <literal>true</literal>, which it is by default, the scan will use a buffer access strategy that encourages recycling buffers after use. It might be reasonable to set this - to <literal>false</> if the scan will visit only a small fraction of the + to <literal>false</literal> if the scan will visit only a small fraction of the table's pages. - If <literal>node->use_pagemode</> is <literal>true</>, which it is by + If <literal>node->use_pagemode</literal> is <literal>true</literal>, which it is by default, the scan will perform visibility checking in a single pass for all tuples on each visited page. It might be reasonable to set this - to <literal>false</> if the scan will select only a small fraction of the + to <literal>false</literal> if the scan will select only a small fraction of the tuples on each visited page. That will result in fewer tuple visibility checks being performed, though each one will be more expensive because it will require more locking. @@ -219,8 +219,8 @@ BeginSampleScan (SampleScanState *node, If the sampling method is marked <literal>repeatable_across_scans</literal>, it must be able to select the same set of tuples during a rescan as it did originally, that is - a fresh call of <function>BeginSampleScan</> must lead to selecting the - same tuples as before (if the <literal>TABLESAMPLE</> parameters + a fresh call of <function>BeginSampleScan</function> must lead to selecting the + same tuples as before (if the <literal>TABLESAMPLE</literal> parameters and seed don't change). </para> @@ -231,7 +231,7 @@ NextSampleBlock (SampleScanState *node); </programlisting> Returns the block number of the next page to be scanned, or - <literal>InvalidBlockNumber</> if no pages remain to be scanned. + <literal>InvalidBlockNumber</literal> if no pages remain to be scanned. </para> <para> @@ -251,34 +251,34 @@ NextSampleTuple (SampleScanState *node, </programlisting> Returns the offset number of the next tuple to be sampled on the - specified page, or <literal>InvalidOffsetNumber</> if no tuples remain to - be sampled. <literal>maxoffset</> is the largest offset number in use + specified page, or <literal>InvalidOffsetNumber</literal> if no tuples remain to + be sampled. <literal>maxoffset</literal> is the largest offset number in use on the page. </para> <note> <para> - <function>NextSampleTuple</> is not explicitly told which of the offset - numbers in the range <literal>1 .. maxoffset</> actually contain valid + <function>NextSampleTuple</function> is not explicitly told which of the offset + numbers in the range <literal>1 .. maxoffset</literal> actually contain valid tuples. This is not normally a problem since the core code ignores requests to sample missing or invisible tuples; that should not result in any bias in the sample. However, if necessary, the function can - examine <literal>node->ss.ss_currentScanDesc->rs_vistuples[]</> + examine <literal>node->ss.ss_currentScanDesc->rs_vistuples[]</literal> to identify which tuples are valid and visible. (This - requires <literal>node->use_pagemode</> to be <literal>true</>.) + requires <literal>node->use_pagemode</literal> to be <literal>true</literal>.) </para> </note> <note> <para> - <function>NextSampleTuple</> must <emphasis>not</> assume - that <literal>blockno</> is the same page number returned by the most - recent <function>NextSampleBlock</> call. It was returned by some - previous <function>NextSampleBlock</> call, but the core code is allowed - to call <function>NextSampleBlock</> in advance of actually scanning + <function>NextSampleTuple</function> must <emphasis>not</emphasis> assume + that <literal>blockno</literal> is the same page number returned by the most + recent <function>NextSampleBlock</function> call. It was returned by some + previous <function>NextSampleBlock</function> call, but the core code is allowed + to call <function>NextSampleBlock</function> in advance of actually scanning pages, so as to support prefetching. It is OK to assume that once - sampling of a given page begins, successive <function>NextSampleTuple</> - calls all refer to the same page until <literal>InvalidOffsetNumber</> is + sampling of a given page begins, successive <function>NextSampleTuple</function> + calls all refer to the same page until <literal>InvalidOffsetNumber</literal> is returned. </para> </note> diff --git a/doc/src/sgml/tcn.sgml b/doc/src/sgml/tcn.sgml index 623094183dc..8cc55efd291 100644 --- a/doc/src/sgml/tcn.sgml +++ b/doc/src/sgml/tcn.sgml @@ -12,16 +12,16 @@ </indexterm> <para> - The <filename>tcn</> module provides a trigger function that notifies + The <filename>tcn</filename> module provides a trigger function that notifies listeners of changes to any table on which it is attached. It must be - used as an <literal>AFTER</> trigger <literal>FOR EACH ROW</>. + used as an <literal>AFTER</literal> trigger <literal>FOR EACH ROW</literal>. </para> <para> Only one parameter may be supplied to the function in a - <literal>CREATE TRIGGER</> statement, and that is optional. If supplied + <literal>CREATE TRIGGER</literal> statement, and that is optional. If supplied it will be used for the channel name for the notifications. If omitted - <literal>tcn</> will be used for the channel name. + <literal>tcn</literal> will be used for the channel name. </para> <para> diff --git a/doc/src/sgml/test-decoding.sgml b/doc/src/sgml/test-decoding.sgml index 4f4fd41e320..310a2d69745 100644 --- a/doc/src/sgml/test-decoding.sgml +++ b/doc/src/sgml/test-decoding.sgml @@ -8,13 +8,13 @@ </indexterm> <para> - <filename>test_decoding</> is an example of a logical decoding + <filename>test_decoding</filename> is an example of a logical decoding output plugin. It doesn't do anything especially useful, but can serve as a starting point for developing your own decoder. </para> <para> - <filename>test_decoding</> receives WAL through the logical decoding + <filename>test_decoding</filename> receives WAL through the logical decoding mechanism and decodes it into text representations of the operations performed. </para> diff --git a/doc/src/sgml/textsearch.sgml b/doc/src/sgml/textsearch.sgml index d5bde5c6c06..7b4912dd5e7 100644 --- a/doc/src/sgml/textsearch.sgml +++ b/doc/src/sgml/textsearch.sgml @@ -16,7 +16,7 @@ <para> Full Text Searching (or just <firstterm>text search</firstterm>) provides - the capability to identify natural-language <firstterm>documents</> that + the capability to identify natural-language <firstterm>documents</firstterm> that satisfy a <firstterm>query</firstterm>, and optionally to sort them by relevance to the query. The most common type of search is to find all documents containing given <firstterm>query terms</firstterm> @@ -73,13 +73,13 @@ <itemizedlist mark="none"> <listitem> <para> - <emphasis>Parsing documents into <firstterm>tokens</></emphasis>. It is + <emphasis>Parsing documents into <firstterm>tokens</firstterm></emphasis>. It is useful to identify various classes of tokens, e.g., numbers, words, complex words, email addresses, so that they can be processed differently. In principle token classes depend on the specific application, but for most purposes it is adequate to use a predefined set of classes. - <productname>PostgreSQL</productname> uses a <firstterm>parser</> to + <productname>PostgreSQL</productname> uses a <firstterm>parser</firstterm> to perform this step. A standard parser is provided, and custom parsers can be created for specific needs. </para> @@ -87,19 +87,19 @@ <listitem> <para> - <emphasis>Converting tokens into <firstterm>lexemes</></emphasis>. + <emphasis>Converting tokens into <firstterm>lexemes</firstterm></emphasis>. A lexeme is a string, just like a token, but it has been - <firstterm>normalized</> so that different forms of the same word + <firstterm>normalized</firstterm> so that different forms of the same word are made alike. For example, normalization almost always includes folding upper-case letters to lower-case, and often involves removal - of suffixes (such as <literal>s</> or <literal>es</> in English). + of suffixes (such as <literal>s</literal> or <literal>es</literal> in English). This allows searches to find variant forms of the same word, without tediously entering all the possible variants. - Also, this step typically eliminates <firstterm>stop words</>, which + Also, this step typically eliminates <firstterm>stop words</firstterm>, which are words that are so common that they are useless for searching. (In short, then, tokens are raw fragments of the document text, while lexemes are words that are believed useful for indexing and searching.) - <productname>PostgreSQL</productname> uses <firstterm>dictionaries</> to + <productname>PostgreSQL</productname> uses <firstterm>dictionaries</firstterm> to perform this step. Various standard dictionaries are provided, and custom ones can be created for specific needs. </para> @@ -112,7 +112,7 @@ as a sorted array of normalized lexemes. Along with the lexemes it is often desirable to store positional information to use for <firstterm>proximity ranking</firstterm>, so that a document that - contains a more <quote>dense</> region of query words is + contains a more <quote>dense</quote> region of query words is assigned a higher rank than one with scattered query words. </para> </listitem> @@ -132,7 +132,7 @@ <listitem> <para> - Map synonyms to a single word using <application>Ispell</>. + Map synonyms to a single word using <application>Ispell</application>. </para> </listitem> @@ -145,14 +145,14 @@ <listitem> <para> Map different variations of a word to a canonical form using - an <application>Ispell</> dictionary. + an <application>Ispell</application> dictionary. </para> </listitem> <listitem> <para> Map different variations of a word to a canonical form using - <application>Snowball</> stemmer rules. + <application>Snowball</application> stemmer rules. </para> </listitem> </itemizedlist> @@ -178,7 +178,7 @@ </indexterm> <para> - A <firstterm>document</> is the unit of searching in a full text search + A <firstterm>document</firstterm> is the unit of searching in a full text search system; for example, a magazine article or email message. The text search engine must be able to parse documents and store associations of lexemes (key words) with their parent document. Later, these associations are @@ -226,11 +226,11 @@ WHERE mid = did AND mid = 12; <para> For text search purposes, each document must be reduced to the - preprocessed <type>tsvector</> format. Searching and ranking - are performed entirely on the <type>tsvector</> representation + preprocessed <type>tsvector</type> format. Searching and ranking + are performed entirely on the <type>tsvector</type> representation of a document — the original text need only be retrieved when the document has been selected for display to a user. - We therefore often speak of the <type>tsvector</> as being the + We therefore often speak of the <type>tsvector</type> as being the document, but of course it is only a compact representation of the full document. </para> @@ -265,11 +265,11 @@ SELECT 'fat & cow'::tsquery @@ 'a fat cat sat on a mat and ate a fat rat'::t contains search terms, which must be already-normalized lexemes, and may combine multiple terms using AND, OR, NOT, and FOLLOWED BY operators. (For syntax details see <xref linkend="datatype-tsquery">.) There are - functions <function>to_tsquery</>, <function>plainto_tsquery</>, - and <function>phraseto_tsquery</> + functions <function>to_tsquery</function>, <function>plainto_tsquery</function>, + and <function>phraseto_tsquery</function> that are helpful in converting user-written text into a proper <type>tsquery</type>, primarily by normalizing words appearing in - the text. Similarly, <function>to_tsvector</> is used to parse and + the text. Similarly, <function>to_tsvector</function> is used to parse and normalize a document string. So in practice a text search match would look more like this: @@ -289,15 +289,15 @@ SELECT 'fat cats ate fat rats'::tsvector @@ to_tsquery('fat & rat'); f </programlisting> - since here no normalization of the word <literal>rats</> will occur. - The elements of a <type>tsvector</> are lexemes, which are assumed - already normalized, so <literal>rats</> does not match <literal>rat</>. + since here no normalization of the word <literal>rats</literal> will occur. + The elements of a <type>tsvector</type> are lexemes, which are assumed + already normalized, so <literal>rats</literal> does not match <literal>rat</literal>. </para> <para> The <literal>@@</literal> operator also supports <type>text</type> input, allowing explicit conversion of a text - string to <type>tsvector</type> or <type>tsquery</> to be skipped + string to <type>tsvector</type> or <type>tsquery</type> to be skipped in simple cases. The variants available are: <programlisting> @@ -317,19 +317,19 @@ text @@ text </para> <para> - Within a <type>tsquery</>, the <literal>&</literal> (AND) operator + Within a <type>tsquery</type>, the <literal>&</literal> (AND) operator specifies that both its arguments must appear in the document to have a match. Similarly, the <literal>|</literal> (OR) operator specifies that - at least one of its arguments must appear, while the <literal>!</> (NOT) - operator specifies that its argument must <emphasis>not</> appear in + at least one of its arguments must appear, while the <literal>!</literal> (NOT) + operator specifies that its argument must <emphasis>not</emphasis> appear in order to have a match. - For example, the query <literal>fat & ! rat</> matches documents that - contain <literal>fat</> but not <literal>rat</>. + For example, the query <literal>fat & ! rat</literal> matches documents that + contain <literal>fat</literal> but not <literal>rat</literal>. </para> <para> Searching for phrases is possible with the help of - the <literal><-></> (FOLLOWED BY) <type>tsquery</> operator, which + the <literal><-></literal> (FOLLOWED BY) <type>tsquery</type> operator, which matches only if its arguments have matches that are adjacent and in the given order. For example: @@ -346,13 +346,13 @@ SELECT to_tsvector('error is not fatal') @@ to_tsquery('fatal <-> error'); </programlisting> There is a more general version of the FOLLOWED BY operator having the - form <literal><<replaceable>N</>></literal>, - where <replaceable>N</> is an integer standing for the difference between + form <literal><<replaceable>N</replaceable>></literal>, + where <replaceable>N</replaceable> is an integer standing for the difference between the positions of the matching lexemes. <literal><1></literal> is - the same as <literal><-></>, while <literal><2></literal> + the same as <literal><-></literal>, while <literal><2></literal> allows exactly one other lexeme to appear between the matches, and so - on. The <literal>phraseto_tsquery</> function makes use of this - operator to construct a <literal>tsquery</> that can match a multi-word + on. The <literal>phraseto_tsquery</literal> function makes use of this + operator to construct a <literal>tsquery</literal> that can match a multi-word phrase when some of the words are stop words. For example: <programlisting> @@ -374,7 +374,7 @@ SELECT phraseto_tsquery('the cats ate the rats'); </para> <para> - Parentheses can be used to control nesting of the <type>tsquery</> + Parentheses can be used to control nesting of the <type>tsquery</type> operators. Without parentheses, <literal>|</literal> binds least tightly, then <literal>&</literal>, then <literal><-></literal>, and <literal>!</literal> most tightly. @@ -384,20 +384,20 @@ SELECT phraseto_tsquery('the cats ate the rats'); It's worth noticing that the AND/OR/NOT operators mean something subtly different when they are within the arguments of a FOLLOWED BY operator than when they are not, because within FOLLOWED BY the exact position of - the match is significant. For example, normally <literal>!x</> matches - only documents that do not contain <literal>x</> anywhere. - But <literal>!x <-> y</> matches <literal>y</> if it is not - immediately after an <literal>x</>; an occurrence of <literal>x</> + the match is significant. For example, normally <literal>!x</literal> matches + only documents that do not contain <literal>x</literal> anywhere. + But <literal>!x <-> y</literal> matches <literal>y</literal> if it is not + immediately after an <literal>x</literal>; an occurrence of <literal>x</literal> elsewhere in the document does not prevent a match. Another example is - that <literal>x & y</> normally only requires that <literal>x</> - and <literal>y</> both appear somewhere in the document, but - <literal>(x & y) <-> z</> requires <literal>x</> - and <literal>y</> to match at the same place, immediately before - a <literal>z</>. Thus this query behaves differently from - <literal>x <-> z & y <-> z</>, which will match a - document containing two separate sequences <literal>x z</> and - <literal>y z</>. (This specific query is useless as written, - since <literal>x</> and <literal>y</> could not match at the same place; + that <literal>x & y</literal> normally only requires that <literal>x</literal> + and <literal>y</literal> both appear somewhere in the document, but + <literal>(x & y) <-> z</literal> requires <literal>x</literal> + and <literal>y</literal> to match at the same place, immediately before + a <literal>z</literal>. Thus this query behaves differently from + <literal>x <-> z & y <-> z</literal>, which will match a + document containing two separate sequences <literal>x z</literal> and + <literal>y z</literal>. (This specific query is useless as written, + since <literal>x</literal> and <literal>y</literal> could not match at the same place; but with more complex situations such as prefix-match patterns, a query of this form could be useful.) </para> @@ -412,26 +412,26 @@ SELECT phraseto_tsquery('the cats ate the rats'); skip indexing certain words (stop words), process synonyms, and use sophisticated parsing, e.g., parse based on more than just white space. This functionality is controlled by <firstterm>text search - configurations</>. <productname>PostgreSQL</> comes with predefined + configurations</firstterm>. <productname>PostgreSQL</productname> comes with predefined configurations for many languages, and you can easily create your own - configurations. (<application>psql</>'s <command>\dF</> command + configurations. (<application>psql</application>'s <command>\dF</command> command shows all available configurations.) </para> <para> During installation an appropriate configuration is selected and <xref linkend="guc-default-text-search-config"> is set accordingly - in <filename>postgresql.conf</>. If you are using the same text search + in <filename>postgresql.conf</filename>. If you are using the same text search configuration for the entire cluster you can use the value in - <filename>postgresql.conf</>. To use different configurations + <filename>postgresql.conf</filename>. To use different configurations throughout the cluster but the same configuration within any one database, - use <command>ALTER DATABASE ... SET</>. Otherwise, you can set + use <command>ALTER DATABASE ... SET</command>. Otherwise, you can set <varname>default_text_search_config</varname> in each session. </para> <para> Each text search function that depends on a configuration has an optional - <type>regconfig</> argument, so that the configuration to use can be + <type>regconfig</type> argument, so that the configuration to use can be specified explicitly. <varname>default_text_search_config</varname> is used only when this argument is omitted. </para> @@ -439,28 +439,28 @@ SELECT phraseto_tsquery('the cats ate the rats'); <para> To make it easier to build custom text search configurations, a configuration is built up from simpler database objects. - <productname>PostgreSQL</>'s text search facility provides + <productname>PostgreSQL</productname>'s text search facility provides four types of configuration-related database objects: </para> <itemizedlist spacing="compact" mark="bullet"> <listitem> <para> - <firstterm>Text search parsers</> break documents into tokens + <firstterm>Text search parsers</firstterm> break documents into tokens and classify each token (for example, as words or numbers). </para> </listitem> <listitem> <para> - <firstterm>Text search dictionaries</> convert tokens to normalized + <firstterm>Text search dictionaries</firstterm> convert tokens to normalized form and reject stop words. </para> </listitem> <listitem> <para> - <firstterm>Text search templates</> provide the functions underlying + <firstterm>Text search templates</firstterm> provide the functions underlying dictionaries. (A dictionary simply specifies a template and a set of parameters for the template.) </para> @@ -468,7 +468,7 @@ SELECT phraseto_tsquery('the cats ate the rats'); <listitem> <para> - <firstterm>Text search configurations</> select a parser and a set + <firstterm>Text search configurations</firstterm> select a parser and a set of dictionaries to use to normalize the tokens produced by the parser. </para> </listitem> @@ -478,8 +478,8 @@ SELECT phraseto_tsquery('the cats ate the rats'); Text search parsers and templates are built from low-level C functions; therefore it requires C programming ability to develop new ones, and superuser privileges to install one into a database. (There are examples - of add-on parsers and templates in the <filename>contrib/</> area of the - <productname>PostgreSQL</> distribution.) Since dictionaries and + of add-on parsers and templates in the <filename>contrib/</filename> area of the + <productname>PostgreSQL</productname> distribution.) Since dictionaries and configurations just parameterize and connect together some underlying parsers and templates, no special privilege is needed to create a new dictionary or configuration. Examples of creating custom dictionaries and @@ -504,8 +504,8 @@ SELECT phraseto_tsquery('the cats ate the rats'); <para> It is possible to do a full text search without an index. A simple query - to print the <structname>title</> of each row that contains the word - <literal>friend</> in its <structfield>body</> field is: + to print the <structname>title</structname> of each row that contains the word + <literal>friend</literal> in its <structfield>body</structfield> field is: <programlisting> SELECT title @@ -513,13 +513,13 @@ FROM pgweb WHERE to_tsvector('english', body) @@ to_tsquery('english', 'friend'); </programlisting> - This will also find related words such as <literal>friends</> - and <literal>friendly</>, since all these are reduced to the same + This will also find related words such as <literal>friends</literal> + and <literal>friendly</literal>, since all these are reduced to the same normalized lexeme. </para> <para> - The query above specifies that the <literal>english</> configuration + The query above specifies that the <literal>english</literal> configuration is to be used to parse and normalize the strings. Alternatively we could omit the configuration parameters: @@ -535,8 +535,8 @@ WHERE to_tsvector(body) @@ to_tsquery('friend'); <para> A more complex example is to - select the ten most recent documents that contain <literal>create</> and - <literal>table</> in the <structname>title</> or <structname>body</>: + select the ten most recent documents that contain <literal>create</literal> and + <literal>table</literal> in the <structname>title</structname> or <structname>body</structname>: <programlisting> SELECT title @@ -577,7 +577,7 @@ CREATE INDEX pgweb_idx ON pgweb USING GIN (to_tsvector('english', body)); This is because the index contents must be unaffected by <xref linkend="guc-default-text-search-config">. If they were affected, the index contents might be inconsistent because different entries could - contain <type>tsvector</>s that were created with different text search + contain <type>tsvector</type>s that were created with different text search configurations, and there would be no way to guess which was which. It would be impossible to dump and restore such an index correctly. </para> @@ -587,8 +587,8 @@ CREATE INDEX pgweb_idx ON pgweb USING GIN (to_tsvector('english', body)); used in the index above, only a query reference that uses the 2-argument version of <function>to_tsvector</function> with the same configuration name will use that index. That is, <literal>WHERE - to_tsvector('english', body) @@ 'a & b'</> can use the index, - but <literal>WHERE to_tsvector(body) @@ 'a & b'</> cannot. + to_tsvector('english', body) @@ 'a & b'</literal> can use the index, + but <literal>WHERE to_tsvector(body) @@ 'a & b'</literal> cannot. This ensures that an index will be used only with the same configuration used to create the index entries. </para> @@ -601,13 +601,13 @@ CREATE INDEX pgweb_idx ON pgweb USING GIN (to_tsvector('english', body)); CREATE INDEX pgweb_idx ON pgweb USING GIN (to_tsvector(config_name, body)); </programlisting> - where <literal>config_name</> is a column in the <literal>pgweb</> + where <literal>config_name</literal> is a column in the <literal>pgweb</literal> table. This allows mixed configurations in the same index while recording which configuration was used for each index entry. This would be useful, for example, if the document collection contained documents in different languages. Again, queries that are meant to use the index must be phrased to match, e.g., - <literal>WHERE to_tsvector(config_name, body) @@ 'a & b'</>. + <literal>WHERE to_tsvector(config_name, body) @@ 'a & b'</literal>. </para> <para> @@ -619,11 +619,11 @@ CREATE INDEX pgweb_idx ON pgweb USING GIN (to_tsvector('english', title || ' ' | </para> <para> - Another approach is to create a separate <type>tsvector</> column - to hold the output of <function>to_tsvector</>. This example is a + Another approach is to create a separate <type>tsvector</type> column + to hold the output of <function>to_tsvector</function>. This example is a concatenation of <literal>title</literal> and <literal>body</literal>, - using <function>coalesce</> to ensure that one field will still be - indexed when the other is <literal>NULL</>: + using <function>coalesce</function> to ensure that one field will still be + indexed when the other is <literal>NULL</literal>: <programlisting> ALTER TABLE pgweb ADD COLUMN textsearchable_index_col tsvector; @@ -649,10 +649,10 @@ LIMIT 10; </para> <para> - When using a separate column to store the <type>tsvector</> + When using a separate column to store the <type>tsvector</type> representation, - it is necessary to create a trigger to keep the <type>tsvector</> - column current anytime <literal>title</> or <literal>body</> changes. + it is necessary to create a trigger to keep the <type>tsvector</type> + column current anytime <literal>title</literal> or <literal>body</literal> changes. <xref linkend="textsearch-update-triggers"> explains how to do that. </para> @@ -661,13 +661,13 @@ LIMIT 10; is that it is not necessary to explicitly specify the text search configuration in queries in order to make use of the index. As shown in the example above, the query can depend on - <varname>default_text_search_config</>. Another advantage is that + <varname>default_text_search_config</varname>. Another advantage is that searches will be faster, since it will not be necessary to redo the - <function>to_tsvector</> calls to verify index matches. (This is more + <function>to_tsvector</function> calls to verify index matches. (This is more important when using a GiST index than a GIN index; see <xref linkend="textsearch-indexes">.) The expression-index approach is simpler to set up, however, and it requires less disk space since the - <type>tsvector</> representation is not stored explicitly. + <type>tsvector</type> representation is not stored explicitly. </para> </sect2> @@ -701,7 +701,7 @@ LIMIT 10; </indexterm> <synopsis> -to_tsvector(<optional> <replaceable class="parameter">config</replaceable> <type>regconfig</>, </optional> <replaceable class="parameter">document</replaceable> <type>text</>) returns <type>tsvector</> +to_tsvector(<optional> <replaceable class="parameter">config</replaceable> <type>regconfig</type>, </optional> <replaceable class="parameter">document</replaceable> <type>text</type>) returns <type>tsvector</type> </synopsis> <para> @@ -734,12 +734,12 @@ SELECT to_tsvector('english', 'a fat cat sat on a mat - it ate a fat rats'); each token. For each token, a list of dictionaries (<xref linkend="textsearch-dictionaries">) is consulted, where the list can vary depending on the token type. The first dictionary - that <firstterm>recognizes</> the token emits one or more normalized + that <firstterm>recognizes</firstterm> the token emits one or more normalized <firstterm>lexemes</firstterm> to represent the token. For example, <literal>rats</literal> became <literal>rat</literal> because one of the dictionaries recognized that the word <literal>rats</literal> is a plural form of <literal>rat</literal>. Some words are recognized as - <firstterm>stop words</> (<xref linkend="textsearch-stopwords">), which + <firstterm>stop words</firstterm> (<xref linkend="textsearch-stopwords">), which causes them to be ignored since they occur too frequently to be useful in searching. In our example these are <literal>a</literal>, <literal>on</literal>, and <literal>it</literal>. @@ -758,9 +758,9 @@ SELECT to_tsvector('english', 'a fat cat sat on a mat - it ate a fat rats'); <para> The function <function>setweight</function> can be used to label the - entries of a <type>tsvector</type> with a given <firstterm>weight</>, - where a weight is one of the letters <literal>A</>, <literal>B</>, - <literal>C</>, or <literal>D</>. + entries of a <type>tsvector</type> with a given <firstterm>weight</firstterm>, + where a weight is one of the letters <literal>A</literal>, <literal>B</literal>, + <literal>C</literal>, or <literal>D</literal>. This is typically used to mark entries coming from different parts of a document, such as title versus body. Later, this information can be used for ranking of search results. @@ -783,8 +783,8 @@ UPDATE tt SET ti = Here we have used <function>setweight</function> to label the source of each lexeme in the finished <type>tsvector</type>, and then merged - the labeled <type>tsvector</type> values using the <type>tsvector</> - concatenation operator <literal>||</>. (<xref + the labeled <type>tsvector</type> values using the <type>tsvector</type> + concatenation operator <literal>||</literal>. (<xref linkend="textsearch-manipulate-tsvector"> gives details about these operations.) </para> @@ -811,20 +811,20 @@ UPDATE tt SET ti = </indexterm> <synopsis> -to_tsquery(<optional> <replaceable class="parameter">config</replaceable> <type>regconfig</>, </optional> <replaceable class="parameter">querytext</replaceable> <type>text</>) returns <type>tsquery</> +to_tsquery(<optional> <replaceable class="parameter">config</replaceable> <type>regconfig</type>, </optional> <replaceable class="parameter">querytext</replaceable> <type>text</type>) returns <type>tsquery</type> </synopsis> <para> - <function>to_tsquery</function> creates a <type>tsquery</> value from + <function>to_tsquery</function> creates a <type>tsquery</type> value from <replaceable>querytext</replaceable>, which must consist of single tokens - separated by the <type>tsquery</> operators <literal>&</literal> (AND), + separated by the <type>tsquery</type> operators <literal>&</literal> (AND), <literal>|</literal> (OR), <literal>!</literal> (NOT), and <literal><-></literal> (FOLLOWED BY), possibly grouped using parentheses. In other words, the input to <function>to_tsquery</function> must already follow the general rules for - <type>tsquery</> input, as described in <xref + <type>tsquery</type> input, as described in <xref linkend="datatype-tsquery">. The difference is that while basic - <type>tsquery</> input takes the tokens at face value, + <type>tsquery</type> input takes the tokens at face value, <function>to_tsquery</function> normalizes each token into a lexeme using the specified or default configuration, and discards any tokens that are stop words according to the configuration. For example: @@ -836,8 +836,8 @@ SELECT to_tsquery('english', 'The & Fat & Rats'); 'fat' & 'rat' </screen> - As in basic <type>tsquery</> input, weight(s) can be attached to each - lexeme to restrict it to match only <type>tsvector</> lexemes of those + As in basic <type>tsquery</type> input, weight(s) can be attached to each + lexeme to restrict it to match only <type>tsvector</type> lexemes of those weight(s). For example: <screen> @@ -847,7 +847,7 @@ SELECT to_tsquery('english', 'Fat | Rats:AB'); 'fat' | 'rat':AB </screen> - Also, <literal>*</> can be attached to a lexeme to specify prefix matching: + Also, <literal>*</literal> can be attached to a lexeme to specify prefix matching: <screen> SELECT to_tsquery('supern:*A & star:A*B'); @@ -856,7 +856,7 @@ SELECT to_tsquery('supern:*A & star:A*B'); 'supern':*A & 'star':*AB </screen> - Such a lexeme will match any word in a <type>tsvector</> that begins + Such a lexeme will match any word in a <type>tsvector</type> that begins with the given string. </para> @@ -884,13 +884,13 @@ SELECT to_tsquery('''supernovae stars'' & !crab'); </indexterm> <synopsis> -plainto_tsquery(<optional> <replaceable class="parameter">config</replaceable> <type>regconfig</>, </optional> <replaceable class="parameter">querytext</replaceable> <type>text</>) returns <type>tsquery</> +plainto_tsquery(<optional> <replaceable class="parameter">config</replaceable> <type>regconfig</type>, </optional> <replaceable class="parameter">querytext</replaceable> <type>text</type>) returns <type>tsquery</type> </synopsis> <para> - <function>plainto_tsquery</> transforms the unformatted text + <function>plainto_tsquery</function> transforms the unformatted text <replaceable>querytext</replaceable> to a <type>tsquery</type> value. - The text is parsed and normalized much as for <function>to_tsvector</>, + The text is parsed and normalized much as for <function>to_tsvector</function>, then the <literal>&</literal> (AND) <type>tsquery</type> operator is inserted between surviving words. </para> @@ -905,7 +905,7 @@ SELECT plainto_tsquery('english', 'The Fat Rats'); 'fat' & 'rat' </screen> - Note that <function>plainto_tsquery</> will not + Note that <function>plainto_tsquery</function> will not recognize <type>tsquery</type> operators, weight labels, or prefix-match labels in its input: @@ -924,16 +924,16 @@ SELECT plainto_tsquery('english', 'The Fat & Rats:C'); </indexterm> <synopsis> -phraseto_tsquery(<optional> <replaceable class="parameter">config</replaceable> <type>regconfig</>, </optional> <replaceable class="parameter">querytext</replaceable> <type>text</>) returns <type>tsquery</> +phraseto_tsquery(<optional> <replaceable class="parameter">config</replaceable> <type>regconfig</type>, </optional> <replaceable class="parameter">querytext</replaceable> <type>text</type>) returns <type>tsquery</type> </synopsis> <para> - <function>phraseto_tsquery</> behaves much like - <function>plainto_tsquery</>, except that it inserts + <function>phraseto_tsquery</function> behaves much like + <function>plainto_tsquery</function>, except that it inserts the <literal><-></literal> (FOLLOWED BY) operator between surviving words instead of the <literal>&</literal> (AND) operator. Also, stop words are not simply discarded, but are accounted for by - inserting <literal><<replaceable>N</>></literal> operators rather + inserting <literal><<replaceable>N</replaceable>></literal> operators rather than <literal><-></literal> operators. This function is useful when searching for exact lexeme sequences, since the FOLLOWED BY operators check lexeme order not just the presence of all the lexemes. @@ -949,8 +949,8 @@ SELECT phraseto_tsquery('english', 'The Fat Rats'); 'fat' <-> 'rat' </screen> - Like <function>plainto_tsquery</>, the - <function>phraseto_tsquery</> function will not + Like <function>plainto_tsquery</function>, the + <function>phraseto_tsquery</function> function will not recognize <type>tsquery</type> operators, weight labels, or prefix-match labels in its input: @@ -994,7 +994,7 @@ SELECT phraseto_tsquery('english', 'The Fat & Rats:C'); <primary>ts_rank</primary> </indexterm> - <literal>ts_rank(<optional> <replaceable class="parameter">weights</replaceable> <type>float4[]</>, </optional> <replaceable class="parameter">vector</replaceable> <type>tsvector</>, <replaceable class="parameter">query</replaceable> <type>tsquery</> <optional>, <replaceable class="parameter">normalization</replaceable> <type>integer</> </optional>) returns <type>float4</></literal> + <literal>ts_rank(<optional> <replaceable class="parameter">weights</replaceable> <type>float4[]</type>, </optional> <replaceable class="parameter">vector</replaceable> <type>tsvector</type>, <replaceable class="parameter">query</replaceable> <type>tsquery</type> <optional>, <replaceable class="parameter">normalization</replaceable> <type>integer</type> </optional>) returns <type>float4</type></literal> </term> <listitem> @@ -1011,7 +1011,7 @@ SELECT phraseto_tsquery('english', 'The Fat & Rats:C'); <primary>ts_rank_cd</primary> </indexterm> - <literal>ts_rank_cd(<optional> <replaceable class="parameter">weights</replaceable> <type>float4[]</>, </optional> <replaceable class="parameter">vector</replaceable> <type>tsvector</>, <replaceable class="parameter">query</replaceable> <type>tsquery</> <optional>, <replaceable class="parameter">normalization</replaceable> <type>integer</> </optional>) returns <type>float4</></literal> + <literal>ts_rank_cd(<optional> <replaceable class="parameter">weights</replaceable> <type>float4[]</type>, </optional> <replaceable class="parameter">vector</replaceable> <type>tsvector</type>, <replaceable class="parameter">query</replaceable> <type>tsquery</type> <optional>, <replaceable class="parameter">normalization</replaceable> <type>integer</type> </optional>) returns <type>float4</type></literal> </term> <listitem> @@ -1020,19 +1020,19 @@ SELECT phraseto_tsquery('english', 'The Fat & Rats:C'); ranking for the given document vector and query, as described in Clarke, Cormack, and Tudhope's "Relevance Ranking for One to Three Term Queries" in the journal "Information Processing and Management", - 1999. Cover density is similar to <function>ts_rank</> ranking + 1999. Cover density is similar to <function>ts_rank</function> ranking except that the proximity of matching lexemes to each other is taken into consideration. </para> <para> This function requires lexeme positional information to perform - its calculation. Therefore, it ignores any <quote>stripped</> - lexemes in the <type>tsvector</>. If there are no unstripped + its calculation. Therefore, it ignores any <quote>stripped</quote> + lexemes in the <type>tsvector</type>. If there are no unstripped lexemes in the input, the result will be zero. (See <xref linkend="textsearch-manipulate-tsvector"> for more information - about the <function>strip</> function and positional information - in <type>tsvector</>s.) + about the <function>strip</function> function and positional information + in <type>tsvector</type>s.) </para> </listitem> </varlistentry> @@ -1094,7 +1094,7 @@ SELECT phraseto_tsquery('english', 'The Fat & Rats:C'); <listitem> <para> 4 divides the rank by the mean harmonic distance between extents - (this is implemented only by <function>ts_rank_cd</>) + (this is implemented only by <function>ts_rank_cd</function>) </para> </listitem> <listitem> @@ -1189,7 +1189,7 @@ LIMIT 10; <para> To present search results it is ideal to show a part of each document and how it is related to the query. Usually, search engines show fragments of - the document with marked search terms. <productname>PostgreSQL</> + the document with marked search terms. <productname>PostgreSQL</productname> provides a function <function>ts_headline</function> that implements this functionality. </para> @@ -1199,7 +1199,7 @@ LIMIT 10; </indexterm> <synopsis> -ts_headline(<optional> <replaceable class="parameter">config</replaceable> <type>regconfig</>, </optional> <replaceable class="parameter">document</replaceable> <type>text</>, <replaceable class="parameter">query</replaceable> <type>tsquery</> <optional>, <replaceable class="parameter">options</replaceable> <type>text</> </optional>) returns <type>text</> +ts_headline(<optional> <replaceable class="parameter">config</replaceable> <type>regconfig</type>, </optional> <replaceable class="parameter">document</replaceable> <type>text</type>, <replaceable class="parameter">query</replaceable> <type>tsquery</type> <optional>, <replaceable class="parameter">options</replaceable> <type>text</type> </optional>) returns <type>text</type> </synopsis> <para> @@ -1215,13 +1215,13 @@ ts_headline(<optional> <replaceable class="parameter">config</replaceable> <type <para> If an <replaceable>options</replaceable> string is specified it must consist of a comma-separated list of one or more - <replaceable>option</><literal>=</><replaceable>value</> pairs. + <replaceable>option</replaceable><literal>=</literal><replaceable>value</replaceable> pairs. The available options are: <itemizedlist spacing="compact" mark="bullet"> <listitem> <para> - <literal>StartSel</>, <literal>StopSel</literal>: the strings with + <literal>StartSel</literal>, <literal>StopSel</literal>: the strings with which to delimit query words appearing in the document, to distinguish them from other excerpted words. You must double-quote these strings if they contain spaces or commas. @@ -1229,7 +1229,7 @@ ts_headline(<optional> <replaceable class="parameter">config</replaceable> <type </listitem> <listitem> <para> - <literal>MaxWords</>, <literal>MinWords</literal>: these numbers + <literal>MaxWords</literal>, <literal>MinWords</literal>: these numbers determine the longest and shortest headlines to output. </para> </listitem> @@ -1256,10 +1256,10 @@ ts_headline(<optional> <replaceable class="parameter">config</replaceable> <type finds text fragments with as many query words as possible and stretches those fragments around the query words. As a result query words are close to the middle of each fragment and have words on - each side. Each fragment will be of at most <literal>MaxWords</> and - words of length <literal>ShortWord</> or less are dropped at the start + each side. Each fragment will be of at most <literal>MaxWords</literal> and + words of length <literal>ShortWord</literal> or less are dropped at the start and end of each fragment. If not all query words are found in the - document, then a single fragment of the first <literal>MinWords</> + document, then a single fragment of the first <literal>MinWords</literal> in the document will be displayed. </para> </listitem> @@ -1312,7 +1312,7 @@ query.', </para> <para> - <function>ts_headline</> uses the original document, not a + <function>ts_headline</function> uses the original document, not a <type>tsvector</type> summary, so it can be slow and should be used with care. </para> @@ -1334,10 +1334,10 @@ query.', <para> <xref linkend="textsearch-parsing-documents"> showed how raw textual - documents can be converted into <type>tsvector</> values. + documents can be converted into <type>tsvector</type> values. <productname>PostgreSQL</productname> also provides functions and operators that can be used to manipulate documents that are already - in <type>tsvector</> form. + in <type>tsvector</type> form. </para> <variablelist> @@ -1349,18 +1349,18 @@ query.', <primary>tsvector concatenation</primary> </indexterm> - <literal><type>tsvector</> || <type>tsvector</></literal> + <literal><type>tsvector</type> || <type>tsvector</type></literal> </term> <listitem> <para> - The <type>tsvector</> concatenation operator + The <type>tsvector</type> concatenation operator returns a vector which combines the lexemes and positional information of the two vectors given as arguments. Positions and weight labels are retained during the concatenation. Positions appearing in the right-hand vector are offset by the largest position mentioned in the left-hand vector, so that the result is - nearly equivalent to the result of performing <function>to_tsvector</> + nearly equivalent to the result of performing <function>to_tsvector</function> on the concatenation of the two original document strings. (The equivalence is not exact, because any stop-words removed from the end of the left-hand argument will not affect the result, whereas @@ -1370,11 +1370,11 @@ query.', <para> One advantage of using concatenation in the vector form, rather than - concatenating text before applying <function>to_tsvector</>, is that + concatenating text before applying <function>to_tsvector</function>, is that you can use different configurations to parse different sections - of the document. Also, because the <function>setweight</> function + of the document. Also, because the <function>setweight</function> function marks all lexemes of the given vector the same way, it is necessary - to parse the text and do <function>setweight</> before concatenating + to parse the text and do <function>setweight</function> before concatenating if you want to label different parts of the document with different weights. </para> @@ -1388,13 +1388,13 @@ query.', <primary>setweight</primary> </indexterm> - <literal>setweight(<replaceable class="parameter">vector</replaceable> <type>tsvector</>, <replaceable class="parameter">weight</replaceable> <type>"char"</>) returns <type>tsvector</></literal> + <literal>setweight(<replaceable class="parameter">vector</replaceable> <type>tsvector</type>, <replaceable class="parameter">weight</replaceable> <type>"char"</type>) returns <type>tsvector</type></literal> </term> <listitem> <para> - <function>setweight</> returns a copy of the input vector in which every - position has been labeled with the given <replaceable>weight</>, either + <function>setweight</function> returns a copy of the input vector in which every + position has been labeled with the given <replaceable>weight</replaceable>, either <literal>A</literal>, <literal>B</literal>, <literal>C</literal>, or <literal>D</literal>. (<literal>D</literal> is the default for new vectors and as such is not displayed on output.) These labels are @@ -1403,9 +1403,9 @@ query.', </para> <para> - Note that weight labels apply to <emphasis>positions</>, not - <emphasis>lexemes</>. If the input vector has been stripped of - positions then <function>setweight</> does nothing. + Note that weight labels apply to <emphasis>positions</emphasis>, not + <emphasis>lexemes</emphasis>. If the input vector has been stripped of + positions then <function>setweight</function> does nothing. </para> </listitem> </varlistentry> @@ -1416,7 +1416,7 @@ query.', <primary>length(tsvector)</primary> </indexterm> - <literal>length(<replaceable class="parameter">vector</replaceable> <type>tsvector</>) returns <type>integer</></literal> + <literal>length(<replaceable class="parameter">vector</replaceable> <type>tsvector</type>) returns <type>integer</type></literal> </term> <listitem> @@ -1433,7 +1433,7 @@ query.', <primary>strip</primary> </indexterm> - <literal>strip(<replaceable class="parameter">vector</replaceable> <type>tsvector</>) returns <type>tsvector</></literal> + <literal>strip(<replaceable class="parameter">vector</replaceable> <type>tsvector</type>) returns <type>tsvector</type></literal> </term> <listitem> @@ -1443,7 +1443,7 @@ query.', smaller than an unstripped vector, but it is also less useful. Relevance ranking does not work as well on stripped vectors as unstripped ones. Also, - the <literal><-></> (FOLLOWED BY) <type>tsquery</> operator + the <literal><-></literal> (FOLLOWED BY) <type>tsquery</type> operator will never match stripped input, since it cannot determine the distance between lexeme occurrences. </para> @@ -1454,7 +1454,7 @@ query.', </variablelist> <para> - A full list of <type>tsvector</>-related functions is available + A full list of <type>tsvector</type>-related functions is available in <xref linkend="textsearch-functions-table">. </para> @@ -1465,10 +1465,10 @@ query.', <para> <xref linkend="textsearch-parsing-queries"> showed how raw textual - queries can be converted into <type>tsquery</> values. + queries can be converted into <type>tsquery</type> values. <productname>PostgreSQL</productname> also provides functions and operators that can be used to manipulate queries that are already - in <type>tsquery</> form. + in <type>tsquery</type> form. </para> <variablelist> @@ -1476,7 +1476,7 @@ query.', <varlistentry> <term> - <literal><type>tsquery</> && <type>tsquery</></literal> + <literal><type>tsquery</type> && <type>tsquery</type></literal> </term> <listitem> @@ -1490,7 +1490,7 @@ query.', <varlistentry> <term> - <literal><type>tsquery</> || <type>tsquery</></literal> + <literal><type>tsquery</type> || <type>tsquery</type></literal> </term> <listitem> @@ -1504,7 +1504,7 @@ query.', <varlistentry> <term> - <literal>!! <type>tsquery</></literal> + <literal>!! <type>tsquery</type></literal> </term> <listitem> @@ -1518,15 +1518,15 @@ query.', <varlistentry> <term> - <literal><type>tsquery</> <-> <type>tsquery</></literal> + <literal><type>tsquery</type> <-> <type>tsquery</type></literal> </term> <listitem> <para> Returns a query that searches for a match to the first given query immediately followed by a match to the second given query, using - the <literal><-></> (FOLLOWED BY) - <type>tsquery</> operator. For example: + the <literal><-></literal> (FOLLOWED BY) + <type>tsquery</type> operator. For example: <screen> SELECT to_tsquery('fat') <-> to_tsquery('cat | rat'); @@ -1546,7 +1546,7 @@ SELECT to_tsquery('fat') <-> to_tsquery('cat | rat'); <primary>tsquery_phrase</primary> </indexterm> - <literal>tsquery_phrase(<replaceable class="parameter">query1</replaceable> <type>tsquery</>, <replaceable class="parameter">query2</replaceable> <type>tsquery</> [, <replaceable class="parameter">distance</replaceable> <type>integer</> ]) returns <type>tsquery</></literal> + <literal>tsquery_phrase(<replaceable class="parameter">query1</replaceable> <type>tsquery</type>, <replaceable class="parameter">query2</replaceable> <type>tsquery</type> [, <replaceable class="parameter">distance</replaceable> <type>integer</type> ]) returns <type>tsquery</type></literal> </term> <listitem> @@ -1554,8 +1554,8 @@ SELECT to_tsquery('fat') <-> to_tsquery('cat | rat'); Returns a query that searches for a match to the first given query followed by a match to the second given query at a distance of at <replaceable>distance</replaceable> lexemes, using - the <literal><<replaceable>N</>></literal> - <type>tsquery</> operator. For example: + the <literal><<replaceable>N</replaceable>></literal> + <type>tsquery</type> operator. For example: <screen> SELECT tsquery_phrase(to_tsquery('fat'), to_tsquery('cat'), 10); @@ -1575,13 +1575,13 @@ SELECT tsquery_phrase(to_tsquery('fat'), to_tsquery('cat'), 10); <primary>numnode</primary> </indexterm> - <literal>numnode(<replaceable class="parameter">query</replaceable> <type>tsquery</>) returns <type>integer</></literal> + <literal>numnode(<replaceable class="parameter">query</replaceable> <type>tsquery</type>) returns <type>integer</type></literal> </term> <listitem> <para> Returns the number of nodes (lexemes plus operators) in a - <type>tsquery</>. This function is useful + <type>tsquery</type>. This function is useful to determine if the <replaceable>query</replaceable> is meaningful (returns > 0), or contains only stop words (returns 0). Examples: @@ -1609,12 +1609,12 @@ SELECT numnode('foo & bar'::tsquery); <primary>querytree</primary> </indexterm> - <literal>querytree(<replaceable class="parameter">query</replaceable> <type>tsquery</>) returns <type>text</></literal> + <literal>querytree(<replaceable class="parameter">query</replaceable> <type>tsquery</type>) returns <type>text</type></literal> </term> <listitem> <para> - Returns the portion of a <type>tsquery</> that can be used for + Returns the portion of a <type>tsquery</type> that can be used for searching an index. This function is useful for detecting unindexable queries, for example those containing only stop words or only negated terms. For example: @@ -1640,16 +1640,16 @@ SELECT querytree(to_tsquery('!defined')); <para> The <function>ts_rewrite</function> family of functions search a - given <type>tsquery</> for occurrences of a target + given <type>tsquery</type> for occurrences of a target subquery, and replace each occurrence with a substitute subquery. In essence this operation is a - <type>tsquery</>-specific version of substring replacement. + <type>tsquery</type>-specific version of substring replacement. A target and substitute combination can be - thought of as a <firstterm>query rewrite rule</>. A collection + thought of as a <firstterm>query rewrite rule</firstterm>. A collection of such rewrite rules can be a powerful search aid. For example, you can expand the search using synonyms - (e.g., <literal>new york</>, <literal>big apple</>, <literal>nyc</>, - <literal>gotham</>) or narrow the search to direct the user to some hot + (e.g., <literal>new york</literal>, <literal>big apple</literal>, <literal>nyc</literal>, + <literal>gotham</literal>) or narrow the search to direct the user to some hot topic. There is some overlap in functionality between this feature and thesaurus dictionaries (<xref linkend="textsearch-thesaurus">). However, you can modify a set of rewrite rules on-the-fly without @@ -1662,12 +1662,12 @@ SELECT querytree(to_tsquery('!defined')); <varlistentry> <term> - <literal>ts_rewrite (<replaceable class="parameter">query</replaceable> <type>tsquery</>, <replaceable class="parameter">target</replaceable> <type>tsquery</>, <replaceable class="parameter">substitute</replaceable> <type>tsquery</>) returns <type>tsquery</></literal> + <literal>ts_rewrite (<replaceable class="parameter">query</replaceable> <type>tsquery</type>, <replaceable class="parameter">target</replaceable> <type>tsquery</type>, <replaceable class="parameter">substitute</replaceable> <type>tsquery</type>) returns <type>tsquery</type></literal> </term> <listitem> <para> - This form of <function>ts_rewrite</> simply applies a single + This form of <function>ts_rewrite</function> simply applies a single rewrite rule: <replaceable class="parameter">target</replaceable> is replaced by <replaceable class="parameter">substitute</replaceable> wherever it appears in <replaceable @@ -1686,18 +1686,18 @@ SELECT ts_rewrite('a & b'::tsquery, 'a'::tsquery, 'c'::tsquery); <varlistentry> <term> - <literal>ts_rewrite (<replaceable class="parameter">query</> <type>tsquery</>, <replaceable class="parameter">select</> <type>text</>) returns <type>tsquery</></literal> + <literal>ts_rewrite (<replaceable class="parameter">query</replaceable> <type>tsquery</type>, <replaceable class="parameter">select</replaceable> <type>text</type>) returns <type>tsquery</type></literal> </term> <listitem> <para> - This form of <function>ts_rewrite</> accepts a starting - <replaceable>query</> and a SQL <replaceable>select</> command, which - is given as a text string. The <replaceable>select</> must yield two - columns of <type>tsquery</> type. For each row of the - <replaceable>select</> result, occurrences of the first column value + This form of <function>ts_rewrite</function> accepts a starting + <replaceable>query</replaceable> and a SQL <replaceable>select</replaceable> command, which + is given as a text string. The <replaceable>select</replaceable> must yield two + columns of <type>tsquery</type> type. For each row of the + <replaceable>select</replaceable> result, occurrences of the first column value (the target) are replaced by the second column value (the substitute) - within the current <replaceable>query</> value. For example: + within the current <replaceable>query</replaceable> value. For example: <screen> CREATE TABLE aliases (t tsquery PRIMARY KEY, s tsquery); @@ -1713,7 +1713,7 @@ SELECT ts_rewrite('a & b'::tsquery, 'SELECT t,s FROM aliases'); <para> Note that when multiple rewrite rules are applied in this way, the order of application can be important; so in practice you will - want the source query to <literal>ORDER BY</> some ordering key. + want the source query to <literal>ORDER BY</literal> some ordering key. </para> </listitem> </varlistentry> @@ -1777,9 +1777,9 @@ SELECT ts_rewrite('a & b'::tsquery, </indexterm> <para> - When using a separate column to store the <type>tsvector</> representation + When using a separate column to store the <type>tsvector</type> representation of your documents, it is necessary to create a trigger to update the - <type>tsvector</> column when the document content columns change. + <type>tsvector</type> column when the document content columns change. Two built-in trigger functions are available for this, or you can write your own. </para> @@ -1790,9 +1790,9 @@ tsvector_update_trigger_column(<replaceable class="parameter">tsvector_column_na </synopsis> <para> - These trigger functions automatically compute a <type>tsvector</> + These trigger functions automatically compute a <type>tsvector</type> column from one or more textual columns, under the control of - parameters specified in the <command>CREATE TRIGGER</> command. + parameters specified in the <command>CREATE TRIGGER</command> command. An example of their use is: <screen> @@ -1819,24 +1819,24 @@ SELECT title, body FROM messages WHERE tsv @@ to_tsquery('title & body'); title here | the body text is here </screen> - Having created this trigger, any change in <structfield>title</> or - <structfield>body</> will automatically be reflected into - <structfield>tsv</>, without the application having to worry about it. + Having created this trigger, any change in <structfield>title</structfield> or + <structfield>body</structfield> will automatically be reflected into + <structfield>tsv</structfield>, without the application having to worry about it. </para> <para> - The first trigger argument must be the name of the <type>tsvector</> + The first trigger argument must be the name of the <type>tsvector</type> column to be updated. The second argument specifies the text search configuration to be used to perform the conversion. For - <function>tsvector_update_trigger</>, the configuration name is simply + <function>tsvector_update_trigger</function>, the configuration name is simply given as the second trigger argument. It must be schema-qualified as shown above, so that the trigger behavior will not change with changes - in <varname>search_path</>. For - <function>tsvector_update_trigger_column</>, the second trigger argument + in <varname>search_path</varname>. For + <function>tsvector_update_trigger_column</function>, the second trigger argument is the name of another table column, which must be of type - <type>regconfig</>. This allows a per-row selection of configuration + <type>regconfig</type>. This allows a per-row selection of configuration to be made. The remaining argument(s) are the names of textual columns - (of type <type>text</>, <type>varchar</>, or <type>char</>). These + (of type <type>text</type>, <type>varchar</type>, or <type>char</type>). These will be included in the document in the order given. NULL values will be skipped (but the other columns will still be indexed). </para> @@ -1865,9 +1865,9 @@ CREATE TRIGGER tsvectorupdate BEFORE INSERT OR UPDATE <para> Keep in mind that it is important to specify the configuration name - explicitly when creating <type>tsvector</> values inside triggers, + explicitly when creating <type>tsvector</type> values inside triggers, so that the column's contents will not be affected by changes to - <varname>default_text_search_config</>. Failure to do this is likely to + <varname>default_text_search_config</varname>. Failure to do this is likely to lead to problems such as search results changing after a dump and reload. </para> @@ -1881,38 +1881,38 @@ CREATE TRIGGER tsvectorupdate BEFORE INSERT OR UPDATE </indexterm> <para> - The function <function>ts_stat</> is useful for checking your + The function <function>ts_stat</function> is useful for checking your configuration and for finding stop-word candidates. </para> <synopsis> -ts_stat(<replaceable class="parameter">sqlquery</replaceable> <type>text</>, <optional> <replaceable class="parameter">weights</replaceable> <type>text</>, </optional> - OUT <replaceable class="parameter">word</replaceable> <type>text</>, OUT <replaceable class="parameter">ndoc</replaceable> <type>integer</>, - OUT <replaceable class="parameter">nentry</replaceable> <type>integer</>) returns <type>setof record</> +ts_stat(<replaceable class="parameter">sqlquery</replaceable> <type>text</type>, <optional> <replaceable class="parameter">weights</replaceable> <type>text</type>, </optional> + OUT <replaceable class="parameter">word</replaceable> <type>text</type>, OUT <replaceable class="parameter">ndoc</replaceable> <type>integer</type>, + OUT <replaceable class="parameter">nentry</replaceable> <type>integer</type>) returns <type>setof record</type> </synopsis> <para> <replaceable>sqlquery</replaceable> is a text value containing an SQL query which must return a single <type>tsvector</type> column. - <function>ts_stat</> executes the query and returns statistics about + <function>ts_stat</function> executes the query and returns statistics about each distinct lexeme (word) contained in the <type>tsvector</type> data. The columns returned are <itemizedlist spacing="compact" mark="bullet"> <listitem> <para> - <replaceable>word</> <type>text</> — the value of a lexeme + <replaceable>word</replaceable> <type>text</type> — the value of a lexeme </para> </listitem> <listitem> <para> - <replaceable>ndoc</> <type>integer</> — number of documents - (<type>tsvector</>s) the word occurred in + <replaceable>ndoc</replaceable> <type>integer</type> — number of documents + (<type>tsvector</type>s) the word occurred in </para> </listitem> <listitem> <para> - <replaceable>nentry</> <type>integer</> — total number of + <replaceable>nentry</replaceable> <type>integer</type> — total number of occurrences of the word </para> </listitem> @@ -1931,8 +1931,8 @@ ORDER BY nentry DESC, ndoc DESC, word LIMIT 10; </programlisting> - The same, but counting only word occurrences with weight <literal>A</> - or <literal>B</>: + The same, but counting only word occurrences with weight <literal>A</literal> + or <literal>B</literal>: <programlisting> SELECT * FROM ts_stat('SELECT vector FROM apod', 'ab') @@ -1950,7 +1950,7 @@ LIMIT 10; <para> Text search parsers are responsible for splitting raw document text - into <firstterm>tokens</> and identifying each token's type, where + into <firstterm>tokens</firstterm> and identifying each token's type, where the set of possible types is defined by the parser itself. Note that a parser does not modify the text at all — it simply identifies plausible word boundaries. Because of this limited scope, @@ -1961,7 +1961,7 @@ LIMIT 10; </para> <para> - The built-in parser is named <literal>pg_catalog.default</>. + The built-in parser is named <literal>pg_catalog.default</literal>. It recognizes 23 token types, shown in <xref linkend="textsearch-default-parser">. </para> @@ -1977,119 +1977,119 @@ LIMIT 10; </thead> <tbody> <row> - <entry><literal>asciiword</></entry> + <entry><literal>asciiword</literal></entry> <entry>Word, all ASCII letters</entry> <entry><literal>elephant</literal></entry> </row> <row> - <entry><literal>word</></entry> + <entry><literal>word</literal></entry> <entry>Word, all letters</entry> <entry><literal>mañana</literal></entry> </row> <row> - <entry><literal>numword</></entry> + <entry><literal>numword</literal></entry> <entry>Word, letters and digits</entry> <entry><literal>beta1</literal></entry> </row> <row> - <entry><literal>asciihword</></entry> + <entry><literal>asciihword</literal></entry> <entry>Hyphenated word, all ASCII</entry> <entry><literal>up-to-date</literal></entry> </row> <row> - <entry><literal>hword</></entry> + <entry><literal>hword</literal></entry> <entry>Hyphenated word, all letters</entry> <entry><literal>lógico-matemática</literal></entry> </row> <row> - <entry><literal>numhword</></entry> + <entry><literal>numhword</literal></entry> <entry>Hyphenated word, letters and digits</entry> <entry><literal>postgresql-beta1</literal></entry> </row> <row> - <entry><literal>hword_asciipart</></entry> + <entry><literal>hword_asciipart</literal></entry> <entry>Hyphenated word part, all ASCII</entry> <entry><literal>postgresql</literal> in the context <literal>postgresql-beta1</literal></entry> </row> <row> - <entry><literal>hword_part</></entry> + <entry><literal>hword_part</literal></entry> <entry>Hyphenated word part, all letters</entry> <entry><literal>lógico</literal> or <literal>matemática</literal> in the context <literal>lógico-matemática</literal></entry> </row> <row> - <entry><literal>hword_numpart</></entry> + <entry><literal>hword_numpart</literal></entry> <entry>Hyphenated word part, letters and digits</entry> <entry><literal>beta1</literal> in the context <literal>postgresql-beta1</literal></entry> </row> <row> - <entry><literal>email</></entry> + <entry><literal>email</literal></entry> <entry>Email address</entry> <entry><literal>foo@example.com</literal></entry> </row> <row> - <entry><literal>protocol</></entry> + <entry><literal>protocol</literal></entry> <entry>Protocol head</entry> <entry><literal>http://</literal></entry> </row> <row> - <entry><literal>url</></entry> + <entry><literal>url</literal></entry> <entry>URL</entry> <entry><literal>example.com/stuff/index.html</literal></entry> </row> <row> - <entry><literal>host</></entry> + <entry><literal>host</literal></entry> <entry>Host</entry> <entry><literal>example.com</literal></entry> </row> <row> - <entry><literal>url_path</></entry> + <entry><literal>url_path</literal></entry> <entry>URL path</entry> <entry><literal>/stuff/index.html</literal>, in the context of a URL</entry> </row> <row> - <entry><literal>file</></entry> + <entry><literal>file</literal></entry> <entry>File or path name</entry> <entry><literal>/usr/local/foo.txt</literal>, if not within a URL</entry> </row> <row> - <entry><literal>sfloat</></entry> + <entry><literal>sfloat</literal></entry> <entry>Scientific notation</entry> <entry><literal>-1.234e56</literal></entry> </row> <row> - <entry><literal>float</></entry> + <entry><literal>float</literal></entry> <entry>Decimal notation</entry> <entry><literal>-1.234</literal></entry> </row> <row> - <entry><literal>int</></entry> + <entry><literal>int</literal></entry> <entry>Signed integer</entry> <entry><literal>-1234</literal></entry> </row> <row> - <entry><literal>uint</></entry> + <entry><literal>uint</literal></entry> <entry>Unsigned integer</entry> <entry><literal>1234</literal></entry> </row> <row> - <entry><literal>version</></entry> + <entry><literal>version</literal></entry> <entry>Version number</entry> <entry><literal>8.3.0</literal></entry> </row> <row> - <entry><literal>tag</></entry> + <entry><literal>tag</literal></entry> <entry>XML tag</entry> <entry><literal><a href="dictionaries.html"></literal></entry> </row> <row> - <entry><literal>entity</></entry> + <entry><literal>entity</literal></entry> <entry>XML entity</entry> <entry><literal>&amp;</literal></entry> </row> <row> - <entry><literal>blank</></entry> + <entry><literal>blank</literal></entry> <entry>Space symbols</entry> <entry>(any whitespace or punctuation not otherwise recognized)</entry> </row> @@ -2099,16 +2099,16 @@ LIMIT 10; <note> <para> - The parser's notion of a <quote>letter</> is determined by the database's - locale setting, specifically <varname>lc_ctype</>. Words containing + The parser's notion of a <quote>letter</quote> is determined by the database's + locale setting, specifically <varname>lc_ctype</varname>. Words containing only the basic ASCII letters are reported as a separate token type, since it is sometimes useful to distinguish them. In most European - languages, token types <literal>word</> and <literal>asciiword</> + languages, token types <literal>word</literal> and <literal>asciiword</literal> should be treated alike. </para> <para> - <literal>email</> does not support all valid email characters as + <literal>email</literal> does not support all valid email characters as defined by RFC 5322. Specifically, the only non-alphanumeric characters supported for email user names are period, dash, and underscore. @@ -2154,9 +2154,9 @@ SELECT alias, description, token FROM ts_debug('http://example.com/stuff/index.h <para> Dictionaries are used to eliminate words that should not be considered in a - search (<firstterm>stop words</>), and to <firstterm>normalize</> words so + search (<firstterm>stop words</firstterm>), and to <firstterm>normalize</firstterm> words so that different derived forms of the same word will match. A successfully - normalized word is called a <firstterm>lexeme</>. Aside from + normalized word is called a <firstterm>lexeme</firstterm>. Aside from improving search quality, normalization and removal of stop words reduce the size of the <type>tsvector</type> representation of a document, thereby improving performance. Normalization does not always have linguistic meaning @@ -2229,10 +2229,10 @@ SELECT alias, description, token FROM ts_debug('http://example.com/stuff/index.h </listitem> <listitem> <para> - a single lexeme with the <literal>TSL_FILTER</> flag set, to replace + a single lexeme with the <literal>TSL_FILTER</literal> flag set, to replace the original token with a new token to be passed to subsequent dictionaries (a dictionary that does this is called a - <firstterm>filtering dictionary</>) + <firstterm>filtering dictionary</firstterm>) </para> </listitem> <listitem> @@ -2254,7 +2254,7 @@ SELECT alias, description, token FROM ts_debug('http://example.com/stuff/index.h used to create new dictionaries with custom parameters. Each predefined dictionary template is described below. If no existing template is suitable, it is possible to create new ones; see the - <filename>contrib/</> area of the <productname>PostgreSQL</> distribution + <filename>contrib/</filename> area of the <productname>PostgreSQL</productname> distribution for examples. </para> @@ -2267,7 +2267,7 @@ SELECT alias, description, token FROM ts_debug('http://example.com/stuff/index.h until some dictionary recognizes it as a known word. If it is identified as a stop word, or if no dictionary recognizes the token, it will be discarded and not indexed or searched for. - Normally, the first dictionary that returns a non-<literal>NULL</> + Normally, the first dictionary that returns a non-<literal>NULL</literal> output determines the result, and any remaining dictionaries are not consulted; but a filtering dictionary can replace the given word with a modified word, which is then passed to subsequent dictionaries. @@ -2277,11 +2277,11 @@ SELECT alias, description, token FROM ts_debug('http://example.com/stuff/index.h The general rule for configuring a list of dictionaries is to place first the most narrow, most specific dictionary, then the more general dictionaries, finishing with a very general dictionary, like - a <application>Snowball</> stemmer or <literal>simple</>, which + a <application>Snowball</application> stemmer or <literal>simple</literal>, which recognizes everything. For example, for an astronomy-specific search (<literal>astro_en</literal> configuration) one could bind token type <type>asciiword</type> (ASCII word) to a synonym dictionary of astronomical - terms, a general English dictionary and a <application>Snowball</> English + terms, a general English dictionary and a <application>Snowball</application> English stemmer: <programlisting> @@ -2305,7 +2305,7 @@ ALTER TEXT SEARCH CONFIGURATION astro_en Stop words are words that are very common, appear in almost every document, and have no discrimination value. Therefore, they can be ignored in the context of full text searching. For example, every English text - contains words like <literal>a</literal> and <literal>the</>, so it is + contains words like <literal>a</literal> and <literal>the</literal>, so it is useless to store them in an index. However, stop words do affect the positions in <type>tsvector</type>, which in turn affect ranking: @@ -2347,7 +2347,7 @@ SELECT ts_rank_cd (to_tsvector('english','list stop words'), to_tsquery('list &a <title>Simple Dictionary</title> <para> - The <literal>simple</> dictionary template operates by converting the + The <literal>simple</literal> dictionary template operates by converting the input token to lower case and checking it against a file of stop words. If it is found in the file then an empty array is returned, causing the token to be discarded. If not, the lower-cased form of the word @@ -2357,7 +2357,7 @@ SELECT ts_rank_cd (to_tsvector('english','list stop words'), to_tsquery('list &a </para> <para> - Here is an example of a dictionary definition using the <literal>simple</> + Here is an example of a dictionary definition using the <literal>simple</literal> template: <programlisting> @@ -2369,11 +2369,11 @@ CREATE TEXT SEARCH DICTIONARY public.simple_dict ( Here, <literal>english</literal> is the base name of a file of stop words. The file's full name will be - <filename>$SHAREDIR/tsearch_data/english.stop</>, - where <literal>$SHAREDIR</> means the + <filename>$SHAREDIR/tsearch_data/english.stop</filename>, + where <literal>$SHAREDIR</literal> means the <productname>PostgreSQL</productname> installation's shared-data directory, - often <filename>/usr/local/share/postgresql</> (use <command>pg_config - --sharedir</> to determine it if you're not sure). + often <filename>/usr/local/share/postgresql</filename> (use <command>pg_config + --sharedir</command> to determine it if you're not sure). The file format is simply a list of words, one per line. Blank lines and trailing spaces are ignored, and upper case is folded to lower case, but no other processing is done @@ -2397,10 +2397,10 @@ SELECT ts_lexize('public.simple_dict','The'); </para> <para> - We can also choose to return <literal>NULL</>, instead of the lower-cased + We can also choose to return <literal>NULL</literal>, instead of the lower-cased word, if it is not found in the stop words file. This behavior is - selected by setting the dictionary's <literal>Accept</> parameter to - <literal>false</>. Continuing the example: + selected by setting the dictionary's <literal>Accept</literal> parameter to + <literal>false</literal>. Continuing the example: <screen> ALTER TEXT SEARCH DICTIONARY public.simple_dict ( Accept = false ); @@ -2418,17 +2418,17 @@ SELECT ts_lexize('public.simple_dict','The'); </para> <para> - With the default setting of <literal>Accept</> = <literal>true</>, - it is only useful to place a <literal>simple</> dictionary at the end + With the default setting of <literal>Accept</literal> = <literal>true</literal>, + it is only useful to place a <literal>simple</literal> dictionary at the end of a list of dictionaries, since it will never pass on any token to - a following dictionary. Conversely, <literal>Accept</> = <literal>false</> + a following dictionary. Conversely, <literal>Accept</literal> = <literal>false</literal> is only useful when there is at least one following dictionary. </para> <caution> <para> Most types of dictionaries rely on configuration files, such as files of - stop words. These files <emphasis>must</> be stored in UTF-8 encoding. + stop words. These files <emphasis>must</emphasis> be stored in UTF-8 encoding. They will be translated to the actual database encoding, if that is different, when they are read into the server. </para> @@ -2439,8 +2439,8 @@ SELECT ts_lexize('public.simple_dict','The'); Normally, a database session will read a dictionary configuration file only once, when it is first used within the session. If you modify a configuration file and want to force existing sessions to pick up the - new contents, issue an <command>ALTER TEXT SEARCH DICTIONARY</> command - on the dictionary. This can be a <quote>dummy</> update that doesn't + new contents, issue an <command>ALTER TEXT SEARCH DICTIONARY</command> command + on the dictionary. This can be a <quote>dummy</quote> update that doesn't actually change any parameter values. </para> </caution> @@ -2457,7 +2457,7 @@ SELECT ts_lexize('public.simple_dict','The'); dictionary can be used to overcome linguistic problems, for example, to prevent an English stemmer dictionary from reducing the word <quote>Paris</quote> to <quote>pari</quote>. It is enough to have a <literal>Paris paris</literal> line in the - synonym dictionary and put it before the <literal>english_stem</> + synonym dictionary and put it before the <literal>english_stem</literal> dictionary. For example: <screen> @@ -2483,24 +2483,24 @@ SELECT * FROM ts_debug('english', 'Paris'); </para> <para> - The only parameter required by the <literal>synonym</> template is - <literal>SYNONYMS</>, which is the base name of its configuration file - — <literal>my_synonyms</> in the above example. + The only parameter required by the <literal>synonym</literal> template is + <literal>SYNONYMS</literal>, which is the base name of its configuration file + — <literal>my_synonyms</literal> in the above example. The file's full name will be - <filename>$SHAREDIR/tsearch_data/my_synonyms.syn</> - (where <literal>$SHAREDIR</> means the - <productname>PostgreSQL</> installation's shared-data directory). + <filename>$SHAREDIR/tsearch_data/my_synonyms.syn</filename> + (where <literal>$SHAREDIR</literal> means the + <productname>PostgreSQL</productname> installation's shared-data directory). The file format is just one line per word to be substituted, with the word followed by its synonym, separated by white space. Blank lines and trailing spaces are ignored. </para> <para> - The <literal>synonym</> template also has an optional parameter - <literal>CaseSensitive</>, which defaults to <literal>false</>. When - <literal>CaseSensitive</> is <literal>false</>, words in the synonym file + The <literal>synonym</literal> template also has an optional parameter + <literal>CaseSensitive</literal>, which defaults to <literal>false</literal>. When + <literal>CaseSensitive</literal> is <literal>false</literal>, words in the synonym file are folded to lower case, as are input tokens. When it is - <literal>true</>, words and tokens are not folded to lower case, + <literal>true</literal>, words and tokens are not folded to lower case, but are compared as-is. </para> @@ -2513,7 +2513,7 @@ SELECT * FROM ts_debug('english', 'Paris'); the prefix match marker (see <xref linkend="textsearch-parsing-queries">). For example, suppose we have these entries in - <filename>$SHAREDIR/tsearch_data/synonym_sample.syn</>: + <filename>$SHAREDIR/tsearch_data/synonym_sample.syn</filename>: <programlisting> postgres pgsql postgresql pgsql @@ -2573,7 +2573,7 @@ mydb=# SELECT 'indexes are very useful'::tsvector @@ to_tsquery('tst','indices') <para> Basically a thesaurus dictionary replaces all non-preferred terms by one preferred term and, optionally, preserves the original terms for indexing - as well. <productname>PostgreSQL</>'s current implementation of the + as well. <productname>PostgreSQL</productname>'s current implementation of the thesaurus dictionary is an extension of the synonym dictionary with added <firstterm>phrase</firstterm> support. A thesaurus dictionary requires a configuration file of the following format: @@ -2597,7 +2597,7 @@ more sample word(s) : more indexed word(s) recognize a word. In that case, you should remove the use of the word or teach the subdictionary about it. You can place an asterisk (<symbol>*</symbol>) at the beginning of an indexed word to skip applying - the subdictionary to it, but all sample words <emphasis>must</> be known + the subdictionary to it, but all sample words <emphasis>must</emphasis> be known to the subdictionary. </para> @@ -2609,16 +2609,16 @@ more sample word(s) : more indexed word(s) <para> Specific stop words recognized by the subdictionary cannot be - specified; instead use <literal>?</> to mark the location where any - stop word can appear. For example, assuming that <literal>a</> and - <literal>the</> are stop words according to the subdictionary: + specified; instead use <literal>?</literal> to mark the location where any + stop word can appear. For example, assuming that <literal>a</literal> and + <literal>the</literal> are stop words according to the subdictionary: <programlisting> ? one ? two : swsw </programlisting> - matches <literal>a one the two</> and <literal>the one a two</>; - both would be replaced by <literal>swsw</>. + matches <literal>a one the two</literal> and <literal>the one a two</literal>; + both would be replaced by <literal>swsw</literal>. </para> <para> @@ -2628,7 +2628,7 @@ more sample word(s) : more indexed word(s) accumulation. The thesaurus dictionary must be configured carefully. For example, if the thesaurus dictionary is assigned to handle only the <literal>asciiword</literal> token, then a thesaurus dictionary - definition like <literal>one 7</> will not work since token type + definition like <literal>one 7</literal> will not work since token type <literal>uint</literal> is not assigned to the thesaurus dictionary. </para> @@ -2645,7 +2645,7 @@ more sample word(s) : more indexed word(s) <title>Thesaurus Configuration</title> <para> - To define a new thesaurus dictionary, use the <literal>thesaurus</> + To define a new thesaurus dictionary, use the <literal>thesaurus</literal> template. For example: <programlisting> @@ -2667,8 +2667,8 @@ CREATE TEXT SEARCH DICTIONARY thesaurus_simple ( <para> <literal>mythesaurus</literal> is the base name of the thesaurus configuration file. - (Its full name will be <filename>$SHAREDIR/tsearch_data/mythesaurus.ths</>, - where <literal>$SHAREDIR</> means the installation shared-data + (Its full name will be <filename>$SHAREDIR/tsearch_data/mythesaurus.ths</filename>, + where <literal>$SHAREDIR</literal> means the installation shared-data directory.) </para> </listitem> @@ -2752,7 +2752,7 @@ SELECT to_tsquery('''supernova star'''); Notice that <literal>supernova star</literal> matches <literal>supernovae stars</literal> in <literal>thesaurus_astro</literal> because we specified the <literal>english_stem</literal> stemmer in the thesaurus definition. - The stemmer removed the <literal>e</> and <literal>s</>. + The stemmer removed the <literal>e</literal> and <literal>s</literal>. </para> <para> @@ -2774,21 +2774,21 @@ SELECT plainto_tsquery('supernova star'); </sect2> <sect2 id="textsearch-ispell-dictionary"> - <title><application>Ispell</> Dictionary</title> + <title><application>Ispell</application> Dictionary</title> <para> - The <application>Ispell</> dictionary template supports - <firstterm>morphological dictionaries</>, which can normalize many + The <application>Ispell</application> dictionary template supports + <firstterm>morphological dictionaries</firstterm>, which can normalize many different linguistic forms of a word into the same lexeme. For example, - an English <application>Ispell</> dictionary can match all declensions and + an English <application>Ispell</application> dictionary can match all declensions and conjugations of the search term <literal>bank</literal>, e.g., - <literal>banking</>, <literal>banked</>, <literal>banks</>, - <literal>banks'</>, and <literal>bank's</>. + <literal>banking</literal>, <literal>banked</literal>, <literal>banks</literal>, + <literal>banks'</literal>, and <literal>bank's</literal>. </para> <para> The standard <productname>PostgreSQL</productname> distribution does - not include any <application>Ispell</> configuration files. + not include any <application>Ispell</application> configuration files. Dictionaries for a large number of languages are available from <ulink url="http://ficus-www.cs.ucla.edu/geoff/ispell.html">Ispell</ulink>. Also, some more modern dictionary file formats are supported — <ulink @@ -2800,15 +2800,15 @@ SELECT plainto_tsquery('supernova star'); </para> <para> - To create an <application>Ispell</> dictionary perform these steps: + To create an <application>Ispell</application> dictionary perform these steps: </para> <itemizedlist spacing="compact" mark="bullet"> <listitem> <para> - download dictionary configuration files. <productname>OpenOffice</> - extension files have the <filename>.oxt</> extension. It is necessary - to extract <filename>.aff</> and <filename>.dic</> files, change - extensions to <filename>.affix</> and <filename>.dict</>. For some + download dictionary configuration files. <productname>OpenOffice</productname> + extension files have the <filename>.oxt</filename> extension. It is necessary + to extract <filename>.aff</filename> and <filename>.dic</filename> files, change + extensions to <filename>.affix</filename> and <filename>.dict</filename>. For some dictionary files it is also needed to convert characters to the UTF-8 encoding with commands (for example, for a Norwegian language dictionary): <programlisting> @@ -2819,7 +2819,7 @@ iconv -f ISO_8859-1 -t UTF-8 -o nn_no.dict nn_NO.dic </listitem> <listitem> <para> - copy files to the <filename>$SHAREDIR/tsearch_data</> directory + copy files to the <filename>$SHAREDIR/tsearch_data</filename> directory </para> </listitem> <listitem> @@ -2837,10 +2837,10 @@ CREATE TEXT SEARCH DICTIONARY english_hunspell ( </itemizedlist> <para> - Here, <literal>DictFile</>, <literal>AffFile</>, and <literal>StopWords</> + Here, <literal>DictFile</literal>, <literal>AffFile</literal>, and <literal>StopWords</literal> specify the base names of the dictionary, affixes, and stop-words files. The stop-words file has the same format explained above for the - <literal>simple</> dictionary type. The format of the other files is + <literal>simple</literal> dictionary type. The format of the other files is not specified here but is available from the above-mentioned web sites. </para> @@ -2851,7 +2851,7 @@ CREATE TEXT SEARCH DICTIONARY english_hunspell ( </para> <para> - The <filename>.affix</> file of <application>Ispell</> has the following + The <filename>.affix</filename> file of <application>Ispell</application> has the following structure: <programlisting> prefixes @@ -2866,7 +2866,7 @@ flag T: </programlisting> </para> <para> - And the <filename>.dict</> file has the following structure: + And the <filename>.dict</filename> file has the following structure: <programlisting> lapse/ADGRS lard/DGRS @@ -2876,14 +2876,14 @@ lark/MRS </para> <para> - Format of the <filename>.dict</> file is: + Format of the <filename>.dict</filename> file is: <programlisting> basic_form/affix_class_name </programlisting> </para> <para> - In the <filename>.affix</> file every affix flag is described in the + In the <filename>.affix</filename> file every affix flag is described in the following format: <programlisting> condition > [-stripping_letters,] adding_affix @@ -2892,12 +2892,12 @@ condition > [-stripping_letters,] adding_affix <para> Here, condition has a format similar to the format of regular expressions. - It can use groupings <literal>[...]</> and <literal>[^...]</>. - For example, <literal>[AEIOU]Y</> means that the last letter of the word - is <literal>"y"</> and the penultimate letter is <literal>"a"</>, - <literal>"e"</>, <literal>"i"</>, <literal>"o"</> or <literal>"u"</>. - <literal>[^EY]</> means that the last letter is neither <literal>"e"</> - nor <literal>"y"</>. + It can use groupings <literal>[...]</literal> and <literal>[^...]</literal>. + For example, <literal>[AEIOU]Y</literal> means that the last letter of the word + is <literal>"y"</literal> and the penultimate letter is <literal>"a"</literal>, + <literal>"e"</literal>, <literal>"i"</literal>, <literal>"o"</literal> or <literal>"u"</literal>. + <literal>[^EY]</literal> means that the last letter is neither <literal>"e"</literal> + nor <literal>"y"</literal>. </para> <para> @@ -2922,8 +2922,8 @@ SELECT ts_lexize('norwegian_ispell', 'sjokoladefabrikk'); </para> <para> - <application>MySpell</> format is a subset of <application>Hunspell</>. - The <filename>.affix</> file of <application>Hunspell</> has the following + <application>MySpell</application> format is a subset of <application>Hunspell</application>. + The <filename>.affix</filename> file of <application>Hunspell</application> has the following structure: <programlisting> PFX A Y 1 @@ -2970,8 +2970,8 @@ SFX T 0 est [^ey] </itemizedlist> <para> - The <filename>.dict</> file looks like the <filename>.dict</> file of - <application>Ispell</>: + The <filename>.dict</filename> file looks like the <filename>.dict</filename> file of + <application>Ispell</application>: <programlisting> larder/M lardy/RT @@ -2982,8 +2982,8 @@ largehearted <note> <para> - <application>MySpell</> does not support compound words. - <application>Hunspell</> has sophisticated support for compound words. At + <application>MySpell</application> does not support compound words. + <application>Hunspell</application> has sophisticated support for compound words. At present, <productname>PostgreSQL</productname> implements only the basic compound word operations of Hunspell. </para> @@ -2992,18 +2992,18 @@ largehearted </sect2> <sect2 id="textsearch-snowball-dictionary"> - <title><application>Snowball</> Dictionary</title> + <title><application>Snowball</application> Dictionary</title> <para> - The <application>Snowball</> dictionary template is based on a project + The <application>Snowball</application> dictionary template is based on a project by Martin Porter, inventor of the popular Porter's stemming algorithm for the English language. Snowball now provides stemming algorithms for many languages (see the <ulink url="http://snowballstem.org/">Snowball site</ulink> for more information). Each algorithm understands how to reduce common variant forms of words to a base, or stem, spelling within - its language. A Snowball dictionary requires a <literal>language</> + its language. A Snowball dictionary requires a <literal>language</literal> parameter to identify which stemmer to use, and optionally can specify a - <literal>stopword</> file name that gives a list of words to eliminate. + <literal>stopword</literal> file name that gives a list of words to eliminate. (<productname>PostgreSQL</productname>'s standard stopword lists are also provided by the Snowball project.) For example, there is a built-in definition equivalent to @@ -3020,7 +3020,7 @@ CREATE TEXT SEARCH DICTIONARY english_stem ( </para> <para> - A <application>Snowball</> dictionary recognizes everything, whether + A <application>Snowball</application> dictionary recognizes everything, whether or not it is able to simplify the word, so it should be placed at the end of the dictionary list. It is useless to have it before any other dictionary because a token will never pass through it to @@ -3047,7 +3047,7 @@ CREATE TEXT SEARCH DICTIONARY english_stem ( one used by text search functions if an explicit configuration parameter is omitted. It can be set in <filename>postgresql.conf</filename>, or set for an - individual session using the <command>SET</> command. + individual session using the <command>SET</command> command. </para> <para> @@ -3061,7 +3061,7 @@ CREATE TEXT SEARCH DICTIONARY english_stem ( <para> As an example we will create a configuration <literal>pg</literal>, starting by duplicating the built-in - <literal>english</> configuration: + <literal>english</literal> configuration: <programlisting> CREATE TEXT SEARCH CONFIGURATION public.pg ( COPY = pg_catalog.english ); @@ -3088,7 +3088,7 @@ CREATE TEXT SEARCH DICTIONARY pg_dict ( ); </programlisting> - Next we register the <productname>Ispell</> dictionary + Next we register the <productname>Ispell</productname> dictionary <literal>english_ispell</literal>, which has its own configuration files: <programlisting> @@ -3101,7 +3101,7 @@ CREATE TEXT SEARCH DICTIONARY english_ispell ( </programlisting> Now we can set up the mappings for words in configuration - <literal>pg</>: + <literal>pg</literal>: <programlisting> ALTER TEXT SEARCH CONFIGURATION pg @@ -3133,7 +3133,7 @@ version of our software. <para> The next step is to set the session to use the new configuration, which was - created in the <literal>public</> schema: + created in the <literal>public</literal> schema: <screen> => \dF @@ -3177,18 +3177,18 @@ SHOW default_text_search_config; </indexterm> <synopsis> -ts_debug(<optional> <replaceable class="parameter">config</replaceable> <type>regconfig</>, </optional> <replaceable class="parameter">document</replaceable> <type>text</>, - OUT <replaceable class="parameter">alias</> <type>text</>, - OUT <replaceable class="parameter">description</> <type>text</>, - OUT <replaceable class="parameter">token</> <type>text</>, - OUT <replaceable class="parameter">dictionaries</> <type>regdictionary[]</>, - OUT <replaceable class="parameter">dictionary</> <type>regdictionary</>, - OUT <replaceable class="parameter">lexemes</> <type>text[]</>) +ts_debug(<optional> <replaceable class="parameter">config</replaceable> <type>regconfig</type>, </optional> <replaceable class="parameter">document</replaceable> <type>text</type>, + OUT <replaceable class="parameter">alias</replaceable> <type>text</type>, + OUT <replaceable class="parameter">description</replaceable> <type>text</type>, + OUT <replaceable class="parameter">token</replaceable> <type>text</type>, + OUT <replaceable class="parameter">dictionaries</replaceable> <type>regdictionary[]</type>, + OUT <replaceable class="parameter">dictionary</replaceable> <type>regdictionary</type>, + OUT <replaceable class="parameter">lexemes</replaceable> <type>text[]</type>) returns setof record </synopsis> <para> - <function>ts_debug</> displays information about every token of + <function>ts_debug</function> displays information about every token of <replaceable class="parameter">document</replaceable> as produced by the parser and processed by the configured dictionaries. It uses the configuration specified by <replaceable @@ -3198,43 +3198,43 @@ ts_debug(<optional> <replaceable class="parameter">config</replaceable> <type>re </para> <para> - <function>ts_debug</> returns one row for each token identified in the text + <function>ts_debug</function> returns one row for each token identified in the text by the parser. The columns returned are <itemizedlist spacing="compact" mark="bullet"> <listitem> <para> - <replaceable>alias</> <type>text</> — short name of the token type + <replaceable>alias</replaceable> <type>text</type> — short name of the token type </para> </listitem> <listitem> <para> - <replaceable>description</> <type>text</> — description of the + <replaceable>description</replaceable> <type>text</type> — description of the token type </para> </listitem> <listitem> <para> - <replaceable>token</> <type>text</> — text of the token + <replaceable>token</replaceable> <type>text</type> — text of the token </para> </listitem> <listitem> <para> - <replaceable>dictionaries</> <type>regdictionary[]</> — the + <replaceable>dictionaries</replaceable> <type>regdictionary[]</type> — the dictionaries selected by the configuration for this token type </para> </listitem> <listitem> <para> - <replaceable>dictionary</> <type>regdictionary</> — the dictionary - that recognized the token, or <literal>NULL</> if none did + <replaceable>dictionary</replaceable> <type>regdictionary</type> — the dictionary + that recognized the token, or <literal>NULL</literal> if none did </para> </listitem> <listitem> <para> - <replaceable>lexemes</> <type>text[]</> — the lexeme(s) produced - by the dictionary that recognized the token, or <literal>NULL</> if - none did; an empty array (<literal>{}</>) means it was recognized as a + <replaceable>lexemes</replaceable> <type>text[]</type> — the lexeme(s) produced + by the dictionary that recognized the token, or <literal>NULL</literal> if + none did; an empty array (<literal>{}</literal>) means it was recognized as a stop word </para> </listitem> @@ -3307,10 +3307,10 @@ SELECT * FROM ts_debug('public.english','The Brightest supernovaes'); </screen> <para> - In this example, the word <literal>Brightest</> was recognized by the + In this example, the word <literal>Brightest</literal> was recognized by the parser as an <literal>ASCII word</literal> (alias <literal>asciiword</literal>). For this token type the dictionary list is - <literal>english_ispell</> and + <literal>english_ispell</literal> and <literal>english_stem</literal>. The word was recognized by <literal>english_ispell</literal>, which reduced it to the noun <literal>bright</literal>. The word <literal>supernovaes</literal> is @@ -3360,14 +3360,14 @@ FROM ts_debug('public.english','The Brightest supernovaes'); </indexterm> <synopsis> -ts_parse(<replaceable class="parameter">parser_name</replaceable> <type>text</>, <replaceable class="parameter">document</replaceable> <type>text</>, - OUT <replaceable class="parameter">tokid</> <type>integer</>, OUT <replaceable class="parameter">token</> <type>text</>) returns <type>setof record</> -ts_parse(<replaceable class="parameter">parser_oid</replaceable> <type>oid</>, <replaceable class="parameter">document</replaceable> <type>text</>, - OUT <replaceable class="parameter">tokid</> <type>integer</>, OUT <replaceable class="parameter">token</> <type>text</>) returns <type>setof record</> +ts_parse(<replaceable class="parameter">parser_name</replaceable> <type>text</type>, <replaceable class="parameter">document</replaceable> <type>text</type>, + OUT <replaceable class="parameter">tokid</replaceable> <type>integer</type>, OUT <replaceable class="parameter">token</replaceable> <type>text</type>) returns <type>setof record</type> +ts_parse(<replaceable class="parameter">parser_oid</replaceable> <type>oid</type>, <replaceable class="parameter">document</replaceable> <type>text</type>, + OUT <replaceable class="parameter">tokid</replaceable> <type>integer</type>, OUT <replaceable class="parameter">token</replaceable> <type>text</type>) returns <type>setof record</type> </synopsis> <para> - <function>ts_parse</> parses the given <replaceable>document</replaceable> + <function>ts_parse</function> parses the given <replaceable>document</replaceable> and returns a series of records, one for each token produced by parsing. Each record includes a <varname>tokid</varname> showing the assigned token type and a <varname>token</varname> which is the text of the @@ -3391,14 +3391,14 @@ SELECT * FROM ts_parse('default', '123 - a number'); </indexterm> <synopsis> -ts_token_type(<replaceable class="parameter">parser_name</> <type>text</>, OUT <replaceable class="parameter">tokid</> <type>integer</>, - OUT <replaceable class="parameter">alias</> <type>text</>, OUT <replaceable class="parameter">description</> <type>text</>) returns <type>setof record</> -ts_token_type(<replaceable class="parameter">parser_oid</> <type>oid</>, OUT <replaceable class="parameter">tokid</> <type>integer</>, - OUT <replaceable class="parameter">alias</> <type>text</>, OUT <replaceable class="parameter">description</> <type>text</>) returns <type>setof record</> +ts_token_type(<replaceable class="parameter">parser_name</replaceable> <type>text</type>, OUT <replaceable class="parameter">tokid</replaceable> <type>integer</type>, + OUT <replaceable class="parameter">alias</replaceable> <type>text</type>, OUT <replaceable class="parameter">description</replaceable> <type>text</type>) returns <type>setof record</type> +ts_token_type(<replaceable class="parameter">parser_oid</replaceable> <type>oid</type>, OUT <replaceable class="parameter">tokid</replaceable> <type>integer</type>, + OUT <replaceable class="parameter">alias</replaceable> <type>text</type>, OUT <replaceable class="parameter">description</replaceable> <type>text</type>) returns <type>setof record</type> </synopsis> <para> - <function>ts_token_type</> returns a table which describes each type of + <function>ts_token_type</function> returns a table which describes each type of token the specified parser can recognize. For each token type, the table gives the integer <varname>tokid</varname> that the parser uses to label a token of that type, the <varname>alias</varname> that names the token type @@ -3441,7 +3441,7 @@ SELECT * FROM ts_token_type('default'); <title>Dictionary Testing</title> <para> - The <function>ts_lexize</> function facilitates dictionary testing. + The <function>ts_lexize</function> function facilitates dictionary testing. </para> <indexterm> @@ -3449,11 +3449,11 @@ SELECT * FROM ts_token_type('default'); </indexterm> <synopsis> -ts_lexize(<replaceable class="parameter">dict</replaceable> <type>regdictionary</>, <replaceable class="parameter">token</replaceable> <type>text</>) returns <type>text[]</> +ts_lexize(<replaceable class="parameter">dict</replaceable> <type>regdictionary</type>, <replaceable class="parameter">token</replaceable> <type>text</type>) returns <type>text[]</type> </synopsis> <para> - <function>ts_lexize</> returns an array of lexemes if the input + <function>ts_lexize</function> returns an array of lexemes if the input <replaceable>token</replaceable> is known to the dictionary, or an empty array if the token is known to the dictionary but it is a stop word, or @@ -3490,9 +3490,9 @@ SELECT ts_lexize('thesaurus_astro','supernovae stars') is null; </screen> The thesaurus dictionary <literal>thesaurus_astro</literal> does know the - phrase <literal>supernovae stars</literal>, but <function>ts_lexize</> + phrase <literal>supernovae stars</literal>, but <function>ts_lexize</function> fails since it does not parse the input text but treats it as a single - token. Use <function>plainto_tsquery</> or <function>to_tsvector</> to + token. Use <function>plainto_tsquery</function> or <function>to_tsvector</function> to test thesaurus dictionaries, for example: <screen> @@ -3540,7 +3540,7 @@ SELECT plainto_tsquery('supernovae stars'); <listitem> <para> Creates a GIN (Generalized Inverted Index)-based index. - The <replaceable>column</replaceable> must be of <type>tsvector</> type. + The <replaceable>column</replaceable> must be of <type>tsvector</type> type. </para> </listitem> </varlistentry> @@ -3560,8 +3560,8 @@ SELECT plainto_tsquery('supernovae stars'); <listitem> <para> Creates a GiST (Generalized Search Tree)-based index. - The <replaceable>column</replaceable> can be of <type>tsvector</> or - <type>tsquery</> type. + The <replaceable>column</replaceable> can be of <type>tsvector</type> or + <type>tsquery</type> type. </para> </listitem> </varlistentry> @@ -3575,7 +3575,7 @@ SELECT plainto_tsquery('supernovae stars'); compressed list of matching locations. Multi-word searches can find the first match, then use the index to remove rows that are lacking additional words. GIN indexes store only the words (lexemes) of - <type>tsvector</> values, and not their weight labels. Thus a table + <type>tsvector</type> values, and not their weight labels. Thus a table row recheck is needed when using a query that involves weights. </para> @@ -3622,7 +3622,7 @@ SELECT plainto_tsquery('supernovae stars'); </sect1> <sect1 id="textsearch-psql"> - <title><application>psql</> Support</title> + <title><application>psql</application> Support</title> <para> Information about text search configuration objects can be obtained @@ -3666,7 +3666,7 @@ SELECT plainto_tsquery('supernovae stars'); <term><literal>\dF<optional>+</optional> <optional>PATTERN</optional></literal></term> <listitem> <para> - List text search configurations (add <literal>+</> for more detail). + List text search configurations (add <literal>+</literal> for more detail). <screen> => \dF russian List of text search configurations @@ -3707,7 +3707,7 @@ Parser: "pg_catalog.default" <term><literal>\dFd<optional>+</optional> <optional>PATTERN</optional></literal></term> <listitem> <para> - List text search dictionaries (add <literal>+</> for more detail). + List text search dictionaries (add <literal>+</literal> for more detail). <screen> => \dFd List of text search dictionaries @@ -3738,7 +3738,7 @@ Parser: "pg_catalog.default" <term><literal>\dFp<optional>+</optional> <optional>PATTERN</optional></literal></term> <listitem> <para> - List text search parsers (add <literal>+</> for more detail). + List text search parsers (add <literal>+</literal> for more detail). <screen> => \dFp List of text search parsers @@ -3791,7 +3791,7 @@ Parser: "pg_catalog.default" <term><literal>\dFt<optional>+</optional> <optional>PATTERN</optional></literal></term> <listitem> <para> - List text search templates (add <literal>+</> for more detail). + List text search templates (add <literal>+</literal> for more detail). <screen> => \dFt List of text search templates @@ -3830,12 +3830,12 @@ Parser: "pg_catalog.default" 2<superscript>64</superscript></para> </listitem> <listitem> - <para>Position values in <type>tsvector</> must be greater than 0 and + <para>Position values in <type>tsvector</type> must be greater than 0 and no more than 16,383</para> </listitem> <listitem> - <para>The match distance in a <literal><<replaceable>N</>></literal> - (FOLLOWED BY) <type>tsquery</> operator cannot be more than + <para>The match distance in a <literal><<replaceable>N</replaceable>></literal> + (FOLLOWED BY) <type>tsquery</type> operator cannot be more than 16,384</para> </listitem> <listitem> @@ -3851,7 +3851,7 @@ Parser: "pg_catalog.default" <para> For comparison, the <productname>PostgreSQL</productname> 8.1 documentation contained 10,441 unique words, a total of 335,420 words, and the most - frequent word <quote>postgresql</> was mentioned 6,127 times in 655 + frequent word <quote>postgresql</quote> was mentioned 6,127 times in 655 documents. </para> diff --git a/doc/src/sgml/trigger.sgml b/doc/src/sgml/trigger.sgml index f5f74af5a17..b0e160acf69 100644 --- a/doc/src/sgml/trigger.sgml +++ b/doc/src/sgml/trigger.sgml @@ -53,7 +53,7 @@ <para> On views, triggers can be defined to execute instead of <command>INSERT</command>, <command>UPDATE</command>, or - <command>DELETE</command> operations. <literal>INSTEAD OF</> triggers + <command>DELETE</command> operations. <literal>INSTEAD OF</literal> triggers are fired once for each row that needs to be modified in the view. It is the responsibility of the trigger's function to perform the necessary modifications to the @@ -67,9 +67,9 @@ <para> The trigger function must be defined before the trigger itself can be created. The trigger function must be declared as a - function taking no arguments and returning type <literal>trigger</>. + function taking no arguments and returning type <literal>trigger</literal>. (The trigger function receives its input through a specially-passed - <structname>TriggerData</> structure, not in the form of ordinary function + <structname>TriggerData</structname> structure, not in the form of ordinary function arguments.) </para> @@ -81,8 +81,8 @@ </para> <para> - <productname>PostgreSQL</productname> offers both <firstterm>per-row</> - triggers and <firstterm>per-statement</> triggers. With a per-row + <productname>PostgreSQL</productname> offers both <firstterm>per-row</firstterm> + triggers and <firstterm>per-statement</firstterm> triggers. With a per-row trigger, the trigger function is invoked once for each row that is affected by the statement that fired the trigger. In contrast, a per-statement trigger is @@ -90,27 +90,27 @@ regardless of the number of rows affected by that statement. In particular, a statement that affects zero rows will still result in the execution of any applicable per-statement triggers. These - two types of triggers are sometimes called <firstterm>row-level</> - triggers and <firstterm>statement-level</> triggers, + two types of triggers are sometimes called <firstterm>row-level</firstterm> + triggers and <firstterm>statement-level</firstterm> triggers, respectively. Triggers on <command>TRUNCATE</command> may only be defined at statement level, not per-row. </para> <para> Triggers are also classified according to whether they fire - <firstterm>before</>, <firstterm>after</>, or - <firstterm>instead of</> the operation. These are referred to - as <literal>BEFORE</> triggers, <literal>AFTER</> triggers, and - <literal>INSTEAD OF</> triggers respectively. - Statement-level <literal>BEFORE</> triggers naturally fire before the - statement starts to do anything, while statement-level <literal>AFTER</> + <firstterm>before</firstterm>, <firstterm>after</firstterm>, or + <firstterm>instead of</firstterm> the operation. These are referred to + as <literal>BEFORE</literal> triggers, <literal>AFTER</literal> triggers, and + <literal>INSTEAD OF</literal> triggers respectively. + Statement-level <literal>BEFORE</literal> triggers naturally fire before the + statement starts to do anything, while statement-level <literal>AFTER</literal> triggers fire at the very end of the statement. These types of triggers may be defined on tables, views, or foreign tables. Row-level - <literal>BEFORE</> triggers fire immediately before a particular row is - operated on, while row-level <literal>AFTER</> triggers fire at the end of - the statement (but before any statement-level <literal>AFTER</> triggers). + <literal>BEFORE</literal> triggers fire immediately before a particular row is + operated on, while row-level <literal>AFTER</literal> triggers fire at the end of + the statement (but before any statement-level <literal>AFTER</literal> triggers). These types of triggers may only be defined on non-partitioned tables and - foreign tables, not views. <literal>INSTEAD OF</> triggers may only be + foreign tables, not views. <literal>INSTEAD OF</literal> triggers may only be defined on views, and only at row level; they fire immediately as each row in the view is identified as needing to be operated on. </para> @@ -125,31 +125,31 @@ <para> If an <command>INSERT</command> contains an <literal>ON CONFLICT - DO UPDATE</> clause, it is possible that the effects of - row-level <literal>BEFORE</> <command>INSERT</command> triggers and + DO UPDATE</literal> clause, it is possible that the effects of + row-level <literal>BEFORE</literal> <command>INSERT</command> triggers and row-level <literal>BEFORE</literal> <command>UPDATE</command> triggers can both be applied in a way that is apparent from the final state of - the updated row, if an <varname>EXCLUDED</> column is referenced. - There need not be an <varname>EXCLUDED</> column reference for + the updated row, if an <varname>EXCLUDED</varname> column is referenced. + There need not be an <varname>EXCLUDED</varname> column reference for both sets of row-level <literal>BEFORE</literal> triggers to execute, though. The possibility of surprising outcomes should be considered when there - are both <literal>BEFORE</> <command>INSERT</command> and - <literal>BEFORE</> <command>UPDATE</command> row-level triggers + are both <literal>BEFORE</literal> <command>INSERT</command> and + <literal>BEFORE</literal> <command>UPDATE</command> row-level triggers that change a row being inserted/updated (this can be problematic even if the modifications are more or less equivalent, if they're not also idempotent). Note that statement-level <command>UPDATE</command> triggers are executed when <literal>ON - CONFLICT DO UPDATE</> is specified, regardless of whether or not + CONFLICT DO UPDATE</literal> is specified, regardless of whether or not any rows were affected by the <command>UPDATE</command> (and regardless of whether the alternative <command>UPDATE</command> path was ever taken). An <command>INSERT</command> with an - <literal>ON CONFLICT DO UPDATE</> clause will execute - statement-level <literal>BEFORE</> <command>INSERT</command> - triggers first, then statement-level <literal>BEFORE</> + <literal>ON CONFLICT DO UPDATE</literal> clause will execute + statement-level <literal>BEFORE</literal> <command>INSERT</command> + triggers first, then statement-level <literal>BEFORE</literal> <command>UPDATE</command> triggers, followed by statement-level - <literal>AFTER</> <command>UPDATE</command> triggers and finally - statement-level <literal>AFTER</> <command>INSERT</command> + <literal>AFTER</literal> <command>UPDATE</command> triggers and finally + statement-level <literal>AFTER</literal> <command>INSERT</command> triggers. </para> @@ -164,7 +164,7 @@ <itemizedlist> <listitem> <para> - It can return <symbol>NULL</> to skip the operation for the + It can return <symbol>NULL</symbol> to skip the operation for the current row. This instructs the executor to not perform the row-level operation that invoked the trigger (the insertion, modification, or deletion of a particular table row). @@ -182,7 +182,7 @@ </listitem> </itemizedlist> - A row-level <literal>BEFORE</> trigger that does not intend to cause + A row-level <literal>BEFORE</literal> trigger that does not intend to cause either of these behaviors must be careful to return as its result the same row that was passed in (that is, the <varname>NEW</varname> row for <command>INSERT</command> and <command>UPDATE</command> @@ -191,8 +191,8 @@ </para> <para> - A row-level <literal>INSTEAD OF</> trigger should either return - <symbol>NULL</> to indicate that it did not modify any data from + A row-level <literal>INSTEAD OF</literal> trigger should either return + <symbol>NULL</symbol> to indicate that it did not modify any data from the view's underlying base tables, or it should return the view row that was passed in (the <varname>NEW</varname> row for <command>INSERT</command> and <command>UPDATE</command> @@ -201,66 +201,66 @@ used to signal that the trigger performed the necessary data modifications in the view. This will cause the count of the number of rows affected by the command to be incremented. For - <command>INSERT</> and <command>UPDATE</> operations, the trigger - may modify the <varname>NEW</> row before returning it. This will + <command>INSERT</command> and <command>UPDATE</command> operations, the trigger + may modify the <varname>NEW</varname> row before returning it. This will change the data returned by - <command>INSERT RETURNING</> or <command>UPDATE RETURNING</>, + <command>INSERT RETURNING</command> or <command>UPDATE RETURNING</command>, and is useful when the view will not show exactly the same data that was provided. </para> <para> The return value is ignored for row-level triggers fired after an - operation, and so they can return <symbol>NULL</>. + operation, and so they can return <symbol>NULL</symbol>. </para> <para> If more than one trigger is defined for the same event on the same relation, the triggers will be fired in alphabetical order by - trigger name. In the case of <literal>BEFORE</> and - <literal>INSTEAD OF</> triggers, the possibly-modified row returned by + trigger name. In the case of <literal>BEFORE</literal> and + <literal>INSTEAD OF</literal> triggers, the possibly-modified row returned by each trigger becomes the input to the next trigger. If any - <literal>BEFORE</> or <literal>INSTEAD OF</> trigger returns - <symbol>NULL</>, the operation is abandoned for that row and subsequent + <literal>BEFORE</literal> or <literal>INSTEAD OF</literal> trigger returns + <symbol>NULL</symbol>, the operation is abandoned for that row and subsequent triggers are not fired (for that row). </para> <para> - A trigger definition can also specify a Boolean <literal>WHEN</> + A trigger definition can also specify a Boolean <literal>WHEN</literal> condition, which will be tested to see whether the trigger should - be fired. In row-level triggers the <literal>WHEN</> condition can + be fired. In row-level triggers the <literal>WHEN</literal> condition can examine the old and/or new values of columns of the row. (Statement-level - triggers can also have <literal>WHEN</> conditions, although the feature - is not so useful for them.) In a <literal>BEFORE</> trigger, the - <literal>WHEN</> + triggers can also have <literal>WHEN</literal> conditions, although the feature + is not so useful for them.) In a <literal>BEFORE</literal> trigger, the + <literal>WHEN</literal> condition is evaluated just before the function is or would be executed, - so using <literal>WHEN</> is not materially different from testing the + so using <literal>WHEN</literal> is not materially different from testing the same condition at the beginning of the trigger function. However, in - an <literal>AFTER</> trigger, the <literal>WHEN</> condition is evaluated + an <literal>AFTER</literal> trigger, the <literal>WHEN</literal> condition is evaluated just after the row update occurs, and it determines whether an event is queued to fire the trigger at the end of statement. So when an - <literal>AFTER</> trigger's - <literal>WHEN</> condition does not return true, it is not necessary + <literal>AFTER</literal> trigger's + <literal>WHEN</literal> condition does not return true, it is not necessary to queue an event nor to re-fetch the row at end of statement. This can result in significant speedups in statements that modify many rows, if the trigger only needs to be fired for a few of the rows. - <literal>INSTEAD OF</> triggers do not support - <literal>WHEN</> conditions. + <literal>INSTEAD OF</literal> triggers do not support + <literal>WHEN</literal> conditions. </para> <para> - Typically, row-level <literal>BEFORE</> triggers are used for checking or + Typically, row-level <literal>BEFORE</literal> triggers are used for checking or modifying the data that will be inserted or updated. For example, - a <literal>BEFORE</> trigger might be used to insert the current time into a + a <literal>BEFORE</literal> trigger might be used to insert the current time into a <type>timestamp</type> column, or to check that two elements of the row are - consistent. Row-level <literal>AFTER</> triggers are most sensibly + consistent. Row-level <literal>AFTER</literal> triggers are most sensibly used to propagate the updates to other tables, or make consistency checks against other tables. The reason for this division of labor is - that an <literal>AFTER</> trigger can be certain it is seeing the final - value of the row, while a <literal>BEFORE</> trigger cannot; there might - be other <literal>BEFORE</> triggers firing after it. If you have no - specific reason to make a trigger <literal>BEFORE</> or - <literal>AFTER</>, the <literal>BEFORE</> case is more efficient, since + that an <literal>AFTER</literal> trigger can be certain it is seeing the final + value of the row, while a <literal>BEFORE</literal> trigger cannot; there might + be other <literal>BEFORE</literal> triggers firing after it. If you have no + specific reason to make a trigger <literal>BEFORE</literal> or + <literal>AFTER</literal>, the <literal>BEFORE</literal> case is more efficient, since the information about the operation doesn't have to be saved until end of statement. </para> @@ -279,8 +279,8 @@ <para> <indexterm> - <primary>trigger</> - <secondary>arguments for trigger functions</> + <primary>trigger</primary> + <secondary>arguments for trigger functions</secondary> </indexterm> When a trigger is being defined, arguments can be specified for it. The purpose of including arguments in the @@ -303,7 +303,7 @@ for making the trigger input data available to the trigger function. This input data includes the type of trigger event (e.g., <command>INSERT</command> or <command>UPDATE</command>) as well as any - arguments that were listed in <command>CREATE TRIGGER</>. + arguments that were listed in <command>CREATE TRIGGER</command>. For a row-level trigger, the input data also includes the <varname>NEW</varname> row for <command>INSERT</command> and <command>UPDATE</command> triggers, and/or the <varname>OLD</varname> row @@ -313,9 +313,9 @@ <para> By default, statement-level triggers do not have any way to examine the individual row(s) modified by the statement. But an <literal>AFTER - STATEMENT</> trigger can request that <firstterm>transition tables</> + STATEMENT</literal> trigger can request that <firstterm>transition tables</firstterm> be created to make the sets of affected rows available to the trigger. - <literal>AFTER ROW</> triggers can also request transition tables, so + <literal>AFTER ROW</literal> triggers can also request transition tables, so that they can see the total changes in the table as well as the change in the individual row they are currently being fired for. The method for examining the transition tables again depends on the programming language @@ -343,7 +343,7 @@ Statement-level triggers follow simple visibility rules: none of the changes made by a statement are visible to statement-level <literal>BEFORE</literal> triggers, whereas all - modifications are visible to statement-level <literal>AFTER</> + modifications are visible to statement-level <literal>AFTER</literal> triggers. </para> </listitem> @@ -352,14 +352,14 @@ <para> The data change (insertion, update, or deletion) causing the trigger to fire is naturally <emphasis>not</emphasis> visible - to SQL commands executed in a row-level <literal>BEFORE</> trigger, + to SQL commands executed in a row-level <literal>BEFORE</literal> trigger, because it hasn't happened yet. </para> </listitem> <listitem> <para> - However, SQL commands executed in a row-level <literal>BEFORE</> + However, SQL commands executed in a row-level <literal>BEFORE</literal> trigger <emphasis>will</emphasis> see the effects of data changes for rows previously processed in the same outer command. This requires caution, since the ordering of these @@ -370,15 +370,15 @@ <listitem> <para> - Similarly, a row-level <literal>INSTEAD OF</> trigger will see the + Similarly, a row-level <literal>INSTEAD OF</literal> trigger will see the effects of data changes made by previous firings of <literal>INSTEAD - OF</> triggers in the same outer command. + OF</literal> triggers in the same outer command. </para> </listitem> <listitem> <para> - When a row-level <literal>AFTER</> trigger is fired, all data + When a row-level <literal>AFTER</literal> trigger is fired, all data changes made by the outer command are already complete, and are visible to the invoked trigger function. @@ -390,8 +390,8 @@ <para> If your trigger function is written in any of the standard procedural languages, then the above statements apply only if the function is - declared <literal>VOLATILE</>. Functions that are declared - <literal>STABLE</> or <literal>IMMUTABLE</> will not see changes made by + declared <literal>VOLATILE</literal>. Functions that are declared + <literal>STABLE</literal> or <literal>IMMUTABLE</literal> will not see changes made by the calling command in any case. </para> @@ -426,14 +426,14 @@ </para> <para> - Trigger functions must use the <quote>version 1</> function manager + Trigger functions must use the <quote>version 1</quote> function manager interface. </para> <para> When a function is called by the trigger manager, it is not passed - any normal arguments, but it is passed a <quote>context</> - pointer pointing to a <structname>TriggerData</> structure. C + any normal arguments, but it is passed a <quote>context</quote> + pointer pointing to a <structname>TriggerData</structname> structure. C functions can check whether they were called from the trigger manager or not by executing the macro: <programlisting> @@ -444,10 +444,10 @@ CALLED_AS_TRIGGER(fcinfo) ((fcinfo)->context != NULL && IsA((fcinfo)->context, TriggerData)) </programlisting> If this returns true, then it is safe to cast - <literal>fcinfo->context</> to type <literal>TriggerData + <literal>fcinfo->context</literal> to type <literal>TriggerData *</literal> and make use of the pointed-to - <structname>TriggerData</> structure. The function must - <emphasis>not</emphasis> alter the <structname>TriggerData</> + <structname>TriggerData</structname> structure. The function must + <emphasis>not</emphasis> alter the <structname>TriggerData</structname> structure or any of the data it points to. </para> @@ -475,7 +475,7 @@ typedef struct TriggerData <variablelist> <varlistentry> - <term><structfield>type</></term> + <term><structfield>type</structfield></term> <listitem> <para> Always <literal>T_TriggerData</literal>. @@ -484,7 +484,7 @@ typedef struct TriggerData </varlistentry> <varlistentry> - <term><structfield>tg_event</></term> + <term><structfield>tg_event</structfield></term> <listitem> <para> Describes the event for which the function is called. You can use the @@ -577,24 +577,24 @@ typedef struct TriggerData </varlistentry> <varlistentry> - <term><structfield>tg_relation</></term> + <term><structfield>tg_relation</structfield></term> <listitem> <para> A pointer to a structure describing the relation that the trigger fired for. - Look at <filename>utils/rel.h</> for details about + Look at <filename>utils/rel.h</filename> for details about this structure. The most interesting things are - <literal>tg_relation->rd_att</> (descriptor of the relation - tuples) and <literal>tg_relation->rd_rel->relname</> - (relation name; the type is not <type>char*</> but - <type>NameData</>; use - <literal>SPI_getrelname(tg_relation)</> to get a <type>char*</> if you + <literal>tg_relation->rd_att</literal> (descriptor of the relation + tuples) and <literal>tg_relation->rd_rel->relname</literal> + (relation name; the type is not <type>char*</type> but + <type>NameData</type>; use + <literal>SPI_getrelname(tg_relation)</literal> to get a <type>char*</type> if you need a copy of the name). </para> </listitem> </varlistentry> <varlistentry> - <term><structfield>tg_trigtuple</></term> + <term><structfield>tg_trigtuple</structfield></term> <listitem> <para> A pointer to the row for which the trigger was fired. This is @@ -610,11 +610,11 @@ typedef struct TriggerData </varlistentry> <varlistentry> - <term><structfield>tg_newtuple</></term> + <term><structfield>tg_newtuple</structfield></term> <listitem> <para> A pointer to the new version of the row, if the trigger was - fired for an <command>UPDATE</command>, and <symbol>NULL</> if + fired for an <command>UPDATE</command>, and <symbol>NULL</symbol> if it is for an <command>INSERT</command> or a <command>DELETE</command>. This is what you have to return from the function if the event is an <command>UPDATE</command> @@ -626,11 +626,11 @@ typedef struct TriggerData </varlistentry> <varlistentry> - <term><structfield>tg_trigger</></term> + <term><structfield>tg_trigger</structfield></term> <listitem> <para> - A pointer to a structure of type <structname>Trigger</>, - defined in <filename>utils/reltrigger.h</>: + A pointer to a structure of type <structname>Trigger</structname>, + defined in <filename>utils/reltrigger.h</filename>: <programlisting> typedef struct Trigger @@ -656,9 +656,9 @@ typedef struct Trigger } Trigger; </programlisting> - where <structfield>tgname</> is the trigger's name, - <structfield>tgnargs</> is the number of arguments in - <structfield>tgargs</>, and <structfield>tgargs</> is an array of + where <structfield>tgname</structfield> is the trigger's name, + <structfield>tgnargs</structfield> is the number of arguments in + <structfield>tgargs</structfield>, and <structfield>tgargs</structfield> is an array of pointers to the arguments specified in the <command>CREATE TRIGGER</command> statement. The other members are for internal use only. @@ -667,7 +667,7 @@ typedef struct Trigger </varlistentry> <varlistentry> - <term><structfield>tg_trigtuplebuf</></term> + <term><structfield>tg_trigtuplebuf</structfield></term> <listitem> <para> The buffer containing <structfield>tg_trigtuple</structfield>, or <symbol>InvalidBuffer</symbol> if there @@ -677,7 +677,7 @@ typedef struct Trigger </varlistentry> <varlistentry> - <term><structfield>tg_newtuplebuf</></term> + <term><structfield>tg_newtuplebuf</structfield></term> <listitem> <para> The buffer containing <structfield>tg_newtuple</structfield>, or <symbol>InvalidBuffer</symbol> if there @@ -687,24 +687,24 @@ typedef struct Trigger </varlistentry> <varlistentry> - <term><structfield>tg_oldtable</></term> + <term><structfield>tg_oldtable</structfield></term> <listitem> <para> A pointer to a structure of type <structname>Tuplestorestate</structname> containing zero or more rows in the format specified by - <structfield>tg_relation</structfield>, or a <symbol>NULL</> pointer + <structfield>tg_relation</structfield>, or a <symbol>NULL</symbol> pointer if there is no <literal>OLD TABLE</literal> transition relation. </para> </listitem> </varlistentry> <varlistentry> - <term><structfield>tg_newtable</></term> + <term><structfield>tg_newtable</structfield></term> <listitem> <para> A pointer to a structure of type <structname>Tuplestorestate</structname> containing zero or more rows in the format specified by - <structfield>tg_relation</structfield>, or a <symbol>NULL</> pointer + <structfield>tg_relation</structfield>, or a <symbol>NULL</symbol> pointer if there is no <literal>NEW TABLE</literal> transition relation. </para> </listitem> @@ -720,10 +720,10 @@ typedef struct Trigger <para> A trigger function must return either a - <structname>HeapTuple</> pointer or a <symbol>NULL</> pointer - (<emphasis>not</> an SQL null value, that is, do not set <parameter>isNull</parameter> true). + <structname>HeapTuple</structname> pointer or a <symbol>NULL</symbol> pointer + (<emphasis>not</emphasis> an SQL null value, that is, do not set <parameter>isNull</parameter> true). Be careful to return either - <structfield>tg_trigtuple</> or <structfield>tg_newtuple</>, + <structfield>tg_trigtuple</structfield> or <structfield>tg_newtuple</structfield>, as appropriate, if you don't want to modify the row being operated on. </para> </sect1> @@ -738,10 +738,10 @@ typedef struct Trigger </para> <para> - The function <function>trigf</> reports the number of rows in the - table <structname>ttest</> and skips the actual operation if the + The function <function>trigf</function> reports the number of rows in the + table <structname>ttest</structname> and skips the actual operation if the command attempts to insert a null value into the column - <structfield>x</>. (So the trigger acts as a not-null constraint but + <structfield>x</structfield>. (So the trigger acts as a not-null constraint but doesn't abort the transaction.) </para> @@ -838,7 +838,7 @@ trigf(PG_FUNCTION_ARGS) linkend="dfunc">), declare the function and the triggers: <programlisting> CREATE FUNCTION trigf() RETURNS trigger - AS '<replaceable>filename</>' + AS '<replaceable>filename</replaceable>' LANGUAGE C; CREATE TRIGGER tbefore BEFORE INSERT OR UPDATE OR DELETE ON ttest diff --git a/doc/src/sgml/tsm-system-rows.sgml b/doc/src/sgml/tsm-system-rows.sgml index 93aa5366649..8504ee1281e 100644 --- a/doc/src/sgml/tsm-system-rows.sgml +++ b/doc/src/sgml/tsm-system-rows.sgml @@ -8,9 +8,9 @@ </indexterm> <para> - The <filename>tsm_system_rows</> module provides the table sampling method + The <filename>tsm_system_rows</filename> module provides the table sampling method <literal>SYSTEM_ROWS</literal>, which can be used in - the <literal>TABLESAMPLE</> clause of a <xref linkend="sql-select"> + the <literal>TABLESAMPLE</literal> clause of a <xref linkend="sql-select"> command. </para> @@ -38,7 +38,7 @@ <para> Here is an example of selecting a sample of a table with - <literal>SYSTEM_ROWS</>. First install the extension: + <literal>SYSTEM_ROWS</literal>. First install the extension: </para> <programlisting> @@ -55,7 +55,7 @@ SELECT * FROM my_table TABLESAMPLE SYSTEM_ROWS(100); <para> This command will return a sample of 100 rows from the - table <structname>my_table</> (unless the table does not have 100 + table <structname>my_table</structname> (unless the table does not have 100 visible rows, in which case all its rows are returned). </para> </sect2> diff --git a/doc/src/sgml/tsm-system-time.sgml b/doc/src/sgml/tsm-system-time.sgml index 3f8ff1a026f..525292bb7c5 100644 --- a/doc/src/sgml/tsm-system-time.sgml +++ b/doc/src/sgml/tsm-system-time.sgml @@ -8,9 +8,9 @@ </indexterm> <para> - The <filename>tsm_system_time</> module provides the table sampling method + The <filename>tsm_system_time</filename> module provides the table sampling method <literal>SYSTEM_TIME</literal>, which can be used in - the <literal>TABLESAMPLE</> clause of a <xref linkend="sql-select"> + the <literal>TABLESAMPLE</literal> clause of a <xref linkend="sql-select"> command. </para> @@ -40,7 +40,7 @@ <para> Here is an example of selecting a sample of a table with - <literal>SYSTEM_TIME</>. First install the extension: + <literal>SYSTEM_TIME</literal>. First install the extension: </para> <programlisting> @@ -56,7 +56,7 @@ SELECT * FROM my_table TABLESAMPLE SYSTEM_TIME(1000); </para> <para> - This command will return as large a sample of <structname>my_table</> as + This command will return as large a sample of <structname>my_table</structname> as it can read in 1 second (1000 milliseconds). Of course, if the whole table can be read in under 1 second, all its rows will be returned. </para> diff --git a/doc/src/sgml/typeconv.sgml b/doc/src/sgml/typeconv.sgml index 63d41f03f3f..5c99e3adaf1 100644 --- a/doc/src/sgml/typeconv.sgml +++ b/doc/src/sgml/typeconv.sgml @@ -40,7 +40,7 @@ has an associated data type which determines its behavior and allowed usage. <productname>PostgreSQL</productname> has an extensible type system that is more general and flexible than other <acronym>SQL</acronym> implementations. Hence, most type conversion behavior in <productname>PostgreSQL</productname> -is governed by general rules rather than by <foreignphrase>ad hoc</> +is governed by general rules rather than by <foreignphrase>ad hoc</foreignphrase> heuristics. This allows the use of mixed-type expressions even with user-defined types. </para> @@ -124,11 +124,11 @@ with, and perhaps converted to, the types of the target columns. <para> Since all query results from a unionized <command>SELECT</command> statement must appear in a single set of columns, the types of the results of each -<command>SELECT</> clause must be matched up and converted to a uniform set. -Similarly, the result expressions of a <literal>CASE</> construct must be -converted to a common type so that the <literal>CASE</> expression as a whole -has a known output type. The same holds for <literal>ARRAY</> constructs, -and for the <function>GREATEST</> and <function>LEAST</> functions. +<command>SELECT</command> clause must be matched up and converted to a uniform set. +Similarly, the result expressions of a <literal>CASE</literal> construct must be +converted to a common type so that the <literal>CASE</literal> expression as a whole +has a known output type. The same holds for <literal>ARRAY</literal> constructs, +and for the <function>GREATEST</function> and <function>LEAST</function> functions. </para> </listitem> </varlistentry> @@ -345,7 +345,7 @@ Some examples follow. <title>Factorial Operator Type Resolution</title> <para> -There is only one factorial operator (postfix <literal>!</>) +There is only one factorial operator (postfix <literal>!</literal>) defined in the standard catalog, and it takes an argument of type <type>bigint</type>. The scanner assigns an initial type of <type>integer</type> to the argument @@ -423,11 +423,11 @@ type to resolve the unknown-type literals as. <para> The <productname>PostgreSQL</productname> operator catalog has several -entries for the prefix operator <literal>@</>, all of which implement +entries for the prefix operator <literal>@</literal>, all of which implement absolute-value operations for various numeric data types. One of these entries is for type <type>float8</type>, which is the preferred type in the numeric category. Therefore, <productname>PostgreSQL</productname> -will use that entry when faced with an <type>unknown</> input: +will use that entry when faced with an <type>unknown</type> input: <screen> SELECT @ '-4.5' AS "abs"; abs @@ -446,9 +446,9 @@ ERROR: "-4.5e500" is out of range for type double precision </para> <para> -On the other hand, the prefix operator <literal>~</> (bitwise negation) +On the other hand, the prefix operator <literal>~</literal> (bitwise negation) is defined only for integer data types, not for <type>float8</type>. So, if we -try a similar case with <literal>~</>, we get: +try a similar case with <literal>~</literal>, we get: <screen> SELECT ~ '20' AS "negation"; @@ -457,7 +457,7 @@ HINT: Could not choose a best candidate operator. You might need to add explicit type casts. </screen> This happens because the system cannot decide which of the several -possible <literal>~</> operators should be preferred. We can help +possible <literal>~</literal> operators should be preferred. We can help it out with an explicit cast: <screen> SELECT ~ CAST('20' AS int8) AS "negation"; @@ -485,10 +485,10 @@ SELECT array[1,2] <@ '{1,2,3}' as "is subset"; (1 row) </screen> The <productname>PostgreSQL</productname> operator catalog has several -entries for the infix operator <literal><@</>, but the only two that +entries for the infix operator <literal><@</literal>, but the only two that could possibly accept an integer array on the left-hand side are -array inclusion (<type>anyarray</> <literal><@</> <type>anyarray</>) -and range inclusion (<type>anyelement</> <literal><@</> <type>anyrange</>). +array inclusion (<type>anyarray</type> <literal><@</literal> <type>anyarray</type>) +and range inclusion (<type>anyelement</type> <literal><@</literal> <type>anyrange</type>). Since none of these polymorphic pseudo-types (see <xref linkend="datatype-pseudo">) are considered preferred, the parser cannot resolve the ambiguity on that basis. @@ -518,19 +518,19 @@ CREATE TABLE mytable (val mytext); SELECT * FROM mytable WHERE val = 'foo'; </screen> This query will not use the custom operator. The parser will first see if -there is a <type>mytext</> <literal>=</> <type>mytext</> operator +there is a <type>mytext</type> <literal>=</literal> <type>mytext</type> operator (<xref linkend="op-resol-exact-unknown">), which there is not; -then it will consider the domain's base type <type>text</>, and see if -there is a <type>text</> <literal>=</> <type>text</> operator +then it will consider the domain's base type <type>text</type>, and see if +there is a <type>text</type> <literal>=</literal> <type>text</type> operator (<xref linkend="op-resol-exact-domain">), which there is; -so it resolves the <type>unknown</>-type literal as <type>text</> and -uses the <type>text</> <literal>=</> <type>text</> operator. +so it resolves the <type>unknown</type>-type literal as <type>text</type> and +uses the <type>text</type> <literal>=</literal> <type>text</type> operator. The only way to get the custom operator to be used is to explicitly cast the literal: <screen> SELECT * FROM mytable WHERE val = text 'foo'; </screen> -so that the <type>mytext</> <literal>=</> <type>text</> operator is found +so that the <type>mytext</type> <literal>=</literal> <type>text</type> operator is found immediately according to the exact-match rule. If the best-match rules are reached, they actively discriminate against operators on domain types. If they did not, such an operator would create too many ambiguous-operator @@ -580,8 +580,8 @@ search path position. </step> <step performance="optional"> <para> -If a function is declared with a <literal>VARIADIC</> array parameter, and -the call does not use the <literal>VARIADIC</> keyword, then the function +If a function is declared with a <literal>VARIADIC</literal> array parameter, and +the call does not use the <literal>VARIADIC</literal> keyword, then the function is treated as if the array parameter were replaced by one or more occurrences of its element type, as needed to match the call. After such expansion the function might have effective argument types identical to some non-variadic @@ -599,7 +599,7 @@ search path is used. If there are two or more such functions in the same schema with identical parameter types in the non-defaulted positions (which is possible if they have different sets of defaultable parameters), the system will not be able to determine which to prefer, and so an <quote>ambiguous -function call</> error will result if no better match to the call can be +function call</quote> error will result if no better match to the call can be found. </para> </step> @@ -626,7 +626,7 @@ an unknown-type literal, or a type that is binary-coercible to the named data type, or a type that could be converted to the named data type by applying that type's I/O functions (that is, the conversion is either to or from one of the standard string types). When these conditions are met, -the function call is treated as a form of <literal>CAST</> specification. +the function call is treated as a form of <literal>CAST</literal> specification. <footnote> <para> The reason for this step is to support function-style cast specifications @@ -709,7 +709,7 @@ Otherwise, fail. </procedure> <para> -Note that the <quote>best match</> rules are identical for operator and +Note that the <quote>best match</quote> rules are identical for operator and function type resolution. Some examples follow. </para> @@ -790,7 +790,7 @@ SELECT substr(CAST (varchar '1234' AS text), 3); <para> <note> <para> -The parser learns from the <structname>pg_cast</> catalog that +The parser learns from the <structname>pg_cast</structname> catalog that <type>text</type> and <type>varchar</type> are binary-compatible, meaning that one can be passed to a function that accepts the other without doing any physical conversion. Therefore, no @@ -809,8 +809,8 @@ HINT: No function matches the given name and argument types. You might need to add explicit type casts. </screen> -This does not work because <type>integer</> does not have an implicit cast -to <type>text</>. An explicit cast will work, however: +This does not work because <type>integer</type> does not have an implicit cast +to <type>text</type>. An explicit cast will work, however: <screen> SELECT substr(CAST (1234 AS text), 3); @@ -845,8 +845,8 @@ Check for an exact match with the target. <step performance="required"> <para> Otherwise, try to convert the expression to the target type. This is possible -if an <firstterm>assignment cast</> between the two types is registered in the -<structname>pg_cast</> catalog (see <xref linkend="sql-createcast">). +if an <firstterm>assignment cast</firstterm> between the two types is registered in the +<structname>pg_cast</structname> catalog (see <xref linkend="sql-createcast">). Alternatively, if the expression is an unknown-type literal, the contents of the literal string will be fed to the input conversion routine for the target type. @@ -857,12 +857,12 @@ type. <para> Check to see if there is a sizing cast for the target type. A sizing cast is a cast from that type to itself. If one is found in the -<structname>pg_cast</> catalog, apply it to the expression before storing +<structname>pg_cast</structname> catalog, apply it to the expression before storing into the destination column. The implementation function for such a cast always takes an extra parameter of type <type>integer</type>, which receives -the destination column's <structfield>atttypmod</> value (typically its -declared length, although the interpretation of <structfield>atttypmod</> -varies for different data types), and it may take a third <type>boolean</> +the destination column's <structfield>atttypmod</structfield> value (typically its +declared length, although the interpretation of <structfield>atttypmod</structfield> +varies for different data types), and it may take a third <type>boolean</type> parameter that says whether the cast is explicit or implicit. The cast function is responsible for applying any length-dependent semantics such as size @@ -896,11 +896,11 @@ What has really happened here is that the two unknown literals are resolved to <type>text</type> by default, allowing the <literal>||</literal> operator to be resolved as <type>text</type> concatenation. Then the <type>text</type> result of the operator is converted to <type>bpchar</type> (<quote>blank-padded -char</>, the internal name of the <type>character</type> data type) to match the target +char</quote>, the internal name of the <type>character</type> data type) to match the target column type. (Since the conversion from <type>text</type> to <type>bpchar</type> is binary-coercible, this conversion does not insert any real function call.) Finally, the sizing function -<literal>bpchar(bpchar, integer, boolean)</> is found in the system catalog +<literal>bpchar(bpchar, integer, boolean)</literal> is found in the system catalog and applied to the operator's result and the stored column length. This type-specific function performs the required length check and addition of padding spaces. @@ -942,13 +942,13 @@ padding spaces. </indexterm> <para> -SQL <literal>UNION</> constructs must match up possibly dissimilar +SQL <literal>UNION</literal> constructs must match up possibly dissimilar types to become a single result set. The resolution algorithm is applied separately to each output column of a union query. The -<literal>INTERSECT</> and <literal>EXCEPT</> constructs resolve -dissimilar types in the same way as <literal>UNION</>. The -<literal>CASE</>, <literal>ARRAY</>, <literal>VALUES</>, -<function>GREATEST</> and <function>LEAST</> constructs use the identical +<literal>INTERSECT</literal> and <literal>EXCEPT</literal> constructs resolve +dissimilar types in the same way as <literal>UNION</literal>. The +<literal>CASE</literal>, <literal>ARRAY</literal>, <literal>VALUES</literal>, +<function>GREATEST</function> and <function>LEAST</function> constructs use the identical algorithm to match up their component expressions and select a result data type. </para> @@ -972,7 +972,7 @@ domain's base type for all subsequent steps. <para> Somewhat like the treatment of domain inputs for operators and functions, this behavior allows a domain type to be preserved through - a <literal>UNION</> or similar construct, so long as the user is + a <literal>UNION</literal> or similar construct, so long as the user is careful to ensure that all inputs are implicitly or explicitly of that exact type. Otherwise the domain's base type will be preferred. </para> @@ -1053,9 +1053,9 @@ SELECT 1.2 AS "numeric" UNION SELECT 1; 1.2 (2 rows) </screen> -The literal <literal>1.2</> is of type <type>numeric</>, -and the <type>integer</type> value <literal>1</> can be cast implicitly to -<type>numeric</>, so that type is used. +The literal <literal>1.2</literal> is of type <type>numeric</type>, +and the <type>integer</type> value <literal>1</literal> can be cast implicitly to +<type>numeric</type>, so that type is used. </para> </example> @@ -1072,9 +1072,9 @@ SELECT 1 AS "real" UNION SELECT CAST('2.2' AS REAL); 2.2 (2 rows) </screen> -Here, since type <type>real</> cannot be implicitly cast to <type>integer</>, -but <type>integer</> can be implicitly cast to <type>real</>, the union -result type is resolved as <type>real</>. +Here, since type <type>real</type> cannot be implicitly cast to <type>integer</type>, +but <type>integer</type> can be implicitly cast to <type>real</type>, the union +result type is resolved as <type>real</type>. </para> </example> </sect1> @@ -1089,38 +1089,38 @@ result type is resolved as <type>real</>. <para> The rules given in the preceding sections will result in assignment -of non-<type>unknown</> data types to all expressions in a SQL query, +of non-<type>unknown</type> data types to all expressions in a SQL query, except for unspecified-type literals that appear as simple output -columns of a <command>SELECT</> command. For example, in +columns of a <command>SELECT</command> command. For example, in <screen> SELECT 'Hello World'; </screen> there is nothing to identify what type the string literal should be -taken as. In this situation <productname>PostgreSQL</> will fall back -to resolving the literal's type as <type>text</>. +taken as. In this situation <productname>PostgreSQL</productname> will fall back +to resolving the literal's type as <type>text</type>. </para> <para> -When the <command>SELECT</> is one arm of a <literal>UNION</> -(or <literal>INTERSECT</> or <literal>EXCEPT</>) construct, or when it -appears within <command>INSERT ... SELECT</>, this rule is not applied +When the <command>SELECT</command> is one arm of a <literal>UNION</literal> +(or <literal>INTERSECT</literal> or <literal>EXCEPT</literal>) construct, or when it +appears within <command>INSERT ... SELECT</command>, this rule is not applied since rules given in preceding sections take precedence. The type of an -unspecified-type literal can be taken from the other <literal>UNION</> arm +unspecified-type literal can be taken from the other <literal>UNION</literal> arm in the first case, or from the destination column in the second case. </para> <para> -<literal>RETURNING</> lists are treated the same as <command>SELECT</> +<literal>RETURNING</literal> lists are treated the same as <command>SELECT</command> output lists for this purpose. </para> <note> <para> - Prior to <productname>PostgreSQL</> 10, this rule did not exist, and - unspecified-type literals in a <command>SELECT</> output list were - left as type <type>unknown</>. That had assorted bad consequences, + Prior to <productname>PostgreSQL</productname> 10, this rule did not exist, and + unspecified-type literals in a <command>SELECT</command> output list were + left as type <type>unknown</type>. That had assorted bad consequences, so it's been changed. </para> </note> diff --git a/doc/src/sgml/unaccent.sgml b/doc/src/sgml/unaccent.sgml index d5cf98f6c1f..a7f5f53041b 100644 --- a/doc/src/sgml/unaccent.sgml +++ b/doc/src/sgml/unaccent.sgml @@ -8,7 +8,7 @@ </indexterm> <para> - <filename>unaccent</> is a text search dictionary that removes accents + <filename>unaccent</filename> is a text search dictionary that removes accents (diacritic signs) from lexemes. It's a filtering dictionary, which means its output is always passed to the next dictionary (if any), unlike the normal @@ -17,7 +17,7 @@ </para> <para> - The current implementation of <filename>unaccent</> cannot be used as a + The current implementation of <filename>unaccent</filename> cannot be used as a normalizing dictionary for the <filename>thesaurus</filename> dictionary. </para> @@ -25,17 +25,17 @@ <title>Configuration</title> <para> - An <literal>unaccent</> dictionary accepts the following options: + An <literal>unaccent</literal> dictionary accepts the following options: </para> <itemizedlist> <listitem> <para> - <literal>RULES</> is the base name of the file containing the list of + <literal>RULES</literal> is the base name of the file containing the list of translation rules. This file must be stored in - <filename>$SHAREDIR/tsearch_data/</> (where <literal>$SHAREDIR</> means - the <productname>PostgreSQL</> installation's shared-data directory). - Its name must end in <literal>.rules</> (which is not to be included in - the <literal>RULES</> parameter). + <filename>$SHAREDIR/tsearch_data/</filename> (where <literal>$SHAREDIR</literal> means + the <productname>PostgreSQL</productname> installation's shared-data directory). + Its name must end in <literal>.rules</literal> (which is not to be included in + the <literal>RULES</literal> parameter). </para> </listitem> </itemizedlist> @@ -72,15 +72,15 @@ <listitem> <para> - Actually, each <quote>character</> can be any string not containing - whitespace, so <filename>unaccent</> dictionaries could be used for + Actually, each <quote>character</quote> can be any string not containing + whitespace, so <filename>unaccent</filename> dictionaries could be used for other sorts of substring substitutions besides diacritic removal. </para> </listitem> <listitem> <para> - As with other <productname>PostgreSQL</> text search configuration files, + As with other <productname>PostgreSQL</productname> text search configuration files, the rules file must be stored in UTF-8 encoding. The data is automatically translated into the current database's encoding when loaded. Any lines containing untranslatable characters are silently @@ -92,8 +92,8 @@ <para> A more complete example, which is directly useful for most European - languages, can be found in <filename>unaccent.rules</>, which is installed - in <filename>$SHAREDIR/tsearch_data/</> when the <filename>unaccent</> + languages, can be found in <filename>unaccent.rules</filename>, which is installed + in <filename>$SHAREDIR/tsearch_data/</filename> when the <filename>unaccent</filename> module is installed. This rules file translates characters with accents to the same characters without accents, and it also expands ligatures into the equivalent series of simple characters (for example, Æ to @@ -105,11 +105,11 @@ <title>Usage</title> <para> - Installing the <literal>unaccent</> extension creates a text - search template <literal>unaccent</> and a dictionary <literal>unaccent</> - based on it. The <literal>unaccent</> dictionary has the default - parameter setting <literal>RULES='unaccent'</>, which makes it immediately - usable with the standard <filename>unaccent.rules</> file. + Installing the <literal>unaccent</literal> extension creates a text + search template <literal>unaccent</literal> and a dictionary <literal>unaccent</literal> + based on it. The <literal>unaccent</literal> dictionary has the default + parameter setting <literal>RULES='unaccent'</literal>, which makes it immediately + usable with the standard <filename>unaccent.rules</filename> file. If you wish, you can alter the parameter, for example <programlisting> @@ -132,7 +132,7 @@ mydb=# select ts_lexize('unaccent','Hôtel'); <para> Here is an example showing how to insert the - <filename>unaccent</> dictionary into a text search configuration: + <filename>unaccent</filename> dictionary into a text search configuration: <programlisting> mydb=# CREATE TEXT SEARCH CONFIGURATION fr ( COPY = french ); mydb=# ALTER TEXT SEARCH CONFIGURATION fr @@ -163,9 +163,9 @@ mydb=# select ts_headline('fr','Hôtel de la Mer',to_tsquery('fr','Hotels') <title>Functions</title> <para> - The <function>unaccent()</> function removes accents (diacritic signs) from + The <function>unaccent()</function> function removes accents (diacritic signs) from a given string. Basically, it's a wrapper around - <filename>unaccent</>-type dictionaries, but it can be used outside normal + <filename>unaccent</filename>-type dictionaries, but it can be used outside normal text search contexts. </para> @@ -179,7 +179,7 @@ unaccent(<optional><replaceable class="parameter">dictionary</replaceable>, </op <para> If the <replaceable class="parameter">dictionary</replaceable> argument is - omitted, <literal>unaccent</> is assumed. + omitted, <literal>unaccent</literal> is assumed. </para> <para> diff --git a/doc/src/sgml/user-manag.sgml b/doc/src/sgml/user-manag.sgml index 46989f0169a..2416bfd03d8 100644 --- a/doc/src/sgml/user-manag.sgml +++ b/doc/src/sgml/user-manag.sgml @@ -5,18 +5,18 @@ <para> <productname>PostgreSQL</productname> manages database access permissions - using the concept of <firstterm>roles</>. A role can be thought of as + using the concept of <firstterm>roles</firstterm>. A role can be thought of as either a database user, or a group of database users, depending on how the role is set up. Roles can own database objects (for example, tables and functions) and can assign privileges on those objects to other roles to control who has access to which objects. Furthermore, it is possible - to grant <firstterm>membership</> in a role to another role, thus + to grant <firstterm>membership</firstterm> in a role to another role, thus allowing the member role to use privileges assigned to another role. </para> <para> - The concept of roles subsumes the concepts of <quote>users</> and - <quote>groups</>. In <productname>PostgreSQL</productname> versions + The concept of roles subsumes the concepts of <quote>users</quote> and + <quote>groups</quote>. In <productname>PostgreSQL</productname> versions before 8.1, users and groups were distinct kinds of entities, but now there are only roles. Any role can act as a user, a group, or both. </para> @@ -59,7 +59,7 @@ CREATE ROLE <replaceable>name</replaceable>; <replaceable>name</replaceable> follows the rules for SQL identifiers: either unadorned without special characters, or double-quoted. (In practice, you will usually want to add additional - options, such as <literal>LOGIN</>, to the command. More details appear + options, such as <literal>LOGIN</literal>, to the command. More details appear below.) To remove an existing role, use the analogous <xref linkend="sql-droprole"> command: <synopsis> @@ -87,19 +87,19 @@ dropuser <replaceable>name</replaceable> </para> <para> - To determine the set of existing roles, examine the <structname>pg_roles</> + To determine the set of existing roles, examine the <structname>pg_roles</structname> system catalog, for example <synopsis> SELECT rolname FROM pg_roles; </synopsis> - The <xref linkend="app-psql"> program's <literal>\du</> meta-command + The <xref linkend="app-psql"> program's <literal>\du</literal> meta-command is also useful for listing the existing roles. </para> <para> In order to bootstrap the database system, a freshly initialized system always contains one predefined role. This role is always - a <quote>superuser</>, and by default (unless altered when running + a <quote>superuser</quote>, and by default (unless altered when running <command>initdb</command>) it will have the same name as the operating system user that initialized the database cluster. Customarily, this role will be named @@ -118,7 +118,7 @@ SELECT rolname FROM pg_roles; <option>-U</option> command line option to indicate the role to connect as. Many applications assume the name of the current operating system user by default (including - <command>createuser</> and <command>psql</>). Therefore it + <command>createuser</command> and <command>psql</command>). Therefore it is often convenient to maintain a naming correspondence between roles and operating system users. </para> @@ -145,27 +145,27 @@ SELECT rolname FROM pg_roles; <variablelist> <varlistentry> - <term>login privilege<indexterm><primary>login privilege</></></term> + <term>login privilege<indexterm><primary>login privilege</primary></indexterm></term> <listitem> <para> - Only roles that have the <literal>LOGIN</> attribute can be used + Only roles that have the <literal>LOGIN</literal> attribute can be used as the initial role name for a database connection. A role with - the <literal>LOGIN</> attribute can be considered the same - as a <quote>database user</>. To create a role with login privilege, + the <literal>LOGIN</literal> attribute can be considered the same + as a <quote>database user</quote>. To create a role with login privilege, use either: <programlisting> CREATE ROLE <replaceable>name</replaceable> LOGIN; CREATE USER <replaceable>name</replaceable>; </programlisting> - (<command>CREATE USER</> is equivalent to <command>CREATE ROLE</> - except that <command>CREATE USER</> assumes <literal>LOGIN</> by - default, while <command>CREATE ROLE</> does not.) + (<command>CREATE USER</command> is equivalent to <command>CREATE ROLE</command> + except that <command>CREATE USER</command> assumes <literal>LOGIN</literal> by + default, while <command>CREATE ROLE</command> does not.) </para> </listitem> </varlistentry> <varlistentry> - <term>superuser status<indexterm><primary>superuser</></></term> + <term>superuser status<indexterm><primary>superuser</primary></indexterm></term> <listitem> <para> A database superuser bypasses all permission checks, except the right @@ -179,7 +179,7 @@ CREATE USER <replaceable>name</replaceable>; </varlistentry> <varlistentry> - <term>database creation<indexterm><primary>database</><secondary>privilege to create</></></term> + <term>database creation<indexterm><primary>database</primary><secondary>privilege to create</secondary></indexterm></term> <listitem> <para> A role must be explicitly given permission to create databases @@ -191,30 +191,30 @@ CREATE USER <replaceable>name</replaceable>; </varlistentry> <varlistentry> - <term>role creation<indexterm><primary>role</><secondary>privilege to create</></></term> + <term>role creation<indexterm><primary>role</primary><secondary>privilege to create</secondary></indexterm></term> <listitem> <para> A role must be explicitly given permission to create more roles (except for superusers, since those bypass all permission checks). To create such a role, use <literal>CREATE ROLE <replaceable>name</replaceable> CREATEROLE</literal>. - A role with <literal>CREATEROLE</> privilege can alter and drop + A role with <literal>CREATEROLE</literal> privilege can alter and drop other roles, too, as well as grant or revoke membership in them. However, to create, alter, drop, or change membership of a superuser role, superuser status is required; - <literal>CREATEROLE</> is insufficient for that. + <literal>CREATEROLE</literal> is insufficient for that. </para> </listitem> </varlistentry> <varlistentry> - <term>initiating replication<indexterm><primary>role</><secondary>privilege to initiate replication</></></term> + <term>initiating replication<indexterm><primary>role</primary><secondary>privilege to initiate replication</secondary></indexterm></term> <listitem> <para> A role must explicitly be given permission to initiate streaming replication (except for superusers, since those bypass all permission checks). A role used for streaming replication must - have <literal>LOGIN</> permission as well. To create such a role, use + have <literal>LOGIN</literal> permission as well. To create such a role, use <literal>CREATE ROLE <replaceable>name</replaceable> REPLICATION LOGIN</literal>. </para> @@ -222,32 +222,32 @@ CREATE USER <replaceable>name</replaceable>; </varlistentry> <varlistentry> - <term>password<indexterm><primary>password</></></term> + <term>password<indexterm><primary>password</primary></indexterm></term> <listitem> <para> A password is only significant if the client authentication method requires the user to supply a password when connecting - to the database. The <option>password</> and - <option>md5</> authentication methods + to the database. The <option>password</option> and + <option>md5</option> authentication methods make use of passwords. Database passwords are separate from operating system passwords. Specify a password upon role creation with <literal>CREATE ROLE - <replaceable>name</replaceable> PASSWORD '<replaceable>string</>'</literal>. + <replaceable>name</replaceable> PASSWORD '<replaceable>string</replaceable>'</literal>. </para> </listitem> </varlistentry> </variablelist> A role's attributes can be modified after creation with - <command>ALTER ROLE</command>.<indexterm><primary>ALTER ROLE</></> + <command>ALTER ROLE</command>.<indexterm><primary>ALTER ROLE</primary></indexterm> See the reference pages for the <xref linkend="sql-createrole"> and <xref linkend="sql-alterrole"> commands for details. </para> <tip> <para> - It is good practice to create a role that has the <literal>CREATEDB</> - and <literal>CREATEROLE</> privileges, but is not a superuser, and then + It is good practice to create a role that has the <literal>CREATEDB</literal> + and <literal>CREATEROLE</literal> privileges, but is not a superuser, and then use this role for all routine management of databases and roles. This approach avoids the dangers of operating as a superuser for tasks that do not really require it. @@ -269,9 +269,9 @@ ALTER ROLE myname SET enable_indexscan TO off; just before the session started. You can still alter this setting during the session; it will only be the default. To remove a role-specific default setting, use - <literal>ALTER ROLE <replaceable>rolename</> RESET <replaceable>varname</></literal>. + <literal>ALTER ROLE <replaceable>rolename</replaceable> RESET <replaceable>varname</replaceable></literal>. Note that role-specific defaults attached to roles without - <literal>LOGIN</> privilege are fairly useless, since they will never + <literal>LOGIN</literal> privilege are fairly useless, since they will never be invoked. </para> </sect1> @@ -280,7 +280,7 @@ ALTER ROLE myname SET enable_indexscan TO off; <title>Role Membership</title> <indexterm zone="role-membership"> - <primary>role</><secondary>membership in</> + <primary>role</primary><secondary>membership in</secondary> </indexterm> <para> @@ -288,7 +288,7 @@ ALTER ROLE myname SET enable_indexscan TO off; management of privileges: that way, privileges can be granted to, or revoked from, a group as a whole. In <productname>PostgreSQL</productname> this is done by creating a role that represents the group, and then - granting <firstterm>membership</> in the group role to individual user + granting <firstterm>membership</firstterm> in the group role to individual user roles. </para> @@ -297,7 +297,7 @@ ALTER ROLE myname SET enable_indexscan TO off; <synopsis> CREATE ROLE <replaceable>name</replaceable>; </synopsis> - Typically a role being used as a group would not have the <literal>LOGIN</> + Typically a role being used as a group would not have the <literal>LOGIN</literal> attribute, though you can set it if you wish. </para> @@ -320,11 +320,11 @@ REVOKE <replaceable>group_role</replaceable> FROM <replaceable>role1</replaceabl The members of a group role can use the privileges of the role in two ways. First, every member of a group can explicitly do <xref linkend="sql-set-role"> to - temporarily <quote>become</> the group role. In this state, the + temporarily <quote>become</quote> the group role. In this state, the database session has access to the privileges of the group role rather than the original login role, and any database objects created are considered owned by the group role not the login role. Second, member - roles that have the <literal>INHERIT</> attribute automatically have use + roles that have the <literal>INHERIT</literal> attribute automatically have use of the privileges of roles of which they are members, including any privileges inherited by those roles. As an example, suppose we have done: @@ -335,25 +335,25 @@ CREATE ROLE wheel NOINHERIT; GRANT admin TO joe; GRANT wheel TO admin; </programlisting> - Immediately after connecting as role <literal>joe</>, a database - session will have use of privileges granted directly to <literal>joe</> - plus any privileges granted to <literal>admin</>, because <literal>joe</> - <quote>inherits</> <literal>admin</>'s privileges. However, privileges - granted to <literal>wheel</> are not available, because even though - <literal>joe</> is indirectly a member of <literal>wheel</>, the - membership is via <literal>admin</> which has the <literal>NOINHERIT</> + Immediately after connecting as role <literal>joe</literal>, a database + session will have use of privileges granted directly to <literal>joe</literal> + plus any privileges granted to <literal>admin</literal>, because <literal>joe</literal> + <quote>inherits</quote> <literal>admin</literal>'s privileges. However, privileges + granted to <literal>wheel</literal> are not available, because even though + <literal>joe</literal> is indirectly a member of <literal>wheel</literal>, the + membership is via <literal>admin</literal> which has the <literal>NOINHERIT</literal> attribute. After: <programlisting> SET ROLE admin; </programlisting> the session would have use of only those privileges granted to - <literal>admin</>, and not those granted to <literal>joe</>. After: + <literal>admin</literal>, and not those granted to <literal>joe</literal>. After: <programlisting> SET ROLE wheel; </programlisting> the session would have use of only those privileges granted to - <literal>wheel</>, and not those granted to either <literal>joe</> - or <literal>admin</>. The original privilege state can be restored + <literal>wheel</literal>, and not those granted to either <literal>joe</literal> + or <literal>admin</literal>. The original privilege state can be restored with any of: <programlisting> SET ROLE joe; @@ -364,10 +364,10 @@ RESET ROLE; <note> <para> - The <command>SET ROLE</> command always allows selecting any role + The <command>SET ROLE</command> command always allows selecting any role that the original login role is directly or indirectly a member of. Thus, in the above example, it is not necessary to become - <literal>admin</> before becoming <literal>wheel</>. + <literal>admin</literal> before becoming <literal>wheel</literal>. </para> </note> @@ -376,26 +376,26 @@ RESET ROLE; In the SQL standard, there is a clear distinction between users and roles, and users do not automatically inherit privileges while roles do. This behavior can be obtained in <productname>PostgreSQL</productname> by giving - roles being used as SQL roles the <literal>INHERIT</> attribute, while - giving roles being used as SQL users the <literal>NOINHERIT</> attribute. + roles being used as SQL roles the <literal>INHERIT</literal> attribute, while + giving roles being used as SQL users the <literal>NOINHERIT</literal> attribute. However, <productname>PostgreSQL</productname> defaults to giving all roles - the <literal>INHERIT</> attribute, for backward compatibility with pre-8.1 + the <literal>INHERIT</literal> attribute, for backward compatibility with pre-8.1 releases in which users always had use of permissions granted to groups they were members of. </para> </note> <para> - The role attributes <literal>LOGIN</>, <literal>SUPERUSER</>, - <literal>CREATEDB</>, and <literal>CREATEROLE</> can be thought of as + The role attributes <literal>LOGIN</literal>, <literal>SUPERUSER</literal>, + <literal>CREATEDB</literal>, and <literal>CREATEROLE</literal> can be thought of as special privileges, but they are never inherited as ordinary privileges - on database objects are. You must actually <command>SET ROLE</> to a + on database objects are. You must actually <command>SET ROLE</command> to a specific role having one of these attributes in order to make use of the attribute. Continuing the above example, we might choose to - grant <literal>CREATEDB</> and <literal>CREATEROLE</> to the - <literal>admin</> role. Then a session connecting as role <literal>joe</> + grant <literal>CREATEDB</literal> and <literal>CREATEROLE</literal> to the + <literal>admin</literal> role. Then a session connecting as role <literal>joe</literal> would not have these privileges immediately, only after doing - <command>SET ROLE admin</>. + <command>SET ROLE admin</command>. </para> <para> @@ -425,16 +425,16 @@ DROP ROLE <replaceable>name</replaceable>; <para> Ownership of objects can be transferred one at a time - using <command>ALTER</> commands, for example: + using <command>ALTER</command> commands, for example: <programlisting> ALTER TABLE bobs_table OWNER TO alice; </programlisting> Alternatively, the <xref linkend="sql-reassign-owned"> command can be used to reassign ownership of all objects owned by the role-to-be-dropped - to a single other role. Because <command>REASSIGN OWNED</> cannot access + to a single other role. Because <command>REASSIGN OWNED</command> cannot access objects in other databases, it is necessary to run it in each database that contains objects owned by the role. (Note that the first - such <command>REASSIGN OWNED</> will change the ownership of any + such <command>REASSIGN OWNED</command> will change the ownership of any shared-across-databases objects, that is databases or tablespaces, that are owned by the role-to-be-dropped.) </para> @@ -445,17 +445,17 @@ ALTER TABLE bobs_table OWNER TO alice; the <xref linkend="sql-drop-owned"> command. Again, this command cannot access objects in other databases, so it is necessary to run it in each database that contains objects owned by the role. Also, <command>DROP - OWNED</> will not drop entire databases or tablespaces, so it is + OWNED</command> will not drop entire databases or tablespaces, so it is necessary to do that manually if the role owns any databases or tablespaces that have not been transferred to new owners. </para> <para> - <command>DROP OWNED</> also takes care of removing any privileges granted + <command>DROP OWNED</command> also takes care of removing any privileges granted to the target role for objects that do not belong to it. - Because <command>REASSIGN OWNED</> does not touch such objects, it's - typically necessary to run both <command>REASSIGN OWNED</> - and <command>DROP OWNED</> (in that order!) to fully remove the + Because <command>REASSIGN OWNED</command> does not touch such objects, it's + typically necessary to run both <command>REASSIGN OWNED</command> + and <command>DROP OWNED</command> (in that order!) to fully remove the dependencies of a role to be dropped. </para> @@ -477,7 +477,7 @@ DROP ROLE doomed_role; </para> <para> - If <command>DROP ROLE</> is attempted while dependent objects still + If <command>DROP ROLE</command> is attempted while dependent objects still remain, it will issue messages identifying which objects need to be reassigned or dropped. </para> @@ -487,7 +487,7 @@ DROP ROLE doomed_role; <title>Default Roles</title> <indexterm zone="default-roles"> - <primary>role</> + <primary>role</primary> </indexterm> <para> @@ -589,7 +589,7 @@ GRANT pg_signal_backend TO admin_user; possible to change the server's internal data structures. Hence, among many other things, such functions can circumvent any system access controls. Function languages that allow such access - are considered <quote>untrusted</>, and + are considered <quote>untrusted</quote>, and <productname>PostgreSQL</productname> allows only superusers to create functions written in those languages. </para> diff --git a/doc/src/sgml/uuid-ossp.sgml b/doc/src/sgml/uuid-ossp.sgml index 227d4a839c8..b1c1cd6f0af 100644 --- a/doc/src/sgml/uuid-ossp.sgml +++ b/doc/src/sgml/uuid-ossp.sgml @@ -8,7 +8,7 @@ </indexterm> <para> - The <filename>uuid-ossp</> module provides functions to generate universally + The <filename>uuid-ossp</filename> module provides functions to generate universally unique identifiers (UUIDs) using one of several standard algorithms. There are also functions to produce certain special UUID constants. </para> @@ -63,7 +63,7 @@ <para> This function generates a version 3 UUID in the given namespace using the specified input name. The namespace should be one of the special - constants produced by the <function>uuid_ns_*()</> functions shown + constants produced by the <function>uuid_ns_*()</function> functions shown in <xref linkend="uuid-ossp-constants">. (It could be any UUID in theory.) The name is an identifier in the selected namespace. </para> @@ -114,7 +114,7 @@ SELECT uuid_generate_v3(uuid_ns_url(), 'http://www.postgresql.org'); <entry><literal>uuid_nil()</literal></entry> <entry> <para> - A <quote>nil</> UUID constant, which does not occur as a real UUID. + A <quote>nil</quote> UUID constant, which does not occur as a real UUID. </para> </entry> </row> @@ -140,7 +140,7 @@ SELECT uuid_generate_v3(uuid_ns_url(), 'http://www.postgresql.org'); <para> Constant designating the ISO object identifier (OID) namespace for UUIDs. (This pertains to ASN.1 OIDs, which are unrelated to the OIDs - used in <productname>PostgreSQL</>.) + used in <productname>PostgreSQL</productname>.) </para> </entry> </row> @@ -159,33 +159,33 @@ SELECT uuid_generate_v3(uuid_ns_url(), 'http://www.postgresql.org'); </sect2> <sect2> - <title>Building <filename>uuid-ossp</></title> + <title>Building <filename>uuid-ossp</filename></title> <para> Historically this module depended on the OSSP UUID library, which accounts for the module's name. While the OSSP UUID library can still be found at <ulink url="http://www.ossp.org/pkg/lib/uuid/"></ulink>, it is not well maintained, and is becoming increasingly difficult to port to newer - platforms. <filename>uuid-ossp</> can now be built without the OSSP + platforms. <filename>uuid-ossp</filename> can now be built without the OSSP library on some platforms. On FreeBSD, NetBSD, and some other BSD-derived platforms, suitable UUID creation functions are included in the - core <filename>libc</> library. On Linux, macOS, and some other - platforms, suitable functions are provided in the <filename>libuuid</> - library, which originally came from the <literal>e2fsprogs</> project + core <filename>libc</filename> library. On Linux, macOS, and some other + platforms, suitable functions are provided in the <filename>libuuid</filename> + library, which originally came from the <literal>e2fsprogs</literal> project (though on modern Linux it is considered part - of <literal>util-linux-ng</>). When invoking <filename>configure</>, + of <literal>util-linux-ng</literal>). When invoking <filename>configure</filename>, specify <option>--with-uuid=bsd</option> to use the BSD functions, or <option>--with-uuid=e2fs</option> to - use <literal>e2fsprogs</>' <filename>libuuid</>, or + use <literal>e2fsprogs</literal>' <filename>libuuid</filename>, or <option>--with-uuid=ossp</option> to use the OSSP UUID library. More than one of these libraries might be available on a particular - machine, so <filename>configure</> does not automatically choose one. + machine, so <filename>configure</filename> does not automatically choose one. </para> <note> <para> If you only need randomly-generated (version 4) UUIDs, - consider using the <function>gen_random_uuid()</> function + consider using the <function>gen_random_uuid()</function> function from the <xref linkend="pgcrypto"> module instead. </para> </note> diff --git a/doc/src/sgml/vacuumlo.sgml b/doc/src/sgml/vacuumlo.sgml index 9da61c93fe4..190ed9880bc 100644 --- a/doc/src/sgml/vacuumlo.sgml +++ b/doc/src/sgml/vacuumlo.sgml @@ -28,17 +28,17 @@ <title>Description</title> <para> - <application>vacuumlo</> is a simple utility program that will remove any - <quote>orphaned</> large objects from a - <productname>PostgreSQL</> database. An orphaned large object (LO) is - considered to be any LO whose OID does not appear in any <type>oid</> or - <type>lo</> data column of the database. + <application>vacuumlo</application> is a simple utility program that will remove any + <quote>orphaned</quote> large objects from a + <productname>PostgreSQL</productname> database. An orphaned large object (LO) is + considered to be any LO whose OID does not appear in any <type>oid</type> or + <type>lo</type> data column of the database. </para> <para> - If you use this, you may also be interested in the <function>lo_manage</> + If you use this, you may also be interested in the <function>lo_manage</function> trigger in the <xref linkend="lo"> module. - <function>lo_manage</> is useful to try + <function>lo_manage</function> is useful to try to avoid creating orphaned LOs in the first place. </para> @@ -55,10 +55,10 @@ <variablelist> <varlistentry> - <term><option>-l</option> <replaceable>limit</></term> + <term><option>-l</option> <replaceable>limit</replaceable></term> <listitem> <para> - Remove no more than <replaceable>limit</> large objects per + Remove no more than <replaceable>limit</replaceable> large objects per transaction (default 1000). Since the server acquires a lock per LO removed, removing too many LOs in one transaction risks exceeding <xref linkend="guc-max-locks-per-transaction">. Set the limit to @@ -82,8 +82,8 @@ </varlistentry> <varlistentry> - <term><option>-V</></term> - <term><option>--version</></term> + <term><option>-V</option></term> + <term><option>--version</option></term> <listitem> <para> Print the <application>vacuumlo</application> version and exit. @@ -92,8 +92,8 @@ </varlistentry> <varlistentry> - <term><option>-?</></term> - <term><option>--help</></term> + <term><option>-?</option></term> + <term><option>--help</option></term> <listitem> <para> Show help about <application>vacuumlo</application> command line @@ -110,29 +110,29 @@ <variablelist> <varlistentry> - <term><option>-h</option> <replaceable>hostname</></term> + <term><option>-h</option> <replaceable>hostname</replaceable></term> <listitem> <para>Database server's host.</para> </listitem> </varlistentry> <varlistentry> - <term><option>-p</option> <replaceable>port</></term> + <term><option>-p</option> <replaceable>port</replaceable></term> <listitem> <para>Database server's port.</para> </listitem> </varlistentry> <varlistentry> - <term><option>-U</option> <replaceable>username</></term> + <term><option>-U</option> <replaceable>username</replaceable></term> <listitem> <para>User name to connect as.</para> </listitem> </varlistentry> <varlistentry> - <term><option>-w</></term> - <term><option>--no-password</></term> + <term><option>-w</option></term> + <term><option>--no-password</option></term> <listitem> <para> Never issue a password prompt. If the server requires password @@ -158,7 +158,7 @@ for a password if the server demands password authentication. However, <application>vacuumlo</application> will waste a connection attempt finding out that the server wants a password. - In some cases it is worth typing <option>-W</> to avoid the extra + In some cases it is worth typing <option>-W</option> to avoid the extra connection attempt. </para> </listitem> @@ -172,10 +172,10 @@ <para> <application>vacuumlo</application> works by the following method: - First, <application>vacuumlo</> builds a temporary table which contains all + First, <application>vacuumlo</application> builds a temporary table which contains all of the OIDs of the large objects in the selected database. It then scans through all columns in the database that are of type - <type>oid</> or <type>lo</>, and removes matching entries from the temporary + <type>oid</type> or <type>lo</type>, and removes matching entries from the temporary table. (Note: Only types with these names are considered; in particular, domains over them are not considered.) The remaining entries in the temporary table identify orphaned LOs. These are removed. diff --git a/doc/src/sgml/wal.sgml b/doc/src/sgml/wal.sgml index ddcef5fbf53..f9febe916f2 100644 --- a/doc/src/sgml/wal.sgml +++ b/doc/src/sgml/wal.sgml @@ -13,7 +13,7 @@ <para> Reliability is an important property of any serious database - system, and <productname>PostgreSQL</> does everything possible to + system, and <productname>PostgreSQL</productname> does everything possible to guarantee reliable operation. One aspect of reliable operation is that all data recorded by a committed transaction should be stored in a nonvolatile area that is safe from power loss, operating @@ -34,21 +34,21 @@ First, there is the operating system's buffer cache, which caches frequently requested disk blocks and combines disk writes. Fortunately, all operating systems give applications a way to force writes from - the buffer cache to disk, and <productname>PostgreSQL</> uses those + the buffer cache to disk, and <productname>PostgreSQL</productname> uses those features. (See the <xref linkend="guc-wal-sync-method"> parameter to adjust how this is done.) </para> <para> Next, there might be a cache in the disk drive controller; this is - particularly common on <acronym>RAID</> controller cards. Some of - these caches are <firstterm>write-through</>, meaning writes are sent + particularly common on <acronym>RAID</acronym> controller cards. Some of + these caches are <firstterm>write-through</firstterm>, meaning writes are sent to the drive as soon as they arrive. Others are - <firstterm>write-back</>, meaning data is sent to the drive at + <firstterm>write-back</firstterm>, meaning data is sent to the drive at some later time. Such caches can be a reliability hazard because the memory in the disk controller cache is volatile, and will lose its contents in a power failure. Better controller cards have - <firstterm>battery-backup units</> (<acronym>BBU</>s), meaning + <firstterm>battery-backup units</firstterm> (<acronym>BBU</acronym>s), meaning the card has a battery that maintains power to the cache in case of system power loss. After power is restored the data will be written to the disk drives. @@ -71,22 +71,22 @@ <itemizedlist> <listitem> <para> - On <productname>Linux</>, IDE and SATA drives can be queried using + On <productname>Linux</productname>, IDE and SATA drives can be queried using <command>hdparm -I</command>; write caching is enabled if there is - a <literal>*</> next to <literal>Write cache</>. <command>hdparm -W 0</> + a <literal>*</literal> next to <literal>Write cache</literal>. <command>hdparm -W 0</command> can be used to turn off write caching. SCSI drives can be queried - using <ulink url="http://sg.danny.cz/sg/sdparm.html"><application>sdparm</></ulink>. + using <ulink url="http://sg.danny.cz/sg/sdparm.html"><application>sdparm</application></ulink>. Use <command>sdparm --get=WCE</command> to check - whether the write cache is enabled and <command>sdparm --clear=WCE</> + whether the write cache is enabled and <command>sdparm --clear=WCE</command> to disable it. </para> </listitem> <listitem> <para> - On <productname>FreeBSD</>, IDE drives can be queried using + On <productname>FreeBSD</productname>, IDE drives can be queried using <command>atacontrol</command> and write caching turned off using - <literal>hw.ata.wc=0</> in <filename>/boot/loader.conf</>; + <literal>hw.ata.wc=0</literal> in <filename>/boot/loader.conf</filename>; SCSI drives can be queried using <command>camcontrol identify</command>, and the write cache both queried and changed using <command>sdparm</command> when available. @@ -95,20 +95,20 @@ <listitem> <para> - On <productname>Solaris</>, the disk write cache is controlled by - <command>format -e</>. - (The Solaris <acronym>ZFS</> file system is safe with disk write-cache + On <productname>Solaris</productname>, the disk write cache is controlled by + <command>format -e</command>. + (The Solaris <acronym>ZFS</acronym> file system is safe with disk write-cache enabled because it issues its own disk cache flush commands.) </para> </listitem> <listitem> <para> - On <productname>Windows</>, if <varname>wal_sync_method</> is - <literal>open_datasync</> (the default), write caching can be disabled - by unchecking <literal>My Computer\Open\<replaceable>disk drive</>\Properties\Hardware\Properties\Policies\Enable write caching on the disk</>. + On <productname>Windows</productname>, if <varname>wal_sync_method</varname> is + <literal>open_datasync</literal> (the default), write caching can be disabled + by unchecking <literal>My Computer\Open\<replaceable>disk drive</replaceable>\Properties\Hardware\Properties\Policies\Enable write caching on the disk</literal>. Alternatively, set <varname>wal_sync_method</varname> to - <literal>fsync</> or <literal>fsync_writethrough</>, which prevent + <literal>fsync</literal> or <literal>fsync_writethrough</literal>, which prevent write caching. </para> </listitem> @@ -116,21 +116,21 @@ <listitem> <para> On <productname>macOS</productname>, write caching can be prevented by - setting <varname>wal_sync_method</> to <literal>fsync_writethrough</>. + setting <varname>wal_sync_method</varname> to <literal>fsync_writethrough</literal>. </para> </listitem> </itemizedlist> <para> - Recent SATA drives (those following <acronym>ATAPI-6</> or later) - offer a drive cache flush command (<command>FLUSH CACHE EXT</>), + Recent SATA drives (those following <acronym>ATAPI-6</acronym> or later) + offer a drive cache flush command (<command>FLUSH CACHE EXT</command>), while SCSI drives have long supported a similar command - <command>SYNCHRONIZE CACHE</>. These commands are not directly - accessible to <productname>PostgreSQL</>, but some file systems - (e.g., <acronym>ZFS</>, <acronym>ext4</>) can use them to flush + <command>SYNCHRONIZE CACHE</command>. These commands are not directly + accessible to <productname>PostgreSQL</productname>, but some file systems + (e.g., <acronym>ZFS</acronym>, <acronym>ext4</acronym>) can use them to flush data to the platters on write-back-enabled drives. Unfortunately, such file systems behave suboptimally when combined with battery-backup unit - (<acronym>BBU</>) disk controllers. In such setups, the synchronize + (<acronym>BBU</acronym>) disk controllers. In such setups, the synchronize command forces all data from the controller cache to the disks, eliminating much of the benefit of the BBU. You can run the <xref linkend="pgtestfsync"> program to see @@ -164,13 +164,13 @@ commonly 512 bytes each. Every physical read or write operation processes a whole sector. When a write request arrives at the drive, it might be for some multiple - of 512 bytes (<productname>PostgreSQL</> typically writes 8192 bytes, or + of 512 bytes (<productname>PostgreSQL</productname> typically writes 8192 bytes, or 16 sectors, at a time), and the process of writing could fail due to power loss at any time, meaning some of the 512-byte sectors were written while others were not. To guard against such failures, - <productname>PostgreSQL</> periodically writes full page images to - permanent WAL storage <emphasis>before</> modifying the actual page on - disk. By doing this, during crash recovery <productname>PostgreSQL</> can + <productname>PostgreSQL</productname> periodically writes full page images to + permanent WAL storage <emphasis>before</emphasis> modifying the actual page on + disk. By doing this, during crash recovery <productname>PostgreSQL</productname> can restore partially-written pages from WAL. If you have file-system software that prevents partial page writes (e.g., ZFS), you can turn off this page imaging by turning off the <xref @@ -179,7 +179,7 @@ they guarantee that data is written to the BBU as full (8kB) pages. </para> <para> - <productname>PostgreSQL</> also protects against some kinds of data corruption + <productname>PostgreSQL</productname> also protects against some kinds of data corruption on storage devices that may occur because of hardware errors or media failure over time, such as reading/writing garbage data. <itemizedlist> @@ -195,7 +195,7 @@ <para> Data pages are not currently checksummed by default, though full page images recorded in WAL records will be protected; see <link - linkend="app-initdb-data-checksums"><application>initdb</></link> + linkend="app-initdb-data-checksums"><application>initdb</application></link> for details about enabling data page checksums. </para> </listitem> @@ -224,7 +224,7 @@ </itemizedlist> </para> <para> - <productname>PostgreSQL</> does not protect against correctable memory errors + <productname>PostgreSQL</productname> does not protect against correctable memory errors and it is assumed you will operate using RAM that uses industry standard Error Correcting Codes (ECC) or better protection. </para> @@ -267,7 +267,7 @@ causes file system <emphasis>data</emphasis> to be flushed to disk. Fortunately, data flushing during journaling can often be disabled with a file system mount option, e.g. - <literal>data=writeback</> on a Linux ext3 file system. + <literal>data=writeback</literal> on a Linux ext3 file system. Journaled file systems do improve boot speed after a crash. </para> </tip> @@ -313,7 +313,7 @@ </indexterm> <para> - <firstterm>Asynchronous commit</> is an option that allows transactions + <firstterm>Asynchronous commit</firstterm> is an option that allows transactions to complete more quickly, at the cost that the most recent transactions may be lost if the database should crash. In many applications this is an acceptable trade-off. @@ -321,7 +321,7 @@ <para> As described in the previous section, transaction commit is normally - <firstterm>synchronous</>: the server waits for the transaction's + <firstterm>synchronous</firstterm>: the server waits for the transaction's <acronym>WAL</acronym> records to be flushed to permanent storage before returning a success indication to the client. The client is therefore guaranteed that a transaction reported to be committed will @@ -374,22 +374,22 @@ </para> <para> - Certain utility commands, for instance <command>DROP TABLE</>, are + Certain utility commands, for instance <command>DROP TABLE</command>, are forced to commit synchronously regardless of the setting of <varname>synchronous_commit</varname>. This is to ensure consistency between the server's file system and the logical state of the database. The commands supporting two-phase commit, such as <command>PREPARE - TRANSACTION</>, are also always synchronous. + TRANSACTION</command>, are also always synchronous. </para> <para> If the database crashes during the risk window between an asynchronous commit and the writing of the transaction's <acronym>WAL</acronym> records, - then changes made during that transaction <emphasis>will</> be lost. + then changes made during that transaction <emphasis>will</emphasis> be lost. The duration of the risk window is limited because a background process (the <quote>WAL - writer</>) flushes unwritten <acronym>WAL</acronym> records to disk + writer</quote>) flushes unwritten <acronym>WAL</acronym> records to disk every <xref linkend="guc-wal-writer-delay"> milliseconds. The actual maximum duration of the risk window is three times <varname>wal_writer_delay</varname> because the WAL writer is @@ -408,10 +408,10 @@ <xref linkend="guc-fsync"> = off. <varname>fsync</varname> is a server-wide setting that will alter the behavior of all transactions. It disables - all logic within <productname>PostgreSQL</> that attempts to synchronize + all logic within <productname>PostgreSQL</productname> that attempts to synchronize writes to different portions of the database, and therefore a system crash (that is, a hardware or operating system crash, not a failure of - <productname>PostgreSQL</> itself) could result in arbitrarily bad + <productname>PostgreSQL</productname> itself) could result in arbitrarily bad corruption of the database state. In many scenarios, asynchronous commit provides most of the performance improvement that could be obtained by turning off <varname>fsync</varname>, but without the risk @@ -437,14 +437,14 @@ <title><acronym>WAL</acronym> Configuration</title> <para> - There are several <acronym>WAL</>-related configuration parameters that + There are several <acronym>WAL</acronym>-related configuration parameters that affect database performance. This section explains their use. Consult <xref linkend="runtime-config"> for general information about setting server configuration parameters. </para> <para> - <firstterm>Checkpoints</firstterm><indexterm><primary>checkpoint</></> + <firstterm>Checkpoints</firstterm><indexterm><primary>checkpoint</primary></indexterm> are points in the sequence of transactions at which it is guaranteed that the heap and index data files have been updated with all information written before that checkpoint. At checkpoint time, all @@ -477,7 +477,7 @@ whichever comes first. The default settings are 5 minutes and 1 GB, respectively. If no WAL has been written since the previous checkpoint, new checkpoints - will be skipped even if <varname>checkpoint_timeout</> has passed. + will be skipped even if <varname>checkpoint_timeout</varname> has passed. (If WAL archiving is being used and you want to put a lower limit on how often files are archived in order to bound potential data loss, you should adjust the <xref linkend="guc-archive-timeout"> parameter rather than the @@ -509,13 +509,13 @@ don't happen too often. As a simple sanity check on your checkpointing parameters, you can set the <xref linkend="guc-checkpoint-warning"> parameter. If checkpoints happen closer together than - <varname>checkpoint_warning</> seconds, + <varname>checkpoint_warning</varname> seconds, a message will be output to the server log recommending increasing <varname>max_wal_size</varname>. Occasional appearance of such a message is not cause for alarm, but if it appears often then the checkpoint control parameters should be increased. Bulk operations such - as large <command>COPY</> transfers might cause a number of such warnings - to appear if you have not set <varname>max_wal_size</> high + as large <command>COPY</command> transfers might cause a number of such warnings + to appear if you have not set <varname>max_wal_size</varname> high enough. </para> @@ -530,7 +530,7 @@ <varname>checkpoint_timeout</varname> seconds have elapsed, or before <varname>max_wal_size</varname> is exceeded, whichever is sooner. With the default value of 0.5, - <productname>PostgreSQL</> can be expected to complete each checkpoint + <productname>PostgreSQL</productname> can be expected to complete each checkpoint in about half the time before the next checkpoint starts. On a system that's very close to maximum I/O throughput during normal operation, you might want to increase <varname>checkpoint_completion_target</varname> @@ -550,19 +550,19 @@ allows to force the OS that pages written by the checkpoint should be flushed to disk after a configurable number of bytes. Otherwise, these pages may be kept in the OS's page cache, inducing a stall when - <literal>fsync</> is issued at the end of a checkpoint. This setting will + <literal>fsync</literal> is issued at the end of a checkpoint. This setting will often help to reduce transaction latency, but it also can an adverse effect on performance; particularly for workloads that are bigger than <xref linkend="guc-shared-buffers">, but smaller than the OS's page cache. </para> <para> - The number of WAL segment files in <filename>pg_wal</> directory depends on - <varname>min_wal_size</>, <varname>max_wal_size</> and + The number of WAL segment files in <filename>pg_wal</filename> directory depends on + <varname>min_wal_size</varname>, <varname>max_wal_size</varname> and the amount of WAL generated in previous checkpoint cycles. When old log segment files are no longer needed, they are removed or recycled (that is, renamed to become future segments in the numbered sequence). If, due to a - short-term peak of log output rate, <varname>max_wal_size</> is + short-term peak of log output rate, <varname>max_wal_size</varname> is exceeded, the unneeded segment files will be removed until the system gets back under this limit. Below that limit, the system recycles enough WAL files to cover the estimated need until the next checkpoint, and @@ -570,7 +570,7 @@ of WAL files used in previous checkpoint cycles. The moving average is increased immediately if the actual usage exceeds the estimate, so it accommodates peak usage rather than average usage to some extent. - <varname>min_wal_size</> puts a minimum on the amount of WAL files + <varname>min_wal_size</varname> puts a minimum on the amount of WAL files recycled for future usage; that much WAL is always recycled for future use, even if the system is idle and the WAL usage estimate suggests that little WAL is needed. @@ -582,7 +582,7 @@ kept at all times. Also, if WAL archiving is used, old segments can not be removed or recycled until they are archived. If WAL archiving cannot keep up with the pace that WAL is generated, or if <varname>archive_command</varname> - fails repeatedly, old WAL files will accumulate in <filename>pg_wal</> + fails repeatedly, old WAL files will accumulate in <filename>pg_wal</filename> until the situation is resolved. A slow or failed standby server that uses a replication slot will have the same effect (see <xref linkend="streaming-replication-slots">). @@ -590,21 +590,21 @@ <para> In archive recovery or standby mode, the server periodically performs - <firstterm>restartpoints</>,<indexterm><primary>restartpoint</></> + <firstterm>restartpoints</firstterm>,<indexterm><primary>restartpoint</primary></indexterm> which are similar to checkpoints in normal operation: the server forces - all its state to disk, updates the <filename>pg_control</> file to + all its state to disk, updates the <filename>pg_control</filename> file to indicate that the already-processed WAL data need not be scanned again, - and then recycles any old log segment files in the <filename>pg_wal</> + and then recycles any old log segment files in the <filename>pg_wal</filename> directory. Restartpoints can't be performed more frequently than checkpoints in the master because restartpoints can only be performed at checkpoint records. A restartpoint is triggered when a checkpoint record is reached if at - least <varname>checkpoint_timeout</> seconds have passed since the last + least <varname>checkpoint_timeout</varname> seconds have passed since the last restartpoint, or if WAL size is about to exceed - <varname>max_wal_size</>. However, because of limitations on when a - restartpoint can be performed, <varname>max_wal_size</> is often exceeded + <varname>max_wal_size</varname>. However, because of limitations on when a + restartpoint can be performed, <varname>max_wal_size</varname> is often exceeded during recovery, by up to one checkpoint cycle's worth of WAL. - (<varname>max_wal_size</> is never a hard limit anyway, so you should + (<varname>max_wal_size</varname> is never a hard limit anyway, so you should always leave plenty of headroom to avoid running out of disk space.) </para> @@ -631,7 +631,7 @@ one should increase the number of <acronym>WAL</acronym> buffers by modifying the <xref linkend="guc-wal-buffers"> parameter. When <xref linkend="guc-full-page-writes"> is set and the system is very busy, - setting <varname>wal_buffers</> higher will help smooth response times + setting <varname>wal_buffers</varname> higher will help smooth response times during the period immediately following each checkpoint. </para> @@ -686,7 +686,7 @@ will consist only of sessions that reach the point where they need to flush their commit records during the window in which the previous flush operation (if any) is occurring. At higher client counts a - <quote>gangway effect</> tends to occur, so that the effects of group + <quote>gangway effect</quote> tends to occur, so that the effects of group commit become significant even when <varname>commit_delay</varname> is zero, and thus explicitly setting <varname>commit_delay</varname> tends to help less. Setting <varname>commit_delay</varname> can only help @@ -702,7 +702,7 @@ <productname>PostgreSQL</productname> will ask the kernel to force <acronym>WAL</acronym> updates out to disk. All the options should be the same in terms of reliability, with - the exception of <literal>fsync_writethrough</>, which can sometimes + the exception of <literal>fsync_writethrough</literal>, which can sometimes force a flush of the disk cache even when other options do not do so. However, it's quite platform-specific which one will be the fastest. You can test the speeds of different options using the <xref @@ -742,7 +742,7 @@ a Log Sequence Number (<acronym>LSN</acronym>) that is a byte offset into the logs, increasing monotonically with each new record. <acronym>LSN</acronym> values are returned as the datatype - <link linkend="datatype-pg-lsn"><type>pg_lsn</></link>. Values can be + <link linkend="datatype-pg-lsn"><type>pg_lsn</type></link>. Values can be compared to calculate the volume of <acronym>WAL</acronym> data that separates them, so they are used to measure the progress of replication and recovery. @@ -752,9 +752,9 @@ <acronym>WAL</acronym> logs are stored in the directory <filename>pg_wal</filename> under the data directory, as a set of segment files, normally each 16 MB in size (but the size can be changed - by altering the <option>--wal-segsize</> initdb option). Each segment is + by altering the <option>--wal-segsize</option> initdb option). Each segment is divided into pages, normally 8 kB each (this size can be changed via the - <option>--with-wal-blocksize</> configure option). The log record headers + <option>--with-wal-blocksize</option> configure option). The log record headers are described in <filename>access/xlogrecord.h</filename>; the record content is dependent on the type of event that is being logged. Segment files are given ever-increasing numbers as names, starting at @@ -774,7 +774,7 @@ <para> The aim of <acronym>WAL</acronym> is to ensure that the log is written before database records are altered, but this can be subverted by - disk drives<indexterm><primary>disk drive</></> that falsely report a + disk drives<indexterm><primary>disk drive</primary></indexterm> that falsely report a successful write to the kernel, when in fact they have only cached the data and not yet stored it on the disk. A power failure in such a situation might lead to diff --git a/doc/src/sgml/xaggr.sgml b/doc/src/sgml/xaggr.sgml index 9e6a6648dc3..f99dbb6510e 100644 --- a/doc/src/sgml/xaggr.sgml +++ b/doc/src/sgml/xaggr.sgml @@ -41,10 +41,10 @@ <para> If we define an aggregate that does not use a final function, we have an aggregate that computes a running function of - the column values from each row. <function>sum</> is an - example of this kind of aggregate. <function>sum</> starts at + the column values from each row. <function>sum</function> is an + example of this kind of aggregate. <function>sum</function> starts at zero and always adds the current row's value to - its running total. For example, if we want to make a <function>sum</> + its running total. For example, if we want to make a <function>sum</function> aggregate to work on a data type for complex numbers, we only need the addition function for that data type. The aggregate definition would be: @@ -69,7 +69,7 @@ SELECT sum(a) FROM test_complex; </programlisting> (Notice that we are relying on function overloading: there is more than - one aggregate named <function>sum</>, but + one aggregate named <function>sum</function>, but <productname>PostgreSQL</productname> can figure out which kind of sum applies to a column of type <type>complex</type>.) </para> @@ -83,17 +83,17 @@ SELECT sum(a) FROM test_complex; value is null. Ordinarily this would mean that the <literal>sfunc</literal> would need to check for a null state-value input. But for <function>sum</function> and some other simple aggregates like - <function>max</> and <function>min</>, + <function>max</function> and <function>min</function>, it is sufficient to insert the first nonnull input value into the state variable and then start applying the transition function at the second nonnull input value. <productname>PostgreSQL</productname> will do that automatically if the initial state value is null and - the transition function is marked <quote>strict</> (i.e., not to be called + the transition function is marked <quote>strict</quote> (i.e., not to be called for null inputs). </para> <para> - Another bit of default behavior for a <quote>strict</> transition function + Another bit of default behavior for a <quote>strict</quote> transition function is that the previous state value is retained unchanged whenever a null input value is encountered. Thus, null values are ignored. If you need some other behavior for null inputs, do not declare your @@ -102,7 +102,7 @@ SELECT sum(a) FROM test_complex; </para> <para> - <function>avg</> (average) is a more complex example of an aggregate. + <function>avg</function> (average) is a more complex example of an aggregate. It requires two pieces of running state: the sum of the inputs and the count of the number of inputs. The final result is obtained by dividing @@ -124,16 +124,16 @@ CREATE AGGREGATE avg (float8) <note> <para> - <function>float8_accum</> requires a three-element array, not just + <function>float8_accum</function> requires a three-element array, not just two elements, because it accumulates the sum of squares as well as the sum and count of the inputs. This is so that it can be used for - some other aggregates as well as <function>avg</>. + some other aggregates as well as <function>avg</function>. </para> </note> <para> - Aggregate function calls in SQL allow <literal>DISTINCT</> - and <literal>ORDER BY</> options that control which rows are fed + Aggregate function calls in SQL allow <literal>DISTINCT</literal> + and <literal>ORDER BY</literal> options that control which rows are fed to the aggregate's transition function and in what order. These options are implemented behind the scenes and are not the concern of the aggregate's support functions. @@ -159,16 +159,16 @@ CREATE AGGREGATE avg (float8) <para> Aggregate functions can optionally support <firstterm>moving-aggregate - mode</>, which allows substantially faster execution of aggregate + mode</firstterm>, which allows substantially faster execution of aggregate functions within windows with moving frame starting points. (See <xref linkend="tutorial-window"> and <xref linkend="syntax-window-functions"> for information about use of aggregate functions as window functions.) - The basic idea is that in addition to a normal <quote>forward</> + The basic idea is that in addition to a normal <quote>forward</quote> transition function, the aggregate provides an <firstterm>inverse - transition function</>, which allows rows to be removed from the + transition function</firstterm>, which allows rows to be removed from the aggregate's running state value when they exit the window frame. - For example a <function>sum</> aggregate, which uses addition as the + For example a <function>sum</function> aggregate, which uses addition as the forward transition function, would use subtraction as the inverse transition function. Without an inverse transition function, the window function mechanism must recalculate the aggregate from scratch each time @@ -193,7 +193,7 @@ CREATE AGGREGATE avg (float8) </para> <para> - As an example, we could extend the <function>sum</> aggregate given above + As an example, we could extend the <function>sum</function> aggregate given above to support moving-aggregate mode like this: <programlisting> @@ -209,10 +209,10 @@ CREATE AGGREGATE sum (complex) ); </programlisting> - The parameters whose names begin with <literal>m</> define the + The parameters whose names begin with <literal>m</literal> define the moving-aggregate implementation. Except for the inverse transition - function <literal>minvfunc</>, they correspond to the plain-aggregate - parameters without <literal>m</>. + function <literal>minvfunc</literal>, they correspond to the plain-aggregate + parameters without <literal>m</literal>. </para> <para> @@ -224,10 +224,10 @@ CREATE AGGREGATE sum (complex) current frame starting position. This convention allows moving-aggregate mode to be used in situations where there are some infrequent cases that are impractical to reverse out of the running state value. The inverse - transition function can <quote>punt</> on these cases, and yet still come + transition function can <quote>punt</quote> on these cases, and yet still come out ahead so long as it can work for most cases. As an example, an aggregate working with floating-point numbers might choose to punt when - a <literal>NaN</> (not a number) input has to be removed from the running + a <literal>NaN</literal> (not a number) input has to be removed from the running state value. </para> @@ -238,8 +238,8 @@ CREATE AGGREGATE sum (complex) in results depending on whether the moving-aggregate mode is used. An example of an aggregate for which adding an inverse transition function seems easy at first, yet where this requirement cannot be met - is <function>sum</> over <type>float4</> or <type>float8</> inputs. A - naive declaration of <function>sum(<type>float8</>)</function> could be + is <function>sum</function> over <type>float4</type> or <type>float8</type> inputs. A + naive declaration of <function>sum(<type>float8</type>)</function> could be <programlisting> CREATE AGGREGATE unsafe_sum (float8) @@ -262,13 +262,13 @@ FROM (VALUES (1, 1.0e20::float8), (2, 1.0::float8)) AS v (n,x); </programlisting> - This query returns <literal>0</> as its second result, rather than the - expected answer of <literal>1</>. The cause is the limited precision of - floating-point values: adding <literal>1</> to <literal>1e20</> results - in <literal>1e20</> again, and so subtracting <literal>1e20</> from that - yields <literal>0</>, not <literal>1</>. Note that this is a limitation + This query returns <literal>0</literal> as its second result, rather than the + expected answer of <literal>1</literal>. The cause is the limited precision of + floating-point values: adding <literal>1</literal> to <literal>1e20</literal> results + in <literal>1e20</literal> again, and so subtracting <literal>1e20</literal> from that + yields <literal>0</literal>, not <literal>1</literal>. Note that this is a limitation of floating-point arithmetic in general, not a limitation - of <productname>PostgreSQL</>. + of <productname>PostgreSQL</productname>. </para> </sect2> @@ -309,7 +309,7 @@ CREATE AGGREGATE array_accum (anyelement) Here, the actual state type for any given aggregate call is the array type having the actual input type as elements. The behavior of the aggregate is to concatenate all the inputs into an array of that type. - (Note: the built-in aggregate <function>array_agg</> provides similar + (Note: the built-in aggregate <function>array_agg</function> provides similar functionality, with better performance than this definition would have.) </para> @@ -344,19 +344,19 @@ SELECT attrelid::regclass, array_accum(atttypid::regtype) polymorphic state type, as in the above example. This is necessary because otherwise the final function cannot be declared sensibly: it would need to have a polymorphic result type but no polymorphic argument - type, which <command>CREATE FUNCTION</> will reject on the grounds that + type, which <command>CREATE FUNCTION</command> will reject on the grounds that the result type cannot be deduced from a call. But sometimes it is inconvenient to use a polymorphic state type. The most common case is where the aggregate support functions are to be written in C and the - state type should be declared as <type>internal</> because there is + state type should be declared as <type>internal</type> because there is no SQL-level equivalent for it. To address this case, it is possible to - declare the final function as taking extra <quote>dummy</> arguments + declare the final function as taking extra <quote>dummy</quote> arguments that match the input arguments of the aggregate. Such dummy arguments are always passed as null values since no specific value is available when the final function is called. Their only use is to allow a polymorphic final function's result type to be connected to the aggregate's input type(s). For example, the definition of the built-in - aggregate <function>array_agg</> is equivalent to + aggregate <function>array_agg</function> is equivalent to <programlisting> CREATE FUNCTION array_agg_transfn(internal, anynonarray) @@ -373,30 +373,30 @@ CREATE AGGREGATE array_agg (anynonarray) ); </programlisting> - Here, the <literal>finalfunc_extra</> option specifies that the final + Here, the <literal>finalfunc_extra</literal> option specifies that the final function receives, in addition to the state value, extra dummy argument(s) corresponding to the aggregate's input argument(s). - The extra <type>anynonarray</> argument allows the declaration - of <function>array_agg_finalfn</> to be valid. + The extra <type>anynonarray</type> argument allows the declaration + of <function>array_agg_finalfn</function> to be valid. </para> <para> An aggregate function can be made to accept a varying number of arguments - by declaring its last argument as a <literal>VARIADIC</> array, in much + by declaring its last argument as a <literal>VARIADIC</literal> array, in much the same fashion as for regular functions; see <xref linkend="xfunc-sql-variadic-functions">. The aggregate's transition function(s) must have the same array type as their last argument. The - transition function(s) typically would also be marked <literal>VARIADIC</>, + transition function(s) typically would also be marked <literal>VARIADIC</literal>, but this is not strictly required. </para> <note> <para> Variadic aggregates are easily misused in connection with - the <literal>ORDER BY</> option (see <xref linkend="syntax-aggregates">), + the <literal>ORDER BY</literal> option (see <xref linkend="syntax-aggregates">), since the parser cannot tell whether the wrong number of actual arguments have been given in such a combination. Keep in mind that everything to - the right of <literal>ORDER BY</> is a sort key, not an argument to the + the right of <literal>ORDER BY</literal> is a sort key, not an argument to the aggregate. For example, in <programlisting> SELECT myaggregate(a ORDER BY a, b, c) FROM ... @@ -406,7 +406,7 @@ SELECT myaggregate(a ORDER BY a, b, c) FROM ... <programlisting> SELECT myaggregate(a, b, c ORDER BY a) FROM ... </programlisting> - If <literal>myaggregate</> is variadic, both these calls could be + If <literal>myaggregate</literal> is variadic, both these calls could be perfectly valid. </para> @@ -427,19 +427,19 @@ SELECT myaggregate(a, b, c ORDER BY a) FROM ... </indexterm> <para> - The aggregates we have been describing so far are <quote>normal</> - aggregates. <productname>PostgreSQL</> also - supports <firstterm>ordered-set aggregates</>, which differ from + The aggregates we have been describing so far are <quote>normal</quote> + aggregates. <productname>PostgreSQL</productname> also + supports <firstterm>ordered-set aggregates</firstterm>, which differ from normal aggregates in two key ways. First, in addition to ordinary aggregated arguments that are evaluated once per input row, an - ordered-set aggregate can have <quote>direct</> arguments that are + ordered-set aggregate can have <quote>direct</quote> arguments that are evaluated only once per aggregation operation. Second, the syntax for the ordinary aggregated arguments specifies a sort ordering for them explicitly. An ordered-set aggregate is usually used to implement a computation that depends on a specific row ordering, for instance rank or percentile, so that the sort ordering is a required aspect of any call. For example, the built-in - definition of <function>percentile_disc</> is equivalent to: + definition of <function>percentile_disc</function> is equivalent to: <programlisting> CREATE FUNCTION ordered_set_transition(internal, anyelement) @@ -456,7 +456,7 @@ CREATE AGGREGATE percentile_disc (float8 ORDER BY anyelement) ); </programlisting> - This aggregate takes a <type>float8</> direct argument (the percentile + This aggregate takes a <type>float8</type> direct argument (the percentile fraction) and an aggregated input that can be of any sortable data type. It could be used to obtain a median household income like this: @@ -467,31 +467,31 @@ SELECT percentile_disc(0.5) WITHIN GROUP (ORDER BY income) FROM households; 50489 </programlisting> - Here, <literal>0.5</> is a direct argument; it would make no sense + Here, <literal>0.5</literal> is a direct argument; it would make no sense for the percentile fraction to be a value varying across rows. </para> <para> Unlike the case for normal aggregates, the sorting of input rows for - an ordered-set aggregate is <emphasis>not</> done behind the scenes, + an ordered-set aggregate is <emphasis>not</emphasis> done behind the scenes, but is the responsibility of the aggregate's support functions. The typical implementation approach is to keep a reference to - a <quote>tuplesort</> object in the aggregate's state value, feed the + a <quote>tuplesort</quote> object in the aggregate's state value, feed the incoming rows into that object, and then complete the sorting and read out the data in the final function. This design allows the final function to perform special operations such as injecting - additional <quote>hypothetical</> rows into the data to be sorted. + additional <quote>hypothetical</quote> rows into the data to be sorted. While normal aggregates can often be implemented with support functions written in <application>PL/pgSQL</application> or another PL language, ordered-set aggregates generally have to be written in C, since their state values aren't definable as any SQL data type. (In the above example, notice that the state value is declared as - type <type>internal</> — this is typical.) + type <type>internal</type> — this is typical.) Also, because the final function performs the sort, it is not possible to continue adding input rows by executing the transition function again - later. This means the final function is not <literal>READ_ONLY</>; + later. This means the final function is not <literal>READ_ONLY</literal>; it must be declared in <xref linkend="sql-createaggregate"> - as <literal>READ_WRITE</>, or as <literal>SHARABLE</> if it's + as <literal>READ_WRITE</literal>, or as <literal>SHARABLE</literal> if it's possible for additional final-function calls to make use of the already-sorted state. </para> @@ -503,9 +503,9 @@ SELECT percentile_disc(0.5) WITHIN GROUP (ORDER BY income) FROM households; same definition as for normal aggregates, but note that the direct arguments (if any) are not provided. The final function receives the last state value, the values of the direct arguments if any, - and (if <literal>finalfunc_extra</> is specified) null values + and (if <literal>finalfunc_extra</literal> is specified) null values corresponding to the aggregated input(s). As with normal - aggregates, <literal>finalfunc_extra</> is only really useful if the + aggregates, <literal>finalfunc_extra</literal> is only really useful if the aggregate is polymorphic; then the extra dummy argument(s) are needed to connect the final function's result type to the aggregate's input type(s). @@ -528,7 +528,7 @@ SELECT percentile_disc(0.5) WITHIN GROUP (ORDER BY income) FROM households; <para> Optionally, an aggregate function can support <firstterm>partial - aggregation</>. The idea of partial aggregation is to run the aggregate's + aggregation</firstterm>. The idea of partial aggregation is to run the aggregate's state transition function over different subsets of the input data independently, and then to combine the state values resulting from those subsets to produce the same state value that would have resulted from @@ -543,7 +543,7 @@ SELECT percentile_disc(0.5) WITHIN GROUP (ORDER BY income) FROM households; <para> To support partial aggregation, the aggregate definition must provide - a <firstterm>combine function</>, which takes two values of the + a <firstterm>combine function</firstterm>, which takes two values of the aggregate's state type (representing the results of aggregating over two subsets of the input rows) and produces a new value of the state type, representing what the state would have been after aggregating over the @@ -554,10 +554,10 @@ SELECT percentile_disc(0.5) WITHIN GROUP (ORDER BY income) FROM households; </para> <para> - As simple examples, <literal>MAX</> and <literal>MIN</> aggregates can be + As simple examples, <literal>MAX</literal> and <literal>MIN</literal> aggregates can be made to support partial aggregation by specifying the combine function as the same greater-of-two or lesser-of-two comparison function that is used - as their transition function. <literal>SUM</> aggregates just need an + as their transition function. <literal>SUM</literal> aggregates just need an addition function as combine function. (Again, this is the same as their transition function, unless the state value is wider than the input data type.) @@ -568,26 +568,26 @@ SELECT percentile_disc(0.5) WITHIN GROUP (ORDER BY income) FROM households; happens to take a value of the state type, not of the underlying input type, as its second argument. In particular, the rules for dealing with null values and strict functions are similar. Also, if the aggregate - definition specifies a non-null <literal>initcond</>, keep in mind that + definition specifies a non-null <literal>initcond</literal>, keep in mind that that will be used not only as the initial state for each partial aggregation run, but also as the initial state for the combine function, which will be called to combine each partial result into that state. </para> <para> - If the aggregate's state type is declared as <type>internal</>, it is + If the aggregate's state type is declared as <type>internal</type>, it is the combine function's responsibility that its result is allocated in the correct memory context for aggregate state values. This means in - particular that when the first input is <literal>NULL</> it's invalid + particular that when the first input is <literal>NULL</literal> it's invalid to simply return the second input, as that value will be in the wrong context and will not have sufficient lifespan. </para> <para> - When the aggregate's state type is declared as <type>internal</>, it is + When the aggregate's state type is declared as <type>internal</type>, it is usually also appropriate for the aggregate definition to provide a - <firstterm>serialization function</> and a <firstterm>deserialization - function</>, which allow such a state value to be copied from one process + <firstterm>serialization function</firstterm> and a <firstterm>deserialization + function</firstterm>, which allow such a state value to be copied from one process to another. Without these functions, parallel aggregation cannot be performed, and future applications such as local/remote aggregation will probably not work either. @@ -595,11 +595,11 @@ SELECT percentile_disc(0.5) WITHIN GROUP (ORDER BY income) FROM households; <para> A serialization function must take a single argument of - type <type>internal</> and return a result of type <type>bytea</>, which + type <type>internal</type> and return a result of type <type>bytea</type>, which represents the state value packaged up into a flat blob of bytes. Conversely, a deserialization function reverses that conversion. It must - take two arguments of types <type>bytea</> and <type>internal</>, and - return a result of type <type>internal</>. (The second argument is unused + take two arguments of types <type>bytea</type> and <type>internal</type>, and + return a result of type <type>internal</type>. (The second argument is unused and is always zero, but it is required for type-safety reasons.) The result of the deserialization function should simply be allocated in the current memory context, as unlike the combine function's result, it is not @@ -608,7 +608,7 @@ SELECT percentile_disc(0.5) WITHIN GROUP (ORDER BY income) FROM households; <para> Worth noting also is that for an aggregate to be executed in parallel, - the aggregate itself must be marked <literal>PARALLEL SAFE</>. The + the aggregate itself must be marked <literal>PARALLEL SAFE</literal>. The parallel-safety markings on its support functions are not consulted. </para> @@ -625,14 +625,14 @@ SELECT percentile_disc(0.5) WITHIN GROUP (ORDER BY income) FROM households; <para> A function written in C can detect that it is being called as an aggregate support function by calling - <function>AggCheckCallContext</>, for example: + <function>AggCheckCallContext</function>, for example: <programlisting> if (AggCheckCallContext(fcinfo, NULL)) </programlisting> One reason for checking this is that when it is true, the first input must be a temporary state value and can therefore safely be modified in-place rather than allocating a new copy. - See <function>int8inc()</> for an example. + See <function>int8inc()</function> for an example. (While aggregate transition functions are always allowed to modify the transition value in-place, aggregate final functions are generally discouraged from doing so; if they do so, the behavior must be declared @@ -641,14 +641,14 @@ if (AggCheckCallContext(fcinfo, NULL)) </para> <para> - The second argument of <function>AggCheckCallContext</> can be used to + The second argument of <function>AggCheckCallContext</function> can be used to retrieve the memory context in which aggregate state values are being kept. - This is useful for transition functions that wish to use <quote>expanded</> + This is useful for transition functions that wish to use <quote>expanded</quote> objects (see <xref linkend="xtypes-toast">) as their state values. On first call, the transition function should return an expanded object whose memory context is a child of the aggregate state context, and then keep returning the same expanded object on subsequent calls. See - <function>array_append()</> for an example. (<function>array_append()</> + <function>array_append()</function> for an example. (<function>array_append()</function> is not the transition function of any built-in aggregate, but it is written to behave efficiently when used as transition function of a custom aggregate.) @@ -656,12 +656,12 @@ if (AggCheckCallContext(fcinfo, NULL)) <para> Another support routine available to aggregate functions written in C - is <function>AggGetAggref</>, which returns the <literal>Aggref</> + is <function>AggGetAggref</function>, which returns the <literal>Aggref</literal> parse node that defines the aggregate call. This is mainly useful for ordered-set aggregates, which can inspect the substructure of - the <literal>Aggref</> node to find out what sort ordering they are + the <literal>Aggref</literal> node to find out what sort ordering they are supposed to implement. Examples can be found - in <filename>orderedsetaggs.c</> in the <productname>PostgreSQL</> + in <filename>orderedsetaggs.c</filename> in the <productname>PostgreSQL</productname> source code. </para> diff --git a/doc/src/sgml/xfunc.sgml b/doc/src/sgml/xfunc.sgml index 74752883540..b6f33037ff5 100644 --- a/doc/src/sgml/xfunc.sgml +++ b/doc/src/sgml/xfunc.sgml @@ -22,7 +22,7 @@ <listitem> <para> procedural language functions (functions written in, for - example, <application>PL/pgSQL</> or <application>PL/Tcl</>) + example, <application>PL/pgSQL</application> or <application>PL/Tcl</application>) (<xref linkend="xfunc-pl">) </para> </listitem> @@ -66,7 +66,7 @@ page of the <xref linkend="sql-createfunction"> command to understand the examples better. Some examples from this chapter can be found in <filename>funcs.sql</filename> and - <filename>funcs.c</filename> in the <filename>src/tutorial</> + <filename>funcs.c</filename> in the <filename>src/tutorial</filename> directory in the <productname>PostgreSQL</productname> source distribution. </para> @@ -87,7 +87,7 @@ In the simple (non-set) case, the first row of the last query's result will be returned. (Bear in mind that <quote>the first row</quote> of a multirow - result is not well-defined unless you use <literal>ORDER BY</>.) + result is not well-defined unless you use <literal>ORDER BY</literal>.) If the last query happens to return no rows at all, the null value will be returned. </para> @@ -95,8 +95,8 @@ <para> Alternatively, an SQL function can be declared to return a set (that is, multiple rows) by specifying the function's return type as <literal>SETOF - <replaceable>sometype</></literal>, or equivalently by declaring it as - <literal>RETURNS TABLE(<replaceable>columns</>)</literal>. In this case + <replaceable>sometype</replaceable></literal>, or equivalently by declaring it as + <literal>RETURNS TABLE(<replaceable>columns</replaceable>)</literal>. In this case all rows of the last query's result are returned. Further details appear below. </para> @@ -105,9 +105,9 @@ The body of an SQL function must be a list of SQL statements separated by semicolons. A semicolon after the last statement is optional. Unless the function is declared to return - <type>void</>, the last statement must be a <command>SELECT</>, - or an <command>INSERT</>, <command>UPDATE</>, or <command>DELETE</> - that has a <literal>RETURNING</> clause. + <type>void</type>, the last statement must be a <command>SELECT</command>, + or an <command>INSERT</command>, <command>UPDATE</command>, or <command>DELETE</command> + that has a <literal>RETURNING</literal> clause. </para> <para> @@ -117,16 +117,16 @@ modification queries (<command>INSERT</command>, <command>UPDATE</command>, and <command>DELETE</command>), as well as other SQL commands. (You cannot use transaction control commands, e.g. - <command>COMMIT</>, <command>SAVEPOINT</>, and some utility - commands, e.g. <literal>VACUUM</>, in <acronym>SQL</acronym> functions.) + <command>COMMIT</command>, <command>SAVEPOINT</command>, and some utility + commands, e.g. <literal>VACUUM</literal>, in <acronym>SQL</acronym> functions.) However, the final command - must be a <command>SELECT</command> or have a <literal>RETURNING</> + must be a <command>SELECT</command> or have a <literal>RETURNING</literal> clause that returns whatever is specified as the function's return type. Alternatively, if you want to define a SQL function that performs actions but has no - useful value to return, you can define it as returning <type>void</>. + useful value to return, you can define it as returning <type>void</type>. For example, this function removes rows with negative salaries from - the <literal>emp</> table: + the <literal>emp</literal> table: <screen> CREATE FUNCTION clean_emp() RETURNS void AS ' @@ -147,13 +147,13 @@ SELECT clean_emp(); <para> The entire body of a SQL function is parsed before any of it is executed. While a SQL function can contain commands that alter - the system catalogs (e.g., <command>CREATE TABLE</>), the effects + the system catalogs (e.g., <command>CREATE TABLE</command>), the effects of such commands will not be visible during parse analysis of later commands in the function. Thus, for example, <literal>CREATE TABLE foo (...); INSERT INTO foo VALUES(...);</literal> will not work as desired if packaged up into a single SQL function, - since <structname>foo</> won't exist yet when the <command>INSERT</> - command is parsed. It's recommended to use <application>PL/pgSQL</> + since <structname>foo</structname> won't exist yet when the <command>INSERT</command> + command is parsed. It's recommended to use <application>PL/pgSQL</application> instead of a SQL function in this type of situation. </para> </note> @@ -164,8 +164,8 @@ SELECT clean_emp(); most convenient to use dollar quoting (see <xref linkend="sql-syntax-dollar-quoting">) for the string constant. If you choose to use regular single-quoted string constant syntax, - you must double single quote marks (<literal>'</>) and backslashes - (<literal>\</>) (assuming escape string syntax) in the body of + you must double single quote marks (<literal>'</literal>) and backslashes + (<literal>\</literal>) (assuming escape string syntax) in the body of the function (see <xref linkend="sql-syntax-strings">). </para> @@ -189,7 +189,7 @@ SELECT clean_emp(); is the same as any column name in the current SQL command within the function, the column name will take precedence. To override this, qualify the argument name with the name of the function itself, that is - <literal><replaceable>function_name</>.<replaceable>argument_name</></literal>. + <literal><replaceable>function_name</replaceable>.<replaceable>argument_name</replaceable></literal>. (If this would conflict with a qualified column name, again the column name wins. You can avoid the ambiguity by choosing a different alias for the table within the SQL command.) @@ -197,15 +197,15 @@ SELECT clean_emp(); <para> In the older numeric approach, arguments are referenced using the syntax - <literal>$<replaceable>n</></>: <literal>$1</> refers to the first input - argument, <literal>$2</> to the second, and so on. This will work + <literal>$<replaceable>n</replaceable></literal>: <literal>$1</literal> refers to the first input + argument, <literal>$2</literal> to the second, and so on. This will work whether or not the particular argument was declared with a name. </para> <para> If an argument is of a composite type, then the dot notation, - e.g., <literal><replaceable>argname</>.<replaceable>fieldname</></literal> or - <literal>$1.<replaceable>fieldname</></literal>, can be used to access attributes of the + e.g., <literal><replaceable>argname</replaceable>.<replaceable>fieldname</replaceable></literal> or + <literal>$1.<replaceable>fieldname</replaceable></literal>, can be used to access attributes of the argument. Again, you might need to qualify the argument's name with the function name to make the form with an argument name unambiguous. </para> @@ -226,7 +226,7 @@ INSERT INTO $1 VALUES (42); <para> The ability to use names to reference SQL function arguments was added in <productname>PostgreSQL</productname> 9.2. Functions to be used in - older servers must use the <literal>$<replaceable>n</></> notation. + older servers must use the <literal>$<replaceable>n</replaceable></literal> notation. </para> </note> </sect2> @@ -258,9 +258,9 @@ SELECT one(); <para> Notice that we defined a column alias within the function body for the result of the function - (with the name <literal>result</>), but this column alias is not visible - outside the function. Hence, the result is labeled <literal>one</> - instead of <literal>result</>. + (with the name <literal>result</literal>), but this column alias is not visible + outside the function. Hence, the result is labeled <literal>one</literal> + instead of <literal>result</literal>. </para> <para> @@ -319,11 +319,11 @@ SELECT tf1(17, 100.0); </para> <para> - In this example, we chose the name <literal>accountno</> for the first + In this example, we chose the name <literal>accountno</literal> for the first argument, but this is the same as the name of a column in the - <literal>bank</> table. Within the <command>UPDATE</> command, - <literal>accountno</> refers to the column <literal>bank.accountno</>, - so <literal>tf1.accountno</> must be used to refer to the argument. + <literal>bank</literal> table. Within the <command>UPDATE</command> command, + <literal>accountno</literal> refers to the column <literal>bank.accountno</literal>, + so <literal>tf1.accountno</literal> must be used to refer to the argument. We could of course avoid this by using a different name for the argument. </para> @@ -342,7 +342,7 @@ $$ LANGUAGE SQL; </programlisting> which adjusts the balance and returns the new balance. - The same thing could be done in one command using <literal>RETURNING</>: + The same thing could be done in one command using <literal>RETURNING</literal>: <programlisting> CREATE FUNCTION tf1 (accountno integer, debit numeric) RETURNS numeric AS $$ @@ -394,8 +394,8 @@ SELECT name, double_salary(emp.*) AS dream <para> Notice the use of the syntax <literal>$1.salary</literal> to select one field of the argument row value. Also notice - how the calling <command>SELECT</> command - uses <replaceable>table_name</><literal>.*</> to select + how the calling <command>SELECT</command> command + uses <replaceable>table_name</replaceable><literal>.*</literal> to select the entire current row of a table as a composite value. The table row can alternatively be referenced using just the table name, like this: @@ -411,7 +411,7 @@ SELECT name, double_salary(emp) AS dream <para> Sometimes it is handy to construct a composite argument value - on-the-fly. This can be done with the <literal>ROW</> construct. + on-the-fly. This can be done with the <literal>ROW</literal> construct. For example, we could adjust the data being passed to the function: <screen> SELECT name, double_salary(ROW(name, salary*1.1, age, cubicle)) AS dream @@ -473,7 +473,7 @@ CREATE FUNCTION new_emp() RETURNS emp AS $$ $$ LANGUAGE SQL; </programlisting> - Here we wrote a <command>SELECT</> that returns just a single + Here we wrote a <command>SELECT</command> that returns just a single column of the correct composite type. This isn't really better in this situation, but it is a handy alternative in some cases — for example, if we need to compute the result by calling @@ -564,7 +564,7 @@ SELECT getname(new_emp()); </sect2> <sect2 id="xfunc-output-parameters"> - <title><acronym>SQL</> Functions with Output Parameters</title> + <title><acronym>SQL</acronym> Functions with Output Parameters</title> <indexterm> <primary>function</primary> @@ -573,7 +573,7 @@ SELECT getname(new_emp()); <para> An alternative way of describing a function's results is to define it - with <firstterm>output parameters</>, as in this example: + with <firstterm>output parameters</firstterm>, as in this example: <screen> CREATE FUNCTION add_em (IN x int, IN y int, OUT sum int) @@ -587,7 +587,7 @@ SELECT add_em(3,7); (1 row) </screen> - This is not essentially different from the version of <literal>add_em</> + This is not essentially different from the version of <literal>add_em</literal> shown in <xref linkend="xfunc-sql-base-functions">. The real value of output parameters is that they provide a convenient way of defining functions that return several columns. For example, @@ -639,18 +639,18 @@ DROP FUNCTION sum_n_product (int, int); </para> <para> - Parameters can be marked as <literal>IN</> (the default), - <literal>OUT</>, <literal>INOUT</>, or <literal>VARIADIC</>. - An <literal>INOUT</> + Parameters can be marked as <literal>IN</literal> (the default), + <literal>OUT</literal>, <literal>INOUT</literal>, or <literal>VARIADIC</literal>. + An <literal>INOUT</literal> parameter serves as both an input parameter (part of the calling argument list) and an output parameter (part of the result record type). - <literal>VARIADIC</> parameters are input parameters, but are treated + <literal>VARIADIC</literal> parameters are input parameters, but are treated specially as described next. </para> </sect2> <sect2 id="xfunc-sql-variadic-functions"> - <title><acronym>SQL</> Functions with Variable Numbers of Arguments</title> + <title><acronym>SQL</acronym> Functions with Variable Numbers of Arguments</title> <indexterm> <primary>function</primary> @@ -663,10 +663,10 @@ DROP FUNCTION sum_n_product (int, int); <para> <acronym>SQL</acronym> functions can be declared to accept - variable numbers of arguments, so long as all the <quote>optional</> + variable numbers of arguments, so long as all the <quote>optional</quote> arguments are of the same data type. The optional arguments will be passed to the function as an array. The function is declared by - marking the last parameter as <literal>VARIADIC</>; this parameter + marking the last parameter as <literal>VARIADIC</literal>; this parameter must be declared as being of an array type. For example: <screen> @@ -682,7 +682,7 @@ SELECT mleast(10, -1, 5, 4.4); </screen> Effectively, all the actual arguments at or beyond the - <literal>VARIADIC</> position are gathered up into a one-dimensional + <literal>VARIADIC</literal> position are gathered up into a one-dimensional array, as if you had written <screen> @@ -691,7 +691,7 @@ SELECT mleast(ARRAY[10, -1, 5, 4.4]); -- doesn't work You can't actually write that, though — or at least, it will not match this function definition. A parameter marked - <literal>VARIADIC</> matches one or more occurrences of its element + <literal>VARIADIC</literal> matches one or more occurrences of its element type, not of its own type. </para> @@ -699,7 +699,7 @@ SELECT mleast(ARRAY[10, -1, 5, 4.4]); -- doesn't work Sometimes it is useful to be able to pass an already-constructed array to a variadic function; this is particularly handy when one variadic function wants to pass on its array parameter to another one. You can - do that by specifying <literal>VARIADIC</> in the call: + do that by specifying <literal>VARIADIC</literal> in the call: <screen> SELECT mleast(VARIADIC ARRAY[10, -1, 5, 4.4]); @@ -707,21 +707,21 @@ SELECT mleast(VARIADIC ARRAY[10, -1, 5, 4.4]); This prevents expansion of the function's variadic parameter into its element type, thereby allowing the array argument value to match - normally. <literal>VARIADIC</> can only be attached to the last + normally. <literal>VARIADIC</literal> can only be attached to the last actual argument of a function call. </para> <para> - Specifying <literal>VARIADIC</> in the call is also the only way to + Specifying <literal>VARIADIC</literal> in the call is also the only way to pass an empty array to a variadic function, for example: <screen> SELECT mleast(VARIADIC ARRAY[]::numeric[]); </screen> - Simply writing <literal>SELECT mleast()</> does not work because a + Simply writing <literal>SELECT mleast()</literal> does not work because a variadic parameter must match at least one actual argument. - (You could define a second function also named <literal>mleast</>, + (You could define a second function also named <literal>mleast</literal>, with no parameters, if you wanted to allow such calls.) </para> @@ -730,7 +730,7 @@ SELECT mleast(VARIADIC ARRAY[]::numeric[]); treated as not having any names of their own. This means it is not possible to call a variadic function using named arguments (<xref linkend="sql-syntax-calling-funcs">), except when you specify - <literal>VARIADIC</>. For example, this will work: + <literal>VARIADIC</literal>. For example, this will work: <screen> SELECT mleast(VARIADIC arr => ARRAY[10, -1, 5, 4.4]); @@ -746,7 +746,7 @@ SELECT mleast(arr => ARRAY[10, -1, 5, 4.4]); </sect2> <sect2 id="xfunc-sql-parameter-defaults"> - <title><acronym>SQL</> Functions with Default Values for Arguments</title> + <title><acronym>SQL</acronym> Functions with Default Values for Arguments</title> <indexterm> <primary>function</primary> @@ -804,7 +804,7 @@ ERROR: function foo() does not exist <title><acronym>SQL</acronym> Functions as Table Sources</title> <para> - All SQL functions can be used in the <literal>FROM</> clause of a query, + All SQL functions can be used in the <literal>FROM</literal> clause of a query, but it is particularly useful for functions returning composite types. If the function is defined to return a base type, the table function produces a one-column table. If the function is defined to return @@ -839,7 +839,7 @@ SELECT *, upper(fooname) FROM getfoo(1) AS t1; <para> Note that we only got one row out of the function. This is because - we did not use <literal>SETOF</>. That is described in the next section. + we did not use <literal>SETOF</literal>. That is described in the next section. </para> </sect2> @@ -853,16 +853,16 @@ SELECT *, upper(fooname) FROM getfoo(1) AS t1; <para> When an SQL function is declared as returning <literal>SETOF - <replaceable>sometype</></literal>, the function's final + <replaceable>sometype</replaceable></literal>, the function's final query is executed to completion, and each row it outputs is returned as an element of the result set. </para> <para> - This feature is normally used when calling the function in the <literal>FROM</> + This feature is normally used when calling the function in the <literal>FROM</literal> clause. In this case each row returned by the function becomes a row of the table seen by the query. For example, assume that - table <literal>foo</> has the same contents as above, and we say: + table <literal>foo</literal> has the same contents as above, and we say: <programlisting> CREATE FUNCTION getfoo(int) RETURNS SETOF foo AS $$ @@ -906,17 +906,17 @@ SELECT * FROM sum_n_product_with_tab(10); (4 rows) </programlisting> - The key point here is that you must write <literal>RETURNS SETOF record</> + The key point here is that you must write <literal>RETURNS SETOF record</literal> to indicate that the function returns multiple rows instead of just one. If there is only one output parameter, write that parameter's type - instead of <type>record</>. + instead of <type>record</type>. </para> <para> It is frequently useful to construct a query's result by invoking a set-returning function multiple times, with the parameters for each invocation coming from successive rows of a table or subquery. The - preferred way to do this is to use the <literal>LATERAL</> key word, + preferred way to do this is to use the <literal>LATERAL</literal> key word, which is described in <xref linkend="queries-lateral">. Here is an example using a set-returning function to enumerate elements of a tree structure: @@ -990,17 +990,17 @@ SELECT name, listchildren(name) FROM nodes; </screen> In the last <command>SELECT</command>, - notice that no output row appears for <literal>Child2</>, <literal>Child3</>, etc. + notice that no output row appears for <literal>Child2</literal>, <literal>Child3</literal>, etc. This happens because <function>listchildren</function> returns an empty set for those arguments, so no result rows are generated. This is the same behavior as we got from an inner join to the function result when using - the <literal>LATERAL</> syntax. + the <literal>LATERAL</literal> syntax. </para> <para> - <productname>PostgreSQL</>'s behavior for a set-returning function in a + <productname>PostgreSQL</productname>'s behavior for a set-returning function in a query's select list is almost exactly the same as if the set-returning - function had been written in a <literal>LATERAL FROM</>-clause item + function had been written in a <literal>LATERAL FROM</literal>-clause item instead. For example, <programlisting> SELECT x, generate_series(1,5) AS g FROM tab; @@ -1010,20 +1010,20 @@ SELECT x, generate_series(1,5) AS g FROM tab; SELECT x, g FROM tab, LATERAL generate_series(1,5) AS g; </programlisting> It would be exactly the same, except that in this specific example, - the planner could choose to put <structname>g</> on the outside of the - nestloop join, since <structname>g</> has no actual lateral dependency - on <structname>tab</>. That would result in a different output row + the planner could choose to put <structname>g</structname> on the outside of the + nestloop join, since <structname>g</structname> has no actual lateral dependency + on <structname>tab</structname>. That would result in a different output row order. Set-returning functions in the select list are always evaluated as though they are on the inside of a nestloop join with the rest of - the <literal>FROM</> clause, so that the function(s) are run to - completion before the next row from the <literal>FROM</> clause is + the <literal>FROM</literal> clause, so that the function(s) are run to + completion before the next row from the <literal>FROM</literal> clause is considered. </para> <para> If there is more than one set-returning function in the query's select list, the behavior is similar to what you get from putting the functions - into a single <literal>LATERAL ROWS FROM( ... )</> <literal>FROM</>-clause + into a single <literal>LATERAL ROWS FROM( ... )</literal> <literal>FROM</literal>-clause item. For each row from the underlying query, there is an output row using the first result from each function, then an output row using the second result, and so on. If some of the set-returning functions @@ -1031,48 +1031,48 @@ SELECT x, g FROM tab, LATERAL generate_series(1,5) AS g; missing data, so that the total number of rows emitted for one underlying row is the same as for the set-returning function that produced the most outputs. Thus the set-returning functions - run <quote>in lockstep</> until they are all exhausted, and then + run <quote>in lockstep</quote> until they are all exhausted, and then execution continues with the next underlying row. </para> <para> Set-returning functions can be nested in a select list, although that is - not allowed in <literal>FROM</>-clause items. In such cases, each level + not allowed in <literal>FROM</literal>-clause items. In such cases, each level of nesting is treated separately, as though it were - a separate <literal>LATERAL ROWS FROM( ... )</> item. For example, in + a separate <literal>LATERAL ROWS FROM( ... )</literal> item. For example, in <programlisting> SELECT srf1(srf2(x), srf3(y)), srf4(srf5(z)) FROM tab; </programlisting> - the set-returning functions <function>srf2</>, <function>srf3</>, - and <function>srf5</> would be run in lockstep for each row - of <structname>tab</>, and then <function>srf1</> and <function>srf4</> + the set-returning functions <function>srf2</function>, <function>srf3</function>, + and <function>srf5</function> would be run in lockstep for each row + of <structname>tab</structname>, and then <function>srf1</function> and <function>srf4</function> would be applied in lockstep to each row produced by the lower functions. </para> <para> Set-returning functions cannot be used within conditional-evaluation - constructs, such as <literal>CASE</> or <literal>COALESCE</>. For + constructs, such as <literal>CASE</literal> or <literal>COALESCE</literal>. For example, consider <programlisting> SELECT x, CASE WHEN x > 0 THEN generate_series(1, 5) ELSE 0 END FROM tab; </programlisting> It might seem that this should produce five repetitions of input rows - that have <literal>x > 0</>, and a single repetition of those that do - not; but actually, because <function>generate_series(1, 5)</> would be - run in an implicit <literal>LATERAL FROM</> item before - the <literal>CASE</> expression is ever evaluated, it would produce five + that have <literal>x > 0</literal>, and a single repetition of those that do + not; but actually, because <function>generate_series(1, 5)</function> would be + run in an implicit <literal>LATERAL FROM</literal> item before + the <literal>CASE</literal> expression is ever evaluated, it would produce five repetitions of every input row. To reduce confusion, such cases produce a parse-time error instead. </para> <note> <para> - If a function's last command is <command>INSERT</>, <command>UPDATE</>, - or <command>DELETE</> with <literal>RETURNING</>, that command will + If a function's last command is <command>INSERT</command>, <command>UPDATE</command>, + or <command>DELETE</command> with <literal>RETURNING</literal>, that command will always be executed to completion, even if the function is not declared - with <literal>SETOF</> or the calling query does not fetch all the - result rows. Any extra rows produced by the <literal>RETURNING</> + with <literal>SETOF</literal> or the calling query does not fetch all the + result rows. Any extra rows produced by the <literal>RETURNING</literal> clause are silently dropped, but the commanded table modifications still happen (and are all completed before returning from the function). </para> @@ -1080,7 +1080,7 @@ SELECT x, CASE WHEN x > 0 THEN generate_series(1, 5) ELSE 0 END FROM tab; <note> <para> - Before <productname>PostgreSQL</> 10, putting more than one + Before <productname>PostgreSQL</productname> 10, putting more than one set-returning function in the same select list did not behave very sensibly unless they always produced equal numbers of rows. Otherwise, what you got was a number of output rows equal to the least common @@ -1089,10 +1089,10 @@ SELECT x, CASE WHEN x > 0 THEN generate_series(1, 5) ELSE 0 END FROM tab; described above; instead, a set-returning function could have at most one set-returning argument, and each nest of set-returning functions was run independently. Also, conditional execution (set-returning - functions inside <literal>CASE</> etc) was previously allowed, + functions inside <literal>CASE</literal> etc) was previously allowed, complicating things even more. - Use of the <literal>LATERAL</> syntax is recommended when writing - queries that need to work in older <productname>PostgreSQL</> versions, + Use of the <literal>LATERAL</literal> syntax is recommended when writing + queries that need to work in older <productname>PostgreSQL</productname> versions, because that will give consistent results across different versions. If you have a query that is relying on conditional execution of a set-returning function, you may be able to fix it by moving the @@ -1115,13 +1115,13 @@ END$$ LANGUAGE plpgsql; SELECT x, case_generate_series(y > 0, 1, z, 5) FROM tab; </programlisting> This formulation will work the same in all versions - of <productname>PostgreSQL</>. + of <productname>PostgreSQL</productname>. </para> </note> </sect2> <sect2 id="xfunc-sql-functions-returning-table"> - <title><acronym>SQL</acronym> Functions Returning <literal>TABLE</></title> + <title><acronym>SQL</acronym> Functions Returning <literal>TABLE</literal></title> <indexterm> <primary>function</primary> @@ -1131,12 +1131,12 @@ SELECT x, case_generate_series(y > 0, 1, z, 5) FROM tab; <para> There is another way to declare a function as returning a set, which is to use the syntax - <literal>RETURNS TABLE(<replaceable>columns</>)</literal>. - This is equivalent to using one or more <literal>OUT</> parameters plus - marking the function as returning <literal>SETOF record</> (or - <literal>SETOF</> a single output parameter's type, as appropriate). + <literal>RETURNS TABLE(<replaceable>columns</replaceable>)</literal>. + This is equivalent to using one or more <literal>OUT</literal> parameters plus + marking the function as returning <literal>SETOF record</literal> (or + <literal>SETOF</literal> a single output parameter's type, as appropriate). This notation is specified in recent versions of the SQL standard, and - thus may be more portable than using <literal>SETOF</>. + thus may be more portable than using <literal>SETOF</literal>. </para> <para> @@ -1150,9 +1150,9 @@ RETURNS TABLE(sum int, product int) AS $$ $$ LANGUAGE SQL; </programlisting> - It is not allowed to use explicit <literal>OUT</> or <literal>INOUT</> - parameters with the <literal>RETURNS TABLE</> notation — you must - put all the output columns in the <literal>TABLE</> list. + It is not allowed to use explicit <literal>OUT</literal> or <literal>INOUT</literal> + parameters with the <literal>RETURNS TABLE</literal> notation — you must + put all the output columns in the <literal>TABLE</literal> list. </para> </sect2> @@ -1270,8 +1270,8 @@ SELECT concat_values('|', 1, 4, 2); <title><acronym>SQL</acronym> Functions with Collations</title> <indexterm> - <primary>collation</> - <secondary>in SQL functions</> + <primary>collation</primary> + <secondary>in SQL functions</secondary> </indexterm> <para> @@ -1283,21 +1283,21 @@ SELECT concat_values('|', 1, 4, 2); then all the collatable parameters are treated as having that collation implicitly. This will affect the behavior of collation-sensitive operations within the function. For example, using the - <function>anyleast</> function described above, the result of + <function>anyleast</function> function described above, the result of <programlisting> SELECT anyleast('abc'::text, 'ABC'); </programlisting> - will depend on the database's default collation. In <literal>C</> locale - the result will be <literal>ABC</>, but in many other locales it will - be <literal>abc</>. The collation to use can be forced by adding - a <literal>COLLATE</> clause to any of the arguments, for example + will depend on the database's default collation. In <literal>C</literal> locale + the result will be <literal>ABC</literal>, but in many other locales it will + be <literal>abc</literal>. The collation to use can be forced by adding + a <literal>COLLATE</literal> clause to any of the arguments, for example <programlisting> SELECT anyleast('abc'::text, 'ABC' COLLATE "C"); </programlisting> Alternatively, if you wish a function to operate with a particular collation regardless of what it is called with, insert - <literal>COLLATE</> clauses as needed in the function definition. - This version of <function>anyleast</> would always use <literal>en_US</> + <literal>COLLATE</literal> clauses as needed in the function definition. + This version of <function>anyleast</function> would always use <literal>en_US</literal> locale to compare strings: <programlisting> CREATE FUNCTION anyleast (VARIADIC anyarray) RETURNS anyelement AS $$ @@ -1358,24 +1358,24 @@ CREATE FUNCTION test(smallint, double precision) RETURNS ... <para> A function that takes a single argument of a composite type should generally not have the same name as any attribute (field) of that type. - Recall that <literal><replaceable>attribute</>(<replaceable>table</>)</literal> + Recall that <literal><replaceable>attribute</replaceable>(<replaceable>table</replaceable>)</literal> is considered equivalent - to <literal><replaceable>table</>.<replaceable>attribute</></literal>. + to <literal><replaceable>table</replaceable>.<replaceable>attribute</replaceable></literal>. In the case that there is an ambiguity between a function on a composite type and an attribute of the composite type, the attribute will always be used. It is possible to override that choice by schema-qualifying the function name - (that is, <literal><replaceable>schema</>.<replaceable>func</>(<replaceable>table</>) + (that is, <literal><replaceable>schema</replaceable>.<replaceable>func</replaceable>(<replaceable>table</replaceable>) </literal>) but it's better to avoid the problem by not choosing conflicting names. </para> <para> Another possible conflict is between variadic and non-variadic functions. - For instance, it is possible to create both <literal>foo(numeric)</> and - <literal>foo(VARIADIC numeric[])</>. In this case it is unclear which one + For instance, it is possible to create both <literal>foo(numeric)</literal> and + <literal>foo(VARIADIC numeric[])</literal>. In this case it is unclear which one should be matched to a call providing a single numeric argument, such as - <literal>foo(10.1)</>. The rule is that the function appearing + <literal>foo(10.1)</literal>. The rule is that the function appearing earlier in the search path is used, or if the two functions are in the same schema, the non-variadic one is preferred. </para> @@ -1388,15 +1388,15 @@ CREATE FUNCTION test(smallint, double precision) RETURNS ... rule is violated, the behavior is not portable. You might get a run-time linker error, or one of the functions will get called (usually the internal one). The alternative form of the - <literal>AS</> clause for the SQL <command>CREATE + <literal>AS</literal> clause for the SQL <command>CREATE FUNCTION</command> command decouples the SQL function name from the function name in the C source code. For instance: <programlisting> CREATE FUNCTION test(int) RETURNS int - AS '<replaceable>filename</>', 'test_1arg' + AS '<replaceable>filename</replaceable>', 'test_1arg' LANGUAGE C; CREATE FUNCTION test(int, int) RETURNS int - AS '<replaceable>filename</>', 'test_2arg' + AS '<replaceable>filename</replaceable>', 'test_2arg' LANGUAGE C; </programlisting> The names of the C functions here reflect one of many possible conventions. @@ -1421,9 +1421,9 @@ CREATE FUNCTION test(int, int) RETURNS int </indexterm> <para> - Every function has a <firstterm>volatility</> classification, with - the possibilities being <literal>VOLATILE</>, <literal>STABLE</>, or - <literal>IMMUTABLE</>. <literal>VOLATILE</> is the default if the + Every function has a <firstterm>volatility</firstterm> classification, with + the possibilities being <literal>VOLATILE</literal>, <literal>STABLE</literal>, or + <literal>IMMUTABLE</literal>. <literal>VOLATILE</literal> is the default if the <xref linkend="sql-createfunction"> command does not specify a category. The volatility category is a promise to the optimizer about the behavior of the function: @@ -1431,7 +1431,7 @@ CREATE FUNCTION test(int, int) RETURNS int <itemizedlist> <listitem> <para> - A <literal>VOLATILE</> function can do anything, including modifying + A <literal>VOLATILE</literal> function can do anything, including modifying the database. It can return different results on successive calls with the same arguments. The optimizer makes no assumptions about the behavior of such functions. A query using a volatile function will @@ -1440,26 +1440,26 @@ CREATE FUNCTION test(int, int) RETURNS int </listitem> <listitem> <para> - A <literal>STABLE</> function cannot modify the database and is + A <literal>STABLE</literal> function cannot modify the database and is guaranteed to return the same results given the same arguments for all rows within a single statement. This category allows the optimizer to optimize multiple calls of the function to a single call. In particular, it is safe to use an expression containing such a function in an index scan condition. (Since an index scan will evaluate the comparison value only once, not once at each - row, it is not valid to use a <literal>VOLATILE</> function in an + row, it is not valid to use a <literal>VOLATILE</literal> function in an index scan condition.) </para> </listitem> <listitem> <para> - An <literal>IMMUTABLE</> function cannot modify the database and is + An <literal>IMMUTABLE</literal> function cannot modify the database and is guaranteed to return the same results given the same arguments forever. This category allows the optimizer to pre-evaluate the function when a query calls it with constant arguments. For example, a query like - <literal>SELECT ... WHERE x = 2 + 2</> can be simplified on sight to - <literal>SELECT ... WHERE x = 4</>, because the function underlying - the integer addition operator is marked <literal>IMMUTABLE</>. + <literal>SELECT ... WHERE x = 2 + 2</literal> can be simplified on sight to + <literal>SELECT ... WHERE x = 4</literal>, because the function underlying + the integer addition operator is marked <literal>IMMUTABLE</literal>. </para> </listitem> </itemizedlist> @@ -1471,32 +1471,32 @@ CREATE FUNCTION test(int, int) RETURNS int </para> <para> - Any function with side-effects <emphasis>must</> be labeled - <literal>VOLATILE</>, so that calls to it cannot be optimized away. + Any function with side-effects <emphasis>must</emphasis> be labeled + <literal>VOLATILE</literal>, so that calls to it cannot be optimized away. Even a function with no side-effects needs to be labeled - <literal>VOLATILE</> if its value can change within a single query; - some examples are <literal>random()</>, <literal>currval()</>, - <literal>timeofday()</>. + <literal>VOLATILE</literal> if its value can change within a single query; + some examples are <literal>random()</literal>, <literal>currval()</literal>, + <literal>timeofday()</literal>. </para> <para> - Another important example is that the <function>current_timestamp</> - family of functions qualify as <literal>STABLE</>, since their values do + Another important example is that the <function>current_timestamp</function> + family of functions qualify as <literal>STABLE</literal>, since their values do not change within a transaction. </para> <para> - There is relatively little difference between <literal>STABLE</> and - <literal>IMMUTABLE</> categories when considering simple interactive + There is relatively little difference between <literal>STABLE</literal> and + <literal>IMMUTABLE</literal> categories when considering simple interactive queries that are planned and immediately executed: it doesn't matter a lot whether a function is executed once during planning or once during query execution startup. But there is a big difference if the plan is - saved and reused later. Labeling a function <literal>IMMUTABLE</> when + saved and reused later. Labeling a function <literal>IMMUTABLE</literal> when it really isn't might allow it to be prematurely folded to a constant during planning, resulting in a stale value being re-used during subsequent uses of the plan. This is a hazard when using prepared statements or when using function languages that cache plans (such as - <application>PL/pgSQL</>). + <application>PL/pgSQL</application>). </para> <para> @@ -1504,12 +1504,12 @@ CREATE FUNCTION test(int, int) RETURNS int languages, there is a second important property determined by the volatility category, namely the visibility of any data changes that have been made by the SQL command that is calling the function. A - <literal>VOLATILE</> function will see such changes, a <literal>STABLE</> - or <literal>IMMUTABLE</> function will not. This behavior is implemented + <literal>VOLATILE</literal> function will see such changes, a <literal>STABLE</literal> + or <literal>IMMUTABLE</literal> function will not. This behavior is implemented using the snapshotting behavior of MVCC (see <xref linkend="mvcc">): - <literal>STABLE</> and <literal>IMMUTABLE</> functions use a snapshot + <literal>STABLE</literal> and <literal>IMMUTABLE</literal> functions use a snapshot established as of the start of the calling query, whereas - <literal>VOLATILE</> functions obtain a fresh snapshot at the start of + <literal>VOLATILE</literal> functions obtain a fresh snapshot at the start of each query they execute. </para> @@ -1522,41 +1522,41 @@ CREATE FUNCTION test(int, int) RETURNS int <para> Because of this snapshotting behavior, - a function containing only <command>SELECT</> commands can safely be - marked <literal>STABLE</>, even if it selects from tables that might be + a function containing only <command>SELECT</command> commands can safely be + marked <literal>STABLE</literal>, even if it selects from tables that might be undergoing modifications by concurrent queries. <productname>PostgreSQL</productname> will execute all commands of a - <literal>STABLE</> function using the snapshot established for the + <literal>STABLE</literal> function using the snapshot established for the calling query, and so it will see a fixed view of the database throughout that query. </para> <para> - The same snapshotting behavior is used for <command>SELECT</> commands - within <literal>IMMUTABLE</> functions. It is generally unwise to select - from database tables within an <literal>IMMUTABLE</> function at all, + The same snapshotting behavior is used for <command>SELECT</command> commands + within <literal>IMMUTABLE</literal> functions. It is generally unwise to select + from database tables within an <literal>IMMUTABLE</literal> function at all, since the immutability will be broken if the table contents ever change. However, <productname>PostgreSQL</productname> does not enforce that you do not do that. </para> <para> - A common error is to label a function <literal>IMMUTABLE</> when its + A common error is to label a function <literal>IMMUTABLE</literal> when its results depend on a configuration parameter. For example, a function that manipulates timestamps might well have results that depend on the <xref linkend="guc-timezone"> setting. For safety, such functions should - be labeled <literal>STABLE</> instead. + be labeled <literal>STABLE</literal> instead. </para> <note> <para> - <productname>PostgreSQL</productname> requires that <literal>STABLE</> - and <literal>IMMUTABLE</> functions contain no SQL commands other - than <command>SELECT</> to prevent data modification. + <productname>PostgreSQL</productname> requires that <literal>STABLE</literal> + and <literal>IMMUTABLE</literal> functions contain no SQL commands other + than <command>SELECT</command> to prevent data modification. (This is not a completely bulletproof test, since such functions could - still call <literal>VOLATILE</> functions that modify the database. - If you do that, you will find that the <literal>STABLE</> or - <literal>IMMUTABLE</> function does not notice the database changes + still call <literal>VOLATILE</literal> functions that modify the database. + If you do that, you will find that the <literal>STABLE</literal> or + <literal>IMMUTABLE</literal> function does not notice the database changes applied by the called function, since they are hidden from its snapshot.) </para> </note> @@ -1569,7 +1569,7 @@ CREATE FUNCTION test(int, int) RETURNS int <productname>PostgreSQL</productname> allows user-defined functions to be written in other languages besides SQL and C. These other languages are generically called <firstterm>procedural - languages</firstterm> (<acronym>PL</>s). + languages</firstterm> (<acronym>PL</acronym>s). Procedural languages aren't built into the <productname>PostgreSQL</productname> server; they are offered by loadable modules. @@ -1581,7 +1581,7 @@ CREATE FUNCTION test(int, int) RETURNS int <sect1 id="xfunc-internal"> <title>Internal Functions</title> - <indexterm zone="xfunc-internal"><primary>function</><secondary>internal</></> + <indexterm zone="xfunc-internal"><primary>function</primary><secondary>internal</secondary></indexterm> <para> Internal functions are functions written in C that have been statically @@ -1635,8 +1635,8 @@ CREATE FUNCTION square_root(double precision) RETURNS double precision be made compatible with C, such as C++). Such functions are compiled into dynamically loadable objects (also called shared libraries) and are loaded by the server on demand. The dynamic - loading feature is what distinguishes <quote>C language</> functions - from <quote>internal</> functions — the actual coding conventions + loading feature is what distinguishes <quote>C language</quote> functions + from <quote>internal</quote> functions — the actual coding conventions are essentially the same for both. (Hence, the standard internal function library is a rich source of coding examples for user-defined C functions.) @@ -1683,9 +1683,9 @@ CREATE FUNCTION square_root(double precision) RETURNS double precision <listitem> <para> If the name starts with the string <literal>$libdir</literal>, - that part is replaced by the <productname>PostgreSQL</> package + that part is replaced by the <productname>PostgreSQL</productname> package library directory - name, which is determined at build time.<indexterm><primary>$libdir</></> + name, which is determined at build time.<indexterm><primary>$libdir</primary></indexterm> </para> </listitem> @@ -1693,7 +1693,7 @@ CREATE FUNCTION square_root(double precision) RETURNS double precision <para> If the name does not contain a directory part, the file is searched for in the path specified by the configuration variable - <xref linkend="guc-dynamic-library-path">.<indexterm><primary>dynamic_library_path</></> + <xref linkend="guc-dynamic-library-path">.<indexterm><primary>dynamic_library_path</primary></indexterm> </para> </listitem> @@ -1742,7 +1742,7 @@ CREATE FUNCTION square_root(double precision) RETURNS double precision <productname>PostgreSQL</productname> will not compile a C function automatically. The object file must be compiled before it is referenced in a <command>CREATE - FUNCTION</> command. See <xref linkend="dfunc"> for additional + FUNCTION</command> command. See <xref linkend="dfunc"> for additional information. </para> </note> @@ -1754,12 +1754,12 @@ CREATE FUNCTION square_root(double precision) RETURNS double precision <para> To ensure that a dynamically loaded object file is not loaded into an incompatible server, <productname>PostgreSQL</productname> checks that the - file contains a <quote>magic block</> with the appropriate contents. + file contains a <quote>magic block</quote> with the appropriate contents. This allows the server to detect obvious incompatibilities, such as code compiled for a different major version of <productname>PostgreSQL</productname>. To include a magic block, write this in one (and only one) of the module source files, after having - included the header <filename>fmgr.h</>: + included the header <filename>fmgr.h</filename>: <programlisting> PG_MODULE_MAGIC; @@ -1790,12 +1790,12 @@ PG_MODULE_MAGIC; <para> Optionally, a dynamically loaded file can contain initialization and finalization functions. If the file includes a function named - <function>_PG_init</>, that function will be called immediately after + <function>_PG_init</function>, that function will be called immediately after loading the file. The function receives no parameters and should return void. If the file includes a function named - <function>_PG_fini</>, that function will be called immediately before + <function>_PG_fini</function>, that function will be called immediately before unloading the file. Likewise, the function receives no parameters and - should return void. Note that <function>_PG_fini</> will only be called + should return void. Note that <function>_PG_fini</function> will only be called during an unload of the file, not during process termination. (Presently, unloads are disabled and will never occur, but this may change in the future.) @@ -1915,7 +1915,7 @@ typedef struct <warning> <para> - <emphasis>Never</> modify the contents of a pass-by-reference input + <emphasis>Never</emphasis> modify the contents of a pass-by-reference input value. If you do so you are likely to corrupt on-disk data, since the pointer you are given might point directly into a disk buffer. The sole exception to this rule is explained in @@ -1934,7 +1934,7 @@ typedef struct { } text; </programlisting> - The <literal>[FLEXIBLE_ARRAY_MEMBER]</> notation means that the actual + The <literal>[FLEXIBLE_ARRAY_MEMBER]</literal> notation means that the actual length of the data part is not specified by this declaration. </para> @@ -1942,7 +1942,7 @@ typedef struct { When manipulating variable-length types, we must be careful to allocate the correct amount of memory and set the length field correctly. - For example, if we wanted to store 40 bytes in a <structname>text</> + For example, if we wanted to store 40 bytes in a <structname>text</structname> structure, we might use a code fragment like this: <programlisting><![CDATA[ @@ -1957,17 +1957,17 @@ memcpy(destination->data, buffer, 40); ]]> </programlisting> - <literal>VARHDRSZ</> is the same as <literal>sizeof(int32)</>, but - it's considered good style to use the macro <literal>VARHDRSZ</> + <literal>VARHDRSZ</literal> is the same as <literal>sizeof(int32)</literal>, but + it's considered good style to use the macro <literal>VARHDRSZ</literal> to refer to the size of the overhead for a variable-length type. - Also, the length field <emphasis>must</> be set using the - <literal>SET_VARSIZE</> macro, not by simple assignment. + Also, the length field <emphasis>must</emphasis> be set using the + <literal>SET_VARSIZE</literal> macro, not by simple assignment. </para> <para> <xref linkend="xfunc-c-type-table"> specifies which C type corresponds to which SQL type when writing a C-language function - that uses a built-in type of <productname>PostgreSQL</>. + that uses a built-in type of <productname>PostgreSQL</productname>. The <quote>Defined In</quote> column gives the header file that needs to be included to get the type definition. (The actual definition might be in a different file that is included by the @@ -2175,8 +2175,8 @@ PG_FUNCTION_INFO_V1(funcname); </programlisting> must appear in the same source file. (Conventionally, it's written just before the function itself.) This macro call is not - needed for <literal>internal</>-language functions, since - <productname>PostgreSQL</> assumes that all internal functions + needed for <literal>internal</literal>-language functions, since + <productname>PostgreSQL</productname> assumes that all internal functions use the version-1 convention. It is, however, required for dynamically-loaded functions. </para> @@ -2332,8 +2332,8 @@ CREATE FUNCTION concat_text(text, text) RETURNS text directory of the shared library file (for instance the <productname>PostgreSQL</productname> tutorial directory, which contains the code for the examples used in this section). - (Better style would be to use just <literal>'funcs'</> in the - <literal>AS</> clause, after having added + (Better style would be to use just <literal>'funcs'</literal> in the + <literal>AS</literal> clause, after having added <replaceable>DIRECTORY</replaceable> to the search path. In any case, we can omit the system-specific extension for a shared library, commonly <literal>.so</literal>.) @@ -2350,16 +2350,16 @@ CREATE FUNCTION concat_text(text, text) RETURNS text <para> At first glance, the version-1 coding conventions might appear to be just - pointless obscurantism, over using plain <literal>C</> calling - conventions. They do however allow to deal with <literal>NULL</>able + pointless obscurantism, over using plain <literal>C</literal> calling + conventions. They do however allow to deal with <literal>NULL</literal>able arguments/return values, and <quote>toasted</quote> (compressed or out-of-line) values. </para> <para> - The macro <function>PG_ARGISNULL(<replaceable>n</>)</function> + The macro <function>PG_ARGISNULL(<replaceable>n</replaceable>)</function> allows a function to test whether each input is null. (Of course, doing - this is only necessary in functions not declared <quote>strict</>.) + this is only necessary in functions not declared <quote>strict</quote>.) As with the <function>PG_GETARG_<replaceable>xxx</replaceable>()</function> macros, the input arguments are counted beginning at zero. Note that one @@ -2394,8 +2394,8 @@ CREATE FUNCTION concat_text(text, text) RETURNS text <literal>ALTER TABLE <replaceable>tablename</replaceable> ALTER COLUMN <replaceable>colname</replaceable> SET STORAGE <replaceable>storagetype</replaceable></literal>. <replaceable>storagetype</replaceable> is one of - <literal>plain</>, <literal>external</>, <literal>extended</literal>, - or <literal>main</>.) + <literal>plain</literal>, <literal>external</literal>, <literal>extended</literal>, + or <literal>main</literal>.) </para> <para> @@ -2433,8 +2433,8 @@ CREATE FUNCTION concat_text(text, text) RETURNS text <listitem> <para> Use <literal>pg_config - --includedir-server</literal><indexterm><primary>pg_config</><secondary>with user-defined C functions</></> - to find out where the <productname>PostgreSQL</> server header + --includedir-server</literal><indexterm><primary>pg_config</primary><secondary>with user-defined C functions</secondary></indexterm> + to find out where the <productname>PostgreSQL</productname> server header files are installed on your system (or the system that your users will be running on). </para> @@ -2452,7 +2452,7 @@ CREATE FUNCTION concat_text(text, text) RETURNS text <listitem> <para> - Remember to define a <quote>magic block</> for your shared library, + Remember to define a <quote>magic block</quote> for your shared library, as described in <xref linkend="xfunc-c-dynload">. </para> </listitem> @@ -2461,7 +2461,7 @@ CREATE FUNCTION concat_text(text, text) RETURNS text <para> When allocating memory, use the <productname>PostgreSQL</productname> functions - <function>palloc</function><indexterm><primary>palloc</></> and <function>pfree</function><indexterm><primary>pfree</></> + <function>palloc</function><indexterm><primary>palloc</primary></indexterm> and <function>pfree</function><indexterm><primary>pfree</primary></indexterm> instead of the corresponding C library functions <function>malloc</function> and <function>free</function>. The memory allocated by <function>palloc</function> will be @@ -2472,8 +2472,8 @@ CREATE FUNCTION concat_text(text, text) RETURNS text <listitem> <para> - Always zero the bytes of your structures using <function>memset</> - (or allocate them with <function>palloc0</> in the first place). + Always zero the bytes of your structures using <function>memset</function> + (or allocate them with <function>palloc0</function> in the first place). Even if you assign to each field of your structure, there might be alignment padding (holes in the structure) that contain garbage values. Without this, it's difficult to @@ -2493,7 +2493,7 @@ CREATE FUNCTION concat_text(text, text) RETURNS text (<symbol>PG_FUNCTION_ARGS</symbol>, etc.) are in <filename>fmgr.h</filename>, so you will need to include at least these two files. For portability reasons it's best to - include <filename>postgres.h</filename> <emphasis>first</>, + include <filename>postgres.h</filename> <emphasis>first</emphasis>, before any other system or user header files. Including <filename>postgres.h</filename> will also include <filename>elog.h</filename> and <filename>palloc.h</filename> @@ -2539,7 +2539,7 @@ SELECT name, c_overpaid(emp, 1500) AS overpaid </programlisting> Using the version-1 calling conventions, we can define - <function>c_overpaid</> as: + <function>c_overpaid</function> as: <programlisting><![CDATA[ #include "postgres.h" @@ -2599,7 +2599,7 @@ CREATE FUNCTION c_overpaid(emp, integer) RETURNS boolean LANGUAGE C STRICT; </programlisting> - Notice we have used <literal>STRICT</> so that we did not have to + Notice we have used <literal>STRICT</literal> so that we did not have to check whether the input arguments were NULL. </para> </sect2> @@ -2619,87 +2619,87 @@ CREATE FUNCTION c_overpaid(emp, integer) RETURNS boolean <para> There are two ways you can build a composite data value (henceforth - a <quote>tuple</>): you can build it from an array of Datum values, + a <quote>tuple</quote>): you can build it from an array of Datum values, or from an array of C strings that can be passed to the input conversion functions of the tuple's column data types. In either - case, you first need to obtain or construct a <structname>TupleDesc</> + case, you first need to obtain or construct a <structname>TupleDesc</structname> descriptor for the tuple structure. When working with Datums, you - pass the <structname>TupleDesc</> to <function>BlessTupleDesc</>, - and then call <function>heap_form_tuple</> for each row. When working - with C strings, you pass the <structname>TupleDesc</> to - <function>TupleDescGetAttInMetadata</>, and then call - <function>BuildTupleFromCStrings</> for each row. In the case of a + pass the <structname>TupleDesc</structname> to <function>BlessTupleDesc</function>, + and then call <function>heap_form_tuple</function> for each row. When working + with C strings, you pass the <structname>TupleDesc</structname> to + <function>TupleDescGetAttInMetadata</function>, and then call + <function>BuildTupleFromCStrings</function> for each row. In the case of a function returning a set of tuples, the setup steps can all be done once during the first call of the function. </para> <para> Several helper functions are available for setting up the needed - <structname>TupleDesc</>. The recommended way to do this in most + <structname>TupleDesc</structname>. The recommended way to do this in most functions returning composite values is to call: <programlisting> TypeFuncClass get_call_result_type(FunctionCallInfo fcinfo, Oid *resultTypeId, TupleDesc *resultTupleDesc) </programlisting> - passing the same <literal>fcinfo</> struct passed to the calling function + passing the same <literal>fcinfo</literal> struct passed to the calling function itself. (This of course requires that you use the version-1 - calling conventions.) <varname>resultTypeId</> can be specified - as <literal>NULL</> or as the address of a local variable to receive the - function's result type OID. <varname>resultTupleDesc</> should be the - address of a local <structname>TupleDesc</> variable. Check that the - result is <literal>TYPEFUNC_COMPOSITE</>; if so, - <varname>resultTupleDesc</> has been filled with the needed - <structname>TupleDesc</>. (If it is not, you can report an error along + calling conventions.) <varname>resultTypeId</varname> can be specified + as <literal>NULL</literal> or as the address of a local variable to receive the + function's result type OID. <varname>resultTupleDesc</varname> should be the + address of a local <structname>TupleDesc</structname> variable. Check that the + result is <literal>TYPEFUNC_COMPOSITE</literal>; if so, + <varname>resultTupleDesc</varname> has been filled with the needed + <structname>TupleDesc</structname>. (If it is not, you can report an error along the lines of <quote>function returning record called in context that cannot accept type record</quote>.) </para> <tip> <para> - <function>get_call_result_type</> can resolve the actual type of a + <function>get_call_result_type</function> can resolve the actual type of a polymorphic function result; so it is useful in functions that return scalar polymorphic results, not only functions that return composites. - The <varname>resultTypeId</> output is primarily useful for functions + The <varname>resultTypeId</varname> output is primarily useful for functions returning polymorphic scalars. </para> </tip> <note> <para> - <function>get_call_result_type</> has a sibling - <function>get_expr_result_type</>, which can be used to resolve the + <function>get_call_result_type</function> has a sibling + <function>get_expr_result_type</function>, which can be used to resolve the expected output type for a function call represented by an expression tree. This can be used when trying to determine the result type from outside the function itself. There is also - <function>get_func_result_type</>, which can be used when only the + <function>get_func_result_type</function>, which can be used when only the function's OID is available. However these functions are not able - to deal with functions declared to return <structname>record</>, and - <function>get_func_result_type</> cannot resolve polymorphic types, - so you should preferentially use <function>get_call_result_type</>. + to deal with functions declared to return <structname>record</structname>, and + <function>get_func_result_type</function> cannot resolve polymorphic types, + so you should preferentially use <function>get_call_result_type</function>. </para> </note> <para> Older, now-deprecated functions for obtaining - <structname>TupleDesc</>s are: + <structname>TupleDesc</structname>s are: <programlisting> TupleDesc RelationNameGetTupleDesc(const char *relname) </programlisting> - to get a <structname>TupleDesc</> for the row type of a named relation, + to get a <structname>TupleDesc</structname> for the row type of a named relation, and: <programlisting> TupleDesc TypeGetTupleDesc(Oid typeoid, List *colaliases) </programlisting> - to get a <structname>TupleDesc</> based on a type OID. This can - be used to get a <structname>TupleDesc</> for a base or + to get a <structname>TupleDesc</structname> based on a type OID. This can + be used to get a <structname>TupleDesc</structname> for a base or composite type. It will not work for a function that returns - <structname>record</>, however, and it cannot resolve polymorphic + <structname>record</structname>, however, and it cannot resolve polymorphic types. </para> <para> - Once you have a <structname>TupleDesc</>, call: + Once you have a <structname>TupleDesc</structname>, call: <programlisting> TupleDesc BlessTupleDesc(TupleDesc tupdesc) </programlisting> @@ -2709,8 +2709,8 @@ AttInMetadata *TupleDescGetAttInMetadata(TupleDesc tupdesc) </programlisting> if you plan to work with C strings. If you are writing a function returning set, you can save the results of these functions in the - <structname>FuncCallContext</> structure — use the - <structfield>tuple_desc</> or <structfield>attinmeta</> field + <structname>FuncCallContext</structname> structure — use the + <structfield>tuple_desc</structfield> or <structfield>attinmeta</structfield> field respectively. </para> @@ -2719,7 +2719,7 @@ AttInMetadata *TupleDescGetAttInMetadata(TupleDesc tupdesc) <programlisting> HeapTuple heap_form_tuple(TupleDesc tupdesc, Datum *values, bool *isnull) </programlisting> - to build a <structname>HeapTuple</> given user data in Datum form. + to build a <structname>HeapTuple</structname> given user data in Datum form. </para> <para> @@ -2727,24 +2727,24 @@ HeapTuple heap_form_tuple(TupleDesc tupdesc, Datum *values, bool *isnull) <programlisting> HeapTuple BuildTupleFromCStrings(AttInMetadata *attinmeta, char **values) </programlisting> - to build a <structname>HeapTuple</> given user data + to build a <structname>HeapTuple</structname> given user data in C string form. <parameter>values</parameter> is an array of C strings, one for each attribute of the return row. Each C string should be in the form expected by the input function of the attribute data type. In order to return a null value for one of the attributes, - the corresponding pointer in the <parameter>values</> array - should be set to <symbol>NULL</>. This function will need to + the corresponding pointer in the <parameter>values</parameter> array + should be set to <symbol>NULL</symbol>. This function will need to be called again for each row you return. </para> <para> Once you have built a tuple to return from your function, it - must be converted into a <type>Datum</>. Use: + must be converted into a <type>Datum</type>. Use: <programlisting> HeapTupleGetDatum(HeapTuple tuple) </programlisting> - to convert a <structname>HeapTuple</> into a valid Datum. This - <type>Datum</> can be returned directly if you intend to return + to convert a <structname>HeapTuple</structname> into a valid Datum. This + <type>Datum</type> can be returned directly if you intend to return just a single row, or it can be used as the current return value in a set-returning function. </para> @@ -2767,13 +2767,13 @@ HeapTupleGetDatum(HeapTuple tuple) </para> <para> - A set-returning function (<acronym>SRF</>) is called - once for each item it returns. The <acronym>SRF</> must + A set-returning function (<acronym>SRF</acronym>) is called + once for each item it returns. The <acronym>SRF</acronym> must therefore save enough state to remember what it was doing and return the next item on each call. - The structure <structname>FuncCallContext</> is provided to help - control this process. Within a function, <literal>fcinfo->flinfo->fn_extra</> - is used to hold a pointer to <structname>FuncCallContext</> + The structure <structname>FuncCallContext</structname> is provided to help + control this process. Within a function, <literal>fcinfo->flinfo->fn_extra</literal> + is used to hold a pointer to <structname>FuncCallContext</structname> across calls. <programlisting> typedef struct FuncCallContext @@ -2847,9 +2847,9 @@ typedef struct FuncCallContext </para> <para> - An <acronym>SRF</> uses several functions and macros that - automatically manipulate the <structname>FuncCallContext</> - structure (and expect to find it via <literal>fn_extra</>). Use: + An <acronym>SRF</acronym> uses several functions and macros that + automatically manipulate the <structname>FuncCallContext</structname> + structure (and expect to find it via <literal>fn_extra</literal>). Use: <programlisting> SRF_IS_FIRSTCALL() </programlisting> @@ -2858,12 +2858,12 @@ SRF_IS_FIRSTCALL() <programlisting> SRF_FIRSTCALL_INIT() </programlisting> - to initialize the <structname>FuncCallContext</>. On every function call, + to initialize the <structname>FuncCallContext</structname>. On every function call, including the first, use: <programlisting> SRF_PERCALL_SETUP() </programlisting> - to properly set up for using the <structname>FuncCallContext</> + to properly set up for using the <structname>FuncCallContext</structname> and clearing any previously returned data left over from the previous pass. </para> @@ -2873,27 +2873,27 @@ SRF_PERCALL_SETUP() <programlisting> SRF_RETURN_NEXT(funcctx, result) </programlisting> - to return it to the caller. (<literal>result</> must be of type - <type>Datum</>, either a single value or a tuple prepared as + to return it to the caller. (<literal>result</literal> must be of type + <type>Datum</type>, either a single value or a tuple prepared as described above.) Finally, when your function is finished returning data, use: <programlisting> SRF_RETURN_DONE(funcctx) </programlisting> - to clean up and end the <acronym>SRF</>. + to clean up and end the <acronym>SRF</acronym>. </para> <para> - The memory context that is current when the <acronym>SRF</> is called is + The memory context that is current when the <acronym>SRF</acronym> is called is a transient context that will be cleared between calls. This means - that you do not need to call <function>pfree</> on everything - you allocated using <function>palloc</>; it will go away anyway. However, if you want to allocate + that you do not need to call <function>pfree</function> on everything + you allocated using <function>palloc</function>; it will go away anyway. However, if you want to allocate any data structures to live across calls, you need to put them somewhere else. The memory context referenced by - <structfield>multi_call_memory_ctx</> is a suitable location for any - data that needs to survive until the <acronym>SRF</> is finished running. In most + <structfield>multi_call_memory_ctx</structfield> is a suitable location for any + data that needs to survive until the <acronym>SRF</acronym> is finished running. In most cases, this means that you should switch into - <structfield>multi_call_memory_ctx</> while doing the first-call setup. + <structfield>multi_call_memory_ctx</structfield> while doing the first-call setup. </para> <warning> @@ -2904,8 +2904,8 @@ SRF_RETURN_DONE(funcctx) <function>PG_GETARG_<replaceable>xxx</replaceable></function> macro) in the transient context then the detoasted copies will be freed on each cycle. Accordingly, if you keep references to such values in - your <structfield>user_fctx</>, you must either copy them into the - <structfield>multi_call_memory_ctx</> after detoasting, or ensure + your <structfield>user_fctx</structfield>, you must either copy them into the + <structfield>multi_call_memory_ctx</structfield> after detoasting, or ensure that you detoast the values only in that context. </para> </warning> @@ -2959,7 +2959,7 @@ my_set_returning_function(PG_FUNCTION_ARGS) </para> <para> - A complete example of a simple <acronym>SRF</> returning a composite type + A complete example of a simple <acronym>SRF</acronym> returning a composite type looks like: <programlisting><![CDATA[ PG_FUNCTION_INFO_V1(retcomposite); @@ -3059,7 +3059,7 @@ CREATE TYPE __retcomposite AS (f1 integer, f2 integer, f3 integer); CREATE OR REPLACE FUNCTION retcomposite(integer, integer) RETURNS SETOF __retcomposite - AS '<replaceable>filename</>', 'retcomposite' + AS '<replaceable>filename</replaceable>', 'retcomposite' LANGUAGE C IMMUTABLE STRICT; </programlisting> A different way is to use OUT parameters: @@ -3067,15 +3067,15 @@ CREATE OR REPLACE FUNCTION retcomposite(integer, integer) CREATE OR REPLACE FUNCTION retcomposite(IN integer, IN integer, OUT f1 integer, OUT f2 integer, OUT f3 integer) RETURNS SETOF record - AS '<replaceable>filename</>', 'retcomposite' + AS '<replaceable>filename</replaceable>', 'retcomposite' LANGUAGE C IMMUTABLE STRICT; </programlisting> Notice that in this method the output type of the function is formally - an anonymous <structname>record</> type. + an anonymous <structname>record</structname> type. </para> <para> - The directory <link linkend="tablefunc"><filename>contrib/tablefunc</filename></> + The directory <link linkend="tablefunc"><filename>contrib/tablefunc</filename></link> module in the source distribution contains more examples of set-returning functions. </para> @@ -3093,20 +3093,20 @@ CREATE OR REPLACE FUNCTION retcomposite(IN integer, IN integer, of polymorphic functions. When function arguments or return types are defined as polymorphic types, the function author cannot know in advance what data type it will be called with, or - need to return. There are two routines provided in <filename>fmgr.h</> + need to return. There are two routines provided in <filename>fmgr.h</filename> to allow a version-1 C function to discover the actual data types of its arguments and the type it is expected to return. The routines are - called <literal>get_fn_expr_rettype(FmgrInfo *flinfo)</> and - <literal>get_fn_expr_argtype(FmgrInfo *flinfo, int argnum)</>. + called <literal>get_fn_expr_rettype(FmgrInfo *flinfo)</literal> and + <literal>get_fn_expr_argtype(FmgrInfo *flinfo, int argnum)</literal>. They return the result or argument type OID, or <symbol>InvalidOid</symbol> if the information is not available. - The structure <literal>flinfo</> is normally accessed as - <literal>fcinfo->flinfo</>. The parameter <literal>argnum</> - is zero based. <function>get_call_result_type</> can also be used - as an alternative to <function>get_fn_expr_rettype</>. - There is also <function>get_fn_expr_variadic</>, which can be used to + The structure <literal>flinfo</literal> is normally accessed as + <literal>fcinfo->flinfo</literal>. The parameter <literal>argnum</literal> + is zero based. <function>get_call_result_type</function> can also be used + as an alternative to <function>get_fn_expr_rettype</function>. + There is also <function>get_fn_expr_variadic</function>, which can be used to find out whether variadic arguments have been merged into an array. - This is primarily useful for <literal>VARIADIC "any"</> functions, + This is primarily useful for <literal>VARIADIC "any"</literal> functions, since such merging will always have occurred for variadic functions taking ordinary array types. </para> @@ -3174,23 +3174,23 @@ CREATE FUNCTION make_array(anyelement) RETURNS anyarray <para> There is a variant of polymorphism that is only available to C-language functions: they can be declared to take parameters of type - <literal>"any"</>. (Note that this type name must be double-quoted, + <literal>"any"</literal>. (Note that this type name must be double-quoted, since it's also a SQL reserved word.) This works like - <type>anyelement</> except that it does not constrain different - <literal>"any"</> arguments to be the same type, nor do they help + <type>anyelement</type> except that it does not constrain different + <literal>"any"</literal> arguments to be the same type, nor do they help determine the function's result type. A C-language function can also - declare its final parameter to be <literal>VARIADIC "any"</>. This will + declare its final parameter to be <literal>VARIADIC "any"</literal>. This will match one or more actual arguments of any type (not necessarily the same - type). These arguments will <emphasis>not</> be gathered into an array + type). These arguments will <emphasis>not</emphasis> be gathered into an array as happens with normal variadic functions; they will just be passed to - the function separately. The <function>PG_NARGS()</> macro and the + the function separately. The <function>PG_NARGS()</function> macro and the methods described above must be used to determine the number of actual arguments and their types when using this feature. Also, users of such - a function might wish to use the <literal>VARIADIC</> keyword in their + a function might wish to use the <literal>VARIADIC</literal> keyword in their function call, with the expectation that the function would treat the array elements as separate arguments. The function itself must implement - that behavior if wanted, after using <function>get_fn_expr_variadic</> to - detect that the actual argument was marked with <literal>VARIADIC</>. + that behavior if wanted, after using <function>get_fn_expr_variadic</function> to + detect that the actual argument was marked with <literal>VARIADIC</literal>. </para> </sect2> @@ -3200,22 +3200,22 @@ CREATE FUNCTION make_array(anyelement) RETURNS anyarray <para> Some function calls can be simplified during planning based on properties specific to the function. For example, - <literal>int4mul(n, 1)</> could be simplified to just <literal>n</>. + <literal>int4mul(n, 1)</literal> could be simplified to just <literal>n</literal>. To define such function-specific optimizations, write a - <firstterm>transform function</> and place its OID in the - <structfield>protransform</> field of the primary function's - <structname>pg_proc</> entry. The transform function must have the SQL - signature <literal>protransform(internal) RETURNS internal</>. The - argument, actually <type>FuncExpr *</>, is a dummy node representing a + <firstterm>transform function</firstterm> and place its OID in the + <structfield>protransform</structfield> field of the primary function's + <structname>pg_proc</structname> entry. The transform function must have the SQL + signature <literal>protransform(internal) RETURNS internal</literal>. The + argument, actually <type>FuncExpr *</type>, is a dummy node representing a call to the primary function. If the transform function's study of the expression tree proves that a simplified expression tree can substitute for all possible concrete calls represented thereby, build and return - that simplified expression. Otherwise, return a <literal>NULL</> - pointer (<emphasis>not</> a SQL null). + that simplified expression. Otherwise, return a <literal>NULL</literal> + pointer (<emphasis>not</emphasis> a SQL null). </para> <para> - We make no guarantee that <productname>PostgreSQL</> will never call the + We make no guarantee that <productname>PostgreSQL</productname> will never call the primary function in cases that the transform function could simplify. Ensure rigorous equivalence between the simplified expression and an actual call to the primary function. @@ -3235,26 +3235,26 @@ CREATE FUNCTION make_array(anyelement) RETURNS anyarray Add-ins can reserve LWLocks and an allocation of shared memory on server startup. The add-in's shared library must be preloaded by specifying it in - <xref linkend="guc-shared-preload-libraries"><indexterm><primary>shared_preload_libraries</></>. + <xref linkend="guc-shared-preload-libraries"><indexterm><primary>shared_preload_libraries</primary></indexterm>. Shared memory is reserved by calling: <programlisting> void RequestAddinShmemSpace(int size) </programlisting> - from your <function>_PG_init</> function. + from your <function>_PG_init</function> function. </para> <para> LWLocks are reserved by calling: <programlisting> void RequestNamedLWLockTranche(const char *tranche_name, int num_lwlocks) </programlisting> - from <function>_PG_init</>. This will ensure that an array of - <literal>num_lwlocks</> LWLocks is available under the name - <literal>tranche_name</>. Use <function>GetNamedLWLockTranche</> + from <function>_PG_init</function>. This will ensure that an array of + <literal>num_lwlocks</literal> LWLocks is available under the name + <literal>tranche_name</literal>. Use <function>GetNamedLWLockTranche</function> to get a pointer to this array. </para> <para> To avoid possible race-conditions, each backend should use the LWLock - <function>AddinShmemInitLock</> when connecting to and initializing + <function>AddinShmemInitLock</function> when connecting to and initializing its allocation of shared memory, as shown here: <programlisting> static mystruct *ptr = NULL; @@ -3294,7 +3294,7 @@ if (!ptr) <para> All functions accessed by the backend must present a C interface to the backend; these C functions can then call C++ functions. - For example, <literal>extern C</> linkage is required for + For example, <literal>extern C</literal> linkage is required for backend-accessed functions. This is also necessary for any functions that are passed as pointers between the backend and C++ code. @@ -3303,30 +3303,30 @@ if (!ptr) <listitem> <para> Free memory using the appropriate deallocation method. For example, - most backend memory is allocated using <function>palloc()</>, so use - <function>pfree()</> to free it. Using C++ - <function>delete</> in such cases will fail. + most backend memory is allocated using <function>palloc()</function>, so use + <function>pfree()</function> to free it. Using C++ + <function>delete</function> in such cases will fail. </para> </listitem> <listitem> <para> Prevent exceptions from propagating into the C code (use a catch-all - block at the top level of all <literal>extern C</> functions). This + block at the top level of all <literal>extern C</literal> functions). This is necessary even if the C++ code does not explicitly throw any exceptions, because events like out-of-memory can still throw exceptions. Any exceptions must be caught and appropriate errors passed back to the C interface. If possible, compile C++ with - <option>-fno-exceptions</> to eliminate exceptions entirely; in such + <option>-fno-exceptions</option> to eliminate exceptions entirely; in such cases, you must check for failures in your C++ code, e.g. check for - NULL returned by <function>new()</>. + NULL returned by <function>new()</function>. </para> </listitem> <listitem> <para> If calling backend functions from C++ code, be sure that the C++ call stack contains only plain old data structures - (<acronym>POD</>). This is necessary because backend errors - generate a distant <function>longjmp()</> that does not properly + (<acronym>POD</acronym>). This is necessary because backend errors + generate a distant <function>longjmp()</function> that does not properly unroll a C++ call stack with non-POD objects. </para> </listitem> @@ -3335,7 +3335,7 @@ if (!ptr) <para> In summary, it is best to place C++ code behind a wall of - <literal>extern C</> functions that interface to the backend, + <literal>extern C</literal> functions that interface to the backend, and avoid exception, memory, and call stack leakage. </para> </sect2> diff --git a/doc/src/sgml/xindex.sgml b/doc/src/sgml/xindex.sgml index b951a58e0ab..520eab8e99c 100644 --- a/doc/src/sgml/xindex.sgml +++ b/doc/src/sgml/xindex.sgml @@ -12,14 +12,14 @@ The procedures described thus far let you define new types, new functions, and new operators. However, we cannot yet define an index on a column of a new data type. To do this, we must define an - <firstterm>operator class</> for the new data type. Later in this + <firstterm>operator class</firstterm> for the new data type. Later in this section, we will illustrate this concept in an example: a new operator class for the B-tree index method that stores and sorts complex numbers in ascending absolute value order. </para> <para> - Operator classes can be grouped into <firstterm>operator families</> + Operator classes can be grouped into <firstterm>operator families</firstterm> to show the relationships between semantically compatible classes. When only a single data type is involved, an operator class is sufficient, so we'll focus on that case first and then return to operator families. @@ -43,16 +43,16 @@ The routines for an index method do not directly know anything about the data types that the index method will operate on. Instead, an <firstterm>operator - class</><indexterm><primary>operator class</></indexterm> + class</firstterm><indexterm><primary>operator class</primary></indexterm> identifies the set of operations that the index method needs to use to work with a particular data type. Operator classes are so called because one thing they specify is the set of - <literal>WHERE</>-clause operators that can be used with an index + <literal>WHERE</literal>-clause operators that can be used with an index (i.e., can be converted into an index-scan qualification). An operator class can also specify some <firstterm>support - procedures</> that are needed by the internal operations of the + procedures</firstterm> that are needed by the internal operations of the index method, but do not directly correspond to any - <literal>WHERE</>-clause operator that can be used with the index. + <literal>WHERE</literal>-clause operator that can be used with the index. </para> <para> @@ -83,17 +83,17 @@ <para> The operators associated with an operator class are identified by - <quote>strategy numbers</>, which serve to identify the semantics of + <quote>strategy numbers</quote>, which serve to identify the semantics of each operator within the context of its operator class. For example, B-trees impose a strict ordering on keys, lesser to greater, - and so operators like <quote>less than</> and <quote>greater than or equal - to</> are interesting with respect to a B-tree. + and so operators like <quote>less than</quote> and <quote>greater than or equal + to</quote> are interesting with respect to a B-tree. Because <productname>PostgreSQL</productname> allows the user to define operators, <productname>PostgreSQL</productname> cannot look at the name of an operator - (e.g., <literal><</> or <literal>>=</>) and tell what kind of + (e.g., <literal><</literal> or <literal>>=</literal>) and tell what kind of comparison it is. Instead, the index method defines a set of - <quote>strategies</>, which can be thought of as generalized operators. + <quote>strategies</quote>, which can be thought of as generalized operators. Each operator class specifies which actual operator corresponds to each strategy for a particular data type and interpretation of the index semantics. @@ -163,11 +163,11 @@ <para> GiST indexes are more flexible: they do not have a fixed set of - strategies at all. Instead, the <quote>consistency</> support routine + strategies at all. Instead, the <quote>consistency</quote> support routine of each particular GiST operator class interprets the strategy numbers however it likes. As an example, several of the built-in GiST index operator classes index two-dimensional geometric objects, providing - the <quote>R-tree</> strategies shown in + the <quote>R-tree</quote> strategies shown in <xref linkend="xindex-rtree-strat-table">. Four of these are true two-dimensional tests (overlaps, same, contains, contained by); four of them consider only the X direction; and the other four @@ -175,7 +175,7 @@ </para> <table tocentry="1" id="xindex-rtree-strat-table"> - <title>GiST Two-Dimensional <quote>R-tree</> Strategies</title> + <title>GiST Two-Dimensional <quote>R-tree</quote> Strategies</title> <tgroup cols="2"> <thead> <row> @@ -327,7 +327,7 @@ don't have a fixed set of strategies either. Instead the support routines of each operator class interpret the strategy numbers according to the operator class's definition. As an example, the strategy numbers used by - the built-in <literal>Minmax</> operator classes are shown in + the built-in <literal>Minmax</literal> operator classes are shown in <xref linkend="xindex-brin-minmax-strat-table">. </para> @@ -369,8 +369,8 @@ Notice that all the operators listed above return Boolean values. In practice, all operators defined as index method search operators must return type <type>boolean</type>, since they must appear at the top - level of a <literal>WHERE</> clause to be used with an index. - (Some index access methods also support <firstterm>ordering operators</>, + level of a <literal>WHERE</literal> clause to be used with an index. + (Some index access methods also support <firstterm>ordering operators</firstterm>, which typically don't return Boolean values; that feature is discussed in <xref linkend="xindex-ordering-ops">.) </para> @@ -396,7 +396,7 @@ functions should play each of these roles for a given data type and semantic interpretation. The index method defines the set of functions it needs, and the operator class identifies the correct - functions to use by assigning them to the <quote>support function numbers</> + functions to use by assigning them to the <quote>support function numbers</quote> specified by the index method. </para> @@ -427,7 +427,7 @@ <row> <entry> Return the addresses of C-callable sort support function(s), - as documented in <filename>utils/sortsupport.h</> (optional) + as documented in <filename>utils/sortsupport.h</filename> (optional) </entry> <entry>2</entry> </row> @@ -485,52 +485,52 @@ </thead> <tbody> <row> - <entry><function>consistent</></entry> + <entry><function>consistent</function></entry> <entry>determine whether key satisfies the query qualifier</entry> <entry>1</entry> </row> <row> - <entry><function>union</></entry> + <entry><function>union</function></entry> <entry>compute union of a set of keys</entry> <entry>2</entry> </row> <row> - <entry><function>compress</></entry> + <entry><function>compress</function></entry> <entry>compute a compressed representation of a key or value to be indexed</entry> <entry>3</entry> </row> <row> - <entry><function>decompress</></entry> + <entry><function>decompress</function></entry> <entry>compute a decompressed representation of a compressed key</entry> <entry>4</entry> </row> <row> - <entry><function>penalty</></entry> + <entry><function>penalty</function></entry> <entry>compute penalty for inserting new key into subtree with given subtree's key</entry> <entry>5</entry> </row> <row> - <entry><function>picksplit</></entry> + <entry><function>picksplit</function></entry> <entry>determine which entries of a page are to be moved to the new page and compute the union keys for resulting pages</entry> <entry>6</entry> </row> <row> - <entry><function>equal</></entry> + <entry><function>equal</function></entry> <entry>compare two keys and return true if they are equal</entry> <entry>7</entry> </row> <row> - <entry><function>distance</></entry> + <entry><function>distance</function></entry> <entry>determine distance from key to query value (optional)</entry> <entry>8</entry> </row> <row> - <entry><function>fetch</></entry> + <entry><function>fetch</function></entry> <entry>compute original representation of a compressed key for index-only scans (optional)</entry> <entry>9</entry> @@ -557,28 +557,28 @@ </thead> <tbody> <row> - <entry><function>config</></entry> + <entry><function>config</function></entry> <entry>provide basic information about the operator class</entry> <entry>1</entry> </row> <row> - <entry><function>choose</></entry> + <entry><function>choose</function></entry> <entry>determine how to insert a new value into an inner tuple</entry> <entry>2</entry> </row> <row> - <entry><function>picksplit</></entry> + <entry><function>picksplit</function></entry> <entry>determine how to partition a set of values</entry> <entry>3</entry> </row> <row> - <entry><function>inner_consistent</></entry> + <entry><function>inner_consistent</function></entry> <entry>determine which sub-partitions need to be searched for a query</entry> <entry>4</entry> </row> <row> - <entry><function>leaf_consistent</></entry> + <entry><function>leaf_consistent</function></entry> <entry>determine whether key satisfies the query qualifier</entry> <entry>5</entry> @@ -605,7 +605,7 @@ </thead> <tbody> <row> - <entry><function>compare</></entry> + <entry><function>compare</function></entry> <entry> compare two keys and return an integer less than zero, zero, or greater than zero, indicating whether the first key is less than, @@ -614,17 +614,17 @@ <entry>1</entry> </row> <row> - <entry><function>extractValue</></entry> + <entry><function>extractValue</function></entry> <entry>extract keys from a value to be indexed</entry> <entry>2</entry> </row> <row> - <entry><function>extractQuery</></entry> + <entry><function>extractQuery</function></entry> <entry>extract keys from a query condition</entry> <entry>3</entry> </row> <row> - <entry><function>consistent</></entry> + <entry><function>consistent</function></entry> <entry> determine whether value matches query condition (Boolean variant) (optional if support function 6 is present) @@ -632,7 +632,7 @@ <entry>4</entry> </row> <row> - <entry><function>comparePartial</></entry> + <entry><function>comparePartial</function></entry> <entry> compare partial key from query and key from index, and return an integer less than zero, zero, @@ -642,7 +642,7 @@ <entry>5</entry> </row> <row> - <entry><function>triConsistent</></entry> + <entry><function>triConsistent</function></entry> <entry> determine whether value matches query condition (ternary variant) (optional if support function 4 is present) @@ -672,7 +672,7 @@ </thead> <tbody> <row> - <entry><function>opcInfo</></entry> + <entry><function>opcInfo</function></entry> <entry> return internal information describing the indexed columns' summary data @@ -680,17 +680,17 @@ <entry>1</entry> </row> <row> - <entry><function>add_value</></entry> + <entry><function>add_value</function></entry> <entry>add a new value to an existing summary index tuple</entry> <entry>2</entry> </row> <row> - <entry><function>consistent</></entry> + <entry><function>consistent</function></entry> <entry>determine whether value matches query condition</entry> <entry>3</entry> </row> <row> - <entry><function>union</></entry> + <entry><function>union</function></entry> <entry> compute union of two summary tuples </entry> @@ -730,11 +730,11 @@ B-trees, the operators we require are: <itemizedlist spacing="compact"> - <listitem><simpara>absolute-value less-than (strategy 1)</></> - <listitem><simpara>absolute-value less-than-or-equal (strategy 2)</></> - <listitem><simpara>absolute-value equal (strategy 3)</></> - <listitem><simpara>absolute-value greater-than-or-equal (strategy 4)</></> - <listitem><simpara>absolute-value greater-than (strategy 5)</></> + <listitem><simpara>absolute-value less-than (strategy 1)</simpara></listitem> + <listitem><simpara>absolute-value less-than-or-equal (strategy 2)</simpara></listitem> + <listitem><simpara>absolute-value equal (strategy 3)</simpara></listitem> + <listitem><simpara>absolute-value greater-than-or-equal (strategy 4)</simpara></listitem> + <listitem><simpara>absolute-value greater-than (strategy 5)</simpara></listitem> </itemizedlist> </para> @@ -817,7 +817,7 @@ CREATE OPERATOR < ( type we'd probably want <literal>=</literal> to be the ordinary equality operation for complex numbers (and not the equality of the absolute values). In that case, we'd need to use some other - operator name for <function>complex_abs_eq</>. + operator name for <function>complex_abs_eq</function>. </para> </listitem> @@ -894,7 +894,7 @@ CREATE OPERATOR CLASS complex_abs_ops <para> The above example assumes that you want to make this new operator class the default B-tree operator class for the <type>complex</type> data type. - If you don't, just leave out the word <literal>DEFAULT</>. + If you don't, just leave out the word <literal>DEFAULT</literal>. </para> </sect2> @@ -917,11 +917,11 @@ CREATE OPERATOR CLASS complex_abs_ops <para> To handle these needs, <productname>PostgreSQL</productname> uses the concept of an <firstterm>operator - family</><indexterm><primary>operator family</></indexterm>. + family</firstterm><indexterm><primary>operator family</primary></indexterm>. An operator family contains one or more operator classes, and can also contain indexable operators and corresponding support functions that belong to the family as a whole but not to any single class within the - family. We say that such operators and functions are <quote>loose</> + family. We say that such operators and functions are <quote>loose</quote> within the family, as opposed to being bound into a specific class. Typically each operator class contains single-data-type operators while cross-data-type operators are loose in the family. @@ -947,10 +947,10 @@ CREATE OPERATOR CLASS complex_abs_ops <para> As an example, <productname>PostgreSQL</productname> has a built-in - B-tree operator family <literal>integer_ops</>, which includes operator - classes <literal>int8_ops</>, <literal>int4_ops</>, and - <literal>int2_ops</> for indexes on <type>bigint</> (<type>int8</>), - <type>integer</> (<type>int4</>), and <type>smallint</> (<type>int2</>) + B-tree operator family <literal>integer_ops</literal>, which includes operator + classes <literal>int8_ops</literal>, <literal>int4_ops</literal>, and + <literal>int2_ops</literal> for indexes on <type>bigint</type> (<type>int8</type>), + <type>integer</type> (<type>int4</type>), and <type>smallint</type> (<type>int2</type>) columns respectively. The family also contains cross-data-type comparison operators allowing any two of these types to be compared, so that an index on one of these types can be searched using a comparison value of another @@ -1043,7 +1043,7 @@ ALTER OPERATOR FAMILY integer_ops USING btree ADD ]]> </programlisting> - Notice that this definition <quote>overloads</> the operator strategy and + Notice that this definition <quote>overloads</quote> the operator strategy and support function numbers: each number occurs multiple times within the family. This is allowed so long as each instance of a particular number has distinct input data types. The instances that have @@ -1056,8 +1056,8 @@ ALTER OPERATOR FAMILY integer_ops USING btree ADD <para> In a B-tree operator family, all the operators in the family must sort compatibly, meaning that the transitive laws hold across all the data types - supported by the family: <quote>if A = B and B = C, then A = C</>, - and <quote>if A < B and B < C, then A < C</>. Moreover, implicit + supported by the family: <quote>if A = B and B = C, then A = C</quote>, + and <quote>if A < B and B < C, then A < C</quote>. Moreover, implicit or binary coercion casts between types represented in the operator family must not change the associated sort ordering. For each operator in the family there must be a support function having the same @@ -1094,7 +1094,7 @@ ALTER OPERATOR FAMILY integer_ops USING btree ADD <para> In BRIN, the requirements depends on the framework that provides the - operator classes. For operator classes based on <literal>minmax</>, + operator classes. For operator classes based on <literal>minmax</literal>, the behavior required is the same as for B-tree operator families: all the operators in the family must sort compatibly, and casts must not change the associated sort ordering. @@ -1128,14 +1128,14 @@ ALTER OPERATOR FAMILY integer_ops USING btree ADD </para> <para> - In particular, there are SQL features such as <literal>ORDER BY</> and - <literal>DISTINCT</> that require comparison and sorting of values. + In particular, there are SQL features such as <literal>ORDER BY</literal> and + <literal>DISTINCT</literal> that require comparison and sorting of values. To implement these features on a user-defined data type, <productname>PostgreSQL</productname> looks for the default B-tree operator - class for the data type. The <quote>equals</> member of this operator + class for the data type. The <quote>equals</quote> member of this operator class defines the system's notion of equality of values for - <literal>GROUP BY</> and <literal>DISTINCT</>, and the sort ordering - imposed by the operator class defines the default <literal>ORDER BY</> + <literal>GROUP BY</literal> and <literal>DISTINCT</literal>, and the sort ordering + imposed by the operator class defines the default <literal>ORDER BY</literal> ordering. </para> @@ -1153,7 +1153,7 @@ ALTER OPERATOR FAMILY integer_ops USING btree ADD <para> When there is no default operator class for a data type, you will get - errors like <quote>could not identify an ordering operator</> if you + errors like <quote>could not identify an ordering operator</quote> if you try to use these SQL features with the data type. </para> @@ -1161,7 +1161,7 @@ ALTER OPERATOR FAMILY integer_ops USING btree ADD <para> In <productname>PostgreSQL</productname> versions before 7.4, sorting and grouping operations would implicitly use operators named - <literal>=</>, <literal><</>, and <literal>></>. The new + <literal>=</literal>, <literal><</literal>, and <literal>></literal>. The new behavior of relying on default operator classes avoids having to make any assumption about the behavior of operators with particular names. </para> @@ -1180,22 +1180,22 @@ ALTER OPERATOR FAMILY integer_ops USING btree ADD <para> Some index access methods (currently, only GiST) support the concept of - <firstterm>ordering operators</>. What we have been discussing so far - are <firstterm>search operators</>. A search operator is one for which + <firstterm>ordering operators</firstterm>. What we have been discussing so far + are <firstterm>search operators</firstterm>. A search operator is one for which the index can be searched to find all rows satisfying - <literal>WHERE</> - <replaceable>indexed_column</> - <replaceable>operator</> - <replaceable>constant</>. + <literal>WHERE</literal> + <replaceable>indexed_column</replaceable> + <replaceable>operator</replaceable> + <replaceable>constant</replaceable>. Note that nothing is promised about the order in which the matching rows will be returned. In contrast, an ordering operator does not restrict the set of rows that can be returned, but instead determines their order. An ordering operator is one for which the index can be scanned to return rows in the order represented by - <literal>ORDER BY</> - <replaceable>indexed_column</> - <replaceable>operator</> - <replaceable>constant</>. + <literal>ORDER BY</literal> + <replaceable>indexed_column</replaceable> + <replaceable>operator</replaceable> + <replaceable>constant</replaceable>. The reason for defining ordering operators that way is that it supports nearest-neighbor searches, if the operator is one that measures distance. For example, a query like @@ -1205,7 +1205,7 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; </programlisting> finds the ten places closest to a given target point. A GiST index on the location column can do this efficiently because - <literal><-></> is an ordering operator. + <literal><-></literal> is an ordering operator. </para> <para> @@ -1217,17 +1217,17 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10; a B-tree operator family that specifies the sort ordering of the result data type. As was stated in the previous section, B-tree operator families define <productname>PostgreSQL</productname>'s notion of ordering, so - this is a natural representation. Since the point <literal><-></> - operator returns <type>float8</>, it could be specified in an operator + this is a natural representation. Since the point <literal><-></literal> + operator returns <type>float8</type>, it could be specified in an operator class creation command like this: <programlisting><![CDATA[ OPERATOR 15 <-> (point, point) FOR ORDER BY float_ops ]]> </programlisting> - where <literal>float_ops</> is the built-in operator family that includes - operations on <type>float8</>. This declaration states that the index + where <literal>float_ops</literal> is the built-in operator family that includes + operations on <type>float8</type>. This declaration states that the index is able to return rows in order of increasing values of the - <literal><-></> operator. + <literal><-></literal> operator. </para> </sect2> @@ -1243,21 +1243,21 @@ OPERATOR 15 <-> (point, point) FOR ORDER BY float_ops <para> Normally, declaring an operator as a member of an operator class (or family) means that the index method can retrieve exactly the set of rows - that satisfy a <literal>WHERE</> condition using the operator. For example: + that satisfy a <literal>WHERE</literal> condition using the operator. For example: <programlisting> SELECT * FROM table WHERE integer_column < 4; </programlisting> can be satisfied exactly by a B-tree index on the integer column. But there are cases where an index is useful as an inexact guide to the matching rows. For example, if a GiST index stores only bounding boxes - for geometric objects, then it cannot exactly satisfy a <literal>WHERE</> + for geometric objects, then it cannot exactly satisfy a <literal>WHERE</literal> condition that tests overlap between nonrectangular objects such as polygons. Yet we could use the index to find objects whose bounding box overlaps the bounding box of the target object, and then do the exact overlap test only on the objects found by the index. If this - scenario applies, the index is said to be <quote>lossy</> for the + scenario applies, the index is said to be <quote>lossy</quote> for the operator. Lossy index searches are implemented by having the index - method return a <firstterm>recheck</> flag when a row might or might + method return a <firstterm>recheck</firstterm> flag when a row might or might not really satisfy the query condition. The core system will then test the original query condition on the retrieved row to see whether it should be returned as a valid match. This approach works if @@ -1274,8 +1274,8 @@ SELECT * FROM table WHERE integer_column < 4; the bounding box of a complex object such as a polygon. In this case there's not much value in storing the whole polygon in the index entry — we might as well store just a simpler object of type - <type>box</>. This situation is expressed by the <literal>STORAGE</> - option in <command>CREATE OPERATOR CLASS</>: we'd write something like: + <type>box</type>. This situation is expressed by the <literal>STORAGE</literal> + option in <command>CREATE OPERATOR CLASS</command>: we'd write something like: <programlisting> CREATE OPERATOR CLASS polygon_ops @@ -1285,16 +1285,16 @@ CREATE OPERATOR CLASS polygon_ops </programlisting> At present, only the GiST, GIN and BRIN index methods support a - <literal>STORAGE</> type that's different from the column data type. - The GiST <function>compress</> and <function>decompress</> support - routines must deal with data-type conversion when <literal>STORAGE</> - is used. In GIN, the <literal>STORAGE</> type identifies the type of - the <quote>key</> values, which normally is different from the type + <literal>STORAGE</literal> type that's different from the column data type. + The GiST <function>compress</function> and <function>decompress</function> support + routines must deal with data-type conversion when <literal>STORAGE</literal> + is used. In GIN, the <literal>STORAGE</literal> type identifies the type of + the <quote>key</quote> values, which normally is different from the type of the indexed column — for example, an operator class for integer-array columns might have keys that are just integers. The - GIN <function>extractValue</> and <function>extractQuery</> support + GIN <function>extractValue</function> and <function>extractQuery</function> support routines are responsible for extracting keys from indexed values. - BRIN is similar to GIN: the <literal>STORAGE</> type identifies the + BRIN is similar to GIN: the <literal>STORAGE</literal> type identifies the type of the stored summary values, and operator classes' support procedures are responsible for interpreting the summary values correctly. diff --git a/doc/src/sgml/xml2.sgml b/doc/src/sgml/xml2.sgml index 9bbc9e75d78..35e1ccb7a19 100644 --- a/doc/src/sgml/xml2.sgml +++ b/doc/src/sgml/xml2.sgml @@ -8,7 +8,7 @@ </indexterm> <para> - The <filename>xml2</> module provides XPath querying and + The <filename>xml2</filename> module provides XPath querying and XSLT functionality. </para> @@ -16,7 +16,7 @@ <title>Deprecation Notice</title> <para> - From <productname>PostgreSQL</> 8.3 on, there is XML-related + From <productname>PostgreSQL</productname> 8.3 on, there is XML-related functionality based on the SQL/XML standard in the core server. That functionality covers XML syntax checking and XPath queries, which is what this module does, and more, but the API is @@ -36,7 +36,7 @@ <para> <xref linkend="xml2-functions-table"> shows the functions provided by this module. These functions provide straightforward XML parsing and XPath queries. - All arguments are of type <type>text</>, so for brevity that is not shown. + All arguments are of type <type>text</type>, so for brevity that is not shown. </para> <table id="xml2-functions-table"> @@ -63,8 +63,8 @@ <para> This parses the document text in its parameter and returns true if the document is well-formed XML. (Note: this is an alias for the standard - PostgreSQL function <function>xml_is_well_formed()</>. The - name <function>xml_valid()</> is technically incorrect since validity + PostgreSQL function <function>xml_is_well_formed()</function>. The + name <function>xml_valid()</function> is technically incorrect since validity and well-formedness have different meanings in XML.) </para> </entry> @@ -124,7 +124,7 @@ <itemtag>Value 2....</itemtag> </toptag> </synopsis> - If either <literal>toptag</> or <literal>itemtag</> is an empty string, the relevant tag is omitted. + If either <literal>toptag</literal> or <literal>itemtag</literal> is an empty string, the relevant tag is omitted. </para> </entry> </row> @@ -139,7 +139,7 @@ </entry> <entry> <para> - Like <function>xpath_nodeset(document, query, toptag, itemtag)</> but result omits both tags. + Like <function>xpath_nodeset(document, query, toptag, itemtag)</function> but result omits both tags. </para> </entry> </row> @@ -154,7 +154,7 @@ </entry> <entry> <para> - Like <function>xpath_nodeset(document, query, toptag, itemtag)</> but result omits <literal>toptag</literal>. + Like <function>xpath_nodeset(document, query, toptag, itemtag)</function> but result omits <literal>toptag</literal>. </para> </entry> </row> @@ -170,8 +170,8 @@ <entry> <para> This function returns multiple values separated by the specified - separator, for example <literal>Value 1,Value 2,Value 3</> if - separator is <literal>,</>. + separator, for example <literal>Value 1,Value 2,Value 3</literal> if + separator is <literal>,</literal>. </para> </entry> </row> @@ -185,7 +185,7 @@ <type>text</type> </entry> <entry> - This is a wrapper for the above function that uses <literal>,</> + This is a wrapper for the above function that uses <literal>,</literal> as the separator. </entry> </row> @@ -206,7 +206,7 @@ xpath_table(text key, text document, text relation, text xpaths, text criteria) </synopsis> <para> - <function>xpath_table</> is a table function that evaluates a set of XPath + <function>xpath_table</function> is a table function that evaluates a set of XPath queries on each of a set of documents and returns the results as a table. The primary key field from the original document table is returned as the first column of the result so that the result set @@ -228,7 +228,7 @@ xpath_table(text key, text document, text relation, text xpaths, text criteria) <entry><parameter>key</parameter></entry> <entry> <para> - the name of the <quote>key</> field — this is just a field to be used as + the name of the <quote>key</quote> field — this is just a field to be used as the first column of the output table, i.e., it identifies the record from which each output row came (see note below about multiple values) </para> @@ -285,7 +285,7 @@ xpath_table(text key, text document, text relation, text xpaths, text criteria) </para> <para> - so those parameters can be <emphasis>anything</> valid in those particular + so those parameters can be <emphasis>anything</emphasis> valid in those particular locations. The result from this SELECT needs to return exactly two columns (which it will unless you try to list multiple fields for key or document). Beware that this simplistic approach requires that you @@ -293,8 +293,8 @@ xpath_table(text key, text document, text relation, text xpaths, text criteria) </para> <para> - The function has to be used in a <literal>FROM</> expression, with an - <literal>AS</> clause to specify the output columns; for example + The function has to be used in a <literal>FROM</literal> expression, with an + <literal>AS</literal> clause to specify the output columns; for example <programlisting> SELECT * FROM xpath_table('article_id', @@ -304,8 +304,8 @@ xpath_table('article_id', 'date_entered > ''2003-01-01'' ') AS t(article_id integer, author text, page_count integer, title text); </programlisting> - The <literal>AS</> clause defines the names and types of the columns in the - output table. The first is the <quote>key</> field and the rest correspond + The <literal>AS</literal> clause defines the names and types of the columns in the + output table. The first is the <quote>key</quote> field and the rest correspond to the XPath queries. If there are more XPath queries than result columns, the extra queries will be ignored. If there are more result columns @@ -313,19 +313,19 @@ AS t(article_id integer, author text, page_count integer, title text); </para> <para> - Notice that this example defines the <structname>page_count</> result + Notice that this example defines the <structname>page_count</structname> result column as an integer. The function deals internally with string representations, so when you say you want an integer in the output, it will take the string representation of the XPath result and use PostgreSQL input - functions to transform it into an integer (or whatever type the <type>AS</> + functions to transform it into an integer (or whatever type the <type>AS</type> clause requests). An error will result if it can't do this — for example if the result is empty — so you may wish to just stick to - <type>text</> as the column type if you think your data has any problems. + <type>text</type> as the column type if you think your data has any problems. </para> <para> - The calling <command>SELECT</> statement doesn't necessarily have to be - just <literal>SELECT *</> — it can reference the output + The calling <command>SELECT</command> statement doesn't necessarily have to be + just <literal>SELECT *</literal> — it can reference the output columns by name or join them to other tables. The function produces a virtual table with which you can perform any operation you wish (e.g. aggregation, joining, sorting etc). So we could also have: @@ -346,7 +346,7 @@ WHERE t.author_id = p.person_id; <title>Multivalued Results</title> <para> - The <function>xpath_table</> function assumes that the results of each XPath query + The <function>xpath_table</function> function assumes that the results of each XPath query might be multivalued, so the number of rows returned by the function may not be the same as the number of input documents. The first row returned contains the first result from each query, the second row the @@ -393,8 +393,8 @@ WHERE id = 1 ORDER BY doc_num, line_num </para> <para> - To get <literal>doc_num</> on every line, the solution is to use two invocations - of <function>xpath_table</> and join the results: + To get <literal>doc_num</literal> on every line, the solution is to use two invocations + of <function>xpath_table</function> and join the results: <programlisting> SELECT t.*,i.doc_num FROM @@ -437,15 +437,15 @@ xslt_process(text document, text stylesheet, text paramlist) returns text <para> This function applies the XSL stylesheet to the document and returns - the transformed result. The <literal>paramlist</> is a list of parameter + the transformed result. The <literal>paramlist</literal> is a list of parameter assignments to be used in the transformation, specified in the form - <literal>a=1,b=2</>. Note that the + <literal>a=1,b=2</literal>. Note that the parameter parsing is very simple-minded: parameter values cannot contain commas! </para> <para> - There is also a two-parameter version of <function>xslt_process</> which + There is also a two-parameter version of <function>xslt_process</function> which does not pass any parameters to the transformation. </para> </sect3> diff --git a/doc/src/sgml/xoper.sgml b/doc/src/sgml/xoper.sgml index d484d80105e..4b0716951ab 100644 --- a/doc/src/sgml/xoper.sgml +++ b/doc/src/sgml/xoper.sgml @@ -65,12 +65,12 @@ SELECT (a + b) AS c FROM test_complex; <para> We've shown how to create a binary operator here. To create unary - operators, just omit one of <literal>leftarg</> (for left unary) or - <literal>rightarg</> (for right unary). The <literal>procedure</> + operators, just omit one of <literal>leftarg</literal> (for left unary) or + <literal>rightarg</literal> (for right unary). The <literal>procedure</literal> clause and the argument clauses are the only required items in - <command>CREATE OPERATOR</command>. The <literal>commutator</> + <command>CREATE OPERATOR</command>. The <literal>commutator</literal> clause shown in the example is an optional hint to the query - optimizer. Further details about <literal>commutator</> and other + optimizer. Further details about <literal>commutator</literal> and other optimizer hints appear in the next section. </para> </sect1> @@ -98,16 +98,16 @@ SELECT (a + b) AS c FROM test_complex; </para> <sect2> - <title><literal>COMMUTATOR</></title> + <title><literal>COMMUTATOR</literal></title> <para> - The <literal>COMMUTATOR</> clause, if provided, names an operator that is the + The <literal>COMMUTATOR</literal> clause, if provided, names an operator that is the commutator of the operator being defined. We say that operator A is the commutator of operator B if (x A y) equals (y B x) for all possible input values x, y. Notice that B is also the commutator of A. For example, - operators <literal><</> and <literal>></> for a particular data type are usually each others' - commutators, and operator <literal>+</> is usually commutative with itself. - But operator <literal>-</> is usually not commutative with anything. + operators <literal><</literal> and <literal>></literal> for a particular data type are usually each others' + commutators, and operator <literal>+</literal> is usually commutative with itself. + But operator <literal>-</literal> is usually not commutative with anything. </para> <para> @@ -115,23 +115,23 @@ SELECT (a + b) AS c FROM test_complex; right operand type of its commutator, and vice versa. So the name of the commutator operator is all that <productname>PostgreSQL</productname> needs to be given to look up the commutator, and that's all that needs to - be provided in the <literal>COMMUTATOR</> clause. + be provided in the <literal>COMMUTATOR</literal> clause. </para> <para> It's critical to provide commutator information for operators that will be used in indexes and join clauses, because this allows the - query optimizer to <quote>flip around</> such a clause to the forms + query optimizer to <quote>flip around</quote> such a clause to the forms needed for different plan types. For example, consider a query with - a WHERE clause like <literal>tab1.x = tab2.y</>, where <literal>tab1.x</> - and <literal>tab2.y</> are of a user-defined type, and suppose that - <literal>tab2.y</> is indexed. The optimizer cannot generate an + a WHERE clause like <literal>tab1.x = tab2.y</literal>, where <literal>tab1.x</literal> + and <literal>tab2.y</literal> are of a user-defined type, and suppose that + <literal>tab2.y</literal> is indexed. The optimizer cannot generate an index scan unless it can determine how to flip the clause around to - <literal>tab2.y = tab1.x</>, because the index-scan machinery expects + <literal>tab2.y = tab1.x</literal>, because the index-scan machinery expects to see the indexed column on the left of the operator it is given. - <productname>PostgreSQL</productname> will <emphasis>not</> simply + <productname>PostgreSQL</productname> will <emphasis>not</emphasis> simply assume that this is a valid transformation — the creator of the - <literal>=</> operator must specify that it is valid, by marking the + <literal>=</literal> operator must specify that it is valid, by marking the operator with commutator information. </para> @@ -145,20 +145,20 @@ SELECT (a + b) AS c FROM test_complex; <itemizedlist> <listitem> <para> - One way is to omit the <literal>COMMUTATOR</> clause in the first operator that + One way is to omit the <literal>COMMUTATOR</literal> clause in the first operator that you define, and then provide one in the second operator's definition. Since <productname>PostgreSQL</productname> knows that commutative operators come in pairs, when it sees the second definition it will - automatically go back and fill in the missing <literal>COMMUTATOR</> clause in + automatically go back and fill in the missing <literal>COMMUTATOR</literal> clause in the first definition. </para> </listitem> <listitem> <para> - The other, more straightforward way is just to include <literal>COMMUTATOR</> clauses + The other, more straightforward way is just to include <literal>COMMUTATOR</literal> clauses in both definitions. When <productname>PostgreSQL</productname> processes - the first definition and realizes that <literal>COMMUTATOR</> refers to a nonexistent + the first definition and realizes that <literal>COMMUTATOR</literal> refers to a nonexistent operator, the system will make a dummy entry for that operator in the system catalog. This dummy entry will have valid data only for the operator name, left and right operand types, and result type, @@ -175,15 +175,15 @@ SELECT (a + b) AS c FROM test_complex; </sect2> <sect2> - <title><literal>NEGATOR</></title> + <title><literal>NEGATOR</literal></title> <para> - The <literal>NEGATOR</> clause, if provided, names an operator that is the + The <literal>NEGATOR</literal> clause, if provided, names an operator that is the negator of the operator being defined. We say that operator A is the negator of operator B if both return Boolean results and (x A y) equals NOT (x B y) for all possible inputs x, y. Notice that B is also the negator of A. - For example, <literal><</> and <literal>>=</> are a negator pair for most data types. + For example, <literal><</literal> and <literal>>=</literal> are a negator pair for most data types. An operator can never validly be its own negator. </para> @@ -195,15 +195,15 @@ SELECT (a + b) AS c FROM test_complex; <para> An operator's negator must have the same left and/or right operand types - as the operator to be defined, so just as with <literal>COMMUTATOR</>, only the operator - name need be given in the <literal>NEGATOR</> clause. + as the operator to be defined, so just as with <literal>COMMUTATOR</literal>, only the operator + name need be given in the <literal>NEGATOR</literal> clause. </para> <para> Providing a negator is very helpful to the query optimizer since - it allows expressions like <literal>NOT (x = y)</> to be simplified into - <literal>x <> y</>. This comes up more often than you might think, because - <literal>NOT</> operations can be inserted as a consequence of other rearrangements. + it allows expressions like <literal>NOT (x = y)</literal> to be simplified into + <literal>x <> y</literal>. This comes up more often than you might think, because + <literal>NOT</literal> operations can be inserted as a consequence of other rearrangements. </para> <para> @@ -214,13 +214,13 @@ SELECT (a + b) AS c FROM test_complex; </sect2> <sect2> - <title><literal>RESTRICT</></title> + <title><literal>RESTRICT</literal></title> <para> - The <literal>RESTRICT</> clause, if provided, names a restriction selectivity + The <literal>RESTRICT</literal> clause, if provided, names a restriction selectivity estimation function for the operator. (Note that this is a function - name, not an operator name.) <literal>RESTRICT</> clauses only make sense for - binary operators that return <type>boolean</>. The idea behind a restriction + name, not an operator name.) <literal>RESTRICT</literal> clauses only make sense for + binary operators that return <type>boolean</type>. The idea behind a restriction selectivity estimator is to guess what fraction of the rows in a table will satisfy a <literal>WHERE</literal>-clause condition of the form: <programlisting> @@ -228,10 +228,10 @@ column OP constant </programlisting> for the current operator and a particular constant value. This assists the optimizer by - giving it some idea of how many rows will be eliminated by <literal>WHERE</> + giving it some idea of how many rows will be eliminated by <literal>WHERE</literal> clauses that have this form. (What happens if the constant is on the left, you might be wondering? Well, that's one of the things that - <literal>COMMUTATOR</> is for...) + <literal>COMMUTATOR</literal> is for...) </para> <para> @@ -240,12 +240,12 @@ column OP constant one of the system's standard estimators for many of your own operators. These are the standard restriction estimators: <simplelist> - <member><function>eqsel</> for <literal>=</></member> - <member><function>neqsel</> for <literal><></></member> - <member><function>scalarltsel</> for <literal><</></member> - <member><function>scalarlesel</> for <literal><=</></member> - <member><function>scalargtsel</> for <literal>></></member> - <member><function>scalargesel</> for <literal>>=</></member> + <member><function>eqsel</function> for <literal>=</literal></member> + <member><function>neqsel</function> for <literal><></literal></member> + <member><function>scalarltsel</function> for <literal><</literal></member> + <member><function>scalarlesel</function> for <literal><=</literal></member> + <member><function>scalargtsel</function> for <literal>></literal></member> + <member><function>scalargesel</function> for <literal>>=</literal></member> </simplelist> </para> @@ -258,14 +258,14 @@ column OP constant </para> <para> - You can use <function>scalarltsel</>, <function>scalarlesel</>, - <function>scalargtsel</> and <function>scalargesel</> for comparisons on + You can use <function>scalarltsel</function>, <function>scalarlesel</function>, + <function>scalargtsel</function> and <function>scalargesel</function> for comparisons on data types that have some sensible means of being converted into numeric scalars for range comparisons. If possible, add the data type to those understood by the function <function>convert_to_scalar()</function> in <filename>src/backend/utils/adt/selfuncs.c</filename>. (Eventually, this function should be replaced by per-data-type functions - identified through a column of the <classname>pg_type</> system catalog; but that hasn't happened + identified through a column of the <classname>pg_type</classname> system catalog; but that hasn't happened yet.) If you do not do this, things will still work, but the optimizer's estimates won't be as good as they could be. </para> @@ -279,15 +279,15 @@ column OP constant </sect2> <sect2> - <title><literal>JOIN</></title> + <title><literal>JOIN</literal></title> <para> - The <literal>JOIN</> clause, if provided, names a join selectivity + The <literal>JOIN</literal> clause, if provided, names a join selectivity estimation function for the operator. (Note that this is a function - name, not an operator name.) <literal>JOIN</> clauses only make sense for + name, not an operator name.) <literal>JOIN</literal> clauses only make sense for binary operators that return <type>boolean</type>. The idea behind a join selectivity estimator is to guess what fraction of the rows in a - pair of tables will satisfy a <literal>WHERE</>-clause condition of the form: + pair of tables will satisfy a <literal>WHERE</literal>-clause condition of the form: <programlisting> table1.column1 OP table2.column2 </programlisting> @@ -301,27 +301,27 @@ table1.column1 OP table2.column2 a join selectivity estimator function, but will just suggest that you use one of the standard estimators if one is applicable: <simplelist> - <member><function>eqjoinsel</> for <literal>=</></member> - <member><function>neqjoinsel</> for <literal><></></member> - <member><function>scalarltjoinsel</> for <literal><</></member> - <member><function>scalarlejoinsel</> for <literal><=</></member> - <member><function>scalargtjoinsel</> for <literal>></></member> - <member><function>scalargejoinsel</> for <literal>>=</></member> - <member><function>areajoinsel</> for 2D area-based comparisons</member> - <member><function>positionjoinsel</> for 2D position-based comparisons</member> - <member><function>contjoinsel</> for 2D containment-based comparisons</member> + <member><function>eqjoinsel</function> for <literal>=</literal></member> + <member><function>neqjoinsel</function> for <literal><></literal></member> + <member><function>scalarltjoinsel</function> for <literal><</literal></member> + <member><function>scalarlejoinsel</function> for <literal><=</literal></member> + <member><function>scalargtjoinsel</function> for <literal>></literal></member> + <member><function>scalargejoinsel</function> for <literal>>=</literal></member> + <member><function>areajoinsel</function> for 2D area-based comparisons</member> + <member><function>positionjoinsel</function> for 2D position-based comparisons</member> + <member><function>contjoinsel</function> for 2D containment-based comparisons</member> </simplelist> </para> </sect2> <sect2> - <title><literal>HASHES</></title> + <title><literal>HASHES</literal></title> <para> The <literal>HASHES</literal> clause, if present, tells the system that it is permissible to use the hash join method for a join based on this - operator. <literal>HASHES</> only makes sense for a binary operator that - returns <literal>boolean</>, and in practice the operator must represent + operator. <literal>HASHES</literal> only makes sense for a binary operator that + returns <literal>boolean</literal>, and in practice the operator must represent equality for some data type or pair of data types. </para> @@ -336,7 +336,7 @@ table1.column1 OP table2.column2 hashing for operators that take the same data type on both sides. However, sometimes it is possible to design compatible hash functions for two or more data types; that is, functions that will generate the - same hash codes for <quote>equal</> values, even though the values + same hash codes for <quote>equal</quote> values, even though the values have different representations. For example, it's fairly simple to arrange this property when hashing integers of different widths. </para> @@ -357,10 +357,10 @@ table1.column1 OP table2.column2 are machine-dependent ways in which it might fail to do the right thing. For example, if your data type is a structure in which there might be uninteresting pad bits, you cannot simply pass the whole structure to - <function>hash_any</>. (Unless you write your other operators and + <function>hash_any</function>. (Unless you write your other operators and functions to ensure that the unused bits are always zero, which is the recommended strategy.) - Another example is that on machines that meet the <acronym>IEEE</> + Another example is that on machines that meet the <acronym>IEEE</acronym> floating-point standard, negative zero and positive zero are different values (different bit patterns) but they are defined to compare equal. If a float value might contain negative zero then extra steps are needed @@ -392,8 +392,8 @@ table1.column1 OP table2.column2 strict, the function must also be complete: that is, it should return true or false, never null, for any two nonnull inputs. If this rule is - not followed, hash-optimization of <literal>IN</> operations might - generate wrong results. (Specifically, <literal>IN</> might return + not followed, hash-optimization of <literal>IN</literal> operations might + generate wrong results. (Specifically, <literal>IN</literal> might return false where the correct answer according to the standard would be null; or it might yield an error complaining that it wasn't prepared for a null result.) @@ -403,13 +403,13 @@ table1.column1 OP table2.column2 </sect2> <sect2> - <title><literal>MERGES</></title> + <title><literal>MERGES</literal></title> <para> The <literal>MERGES</literal> clause, if present, tells the system that it is permissible to use the merge-join method for a join based on this - operator. <literal>MERGES</> only makes sense for a binary operator that - returns <literal>boolean</>, and in practice the operator must represent + operator. <literal>MERGES</literal> only makes sense for a binary operator that + returns <literal>boolean</literal>, and in practice the operator must represent equality for some data type or pair of data types. </para> @@ -418,7 +418,7 @@ table1.column1 OP table2.column2 into order and then scanning them in parallel. So, both data types must be capable of being fully ordered, and the join operator must be one that can only succeed for pairs of values that fall at the - <quote>same place</> + <quote>same place</quote> in the sort order. In practice this means that the join operator must behave like equality. But it is possible to merge-join two distinct data types so long as they are logically compatible. For @@ -430,7 +430,7 @@ table1.column1 OP table2.column2 <para> To be marked <literal>MERGES</literal>, the join operator must appear - as an equality member of a <literal>btree</> index operator family. + as an equality member of a <literal>btree</literal> index operator family. This is not enforced when you create the operator, since of course the referencing operator family couldn't exist yet. But the operator will not actually be used for merge joins @@ -445,7 +445,7 @@ table1.column1 OP table2.column2 if they are different) that appears in the same operator family. If this is not the case, planner errors might occur when the operator is used. Also, it is a good idea (but not strictly required) for - a <literal>btree</> operator family that supports multiple data types to provide + a <literal>btree</literal> operator family that supports multiple data types to provide equality operators for every combination of the data types; this allows better optimization. </para> diff --git a/doc/src/sgml/xplang.sgml b/doc/src/sgml/xplang.sgml index 4460c8f3611..60d0cc61908 100644 --- a/doc/src/sgml/xplang.sgml +++ b/doc/src/sgml/xplang.sgml @@ -11,7 +11,7 @@ <productname>PostgreSQL</productname> allows user-defined functions to be written in other languages besides SQL and C. These other languages are generically called <firstterm>procedural - languages</firstterm> (<acronym>PL</>s). For a function + languages</firstterm> (<acronym>PL</acronym>s). For a function written in a procedural language, the database server has no built-in knowledge about how to interpret the function's source text. Instead, the task is passed to a special handler that knows @@ -44,9 +44,9 @@ <para> A procedural language must be <quote>installed</quote> into each database where it is to be used. But procedural languages installed in - the database <literal>template1</> are automatically available in all + the database <literal>template1</literal> are automatically available in all subsequently created databases, since their entries in - <literal>template1</> will be copied by <command>CREATE DATABASE</>. + <literal>template1</literal> will be copied by <command>CREATE DATABASE</command>. So the database administrator can decide which languages are available in which databases and can make some languages available by default if desired. @@ -54,8 +54,8 @@ <para> For the languages supplied with the standard distribution, it is - only necessary to execute <command>CREATE EXTENSION</> - <replaceable>language_name</> to install the language into the + only necessary to execute <command>CREATE EXTENSION</command> + <replaceable>language_name</replaceable> to install the language into the current database. The manual procedure described below is only recommended for installing languages that have not been packaged as extensions. @@ -70,7 +70,7 @@ A procedural language is installed in a database in five steps, which must be carried out by a database superuser. In most cases the required SQL commands should be packaged as the installation script - of an <quote>extension</>, so that <command>CREATE EXTENSION</> can be + of an <quote>extension</quote>, so that <command>CREATE EXTENSION</command> can be used to execute them. </para> @@ -103,7 +103,7 @@ CREATE FUNCTION <replaceable>handler_function_name</replaceable>() <step performance="optional" id="xplang-install-cr3"> <para> - Optionally, the language handler can provide an <quote>inline</> + Optionally, the language handler can provide an <quote>inline</quote> handler function that executes anonymous code blocks (<xref linkend="sql-do"> commands) written in this language. If an inline handler function @@ -119,10 +119,10 @@ CREATE FUNCTION <replaceable>inline_function_name</replaceable>(internal) <step performance="optional" id="xplang-install-cr4"> <para> - Optionally, the language handler can provide a <quote>validator</> + Optionally, the language handler can provide a <quote>validator</quote> function that checks a function definition for correctness without actually executing it. The validator function is called by - <command>CREATE FUNCTION</> if it exists. If a validator function + <command>CREATE FUNCTION</command> if it exists. If a validator function is provided by the language, declare it with a command like <synopsis> CREATE FUNCTION <replaceable>validator_function_name</replaceable>(oid) @@ -217,13 +217,13 @@ CREATE TRUSTED PROCEDURAL LANGUAGE plperl is built and installed into the <quote>library</quote> directory; furthermore, the <application>PL/pgSQL</application> language itself is installed in all databases. - If <application>Tcl</> support is configured in, the handlers for - <application>PL/Tcl</> and <application>PL/TclU</> are built and installed + If <application>Tcl</application> support is configured in, the handlers for + <application>PL/Tcl</application> and <application>PL/TclU</application> are built and installed in the library directory, but the language itself is not installed in any database by default. - Likewise, the <application>PL/Perl</> and <application>PL/PerlU</> + Likewise, the <application>PL/Perl</application> and <application>PL/PerlU</application> handlers are built and installed if Perl support is configured, and the - <application>PL/PythonU</> handler is installed if Python support is + <application>PL/PythonU</application> handler is installed if Python support is configured, but these languages are not installed by default. </para> diff --git a/doc/src/sgml/xtypes.sgml b/doc/src/sgml/xtypes.sgml index ac0b8a2943f..2f90c1d42c9 100644 --- a/doc/src/sgml/xtypes.sgml +++ b/doc/src/sgml/xtypes.sgml @@ -12,7 +12,7 @@ As described in <xref linkend="extend-type-system">, <productname>PostgreSQL</productname> can be extended to support new data types. This section describes how to define new base types, - which are data types defined below the level of the <acronym>SQL</> + which are data types defined below the level of the <acronym>SQL</acronym> language. Creating a new base type requires implementing functions to operate on the type in a low-level language, usually C. </para> @@ -20,8 +20,8 @@ <para> The examples in this section can be found in <filename>complex.sql</filename> and <filename>complex.c</filename> - in the <filename>src/tutorial</> directory of the source distribution. - See the <filename>README</> file in that directory for instructions + in the <filename>src/tutorial</filename> directory of the source distribution. + See the <filename>README</filename> file in that directory for instructions about running the examples. </para> @@ -45,7 +45,7 @@ </para> <para> - Suppose we want to define a type <type>complex</> that represents + Suppose we want to define a type <type>complex</type> that represents complex numbers. A natural way to represent a complex number in memory would be the following C structure: @@ -57,7 +57,7 @@ typedef struct Complex { </programlisting> We will need to make this a pass-by-reference type, since it's too - large to fit into a single <type>Datum</> value. + large to fit into a single <type>Datum</type> value. </para> <para> @@ -130,7 +130,7 @@ complex_out(PG_FUNCTION_ARGS) external binary representation is. Most of the built-in data types try to provide a machine-independent binary representation. For <type>complex</type>, we will piggy-back on the binary I/O converters - for type <type>float8</>: + for type <type>float8</type>: <programlisting><![CDATA[ PG_FUNCTION_INFO_V1(complex_recv); @@ -222,7 +222,7 @@ CREATE TYPE complex ( <productname>PostgreSQL</productname> automatically provides support for arrays of that type. The array type typically has the same name as the base type with the underscore character - (<literal>_</>) prepended. + (<literal>_</literal>) prepended. </para> <para> @@ -237,7 +237,7 @@ CREATE TYPE complex ( If the internal representation of the data type is variable-length, the internal representation must follow the standard layout for variable-length data: the first four bytes must be a <type>char[4]</type> field which is - never accessed directly (customarily named <structfield>vl_len_</>). You + never accessed directly (customarily named <structfield>vl_len_</structfield>). You must use the <function>SET_VARSIZE()</function> macro to store the total size of the datum (including the length field itself) in this field and <function>VARSIZE()</function> to retrieve it. (These macros exist @@ -258,41 +258,41 @@ CREATE TYPE complex ( <para> If the values of your data type vary in size (in internal form), it's - usually desirable to make the data type <acronym>TOAST</>-able (see <xref + usually desirable to make the data type <acronym>TOAST</acronym>-able (see <xref linkend="storage-toast">). You should do this even if the values are always too small to be compressed or stored externally, because - <acronym>TOAST</> can save space on small data too, by reducing header + <acronym>TOAST</acronym> can save space on small data too, by reducing header overhead. </para> <para> - To support <acronym>TOAST</> storage, the C functions operating on the data + To support <acronym>TOAST</acronym> storage, the C functions operating on the data type must always be careful to unpack any toasted values they are handed - by using <function>PG_DETOAST_DATUM</>. (This detail is customarily hidden + by using <function>PG_DETOAST_DATUM</function>. (This detail is customarily hidden by defining type-specific <function>GETARG_DATATYPE_P</function> macros.) Then, when running the <command>CREATE TYPE</command> command, specify the - internal length as <literal>variable</> and select some appropriate storage - option other than <literal>plain</>. + internal length as <literal>variable</literal> and select some appropriate storage + option other than <literal>plain</literal>. </para> <para> If data alignment is unimportant (either just for a specific function or because the data type specifies byte alignment anyway) then it's possible - to avoid some of the overhead of <function>PG_DETOAST_DATUM</>. You can use - <function>PG_DETOAST_DATUM_PACKED</> instead (customarily hidden by - defining a <function>GETARG_DATATYPE_PP</> macro) and using the macros - <function>VARSIZE_ANY_EXHDR</> and <function>VARDATA_ANY</> to access + to avoid some of the overhead of <function>PG_DETOAST_DATUM</function>. You can use + <function>PG_DETOAST_DATUM_PACKED</function> instead (customarily hidden by + defining a <function>GETARG_DATATYPE_PP</function> macro) and using the macros + <function>VARSIZE_ANY_EXHDR</function> and <function>VARDATA_ANY</function> to access a potentially-packed datum. Again, the data returned by these macros is not aligned even if the data type definition specifies an alignment. If the alignment is important you - must go through the regular <function>PG_DETOAST_DATUM</> interface. + must go through the regular <function>PG_DETOAST_DATUM</function> interface. </para> <note> <para> - Older code frequently declares <structfield>vl_len_</> as an - <type>int32</> field instead of <type>char[4]</>. This is OK as long as - the struct definition has other fields that have at least <type>int32</> + Older code frequently declares <structfield>vl_len_</structfield> as an + <type>int32</type> field instead of <type>char[4]</type>. This is OK as long as + the struct definition has other fields that have at least <type>int32</type> alignment. But it is dangerous to use such a struct definition when working with a potentially unaligned datum; the compiler may take it as license to assume the datum actually is aligned, leading to core dumps on @@ -301,28 +301,28 @@ CREATE TYPE complex ( </note> <para> - Another feature that's enabled by <acronym>TOAST</> support is the - possibility of having an <firstterm>expanded</> in-memory data + Another feature that's enabled by <acronym>TOAST</acronym> support is the + possibility of having an <firstterm>expanded</firstterm> in-memory data representation that is more convenient to work with than the format that - is stored on disk. The regular or <quote>flat</> varlena storage format + is stored on disk. The regular or <quote>flat</quote> varlena storage format is ultimately just a blob of bytes; it cannot for example contain pointers, since it may get copied to other locations in memory. For complex data types, the flat format may be quite expensive to work - with, so <productname>PostgreSQL</> provides a way to <quote>expand</> + with, so <productname>PostgreSQL</productname> provides a way to <quote>expand</quote> the flat format into a representation that is more suited to computation, and then pass that format in-memory between functions of the data type. </para> <para> To use expanded storage, a data type must define an expanded format that - follows the rules given in <filename>src/include/utils/expandeddatum.h</>, - and provide functions to <quote>expand</> a flat varlena value into - expanded format and <quote>flatten</> the expanded format back to the + follows the rules given in <filename>src/include/utils/expandeddatum.h</filename>, + and provide functions to <quote>expand</quote> a flat varlena value into + expanded format and <quote>flatten</quote> the expanded format back to the regular varlena representation. Then ensure that all C functions for the data type can accept either representation, possibly by converting one into the other immediately upon receipt. This does not require fixing all existing functions for the data type at once, because the standard - <function>PG_DETOAST_DATUM</> macro is defined to convert expanded inputs + <function>PG_DETOAST_DATUM</function> macro is defined to convert expanded inputs into regular flat format. Therefore, existing functions that work with the flat varlena format will continue to work, though slightly inefficiently, with expanded inputs; they need not be converted until and @@ -344,14 +344,14 @@ CREATE TYPE complex ( will detoast external, short-header, and compressed varlena inputs, but not expanded inputs. Such a function can be defined as returning a pointer to a union of the flat varlena format and the expanded format. - Callers can use the <function>VARATT_IS_EXPANDED_HEADER()</> macro to + Callers can use the <function>VARATT_IS_EXPANDED_HEADER()</function> macro to determine which format they received. </para> <para> - The <acronym>TOAST</> infrastructure not only allows regular varlena + The <acronym>TOAST</acronym> infrastructure not only allows regular varlena values to be distinguished from expanded values, but also - distinguishes <quote>read-write</> and <quote>read-only</> pointers to + distinguishes <quote>read-write</quote> and <quote>read-only</quote> pointers to expanded values. C functions that only need to examine an expanded value, or will only change it in safe and non-semantically-visible ways, need not care which type of pointer they receive. C functions that @@ -368,7 +368,7 @@ CREATE TYPE complex ( <para> For examples of working with expanded values, see the standard array infrastructure, particularly - <filename>src/backend/utils/adt/array_expanded.c</>. + <filename>src/backend/utils/adt/array_expanded.c</filename>. </para> </sect2> -- GitLab